get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 48223,
    "url": "http://patchwork.dpdk.org/api/patches/48223/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/a9f793b3377ab7b50b0f0636362249c1f7758507.1542801670.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": "<a9f793b3377ab7b50b0f0636362249c1f7758507.1542801670.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/a9f793b3377ab7b50b0f0636362249c1f7758507.1542801670.git.anatoly.burakov@intel.com",
    "date": "2018-11-21T12:05:03",
    "name": "[2/2] bitmap: deprecate and rename rte_bsf64",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "88c025d3ac28f8926bd55066f95d4bb03ea189a8",
    "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/a9f793b3377ab7b50b0f0636362249c1f7758507.1542801670.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 2516,
            "url": "http://patchwork.dpdk.org/api/series/2516/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=2516",
            "date": "2018-11-21T12:05:02",
            "name": "[1/2] bitmap: remove useless code",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/2516/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/48223/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/48223/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 C1A2D5F28;\n\tWed, 21 Nov 2018 13:05:15 +0100 (CET)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id 090745F19\n\tfor <dev@dpdk.org>; Wed, 21 Nov 2018 13:05:13 +0100 (CET)",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t21 Nov 2018 04:05:12 -0800",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby fmsmga006.fm.intel.com with ESMTP; 21 Nov 2018 04:05:11 -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\twALC5AFI017501; Wed, 21 Nov 2018 12:05:10 GMT",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id wALC5ALj013923;\n\tWed, 21 Nov 2018 12:05:10 GMT",
            "(from aburakov@localhost)\n\tby sivswdev01.ir.intel.com with LOCAL id wALC533D013875;\n\tWed, 21 Nov 2018 12:05:03 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,261,1539673200\"; d=\"scan'208\";a=\"282972872\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Neil Horman <nhorman@tuxdriver.com>,\n\tJohn McNamara <john.mcnamara@intel.com>,\n\tMarko Kovacevic <marko.kovacevic@intel.com>,\n\tCristian Dumitrescu <cristian.dumitrescu@intel.com>,\n\tjasvinder.singh@intel.com, ferruh.yigit@intel.com,\n\tbruce.richardson@intel.com, thomas@monjalon.net",
        "Date": "Wed, 21 Nov 2018 12:05:03 +0000",
        "Message-Id": "<a9f793b3377ab7b50b0f0636362249c1f7758507.1542801670.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "In-Reply-To": [
            "<6279ff04d7d477d3c2c076c643a0093aecb654c6.1542801670.git.anatoly.burakov@intel.com>",
            "<6279ff04d7d477d3c2c076c643a0093aecb654c6.1542801670.git.anatoly.burakov@intel.com>"
        ],
        "References": [
            "<6279ff04d7d477d3c2c076c643a0093aecb654c6.1542801670.git.anatoly.burakov@intel.com>",
            "<6279ff04d7d477d3c2c076c643a0093aecb654c6.1542801670.git.anatoly.burakov@intel.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH 2/2] bitmap: deprecate and rename rte_bsf64",
        "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": "Rename rte_bsf64 to rte_bsf64_safe (this is a \"safe\" version in\nthat it prevents undefined behavior by checking if incoming\nparameter is zero) and move it to common header.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\nAcked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\nAcked-by: Jasvinder Singh <jasvinder.singh@intel.com>\n---\n doc/guides/rel_notes/deprecation.rst       |  5 +++++\n lib/librte_eal/common/include/rte_bitmap.h | 14 ++++---------\n lib/librte_eal/common/include/rte_common.h | 23 ++++++++++++++++++++++\n 3 files changed, 32 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst\nindex 34b28234c..553e99171 100644\n--- a/doc/guides/rel_notes/deprecation.rst\n+++ b/doc/guides/rel_notes/deprecation.rst\n@@ -22,6 +22,11 @@ Deprecation Notices\n \n     + ``rte_eal_devargs_type_count``\n \n+* eal: function ``rte_bsf64`` in ``rte_bitmap.h`` has been renamed to\n+  ``rte_bsf64_safe`` and moved to ``rte_common.h``. A new ``rte_bsf64`` function\n+  will be added in the next release in ``rte_common.h`` that follows convention\n+  set by existing ``rte_bsf32`` function.\n+\n * pci: Several exposed functions are misnamed.\n   The following functions are deprecated starting from v17.11 and are replaced:\n \ndiff --git a/lib/librte_eal/common/include/rte_bitmap.h b/lib/librte_eal/common/include/rte_bitmap.h\nindex d2ed6204c..77727c828 100644\n--- a/lib/librte_eal/common/include/rte_bitmap.h\n+++ b/lib/librte_eal/common/include/rte_bitmap.h\n@@ -93,14 +93,10 @@ __rte_bitmap_index2_set(struct rte_bitmap *bmp)\n \tbmp->index2 = (((bmp->index1 << RTE_BITMAP_SLAB_BIT_SIZE_LOG2) + bmp->offset1) << RTE_BITMAP_CL_SLAB_SIZE_LOG2);\n }\n \n-static inline int\n+static inline int __rte_deprecated\n rte_bsf64(uint64_t slab, uint32_t *pos)\n {\n-\tif (slab == 0)\n-\t\treturn 0;\n-\n-\t*pos = __builtin_ctzll(slab);\n-\treturn 1;\n+\treturn rte_bsf64_safe(slab, pos);\n }\n \n static inline uint32_t\n@@ -408,9 +404,8 @@ __rte_bitmap_scan_search(struct rte_bitmap *bmp)\n \tvalue1 = bmp->array1[bmp->index1];\n \tvalue1 &= __rte_bitmap_mask1_get(bmp);\n \n-\tif (rte_bsf64(value1, &bmp->offset1)) {\n+\tif (rte_bsf64_safe(value1, &bmp->offset1))\n \t\treturn 1;\n-\t}\n \n \t__rte_bitmap_index1_inc(bmp);\n \tbmp->offset1 = 0;\n@@ -419,9 +414,8 @@ __rte_bitmap_scan_search(struct rte_bitmap *bmp)\n \tfor (i = 0; i < bmp->array1_size; i ++, __rte_bitmap_index1_inc(bmp)) {\n \t\tvalue1 = bmp->array1[bmp->index1];\n \n-\t\tif (rte_bsf64(value1, &bmp->offset1)) {\n+\t\tif (rte_bsf64_safe(value1, &bmp->offset1))\n \t\t\treturn 1;\n-\t\t}\n \t}\n \n \treturn 0;\ndiff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h\nindex 87f0f6302..d115b175c 100644\n--- a/lib/librte_eal/common/include/rte_common.h\n+++ b/lib/librte_eal/common/include/rte_common.h\n@@ -491,6 +491,29 @@ rte_fls_u32(uint32_t x)\n \treturn (x == 0) ? 0 : 32 - __builtin_clz(x);\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_bsf64_safe(uint64_t v, uint32_t *pos)\n+{\n+\tif (v == 0)\n+\t\treturn 0;\n+\n+\t*pos = __builtin_ctzll(v);\n+\treturn 1;\n+}\n \n #ifndef offsetof\n /** Return the offset of a field in a structure. */\n",
    "prefixes": [
        "2/2"
    ]
}