get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 133470,
    "url": "http://patches.dpdk.org/api/patches/133470/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231027041523.14518-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": "<20231027041523.14518-2-lihuisong@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231027041523.14518-2-lihuisong@huawei.com",
    "date": "2023-10-27T04:15:21",
    "name": "[v2,1/3] ethdev: introduce maximum Rx buffer size",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4ce5a64b236d0c7b6d95922281f81039b2d19805",
    "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/20231027041523.14518-2-lihuisong@huawei.com/mbox/",
    "series": [
        {
            "id": 30017,
            "url": "http://patches.dpdk.org/api/series/30017/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30017",
            "date": "2023-10-27T04:15:23",
            "name": "introduce maximum Rx buffer size",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/30017/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/133470/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/133470/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 799FD43210;\n\tFri, 27 Oct 2023 06:15:24 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C52BC42670;\n\tFri, 27 Oct 2023 06:15:07 +0200 (CEST)",
            "from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188])\n by mails.dpdk.org (Postfix) with ESMTP id 266B440291\n for <dev@dpdk.org>; Fri, 27 Oct 2023 06:15:02 +0200 (CEST)",
            "from kwepemm000004.china.huawei.com (unknown [172.30.72.55])\n by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4SGq34479KzPnZN;\n Fri, 27 Oct 2023 12:10:56 +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; Fri, 27 Oct 2023 12:14:59 +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 v2 1/3] ethdev: introduce maximum Rx buffer size",
        "Date": "Fri, 27 Oct 2023 12:15:21 +0800",
        "Message-ID": "<20231027041523.14518-2-lihuisong@huawei.com>",
        "X-Mailer": "git-send-email 2.33.0",
        "In-Reply-To": "<20231027041523.14518-1-lihuisong@huawei.com>",
        "References": "<20230808040234.12947-1-lihuisong@huawei.com>\n <20231027041523.14518-1-lihuisong@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.69.192.56]",
        "X-ClientProxiedBy": "dggems704-chm.china.huawei.com (10.3.19.181) 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>\n---\n lib/ethdev/rte_ethdev.c | 7 +++++++\n lib/ethdev/rte_ethdev.h | 9 ++++++++-\n 2 files changed, 15 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..5dfb455b2c 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -1723,7 +1723,14 @@ 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.\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": [
        "v2",
        "1/3"
    ]
}