get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 48089,
    "url": "http://patchwork.dpdk.org/api/patches/48089/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/369642722f3c4d3d6c184fddb34b4aa7ce308a84.1542213812.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": "<369642722f3c4d3d6c184fddb34b4aa7ce308a84.1542213812.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/369642722f3c4d3d6c184fddb34b4aa7ce308a84.1542213812.git.anatoly.burakov@intel.com",
    "date": "2018-11-14T16:47:08",
    "name": "[v3,3/5] common: add missing implementations",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "487a369337bcfb563c8dc0805c97c92d98ebc0d4",
    "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/369642722f3c4d3d6c184fddb34b4aa7ce308a84.1542213812.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 2424,
            "url": "http://patchwork.dpdk.org/api/series/2424/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=2424",
            "date": "2018-11-14T16:47:06",
            "name": "[v3,1/5] bitmap: remove useless code",
            "version": 3,
            "mbox": "http://patchwork.dpdk.org/series/2424/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/48089/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/48089/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 EE3881B1F6;\n\tWed, 14 Nov 2018 17:47:19 +0100 (CET)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 593F84CBD\n\tfor <dev@dpdk.org>; Wed, 14 Nov 2018 17:47:14 +0100 (CET)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t14 Nov 2018 08:47:13 -0800",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby fmsmga005.fm.intel.com with ESMTP; 14 Nov 2018 08:47:12 -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\twAEGlBoZ032578; Wed, 14 Nov 2018 16:47:11 GMT",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id wAEGlBA1017299;\n\tWed, 14 Nov 2018 16:47:11 GMT",
            "(from aburakov@localhost)\n\tby sivswdev01.ir.intel.com with LOCAL id wAEGlATR017290;\n\tWed, 14 Nov 2018 16:47:10 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=\"279798252\"",
        "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:47:08 +0000",
        "Message-Id": "<369642722f3c4d3d6c184fddb34b4aa7ce308a84.1542213812.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "In-Reply-To": [
            "<fbc68e4e563904b7758950cc50ecf0f753f4ec53.1542213812.git.anatoly.burakov@intel.com>",
            "<fbc68e4e563904b7758950cc50ecf0f753f4ec53.1542212598.git.anatoly.burakov@intel.com>"
        ],
        "References": [
            "<fbc68e4e563904b7758950cc50ecf0f753f4ec53.1542213812.git.anatoly.burakov@intel.com>",
            "<fbc68e4e563904b7758950cc50ecf0f753f4ec53.1542212598.git.anatoly.burakov@intel.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v3 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>\nAcked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\n---\n\nNotes:\n    v3:\n    - Added clarification that pos is not checked\n\n lib/librte_eal/common/include/rte_common.h | 64 +++++++++++++++++++++-\n 1 file changed, 63 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 d115b175c..6883e5c3b 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,30 @@ 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+ * @warning ``pos`` must be a valid pointer. It is not checked!\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 +497,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@@ -515,6 +538,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": [
        "v3",
        "3/5"
    ]
}