Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/65785/?format=api
http://patches.dpdk.org/api/patches/65785/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200213084914.54755-4-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-4-ciara.loftus@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200213084914.54755-4-ciara.loftus@intel.com", "date": "2020-02-13T08:49:14", "name": "[v4,3/3] net/af_xdp: fix maximum MTU value", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "fcc5ac81a17c4517338f4ff1a8e010cda4800655", "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-4-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/65785/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/65785/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 DFD73A0542;\n\tThu, 13 Feb 2020 09:48:34 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id CA6B01BFAD;\n\tThu, 13 Feb 2020 09:48:10 +0100 (CET)", "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n by dpdk.org (Postfix) with ESMTP id EFCC91BEE5;\n Thu, 13 Feb 2020 09:48:06 +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:06 -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:04 -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=\"313670548\"", "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:14 +0000", "Message-Id": "<20200213084914.54755-4-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 3/3] net/af_xdp: fix maximum MTU value", "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 maximum MTU for af_xdp zero copy is equal to the page size less the\nframe overhead introduced by AF_XDP (XDP HR = 256) and DPDK (frame headroom\n= 320). The patch updates this value to reflect this.\n\nThis change also makes it possible to remove unneeded constants for both\nzero-copy and copy mode.\n\nFixes: d8a210774e1d (\"net/af_xdp: support unaligned umem chunks\")\nCc: stable@dpdk.org\n\nSigned-off-by: Ciara Loftus <ciara.loftus@intel.com>\n---\n drivers/net/af_xdp/rte_eth_af_xdp.c | 23 +++++++++++------------\n 1 file changed, 11 insertions(+), 12 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 a0edfc3cd3..06124ba789 100644\n--- a/drivers/net/af_xdp/rte_eth_af_xdp.c\n+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c\n@@ -58,13 +58,6 @@ static int af_xdp_logtype;\n \n #define ETH_AF_XDP_FRAME_SIZE\t\t2048\n #define ETH_AF_XDP_NUM_BUFFERS\t\t4096\n-#ifdef XDP_UMEM_UNALIGNED_CHUNK_FLAG\n-#define ETH_AF_XDP_MBUF_OVERHEAD\t128 /* sizeof(struct rte_mbuf) */\n-#define ETH_AF_XDP_DATA_HEADROOM \\\n-\t(ETH_AF_XDP_MBUF_OVERHEAD + RTE_PKTMBUF_HEADROOM)\n-#else\n-#define ETH_AF_XDP_DATA_HEADROOM\t0\n-#endif\n #define ETH_AF_XDP_DFLT_NUM_DESCS\tXSK_RING_CONS__DEFAULT_NUM_DESCS\n #define ETH_AF_XDP_DFLT_START_QUEUE_IDX\t0\n #define ETH_AF_XDP_DFLT_QUEUE_COUNT\t1\n@@ -601,7 +594,14 @@ eth_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n \tdev_info->max_tx_queues = internals->queue_cnt;\n \n \tdev_info->min_mtu = RTE_ETHER_MIN_MTU;\n-\tdev_info->max_mtu = ETH_AF_XDP_FRAME_SIZE - ETH_AF_XDP_DATA_HEADROOM;\n+#if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG)\n+\tdev_info->max_mtu = getpagesize() -\n+\t\t\t\tsizeof(struct rte_mempool_objhdr) -\n+\t\t\t\tsizeof(struct rte_mbuf) -\n+\t\t\t\tRTE_PKTMBUF_HEADROOM - XDP_PACKET_HEADROOM;\n+#else\n+\tdev_info->max_mtu = ETH_AF_XDP_FRAME_SIZE - XDP_PACKET_HEADROOM;\n+#endif\n \n \tdev_info->default_rxportconf.nb_queues = 1;\n \tdev_info->default_txportconf.nb_queues = 1;\n@@ -803,7 +803,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,\n \t\t.fill_size = ETH_AF_XDP_DFLT_NUM_DESCS,\n \t\t.comp_size = ETH_AF_XDP_DFLT_NUM_DESCS,\n \t\t.frame_size = ETH_AF_XDP_FRAME_SIZE,\n-\t\t.frame_headroom = ETH_AF_XDP_DATA_HEADROOM };\n+\t\t.frame_headroom = 0 };\n \tchar ring_name[RTE_RING_NAMESIZE];\n \tchar mz_name[RTE_MEMZONE_NAMESIZE];\n \tint ret;\n@@ -828,8 +828,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,\n \n \tfor (i = 0; i < ETH_AF_XDP_NUM_BUFFERS; i++)\n \t\trte_ring_enqueue(umem->buf_ring,\n-\t\t\t\t (void *)(i * ETH_AF_XDP_FRAME_SIZE +\n-\t\t\t\t\t ETH_AF_XDP_DATA_HEADROOM));\n+\t\t\t\t (void *)(i * ETH_AF_XDP_FRAME_SIZE));\n \n \tsnprintf(mz_name, sizeof(mz_name), \"af_xdp_umem_%s_%u\",\n \t\t internals->if_name, rxq->xsk_queue_idx);\n@@ -938,7 +937,7 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,\n \t/* Now get the space available for data in the mbuf */\n \tbuf_size = rte_pktmbuf_data_room_size(mb_pool) -\n \t\tRTE_PKTMBUF_HEADROOM;\n-\tdata_size = ETH_AF_XDP_FRAME_SIZE - ETH_AF_XDP_DATA_HEADROOM;\n+\tdata_size = ETH_AF_XDP_FRAME_SIZE;\n \n \tif (data_size > buf_size) {\n \t\tAF_XDP_LOG(ERR, \"%s: %d bytes will not fit in mbuf (%d bytes)\\n\",\n", "prefixes": [ "v4", "3/3" ] }{ "id": 65785, "url": "