[dpdk-dev] [PATCH v3] app/test: fix a segfault when lpm_perf_autotest is run more than 1 time

2016-11-06 Thread Thomas Monjalon
> > num_route_entries need to be reseted.
> > 
> > Fixes: 17d60f5b5eea ("app/test: remove large IPv4 LPM data file")
> > 
> > Signed-off-by: Nikita Kozlov 
> Tested-by: Bruce Richardson 
> Tested-by: Wei Dai 
> Acked-by: Wei Dai 

Appplied, thanks


[dpdk-dev] [PATCH] lpm: fix freeing memory

2016-11-06 Thread Thomas Monjalon
2016-11-03 18:15, Wei Dai:
> The memory pointed by lpm->rules_tbl should also be freed
> when memory malloc for tbl8 fails in rte_lpm_create_v1604( ).
> And the memory pointed by lpm->tbl8 should also be freed
> when the lpm object is freed in rte_lpm_free_v1604( ).
> 
> Fixes: f1f7261838b3 ("lpm: add a new config structure for IPv4")
> 
> Signed-off-by: Morten Br?rup 
> Signed-off-by: Wei Dai 

Applied, thanks


[dpdk-dev] [PATCH] cfgfile: fix comments - style and return value

2016-11-06 Thread Thomas Monjalon
2016-10-19 03:33, Dmitriy Yakovlev:
> Fixed style and return values in Doxygen comments.
> 
> Signed-off-by: Dmitriy Yakovlev 

Applied, thanks


[dpdk-dev] [PATCH] net: remove mempool as a dependency

2016-11-06 Thread Thomas Monjalon
> Signed-off-by: Ferruh Yigit 

Applied, thanks


[dpdk-dev] [PATCH] doc: add missing library to release notes

2016-11-06 Thread Thomas Monjalon
> > Signed-off-by: Ferruh Yigit 
> 
> Acked-by: John McNamara 

Applied, thanks


[dpdk-dev] [PATCH] pci: Don't call probe callback if driver already loaded.

2016-11-06 Thread Thomas Monjalon
2016-10-25 14:50, Ben Walker:
> If the user asks to probe multiple times, the probe
> callback should only be called on devices that don't have
> a driver already loaded.
> 
> This is useful if a driver is registered after the
> execution of a program has started and the list of devices
> needs to be re-scanned.
> 
> Signed-off-by: Ben Walker 

Applied, thanks


[dpdk-dev] [PATCH v2 2/2] arch/ppc: fix file descriptor leakage when getting CPU features

2016-11-06 Thread Thomas Monjalon
2016-11-04 12:18, Jan Viktorin:
> On Fri,  4 Nov 2016 15:16:43 +0530
> Jianbo Liu  wrote:
> 
> > close the file descriptor after finish using it.
> 
> s/close/Close/
> 
> Please include my ack (below).
> 
> Jan
> 
> > 
> > Fixes: 9ae15538 (eal/ppc: cpu flag checks for IBM Power)
> > 
> > Signed-off-by: Jianbo Liu 
> 
> Acked-by: Jan Viktorin 

Applied, thanks


[dpdk-dev] [PATCH] eal: fix bug in x86 cmpset

2016-11-06 Thread Thomas Monjalon
2016-09-29 18:34, Thomas Monjalon:
> 2016-09-30 02:54, Nikhil Rao:
> > The original code used movl instead of xchgl, this caused
> > rte_atomic64_cmpset to use ebx as the lower dword of the source
> > to cmpxchg8b instead of the lower dword of function argument "src".
> 
> Could you please start the explanation with a statement of
> what is wrong from an user point of view?
> It could help to understand how severe it is.

Please, we need a clear explanation of the bug, and an acknowledgement.


[dpdk-dev] [PATCH] ethdev: rename library for consistency

2016-11-06 Thread Thomas Monjalon
2016-11-06 19:21, Thomas Monjalon:
> The library was named libethdev without rte_ prefix.
> It is now fixed, the library namespace is consistent.
> 
> Note: the ABI version has already been changed in this release cycle.
> 
> Signed-off-by: Thomas Monjalon 

Applied for 16.11, as announced in the deprecation notice.


[dpdk-dev] [PATCH] scripts: remove zlib dependency to test qede build

2016-11-06 Thread Thomas Monjalon
> >The driver qede does not depend on zlib anymore.
> >
> >Fixes: 7d178e9ef614 ("net/qede: remove zlib dependency and enable PMD")
> >
> >Signed-off-by: Thomas Monjalon 
> 
> Acked-by: Harish Patil 

Applied


[dpdk-dev] [PATCH] scripts: remove zlib dependency to test qede build

2016-11-06 Thread Thomas Monjalon
The driver qede does not depend on zlib anymore.

Fixes: 7d178e9ef614 ("net/qede: remove zlib dependency and enable PMD")

Signed-off-by: Thomas Monjalon 
---
 scripts/test-build.sh | 2 --
 1 file changed, 2 deletions(-)

diff --git a/scripts/test-build.sh b/scripts/test-build.sh
index e0163ed..a979309 100755
--- a/scripts/test-build.sh
+++ b/scripts/test-build.sh
@@ -171,8 +171,6 @@ config () #   
sed -ri   's,(PMD_SZEDATA2=)n,\1y,' $1/.config
test "$DPDK_DEP_ZLIB" != y || \
sed -ri  's,(BNX2X_PMD=)n,\1y,' $1/.config
-   test "$DPDK_DEP_ZLIB" != y || \
-   sed -ri   's,(QEDE_PMD=)n,\1y,' $1/.config
sed -ri's,(NFP_PMD=)n,\1y,' $1/.config
test "$DPDK_DEP_PCAP" != y || \
sed -ri   's,(PCAP=)n,\1y,' $1/.config
-- 
2.7.0



[dpdk-dev] [PATCH] ethdev: rename library for consistency

2016-11-06 Thread Thomas Monjalon
The library was named libethdev without rte_ prefix.
It is now fixed, the library namespace is consistent.

Note: the ABI version has already been changed in this release cycle.

Signed-off-by: Thomas Monjalon 
---
 doc/guides/rel_notes/deprecation.rst   | 3 ---
 doc/guides/rel_notes/release_16_11.rst | 2 +-
 lib/librte_ether/Makefile  | 2 +-
 mk/rte.app.mk  | 2 +-
 mk/rte.lib.mk  | 2 +-
 5 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst 
b/doc/guides/rel_notes/deprecation.rst
index 884a231..9f5fa55 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -8,9 +8,6 @@ API and ABI deprecation notices are to be posted here.
 Deprecation Notices
 ---

-* The ethdev library file will be renamed from libethdev.* to librte_ethdev.*
-  in release 16.11 in order to have a more consistent namespace.
-
 * In 16.11 ABI changes are planned: the ``rte_eth_dev`` structure will be
   extended with new function pointer ``tx_pkt_prep`` allowing verification
   and processing of packet burst to meet HW specific requirements before
diff --git a/doc/guides/rel_notes/release_16_11.rst 
b/doc/guides/rel_notes/release_16_11.rst
index db20567..aad21ba 100644
--- a/doc/guides/rel_notes/release_16_11.rst
+++ b/doc/guides/rel_notes/release_16_11.rst
@@ -258,13 +258,13 @@ The libraries prepended with a plus sign were incremented 
in this version.

 .. code-block:: diff

-   + libethdev.so.5
  librte_acl.so.2
  librte_cfgfile.so.2
  librte_cmdline.so.2
+ librte_cryptodev.so.2
  librte_distributor.so.1
+ librte_eal.so.3
+   + librte_ethdev.so.5
  librte_hash.so.2
  librte_ip_frag.so.1
  librte_jobstats.so.1
diff --git a/lib/librte_ether/Makefile b/lib/librte_ether/Makefile
index bc2e5f6..efe1e5f 100644
--- a/lib/librte_ether/Makefile
+++ b/lib/librte_ether/Makefile
@@ -34,7 +34,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 #
 # library name
 #
-LIB = libethdev.a
+LIB = librte_ethdev.a

 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 51bc3b0..f75f0e2 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -91,7 +91,7 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST)  += -lrte_vhost
 _LDLIBS-$(CONFIG_RTE_LIBRTE_KVARGS) += -lrte_kvargs
 _LDLIBS-$(CONFIG_RTE_LIBRTE_MBUF)   += -lrte_mbuf
 _LDLIBS-$(CONFIG_RTE_LIBRTE_NET)+= -lrte_net
-_LDLIBS-$(CONFIG_RTE_LIBRTE_ETHER)  += -lethdev
+_LDLIBS-$(CONFIG_RTE_LIBRTE_ETHER)  += -lrte_ethdev
 _LDLIBS-$(CONFIG_RTE_LIBRTE_CRYPTODEV)  += -lrte_cryptodev
 _LDLIBS-$(CONFIG_RTE_LIBRTE_MEMPOOL)+= -lrte_mempool
 _LDLIBS-$(CONFIG_RTE_LIBRTE_RING)   += -lrte_ring
diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
index 7b96fd4..33a5f5a 100644
--- a/mk/rte.lib.mk
+++ b/mk/rte.lib.mk
@@ -81,7 +81,7 @@ endif
 # Ignore (sub)directory dependencies which do not provide an actual library
 _IGNORE_DIRS = lib/librte_eal/% lib/librte_compat
 _DEPDIRS = $(filter-out $(_IGNORE_DIRS),$(DEPDIRS-y))
-_LDDIRS = $(subst librte_ether,libethdev,$(_DEPDIRS))
+_LDDIRS = $(subst librte_ether,librte_ethdev,$(_DEPDIRS))
 LDLIBS += $(subst lib/lib,-l,$(_LDDIRS))

 O_TO_A = $(AR) crDs $(LIB) $(OBJS-y)
-- 
2.7.0



[dpdk-dev] [PATCH] scripts: remove zlib dependency to test qede build

2016-11-06 Thread Harish Patil
>
>The driver qede does not depend on zlib anymore.
>
>Fixes: 7d178e9ef614 ("net/qede: remove zlib dependency and enable PMD")
>
>Signed-off-by: Thomas Monjalon 
>---
> scripts/test-build.sh | 2 --
> 1 file changed, 2 deletions(-)
>
>diff --git a/scripts/test-build.sh b/scripts/test-build.sh
>index e0163ed..a979309 100755
>--- a/scripts/test-build.sh
>+++ b/scripts/test-build.sh
>@@ -171,8 +171,6 @@ config () #   
>   sed -ri   's,(PMD_SZEDATA2=)n,\1y,' $1/.config
>   test "$DPDK_DEP_ZLIB" != y || \
>   sed -ri  's,(BNX2X_PMD=)n,\1y,' $1/.config
>-  test "$DPDK_DEP_ZLIB" != y || \
>-  sed -ri   's,(QEDE_PMD=)n,\1y,' $1/.config
>   sed -ri's,(NFP_PMD=)n,\1y,' $1/.config
>   test "$DPDK_DEP_PCAP" != y || \
>   sed -ri   's,(PCAP=)n,\1y,' $1/.config
>-- 
>2.7.0
>
>

Acked-by: Harish Patil 



[dpdk-dev] [PATCH] mk: fix install-doc without html

2016-11-06 Thread Thomas Monjalon
2016-11-06 17:53, Thomas Monjalon:
> When trying to install PDF, man pages or examples without having built
> neither HTML API nor HTML guides, there was an error:
> 
> % make install-doc
> tar: html: Cannot stat: No such file or directory
> 
> The fix is to check the html directory before installing HTML files.
> 
> Fixes: e4552b9cc603 ("mk: install doc")
> 
> Signed-off-by: Thomas Monjalon 

Applied


[dpdk-dev] [PATCH v4] eal: fix lib version for device generalization patches

2016-11-06 Thread Thomas Monjalon
2016-10-27 16:59, Shreyansh Jain:
> rte_device/driver generalization patches [1] were merged without a change
> in the LIBABIVER variable. This patches bumps the macro of affected libs:
> 
> - libcryptodev and libetherdev have been bumped
> - librte_eal version changed in
>   d7e61ad3ae36 ("log: remove deprecated history dump")

Applied, thanks




[dpdk-dev] [PATCH] mk: fix install-doc without html

2016-11-06 Thread Thomas Monjalon
When trying to install PDF, man pages or examples without having built
neither HTML API nor HTML guides, there was an error:

% make install-doc
tar: html: Cannot stat: No such file or directory

The fix is to check the html directory before installing HTML files.

Fixes: e4552b9cc603 ("mk: install doc")

Signed-off-by: Thomas Monjalon 
---
 mk/rte.sdkinstall.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk
index 004b38b..7b0d8b5 100644
--- a/mk/rte.sdkinstall.mk
+++ b/mk/rte.sdkinstall.mk
@@ -164,7 +164,7 @@ install-sdk:
$(Q)$(call rte_symlink, $(DESTDIR)$(libdir), 
$(DESTDIR)$(targetdir)/lib)

 install-doc:
-ifneq ($(wildcard $O/doc),)
+ifneq ($(wildcard $O/doc/html),)
$(Q)$(call rte_mkdir, $(DESTDIR)$(docdir))
$(Q)tar -cf -  -C $O/doc html --exclude 'html/guides/.*' | \
tar -xf -  -C $(DESTDIR)$(docdir) --strip-components=1 \
-- 
2.7.0



[dpdk-dev] [PATCH] lib/ip_frag: fix IP reassembly not working issue

2016-11-06 Thread Wenzhuo Lu
After changing pkt[0] to pkt[], the example IP reassembly is not
working.
It's weird because this change is fine. There should be no
difference between them.
As a workaround, revert this change.

Fixes: 347a1e037fd3 (lib: use C99 syntax for zero-size arrays)

Reported-by: Huilong Xu 
Signed-off-by: Wenzhuo Lu 
---
 lib/librte_ip_frag/rte_ip_frag.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_ip_frag/rte_ip_frag.h b/lib/librte_ip_frag/rte_ip_frag.h
index 69596ab..6708906 100644
--- a/lib/librte_ip_frag/rte_ip_frag.h
+++ b/lib/librte_ip_frag/rte_ip_frag.h
@@ -124,7 +124,7 @@ struct rte_ip_frag_tbl {
struct ip_frag_pkt *last; /**< last used entry. */
struct ip_pkt_list lru;   /**< LRU list for table entries. */
struct ip_frag_tbl_stat stat; /**< statistics counters. */
-   struct ip_frag_pkt pkt[]; /**< hash table. */
+   __extension__ struct ip_frag_pkt pkt[0]; /**< hash table. */
 };

 /** IPv6 fragment extension header */
-- 
1.9.3



[dpdk-dev] [PATCH] ixgbe: fix wrong RX DMA registers

2016-11-06 Thread Wenzhuo Lu
Some VF RX DMA registers are using PF's addresses by mistake.
Although some of them are sharing the same addresses,
we should use the right ones.

Fixes: 0198848a47f5 ("ixgbe: add access to specific device info")

Signed-off-by: Wenzhuo Lu 
---
 drivers/net/ixgbe/ixgbe_regs.h | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_regs.h b/drivers/net/ixgbe/ixgbe_regs.h
index ca4725d..773e169 100644
--- a/drivers/net/ixgbe/ixgbe_regs.h
+++ b/drivers/net/ixgbe/ixgbe_regs.h
@@ -145,17 +145,17 @@ static const struct reg_info ixgbe_regs_rxdma[] = {
 };

 static const struct reg_info ixgbevf_regs_rxdma[] = {
-   {IXGBE_RDBAL(0), 8, 0x40, "IXGBE_RDBAL"},
-   {IXGBE_RDBAH(0), 8, 0x40, "IXGBE_RDBAH"},
-   {IXGBE_RDLEN(0), 8, 0x40, "IXGBE_RDLEN"},
-   {IXGBE_RDH(0), 8, 0x40, "IXGBE_RDH"},
-   {IXGBE_RDT(0), 8, 0x40, "IXGBE_RDT"},
-   {IXGBE_RXDCTL(0), 8, 0x40, "IXGBE_RXDCTL"},
-   {IXGBE_SRRCTL(0), 8, 0x40, "IXGBE_SRRCTL"},
+   {IXGBE_VFRDBAL(0), 8, 0x40, "IXGBE_VFRDBAL"},
+   {IXGBE_VFRDBAH(0), 8, 0x40, "IXGBE_VFRDBAH"},
+   {IXGBE_VFRDLEN(0), 8, 0x40, "IXGBE_VFRDLEN"},
+   {IXGBE_VFRDH(0), 8, 0x40, "IXGBE_VFRDH"},
+   {IXGBE_VFRDT(0), 8, 0x40, "IXGBE_VFRDT"},
+   {IXGBE_VFRXDCTL(0), 8, 0x40, "IXGBE_VFRXDCTL"},
+   {IXGBE_VFSRRCTL(0), 8, 0x40, "IXGBE_VFSRRCTL"},
{IXGBE_VFPSRTYPE, 1, 1, "IXGBE_VFPSRTYPE"},
{IXGBE_VFRSCCTL(0), 8, 0x40, "IXGBE_VFRSCCTL"},
-   {IXGBE_PVFDCA_RXCTRL(0), 8, 0x40, "IXGBE_PVFDCA_RXCTRL"},
-   {IXGBE_PVFDCA_TXCTRL(0), 8, 0x40, "IXGBE_PVFDCA_TXCTRL"},
+   {IXGBE_VFDCA_RXCTRL(0), 8, 0x40, "IXGBE_VFDCA_RXCTRL"},
+   {IXGBE_VFDCA_TXCTRL(0), 8, 0x40, "IXGBE_VFDCA_TXCTRL"},
{0, 0, 0, ""}
 };

-- 
1.9.3



[dpdk-dev] [PATCH] ixgbe: correct the VF general registers

2016-11-06 Thread Wenzhuo Lu
Some VF registers are using PF's name by mistake.
Although the addresses of the VF's and PF's are the same,
we should use the right names.

Fixes: 0198848a47f5 ("ixgbe: add access to specific device info")

Signed-off-by: Wenzhuo Lu 
---
 drivers/net/ixgbe/ixgbe_regs.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_regs.h b/drivers/net/ixgbe/ixgbe_regs.h
index 4af035f..ca4725d 100644
--- a/drivers/net/ixgbe/ixgbe_regs.h
+++ b/drivers/net/ixgbe/ixgbe_regs.h
@@ -56,10 +56,10 @@ static const struct reg_info ixgbe_regs_general[] = {
 };

 static const struct reg_info ixgbevf_regs_general[] = {
-   {IXGBE_CTRL, 1, 1, "IXGBE_CTRL"},
-   {IXGBE_STATUS, 1, 1, "IXGBE_STATUS"},
+   {IXGBE_VFCTRL, 1, 1, "IXGBE_VFCTRL"},
+   {IXGBE_VFSTATUS, 1, 1, "IXGBE_VFSTATUS"},
{IXGBE_VFLINKS, 1, 1, "IXGBE_VFLINKS"},
-   {IXGBE_FRTIMER, 1, 1, "IXGBE_FRTIMER"},
+   {IXGBE_VFFRTIMER, 1, 1, "IXGBE_VFFRTIMER"},
{IXGBE_VFMAILBOX, 1, 1, "IXGBE_VFMAILBOX"},
{IXGBE_VFMBMEM, 16, 4, "IXGBE_VFMBMEM"},
{IXGBE_VFRXMEMWRAP, 1, 1, "IXGBE_VFRXMEMWRAP"},
-- 
1.9.3



[dpdk-dev] [PATCH] ixgbe: fix wrong VF TX registers

2016-11-06 Thread Wenzhuo Lu
The VF TX registers are using PF's addresses by mistake,
correct them.

Fixes: 0198848a47f5 ("ixgbe: add access to specific device info")

Reported-by: Xuekun Hu 
Signed-off-by: Wenzhuo Lu 
---
 drivers/net/ixgbe/ixgbe_regs.h | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_regs.h b/drivers/net/ixgbe/ixgbe_regs.h
index c7457a6..4af035f 100644
--- a/drivers/net/ixgbe/ixgbe_regs.h
+++ b/drivers/net/ixgbe/ixgbe_regs.h
@@ -193,14 +193,14 @@ static struct reg_info ixgbe_regs_tx[] = {
 };

 static const struct reg_info ixgbevf_regs_tx[] = {
-   {IXGBE_TDBAL(0), 4, 0x40, "IXGBE_TDBAL"},
-   {IXGBE_TDBAH(0), 4, 0x40, "IXGBE_TDBAH"},
-   {IXGBE_TDLEN(0), 4, 0x40, "IXGBE_TDLEN"},
-   {IXGBE_TDH(0), 4, 0x40, "IXGBE_TDH"},
-   {IXGBE_TDT(0), 4, 0x40, "IXGBE_TDT"},
-   {IXGBE_TXDCTL(0), 4, 0x40, "IXGBE_TXDCTL"},
-   {IXGBE_TDWBAL(0), 4, 0x40, "IXGBE_TDWBAL"},
-   {IXGBE_TDWBAH(0), 4, 0x40, "IXGBE_TDWBAH"},
+   {IXGBE_VFTDBAL(0), 4, 0x40, "IXGBE_VFTDBAL"},
+   {IXGBE_VFTDBAH(0), 4, 0x40, "IXGBE_VFTDBAH"},
+   {IXGBE_VFTDLEN(0), 4, 0x40, "IXGBE_VFTDLEN"},
+   {IXGBE_VFTDH(0), 4, 0x40, "IXGBE_VFTDH"},
+   {IXGBE_VFTDT(0), 4, 0x40, "IXGBE_VFTDT"},
+   {IXGBE_VFTXDCTL(0), 4, 0x40, "IXGBE_VFTXDCTL"},
+   {IXGBE_VFTDWBAL(0), 4, 0x40, "IXGBE_VFTDWBAL"},
+   {IXGBE_VFTDWBAH(0), 4, 0x40, "IXGBE_VFTDWBAH"},
{0, 0, 0, ""}
 };

-- 
1.9.3



[dpdk-dev] [PATCH] scripts: ignore const struct checks

2016-11-06 Thread Thomas Monjalon
2016-11-05 16:42, Thomas Monjalon:
> checkpatch raise some false positives when run outside of the kernel tree.
> 
> The script checkpatch.pl from the kernel checks a list
> of structs known to be const.
> It is obviously not relevant as DPDK has not such list.
> 
> Signed-off-by: Thomas Monjalon 

Applied


[dpdk-dev] [PATCH] scripts: show full headline with checkpatch

2016-11-06 Thread Thomas Monjalon
2016-11-05 16:28, Thomas Monjalon:
> The Subject in an email can be split on two lines.
> In such case, the second line (starting with a space) can be
> joined to the first one.
> 
> It is handled differently when parsing stdin or a file.
> 
> Signed-off-by: Thomas Monjalon 

Applied