get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 94181,
    "url": "https://patches.dpdk.org/api/patches/94181/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210614192426.2978-1-pbhagavatula@marvell.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": "<20210614192426.2978-1-pbhagavatula@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210614192426.2978-1-pbhagavatula@marvell.com",
    "date": "2021-06-14T19:24:24",
    "name": "[1/2] mempool/octeontx2: fix shift calculation",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "95bf8992947e300177024cdcdae9c94a10aa6f82",
    "submitter": {
        "id": 1183,
        "url": "https://patches.dpdk.org/api/people/1183/?format=api",
        "name": "Pavan Nikhilesh Bhagavatula",
        "email": "pbhagavatula@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "https://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210614192426.2978-1-pbhagavatula@marvell.com/mbox/",
    "series": [
        {
            "id": 17322,
            "url": "https://patches.dpdk.org/api/series/17322/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=17322",
            "date": "2021-06-14T19:24:24",
            "name": "[1/2] mempool/octeontx2: fix shift calculation",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/17322/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/94181/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/94181/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 0B397A0C48;\n\tMon, 14 Jun 2021 21:24:37 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E05394067E;\n\tMon, 14 Jun 2021 21:24:36 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id A26004067A\n for <dev@dpdk.org>; Mon, 14 Jun 2021 21:24:35 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id\n 15EJFvB1028484 for <dev@dpdk.org>; Mon, 14 Jun 2021 12:24:34 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com with ESMTP id 395uwmbyrf-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Mon, 14 Jun 2021 12:24:34 -0700",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Mon, 14 Jun 2021 12:24:33 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Mon, 14 Jun 2021 12:24:33 -0700",
            "from BG-LT7430.marvell.com (BG-LT7430.marvell.com [10.28.177.176])\n by maili.marvell.com (Postfix) with ESMTP id 572103F70D3;\n Mon, 14 Jun 2021 12:24:30 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : mime-version : content-transfer-encoding :\n content-type; s=pfpt0220; bh=KV74jm7k+oL53crzBxEcDp8Cl4VNeR2xhaj0/Ua/kD0=;\n b=LdwVTX7FWlRLTrDsaZGd2rkxU+hD3G2oOUWiMFC2+BV0+VcTjahfqXSdx29qLrulfpRb\n 1+C7q9l67ndTlC273S0KWuxU+WEL64RupdITXlIlWMuXggM6hPEum5xp6zlMCpEf2NRN\n LS75a6c/HaeF6Xz3k4mz6961bT0uFHOooNZx3+TJtzwILS+4EVsLkR/y8YpGLE8DNC3L\n 30fXqHpBVOWaUV+4ItZi6Qzp07/D163y6u3riu3mE7BesJTxvFzdFNUX+aBnNDdM0mHC\n sYcab/6KZnpF0NCxXD0pGos0mLtqN3v8PoTAMmvR4kBhIPfHhtTv8SCa+ZJ0Ts/HTakm 6Q==",
        "From": "<pbhagavatula@marvell.com>",
        "To": "<jerinj@marvell.com>, Nithin Dabilpuram <ndabilpuram@marvell.com>",
        "CC": "<dev@dpdk.org>, Pavan Nikhilesh <pbhagavatula@marvell.com>",
        "Date": "Tue, 15 Jun 2021 00:54:24 +0530",
        "Message-ID": "<20210614192426.2978-1-pbhagavatula@marvell.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "rqpKSNIF4vT8Q43tIDOSqKTvN341N8Qh",
        "X-Proofpoint-ORIG-GUID": "rqpKSNIF4vT8Q43tIDOSqKTvN341N8Qh",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761\n definitions=2021-06-14_13:2021-06-14,\n 2021-06-14 signatures=0",
        "Subject": "[dpdk-dev] [PATCH 1/2] mempool/octeontx2: fix shift calculation",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Pavan Nikhilesh <pbhagavatula@marvell.com>\n\nShift is used to generate an 8-bit saturate value from the current\naura used count. The shift value should be derived from the log2 of\nblock count if it is greater than 256 else the shift should be 0.\n\nFixes: 7bcc47cbe2fa (\"mempool/octeontx2: add mempool alloc op\")\n\nSigned-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\n---\n drivers/mempool/octeontx2/otx2_mempool_ops.c | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/mempool/octeontx2/otx2_mempool_ops.c b/drivers/mempool/octeontx2/otx2_mempool_ops.c\nindex 9ff71bcf6b..d827fd8c7b 100644\n--- a/drivers/mempool/octeontx2/otx2_mempool_ops.c\n+++ b/drivers/mempool/octeontx2/otx2_mempool_ops.c\n@@ -611,7 +611,8 @@ npa_lf_aura_pool_pair_alloc(struct otx2_npa_lf *lf, const uint32_t block_size,\n \t/* Update aura fields */\n \taura->pool_addr = pool_id;/* AF will translate to associated poolctx */\n \taura->ena = 1;\n-\taura->shift = __builtin_clz(block_count) - 8;\n+\taura->shift = rte_log2_u32(block_count);\n+\taura->shift = aura->shift < 8 ? 0 : aura->shift - 8;\n \taura->limit = block_count;\n \taura->pool_caching = 1;\n \taura->err_int_ena = BIT(NPA_AURA_ERR_INT_AURA_ADD_OVER);\n@@ -626,7 +627,8 @@ npa_lf_aura_pool_pair_alloc(struct otx2_npa_lf *lf, const uint32_t block_size,\n \tpool->ena = 1;\n \tpool->buf_size = block_size / OTX2_ALIGN;\n \tpool->stack_max_pages = stack_size;\n-\tpool->shift = __builtin_clz(block_count) - 8;\n+\tpool->shift = rte_log2_u32(block_count);\n+\tpool->shift = pool->shift < 8 ? 0 : pool->shift - 8;\n \tpool->ptr_start = 0;\n \tpool->ptr_end = ~0;\n \tpool->stack_caching = 1;\n",
    "prefixes": [
        "1/2"
    ]
}