get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 129691,
    "url": "https://patches.dpdk.org/api/patches/129691/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230721162836.1208772-2-dharmikjayesh.thakkar@arm.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": "<20230721162836.1208772-2-dharmikjayesh.thakkar@arm.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230721162836.1208772-2-dharmikjayesh.thakkar@arm.com",
    "date": "2023-07-21T16:28:36",
    "name": "[v12,2/2] net/i40e: replace put function",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "387990c9de793a65de43e5cf9ed0cc79043643ff",
    "submitter": {
        "id": 3117,
        "url": "https://patches.dpdk.org/api/people/3117/?format=api",
        "name": "Dharmik Thakkar",
        "email": "dharmikjayesh.thakkar@arm.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/20230721162836.1208772-2-dharmikjayesh.thakkar@arm.com/mbox/",
    "series": [
        {
            "id": 29003,
            "url": "https://patches.dpdk.org/api/series/29003/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=29003",
            "date": "2023-07-21T16:28:35",
            "name": "[v12,1/2] mempool cache: add zero-copy get and put functions",
            "version": 12,
            "mbox": "https://patches.dpdk.org/series/29003/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/129691/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/129691/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 5DCCD42EDC;\n\tFri, 21 Jul 2023 18:28:58 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 7AF3C42D10;\n\tFri, 21 Jul 2023 18:28:53 +0200 (CEST)",
            "from foss.arm.com (foss.arm.com [217.140.110.172])\n by mails.dpdk.org (Postfix) with ESMTP id 5E1F240EE7\n for <dev@dpdk.org>; Fri, 21 Jul 2023 18:28:50 +0200 (CEST)",
            "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])\n by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3A0B3D75;\n Fri, 21 Jul 2023 09:29:33 -0700 (PDT)",
            "from 2p2660v4-1.austin.arm.com (2p2660v4-1.austin.arm.com\n [10.118.14.10])\n by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A98DC3F738;\n Fri, 21 Jul 2023 09:28:49 -0700 (PDT)"
        ],
        "From": "Dharmik Thakkar <dharmikjayesh.thakkar@arm.com>",
        "To": "Yuying Zhang <Yuying.Zhang@intel.com>, Beilei Xing <beilei.xing@intel.com>",
        "Cc": "dev@dpdk.org, nd@arm.com,\n Kamalakshitha Aligeri <kamalakshitha.aligeri@arm.com>,\n Dharmik Thakkar <dharmikjayesh.thakkar@arm.com>,\n Ruifeng Wang <ruifeng.wang@arm.com>, Feifei Wang <feifei.wang2@arm.com>,\n\t=?utf-8?q?Morten_Br=C3=B8rup?= <mb@smartsharesystems.com>,\n Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>",
        "Subject": "[PATCH v12 2/2] net/i40e: replace put function",
        "Date": "Fri, 21 Jul 2023 11:28:36 -0500",
        "Message-Id": "<20230721162836.1208772-2-dharmikjayesh.thakkar@arm.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230721162836.1208772-1-dharmikjayesh.thakkar@arm.com>",
        "References": "<20230705180233.880203-2-kamalakshitha.aligeri@arm.com>\n <20230721162836.1208772-1-dharmikjayesh.thakkar@arm.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "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": "From: Kamalakshitha Aligeri <kamalakshitha.aligeri@arm.com>\n\nIntegrated zero-copy put API in mempool cache in i40e PMD.\nOn Ampere Altra server, l3fwd single core's performance improves by 5%\nwith the new API\n\nSigned-off-by: Kamalakshitha Aligeri <kamalakshitha.aligeri@arm.com>\nSigned-off-by: Dharmik Thakkar <dharmikjayesh.thakkar@arm.com>\nReviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>\nReviewed-by: Feifei Wang <feifei.wang2@arm.com>\nAcked-by: Morten Brørup <mb@smartsharesystems.com>\nAcked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>\n---\n drivers/net/i40e/i40e_rxtx_vec_common.h | 29 ++++++++++++++++++++-----\n 1 file changed, 23 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/drivers/net/i40e/i40e_rxtx_vec_common.h b/drivers/net/i40e/i40e_rxtx_vec_common.h\nindex fe1a6ec75ef5..bb746fc36823 100644\n--- a/drivers/net/i40e/i40e_rxtx_vec_common.h\n+++ b/drivers/net/i40e/i40e_rxtx_vec_common.h\n@@ -85,7 +85,7 @@ i40e_tx_free_bufs(struct i40e_tx_queue *txq)\n \tuint32_t n;\n \tuint32_t i;\n \tint nb_free = 0;\n-\tstruct rte_mbuf *m, *free[RTE_I40E_TX_MAX_FREE_BUF_SZ];\n+\tstruct rte_mbuf *m, *free[RTE_I40E_TX_MAX_FREE_BUF_SZ] = {0};\n \n \t/* check DD bits on threshold descriptor */\n \tif ((txq->tx_ring[txq->tx_next_dd].cmd_type_offset_bsz &\n@@ -95,18 +95,35 @@ i40e_tx_free_bufs(struct i40e_tx_queue *txq)\n \n \tn = txq->tx_rs_thresh;\n \n-\t /* first buffer to free from S/W ring is at index\n-\t  * tx_next_dd - (tx_rs_thresh-1)\n-\t  */\n+\t/* first buffer to free from S/W ring is at index\n+\t * tx_next_dd - (tx_rs_thresh-1)\n+\t */\n \ttxep = &txq->sw_ring[txq->tx_next_dd - (n - 1)];\n \n \tif (txq->offloads & RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE) {\n+\t\tstruct rte_mempool *mp = txep[0].mbuf->pool;\n+\t\tstruct rte_mempool_cache *cache = rte_mempool_default_cache(mp, rte_lcore_id());\n+\t\tvoid **cache_objs;\n+\n+\t\tif (unlikely(!cache))\n+\t\t\tgoto fallback;\n+\n+\t\tcache_objs = rte_mempool_cache_zc_put_bulk(cache, mp, n);\n+\t\tif (unlikely(!cache_objs))\n+\t\t\tgoto fallback;\n+\n \t\tfor (i = 0; i < n; i++) {\n-\t\t\tfree[i] = txep[i].mbuf;\n+\t\t\tcache_objs[i] = txep[i].mbuf;\n \t\t\t/* no need to reset txep[i].mbuf in vector path */\n \t\t}\n-\t\trte_mempool_put_bulk(free[0]->pool, (void **)free, n);\n \t\tgoto done;\n+\n+fallback:\n+\t\tfor (i = 0; i < n; i++)\n+\t\t\tfree[i] = txep[i].mbuf;\n+\t\trte_mempool_generic_put(mp, (void **)free, n, cache);\n+\t\tgoto done;\n+\n \t}\n \n \tm = rte_pktmbuf_prefree_seg(txep[0].mbuf);\n",
    "prefixes": [
        "v12",
        "2/2"
    ]
}