Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/65783/?format=api
http://patches.dpdk.org/api/patches/65783/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200213084914.54755-2-ciara.loftus@intel.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": "<20200213084914.54755-2-ciara.loftus@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200213084914.54755-2-ciara.loftus@intel.com", "date": "2020-02-13T08:49:12", "name": "[v4,1/3] net/af_xdp: fix umem frame size & headroom calculations", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "0e3bc87da135d152694fde7e247c948bc1de8fce", "submitter": { "id": 144, "url": "http://patches.dpdk.org/api/people/144/?format=api", "name": "Loftus, Ciara", "email": "ciara.loftus@intel.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/20200213084914.54755-2-ciara.loftus@intel.com/mbox/", "series": [ { "id": 8523, "url": "http://patches.dpdk.org/api/series/8523/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8523", "date": "2020-02-13T08:49:11", "name": "AF_XDP PMD Fixes", "version": 4, "mbox": "http://patches.dpdk.org/series/8523/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/65783/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/65783/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 8248BA0542;\n\tThu, 13 Feb 2020 09:48:12 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id F16AB1BF71;\n\tThu, 13 Feb 2020 09:48:06 +0100 (CET)", "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n by dpdk.org (Postfix) with ESMTP id 9C3661F28;\n Thu, 13 Feb 2020 09:48:03 +0100 (CET)", "from orsmga001.jf.intel.com ([10.7.209.18])\n by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 13 Feb 2020 00:48:03 -0800", "from silpixa00373417.ir.intel.com (HELO\n silpixa00373417.ger.corp.intel.com) ([10.237.223.96])\n by orsmga001.jf.intel.com with ESMTP; 13 Feb 2020 00:48:02 -0800" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.70,436,1574150400\"; d=\"scan'208\";a=\"313670537\"", "From": "Ciara Loftus <ciara.loftus@intel.com>", "To": "dev@dpdk.org", "Cc": "xiaolong.ye@intel.com, Ciara Loftus <ciara.loftus@intel.com>,\n stable@dpdk.org", "Date": "Thu, 13 Feb 2020 08:49:12 +0000", "Message-Id": "<20200213084914.54755-2-ciara.loftus@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20200213084914.54755-1-ciara.loftus@intel.com>", "References": "<20200213084914.54755-1-ciara.loftus@intel.com>", "Subject": "[dpdk-dev] [PATCH v4 1/3] net/af_xdp: fix umem frame size &\n\theadroom calculations", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "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", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "The previous frame size calculation incorrectly used\nmb_pool->private_data_size and didn't include mb_pool->header_size.\nInstead of performing a manual calculation, use the\nrte_mempool_calc_obj_size API to determine the frame size.\n\nThe previous frame headroom calculation also incorrectly used\nmb_pool->private_data_size and didn't include mb_pool->header_size or the\nmbuf priv size. Fix this.\n\nFixes: d8a210774e1d (\"net/af_xdp: support unaligned umem chunks\")\nCc: stable@dpdk.org\n\nSigned-off-by: Ciara Loftus <ciara.loftus@intel.com>\nReviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>\n---\n drivers/net/af_xdp/rte_eth_af_xdp.c | 13 ++++++++-----\n 1 file changed, 8 insertions(+), 5 deletions(-)", "diff": "diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c\nindex ed784dff19..111ab000cc 100644\n--- a/drivers/net/af_xdp/rte_eth_af_xdp.c\n+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c\n@@ -33,6 +33,7 @@\n #include <rte_log.h>\n #include <rte_memory.h>\n #include <rte_memzone.h>\n+#include <rte_mempool.h>\n #include <rte_mbuf.h>\n #include <rte_malloc.h>\n #include <rte_ring.h>\n@@ -754,11 +755,13 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals __rte_unused,\n \tvoid *base_addr = NULL;\n \tstruct rte_mempool *mb_pool = rxq->mb_pool;\n \n-\tusr_config.frame_size = rte_pktmbuf_data_room_size(mb_pool) +\n-\t\t\t\t\tETH_AF_XDP_MBUF_OVERHEAD +\n-\t\t\t\t\tmb_pool->private_data_size;\n-\tusr_config.frame_headroom = ETH_AF_XDP_DATA_HEADROOM +\n-\t\t\t\t\tmb_pool->private_data_size;\n+\tusr_config.frame_size = rte_mempool_calc_obj_size(mb_pool->elt_size,\n+\t\t\t\t\t\t\t\tmb_pool->flags,\n+\t\t\t\t\t\t\t\tNULL);\n+\tusr_config.frame_headroom = mb_pool->header_size +\n+\t\t\t\t\tsizeof(struct rte_mbuf) +\n+\t\t\t\t\trte_pktmbuf_priv_size(mb_pool) +\n+\t\t\t\t\tRTE_PKTMBUF_HEADROOM;\n \n \tumem = rte_zmalloc_socket(\"umem\", sizeof(*umem), 0, rte_socket_id());\n \tif (umem == NULL) {\n", "prefixes": [ "v4", "1/3" ] }{ "id": 65783, "url": "