get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 109626,
    "url": "http://patchwork.dpdk.org/api/patches/109626/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20220413054048.3052817-1-s.v.naga.harish.k@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": "<20220413054048.3052817-1-s.v.naga.harish.k@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220413054048.3052817-1-s.v.naga.harish.k@intel.com",
    "date": "2022-04-13T05:40:48",
    "name": "kni: optimize alloc queue release",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "41352c487c919182eb17092b4fc30343aa0ca55f",
    "submitter": {
        "id": 2280,
        "url": "http://patchwork.dpdk.org/api/people/2280/?format=api",
        "name": "Naga Harish K, S V",
        "email": "s.v.naga.harish.k@intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20220413054048.3052817-1-s.v.naga.harish.k@intel.com/mbox/",
    "series": [
        {
            "id": 22493,
            "url": "http://patchwork.dpdk.org/api/series/22493/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=22493",
            "date": "2022-04-13T05:40:48",
            "name": "kni: optimize alloc queue release",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/22493/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/109626/comments/",
    "check": "warning",
    "checks": "http://patchwork.dpdk.org/api/patches/109626/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 56F52A0506;\n\tWed, 13 Apr 2022 07:40:55 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E91D84069D;\n\tWed, 13 Apr 2022 07:40:54 +0200 (CEST)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n by mails.dpdk.org (Postfix) with ESMTP id 81C234068B\n for <dev@dpdk.org>; Wed, 13 Apr 2022 07:40:53 +0200 (CEST)",
            "from orsmga008.jf.intel.com ([10.7.209.65])\n by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 12 Apr 2022 22:40:52 -0700",
            "from txandevlnx322.an.intel.com ([10.123.117.44])\n by orsmga008.jf.intel.com with ESMTP; 12 Apr 2022 22:40:51 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1649828453; x=1681364453;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=KrUneKvwawVCZjHlyJQypT6vU/wRWImQF4sErrQpmuM=;\n b=FJko/IyFYnauCURQ2sEzqgzDPFp9HRvmzIjDcD1gGXORZpwf2LVSHdYl\n DbWEoA213gPWRL4VhWFc3J1ODnAmBQPq0+BGCdX9UPqs/eBofjs1szO0C\n FstlJD6eGSRCy6AuZeUs5Rjc76mSkjN75GYQevCv5AKQ8w7Hzce162wC9\n 3MKKM3fhBhZc/ndTJnzbu0nRrBR2uDddWMXYklmY12/ClX+DA5nUqyDlD\n fd4t06m/0H6WyJl6frXKRoiiW5WhybHb52AXjbD+sI0DfuICo8qEKHwov\n UwORBqq8jMWVkn29wuessOICfMonGSw9MPYHmKQItpRyH2XjWDAhuh+Cu A==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6400,9594,10315\"; a=\"349016505\"",
            "E=Sophos;i=\"5.90,255,1643702400\"; d=\"scan'208\";a=\"349016505\"",
            "E=Sophos;i=\"5.90,255,1643702400\"; d=\"scan'208\";a=\"573120555\""
        ],
        "X-ExtLoop1": "1",
        "From": "Naga Harish K S V <s.v.naga.harish.k@intel.com>",
        "To": "ferruh.yigit@intel.com",
        "Cc": "jay.jayatheerthan@intel.com,\n\tdev@dpdk.org",
        "Subject": "[PATCH] kni: optimize alloc queue release",
        "Date": "Wed, 13 Apr 2022 00:40:48 -0500",
        "Message-Id": "<20220413054048.3052817-1-s.v.naga.harish.k@intel.com>",
        "X-Mailer": "git-send-email 2.23.0",
        "MIME-Version": "1.0",
        "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": "the kni alloc queue is filled with physical addresses of mbufs for kernel\nconsumption. Any unused mbufs in the alloc queue are freed during\nshutdown sequence in rte_kni_release.\n\nIn the current existing implementation, for freeing one entry of alloc queue\nall the objects of the mempool are traversed. This process is repeated\nfor all the objects of the alloc queue which takes lot of cpu cycles.\n\nInstead of using mempool object iteration method,\nuse ``rte_mem_iova2virt()`` api to get the virtual\naddress for the physical addresses of alloc_q objects.\nThis sppeds up the freeing process.\n\nSigned-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>\n---\n lib/kni/rte_kni.c | 23 ++++++++---------------\n 1 file changed, 8 insertions(+), 15 deletions(-)",
    "diff": "diff --git a/lib/kni/rte_kni.c b/lib/kni/rte_kni.c\nindex 7971c56bb4..f443e5b2fc 100644\n--- a/lib/kni/rte_kni.c\n+++ b/lib/kni/rte_kni.c\n@@ -375,26 +375,19 @@ va2pa_all(struct rte_mbuf *mbuf)\n }\n \n static void\n-obj_free(struct rte_mempool *mp __rte_unused, void *opaque, void *obj,\n-\t\tunsigned obj_idx __rte_unused)\n-{\n-\tstruct rte_mbuf *m = obj;\n-\tvoid *mbuf_phys = opaque;\n-\n-\tif (va2pa(m) == mbuf_phys)\n-\t\trte_pktmbuf_free(m);\n-}\n-\n-static void\n-kni_free_fifo_phy(struct rte_mempool *mp, struct rte_kni_fifo *fifo)\n+kni_free_fifo_phy(struct rte_kni_fifo *fifo)\n {\n \tvoid *mbuf_phys;\n \tint ret;\n+\tstruct rte_mbuf *m;\n \n \tdo {\n \t\tret = kni_fifo_get(fifo, &mbuf_phys, 1);\n-\t\tif (ret)\n-\t\t\trte_mempool_obj_iter(mp, obj_free, mbuf_phys);\n+\t\tif (ret) {\n+\t\t\tm = (struct rte_mbuf *)\n+\t\t\t\trte_mem_iova2virt((rte_iova_t)mbuf_phys);\n+\t\t\trte_pktmbuf_free(m);\n+\t\t}\n \t} while (ret);\n }\n \n@@ -440,7 +433,7 @@ rte_kni_release(struct rte_kni *kni)\n \tif (kni_fifo_count(kni->rx_q))\n \t\tRTE_LOG(ERR, KNI, \"Fail to free all Rx-q items\\n\");\n \n-\tkni_free_fifo_phy(kni->pktmbuf_pool, kni->alloc_q);\n+\tkni_free_fifo_phy(kni->alloc_q);\n \tkni_free_fifo(kni->tx_q);\n \tkni_free_fifo(kni->free_q);\n \n",
    "prefixes": []
}