Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/114075/?format=api
https://patches.dpdk.org/api/patches/114075/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220721121415.1709202-3-ciara.loftus@intel.com/", "project": { "id": 1, "url": "https://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": "<20220721121415.1709202-3-ciara.loftus@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220721121415.1709202-3-ciara.loftus@intel.com", "date": "2022-07-21T12:14:15", "name": "[RFC,3/3] net/af_xdp: use autoconf file instead of cflags", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "24b7f7055a19f7a04f979b9b52838873964504e6", "submitter": { "id": 144, "url": "https://patches.dpdk.org/api/people/144/?format=api", "name": "Loftus, Ciara", "email": "ciara.loftus@intel.com" }, "delegate": { "id": 3961, "url": "https://patches.dpdk.org/api/users/3961/?format=api", "username": "arybchenko", "first_name": "Andrew", "last_name": "Rybchenko", "email": "andrew.rybchenko@oktetlabs.ru" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220721121415.1709202-3-ciara.loftus@intel.com/mbox/", "series": [ { "id": 24043, "url": "https://patches.dpdk.org/api/series/24043/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=24043", "date": "2022-07-21T12:14:13", "name": "[RFC,1/3] net/af_xdp: simplify libbpf version checking in meson", "version": 1, "mbox": "https://patches.dpdk.org/series/24043/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/114075/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/114075/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 01160A00C2;\n\tThu, 21 Jul 2022 14:14:48 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6EA404282E;\n\tThu, 21 Jul 2022 14:14:36 +0200 (CEST)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by mails.dpdk.org (Postfix) with ESMTP id 66CF1400D7\n for <dev@dpdk.org>; Thu, 21 Jul 2022 14:14:34 +0200 (CEST)", "from orsmga006.jf.intel.com ([10.7.209.51])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 21 Jul 2022 05:14:31 -0700", "from silpixa00401086.ir.intel.com (HELO localhost.localdomain)\n ([10.55.128.124])\n by orsmga006.jf.intel.com with ESMTP; 21 Jul 2022 05:14:29 -0700" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1658405674; x=1689941674;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=YqigU2exCG0QJCY1P2vxLFleyIQkS3TnDEmBrd6IPag=;\n b=Bak/wcOER1EgyX3zMwfcm0KpdjClpuzhbsTQ+EEfxveTLbQ3dR2T6gvX\n Z451xcDJWnF/v/0wjslSYs9CQ44EyRfaCwjn6V4Uw/rXrrf2I7Ao2o1Ta\n YlgWeQKLwS44EIJC4vjnC7uzb/Ff0YUY3GMoYtCeoev2ih3CdzbU6ja+f\n WjrgUxG/PlDseaVXWgLwa1Jjrw/F26crbRKMMyP4QduWQ62vucRvmHmeV\n BH8dAuE9peEQDYyH6CtSj7bH738pNy093oxxaqmypwA9tXYEM1FmgNeJz\n l2ij1QUAimBQngfu2PBj7IiOSd6mizlFXeZtUAxvVV8iCmZaTUrQ0sWT7 Q==;", "X-IronPort-AV": [ "E=McAfee;i=\"6400,9594,10414\"; a=\"351017364\"", "E=Sophos;i=\"5.92,289,1650956400\"; d=\"scan'208\";a=\"351017364\"", "E=Sophos;i=\"5.92,289,1650956400\"; d=\"scan'208\";a=\"573715916\"" ], "X-ExtLoop1": "1", "From": "Ciara Loftus <ciara.loftus@intel.com>", "To": "dev@dpdk.org", "Cc": "andrew.rybchenko@oktetlabs.ru,\n\tCiara Loftus <ciara.loftus@intel.com>", "Subject": "[RFC PATCH 3/3] net/af_xdp: use autoconf file instead of cflags", "Date": "Thu, 21 Jul 2022 12:14:15 +0000", "Message-Id": "<20220721121415.1709202-3-ciara.loftus@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20220721121415.1709202-1-ciara.loftus@intel.com>", "References": "<20220721121415.1709202-1-ciara.loftus@intel.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "8bit", "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": "Generate af_xdp_autoconf.h which contains the different features\ndetected by the meson build instead of using cflags.\n\nSuggested-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>\nSigned-off-by: Ciara Loftus <ciara.loftus@intel.com>\n---\n drivers/net/af_xdp/compat.h | 8 +++++---\n drivers/net/af_xdp/meson.build | 15 ++++++++-------\n 2 files changed, 13 insertions(+), 10 deletions(-)", "diff": "diff --git a/drivers/net/af_xdp/compat.h b/drivers/net/af_xdp/compat.h\nindex 28ea64aeaa..e1f8ead7c8 100644\n--- a/drivers/net/af_xdp/compat.h\n+++ b/drivers/net/af_xdp/compat.h\n@@ -2,7 +2,9 @@\n * Copyright(c) 2020 Intel Corporation.\n */\n \n-#ifdef RTE_NET_AF_XDP_LIBXDP\n+#include \"af_xdp_autoconf.h\"\n+\n+#ifdef HAVE_LIBXDP\n #include <xdp/xsk.h>\n #else\n #include <bpf/xsk.h>\n@@ -12,7 +14,7 @@\n #include <poll.h>\n \n #if KERNEL_VERSION(5, 10, 0) <= LINUX_VERSION_CODE && \\\n-\tdefined(RTE_NET_AF_XDP_SHARED_UMEM)\n+\tdefined(HAVE_LIBBPF_SHARED_UMEM)\n #define ETH_AF_XDP_SHARED_UMEM 1\n #endif\n \n@@ -60,7 +62,7 @@ tx_syscall_needed(struct xsk_ring_prod *q __rte_unused)\n }\n #endif\n \n-#ifdef RTE_NET_AF_XDP_LIBBPF_OBJ_OPEN\n+#ifdef HAVE_LIBBPF_OBJ_OPEN\n static int load_program(const char *prog_path, struct bpf_object **obj)\n {\n \tstruct bpf_program *prog;\ndiff --git a/drivers/net/af_xdp/meson.build b/drivers/net/af_xdp/meson.build\nindex d91545f9c3..d1f6febbca 100644\n--- a/drivers/net/af_xdp/meson.build\n+++ b/drivers/net/af_xdp/meson.build\n@@ -23,15 +23,17 @@ if bpf_dep.found() and cc.has_header('bpf/bpf.h') and cc.has_header_symbol('bpf/\n libbpf070 = true\n endif\n \n+config = configuration_data()\n+\n if cc.has_header('linux/if_xdp.h')\n if xdp_dep.found() and cc.has_header('xdp/xsk.h')\n if bpf_dep.found() and cc.has_header('bpf/bpf.h')\n- cflags += ['-DRTE_NET_AF_XDP_LIBXDP']\n- cflags += ['-DRTE_NET_AF_XDP_SHARED_UMEM']\n+ config.set('HAVE_LIBXDP', 1)\n+ config.set('HAVE_LIBBPF_SHARED_UMEM', 1)\n ext_deps += xdp_dep\n ext_deps += bpf_dep\n if libbpf070\n- cflags += ['-DRTE_NET_AF_XDP_LIBBPF_OBJ_OPEN']\n+ config.set('HAVE_LIBBPF_OBJ_OPEN', 1)\n endif\n else\n build = false\n@@ -42,10 +44,7 @@ if cc.has_header('linux/if_xdp.h')\n # which is only available in versions < v0.7.0.\n if not libbpf070\n ext_deps += bpf_dep\n- bpf_shumem_ver_dep = cc.has_header_symbol('bpf/bpf.h', 'bpf_prog_bind_map')\n- if bpf_shumem_ver_dep\n- cflags += ['-DRTE_NET_AF_XDP_SHARED_UMEM']\n- endif\n+ config.set('HAVE_LIBBPF_SHARED_UMEM', cc.has_header_symbol('bpf/bpf.h', 'bpf_prog_bind_map'))\n else\n build = false\n reason = 'missing dependency, \"libxdp\" or \"libbpf <= v0.6.0\"'\n@@ -58,3 +57,5 @@ else\n build = false\n reason = 'missing header, \"linux/if_xdp.h\"'\n endif\n+\n+configure_file(output : 'af_xdp_autoconf.h', configuration : config)\n", "prefixes": [ "RFC", "3/3" ] }{ "id": 114075, "url": "