From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D630FA00C2; Thu, 6 Oct 2022 08:27:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE4784281E; Thu, 6 Oct 2022 08:27:07 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 42C6140697 for ; Thu, 6 Oct 2022 08:27:05 +0200 (CEST) Received: by shelob.oktetlabs.ru (Postfix, from userid 115) id EAFB066; Thu, 6 Oct 2022 09:27:04 +0300 (MSK) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mail1.oktetlabs.ru X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_DISCARD, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from aros.oktetlabs.ru (aros.oktetlabs.ru [192.168.38.17]) by shelob.oktetlabs.ru (Postfix) with ESMTP id 16B8C66; Thu, 6 Oct 2022 09:27:04 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 16B8C66 Authentication-Results: shelob.oktetlabs.ru/16B8C66; dkim=none; dkim-atps=neutral From: Andrew Rybchenko To: Ciara Loftus , Qi Zhang Cc: dev@dpdk.org, Bruce Richardson Subject: [PATCH v4 1/6] net/af_xdp: move XDP library presence flag to right branch Date: Thu, 6 Oct 2022 09:26:49 +0300 Message-Id: <20221006062654.1420349-2-andrew.rybchenko@oktetlabs.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221006062654.1420349-1-andrew.rybchenko@oktetlabs.ru> References: <20220624102354.1516606-1-ciara.loftus@intel.com> <20221006062654.1420349-1-andrew.rybchenko@oktetlabs.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 RTE_NET_AF_XDP_LIBXDP is a conditional to include xdp/xsk.h and should be set as soon as we know that the header is present. RTE_NET_AF_XDP_SHARED_UMEM is one of conditions to use xsk_socket__create_shared(). Both do not depend on libbpf and bpf/bpf.h presence. Since else branch below returns error, there is no functional changes, just style which will help on further rework. Signed-off-by: Andrew Rybchenko --- 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 1e0de23705..882d0b9518 100644 --- a/drivers/net/af_xdp/meson.build +++ b/drivers/net/af_xdp/meson.build @@ -17,10 +17,10 @@ endif if cc.has_header('linux/if_xdp.h') if xdp_dep.found() and cc.has_header('xdp/xsk.h') + cflags += ['-DRTE_NET_AF_XDP_LIBXDP'] + cflags += ['-DRTE_NET_AF_XDP_SHARED_UMEM'] + ext_deps += xdp_dep if bpf_dep.found() and cc.has_header('bpf/bpf.h') - cflags += ['-DRTE_NET_AF_XDP_LIBXDP'] - cflags += ['-DRTE_NET_AF_XDP_SHARED_UMEM'] - ext_deps += xdp_dep ext_deps += bpf_dep bpf_ver_dep = dependency('libbpf', version : '>=0.7.0', required: false, method: 'pkg-config') -- 2.30.2