From patchwork Fri Sep 22 09:31:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Koikkara Reeny, Shibin" X-Patchwork-Id: 131828 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: 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]) by inbox.dpdk.org (Postfix) with ESMTP id E6C0342616; Fri, 22 Sep 2023 11:31:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 95D5F4029C; Fri, 22 Sep 2023 11:31:38 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id AEF3E40150; Fri, 22 Sep 2023 11:31:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695375097; x=1726911097; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZQZcDc44nldJqhTaEb7BU/BGvrKOO/pegA0176ZIpSg=; b=TMVSYD5AeOGXEHK+G2lC76K8fUbqEoILTVsCa0aGWv/BR8J5/FanOSUK IHcc/QFw7ooBaHtpN2NP38NKe0sQSI/2ICiMBH0uvEEk9wt4ezTMVHuyn ZGaoXijWUwqK0qaAPw12h2mA3VZ5UIztYlJdRje/TJN93lkYZUIC93NZm k29xDgeYY5i/4SmrCa+zBl9mpC9fg2tMLcJHNZt4c2rHpDWfwQGW3zq3s mVTWvqdRoNQCpsaYePVAWtMzaZkL+wDw1n3ws6miluQ8Oo7f+SsNXoXaN WTxzQRr6FCvB2ajhYXxqDe+sp7c5c4td2UZ01NToKmGELFzIyHOQwH45a A==; X-IronPort-AV: E=McAfee;i="6600,9927,10840"; a="384622095" X-IronPort-AV: E=Sophos;i="6.03,167,1694761200"; d="scan'208";a="384622095" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2023 02:31:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10840"; a="890755959" X-IronPort-AV: E=Sophos;i="6.03,167,1694761200"; d="scan'208";a="890755959" Received: from silpixa00401350.ir.intel.com ([10.55.128.174]) by fmsmga001.fm.intel.com with ESMTP; 22 Sep 2023 02:30:20 -0700 From: Shibin Koikkara Reeny To: dev@dpdk.org, ciara.loftus@intel.com, bruce.richardson@intel.com Cc: qi.z.zhang@intel.com, john.mcnamara@intel.com, stable@dpdk.org, Shibin Koikkara Reeny Subject: [PATCH v2] net/af_xdp: fix cflags to appropriate UMEM feature Date: Fri, 22 Sep 2023 09:31:03 +0000 Message-Id: <20230922093103.58541-1-shibin.koikkara.reeny@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230921102923.65738-1-shibin.koikkara.reeny@intel.com> References: <20230921102923.65738-1-shibin.koikkara.reeny@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Fix missing RTE_NET_AF_XDP_SHARED_UMEM flag in xsk_socket__create_shared(). rte_pmd_af_xdp_probe(): Initializing pmd_af_xdp for net_af_xdp0 init_internals(): Shared UMEM feature not available. Check kernel and libbpf version rte_pmd_af_xdp_probe(): Failed to init internals vdev_probe(): failed to initialize net_af_xdp0 device EAL: Bus (vdev) probe failed. Fixes: e024c7e838fc ("net/af_xdp: avoid version-based check for shared UMEM") Fixes: 33d66940e9ba ("build: use C11 standard") Fix is for the commit e024c7e838fc ("net/af_xdp: avoid version-based check for shared UMEM") fixline would imply a possible backport though, but no issue has been seen on version of DPDK not using C11, so I will be skipping backporting this for now. Commit 33d66940e9ba ("build: use C11 standard") enforces the C11 standard so some changes need to be made to the af_xdp driver meson build to ensure that the appropriate cflags are passed when checking if certain functions are available in the libbpf/libxdp libraries. Signed-off-by: Shibin Koikkara Reeny --- drivers/net/af_xdp/meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/af_xdp/meson.build b/drivers/net/af_xdp/meson.build index 9a8dbb4d49..3319acca65 100644 --- a/drivers/net/af_xdp/meson.build +++ b/drivers/net/af_xdp/meson.build @@ -56,17 +56,17 @@ if build ''' if cc.has_function('xsk_socket__create_shared', prefix : xsk_check_prefix, - dependencies : ext_deps) + dependencies : ext_deps, args: cflags) cflags += ['-DRTE_NET_AF_XDP_SHARED_UMEM'] endif if cc.has_function('bpf_object__next_program', prefix : '#include ', - dependencies : bpf_dep) + dependencies : bpf_dep, args: cflags) cflags += ['-DRTE_NET_AF_XDP_LIBBPF_OBJ_OPEN'] endif if cc.has_function('bpf_xdp_attach', prefix : '#include ', - dependencies : bpf_dep) + dependencies : bpf_dep, args: cflags) cflags += ['-DRTE_NET_AF_XDP_LIBBPF_XDP_ATTACH'] endif endif