get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 108937,
    "url": "https://patches.dpdk.org/api/patches/108937/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220328151652.221-1-gaoxiangliu0@163.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": "<20220328151652.221-1-gaoxiangliu0@163.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220328151652.221-1-gaoxiangliu0@163.com",
    "date": "2022-03-28T15:16:52",
    "name": "[v7] net/bonding: another fix to LACP mempool size",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "b8d5411b1cc3fc2ce1f4bcc4fd38384f459978e7",
    "submitter": {
        "id": 2304,
        "url": "https://patches.dpdk.org/api/people/2304/?format=api",
        "name": "Gaoxiang Liu",
        "email": "gaoxiangliu0@163.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220328151652.221-1-gaoxiangliu0@163.com/mbox/",
    "series": [
        {
            "id": 22269,
            "url": "https://patches.dpdk.org/api/series/22269/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=22269",
            "date": "2022-03-28T15:16:52",
            "name": "[v7] net/bonding: another fix to LACP mempool size",
            "version": 7,
            "mbox": "https://patches.dpdk.org/series/22269/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/108937/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/108937/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 BACD3A00C2;\n\tMon, 28 Mar 2022 17:17:37 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5D12B427F9;\n\tMon, 28 Mar 2022 17:17:37 +0200 (CEST)",
            "from m12-18.163.com (m12-18.163.com [220.181.12.18])\n by mails.dpdk.org (Postfix) with ESMTP id 5963541104\n for <dev@dpdk.org>; Mon, 28 Mar 2022 17:17:33 +0200 (CEST)",
            "from DESKTOP-ONA2IA7.localdomain (unknown [122.235.128.125])\n by smtp14 (Coremail) with SMTP id EsCowABXghlt0UFiC_5cCA--.57435S4;\n Mon, 28 Mar 2022 23:17:24 +0800 (CST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com;\n s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=53R/t\n 5qdQVzg1UK+veatTnb2nO8P/UuRnY2xYZyobjo=; b=lVgZb8TvREVRVjkYS9uDC\n 3SvspydTxRw1zJxlyZ0JTeJ0YUQeINw0Q//+hj6SknV0APqrc1qJhfCfEK7QaxXk\n rz7pZ8P7ARLBouGEJ5IKGNj1SLh2+U+b2MOOnSCXLj4L6jIJOAmmHea/JY8LJtwT\n qfbDSx7d43qYmlNDrhIe6M=",
        "From": "Gaoxiang Liu <gaoxiangliu0@163.com>",
        "To": "chas3@att.com,\n\thumin29@huawei.com",
        "Cc": "olivier.matz@6wind.com, dev@dpdk.org, liugaoxiang@huawei.com,\n Gaoxiang Liu <gaoxiangliu0@163.com>",
        "Subject": "[PATCH v7] net/bonding: another fix to LACP mempool size",
        "Date": "Mon, 28 Mar 2022 23:16:52 +0800",
        "Message-Id": "<20220328151652.221-1-gaoxiangliu0@163.com>",
        "X-Mailer": "git-send-email 2.32.0",
        "In-Reply-To": "<20220325133426.2916-1-gaoxiangliu0@163.com>",
        "References": "<20220325133426.2916-1-gaoxiangliu0@163.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-CM-TRANSID": "EsCowABXghlt0UFiC_5cCA--.57435S4",
        "X-Coremail-Antispam": "1Uf129KBjvJXoWxGF13Kry7Xw1DWr47Jw1rtFb_yoW5tr17pr\n W7Way5tr1UArZI9ws7X3WSkws5ur92vr4UK395Zas8Zr47AF1Ygw1UtrW5urW8GrWktFs0\n vF4UuasIgF4UG3DanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2\n 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0pR92-bUUUUU=",
        "X-Originating-IP": "[122.235.128.125]",
        "X-CM-SenderInfo": "xjdr5xxdqjzxjxq6il2tof0z/1tbiMhvROlWByNmICwAAsE",
        "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 following log message may appear after a slave is idle(or nearly\nidle)\nfor a few minutes:\"PMD: Failed to allocate LACP packet from pool\".\nAnd bond mode 4 negotiation may fail.\n\nProblem:When bond mode 4 has been chosed and delicated queue has\nnot been enable, all mbufs from a slave' private pool(used\nexclusively for transmitting LACPDUs) have been allocated in\ninterrupt thread, and are still sitting in the device's tx\ndescriptor ring and other cores' mempool caches in fwd thread.\nThus the interrupt thread can not alloc LACP packet from pool.\n\nSolution: Ensure that each slave'tx (LACPDU) mempool owns more than\nn-tx-queues * n-tx-descriptor + fwd_core_num *\nper-core-mmempool-flush-threshold mbufs.\n\nNote that the LACP tx machine fuction is the only code that allocates\nfrom a slave's private pool. It runs in the context of the interrupt\nthread, and thus it has no mempool cache of its own.\n\nSigned-off-by: Gaoxiang Liu <liugaoxiang@huawei.com>\n\n---\nv2:\n* Fixed compile issues.\n\nv3:\n* delete duplicate code.\n\nv4;\n* Fixed some issues.\n1. total_tx_desc should use +=\n2. add detailed logs\n\nv5:\n* Fixed some issues.\n1. move CACHE_FLUSHTHRESH_MULTIPLIER to rte_eth_bond-8023ad.c\n2. use RTE_MIN\n\nv6:\n* add a comment of CACHE_FLUSHTHRESH_MULTIPLIER macro\n\nv7:\n* Fixed some issues.\n1. move CACHE_FLUSHTHRESH_MULTIPLIER to rte_mempool.h\n---\n drivers/net/bonding/rte_eth_bond_8023ad.c | 7 ++++---\n lib/mempool/rte_mempool.h                 | 2 ++\n 2 files changed, 6 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c\nindex ca50583d62..f7f6828126 100644\n--- a/drivers/net/bonding/rte_eth_bond_8023ad.c\n+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c\n@@ -1050,6 +1050,7 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev,\n \tuint32_t total_tx_desc;\n \tstruct bond_tx_queue *bd_tx_q;\n \tuint16_t q_id;\n+\tuint32_t cache_size;\n \n \t/* Given slave mus not be in active list */\n \tRTE_ASSERT(find_slave_by_id(internals->active_slaves,\n@@ -1100,11 +1101,11 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev,\n \t\ttotal_tx_desc += bd_tx_q->nb_tx_desc;\n \t}\n \n+\tcache_size = RTE_MIN(RTE_MEMPOOL_CACHE_MAX_SIZE, 32);\n+\ttotal_tx_desc += rte_lcore_count() * cache_size * RTE_MEMPOOL_CACHE_FLUSHTHRESH_MULTIPLIER;\n \tsnprintf(mem_name, RTE_DIM(mem_name), \"slave_port%u_pool\", slave_id);\n \tport->mbuf_pool = rte_pktmbuf_pool_create(mem_name, total_tx_desc,\n-\t\tRTE_MEMPOOL_CACHE_MAX_SIZE >= 32 ?\n-\t\t\t32 : RTE_MEMPOOL_CACHE_MAX_SIZE,\n-\t\t0, element_size, socket_id);\n+\t\tcache_size, 0, element_size, socket_id);\n \n \t/* Any memory allocation failure in initialization is critical because\n \t * resources can't be free, so reinitialization is impossible. */\ndiff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h\nindex 1e7a3c1527..fa15ed710f 100644\n--- a/lib/mempool/rte_mempool.h\n+++ b/lib/mempool/rte_mempool.h\n@@ -56,6 +56,8 @@\n extern \"C\" {\n #endif\n \n+#define RTE_MEMPOOL_CACHE_FLUSHTHRESH_MULTIPLIER 1.5\n+\n #define RTE_MEMPOOL_HEADER_COOKIE1  0xbadbadbadadd2e55ULL /**< Header cookie. */\n #define RTE_MEMPOOL_HEADER_COOKIE2  0xf2eef2eedadd2e55ULL /**< Header cookie. */\n #define RTE_MEMPOOL_TRAILER_COOKIE  0xadd2e55badbadbadULL /**< Trailer cookie.*/\n",
    "prefixes": [
        "v7"
    ]
}