Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/84071/?format=api
http://patches.dpdk.org/api/patches/84071/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201112163515.29463-1-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": "<20201112163515.29463-1-ciara.loftus@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20201112163515.29463-1-ciara.loftus@intel.com", "date": "2020-11-12T16:35:15", "name": "net/af_xdp: fix 32-bit build for older kernels", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "57adb720611dbe4b2d207b1ef680efbc6c76435b", "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/20201112163515.29463-1-ciara.loftus@intel.com/mbox/", "series": [ { "id": 13851, "url": "http://patches.dpdk.org/api/series/13851/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13851", "date": "2020-11-12T16:35:15", "name": "net/af_xdp: fix 32-bit build for older kernels", "version": 1, "mbox": "http://patches.dpdk.org/series/13851/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/84071/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/84071/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 38375A09D3;\n\tThu, 12 Nov 2020 18:03:43 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 303005953;\n\tThu, 12 Nov 2020 18:03:40 +0100 (CET)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n by dpdk.org (Postfix) with ESMTP id B545A4CA6;\n Thu, 12 Nov 2020 18:03:36 +0100 (CET)", "from fmsmga008.fm.intel.com ([10.253.24.58])\n by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 12 Nov 2020 09:03:17 -0800", "from silpixa00399839.ir.intel.com (HELO localhost.localdomain)\n ([10.237.222.142])\n by fmsmga008.fm.intel.com with ESMTP; 12 Nov 2020 09:03:15 -0800" ], "IronPort-SDR": [ "\n fcaoBfg+/DKOkJf1MFpgkApI2A87hyPErb0weWMX46JjZZZ5mBLN9R4qf0zFkCeDhWZyXwrvjP\n 7c6MpWSHmOag==", "\n VSEdeU5/mLnXACJvauf4r8byOFCNRV1YalWnXUC3cQSm6Fz/KM8JTbyII16i82p3ZYtpDyy5tX\n nl920EbaQEXw==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9803\"; a=\"255051719\"", "E=Sophos;i=\"5.77,472,1596524400\"; d=\"scan'208\";a=\"255051719\"", "E=Sophos;i=\"5.77,472,1596524400\"; d=\"scan'208\";a=\"308901228\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Ciara Loftus <ciara.loftus@intel.com>", "To": "dev@dpdk.org", "Cc": "Ciara Loftus <ciara.loftus@intel.com>,\n\tstable@dpdk.org", "Date": "Thu, 12 Nov 2020 16:35:15 +0000", "Message-Id": "<20201112163515.29463-1-ciara.loftus@intel.com>", "X-Mailer": "git-send-email 2.17.1", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH] net/af_xdp: fix 32-bit build for older kernels", "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": "'uint64_t' is used to hold pointers in multiple locations in the\ncopy-mode code (used for kernels before 5.4). For a 32-bit build\nthis assumption is wrong and results in build errors. This commit\nreplaces such instances of 'uint64_t' with 'uintptr_t'.\n\nWhile the copy-mode code will now compile for 32-bit, the PMD is\nnot expected to work and will fail at initialisation due to some\nlimitations in the kernel that were subsequently removed in v5.4.\nAdd a note to the docs to flag this limitation.\n\nFixes: f1debd77efaf (\"net/af_xdp: introduce AF_XDP PMD\")\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 doc/guides/nics/af_xdp.rst | 1 +\n drivers/net/af_xdp/rte_eth_af_xdp.c | 6 +++---\n 2 files changed, 4 insertions(+), 3 deletions(-)", "diff": "diff --git a/doc/guides/nics/af_xdp.rst b/doc/guides/nics/af_xdp.rst\nindex 052e59a3ae..5ed24374f8 100644\n--- a/doc/guides/nics/af_xdp.rst\n+++ b/doc/guides/nics/af_xdp.rst\n@@ -50,6 +50,7 @@ This is a Linux-specific PMD, thus the following prerequisites apply:\n * For PMD zero copy, it requires kernel version later than v5.4-rc1;\n * For shared_umem, it requires kernel version v5.10 or later and libbpf version\n v0.2.0 or later.\n+* For 32-bit OS, a kernel with version 5.4 or later is required.\n \n Set up an af_xdp interface\n -----------------------------\ndiff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c\nindex 4076ff797c..75ff1c00b2 100644\n--- a/drivers/net/af_xdp/rte_eth_af_xdp.c\n+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c\n@@ -349,7 +349,7 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \n \tfor (i = 0; i < rcvd; i++) {\n \t\tconst struct xdp_desc *desc;\n-\t\tuint64_t addr;\n+\t\tuintptr_t addr;\n \t\tuint32_t len;\n \t\tvoid *pkt;\n \n@@ -402,7 +402,7 @@ pull_umem_cq(struct xsk_umem_info *umem, int size, struct xsk_ring_cons *cq)\n \tn = xsk_ring_cons__peek(cq, size, &idx_cq);\n \n \tfor (i = 0; i < n; i++) {\n-\t\tuint64_t addr;\n+\t\tuintptr_t addr;\n \t\taddr = *xsk_ring_cons__comp_addr(cq, idx_cq++);\n #if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG)\n \t\taddr = xsk_umem__extract_addr(addr);\n@@ -1005,7 +1005,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals,\n \tchar ring_name[RTE_RING_NAMESIZE];\n \tchar mz_name[RTE_MEMZONE_NAMESIZE];\n \tint ret;\n-\tuint64_t i;\n+\tuintptr_t i;\n \n \tumem = rte_zmalloc_socket(\"umem\", sizeof(*umem), 0, rte_socket_id());\n \tif (umem == NULL) {\n", "prefixes": [] }{ "id": 84071, "url": "