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 C0461A0C4D; Mon, 4 Oct 2021 15:38:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9D441412A3; Mon, 4 Oct 2021 15:38:12 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 175CF41290 for ; Mon, 4 Oct 2021 15:38:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633354690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b6/t6NqJQmLnkGp/Oat4RtLXedQXIU7DYg5OC5emEvc=; b=NOp30kbv8TW39+mc/9N6/gTydaRHVVkWnSyKuwauO8+o1DO0Ph9I0+lYQQVW0GmfOMKsZ+ D1I5GBTJxd6DHPEMwbGDLDpStxgivwAe/Bydj5yzjeZuGzHb9TKa7EOk7p1Ldhn23lg8mU qT8zA1A8mrNSbBd2qAlSFsu+0/P7I8U= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-361-II8id56FNQeq5MHyexZJJw-1; Mon, 04 Oct 2021 09:37:55 -0400 X-MC-Unique: II8id56FNQeq5MHyexZJJw-1 Received: by mail-lf1-f72.google.com with SMTP id r14-20020ac25c0e000000b003fc149ed50eso14225142lfp.11 for ; Mon, 04 Oct 2021 06:37:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=b6/t6NqJQmLnkGp/Oat4RtLXedQXIU7DYg5OC5emEvc=; b=BqXIN6BWdJI5IP7hDG95bP5krd5P4HlrmrXZ4gqWKkHL+4mYBq1QdEKRjh7GnGGL5a wXZ/aakibnbxwZraWGNjUHmtgFAlsBY+S24Pa+ZkYgaFW2a//m2/Gl7ZEwTv6pKUeEtz VcL99VY4KVhmVeIFqQVvBLIOQ88v8Ks+EN75yFwqvGmh2XqgaMLbOv+UYKoHcw2K0Vrm xzsEFVKGJTHyac0rIU1Ufzyzjl7ppv8MiNvKO9RQL63+Xxw2tvKX7BNga08fEhbIsQ3b czBdqnn+sz5zOqQ6cIJzP13z7Jo9MqW3PHkzqeIup15PNUvuOFTaM/YWcHaOaHu59JgL MDcA== X-Gm-Message-State: AOAM532p+S0Tdmx/cJF8Z+K3E7ZdkfvNXIrKYX1UjxRZZfVL8kNry3z6 T9G8GGfWwighSEtn020/YTnwYhKnwgZfNLnqvMzxyG50bs+PdfPh2mRJihrlVYOqoH4GFzx8X2B QMoP8VOcZC73NKMy28QY= X-Received: by 2002:a2e:b707:: with SMTP id j7mr15771781ljo.297.1633354671937; Mon, 04 Oct 2021 06:37:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyO70rgSzqIwpZv5p/P8wgP6RPmVwVa6MzUFTL0X5DQawowyNKS53fiaEFd8IQkvmjbZiwAHHKAl7AOkjBn18= X-Received: by 2002:a2e:b707:: with SMTP id j7mr15771760ljo.297.1633354671721; Mon, 04 Oct 2021 06:37:51 -0700 (PDT) MIME-Version: 1.0 References: <20210910022402.26620-1-chenbo.xia@intel.com> <20210918022443.12719-1-chenbo.xia@intel.com> In-Reply-To: From: David Marchand Date: Mon, 4 Oct 2021 15:37:40 +0200 Message-ID: To: "Xia, Chenbo" Cc: "dev@dpdk.org" , ci@dpdk.org, Aaron Conole , dpdklab , "Zawadzki, Tomasz" , alexeymar@mellanox.com, Jim Harris Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v2 0/7] Removal of PCI bus ABIs 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 Sender: "dev" On Thu, Sep 30, 2021 at 10:45 AM David Marchand wrote: > On Wed, Sep 29, 2021 at 9:38 AM Xia, Chenbo wrote: > > @David, could you help me understand what is the compile error in Fedor= a 31? > > DPDK_compile_spdk failure is expected as the header name for SPDK is ch= anged, > > I am not sure if it's the same error... > > The error log is odd (no compilation "backtrace"). > You'll need to test spdk manually I guess. Tried your series with SPDK (w/o and w/ enable_driver_sdk). I think the same, and the error is likely due to the file rename. $ make CC lib/env_dpdk/env.o In file included from env.c:39:0: env_internal.h:64:25: error: field =E2=80=98driver=E2=80=99 has incomplete = type struct rte_pci_driver driver; ^ env_internal.h:75:59: warning: =E2=80=98struct rte_pci_device=E2=80=99 decl= ared inside parameter list [enabled by default] int pci_device_init(struct rte_pci_driver *driver, struct rte_pci_device *device); ^ env_internal.h:75:59: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] env_internal.h:76:28: warning: =E2=80=98struct rte_pci_device=E2=80=99 decl= ared inside parameter list [enabled by default] int pci_device_fini(struct rte_pci_device *device); ^ env_internal.h:89:38: warning: =E2=80=98struct rte_pci_device=E2=80=99 decl= ared inside parameter list [enabled by default] void vtophys_pci_device_added(struct rte_pci_device *pci_device); ^ env_internal.h:96:40: warning: =E2=80=98struct rte_pci_device=E2=80=99 decl= ared inside parameter list [enabled by default] void vtophys_pci_device_removed(struct rte_pci_device *pci_device); ^ make[2]: *** [env.o] Error 1 make[1]: *** [env_dpdk] Error 2 make: *** [lib] Error 2 So basically, SPDK needs some updates since it has its own pci drivers. I copied some SPDK folks for info. *Disclaimer* I only checked it links fine against my 21.11 dpdk env, and did not test the other cases: diff --git a/dpdkbuild/Makefile b/dpdkbuild/Makefile index d51b1a6e5..0e666735d 100644 --- a/dpdkbuild/Makefile +++ b/dpdkbuild/Makefile @@ -166,6 +166,7 @@ all: $(SPDK_ROOT_DIR)/dpdk/build-tmp $(SPDK_ROOT_DIR)/dpdk/build-tmp: $(SPDK_ROOT_DIR)/mk/cc.mk $(SPDK_ROOT_DIR)/include/spdk/config.h $(Q)rm -rf $(SPDK_ROOT_DIR)/dpdk/build $(SPDK_ROOT_DIR)/dpdk/build-= tmp $(Q)cd "$(SPDK_ROOT_DIR)/dpdk"; CC=3D"$(SUB_CC)" meson --prefix=3D"$(MESON_PREFIX)" --libdir lib -Dc_args=3D"$(DPDK_CFLAGS)" -Dc_link_args=3D"$(DPDK_LDFLAGS)" $(DPDK_OPTS) -Ddisable_drivers=3D"$(shell echo $(DPDK_DISABLED_DRVERS) | sed -E "s/ +/,/g")" build-tmp + $(Q)! meson configure build-tmp | grep -qw enable_driver_sdk || meson configure build-tmp -Denable_driver_sdk=3Dtrue $(Q)sed $(SED_INPLACE_FLAG) 's/#define RTE_EAL_PMD_PATH .*/#define RTE_EAL_PMD_PATH ""/g' $(SPDK_ROOT_DIR)/dpdk/build-tmp/rte_build_config.h $(Q) \ # TODO Meson build adds libbsd dependency when it's available. This means any app will be \ diff --git a/lib/env_dpdk/env.mk b/lib/env_dpdk/env.mk index cc7db8aab..e24c6942f 100644bits with an embedded dpdk --- a/lib/env_dpdk/env.mk +++ b/lib/env_dpdk/env.mk @@ -172,6 +172,12 @@ DPDK_PRIVATE_LINKER_ARGS +=3D -lnuma endif endif +ifneq (,$(wildcard $(DPDK_INC_DIR)/rte_build_config.h)) +ifneq (,$(shell grep -e "define RTE_HAS_LIBARCHIVE 1" $(DPDK_INC_DIR)/rte_build_config.h)) +DPDK_PRIVATE_LINKER_ARGS +=3D -larchive +endif +endif + ifeq ($(OS),Linux) DPDK_PRIVATE_LINKER_ARGS +=3D -ldl endif diff --git a/lib/env_dpdk/env_internal.h b/lib/env_dpdk/env_internal.h index 2303f432c..24b377545 100644 --- a/lib/env_dpdk/env_internal.h +++ b/lib/env_dpdk/env_internal.h @@ -43,13 +43,18 @@ #include #include #include -#include #include #if RTE_VERSION < RTE_VERSION_NUM(19, 11, 0, 0) #error RTE_VERSION is too old! Minimum 19.11 is required. #endif +#if RTE_VERSION < RTE_VERSION_NUM(21, 11, 0, 0) +#include +#else +#include +#endif + /* x86-64 and ARM userspace virtual addresses use only the low 48 bits [0.= .47], * which is enough to cover 256 TB. */ --=20 David Marchand