get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 49182,
    "url": "http://patches.dpdk.org/api/patches/49182/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/223b9255bd5283abab2d69dfb18e1b5ac12f6eef.1545307762.git.anatoly.burakov@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patches.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": "<223b9255bd5283abab2d69dfb18e1b5ac12f6eef.1545307762.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/223b9255bd5283abab2d69dfb18e1b5ac12f6eef.1545307762.git.anatoly.burakov@intel.com",
    "date": "2018-12-20T12:09:49",
    "name": "[v2,3/4] common: add 64-bit fls function",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "a6cd39e153d3b744608bca03d6b0ccb3cd723482",
    "submitter": {
        "id": 4,
        "url": "http://patches.dpdk.org/api/people/4/?format=api",
        "name": "Anatoly Burakov",
        "email": "anatoly.burakov@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/223b9255bd5283abab2d69dfb18e1b5ac12f6eef.1545307762.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 2897,
            "url": "http://patches.dpdk.org/api/series/2897/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=2897",
            "date": "2018-12-20T12:09:48",
            "name": "[v2,1/4] bitmap: remove deprecated bsf64 function",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/2897/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/49182/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/49182/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 3058D1BCA7;\n\tThu, 20 Dec 2018 13:10:03 +0100 (CET)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 8CA421BC7F\n\tfor <dev@dpdk.org>; Thu, 20 Dec 2018 13:09:59 +0100 (CET)",
            "from orsmga004.jf.intel.com ([10.7.209.38])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t20 Dec 2018 04:09:58 -0800",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga004.jf.intel.com with ESMTP; 20 Dec 2018 04:09:57 -0800",
            "from sivswdev05.ir.intel.com (sivswdev05.ir.intel.com\n\t[10.243.17.64])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\twBKC9uME014135; Thu, 20 Dec 2018 12:09:56 GMT",
            "from sivswdev05.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev05.ir.intel.com with ESMTP id wBKC9uYk001199;\n\tThu, 20 Dec 2018 12:09:56 GMT",
            "(from aburakov@localhost)\n\tby sivswdev05.ir.intel.com with LOCAL id wBKC9u1k001195;\n\tThu, 20 Dec 2018 12:09:56 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,376,1539673200\"; d=\"scan'208\";a=\"260997380\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "jerin.jacob@caviumnetworks.com, thomas@monjalon.net",
        "Date": "Thu, 20 Dec 2018 12:09:49 +0000",
        "Message-Id": "<223b9255bd5283abab2d69dfb18e1b5ac12f6eef.1545307762.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "In-Reply-To": [
            "<ec15434d0c3ac3c9c0f6d89a865120b29bb6737a.1545307762.git.anatoly.burakov@intel.com>",
            "<1cf22c82b6ca7561966be674afb8a02add0913b9.1544550999.git.anatoly.burakov@intel.com>"
        ],
        "References": [
            "<ec15434d0c3ac3c9c0f6d89a865120b29bb6737a.1545307762.git.anatoly.burakov@intel.com>",
            "<1cf22c82b6ca7561966be674afb8a02add0913b9.1544550999.git.anatoly.burakov@intel.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v2 3/4] common: add 64-bit fls function",
        "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": "Add missing implementation for 64-bit fls function, and extend\nunit test to test the new function as well.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n lib/librte_eal/common/include/rte_common.h | 18 ++++++++++++++++++\n test/test/test_common.c                    | 21 +++++++++++++++++++++\n 2 files changed, 39 insertions(+)",
    "diff": "diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h\nindex d102f2cec..7b50b8479 100644\n--- a/lib/librte_eal/common/include/rte_common.h\n+++ b/lib/librte_eal/common/include/rte_common.h\n@@ -547,6 +547,24 @@ 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 64.\n+ * @note rte_fls_u64(0) = 0, rte_fls_u64(1) = 1,\n+ *       rte_fls_u64(0x8000000000000000) = 64\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 #ifndef offsetof\n /** Return the offset of a field in a structure. */\n #define offsetof(TYPE, MEMBER)  __builtin_offsetof (TYPE, MEMBER)\ndiff --git a/test/test/test_common.c b/test/test/test_common.c\nindex 4a42aaed8..f6dd4c18d 100644\n--- a/test/test/test_common.c\n+++ b/test/test/test_common.c\n@@ -242,6 +242,8 @@ test_fls(void)\n \t};\n \n \tfor (i = 0; i < RTE_DIM(test); i++) {\n+\t\tuint64_t arg64;\n+\n \t\targ = test[i].arg;\n \t\trc = rte_fls_u32(arg);\n \t\texpected = test[i].rc;\n@@ -250,6 +252,25 @@ test_fls(void)\n \t\t\t\targ, rc, expected);\n \t\t\treturn TEST_FAILED;\n \t\t}\n+\t\t/* 64-bit version */\n+\t\targ = test[i].arg;\n+\t\trc = rte_fls_u64(arg);\n+\t\texpected = test[i].rc;\n+\t\tif (rc != expected) {\n+\t\t\tprintf(\"Wrong rte_fls_u64(0x%x) rc=%d, expected=%d\\n\",\n+\t\t\t\targ, rc, expected);\n+\t\t\treturn TEST_FAILED;\n+\t\t}\n+\t\t/* 64-bit version shifted by 32 bits */\n+\t\targ64 = (uint64_t)test[i].arg << 32;\n+\t\trc = rte_fls_u64(arg64);\n+\t\t/* don't shift zero */\n+\t\texpected = test[i].rc == 0 ? 0 : test[i].rc + 32;\n+\t\tif (rc != expected) {\n+\t\t\tprintf(\"Wrong rte_fls_u64(0x%\" PRIx64 \") rc=%d, expected=%d\\n\",\n+\t\t\t\targ64, rc, expected);\n+\t\t\treturn TEST_FAILED;\n+\t\t}\n \t}\n \n \treturn 0;\n",
    "prefixes": [
        "v2",
        "3/4"
    ]
}