get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 133528,
    "url": "http://patches.dpdk.org/api/patches/133528/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231028014847.27149-2-lihuisong@huawei.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": "<20231028014847.27149-2-lihuisong@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231028014847.27149-2-lihuisong@huawei.com",
    "date": "2023-10-28T01:48:45",
    "name": "[v3,1/3] ethdev: introduce maximum Rx buffer size",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "420185bd529fcc44ce6d30eecb6c7677a53ea14d",
    "submitter": {
        "id": 2085,
        "url": "http://patches.dpdk.org/api/people/2085/?format=api",
        "name": "lihuisong (C)",
        "email": "lihuisong@huawei.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/20231028014847.27149-2-lihuisong@huawei.com/mbox/",
    "series": [
        {
            "id": 30035,
            "url": "http://patches.dpdk.org/api/series/30035/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30035",
            "date": "2023-10-28T01:48:45",
            "name": "introduce maximum Rx buffer size",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/30035/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/133528/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/133528/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 2B8EC4321C;\n\tSat, 28 Oct 2023 03:48:28 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E4BA64029E;\n\tSat, 28 Oct 2023 03:48:27 +0200 (CEST)",
            "from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255])\n by mails.dpdk.org (Postfix) with ESMTP id CF8B94029E\n for <dev@dpdk.org>; Sat, 28 Oct 2023 03:48:25 +0200 (CEST)",
            "from kwepemm000004.china.huawei.com (unknown [172.30.72.55])\n by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4SHMmm47Yqz1L9Dp;\n Sat, 28 Oct 2023 09:45:28 +0800 (CST)",
            "from localhost.localdomain (10.69.192.56) by\n kwepemm000004.china.huawei.com (7.193.23.18) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2507.31; Sat, 28 Oct 2023 09:48:23 +0800"
        ],
        "From": "Huisong Li <lihuisong@huawei.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<thomas@monjalon.net>, <ferruh.yigit@amd.com>,\n <andrew.rybchenko@oktetlabs.ru>, <liuyonglong@huawei.com>,\n <lihuisong@huawei.com>",
        "Subject": "[PATCH v3 1/3] ethdev: introduce maximum Rx buffer size",
        "Date": "Sat, 28 Oct 2023 09:48:45 +0800",
        "Message-ID": "<20231028014847.27149-2-lihuisong@huawei.com>",
        "X-Mailer": "git-send-email 2.33.0",
        "In-Reply-To": "<20231028014847.27149-1-lihuisong@huawei.com>",
        "References": "<20230808040234.12947-1-lihuisong@huawei.com>\n <20231028014847.27149-1-lihuisong@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"UTF-8\"",
        "Content-Transfer-Encoding": "8bit",
        "X-Originating-IP": "[10.69.192.56]",
        "X-ClientProxiedBy": "dggems706-chm.china.huawei.com (10.3.19.183) To\n kwepemm000004.china.huawei.com (7.193.23.18)",
        "X-CFilter-Loop": "Reflected",
        "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 \"min_rx_bufsize\" in struct rte_eth_dev_info stands for the minimum\nRx buffer size supported by hardware. Actually, some engines also have\nthe maximum Rx buffer specification, like, hns3. If mbuf data room size\nin mempool is greater then the maximum Rx buffer size supported by HW,\nthe data size application used in each mbuf is just as much as the maximum\nRx buffer size supported by HW instead of the whole data room size.\n\nSo introduce maximum Rx buffer size which is not enforced just to\nreport user to avoid memory waste. In addition, fix the comment for\nthe \"min_rx_bufsize\" to make it be more specific.\n\nSigned-off-by: Huisong Li <lihuisong@huawei.com>\nAcked-by: Chengwen Feng <fengchengwen@huawei.com>\nAcked-by: Morten Brørup <mb@smartsharesystems.com>\n---\n lib/ethdev/rte_ethdev.c |  7 +++++++\n lib/ethdev/rte_ethdev.h | 10 +++++++++-\n 2 files changed, 16 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c\nindex 9dabcb5ae2..eb657a984e 100644\n--- a/lib/ethdev/rte_ethdev.c\n+++ b/lib/ethdev/rte_ethdev.c\n@@ -2112,6 +2112,7 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,\n \tstruct rte_eth_dev *dev;\n \tstruct rte_eth_dev_info dev_info;\n \tstruct rte_eth_rxconf local_conf;\n+\tuint32_t vld_bufsize;\n \n \tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tdev = &rte_eth_devices[port_id];\n@@ -2158,6 +2159,11 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,\n \t\t\treturn ret;\n \n \t\tmbp_buf_size = rte_pktmbuf_data_room_size(mp);\n+\t\tvld_bufsize = mbp_buf_size - RTE_PKTMBUF_HEADROOM;\n+\t\tif (vld_bufsize > dev_info.max_rx_bufsize)\n+\t\t\tRTE_ETHDEV_LOG(INFO,\n+\t\t\t\t\"Ethdev port_id=%u, the data size application used in each mbuf is just %u instead of the whole data room(%u).\\n\",\n+\t\t\t\tport_id, dev_info.max_rx_bufsize, vld_bufsize);\n \t} else if (rx_conf != NULL && rx_conf->rx_nseg > 0) {\n \t\tconst struct rte_eth_rxseg_split *rx_seg;\n \t\tuint16_t n_seg;\n@@ -3757,6 +3763,7 @@ rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)\n \tdev_info->min_mtu = RTE_ETHER_MIN_LEN - RTE_ETHER_HDR_LEN -\n \t\tRTE_ETHER_CRC_LEN;\n \tdev_info->max_mtu = UINT16_MAX;\n+\tdev_info->max_rx_bufsize = UINT32_MAX;\n \n \tif (*dev->dev_ops->dev_infos_get == NULL)\n \t\treturn -ENOTSUP;\ndiff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h\nindex 2fd3cd808d..b8f5dcae00 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -1723,7 +1723,15 @@ struct rte_eth_dev_info {\n \tuint16_t min_mtu;\t/**< Minimum MTU allowed */\n \tuint16_t max_mtu;\t/**< Maximum MTU allowed */\n \tconst uint32_t *dev_flags; /**< Device flags */\n-\tuint32_t min_rx_bufsize; /**< Minimum size of Rx buffer. */\n+\t/** Minimum Rx buffer size per descriptor supported by HW. */\n+\tuint32_t min_rx_bufsize;\n+\t/**\n+\t * Maximum Rx buffer size per descriptor supported by HW.\n+\t * The value is not enforced, information only to application to\n+\t * optimize mbuf size. Its value is UINT32_MAX when not specified\n+\t * by the driver.\n+\t */\n+\tuint32_t max_rx_bufsize;\n \tuint32_t max_rx_pktlen; /**< Maximum configurable length of Rx pkt. */\n \t/** Maximum configurable size of LRO aggregated packet. */\n \tuint32_t max_lro_pkt_size;\n",
    "prefixes": [
        "v3",
        "1/3"
    ]
}