get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 130334,
    "url": "http://patches.dpdk.org/api/patches/130334/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230815111034.22887-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": "<20230815111034.22887-2-lihuisong@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230815111034.22887-2-lihuisong@huawei.com",
    "date": "2023-08-15T11:10:32",
    "name": "[v1,1/3] ethdev: introduce maximum Rx buffer size",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": true,
    "hash": "278a450ead27bab2ce0e190db3c7328a0a7c7326",
    "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/20230815111034.22887-2-lihuisong@huawei.com/mbox/",
    "series": [
        {
            "id": 29229,
            "url": "http://patches.dpdk.org/api/series/29229/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=29229",
            "date": "2023-08-15T11:10:31",
            "name": "introduce maximum Rx buffer size",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/29229/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/130334/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/130334/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 7B6334306F;\n\tTue, 15 Aug 2023 13:13:48 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id AA84743266;\n\tTue, 15 Aug 2023 13:13:34 +0200 (CEST)",
            "from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187])\n by mails.dpdk.org (Postfix) with ESMTP id D2D3840E25\n for <dev@dpdk.org>; Tue, 15 Aug 2023 13:13:29 +0200 (CEST)",
            "from kwepemm600004.china.huawei.com (unknown [172.30.72.55])\n by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RQ7p65fgsztS9m;\n Tue, 15 Aug 2023 19:09:50 +0800 (CST)",
            "from localhost.localdomain (10.69.192.56) by\n kwepemm600004.china.huawei.com (7.193.23.242) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2507.31; Tue, 15 Aug 2023 19:13:26 +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 v1 1/3] ethdev: introduce maximum Rx buffer size",
        "Date": "Tue, 15 Aug 2023 19:10:32 +0800",
        "Message-ID": "<20230815111034.22887-2-lihuisong@huawei.com>",
        "X-Mailer": "git-send-email 2.33.0",
        "In-Reply-To": "<20230815111034.22887-1-lihuisong@huawei.com>",
        "References": "<20230808040234.12947-1-lihuisong@huawei.com>\n <20230815111034.22887-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": "dggems703-chm.china.huawei.com (10.3.19.180) To\n kwepemm600004.china.huawei.com (7.193.23.242)",
        "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 Rx buffer size stands for the size hardware supported to receive\npackets in one mbuf. The \"min_rx_bufsize\" is the minimum buffer hardware\nsupported in Rx. Actually, some engines also have the maximum buffer\nspecification, like, hns3. For these engines, the available data size\nof one mbuf in Rx also depends on the maximum buffer hardware supported.\nSo introduce maximum Rx buffer size in struct rte_eth_dev_info to report\nuser to avoid memory waste. And driver should accept it and just pass\nmaximum buffer hardware supported to hardware if application specifies\nthe Rx buffer size is greater than the maximum buffer.\n\nSigned-off-by: Huisong Li <lihuisong@huawei.com>\n---\n lib/ethdev/rte_ethdev.c | 7 +++++++\n lib/ethdev/rte_ethdev.h | 6 ++++++\n 2 files changed, 13 insertions(+)",
    "diff": "diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c\nindex 0840d2b594..9985bd3049 100644\n--- a/lib/ethdev/rte_ethdev.c\n+++ b/lib/ethdev/rte_ethdev.c\n@@ -2068,6 +2068,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@@ -2105,6 +2106,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(WARNING,\n+\t\t\t\t\"Ethdev port_id=%u Rx buffer size (%u) is greater than the maximum buffer size (%u) driver supported.\\n\",\n+\t\t\t\tport_id, vld_bufsize, dev_info.max_rx_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@@ -3689,6 +3695,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 04a2564f22..9fdf2c75ee 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -1724,6 +1724,12 @@ struct rte_eth_dev_info {\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/**\n+\t * Maximum size of Rx buffer. Driver should accept it and just pass\n+\t * this value to HW if application specifies the Rx buffer size is\n+\t * greater than this value.\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": [
        "v1",
        "1/3"
    ]
}