From patchwork Wed Oct 5 09:50:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Rybchenko X-Patchwork-Id: 117377 X-Patchwork-Delegate: andrew.rybchenko@oktetlabs.ru 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 07C9FA0542; Wed, 5 Oct 2022 11:50:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED461427EB; Wed, 5 Oct 2022 11:50:48 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 6BDE740DFB for ; Wed, 5 Oct 2022 11:50:47 +0200 (CEST) Received: by shelob.oktetlabs.ru (Postfix, from userid 115) id 165EC86; Wed, 5 Oct 2022 12:50:47 +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 15E6A67; Wed, 5 Oct 2022 12:50:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 15E6A67 Authentication-Results: shelob.oktetlabs.ru/15E6A67; dkim=none; dkim-atps=neutral From: Andrew Rybchenko To: Ciara Loftus , Qi Zhang Cc: dev@dpdk.org Subject: [PATCH v3 1/6] net/af_xdp: move XDP library presence flag to right branch Date: Wed, 5 Oct 2022 12:50:32 +0300 Message-Id: <20221005095037.997006-3-andrew.rybchenko@oktetlabs.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221005095037.997006-1-andrew.rybchenko@oktetlabs.ru> References: <20220624102354.1516606-1-ciara.loftus@intel.com> <20221005095037.997006-1-andrew.rybchenko@oktetlabs.ru> 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 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')