get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 132614,
    "url": "https://patches.dpdk.org/api/patches/132614/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1697421971-19254-1-git-send-email-roretzla@linux.microsoft.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<1697421971-19254-1-git-send-email-roretzla@linux.microsoft.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1697421971-19254-1-git-send-email-roretzla@linux.microsoft.com",
    "date": "2023-10-16T02:06:11",
    "name": "[v2] eal: use abstracted bit count functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "026d9217ff8847a6c29a5b7e1a9e61f4f979e0f9",
    "submitter": {
        "id": 2077,
        "url": "https://patches.dpdk.org/api/people/2077/?format=api",
        "name": "Tyler Retzlaff",
        "email": "roretzla@linux.microsoft.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1697421971-19254-1-git-send-email-roretzla@linux.microsoft.com/mbox/",
    "series": [
        {
            "id": 29842,
            "url": "https://patches.dpdk.org/api/series/29842/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=29842",
            "date": "2023-10-16T02:06:11",
            "name": "[v2] eal: use abstracted bit count functions",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/29842/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/132614/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/132614/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 7D16343177;\n\tMon, 16 Oct 2023 04:06:16 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id EB33640299;\n\tMon, 16 Oct 2023 04:06:15 +0200 (CEST)",
            "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id 8143640269\n for <dev@dpdk.org>; Mon, 16 Oct 2023 04:06:14 +0200 (CEST)",
            "by linux.microsoft.com (Postfix, from userid 1086)\n id B1BA720B74C0; Sun, 15 Oct 2023 19:06:13 -0700 (PDT)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com B1BA720B74C0",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n s=default; t=1697421973;\n bh=PnjVBsVSv+BeKUou6FnfRZBD3rVjRtyeNm/htWsm+RY=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=nB33L3h+s0yIjpLiI75Q6TrITdMPKgQsM6+k+O2GwPRmffOuUvP+1EetIDEhHuRkM\n dpviNQo5p/5QqAInW8tvyssDnMIWsfyNTRl8aqF1KJBeblLrTUtZNhTvo8IPjYtdBC\n XpTTf9f5ZHFXYO/e+CLlV1uXPq9R88EyPlUca7g8=",
        "From": "Tyler Retzlaff <roretzla@linux.microsoft.com>",
        "To": "dev@dpdk.org",
        "Cc": "david.marchand@redhat.com, Anatoly Burakov <anatoly.burakov@intel.com>,\n Harry van Haaren <harry.van.haaren@intel.com>,\n Joyce Kong <joyce.kong@arm.com>,\n Tyler Retzlaff <roretzla@linux.microsoft.com>",
        "Subject": "[PATCH v2] eal: use abstracted bit count functions",
        "Date": "Sun, 15 Oct 2023 19:06:11 -0700",
        "Message-Id": "<1697421971-19254-1-git-send-email-roretzla@linux.microsoft.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1697419762-13259-1-git-send-email-roretzla@linux.microsoft.com>",
        "References": "<1697419762-13259-1-git-send-email-roretzla@linux.microsoft.com>",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Use DPDK abstracted bitcount functions instead of gcc __builtin_'s\n\nSigned-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>\n---\n lib/eal/common/malloc_elem.c | 2 +-\n lib/eal/common/rte_service.c | 4 ++--\n lib/eal/include/rte_bitops.h | 8 ++++----\n 3 files changed, 7 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/lib/eal/common/malloc_elem.c b/lib/eal/common/malloc_elem.c\nindex 619c040..f5d1c8c 100644\n--- a/lib/eal/common/malloc_elem.c\n+++ b/lib/eal/common/malloc_elem.c\n@@ -386,7 +386,7 @@\n \t\treturn 0;\n \n \t/* Find next power of 2 > size. */\n-\tlog2 = sizeof(size) * 8 - __builtin_clzl(size);\n+\tlog2 = sizeof(size) * 8 - rte_clz64(size);\n \n \t/* Compute freelist index, based on log2(size). */\n \tindex = (log2 - MALLOC_MINSIZE_LOG2 + MALLOC_LOG2_INCREMENT - 1) /\ndiff --git a/lib/eal/common/rte_service.c b/lib/eal/common/rte_service.c\nindex 9e2aa4a..098a821 100644\n--- a/lib/eal/common/rte_service.c\n+++ b/lib/eal/common/rte_service.c\n@@ -505,8 +505,8 @@ struct core_state {\n \t\tif (service_mask == 0)\n \t\t\tcontinue;\n \n-\t\tstart_id = __builtin_ctzl(service_mask);\n-\t\tend_id = 64 - __builtin_clzl(service_mask);\n+\t\tstart_id = rte_ctz64(service_mask);\n+\t\tend_id = 64 - rte_clz64(service_mask);\n \n \t\tfor (i = start_id; i < end_id; i++) {\n \t\t\t/* return value ignored as no change to code flow */\ndiff --git a/lib/eal/include/rte_bitops.h b/lib/eal/include/rte_bitops.h\nindex d45aa54..6b8ae8d 100644\n--- a/lib/eal/include/rte_bitops.h\n+++ b/lib/eal/include/rte_bitops.h\n@@ -574,7 +574,7 @@\n static inline uint32_t\n rte_bsf32(uint32_t v)\n {\n-\treturn (uint32_t)__builtin_ctz(v);\n+\treturn (uint32_t)rte_ctz32(v);\n }\n \n /**\n@@ -615,7 +615,7 @@\n static inline uint32_t\n rte_bsf64(uint64_t v)\n {\n-\treturn (uint32_t)__builtin_ctzll(v);\n+\treturn (uint32_t)rte_ctz64(v);\n }\n \n /**\n@@ -656,7 +656,7 @@\n static inline uint32_t\n rte_fls_u32(uint32_t x)\n {\n-\treturn (x == 0) ? 0 : 32 - __builtin_clz(x);\n+\treturn (x == 0) ? 0 : 32 - rte_clz32(x);\n }\n \n /**\n@@ -674,7 +674,7 @@\n static inline uint32_t\n rte_fls_u64(uint64_t x)\n {\n-\treturn (x == 0) ? 0 : 64 - __builtin_clzll(x);\n+\treturn (x == 0) ? 0 : 64 - rte_clz64(x);\n }\n \n /*********** Macros to work with powers of 2 ********/\n",
    "prefixes": [
        "v2"
    ]
}