DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 00/11] additions to pmdinfogen
@ 2016-07-07 15:36 Thomas Monjalon
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 01/11] drivers: fix build with new register macro Thomas Monjalon
                   ` (11 more replies)
  0 siblings, 12 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-07 15:36 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

These are the patches that I think needed for RC2.
There are other patches needed as discussed on the mailing-list which
are not part of this series:
  - overwritten driver name (reported by Pablo)
  - pmdinfo.py on FreeBSD (reported by Bruce)

Thomas Monjalon (11):
  drivers: fix build with new register macro
  crypto: fix parameters registration
  mk: fix build dependency of drivers on pmdinfogen
  mk: remove traces of hostapp build directory
  mk: fix driver build with installed SDK
  mk: fix verbose pmdinfogen run
  pmdinfogen: fix build warnings
  pmdinfogen: fix usage message
  eal: move PCI table macro
  doc: fix syntax in pmdinfogen guide
  maintainers: add section for pmdinfo

 MAINTAINERS                                    |  4 ++
 buildtools/pmdinfogen/Makefile                 |  4 +-
 buildtools/pmdinfogen/pmdinfogen.c             | 60 ++++++++------------------
 doc/guides/freebsd_gsg/build_dpdk.rst          |  2 +-
 doc/guides/linux_gsg/build_dpdk.rst            |  2 +-
 doc/guides/prog_guide/dev_kit_build_system.rst |  5 +--
 drivers/Makefile                               |  2 -
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c     |  4 +-
 drivers/crypto/null/null_crypto_pmd.c          |  2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd.c         |  2 +-
 drivers/net/mlx4/mlx4.c                        |  2 +-
 drivers/net/mlx5/mlx5.c                        |  2 +-
 lib/librte_eal/common/include/rte_dev.h        |  6 +--
 lib/librte_eal/common/include/rte_pci.h        |  5 +++
 mk/internal/rte.compile-pre.mk                 | 26 ++++++-----
 mk/rte.sdkbuild.mk                             |  6 +--
 mk/rte.sdkconfig.mk                            |  2 +-
 mk/rte.sdkinstall.mk                           |  8 ++--
 18 files changed, 61 insertions(+), 83 deletions(-)

-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH 01/11] drivers: fix build with new register macro
  2016-07-07 15:36 [dpdk-dev] [PATCH 00/11] additions to pmdinfogen Thomas Monjalon
@ 2016-07-07 15:36 ` Thomas Monjalon
  2016-07-07 15:50   ` Neil Horman
  2016-07-07 16:20   ` Adrien Mazarguil
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 02/11] crypto: fix parameters registration Thomas Monjalon
                   ` (10 subsequent siblings)
  11 siblings, 2 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-07 15:36 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

Compilation fails because of some typos.

Fixes: cb6696d22023 ("drivers: update registration macro usage")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 2 +-
 drivers/net/mlx4/mlx4.c                    | 2 +-
 drivers/net/mlx5/mlx5.c                    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index db3e562..859a04b 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -721,6 +721,6 @@ static struct rte_driver cryptodev_aesni_mb_pmd_drv = {
 	.uninit = cryptodev_aesni_mb_uninit
 };
 
-PMD_REGISTER_DRIVER(cryptodev_aesni_mb_pmd_drvi, aesni_mb);
+PMD_REGISTER_DRIVER(cryptodev_aesni_mb_pmd_drv, aesni_mb);
 DRIVER_REGISTER_PARAM_STRING(aesni_gcm, "max_nb_queue_pairs=<int> "
 "max_nb_sessions=<int> socket_id=<int>");
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 8758eac..d9ffb13 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -5861,5 +5861,5 @@ static struct rte_driver rte_mlx4_driver = {
 	.init = rte_mlx4_pmd_init,
 };
 
-PMD_REGISTER_DRIVER(rte_mlx4_driveri, mlx4)
+PMD_REGISTER_DRIVER(rte_mlx4_driver, mlx4);
 DRIVER_REGISTER_PCI_TABLE(mlx4, mlx4_pci_id_map);
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 358e9b4..8d32252 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -762,5 +762,5 @@ static struct rte_driver rte_mlx5_driver = {
 	.init = rte_mlx5_pmd_init,
 };
 
-PMD_REGISTER_DRIVER(rte_mlx5_driveri, mlx5)
+PMD_REGISTER_DRIVER(rte_mlx5_driver, mlx5);
 DRIVER_REGISTER_PCI_TABLE(mlx5, mlx5_pci_id_map);
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH 02/11] crypto: fix parameters registration
  2016-07-07 15:36 [dpdk-dev] [PATCH 00/11] additions to pmdinfogen Thomas Monjalon
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 01/11] drivers: fix build with new register macro Thomas Monjalon
@ 2016-07-07 15:36 ` Thomas Monjalon
  2016-07-07 15:53   ` Neil Horman
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 03/11] mk: fix build dependency of drivers on pmdinfogen Thomas Monjalon
                   ` (9 subsequent siblings)
  11 siblings, 1 reply; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-07 15:36 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

The name aesni_gcm was used to register parameters of several
crypto drivers.

Fixes: cb6696d22023 ("drivers: update registration macro usage")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 2 +-
 drivers/crypto/null/null_crypto_pmd.c      | 2 +-
 drivers/crypto/snow3g/rte_snow3g_pmd.c     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 859a04b..e3dea54 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -722,5 +722,5 @@ static struct rte_driver cryptodev_aesni_mb_pmd_drv = {
 };
 
 PMD_REGISTER_DRIVER(cryptodev_aesni_mb_pmd_drv, aesni_mb);
-DRIVER_REGISTER_PARAM_STRING(aesni_gcm, "max_nb_queue_pairs=<int> "
+DRIVER_REGISTER_PARAM_STRING(aesni_mb, "max_nb_queue_pairs=<int> "
 "max_nb_sessions=<int> socket_id=<int>");
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index 0a195ed..7df88a3 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -276,5 +276,5 @@ static struct rte_driver cryptodev_null_pmd_drv = {
 };
 
 PMD_REGISTER_DRIVER(cryptodev_null_pmd_drv, cryptodev_null_pmd);
-DRIVER_REGISTER_PARAM_STRING(aesni_gcm, "max_nb_queue_pairs=<int> "
+DRIVER_REGISTER_PARAM_STRING(cryptodev_null_pmd, "max_nb_queue_pairs=<int> "
 "max_nb_sessions=<int> socket_id=<int>");
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index ddb724c..465d020 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -646,5 +646,5 @@ static struct rte_driver cryptodev_snow3g_pmd_drv = {
 };
 
 PMD_REGISTER_DRIVER(cryptodev_snow3g_pmd_drv, snow3g);
-DRIVER_REGISTER_PARAM_STRING(aesni_gcm, "max_nb_queue_pairs=<int> "
+DRIVER_REGISTER_PARAM_STRING(snow3g, "max_nb_queue_pairs=<int> "
 "max_nb_sessions=<int> socket_id=<int>");
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH 03/11] mk: fix build dependency of drivers on pmdinfogen
  2016-07-07 15:36 [dpdk-dev] [PATCH 00/11] additions to pmdinfogen Thomas Monjalon
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 01/11] drivers: fix build with new register macro Thomas Monjalon
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 02/11] crypto: fix parameters registration Thomas Monjalon
@ 2016-07-07 15:36 ` Thomas Monjalon
  2016-07-07 15:56   ` Neil Horman
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 04/11] mk: remove traces of hostapp build directory Thomas Monjalon
                   ` (8 subsequent siblings)
  11 siblings, 1 reply; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-07 15:36 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

When compiling the drivers, some code is generated with pmdinfogen.
A fresh parallel build can fail if a driver is compiled before pmdinfogen:
	build/buildtools/dpdk-pmdinfogen: Permission denied

There was a dependency declared in drivers/Makefile but it cannot work
because this file is based on mk/rte.subdir.mk which do not handle
dependencies.

It is fixed by declaring the whole buildtools as (order only) prerequisite
of drivers.

Fixes: cb6696d22023 ("drivers: update registration macro usage")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 drivers/Makefile   | 2 --
 mk/rte.sdkbuild.mk | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 75a3168..81c03a8 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -34,6 +34,4 @@ include $(RTE_SDK)/mk/rte.vars.mk
 DIRS-y += net
 DIRS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += crypto
 
-DEPDIRS-y += buildtools/pmdinfo
-
 include $(RTE_SDK)/mk/rte.subdir.mk
diff --git a/mk/rte.sdkbuild.mk b/mk/rte.sdkbuild.mk
index fb68af2..354f006 100644
--- a/mk/rte.sdkbuild.mk
+++ b/mk/rte.sdkbuild.mk
@@ -49,6 +49,7 @@ $(1): $(sort $(LOCAL_DEPDIRS-$(1)))
 endef
 
 $(foreach d,$(ROOTDIRS-y),$(eval $(call depdirs_rule,$(d))))
+drivers: | buildtools
 
 #
 # build and clean targets
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH 04/11] mk: remove traces of hostapp build directory
  2016-07-07 15:36 [dpdk-dev] [PATCH 00/11] additions to pmdinfogen Thomas Monjalon
                   ` (2 preceding siblings ...)
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 03/11] mk: fix build dependency of drivers on pmdinfogen Thomas Monjalon
@ 2016-07-07 15:36 ` Thomas Monjalon
  2016-07-07 16:02   ` Neil Horman
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 05/11] mk: fix driver build with installed SDK Thomas Monjalon
                   ` (7 subsequent siblings)
  11 siblings, 1 reply; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-07 15:36 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

The recipe rte.hostapp.mk does not build in hostapp/ anymore.

Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 doc/guides/freebsd_gsg/build_dpdk.rst | 2 +-
 doc/guides/linux_gsg/build_dpdk.rst   | 2 +-
 mk/rte.sdkbuild.mk                    | 5 ++---
 mk/rte.sdkconfig.mk                   | 2 +-
 4 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/doc/guides/freebsd_gsg/build_dpdk.rst b/doc/guides/freebsd_gsg/build_dpdk.rst
index 1d92c08..93c4366 100644
--- a/doc/guides/freebsd_gsg/build_dpdk.rst
+++ b/doc/guides/freebsd_gsg/build_dpdk.rst
@@ -183,7 +183,7 @@ contains the kernel modules to install:
 
     ls x86_64-native-bsdapp-gcc
 
-    app build hostapp include kmod lib Makefile
+    app build include kmod lib Makefile
 
 
 .. _loading_contigmem:
diff --git a/doc/guides/linux_gsg/build_dpdk.rst b/doc/guides/linux_gsg/build_dpdk.rst
index 198c0b6..fb2c481 100644
--- a/doc/guides/linux_gsg/build_dpdk.rst
+++ b/doc/guides/linux_gsg/build_dpdk.rst
@@ -152,7 +152,7 @@ A kmod  directory is also present that contains kernel modules which may be load
 
     ls x86_64-native-linuxapp-gcc
 
-    app build hostapp include kmod lib Makefile
+    app build include kmod lib Makefile
 
 Loading Modules to Enable Userspace IO for DPDK
 -----------------------------------------------
diff --git a/mk/rte.sdkbuild.mk b/mk/rte.sdkbuild.mk
index 354f006..23fcf1e 100644
--- a/mk/rte.sdkbuild.mk
+++ b/mk/rte.sdkbuild.mk
@@ -64,9 +64,8 @@ build: $(ROOTDIRS-y)
 .PHONY: clean
 clean: $(CLEANDIRS)
 	@rm -rf $(RTE_OUTPUT)/include $(RTE_OUTPUT)/app \
-		$(RTE_OUTPUT)/hostapp $(RTE_OUTPUT)/lib \
-		$(RTE_OUTPUT)/hostlib $(RTE_OUTPUT)/kmod \
-		$(RTE_OUTPUT)/buildtools
+		$(RTE_OUTPUT)/lib \
+		$(RTE_OUTPUT)/hostlib $(RTE_OUTPUT)/kmod
 	@[ -d $(RTE_OUTPUT)/include ] || mkdir -p $(RTE_OUTPUT)/include
 	@$(RTE_SDK)/scripts/gen-config-h.sh $(RTE_OUTPUT)/.config \
 		> $(RTE_OUTPUT)/include/rte_config.h
diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk
index a3acfe6..068d787 100644
--- a/mk/rte.sdkconfig.mk
+++ b/mk/rte.sdkconfig.mk
@@ -108,7 +108,7 @@ $(RTE_OUTPUT)/Makefile: | $(RTE_OUTPUT)
 # if NODOTCONF variable is defined, don't try to rebuild .config
 $(RTE_OUTPUT)/include/rte_config.h: $(RTE_OUTPUT)/.config
 	$(Q)rm -rf $(RTE_OUTPUT)/include $(RTE_OUTPUT)/app \
-		$(RTE_OUTPUT)/hostapp $(RTE_OUTPUT)/lib \
+		$(RTE_OUTPUT)/lib \
 		$(RTE_OUTPUT)/hostlib $(RTE_OUTPUT)/kmod $(RTE_OUTPUT)/build
 	$(Q)mkdir -p $(RTE_OUTPUT)/include
 	$(Q)$(RTE_SDK)/scripts/gen-config-h.sh $(RTE_OUTPUT)/.config \
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH 05/11] mk: fix driver build with installed SDK
  2016-07-07 15:36 [dpdk-dev] [PATCH 00/11] additions to pmdinfogen Thomas Monjalon
                   ` (3 preceding siblings ...)
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 04/11] mk: remove traces of hostapp build directory Thomas Monjalon
@ 2016-07-07 15:36 ` Thomas Monjalon
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 06/11] mk: fix verbose pmdinfogen run Thomas Monjalon
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-07 15:36 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

The tool pmdinfogen was called from RTE_OUTPUT/app/ which does not exist
if building a driver outside of the SDK build.
When building DPDK, RTE_SDK_BIN is RTE_OUTPUT. When building an external
driver, RTE_SDK_BIN must point to the installed DPDK directory containing
includes, libs, etc.

That's why pmdinfogen must be installed in the SDK directory and be part
of the SDK installation.

Fixes: 3d781ca32874 ("mk: do post processing on objects that register a driver")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 mk/internal/rte.compile-pre.mk | 2 +-
 mk/rte.sdkinstall.mk           | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/mk/internal/rte.compile-pre.mk b/mk/internal/rte.compile-pre.mk
index 5632d6e..87d2d93 100644
--- a/mk/internal/rte.compile-pre.mk
+++ b/mk/internal/rte.compile-pre.mk
@@ -92,7 +92,7 @@ C_TO_O_DO = @set -e; \
 	if [ \$$? -eq 0 ]; then \
 		echo \"  PMDINFOGEN\" $@; \
 		OBJF=`readlink -f $@`; \
-		${RTE_OUTPUT}/app/pmdinfogen \$$OBJF \$$OBJF.pmd.c; \
+		$(RTE_SDK_BIN)/app/pmdinfogen \$$OBJF \$$OBJF.pmd.c; \
 		if [ \$$? -eq 0 ]; \
 		then \
 			echo \"  PMDINFOBUILD\" $@; \
diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk
index b0d985c..7cd352c 100644
--- a/mk/rte.sdkinstall.mk
+++ b/mk/rte.sdkinstall.mk
@@ -117,6 +117,7 @@ install-runtime:
 	$(Q)cp -a    $O/lib/* $(DESTDIR)$(libdir)
 	$(Q)$(call rte_mkdir, $(DESTDIR)$(bindir))
 	$(Q)tar -cf -      -C $O --exclude 'app/*.map' \
+		--exclude app/pmdinfogen \
 		--exclude 'app/cmdline*' --exclude app/test \
 		--exclude app/testacl --exclude app/testpipeline app | \
 	    tar -xf -      -C $(DESTDIR)$(bindir) --strip-components=1 \
@@ -126,10 +127,8 @@ install-runtime:
 	$(Q)$(call rte_mkdir,      $(DESTDIR)$(sbindir))
 	$(Q)$(call rte_symlink,    $(DESTDIR)$(datadir)/tools/dpdk_nic_bind.py, \
 	                           $(DESTDIR)$(sbindir)/dpdk_nic_bind)
-	$(Q)$(call rte_symlink,    $(DESTDIR)$(bindir)/pmdinfogen, \
-				   $(DESTDIR)$(bindir)/dpdk_pmdinfogen)
 	$(Q)$(call rte_symlink,    $(DESTDIR)$(datadir)/tools/pmdinfo.py, \
-				   $(DESTDIR)$(bindir)/dpdk_pmdinfo)
+	                           $(DESTDIR)$(bindir)/dpdk_pmdinfo)
 
 install-kmod:
 ifneq ($(wildcard $O/kmod/*),)
@@ -145,8 +144,9 @@ install-sdk:
 	$(Q)$(call rte_mkdir,                            $(DESTDIR)$(sdkdir))
 	$(Q)cp -a               $(RTE_SDK)/mk            $(DESTDIR)$(sdkdir)
 	$(Q)cp -a               $(RTE_SDK)/scripts       $(DESTDIR)$(sdkdir)
-	$(Q)$(call rte_mkdir,                            $(DESTDIR)$(targetdir))
+	$(Q)$(call rte_mkdir,                            $(DESTDIR)$(targetdir)/app)
 	$(Q)cp -a               $O/.config               $(DESTDIR)$(targetdir)
+	$(Q)cp -a               $O/app/pmdinfogen        $(DESTDIR)$(targetdir)/app
 	$(Q)$(call rte_symlink, $(DESTDIR)$(includedir), $(DESTDIR)$(targetdir)/include)
 	$(Q)$(call rte_symlink, $(DESTDIR)$(libdir),     $(DESTDIR)$(targetdir)/lib)
 
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH 06/11] mk: fix verbose pmdinfogen run
  2016-07-07 15:36 [dpdk-dev] [PATCH 00/11] additions to pmdinfogen Thomas Monjalon
                   ` (4 preceding siblings ...)
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 05/11] mk: fix driver build with installed SDK Thomas Monjalon
@ 2016-07-07 15:36 ` Thomas Monjalon
  2016-07-07 16:04   ` Neil Horman
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 07/11] pmdinfogen: fix build warnings Thomas Monjalon
                   ` (5 subsequent siblings)
  11 siblings, 1 reply; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-07 15:36 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

When building with "make V=1" it is expected to see the output of each
compiler command in order to debug them.
Unfortunately the pmdinfogen related commands were always quiet.

It is fixed by defining the commands in some Makefile variables.
They are printed if the verbose mode is enabled.

The other benefit of this rework is to stop compilation after a
failure with pmdinfogen.

The command readlink is removed in this rework because it seems useless.

Fixes: 3d781ca32874 ("mk: do post processing on objects that register a driver")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 mk/internal/rte.compile-pre.mk | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/mk/internal/rte.compile-pre.mk b/mk/internal/rte.compile-pre.mk
index 87d2d93..9c25ff6 100644
--- a/mk/internal/rte.compile-pre.mk
+++ b/mk/internal/rte.compile-pre.mk
@@ -84,28 +84,26 @@ C_TO_O = $(CC) -Wp,-MD,$(call obj2dep,$(@)).tmp $(CFLAGS) \
 C_TO_O_STR = $(subst ','\'',$(C_TO_O)) #'# fix syntax highlight
 C_TO_O_DISP = $(if $(V),"$(C_TO_O_STR)","  CC $(@)")
 endif
+PMDINFO_GEN = $(RTE_SDK_BIN)/app/pmdinfogen $@ $@.pmd.c
+PMDINFO_CC = $(CC) $(CFLAGS) -c -o $@.pmd.o $@.pmd.c
+PMDINFO_LD = $(CROSS)ld $(LDFLAGS) -r -o $@.o $@.pmd.o $@
+PMDINFO_TO_O = if grep -q 'PMD_REGISTER_DRIVER(.*)' $<; then \
+	echo "$(if $V,$(PMDINFO_GEN),  PMDINFO $@.pmd.c)" && \
+	$(PMDINFO_GEN) && \
+	echo "$(if $V,$(PMDINFO_CC),  CC $@.pmd.o)" && \
+	$(PMDINFO_CC) && \
+	echo "$(if $V,$(PMDINFO_LD),  LD $@)" && \
+	$(PMDINFO_LD) && \
+	mv -f $@.o $@; fi
 C_TO_O_CMD = 'cmd_$@ = $(C_TO_O_STR)'
 C_TO_O_DO = @set -e; \
 	echo $(C_TO_O_DISP); \
 	$(C_TO_O) && \
-	sh -c "grep -q \"PMD_REGISTER_DRIVER(.*)\" $<; \
-	if [ \$$? -eq 0 ]; then \
-		echo \"  PMDINFOGEN\" $@; \
-		OBJF=`readlink -f $@`; \
-		$(RTE_SDK_BIN)/app/pmdinfogen \$$OBJF \$$OBJF.pmd.c; \
-		if [ \$$? -eq 0 ]; \
-		then \
-			echo \"  PMDINFOBUILD\" $@; \
-			$(CC) $(CFLAGS) -c -o \$$OBJF.pmd.o \$$OBJF.pmd.c; \
-			$(CROSS)ld $(LDFLAGS) -r -o \$$OBJF.o \$$OBJF.pmd.o \$$OBJF; \
-			mv -f \$$OBJF.o \$$OBJF; \
-		fi; \
-	fi;" && \
+	$(PMDINFO_TO_O) && \
 	echo $(C_TO_O_CMD) > $(call obj2cmd,$(@)) && \
 	sed 's,'$@':,dep_'$@' =,' $(call obj2dep,$(@)).tmp > $(call obj2dep,$(@)) && \
 	rm -f $(call obj2dep,$(@)).tmp
 
-
 # return an empty string if string are equal
 compare = $(strip $(subst $(1),,$(2)) $(subst $(2),,$(1)))
 
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH 07/11] pmdinfogen: fix build warnings
  2016-07-07 15:36 [dpdk-dev] [PATCH 00/11] additions to pmdinfogen Thomas Monjalon
                   ` (5 preceding siblings ...)
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 06/11] mk: fix verbose pmdinfogen run Thomas Monjalon
@ 2016-07-07 15:36 ` Thomas Monjalon
  2016-07-07 17:55   ` Neil Horman
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 08/11] pmdinfogen: fix usage message Thomas Monjalon
                   ` (4 subsequent siblings)
  11 siblings, 1 reply; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-07 15:36 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

When compiled with a standard clang, pmdinfogen can raise a warning:
    buildtools/pmdinfogen/pmdinfogen.c:365:1: warning:
    control reaches end of non-void function

Actually there can be more warnings with stricter compilers.
In order to catch them early and fix most of them, the DPDK standard flags
WERROR_FLAGS are used.

The warnings fixed are:
    no previous prototype for ...
    no return statement in function returning non-void
    variable ‘secstrings’ set but not used
    ‘sec_name’ defined but not used
    ‘get_symbol_index’ defined but not used
    pointer of type ‘void *’ used in arithmetic

Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 buildtools/pmdinfogen/Makefile     |  4 +--
 buildtools/pmdinfogen/pmdinfogen.c | 58 ++++++++++++--------------------------
 2 files changed, 20 insertions(+), 42 deletions(-)

diff --git a/buildtools/pmdinfogen/Makefile b/buildtools/pmdinfogen/Makefile
index 125901b..3885d3b 100644
--- a/buildtools/pmdinfogen/Makefile
+++ b/buildtools/pmdinfogen/Makefile
@@ -41,9 +41,9 @@ HOSTAPP = pmdinfogen
 #
 SRCS-y += pmdinfogen.c
 
-HOST_EXTRA_CFLAGS += -g -I${RTE_OUTPUT}/include
+HOST_CFLAGS += $(WERROR_FLAGS) -g
+HOST_CFLAGS += -I$(RTE_OUTPUT)/include
 
 DEPDIRS-y += lib/librte_eal
 
 include $(RTE_SDK)/mk/rte.hostapp.mk
-
diff --git a/buildtools/pmdinfogen/pmdinfogen.c b/buildtools/pmdinfogen/pmdinfogen.c
index 0947dc6..beb06f1 100644
--- a/buildtools/pmdinfogen/pmdinfogen.c
+++ b/buildtools/pmdinfogen/pmdinfogen.c
@@ -15,6 +15,7 @@
 #include <limits.h>
 #include <stdbool.h>
 #include <errno.h>
+#include <rte_common.h>
 #include "pmdinfogen.h"
 
 #ifdef RTE_ARCH_64
@@ -32,7 +33,7 @@ static const char *sym_name(struct elf_info *elf, Elf_Sym *sym)
 		return "(unknown)";
 }
 
-void *grab_file(const char *filename, unsigned long *size)
+static void *grab_file(const char *filename, unsigned long *size)
 {
 	struct stat st;
 	void *map = MAP_FAILED;
@@ -59,7 +60,7 @@ failed:
   * spaces in the beginning of the line is trimmed away.
   * Return a pointer to a static buffer.
   **/
-void release_file(void *file, unsigned long size)
+static void release_file(void *file, unsigned long size)
 {
 	munmap(file, size);
 }
@@ -67,9 +68,8 @@ void release_file(void *file, unsigned long size)
 
 static void *get_sym_value(struct elf_info *info, const Elf_Sym *sym)
 {
-	void *ptr = (void *)info->hdr + info->sechdrs[sym->st_shndx].sh_offset;
-
-	return (void *)(ptr + sym->st_value);
+	return RTE_PTR_ADD(info->hdr,
+		info->sechdrs[sym->st_shndx].sh_offset + sym->st_value);
 }
 
 static Elf_Sym *find_sym_in_symtab(struct elf_info *info,
@@ -95,7 +95,6 @@ static int parse_elf(struct elf_info *info, const char *filename)
 	Elf_Ehdr *hdr;
 	Elf_Shdr *sechdrs;
 	Elf_Sym  *sym;
-	const char *secstrings;
 	int endian;
 	unsigned int symtab_idx = ~0U, symtab_shndx_idx = ~0U;
 
@@ -140,7 +139,7 @@ static int parse_elf(struct elf_info *info, const char *filename)
 	hdr->e_shnum     = TO_NATIVE(endian, 16, hdr->e_shnum);
 	hdr->e_shstrndx  = TO_NATIVE(endian, 16, hdr->e_shstrndx);
 
-	sechdrs = (void *)hdr + hdr->e_shoff;
+	sechdrs = RTE_PTR_ADD(hdr, hdr->e_shoff);
 	info->sechdrs = sechdrs;
 
 	/* Check if file offset is correct */
@@ -191,7 +190,6 @@ static int parse_elf(struct elf_info *info, const char *filename)
 			TO_NATIVE(endian, ADDR_SIZE, sechdrs[i].sh_entsize);
 	}
 	/* Find symbol table. */
-	secstrings = (void *)hdr + sechdrs[info->secindex_strings].sh_offset;
 	for (i = 1; i < info->num_sections; i++) {
 		int nobits = sechdrs[i].sh_type == SHT_NOBITS;
 
@@ -206,22 +204,22 @@ static int parse_elf(struct elf_info *info, const char *filename)
 		if (sechdrs[i].sh_type == SHT_SYMTAB) {
 			unsigned int sh_link_idx;
 			symtab_idx = i;
-			info->symtab_start = (void *)hdr +
-			    sechdrs[i].sh_offset;
-			info->symtab_stop  = (void *)hdr +
-			    sechdrs[i].sh_offset + sechdrs[i].sh_size;
+			info->symtab_start = RTE_PTR_ADD(hdr,
+				sechdrs[i].sh_offset);
+			info->symtab_stop  = RTE_PTR_ADD(hdr,
+				sechdrs[i].sh_offset + sechdrs[i].sh_size);
 			sh_link_idx = sechdrs[i].sh_link;
-			info->strtab       = (void *)hdr +
-			    sechdrs[sh_link_idx].sh_offset;
+			info->strtab       = RTE_PTR_ADD(hdr,
+				sechdrs[sh_link_idx].sh_offset);
 		}
 
 		/* 32bit section no. table? ("more than 64k sections") */
 		if (sechdrs[i].sh_type == SHT_SYMTAB_SHNDX) {
 			symtab_shndx_idx = i;
-			info->symtab_shndx_start = (void *)hdr +
-			    sechdrs[i].sh_offset;
-			info->symtab_shndx_stop  = (void *)hdr +
-			    sechdrs[i].sh_offset + sechdrs[i].sh_size;
+			info->symtab_shndx_start = RTE_PTR_ADD(hdr,
+				sechdrs[i].sh_offset);
+			info->symtab_shndx_stop  = RTE_PTR_ADD(hdr,
+				sechdrs[i].sh_offset + sechdrs[i].sh_size);
 		}
 	}
 	if (!info->symtab_start)
@@ -262,28 +260,6 @@ static void parse_elf_finish(struct elf_info *info)
 	}
 }
 
-static const char *sec_name(struct elf_info *elf, int secindex)
-{
-	Elf_Shdr *sechdrs = elf->sechdrs;
-	return (void *)elf->hdr +
-		elf->sechdrs[elf->secindex_strings].sh_offset +
-		sechdrs[secindex].sh_name;
-}
-
-static int get_symbol_index(struct elf_info *info, Elf_Sym *sym)
-{
-	const char *name =  sym_name(info, sym);
-	const char *idx;
-
-	idx = name;
-	while (idx) {
-		if (isdigit(*idx))
-			return atoi(idx);
-		idx++;
-	}
-	return -1;
-}
-
 struct opt_tag {
 	const char *suffix;
 	const char *json_id;
@@ -362,6 +338,8 @@ static int locate_pmd_entries(struct elf_info *info)
 			}
 		}
 	} while (last);
+
+	return 0;
 }
 
 static void output_pmd_info_string(struct elf_info *info, char *outfile)
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH 08/11] pmdinfogen: fix usage message
  2016-07-07 15:36 [dpdk-dev] [PATCH 00/11] additions to pmdinfogen Thomas Monjalon
                   ` (6 preceding siblings ...)
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 07/11] pmdinfogen: fix build warnings Thomas Monjalon
@ 2016-07-07 15:36 ` Thomas Monjalon
  2016-07-07 16:05   ` Neil Horman
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 09/11] eal: move PCI table macro Thomas Monjalon
                   ` (3 subsequent siblings)
  11 siblings, 1 reply; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-07 15:36 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

The name of the tool is pmdinfogen.

Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 buildtools/pmdinfogen/pmdinfogen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/buildtools/pmdinfogen/pmdinfogen.c b/buildtools/pmdinfogen/pmdinfogen.c
index beb06f1..1b7b931 100644
--- a/buildtools/pmdinfogen/pmdinfogen.c
+++ b/buildtools/pmdinfogen/pmdinfogen.c
@@ -398,7 +398,7 @@ int main(int argc, char **argv)
 
 	if (argc < 3) {
 		fprintf(stderr,
-			"usage: pmdinfo <object file> <c output file>\n");
+			"usage: pmdinfogen <object file> <c output file>\n");
 		exit(127);
 	}
 	parse_elf(&info, argv[1]);
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH 09/11] eal: move PCI table macro
  2016-07-07 15:36 [dpdk-dev] [PATCH 00/11] additions to pmdinfogen Thomas Monjalon
                   ` (7 preceding siblings ...)
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 08/11] pmdinfogen: fix usage message Thomas Monjalon
@ 2016-07-07 15:36 ` Thomas Monjalon
  2016-07-07 15:41   ` Thomas Monjalon
  2016-07-07 16:11   ` Neil Horman
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 10/11] doc: fix syntax in pmdinfogen guide Thomas Monjalon
                   ` (2 subsequent siblings)
  11 siblings, 2 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-07 15:36 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

Remove include of rte_pci.h in the generic header rte_dev.h
and move the macro DRIVER_REGISTER_PCI_TABLE in rte_pci.h.

Fixes: cb6696d22023 ("drivers: update registration macro usage")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 lib/librte_eal/common/include/rte_dev.h | 6 +-----
 lib/librte_eal/common/include/rte_pci.h | 5 +++++
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
index e6f0d4c..68ca7ef 100644
--- a/lib/librte_eal/common/include/rte_dev.h
+++ b/lib/librte_eal/common/include/rte_dev.h
@@ -48,7 +48,7 @@ extern "C" {
 
 #include <stdio.h>
 #include <sys/queue.h>
-#include <rte_pci.h>
+
 #include <rte_log.h>
 
 __attribute__((format(printf, 2, 0)))
@@ -195,10 +195,6 @@ DRIVER_EXPORT_NAME(nm, __COUNTER__)
 
 #define DRV_EXP_TAG(name, tag) __##name##_##tag
 
-#define DRIVER_REGISTER_PCI_TABLE(name, table) \
-static const char DRV_EXP_TAG(name, pci_tbl_export)[] __attribute__((used)) = \
-RTE_STR(table)
-
 #define DRIVER_REGISTER_PARAM_STRING(name, str) \
 static const char DRV_EXP_TAG(name, param_string_export)[] \
 __attribute__((used)) = str
diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h
index fa74962..3b0d26a 100644
--- a/lib/librte_eal/common/include/rte_pci.h
+++ b/lib/librte_eal/common/include/rte_pci.h
@@ -188,6 +188,11 @@ struct rte_pci_device {
 	.subsystem_device_id = PCI_ANY_ID
 #endif
 
+#define DRIVER_REGISTER_PCI_TABLE(name, table) \
+static const char __##name##_pci_tbl_export[] \
+	__attribute__((used)) = \
+	RTE_STR(table)
+
 struct rte_pci_driver;
 
 /**
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH 10/11] doc: fix syntax in pmdinfogen guide
  2016-07-07 15:36 [dpdk-dev] [PATCH 00/11] additions to pmdinfogen Thomas Monjalon
                   ` (8 preceding siblings ...)
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 09/11] eal: move PCI table macro Thomas Monjalon
@ 2016-07-07 15:36 ` Thomas Monjalon
  2016-07-07 15:42   ` Thomas Monjalon
  2016-07-07 16:12   ` Neil Horman
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 11/11] maintainers: add section for pmdinfo Thomas Monjalon
  2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 00/10] additions to pmdinfogen Thomas Monjalon
  11 siblings, 2 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-07 15:36 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

Sphynx reports this error:

doc/guides/prog_guide/dev_kit_build_system.rst:337: WARNING:
Pygments lexer name u'C' is not known

Fixes: 737ddf3fb ("doc: add prog guide section documenting pmdinfo script")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 doc/guides/prog_guide/dev_kit_build_system.rst | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/doc/guides/prog_guide/dev_kit_build_system.rst b/doc/guides/prog_guide/dev_kit_build_system.rst
index 1dc1388..18a3010 100644
--- a/doc/guides/prog_guide/dev_kit_build_system.rst
+++ b/doc/guides/prog_guide/dev_kit_build_system.rst
@@ -319,8 +319,7 @@ instance the macro:
 
 .. code-block:: c
 
-    PMD_REGISTER_DRIVER(drv, name)
-
+   PMD_REGISTER_DRIVER(drv, name)
 
 Creates the following symbol:
 
@@ -334,7 +333,7 @@ can be exported from the object file and used to produce a hardware support
 description, that pmdinfogen then encodes into a json formatted string in the
 following format:
 
-.. code-block:: C
+.. code-block:: c
 
    static char <name_pmd_string>="PMD_INFO_STRING=\"{'name' : '<name>', ...}\"";
 
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH 11/11] maintainers: add section for pmdinfo
  2016-07-07 15:36 [dpdk-dev] [PATCH 00/11] additions to pmdinfogen Thomas Monjalon
                   ` (9 preceding siblings ...)
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 10/11] doc: fix syntax in pmdinfogen guide Thomas Monjalon
@ 2016-07-07 15:36 ` Thomas Monjalon
  2016-07-07 15:45   ` Thomas Monjalon
  2016-07-07 16:14   ` Neil Horman
  2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 00/10] additions to pmdinfogen Thomas Monjalon
  11 siblings, 2 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-07 15:36 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

The author of this feature is Neil Horman.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 MAINTAINERS | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index a59191e..f996c2e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -68,6 +68,10 @@ F: lib/librte_compat/
 F: doc/guides/rel_notes/deprecation.rst
 F: scripts/validate-abi.sh
 
+Driver information
+F: buildtools/pmdinfogen/
+F: tools/pmdinfo.py
+
 
 Environment Abstraction Layer
 -----------------------------
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 09/11] eal: move PCI table macro
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 09/11] eal: move PCI table macro Thomas Monjalon
@ 2016-07-07 15:41   ` Thomas Monjalon
  2016-07-07 16:11   ` Neil Horman
  1 sibling, 0 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-07 15:41 UTC (permalink / raw)
  To: dev; +Cc: Neil Horman, david.marchand

2016-07-07 17:36, Thomas Monjalon:
> Remove include of rte_pci.h in the generic header rte_dev.h
> and move the macro DRIVER_REGISTER_PCI_TABLE in rte_pci.h.
> 
> Fixes: cb6696d22023 ("drivers: update registration macro usage")
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>

Suggested-by: David Marchand <david.marchand@6wind.com>

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 10/11] doc: fix syntax in pmdinfogen guide
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 10/11] doc: fix syntax in pmdinfogen guide Thomas Monjalon
@ 2016-07-07 15:42   ` Thomas Monjalon
  2016-07-07 16:12   ` Neil Horman
  1 sibling, 0 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-07 15:42 UTC (permalink / raw)
  To: dev; +Cc: Neil Horman, bernard.iremonger

2016-07-07 17:36, Thomas Monjalon:
> Sphynx reports this error:
> 
> doc/guides/prog_guide/dev_kit_build_system.rst:337: WARNING:
> Pygments lexer name u'C' is not known
> 
> Fixes: 737ddf3fb ("doc: add prog guide section documenting pmdinfo script")
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>

Reported-by: Bernard Iremonger <bernard.iremonger@intel.com>

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 11/11] maintainers: add section for pmdinfo
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 11/11] maintainers: add section for pmdinfo Thomas Monjalon
@ 2016-07-07 15:45   ` Thomas Monjalon
  2016-07-07 16:14     ` Neil Horman
  2016-07-07 16:14   ` Neil Horman
  1 sibling, 1 reply; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-07 15:45 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

Neil,

I would gladly drop this patch from the series if you send a similar one
with your name as maintainer.

Thanks


2016-07-07 17:36, Thomas Monjalon:
> The author of this feature is Neil Horman.
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
> +Driver information
> +F: buildtools/pmdinfogen/
> +F: tools/pmdinfo.py

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 01/11] drivers: fix build with new register macro
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 01/11] drivers: fix build with new register macro Thomas Monjalon
@ 2016-07-07 15:50   ` Neil Horman
  2016-07-07 16:20   ` Adrien Mazarguil
  1 sibling, 0 replies; 66+ messages in thread
From: Neil Horman @ 2016-07-07 15:50 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Thu, Jul 07, 2016 at 05:36:20PM +0200, Thomas Monjalon wrote:
> Compilation fails because of some typos.
> 
> Fixes: cb6696d22023 ("drivers: update registration macro usage")
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
>  drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 2 +-
>  drivers/net/mlx4/mlx4.c                    | 2 +-
>  drivers/net/mlx5/mlx5.c                    | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> index db3e562..859a04b 100644
> --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> @@ -721,6 +721,6 @@ static struct rte_driver cryptodev_aesni_mb_pmd_drv = {
>  	.uninit = cryptodev_aesni_mb_uninit
>  };
>  
> -PMD_REGISTER_DRIVER(cryptodev_aesni_mb_pmd_drvi, aesni_mb);
> +PMD_REGISTER_DRIVER(cryptodev_aesni_mb_pmd_drv, aesni_mb);
>  DRIVER_REGISTER_PARAM_STRING(aesni_gcm, "max_nb_queue_pairs=<int> "
>  "max_nb_sessions=<int> socket_id=<int>");
> diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
> index 8758eac..d9ffb13 100644
> --- a/drivers/net/mlx4/mlx4.c
> +++ b/drivers/net/mlx4/mlx4.c
> @@ -5861,5 +5861,5 @@ static struct rte_driver rte_mlx4_driver = {
>  	.init = rte_mlx4_pmd_init,
>  };
>  
> -PMD_REGISTER_DRIVER(rte_mlx4_driveri, mlx4)
> +PMD_REGISTER_DRIVER(rte_mlx4_driver, mlx4);
>  DRIVER_REGISTER_PCI_TABLE(mlx4, mlx4_pci_id_map);
> diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
> index 358e9b4..8d32252 100644
> --- a/drivers/net/mlx5/mlx5.c
> +++ b/drivers/net/mlx5/mlx5.c
> @@ -762,5 +762,5 @@ static struct rte_driver rte_mlx5_driver = {
>  	.init = rte_mlx5_pmd_init,
>  };
>  
> -PMD_REGISTER_DRIVER(rte_mlx5_driveri, mlx5)
> +PMD_REGISTER_DRIVER(rte_mlx5_driver, mlx5);
>  DRIVER_REGISTER_PCI_TABLE(mlx5, mlx5_pci_id_map);
> -- 
> 2.7.0
> 
> 
Acked-by: Neil Horman <nhorman@tuxdriver.com>

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 02/11] crypto: fix parameters registration
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 02/11] crypto: fix parameters registration Thomas Monjalon
@ 2016-07-07 15:53   ` Neil Horman
  0 siblings, 0 replies; 66+ messages in thread
From: Neil Horman @ 2016-07-07 15:53 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Thu, Jul 07, 2016 at 05:36:21PM +0200, Thomas Monjalon wrote:
> The name aesni_gcm was used to register parameters of several
> crypto drivers.
> 
> Fixes: cb6696d22023 ("drivers: update registration macro usage")
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
>  drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 2 +-
>  drivers/crypto/null/null_crypto_pmd.c      | 2 +-
>  drivers/crypto/snow3g/rte_snow3g_pmd.c     | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> index 859a04b..e3dea54 100644
> --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> @@ -722,5 +722,5 @@ static struct rte_driver cryptodev_aesni_mb_pmd_drv = {
>  };
>  
>  PMD_REGISTER_DRIVER(cryptodev_aesni_mb_pmd_drv, aesni_mb);
> -DRIVER_REGISTER_PARAM_STRING(aesni_gcm, "max_nb_queue_pairs=<int> "
> +DRIVER_REGISTER_PARAM_STRING(aesni_mb, "max_nb_queue_pairs=<int> "
>  "max_nb_sessions=<int> socket_id=<int>");
> diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
> index 0a195ed..7df88a3 100644
> --- a/drivers/crypto/null/null_crypto_pmd.c
> +++ b/drivers/crypto/null/null_crypto_pmd.c
> @@ -276,5 +276,5 @@ static struct rte_driver cryptodev_null_pmd_drv = {
>  };
>  
>  PMD_REGISTER_DRIVER(cryptodev_null_pmd_drv, cryptodev_null_pmd);
> -DRIVER_REGISTER_PARAM_STRING(aesni_gcm, "max_nb_queue_pairs=<int> "
> +DRIVER_REGISTER_PARAM_STRING(cryptodev_null_pmd, "max_nb_queue_pairs=<int> "
>  "max_nb_sessions=<int> socket_id=<int>");
> diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
> index ddb724c..465d020 100644
> --- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
> +++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
> @@ -646,5 +646,5 @@ static struct rte_driver cryptodev_snow3g_pmd_drv = {
>  };
>  
>  PMD_REGISTER_DRIVER(cryptodev_snow3g_pmd_drv, snow3g);
> -DRIVER_REGISTER_PARAM_STRING(aesni_gcm, "max_nb_queue_pairs=<int> "
> +DRIVER_REGISTER_PARAM_STRING(snow3g, "max_nb_queue_pairs=<int> "
>  "max_nb_sessions=<int> socket_id=<int>");
> -- 
> 2.7.0
> 
> 
This would be fine, but based on Lauras recent comments, this needs additional
fixing to work with the unit tests, I've posted a patch in response to her
report

Neil

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 03/11] mk: fix build dependency of drivers on pmdinfogen
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 03/11] mk: fix build dependency of drivers on pmdinfogen Thomas Monjalon
@ 2016-07-07 15:56   ` Neil Horman
  2016-07-07 16:21     ` Thomas Monjalon
  0 siblings, 1 reply; 66+ messages in thread
From: Neil Horman @ 2016-07-07 15:56 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Thu, Jul 07, 2016 at 05:36:22PM +0200, Thomas Monjalon wrote:
> When compiling the drivers, some code is generated with pmdinfogen.
> A fresh parallel build can fail if a driver is compiled before pmdinfogen:
> 	build/buildtools/dpdk-pmdinfogen: Permission denied
> 
> There was a dependency declared in drivers/Makefile but it cannot work
> because this file is based on mk/rte.subdir.mk which do not handle
> dependencies.
> 
> It is fixed by declaring the whole buildtools as (order only) prerequisite
> of drivers.
> 
> Fixes: cb6696d22023 ("drivers: update registration macro usage")
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
>  drivers/Makefile   | 2 --
>  mk/rte.sdkbuild.mk | 1 +
>  2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/Makefile b/drivers/Makefile
> index 75a3168..81c03a8 100644
> --- a/drivers/Makefile
> +++ b/drivers/Makefile
> @@ -34,6 +34,4 @@ include $(RTE_SDK)/mk/rte.vars.mk
>  DIRS-y += net
>  DIRS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += crypto
>  
> -DEPDIRS-y += buildtools/pmdinfo
> -
>  include $(RTE_SDK)/mk/rte.subdir.mk
> diff --git a/mk/rte.sdkbuild.mk b/mk/rte.sdkbuild.mk
> index fb68af2..354f006 100644
> --- a/mk/rte.sdkbuild.mk
> +++ b/mk/rte.sdkbuild.mk
> @@ -49,6 +49,7 @@ $(1): $(sort $(LOCAL_DEPDIRS-$(1)))
>  endef
>  
>  $(foreach d,$(ROOTDIRS-y),$(eval $(call depdirs_rule,$(d))))
> +drivers: | buildtools
>  
I'm not sure i understand the reasoning here, DEPDIRS is meant to declare
prerequisites to a directory (and its children) getting built, right?  A 
parallel make should block any drivers getting built prior to pmdinfogen getting
built.  What am I missing?

Neil

>  #
>  # build and clean targets
> -- 
> 2.7.0
> 
> 

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 04/11] mk: remove traces of hostapp build directory
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 04/11] mk: remove traces of hostapp build directory Thomas Monjalon
@ 2016-07-07 16:02   ` Neil Horman
  0 siblings, 0 replies; 66+ messages in thread
From: Neil Horman @ 2016-07-07 16:02 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Thu, Jul 07, 2016 at 05:36:23PM +0200, Thomas Monjalon wrote:
> The recipe rte.hostapp.mk does not build in hostapp/ anymore.
> 
> Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
>  doc/guides/freebsd_gsg/build_dpdk.rst | 2 +-
>  doc/guides/linux_gsg/build_dpdk.rst   | 2 +-
>  mk/rte.sdkbuild.mk                    | 5 ++---
>  mk/rte.sdkconfig.mk                   | 2 +-
>  4 files changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/doc/guides/freebsd_gsg/build_dpdk.rst b/doc/guides/freebsd_gsg/build_dpdk.rst
> index 1d92c08..93c4366 100644
> --- a/doc/guides/freebsd_gsg/build_dpdk.rst
> +++ b/doc/guides/freebsd_gsg/build_dpdk.rst
> @@ -183,7 +183,7 @@ contains the kernel modules to install:
>  
>      ls x86_64-native-bsdapp-gcc
>  
> -    app build hostapp include kmod lib Makefile
> +    app build include kmod lib Makefile
>  
>  
>  .. _loading_contigmem:
> diff --git a/doc/guides/linux_gsg/build_dpdk.rst b/doc/guides/linux_gsg/build_dpdk.rst
> index 198c0b6..fb2c481 100644
> --- a/doc/guides/linux_gsg/build_dpdk.rst
> +++ b/doc/guides/linux_gsg/build_dpdk.rst
> @@ -152,7 +152,7 @@ A kmod  directory is also present that contains kernel modules which may be load
>  
>      ls x86_64-native-linuxapp-gcc
>  
> -    app build hostapp include kmod lib Makefile
> +    app build include kmod lib Makefile
>  
>  Loading Modules to Enable Userspace IO for DPDK
>  -----------------------------------------------
> diff --git a/mk/rte.sdkbuild.mk b/mk/rte.sdkbuild.mk
> index 354f006..23fcf1e 100644
> --- a/mk/rte.sdkbuild.mk
> +++ b/mk/rte.sdkbuild.mk
> @@ -64,9 +64,8 @@ build: $(ROOTDIRS-y)
>  .PHONY: clean
>  clean: $(CLEANDIRS)
>  	@rm -rf $(RTE_OUTPUT)/include $(RTE_OUTPUT)/app \
> -		$(RTE_OUTPUT)/hostapp $(RTE_OUTPUT)/lib \
> -		$(RTE_OUTPUT)/hostlib $(RTE_OUTPUT)/kmod \
> -		$(RTE_OUTPUT)/buildtools
> +		$(RTE_OUTPUT)/lib \
> +		$(RTE_OUTPUT)/hostlib $(RTE_OUTPUT)/kmod
>  	@[ -d $(RTE_OUTPUT)/include ] || mkdir -p $(RTE_OUTPUT)/include
>  	@$(RTE_SDK)/scripts/gen-config-h.sh $(RTE_OUTPUT)/.config \
>  		> $(RTE_OUTPUT)/include/rte_config.h
> diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk
> index a3acfe6..068d787 100644
> --- a/mk/rte.sdkconfig.mk
> +++ b/mk/rte.sdkconfig.mk
> @@ -108,7 +108,7 @@ $(RTE_OUTPUT)/Makefile: | $(RTE_OUTPUT)
>  # if NODOTCONF variable is defined, don't try to rebuild .config
>  $(RTE_OUTPUT)/include/rte_config.h: $(RTE_OUTPUT)/.config
>  	$(Q)rm -rf $(RTE_OUTPUT)/include $(RTE_OUTPUT)/app \
> -		$(RTE_OUTPUT)/hostapp $(RTE_OUTPUT)/lib \
> +		$(RTE_OUTPUT)/lib \
>  		$(RTE_OUTPUT)/hostlib $(RTE_OUTPUT)/kmod $(RTE_OUTPUT)/build
>  	$(Q)mkdir -p $(RTE_OUTPUT)/include
>  	$(Q)$(RTE_SDK)/scripts/gen-config-h.sh $(RTE_OUTPUT)/.config \
> -- 
> 2.7.0
> 
> 

Acked-by: Neil Horman <nhorman@tuxdriver.com>

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 06/11] mk: fix verbose pmdinfogen run
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 06/11] mk: fix verbose pmdinfogen run Thomas Monjalon
@ 2016-07-07 16:04   ` Neil Horman
  0 siblings, 0 replies; 66+ messages in thread
From: Neil Horman @ 2016-07-07 16:04 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Thu, Jul 07, 2016 at 05:36:25PM +0200, Thomas Monjalon wrote:
> When building with "make V=1" it is expected to see the output of each
> compiler command in order to debug them.
> Unfortunately the pmdinfogen related commands were always quiet.
> 
> It is fixed by defining the commands in some Makefile variables.
> They are printed if the verbose mode is enabled.
> 
> The other benefit of this rework is to stop compilation after a
> failure with pmdinfogen.
> 
> The command readlink is removed in this rework because it seems useless.
> 
> Fixes: 3d781ca32874 ("mk: do post processing on objects that register a driver")
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
>  mk/internal/rte.compile-pre.mk | 26 ++++++++++++--------------
>  1 file changed, 12 insertions(+), 14 deletions(-)
> 
> diff --git a/mk/internal/rte.compile-pre.mk b/mk/internal/rte.compile-pre.mk
> index 87d2d93..9c25ff6 100644
> --- a/mk/internal/rte.compile-pre.mk
> +++ b/mk/internal/rte.compile-pre.mk
> @@ -84,28 +84,26 @@ C_TO_O = $(CC) -Wp,-MD,$(call obj2dep,$(@)).tmp $(CFLAGS) \
>  C_TO_O_STR = $(subst ','\'',$(C_TO_O)) #'# fix syntax highlight
>  C_TO_O_DISP = $(if $(V),"$(C_TO_O_STR)","  CC $(@)")
>  endif
> +PMDINFO_GEN = $(RTE_SDK_BIN)/app/pmdinfogen $@ $@.pmd.c
> +PMDINFO_CC = $(CC) $(CFLAGS) -c -o $@.pmd.o $@.pmd.c
> +PMDINFO_LD = $(CROSS)ld $(LDFLAGS) -r -o $@.o $@.pmd.o $@
> +PMDINFO_TO_O = if grep -q 'PMD_REGISTER_DRIVER(.*)' $<; then \
> +	echo "$(if $V,$(PMDINFO_GEN),  PMDINFO $@.pmd.c)" && \
> +	$(PMDINFO_GEN) && \
> +	echo "$(if $V,$(PMDINFO_CC),  CC $@.pmd.o)" && \
> +	$(PMDINFO_CC) && \
> +	echo "$(if $V,$(PMDINFO_LD),  LD $@)" && \
> +	$(PMDINFO_LD) && \
> +	mv -f $@.o $@; fi
>  C_TO_O_CMD = 'cmd_$@ = $(C_TO_O_STR)'
>  C_TO_O_DO = @set -e; \
>  	echo $(C_TO_O_DISP); \
>  	$(C_TO_O) && \
> -	sh -c "grep -q \"PMD_REGISTER_DRIVER(.*)\" $<; \
> -	if [ \$$? -eq 0 ]; then \
> -		echo \"  PMDINFOGEN\" $@; \
> -		OBJF=`readlink -f $@`; \
> -		$(RTE_SDK_BIN)/app/pmdinfogen \$$OBJF \$$OBJF.pmd.c; \
> -		if [ \$$? -eq 0 ]; \
> -		then \
> -			echo \"  PMDINFOBUILD\" $@; \
> -			$(CC) $(CFLAGS) -c -o \$$OBJF.pmd.o \$$OBJF.pmd.c; \
> -			$(CROSS)ld $(LDFLAGS) -r -o \$$OBJF.o \$$OBJF.pmd.o \$$OBJF; \
> -			mv -f \$$OBJF.o \$$OBJF; \
> -		fi; \
> -	fi;" && \
> +	$(PMDINFO_TO_O) && \
>  	echo $(C_TO_O_CMD) > $(call obj2cmd,$(@)) && \
>  	sed 's,'$@':,dep_'$@' =,' $(call obj2dep,$(@)).tmp > $(call obj2dep,$(@)) && \
>  	rm -f $(call obj2dep,$(@)).tmp
>  
> -
>  # return an empty string if string are equal
>  compare = $(strip $(subst $(1),,$(2)) $(subst $(2),,$(1)))
>  
> -- 
> 2.7.0
> 
> 
Acked-by: Neil Horman <nhorman@tuxdriver.com>

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 08/11] pmdinfogen: fix usage message
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 08/11] pmdinfogen: fix usage message Thomas Monjalon
@ 2016-07-07 16:05   ` Neil Horman
  2016-07-07 16:24     ` Thomas Monjalon
  0 siblings, 1 reply; 66+ messages in thread
From: Neil Horman @ 2016-07-07 16:05 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Thu, Jul 07, 2016 at 05:36:27PM +0200, Thomas Monjalon wrote:
> The name of the tool is pmdinfogen.
> 
> Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
>  buildtools/pmdinfogen/pmdinfogen.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/buildtools/pmdinfogen/pmdinfogen.c b/buildtools/pmdinfogen/pmdinfogen.c
> index beb06f1..1b7b931 100644
> --- a/buildtools/pmdinfogen/pmdinfogen.c
> +++ b/buildtools/pmdinfogen/pmdinfogen.c
> @@ -398,7 +398,7 @@ int main(int argc, char **argv)
>  
>  	if (argc < 3) {
>  		fprintf(stderr,
> -			"usage: pmdinfo <object file> <c output file>\n");
> +			"usage: pmdinfogen <object file> <c output file>\n");
>  		exit(127);
>  	}
>  	parse_elf(&info, argv[1]);
> -- 
> 2.7.0
> 
> 

That should probably be an "%s...", argv[0], just to keep the name in line with
whatever its run as (via the symlink for instance)

Neil

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 09/11] eal: move PCI table macro
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 09/11] eal: move PCI table macro Thomas Monjalon
  2016-07-07 15:41   ` Thomas Monjalon
@ 2016-07-07 16:11   ` Neil Horman
  2016-07-07 16:25     ` Thomas Monjalon
  1 sibling, 1 reply; 66+ messages in thread
From: Neil Horman @ 2016-07-07 16:11 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Thu, Jul 07, 2016 at 05:36:28PM +0200, Thomas Monjalon wrote:
> Remove include of rte_pci.h in the generic header rte_dev.h
> and move the macro DRIVER_REGISTER_PCI_TABLE in rte_pci.h.
> 
> Fixes: cb6696d22023 ("drivers: update registration macro usage")
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
>  lib/librte_eal/common/include/rte_dev.h | 6 +-----
>  lib/librte_eal/common/include/rte_pci.h | 5 +++++
>  2 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
> index e6f0d4c..68ca7ef 100644
> --- a/lib/librte_eal/common/include/rte_dev.h
> +++ b/lib/librte_eal/common/include/rte_dev.h
> @@ -48,7 +48,7 @@ extern "C" {
>  
>  #include <stdio.h>
>  #include <sys/queue.h>
> -#include <rte_pci.h>
> +
>  #include <rte_log.h>
>  
>  __attribute__((format(printf, 2, 0)))
> @@ -195,10 +195,6 @@ DRIVER_EXPORT_NAME(nm, __COUNTER__)
>  
>  #define DRV_EXP_TAG(name, tag) __##name##_##tag
>  
> -#define DRIVER_REGISTER_PCI_TABLE(name, table) \
> -static const char DRV_EXP_TAG(name, pci_tbl_export)[] __attribute__((used)) = \
> -RTE_STR(table)
> -
>  #define DRIVER_REGISTER_PARAM_STRING(name, str) \
>  static const char DRV_EXP_TAG(name, param_string_export)[] \
>  __attribute__((used)) = str
> diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h
> index fa74962..3b0d26a 100644
> --- a/lib/librte_eal/common/include/rte_pci.h
> +++ b/lib/librte_eal/common/include/rte_pci.h
> @@ -188,6 +188,11 @@ struct rte_pci_device {
>  	.subsystem_device_id = PCI_ANY_ID
>  #endif
>  
> +#define DRIVER_REGISTER_PCI_TABLE(name, table) \
> +static const char __##name##_pci_tbl_export[] \
> +	__attribute__((used)) = \
> +	RTE_STR(table)
> +
>  struct rte_pci_driver;
>  
>  /**
> -- 
> 2.7.0
> 
> 

This seems strange to me, in that its odd for the driver information export
macros to be spread out in multiple locations.  Specifically it enjoins the use
of the DRV_EXP_TAG macro, which helps centralize tag naming.  Perhaps the happy
medium is to place all the export macros (includnig PMD_REGISTER_DRIVER) into
its own pmd_register.h header?

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 10/11] doc: fix syntax in pmdinfogen guide
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 10/11] doc: fix syntax in pmdinfogen guide Thomas Monjalon
  2016-07-07 15:42   ` Thomas Monjalon
@ 2016-07-07 16:12   ` Neil Horman
  1 sibling, 0 replies; 66+ messages in thread
From: Neil Horman @ 2016-07-07 16:12 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Thu, Jul 07, 2016 at 05:36:29PM +0200, Thomas Monjalon wrote:
> Sphynx reports this error:
> 
> doc/guides/prog_guide/dev_kit_build_system.rst:337: WARNING:
> Pygments lexer name u'C' is not known
> 
> Fixes: 737ddf3fb ("doc: add prog guide section documenting pmdinfo script")
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
>  doc/guides/prog_guide/dev_kit_build_system.rst | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/doc/guides/prog_guide/dev_kit_build_system.rst b/doc/guides/prog_guide/dev_kit_build_system.rst
> index 1dc1388..18a3010 100644
> --- a/doc/guides/prog_guide/dev_kit_build_system.rst
> +++ b/doc/guides/prog_guide/dev_kit_build_system.rst
> @@ -319,8 +319,7 @@ instance the macro:
>  
>  .. code-block:: c
>  
> -    PMD_REGISTER_DRIVER(drv, name)
> -
> +   PMD_REGISTER_DRIVER(drv, name)
>  
>  Creates the following symbol:
>  
> @@ -334,7 +333,7 @@ can be exported from the object file and used to produce a hardware support
>  description, that pmdinfogen then encodes into a json formatted string in the
>  following format:
>  
> -.. code-block:: C
> +.. code-block:: c
>  
>     static char <name_pmd_string>="PMD_INFO_STRING=\"{'name' : '<name>', ...}\"";
>  
> -- 
> 2.7.0
> 
> 
Acked-by: Neil Horman <nhorman@tuxdriver.com>

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 11/11] maintainers: add section for pmdinfo
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 11/11] maintainers: add section for pmdinfo Thomas Monjalon
  2016-07-07 15:45   ` Thomas Monjalon
@ 2016-07-07 16:14   ` Neil Horman
  1 sibling, 0 replies; 66+ messages in thread
From: Neil Horman @ 2016-07-07 16:14 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Thu, Jul 07, 2016 at 05:36:30PM +0200, Thomas Monjalon wrote:
> The author of this feature is Neil Horman.
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
>  MAINTAINERS | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index a59191e..f996c2e 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -68,6 +68,10 @@ F: lib/librte_compat/
>  F: doc/guides/rel_notes/deprecation.rst
>  F: scripts/validate-abi.sh
>  
> +Driver information
> +F: buildtools/pmdinfogen/
> +F: tools/pmdinfo.py
> +
>  
>  Environment Abstraction Layer
>  -----------------------------
> -- 
> 2.7.0
> 
> 
Acked-by: Neil Horman <nhorman@tuxdriver.com>

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 11/11] maintainers: add section for pmdinfo
  2016-07-07 15:45   ` Thomas Monjalon
@ 2016-07-07 16:14     ` Neil Horman
  2016-07-07 16:26       ` Thomas Monjalon
  0 siblings, 1 reply; 66+ messages in thread
From: Neil Horman @ 2016-07-07 16:14 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Thu, Jul 07, 2016 at 05:45:09PM +0200, Thomas Monjalon wrote:
> Neil,
> 
> I would gladly drop this patch from the series if you send a similar one
> with your name as maintainer.
> 
> Thanks
> 
Lets get through the rest of this stuff first, then I'll send it when we're
complete.  Sound good?
Neil

> 
> 2016-07-07 17:36, Thomas Monjalon:
> > The author of this feature is Neil Horman.
> > 
> > Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> > ---
> > +Driver information
> > +F: buildtools/pmdinfogen/
> > +F: tools/pmdinfo.py
> 
> 
> 

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 01/11] drivers: fix build with new register macro
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 01/11] drivers: fix build with new register macro Thomas Monjalon
  2016-07-07 15:50   ` Neil Horman
@ 2016-07-07 16:20   ` Adrien Mazarguil
  1 sibling, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2016-07-07 16:20 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Neil Horman, dev

On Thu, Jul 07, 2016 at 05:36:20PM +0200, Thomas Monjalon wrote:
> Compilation fails because of some typos.
> 
> Fixes: cb6696d22023 ("drivers: update registration macro usage")
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
>  drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 2 +-
>  drivers/net/mlx4/mlx4.c                    | 2 +-
>  drivers/net/mlx5/mlx5.c                    | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> index db3e562..859a04b 100644
> --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> @@ -721,6 +721,6 @@ static struct rte_driver cryptodev_aesni_mb_pmd_drv = {
>  	.uninit = cryptodev_aesni_mb_uninit
>  };
>  
> -PMD_REGISTER_DRIVER(cryptodev_aesni_mb_pmd_drvi, aesni_mb);
> +PMD_REGISTER_DRIVER(cryptodev_aesni_mb_pmd_drv, aesni_mb);
>  DRIVER_REGISTER_PARAM_STRING(aesni_gcm, "max_nb_queue_pairs=<int> "
>  "max_nb_sessions=<int> socket_id=<int>");
> diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
> index 8758eac..d9ffb13 100644
> --- a/drivers/net/mlx4/mlx4.c
> +++ b/drivers/net/mlx4/mlx4.c
> @@ -5861,5 +5861,5 @@ static struct rte_driver rte_mlx4_driver = {
>  	.init = rte_mlx4_pmd_init,
>  };
>  
> -PMD_REGISTER_DRIVER(rte_mlx4_driveri, mlx4)
> +PMD_REGISTER_DRIVER(rte_mlx4_driver, mlx4);
>  DRIVER_REGISTER_PCI_TABLE(mlx4, mlx4_pci_id_map);
> diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
> index 358e9b4..8d32252 100644
> --- a/drivers/net/mlx5/mlx5.c
> +++ b/drivers/net/mlx5/mlx5.c
> @@ -762,5 +762,5 @@ static struct rte_driver rte_mlx5_driver = {
>  	.init = rte_mlx5_pmd_init,
>  };
>  
> -PMD_REGISTER_DRIVER(rte_mlx5_driveri, mlx5)
> +PMD_REGISTER_DRIVER(rte_mlx5_driver, mlx5);
>  DRIVER_REGISTER_PCI_TABLE(mlx5, mlx5_pci_id_map);
> -- 
> 2.7.0

Saw the issue when compiling my patchset after rebasing, thus,

Tested-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>

-- 
Adrien Mazarguil
6WIND

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 03/11] mk: fix build dependency of drivers on pmdinfogen
  2016-07-07 15:56   ` Neil Horman
@ 2016-07-07 16:21     ` Thomas Monjalon
  2016-07-07 17:44       ` Neil Horman
  0 siblings, 1 reply; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-07 16:21 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

2016-07-07 11:56, Neil Horman:
> On Thu, Jul 07, 2016 at 05:36:22PM +0200, Thomas Monjalon wrote:
> > When compiling the drivers, some code is generated with pmdinfogen.
> > A fresh parallel build can fail if a driver is compiled before pmdinfogen:
> > 	build/buildtools/dpdk-pmdinfogen: Permission denied
> > 
> > There was a dependency declared in drivers/Makefile but it cannot work
> > because this file is based on mk/rte.subdir.mk which do not handle
> > dependencies.
> > 
> > It is fixed by declaring the whole buildtools as (order only) prerequisite
> > of drivers.
[...]
> > --- a/drivers/Makefile
> > +++ b/drivers/Makefile
> > @@ -34,6 +34,4 @@ include $(RTE_SDK)/mk/rte.vars.mk
> >  DIRS-y += net
> >  DIRS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += crypto
> >  
> > -DEPDIRS-y += buildtools/pmdinfo
> > -
> >  include $(RTE_SDK)/mk/rte.subdir.mk
> > diff --git a/mk/rte.sdkbuild.mk b/mk/rte.sdkbuild.mk
> > index fb68af2..354f006 100644
> > --- a/mk/rte.sdkbuild.mk
> > +++ b/mk/rte.sdkbuild.mk
> > @@ -49,6 +49,7 @@ $(1): $(sort $(LOCAL_DEPDIRS-$(1)))
> >  endef
> >  
> >  $(foreach d,$(ROOTDIRS-y),$(eval $(call depdirs_rule,$(d))))
> > +drivers: | buildtools
> >  
> I'm not sure i understand the reasoning here, DEPDIRS is meant to declare
> prerequisites to a directory (and its children) getting built, right?  A 
> parallel make should block any drivers getting built prior to pmdinfogen getting
> built.  What am I missing?

DEPDIRS-y is not parsed at all in the context of rte.subdir.mk.
That's why this line was ignored by the build system.

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 08/11] pmdinfogen: fix usage message
  2016-07-07 16:05   ` Neil Horman
@ 2016-07-07 16:24     ` Thomas Monjalon
  2016-07-07 17:46       ` Neil Horman
  0 siblings, 1 reply; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-07 16:24 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

2016-07-07 12:05, Neil Horman:
> On Thu, Jul 07, 2016 at 05:36:27PM +0200, Thomas Monjalon wrote:
> > -			"usage: pmdinfo <object file> <c output file>\n");
> > +			"usage: pmdinfogen <object file> <c output file>\n");
> 
> That should probably be an "%s...", argv[0], just to keep the name in line with
> whatever its run as (via the symlink for instance)

Yes I was hesitating.
I think argv[0] gives the full path. So it is often used with basename().
Do you prefer this solution?

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 09/11] eal: move PCI table macro
  2016-07-07 16:11   ` Neil Horman
@ 2016-07-07 16:25     ` Thomas Monjalon
  2016-07-08  8:49       ` David Marchand
  0 siblings, 1 reply; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-07 16:25 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev, david.marchand

2016-07-07 12:11, Neil Horman:
> On Thu, Jul 07, 2016 at 05:36:28PM +0200, Thomas Monjalon wrote:
> > Remove include of rte_pci.h in the generic header rte_dev.h
> > and move the macro DRIVER_REGISTER_PCI_TABLE in rte_pci.h.
[...]
> > --- a/lib/librte_eal/common/include/rte_dev.h
> > +++ b/lib/librte_eal/common/include/rte_dev.h
> > @@ -48,7 +48,7 @@ extern "C" {
> >  
> >  #include <stdio.h>
> >  #include <sys/queue.h>
> > -#include <rte_pci.h>
> > +
> >  #include <rte_log.h>
> >  
> >  __attribute__((format(printf, 2, 0)))
> > @@ -195,10 +195,6 @@ DRIVER_EXPORT_NAME(nm, __COUNTER__)
> >  
> >  #define DRV_EXP_TAG(name, tag) __##name##_##tag
> >  
> > -#define DRIVER_REGISTER_PCI_TABLE(name, table) \
> > -static const char DRV_EXP_TAG(name, pci_tbl_export)[] __attribute__((used)) = \
> > -RTE_STR(table)
> > -
> >  #define DRIVER_REGISTER_PARAM_STRING(name, str) \
> >  static const char DRV_EXP_TAG(name, param_string_export)[] \
> >  __attribute__((used)) = str
> > diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h
> > index fa74962..3b0d26a 100644
> > --- a/lib/librte_eal/common/include/rte_pci.h
> > +++ b/lib/librte_eal/common/include/rte_pci.h
> > @@ -188,6 +188,11 @@ struct rte_pci_device {
> >  	.subsystem_device_id = PCI_ANY_ID
> >  #endif
> >  
> > +#define DRIVER_REGISTER_PCI_TABLE(name, table) \
> > +static const char __##name##_pci_tbl_export[] \
> > +	__attribute__((used)) = \
> > +	RTE_STR(table)
> > +
> 
> This seems strange to me, in that its odd for the driver information export
> macros to be spread out in multiple locations.  Specifically it enjoins the use
> of the DRV_EXP_TAG macro, which helps centralize tag naming.  Perhaps the happy
> medium is to place all the export macros (includnig PMD_REGISTER_DRIVER) into
> its own pmd_register.h header?

I don't know.
David, your opinion?

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 11/11] maintainers: add section for pmdinfo
  2016-07-07 16:14     ` Neil Horman
@ 2016-07-07 16:26       ` Thomas Monjalon
  0 siblings, 0 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-07 16:26 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

2016-07-07 12:14, Neil Horman:
> On Thu, Jul 07, 2016 at 05:45:09PM +0200, Thomas Monjalon wrote:
> > Neil,
> > 
> > I would gladly drop this patch from the series if you send a similar one
> > with your name as maintainer.
> > 
> > Thanks
> > 
> Lets get through the rest of this stuff first, then I'll send it when we're
> complete.  Sound good?

Up to you

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 03/11] mk: fix build dependency of drivers on pmdinfogen
  2016-07-07 16:21     ` Thomas Monjalon
@ 2016-07-07 17:44       ` Neil Horman
  0 siblings, 0 replies; 66+ messages in thread
From: Neil Horman @ 2016-07-07 17:44 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Thu, Jul 07, 2016 at 06:21:49PM +0200, Thomas Monjalon wrote:
> 2016-07-07 11:56, Neil Horman:
> > On Thu, Jul 07, 2016 at 05:36:22PM +0200, Thomas Monjalon wrote:
> > > When compiling the drivers, some code is generated with pmdinfogen.
> > > A fresh parallel build can fail if a driver is compiled before pmdinfogen:
> > > 	build/buildtools/dpdk-pmdinfogen: Permission denied
> > > 
> > > There was a dependency declared in drivers/Makefile but it cannot work
> > > because this file is based on mk/rte.subdir.mk which do not handle
> > > dependencies.
> > > 
> > > It is fixed by declaring the whole buildtools as (order only) prerequisite
> > > of drivers.
> [...]
> > > --- a/drivers/Makefile
> > > +++ b/drivers/Makefile
> > > @@ -34,6 +34,4 @@ include $(RTE_SDK)/mk/rte.vars.mk
> > >  DIRS-y += net
> > >  DIRS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += crypto
> > >  
> > > -DEPDIRS-y += buildtools/pmdinfo
> > > -
> > >  include $(RTE_SDK)/mk/rte.subdir.mk
> > > diff --git a/mk/rte.sdkbuild.mk b/mk/rte.sdkbuild.mk
> > > index fb68af2..354f006 100644
> > > --- a/mk/rte.sdkbuild.mk
> > > +++ b/mk/rte.sdkbuild.mk
> > > @@ -49,6 +49,7 @@ $(1): $(sort $(LOCAL_DEPDIRS-$(1)))
> > >  endef
> > >  
> > >  $(foreach d,$(ROOTDIRS-y),$(eval $(call depdirs_rule,$(d))))
> > > +drivers: | buildtools
> > >  
> > I'm not sure i understand the reasoning here, DEPDIRS is meant to declare
> > prerequisites to a directory (and its children) getting built, right?  A 
> > parallel make should block any drivers getting built prior to pmdinfogen getting
> > built.  What am I missing?
> 
> DEPDIRS-y is not parsed at all in the context of rte.subdir.mk.
> That's why this line was ignored by the build system.
> 
Ah, ok then (though it seems like that might be a useful variable to query,
rather than dead reconing it inside the sdk build file

Acked-by: Neil Horman <nhorman@tuxdriver.com>

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 08/11] pmdinfogen: fix usage message
  2016-07-07 16:24     ` Thomas Monjalon
@ 2016-07-07 17:46       ` Neil Horman
  0 siblings, 0 replies; 66+ messages in thread
From: Neil Horman @ 2016-07-07 17:46 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Thu, Jul 07, 2016 at 06:24:16PM +0200, Thomas Monjalon wrote:
> 2016-07-07 12:05, Neil Horman:
> > On Thu, Jul 07, 2016 at 05:36:27PM +0200, Thomas Monjalon wrote:
> > > -			"usage: pmdinfo <object file> <c output file>\n");
> > > +			"usage: pmdinfogen <object file> <c output file>\n");
> > 
> > That should probably be an "%s...", argv[0], just to keep the name in line with
> > whatever its run as (via the symlink for instance)
> 
> Yes I was hesitating.
> I think argv[0] gives the full path. So it is often used with basename().
> Do you prefer this solution?

I think that makes more sense yes, given that pmdinfogen might be run as the
direct app or as the dpdk- prefixed symlink

Neil

> 
> 

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 07/11] pmdinfogen: fix build warnings
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 07/11] pmdinfogen: fix build warnings Thomas Monjalon
@ 2016-07-07 17:55   ` Neil Horman
  2016-07-07 21:25     ` Mcnamara, John
  0 siblings, 1 reply; 66+ messages in thread
From: Neil Horman @ 2016-07-07 17:55 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Thu, Jul 07, 2016 at 05:36:26PM +0200, Thomas Monjalon wrote:
> When compiled with a standard clang, pmdinfogen can raise a warning:
>     buildtools/pmdinfogen/pmdinfogen.c:365:1: warning:
>     control reaches end of non-void function
> 
> Actually there can be more warnings with stricter compilers.
> In order to catch them early and fix most of them, the DPDK standard flags
> WERROR_FLAGS are used.
> 
> The warnings fixed are:
>     no previous prototype for ...
>     no return statement in function returning non-void
>     variable ‘secstrings’ set but not used
>     ‘sec_name’ defined but not used
>     ‘get_symbol_index’ defined but not used
>     pointer of type ‘void *’ used in arithmetic
> 
> Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
I'm not opposed to any of these changes, but I'm really starting to wonder how
well used/maintained clang is as a toolchain target.  I assert that because,
with my admittedly broken dependency rule, a native clang build for me errors
out in any number of places:

/home/nhorman/git/dpdk/lib/librte_eal/linuxapp/eal/eal_pci.c:392:37: error:
equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
 if (((&pci_device_list)->tqh_first == ((void*)0))) {
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
/home/nhorman/git/dpdk/lib/librte_eal/linuxapp/eal/eal_pci.c:392:37: note:
remove extraneous parentheses around the comparison to silence this warning
 if (((&pci_device_list)->tqh_first == ((void*)0))) {
     ~                              ^            ~
/home/nhorman/git/dpdk/lib/librte_eal/linuxapp/eal/eal_pci.c:392:37: note: use
'=' to turn this equality comparison into an assignment
 if (((&pci_device_list)->tqh_first == ((void*)0))) {

along with several others
...

The above are (in part) asserted based on the definition of the TAILQ_EMPTY macro which is
from glibc, and has been unchanged for a number of years.  This error occurs on
clang 3.7.0 for me.  Not saying we can't fix these warnings your getting, but if
clang has been tripping over the above for I don't know how long, I have to
question how important clang is.

Neil


>  buildtools/pmdinfogen/Makefile     |  4 +--
>  buildtools/pmdinfogen/pmdinfogen.c | 58 ++++++++++++--------------------------
>  2 files changed, 20 insertions(+), 42 deletions(-)
> 
> diff --git a/buildtools/pmdinfogen/Makefile b/buildtools/pmdinfogen/Makefile
> index 125901b..3885d3b 100644
> --- a/buildtools/pmdinfogen/Makefile
> +++ b/buildtools/pmdinfogen/Makefile
> @@ -41,9 +41,9 @@ HOSTAPP = pmdinfogen
>  #
>  SRCS-y += pmdinfogen.c
>  
> -HOST_EXTRA_CFLAGS += -g -I${RTE_OUTPUT}/include
> +HOST_CFLAGS += $(WERROR_FLAGS) -g
> +HOST_CFLAGS += -I$(RTE_OUTPUT)/include
>  
>  DEPDIRS-y += lib/librte_eal
>  
>  include $(RTE_SDK)/mk/rte.hostapp.mk
> -
> diff --git a/buildtools/pmdinfogen/pmdinfogen.c b/buildtools/pmdinfogen/pmdinfogen.c
> index 0947dc6..beb06f1 100644
> --- a/buildtools/pmdinfogen/pmdinfogen.c
> +++ b/buildtools/pmdinfogen/pmdinfogen.c
> @@ -15,6 +15,7 @@
>  #include <limits.h>
>  #include <stdbool.h>
>  #include <errno.h>
> +#include <rte_common.h>
>  #include "pmdinfogen.h"
>  
>  #ifdef RTE_ARCH_64
> @@ -32,7 +33,7 @@ static const char *sym_name(struct elf_info *elf, Elf_Sym *sym)
>  		return "(unknown)";
>  }
>  
> -void *grab_file(const char *filename, unsigned long *size)
> +static void *grab_file(const char *filename, unsigned long *size)
>  {
>  	struct stat st;
>  	void *map = MAP_FAILED;
> @@ -59,7 +60,7 @@ failed:
>    * spaces in the beginning of the line is trimmed away.
>    * Return a pointer to a static buffer.
>    **/
> -void release_file(void *file, unsigned long size)
> +static void release_file(void *file, unsigned long size)
>  {
>  	munmap(file, size);
>  }
> @@ -67,9 +68,8 @@ void release_file(void *file, unsigned long size)
>  
>  static void *get_sym_value(struct elf_info *info, const Elf_Sym *sym)
>  {
> -	void *ptr = (void *)info->hdr + info->sechdrs[sym->st_shndx].sh_offset;
> -
> -	return (void *)(ptr + sym->st_value);
> +	return RTE_PTR_ADD(info->hdr,
> +		info->sechdrs[sym->st_shndx].sh_offset + sym->st_value);
>  }
>  
>  static Elf_Sym *find_sym_in_symtab(struct elf_info *info,
> @@ -95,7 +95,6 @@ static int parse_elf(struct elf_info *info, const char *filename)
>  	Elf_Ehdr *hdr;
>  	Elf_Shdr *sechdrs;
>  	Elf_Sym  *sym;
> -	const char *secstrings;
>  	int endian;
>  	unsigned int symtab_idx = ~0U, symtab_shndx_idx = ~0U;
>  
> @@ -140,7 +139,7 @@ static int parse_elf(struct elf_info *info, const char *filename)
>  	hdr->e_shnum     = TO_NATIVE(endian, 16, hdr->e_shnum);
>  	hdr->e_shstrndx  = TO_NATIVE(endian, 16, hdr->e_shstrndx);
>  
> -	sechdrs = (void *)hdr + hdr->e_shoff;
> +	sechdrs = RTE_PTR_ADD(hdr, hdr->e_shoff);
>  	info->sechdrs = sechdrs;
>  
>  	/* Check if file offset is correct */
> @@ -191,7 +190,6 @@ static int parse_elf(struct elf_info *info, const char *filename)
>  			TO_NATIVE(endian, ADDR_SIZE, sechdrs[i].sh_entsize);
>  	}
>  	/* Find symbol table. */
> -	secstrings = (void *)hdr + sechdrs[info->secindex_strings].sh_offset;
>  	for (i = 1; i < info->num_sections; i++) {
>  		int nobits = sechdrs[i].sh_type == SHT_NOBITS;
>  
> @@ -206,22 +204,22 @@ static int parse_elf(struct elf_info *info, const char *filename)
>  		if (sechdrs[i].sh_type == SHT_SYMTAB) {
>  			unsigned int sh_link_idx;
>  			symtab_idx = i;
> -			info->symtab_start = (void *)hdr +
> -			    sechdrs[i].sh_offset;
> -			info->symtab_stop  = (void *)hdr +
> -			    sechdrs[i].sh_offset + sechdrs[i].sh_size;
> +			info->symtab_start = RTE_PTR_ADD(hdr,
> +				sechdrs[i].sh_offset);
> +			info->symtab_stop  = RTE_PTR_ADD(hdr,
> +				sechdrs[i].sh_offset + sechdrs[i].sh_size);
>  			sh_link_idx = sechdrs[i].sh_link;
> -			info->strtab       = (void *)hdr +
> -			    sechdrs[sh_link_idx].sh_offset;
> +			info->strtab       = RTE_PTR_ADD(hdr,
> +				sechdrs[sh_link_idx].sh_offset);
>  		}
>  
>  		/* 32bit section no. table? ("more than 64k sections") */
>  		if (sechdrs[i].sh_type == SHT_SYMTAB_SHNDX) {
>  			symtab_shndx_idx = i;
> -			info->symtab_shndx_start = (void *)hdr +
> -			    sechdrs[i].sh_offset;
> -			info->symtab_shndx_stop  = (void *)hdr +
> -			    sechdrs[i].sh_offset + sechdrs[i].sh_size;
> +			info->symtab_shndx_start = RTE_PTR_ADD(hdr,
> +				sechdrs[i].sh_offset);
> +			info->symtab_shndx_stop  = RTE_PTR_ADD(hdr,
> +				sechdrs[i].sh_offset + sechdrs[i].sh_size);
>  		}
>  	}
>  	if (!info->symtab_start)
> @@ -262,28 +260,6 @@ static void parse_elf_finish(struct elf_info *info)
>  	}
>  }
>  
> -static const char *sec_name(struct elf_info *elf, int secindex)
> -{
> -	Elf_Shdr *sechdrs = elf->sechdrs;
> -	return (void *)elf->hdr +
> -		elf->sechdrs[elf->secindex_strings].sh_offset +
> -		sechdrs[secindex].sh_name;
> -}
> -
> -static int get_symbol_index(struct elf_info *info, Elf_Sym *sym)
> -{
> -	const char *name =  sym_name(info, sym);
> -	const char *idx;
> -
> -	idx = name;
> -	while (idx) {
> -		if (isdigit(*idx))
> -			return atoi(idx);
> -		idx++;
> -	}
> -	return -1;
> -}
> -
>  struct opt_tag {
>  	const char *suffix;
>  	const char *json_id;
> @@ -362,6 +338,8 @@ static int locate_pmd_entries(struct elf_info *info)
>  			}
>  		}
>  	} while (last);
> +
> +	return 0;
>  }
>  
>  static void output_pmd_info_string(struct elf_info *info, char *outfile)
> -- 
> 2.7.0
> 
> 

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 07/11] pmdinfogen: fix build warnings
  2016-07-07 17:55   ` Neil Horman
@ 2016-07-07 21:25     ` Mcnamara, John
  2016-07-08 14:51       ` Neil Horman
  0 siblings, 1 reply; 66+ messages in thread
From: Mcnamara, John @ 2016-07-07 21:25 UTC (permalink / raw)
  To: Neil Horman, Thomas Monjalon; +Cc: dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Neil Horman
> Sent: Thursday, July 7, 2016 6:55 PM
> To: Thomas Monjalon <thomas.monjalon@6wind.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 07/11] pmdinfogen: fix build warnings
> 
> On Thu, Jul 07, 2016 at 05:36:26PM +0200, Thomas Monjalon wrote:
> > When compiled with a standard clang, pmdinfogen can raise a warning:
> >     buildtools/pmdinfogen/pmdinfogen.c:365:1: warning:
> >     control reaches end of non-void function
> >
> > Actually there can be more warnings with stricter compilers.
> > In order to catch them early and fix most of them, the DPDK standard
> > flags WERROR_FLAGS are used.
> >
> > The warnings fixed are:
> >     no previous prototype for ...
> >     no return statement in function returning non-void
> >     variable ‘secstrings’ set but not used
> >     ‘sec_name’ defined but not used
> >     ‘get_symbol_index’ defined but not used
> >     pointer of type ‘void *’ used in arithmetic
> >
> > Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen
> > utility")
> >
> > Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> > ---
> I'm not opposed to any of these changes, but I'm really starting to wonder
> how well used/maintained clang is as a toolchain target.  I assert that
> because, with my admittedly broken dependency rule, a native clang build
> for me errors out in any number of places:
> 
> /home/nhorman/git/dpdk/lib/librte_eal/linuxapp/eal/eal_pci.c:392:37:
> error:
> equality comparison with extraneous parentheses [-Werror,-Wparentheses-
> equality]  if (((&pci_device_list)->tqh_first == ((void*)0))) {
>       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
> /home/nhorman/git/dpdk/lib/librte_eal/linuxapp/eal/eal_pci.c:392:37: note:
> remove extraneous parentheses around the comparison to silence this
> warning  if (((&pci_device_list)->tqh_first == ((void*)0))) {


It is due to the clang/ccache "issue" that is tripping up everyone. Exporting CCACHE_CPP2=yes should fix it. There was a thread about this earlier in the week.

John.



^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 09/11] eal: move PCI table macro
  2016-07-07 16:25     ` Thomas Monjalon
@ 2016-07-08  8:49       ` David Marchand
  2016-07-08 13:56         ` Neil Horman
  0 siblings, 1 reply; 66+ messages in thread
From: David Marchand @ 2016-07-08  8:49 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Neil Horman, dev, Jan Viktorin

Hello Thomas, Neil,

(will be back in a couple of days, thanks Thomas for pointing this thread)


On Thu, Jul 7, 2016 at 6:25 PM, Thomas Monjalon
<thomas.monjalon@6wind.com> wrote:
> 2016-07-07 12:11, Neil Horman:
>> On Thu, Jul 07, 2016 at 05:36:28PM +0200, Thomas Monjalon wrote:
>> > Remove include of rte_pci.h in the generic header rte_dev.h
>> > and move the macro DRIVER_REGISTER_PCI_TABLE in rte_pci.h.
> [...]
>>
>> This seems strange to me, in that its odd for the driver information export
>> macros to be spread out in multiple locations.  Specifically it enjoins the use
>> of the DRV_EXP_TAG macro, which helps centralize tag naming.  Perhaps the happy
>> medium is to place all the export macros (includnig PMD_REGISTER_DRIVER) into
>> its own pmd_register.h header?
>
> I don't know.
> David, your opinion?

- The suggestion I did offline to Thomas was to move pci stuff in pci headers.
We are trying to move from the "all pci" code in eal to accomodate for
other "buses" / architectures.
Having a pci macro in a generic header like rte_dev.h is wrong to me.
Moving this to a new header like pmd_register.h sounds like a new
generic header with pci specific stuff in it.
So, I am not sure I follow you Neil.

Can you elaborate ?


- Why do you want to centralise the tag naming ?
To avoid collisions ?
Well, adding those tags should not happen that often and I think we
can maintain this with careful reviews.


-- 
David Marchand

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH v2 00/10] additions to pmdinfogen
  2016-07-07 15:36 [dpdk-dev] [PATCH 00/11] additions to pmdinfogen Thomas Monjalon
                   ` (10 preceding siblings ...)
  2016-07-07 15:36 ` [dpdk-dev] [PATCH 11/11] maintainers: add section for pmdinfo Thomas Monjalon
@ 2016-07-08 10:14 ` Thomas Monjalon
  2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 01/10] drivers: fix build with new register macro Thomas Monjalon
                     ` (10 more replies)
  11 siblings, 11 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 10:14 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

These are some patches that I think needed for RC2.
There are other patches needed as discussed on the mailing-list which
are not part of this series:
  - overwritten driver name (reported by Pablo)
  - pmdinfo.py on FreeBSD (reported by Bruce)

Note: RC2 is planned to be out at the end of this week.

v2 changes:
- use argv[0] in usage message
- drop fix of parameters registration which is better managed
  in Neil's patch "crypto: normalize cryptodev pmd names with macros"
  http://dpdk.org/ml/archives/dev/2016-July/043506.html

Thomas Monjalon (10):
  drivers: fix build with new register macro
  mk: fix build dependency of drivers on pmdinfogen
  mk: remove traces of hostapp build directory
  mk: fix driver build with installed SDK
  mk: fix verbose pmdinfogen run
  pmdinfogen: fix build warnings
  pmdinfogen: fix usage message
  eal: move PCI table macro
  doc: fix syntax in pmdinfogen guide
  maintainers: add section for pmdinfo

 MAINTAINERS                                    |  4 ++
 buildtools/pmdinfogen/Makefile                 |  4 +-
 buildtools/pmdinfogen/pmdinfogen.c             | 61 +++++++++-----------------
 doc/guides/freebsd_gsg/build_dpdk.rst          |  2 +-
 doc/guides/linux_gsg/build_dpdk.rst            |  2 +-
 doc/guides/prog_guide/dev_kit_build_system.rst |  5 +--
 drivers/Makefile                               |  2 -
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c     |  2 +-
 drivers/net/mlx4/mlx4.c                        |  2 +-
 drivers/net/mlx5/mlx5.c                        |  2 +-
 lib/librte_eal/common/include/rte_dev.h        |  6 +--
 lib/librte_eal/common/include/rte_pci.h        |  5 +++
 mk/internal/rte.compile-pre.mk                 | 26 +++++------
 mk/rte.sdkbuild.mk                             |  6 +--
 mk/rte.sdkconfig.mk                            |  2 +-
 mk/rte.sdkinstall.mk                           |  8 ++--
 16 files changed, 59 insertions(+), 80 deletions(-)

-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH v2 01/10] drivers: fix build with new register macro
  2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 00/10] additions to pmdinfogen Thomas Monjalon
@ 2016-07-08 10:14   ` Thomas Monjalon
  2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 02/10] mk: fix build dependency of drivers on pmdinfogen Thomas Monjalon
                     ` (9 subsequent siblings)
  10 siblings, 0 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 10:14 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

Compilation fails because of some typos.

Fixes: cb6696d22023 ("drivers: update registration macro usage")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Tested-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 2 +-
 drivers/net/mlx4/mlx4.c                    | 2 +-
 drivers/net/mlx5/mlx5.c                    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index db3e562..859a04b 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -721,6 +721,6 @@ static struct rte_driver cryptodev_aesni_mb_pmd_drv = {
 	.uninit = cryptodev_aesni_mb_uninit
 };
 
-PMD_REGISTER_DRIVER(cryptodev_aesni_mb_pmd_drvi, aesni_mb);
+PMD_REGISTER_DRIVER(cryptodev_aesni_mb_pmd_drv, aesni_mb);
 DRIVER_REGISTER_PARAM_STRING(aesni_gcm, "max_nb_queue_pairs=<int> "
 "max_nb_sessions=<int> socket_id=<int>");
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 8758eac..d9ffb13 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -5861,5 +5861,5 @@ static struct rte_driver rte_mlx4_driver = {
 	.init = rte_mlx4_pmd_init,
 };
 
-PMD_REGISTER_DRIVER(rte_mlx4_driveri, mlx4)
+PMD_REGISTER_DRIVER(rte_mlx4_driver, mlx4);
 DRIVER_REGISTER_PCI_TABLE(mlx4, mlx4_pci_id_map);
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 358e9b4..8d32252 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -762,5 +762,5 @@ static struct rte_driver rte_mlx5_driver = {
 	.init = rte_mlx5_pmd_init,
 };
 
-PMD_REGISTER_DRIVER(rte_mlx5_driveri, mlx5)
+PMD_REGISTER_DRIVER(rte_mlx5_driver, mlx5);
 DRIVER_REGISTER_PCI_TABLE(mlx5, mlx5_pci_id_map);
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH v2 02/10] mk: fix build dependency of drivers on pmdinfogen
  2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 00/10] additions to pmdinfogen Thomas Monjalon
  2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 01/10] drivers: fix build with new register macro Thomas Monjalon
@ 2016-07-08 10:14   ` Thomas Monjalon
  2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 03/10] mk: remove traces of hostapp build directory Thomas Monjalon
                     ` (8 subsequent siblings)
  10 siblings, 0 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 10:14 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

When compiling the drivers, some code is generated with pmdinfogen.
A fresh parallel build can fail if a driver is compiled before pmdinfogen:
	build/buildtools/dpdk-pmdinfogen: Permission denied

There was a dependency declared in drivers/Makefile but it cannot work
because this file is based on mk/rte.subdir.mk which do not handle
dependencies.

It is fixed by declaring the whole buildtools as (order only) prerequisite
of drivers.

Fixes: cb6696d22023 ("drivers: update registration macro usage")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
---
 drivers/Makefile   | 2 --
 mk/rte.sdkbuild.mk | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 75a3168..81c03a8 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -34,6 +34,4 @@ include $(RTE_SDK)/mk/rte.vars.mk
 DIRS-y += net
 DIRS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += crypto
 
-DEPDIRS-y += buildtools/pmdinfo
-
 include $(RTE_SDK)/mk/rte.subdir.mk
diff --git a/mk/rte.sdkbuild.mk b/mk/rte.sdkbuild.mk
index fb68af2..354f006 100644
--- a/mk/rte.sdkbuild.mk
+++ b/mk/rte.sdkbuild.mk
@@ -49,6 +49,7 @@ $(1): $(sort $(LOCAL_DEPDIRS-$(1)))
 endef
 
 $(foreach d,$(ROOTDIRS-y),$(eval $(call depdirs_rule,$(d))))
+drivers: | buildtools
 
 #
 # build and clean targets
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH v2 03/10] mk: remove traces of hostapp build directory
  2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 00/10] additions to pmdinfogen Thomas Monjalon
  2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 01/10] drivers: fix build with new register macro Thomas Monjalon
  2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 02/10] mk: fix build dependency of drivers on pmdinfogen Thomas Monjalon
@ 2016-07-08 10:14   ` Thomas Monjalon
  2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 04/10] mk: fix driver build with installed SDK Thomas Monjalon
                     ` (7 subsequent siblings)
  10 siblings, 0 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 10:14 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

The recipe rte.hostapp.mk does not build in hostapp/ anymore.

Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
---
 doc/guides/freebsd_gsg/build_dpdk.rst | 2 +-
 doc/guides/linux_gsg/build_dpdk.rst   | 2 +-
 mk/rte.sdkbuild.mk                    | 5 ++---
 mk/rte.sdkconfig.mk                   | 2 +-
 4 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/doc/guides/freebsd_gsg/build_dpdk.rst b/doc/guides/freebsd_gsg/build_dpdk.rst
index 1d92c08..93c4366 100644
--- a/doc/guides/freebsd_gsg/build_dpdk.rst
+++ b/doc/guides/freebsd_gsg/build_dpdk.rst
@@ -183,7 +183,7 @@ contains the kernel modules to install:
 
     ls x86_64-native-bsdapp-gcc
 
-    app build hostapp include kmod lib Makefile
+    app build include kmod lib Makefile
 
 
 .. _loading_contigmem:
diff --git a/doc/guides/linux_gsg/build_dpdk.rst b/doc/guides/linux_gsg/build_dpdk.rst
index 198c0b6..fb2c481 100644
--- a/doc/guides/linux_gsg/build_dpdk.rst
+++ b/doc/guides/linux_gsg/build_dpdk.rst
@@ -152,7 +152,7 @@ A kmod  directory is also present that contains kernel modules which may be load
 
     ls x86_64-native-linuxapp-gcc
 
-    app build hostapp include kmod lib Makefile
+    app build include kmod lib Makefile
 
 Loading Modules to Enable Userspace IO for DPDK
 -----------------------------------------------
diff --git a/mk/rte.sdkbuild.mk b/mk/rte.sdkbuild.mk
index 354f006..23fcf1e 100644
--- a/mk/rte.sdkbuild.mk
+++ b/mk/rte.sdkbuild.mk
@@ -64,9 +64,8 @@ build: $(ROOTDIRS-y)
 .PHONY: clean
 clean: $(CLEANDIRS)
 	@rm -rf $(RTE_OUTPUT)/include $(RTE_OUTPUT)/app \
-		$(RTE_OUTPUT)/hostapp $(RTE_OUTPUT)/lib \
-		$(RTE_OUTPUT)/hostlib $(RTE_OUTPUT)/kmod \
-		$(RTE_OUTPUT)/buildtools
+		$(RTE_OUTPUT)/lib \
+		$(RTE_OUTPUT)/hostlib $(RTE_OUTPUT)/kmod
 	@[ -d $(RTE_OUTPUT)/include ] || mkdir -p $(RTE_OUTPUT)/include
 	@$(RTE_SDK)/scripts/gen-config-h.sh $(RTE_OUTPUT)/.config \
 		> $(RTE_OUTPUT)/include/rte_config.h
diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk
index a3acfe6..068d787 100644
--- a/mk/rte.sdkconfig.mk
+++ b/mk/rte.sdkconfig.mk
@@ -108,7 +108,7 @@ $(RTE_OUTPUT)/Makefile: | $(RTE_OUTPUT)
 # if NODOTCONF variable is defined, don't try to rebuild .config
 $(RTE_OUTPUT)/include/rte_config.h: $(RTE_OUTPUT)/.config
 	$(Q)rm -rf $(RTE_OUTPUT)/include $(RTE_OUTPUT)/app \
-		$(RTE_OUTPUT)/hostapp $(RTE_OUTPUT)/lib \
+		$(RTE_OUTPUT)/lib \
 		$(RTE_OUTPUT)/hostlib $(RTE_OUTPUT)/kmod $(RTE_OUTPUT)/build
 	$(Q)mkdir -p $(RTE_OUTPUT)/include
 	$(Q)$(RTE_SDK)/scripts/gen-config-h.sh $(RTE_OUTPUT)/.config \
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH v2 04/10] mk: fix driver build with installed SDK
  2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 00/10] additions to pmdinfogen Thomas Monjalon
                     ` (2 preceding siblings ...)
  2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 03/10] mk: remove traces of hostapp build directory Thomas Monjalon
@ 2016-07-08 10:14   ` Thomas Monjalon
  2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 05/10] mk: fix verbose pmdinfogen run Thomas Monjalon
                     ` (6 subsequent siblings)
  10 siblings, 0 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 10:14 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

The tool pmdinfogen was called from RTE_OUTPUT/app/ which does not exist
if building a driver outside of the SDK build.
When building DPDK, RTE_SDK_BIN is RTE_OUTPUT. When building an external
driver, RTE_SDK_BIN must point to the installed DPDK directory containing
includes, libs, etc.

That's why pmdinfogen must be installed in the SDK directory and be part
of the SDK installation.

Fixes: 3d781ca32874 ("mk: do post processing on objects that register a driver")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 mk/internal/rte.compile-pre.mk | 2 +-
 mk/rte.sdkinstall.mk           | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/mk/internal/rte.compile-pre.mk b/mk/internal/rte.compile-pre.mk
index 5632d6e..87d2d93 100644
--- a/mk/internal/rte.compile-pre.mk
+++ b/mk/internal/rte.compile-pre.mk
@@ -92,7 +92,7 @@ C_TO_O_DO = @set -e; \
 	if [ \$$? -eq 0 ]; then \
 		echo \"  PMDINFOGEN\" $@; \
 		OBJF=`readlink -f $@`; \
-		${RTE_OUTPUT}/app/pmdinfogen \$$OBJF \$$OBJF.pmd.c; \
+		$(RTE_SDK_BIN)/app/pmdinfogen \$$OBJF \$$OBJF.pmd.c; \
 		if [ \$$? -eq 0 ]; \
 		then \
 			echo \"  PMDINFOBUILD\" $@; \
diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk
index b0d985c..7cd352c 100644
--- a/mk/rte.sdkinstall.mk
+++ b/mk/rte.sdkinstall.mk
@@ -117,6 +117,7 @@ install-runtime:
 	$(Q)cp -a    $O/lib/* $(DESTDIR)$(libdir)
 	$(Q)$(call rte_mkdir, $(DESTDIR)$(bindir))
 	$(Q)tar -cf -      -C $O --exclude 'app/*.map' \
+		--exclude app/pmdinfogen \
 		--exclude 'app/cmdline*' --exclude app/test \
 		--exclude app/testacl --exclude app/testpipeline app | \
 	    tar -xf -      -C $(DESTDIR)$(bindir) --strip-components=1 \
@@ -126,10 +127,8 @@ install-runtime:
 	$(Q)$(call rte_mkdir,      $(DESTDIR)$(sbindir))
 	$(Q)$(call rte_symlink,    $(DESTDIR)$(datadir)/tools/dpdk_nic_bind.py, \
 	                           $(DESTDIR)$(sbindir)/dpdk_nic_bind)
-	$(Q)$(call rte_symlink,    $(DESTDIR)$(bindir)/pmdinfogen, \
-				   $(DESTDIR)$(bindir)/dpdk_pmdinfogen)
 	$(Q)$(call rte_symlink,    $(DESTDIR)$(datadir)/tools/pmdinfo.py, \
-				   $(DESTDIR)$(bindir)/dpdk_pmdinfo)
+	                           $(DESTDIR)$(bindir)/dpdk_pmdinfo)
 
 install-kmod:
 ifneq ($(wildcard $O/kmod/*),)
@@ -145,8 +144,9 @@ install-sdk:
 	$(Q)$(call rte_mkdir,                            $(DESTDIR)$(sdkdir))
 	$(Q)cp -a               $(RTE_SDK)/mk            $(DESTDIR)$(sdkdir)
 	$(Q)cp -a               $(RTE_SDK)/scripts       $(DESTDIR)$(sdkdir)
-	$(Q)$(call rte_mkdir,                            $(DESTDIR)$(targetdir))
+	$(Q)$(call rte_mkdir,                            $(DESTDIR)$(targetdir)/app)
 	$(Q)cp -a               $O/.config               $(DESTDIR)$(targetdir)
+	$(Q)cp -a               $O/app/pmdinfogen        $(DESTDIR)$(targetdir)/app
 	$(Q)$(call rte_symlink, $(DESTDIR)$(includedir), $(DESTDIR)$(targetdir)/include)
 	$(Q)$(call rte_symlink, $(DESTDIR)$(libdir),     $(DESTDIR)$(targetdir)/lib)
 
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH v2 05/10] mk: fix verbose pmdinfogen run
  2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 00/10] additions to pmdinfogen Thomas Monjalon
                     ` (3 preceding siblings ...)
  2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 04/10] mk: fix driver build with installed SDK Thomas Monjalon
@ 2016-07-08 10:14   ` Thomas Monjalon
  2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 06/10] pmdinfogen: fix build warnings Thomas Monjalon
                     ` (5 subsequent siblings)
  10 siblings, 0 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 10:14 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

When building with "make V=1" it is expected to see the output of each
compiler command in order to debug them.
Unfortunately the pmdinfogen related commands were always quiet.

It is fixed by defining the commands in some Makefile variables.
They are printed if the verbose mode is enabled.

The other benefit of this rework is to stop compilation after a
failure with pmdinfogen.

The command readlink is removed in this rework because it seems useless.

Fixes: 3d781ca32874 ("mk: do post processing on objects that register a driver")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
---
 mk/internal/rte.compile-pre.mk | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/mk/internal/rte.compile-pre.mk b/mk/internal/rte.compile-pre.mk
index 87d2d93..9c25ff6 100644
--- a/mk/internal/rte.compile-pre.mk
+++ b/mk/internal/rte.compile-pre.mk
@@ -84,28 +84,26 @@ C_TO_O = $(CC) -Wp,-MD,$(call obj2dep,$(@)).tmp $(CFLAGS) \
 C_TO_O_STR = $(subst ','\'',$(C_TO_O)) #'# fix syntax highlight
 C_TO_O_DISP = $(if $(V),"$(C_TO_O_STR)","  CC $(@)")
 endif
+PMDINFO_GEN = $(RTE_SDK_BIN)/app/pmdinfogen $@ $@.pmd.c
+PMDINFO_CC = $(CC) $(CFLAGS) -c -o $@.pmd.o $@.pmd.c
+PMDINFO_LD = $(CROSS)ld $(LDFLAGS) -r -o $@.o $@.pmd.o $@
+PMDINFO_TO_O = if grep -q 'PMD_REGISTER_DRIVER(.*)' $<; then \
+	echo "$(if $V,$(PMDINFO_GEN),  PMDINFO $@.pmd.c)" && \
+	$(PMDINFO_GEN) && \
+	echo "$(if $V,$(PMDINFO_CC),  CC $@.pmd.o)" && \
+	$(PMDINFO_CC) && \
+	echo "$(if $V,$(PMDINFO_LD),  LD $@)" && \
+	$(PMDINFO_LD) && \
+	mv -f $@.o $@; fi
 C_TO_O_CMD = 'cmd_$@ = $(C_TO_O_STR)'
 C_TO_O_DO = @set -e; \
 	echo $(C_TO_O_DISP); \
 	$(C_TO_O) && \
-	sh -c "grep -q \"PMD_REGISTER_DRIVER(.*)\" $<; \
-	if [ \$$? -eq 0 ]; then \
-		echo \"  PMDINFOGEN\" $@; \
-		OBJF=`readlink -f $@`; \
-		$(RTE_SDK_BIN)/app/pmdinfogen \$$OBJF \$$OBJF.pmd.c; \
-		if [ \$$? -eq 0 ]; \
-		then \
-			echo \"  PMDINFOBUILD\" $@; \
-			$(CC) $(CFLAGS) -c -o \$$OBJF.pmd.o \$$OBJF.pmd.c; \
-			$(CROSS)ld $(LDFLAGS) -r -o \$$OBJF.o \$$OBJF.pmd.o \$$OBJF; \
-			mv -f \$$OBJF.o \$$OBJF; \
-		fi; \
-	fi;" && \
+	$(PMDINFO_TO_O) && \
 	echo $(C_TO_O_CMD) > $(call obj2cmd,$(@)) && \
 	sed 's,'$@':,dep_'$@' =,' $(call obj2dep,$(@)).tmp > $(call obj2dep,$(@)) && \
 	rm -f $(call obj2dep,$(@)).tmp
 
-
 # return an empty string if string are equal
 compare = $(strip $(subst $(1),,$(2)) $(subst $(2),,$(1)))
 
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH v2 06/10] pmdinfogen: fix build warnings
  2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 00/10] additions to pmdinfogen Thomas Monjalon
                     ` (4 preceding siblings ...)
  2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 05/10] mk: fix verbose pmdinfogen run Thomas Monjalon
@ 2016-07-08 10:14   ` Thomas Monjalon
  2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 07/10] pmdinfogen: fix usage message Thomas Monjalon
                     ` (4 subsequent siblings)
  10 siblings, 0 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 10:14 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

When compiled with a standard clang, pmdinfogen can raise a warning:
    buildtools/pmdinfogen/pmdinfogen.c:365:1: warning:
    control reaches end of non-void function

Actually there can be more warnings with stricter compilers.
In order to catch them early and fix most of them, the DPDK standard flags
WERROR_FLAGS are used.

The warnings fixed are:
    no previous prototype for ...
    no return statement in function returning non-void
    variable ‘secstrings’ set but not used
    ‘sec_name’ defined but not used
    ‘get_symbol_index’ defined but not used
    pointer of type ‘void *’ used in arithmetic

Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 buildtools/pmdinfogen/Makefile     |  4 +--
 buildtools/pmdinfogen/pmdinfogen.c | 58 ++++++++++++--------------------------
 2 files changed, 20 insertions(+), 42 deletions(-)

diff --git a/buildtools/pmdinfogen/Makefile b/buildtools/pmdinfogen/Makefile
index 125901b..3885d3b 100644
--- a/buildtools/pmdinfogen/Makefile
+++ b/buildtools/pmdinfogen/Makefile
@@ -41,9 +41,9 @@ HOSTAPP = pmdinfogen
 #
 SRCS-y += pmdinfogen.c
 
-HOST_EXTRA_CFLAGS += -g -I${RTE_OUTPUT}/include
+HOST_CFLAGS += $(WERROR_FLAGS) -g
+HOST_CFLAGS += -I$(RTE_OUTPUT)/include
 
 DEPDIRS-y += lib/librte_eal
 
 include $(RTE_SDK)/mk/rte.hostapp.mk
-
diff --git a/buildtools/pmdinfogen/pmdinfogen.c b/buildtools/pmdinfogen/pmdinfogen.c
index 0947dc6..beb06f1 100644
--- a/buildtools/pmdinfogen/pmdinfogen.c
+++ b/buildtools/pmdinfogen/pmdinfogen.c
@@ -15,6 +15,7 @@
 #include <limits.h>
 #include <stdbool.h>
 #include <errno.h>
+#include <rte_common.h>
 #include "pmdinfogen.h"
 
 #ifdef RTE_ARCH_64
@@ -32,7 +33,7 @@ static const char *sym_name(struct elf_info *elf, Elf_Sym *sym)
 		return "(unknown)";
 }
 
-void *grab_file(const char *filename, unsigned long *size)
+static void *grab_file(const char *filename, unsigned long *size)
 {
 	struct stat st;
 	void *map = MAP_FAILED;
@@ -59,7 +60,7 @@ failed:
   * spaces in the beginning of the line is trimmed away.
   * Return a pointer to a static buffer.
   **/
-void release_file(void *file, unsigned long size)
+static void release_file(void *file, unsigned long size)
 {
 	munmap(file, size);
 }
@@ -67,9 +68,8 @@ void release_file(void *file, unsigned long size)
 
 static void *get_sym_value(struct elf_info *info, const Elf_Sym *sym)
 {
-	void *ptr = (void *)info->hdr + info->sechdrs[sym->st_shndx].sh_offset;
-
-	return (void *)(ptr + sym->st_value);
+	return RTE_PTR_ADD(info->hdr,
+		info->sechdrs[sym->st_shndx].sh_offset + sym->st_value);
 }
 
 static Elf_Sym *find_sym_in_symtab(struct elf_info *info,
@@ -95,7 +95,6 @@ static int parse_elf(struct elf_info *info, const char *filename)
 	Elf_Ehdr *hdr;
 	Elf_Shdr *sechdrs;
 	Elf_Sym  *sym;
-	const char *secstrings;
 	int endian;
 	unsigned int symtab_idx = ~0U, symtab_shndx_idx = ~0U;
 
@@ -140,7 +139,7 @@ static int parse_elf(struct elf_info *info, const char *filename)
 	hdr->e_shnum     = TO_NATIVE(endian, 16, hdr->e_shnum);
 	hdr->e_shstrndx  = TO_NATIVE(endian, 16, hdr->e_shstrndx);
 
-	sechdrs = (void *)hdr + hdr->e_shoff;
+	sechdrs = RTE_PTR_ADD(hdr, hdr->e_shoff);
 	info->sechdrs = sechdrs;
 
 	/* Check if file offset is correct */
@@ -191,7 +190,6 @@ static int parse_elf(struct elf_info *info, const char *filename)
 			TO_NATIVE(endian, ADDR_SIZE, sechdrs[i].sh_entsize);
 	}
 	/* Find symbol table. */
-	secstrings = (void *)hdr + sechdrs[info->secindex_strings].sh_offset;
 	for (i = 1; i < info->num_sections; i++) {
 		int nobits = sechdrs[i].sh_type == SHT_NOBITS;
 
@@ -206,22 +204,22 @@ static int parse_elf(struct elf_info *info, const char *filename)
 		if (sechdrs[i].sh_type == SHT_SYMTAB) {
 			unsigned int sh_link_idx;
 			symtab_idx = i;
-			info->symtab_start = (void *)hdr +
-			    sechdrs[i].sh_offset;
-			info->symtab_stop  = (void *)hdr +
-			    sechdrs[i].sh_offset + sechdrs[i].sh_size;
+			info->symtab_start = RTE_PTR_ADD(hdr,
+				sechdrs[i].sh_offset);
+			info->symtab_stop  = RTE_PTR_ADD(hdr,
+				sechdrs[i].sh_offset + sechdrs[i].sh_size);
 			sh_link_idx = sechdrs[i].sh_link;
-			info->strtab       = (void *)hdr +
-			    sechdrs[sh_link_idx].sh_offset;
+			info->strtab       = RTE_PTR_ADD(hdr,
+				sechdrs[sh_link_idx].sh_offset);
 		}
 
 		/* 32bit section no. table? ("more than 64k sections") */
 		if (sechdrs[i].sh_type == SHT_SYMTAB_SHNDX) {
 			symtab_shndx_idx = i;
-			info->symtab_shndx_start = (void *)hdr +
-			    sechdrs[i].sh_offset;
-			info->symtab_shndx_stop  = (void *)hdr +
-			    sechdrs[i].sh_offset + sechdrs[i].sh_size;
+			info->symtab_shndx_start = RTE_PTR_ADD(hdr,
+				sechdrs[i].sh_offset);
+			info->symtab_shndx_stop  = RTE_PTR_ADD(hdr,
+				sechdrs[i].sh_offset + sechdrs[i].sh_size);
 		}
 	}
 	if (!info->symtab_start)
@@ -262,28 +260,6 @@ static void parse_elf_finish(struct elf_info *info)
 	}
 }
 
-static const char *sec_name(struct elf_info *elf, int secindex)
-{
-	Elf_Shdr *sechdrs = elf->sechdrs;
-	return (void *)elf->hdr +
-		elf->sechdrs[elf->secindex_strings].sh_offset +
-		sechdrs[secindex].sh_name;
-}
-
-static int get_symbol_index(struct elf_info *info, Elf_Sym *sym)
-{
-	const char *name =  sym_name(info, sym);
-	const char *idx;
-
-	idx = name;
-	while (idx) {
-		if (isdigit(*idx))
-			return atoi(idx);
-		idx++;
-	}
-	return -1;
-}
-
 struct opt_tag {
 	const char *suffix;
 	const char *json_id;
@@ -362,6 +338,8 @@ static int locate_pmd_entries(struct elf_info *info)
 			}
 		}
 	} while (last);
+
+	return 0;
 }
 
 static void output_pmd_info_string(struct elf_info *info, char *outfile)
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH v2 07/10] pmdinfogen: fix usage message
  2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 00/10] additions to pmdinfogen Thomas Monjalon
                     ` (5 preceding siblings ...)
  2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 06/10] pmdinfogen: fix build warnings Thomas Monjalon
@ 2016-07-08 10:14   ` Thomas Monjalon
  2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 08/10] eal: move PCI table macro Thomas Monjalon
                     ` (3 subsequent siblings)
  10 siblings, 0 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 10:14 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

The name of the tool is pmdinfogen.

Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 buildtools/pmdinfogen/pmdinfogen.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/buildtools/pmdinfogen/pmdinfogen.c b/buildtools/pmdinfogen/pmdinfogen.c
index beb06f1..717c8d4 100644
--- a/buildtools/pmdinfogen/pmdinfogen.c
+++ b/buildtools/pmdinfogen/pmdinfogen.c
@@ -398,7 +398,8 @@ int main(int argc, char **argv)
 
 	if (argc < 3) {
 		fprintf(stderr,
-			"usage: pmdinfo <object file> <c output file>\n");
+			"usage: %s <object file> <c output file>\n",
+			basename(argv[0]));
 		exit(127);
 	}
 	parse_elf(&info, argv[1]);
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH v2 08/10] eal: move PCI table macro
  2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 00/10] additions to pmdinfogen Thomas Monjalon
                     ` (6 preceding siblings ...)
  2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 07/10] pmdinfogen: fix usage message Thomas Monjalon
@ 2016-07-08 10:14   ` Thomas Monjalon
  2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 09/10] doc: fix syntax in pmdinfogen guide Thomas Monjalon
                     ` (2 subsequent siblings)
  10 siblings, 0 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 10:14 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

Remove include of rte_pci.h in the generic header rte_dev.h
and move the macro DRIVER_REGISTER_PCI_TABLE in rte_pci.h.

Fixes: cb6696d22023 ("drivers: update registration macro usage")

Suggested-by: David Marchand <david.marchand@6wind.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 lib/librte_eal/common/include/rte_dev.h | 6 +-----
 lib/librte_eal/common/include/rte_pci.h | 5 +++++
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
index e6f0d4c..68ca7ef 100644
--- a/lib/librte_eal/common/include/rte_dev.h
+++ b/lib/librte_eal/common/include/rte_dev.h
@@ -48,7 +48,7 @@ extern "C" {
 
 #include <stdio.h>
 #include <sys/queue.h>
-#include <rte_pci.h>
+
 #include <rte_log.h>
 
 __attribute__((format(printf, 2, 0)))
@@ -195,10 +195,6 @@ DRIVER_EXPORT_NAME(nm, __COUNTER__)
 
 #define DRV_EXP_TAG(name, tag) __##name##_##tag
 
-#define DRIVER_REGISTER_PCI_TABLE(name, table) \
-static const char DRV_EXP_TAG(name, pci_tbl_export)[] __attribute__((used)) = \
-RTE_STR(table)
-
 #define DRIVER_REGISTER_PARAM_STRING(name, str) \
 static const char DRV_EXP_TAG(name, param_string_export)[] \
 __attribute__((used)) = str
diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h
index fa74962..3b0d26a 100644
--- a/lib/librte_eal/common/include/rte_pci.h
+++ b/lib/librte_eal/common/include/rte_pci.h
@@ -188,6 +188,11 @@ struct rte_pci_device {
 	.subsystem_device_id = PCI_ANY_ID
 #endif
 
+#define DRIVER_REGISTER_PCI_TABLE(name, table) \
+static const char __##name##_pci_tbl_export[] \
+	__attribute__((used)) = \
+	RTE_STR(table)
+
 struct rte_pci_driver;
 
 /**
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH v2 09/10] doc: fix syntax in pmdinfogen guide
  2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 00/10] additions to pmdinfogen Thomas Monjalon
                     ` (7 preceding siblings ...)
  2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 08/10] eal: move PCI table macro Thomas Monjalon
@ 2016-07-08 10:14   ` Thomas Monjalon
  2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 10/10] maintainers: add section for pmdinfo Thomas Monjalon
  2016-07-08 14:42   ` [dpdk-dev] [PATCH v3 00/10] additions to pmdinfogen Thomas Monjalon
  10 siblings, 0 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 10:14 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

Sphynx reports this error:

doc/guides/prog_guide/dev_kit_build_system.rst:337: WARNING:
Pygments lexer name u'C' is not known

Fixes: 737ddf3fb ("doc: add prog guide section documenting pmdinfo script")

Reported-by: Bernard Iremonger <bernard.iremonger@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
---
 doc/guides/prog_guide/dev_kit_build_system.rst | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/doc/guides/prog_guide/dev_kit_build_system.rst b/doc/guides/prog_guide/dev_kit_build_system.rst
index 1dc1388..18a3010 100644
--- a/doc/guides/prog_guide/dev_kit_build_system.rst
+++ b/doc/guides/prog_guide/dev_kit_build_system.rst
@@ -319,8 +319,7 @@ instance the macro:
 
 .. code-block:: c
 
-    PMD_REGISTER_DRIVER(drv, name)
-
+   PMD_REGISTER_DRIVER(drv, name)
 
 Creates the following symbol:
 
@@ -334,7 +333,7 @@ can be exported from the object file and used to produce a hardware support
 description, that pmdinfogen then encodes into a json formatted string in the
 following format:
 
-.. code-block:: C
+.. code-block:: c
 
    static char <name_pmd_string>="PMD_INFO_STRING=\"{'name' : '<name>', ...}\"";
 
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH v2 10/10] maintainers: add section for pmdinfo
  2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 00/10] additions to pmdinfogen Thomas Monjalon
                     ` (8 preceding siblings ...)
  2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 09/10] doc: fix syntax in pmdinfogen guide Thomas Monjalon
@ 2016-07-08 10:14   ` Thomas Monjalon
  2016-07-08 14:42   ` [dpdk-dev] [PATCH v3 00/10] additions to pmdinfogen Thomas Monjalon
  10 siblings, 0 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 10:14 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

The author of this feature is Neil Horman.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
---
 MAINTAINERS | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index a59191e..f996c2e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -68,6 +68,10 @@ F: lib/librte_compat/
 F: doc/guides/rel_notes/deprecation.rst
 F: scripts/validate-abi.sh
 
+Driver information
+F: buildtools/pmdinfogen/
+F: tools/pmdinfo.py
+
 
 Environment Abstraction Layer
 -----------------------------
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 09/11] eal: move PCI table macro
  2016-07-08  8:49       ` David Marchand
@ 2016-07-08 13:56         ` Neil Horman
  2016-07-08 14:03           ` Thomas Monjalon
  0 siblings, 1 reply; 66+ messages in thread
From: Neil Horman @ 2016-07-08 13:56 UTC (permalink / raw)
  To: David Marchand; +Cc: Thomas Monjalon, dev, Jan Viktorin

On Fri, Jul 08, 2016 at 10:49:25AM +0200, David Marchand wrote:
> Hello Thomas, Neil,
> 
> (will be back in a couple of days, thanks Thomas for pointing this thread)
> 
> 
> On Thu, Jul 7, 2016 at 6:25 PM, Thomas Monjalon
> <thomas.monjalon@6wind.com> wrote:
> > 2016-07-07 12:11, Neil Horman:
> >> On Thu, Jul 07, 2016 at 05:36:28PM +0200, Thomas Monjalon wrote:
> >> > Remove include of rte_pci.h in the generic header rte_dev.h
> >> > and move the macro DRIVER_REGISTER_PCI_TABLE in rte_pci.h.
> > [...]
> >>
> >> This seems strange to me, in that its odd for the driver information export
> >> macros to be spread out in multiple locations.  Specifically it enjoins the use
> >> of the DRV_EXP_TAG macro, which helps centralize tag naming.  Perhaps the happy
> >> medium is to place all the export macros (includnig PMD_REGISTER_DRIVER) into
> >> its own pmd_register.h header?
> >
> > I don't know.
> > David, your opinion?
> 
> - The suggestion I did offline to Thomas was to move pci stuff in pci headers.
> We are trying to move from the "all pci" code in eal to accomodate for
> other "buses" / architectures.
I get that, but I'm not sure that applies here.  The macro in question is
specific to pci busses, and if there is additional bus information to export, it
will have its own macro (e.g. DRIVER_REGISTER_USB_TABLE or some such).  While
I could see that being an argument for putting each macro in with its own bus
type, I think thats the wrong organization here, in that people writing drivers
will want to know what export macros are available and will expect to look in a
single place for it.

> Having a pci macro in a generic header like rte_dev.h is wrong to me.
> Moving this to a new header like pmd_register.h sounds like a new
> generic header with pci specific stuff in it.
Well, yes, but I see that as no different than rte_ethdev.c or rte_pdump.c.
both of those files will need to know about all the different types of busses
you support and have to include those corresponding header files (i.e. they will
have to include rte_pci.h, rte_usb.h, rte_i2c.h, etc).  This is really no
different in my mind. 

> So, I am not sure I follow you Neil.
> 
> Can you elaborate ?
> 
I suppose the best way to describe it is that while I understand and support the
desire to separate and abstract bus information away from device function, I
think theres a pragmatic descision here to prioritize functional domain over
header inclusion.  That is to say, I think when people are writing a driver, it
will be helpful to have all the export macros in a single location so they know
what information they can export, and that includes registration of various bus
type identifiers.  So a file like pmd_registration.h that includes rte_pci.h,
rte_usb.h, rte_i2c.h, etc is more useful to a developer, than spreading these
macros out to those various header files, for the sake of avoiding a potentially
unneeded include.

> 
> - Why do you want to centralise the tag naming ?
> To avoid collisions ?
Yes, and to centralize that information.  Since the pmdinfogen tool needs to
know what those tag names are as well, its useful to keep them in the same area
to maintain co-ordination.  Its also useful because it means we can use one
macro to define tag naming convention, instead of having to re-implement or
dead-reckon it in multiple files.

> Well, adding those tags should not happen that often and I think we
> can maintain this with careful reviews.
I don't agree with that.  This discussion is based on the fact that you expect
that we will be adding additional bus types in the future correct?  Well, given
that we have a pci bus specific export macro, I would expect that to proliferate
to every other bus type as well, and so we can expect to at least have a new
tag added for every bus that is added, in addition to any other bus agnostic
information people wish to export (just off hand, looking at the linux modinfo
section, we might expect module author, module version, alias names, licensing
infomration, and others to be potential export candidates).  So, depending on
how much this is adopted, I think we can potentially expect a great deal of
additional tagging to be needed.

Neil

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 09/11] eal: move PCI table macro
  2016-07-08 13:56         ` Neil Horman
@ 2016-07-08 14:03           ` Thomas Monjalon
  2016-07-08 14:13             ` Neil Horman
  0 siblings, 1 reply; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 14:03 UTC (permalink / raw)
  To: Neil Horman; +Cc: David Marchand, dev, Jan Viktorin

2016-07-08 09:56, Neil Horman:
> On Fri, Jul 08, 2016 at 10:49:25AM +0200, David Marchand wrote:
> > Hello Thomas, Neil,
> > 
> > (will be back in a couple of days, thanks Thomas for pointing this thread)
> > 
> > 
> > On Thu, Jul 7, 2016 at 6:25 PM, Thomas Monjalon
> > <thomas.monjalon@6wind.com> wrote:
> > > 2016-07-07 12:11, Neil Horman:
> > >> On Thu, Jul 07, 2016 at 05:36:28PM +0200, Thomas Monjalon wrote:
> > >> > Remove include of rte_pci.h in the generic header rte_dev.h
> > >> > and move the macro DRIVER_REGISTER_PCI_TABLE in rte_pci.h.
> > > [...]
> > >>
> > >> This seems strange to me, in that its odd for the driver information export
> > >> macros to be spread out in multiple locations.  Specifically it enjoins the use
> > >> of the DRV_EXP_TAG macro, which helps centralize tag naming.  Perhaps the happy
> > >> medium is to place all the export macros (includnig PMD_REGISTER_DRIVER) into
> > >> its own pmd_register.h header?
> > >
> > > I don't know.
> > > David, your opinion?
> > 
> > - The suggestion I did offline to Thomas was to move pci stuff in pci headers.
> > We are trying to move from the "all pci" code in eal to accomodate for
> > other "buses" / architectures.
> I get that, but I'm not sure that applies here.  The macro in question is
> specific to pci busses, and if there is additional bus information to export, it
> will have its own macro (e.g. DRIVER_REGISTER_USB_TABLE or some such).  While
> I could see that being an argument for putting each macro in with its own bus
> type, I think thats the wrong organization here, in that people writing drivers
> will want to know what export macros are available and will expect to look in a
> single place for it.
> 
> > Having a pci macro in a generic header like rte_dev.h is wrong to me.
> > Moving this to a new header like pmd_register.h sounds like a new
> > generic header with pci specific stuff in it.
> Well, yes, but I see that as no different than rte_ethdev.c or rte_pdump.c.
> both of those files will need to know about all the different types of busses
> you support and have to include those corresponding header files (i.e. they will
> have to include rte_pci.h, rte_usb.h, rte_i2c.h, etc).  This is really no
> different in my mind. 
> 
> > So, I am not sure I follow you Neil.
> > 
> > Can you elaborate ?
> > 
> I suppose the best way to describe it is that while I understand and support the
> desire to separate and abstract bus information away from device function, I
> think theres a pragmatic descision here to prioritize functional domain over
> header inclusion.  That is to say, I think when people are writing a driver, it
> will be helpful to have all the export macros in a single location so they know
> what information they can export, and that includes registration of various bus
> type identifiers.  So a file like pmd_registration.h that includes rte_pci.h,
> rte_usb.h, rte_i2c.h, etc is more useful to a developer, than spreading these
> macros out to those various header files, for the sake of avoiding a potentially
> unneeded include.
> 
> > 
> > - Why do you want to centralise the tag naming ?
> > To avoid collisions ?
> Yes, and to centralize that information.  Since the pmdinfogen tool needs to
> know what those tag names are as well, its useful to keep them in the same area
> to maintain co-ordination.  Its also useful because it means we can use one
> macro to define tag naming convention, instead of having to re-implement or
> dead-reckon it in multiple files.
> 
> > Well, adding those tags should not happen that often and I think we
> > can maintain this with careful reviews.
> I don't agree with that.  This discussion is based on the fact that you expect
> that we will be adding additional bus types in the future correct?  Well, given
> that we have a pci bus specific export macro, I would expect that to proliferate
> to every other bus type as well, and so we can expect to at least have a new
> tag added for every bus that is added, in addition to any other bus agnostic
> information people wish to export (just off hand, looking at the linux modinfo
> section, we might expect module author, module version, alias names, licensing
> infomration, and others to be potential export candidates).  So, depending on
> how much this is adopted, I think we can potentially expect a great deal of
> additional tagging to be needed.

Anyway, this macro do not need rte_pci.h.
So the minimal patch can be to just remove this include.

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 09/11] eal: move PCI table macro
  2016-07-08 14:03           ` Thomas Monjalon
@ 2016-07-08 14:13             ` Neil Horman
  0 siblings, 0 replies; 66+ messages in thread
From: Neil Horman @ 2016-07-08 14:13 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: David Marchand, dev, Jan Viktorin

On Fri, Jul 08, 2016 at 04:03:40PM +0200, Thomas Monjalon wrote:
> 2016-07-08 09:56, Neil Horman:
> > On Fri, Jul 08, 2016 at 10:49:25AM +0200, David Marchand wrote:
> > > Hello Thomas, Neil,
> > > 
> > > (will be back in a couple of days, thanks Thomas for pointing this thread)
> > > 
> > > 
> > > On Thu, Jul 7, 2016 at 6:25 PM, Thomas Monjalon
> > > <thomas.monjalon@6wind.com> wrote:
> > > > 2016-07-07 12:11, Neil Horman:
> > > >> On Thu, Jul 07, 2016 at 05:36:28PM +0200, Thomas Monjalon wrote:
> > > >> > Remove include of rte_pci.h in the generic header rte_dev.h
> > > >> > and move the macro DRIVER_REGISTER_PCI_TABLE in rte_pci.h.
> > > > [...]
> > > >>
> > > >> This seems strange to me, in that its odd for the driver information export
> > > >> macros to be spread out in multiple locations.  Specifically it enjoins the use
> > > >> of the DRV_EXP_TAG macro, which helps centralize tag naming.  Perhaps the happy
> > > >> medium is to place all the export macros (includnig PMD_REGISTER_DRIVER) into
> > > >> its own pmd_register.h header?
> > > >
> > > > I don't know.
> > > > David, your opinion?
> > > 
> > > - The suggestion I did offline to Thomas was to move pci stuff in pci headers.
> > > We are trying to move from the "all pci" code in eal to accomodate for
> > > other "buses" / architectures.
> > I get that, but I'm not sure that applies here.  The macro in question is
> > specific to pci busses, and if there is additional bus information to export, it
> > will have its own macro (e.g. DRIVER_REGISTER_USB_TABLE or some such).  While
> > I could see that being an argument for putting each macro in with its own bus
> > type, I think thats the wrong organization here, in that people writing drivers
> > will want to know what export macros are available and will expect to look in a
> > single place for it.
> > 
> > > Having a pci macro in a generic header like rte_dev.h is wrong to me.
> > > Moving this to a new header like pmd_register.h sounds like a new
> > > generic header with pci specific stuff in it.
> > Well, yes, but I see that as no different than rte_ethdev.c or rte_pdump.c.
> > both of those files will need to know about all the different types of busses
> > you support and have to include those corresponding header files (i.e. they will
> > have to include rte_pci.h, rte_usb.h, rte_i2c.h, etc).  This is really no
> > different in my mind. 
> > 
> > > So, I am not sure I follow you Neil.
> > > 
> > > Can you elaborate ?
> > > 
> > I suppose the best way to describe it is that while I understand and support the
> > desire to separate and abstract bus information away from device function, I
> > think theres a pragmatic descision here to prioritize functional domain over
> > header inclusion.  That is to say, I think when people are writing a driver, it
> > will be helpful to have all the export macros in a single location so they know
> > what information they can export, and that includes registration of various bus
> > type identifiers.  So a file like pmd_registration.h that includes rte_pci.h,
> > rte_usb.h, rte_i2c.h, etc is more useful to a developer, than spreading these
> > macros out to those various header files, for the sake of avoiding a potentially
> > unneeded include.
> > 
> > > 
> > > - Why do you want to centralise the tag naming ?
> > > To avoid collisions ?
> > Yes, and to centralize that information.  Since the pmdinfogen tool needs to
> > know what those tag names are as well, its useful to keep them in the same area
> > to maintain co-ordination.  Its also useful because it means we can use one
> > macro to define tag naming convention, instead of having to re-implement or
> > dead-reckon it in multiple files.
> > 
> > > Well, adding those tags should not happen that often and I think we
> > > can maintain this with careful reviews.
> > I don't agree with that.  This discussion is based on the fact that you expect
> > that we will be adding additional bus types in the future correct?  Well, given
> > that we have a pci bus specific export macro, I would expect that to proliferate
> > to every other bus type as well, and so we can expect to at least have a new
> > tag added for every bus that is added, in addition to any other bus agnostic
> > information people wish to export (just off hand, looking at the linux modinfo
> > section, we might expect module author, module version, alias names, licensing
> > infomration, and others to be potential export candidates).  So, depending on
> > how much this is adopted, I think we can potentially expect a great deal of
> > additional tagging to be needed.
> 
> Anyway, this macro do not need rte_pci.h.
> So the minimal patch can be to just remove this include.
> 
Oh my gosh!  I've been an idiot!  you're absolutely right. The macro is just
defining a string to point to the pci_table symbol name, its not typed to the
pci_tbl symbol at all, and so we can just remove the header file.  Somehow I had
it in my head that the macro created a pci specific typed symbol, but it totally
doesn't.  Apologies.

Yes, just removing the include <rte_pci.h> is exactly the right move here.
Neil

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH v3 00/10] additions to pmdinfogen
  2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 00/10] additions to pmdinfogen Thomas Monjalon
                     ` (9 preceding siblings ...)
  2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 10/10] maintainers: add section for pmdinfo Thomas Monjalon
@ 2016-07-08 14:42   ` Thomas Monjalon
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 01/10] drivers: fix build with new register macro Thomas Monjalon
                       ` (10 more replies)
  10 siblings, 11 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 14:42 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

These are some patches that I think needed for RC2.
There are other patches needed as discussed on the mailing-list which
are not part of this series:
  - overwritten driver name (reported by Pablo)
  - pmdinfo.py on FreeBSD (reported by Bruce)

Note: RC2 is planned to be out at the end of this week.

v3 change:
- do not move PCI registration macro in rte_pci.h
v2 changes:
- use argv[0] in usage message
- drop fix of parameters registration which is better managed
  in Neil's patch "crypto: normalize cryptodev pmd names with macros"
  http://dpdk.org/ml/archives/dev/2016-July/043506.html


Thomas Monjalon (10):
  drivers: fix build with new register macro
  mk: fix build dependency of drivers on pmdinfogen
  mk: remove traces of hostapp build directory
  mk: fix driver build with installed SDK
  mk: fix verbose pmdinfogen run
  pmdinfogen: fix build warnings
  pmdinfogen: fix usage message
  eal: remove PCI include from generic driver header
  doc: fix syntax in pmdinfogen guide
  maintainers: add section for pmdinfo

 MAINTAINERS                                    |  4 ++
 buildtools/pmdinfogen/Makefile                 |  4 +-
 buildtools/pmdinfogen/pmdinfogen.c             | 61 +++++++++-----------------
 doc/guides/freebsd_gsg/build_dpdk.rst          |  2 +-
 doc/guides/linux_gsg/build_dpdk.rst            |  2 +-
 doc/guides/prog_guide/dev_kit_build_system.rst |  5 +--
 drivers/Makefile                               |  2 -
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c     |  2 +-
 drivers/net/mlx4/mlx4.c                        |  2 +-
 drivers/net/mlx5/mlx5.c                        |  2 +-
 lib/librte_eal/common/include/rte_dev.h        |  2 +-
 mk/internal/rte.compile-pre.mk                 | 26 +++++------
 mk/rte.sdkbuild.mk                             |  6 +--
 mk/rte.sdkconfig.mk                            |  2 +-
 mk/rte.sdkinstall.mk                           |  8 ++--
 15 files changed, 54 insertions(+), 76 deletions(-)

-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH v3 01/10] drivers: fix build with new register macro
  2016-07-08 14:42   ` [dpdk-dev] [PATCH v3 00/10] additions to pmdinfogen Thomas Monjalon
@ 2016-07-08 14:42     ` Thomas Monjalon
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 02/10] mk: fix build dependency of drivers on pmdinfogen Thomas Monjalon
                       ` (9 subsequent siblings)
  10 siblings, 0 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 14:42 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

Compilation fails because of some typos.

Fixes: cb6696d22023 ("drivers: update registration macro usage")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Tested-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 2 +-
 drivers/net/mlx4/mlx4.c                    | 2 +-
 drivers/net/mlx5/mlx5.c                    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index db3e562..859a04b 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -721,6 +721,6 @@ static struct rte_driver cryptodev_aesni_mb_pmd_drv = {
 	.uninit = cryptodev_aesni_mb_uninit
 };
 
-PMD_REGISTER_DRIVER(cryptodev_aesni_mb_pmd_drvi, aesni_mb);
+PMD_REGISTER_DRIVER(cryptodev_aesni_mb_pmd_drv, aesni_mb);
 DRIVER_REGISTER_PARAM_STRING(aesni_gcm, "max_nb_queue_pairs=<int> "
 "max_nb_sessions=<int> socket_id=<int>");
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 8758eac..d9ffb13 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -5861,5 +5861,5 @@ static struct rte_driver rte_mlx4_driver = {
 	.init = rte_mlx4_pmd_init,
 };
 
-PMD_REGISTER_DRIVER(rte_mlx4_driveri, mlx4)
+PMD_REGISTER_DRIVER(rte_mlx4_driver, mlx4);
 DRIVER_REGISTER_PCI_TABLE(mlx4, mlx4_pci_id_map);
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 358e9b4..8d32252 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -762,5 +762,5 @@ static struct rte_driver rte_mlx5_driver = {
 	.init = rte_mlx5_pmd_init,
 };
 
-PMD_REGISTER_DRIVER(rte_mlx5_driveri, mlx5)
+PMD_REGISTER_DRIVER(rte_mlx5_driver, mlx5);
 DRIVER_REGISTER_PCI_TABLE(mlx5, mlx5_pci_id_map);
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH v3 02/10] mk: fix build dependency of drivers on pmdinfogen
  2016-07-08 14:42   ` [dpdk-dev] [PATCH v3 00/10] additions to pmdinfogen Thomas Monjalon
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 01/10] drivers: fix build with new register macro Thomas Monjalon
@ 2016-07-08 14:42     ` Thomas Monjalon
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 03/10] mk: remove traces of hostapp build directory Thomas Monjalon
                       ` (8 subsequent siblings)
  10 siblings, 0 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 14:42 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

When compiling the drivers, some code is generated with pmdinfogen.
A fresh parallel build can fail if a driver is compiled before pmdinfogen:
	build/buildtools/dpdk-pmdinfogen: Permission denied

There was a dependency declared in drivers/Makefile but it cannot work
because this file is based on mk/rte.subdir.mk which do not handle
dependencies.

It is fixed by declaring the whole buildtools as (order only) prerequisite
of drivers.

Fixes: cb6696d22023 ("drivers: update registration macro usage")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
---
 drivers/Makefile   | 2 --
 mk/rte.sdkbuild.mk | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 75a3168..81c03a8 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -34,6 +34,4 @@ include $(RTE_SDK)/mk/rte.vars.mk
 DIRS-y += net
 DIRS-$(CONFIG_RTE_LIBRTE_CRYPTODEV) += crypto
 
-DEPDIRS-y += buildtools/pmdinfo
-
 include $(RTE_SDK)/mk/rte.subdir.mk
diff --git a/mk/rte.sdkbuild.mk b/mk/rte.sdkbuild.mk
index fb68af2..354f006 100644
--- a/mk/rte.sdkbuild.mk
+++ b/mk/rte.sdkbuild.mk
@@ -49,6 +49,7 @@ $(1): $(sort $(LOCAL_DEPDIRS-$(1)))
 endef
 
 $(foreach d,$(ROOTDIRS-y),$(eval $(call depdirs_rule,$(d))))
+drivers: | buildtools
 
 #
 # build and clean targets
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH v3 03/10] mk: remove traces of hostapp build directory
  2016-07-08 14:42   ` [dpdk-dev] [PATCH v3 00/10] additions to pmdinfogen Thomas Monjalon
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 01/10] drivers: fix build with new register macro Thomas Monjalon
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 02/10] mk: fix build dependency of drivers on pmdinfogen Thomas Monjalon
@ 2016-07-08 14:42     ` Thomas Monjalon
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 04/10] mk: fix driver build with installed SDK Thomas Monjalon
                       ` (7 subsequent siblings)
  10 siblings, 0 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 14:42 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

The recipe rte.hostapp.mk does not build in hostapp/ anymore.

Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
---
 doc/guides/freebsd_gsg/build_dpdk.rst | 2 +-
 doc/guides/linux_gsg/build_dpdk.rst   | 2 +-
 mk/rte.sdkbuild.mk                    | 5 ++---
 mk/rte.sdkconfig.mk                   | 2 +-
 4 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/doc/guides/freebsd_gsg/build_dpdk.rst b/doc/guides/freebsd_gsg/build_dpdk.rst
index 1d92c08..93c4366 100644
--- a/doc/guides/freebsd_gsg/build_dpdk.rst
+++ b/doc/guides/freebsd_gsg/build_dpdk.rst
@@ -183,7 +183,7 @@ contains the kernel modules to install:
 
     ls x86_64-native-bsdapp-gcc
 
-    app build hostapp include kmod lib Makefile
+    app build include kmod lib Makefile
 
 
 .. _loading_contigmem:
diff --git a/doc/guides/linux_gsg/build_dpdk.rst b/doc/guides/linux_gsg/build_dpdk.rst
index 198c0b6..fb2c481 100644
--- a/doc/guides/linux_gsg/build_dpdk.rst
+++ b/doc/guides/linux_gsg/build_dpdk.rst
@@ -152,7 +152,7 @@ A kmod  directory is also present that contains kernel modules which may be load
 
     ls x86_64-native-linuxapp-gcc
 
-    app build hostapp include kmod lib Makefile
+    app build include kmod lib Makefile
 
 Loading Modules to Enable Userspace IO for DPDK
 -----------------------------------------------
diff --git a/mk/rte.sdkbuild.mk b/mk/rte.sdkbuild.mk
index 354f006..23fcf1e 100644
--- a/mk/rte.sdkbuild.mk
+++ b/mk/rte.sdkbuild.mk
@@ -64,9 +64,8 @@ build: $(ROOTDIRS-y)
 .PHONY: clean
 clean: $(CLEANDIRS)
 	@rm -rf $(RTE_OUTPUT)/include $(RTE_OUTPUT)/app \
-		$(RTE_OUTPUT)/hostapp $(RTE_OUTPUT)/lib \
-		$(RTE_OUTPUT)/hostlib $(RTE_OUTPUT)/kmod \
-		$(RTE_OUTPUT)/buildtools
+		$(RTE_OUTPUT)/lib \
+		$(RTE_OUTPUT)/hostlib $(RTE_OUTPUT)/kmod
 	@[ -d $(RTE_OUTPUT)/include ] || mkdir -p $(RTE_OUTPUT)/include
 	@$(RTE_SDK)/scripts/gen-config-h.sh $(RTE_OUTPUT)/.config \
 		> $(RTE_OUTPUT)/include/rte_config.h
diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk
index a3acfe6..068d787 100644
--- a/mk/rte.sdkconfig.mk
+++ b/mk/rte.sdkconfig.mk
@@ -108,7 +108,7 @@ $(RTE_OUTPUT)/Makefile: | $(RTE_OUTPUT)
 # if NODOTCONF variable is defined, don't try to rebuild .config
 $(RTE_OUTPUT)/include/rte_config.h: $(RTE_OUTPUT)/.config
 	$(Q)rm -rf $(RTE_OUTPUT)/include $(RTE_OUTPUT)/app \
-		$(RTE_OUTPUT)/hostapp $(RTE_OUTPUT)/lib \
+		$(RTE_OUTPUT)/lib \
 		$(RTE_OUTPUT)/hostlib $(RTE_OUTPUT)/kmod $(RTE_OUTPUT)/build
 	$(Q)mkdir -p $(RTE_OUTPUT)/include
 	$(Q)$(RTE_SDK)/scripts/gen-config-h.sh $(RTE_OUTPUT)/.config \
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH v3 04/10] mk: fix driver build with installed SDK
  2016-07-08 14:42   ` [dpdk-dev] [PATCH v3 00/10] additions to pmdinfogen Thomas Monjalon
                       ` (2 preceding siblings ...)
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 03/10] mk: remove traces of hostapp build directory Thomas Monjalon
@ 2016-07-08 14:42     ` Thomas Monjalon
  2016-07-08 14:53       ` Neil Horman
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 05/10] mk: fix verbose pmdinfogen run Thomas Monjalon
                       ` (6 subsequent siblings)
  10 siblings, 1 reply; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 14:42 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

The tool pmdinfogen was called from RTE_OUTPUT/app/ which does not exist
if building a driver outside of the SDK build.
When building DPDK, RTE_SDK_BIN is RTE_OUTPUT. When building an external
driver, RTE_SDK_BIN must point to the installed DPDK directory containing
includes, libs, etc.

That's why pmdinfogen must be installed in the SDK directory and be part
of the SDK installation.

Fixes: 3d781ca32874 ("mk: do post processing on objects that register a driver")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 mk/internal/rte.compile-pre.mk | 2 +-
 mk/rte.sdkinstall.mk           | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/mk/internal/rte.compile-pre.mk b/mk/internal/rte.compile-pre.mk
index 5632d6e..87d2d93 100644
--- a/mk/internal/rte.compile-pre.mk
+++ b/mk/internal/rte.compile-pre.mk
@@ -92,7 +92,7 @@ C_TO_O_DO = @set -e; \
 	if [ \$$? -eq 0 ]; then \
 		echo \"  PMDINFOGEN\" $@; \
 		OBJF=`readlink -f $@`; \
-		${RTE_OUTPUT}/app/pmdinfogen \$$OBJF \$$OBJF.pmd.c; \
+		$(RTE_SDK_BIN)/app/pmdinfogen \$$OBJF \$$OBJF.pmd.c; \
 		if [ \$$? -eq 0 ]; \
 		then \
 			echo \"  PMDINFOBUILD\" $@; \
diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk
index b0d985c..7cd352c 100644
--- a/mk/rte.sdkinstall.mk
+++ b/mk/rte.sdkinstall.mk
@@ -117,6 +117,7 @@ install-runtime:
 	$(Q)cp -a    $O/lib/* $(DESTDIR)$(libdir)
 	$(Q)$(call rte_mkdir, $(DESTDIR)$(bindir))
 	$(Q)tar -cf -      -C $O --exclude 'app/*.map' \
+		--exclude app/pmdinfogen \
 		--exclude 'app/cmdline*' --exclude app/test \
 		--exclude app/testacl --exclude app/testpipeline app | \
 	    tar -xf -      -C $(DESTDIR)$(bindir) --strip-components=1 \
@@ -126,10 +127,8 @@ install-runtime:
 	$(Q)$(call rte_mkdir,      $(DESTDIR)$(sbindir))
 	$(Q)$(call rte_symlink,    $(DESTDIR)$(datadir)/tools/dpdk_nic_bind.py, \
 	                           $(DESTDIR)$(sbindir)/dpdk_nic_bind)
-	$(Q)$(call rte_symlink,    $(DESTDIR)$(bindir)/pmdinfogen, \
-				   $(DESTDIR)$(bindir)/dpdk_pmdinfogen)
 	$(Q)$(call rte_symlink,    $(DESTDIR)$(datadir)/tools/pmdinfo.py, \
-				   $(DESTDIR)$(bindir)/dpdk_pmdinfo)
+	                           $(DESTDIR)$(bindir)/dpdk_pmdinfo)
 
 install-kmod:
 ifneq ($(wildcard $O/kmod/*),)
@@ -145,8 +144,9 @@ install-sdk:
 	$(Q)$(call rte_mkdir,                            $(DESTDIR)$(sdkdir))
 	$(Q)cp -a               $(RTE_SDK)/mk            $(DESTDIR)$(sdkdir)
 	$(Q)cp -a               $(RTE_SDK)/scripts       $(DESTDIR)$(sdkdir)
-	$(Q)$(call rte_mkdir,                            $(DESTDIR)$(targetdir))
+	$(Q)$(call rte_mkdir,                            $(DESTDIR)$(targetdir)/app)
 	$(Q)cp -a               $O/.config               $(DESTDIR)$(targetdir)
+	$(Q)cp -a               $O/app/pmdinfogen        $(DESTDIR)$(targetdir)/app
 	$(Q)$(call rte_symlink, $(DESTDIR)$(includedir), $(DESTDIR)$(targetdir)/include)
 	$(Q)$(call rte_symlink, $(DESTDIR)$(libdir),     $(DESTDIR)$(targetdir)/lib)
 
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH v3 05/10] mk: fix verbose pmdinfogen run
  2016-07-08 14:42   ` [dpdk-dev] [PATCH v3 00/10] additions to pmdinfogen Thomas Monjalon
                       ` (3 preceding siblings ...)
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 04/10] mk: fix driver build with installed SDK Thomas Monjalon
@ 2016-07-08 14:42     ` Thomas Monjalon
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 06/10] pmdinfogen: fix build warnings Thomas Monjalon
                       ` (5 subsequent siblings)
  10 siblings, 0 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 14:42 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

When building with "make V=1" it is expected to see the output of each
compiler command in order to debug them.
Unfortunately the pmdinfogen related commands were always quiet.

It is fixed by defining the commands in some Makefile variables.
They are printed if the verbose mode is enabled.

The other benefit of this rework is to stop compilation after a
failure with pmdinfogen.

The command readlink is removed in this rework because it seems useless.

Fixes: 3d781ca32874 ("mk: do post processing on objects that register a driver")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
---
 mk/internal/rte.compile-pre.mk | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/mk/internal/rte.compile-pre.mk b/mk/internal/rte.compile-pre.mk
index 87d2d93..9c25ff6 100644
--- a/mk/internal/rte.compile-pre.mk
+++ b/mk/internal/rte.compile-pre.mk
@@ -84,28 +84,26 @@ C_TO_O = $(CC) -Wp,-MD,$(call obj2dep,$(@)).tmp $(CFLAGS) \
 C_TO_O_STR = $(subst ','\'',$(C_TO_O)) #'# fix syntax highlight
 C_TO_O_DISP = $(if $(V),"$(C_TO_O_STR)","  CC $(@)")
 endif
+PMDINFO_GEN = $(RTE_SDK_BIN)/app/pmdinfogen $@ $@.pmd.c
+PMDINFO_CC = $(CC) $(CFLAGS) -c -o $@.pmd.o $@.pmd.c
+PMDINFO_LD = $(CROSS)ld $(LDFLAGS) -r -o $@.o $@.pmd.o $@
+PMDINFO_TO_O = if grep -q 'PMD_REGISTER_DRIVER(.*)' $<; then \
+	echo "$(if $V,$(PMDINFO_GEN),  PMDINFO $@.pmd.c)" && \
+	$(PMDINFO_GEN) && \
+	echo "$(if $V,$(PMDINFO_CC),  CC $@.pmd.o)" && \
+	$(PMDINFO_CC) && \
+	echo "$(if $V,$(PMDINFO_LD),  LD $@)" && \
+	$(PMDINFO_LD) && \
+	mv -f $@.o $@; fi
 C_TO_O_CMD = 'cmd_$@ = $(C_TO_O_STR)'
 C_TO_O_DO = @set -e; \
 	echo $(C_TO_O_DISP); \
 	$(C_TO_O) && \
-	sh -c "grep -q \"PMD_REGISTER_DRIVER(.*)\" $<; \
-	if [ \$$? -eq 0 ]; then \
-		echo \"  PMDINFOGEN\" $@; \
-		OBJF=`readlink -f $@`; \
-		$(RTE_SDK_BIN)/app/pmdinfogen \$$OBJF \$$OBJF.pmd.c; \
-		if [ \$$? -eq 0 ]; \
-		then \
-			echo \"  PMDINFOBUILD\" $@; \
-			$(CC) $(CFLAGS) -c -o \$$OBJF.pmd.o \$$OBJF.pmd.c; \
-			$(CROSS)ld $(LDFLAGS) -r -o \$$OBJF.o \$$OBJF.pmd.o \$$OBJF; \
-			mv -f \$$OBJF.o \$$OBJF; \
-		fi; \
-	fi;" && \
+	$(PMDINFO_TO_O) && \
 	echo $(C_TO_O_CMD) > $(call obj2cmd,$(@)) && \
 	sed 's,'$@':,dep_'$@' =,' $(call obj2dep,$(@)).tmp > $(call obj2dep,$(@)) && \
 	rm -f $(call obj2dep,$(@)).tmp
 
-
 # return an empty string if string are equal
 compare = $(strip $(subst $(1),,$(2)) $(subst $(2),,$(1)))
 
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH v3 06/10] pmdinfogen: fix build warnings
  2016-07-08 14:42   ` [dpdk-dev] [PATCH v3 00/10] additions to pmdinfogen Thomas Monjalon
                       ` (4 preceding siblings ...)
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 05/10] mk: fix verbose pmdinfogen run Thomas Monjalon
@ 2016-07-08 14:42     ` Thomas Monjalon
  2016-07-08 15:23       ` Neil Horman
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 07/10] pmdinfogen: fix usage message Thomas Monjalon
                       ` (4 subsequent siblings)
  10 siblings, 1 reply; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 14:42 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

When compiled with a standard clang, pmdinfogen can raise a warning:
    buildtools/pmdinfogen/pmdinfogen.c:365:1: warning:
    control reaches end of non-void function

Actually there can be more warnings with stricter compilers.
In order to catch them early and fix most of them, the DPDK standard flags
WERROR_FLAGS are used.

The warnings fixed are:
    no previous prototype for ...
    no return statement in function returning non-void
    variable ‘secstrings’ set but not used
    ‘sec_name’ defined but not used
    ‘get_symbol_index’ defined but not used
    pointer of type ‘void *’ used in arithmetic

Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 buildtools/pmdinfogen/Makefile     |  4 +--
 buildtools/pmdinfogen/pmdinfogen.c | 58 ++++++++++++--------------------------
 2 files changed, 20 insertions(+), 42 deletions(-)

diff --git a/buildtools/pmdinfogen/Makefile b/buildtools/pmdinfogen/Makefile
index 125901b..3885d3b 100644
--- a/buildtools/pmdinfogen/Makefile
+++ b/buildtools/pmdinfogen/Makefile
@@ -41,9 +41,9 @@ HOSTAPP = pmdinfogen
 #
 SRCS-y += pmdinfogen.c
 
-HOST_EXTRA_CFLAGS += -g -I${RTE_OUTPUT}/include
+HOST_CFLAGS += $(WERROR_FLAGS) -g
+HOST_CFLAGS += -I$(RTE_OUTPUT)/include
 
 DEPDIRS-y += lib/librte_eal
 
 include $(RTE_SDK)/mk/rte.hostapp.mk
-
diff --git a/buildtools/pmdinfogen/pmdinfogen.c b/buildtools/pmdinfogen/pmdinfogen.c
index 0947dc6..beb06f1 100644
--- a/buildtools/pmdinfogen/pmdinfogen.c
+++ b/buildtools/pmdinfogen/pmdinfogen.c
@@ -15,6 +15,7 @@
 #include <limits.h>
 #include <stdbool.h>
 #include <errno.h>
+#include <rte_common.h>
 #include "pmdinfogen.h"
 
 #ifdef RTE_ARCH_64
@@ -32,7 +33,7 @@ static const char *sym_name(struct elf_info *elf, Elf_Sym *sym)
 		return "(unknown)";
 }
 
-void *grab_file(const char *filename, unsigned long *size)
+static void *grab_file(const char *filename, unsigned long *size)
 {
 	struct stat st;
 	void *map = MAP_FAILED;
@@ -59,7 +60,7 @@ failed:
   * spaces in the beginning of the line is trimmed away.
   * Return a pointer to a static buffer.
   **/
-void release_file(void *file, unsigned long size)
+static void release_file(void *file, unsigned long size)
 {
 	munmap(file, size);
 }
@@ -67,9 +68,8 @@ void release_file(void *file, unsigned long size)
 
 static void *get_sym_value(struct elf_info *info, const Elf_Sym *sym)
 {
-	void *ptr = (void *)info->hdr + info->sechdrs[sym->st_shndx].sh_offset;
-
-	return (void *)(ptr + sym->st_value);
+	return RTE_PTR_ADD(info->hdr,
+		info->sechdrs[sym->st_shndx].sh_offset + sym->st_value);
 }
 
 static Elf_Sym *find_sym_in_symtab(struct elf_info *info,
@@ -95,7 +95,6 @@ static int parse_elf(struct elf_info *info, const char *filename)
 	Elf_Ehdr *hdr;
 	Elf_Shdr *sechdrs;
 	Elf_Sym  *sym;
-	const char *secstrings;
 	int endian;
 	unsigned int symtab_idx = ~0U, symtab_shndx_idx = ~0U;
 
@@ -140,7 +139,7 @@ static int parse_elf(struct elf_info *info, const char *filename)
 	hdr->e_shnum     = TO_NATIVE(endian, 16, hdr->e_shnum);
 	hdr->e_shstrndx  = TO_NATIVE(endian, 16, hdr->e_shstrndx);
 
-	sechdrs = (void *)hdr + hdr->e_shoff;
+	sechdrs = RTE_PTR_ADD(hdr, hdr->e_shoff);
 	info->sechdrs = sechdrs;
 
 	/* Check if file offset is correct */
@@ -191,7 +190,6 @@ static int parse_elf(struct elf_info *info, const char *filename)
 			TO_NATIVE(endian, ADDR_SIZE, sechdrs[i].sh_entsize);
 	}
 	/* Find symbol table. */
-	secstrings = (void *)hdr + sechdrs[info->secindex_strings].sh_offset;
 	for (i = 1; i < info->num_sections; i++) {
 		int nobits = sechdrs[i].sh_type == SHT_NOBITS;
 
@@ -206,22 +204,22 @@ static int parse_elf(struct elf_info *info, const char *filename)
 		if (sechdrs[i].sh_type == SHT_SYMTAB) {
 			unsigned int sh_link_idx;
 			symtab_idx = i;
-			info->symtab_start = (void *)hdr +
-			    sechdrs[i].sh_offset;
-			info->symtab_stop  = (void *)hdr +
-			    sechdrs[i].sh_offset + sechdrs[i].sh_size;
+			info->symtab_start = RTE_PTR_ADD(hdr,
+				sechdrs[i].sh_offset);
+			info->symtab_stop  = RTE_PTR_ADD(hdr,
+				sechdrs[i].sh_offset + sechdrs[i].sh_size);
 			sh_link_idx = sechdrs[i].sh_link;
-			info->strtab       = (void *)hdr +
-			    sechdrs[sh_link_idx].sh_offset;
+			info->strtab       = RTE_PTR_ADD(hdr,
+				sechdrs[sh_link_idx].sh_offset);
 		}
 
 		/* 32bit section no. table? ("more than 64k sections") */
 		if (sechdrs[i].sh_type == SHT_SYMTAB_SHNDX) {
 			symtab_shndx_idx = i;
-			info->symtab_shndx_start = (void *)hdr +
-			    sechdrs[i].sh_offset;
-			info->symtab_shndx_stop  = (void *)hdr +
-			    sechdrs[i].sh_offset + sechdrs[i].sh_size;
+			info->symtab_shndx_start = RTE_PTR_ADD(hdr,
+				sechdrs[i].sh_offset);
+			info->symtab_shndx_stop  = RTE_PTR_ADD(hdr,
+				sechdrs[i].sh_offset + sechdrs[i].sh_size);
 		}
 	}
 	if (!info->symtab_start)
@@ -262,28 +260,6 @@ static void parse_elf_finish(struct elf_info *info)
 	}
 }
 
-static const char *sec_name(struct elf_info *elf, int secindex)
-{
-	Elf_Shdr *sechdrs = elf->sechdrs;
-	return (void *)elf->hdr +
-		elf->sechdrs[elf->secindex_strings].sh_offset +
-		sechdrs[secindex].sh_name;
-}
-
-static int get_symbol_index(struct elf_info *info, Elf_Sym *sym)
-{
-	const char *name =  sym_name(info, sym);
-	const char *idx;
-
-	idx = name;
-	while (idx) {
-		if (isdigit(*idx))
-			return atoi(idx);
-		idx++;
-	}
-	return -1;
-}
-
 struct opt_tag {
 	const char *suffix;
 	const char *json_id;
@@ -362,6 +338,8 @@ static int locate_pmd_entries(struct elf_info *info)
 			}
 		}
 	} while (last);
+
+	return 0;
 }
 
 static void output_pmd_info_string(struct elf_info *info, char *outfile)
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH v3 07/10] pmdinfogen: fix usage message
  2016-07-08 14:42   ` [dpdk-dev] [PATCH v3 00/10] additions to pmdinfogen Thomas Monjalon
                       ` (5 preceding siblings ...)
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 06/10] pmdinfogen: fix build warnings Thomas Monjalon
@ 2016-07-08 14:42     ` Thomas Monjalon
  2016-07-08 15:25       ` Neil Horman
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 08/10] eal: remove PCI include from generic driver header Thomas Monjalon
                       ` (3 subsequent siblings)
  10 siblings, 1 reply; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 14:42 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

The name of the tool is pmdinfogen.

Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 buildtools/pmdinfogen/pmdinfogen.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/buildtools/pmdinfogen/pmdinfogen.c b/buildtools/pmdinfogen/pmdinfogen.c
index beb06f1..717c8d4 100644
--- a/buildtools/pmdinfogen/pmdinfogen.c
+++ b/buildtools/pmdinfogen/pmdinfogen.c
@@ -398,7 +398,8 @@ int main(int argc, char **argv)
 
 	if (argc < 3) {
 		fprintf(stderr,
-			"usage: pmdinfo <object file> <c output file>\n");
+			"usage: %s <object file> <c output file>\n",
+			basename(argv[0]));
 		exit(127);
 	}
 	parse_elf(&info, argv[1]);
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH v3 08/10] eal: remove PCI include from generic driver header
  2016-07-08 14:42   ` [dpdk-dev] [PATCH v3 00/10] additions to pmdinfogen Thomas Monjalon
                       ` (6 preceding siblings ...)
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 07/10] pmdinfogen: fix usage message Thomas Monjalon
@ 2016-07-08 14:42     ` Thomas Monjalon
  2016-07-08 15:26       ` Neil Horman
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 09/10] doc: fix syntax in pmdinfogen guide Thomas Monjalon
                       ` (2 subsequent siblings)
  10 siblings, 1 reply; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 14:42 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

Remove include of rte_pci.h in the generic header rte_dev.h.

Fixes: cb6696d22023 ("drivers: update registration macro usage")

Suggested-by: David Marchand <david.marchand@6wind.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 lib/librte_eal/common/include/rte_dev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
index e6f0d4c..95789f9 100644
--- a/lib/librte_eal/common/include/rte_dev.h
+++ b/lib/librte_eal/common/include/rte_dev.h
@@ -48,7 +48,7 @@ extern "C" {
 
 #include <stdio.h>
 #include <sys/queue.h>
-#include <rte_pci.h>
+
 #include <rte_log.h>
 
 __attribute__((format(printf, 2, 0)))
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH v3 09/10] doc: fix syntax in pmdinfogen guide
  2016-07-08 14:42   ` [dpdk-dev] [PATCH v3 00/10] additions to pmdinfogen Thomas Monjalon
                       ` (7 preceding siblings ...)
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 08/10] eal: remove PCI include from generic driver header Thomas Monjalon
@ 2016-07-08 14:42     ` Thomas Monjalon
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 10/10] maintainers: add section for pmdinfo Thomas Monjalon
  2016-07-08 15:54     ` [dpdk-dev] [PATCH v3 00/10] additions to pmdinfogen Thomas Monjalon
  10 siblings, 0 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 14:42 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

Sphynx reports this error:

doc/guides/prog_guide/dev_kit_build_system.rst:337: WARNING:
Pygments lexer name u'C' is not known

Fixes: 737ddf3fb ("doc: add prog guide section documenting pmdinfo script")

Reported-by: Bernard Iremonger <bernard.iremonger@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
---
 doc/guides/prog_guide/dev_kit_build_system.rst | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/doc/guides/prog_guide/dev_kit_build_system.rst b/doc/guides/prog_guide/dev_kit_build_system.rst
index 1dc1388..18a3010 100644
--- a/doc/guides/prog_guide/dev_kit_build_system.rst
+++ b/doc/guides/prog_guide/dev_kit_build_system.rst
@@ -319,8 +319,7 @@ instance the macro:
 
 .. code-block:: c
 
-    PMD_REGISTER_DRIVER(drv, name)
-
+   PMD_REGISTER_DRIVER(drv, name)
 
 Creates the following symbol:
 
@@ -334,7 +333,7 @@ can be exported from the object file and used to produce a hardware support
 description, that pmdinfogen then encodes into a json formatted string in the
 following format:
 
-.. code-block:: C
+.. code-block:: c
 
    static char <name_pmd_string>="PMD_INFO_STRING=\"{'name' : '<name>', ...}\"";
 
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* [dpdk-dev] [PATCH v3 10/10] maintainers: add section for pmdinfo
  2016-07-08 14:42   ` [dpdk-dev] [PATCH v3 00/10] additions to pmdinfogen Thomas Monjalon
                       ` (8 preceding siblings ...)
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 09/10] doc: fix syntax in pmdinfogen guide Thomas Monjalon
@ 2016-07-08 14:42     ` Thomas Monjalon
  2016-07-08 15:54     ` [dpdk-dev] [PATCH v3 00/10] additions to pmdinfogen Thomas Monjalon
  10 siblings, 0 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 14:42 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

The author of this feature is Neil Horman.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
---
 MAINTAINERS | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index a59191e..f996c2e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -68,6 +68,10 @@ F: lib/librte_compat/
 F: doc/guides/rel_notes/deprecation.rst
 F: scripts/validate-abi.sh
 
+Driver information
+F: buildtools/pmdinfogen/
+F: tools/pmdinfo.py
+
 
 Environment Abstraction Layer
 -----------------------------
-- 
2.7.0

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH 07/11] pmdinfogen: fix build warnings
  2016-07-07 21:25     ` Mcnamara, John
@ 2016-07-08 14:51       ` Neil Horman
  0 siblings, 0 replies; 66+ messages in thread
From: Neil Horman @ 2016-07-08 14:51 UTC (permalink / raw)
  To: Mcnamara, John; +Cc: Thomas Monjalon, dev

On Thu, Jul 07, 2016 at 09:25:27PM +0000, Mcnamara, John wrote:
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Neil Horman
> > Sent: Thursday, July 7, 2016 6:55 PM
> > To: Thomas Monjalon <thomas.monjalon@6wind.com>
> > Cc: dev@dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH 07/11] pmdinfogen: fix build warnings
> > 
> > On Thu, Jul 07, 2016 at 05:36:26PM +0200, Thomas Monjalon wrote:
> > > When compiled with a standard clang, pmdinfogen can raise a warning:
> > >     buildtools/pmdinfogen/pmdinfogen.c:365:1: warning:
> > >     control reaches end of non-void function
> > >
> > > Actually there can be more warnings with stricter compilers.
> > > In order to catch them early and fix most of them, the DPDK standard
> > > flags WERROR_FLAGS are used.
> > >
> > > The warnings fixed are:
> > >     no previous prototype for ...
> > >     no return statement in function returning non-void
> > >     variable ‘secstrings’ set but not used
> > >     ‘sec_name’ defined but not used
> > >     ‘get_symbol_index’ defined but not used
> > >     pointer of type ‘void *’ used in arithmetic
> > >
> > > Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen
> > > utility")
> > >
> > > Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> > > ---
> > I'm not opposed to any of these changes, but I'm really starting to wonder
> > how well used/maintained clang is as a toolchain target.  I assert that
> > because, with my admittedly broken dependency rule, a native clang build
> > for me errors out in any number of places:
> > 
> > /home/nhorman/git/dpdk/lib/librte_eal/linuxapp/eal/eal_pci.c:392:37:
> > error:
> > equality comparison with extraneous parentheses [-Werror,-Wparentheses-
> > equality]  if (((&pci_device_list)->tqh_first == ((void*)0))) {
> >       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
> > /home/nhorman/git/dpdk/lib/librte_eal/linuxapp/eal/eal_pci.c:392:37: note:
> > remove extraneous parentheses around the comparison to silence this
> > warning  if (((&pci_device_list)->tqh_first == ((void*)0))) {
> 
> 
> It is due to the clang/ccache "issue" that is tripping up everyone. Exporting CCACHE_CPP2=yes should fix it. There was a thread about this earlier in the week.
> 
> John.
> 
> 

Ah, that did it, yes.  Though I didnt' get any of the warnings the Thomas
encountered when he posted those changes to pmdinfogen either 

Regardless, theres nothing egregious in the chagnes, so I don't see the harm.

Acked-by: Neil Horman <nhorman@tuxdriver.com>

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH v3 04/10] mk: fix driver build with installed SDK
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 04/10] mk: fix driver build with installed SDK Thomas Monjalon
@ 2016-07-08 14:53       ` Neil Horman
  0 siblings, 0 replies; 66+ messages in thread
From: Neil Horman @ 2016-07-08 14:53 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Fri, Jul 08, 2016 at 04:42:18PM +0200, Thomas Monjalon wrote:
> The tool pmdinfogen was called from RTE_OUTPUT/app/ which does not exist
> if building a driver outside of the SDK build.
> When building DPDK, RTE_SDK_BIN is RTE_OUTPUT. When building an external
> driver, RTE_SDK_BIN must point to the installed DPDK directory containing
> includes, libs, etc.
> 
> That's why pmdinfogen must be installed in the SDK directory and be part
> of the SDK installation.
> 
> Fixes: 3d781ca32874 ("mk: do post processing on objects that register a driver")
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>

Acked-by: Neil Horman <nhorman@tuxdriver.com>

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH v3 06/10] pmdinfogen: fix build warnings
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 06/10] pmdinfogen: fix build warnings Thomas Monjalon
@ 2016-07-08 15:23       ` Neil Horman
  0 siblings, 0 replies; 66+ messages in thread
From: Neil Horman @ 2016-07-08 15:23 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Fri, Jul 08, 2016 at 04:42:20PM +0200, Thomas Monjalon wrote:
> When compiled with a standard clang, pmdinfogen can raise a warning:
>     buildtools/pmdinfogen/pmdinfogen.c:365:1: warning:
>     control reaches end of non-void function
> 
> Actually there can be more warnings with stricter compilers.
> In order to catch them early and fix most of them, the DPDK standard flags
> WERROR_FLAGS are used.
> 
> The warnings fixed are:
>     no previous prototype for ...
>     no return statement in function returning non-void
>     variable ‘secstrings’ set but not used
>     ‘sec_name’ defined but not used
>     ‘get_symbol_index’ defined but not used
>     pointer of type ‘void *’ used in arithmetic
> 
> Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH v3 07/10] pmdinfogen: fix usage message
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 07/10] pmdinfogen: fix usage message Thomas Monjalon
@ 2016-07-08 15:25       ` Neil Horman
  0 siblings, 0 replies; 66+ messages in thread
From: Neil Horman @ 2016-07-08 15:25 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Fri, Jul 08, 2016 at 04:42:21PM +0200, Thomas Monjalon wrote:
> The name of the tool is pmdinfogen.
> 
> Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>

Acked-by: Neil Horman <nhorman@tuxdriver.com>

> ---
>  buildtools/pmdinfogen/pmdinfogen.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/buildtools/pmdinfogen/pmdinfogen.c b/buildtools/pmdinfogen/pmdinfogen.c
> index beb06f1..717c8d4 100644
> --- a/buildtools/pmdinfogen/pmdinfogen.c
> +++ b/buildtools/pmdinfogen/pmdinfogen.c
> @@ -398,7 +398,8 @@ int main(int argc, char **argv)
>  
>  	if (argc < 3) {
>  		fprintf(stderr,
> -			"usage: pmdinfo <object file> <c output file>\n");
> +			"usage: %s <object file> <c output file>\n",
> +			basename(argv[0]));
>  		exit(127);
>  	}
>  	parse_elf(&info, argv[1]);
> -- 
> 2.7.0
> 
> 

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH v3 08/10] eal: remove PCI include from generic driver header
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 08/10] eal: remove PCI include from generic driver header Thomas Monjalon
@ 2016-07-08 15:26       ` Neil Horman
  0 siblings, 0 replies; 66+ messages in thread
From: Neil Horman @ 2016-07-08 15:26 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Fri, Jul 08, 2016 at 04:42:22PM +0200, Thomas Monjalon wrote:
> Remove include of rte_pci.h in the generic header rte_dev.h.
> 
> Fixes: cb6696d22023 ("drivers: update registration macro usage")
> 
> Suggested-by: David Marchand <david.marchand@6wind.com>
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>

Acked-by: Neil Horman <nhorman@tuxdriver.com>

> ---
>  lib/librte_eal/common/include/rte_dev.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
> index e6f0d4c..95789f9 100644
> --- a/lib/librte_eal/common/include/rte_dev.h
> +++ b/lib/librte_eal/common/include/rte_dev.h
> @@ -48,7 +48,7 @@ extern "C" {
>  
>  #include <stdio.h>
>  #include <sys/queue.h>
> -#include <rte_pci.h>
> +
>  #include <rte_log.h>
>  
>  __attribute__((format(printf, 2, 0)))
> -- 
> 2.7.0
> 
> 

^ permalink raw reply	[flat|nested] 66+ messages in thread

* Re: [dpdk-dev] [PATCH v3 00/10] additions to pmdinfogen
  2016-07-08 14:42   ` [dpdk-dev] [PATCH v3 00/10] additions to pmdinfogen Thomas Monjalon
                       ` (9 preceding siblings ...)
  2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 10/10] maintainers: add section for pmdinfo Thomas Monjalon
@ 2016-07-08 15:54     ` Thomas Monjalon
  10 siblings, 0 replies; 66+ messages in thread
From: Thomas Monjalon @ 2016-07-08 15:54 UTC (permalink / raw)
  To: Neil Horman; +Cc: dev

2016-07-08 16:42, Thomas Monjalon:
> These are some patches that I think needed for RC2.

Applied

> There are other patches needed as discussed on the mailing-list which
> are not part of this series:
>   - overwritten driver name (reported by Pablo)
>   - pmdinfo.py on FreeBSD (reported by Bruce)

Hope we will have these patches ready soon.

^ permalink raw reply	[flat|nested] 66+ messages in thread

end of thread, other threads:[~2016-07-08 15:54 UTC | newest]

Thread overview: 66+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-07 15:36 [dpdk-dev] [PATCH 00/11] additions to pmdinfogen Thomas Monjalon
2016-07-07 15:36 ` [dpdk-dev] [PATCH 01/11] drivers: fix build with new register macro Thomas Monjalon
2016-07-07 15:50   ` Neil Horman
2016-07-07 16:20   ` Adrien Mazarguil
2016-07-07 15:36 ` [dpdk-dev] [PATCH 02/11] crypto: fix parameters registration Thomas Monjalon
2016-07-07 15:53   ` Neil Horman
2016-07-07 15:36 ` [dpdk-dev] [PATCH 03/11] mk: fix build dependency of drivers on pmdinfogen Thomas Monjalon
2016-07-07 15:56   ` Neil Horman
2016-07-07 16:21     ` Thomas Monjalon
2016-07-07 17:44       ` Neil Horman
2016-07-07 15:36 ` [dpdk-dev] [PATCH 04/11] mk: remove traces of hostapp build directory Thomas Monjalon
2016-07-07 16:02   ` Neil Horman
2016-07-07 15:36 ` [dpdk-dev] [PATCH 05/11] mk: fix driver build with installed SDK Thomas Monjalon
2016-07-07 15:36 ` [dpdk-dev] [PATCH 06/11] mk: fix verbose pmdinfogen run Thomas Monjalon
2016-07-07 16:04   ` Neil Horman
2016-07-07 15:36 ` [dpdk-dev] [PATCH 07/11] pmdinfogen: fix build warnings Thomas Monjalon
2016-07-07 17:55   ` Neil Horman
2016-07-07 21:25     ` Mcnamara, John
2016-07-08 14:51       ` Neil Horman
2016-07-07 15:36 ` [dpdk-dev] [PATCH 08/11] pmdinfogen: fix usage message Thomas Monjalon
2016-07-07 16:05   ` Neil Horman
2016-07-07 16:24     ` Thomas Monjalon
2016-07-07 17:46       ` Neil Horman
2016-07-07 15:36 ` [dpdk-dev] [PATCH 09/11] eal: move PCI table macro Thomas Monjalon
2016-07-07 15:41   ` Thomas Monjalon
2016-07-07 16:11   ` Neil Horman
2016-07-07 16:25     ` Thomas Monjalon
2016-07-08  8:49       ` David Marchand
2016-07-08 13:56         ` Neil Horman
2016-07-08 14:03           ` Thomas Monjalon
2016-07-08 14:13             ` Neil Horman
2016-07-07 15:36 ` [dpdk-dev] [PATCH 10/11] doc: fix syntax in pmdinfogen guide Thomas Monjalon
2016-07-07 15:42   ` Thomas Monjalon
2016-07-07 16:12   ` Neil Horman
2016-07-07 15:36 ` [dpdk-dev] [PATCH 11/11] maintainers: add section for pmdinfo Thomas Monjalon
2016-07-07 15:45   ` Thomas Monjalon
2016-07-07 16:14     ` Neil Horman
2016-07-07 16:26       ` Thomas Monjalon
2016-07-07 16:14   ` Neil Horman
2016-07-08 10:14 ` [dpdk-dev] [PATCH v2 00/10] additions to pmdinfogen Thomas Monjalon
2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 01/10] drivers: fix build with new register macro Thomas Monjalon
2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 02/10] mk: fix build dependency of drivers on pmdinfogen Thomas Monjalon
2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 03/10] mk: remove traces of hostapp build directory Thomas Monjalon
2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 04/10] mk: fix driver build with installed SDK Thomas Monjalon
2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 05/10] mk: fix verbose pmdinfogen run Thomas Monjalon
2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 06/10] pmdinfogen: fix build warnings Thomas Monjalon
2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 07/10] pmdinfogen: fix usage message Thomas Monjalon
2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 08/10] eal: move PCI table macro Thomas Monjalon
2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 09/10] doc: fix syntax in pmdinfogen guide Thomas Monjalon
2016-07-08 10:14   ` [dpdk-dev] [PATCH v2 10/10] maintainers: add section for pmdinfo Thomas Monjalon
2016-07-08 14:42   ` [dpdk-dev] [PATCH v3 00/10] additions to pmdinfogen Thomas Monjalon
2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 01/10] drivers: fix build with new register macro Thomas Monjalon
2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 02/10] mk: fix build dependency of drivers on pmdinfogen Thomas Monjalon
2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 03/10] mk: remove traces of hostapp build directory Thomas Monjalon
2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 04/10] mk: fix driver build with installed SDK Thomas Monjalon
2016-07-08 14:53       ` Neil Horman
2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 05/10] mk: fix verbose pmdinfogen run Thomas Monjalon
2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 06/10] pmdinfogen: fix build warnings Thomas Monjalon
2016-07-08 15:23       ` Neil Horman
2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 07/10] pmdinfogen: fix usage message Thomas Monjalon
2016-07-08 15:25       ` Neil Horman
2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 08/10] eal: remove PCI include from generic driver header Thomas Monjalon
2016-07-08 15:26       ` Neil Horman
2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 09/10] doc: fix syntax in pmdinfogen guide Thomas Monjalon
2016-07-08 14:42     ` [dpdk-dev] [PATCH v3 10/10] maintainers: add section for pmdinfo Thomas Monjalon
2016-07-08 15:54     ` [dpdk-dev] [PATCH v3 00/10] additions to pmdinfogen Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).