get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/48084/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 48084,
    "url": "http://patchwork.dpdk.org/api/patches/48084/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/f245d960bc6ca418cbc0e4124c4c749657e285b1.1542212598.git.anatoly.burakov@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<f245d960bc6ca418cbc0e4124c4c749657e285b1.1542212598.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/f245d960bc6ca418cbc0e4124c4c749657e285b1.1542212598.git.anatoly.burakov@intel.com",
    "date": "2018-11-14T16:30:21",
    "name": "[v2,3/5] common: add missing implementations",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "d451a89f0b362fd4ff1ebf01bb1ad7a5a90692e9",
    "submitter": {
        "id": 4,
        "url": "http://patchwork.dpdk.org/api/people/4/?format=api",
        "name": "Anatoly Burakov",
        "email": "anatoly.burakov@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/f245d960bc6ca418cbc0e4124c4c749657e285b1.1542212598.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 2423,
            "url": "http://patchwork.dpdk.org/api/series/2423/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=2423",
            "date": "2018-11-14T16:30:19",
            "name": "[v2,1/5] bitmap: remove useless code",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/2423/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/48084/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/48084/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 92DE21B1F1;\n\tWed, 14 Nov 2018 17:30:36 +0100 (CET)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n\tby dpdk.org (Postfix) with ESMTP id EA6761B192\n\tfor <dev@dpdk.org>; Wed, 14 Nov 2018 17:30:29 +0100 (CET)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n\tby orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t14 Nov 2018 08:30:28 -0800",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga007.jf.intel.com with ESMTP; 14 Nov 2018 08:30:26 -0800",
            "from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com\n\t[10.237.217.45])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\twAEGUPU3029214; Wed, 14 Nov 2018 16:30:25 GMT",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id wAEGUOW9007156;\n\tWed, 14 Nov 2018 16:30:24 GMT",
            "(from aburakov@localhost)\n\tby sivswdev01.ir.intel.com with LOCAL id wAEGUONf007152;\n\tWed, 14 Nov 2018 16:30:24 GMT"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.56,233,1539673200\"; d=\"scan'208\";a=\"89264568\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "cristian.dumitrescu@intel.com, thomas@monjalon.net,\n\tbruce.richardson@intel.com, ferruh.yigit@intel.com,\n\tjasvinder.singh@intel.com",
        "Date": "Wed, 14 Nov 2018 16:30:21 +0000",
        "Message-Id": "<f245d960bc6ca418cbc0e4124c4c749657e285b1.1542212598.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "In-Reply-To": [
            "<fbc68e4e563904b7758950cc50ecf0f753f4ec53.1542212598.git.anatoly.burakov@intel.com>",
            "<9eb826f80f19422153d5a0ab611fb467a94eded0.1542197039.git.anatoly.burakov@intel.com>"
        ],
        "References": [
            "<fbc68e4e563904b7758950cc50ecf0f753f4ec53.1542212598.git.anatoly.burakov@intel.com>",
            "<9eb826f80f19422153d5a0ab611fb467a94eded0.1542197039.git.anatoly.burakov@intel.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v2 3/5] common: add missing implementations",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Implement missing functions for 32-bit safe bsf, as well as 64-bit\nfls and log2.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n lib/librte_eal/common/include/rte_common.h | 62 +++++++++++++++++++++-\n 1 file changed, 61 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h\nindex 7609840da..baec734a1 100644\n--- a/lib/librte_eal/common/include/rte_common.h\n+++ b/lib/librte_eal/common/include/rte_common.h\n@@ -456,6 +456,28 @@ rte_bsf32(uint32_t v)\n \treturn (uint32_t)__builtin_ctz(v);\n }\n \n+/**\n+ * Searches the input parameter for the least significant set bit\n+ * (starting from zero). Safe version (checks for input parameter being zero).\n+ *\n+ * @param v\n+ *     The input parameter.\n+ * @param pos\n+ *     If ``v`` was not 0, this value will contain position of least significant\n+ *     bit within the input parameter.\n+ * @return\n+ *     Returns 0 if ``v`` was 0, otherwise returns 1.\n+ */\n+static inline int\n+rte_bsf32_safe(uint64_t v, uint32_t *pos)\n+{\n+\tif (v == 0)\n+\t\treturn 0;\n+\n+\t*pos = rte_bsf32(v);\n+\treturn 1;\n+}\n+\n /**\n  * Return the rounded-up log2 of a integer.\n  *\n@@ -473,7 +495,6 @@ rte_log2_u32(uint32_t v)\n \treturn rte_bsf32(v);\n }\n \n-\n /**\n  * Return the last (most-significant) bit set.\n  *\n@@ -513,6 +534,45 @@ rte_bsf64_safe(uint64_t v, uint32_t *pos)\n \treturn 1;\n }\n \n+/**\n+ * Return the last (most-significant) bit set.\n+ *\n+ * @note The last (most significant) bit is at position 32.\n+ * @note rte_fls_u32(0) = 0, rte_fls_u32(1) = 1, rte_fls_u32(0x80000000) = 32\n+ *\n+ * @param x\n+ *     The input parameter.\n+ * @return\n+ *     The last (most-significant) bit set, or 0 if the input is 0.\n+ */\n+static inline int\n+rte_fls_u64(uint64_t x)\n+{\n+\treturn (x == 0) ? 0 : 64 - __builtin_clzll(x);\n+}\n+\n+/**\n+ * Return the rounded-up log2 of a integer.\n+ *\n+ * @param v\n+ *     The input parameter.\n+ * @return\n+ *     The rounded-up log2 of the input, or 0 if the input is 0.\n+ */\n+static inline uint32_t\n+rte_log2_u64(uint64_t v)\n+{\n+\tuint32_t pos = 0;\n+\tif (v == 0)\n+\t\treturn 0;\n+\tv = rte_align64pow2(v);\n+\t/* TODO: replace with rte_bsf64 when that lands */\n+\t/* we checked for v being 0 already, so pos is always valid */\n+\trte_bsf64_safe(v, &pos);\n+\treturn pos;\n+}\n+\n+\n #ifndef offsetof\n /** Return the offset of a field in a structure. */\n #define offsetof(TYPE, MEMBER)  __builtin_offsetof (TYPE, MEMBER)\n",
    "prefixes": [
        "v2",
        "3/5"
    ]
}