get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 126879,
    "url": "http://patches.dpdk.org/api/patches/126879/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230516104853.479297-1-yasinncaner@gmail.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": "<20230516104853.479297-1-yasinncaner@gmail.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230516104853.479297-1-yasinncaner@gmail.com",
    "date": "2023-05-16T10:48:53",
    "name": "lib/kni : fix memory-leak on rte_kni_rx_burst",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": true,
    "hash": "47bcdf11bcccfa6550719738861000ab2accbbf4",
    "submitter": {
        "id": 3068,
        "url": "http://patches.dpdk.org/api/people/3068/?format=api",
        "name": "Yasin CANER",
        "email": "yasinncaner@gmail.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230516104853.479297-1-yasinncaner@gmail.com/mbox/",
    "series": [
        {
            "id": 28006,
            "url": "http://patches.dpdk.org/api/series/28006/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=28006",
            "date": "2023-05-16T10:48:53",
            "name": "lib/kni : fix memory-leak on rte_kni_rx_burst",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/28006/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/126879/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/126879/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 E343242B22;\n\tTue, 16 May 2023 12:49:05 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C8F9440A8B;\n\tTue, 16 May 2023 12:49:05 +0200 (CEST)",
            "from mail-wm1-f52.google.com (mail-wm1-f52.google.com\n [209.85.128.52])\n by mails.dpdk.org (Postfix) with ESMTP id 723284068E;\n Tue, 16 May 2023 12:49:04 +0200 (CEST)",
            "by mail-wm1-f52.google.com with SMTP id\n 5b1f17b1804b1-3f4449fa085so49090025e9.0;\n Tue, 16 May 2023 03:49:04 -0700 (PDT)",
            "from spgw-dpdk.epc.mnc001.mcc001.3gppnetwork.org ([176.236.170.162])\n by smtp.gmail.com with ESMTPSA id\n c22-20020a05600c0ad600b003f50876905dsm1947169wmr.6.2023.05.16.03.49.02\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 16 May 2023 03:49:03 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20221208; t=1684234144; x=1686826144;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=KlNmK/GBY95q7RnNoPmo68XZSWWib0RhkpIkurIT27s=;\n b=Oou/TqIpGBZgd6KI/u2zA+zUdtwzRcZHBbILwOPu2UntzNXLj2hzYH0xQjxeLz2PAL\n b1CgqLprcxtqzdPz77YLYFtv+Ku/t8Vq2iNcPc0znikec2nOMJZtyIS7tN+UkTSk6/rp\n 7LoLEQLAkk9hYu7tM90DBqUcOhcY1MD2+INQZnIouYAOC3YQ8ClWNGoUwR0ARSTczAZl\n wxQ+yQdG5jWDemOUd0V/wIhhGEo1nX8GV6kbx34mguG+GqKfktO9pnoGbnHxxG8gazTa\n +LKlwh23uhtAWTa8Ptznh1WzO17Kpk472bN+bepkG4MTxzW7F6cCBb+q4hK+LIasNwe7\n BIaQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20221208; t=1684234144; x=1686826144;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=KlNmK/GBY95q7RnNoPmo68XZSWWib0RhkpIkurIT27s=;\n b=T0peIAdwdMSeXfqzujmew20HOnubbB7QgBtIynwsg/hwuvVkhlEn36FzUTbFNV5yWc\n tHrED8NQwwIs+xzQ8izE/ZoqmIGuKp4FdLK9uoR62nPsmqrPxp9sOCbN1rSMjnt3B73v\n EW2lkzPQQR+Rx0ybQqWoO/Er0aGEC2D9JvhY/RMfmn765pwdflD49vwg+XyzYJpwUaWM\n O7yxvYYsoO+hpIcoNuD4xXjguG2hpD8FRKkfSs96qyDJi8EQ15SeJcwyjkhVj2YhgQI1\n 08dv8D4UWTzK3hrgejeX5UWBtc+Q9PHU6dgJIYjghsG47afvyLPL+9LGvADX5i0tsQV3\n EaDw==",
        "X-Gm-Message-State": "AC+VfDwrV852OoqYOGxDICgkd6BNxVGmnp6Y8m04nC8/IwBDBy3VyNzh\n NQjIg5wu5iqQWILKwmDqJwVg38wbBC0=",
        "X-Google-Smtp-Source": "\n ACHHUZ6WYz7DZr1ggWleaGyNcor6sN/jmNVNlwZWCigaNFA+oRLdPhqvjAUwa8/efvCRC+f3R1MQjw==",
        "X-Received": "by 2002:a05:600c:b4d:b0:3f4:253b:92a7 with SMTP id\n k13-20020a05600c0b4d00b003f4253b92a7mr20149743wmr.30.1684234143629;\n Tue, 16 May 2023 03:49:03 -0700 (PDT)",
        "From": "Yasin CANER <yasinncaner@gmail.com>",
        "To": "dev@dpdk.org",
        "Cc": "stable@dpdk.org,\n\tstephen@networkplumber.org",
        "Subject": "[PATCH] lib/kni : fix memory-leak on rte_kni_rx_burst",
        "Date": "Tue, 16 May 2023 10:48:53 +0000",
        "Message-Id": "<20230516104853.479297-1-yasinncaner@gmail.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "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": "Coverity issue:\nBugzilla ID: 1227\nFixes:\nCc: stable@dpdk.org\nCc: stephen@networkplumber.org\n\nAdding new condition to check buffer is removed or not.\nit prevent allocation each time when rte_kni_rx_burst function called\nthat cause memory-leak.\n\nSigned-off-by: Yasin CANER <yasinncaner@gmail.com>\n---\n lib/kni/rte_kni.c | 25 +++++++++++++++++++++----\n 1 file changed, 21 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/lib/kni/rte_kni.c b/lib/kni/rte_kni.c\nindex bfa6a001ff..2244892aae 100644\n--- a/lib/kni/rte_kni.c\n+++ b/lib/kni/rte_kni.c\n@@ -660,7 +660,8 @@ kni_allocate_mbufs(struct rte_kni *kni)\n \tint i, ret;\n \tstruct rte_mbuf *pkts[MAX_MBUF_BURST_NUM];\n \tvoid *phys[MAX_MBUF_BURST_NUM];\n-\tint allocq_free;\n+\tint allocq_free, allocq_count;\n+\tuint32_t allocq;\n \n \tRTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, pool) !=\n \t\t\t offsetof(struct rte_kni_mbuf, pool));\n@@ -682,10 +683,26 @@ kni_allocate_mbufs(struct rte_kni *kni)\n \t\tRTE_LOG(ERR, KNI, \"No valid mempool for allocating mbufs\\n\");\n \t\treturn;\n \t}\n-\n+\t/* First, getting allocation count from alloc_q. alloc_q is allocated in this function \n+\t * and/or kni_alloc function from mempool.\n+\t * If alloc_q is completely removed, it shall be allocated again.\n+\t * */\n+\tallocq = kni_fifo_count(kni->alloc_q);\n+\t/* How many free allocation is possible from mempool. */\n \tallocq_free = kni_fifo_free_count(kni->alloc_q);\n-\tallocq_free = (allocq_free > MAX_MBUF_BURST_NUM) ?\n-\t\tMAX_MBUF_BURST_NUM : allocq_free;\n+\t/* Allocated alloc_q count shall be max MAX_MBUF_BURST_NUM. */\n+\tallocq_count = MAX_MBUF_BURST_NUM - (int)allocq;\n+\t/* Try to figure out how many allocation is possible. allocq_free is max possible.*/\n+\tallocq_free = (allocq_free > MAX_MBUF_BURST_NUM )? MAX_MBUF_BURST_NUM : allocq_free;\n+\t/* Buffer is not removed so no need re-allocate*/\n+\n+\tif(!allocq_count) {\n+\t\t/* Buffer is not removed so no need re-allocation*/\n+\t\treturn;\n+\t} else if (allocq_free > allocq_count) {\n+\t\tallocq_free = allocq_count;\n+\t}\n+\n \tfor (i = 0; i < allocq_free; i++) {\n \t\tpkts[i] = rte_pktmbuf_alloc(kni->pktmbuf_pool);\n \t\tif (unlikely(pkts[i] == NULL)) {\n",
    "prefixes": []
}