[PATCH] doc: add build_root to STRIP_FROM_PATH
examples.dox is built inside builddir and so doxygen generates some dir_HASH.html that includes the builddir name and this may prevent DPDK documentation to be correctly generated in some distributions, for example CentOS Stream 9 and RHEL9, since the builddir includes the architecture. This commit adds builddir to STRIP_FROM_PATH in order to avoid generating html files that includes it. Fixes: a6090630f4e5 ("doc: automate examples file list for API") Cc: ferruh.yi...@intel.com Signed-off-by: Timothy Redaelli --- doc/api/doxy-api.conf.in | 1 + doc/api/meson.build | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/api/doxy-api.conf.in b/doc/api/doxy-api.conf.in index db2ca9b6ed..a668cad687 100644 --- a/doc/api/doxy-api.conf.in +++ b/doc/api/doxy-api.conf.in @@ -112,6 +112,7 @@ EXAMPLE_RECURSIVE = YES OUTPUT_DIRECTORY= @OUTPUT@ STRIP_FROM_PATH = @STRIP_FROM_PATH@ +STRIP_FROM_PATH += @BUILDDIR@ GENERATE_HTML = YES HTML_OUTPUT = @HTML_OUTPUT@ GENERATE_LATEX = NO diff --git a/doc/api/meson.build b/doc/api/meson.build index d34c383694..6dda9bec46 100644 --- a/doc/api/meson.build +++ b/doc/api/meson.build @@ -37,6 +37,7 @@ cdata.set('OUTPUT', join_paths(meson.build_root(), 'doc', 'api')) cdata.set('HTML_OUTPUT', 'html') cdata.set('TOPDIR', meson.source_root()) cdata.set('STRIP_FROM_PATH', meson.source_root()) +cdata.set('BUILDDIR', meson.build_root()) cdata.set('WARN_AS_ERROR', 'NO') if get_option('werror') cdata.set('WARN_AS_ERROR', 'YES') -- 2.33.1
Re: [PATCH] doc: add build_root to STRIP_FROM_PATH
Fixing the mail address of Thomas Monjalon in To. I used ./devtools/get-maintainer.sh, but it returned the old mail address. On Mon, Nov 22, 2021 at 9:17 PM Timothy Redaelli wrote: > > examples.dox is built inside builddir and so doxygen generates some > dir_HASH.html that includes the builddir name and this may prevent DPDK > documentation to be correctly generated in some distributions, for > example CentOS Stream 9 and RHEL9, since the builddir includes the > architecture. > > This commit adds builddir to STRIP_FROM_PATH in order to avoid > generating html files that includes it. > > Fixes: a6090630f4e5 ("doc: automate examples file list for API") > Cc: ferruh.yi...@intel.com > Signed-off-by: Timothy Redaelli > --- > doc/api/doxy-api.conf.in | 1 + > doc/api/meson.build | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/doc/api/doxy-api.conf.in b/doc/api/doxy-api.conf.in > index db2ca9b6ed..a668cad687 100644 > --- a/doc/api/doxy-api.conf.in > +++ b/doc/api/doxy-api.conf.in > @@ -112,6 +112,7 @@ EXAMPLE_RECURSIVE = YES > > OUTPUT_DIRECTORY= @OUTPUT@ > STRIP_FROM_PATH = @STRIP_FROM_PATH@ > +STRIP_FROM_PATH += @BUILDDIR@ > GENERATE_HTML = YES > HTML_OUTPUT = @HTML_OUTPUT@ > GENERATE_LATEX = NO > diff --git a/doc/api/meson.build b/doc/api/meson.build > index d34c383694..6dda9bec46 100644 > --- a/doc/api/meson.build > +++ b/doc/api/meson.build > @@ -37,6 +37,7 @@ cdata.set('OUTPUT', join_paths(meson.build_root(), 'doc', > 'api')) > cdata.set('HTML_OUTPUT', 'html') > cdata.set('TOPDIR', meson.source_root()) > cdata.set('STRIP_FROM_PATH', meson.source_root()) > +cdata.set('BUILDDIR', meson.build_root()) > cdata.set('WARN_AS_ERROR', 'NO') > if get_option('werror') > cdata.set('WARN_AS_ERROR', 'YES') > -- > 2.33.1 > -- Timothy Redaelli Software Engineer Red Hat Italia
[PATCH v2] doc: add examples.dox path to STRIP_FROM_PATH
examples.dox is built inside builddir/doc/api and so doxygen generates some dir_HASH.html that includes the builddir name and this may prevent DPDK documentation to be correctly generated in some distributions, for example CentOS Stream 9 and RHEL9, since the builddir includes the architecture. This commit adds builddir/doc/api (the path where examples.dox is generated) to STRIP_FROM_PATH, so the generated documentation doesn't change if builddir changes. Fixes: a6090630f4e5 ("doc: automate examples file list for API") Cc: ferruh.yi...@intel.com Cc: sta...@dpdk.org Signed-off-by: Timothy Redaelli --- v2: - Don't use another VARIABLE name, but set STRIP_FROM_PATH with the 2 paths directly (suggested by David Marchand) - Strip the full path of examples.dox (except the last component) instead of stripping only build_root. This is needed since doxygen generates the HASH of dir_HASH.html filename using the last component of the path and so if the last part of buildroot is changed, the filename is different. --- doc/api/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/meson.build b/doc/api/meson.build index d34c383694..7e2b429ac8 100644 --- a/doc/api/meson.build +++ b/doc/api/meson.build @@ -36,7 +36,7 @@ cdata.set('API_EXAMPLES', join_paths(meson.build_root(), 'doc', 'api', 'examples cdata.set('OUTPUT', join_paths(meson.build_root(), 'doc', 'api')) cdata.set('HTML_OUTPUT', 'html') cdata.set('TOPDIR', meson.source_root()) -cdata.set('STRIP_FROM_PATH', meson.source_root()) +cdata.set('STRIP_FROM_PATH', ' '.join([meson.source_root(), join_paths(meson.build_root(), 'doc', 'api')])) cdata.set('WARN_AS_ERROR', 'NO') if get_option('werror') cdata.set('WARN_AS_ERROR', 'YES') -- 2.33.1
[dpdk-dev] [pktgen PATCH] Fix dpdk-version.sh on Fedora
Fedora and RHEL dpdk-devel package installs rte_version.h inside $RTE_INCLUDE (/usr/include/dpdk) instead of $RTE_SDK Signed-off-by: Timothy Redaelli --- tools/dpdk-version.sh | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tools/dpdk-version.sh b/tools/dpdk-version.sh index 0989aa4..75146cf 100755 --- a/tools/dpdk-version.sh +++ b/tools/dpdk-version.sh @@ -87,15 +87,19 @@ EOM exit 1 } -if [ -z ${RTE_SDK} ] ; then - echo "*** RTE_SDK is not set, using "${PWD} - sdk=${PWD} +if [ -n ${RTE_INCLUDE} ] ; then + fpath=${RTE_INCLUDE}/${fname} else - sdk=${RTE_SDK} + if [ -z ${RTE_SDK} ] ; then + echo "*** RTE_SDK is not set, using "${PWD} + sdk=${PWD} + else + sdk=${RTE_SDK} + fi + + fpath=${sdk}/lib/librte_eal/common/include/${fname} fi -fpath=${sdk}/lib/librte_eal/common/include/${fname} - if [ ! -e ${fpath} ]; then echo "File not found @ "${fpath} usage -- 2.13.3
Re: [dpdk-dev] [PATCH] build: add drivers_install_subdir meson option
On Mon, 01 Oct 2018 10:46:02 +0100 Luca Boccassi wrote: > On Mon, 2018-10-01 at 10:25 +0100, Bruce Richardson wrote: > > On Mon, Oct 01, 2018 at 10:17:14AM +0100, Bruce Richardson wrote: > > > On Fri, Sep 28, 2018 at 06:58:03PM +0100, Luca Boccassi wrote: > > > > Allow users and packagers to override the default dpdk/drivers > > > > subdirectory where the PMDs get installed under $lib. > > > > > > > > Signed-off-by: Luca Boccassi > > > > --- > > > > > > I'm ok with this change, but what is the current location used by > > > distro's > > > right now? I mistakenly never checked what was done before I used > > > dpdk/drivers as a default value, and I'd like the default to match > > > the > > > common option if possible. > > > > > > /Bruce > > > > > > > Replying to my own question, I've just checked on CentOS and Debian, > > and it > > appears both are using directory "dpdk-pmds" as the subdir name. > > Therefore, > > let's just make that the default. [Does it need to be configurable in > > that > > case?] > > > > /Bruce > > If the default is the one I expect then I'm fine without having an > option (actually happier - less things to configure). > > But in Debian/Ubuntu it's dpdk-MAJORVER-drivers since last January :-) > We changed because using a single directory creates problems when > multiple different ABI versions are installed, due to the EAL autoload > from that directory. So we need a different subdirectory per ABI > revision. > > We were actually talking with Timothy a while ago to make this > consistent across our distros, and perhaps Marco can chip in as well. > > Timothy, Marco, is using dpdk-MAJORVER-$something ok for you? I'm not > too fussy on $something, it can be drivers or pmds or something else. > LGTM. If needed, we can just do a compatibility symlink using the current dpdk-pmds path
Re: [dpdk-dev] [PATCH v4 1/2] build: change default PMD installation subdir to dpdk/pmds-XX.YY
On Tue, 2 Oct 2018 17:20:45 +0100 Luca Boccassi wrote: > As part of the effort of consolidating the DPDK installation bits and > pieces across distros, set the default directory of lib/ where PMDs get > installed to dpdk/pmds-XX.YY. It's necessary to have a versioned > subdirectory as multiple ABI revisions might be installed at the same > time, so having a fixed name will cause trouble with the autoload > feature. > Small refactor with parsing and saving the major version to a variable, > since it's now used in 3 different places. > > Signed-off-by: Luca Boccassi > --- Acked-by: Timothy Redaelli
Re: [dpdk-dev] [PATCH v4 2/2] build: add drivers_install_subdir meson option
On Tue, 2 Oct 2018 17:20:46 +0100 Luca Boccassi wrote: > Allow users and packagers to override the default dpdk/drivers > subdirectory where the PMDs get installed under $lib. > > Signed-off-by: Luca Boccassi > --- Acked-by: Timothy Redaelli
[dpdk-dev] [PATCH] vhost/crypto: fix build without cryptodev (shared lib)
Currently it's not possible to build DPDK as shared library with cryptodev disabled since vhost is trying to link with rte_crypto, but rte_crypto and rte_hash are only needed when you build vhost_crypto and so only when cryptodev is enabled. This patch fix this by linking rte_vhost with rte_crypto and rte_hash only when cryptodev is enabled. Fixes: b4ca81298613 ("vhost/crypto: fix build without cryptodev") Fixes: d090c7f86a76 ("vhost/crypto: update makefile") Signed-off-by: Timothy Redaelli --- lib/librte_vhost/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile index 531cf4832..5dd318987 100644 --- a/lib/librte_vhost/Makefile +++ b/lib/librte_vhost/Makefile @@ -19,8 +19,7 @@ LDLIBS += -lpthread ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y) LDLIBS += -lnuma endif -LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -lrte_net \ - -lrte_cryptodev -lrte_hash +LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -lrte_net # all source are stored in SRCS-y SRCS-$(CONFIG_RTE_LIBRTE_VHOST) := fd_man.c iotlb.c socket.c vhost.c \ @@ -31,6 +30,7 @@ SYMLINK-$(CONFIG_RTE_LIBRTE_VHOST)-include += rte_vhost.h rte_vdpa.h # only compile vhost crypto when cryptodev is enabled ifeq ($(CONFIG_RTE_LIBRTE_CRYPTODEV),y) +LDLIBS += -lrte_cryptodev -lrte_hash SRCS-$(CONFIG_RTE_LIBRTE_VHOST) += vhost_crypto.c SYMLINK-$(CONFIG_RTE_LIBRTE_VHOST)-include += rte_vhost_crypto.h endif -- 2.17.1
[dpdk-dev] [PATCH v2] vhost/crypto: fix build without cryptodev (shared lib)
Currently it's not possible to build DPDK as shared library with cryptodev disabled since vhost is trying to link with rte_crypto, but rte_crypto and rte_hash are only needed when you build vhost_crypto and so only when cryptodev is enabled. This patch fix this by linking rte_vhost with rte_crypto and rte_hash only when cryptodev is enabled. Fixes: b4ca81298613 ("vhost/crypto: fix build without cryptodev") Fixes: 939066d96563 ("vhost/crypto: add public function implementation") Cc: sta...@dpdk.org Signed-off-by: Timothy Redaelli Reviewed-by: Maxime Coquelin --- v2: Fix the second 'Fixes' line. I wrongly copied that commit id from commit b4ca81298613, but it seems it's a commit not contained in any branch (as reported by Maxime and check-git-log.sh). --- lib/librte_vhost/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile index 531cf4832..5dd318987 100644 --- a/lib/librte_vhost/Makefile +++ b/lib/librte_vhost/Makefile @@ -19,8 +19,7 @@ LDLIBS += -lpthread ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y) LDLIBS += -lnuma endif -LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -lrte_net \ - -lrte_cryptodev -lrte_hash +LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_ethdev -lrte_net # all source are stored in SRCS-y SRCS-$(CONFIG_RTE_LIBRTE_VHOST) := fd_man.c iotlb.c socket.c vhost.c \ @@ -31,6 +30,7 @@ SYMLINK-$(CONFIG_RTE_LIBRTE_VHOST)-include += rte_vhost.h rte_vdpa.h # only compile vhost crypto when cryptodev is enabled ifeq ($(CONFIG_RTE_LIBRTE_CRYPTODEV),y) +LDLIBS += -lrte_cryptodev -lrte_hash SRCS-$(CONFIG_RTE_LIBRTE_VHOST) += vhost_crypto.c SYMLINK-$(CONFIG_RTE_LIBRTE_VHOST)-include += rte_vhost_crypto.h endif -- 2.17.1
[dpdk-dev] [PATCH] net/qede: fix crash when configure fails
Currently, if configuration fails (for example if a 100G card is used with an odd number of RX/TX queues) QEDE crashes due to a null pointer dereference. This commit fixes it by checking that the pointer is not NULL before using it. Fixes: 7105b24f4bb8 ("net/qede: fix memory alloc for multiple port reconfig") Cc: sta...@dpdk.org Signed-off-by: Timothy Redaelli --- drivers/net/qede/qede_rxtx.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c index 8a4772f46..296189107 100644 --- a/drivers/net/qede/qede_rxtx.c +++ b/drivers/net/qede/qede_rxtx.c @@ -235,12 +235,13 @@ static void qede_rx_queue_release_mbufs(struct qede_rx_queue *rxq) void qede_rx_queue_release(void *rx_queue) { struct qede_rx_queue *rxq = rx_queue; - struct qede_dev *qdev = rxq->qdev; - struct ecore_dev *edev = QEDE_INIT_EDEV(qdev); - - PMD_INIT_FUNC_TRACE(edev); + struct qede_dev *qdev; + struct ecore_dev *edev; if (rxq) { + qdev = rxq->qdev; + edev = QEDE_INIT_EDEV(qdev); + PMD_INIT_FUNC_TRACE(edev); qede_rx_queue_release_mbufs(rxq); qdev->ops->common->chain_free(edev, &rxq->rx_bd_ring); qdev->ops->common->chain_free(edev, &rxq->rx_comp_ring); @@ -399,12 +400,13 @@ static void qede_tx_queue_release_mbufs(struct qede_tx_queue *txq) void qede_tx_queue_release(void *tx_queue) { struct qede_tx_queue *txq = tx_queue; - struct qede_dev *qdev = txq->qdev; - struct ecore_dev *edev = QEDE_INIT_EDEV(qdev); - - PMD_INIT_FUNC_TRACE(edev); + struct qede_dev *qdev; + struct ecore_dev *edev; if (txq) { + qdev = txq->qdev; + edev = QEDE_INIT_EDEV(qdev); + PMD_INIT_FUNC_TRACE(edev); qede_tx_queue_release_mbufs(txq); qdev->ops->common->chain_free(edev, &txq->tx_pbl); rte_free(txq->sw_tx_ring); -- 2.19.1
Re: [dpdk-dev] [PATCH v2] net/virtio: avoid annoying IOPL call related errors
On Fri, 23 Nov 2018 17:36:20 +0300 Ilya Maximets wrote: > In case of running with not enough capabilities, i.e. running as > non-root user any application linked with DPDK prints the message > about IOPL call failure even if it was just called like > './testpmd --help'. For example, this beaks most of the OVS unit > tests if it built with DPDK support. > > Let's register the virtio driver unconditionally and print error > message while probing the device. Silent iopl() call left in the > constructor to have privileges as early as possible as it was before. > > Signed-off-by: Ilya Maximets > --- > > Version 2: > * Fixed possible fd leak on BSD. > > We can avoid test failures in OVS by filtering the output > like this: > https://patchwork.ozlabs.org/project/openvswitch/list/?series=77706 > > But it still looks very inconvenient for me to have this > message in the output of every command for the DPDK linked app. > > drivers/net/virtio/virtio_ethdev.c | 11 ++- > lib/librte_eal/bsdapp/eal/eal.c| 6 -- > 2 files changed, 10 insertions(+), 7 deletions(-) Without this commit, if you link OVS as shared library (--enable-shared), you'll also have this annoying message every time you open a new (bash) shell, as user, due to OVS bash-completion: [tredaell@aldebaran ~]$ bash rte_virtio_pmd_init(): IOPL call failed - cannot use virtio PMD rte_virtio_pmd_init(): IOPL call failed - cannot use virtio PMD [tredaell@aldebaran ~]$ Acked-By: Timothy Redaelli
Re: [dpdk-dev] Fedora 28 fails DPDK 18.11 on Azure/Hyper-V
On Mon, 26 Nov 2018 13:30:46 -0800 Stephen Hemminger wrote: > Started testing DPDK support of Hyper-V in Fedora and discovered that it > doesn't work. > Looks like the multiq qdisc is not in the default Fedora kernel configuration. > Hopefully CentOS/RHEL don't have the same problem. > > Not sure why SCH_MULTIQ is in the shipped kernel config files but not present. > Looks like a Fedora build or packaging issue. > > # grep MULTIQ /boot/config* > /boot/config-4.18.13-200.fc28.x86_64:CONFIG_NET_SCH_MULTIQ=m > /boot/config-4.18.18-200.fc28.x86_64:CONFIG_NET_SCH_MULTIQ=m > /boot/config-4.19.2-200.fc28.x86_64:CONFIG_NET_SCH_MULTIQ=m > > # modinfo sch_multiq > modinfo: ERROR: Module sch_multiq not found. Hi, the sch_multiq module is present on RHEL8, Fedora 28, 29 and Rawhide, but it's in a subpackage called kernel-modules-extra [1]: "This package provides less commonly used kernel modules for the kernel package." So if you install the kernel-modules-extra subpackage you'll find the sch_multiq module. On RHEL7 you don't need to install the subpackage since it doesn't exists. [1] https://src.fedoraproject.org/rpms/kernel/blob/f28/f/mod-extra.list#_130
[dpdk-dev] [PATCH] mk: don't install meson.build in usertools
In commit 7dd34c71de2a ("usertools: install with meson") meson.build was added in usertools directory and so it's copied to $(datadir)/usertools with "make install". This patch avoids to copy meson.build when installing usertools with "make install". Signed-off-by: Timothy Redaelli --- mk/rte.sdkinstall.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk index 8296e6dbd..2d34b4e5a 100644 --- a/mk/rte.sdkinstall.mk +++ b/mk/rte.sdkinstall.mk @@ -99,8 +99,9 @@ install-runtime: --exclude 'app/cmdline*' --exclude app/test \ --exclude app/testacl --exclude app/testpipeline app | \ tar -xf - -C $(DESTDIR)$(bindir) $(TAR_X_FLAGS) - $(Q)$(call rte_mkdir, $(DESTDIR)$(datadir)) - $(Q)cp $(CP_FLAGS) $(RTE_SDK)/usertools $(DESTDIR)$(datadir) + $(Q)$(call rte_mkdir, $(DESTDIR)$(datadir)/usertools) + $(Q)tar -cf - -C $(RTE_SDK) --exclude meson.build usertools | \ + tar -xf - -C $(DESTDIR)$(datadir)/usertools $(TAR_X_FLAGS) $(Q)$(call rte_mkdir, $(DESTDIR)$(sbindir)) $(Q)$(call rte_symlink, $(DESTDIR)$(datadir)/usertools/dpdk-devbind.py, \ $(DESTDIR)$(sbindir)/dpdk-devbind) -- 2.19.1
[dpdk-dev] [PATCH] net/mlx4: Avoid stripping the glue library
Stripping binaries at build time is usually a bad thing since it makes impossible to generate (split) debug symbols and this can lead to a more difficult debugging. CC: Adrien Mazarguil Fixes: 27cea11686ff ("net/mlx4: spawn rdma-core dependency plug-in") Signed-off-by: Timothy Redaelli --- drivers/net/mlx4/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile index 63bc00337..92e932250 100644 --- a/drivers/net/mlx4/Makefile +++ b/drivers/net/mlx4/Makefile @@ -115,7 +115,7 @@ endif $(LIB_GLUE): mlx4_glue.o $Q $(LD) $(GLUE_LDFLAGS) $(EXTRA_LDFLAGS) \ -Wl,-h,$(LIB_GLUE) \ - -s -shared -o $@ $< -libverbs -lmlx4 + -shared -o $@ $< -libverbs -lmlx4 mlx4_glue.o: mlx4_autoconf.h -- 2.17.1
[dpdk-dev] [PATCH] net/mlx5: Avoid stripping the glue library
Stripping binaries at build time is usually a bad thing since it makes impossible to generate (split) debug symbols and this can lead to a more difficult debugging. CC: Adrien Mazarguil Fixes: 59b91bec12c6 ("net/mlx5: spawn rdma-core dependency plug-in") Signed-off-by: Timothy Redaelli --- drivers/net/mlx5/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile index 75bee4640..2e70dec5b 100644 --- a/drivers/net/mlx5/Makefile +++ b/drivers/net/mlx5/Makefile @@ -409,7 +409,7 @@ endif $(LIB_GLUE): mlx5_glue.o $Q $(LD) $(GLUE_LDFLAGS) $(EXTRA_LDFLAGS) \ -Wl,-h,$(LIB_GLUE) \ - -s -shared -o $@ $< -libverbs -lmlx5 + -shared -o $@ $< -libverbs -lmlx5 mlx5_glue.o: mlx5_autoconf.h -- 2.17.1
Re: [dpdk-dev] [PATCH] build: create relative symlinks for PMDs in libdir
On Wed, 12 Sep 2018 18:21:34 +0100 Luca Boccassi wrote: > Add -r option to ln, otherwise the link will be absolute and contain > the build path and break packaging among other things: > > lrwxrwxrwx 1 bluca bluca 99 Sep 11 22:17 > librte_mempool_dpaa.so.1.1 > -> /home/bluca/git/dpdk/testt4//usr/local/lib/x86_64-linux-gnu/dpdk/ > drivers/librte_mempool_dpaa.so.1.1 > > With -r: > > lrwxrwxrwx 1 bluca bluca 35 Sep 12 18:13 librte_pmd_zlib.so.1.1 > -> dpdk/drivers/librte_pmd_zlib.so.1.1 > > Fixes: ed4d43d73e2b ("build: symlink drivers to library directory") > Cc: sta...@dpdk.org > > Signed-off-by: Luca Boccassi Tested on Fedora 28 by building dpdk using meson from a spec file Tested-by: Timothy Redaelli
Re: [dpdk-dev] [PATCH] build: fix compatibility with meson 0.41 onwards
On Tue, 18 Sep 2018 11:55:52 +0100 Bruce Richardson wrote: > Versions of meson prior to 0.47 flattened the parameters to the > "set_variable" function, which meant that the function could not take > array variables as a parameter. Therefore, we need to disable driver > tracking for those older versions, in order to maintain compatibility > with the minimum supported 0.41 version, and also v0.45 shipped in > Ubuntu 18.04 release. > > Fixes: 806c45dd483d ("build: add configuration summary at end of > config") > > Signed-off-by: Bruce Richardson Tried to build using meson 0.42.1 and it builds correctly Tested-by: Timothy Redaelli
Re: [dpdk-dev] [PATCH v2] doc: support building HTML guides with meson
On Wed, 19 Sep 2018 14:48:27 +0100 Luca Boccassi wrote: > From: Bruce Richardson > > Signed-off-by: Bruce Richardson > Signed-off-by: Luca Boccassi > --- > v2: send on behalf of Bruce on request. > - tell sphinx to create .doctrees working files in the > parent of the target directory so that they don't get > installed > - change the output directory so that it matches the legacy > makefiles directory structure (on install) > - add install_dir to fix ninja install > - add post-install calls to delete .buildinfo sphinx > temporary file and to install custom.css as the makefiles > do > The installed directory has been verified to be bit-by-bit > identical to the legacy makefiles with diffoscope. > > doc/api/meson.build| 5 ++--- > doc/guides/meson.build | 27 +++ > doc/meson.build| 11 +++ > 3 files changed, 40 insertions(+), 3 deletions(-) > create mode 100644 doc/guides/meson.build > > diff --git a/doc/api/meson.build b/doc/api/meson.build > index 13fcbb8cd7..30bdc573b5 100644 > --- a/doc/api/meson.build > +++ b/doc/api/meson.build > @@ -50,7 +50,6 @@ if doxygen.found() > install_dir: htmldir, > build_by_default: false) > > - run_target('doc', command: 'true', depends: doxy_build) > -else > - run_target('doc', command: ['echo', 'doxygen', 'not', 'found']) > + doc_targets += doxy_build > + doc_target_names += 'Doxygen_API' > endif > diff --git a/doc/guides/meson.build b/doc/guides/meson.build > new file mode 100644 > index 00..24f5316c5c > --- /dev/null > +++ b/doc/guides/meson.build > @@ -0,0 +1,27 @@ > +# SPDX-License-Identifier: BSD-3-Clause > +# Copyright(c) 2018 Intel Corporation > + > +sphinx = find_program('sphinx-build', required: get_option('enable_docs')) > + > +if sphinx.found() > + htmldir = join_paths('share', 'doc', 'dpdk') > + html_guides_build = custom_target('html_guides_build', > + input: meson.current_source_dir(), > + output: 'guides', > + command: [sphinx, '-b', 'html', '@INPUT@', > meson.current_build_dir() + '/guides', > + '-d', meson.current_build_dir() + '/.doctrees'], This on RHEL 7.5 doesn't work, since old versions of sphinx (I have v1.1.3) need all options before the paths. I tried to move "'-d', meson.current_build_dir() + '/.doctrees'" before "'@INPUT@'" and it worked. > + build_by_default: false, > + install: get_option('enable_docs'), > + install_dir: htmldir) > + > + doc_targets += html_guides_build > + doc_target_names += 'HTML_Guides' > + > + # sphinx leaves a .buildinfo in the target directory, which we don't > + # want to install. Note that sh -c has to be used, otherwise the > + # env var does not get expanded if calling rm/install directly. > + meson.add_install_script('sh', '-c', > + 'rm -f > $MESON_INSTALL_DESTDIR_PREFIX/share/doc/dpdk/guides/.buildinfo') > + meson.add_install_script('sh', '-c', > + 'install -D -m0644 $MESON_SOURCE_ROOT/doc/guides/custom.css > $MESON_INSTALL_DESTDIR_PREFIX/share/doc/dpdk/guides/_static/css/') This on RHEL 7.5 doesn't work. I had to append custom.css to DEST ($MESON_INSTALL_DESTDIR_PREFIX/share/doc/dpdk/guides/_static/css/custom.css) to make it work. > +endif > diff --git a/doc/meson.build b/doc/meson.build > index afca2e7133..c5410d85d6 100644 > --- a/doc/meson.build > +++ b/doc/meson.build > @@ -1,4 +1,15 @@ > # SPDX-License-Identifier: BSD-3-Clause > # Copyright(c) 2018 Luca Boccassi > > +doc_targets = [] > +doc_target_names = [] > subdir('api') > +subdir('guides') > + > +if doc_targets.length() == 0 > + message = 'No docs targets found' > +else > + message = 'Building docs:' > +endif > +run_target('doc', command: ['echo', message, doc_target_names], > + depends: doc_targets)
Re: [dpdk-dev] [PATCH v3] doc: support building HTML guides with meson
On Thu, 20 Sep 2018 14:22:08 +0100 Luca Boccassi wrote: > From: Bruce Richardson > > Signed-off-by: Bruce Richardson > Signed-off-by: Luca Boccassi Tested on Fedora 28 (sphinx 1.7.5) and RHEL 7.5 (sphinx 1.1.3) Tested-by: Timothy Redaelli
Re: [dpdk-dev] [PATCH] doc: add deprecation notice for meson version
On Wed, 16 Jan 2019 11:37:13 + Bruce Richardson wrote: > Add a notice in the deprecation section of the release notes to call out > the fact that the minimum supported meson version for DPDK will change > from 19.05 onwards. > > Signed-off-by: Bruce Richardson > --- > doc/guides/rel_notes/deprecation.rst | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/doc/guides/rel_notes/deprecation.rst > b/doc/guides/rel_notes/deprecation.rst > index d4aea4b46..92524e4e3 100644 > --- a/doc/guides/rel_notes/deprecation.rst > +++ b/doc/guides/rel_notes/deprecation.rst > @@ -17,6 +17,12 @@ Deprecation Notices >Long Term Stable (LTS) version which is 3.16, but compatibility for >recent distribution kernels will be kept. > > +* meson: The minimum supported version of meson for configuring and building > + DPDK will be increased to v0.47.1 (from 0.41) from DPDK 19.05 onwards. For > + those users with a version earlier than 0.47.1, an updated copy of meson > + can be got using the ``pip``, or ``pip3``, tool for downloading python > + packages. > + > * kvargs: The function ``rte_kvargs_process`` will get a new parameter >for returning key match count. It will ease handling of no-match case. > Acked-by: Timothy Redaelli
Re: [dpdk-dev] Build is broken in dpdk-next-net
On Fri, 30 Mar 2018 15:27:55 +0200 Maxime Coquelin wrote: > Hi Andrew, > > On 03/30/2018 03:18 PM, Andrew Rybchenko wrote: > > Hi all, > > > > Build is broken in dpdk-next-net for me on Ubuntu 16.04.4: > > > > lib/librte_vhost/fd_man.c: In function ‘fdset_pipe_read_cb’: > > lib/librte_vhost/fd_man.c:284:2: error: ignoring return value of > > ‘read’, declared with attribute warn_unused_result > > [-Werror=unused-result] read(readfd, charbuf, sizeof(charbuf)); ^ > > lib/librte_vhost/fd_man.c: In function ‘fdset_pipe_notify’: > > lib/librte_vhost/fd_man.c:324:2: error: ignoring return value of > > ‘write’, declared with attribute warn_unused_result > > [-Werror=unused-result] write(fdset->u.writefd, "1", 1); ^ > > > > $ gcc --version > > gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609 > > Thanks for reporting, I don't catch it with my Fedora build system: > $ gcc --version > gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5) Those kind of warnings are enabled by "-D_FORTIFY_SOURCE=2" (enabled by default in Ubuntu [1]). To have the same behavior on Fedora you need to set -D_FORTIFY_SOURCE=2 by hand, for example with: # make EXTRA_CFLAGS="-D_FORTIFY_SOURCE=2" Usually I build dpdk with the flags we also use when we build the Fedora/RHEL package. To do that I have in my .bashrc (all in one line): export EXTRA_CFLAGS="-O2 -g -pipe -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -Wformat" > > > > As I understand it is broken in > > ad94ade905454401b705be9e06b19e54a1c78148 vhost: add pipe event for > > optimizing negotiating > > I confirm it is this patch. > > Xiangxia, can you provide a fix please? > > Ferruh, how do you want to proceed? > Would you revert it? > > Thanks, > Maxime > > Andrew. > > [1] https://wiki.ubuntu.com/ToolChain/CompilerFlags#A-D_FORTIFY_SOURCE.3D2
[dpdk-dev] [PATCH] app/testpmd: Fix relative rpath for drivers
This commit fixes the setting of relative rpath on dpdk-testpmd for drivers ($libdir/dpdk/drivers) to the correct absolute rpath ($prefix$libdir/dpdk/drivers) Fixes: d123bba2dfbe ("build: add initial infrastructure for meson & ninja builds") Signed-off-by: Timothy Redaelli --- This commit is for dpdk-next-build. app/test-pmd/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build index a374771bf..202adf2b2 100644 --- a/app/test-pmd/meson.build +++ b/app/test-pmd/meson.build @@ -70,5 +70,5 @@ executable('dpdk-testpmd', link_whole: link_libs, dependencies: dep_objs, link_args: eal_extra_link_arg, # add -ldl for linux, -lexecinfo for BSD - install_rpath: driver_install_path, + install_rpath: join_paths(get_option('prefix'), driver_install_path), install: true) -- 2.13.5
[dpdk-dev] [PATCH] app/testpmd: Remove xenvirt again
Fixes: 5b590fbe09b6 ("app/testpmd: add traffic management forwarding mode") Signed-off-by: Timothy Redaelli --- app/test-pmd/Makefile | 4 1 file changed, 4 deletions(-) diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile index d21308fcd..4993c9184 100644 --- a/app/test-pmd/Makefile +++ b/app/test-pmd/Makefile @@ -83,10 +83,6 @@ ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD),y) LDLIBS += -lrte_pmd_bnxt endif -ifeq ($(CONFIG_RTE_LIBRTE_PMD_XENVIRT),y) -LDLIBS += -lrte_pmd_xenvirt -endif - ifeq ($(CONFIG_RTE_LIBRTE_PMD_SOFTNIC),y) LDLIBS += -lrte_pmd_softnic endif -- 2.14.3
[dpdk-dev] [PATCH] app/testpmd: link with virtio PMD when using shared libraries
testpmd is often used inside a VM to test the OVS PVP scenario. This commit makes testpmd to link to virtio PMD when DPDK is built as shared libraries too. Signed-off-by: Timothy Redaelli --- app/test-pmd/Makefile | 4 1 file changed, 4 insertions(+) diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile index 4993c9184..ffc370f0e 100644 --- a/app/test-pmd/Makefile +++ b/app/test-pmd/Makefile @@ -87,6 +87,10 @@ ifeq ($(CONFIG_RTE_LIBRTE_PMD_SOFTNIC),y) LDLIBS += -lrte_pmd_softnic endif +ifeq ($(CONFIG_RTE_LIBRTE_VIRTIO_PMD),y) +LDLIBS += -lrte_pmd_virtio +endif + endif CFLAGS_cmdline.o := -D_GNU_SOURCE -- 2.14.3
Re: [dpdk-dev] [PATCH] app/testpmd: link with virtio PMD when using shared libraries
On Wed, 29 Nov 2017 23:23:40 +0100 Thomas Monjalon wrote: > 20/11/2017 11:27, Eelco Chaudron: > > On 17/11/17 17:19, Timothy Redaelli wrote: > > > testpmd is often used inside a VM to test the OVS PVP scenario. > > > This commit makes testpmd to link to virtio PMD when DPDK is > > > built as shared libraries too. > > > > > > Signed-off-by: Timothy Redaelli > > > > Acked-by: Eelco Chaudron > > I really doubt it is the right fix. > This PMD should be dynamically linked with dlopen as a plugin. > It can be done with -d option or by specifying the plugin directory > at compilation time in CONFIG_RTE_EAL_PMD_PATH. Hi, I checked that CONFIG_RTE_EAL_PMD_PATH is set correctly when we build dpdk in Fedora, but unlucky the symlinks for each pmd from the PMD_PATH to the real librte_pmd_* library (installed in /usr/lib64) on Fedora is broken since it points to the .so file directly, that is only installed by dpdk-devel package, instead of correctly point to the .so.[0-9] one that is installed by the dpdk package and so my patch is not needed and I'll send the fix on the dpdk Fedora spec file instead. Just a little question: if testpmd loads the pmds dynamically using dlopen, why in app/test-pmd/Makefile some PMD are linked at build time? Thank you and sorry for the noise.
Re: [dpdk-dev] [PATCH v2] net/mlx: fix rdma-core glue path with EAL plugins
On Fri, 2 Mar 2018 15:15:17 +0100 Adrien Mazarguil wrote: > Glue object files are looked up in RTE_EAL_PMD_PATH by default when > set and should be installed in this directory. > > During startup, EAL attempts to load them automatically like other > plug-ins found there. While normally harmless, dlopen() fails when > rdma-core is not installed, EAL interprets this as a fatal error and > terminates the application. > > This patch requests glue objects to be installed in a different > directory to prevent their automatic loading by EAL since they are > PMD helpers, not actual DPDK plug-ins. > > Fixes: f6242d0655cd ("net/mlx: make rdma-core glue path configurable") > Cc: sta...@dpdk.org > > Reported-by: Timothy Redaelli > Signed-off-by: Adrien Mazarguil Tested-by: Timothy Redaelli Tested with and without libibverbs installed and with an old version of libibverbs installed and it works like it should.
[dpdk-dev] [PATCH] app/test: fix rpath for drivers in meson build
This commit fixes the setting of relative rpath on dpdk-test for drivers ($libdir/dpdk/pmd-$abiver) to the correct absolute rpath ($prefix$libdir/dpdk/pmd-$abiver) Fixes: b5dc795a8a55 ("test: build app with meson as dpdk-test") Cc: harry.van.haa...@intel.com Cc: sta...@dpdk.org Signed-off-by: Timothy Redaelli --- app/test/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/test/meson.build b/app/test/meson.build index 5233ead46..476b332cb 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -424,7 +424,8 @@ dpdk_test = executable('dpdk-test', link_whole: link_libs + link_nodes, dependencies: test_dep_objs, c_args: cflags, - install_rpath: driver_install_path, + install_rpath: join_paths(get_option('prefix'), +driver_install_path), install: true) has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0' -- 2.26.2
Re: [dpdk-dev] [PATCH] app/test: fix rpath for drivers in meson build
On Thu, 2 Jul 2020 10:16:48 +0100 Bruce Richardson wrote: > On Wed, Jul 01, 2020 at 07:16:38PM +0200, Timothy Redaelli wrote: > > This commit fixes the setting of relative rpath on dpdk-test for > > drivers ($libdir/dpdk/pmd-$abiver) to the correct absolute rpath > > ($prefix$libdir/dpdk/pmd-$abiver) > > > > Fixes: b5dc795a8a55 ("test: build app with meson as dpdk-test") > > Cc: harry.van.haa...@intel.com > > Cc: sta...@dpdk.org > > Signed-off-by: Timothy Redaelli > > --- > > app/test/meson.build | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > I'm not sure I agree with this change. It's better to have a relative > rather than absolute rpath, I think. What problems is it causing to have a > relative vs absolute rpath? > I only backported the same fix done in app/meson.build since, currently, app/test/meson.build adds a rpath to "lib64/dpdk/pmd-20.0" that doesn't exists since, in this case, it should be "../lib64/dpdk/pmd-20.0" on Fedora, or "../lib/x86_64-linux-gnu/dpdk/pmds-20.0" on Debian. If we want relative paths we should change "install_rpath:" line on app/meson.build too. Debian workarounded that bug by stripping rpaths from dpdk-test [1], but I'd like to avoid doing that on Fedora/RHEL too, when we'll migrate to meson, since currently check-rpaths (invoked by rpmbuild) is complaining about the invalid rpath: ERROR 0002: file '/usr/bin/dpdk-test' contains an invalid rpath 'lib64/dpdk/pmds-20.0' in [lib64/dpdk/pmds-20.0] [1] https://salsa.debian.org/debian/dpdk/-/blob/unstable/debian/rules#L175
[dpdk-dev] [PATCH 1/3] crypto/octeontx2: fix building with GCC 10
GCC 10 defaults to -fno-common, this means a linker error will now be reported if the same global variable is defined in more than one compilation unit. Fixes: 2f8a1b963eb7 ("crypto/octeontx2: add PMD skeleton") Cc: ano...@marvell.com Cc: sta...@dpdk.org Signed-off-by: Timothy Redaelli --- drivers/crypto/octeontx2/otx2_cryptodev.c | 2 ++ drivers/crypto/octeontx2/otx2_cryptodev.h | 2 +- drivers/crypto/octeontx2/otx2_cryptodev_ops.h | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c b/drivers/crypto/octeontx2/otx2_cryptodev.c index 7fd216bb3..957bcd720 100644 --- a/drivers/crypto/octeontx2/otx2_cryptodev.c +++ b/drivers/crypto/octeontx2/otx2_cryptodev.c @@ -24,6 +24,8 @@ int otx2_cpt_logtype; +uint8_t otx2_cryptodev_driver_id; + static struct rte_pci_id pci_id_cpt_table[] = { { RTE_PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.h b/drivers/crypto/octeontx2/otx2_cryptodev.h index 8e0ebc292..c0aa661b3 100644 --- a/drivers/crypto/octeontx2/otx2_cryptodev.h +++ b/drivers/crypto/octeontx2/otx2_cryptodev.h @@ -38,6 +38,6 @@ extern int otx2_cpt_logtype; /* * Crypto device driver ID */ -uint8_t otx2_cryptodev_driver_id; +extern uint8_t otx2_cryptodev_driver_id; #endif /* _OTX2_CRYPTODEV_H_ */ diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_ops.h b/drivers/crypto/octeontx2/otx2_cryptodev_ops.h index a2724f722..f83e36b48 100644 --- a/drivers/crypto/octeontx2/otx2_cryptodev_ops.h +++ b/drivers/crypto/octeontx2/otx2_cryptodev_ops.h @@ -16,6 +16,6 @@ enum otx2_cpt_egrp { OTX2_CPT_EGRP_AE = 2 }; -struct rte_cryptodev_ops otx2_cpt_ops; +extern struct rte_cryptodev_ops otx2_cpt_ops; #endif /* _OTX2_CRYPTODEV_OPS_H_ */ -- 2.24.1
[dpdk-dev] [PATCH 0/3] fix building with GCC 10
GCC 10 defaults to -fno-common, this means a linker error will now be reported if the same global variable is defined in more than one compilation unit. See https://gcc.gnu.org/gcc-10/porting_to.html for more informations. I didn't put -fcommon to CFLAGS since: Compiling with -fno-common is useful on targets for which it provides better performance, or if you wish to verify that the program will work on other systems that always treat uninitialized variable definitions this way. from gcc man page Timothy Redaelli (3): crypto/octeontx2: fix building with GCC 10 app/test: fix building with GCC 10 app/test-pipeline: fix building with GCC 10 app/test-pipeline/config.c| 2 +- app/test/test_fib_perf.c | 2 +- app/test/test_lpm_perf.c | 2 +- drivers/crypto/octeontx2/otx2_cryptodev.c | 2 ++ drivers/crypto/octeontx2/otx2_cryptodev.h | 2 +- drivers/crypto/octeontx2/otx2_cryptodev_ops.h | 2 +- 6 files changed, 7 insertions(+), 5 deletions(-) -- 2.24.1
[dpdk-dev] [PATCH 3/3] app/test-pipeline: fix building with GCC 10
GCC 10 defaults to -fno-common, this means a linker error will now be reported if the same global variable is defined in more than one compilation unit. Fixes: 48f31ca50cc4 ("app/pipeline: packet framework benchmark") Cc: cristian.dumitre...@intel.com Cc: sta...@dpdk.org Signed-off-by: Timothy Redaelli --- app/test-pipeline/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-pipeline/config.c b/app/test-pipeline/config.c index 28ac9fcc0..42c6ed9b2 100644 --- a/app/test-pipeline/config.c +++ b/app/test-pipeline/config.c @@ -42,7 +42,7 @@ #include "main.h" -struct app_params app; +extern struct app_params app; static const char usage[] = "\n"; -- 2.24.1
[dpdk-dev] [PATCH 2/3] app/test: fix building with GCC 10
GCC 10 defaults to -fno-common, this means a linker error will now be reported if the same global variable is defined in more than one compilation unit. Fixes: 08e0c7581468 ("test/fib: add performance autotests") Cc: vladimir.medved...@intel.com Cc: sta...@dpdk.org Signed-off-by: Timothy Redaelli --- app/test/test_fib_perf.c | 2 +- app/test/test_lpm_perf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test/test_fib_perf.c b/app/test/test_fib_perf.c index 573087c3c..dd2e54db8 100644 --- a/app/test/test_fib_perf.c +++ b/app/test/test_fib_perf.c @@ -35,7 +35,7 @@ struct route_rule { uint8_t depth; }; -struct route_rule large_route_table[MAX_RULE_NUM]; +static struct route_rule large_route_table[MAX_RULE_NUM]; static uint32_t num_route_entries; #define NUM_ROUTE_ENTRIES num_route_entries diff --git a/app/test/test_lpm_perf.c b/app/test/test_lpm_perf.c index a2578fe90..489719c40 100644 --- a/app/test/test_lpm_perf.c +++ b/app/test/test_lpm_perf.c @@ -34,7 +34,7 @@ struct route_rule { uint8_t depth; }; -struct route_rule large_route_table[MAX_RULE_NUM]; +static struct route_rule large_route_table[MAX_RULE_NUM]; static uint32_t num_route_entries; #define NUM_ROUTE_ENTRIES num_route_entries -- 2.24.1
[dpdk-dev] [PATCH 0/3] examples: fix building with GCC 10
GCC 10 defaults to -fno-common, this means a linker error will now be reported if the same global variable is defined in more than one compilation unit. See https://gcc.gnu.org/gcc-10/porting_to.html for more informations. I didn't put -fcommon to CFLAGS since: Compiling with -fno-common is useful on targets for which it provides better performance, or if you wish to verify that the program will work on other systems that always treat uninitialized variable definitions this way. from gcc man page Timothy Redaelli (3): examples/vhost_blk: fix building with GCC 10 examples/eventdev_pipeline: fix building with GCC 10 examples/qos_sched: fix building with GCC 10 examples/eventdev_pipeline/main.c| 2 ++ examples/eventdev_pipeline/pipeline_common.h | 4 ++-- examples/qos_sched/cfg_file.c| 3 +++ examples/qos_sched/main.h| 4 ++-- examples/vhost_blk/vhost_blk.c | 2 ++ examples/vhost_blk/vhost_blk.h | 4 ++-- 6 files changed, 13 insertions(+), 6 deletions(-) -- 2.24.1
[dpdk-dev] [PATCH 1/3] examples/vhost_blk: fix building with GCC 10
GCC 10 defaults to -fno-common, this means a linker error will now be reported if the same global variable is defined in more than one compilation unit. Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample") Cc: jin...@intel.com Cc: sta...@dpdk.org Signed-off-by: Timothy Redaelli --- examples/vhost_blk/vhost_blk.c | 2 ++ examples/vhost_blk/vhost_blk.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c index e1036bf3a..143ae19f3 100644 --- a/examples/vhost_blk/vhost_blk.c +++ b/examples/vhost_blk/vhost_blk.c @@ -31,6 +31,8 @@ (1ULL << VIRTIO_F_NOTIFY_ON_EMPTY) | \ (1ULL << VHOST_USER_F_PROTOCOL_FEATURES)) +struct vhost_blk_ctrlr *g_vhost_ctrlr; + /* Path to folder where character device will be created. Can be set by user. */ static char dev_pathname[PATH_MAX] = ""; static sem_t exit_sem; diff --git a/examples/vhost_blk/vhost_blk.h b/examples/vhost_blk/vhost_blk.h index 933e2b7c5..17258d284 100644 --- a/examples/vhost_blk/vhost_blk.h +++ b/examples/vhost_blk/vhost_blk.h @@ -112,8 +112,8 @@ struct inflight_blk_task { struct rte_vhost_inflight_info_packed *inflight_packed; }; -struct vhost_blk_ctrlr *g_vhost_ctrlr; -struct vhost_device_ops vhost_blk_device_ops; +extern struct vhost_blk_ctrlr *g_vhost_ctrlr; +extern struct vhost_device_ops vhost_blk_device_ops; int vhost_bdev_process_blk_commands(struct vhost_block_dev *bdev, struct vhost_blk_task *task); -- 2.24.1
[dpdk-dev] [PATCH v2 3/3] app/test-pipeline: fix building with GCC 10
GCC 10 defaults to -fno-common, this means a linker error will now be reported if the same global variable is defined in more than one compilation unit. Fixes: 48f31ca50cc4 ("app/pipeline: packet framework benchmark") Cc: cristian.dumitre...@intel.com Cc: sta...@dpdk.org Signed-off-by: Timothy Redaelli --- v2: app is already declared as extern in main.h. (as reported by David) --- app/test-pipeline/config.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/test-pipeline/config.c b/app/test-pipeline/config.c index 28ac9fcc0..33f3f1c82 100644 --- a/app/test-pipeline/config.c +++ b/app/test-pipeline/config.c @@ -42,8 +42,6 @@ #include "main.h" -struct app_params app; - static const char usage[] = "\n"; void -- 2.24.1
[dpdk-dev] [PATCH 2/3] examples/eventdev_pipeline: fix building with GCC 10
Fixes: 3d1b33e44ae2 ("examples/eventdev: move common data into pipeline common") Cc: pbhagavat...@marvell.com Cc: sta...@dpdk.org Signed-off-by: Timothy Redaelli --- examples/eventdev_pipeline/main.c| 2 ++ examples/eventdev_pipeline/pipeline_common.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c index d3ff1bbe4..d0da51b1c 100644 --- a/examples/eventdev_pipeline/main.c +++ b/examples/eventdev_pipeline/main.c @@ -10,6 +10,8 @@ #include "pipeline_common.h" +struct fastpath_data *fdata; + struct config_data cdata = { .num_packets = (1L << 25), /* do ~32M packets */ .num_fids = 512, diff --git a/examples/eventdev_pipeline/pipeline_common.h b/examples/eventdev_pipeline/pipeline_common.h index 8e30393d0..c7245f7f0 100644 --- a/examples/eventdev_pipeline/pipeline_common.h +++ b/examples/eventdev_pipeline/pipeline_common.h @@ -93,8 +93,8 @@ struct port_link { uint8_t priority; }; -struct fastpath_data *fdata; -struct config_data cdata; +extern struct fastpath_data *fdata; +extern struct config_data cdata; static __rte_always_inline void exchange_mac(struct rte_mbuf *m) -- 2.24.1
[dpdk-dev] [PATCH 3/3] examples/qos_sched: fix building with GCC 10
GCC 10 defaults to -fno-common, this means a linker error will now be reported if the same global variable is defined in more than one compilation unit. Fixes: be1e533238c0 ("examples/qos_sched: add TC and queue config flexibility") Cc: jasvinder.si...@intel.com Cc: sta...@dpdk.org Signed-off-by: Timothy Redaelli --- examples/qos_sched/cfg_file.c | 3 +++ examples/qos_sched/main.h | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/qos_sched/cfg_file.c b/examples/qos_sched/cfg_file.c index 5714c3f36..f078e4f7d 100644 --- a/examples/qos_sched/cfg_file.c +++ b/examples/qos_sched/cfg_file.c @@ -20,6 +20,9 @@ * for new entries do we add in */ #define CFG_ALLOC_ENTRY_BATCH 16 +uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE]; +uint32_t n_active_queues; + int cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port_params) { diff --git a/examples/qos_sched/main.h b/examples/qos_sched/main.h index baa2b3ead..23bc418d9 100644 --- a/examples/qos_sched/main.h +++ b/examples/qos_sched/main.h @@ -148,8 +148,8 @@ extern struct burst_conf burst_conf; extern struct ring_thresh rx_thresh; extern struct ring_thresh tx_thresh; -uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE]; -uint32_t n_active_queues; +extern uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE]; +extern uint32_t n_active_queues; extern struct rte_sched_port_params port_params; extern struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS]; -- 2.24.1
[dpdk-dev] [PATCH] test: fix build without timer
The action for timer_secondary_spawn_wait should be enabled only when CONFIG_RTE_LIBRTE_TIMER is enabled. Fixes: 50247fe03fe0 ("test/timer: exercise new APIs in secondary process") Cc: erik.g.carri...@intel.com Cc: sta...@dpdk.org Signed-off-by: Timothy Redaelli --- app/test/test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test/test.c b/app/test/test.c index 194a92a39..cd7aaf645 100644 --- a/app/test/test.c +++ b/app/test/test.c @@ -67,7 +67,9 @@ do_recursive_call(void) { "test_memory_flags", no_action }, { "test_file_prefix", no_action }, { "test_no_huge_flag", no_action }, +#ifdef RTE_LIBRTE_TIMER { "timer_secondary_spawn_wait", test_timer_secondary }, +#endif }; if (recursive_call == NULL) -- 2.21.0
[dpdk-dev] [PATCH] usertools: Fix clearing any old data
Currently clear_data (dpdk-devbind.py) doesn't work as expected since "global devices" is missing and so "devices" is considered a local variable. This commit changes "clear_data" function in order to really clear devices by adding "global devices". CC: sta...@dpdk.org Signed-off-by: Timothy Redaelli --- usertools/dpdk-devbind.py | 1 + 1 file changed, 1 insertion(+) diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py index 9e79f0d28..e6b551d33 100755 --- a/usertools/dpdk-devbind.py +++ b/usertools/dpdk-devbind.py @@ -210,6 +210,7 @@ def get_pci_device_details(dev_id, probe_lspci): def clear_data(): '''This function clears any old data''' +global devices devices = {} def get_device_details(devices_type): -- 2.21.0
[dpdk-dev] [PATCH 0/2] Fix shared lib detection on Fedora/CentOS/RHEL
Currently eal only tries to find shared lib by looking for .so files, but on Fedora, CentOS and RHEL the .so file is not installed by dpdk package, but it's only installed by dpdk-devel package, since .so files should not be necessary in order to run a program [1]. This series fix that by checking for .so.ABI_VERSION that should be available on any linux distribution. [1] https://docs.fedoraproject.org/en-US/packaging-guidelines/#_devel_packages Timothy Redaelli (2): eal: fix shared lib mode detection eal: fix loading of shared libs from driver plugin directories lib/librte_eal/common/eal_common_options.c | 9 ++--- lib/librte_eal/common/meson.build | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) -- 2.28.0
[dpdk-dev] [PATCH 1/2] eal: fix shared lib mode detection
Commit 06c7871dde01 ("eal: restrict default plugin path to shared lib mode") introduced a check that enabled shared lib mode when librte_eal.so can be loaded, but it can't work, at least, on Fedora/CentOS/RHEL since .so symlinks are not installed when you install dpdk package, but only when you install dpdk-devel package. This commit uses librte_eal.so.ABI_VERSION to check for shared lib, since it exists on any linux distributions. See Fedora Packaging Guidelines for more informations: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_devel_packages Fixes: 06c7871dde01 ("eal: restrict default plugin path to shared lib mode") Cc: bruce.richard...@intel.com Cc: sta...@dpdk.org Signed-off-by: Timothy Redaelli --- lib/librte_eal/common/eal_common_options.c | 3 ++- lib/librte_eal/common/meson.build | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index fc6f0cea93..e6f77ad217 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -503,7 +503,8 @@ eal_plugins_init(void) * (Using dlopen with NOLOAD flag on EAL, will return NULL if the EAL * shared library is not already loaded i.e. it's statically linked.) */ - if (dlopen("librte_eal.so", RTLD_LAZY | RTLD_NOLOAD) != NULL && + if (dlopen("librte_eal.so."ABI_VERSION, RTLD_LAZY | RTLD_NOLOAD) + != NULL && *default_solib_dir != '\0' && stat(default_solib_dir, &sb) == 0 && S_ISDIR(sb.st_mode)) diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build index 9f32262450..39abf7a0a4 100644 --- a/lib/librte_eal/common/meson.build +++ b/lib/librte_eal/common/meson.build @@ -3,6 +3,8 @@ includes += include_directories('.') +cflags += [ '-DABI_VERSION="@0@"'.format(abi_version) ] + if is_windows sources += files( 'eal_common_bus.c', -- 2.28.0
[dpdk-dev] [PATCH 2/2] eal: fix loading of shared libs from driver plugin directories
Commit 49b536fc3060 ("eal: load only shared libs from driver plugin directories") introduced a check that any shared library must ends with .so, but it can't work, at least, on Fedora/CentOS/RHEL since .so symlinks are not installed when you install dpdk package, but only when you install dpdk-devel package. This commit adds also a check for .so.ABI_VERSION to check for shared lib. See Fedora Packaging Guidelines for more informations: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_devel_packages Fixes: 49b536fc3060 ("eal: load only shared libs from driver plugin directories") Cc: bruce.richard...@intel.com Signed-off-by: Timothy Redaelli --- lib/librte_eal/common/eal_common_options.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index e6f77ad217..e9e2362c53 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -402,8 +402,10 @@ eal_plugindir_init(const char *path) struct stat sb; int nlen = strnlen(dent->d_name, sizeof(dent->d_name)); - /* check if name ends in .so */ - if (strcmp(&dent->d_name[nlen - 3], ".so") != 0) + /* check if name ends in .so or .so.ABI_VERSION */ + if (strcmp(&dent->d_name[nlen - 3], ".so") != 0 && + strcmp(&dent->d_name[nlen - 4 - strlen(ABI_VERSION)], + ".so."ABI_VERSION) != 0) continue; snprintf(sopath, sizeof(sopath), "%s/%s", path, dent->d_name); -- 2.28.0