patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5
@ 2018-01-26 13:12 luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'eal: update assertion macro' " luca.boccassi
                   ` (60 more replies)
  0 siblings, 61 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 2061c152af06c8cb372371a718a3ecf722201f4e Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 28 Nov 2017 23:45:53 +0000
Subject: [PATCH] kni: fix build with kernel 4.15
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit d291fb3a8d162161897636387910637bbe9cbf17 ]

build error:
.../dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_main.c:2809:2:
 error: implicit declaration of function ‘setup_timer’;
 did you mean ‘sk_stop_timer’? [-Werror=implicit-function-declaration]
  setup_timer(&adapter->watchdog_timer, &igb_watchdog,
  ^~~~~~~~~~~
  sk_stop_timer
cc1: all warnings being treated as errors

error observed whed CONFIG_RTE_KNI_KMOD_ETHTOOL config option enabled.

Because Linux removed setup_timer macros for kernel version >= 4.15
Linux: 513ae785c63c ("timer: Remove setup_*timer() interface")

Replaced setup_timer with timer_setup for new kernel versions.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 41 ++++++++++++++++++++++
 lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h  |  4 +++
 2 files changed, 45 insertions(+)

diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
index acb1a69b4..3c683e174 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
@@ -137,11 +137,20 @@ static void igb_clean_all_tx_rings(struct igb_adapter *);
 static void igb_clean_all_rx_rings(struct igb_adapter *);
 static void igb_clean_tx_ring(struct igb_ring *);
 static void igb_set_rx_mode(struct net_device *);
+#ifdef HAVE_TIMER_SETUP
+static void igb_update_phy_info(struct timer_list *);
+static void igb_watchdog(struct timer_list *);
+#else
 static void igb_update_phy_info(unsigned long);
 static void igb_watchdog(unsigned long);
+#endif
 static void igb_watchdog_task(struct work_struct *);
 static void igb_dma_err_task(struct work_struct *);
+#ifdef HAVE_TIMER_SETUP
+static void igb_dma_err_timer(struct timer_list *);
+#else
 static void igb_dma_err_timer(unsigned long data);
+#endif
 static netdev_tx_t igb_xmit_frame(struct sk_buff *skb, struct net_device *);
 static struct net_device_stats *igb_get_stats(struct net_device *);
 static int igb_change_mtu(struct net_device *, int);
@@ -2806,6 +2815,12 @@ static int __devinit igb_probe(struct pci_dev *pdev,
 	/* Check if Media Autosense is enabled */
 	if (hw->mac.type == e1000_82580)
 		igb_init_mas(adapter);
+#ifdef HAVE_TIMER_SETUP
+	timer_setup(&adapter->watchdog_timer, &igb_watchdog, 0);
+	if (adapter->flags & IGB_FLAG_DETECT_BAD_DMA)
+		timer_setup(&adapter->dma_err_timer, &igb_dma_err_timer, 0);
+	timer_setup(&adapter->phy_info_timer, &igb_update_phy_info, 0);
+#else
 	setup_timer(&adapter->watchdog_timer, &igb_watchdog,
 	            (unsigned long) adapter);
 	if (adapter->flags & IGB_FLAG_DETECT_BAD_DMA)
@@ -2813,6 +2828,7 @@ static int __devinit igb_probe(struct pci_dev *pdev,
 			    (unsigned long) adapter);
 	setup_timer(&adapter->phy_info_timer, &igb_update_phy_info,
 	            (unsigned long) adapter);
+#endif
 
 	INIT_WORK(&adapter->reset_task, igb_reset_task);
 	INIT_WORK(&adapter->watchdog_task, igb_watchdog_task);
@@ -4543,9 +4559,15 @@ static void igb_spoof_check(struct igb_adapter *adapter)
 
 /* Need to wait a few seconds after link up to get diagnostic information from
  * the phy */
+#ifdef HAVE_TIMER_SETUP
+static void igb_update_phy_info(struct timer_list *t)
+{
+	struct igb_adapter *adapter = from_timer(adapter, t, phy_info_timer);
+#else
 static void igb_update_phy_info(unsigned long data)
 {
 	struct igb_adapter *adapter = (struct igb_adapter *) data;
+#endif
 	e1000_get_phy_info(&adapter->hw);
 }
 
@@ -4594,9 +4616,15 @@ bool igb_has_link(struct igb_adapter *adapter)
  * igb_watchdog - Timer Call-back
  * @data: pointer to adapter cast into an unsigned long
  **/
+#ifdef HAVE_TIMER_SETUP
+static void igb_watchdog(struct timer_list *t)
+{
+	struct igb_adapter *adapter = from_timer(adapter, t, watchdog_timer);
+#else
 static void igb_watchdog(unsigned long data)
 {
 	struct igb_adapter *adapter = (struct igb_adapter *)data;
+#endif
 	/* Do the rest outside of interrupt context */
 	schedule_work(&adapter->watchdog_task);
 }
@@ -4854,9 +4882,15 @@ dma_timer_reset:
  * igb_dma_err_timer - Timer Call-back
  * @data: pointer to adapter cast into an unsigned long
  **/
+#ifdef HAVE_TIMER_SETUP
+static void igb_dma_err_timer(struct timer_list *t)
+{
+	struct igb_adapter *adapter = from_timer(adapter, t, dma_err_timer);
+#else
 static void igb_dma_err_timer(unsigned long data)
 {
 	struct igb_adapter *adapter = (struct igb_adapter *)data;
+#endif
 	/* Do the rest outside of interrupt context */
 	schedule_work(&adapter->dma_err_task);
 }
@@ -10051,6 +10085,12 @@ int igb_kni_probe(struct pci_dev *pdev,
 		igb_init_mas(adapter);
 
 #ifdef NO_KNI
+#ifdef HAVE_TIMER_SETUP
+	timer_setup(&adapter->watchdog_timer, &igb_watchdog, 0);
+	if (adapter->flags & IGB_FLAG_DETECT_BAD_DMA)
+		timer_setup(&adapter->dma_err_timer, &igb_dma_err_timer, 0);
+	timer_setup(&adapter->phy_info_timer, &igb_update_phy_info, 0);
+#else
 	setup_timer(&adapter->watchdog_timer, &igb_watchdog,
 	            (unsigned long) adapter);
 	if (adapter->flags & IGB_FLAG_DETECT_BAD_DMA)
@@ -10058,6 +10098,7 @@ int igb_kni_probe(struct pci_dev *pdev,
 			    (unsigned long) adapter);
 	setup_timer(&adapter->phy_info_timer, &igb_update_phy_info,
 	            (unsigned long) adapter);
+#endif
 
 	INIT_WORK(&adapter->reset_task, igb_reset_task);
 	INIT_WORK(&adapter->watchdog_task, igb_watchdog_task);
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
index aea253b1c..88bd18eca 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
@@ -3937,4 +3937,8 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
 #define HAVE_PCI_ENABLE_MSIX
 #endif
 
+#if defined(timer_setup) && defined(from_timer)
+#define HAVE_TIMER_SETUP
+#endif
+
 #endif /* _KCOMPAT_H_ */
-- 
2.14.2

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

* [dpdk-stable] patch 'eal: update assertion macro' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'contigmem: fix build on FreeBSD 12' " luca.boccassi
                   ` (59 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Ilya V. Matveychikov; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 32bc7f113fa1b1d271eca59694257d4e522ff370 Mon Sep 17 00:00:00 2001
From: "Ilya V. Matveychikov" <matvejchikov@gmail.com>
Date: Sun, 19 Nov 2017 12:18:49 +0400
Subject: [PATCH] eal: update assertion macro
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 65f88eb2842649e442e781d58a0228b3e8970e45 ]

Update RTE_VERIFY macro to make it possible to use complex expressions
in RTE_ASSERT.

Now it’s possible to have % char inside the expression, for example:
RTE_ASSERT((sizeof(some_struct) % 64) == 0)

Before the patch, “%" sign acts like a conversion specification
beginning character.

Fixes: 148f963fb532 ("xen: core library changes")

Signed-off-by: Ilya V. Matveychikov <matvejchikov@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/common/include/rte_debug.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/include/rte_debug.h b/lib/librte_eal/common/include/rte_debug.h
index cab6fb4c9..ec1dce037 100644
--- a/lib/librte_eal/common/include/rte_debug.h
+++ b/lib/librte_eal/common/include/rte_debug.h
@@ -86,7 +86,7 @@ void rte_dump_registers(void);
 #endif
 #define	RTE_VERIFY(exp)	do {                                                  \
 	if (unlikely(!(exp)))                                                           \
-		rte_panic("line %d\tassert \"" #exp "\" failed\n", __LINE__); \
+		rte_panic("line %d\tassert \"%s\" failed\n", __LINE__, #exp); \
 } while (0)
 
 /*
-- 
2.14.2

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

* [dpdk-stable] patch 'contigmem: fix build on FreeBSD 12' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'eal: update assertion macro' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'mem: fix mmap error check on huge page attach' " luca.boccassi
                   ` (58 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Kefu Chai; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From b83c9d355140f2bd70cfc291654c0ebf0f7d4ce6 Mon Sep 17 00:00:00 2001
From: Kefu Chai <tchaikov@gmail.com>
Date: Fri, 1 Dec 2017 19:22:39 +0800
Subject: [PATCH] contigmem: fix build on FreeBSD 12

[ upstream commit 4a386cfeadaa747d88fa19c3cbe1bd93bbcde4f5 ]

include <sys/vmmeter.h> to fix build
otherwise the build fails with FreeBSD 12, like

In file included from contigmem.c:57:
/usr/srcs/head/src/sys/vm/vm_phys.h:122:10: error:
use of undeclared identifier 'vm_cnt'
        return (vm_cnt.v_free_count += adj);
                ^

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_eal/bsdapp/contigmem/contigmem.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_eal/bsdapp/contigmem/contigmem.c b/lib/librte_eal/bsdapp/contigmem/contigmem.c
index e8fb9087d..9676d8b35 100644
--- a/lib/librte_eal/bsdapp/contigmem/contigmem.c
+++ b/lib/librte_eal/bsdapp/contigmem/contigmem.c
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/rwlock.h>
 #include <sys/systm.h>
 #include <sys/sysctl.h>
+#include <sys/vmmeter.h>
 
 #include <machine/bus.h>
 
-- 
2.14.2

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

* [dpdk-stable] patch 'mem: fix mmap error check on huge page attach' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'eal: update assertion macro' " luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'contigmem: fix build on FreeBSD 12' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'app/testpmd: fix crash of txonly with multiple segments' " luca.boccassi
                   ` (57 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Michael McConville; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 6f8b9f0a1b53743ca27af98d4a4a78a244389175 Mon Sep 17 00:00:00 2001
From: Michael McConville <mmcco@mykolab.com>
Date: Thu, 30 Nov 2017 23:51:13 -0700
Subject: [PATCH] mem: fix mmap error check on huge page attach

[ upstream commit b45056be0429d6df2313e5e49aa8f78e5d840a97 ]

mmap(2) returns MAP_FAILED, not NULL, on failure.

Signed-off-by: Michael McConville <mmcco@mykolab.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/bsdapp/eal/eal_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/bsdapp/eal/eal_memory.c b/lib/librte_eal/bsdapp/eal/eal_memory.c
index 3614da8db..248312d96 100644
--- a/lib/librte_eal/bsdapp/eal/eal_memory.c
+++ b/lib/librte_eal/bsdapp/eal/eal_memory.c
@@ -150,7 +150,7 @@ rte_eal_hugepage_attach(void)
 	/* Map the shared hugepage_info into the process address spaces */
 	hpi = mmap(NULL, sizeof(struct hugepage_info), PROT_READ, MAP_PRIVATE,
 			fd_hugepage_info, 0);
-	if (hpi == NULL) {
+	if (hpi == MAP_FAILED) {
 		RTE_LOG(ERR, EAL, "Could not mmap %s\n", eal_hugepage_info_path());
 		goto error;
 	}
-- 
2.14.2

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

* [dpdk-stable] patch 'app/testpmd: fix crash of txonly with multiple segments' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (2 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'mem: fix mmap error check on huge page attach' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'mbuf: cleanup function to get last segment' " luca.boccassi
                   ` (56 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: Wenzhuo Lu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 6585cbc45756ef21905c543b7b6e726228354503 Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Tue, 26 Dec 2017 19:51:38 -0800
Subject: [PATCH] app/testpmd: fix crash of txonly with multiple segments

[ upstream commit b03913e9e22fbd7206c3d266b0f52831eacd96b3 ]

Running txonly mode can crash with "--txpkts=20,470". copy_len should be
properly adjusted.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 app/test-pmd/txonly.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index 8513a0620..1ee2a91a2 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -106,6 +106,7 @@ copy_buf_to_pkt_segs(void* buf, unsigned len, struct rte_mbuf *pkt,
 		buf = ((char*) buf + copy_len);
 		seg = seg->next;
 		seg_buf = rte_pktmbuf_mtod(seg, char *);
+		copy_len = seg->data_len;
 	}
 	rte_memcpy(seg_buf, buf, (size_t) len);
 }
-- 
2.14.2

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

* [dpdk-stable] patch 'mbuf: cleanup function to get last segment' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (3 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'app/testpmd: fix crash of txonly with multiple segments' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'bus/pci: fix interrupt handler type' " luca.boccassi
                   ` (55 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Ilya V. Matveychikov; +Cc: Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From c764ee841a9e7ac5de51df336da35f7e9d97887e Mon Sep 17 00:00:00 2001
From: "Ilya V. Matveychikov" <matvejchikov@gmail.com>
Date: Sun, 10 Dec 2017 00:08:22 +0300
Subject: [PATCH] mbuf: cleanup function to get last segment

[ upstream commit fce71ed2d2f18f7afa71f06fc9926c79676a98f9 ]

There is no reason to have local variable m2.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Ilya V. Matveychikov <matvejchikov@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_mbuf/rte_mbuf.h | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 8a814df24..2de97a370 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -1361,12 +1361,10 @@ static inline uint16_t rte_pktmbuf_tailroom(const struct rte_mbuf *m)
  */
 static inline struct rte_mbuf *rte_pktmbuf_lastseg(struct rte_mbuf *m)
 {
-	struct rte_mbuf *m2 = (struct rte_mbuf *)m;
-
 	__rte_mbuf_sanity_check(m, 1);
-	while (m2->next != NULL)
-		m2 = m2->next;
-	return m2;
+	while (m->next != NULL)
+		m = m->next;
+	return m;
 }
 
 /**
-- 
2.14.2

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

* [dpdk-stable] patch 'bus/pci: fix interrupt handler type' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (4 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'mbuf: cleanup function to get last segment' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'memzone: fix leak on allocation error' " luca.boccassi
                   ` (54 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Zhiyong Yang; +Cc: Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From e947b95e7cc956147f76ec2dcd2d20b90a694725 Mon Sep 17 00:00:00 2001
From: Zhiyong Yang <zhiyong.yang@intel.com>
Date: Wed, 10 Jan 2018 10:32:26 +0800
Subject: [PATCH] bus/pci: fix interrupt handler type

[ upstream commit 6c7001480ac6356ff0a4995f3ed495ed9c866061 ]

For virtio legacy device, testpmd startup fails when using uio_pci_generic.

The issue is caused by invoking the function pci_ioport_map. The correct
value of intr_handle.type is already set before calling it, we should avoid
overwriting the default value "RTE_INTR_HANDLE_UNKNOWN" in this function.
Besides, the removal has no harm to other cases because it is set to 0 by a
memset on the whole struct during allocation in the function pci_scan_one.

Such assignments are removed in the meanwhile in pci_uio_map_resource(),
pci_vfio_map_resource_primary() and pci_vfio_map_resource_secondary() in
order to keep consistencies and avoid future questions.

Fixes: 756ce64b1ecd ("eal: introduce PCI ioport API")

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_eal/common/eal_common_pci_uio.c | 1 -
 lib/librte_eal/linuxapp/eal/eal_pci.c      | 1 -
 2 files changed, 2 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_pci_uio.c b/lib/librte_eal/common/eal_common_pci_uio.c
index 367a6816d..6f91ff9c3 100644
--- a/lib/librte_eal/common/eal_common_pci_uio.c
+++ b/lib/librte_eal/common/eal_common_pci_uio.c
@@ -117,7 +117,6 @@ pci_uio_map_resource(struct rte_pci_device *dev)
 
 	dev->intr_handle.fd = -1;
 	dev->intr_handle.uio_cfg_fd = -1;
-	dev->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN;
 
 	/* secondary processes - use already recorded details */
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c
index 876ba3819..b0d0c3c61 100644
--- a/lib/librte_eal/linuxapp/eal/eal_pci.c
+++ b/lib/librte_eal/linuxapp/eal/eal_pci.c
@@ -623,7 +623,6 @@ pci_ioport_map(struct rte_pci_device *dev, int bar __rte_unused,
 	if (!found)
 		return -1;
 
-	dev->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN;
 	p->base = start;
 	RTE_LOG(DEBUG, EAL, "PCI Port IO found start=0x%x\n", start);
 
-- 
2.14.2

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

* [dpdk-stable] patch 'memzone: fix leak on allocation error' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (5 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'bus/pci: fix interrupt handler type' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'malloc: protect stats with lock' " luca.boccassi
                   ` (53 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 35430daa0c92615da27fc7087b83f21372485320 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Thu, 21 Dec 2017 18:07:07 +0000
Subject: [PATCH] memzone: fix leak on allocation error

[ upstream commit db22d31a79733f08e974f134c883361fd8641984 ]

We check if there's space in config after we allocated the memzone,
but if there isn't, we never free it back. This patch adds memzone
free if there's no room in memzone config.

Fixes: ff909fe21f0a ("mem: introduce memzone freeing")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/eal_common_memzone.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/eal_common_memzone.c b/lib/librte_eal/common/eal_common_memzone.c
index 64f4e0ade..b58d85b71 100644
--- a/lib/librte_eal/common/eal_common_memzone.c
+++ b/lib/librte_eal/common/eal_common_memzone.c
@@ -236,7 +236,7 @@ memzone_reserve_aligned_thread_unsafe(const char *name, size_t len,
 		return NULL;
 	}
 
-	const struct malloc_elem *elem = malloc_elem_from_data(mz_addr);
+	struct malloc_elem *elem = malloc_elem_from_data(mz_addr);
 
 	/* fill the zone in config */
 	mz = get_next_free_memzone();
@@ -244,6 +244,7 @@ memzone_reserve_aligned_thread_unsafe(const char *name, size_t len,
 	if (mz == NULL) {
 		RTE_LOG(ERR, EAL, "%s(): Cannot find free memzone but there is room "
 				"in config!\n", __func__);
+		malloc_elem_free(elem);
 		rte_errno = ENOSPC;
 		return NULL;
 	}
-- 
2.14.2

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

* [dpdk-stable] patch 'malloc: protect stats with lock' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (6 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'memzone: fix leak on allocation error' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'malloc: fix end for bounded elements' " luca.boccassi
                   ` (52 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 4ef2031b7a89aa7bfb75e484dcf81c641cc2dc08 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Thu, 21 Dec 2017 17:32:04 +0000
Subject: [PATCH] malloc: protect stats with lock

[ upstream commit f13d705a619d7a7e04d51b686dd62e890ecf1bd5 ]

When we're gathering statistics, we are traversing the freelist,
which may change under our feet in multithreaded scenario. This
is verified by occasional segfaults when running malloc autotest
on a machine with big amount of cores.

This patch protects malloc heap stats call with a lock. It changes
its definition in the process due to locking invalidating the
const-ness, but this isn't a public API, so that's OK.

Fixes: 2a5c356e177d ("memory: stats for malloc")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/malloc_heap.c | 6 +++++-
 lib/librte_eal/common/malloc_heap.h | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/malloc_heap.c b/lib/librte_eal/common/malloc_heap.c
index 267a4c6cd..c731f1cd5 100644
--- a/lib/librte_eal/common/malloc_heap.c
+++ b/lib/librte_eal/common/malloc_heap.c
@@ -178,12 +178,14 @@ malloc_heap_alloc(struct malloc_heap *heap,
  * Function to retrieve data for heap on given socket
  */
 int
-malloc_heap_get_stats(const struct malloc_heap *heap,
+malloc_heap_get_stats(struct malloc_heap *heap,
 		struct rte_malloc_socket_stats *socket_stats)
 {
 	size_t idx;
 	struct malloc_elem *elem;
 
+	rte_spinlock_lock(&heap->lock);
+
 	/* Initialise variables for heap */
 	socket_stats->free_count = 0;
 	socket_stats->heap_freesz_bytes = 0;
@@ -205,6 +207,8 @@ malloc_heap_get_stats(const struct malloc_heap *heap,
 	socket_stats->heap_allocsz_bytes = (socket_stats->heap_totalsz_bytes -
 			socket_stats->heap_freesz_bytes);
 	socket_stats->alloc_count = heap->alloc_count;
+
+	rte_spinlock_unlock(&heap->lock);
 	return 0;
 }
 
diff --git a/lib/librte_eal/common/malloc_heap.h b/lib/librte_eal/common/malloc_heap.h
index 3ccbef0fd..3b1166f03 100644
--- a/lib/librte_eal/common/malloc_heap.h
+++ b/lib/librte_eal/common/malloc_heap.h
@@ -57,7 +57,7 @@ malloc_heap_alloc(struct malloc_heap *heap,	const char *type, size_t size,
 		unsigned flags, size_t align, size_t bound);
 
 int
-malloc_heap_get_stats(const struct malloc_heap *heap,
+malloc_heap_get_stats(struct malloc_heap *heap,
 		struct rte_malloc_socket_stats *socket_stats);
 
 int
-- 
2.14.2

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

* [dpdk-stable] patch 'malloc: fix end for bounded elements' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (7 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'malloc: protect stats with lock' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'vfio: fix enabled check on error' " luca.boccassi
                   ` (51 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 8d84c383b7262434ff8e93e03be60fdb2a3e07db Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Thu, 21 Dec 2017 16:54:24 +0000
Subject: [PATCH] malloc: fix end for bounded elements

[ upstream commit 20d2159d4640a1844a5856d8d8df86cf0b24b7c1 ]

In cases when alignment is bigger than boundary, we may incorrectly
calculate end of a bounded malloc element.

Consider this: suppose we are allocating a bounded malloc element
that should be of 128 bytes in size, bounded to 128 bytes and
aligned on a 256-byte boundary. Suppose our malloc element ends
at 0x140 - that is, 256 plus one cacheline.

So, right at the start, we are aligning our new_data_start to
include the required element size, and to be aligned on a specified
boundary - so new_data_start becomes 0. This fails the following
bounds check, because our element cannot go above 128 bytes from
the start, and we are at 320. So, we enter the bounds handling
branch.

While we're in there, we are aligning end_pt to our boundedness
requirement of 128 byte, and end up with 0x100 (since 256 is
128-byte aligned). We recalculate new_data_size and it stays at
0, however our end is at 0x100, which is beyond the 128 byte
boundary, and we report inability to reserve a bounded element
when we could have.

This patch adds an end_pt recalculation after new_data_start
adjustment - we already know that size <= bound, so we can do it
safely - and we then correctly report that we can, in fact, try
using this element for bounded malloc allocation.

Fixes: fafcc11985a2 ("mem: rework memzone to be allocated by malloc")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/malloc_elem.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_eal/common/malloc_elem.c b/lib/librte_eal/common/malloc_elem.c
index 77a86151b..e2bd3ac21 100644
--- a/lib/librte_eal/common/malloc_elem.c
+++ b/lib/librte_eal/common/malloc_elem.c
@@ -98,6 +98,7 @@ elem_start_pt(struct malloc_elem *elem, size_t size, unsigned align,
 	if ((new_data_start & bmask) != ((end_pt - 1) & bmask)) {
 		end_pt = RTE_ALIGN_FLOOR(end_pt, bound);
 		new_data_start = RTE_ALIGN_FLOOR((end_pt - size), align);
+		end_pt = new_data_start + size;
 		if (((end_pt - 1) & bmask) != (new_data_start & bmask))
 			return NULL;
 	}
-- 
2.14.2

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

* [dpdk-stable] patch 'vfio: fix enabled check on error' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (8 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'malloc: fix end for bounded elements' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'pmdinfogen: fix cross compilation for ARM big endian' " luca.boccassi
                   ` (50 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From a552f812df96cc4d6734920b85e9d3d57f65c348 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Fri, 22 Dec 2017 10:30:36 +0000
Subject: [PATCH] vfio: fix enabled check on error

[ upstream commit 7b74a6e0b638ce69b9d03367ce85258e0da19807 ]

rte_eal_check_module() might return -1, which would have been a
"not false" condition for mod_available. Fix that to only report
vfio being enabled if rte_eal_check_module() returns 1.

Fixes: 221f7c220d6b ("vfio: move global config out of PCI files")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/linuxapp/eal/eal_vfio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c
index 702f7a2e0..7ea20f3e2 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c
@@ -339,7 +339,7 @@ vfio_enable(const char *modname)
 int
 vfio_is_enabled(const char *modname)
 {
-	const int mod_available = rte_eal_check_module(modname);
+	const int mod_available = rte_eal_check_module(modname) > 0;
 	return vfio_cfg.vfio_enabled && mod_available;
 }
 
-- 
2.14.2

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

* [dpdk-stable] patch 'pmdinfogen: fix cross compilation for ARM big endian' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (9 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'vfio: fix enabled check on error' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'lpm: fix ARM big endian build' " luca.boccassi
                   ` (49 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Jun Yang, Bruce Richardson, Neil Horman, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 633ccbc57ab39ac2771367fcf7e5780d46c348ca Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Mon, 18 Dec 2017 13:26:45 +0530
Subject: [PATCH] pmdinfogen: fix cross compilation for ARM big endian

[ upstream commit 74d6c4a72eb2ba9025f25706227f4cf304fe0ba6 ]

Cross compiling DPDK for BE mode on ARM results into errors
"PMDINFO portal/dpaa2_hw_dpio.o.pmd.c No drivers registered"

The original code assumes the sh_size to be 32 bit, while it can
be Elf32_Word or Elf64_Xword based on 32bit or 64 bit systems.

This patches replaces the sh_size conversion routines to use ADDR_SIZE

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

Signed-off-by: Jun Yang <jun.yang@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
---
 buildtools/pmdinfogen/pmdinfogen.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/buildtools/pmdinfogen/pmdinfogen.c b/buildtools/pmdinfogen/pmdinfogen.c
index df10a2f9f..79bb343af 100644
--- a/buildtools/pmdinfogen/pmdinfogen.c
+++ b/buildtools/pmdinfogen/pmdinfogen.c
@@ -158,7 +158,8 @@ static int parse_elf(struct elf_info *info, const char *filename)
 		 * There are more than 64k sections,
 		 * read count from .sh_size.
 		 */
-		info->num_sections = TO_NATIVE(endian, 32, sechdrs[0].sh_size);
+		info->num_sections =
+			TO_NATIVE(endian, ADDR_SIZE, sechdrs[0].sh_size);
 	} else {
 		info->num_sections = hdr->e_shnum;
 	}
@@ -181,7 +182,7 @@ static int parse_elf(struct elf_info *info, const char *filename)
 		sechdrs[i].sh_offset    =
 			TO_NATIVE(endian, ADDR_SIZE, sechdrs[i].sh_offset);
 		sechdrs[i].sh_size      =
-			TO_NATIVE(endian, 32, sechdrs[i].sh_size);
+			TO_NATIVE(endian, ADDR_SIZE, sechdrs[i].sh_size);
 		sechdrs[i].sh_link      =
 			TO_NATIVE(endian, 32, sechdrs[i].sh_link);
 		sechdrs[i].sh_info      =
-- 
2.14.2

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

* [dpdk-stable] patch 'lpm: fix ARM big endian build' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (10 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'pmdinfogen: fix cross compilation for ARM big endian' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/i40e: " luca.boccassi
                   ` (48 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 416357731f7333de1b6f5bdd5f409ab6d11dcbfa Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Mon, 18 Dec 2017 13:26:46 +0530
Subject: [PATCH] lpm: fix ARM big endian build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit b2e1c99ec8e22546e80454c9559db1c108394628 ]

Compiling on ARM BE using Linaro toolchain caused following
error/warnings.

rte_lpm.c: In function ‘add_depth_big_v20’:
rte_lpm.c:911:4: error: braces around scalar initializer [-Werror]
    { .group_idx = (uint8_t)tbl8_group_index, },
    ^
rte_lpm.c:911:4: note: (near initialization for
	‘new_tbl24_entry.depth’)
rte_lpm.c:911:6:error: field name not in record or union initializer
    { .group_idx = (uint8_t)tbl8_group_index, },
      ^
rte_lpm.c:911:6: note: (near initialization for
	‘new_tbl24_entry.depth’)
rte_lpm.c:914:13: error: initialized field overwritten
	[-Werror=override-init]
    .depth = 0,

Fixes: dc81ebbacaeb ("lpm: extend IPv4 next hop field")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_lpm/rte_lpm.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c
index 978ac6013..56fc8b0b1 100644
--- a/lib/librte_lpm/rte_lpm.c
+++ b/lib/librte_lpm/rte_lpm.c
@@ -908,7 +908,7 @@ add_depth_big_v20(struct rte_lpm_v20 *lpm, uint32_t ip_masked, uint8_t depth,
 		 */
 
 		struct rte_lpm_tbl_entry_v20 new_tbl24_entry = {
-			{ .group_idx = (uint8_t)tbl8_group_index, },
+			.group_idx = (uint8_t)tbl8_group_index,
 			.valid = VALID,
 			.valid_group = 1,
 			.depth = 0,
@@ -954,7 +954,7 @@ add_depth_big_v20(struct rte_lpm_v20 *lpm, uint32_t ip_masked, uint8_t depth,
 		 */
 
 		struct rte_lpm_tbl_entry_v20 new_tbl24_entry = {
-				{ .group_idx = (uint8_t)tbl8_group_index, },
+				.group_idx = (uint8_t)tbl8_group_index,
 				.valid = VALID,
 				.valid_group = 1,
 				.depth = 0,
@@ -1361,7 +1361,7 @@ delete_depth_small_v20(struct rte_lpm_v20 *lpm, uint32_t ip_masked,
 		 */
 
 		struct rte_lpm_tbl_entry_v20 new_tbl24_entry = {
-			{.next_hop = lpm->rules_tbl[sub_rule_index].next_hop,},
+			.next_hop = lpm->rules_tbl[sub_rule_index].next_hop,
 			.valid = VALID,
 			.valid_group = 0,
 			.depth = sub_rule_depth,
@@ -1664,7 +1664,7 @@ delete_depth_big_v20(struct rte_lpm_v20 *lpm, uint32_t ip_masked,
 	} else if (tbl8_recycle_index > -1) {
 		/* Update tbl24 entry. */
 		struct rte_lpm_tbl_entry_v20 new_tbl24_entry = {
-			{ .next_hop = lpm->tbl8[tbl8_recycle_index].next_hop, },
+			.next_hop = lpm->tbl8[tbl8_recycle_index].next_hop,
 			.valid = VALID,
 			.valid_group = 0,
 			.depth = lpm->tbl8[tbl8_recycle_index].depth,
-- 
2.14.2

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

* [dpdk-stable] patch 'net/i40e: fix ARM big endian build' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (11 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'lpm: fix ARM big endian build' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/ixgbe: " luca.boccassi
                   ` (47 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From d9423154fedf43f870d8b9480c0fe64c0ece3ec1 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Mon, 18 Dec 2017 13:26:48 +0530
Subject: [PATCH] net/i40e: fix ARM big endian build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 80c557be08edbcb59d4d964150821f3be35533e1 ]

This patch fixes the following error observed when
compiling with ARM BE compiler.

i40e_ethdev.c: In function ‘i40e_dev_tunnel_filter_set’:
i40e_ethdev.c:6988:5: error: lvalue required as unary ‘&’ operand
     &rte_cpu_to_le_32(ipv4_addr),

Fixes: edc845bd53ec ("app/testpmd: fix build on FreeBSD")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 0835c2d43..992caea5b 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -6507,7 +6507,7 @@ i40e_dev_tunnel_filter_set(struct i40e_pf *pf,
 			uint8_t add)
 {
 	uint16_t ip_type;
-	uint32_t ipv4_addr;
+	uint32_t ipv4_addr, ipv4_addr_le;
 	uint8_t i, tun_type = 0;
 	/* internal varialbe to convert ipv6 byte order */
 	uint32_t convert_ipv6[4];
@@ -6534,8 +6534,9 @@ i40e_dev_tunnel_filter_set(struct i40e_pf *pf,
 	if (tunnel_filter->ip_type == RTE_TUNNEL_IPTYPE_IPV4) {
 		ip_type = I40E_AQC_ADD_CLOUD_FLAGS_IPV4;
 		ipv4_addr = rte_be_to_cpu_32(tunnel_filter->ip_addr.ipv4_addr);
+		ipv4_addr_le = rte_cpu_to_le_32(ipv4_addr);
 		rte_memcpy(&pfilter->ipaddr.v4.data,
-				&rte_cpu_to_le_32(ipv4_addr),
+				&ipv4_addr_le,
 				sizeof(pfilter->ipaddr.v4.data));
 	} else {
 		ip_type = I40E_AQC_ADD_CLOUD_FLAGS_IPV6;
-- 
2.14.2

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

* [dpdk-stable] patch 'net/ixgbe: fix ARM big endian build' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (12 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/i40e: " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'examples/l3fwd-power: fix Rx without interrupt' " luca.boccassi
                   ` (46 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 34f112ca8674278a16e9c6d98f535f96591eef64 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Mon, 18 Dec 2017 13:26:49 +0530
Subject: [PATCH] net/ixgbe: fix ARM big endian build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 704e657beaa64239a92f792f2514fb6fa5e2013c ]

fixes the following compilation error on compiling with ARM BE compiler

ixgbe_common.c: In function ‘ixgbe_host_interface_command’:
ixgbe_common.c:4610:22: error: passing argument 1 of
‘__builtin_bswap32’ makes integer from pointer without a cast
[-Werror=int-conversion]
   IXGBE_LE32_TO_CPUS(&buffer[bi]);
                      ^
Fixes: aa4fc14d2cee ("ixgbe: update base driver")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c
index cca19efcb..f85668e7c 100644
--- a/drivers/net/ixgbe/base/ixgbe_common.c
+++ b/drivers/net/ixgbe/base/ixgbe_common.c
@@ -4552,7 +4552,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
 	/* first pull in the header so we know the buffer length */
 	for (bi = 0; bi < dword_len; bi++) {
 		buffer[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, bi);
-		IXGBE_LE32_TO_CPUS(&buffer[bi]);
+		IXGBE_LE32_TO_CPUS((uintptr_t)&buffer[bi]);
 	}
 
 	/* If there is any thing in data position pull it in */
@@ -4572,7 +4572,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
 	/* Pull in the rest of the buffer (bi is where we left off) */
 	for (; bi <= dword_len; bi++) {
 		buffer[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, bi);
-		IXGBE_LE32_TO_CPUS(&buffer[bi]);
+		IXGBE_LE32_TO_CPUS((uintptr_t)&buffer[bi]);
 	}
 
 rel_out:
-- 
2.14.2

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

* [dpdk-stable] patch 'examples/l3fwd-power: fix Rx without interrupt' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (13 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/ixgbe: " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'examples/l3fwd-power: fix frequency detection' " luca.boccassi
                   ` (45 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Nikhil Agarwal; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 5585944b00f10e96d68e2f35fd93c24818e9bb3d Mon Sep 17 00:00:00 2001
From: Nikhil Agarwal <nikhil.agarwal@linaro.org>
Date: Tue, 12 Dec 2017 15:38:23 +0530
Subject: [PATCH] examples/l3fwd-power: fix Rx without interrupt

[ upstream commit 4ffc0a883b233969ba6ce38b8c21c62153751a45 ]

This existing code cause the platform to start receiving packet
immediately irrespective of interrupts available or not.
If the platform does not support Rx interrupt, it shall not start
receiving packets immediately. It shall let the timer management work.

Fixes: aee3bc79cc34 ("examples/l3fwd-power: enable one-shot Rx interrupt and polling switch")

Signed-off-by: Nikhil Agarwal <nikhil.agarwal@linaro.org>
Acked-by: David Hunt <david.hunt@intel.com>
---
 examples/l3fwd-power/main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index eb5adb6ec..7e0c7d8a4 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -999,9 +999,11 @@ start_rx:
 					turn_on_intr(qconf);
 					sleep_until_rx_interrupt(
 						qconf->n_rx_queue);
+					/**
+					 * start receiving packets immediately
+					 */
+					goto start_rx;
 				}
-				/* start receiving packets immediately */
-				goto start_rx;
 			}
 			stats[lcore_id].sleep_time += lcore_idle_hint;
 		}
-- 
2.14.2

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

* [dpdk-stable] patch 'examples/l3fwd-power: fix frequency detection' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (14 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'examples/l3fwd-power: fix Rx without interrupt' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/nfp: fix MTU settings' " luca.boccassi
                   ` (44 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Nikhil Agarwal; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 9147ae09d0872dc5e61fd1e58eec5ca0bff568ce Mon Sep 17 00:00:00 2001
From: Nikhil Agarwal <nikhil.agarwal@linaro.org>
Date: Tue, 12 Dec 2017 15:38:24 +0530
Subject: [PATCH] examples/l3fwd-power: fix frequency detection

[ upstream commit 63de7e6e4fb507755c8306cb50ef27b85c8f6f2d ]

The code assumes that the platform frequency is 2GHz.
This patch add support for dynamically detecting platform frequence.

Fixes: d7937e2e3d12 ("power: initial import")

Signed-off-by: Nikhil Agarwal <nikhil.agarwal@linaro.org>
Acked-by: David Hunt <david.hunt@intel.com>
---
 examples/l3fwd-power/main.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index 7e0c7d8a4..217a448b0 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -83,8 +83,6 @@
 
 #define MIN_ZERO_POLL_COUNT 10
 
-/* around 100ms at 2 Ghz */
-#define TIMER_RESOLUTION_CYCLES           200000000ULL
 /* 100 ms interval */
 #define TIMER_NUMBER_PER_SECOND           10
 /* 100000 us */
@@ -824,7 +822,7 @@ main_loop(__attribute__((unused)) void *dummy)
 {
 	struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
 	unsigned lcore_id;
-	uint64_t prev_tsc, diff_tsc, cur_tsc;
+	uint64_t prev_tsc, diff_tsc, cur_tsc, tim_res_tsc, hz;
 	uint64_t prev_tsc_power = 0, cur_tsc_power, diff_tsc_power;
 	int i, j, nb_rx;
 	uint8_t portid, queueid;
@@ -838,6 +836,8 @@ main_loop(__attribute__((unused)) void *dummy)
 	const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) / US_PER_S * BURST_TX_DRAIN_US;
 
 	prev_tsc = 0;
+	hz = rte_get_timer_hz();
+	tim_res_tsc = hz/TIMER_NUMBER_PER_SECOND;
 
 	lcore_id = rte_lcore_id();
 	qconf = &lcore_conf[lcore_id];
@@ -883,7 +883,7 @@ main_loop(__attribute__((unused)) void *dummy)
 		}
 
 		diff_tsc_power = cur_tsc_power - prev_tsc_power;
-		if (diff_tsc_power > TIMER_RESOLUTION_CYCLES) {
+		if (diff_tsc_power > tim_res_tsc) {
 			rte_timer_manage();
 			prev_tsc_power = cur_tsc_power;
 		}
-- 
2.14.2

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

* [dpdk-stable] patch 'net/nfp: fix MTU settings' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (15 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'examples/l3fwd-power: fix frequency detection' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/nfp: fix jumbo " luca.boccassi
                   ` (43 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Alejandro Lucero; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 819ba1b66fd60231d1f8e2eabe9d49620430ecd0 Mon Sep 17 00:00:00 2001
From: Alejandro Lucero <alejandro.lucero@netronome.com>
Date: Fri, 24 Nov 2017 14:23:48 +0000
Subject: [PATCH] net/nfp: fix MTU settings

[ upstream commit d9b98888d4c596aa536b49ba16e33f4046d4ace2 ]

The wrong mtu length was used for configuring the hardware. The
max_rx_pktlen reported was also wrong.

Fixes: defb9a5dd156 ("nfp: introduce driver initialization")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 drivers/net/nfp/nfp_net.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 74453204b..052b07348 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1012,7 +1012,7 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	dev_info->max_rx_queues = (uint16_t)hw->max_rx_queues;
 	dev_info->max_tx_queues = (uint16_t)hw->max_tx_queues;
 	dev_info->min_rx_bufsize = ETHER_MIN_MTU;
-	dev_info->max_rx_pktlen = hw->mtu;
+	dev_info->max_rx_pktlen = hw->max_mtu;
 	/* Next should change when PF support is implemented */
 	dev_info->max_mac_addrs = 1;
 
@@ -2390,7 +2390,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 	hw->ver = nn_cfg_readl(hw, NFP_NET_CFG_VERSION);
 	hw->cap = nn_cfg_readl(hw, NFP_NET_CFG_CAP);
 	hw->max_mtu = nn_cfg_readl(hw, NFP_NET_CFG_MAX_MTU);
-	hw->mtu = hw->max_mtu;
+	hw->mtu = ETHER_MTU;
 
 	if (NFD_CFG_MAJOR_VERSION_of(hw->ver) < 2)
 		hw->rx_offset = NFP_NET_RX_OFFSET;
-- 
2.14.2

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

* [dpdk-stable] patch 'net/nfp: fix jumbo settings' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (16 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/nfp: fix MTU settings' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/nfp: fix CRC strip check behaviour' " luca.boccassi
                   ` (42 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Alejandro Lucero; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From c8ac12fbb38b528437938b9522d8239032917deb Mon Sep 17 00:00:00 2001
From: Alejandro Lucero <alejandro.lucero@netronome.com>
Date: Fri, 24 Nov 2017 14:24:37 +0000
Subject: [PATCH] net/nfp: fix jumbo settings

[ upstream commit c70ccbc79d8a0b7327f98f6072da75a530c4102a ]

When jumbo frames is configured, the hardware mtu needs to be updated to
the specified max_rx_pkt_len. Also, changing mtu should be avoided once
the PMD port started.

Fixes: defb9a5dd156 ("nfp: introduce driver initialization")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 drivers/net/nfp/nfp_net.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 052b07348..4c25e3e3c 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -517,7 +517,7 @@ nfp_net_configure(struct rte_eth_dev *dev)
 		new_ctrl |= NFP_NET_CFG_CTRL_TXVLAN;
 
 	if (rxmode->jumbo_frame)
-		/* this is handled in rte_eth_dev_configure */
+		hw->mtu = rxmode->max_rx_pkt_len;
 
 	if (rxmode->hw_strip_crc) {
 		PMD_INIT_LOG(INFO, "strip CRC not supported\n");
@@ -1240,6 +1240,13 @@ nfp_net_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	if ((mtu < ETHER_MIN_MTU) || ((uint32_t)mtu > hw->max_mtu))
 		return -EINVAL;
 
+	/* mtu setting is forbidden if port is started */
+	if (dev->data->dev_started) {
+		PMD_DRV_LOG(ERR, "port %d must be stopped before configuration",
+			    dev->data->port_id);
+		return -EBUSY;
+	}
+
 	/* switch to jumbo mode if needed */
 	if ((uint32_t)mtu > ETHER_MAX_LEN)
 		dev->data->dev_conf.rxmode.jumbo_frame = 1;
-- 
2.14.2

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

* [dpdk-stable] patch 'net/nfp: fix CRC strip check behaviour' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (17 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/nfp: fix jumbo " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/thunderx: fix multi segment Tx function return' " luca.boccassi
                   ` (41 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Alejandro Lucero; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From f286ca3b2b4b4a244b1ff5b423fb5c4f79bb5d8f Mon Sep 17 00:00:00 2001
From: Alejandro Lucero <alejandro.lucero@netronome.com>
Date: Fri, 24 Nov 2017 14:26:02 +0000
Subject: [PATCH] net/nfp: fix CRC strip check behaviour

[ upstream commit d4abcc55c5c6922ab24bb62358b6ba54fb14df87 ]

NFP does CRC strip by default and it is not configurable. But, even
if an app requests not to do it, that should not be a reason for PMD
configuration failure.

Fixes: defb9a5dd156 ("nfp: introduce driver initialization")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 drivers/net/nfp/nfp_net.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 4c25e3e3c..1f42dac83 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -519,10 +519,8 @@ nfp_net_configure(struct rte_eth_dev *dev)
 	if (rxmode->jumbo_frame)
 		hw->mtu = rxmode->max_rx_pkt_len;
 
-	if (rxmode->hw_strip_crc) {
-		PMD_INIT_LOG(INFO, "strip CRC not supported\n");
-		return -EINVAL;
-	}
+	if (!rxmode->hw_strip_crc)
+		PMD_INIT_LOG(INFO, "HW does strip CRC and it is not configurable\n");
 
 	if (rxmode->enable_scatter) {
 		PMD_INIT_LOG(INFO, "Scatter not supported\n");
-- 
2.14.2

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

* [dpdk-stable] patch 'net/thunderx: fix multi segment Tx function return' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (18 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/nfp: fix CRC strip check behaviour' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/szedata2: fix check of mmap return value' " luca.boccassi
                   ` (40 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Sunil Kulkarni, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 512be3e244a6f6cc1c892e2315ebefd6151c5357 Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Date: Tue, 28 Nov 2017 18:52:38 +0530
Subject: [PATCH] net/thunderx: fix multi segment Tx function return

[ upstream commit 42473d6782896bf6281d347f61cbcfaf8df17d0f ]

multi segment version of tx burst function was not
returning the actual number of packets sent out
in PMD xmit function.

Fixes: 1c421f18e0 ("net/thunderx: add single and multi-segment Tx")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Sunil Kulkarni <sunil.kulkarni@caviumnetworks.com>
---
 drivers/net/thunderx/nicvf_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/thunderx/nicvf_rxtx.c b/drivers/net/thunderx/nicvf_rxtx.c
index 87e9de1ab..275adb31c 100644
--- a/drivers/net/thunderx/nicvf_rxtx.c
+++ b/drivers/net/thunderx/nicvf_rxtx.c
@@ -252,7 +252,7 @@ nicvf_xmit_pkts_multiseg(void *tx_queue, struct rte_mbuf **tx_pkts,
 
 	/* Inform HW to xmit the packets */
 	nicvf_addr_write(sq->sq_door, used_desc);
-	return nb_pkts;
+	return i;
 }
 
 static const uint32_t ptype_table[16][16] __rte_cache_aligned = {
-- 
2.14.2

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

* [dpdk-stable] patch 'net/szedata2: fix check of mmap return value' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (19 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/thunderx: fix multi segment Tx function return' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/bonding: fix activated slave in 8023ad mode' " luca.boccassi
                   ` (39 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Matej Vido; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From a4a1e175cdb4002dfc2898f206ba94f829d2e622 Mon Sep 17 00:00:00 2001
From: Matej Vido <vido@cesnet.cz>
Date: Thu, 7 Dec 2017 15:54:42 +0100
Subject: [PATCH] net/szedata2: fix check of mmap return value

[ upstream commit a648d49e78fdbc88952903a736a9a57d6353eb43 ]

Fixes: 9eddbdb4b094 ("szedata2: support link state operations")

Signed-off-by: Matej Vido <vido@cesnet.cz>
---
 drivers/net/szedata2/rte_eth_szedata2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c
index f3cd52dc4..0ae7385f4 100644
--- a/drivers/net/szedata2/rte_eth_szedata2.c
+++ b/drivers/net/szedata2/rte_eth_szedata2.c
@@ -1494,7 +1494,7 @@ rte_szedata2_eth_dev_init(struct rte_eth_dev *dev)
 			dev->pci_dev->mem_resource[PCI_RESOURCE_NUMBER].len,
 			PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
 	close(fd);
-	if (pci_resource_ptr == NULL) {
+	if (pci_resource_ptr == MAP_FAILED) {
 		RTE_LOG(ERR, PMD, "Could not mmap file %s (fd = %d)\n",
 				rsc_filename, fd);
 		return -EINVAL;
-- 
2.14.2

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

* [dpdk-stable] patch 'net/bonding: fix activated slave in 8023ad mode' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (20 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/szedata2: fix check of mmap return value' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/qede: fix to reject config with no Rx queue' " luca.boccassi
                   ` (38 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Jerry Lilijun; +Cc: Kyle Larose, Declan Doherty, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From ffbd4da2a439f4b1fd62a9718d439ff8901b4ae7 Mon Sep 17 00:00:00 2001
From: Jerry Lilijun <jerry.lilijun@huawei.com>
Date: Mon, 20 Nov 2017 07:15:41 +0000
Subject: [PATCH] net/bonding: fix activated slave in 8023ad mode

[ upstream commit 7a25826fc14b2b012f734a215bdef4acadac1f7a ]

In the function bond_mode_8023ad_enable(), the var i is used as slave
port id to the function bond_mode_8023ad_activate_slave().

This variable is only a index for array internals->active_slaves.
So its need to be fixed and change i to internals->active_slaves[i].

Fixes: 46fb43683679 ("bond: add mode 4")

Signed-off-by: Jerry Lilijun <jerry.lilijun@huawei.com>
Tested-by: Kyle Larose <klarose@sandvine.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 8081981c7..eea6ccc57 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -1109,7 +1109,8 @@ bond_mode_8023ad_enable(struct rte_eth_dev *bond_dev)
 	uint8_t i;
 
 	for (i = 0; i < internals->active_slave_count; i++)
-		bond_mode_8023ad_activate_slave(bond_dev, i);
+		bond_mode_8023ad_activate_slave(bond_dev,
+				internals->active_slaves[i]);
 
 	return 0;
 }
-- 
2.14.2

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

* [dpdk-stable] patch 'net/qede: fix to reject config with no Rx queue' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (21 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/bonding: fix activated slave in 8023ad mode' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'ethdev: fix missing imissed counter in xstats' " luca.boccassi
                   ` (37 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Harish Patil; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From d676db628b14dc789523595544405c41dbc23714 Mon Sep 17 00:00:00 2001
From: Harish Patil <harish.patil@cavium.com>
Date: Wed, 13 Dec 2017 22:36:02 -0800
Subject: [PATCH] net/qede: fix to reject config with no Rx queue

[ upstream commit e60644c4420c47fa196c0c947a6c6e5891d167d0 ]

The qede firmware expects minimum one RX queue to be created, otherwise
it results in firmware exception. So a check is added to prevent that.

Fixes: ec94dbc57362 ("qede: add base driver")

Signed-off-by: Harish Patil <harish.patil@cavium.com>
---
 drivers/net/qede/qede_ethdev.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 9d782ac78..8fdff14f3 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -674,6 +674,14 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
 		}
 	}
 
+	/* We need to have min 1 RX queue.There is no min check in
+	 * rte_eth_dev_configure(), so we are checking it here.
+	 */
+	if (eth_dev->data->nb_rx_queues == 0) {
+		DP_ERR(edev, "Minimum one RX queue is required\n");
+		return -EINVAL;
+	}
+
 	/* Sanity checks and throw warnings */
 	if (rxmode->enable_scatter == 1)
 		eth_dev->data->scattered_rx = 1;
-- 
2.14.2

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

* [dpdk-stable] patch 'ethdev: fix missing imissed counter in xstats' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (22 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/qede: fix to reject config with no Rx queue' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'ethdev: fix typo in functions comment' " luca.boccassi
                   ` (36 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Thibaut Collet, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 4aa6d8138a96d6733e74c82b3cfe13f3e486b9e6 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Thu, 14 Dec 2017 15:23:00 +0100
Subject: [PATCH] ethdev: fix missing imissed counter in xstats

[ upstream commit 831d94fdb6fc2bc1b658e81be5838f3ebe633785 ]

imissed counter has been set as deprecated in commit 49f386542af4
("ethdev: remove driver specific stats") and removed from the
rte_eth_xstats_name_off structure.

The imissed counter has been restored few commits later but has not been
restored in the rte_eth_stats structure. Add it back.

Fixes: 4eadb8ba11b7 ("ethdev: do not deprecate imissed counter")

Signed-off-by: Thibaut Collet <thibaut.collet@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_ether/rte_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index ea545250a..4679dc698 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -94,6 +94,7 @@ static const struct rte_eth_xstats_name_off rte_stats_strings[] = {
 	{"tx_good_packets", offsetof(struct rte_eth_stats, opackets)},
 	{"rx_good_bytes", offsetof(struct rte_eth_stats, ibytes)},
 	{"tx_good_bytes", offsetof(struct rte_eth_stats, obytes)},
+	{"rx_missed_errors", offsetof(struct rte_eth_stats, imissed)},
 	{"rx_errors", offsetof(struct rte_eth_stats, ierrors)},
 	{"tx_errors", offsetof(struct rte_eth_stats, oerrors)},
 	{"rx_mbuf_allocation_errors", offsetof(struct rte_eth_stats,
-- 
2.14.2

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

* [dpdk-stable] patch 'ethdev: fix typo in functions comment' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (23 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'ethdev: fix missing imissed counter in xstats' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/i40e: fix VLAN offload setting' " luca.boccassi
                   ` (35 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 198420c3b7c7b50b8c7e0995f3d1db0d9abd1d1e Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Tue, 19 Dec 2017 11:31:50 +0000
Subject: [PATCH] ethdev: fix typo in functions comment

[ upstream commit 7c9a6f880f5faf495ca758895d05fd4e2993f57e ]

Fixes: fbde27f19ab8 ("ethdev: get default Rx/Tx configuration from dev info")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_ether/rte_ethdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 11ec1fa8b..011a74f57 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -1965,7 +1965,7 @@ int rte_eth_rx_queue_setup(uint8_t port_id, uint16_t rx_queue_id,
  *   the DMA memory allocated for the transmit descriptors of the ring.
  * @param tx_conf
  *   The pointer to the configuration data to be used for the transmit queue.
- *   NULL value is allowed, in which case default RX configuration
+ *   NULL value is allowed, in which case default TX configuration
  *   will be used.
  *   The *tx_conf* structure contains the following data:
  *   - The *tx_thresh* structure with the values of the Prefetch, Host, and
-- 
2.14.2

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

* [dpdk-stable] patch 'net/i40e: fix VLAN offload setting' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (24 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'ethdev: fix typo in functions comment' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/fm10k: fix logical port delete' " luca.boccassi
                   ` (34 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 7213babdcb5cb21e25ad71c6f258636131c04dee Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Wed, 29 Nov 2017 05:27:30 -0500
Subject: [PATCH] net/i40e: fix VLAN offload setting

[ upstream commit 48a203711829d151e4896f953c31f4618ce710fa ]

Vlan offload flag "rx_mode.hw_vlan_extend" should be considerred at
rte_eth_dev_configure stage as well as "rx_mode.hw_vlan_strip" and
"rx_mode.hw_vlan_filter".

Fixes: 4861cde46116 ("i40e: new poll mode driver")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 992caea5b..69a0a21c0 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -4888,11 +4888,11 @@ i40e_dev_init_vlan(struct rte_eth_dev *dev)
 	int mask = 0;
 
 	/* Apply vlan offload setting */
-	mask = ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK;
+	mask = ETH_VLAN_STRIP_MASK |
+	       ETH_VLAN_FILTER_MASK |
+	       ETH_VLAN_EXTEND_MASK;
 	i40e_vlan_offload_set(dev, mask);
 
-	/* Apply double-vlan setting, not implemented yet */
-
 	/* Apply pvid setting */
 	ret = i40e_vlan_pvid_set(dev, data->dev_conf.txmode.pvid,
 				data->dev_conf.txmode.hw_vlan_insert_pvid);
-- 
2.14.2

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

* [dpdk-stable] patch 'net/fm10k: fix logical port delete' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (25 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/i40e: fix VLAN offload setting' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/igb: fix Tx queue number assignment' " luca.boccassi
                   ` (33 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Xiao Wang; +Cc: Helin Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 1505dfbe443c33767ae08fc3eebb99be2772dea7 Mon Sep 17 00:00:00 2001
From: Xiao Wang <xiao.w.wang@intel.com>
Date: Fri, 8 Dec 2017 17:55:41 -0800
Subject: [PATCH] net/fm10k: fix logical port delete

[ upstream commit fc7943aa02f702c528d1a884c91c0939ea443bfb ]

When closing port, we need to send mailbox messages to switch manager
to reset multicast mode and delete logical port. In the latest IES_SDK,
e.g. v4.3.3, switch takes longer time to handle these mailbox messages.

So this patch adds longer delay to accommodate this change. Otherwise,
the mailbox will be closed before all the messages are handled, as a
result, the logical port remains in switch manager after port is closed.

Fixes: b961fe9344dd ("net/fm10k: fix MAC address removal from switch")

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
---
 drivers/net/fm10k/fm10k_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index d04efdc6e..0fac816f9 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -53,7 +53,7 @@
 /* Wait interval to get switch status */
 #define WAIT_SWITCH_MSG_US    100000
 /* A period of quiescence for switch */
-#define FM10K_SWITCH_QUIESCE_US 10000
+#define FM10K_SWITCH_QUIESCE_US 100000
 /* Number of chars per uint32 type */
 #define CHARS_PER_UINT32 (sizeof(uint32_t))
 #define BIT_MASK_PER_UINT32 ((1 << CHARS_PER_UINT32) - 1)
@@ -1239,7 +1239,7 @@ fm10k_dev_close(struct rte_eth_dev *dev)
 		MAX_LPORT_NUM, false);
 	fm10k_mbx_unlock(hw);
 
-	/* allow 10ms for device to quiesce */
+	/* allow 100ms for device to quiesce */
 	rte_delay_us(FM10K_SWITCH_QUIESCE_US);
 
 	/* Stop mailbox service first */
-- 
2.14.2

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

* [dpdk-stable] patch 'net/igb: fix Tx queue number assignment' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (26 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/fm10k: fix logical port delete' " luca.boccassi
@ 2018-01-26 13:12 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'vhost: fix dequeue zero copy with virtio1' " luca.boccassi
                   ` (32 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:12 UTC (permalink / raw)
  To: Yangchao Zhou; +Cc: Wei Dai, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 7ce337d40f25ed3528ae7ba9602e06d8001cf4cc Mon Sep 17 00:00:00 2001
From: Yangchao Zhou <zhouyates@gmail.com>
Date: Wed, 29 Nov 2017 10:50:12 +0800
Subject: [PATCH] net/igb: fix Tx queue number assignment

[ upstream commit e761a104d22947424c2541c6a255a39b3705326e ]

Internal variable containing the number of TX queues for a device,
was being incorrectly assigned the number of RX queues, instead of TX.

Fixes: 27b609cbd1c6 ("ethdev: move the multi-queue mode check to specific drivers")

Signed-off-by: Yangchao Zhou <zhouyates@gmail.com>
Acked-by: Wei Dai <wei.dai@intel.com>
---
 drivers/net/e1000/igb_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 407021dfe..5142d4fcc 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -1121,7 +1121,7 @@ igb_check_mq_mode(struct rte_eth_dev *dev)
 	enum rte_eth_rx_mq_mode rx_mq_mode = dev->data->dev_conf.rxmode.mq_mode;
 	enum rte_eth_tx_mq_mode tx_mq_mode = dev->data->dev_conf.txmode.mq_mode;
 	uint16_t nb_rx_q = dev->data->nb_rx_queues;
-	uint16_t nb_tx_q = dev->data->nb_rx_queues;
+	uint16_t nb_tx_q = dev->data->nb_tx_queues;
 
 	if ((rx_mq_mode & ETH_MQ_RX_DCB_FLAG) ||
 	    tx_mq_mode == ETH_MQ_TX_DCB ||
-- 
2.14.2

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

* [dpdk-stable] patch 'vhost: fix dequeue zero copy with virtio1' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (27 preceding siblings ...)
  2018-01-26 13:12 ` [dpdk-stable] patch 'net/igb: fix Tx queue number assignment' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/virtio: fix incorrect cast' " luca.boccassi
                   ` (31 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Junjie Chen; +Cc: Maxime Coquelin, Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From ce6f6e73502e0d3e0d303c992883151d61475bbe Mon Sep 17 00:00:00 2001
From: Junjie Chen <junjie.j.chen@intel.com>
Date: Wed, 13 Dec 2017 11:50:56 -0500
Subject: [PATCH] vhost: fix dequeue zero copy with virtio1

[ upstream commit 803aeecef123877764aac56270180e920aea8863 ]

This fix dequeue zero copy can not work with Qemu
version >= 2.7. Since from Qemu 2.7 virtio device
use virtio-1 protocol, the zero copy code path
forget to add offset to buffer address.

Fixes: b0a985d1f340 ("vhost: add dequeue zero copy")

Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
 lib/librte_vhost/virtio_net.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 0027f3933..83a0082e5 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -875,7 +875,8 @@ copy_desc_to_mbuf(struct virtio_net *dev, struct vring_desc *descs,
 					desc->addr + desc_offset, cpy_len)))) {
 			cur->data_len = cpy_len;
 			cur->data_off = 0;
-			cur->buf_addr = (void *)(uintptr_t)desc_addr;
+			cur->buf_addr = (void *)(uintptr_t)(desc_addr
+				+ desc_offset);
 			cur->buf_physaddr = hpa;
 
 			/*
-- 
2.14.2

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

* [dpdk-stable] patch 'net/virtio: fix incorrect cast' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (28 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'vhost: fix dequeue zero copy with virtio1' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/virtio: fix vector Rx flushing' " luca.boccassi
                   ` (30 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Didier Pallard; +Cc: Olivier Matz, Maxime Coquelin, Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 08991e032b922c2bdba5f48c45f37e8dc91684c1 Mon Sep 17 00:00:00 2001
From: Didier Pallard <didier.pallard@6wind.com>
Date: Thu, 14 Dec 2017 15:33:43 +0100
Subject: [PATCH] net/virtio: fix incorrect cast

[ upstream commit 43ec842ca45d1b090998aff20c64eb92cc8bdf0b ]

The rx_queues and tx_queues fields of the data structure points to a
struct virtnet_rx or virtnet_tx. Casting it to a virtqueue is an error.

It does not trigger any bug because pointer is not dereferenced inside
the function, but it can become a bug if this code is copy/pasted and
vq is dereferenced.

Fixes: 01ad44fd374f ("net/virtio: split Rx/Tx queue")

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
 drivers/net/virtio/virtio_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 8592485d7..3abaeabb2 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -847,7 +847,7 @@ static int virtio_dev_xstats_get_names(struct rte_eth_dev *dev,
 		/* Note: limit checked in rte_eth_xstats_names() */
 
 		for (i = 0; i < dev->data->nb_rx_queues; i++) {
-			struct virtqueue *rxvq = dev->data->rx_queues[i];
+			struct virtnet_rx *rxvq = dev->data->rx_queues[i];
 			if (rxvq == NULL)
 				continue;
 			for (t = 0; t < VIRTIO_NB_RXQ_XSTATS; t++) {
@@ -860,7 +860,7 @@ static int virtio_dev_xstats_get_names(struct rte_eth_dev *dev,
 		}
 
 		for (i = 0; i < dev->data->nb_tx_queues; i++) {
-			struct virtqueue *txvq = dev->data->tx_queues[i];
+			struct virtnet_tx *txvq = dev->data->tx_queues[i];
 			if (txvq == NULL)
 				continue;
 			for (t = 0; t < VIRTIO_NB_TXQ_XSTATS; t++) {
-- 
2.14.2

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

* [dpdk-stable] patch 'net/virtio: fix vector Rx flushing' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (29 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/virtio: fix incorrect cast' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'examples/vhost: fix sending ARP packet to self' " luca.boccassi
                   ` (29 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Antonio Fischetti, Maxime Coquelin, Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 1b41fae3d2d5af298627dda9d35c25656450c861 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Mon, 11 Dec 2017 13:13:29 +0800
Subject: [PATCH] net/virtio: fix vector Rx flushing

[ upstream commit bcf55c93026ff1db8ff2838766bbaaa38741579e ]

The vector Rx will be broken if backend has consumed all
the descs in the avail ring before the device is started.
Because in current implementation, vector Rx will return
immediately without refilling the avail ring if the used
ring is empty. So we have to refill the avail ring after
flushing the elements in the used ring for vector Rx.

Besides, vector Rx has a different ring layout assumption
and mbuf management. So we need to handle it differently.

Fixes: d8227497ec5c ("net/virtio: flush Rx queues on start")

Reported-by: Antonio Fischetti <antonio.fischetti@intel.com>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Antonio Fischetti <antonio.fischetti@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
 drivers/net/virtio/virtio_ethdev.c |  2 +-
 drivers/net/virtio/virtqueue.c     | 31 ++++++++++++++++++++++++-------
 drivers/net/virtio/virtqueue.h     |  2 +-
 3 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 3abaeabb2..4d6efd5ac 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1565,7 +1565,7 @@ virtio_dev_start(struct rte_eth_dev *dev)
 	for (i = 0; i < dev->data->nb_rx_queues; i++) {
 		rxvq = dev->data->rx_queues[i];
 		/* Flush the old packets */
-		virtqueue_flush(rxvq->vq);
+		virtqueue_rxvq_flush(rxvq->vq);
 		virtqueue_notify(rxvq->vq);
 	}
 
diff --git a/drivers/net/virtio/virtqueue.c b/drivers/net/virtio/virtqueue.c
index 4f8707ae3..0e24194a5 100644
--- a/drivers/net/virtio/virtqueue.c
+++ b/drivers/net/virtio/virtqueue.c
@@ -37,6 +37,7 @@
 #include "virtqueue.h"
 #include "virtio_logs.h"
 #include "virtio_pci.h"
+#include "virtio_rxtx_simple.h"
 
 void
 virtqueue_disable_intr(struct virtqueue *vq)
@@ -73,8 +74,10 @@ virtqueue_detatch_unused(struct virtqueue *vq)
 
 /* Flush the elements in the used ring. */
 void
-virtqueue_flush(struct virtqueue *vq)
+virtqueue_rxvq_flush(struct virtqueue *vq)
 {
+	struct virtnet_rx *rxq = &vq->rxq;
+	struct virtio_hw *hw = vq->hw;
 	struct vring_used_elem *uep;
 	struct vq_desc_extra *dxp;
 	uint16_t used_idx, desc_idx;
@@ -85,13 +88,27 @@ virtqueue_flush(struct virtqueue *vq)
 	for (i = 0; i < nb_used; i++) {
 		used_idx = vq->vq_used_cons_idx & (vq->vq_nentries - 1);
 		uep = &vq->vq_ring.used->ring[used_idx];
-		desc_idx = (uint16_t)uep->id;
-		dxp = &vq->vq_descx[desc_idx];
-		if (dxp->cookie != NULL) {
-			rte_pktmbuf_free(dxp->cookie);
-			dxp->cookie = NULL;
+		if (hw->use_simple_rxtx) {
+			desc_idx = used_idx;
+			rte_pktmbuf_free(vq->sw_ring[desc_idx]);
+			vq->vq_free_cnt++;
+		} else {
+			desc_idx = (uint16_t)uep->id;
+			dxp = &vq->vq_descx[desc_idx];
+			if (dxp->cookie != NULL) {
+				rte_pktmbuf_free(dxp->cookie);
+				dxp->cookie = NULL;
+			}
+			vq_ring_free_chain(vq, desc_idx);
 		}
 		vq->vq_used_cons_idx++;
-		vq_ring_free_chain(vq, desc_idx);
+	}
+
+	if (hw->use_simple_rxtx) {
+		while (vq->vq_free_cnt >= RTE_VIRTIO_VPMD_RX_REARM_THRESH) {
+			virtio_rxq_rearm_vec(rxq);
+			if (virtqueue_kick_prepare(vq))
+				virtqueue_notify(vq);
+		}
 	}
 }
diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
index ec967a5bd..421485473 100644
--- a/drivers/net/virtio/virtqueue.h
+++ b/drivers/net/virtio/virtqueue.h
@@ -291,7 +291,7 @@ void virtqueue_dump(struct virtqueue *vq);
 struct rte_mbuf *virtqueue_detatch_unused(struct virtqueue *vq);
 
 /* Flush the elements in the used ring. */
-void virtqueue_flush(struct virtqueue *vq);
+void virtqueue_rxvq_flush(struct virtqueue *vq);
 
 static inline int
 virtqueue_full(const struct virtqueue *vq)
-- 
2.14.2

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

* [dpdk-stable] patch 'examples/vhost: fix sending ARP packet to self' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (30 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/virtio: fix vector Rx flushing' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/ixgbe: fix the failure of number of Tx queue check' " luca.boccassi
                   ` (28 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Junjie Chen; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 5cfb193e7072b9779be550bf35d0c56ea67f4006 Mon Sep 17 00:00:00 2001
From: Junjie Chen <junjie.j.chen@intel.com>
Date: Fri, 29 Dec 2017 09:33:19 -0500
Subject: [PATCH] examples/vhost: fix sending ARP packet to self

[ upstream commit a3fdb53270d4359fc8fe1d1faedd737024d10548 ]

ARP packets are not dropped when dest vdev is itself, which breaks
RX ring inconspicuously.

Fixes: 9c5ef51207c6 ("examples/vhost: handle broadcast packet")

Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
 examples/vhost/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 1e9059b43..86f806523 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -954,7 +954,8 @@ virtio_tx_route(struct vhost_dev *vdev, struct rte_mbuf *m, uint16_t vlan_tag)
 		struct vhost_dev *vdev2;
 
 		TAILQ_FOREACH(vdev2, &vhost_dev_list, global_vdev_entry) {
-			virtio_xmit(vdev2, vdev, m);
+			if (vdev2 != vdev)
+				virtio_xmit(vdev2, vdev, m);
 		}
 		goto queue2nic;
 	}
-- 
2.14.2

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

* [dpdk-stable] patch 'net/ixgbe: fix the failure of number of Tx queue check' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (31 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'examples/vhost: fix sending ARP packet to self' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e/base: fix NVM lock' " luca.boccassi
                   ` (27 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Yanglong Wu; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 584d60f2e1a52aaec261dfab21142432b30acbdf Mon Sep 17 00:00:00 2001
From: Yanglong Wu <yanglong.wu@intel.com>
Date: Wed, 10 Jan 2018 09:51:36 +0800
Subject: [PATCH] net/ixgbe: fix the failure of number of Tx queue check

[ upstream commit 12da1deb89806c0a0d974948d11712e4f06c6b93 ]

Tx_q check fails when the SRIOV is active and tx_q > rx_q. It has
to use the maximum HW queue number for calculation, to get the
right number of queue can be used.

Fixes: 27b609cbd1c6 ("ethdev: move the multi-queue mode check to specific drivers")

Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 73996bbec..9be3f3cd0 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -93,6 +93,9 @@
 /* Timer value included in XOFF frames. */
 #define IXGBE_FC_PAUSE 0x680
 
+/*Default value of Max Rx Queue*/
+#define IXGBE_MAX_RX_QUEUE_NUM 128
+
 #define IXGBE_LINK_DOWN_CHECK_TIMEOUT 4000 /* ms */
 #define IXGBE_LINK_UP_CHECK_TIMEOUT   1000 /* ms */
 #define IXGBE_VMDQ_NUM_UC_MAC         4096 /* Maximum nb. of UC MAC addr. */
@@ -1959,9 +1962,10 @@ ixgbe_check_vf_rss_rxq_num(struct rte_eth_dev *dev, uint16_t nb_rx_q)
 		return -EINVAL;
 	}
 
-	RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool = nb_rx_q;
-	RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx = dev->pci_dev->max_vfs * nb_rx_q;
-
+	RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool =
+		IXGBE_MAX_RX_QUEUE_NUM / RTE_ETH_DEV_SRIOV(dev).active;
+	RTE_ETH_DEV_SRIOV(dev).def_pool_q_idx =
+		dev->pci_dev->max_vfs * RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool;
 	return 0;
 }
 
-- 
2.14.2

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

* [dpdk-stable] patch 'net/i40e/base: fix NVM lock' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (32 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/ixgbe: fix the failure of number of Tx queue check' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e/base: fix link LED blink' " luca.boccassi
                   ` (26 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 4617d3b2e596c63c3636a70b55b0e9897b52025d Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 9 Jan 2018 15:30:09 -0500
Subject: [PATCH] net/i40e/base: fix NVM lock

[ upstream commit 4b3b515901b927985e04d4d96a2a804f18e04a16 ]

NVM lock is only required at below situation:
1. its X722 device or
2. API version >= 1.5
or may have issue at firmware downgrade.

Fixes: c5846a125b26 ("net/i40e/base: fix NVM access interfering")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/base/i40e_adminq.c | 6 ++++++
 drivers/net/i40e/base/i40e_common.c | 3 ++-
 drivers/net/i40e/base/i40e_nvm.c    | 3 ++-
 drivers/net/i40e/base/i40e_type.h   | 1 +
 4 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
index 0d3a83fa4..15cbd8955 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -682,6 +682,12 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)
 			   &oem_lo);
 	hw->nvm.oem_ver = ((u32)oem_hi << 16) | oem_lo;
 
+	/* Newer versions of firmware require lock when reading the NVM */
+	if ((hw->aq.api_maj_ver > 1) ||
+	    ((hw->aq.api_maj_ver == 1) &&
+	     (hw->aq.api_min_ver >= 5)))
+		hw->flags |= I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK;
+
 	if (hw->aq.api_maj_ver > I40E_FW_API_VERSION_MAJOR) {
 		ret_code = I40E_ERR_FIRMWARE_API_VERSION;
 		goto init_adminq_free_arq;
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 9a6b3ed61..76f262116 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1046,7 +1046,8 @@ enum i40e_status_code i40e_init_shared_code(struct i40e_hw *hw)
 
 #ifdef X722_SUPPORT
 	if (hw->mac.type == I40E_MAC_X722)
-		hw->flags |= I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE;
+		hw->flags |= I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE |
+			     I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK;
 
 #endif
 	status = i40e_init_nvm(hw);
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 4fa1220b2..4976b1ffc 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -221,7 +221,8 @@ enum i40e_status_code i40e_read_nvm_word(struct i40e_hw *hw, u16 offset,
 
 #ifdef X722_SUPPORT
 	if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) {
-		ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
+		if (hw->flags & I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK)
+			ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
 		if (!ret_code) {
 			ret_code = i40e_read_nvm_word_aq(hw, offset, data);
 			i40e_release_nvm(hw);
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index b5f72c32d..d514abe34 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -685,6 +685,7 @@ struct i40e_hw {
 
 #endif
 #define I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE BIT_ULL(0)
+#define I40E_HW_FLAG_NVM_READ_REQUIRES_LOCK BIT_ULL(3)
 	u64 flags;
 
 	/* debug mask */
-- 
2.14.2

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

* [dpdk-stable] patch 'net/i40e/base: fix link LED blink' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (33 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e/base: fix NVM lock' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e/base: fix compile issue for GCC 6.3' " luca.boccassi
                   ` (25 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 6591eda92ca37722b265e31178dafad3073fb21e Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 9 Jan 2018 15:30:13 -0500
Subject: [PATCH] net/i40e/base: fix link LED blink

[ upstream commit e35eed328516f90c51bd41b9ac6623a3e5951549 ]

This fix solves an issue occurring while calling i40e_led_set function
from the driver with "blink" parameter set as TRUE. This call resulted
in Activity LED blinking instead of Link LED, which may lead to errors
in physically identyfying the port, since Activity LED may be blinking
for different reasons aswell.

Fixes: 51b27bc5d898 ("i40e/base: update LED blinking")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 76f262116..de60e2a12 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1579,6 +1579,7 @@ u32 i40e_led_get(struct i40e_hw *hw)
 		case I40E_COMBINED_ACTIVITY:
 		case I40E_FILTER_ACTIVITY:
 		case I40E_MAC_ACTIVITY:
+		case I40E_LINK_ACTIVITY:
 			continue;
 		default:
 			break;
@@ -1627,6 +1628,7 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)
 		case I40E_COMBINED_ACTIVITY:
 		case I40E_FILTER_ACTIVITY:
 		case I40E_MAC_ACTIVITY:
+		case I40E_LINK_ACTIVITY:
 			continue;
 		default:
 			break;
@@ -1637,9 +1639,6 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)
 		gpio_val |= ((mode << I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT) &
 			     I40E_GLGEN_GPIO_CTL_LED_MODE_MASK);
 
-		if (mode == I40E_LINK_ACTIVITY)
-			blink = false;
-
 		if (blink)
 			gpio_val |= BIT(I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT);
 		else
-- 
2.14.2

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

* [dpdk-stable] patch 'net/i40e/base: fix compile issue for GCC 6.3' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (34 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e/base: fix link LED blink' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/ixgbe/base: add media type of fixed fiber' " luca.boccassi
                   ` (24 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 10387dda97788be517bc30f1accf33642cb6b948 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 9 Jan 2018 15:30:18 -0500
Subject: [PATCH] net/i40e/base: fix compile issue for GCC 6.3

[ upstream commit bc29754abacd0b2f61195736374d275552d3a518 ]

When using GCC 6.3.0 and EXTRA_CFLAGS=-Og, the compiler is not smart
enough to see that when you have an integrated VF that just one of the
if statemets has to be true so that ntu is always set. Fix the way that
the code is for integrated VFs so that the compiler won't complain.

Fixes: 9783eb15eb98 ("i40e/base: wrap the register definitions for PF and VF")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/base/i40e_adminq.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
index 15cbd8955..e231582c5 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -1057,22 +1057,19 @@ enum i40e_status_code i40e_clean_arq_element(struct i40e_hw *hw,
 	}
 
 	/* set next_to_use to head */
-#ifdef PF_DRIVER
 #ifdef INTEGRATED_VF
 	if (!i40e_is_vf(hw))
-		ntu = (rd32(hw, hw->aq.arq.head) & I40E_PF_ARQH_ARQH_MASK);
+		ntu = rd32(hw, hw->aq.arq.head) & I40E_PF_ARQH_ARQH_MASK;
+	else
+		ntu = rd32(hw, hw->aq.arq.head) & I40E_VF_ARQH1_ARQH_MASK;
 #else
-	ntu = (rd32(hw, hw->aq.arq.head) & I40E_PF_ARQH_ARQH_MASK);
-#endif /* INTEGRATED_VF */
+#ifdef PF_DRIVER
+	ntu = rd32(hw, hw->aq.arq.head) & I40E_PF_ARQH_ARQH_MASK;
 #endif /* PF_DRIVER */
 #ifdef VF_DRIVER
-#ifdef INTEGRATED_VF
-	if (i40e_is_vf(hw))
-		ntu = (rd32(hw, hw->aq.arq.head) & I40E_VF_ARQH1_ARQH_MASK);
-#else
-	ntu = (rd32(hw, hw->aq.arq.head) & I40E_VF_ARQH1_ARQH_MASK);
-#endif /* INTEGRATED_VF */
+	ntu = rd32(hw, hw->aq.arq.head) & I40E_VF_ARQH1_ARQH_MASK;
 #endif /* VF_DRIVER */
+#endif /* INTEGRATED_VF */
 	if (ntu == ntc) {
 		/* nothing to do - shouldn't need to update ring's values */
 		ret_code = I40E_ERR_ADMIN_QUEUE_NO_WORK;
-- 
2.14.2

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

* [dpdk-stable] patch 'net/ixgbe/base: add media type of fixed fiber' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (35 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e/base: fix compile issue for GCC 6.3' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e: fix VSI MAC filter on primary address change' " luca.boccassi
                   ` (23 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Qiming Yang; +Cc: Wenzhuo Lu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From b9c268bda7a3f05e68656610c46d35f515933cf0 Mon Sep 17 00:00:00 2001
From: Qiming Yang <qiming.yang@intel.com>
Date: Thu, 11 Jan 2018 00:04:38 +0800
Subject: [PATCH] net/ixgbe/base: add media type of fixed fiber

[ upstream commit 34265096e0263b82bcb72e9f678c4567ee963b32 ]

This patch adds new media type support of fixed fiber.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_82599.c  |  7 +++++++
 drivers/net/ixgbe/base/ixgbe_api.c    |  2 ++
 drivers/net/ixgbe/base/ixgbe_common.c |  6 ++++++
 drivers/net/ixgbe/base/ixgbe_mbx.c    | 22 ----------------------
 drivers/net/ixgbe/base/ixgbe_type.h   |  4 +++-
 5 files changed, 18 insertions(+), 23 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_82599.c b/drivers/net/ixgbe/base/ixgbe_82599.c
index 832242ee9..9543fe1bc 100644
--- a/drivers/net/ixgbe/base/ixgbe_82599.c
+++ b/drivers/net/ixgbe/base/ixgbe_82599.c
@@ -87,6 +87,9 @@ void ixgbe_init_mac_link_ops_82599(struct ixgbe_hw *hw)
 		mac->ops.setup_mac_link = ixgbe_setup_mac_link_82599;
 		mac->ops.set_rate_select_speed =
 					       ixgbe_set_hard_rate_select_speed;
+		if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber_fixed)
+			mac->ops.set_rate_select_speed =
+					       ixgbe_set_soft_rate_select_speed;
 	} else {
 		if ((ixgbe_get_media_type(hw) == ixgbe_media_type_backplane) &&
 		     (hw->phy.smart_speed == ixgbe_smart_speed_auto ||
@@ -564,6 +567,10 @@ enum ixgbe_media_type ixgbe_get_media_type_82599(struct ixgbe_hw *hw)
 	case IXGBE_DEV_ID_82599_QSFP_SF_QP:
 		media_type = ixgbe_media_type_fiber_qsfp;
 		break;
+	case IXGBE_DEV_ID_82599_BYPASS:
+		media_type = ixgbe_media_type_fiber_fixed;
+		hw->phy.multispeed_fiber = true;
+		break;
 	default:
 		media_type = ixgbe_media_type_unknown;
 		break;
diff --git a/drivers/net/ixgbe/base/ixgbe_api.c b/drivers/net/ixgbe/base/ixgbe_api.c
index 094ee5263..368bf7d51 100644
--- a/drivers/net/ixgbe/base/ixgbe_api.c
+++ b/drivers/net/ixgbe/base/ixgbe_api.c
@@ -178,6 +178,7 @@ s32 ixgbe_set_mac_type(struct ixgbe_hw *hw)
 	case IXGBE_DEV_ID_82599EN_SFP:
 	case IXGBE_DEV_ID_82599_CX4:
 	case IXGBE_DEV_ID_82599_LS:
+	case IXGBE_DEV_ID_82599_BYPASS:
 	case IXGBE_DEV_ID_82599_T3_LOM:
 		hw->mac.type = ixgbe_mac_82599EB;
 		break;
@@ -192,6 +193,7 @@ s32 ixgbe_set_mac_type(struct ixgbe_hw *hw)
 		break;
 	case IXGBE_DEV_ID_X540T:
 	case IXGBE_DEV_ID_X540T1:
+	case IXGBE_DEV_ID_X540_BYPASS:
 		hw->mac.type = ixgbe_mac_X540;
 		hw->mvals = ixgbe_mvals_X540;
 		break;
diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c
index f85668e7c..e54fd306a 100644
--- a/drivers/net/ixgbe/base/ixgbe_common.c
+++ b/drivers/net/ixgbe/base/ixgbe_common.c
@@ -166,6 +166,7 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)
 	DEBUGFUNC("ixgbe_device_supports_autoneg_fc");
 
 	switch (hw->phy.media_type) {
+	case ixgbe_media_type_fiber_fixed:
 	case ixgbe_media_type_fiber_qsfp:
 	case ixgbe_media_type_fiber:
 		/* flow control autoneg black list */
@@ -196,6 +197,7 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)
 		case IXGBE_DEV_ID_82599_T3_LOM:
 		case IXGBE_DEV_ID_X540T:
 		case IXGBE_DEV_ID_X540T1:
+		case IXGBE_DEV_ID_X540_BYPASS:
 		case IXGBE_DEV_ID_X550T:
 		case IXGBE_DEV_ID_X550T1:
 		case IXGBE_DEV_ID_X550EM_X_10G_T:
@@ -261,6 +263,7 @@ s32 ixgbe_setup_fc_generic(struct ixgbe_hw *hw)
 			goto out;
 
 		/* only backplane uses autoc so fall though */
+	case ixgbe_media_type_fiber_fixed:
 	case ixgbe_media_type_fiber_qsfp:
 	case ixgbe_media_type_fiber:
 		reg = IXGBE_READ_REG(hw, IXGBE_PCS1GANA);
@@ -3068,6 +3071,7 @@ void ixgbe_fc_autoneg(struct ixgbe_hw *hw)
 
 	switch (hw->phy.media_type) {
 	/* Autoneg flow control on fiber adapters */
+	case ixgbe_media_type_fiber_fixed:
 	case ixgbe_media_type_fiber_qsfp:
 	case ixgbe_media_type_fiber:
 		if (speed == IXGBE_LINK_SPEED_1GB_FULL)
@@ -5065,6 +5069,7 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
 
 		/* Set the module link speed */
 		switch (hw->phy.media_type) {
+		case ixgbe_media_type_fiber_fixed:
 		case ixgbe_media_type_fiber:
 			ixgbe_set_rate_select_speed(hw,
 						    IXGBE_LINK_SPEED_10GB_FULL);
@@ -5115,6 +5120,7 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
 
 		/* Set the module link speed */
 		switch (hw->phy.media_type) {
+		case ixgbe_media_type_fiber_fixed:
 		case ixgbe_media_type_fiber:
 			ixgbe_set_rate_select_speed(hw,
 						    IXGBE_LINK_SPEED_1GB_FULL);
diff --git a/drivers/net/ixgbe/base/ixgbe_mbx.c b/drivers/net/ixgbe/base/ixgbe_mbx.c
index 042e5cc13..2785bbad9 100644
--- a/drivers/net/ixgbe/base/ixgbe_mbx.c
+++ b/drivers/net/ixgbe/base/ixgbe_mbx.c
@@ -444,17 +444,6 @@ STATIC s32 ixgbe_write_mbx_vf(struct ixgbe_hw *hw, u32 *msg, u16 size,
 	for (i = 0; i < size; i++)
 		IXGBE_WRITE_REG_ARRAY(hw, IXGBE_VFMBMEM, i, msg[i]);
 
-	/*
-	 * Complete the remaining mailbox data registers with zero to reset
-	 * the data sent in a previous exchange (in either side) with the PF,
-	 * including exchanges performed by another Guest OS to which that VF
-	 * was previously assigned.
-	 */
-	while (i < hw->mbx.size) {
-		IXGBE_WRITE_REG_ARRAY(hw, IXGBE_VFMBMEM, i, 0);
-		i++;
-	}
-
 	/* update stats */
 	hw->mbx.stats.msgs_tx++;
 
@@ -693,17 +682,6 @@ STATIC s32 ixgbe_write_mbx_pf(struct ixgbe_hw *hw, u32 *msg, u16 size,
 	for (i = 0; i < size; i++)
 		IXGBE_WRITE_REG_ARRAY(hw, IXGBE_PFMBMEM(vf_number), i, msg[i]);
 
-	/*
-	 * Complete the remaining mailbox data registers with zero to reset
-	 * the data sent in a previous exchange (in either side) with the VF,
-	 * including exchanges performed by another Guest OS to which that VF
-	 * was previously assigned.
-	 */
-	while (i < hw->mbx.size) {
-		IXGBE_WRITE_REG_ARRAY(hw, IXGBE_PFMBMEM(vf_number), i, 0);
-		i++;
-	}
-
 	/* Interrupt VF to tell it a message has been sent and release buffer*/
 	IXGBE_WRITE_REG(hw, IXGBE_PFMAILBOX(vf_number), IXGBE_PFMAILBOX_STS);
 
diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h
index 4982e035a..b12573c35 100644
--- a/drivers/net/ixgbe/base/ixgbe_type.h
+++ b/drivers/net/ixgbe/base/ixgbe_type.h
@@ -123,9 +123,11 @@ POSSIBILITY OF SUCH DAMAGE.
 #define IXGBE_DEV_ID_82599_VF			0x10ED
 #define IXGBE_DEV_ID_82599_VF_HV		0x152E
 #define IXGBE_DEV_ID_82599_LS			0x154F
+#define IXGBE_DEV_ID_82599_BYPASS		0x155D
 #define IXGBE_DEV_ID_X540T			0x1528
 #define IXGBE_DEV_ID_X540_VF			0x1515
 #define IXGBE_DEV_ID_X540_VF_HV			0x1530
+#define IXGBE_DEV_ID_X540_BYPASS		0x155C
 #define IXGBE_DEV_ID_X540T1			0x1560
 #define IXGBE_DEV_ID_X550T			0x1563
 #define IXGBE_DEV_ID_X550T1			0x15D1
@@ -270,7 +272,6 @@ POSSIBILITY OF SUCH DAMAGE.
 #define IXGBE_I2C_BB_EN_X550		0x00000100
 #define IXGBE_I2C_BB_EN_X550EM_x	IXGBE_I2C_BB_EN_X550
 #define IXGBE_I2C_BB_EN_X550EM_a	IXGBE_I2C_BB_EN_X550
-
 #define IXGBE_I2C_BB_EN_BY_MAC(_hw)	IXGBE_BY_MAC((_hw), I2C_BB_EN)
 
 #define IXGBE_I2C_CLK_OE_N_EN		0
@@ -3626,6 +3627,7 @@ enum ixgbe_sfp_type {
 enum ixgbe_media_type {
 	ixgbe_media_type_unknown = 0,
 	ixgbe_media_type_fiber,
+	ixgbe_media_type_fiber_fixed,
 	ixgbe_media_type_fiber_qsfp,
 	ixgbe_media_type_fiber_lco,
 	ixgbe_media_type_copper,
-- 
2.14.2

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

* [dpdk-stable] patch 'net/i40e: fix VSI MAC filter on primary address change' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (36 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/ixgbe/base: add media type of fixed fiber' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/bnxt: parse checksum offload flags' " luca.boccassi
                   ` (22 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Laurent Hardy, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 3063263faae6f63a7c086911b32bdfa431bce6c2 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Wed, 3 Jan 2018 15:29:23 +0100
Subject: [PATCH] net/i40e: fix VSI MAC filter on primary address change

[ upstream commit 047779508874994fbd905dcc2eeacf78b815e4f4 ]

When primary address mac is changed, the mac filters were not updated in
the VSI with the new mac addr and incoming packets with this destination
address are dropped by the hardware filters.

This patch removes the VSI mac filter for the previous mac address and
adds a new one for new mac address.

Fixes: e18e01e92c29 ("i40e: support default MAC address setting")

Signed-off-by: Laurent Hardy <laurent.hardy@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 69a0a21c0..eed74b147 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -9833,12 +9833,41 @@ static void i40e_set_default_mac_addr(struct rte_eth_dev *dev,
 				      struct ether_addr *mac_addr)
 {
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
+	struct i40e_vsi *vsi = pf->main_vsi;
+	struct i40e_mac_filter_info mac_filter;
+	struct i40e_mac_filter *f;
+	int ret;
 
 	if (!is_valid_assigned_ether_addr(mac_addr)) {
 		PMD_DRV_LOG(ERR, "Tried to set invalid MAC address.");
 		return;
 	}
 
+	TAILQ_FOREACH(f, &vsi->mac_list, next) {
+		if (is_same_ether_addr(&pf->dev_addr, &f->mac_info.mac_addr))
+			break;
+	}
+
+	if (f == NULL) {
+		PMD_DRV_LOG(ERR, "Failed to find filter for default mac");
+		return;
+	}
+
+	mac_filter = f->mac_info;
+	ret = i40e_vsi_delete_mac(vsi, &mac_filter.mac_addr);
+	if (ret != I40E_SUCCESS) {
+		PMD_DRV_LOG(ERR, "Failed to delete mac filter");
+		return;
+	}
+	memcpy(&mac_filter.mac_addr, mac_addr, ETH_ADDR_LEN);
+	ret = i40e_vsi_add_mac(vsi, &mac_filter);
+	if (ret != I40E_SUCCESS) {
+		PMD_DRV_LOG(ERR, "Failed to add mac filter");
+		return;
+	}
+	memcpy(&pf->dev_addr, mac_addr, ETH_ADDR_LEN);
+
 	/* Flags: 0x3 updates port address */
 	i40e_aq_mac_address_write(hw, 0x3, mac_addr->addr_bytes, NULL);
 }
-- 
2.14.2

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

* [dpdk-stable] patch 'net/bnxt: parse checksum offload flags' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (37 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e: fix VSI MAC filter on primary address change' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/bonding: fix setting slave MAC addresses' " luca.boccassi
                   ` (21 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From ac83078c222c7f895e8d6c560243b851f3a62e5e Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Mon, 8 Jan 2018 12:24:27 -0800
Subject: [PATCH] net/bnxt: parse checksum offload flags

[ upstream commit 294ca8e3ad847990eb099417f398a880f4224ccf ]

Parse the Tx checksum offload flags and set the proper bits
in the Tx descriptor.

Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_txr.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index c2f9ae78c..4518538f7 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -216,23 +216,28 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
 					tx_pkt->l4_len;
 			txbd1->mss = tx_pkt->tso_segsz;
 
-		} else if (tx_pkt->ol_flags & PKT_TX_OIP_IIP_TCP_UDP_CKSUM) {
+		} else if ((tx_pkt->ol_flags & PKT_TX_OIP_IIP_TCP_UDP_CKSUM) ==
+			   PKT_TX_OIP_IIP_TCP_UDP_CKSUM) {
 			/* Outer IP, Inner IP, Inner TCP/UDP CSO */
 			txbd1->lflags |= TX_BD_FLG_TIP_IP_TCP_UDP_CHKSUM;
 			txbd1->mss = 0;
-		} else if (tx_pkt->ol_flags & PKT_TX_IIP_TCP_UDP_CKSUM) {
+		} else if ((tx_pkt->ol_flags & PKT_TX_IIP_TCP_UDP_CKSUM) ==
+			   PKT_TX_IIP_TCP_UDP_CKSUM) {
 			/* (Inner) IP, (Inner) TCP/UDP CSO */
 			txbd1->lflags |= TX_BD_FLG_IP_TCP_UDP_CHKSUM;
 			txbd1->mss = 0;
-		} else if (tx_pkt->ol_flags & PKT_TX_OIP_TCP_UDP_CKSUM) {
+		} else if ((tx_pkt->ol_flags & PKT_TX_OIP_TCP_UDP_CKSUM) ==
+			   PKT_TX_OIP_TCP_UDP_CKSUM) {
 			/* Outer IP, (Inner) TCP/UDP CSO */
 			txbd1->lflags |= TX_BD_FLG_TIP_TCP_UDP_CHKSUM;
 			txbd1->mss = 0;
-		} else if (tx_pkt->ol_flags & PKT_TX_OIP_IIP_CKSUM) {
+		} else if ((tx_pkt->ol_flags & PKT_TX_OIP_IIP_CKSUM) ==
+			   PKT_TX_OIP_IIP_CKSUM) {
 			/* Outer IP, Inner IP CSO */
 			txbd1->lflags |= TX_BD_FLG_TIP_IP_CHKSUM;
 			txbd1->mss = 0;
-		} else if (tx_pkt->ol_flags & PKT_TX_TCP_UDP_CKSUM) {
+		} else if ((tx_pkt->ol_flags & PKT_TX_TCP_UDP_CKSUM) ==
+			   PKT_TX_TCP_UDP_CKSUM) {
 			/* TCP/UDP CSO */
 			txbd1->lflags |= TX_BD_LONG_LFLAGS_TCP_UDP_CHKSUM;
 			txbd1->mss = 0;
-- 
2.14.2

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

* [dpdk-stable] patch 'net/bonding: fix setting slave MAC addresses' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (38 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/bnxt: parse checksum offload flags' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'ethdev: fix link autonegotiation value' " luca.boccassi
                   ` (20 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Chas Williams; +Cc: Declan Doherty, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 5b05cafd4878e62108978d1dbc46c9d6426d124e Mon Sep 17 00:00:00 2001
From: Chas Williams <chas3@att.com>
Date: Wed, 27 Dec 2017 21:12:31 -0500
Subject: [PATCH] net/bonding: fix setting slave MAC addresses

[ upstream commit aa7791ba8de07c9e67ac4a42c7322409886cf6e5 ]

Use rte_eth_dev_default_mac_addr_set() to change a slave MAC address.
mac_address_set() only updates the software copy and does nothing to
update the hardware.

Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
 drivers/net/bonding/rte_eth_bond_api.c |  2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c | 10 ++++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index 2a3893a15..29e2de5fd 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -565,7 +565,7 @@ __eth_bond_slave_remove_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id)
 			&rte_eth_devices[bonded_port_id].data->port_id);
 
 	/* Restore original MAC address of slave device */
-	mac_address_set(&rte_eth_devices[slave_port_id],
+	rte_eth_dev_default_mac_addr_set(slave_port_id,
 			&(internals->slaves[slave_idx].persisted_mac_addr));
 
 	slave_eth_dev = &rte_eth_devices[slave_port_id];
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 7811a5ac7..c1ec3aa43 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1217,7 +1217,8 @@ mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev)
 	case BONDING_MODE_BALANCE:
 	case BONDING_MODE_BROADCAST:
 		for (i = 0; i < internals->slave_count; i++) {
-			if (mac_address_set(&rte_eth_devices[internals->slaves[i].port_id],
+			if (rte_eth_dev_default_mac_addr_set(
+					internals->slaves[i].port_id,
 					bonded_eth_dev->data->mac_addrs)) {
 				RTE_BOND_LOG(ERR, "Failed to update port Id %d MAC address",
 						internals->slaves[i].port_id);
@@ -1235,15 +1236,16 @@ mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev)
 		for (i = 0; i < internals->slave_count; i++) {
 			if (internals->slaves[i].port_id ==
 					internals->current_primary_port) {
-				if (mac_address_set(&rte_eth_devices[internals->primary_port],
+				if (rte_eth_dev_default_mac_addr_set(
+						internals->primary_port,
 						bonded_eth_dev->data->mac_addrs)) {
 					RTE_BOND_LOG(ERR, "Failed to update port Id %d MAC address",
 							internals->current_primary_port);
 					return -1;
 				}
 			} else {
-				if (mac_address_set(
-						&rte_eth_devices[internals->slaves[i].port_id],
+				if (rte_eth_dev_default_mac_addr_set(
+						internals->slaves[i].port_id,
 						&internals->slaves[i].persisted_mac_addr)) {
 					RTE_BOND_LOG(ERR, "Failed to update port Id %d MAC address",
 							internals->slaves[i].port_id);
-- 
2.14.2

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

* [dpdk-stable] patch 'ethdev: fix link autonegotiation value' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (39 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/bonding: fix setting slave MAC addresses' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/pcap: fix the NUMA id display in logs' " luca.boccassi
                   ` (19 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Andrew Rybchenko, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 7fe52d974323471d59286591cdb35f5d0755dff3 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Fri, 5 Jan 2018 18:38:55 +0100
Subject: [PATCH] ethdev: fix link autonegotiation value

[ upstream commit 1e3a958f40b305d66e8d067121a30efbd2753f2a ]

There are 3 kind of link data in ethdev:
	- capabilities (rte_eth_dev_info)
	- configuration (rte_eth_conf)
	- status (rte_eth_link)

A bit-field is used for capabilities (rte_eth_dev_info.speed_capa) and
configuration (rte_eth_conf.link_speeds).
Bits are defined in ETH_LINK_SPEED_*.

Some numerical (ETH_SPEED_NUM_*) and boolean (ETH_LINK_*) values
are used for the link status (rte_eth_link.*).

There was a mistake in the comment of rte_eth_link.link_autoneg,
suggesting ETH_LINK_SPEED_[AUTONEG/FIXED] which are 0/1,
instead of ETH_LINK_[AUTONEG/FIXED] which are 1/0.

The drivers are fixed to use ETH_LINK_[AUTONEG/FIXED].

Fixes: 82113036e4e5 ("ethdev: redesign link speed config")

Suggested-by: Andrew Rybchenko <arybchenko@solarflare.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/af_packet/rte_eth_af_packet.c |  2 +-
 drivers/net/e1000/em_ethdev.c             |  2 +-
 drivers/net/e1000/igb_ethdev.c            |  2 +-
 drivers/net/null/rte_eth_null.c           |  2 +-
 drivers/net/pcap/rte_eth_pcap.c           |  2 +-
 drivers/net/ring/rte_eth_ring.c           |  2 +-
 drivers/net/szedata2/rte_eth_szedata2.c   |  2 +-
 drivers/net/thunderx/nicvf_ethdev.c       |  2 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.c      |  2 +-
 lib/librte_ether/rte_ethdev.h             | 14 +++++++-------
 10 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 45c6519fb..6d73f1279 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -121,7 +121,7 @@ static struct rte_eth_link pmd_link = {
 	.link_speed = ETH_SPEED_NUM_10G,
 	.link_duplex = ETH_LINK_FULL_DUPLEX,
 	.link_status = ETH_LINK_DOWN,
-	.link_autoneg = ETH_LINK_SPEED_AUTONEG
+	.link_autoneg = ETH_LINK_AUTONEG
 };
 
 static uint16_t
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index aee3d340d..58495a507 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -1145,7 +1145,7 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 		link.link_speed = 0;
 		link.link_duplex = ETH_LINK_HALF_DUPLEX;
 		link.link_status = ETH_LINK_DOWN;
-		link.link_autoneg = ETH_LINK_SPEED_FIXED;
+		link.link_autoneg = ETH_LINK_FIXED;
 	}
 	rte_em_dev_atomic_write_link_status(dev, &link);
 
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 5142d4fcc..b9b794388 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -2226,7 +2226,7 @@ eth_igb_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 		link.link_speed = 0;
 		link.link_duplex = ETH_LINK_HALF_DUPLEX;
 		link.link_status = ETH_LINK_DOWN;
-		link.link_autoneg = ETH_LINK_SPEED_FIXED;
+		link.link_autoneg = ETH_LINK_FIXED;
 	}
 	rte_igb_dev_atomic_write_link_status(dev, &link);
 
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 836d982ac..9704895f7 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -93,7 +93,7 @@ static struct rte_eth_link pmd_link = {
 	.link_speed = ETH_SPEED_NUM_10G,
 	.link_duplex = ETH_LINK_FULL_DUPLEX,
 	.link_status = ETH_LINK_DOWN,
-	.link_autoneg = ETH_LINK_SPEED_AUTONEG,
+	.link_autoneg = ETH_LINK_AUTONEG,
 };
 
 static uint16_t
diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index f6b3c10c0..69dc21674 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -124,7 +124,7 @@ static struct rte_eth_link pmd_link = {
 		.link_speed = ETH_SPEED_NUM_10G,
 		.link_duplex = ETH_LINK_FULL_DUPLEX,
 		.link_status = ETH_LINK_DOWN,
-		.link_autoneg = ETH_LINK_SPEED_FIXED,
+		.link_autoneg = ETH_LINK_AUTONEG,
 };
 
 static int
diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index c1767c489..729d38c51 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -80,7 +80,7 @@ static struct rte_eth_link pmd_link = {
 		.link_speed = ETH_SPEED_NUM_10G,
 		.link_duplex = ETH_LINK_FULL_DUPLEX,
 		.link_status = ETH_LINK_DOWN,
-		.link_autoneg = ETH_LINK_SPEED_AUTONEG
+		.link_autoneg = ETH_LINK_AUTONEG
 };
 
 static uint16_t
diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c
index 0ae7385f4..9cf408ed2 100644
--- a/drivers/net/szedata2/rte_eth_szedata2.c
+++ b/drivers/net/szedata2/rte_eth_szedata2.c
@@ -1169,7 +1169,7 @@ eth_link_update(struct rte_eth_dev *dev,
 	link.link_status = (cgmii_ibuf_is_enabled(ibuf) &&
 			cgmii_ibuf_is_link_up(ibuf)) ? ETH_LINK_UP : ETH_LINK_DOWN;
 
-	link.link_autoneg = ETH_LINK_SPEED_FIXED;
+	link.link_autoneg = ETH_LINK_FIXED;
 
 	rte_atomic64_cmpset((uint64_t *)dev_link, *(uint64_t *)dev_link,
 			*(uint64_t *)link_ptr);
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index 2da5af04f..d229bdff3 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -98,7 +98,7 @@ nicvf_set_eth_link_status(struct nicvf *nic, struct rte_eth_link *link)
 	else if (nic->duplex == NICVF_FULL_DUPLEX)
 		link->link_duplex = ETH_LINK_FULL_DUPLEX;
 	link->link_speed = nic->speed;
-	link->link_autoneg = ETH_LINK_SPEED_AUTONEG;
+	link->link_autoneg = ETH_LINK_AUTONEG;
 }
 
 static void
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 2bd2f272d..9a889c6fb 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -790,7 +790,7 @@ vmxnet3_dev_link_update(struct rte_eth_dev *dev,
 		link.link_status = ETH_LINK_UP;
 		link.link_duplex = ETH_LINK_FULL_DUPLEX;
 		link.link_speed = ETH_SPEED_NUM_10G;
-		link.link_autoneg = ETH_LINK_SPEED_FIXED;
+		link.link_autoneg = ETH_LINK_AUTONEG;
 	}
 
 	vmxnet3_dev_atomic_write_link_status(dev, &link);
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 011a74f57..13a7c8a86 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -262,17 +262,17 @@ __extension__
 struct rte_eth_link {
 	uint32_t link_speed;        /**< ETH_SPEED_NUM_ */
 	uint16_t link_duplex  : 1;  /**< ETH_LINK_[HALF/FULL]_DUPLEX */
-	uint16_t link_autoneg : 1;  /**< ETH_LINK_SPEED_[AUTONEG/FIXED] */
+	uint16_t link_autoneg : 1;  /**< ETH_LINK_[AUTONEG/FIXED] */
 	uint16_t link_status  : 1;  /**< ETH_LINK_[DOWN/UP] */
 } __attribute__((aligned(8)));      /**< aligned for atomic64 read/write */
 
 /* Utility constants */
-#define ETH_LINK_HALF_DUPLEX    0 /**< Half-duplex connection. */
-#define ETH_LINK_FULL_DUPLEX    1 /**< Full-duplex connection. */
-#define ETH_LINK_DOWN           0 /**< Link is down. */
-#define ETH_LINK_UP             1 /**< Link is up. */
-#define ETH_LINK_FIXED          0 /**< No autonegotiation. */
-#define ETH_LINK_AUTONEG        1 /**< Autonegotiated. */
+#define ETH_LINK_HALF_DUPLEX 0 /**< Half-duplex connection (see link_duplex). */
+#define ETH_LINK_FULL_DUPLEX 1 /**< Full-duplex connection (see link_duplex). */
+#define ETH_LINK_DOWN        0 /**< Link is down (see link_status). */
+#define ETH_LINK_UP          1 /**< Link is up (see link_status). */
+#define ETH_LINK_FIXED       0 /**< No autonegotiation (see link_autoneg). */
+#define ETH_LINK_AUTONEG     1 /**< Autonegotiated (see link_autoneg). */
 
 /**
  * A structure used to configure the ring threshold registers of an RX/TX
-- 
2.14.2

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

* [dpdk-stable] patch 'net/pcap: fix the NUMA id display in logs' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (40 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'ethdev: fix link autonegotiation value' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/ixgbe: fix max queue number for VF' " luca.boccassi
                   ` (18 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Vipin Varghese; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From bce7c4ab23699e6466b0c9cbbf5e65bf67902783 Mon Sep 17 00:00:00 2001
From: Vipin Varghese <vipin.varghese@intel.com>
Date: Fri, 22 Dec 2017 10:08:20 +0530
Subject: [PATCH] net/pcap: fix the NUMA id display in logs

[ upstream commit c5097d53613779c156b548ee4097b59c3c8e611d ]

On single NUMA device the log information shows as boundary value
instead of -1. The change brings in unsigned to signed.

Fixes: 4c173302c307 ("pcap: add new driver")

Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/pcap/rte_eth_pcap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 69dc21674..76c131b36 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -801,7 +801,7 @@ pmd_init_internals(const char *name, const unsigned int nb_rx_queues,
 	struct rte_eth_dev_data *data = NULL;
 	unsigned int numa_node = rte_socket_id();
 
-	RTE_LOG(INFO, PMD, "Creating pcap-backed ethdev on numa socket %u\n",
+	RTE_LOG(INFO, PMD, "Creating pcap-backed ethdev on numa socket %d\n",
 		numa_node);
 
 	/* now do all data allocation - for eth_dev structure
@@ -1042,7 +1042,7 @@ pmd_pcap_remove(const char *name)
 {
 	struct rte_eth_dev *eth_dev = NULL;
 
-	RTE_LOG(INFO, PMD, "Closing pcap ethdev on numa socket %u\n",
+	RTE_LOG(INFO, PMD, "Closing pcap ethdev on numa socket %d\n",
 			rte_socket_id());
 
 	if (name == NULL)
-- 
2.14.2

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

* [dpdk-stable] patch 'net/ixgbe: fix max queue number for VF' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (41 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/pcap: fix the NUMA id display in logs' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e: fix VF reset stats crash' " luca.boccassi
                   ` (17 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Yanglong Wu; +Cc: Wei Dai, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 37d41347868bf1d2f8aae89ed12661b8d5974660 Mon Sep 17 00:00:00 2001
From: Yanglong Wu <yanglong.wu@intel.com>
Date: Tue, 9 Jan 2018 14:32:05 +0800
Subject: [PATCH] net/ixgbe: fix max queue number for VF

[ upstream commit 03231aec448e0596da1cac6ad8543ff937c24eae ]

VF can't run in multiple queue mode, if nb_q_per_pool is set to 1.
Nb_q_per_pool is passed through to max_rx_q and max_tx_q in VF.
So if nb_q_per_pool is equal to 1, max_rx_q and max_tx_q shouldn't
be more than 1, otherwise VF multiple queue mode will fail.

RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool is the Max number of queue can be
used in VF, that would be assigned as IXGBE_MAX_RX_QUEUE_NUM /
RTE_ETH_DEV_SRIOV(dev).active, so that assigning nb_q_per_pool  as 1
when PF is in ETH_MQ_RX_NONE, which will make VF can just use only 1
queue, is not right.

Fixes: 27b609cbd1c6 ("ethdev: move the multi-queue mode check to specific drivers")

Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 9be3f3cd0..d9cc02f47 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2005,8 +2005,6 @@ ixgbe_check_mq_mode(struct rte_eth_dev *dev)
 		case ETH_MQ_RX_NONE:
 			/* if nothing mq mode configure, use default scheme */
 			dev->data->dev_conf.rxmode.mq_mode = ETH_MQ_RX_VMDQ_ONLY;
-			if (RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool > 1)
-				RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool = 1;
 			break;
 		default: /* ETH_MQ_RX_DCB, ETH_MQ_RX_DCB_RSS or ETH_MQ_TX_DCB*/
 			/* SRIOV only works in VMDq enable mode */
-- 
2.14.2

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

* [dpdk-stable] patch 'net/i40e: fix VF reset stats crash' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (42 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/ixgbe: fix max queue number for VF' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/ixgbe: fix mailbox interrupt handler' " luca.boccassi
                   ` (16 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: David Harton; +Cc: Harry van Haaren, Wei Zhao, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 13167e5ad5ce79ff77cb944f63e02ddb3c6a1a5d Mon Sep 17 00:00:00 2001
From: David Harton <dharton@cisco.com>
Date: Thu, 11 Jan 2018 10:13:58 -0500
Subject: [PATCH] net/i40e: fix VF reset stats crash

[ upstream commit cde1f0252811e81a3c485ca1932cc655736f1e49 ]

Calling i40evf_dev_xstats_reset can sometimes crash. Fixed issue
by checking return code before using pstats.

Fixes: 8210e9e0d805 ("net/i40e: fix clear xstats bug in VF")

Signed-off-by: David Harton <dharton@cisco.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 1686914a1..1a082f1a2 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1035,14 +1035,16 @@ i40evf_get_statics(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 static void
 i40evf_dev_xstats_reset(struct rte_eth_dev *dev)
 {
+	int ret;
 	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 	struct i40e_eth_stats *pstats = NULL;
 
 	/* read stat values to clear hardware registers */
-	i40evf_update_stats(dev, &pstats);
+	ret = i40evf_update_stats(dev, &pstats);
 
 	/* set stats offset base on current values */
-	vf->vsi.eth_stats_offset = *pstats;
+	if (ret == 0)
+		vf->vsi.eth_stats_offset = *pstats;
 }
 
 static int i40evf_dev_xstats_get_names(__rte_unused struct rte_eth_dev *dev,
-- 
2.14.2

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

* [dpdk-stable] patch 'net/ixgbe: fix mailbox interrupt handler' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (43 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e: fix VF reset stats crash' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/e1000: " luca.boccassi
                   ` (15 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Wei Dai, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 4dde0d6e4099818118804d0ee203e92a4a7ac313 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Wed, 27 Dec 2017 15:22:29 -0500
Subject: [PATCH] net/ixgbe: fix mailbox interrupt handler

[ upstream commit 6810c6392656f05b3f9d45806a87ee683337a15b ]

Mailbox interrupt handler only takes care of PF reset notification, for
other message ixgbe_read_mbx should not be called since it gets chance
to break the foreground VF to PF communication.
This can be simply repeated by 'testpmd>rx_vlan rm all 0'.

Fixes: 77234603fba0 ("net/ixgbe: support VF mailbox interrupt for link up/down")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index d9cc02f47..f870069a7 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -7571,12 +7571,17 @@ static void ixgbevf_mbx_process(struct rte_eth_dev *dev)
 	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	u32 in_msg = 0;
 
-	if (ixgbe_read_mbx(hw, &in_msg, 1, 0))
-		return;
+	/* peek the message first */
+	in_msg = IXGBE_READ_REG(hw, IXGBE_VFMBMEM);
 
 	/* PF reset VF event */
-	if (in_msg == IXGBE_PF_CONTROL_MSG)
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL);
+	if (in_msg == IXGBE_PF_CONTROL_MSG) {
+		/* dummy mbx read to ack pf */
+		if (ixgbe_read_mbx(hw, &in_msg, 1, 0))
+			return;
+		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+					      NULL);
+	}
 }
 
 static int
-- 
2.14.2

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

* [dpdk-stable] patch 'net/e1000: fix mailbox interrupt handler' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (44 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/ixgbe: fix mailbox interrupt handler' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/mlx5: fix deadlock of link status alarm' " luca.boccassi
                   ` (14 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Wei Dai, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 91485eca8ac3eea797188c9b85e9e1d89962bfdb Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Wed, 27 Dec 2017 15:22:30 -0500
Subject: [PATCH] net/e1000: fix mailbox interrupt handler

[ upstream commit dd18b06a32833543c6951b6206ac39896eaac154 ]

Mailbox interrupt handler only takecare of the PF reset notification,
for other message mbx->ops.read should not be called since it gets
chance to break the foreground VF to PF communication.

Fixes: 316f4f1adc2e ("net/igb: support VF mailbox interrupt for link up/down")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
---
 drivers/net/e1000/igb_ethdev.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index b9b794388..3c85aff3d 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -2757,12 +2757,17 @@ void igbvf_mbx_process(struct rte_eth_dev *dev)
 	struct e1000_mbx_info *mbx = &hw->mbx;
 	u32 in_msg = 0;
 
-	if (mbx->ops.read(hw, &in_msg, 1, 0))
-		return;
+	/* peek the message first */
+	in_msg = E1000_READ_REG(hw, E1000_VMBMEM(0));
 
 	/* PF reset VF event */
-	if (in_msg == E1000_PF_CONTROL_MSG)
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL);
+	if (in_msg == E1000_PF_CONTROL_MSG) {
+		/* dummy mbx read to ack pf */
+		if (mbx->ops.read(hw, &in_msg, 1, 0))
+			return;
+		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+					      NULL);
+	}
 }
 
 static int
-- 
2.14.2

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

* [dpdk-stable] patch 'net/mlx5: fix deadlock of link status alarm' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (45 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/e1000: " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'vhost: fix error code check when creating thread' " luca.boccassi
                   ` (13 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: Nelio Laranjeiro, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From f6f2470ea69cc55b3cd33da7e39d3d3176fb8cf0 Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Wed, 10 Jan 2018 09:46:49 -0800
Subject: [PATCH] net/mlx5: fix deadlock of link status alarm

[ upstream commit 6817ad38718451849b672b0584176c14a8b55b88 ]

If mlx5_dev_link_status_handler() is executed while canceling the alarm,
deadlock can happen because rte_eal_alarm_cancel() waits for all callbackes
to finish execution and both calls are protected by priv->lock.

Fixes: 198a3c339a8f ("mlx5: handle link status interrupts")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx5/mlx5.h        | 16 ++++++++++++++++
 drivers/net/mlx5/mlx5_ethdev.c | 13 +++++++++----
 2 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 79b7a6008..0ffb94019 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -160,6 +160,22 @@ priv_lock(struct priv *priv)
 	rte_spinlock_lock(&priv->lock);
 }
 
+/**
+ * Try to lock private structure to protect it from concurrent access in the
+ * control path.
+ *
+ * @param priv
+ *   Pointer to private structure.
+ *
+ * @return
+ *   1 if the lock is successfully taken; 0 otherwise.
+ */
+static inline int
+priv_trylock(struct priv *priv)
+{
+	return rte_spinlock_trylock(&priv->lock);
+}
+
 /**
  * Unlock private structure.
  *
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 2ea995f89..c7822835d 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -1239,8 +1239,12 @@ mlx5_dev_link_status_handler(void *arg)
 	struct priv *priv = dev->data->dev_private;
 	int ret;
 
-	priv_lock(priv);
-	assert(priv->pending_alarm == 1);
+	while (!priv_trylock(priv)) {
+		/* Alarm is being canceled. */
+		if (priv->pending_alarm == 0)
+			return;
+		rte_pause();
+	}
 	priv->pending_alarm = 0;
 	ret = priv_dev_link_status_handler(priv, dev);
 	priv_unlock(priv);
@@ -1287,9 +1291,10 @@ priv_dev_interrupt_handler_uninstall(struct priv *priv, struct rte_eth_dev *dev)
 	rte_intr_callback_unregister(&priv->intr_handle,
 				     mlx5_dev_interrupt_handler,
 				     dev);
-	if (priv->pending_alarm)
+	if (priv->pending_alarm) {
+		priv->pending_alarm = 0;
 		rte_eal_alarm_cancel(mlx5_dev_link_status_handler, dev);
-	priv->pending_alarm = 0;
+	}
 	priv->intr_handle.fd = 0;
 	priv->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN;
 }
-- 
2.14.2

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

* [dpdk-stable] patch 'vhost: fix error code check when creating thread' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (46 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/mlx5: fix deadlock of link status alarm' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'examples/vhost: fix startup check' " luca.boccassi
                   ` (12 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Maxime Coquelin, Jens Freimann, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 8ae9838b58bc57d386479582af666545cb4c3f23 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Fri, 8 Dec 2017 11:19:49 +0100
Subject: [PATCH] vhost: fix error code check when creating thread

[ upstream commit da51d2f6b8b652da8eb9d4b50df4f3f5a24b656f ]

On error, pthread_create() returns a positive number (errno).
Fix the test on the return value.

Fixes: af1475918124 ("vhost: introduce API to start a specific driver")
Fixes: e623e0c6d8a5 ("vhost: add reconnect ability")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
---
 lib/librte_vhost/socket.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index 84e059513..a95fbfbb9 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -438,7 +438,7 @@ vhost_user_reconnect_init(void)
 
 	ret = pthread_create(&reconn_tid, NULL,
 			     vhost_user_client_reconnect, NULL);
-	if (ret < 0)
+	if (ret != 0)
 		RTE_LOG(ERR, VHOST_CONFIG, "failed to create reconnect thread");
 
 	return ret;
@@ -525,7 +525,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
 	if ((flags & RTE_VHOST_USER_CLIENT) != 0) {
 		vsocket->reconnect = !(flags & RTE_VHOST_USER_NO_RECONNECT);
 		if (vsocket->reconnect && reconn_tid == 0) {
-			if (vhost_user_reconnect_init() < 0) {
+			if (vhost_user_reconnect_init() != 0) {
 				free(vsocket->path);
 				free(vsocket);
 				goto out;
-- 
2.14.2

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

* [dpdk-stable] patch 'examples/vhost: fix startup check' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (47 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'vhost: fix error code check when creating thread' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'pdump: fix error check when creating/canceling thread' " luca.boccassi
                   ` (11 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Zhiyong Yang; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From f63616335ca4cb11f000f35f2365ba2ecf2eb99d Mon Sep 17 00:00:00 2001
From: Zhiyong Yang <zhiyong.yang@intel.com>
Date: Wed, 10 Jan 2018 14:01:01 +0800
Subject: [PATCH] examples/vhost: fix startup check

[ upstream commit 61e99293f6591f8ac2e0051b80fe7e1ba638ea96 ]

For vhost sample, the operation if (dev_info.max_rx_queues >
MAX_QUEUES) in the function port_init causes startup failure
when using X710(i40e driver). X710 requires that MAX_QUEUES
should be defined no less than 320, however it is defined as
128 currently.

Such checking is overkill and Removal don't affect any
functionality (have already validated ixgbe and i40e).

The removal can avoid similar issue when introduing new physical NIC.

Fixes: 8bd6c395a568 ("examples/vhost: increase maximum queue number")

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
 examples/vhost/main.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 86f806523..fe2327473 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -277,12 +277,6 @@ port_init(uint8_t port)
 	/* The max pool number from dev_info will be used to validate the pool number specified in cmd line */
 	rte_eth_dev_info_get (port, &dev_info);
 
-	if (dev_info.max_rx_queues > MAX_QUEUES) {
-		rte_exit(EXIT_FAILURE,
-			"please define MAX_QUEUES no less than %u in %s\n",
-			dev_info.max_rx_queues, __FILE__);
-	}
-
 	rxconf = &dev_info.default_rxconf;
 	txconf = &dev_info.default_txconf;
 	rxconf->rx_drop_en = 1;
-- 
2.14.2

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

* [dpdk-stable] patch 'pdump: fix error check when creating/canceling thread' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (48 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'examples/vhost: fix startup check' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'app/procinfo: add compilation option in config' " luca.boccassi
                   ` (10 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Olivier Matz; +Cc: John McNamara, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 2e9533f49e5044acd69e1273dfeb81f27a8d434f Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Fri, 8 Dec 2017 11:20:13 +0100
Subject: [PATCH] pdump: fix error check when creating/canceling thread

[ upstream commit 2969258cb41064d2295ac823f385ad41ef405f15 ]

On error, pthread_create() returns a positive number (an errno)
but does not set the errno variable.

Fixes: 278f945402c5 ("pdump: add new library for packet capture")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 lib/librte_pdump/rte_pdump.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_pdump/rte_pdump.c b/lib/librte_pdump/rte_pdump.c
index e64bf598c..1a5147aa6 100644
--- a/lib/librte_pdump/rte_pdump.c
+++ b/lib/librte_pdump/rte_pdump.c
@@ -582,7 +582,7 @@ rte_pdump_init(const char *path)
 	if (ret != 0) {
 		RTE_LOG(ERR, PDUMP,
 			"Failed to create the pdump thread:%s, %s:%d\n",
-			strerror(errno), __func__, __LINE__);
+			strerror(ret), __func__, __LINE__);
 		return -1;
 	}
 	/* Set thread_name for aid in debugging. */
@@ -605,7 +605,7 @@ rte_pdump_uninit(void)
 	if (ret != 0) {
 		RTE_LOG(ERR, PDUMP,
 			"Failed to cancel the pdump thread:%s, %s:%d\n",
-			strerror(errno), __func__, __LINE__);
+			strerror(ret), __func__, __LINE__);
 		return -1;
 	}
 
-- 
2.14.2

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

* [dpdk-stable] patch 'app/procinfo: add compilation option in config' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (49 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'pdump: fix error check when creating/canceling thread' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'test: register test as failed if setup failed' " luca.boccassi
                   ` (9 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From ad2d1495cb5b85fde3930ebca47782786e1c43f9 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Fri, 12 Jan 2018 18:27:29 +0000
Subject: [PATCH] app/procinfo: add compilation option in config

[ upstream commit 7425a8fc5a3afc56d083fe21508efce1c6b0e45f ]

Unlike every other DPDK application's compilation, proc_info's
compilation cannot be turned off on Linux. Fix it by adding a
config option to base linuxapp config.

Fixes: 22561383ea17 ("app: replace dump_cfg by proc_info")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 app/Makefile           | 2 +-
 config/common_base     | 5 +++++
 config/common_linuxapp | 1 +
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/app/Makefile b/app/Makefile
index 30ec292ae..62d5d0298 100644
--- a/app/Makefile
+++ b/app/Makefile
@@ -36,7 +36,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_ACL) += test-acl
 DIRS-$(CONFIG_RTE_LIBRTE_PIPELINE) += test-pipeline
 DIRS-$(CONFIG_RTE_TEST_PMD) += test-pmd
 DIRS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_test
-DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += proc_info
+DIRS-$(CONFIG_RTE_PROC_INFO) += proc_info
 DIRS-$(CONFIG_RTE_LIBRTE_PDUMP) += pdump
 
 include $(RTE_SDK)/mk/rte.subdir.mk
diff --git a/config/common_base b/config/common_base
index 4bff83af7..2d4a47fb9 100644
--- a/config/common_base
+++ b/config/common_base
@@ -583,6 +583,11 @@ CONFIG_RTE_INSECURE_FUNCTION_WARNING=n
 CONFIG_RTE_APP_TEST=y
 CONFIG_RTE_APP_TEST_RESOURCE_TAR=n
 
+#
+# Compile the procinfo application
+#
+CONFIG_RTE_PROC_INFO=n
+
 #
 # Compile the PMD test application
 #
diff --git a/config/common_linuxapp b/config/common_linuxapp
index 2483dfa51..433949394 100644
--- a/config/common_linuxapp
+++ b/config/common_linuxapp
@@ -44,3 +44,4 @@ CONFIG_RTE_LIBRTE_PMD_VHOST=y
 CONFIG_RTE_LIBRTE_PMD_AF_PACKET=y
 CONFIG_RTE_LIBRTE_POWER=y
 CONFIG_RTE_VIRTIO_USER=y
+CONFIG_RTE_PROC_INFO=y
-- 
2.14.2

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

* [dpdk-stable] patch 'test: register test as failed if setup failed' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (50 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'app/procinfo: add compilation option in config' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'test/table: fix uninitialized parameter' " luca.boccassi
                   ` (8 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Declan Doherty, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 576481bec56fea8b3a70884dd0895838081b5304 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Fri, 22 Dec 2017 10:21:51 +0000
Subject: [PATCH] test: register test as failed if setup failed

[ upstream commit 69a95070111f37fb1c7d7ee11956aff2865f6c11 ]

If test set up couldn't be completed, the test was previously
shown as succeeding, even though setup failed. Fix this to report
test as failed, and count all tests that should've been executed,
as failed as well.

Fixes: ffac67b1f71b ("app/test: new assert macros and test suite runner")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
 app/test/test.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/app/test/test.c b/app/test/test.c
index cd0e78458..76941af08 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -165,8 +165,20 @@ unit_test_suite_runner(struct unit_test_suite *suite)
 	}
 
 	if (suite->setup)
-		if (suite->setup() != 0)
+		if (suite->setup() != 0) {
+			/*
+			 * setup failed, so count all enabled tests and mark
+			 * them as failed
+			 */
+			while (suite->unit_test_cases[total].testcase) {
+				if (!suite->unit_test_cases[total].enabled)
+					skipped++;
+				else
+					failed++;
+				total++;
+			}
 			goto suite_summary;
+		}
 
 	printf(" + ------------------------------------------------------- +\n");
 
-- 
2.14.2

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

* [dpdk-stable] patch 'test/table: fix uninitialized parameter' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (51 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'test: register test as failed if setup failed' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'test/memzone: fix wrong test' " luca.boccassi
                   ` (7 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 55fa09034cd9d5f2b8256e0619a279d7afa4fdf4 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Thu, 21 Dec 2017 15:53:05 +0000
Subject: [PATCH] test/table: fix uninitialized parameter

[ upstream commit 7e60499b6cb941547a147ed66f912aee148ff252 ]

delete_bulk() copies metadata to pointers provided by the entries
parameter, but in the unit test, they are uninitialized, leading
to rte_table attempting to memcpy into random garbage pointers.

Memsetting pointer table to zero will prevent that from happening.

Fixes: 48f2543cf0a8 ("app/test: add bulk adding and deleting")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 app/test/test_table_acl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/test/test_table_acl.c b/app/test/test_table_acl.c
index b3bfda4cc..a5d44c5b0 100644
--- a/app/test/test_table_acl.c
+++ b/app/test/test_table_acl.c
@@ -532,6 +532,8 @@ setup_acl_pipeline(void)
 		struct rte_pipeline_table_entry *table_entries[5];
 		int key_found[5];
 
+		memset(table_entries, 0, sizeof(table_entries));
+
 		for (n = 0; n < 5; n++) {
 			memset(&keys[n], 0, sizeof(struct rte_table_acl_rule_delete_params));
 			key_array[n] = &keys[n];
-- 
2.14.2

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

* [dpdk-stable] patch 'test/memzone: fix wrong test' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (52 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'test/table: fix uninitialized parameter' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'test/memzone: fix NULL freeing' " luca.boccassi
                   ` (6 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 5999060471eba43d59501b1146968dfb2ed0ce36 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Thu, 21 Dec 2017 18:19:44 +0000
Subject: [PATCH] test/memzone: fix wrong test

[ upstream commit 82da6af3ca4ad9aa1316792f90b2f88cd3020456 ]

When reserving memzones in autotest, it makes no sense to expect a
failed memzone reserve when we specify both size flags - instead,
we should expect a memzone reserved with one of the two sizes.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 app/test/test_memzone.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/app/test/test_memzone.c b/app/test/test_memzone.c
index 72cda007d..da8738cb4 100644
--- a/app/test/test_memzone.c
+++ b/app/test/test_memzone.c
@@ -289,10 +289,19 @@ test_memzone_reserve_flags(void)
 		if (hugepage_2MB_avail && hugepage_1GB_avail) {
 			mz = rte_memzone_reserve("flag_zone_2M_HINT", size, SOCKET_ID_ANY,
 								RTE_MEMZONE_2MB|RTE_MEMZONE_1GB);
-			if (mz != NULL) {
+			if (mz == NULL) {
 				printf("BOTH SIZES SET\n");
 				return -1;
 			}
+			if (mz->hugepage_sz != RTE_PGSIZE_1G &&
+					mz->hugepage_sz != RTE_PGSIZE_2M) {
+				printf("Wrong size when both sizes set\n");
+				return -1;
+			}
+			if (rte_memzone_free(mz)) {
+				printf("Fail memzone free\n");
+				return -1;
+			}
 		}
 	}
 	/*
@@ -424,10 +433,19 @@ test_memzone_reserve_flags(void)
 			mz = rte_memzone_reserve("flag_zone_16M_HINT", size,
 				SOCKET_ID_ANY,
 				RTE_MEMZONE_16MB|RTE_MEMZONE_16GB);
-			if (mz != NULL) {
+			if (mz == NULL) {
 				printf("BOTH SIZES SET\n");
 				return -1;
 			}
+			if (mz->hugepage_sz != RTE_PGSIZE_16G &&
+					mz->hugepage_sz != RTE_PGSIZE_16M) {
+				printf("Wrong size when both sizes set\n");
+				return -1;
+			}
+			if (rte_memzone_free(mz)) {
+				printf("Fail memzone free\n");
+				return -1;
+			}
 		}
 	}
 	return 0;
-- 
2.14.2

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

* [dpdk-stable] patch 'test/memzone: fix NULL freeing' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (53 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'test/memzone: fix wrong test' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'test/memzone: fix freeing test' " luca.boccassi
                   ` (5 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Phil Yang; +Cc: Jianbo Liu, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From e8a202653f69b674370fdb6fa24d7ace731ab537 Mon Sep 17 00:00:00 2001
From: Phil Yang <phil.yang@arm.com>
Date: Mon, 15 Jan 2018 13:43:32 +0800
Subject: [PATCH] test/memzone: fix NULL freeing

[ upstream commit a7b5b4f1b3febec68dc7b8ba339f4b222750952b ]

No need to free a NULL memzone. It will cause test
termination.

Fixes: 71330483a193 ("test/memzone: fix memory leak")

Signed-off-by: Phil Yang <phil.yang@arm.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 app/test/test_memzone.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/app/test/test_memzone.c b/app/test/test_memzone.c
index da8738cb4..545cbe647 100644
--- a/app/test/test_memzone.c
+++ b/app/test/test_memzone.c
@@ -280,10 +280,6 @@ test_memzone_reserve_flags(void)
 				printf("MEMZONE FLAG 2MB\n");
 				return -1;
 			}
-			if (rte_memzone_free(mz)) {
-				printf("Fail memzone free\n");
-				return -1;
-			}
 		}
 
 		if (hugepage_2MB_avail && hugepage_1GB_avail) {
-- 
2.14.2

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

* [dpdk-stable] patch 'test/memzone: fix freeing test' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (54 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'test/memzone: fix NULL freeing' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'test/crypto: fix missing include' " luca.boccassi
                   ` (4 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Phil Yang; +Cc: Jianbo Liu, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 843f976ae13e79a7a828486ecf0efcbcab1e4cb6 Mon Sep 17 00:00:00 2001
From: Phil Yang <phil.yang@arm.com>
Date: Mon, 15 Jan 2018 13:43:33 +0800
Subject: [PATCH] test/memzone: fix freeing test

[ upstream commit c281b4fc71ddefe809994be10f53b87e1ba6c669 ]

When reserving memzone for mz[], it will out of mz[RTE_MAX_MEMZONE] memory
bound after the counter reached to RTE_MAX_MEMZONE. It will flush the
counter's memory and lead to mz[] memory cannot be freed.

Fixd by extend to mz[RTE_MAX_MEMZONE + 1].

Fixes: ff909fe21f0a ("mem: introduce memzone freeing")

Signed-off-by: Phil Yang <phil.yang@arm.com>
Acked-by: Jianbo Liu <jianbo.liu@arm.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 app/test/test_memzone.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_memzone.c b/app/test/test_memzone.c
index 545cbe647..91d8e6a87 100644
--- a/app/test/test_memzone.c
+++ b/app/test/test_memzone.c
@@ -789,7 +789,7 @@ test_memzone_bounded(void)
 static int
 test_memzone_free(void)
 {
-	const struct rte_memzone *mz[RTE_MAX_MEMZONE];
+	const struct rte_memzone *mz[RTE_MAX_MEMZONE + 1];
 	int i;
 	char name[20];
 
-- 
2.14.2

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

* [dpdk-stable] patch 'test/crypto: fix missing include' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (55 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'test/memzone: fix freeing test' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix corner case for SPI value' " luca.boccassi
                   ` (3 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From ebcf4e5aca407b05104a8afa11a2cdd360d7ad66 Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Date: Tue, 28 Nov 2017 18:20:59 +0530
Subject: [PATCH] test/crypto: fix missing include

[ upstream commit 3a55855081da3a354eedf51e37af4bad8b13c22a ]

time() is defined in time.h

Fixes: ffbe3be0d4 ("app/test: add libcrypto")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 app/test/test_cryptodev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index b544ab9cc..c9e0b66e5 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -30,6 +30,8 @@
  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include <time.h>
+
 #include <rte_common.h>
 #include <rte_hexdump.h>
 #include <rte_mbuf.h>
-- 
2.14.2

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

* [dpdk-stable] patch 'examples/ipsec-secgw: fix corner case for SPI value' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (56 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'test/crypto: fix missing include' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e: fix flag for MAC address write' " luca.boccassi
                   ` (2 subsequent siblings)
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Akhil Goyal; +Cc: Radu Nicolau, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 2a55bf3ff700e901b9d337f4c7e74808077bed09 Mon Sep 17 00:00:00 2001
From: Akhil Goyal <akhil.goyal@nxp.com>
Date: Thu, 11 Jan 2018 17:25:36 +0530
Subject: [PATCH] examples/ipsec-secgw: fix corner case for SPI value

[ upstream commit 2a5106af132b6cd740769714cb5096ee3654469e ]

IPSec application is using index 0 of SA table as error,
with current value of IPSEC_SA_MAX_ENTRIES(128) it can
not support SA with spi = 128, as it uses sa_idx = 0
in the SA table.

With this patch, sa_idx = 0 can also be used.

PS: spi = 0 is an invalid SPI and application throws error
for it.

Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application")

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 7 ++++---
 examples/ipsec-secgw/sa.c          | 2 ++
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 9cccd8a0b..3c1ea16d5 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -409,7 +409,8 @@ inbound_sp_sa(struct sp_ctx *sp, struct sa_ctx *sa, struct traffic_type *ip,
 		}
 		/* Only check SPI match for processed IPSec packets */
 		sa_idx = ip->res[i] & PROTECT_MASK;
-		if (sa_idx == 0 || !inbound_sa_check(sa, m, sa_idx)) {
+		if (sa_idx >= IPSEC_SA_MAX_ENTRIES ||
+				!inbound_sa_check(sa, m, sa_idx)) {
 			rte_pktmbuf_free(m);
 			continue;
 		}
@@ -474,9 +475,9 @@ outbound_sp(struct sp_ctx *sp, struct traffic_type *ip,
 	for (i = 0; i < ip->num; i++) {
 		m = ip->pkts[i];
 		sa_idx = ip->res[i] & PROTECT_MASK;
-		if ((ip->res[i] == 0) || (ip->res[i] & DISCARD))
+		if (ip->res[i] & DISCARD)
 			rte_pktmbuf_free(m);
-		else if (sa_idx != 0) {
+		else if (sa_idx < IPSEC_SA_MAX_ENTRIES) {
 			ipsec->res[ipsec->num] = sa_idx;
 			ipsec->pkts[ipsec->num++] = m;
 		} else /* BYPASS */
diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 8c4406cf8..513959c6e 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -232,6 +232,8 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens,
 	APP_CHECK_TOKEN_IS_NUM(tokens, 1, status);
 	if (status->status < 0)
 		return;
+	if (atoi(tokens[1]) == INVALID_SPI)
+		return;
 	rule->spi = atoi(tokens[1]);
 
 	for (ti = 2; ti < n_tokens; ti++) {
-- 
2.14.2

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

* [dpdk-stable] patch 'net/i40e: fix flag for MAC address write' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (57 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix corner case for SPI value' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'vhost: fix mbuf free' " luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e: fix flow director Rx resource defect' " luca.boccassi
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Igor Ryzhov; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From ff62ca19a7073b68abd8dc7e4205925af44d4d20 Mon Sep 17 00:00:00 2001
From: Igor Ryzhov <iryzhov@nfware.com>
Date: Mon, 15 Jan 2018 11:32:18 +0300
Subject: [PATCH] net/i40e: fix flag for MAC address write

[ upstream commit b4f42173a54a9304486cca74ba72d620680e13b1 ]

Current flag is in wrong byte order for i40e_aq_mac_address_write,
and just uses the well defined macro instead.

Fixes: e18e01e92c29 ("i40e: support default MAC address setting")

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index eed74b147..54f7351a7 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -9868,8 +9868,8 @@ static void i40e_set_default_mac_addr(struct rte_eth_dev *dev,
 	}
 	memcpy(&pf->dev_addr, mac_addr, ETH_ADDR_LEN);
 
-	/* Flags: 0x3 updates port address */
-	i40e_aq_mac_address_write(hw, 0x3, mac_addr->addr_bytes, NULL);
+	i40e_aq_mac_address_write(hw, I40E_AQC_WRITE_TYPE_LAA_WOL,
+				  mac_addr->addr_bytes, NULL);
 }
 
 static int
-- 
2.14.2

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

* [dpdk-stable] patch 'vhost: fix mbuf free' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (58 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e: fix flag for MAC address write' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e: fix flow director Rx resource defect' " luca.boccassi
  60 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Junjie Chen; +Cc: Maxime Coquelin, Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 57abdf63ae7623eaa169729547d0d0336f49695c Mon Sep 17 00:00:00 2001
From: Junjie Chen <junjie.j.chen@intel.com>
Date: Wed, 17 Jan 2018 10:45:53 -0500
Subject: [PATCH] vhost: fix mbuf free

[ upstream commit 3ebd930588b7847906e08e2645a35761a90abf2a ]

dequeue zero copy change buf_addr and buf_iova of mbuf, and return
to mbuf pool without restore them, it breaks vm memory if others allocate
mbuf from same pool since mbuf reset doesn't reset buf_addr and buf_iova.

Fixes: b0a985d1f340 ("vhost: add dequeue zero copy")

Signed-off-by: Junjie Chen <junjie.j.chen@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
 lib/librte_vhost/virtio_net.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 83a0082e5..db194507e 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -1028,6 +1028,22 @@ mbuf_is_consumed(struct rte_mbuf *m)
 	return true;
 }
 
+static inline void __attribute__((always_inline))
+restore_mbuf(struct rte_mbuf *m)
+{
+	uint32_t mbuf_size, priv_size;
+
+	while (m) {
+		priv_size = rte_pktmbuf_priv_size(m->pool);
+		mbuf_size = sizeof(struct rte_mbuf) + priv_size;
+		/* start of buffer is after mbuf structure and priv data */
+
+		m->buf_addr = (char *)m + mbuf_size;
+		m->buf_physaddr = rte_mempool_virt2phy(NULL, m) + mbuf_size;
+		m = m->next;
+	}
+}
+
 uint16_t
 rte_vhost_dequeue_burst(int vid, uint16_t queue_id,
 	struct rte_mempool *mbuf_pool, struct rte_mbuf **pkts, uint16_t count)
@@ -1070,6 +1086,7 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id,
 				nr_updated += 1;
 
 				TAILQ_REMOVE(&vq->zmbuf_list, zmbuf, next);
+				restore_mbuf(zmbuf->mbuf);
 				rte_pktmbuf_free(zmbuf->mbuf);
 				put_zmbuf(zmbuf);
 				vq->nr_zmbuf -= 1;
-- 
2.14.2

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

* [dpdk-stable] patch 'net/i40e: fix flow director Rx resource defect' has been queued to LTS release 16.11.5
  2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
                   ` (59 preceding siblings ...)
  2018-01-26 13:13 ` [dpdk-stable] patch 'vhost: fix mbuf free' " luca.boccassi
@ 2018-01-26 13:13 ` luca.boccassi
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
  60 siblings, 1 reply; 111+ messages in thread
From: luca.boccassi @ 2018-01-26 13:13 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Jingjing Wu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 01/28/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From c9a156ad307b9ccc12cc4987b57924678c54d395 Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Fri, 19 Jan 2018 13:23:44 +0800
Subject: [PATCH] net/i40e: fix flow director Rx resource defect

[ upstream commit f4c8ad4f97e24af7f6200723ca8d93702f15b1e6 ]

FDIR Rx ring isn't initialized and Rx queue HW tail isn't updated
when there's error detected during programming FDIR flow. There'll
be some potential risk.
This patch updates FDIR Rx resource.

Fixes: a778a1fa2e4e ("i40e: set up and initialize flow director")
Fixes: 05999aab4ca6 ("i40e: add or delete flow director")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
 drivers/net/i40e/i40e_fdir.c | 8 ++++++--
 drivers/net/i40e/i40e_rxtx.c | 1 +
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index e78610b8e..e25b8e0c4 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -165,7 +165,6 @@ i40e_fdir_rx_queue_init(struct i40e_rx_queue *rxq)
 
 	rte_wmb();
 	/* Init the RX tail regieter. */
-	I40E_PCI_REG_WRITE(rxq->qrx_tail, 0);
 	I40E_PCI_REG_WRITE(rxq->qrx_tail, rxq->nb_rx_desc - 1);
 
 	return err;
@@ -1011,13 +1010,18 @@ i40e_check_fdir_programming_status(struct i40e_rx_queue *rxq)
 				PMD_DRV_LOG(ERR, "invalid programming status"
 					    " reported, error = %u.", error);
 		} else
-			PMD_DRV_LOG(ERR, "unknown programming status"
+			PMD_DRV_LOG(INFO, "unknown programming status"
 				    " reported, len = %d, id = %u.", len, id);
 		rxdp->wb.qword1.status_error_len = 0;
 		rxq->rx_tail++;
 		if (unlikely(rxq->rx_tail == rxq->nb_rx_desc))
 			rxq->rx_tail = 0;
+		if (rxq->rx_tail == 0)
+			I40E_PCI_REG_WRITE(rxq->qrx_tail, rxq->nb_rx_desc - 1);
+		else
+			I40E_PCI_REG_WRITE(rxq->qrx_tail, rxq->rx_tail - 1);
 	}
+
 	return ret;
 }
 
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 86546ca8e..777ffc215 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2606,6 +2606,7 @@ i40e_fdir_setup_rx_resources(struct i40e_pf *pf)
 	rxq->vsi = pf->fdir.fdir_vsi;
 
 	rxq->rx_ring_phys_addr = rte_mem_phy2mch(rz->memseg_id, rz->phys_addr);
+	memset(rz->addr, 0, I40E_FDIR_NUM_RX_DESC * sizeof(union i40e_rx_desc));
 	rxq->rx_ring = (union i40e_rx_desc *)rz->addr;
 
 	/*
-- 
2.14.2

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

* [dpdk-stable] patch 'keepalive: fix state alignment' has been queued to LTS release 16.11.5
  2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e: fix flow director Rx resource defect' " luca.boccassi
@ 2018-02-07 16:46   ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'eal/x86: use lock-prefixed instructions for SMP barrier' " luca.boccassi
                       ` (33 more replies)
  0 siblings, 34 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Andriy Berestovskyy; +Cc: Remy Horton, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 153b3ebc1da6a905b46c012c1ceff3d6d259ef00 Mon Sep 17 00:00:00 2001
From: Andriy Berestovskyy <aber@semihalf.com>
Date: Tue, 23 Jan 2018 16:43:16 +0100
Subject: [PATCH] keepalive: fix state alignment

[ upstream commit 462d9189374f582166ff77b8c301b89947d016cc ]

The __rte_cache_aligned was applied to the whole array,
not the array elements. This leads to a false sharing between
the monitored cores.

Fixes: e70a61ad50ab ("keepalive: export states")

Signed-off-by: Andriy Berestovskyy <aber@semihalf.com>
Acked-by: Remy Horton <remy.horton@intel.com>
---
 doc/guides/sample_app_ug/keep_alive.rst |  2 +-
 lib/librte_eal/common/rte_keepalive.c   | 28 ++++++++++++++++++----------
 2 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/doc/guides/sample_app_ug/keep_alive.rst b/doc/guides/sample_app_ug/keep_alive.rst
index 389737792..48769270e 100644
--- a/doc/guides/sample_app_ug/keep_alive.rst
+++ b/doc/guides/sample_app_ug/keep_alive.rst
@@ -186,5 +186,5 @@ The rte_keepalive_mark_alive function simply sets the core state to alive.
     static inline void
     rte_keepalive_mark_alive(struct rte_keepalive *keepcfg)
     {
-        keepcfg->state_flags[rte_lcore_id()] = ALIVE;
+        keepcfg->live_data[rte_lcore_id()].core_state = RTE_KA_STATE_ALIVE;
     }
diff --git a/lib/librte_eal/common/rte_keepalive.c b/lib/librte_eal/common/rte_keepalive.c
index 9765d1bd9..4625fab09 100644
--- a/lib/librte_eal/common/rte_keepalive.c
+++ b/lib/librte_eal/common/rte_keepalive.c
@@ -42,8 +42,12 @@
 
 struct rte_keepalive {
 	/** Core Liveness. */
-	enum rte_keepalive_state __rte_cache_aligned state_flags[
-		RTE_KEEPALIVE_MAXCORES];
+	struct {
+		/*
+		 * Each element must be cache aligned to prevent false sharing.
+		 */
+		enum rte_keepalive_state core_state __rte_cache_aligned;
+	} live_data[RTE_KEEPALIVE_MAXCORES];
 
 	/** Last-seen-alive timestamps */
 	uint64_t last_alive[RTE_KEEPALIVE_MAXCORES];
@@ -96,19 +100,22 @@ rte_keepalive_dispatch_pings(__rte_unused void *ptr_timer,
 		if (keepcfg->active_cores[idx_core] == 0)
 			continue;
 
-		switch (keepcfg->state_flags[idx_core]) {
+		switch (keepcfg->live_data[idx_core].core_state) {
 		case RTE_KA_STATE_UNUSED:
 			break;
 		case RTE_KA_STATE_ALIVE: /* Alive */
-			keepcfg->state_flags[idx_core] = RTE_KA_STATE_MISSING;
+			keepcfg->live_data[idx_core].core_state =
+			    RTE_KA_STATE_MISSING;
 			keepcfg->last_alive[idx_core] = rte_rdtsc();
 			break;
 		case RTE_KA_STATE_MISSING: /* MIA */
 			print_trace("Core MIA. ", keepcfg, idx_core);
-			keepcfg->state_flags[idx_core] = RTE_KA_STATE_DEAD;
+			keepcfg->live_data[idx_core].core_state =
+			    RTE_KA_STATE_DEAD;
 			break;
 		case RTE_KA_STATE_DEAD: /* Dead */
-			keepcfg->state_flags[idx_core] = RTE_KA_STATE_GONE;
+			keepcfg->live_data[idx_core].core_state =
+			    RTE_KA_STATE_GONE;
 			print_trace("Core died. ", keepcfg, idx_core);
 			if (keepcfg->callback)
 				keepcfg->callback(
@@ -119,7 +126,8 @@ rte_keepalive_dispatch_pings(__rte_unused void *ptr_timer,
 		case RTE_KA_STATE_GONE: /* Buried */
 			break;
 		case RTE_KA_STATE_DOZING: /* Core going idle */
-			keepcfg->state_flags[idx_core] = RTE_KA_STATE_SLEEP;
+			keepcfg->live_data[idx_core].core_state =
+			    RTE_KA_STATE_SLEEP;
 			keepcfg->last_alive[idx_core] = rte_rdtsc();
 			break;
 		case RTE_KA_STATE_SLEEP: /* Idled core */
@@ -129,7 +137,7 @@ rte_keepalive_dispatch_pings(__rte_unused void *ptr_timer,
 			keepcfg->relay_callback(
 				keepcfg->relay_callback_data,
 				idx_core,
-				keepcfg->state_flags[idx_core],
+				keepcfg->live_data[idx_core].core_state,
 				keepcfg->last_alive[idx_core]
 				);
 	}
@@ -173,11 +181,11 @@ rte_keepalive_register_core(struct rte_keepalive *keepcfg, const int id_core)
 void
 rte_keepalive_mark_alive(struct rte_keepalive *keepcfg)
 {
-	keepcfg->state_flags[rte_lcore_id()] = RTE_KA_STATE_ALIVE;
+	keepcfg->live_data[rte_lcore_id()].core_state = RTE_KA_STATE_ALIVE;
 }
 
 void
 rte_keepalive_mark_sleep(struct rte_keepalive *keepcfg)
 {
-	keepcfg->state_flags[rte_lcore_id()] = RTE_KA_STATE_DOZING;
+	keepcfg->live_data[rte_lcore_id()].core_state = RTE_KA_STATE_DOZING;
 }
-- 
2.14.2

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

* [dpdk-stable] patch 'eal/x86: use lock-prefixed instructions for SMP barrier' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'mbuf: fix NULL freeing when debug enabled' " luca.boccassi
                       ` (32 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 4b93724891bb8e1ee7c5c2e5e269728416595320 Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
Date: Mon, 15 Jan 2018 15:09:31 +0000
Subject: [PATCH] eal/x86: use lock-prefixed instructions for SMP barrier

[ upstream commit 096ffd811fe21d652e51f07a7859967ffaabc72c ]

On x86 it is possible to use lock-prefixed instructions to get
the similar effect as mfence.
As pointed by Java guys, on most modern HW that gives a better
performance than using mfence:
https://shipilev.net/blog/2014/on-the-fence-with-dependencies/
That patch adopts that technique for rte_smp_mb() implementation.
On BDW 2.2 mb_autotest on single lcore reports 2X cycle reduction,
i.e. from ~110 to ~55 cycles per operation.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 .../common/include/arch/x86/rte_atomic.h           | 44 +++++++++++++++++++++-
 1 file changed, 42 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/include/arch/x86/rte_atomic.h b/lib/librte_eal/common/include/arch/x86/rte_atomic.h
index 00b1cdf5d..d12b679a3 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_atomic.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_atomic.h
@@ -55,12 +55,52 @@ extern "C" {
 
 #define	rte_rmb() _mm_lfence()
 
-#define rte_smp_mb() rte_mb()
-
 #define rte_smp_wmb() rte_compiler_barrier()
 
 #define rte_smp_rmb() rte_compiler_barrier()
 
+/*
+ * From Intel Software Development Manual; Vol 3;
+ * 8.2.2 Memory Ordering in P6 and More Recent Processor Families:
+ * ...
+ * . Reads are not reordered with other reads.
+ * . Writes are not reordered with older reads.
+ * . Writes to memory are not reordered with other writes,
+ *   with the following exceptions:
+ *   . streaming stores (writes) executed with the non-temporal move
+ *     instructions (MOVNTI, MOVNTQ, MOVNTDQ, MOVNTPS, and MOVNTPD); and
+ *   . string operations (see Section 8.2.4.1).
+ *  ...
+ * . Reads may be reordered with older writes to different locations but not
+ * with older writes to the same location.
+ * . Reads or writes cannot be reordered with I/O instructions,
+ * locked instructions, or serializing instructions.
+ * . Reads cannot pass earlier LFENCE and MFENCE instructions.
+ * . Writes ... cannot pass earlier LFENCE, SFENCE, and MFENCE instructions.
+ * . LFENCE instructions cannot pass earlier reads.
+ * . SFENCE instructions cannot pass earlier writes ...
+ * . MFENCE instructions cannot pass earlier reads, writes ...
+ *
+ * As pointed by Java guys, that makes possible to use lock-prefixed
+ * instructions to get the same effect as mfence and on most modern HW
+ * that gives a better perfomance then using mfence:
+ * https://shipilev.net/blog/2014/on-the-fence-with-dependencies/
+ * Basic idea is to use lock prefixed add with some dummy memory location
+ * as the destination. From their experiments 128B(2 cache lines) below
+ * current stack pointer looks like a good candidate.
+ * So below we use that techinque for rte_smp_mb() implementation.
+ */
+
+static inline void __attribute__((always_inline))
+rte_smp_mb(void)
+{
+#ifdef RTE_ARCH_I686
+	asm volatile("lock addl $0, -128(%%esp); " ::: "memory");
+#else
+	asm volatile("lock addl $0, -128(%%rsp); " ::: "memory");
+#endif
+}
+
 /*------------------------- 16 bit atomic operations -------------------------*/
 
 #ifndef RTE_FORCE_INTRINSICS
-- 
2.14.2

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

* [dpdk-stable] patch 'mbuf: fix NULL freeing when debug enabled' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'eal/x86: use lock-prefixed instructions for SMP barrier' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'crypto/qat: fix null auth algo overwrite' " luca.boccassi
                       ` (31 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Keith Wiles, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 59286a230c19a32fa945407625873b4cdb144099 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Mon, 29 Jan 2018 10:39:23 +0100
Subject: [PATCH] mbuf: fix NULL freeing when debug enabled

[ upstream commit 9f8d9b2ee358c496fe206d1e6f111067afd501b3 ]

Do not panic when calling rte_pktmbuf_free(NULL) with mbuf debug
enabled, it is a valid operation.

Fixes: af75078fece3 ("first public release")

Reported-by: Keith Wiles <keith.wiles@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_mbuf/rte_mbuf.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 2de97a370..bc015d033 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -1233,13 +1233,14 @@ rte_pktmbuf_free_seg(struct rte_mbuf *m)
  * segment is added back into its original mempool.
  *
  * @param m
- *   The packet mbuf to be freed.
+ *   The packet mbuf to be freed. If NULL, the function does nothing.
  */
 static inline void rte_pktmbuf_free(struct rte_mbuf *m)
 {
 	struct rte_mbuf *m_next;
 
-	__rte_mbuf_sanity_check(m, 1);
+	if (m != NULL)
+		__rte_mbuf_sanity_check(m, 1);
 
 	while (m != NULL) {
 		m_next = m->next;
-- 
2.14.2

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

* [dpdk-stable] patch 'crypto/qat: fix null auth algo overwrite' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'eal/x86: use lock-prefixed instructions for SMP barrier' " luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'mbuf: fix NULL freeing when debug enabled' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/enic: fix crash due to static max number of queues' " luca.boccassi
                       ` (30 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Fiona Trahe; +Cc: Radu Nicolau, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 60c716b84bfa6566612e45bd1c93e36bab37e9dd Mon Sep 17 00:00:00 2001
From: Fiona Trahe <fiona.trahe@intel.com>
Date: Thu, 25 Jan 2018 17:19:14 +0000
Subject: [PATCH] crypto/qat: fix null auth algo overwrite

[ upstream commit 4e0955bddb0880949fb12de3a1a8f07eb9ace832 ]

If auth algorithm is RTE_CRYPTO_AUTH_NULL and digest_length is 0
in the xform and digest pointer is set in the op, then
the PMD may overwrite memory at the digest pointer.
With this patch the memory is not overwritten.

Fixes: db0e952a5c01 ("crypto/qat: add NULL capability")

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
---
 drivers/crypto/qat/qat_crypto.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/qat/qat_crypto.c b/drivers/crypto/qat/qat_crypto.c
index 8b830b80f..a9416790c 100644
--- a/drivers/crypto/qat/qat_crypto.c
+++ b/drivers/crypto/qat/qat_crypto.c
@@ -1085,8 +1085,9 @@ qat_write_hw_desc_entry(struct rte_crypto_op *op, uint8_t *out_msg)
 			ICP_QAT_FW_LA_DIGEST_IN_BUFFER_SET(
 					qat_req->comn_hdr.serv_specif_flags,
 					ICP_QAT_FW_LA_NO_DIGEST_IN_BUFFER);
-			auth_param->auth_res_addr =
-					op->sym->auth.digest.phys_addr;
+			if (likely(ctx->qat_hash_alg != ICP_QAT_HW_AUTH_ALGO_NULL))
+				auth_param->auth_res_addr =
+						op->sym->auth.digest.phys_addr;
 			digest_appended = 0;
 		}
 
-- 
2.14.2

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

* [dpdk-stable] patch 'net/enic: fix crash due to static max number of queues' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (2 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'crypto/qat: fix null auth algo overwrite' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/mlx5: fix missing RSS capability' " luca.boccassi
                       ` (29 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: John Daley, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 669981bf6861e1da3d120ac720a8e430267d1cbd Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim@cisco.com>
Date: Mon, 22 Jan 2018 17:05:28 -0800
Subject: [PATCH] net/enic: fix crash due to static max number of queues

[ upstream commit 6c45c330589d334c4f7b729e61ae30a6acfcc119 ]

ENIC_CQ_MAX, ENIC_WQ_MAX and others are arbitrary values that
prevent the app from using more queues when they are available on
hardware. Remove them and dynamically allocate vnic_cq and such
arrays to accommodate all available hardware queues.

As a side effect of removing ENIC_CQ_MAX, this commit fixes a segfault
that would happen when the app requests more than 16 CQs, because
enic_set_vnic_res() does not consider ENIC_CQ_MAX. For example, the
following command causes a crash.

testpmd -- --rxq=16 --txq=16

Fixes: ce93d3c36db0 ("net/enic: fix resource check failures when bonding devices")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic.h        | 26 +++++++++----------------
 drivers/net/enic/enic_ethdev.c | 18 ++----------------
 drivers/net/enic/enic_main.c   | 43 ++++++++++++++++++++++++++++++++----------
 3 files changed, 44 insertions(+), 43 deletions(-)

diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h
index a3d2a0fb5..46f20b2d6 100644
--- a/drivers/net/enic/enic.h
+++ b/drivers/net/enic/enic.h
@@ -53,14 +53,6 @@
 #define DRV_DESCRIPTION		"Cisco VIC Ethernet NIC Poll-mode Driver"
 #define DRV_COPYRIGHT		"Copyright 2008-2015 Cisco Systems, Inc"
 
-#define ENIC_WQ_MAX		8
-/* With Rx scatter support, we use two RQs on VIC per RQ used by app. Both
- * RQs use the same CQ.
- */
-#define ENIC_RQ_MAX		16
-#define ENIC_CQ_MAX		(ENIC_WQ_MAX + (ENIC_RQ_MAX / 2))
-#define ENIC_INTR_MAX		(ENIC_CQ_MAX + 2)
-
 #define VLAN_ETH_HLEN           18
 
 #define ENICPMD_SETTING(enic, f) ((enic->config.flags & VENETF_##f) ? 1 : 0)
@@ -139,17 +131,17 @@ struct enic {
 	unsigned int flags;
 	unsigned int priv_flags;
 
-	/* work queue */
-	struct vnic_wq wq[ENIC_WQ_MAX];
-	unsigned int wq_count;
+	/* work queue (len = conf_wq_count) */
+	struct vnic_wq *wq;
+	unsigned int wq_count; /* equals eth_dev nb_tx_queues */
 
-	/* receive queue */
-	struct vnic_rq rq[ENIC_RQ_MAX];
-	unsigned int rq_count;
+	/* receive queue (len = conf_rq_count) */
+	struct vnic_rq *rq;
+	unsigned int rq_count; /* equals eth_dev nb_rx_queues */
 
-	/* completion queue */
-	struct vnic_cq cq[ENIC_CQ_MAX];
-	unsigned int cq_count;
+	/* completion queue (len = conf_cq_count) */
+	struct vnic_cq *cq;
+	unsigned int cq_count; /* equals rq_count + wq_count */
 
 	/* interrupt resource */
 	struct vnic_intr intr;
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 2b154ec24..17479d4d3 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -184,13 +184,7 @@ static int enicpmd_dev_tx_queue_setup(struct rte_eth_dev *eth_dev,
 	struct enic *enic = pmd_priv(eth_dev);
 
 	ENICPMD_FUNC_TRACE();
-	if (queue_idx >= ENIC_WQ_MAX) {
-		dev_err(enic,
-			"Max number of TX queues exceeded.  Max is %d\n",
-			ENIC_WQ_MAX);
-		return -EINVAL;
-	}
-
+	RTE_ASSERT(queue_idx < enic->conf_wq_count);
 	eth_dev->data->tx_queues[queue_idx] = (void *)&enic->wq[queue_idx];
 
 	ret = enic_alloc_wq(enic, queue_idx, socket_id, nb_desc);
@@ -302,16 +296,8 @@ static int enicpmd_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
 	struct enic *enic = pmd_priv(eth_dev);
 
 	ENICPMD_FUNC_TRACE();
-	/* With Rx scatter support, two RQs are now used on VIC per RQ used
-	 * by the application.
-	 */
-	if (queue_idx * 2 >= ENIC_RQ_MAX) {
-		dev_err(enic,
-			"Max number of RX queues exceeded.  Max is %d. This PMD uses 2 RQs on VIC per RQ used by DPDK.\n",
-			ENIC_RQ_MAX);
-		return -EINVAL;
-	}
 
+	RTE_ASSERT(enic_rte_rq_idx_to_sop_idx(queue_idx) < enic->conf_rq_count);
 	eth_dev->data->rx_queues[queue_idx] =
 		(void *)&enic->rq[enic_rte_rq_idx_to_sop_idx(queue_idx)];
 
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index b25eff4f1..63d0c50d6 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1080,6 +1080,9 @@ static void enic_dev_deinit(struct enic *enic)
 	vnic_dev_notify_unset(enic->vdev);
 
 	rte_free(eth_dev->data->mac_addrs);
+	rte_free(enic->cq);
+	rte_free(enic->rq);
+	rte_free(enic->wq);
 }
 
 
@@ -1087,27 +1090,28 @@ int enic_set_vnic_res(struct enic *enic)
 {
 	struct rte_eth_dev *eth_dev = enic->rte_dev;
 	int rc = 0;
+	unsigned int required_rq, required_wq, required_cq;
 
-	/* With Rx scatter support, two RQs are now used per RQ used by
-	 * the application.
-	 */
-	if (enic->conf_rq_count < eth_dev->data->nb_rx_queues) {
+	/* Always use two vNIC RQs per eth_dev RQ, regardless of Rx scatter. */
+	required_rq = eth_dev->data->nb_rx_queues * 2;
+	required_wq = eth_dev->data->nb_tx_queues;
+	required_cq = eth_dev->data->nb_rx_queues + eth_dev->data->nb_tx_queues;
+
+	if (enic->conf_rq_count < required_rq) {
 		dev_err(dev, "Not enough Receive queues. Requested:%u which uses %d RQs on VIC, Configured:%u\n",
 			eth_dev->data->nb_rx_queues,
-			eth_dev->data->nb_rx_queues * 2, enic->conf_rq_count);
+			required_rq, enic->conf_rq_count);
 		rc = -EINVAL;
 	}
-	if (enic->conf_wq_count < eth_dev->data->nb_tx_queues) {
+	if (enic->conf_wq_count < required_wq) {
 		dev_err(dev, "Not enough Transmit queues. Requested:%u, Configured:%u\n",
 			eth_dev->data->nb_tx_queues, enic->conf_wq_count);
 		rc = -EINVAL;
 	}
 
-	if (enic->conf_cq_count < (eth_dev->data->nb_rx_queues +
-				   eth_dev->data->nb_tx_queues)) {
+	if (enic->conf_cq_count < required_cq) {
 		dev_err(dev, "Not enough Completion queues. Required:%u, Configured:%u\n",
-			(eth_dev->data->nb_rx_queues +
-			 eth_dev->data->nb_tx_queues), enic->conf_cq_count);
+			required_cq, enic->conf_cq_count);
 		rc = -EINVAL;
 	}
 
@@ -1309,6 +1313,25 @@ static int enic_dev_init(struct enic *enic)
 		dev_err(enic, "See the ENIC PMD guide for more information.\n");
 		return -EINVAL;
 	}
+	/* Queue counts may be zeros. rte_zmalloc returns NULL in that case. */
+	enic->cq = rte_zmalloc("enic_vnic_cq", sizeof(struct vnic_cq) *
+			       enic->conf_cq_count, 8);
+	enic->rq = rte_zmalloc("enic_vnic_rq", sizeof(struct vnic_rq) *
+			       enic->conf_rq_count, 8);
+	enic->wq = rte_zmalloc("enic_vnic_wq", sizeof(struct vnic_wq) *
+			       enic->conf_wq_count, 8);
+	if (enic->conf_cq_count > 0 && enic->cq == NULL) {
+		dev_err(enic, "failed to allocate vnic_cq, aborting.\n");
+		return -1;
+	}
+	if (enic->conf_rq_count > 0 && enic->rq == NULL) {
+		dev_err(enic, "failed to allocate vnic_rq, aborting.\n");
+		return -1;
+	}
+	if (enic->conf_wq_count > 0 && enic->wq == NULL) {
+		dev_err(enic, "failed to allocate vnic_wq, aborting.\n");
+		return -1;
+	}
 
 	/* Get the supported filters */
 	enic_fdir_info(enic);
-- 
2.14.2

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

* [dpdk-stable] patch 'net/mlx5: fix missing RSS capability' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (3 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/enic: fix crash due to static max number of queues' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/ena: do not set Tx L4 offloads in Rx path' " luca.boccassi
                       ` (28 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Shahaf Shuler; +Cc: Yongseok Koh, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 1a17e82544bc36b604a53b48a6212e86c0c03460 Mon Sep 17 00:00:00 2001
From: Shahaf Shuler <shahafs@mellanox.com>
Date: Mon, 22 Jan 2018 22:52:14 +0200
Subject: [PATCH] net/mlx5: fix missing RSS capability

[ upstream commit b233b027490b858f740a75fac19632a25d3aefdd ]

The PMD was not reporting the supported RSS capabilities.

Fixes: 2f97422e7759 ("mlx5: support RSS hash update and get")

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index c7822835d..fa5164c98 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -658,6 +658,7 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
 			       (*priv->rss_conf)[0]->rss_key_len :
 			       0);
 	info->speed_capa = priv->link_speed_capa;
+	info->flow_type_rss_offloads = ~MLX5_RSS_HF_MASK;
 	priv_unlock(priv);
 }
 
-- 
2.14.2

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

* [dpdk-stable] patch 'net/ena: do not set Tx L4 offloads in Rx path' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (4 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/mlx5: fix missing RSS capability' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/virtio: fix Rx and Tx handler selection for ARM32' " luca.boccassi
                       ` (27 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Rafal Kozik; +Cc: Matthew Smith, Michal Krawczyk, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 4eb2722d0fe6d4222c543948e357eff6da85d22d Mon Sep 17 00:00:00 2001
From: Rafal Kozik <rk@semihalf.com>
Date: Thu, 25 Jan 2018 16:27:43 +0100
Subject: [PATCH] net/ena: do not set Tx L4 offloads in Rx path

[ upstream commit fd617795679019c7aea5ab1e8c85db02cf53f169 ]

Information about received packet type detected by NIC should be
stored in packet_type field of rte_mbuf. TX L4 offload flags should
not be set in RX path. Only fields that could be set in of_flags
during packet receiving are information if L4 and L3 checksum is
correct.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")

Reported-by: Matthew Smith <mgsmith@netgate.com>
Signed-off-by: Rafal Kozik <rk@semihalf.com>
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
---
 drivers/net/ena/ena_ethdev.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 6efe0c3c6..63c423627 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -248,16 +248,17 @@ static inline void ena_rx_mbuf_prepare(struct rte_mbuf *mbuf,
 				       struct ena_com_rx_ctx *ena_rx_ctx)
 {
 	uint64_t ol_flags = 0;
+	uint32_t packet_type = 0;
 
 	if (ena_rx_ctx->l4_proto == ENA_ETH_IO_L4_PROTO_TCP)
-		ol_flags |= PKT_TX_TCP_CKSUM;
+		packet_type |= RTE_PTYPE_L4_TCP;
 	else if (ena_rx_ctx->l4_proto == ENA_ETH_IO_L4_PROTO_UDP)
-		ol_flags |= PKT_TX_UDP_CKSUM;
+		packet_type |= RTE_PTYPE_L4_UDP;
 
 	if (ena_rx_ctx->l3_proto == ENA_ETH_IO_L3_PROTO_IPV4)
-		ol_flags |= PKT_TX_IPV4;
+		packet_type |= RTE_PTYPE_L3_IPV4;
 	else if (ena_rx_ctx->l3_proto == ENA_ETH_IO_L3_PROTO_IPV6)
-		ol_flags |= PKT_TX_IPV6;
+		packet_type |= RTE_PTYPE_L3_IPV6;
 
 	if (unlikely(ena_rx_ctx->l4_csum_err))
 		ol_flags |= PKT_RX_L4_CKSUM_BAD;
@@ -265,6 +266,7 @@ static inline void ena_rx_mbuf_prepare(struct rte_mbuf *mbuf,
 		ol_flags |= PKT_RX_IP_CKSUM_BAD;
 
 	mbuf->ol_flags = ol_flags;
+	mbuf->packet_type = packet_type;
 }
 
 static inline void ena_tx_mbuf_prepare(struct rte_mbuf *mbuf,
-- 
2.14.2

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

* [dpdk-stable] patch 'net/virtio: fix Rx and Tx handler selection for ARM32' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (5 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/ena: do not set Tx L4 offloads in Rx path' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/virtio: fix queue flushing with vector Rx enabled' " luca.boccassi
                       ` (26 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Samuel Gauthier; +Cc: Maxime Coquelin, Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 8abd4cdffa5c9b3f87189eb74906e0a86a28d0a9 Mon Sep 17 00:00:00 2001
From: Samuel Gauthier <samuel.gauthier@6wind.com>
Date: Thu, 14 Dec 2017 15:32:13 +0100
Subject: [PATCH] net/virtio: fix Rx and Tx handler selection for ARM32

[ upstream commit 8f3d451dff2b91eb6c7636e92794c2b256267f8e ]

On arm32, we were always selecting the simple handler, but it is only
available if neon is present.

This is due to a typo in the name of the config option.
CONFIG_RTE_ARCH_ARM is for Makefiles. One should use RTE_ARCH_ARM.

Fixes: 2d7c37194ee4 ("net/virtio: add NEON based Rx handler")

Signed-off-by: Samuel Gauthier <samuel.gauthier@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
 drivers/net/virtio/virtio_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 43fac63b6..285af8a37 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -506,7 +506,7 @@ virtio_update_rxtx_handler(struct rte_eth_dev *dev,
 #if defined RTE_ARCH_X86
 	if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_SSE3))
 		use_simple_rxtx = 1;
-#elif defined RTE_ARCH_ARM64 || defined CONFIG_RTE_ARCH_ARM
+#elif defined RTE_ARCH_ARM64 || defined RTE_ARCH_ARM
 	if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_NEON))
 		use_simple_rxtx = 1;
 #endif
-- 
2.14.2

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

* [dpdk-stable] patch 'net/virtio: fix queue flushing with vector Rx enabled' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (6 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/virtio: fix Rx and Tx handler selection for ARM32' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/virtio: fix memory leak when reinitializing device' " luca.boccassi
                       ` (25 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 4e276c4a94a6f4fd83af2b26f483e6a124304a33 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Tue, 23 Jan 2018 16:54:40 +0100
Subject: [PATCH] net/virtio: fix queue flushing with vector Rx enabled

[ upstream commit e67ae1e27e27b0fce9974dbf1b5bc6adff27a213 ]

When using vector Rx mode (use_simple_rx = 1), vq->vq_descx[] is not
kept up to date. To properly detach the mbufs in this case, browse
sw_ring[] instead, as it's done in virtqueue_rxvq_flush().

Since we need virtio_get_queue_type(), also move this function in
virtqueue.h as a static inline.

Fixes: fc3d66212fed ("virtio: add vector Rx")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
 drivers/net/virtio/virtio_ethdev.c | 11 -----------
 drivers/net/virtio/virtqueue.c     | 28 +++++++++++++++++++++++++---
 drivers/net/virtio/virtqueue.h     | 11 +++++++++++
 3 files changed, 36 insertions(+), 14 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 4d6efd5ac..7e2965549 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -288,17 +288,6 @@ virtio_dev_queue_release(void *queue __rte_unused)
 	/* do nothing */
 }
 
-static int
-virtio_get_queue_type(struct virtio_hw *hw, uint16_t vtpci_queue_idx)
-{
-	if (vtpci_queue_idx == hw->max_queue_pairs * 2)
-		return VTNET_CQ;
-	else if (vtpci_queue_idx % 2 == 0)
-		return VTNET_RQ;
-	else
-		return VTNET_TQ;
-}
-
 static uint16_t
 virtio_get_nr_vq(struct virtio_hw *hw)
 {
diff --git a/drivers/net/virtio/virtqueue.c b/drivers/net/virtio/virtqueue.c
index 0e24194a5..510d746ca 100644
--- a/drivers/net/virtio/virtqueue.c
+++ b/drivers/net/virtio/virtqueue.c
@@ -59,16 +59,38 @@ struct rte_mbuf *
 virtqueue_detatch_unused(struct virtqueue *vq)
 {
 	struct rte_mbuf *cookie;
-	int idx;
+	struct virtio_hw *hw;
+	uint16_t start, end;
+	int type, idx;
 
-	if (vq != NULL)
-		for (idx = 0; idx < vq->vq_nentries; idx++) {
+	if (vq == NULL)
+		return NULL;
+
+	hw = vq->hw;
+	type = virtio_get_queue_type(hw, vq->vq_queue_index);
+	start = vq->vq_avail_idx & (vq->vq_nentries - 1);
+	end = (vq->vq_avail_idx + vq->vq_free_cnt) & (vq->vq_nentries - 1);
+
+	for (idx = 0; idx < vq->vq_nentries; idx++) {
+		if (hw->use_simple_rxtx && type == VTNET_RQ) {
+			if (start <= end && idx >= start && idx < end)
+				continue;
+			if (start > end && (idx >= start || idx < end))
+				continue;
+			cookie = vq->sw_ring[idx];
+			if (cookie != NULL) {
+				vq->sw_ring[idx] = NULL;
+				return cookie;
+			}
+		} else {
 			cookie = vq->vq_descx[idx].cookie;
 			if (cookie != NULL) {
 				vq->vq_descx[idx].cookie = NULL;
 				return cookie;
 			}
 		}
+	}
+
 	return NULL;
 }
 
diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
index 421485473..949cbe156 100644
--- a/drivers/net/virtio/virtqueue.h
+++ b/drivers/net/virtio/virtqueue.h
@@ -299,6 +299,17 @@ virtqueue_full(const struct virtqueue *vq)
 	return vq->vq_free_cnt == 0;
 }
 
+static inline int
+virtio_get_queue_type(struct virtio_hw *hw, uint16_t vtpci_queue_idx)
+{
+	if (vtpci_queue_idx == hw->max_queue_pairs * 2)
+		return VTNET_CQ;
+	else if (vtpci_queue_idx % 2 == 0)
+		return VTNET_RQ;
+	else
+		return VTNET_TQ;
+}
+
 #define VIRTQUEUE_NUSED(vq) ((uint16_t)((vq)->vq_ring.used->idx - (vq)->vq_used_cons_idx))
 
 void vq_ring_free_chain(struct virtqueue *vq, uint16_t desc_idx);
-- 
2.14.2

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

* [dpdk-stable] patch 'net/virtio: fix memory leak when reinitializing device' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (7 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/virtio: fix queue flushing with vector Rx enabled' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/virtio: fix typo in function name' " luca.boccassi
                       ` (24 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Zijie Pan, Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 54d790b8897b211962cd764e92275cf0f8b02b9d Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Tue, 23 Jan 2018 16:54:41 +0100
Subject: [PATCH] net/virtio: fix memory leak when reinitializing device

[ upstream commit 3669a1af893088064778f14fba0c2ca88819e095 ]

Free the previous queues and the attached mbufs before initializing new
ones.

The function virtio_dev_free_mbufs() is now called when reconfiguring the
device, so we also need to add a check to ensure that it won't crash for
uninitialized queues.

Fixes: 60e6f4707ef2 ("net/virtio: reinitialize device when configuring")

Signed-off-by: Zijie Pan <zijie.pan@6wind.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
 drivers/net/virtio/virtio_ethdev.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 7e2965549..5daa611e4 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1194,6 +1194,11 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
 	/* Reset the device although not necessary at startup */
 	vtpci_reset(hw);
 
+	if (hw->vqs) {
+		virtio_dev_free_mbufs(eth_dev);
+		virtio_free_queues(hw);
+	}
+
 	/* Tell the host we've noticed this device. */
 	vtpci_set_status(hw, VIRTIO_CONFIG_STATUS_ACK);
 
@@ -1586,6 +1591,9 @@ static void virtio_dev_free_mbufs(struct rte_eth_dev *dev)
 	for (i = 0; i < dev->data->nb_rx_queues; i++) {
 		struct virtnet_rx *rxvq = dev->data->rx_queues[i];
 
+		if (rxvq == NULL || rxvq->vq == NULL)
+			continue;
+
 		PMD_INIT_LOG(DEBUG,
 			     "Before freeing rxq[%d] used and unused buf", i);
 		VIRTQUEUE_DUMP(rxvq->vq);
@@ -1605,6 +1613,9 @@ static void virtio_dev_free_mbufs(struct rte_eth_dev *dev)
 	for (i = 0; i < dev->data->nb_tx_queues; i++) {
 		struct virtnet_tx *txvq = dev->data->tx_queues[i];
 
+		if (txvq == NULL || txvq->vq == NULL)
+			continue;
+
 		PMD_INIT_LOG(DEBUG,
 			     "Before freeing txq[%d] used and unused bufs",
 			     i);
-- 
2.14.2

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

* [dpdk-stable] patch 'net/virtio: fix typo in function name' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (8 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/virtio: fix memory leak when reinitializing device' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/i40e: fix VF Rx interrupt enabling' " luca.boccassi
                       ` (23 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 213a89a2b5ad59f0c8cb80fbd0bfbb1b05e090a2 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Tue, 23 Jan 2018 16:54:43 +0100
Subject: [PATCH] net/virtio: fix typo in function name

[ upstream commit 727411f50ae33c5e318f3c9579c9cdd56eb2a5be ]

Fixes: c1f86306a026 ("virtio: add new driver")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
 drivers/net/virtio/virtio_ethdev.c | 4 ++--
 drivers/net/virtio/virtqueue.c     | 2 +-
 drivers/net/virtio/virtqueue.h     | 2 +-
 drivers/net/xenvirt/virtqueue.h    | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 5daa611e4..5a27ab772 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1599,7 +1599,7 @@ static void virtio_dev_free_mbufs(struct rte_eth_dev *dev)
 		VIRTQUEUE_DUMP(rxvq->vq);
 
 		PMD_INIT_LOG(DEBUG, "rx_queues[%d]=%p", i, rxvq);
-		while ((buf = virtqueue_detatch_unused(rxvq->vq)) != NULL) {
+		while ((buf = virtqueue_detach_unused(rxvq->vq)) != NULL) {
 			rte_pktmbuf_free(buf);
 			mbuf_num++;
 		}
@@ -1622,7 +1622,7 @@ static void virtio_dev_free_mbufs(struct rte_eth_dev *dev)
 		VIRTQUEUE_DUMP(txvq->vq);
 
 		mbuf_num = 0;
-		while ((buf = virtqueue_detatch_unused(txvq->vq)) != NULL) {
+		while ((buf = virtqueue_detach_unused(txvq->vq)) != NULL) {
 			rte_pktmbuf_free(buf);
 			mbuf_num++;
 		}
diff --git a/drivers/net/virtio/virtqueue.c b/drivers/net/virtio/virtqueue.c
index 510d746ca..0e9e03c74 100644
--- a/drivers/net/virtio/virtqueue.c
+++ b/drivers/net/virtio/virtqueue.c
@@ -56,7 +56,7 @@ virtqueue_disable_intr(struct virtqueue *vq)
  * 2) mbuf that hasn't been consued by backend.
  */
 struct rte_mbuf *
-virtqueue_detatch_unused(struct virtqueue *vq)
+virtqueue_detach_unused(struct virtqueue *vq)
 {
 	struct rte_mbuf *cookie;
 	struct virtio_hw *hw;
diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
index 949cbe156..3748f6063 100644
--- a/drivers/net/virtio/virtqueue.h
+++ b/drivers/net/virtio/virtqueue.h
@@ -288,7 +288,7 @@ void virtqueue_dump(struct virtqueue *vq);
 /**
  *  Get all mbufs to be freed.
  */
-struct rte_mbuf *virtqueue_detatch_unused(struct virtqueue *vq);
+struct rte_mbuf *virtqueue_detach_unused(struct virtqueue *vq);
 
 /* Flush the elements in the used ring. */
 void virtqueue_rxvq_flush(struct virtqueue *vq);
diff --git a/drivers/net/xenvirt/virtqueue.h b/drivers/net/xenvirt/virtqueue.h
index 350eae3ec..0a6dcd853 100644
--- a/drivers/net/xenvirt/virtqueue.h
+++ b/drivers/net/xenvirt/virtqueue.h
@@ -121,7 +121,7 @@ void virtqueue_dump(struct virtqueue *vq);
 /**
  *  Get all mbufs to be freed.
  */
-struct rte_mbuf * virtqueue_detatch_unused(struct virtqueue *vq);
+struct rte_mbuf * virtqueue_detach_unused(struct virtqueue *vq);
 
 static inline int __attribute__((always_inline))
 virtqueue_full(const struct virtqueue *vq)
-- 
2.14.2

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

* [dpdk-stable] patch 'net/i40e: fix VF Rx interrupt enabling' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (9 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/virtio: fix typo in function name' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/ixgbe: " luca.boccassi
                       ` (22 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Wenzhuo Lu; +Cc: Helin Zhang, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 4fc9c11434ee05515e7b68a3833f664d50e3ea65 Mon Sep 17 00:00:00 2001
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
Date: Wed, 24 Jan 2018 16:16:50 +0800
Subject: [PATCH] net/i40e: fix VF Rx interrupt enabling

[ upstream commit 4ae1d081fb75e045e0c6b9e774647056715cd204 ]

When using UIO, after enabling the interrupt to get the PF
message, VF RX queue interrupt is not working.
It's expected, as UIO doesn't support multiple interrupt.
So, PMD should not try to enable RX queue interrupt. Then
APP can know the RX queue interrupt is not enabled and only
choose the polling mode.

Fixes: ae19955e7c86 ("i40evf: support reporting PF reset")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 78e5866af..b19224d96 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2115,7 +2115,8 @@ i40evf_dev_start(struct rte_eth_dev *dev)
 					dev->data->nb_tx_queues);
 
 	/* check and configure queue intr-vector mapping */
-	if (dev->data->dev_conf.intr_conf.rxq != 0) {
+	if (rte_intr_cap_multiple(intr_handle) &&
+	    dev->data->dev_conf.intr_conf.rxq) {
 		intr_vector = dev->data->nb_rx_queues;
 		if (rte_intr_efd_enable(intr_handle, intr_vector))
 			return -1;
-- 
2.14.2

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

* [dpdk-stable] patch 'net/ixgbe: fix VF Rx interrupt enabling' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (10 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/i40e: fix VF Rx interrupt enabling' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/e1000: " luca.boccassi
                       ` (21 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Wenzhuo Lu; +Cc: Helin Zhang, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From da4642007ccda1180b26b99f284cf5d11e199d86 Mon Sep 17 00:00:00 2001
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
Date: Wed, 24 Jan 2018 16:16:51 +0800
Subject: [PATCH] net/ixgbe: fix VF Rx interrupt enabling

[ upstream commit 8d1f13f96ce3cb4167244f928f6cb9574f561560 ]

When using UIO, after enabling the interrupt to get the PF
message, VF RX queue interrupt is not working.
It's expected, as UIO doesn't support multiple interrupt.
So, PMD should not try to enable RX queue interrupt. Then
APP can know the RX queue interrupt is not enabled and only
choose the polling mode.

Fixes: 77234603fba0 ("net/ixgbe: support VF mailbox interrupt for link up/down")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index f870069a7..941195b8e 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4235,7 +4235,8 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
 	ixgbevf_dev_rxtx_start(dev);
 
 	/* check and configure queue intr-vector mapping */
-	if (dev->data->dev_conf.intr_conf.rxq != 0) {
+	if (rte_intr_cap_multiple(intr_handle) &&
+	    dev->data->dev_conf.intr_conf.rxq != 0) {
 		intr_vector = dev->data->nb_rx_queues;
 		if (rte_intr_efd_enable(intr_handle, intr_vector))
 			return -1;
-- 
2.14.2

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

* [dpdk-stable] patch 'net/e1000: fix VF Rx interrupt enabling' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (11 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/ixgbe: " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/bnxt: fix size of Tx ring in HW' " luca.boccassi
                       ` (20 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Wenzhuo Lu; +Cc: Helin Zhang, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From e902730603ae884b6c13f17660a4d4cdaf9b1c2a Mon Sep 17 00:00:00 2001
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
Date: Wed, 24 Jan 2018 16:16:52 +0800
Subject: [PATCH] net/e1000: fix VF Rx interrupt enabling

[ upstream commit 61c1f1b7910711922d2c66c9e722d7f1f08eb663 ]

When using UIO, after enabling the interrupt to get the PF
message, VF RX queue interrupt is not working.
It's expected, as UIO doesn't support multiple interrupt.
So, PMD should not try to enable RX queue interrupt. Then
APP can know the RX queue interrupt is not enabled and only
choose the polling mode.

Fixes: 316f4f1adc2e ("net/igb: support VF mailbox interrupt for link up/down")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/e1000/igb_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 3c85aff3d..5108ff351 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -3090,7 +3090,8 @@ igbvf_dev_start(struct rte_eth_dev *dev)
 	}
 
 	/* check and configure queue intr-vector mapping */
-	if (dev->data->dev_conf.intr_conf.rxq != 0) {
+	if (rte_intr_cap_multiple(intr_handle) &&
+	    dev->data->dev_conf.intr_conf.rxq) {
 		intr_vector = dev->data->nb_rx_queues;
 		ret = rte_intr_efd_enable(intr_handle, intr_vector);
 		if (ret)
-- 
2.14.2

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

* [dpdk-stable] patch 'net/bnxt: fix size of Tx ring in HW' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (12 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/e1000: " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/qede/base: fix VF LRO tunnel configuration' " luca.boccassi
                       ` (19 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 2d84edbe49ac36d94c87598345ab330fa5e17f9a Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Fri, 26 Jan 2018 09:31:54 -0800
Subject: [PATCH] net/bnxt: fix size of Tx ring in HW

[ upstream commit c771d289cb6295dd0d4abd37cc1689f0bc87cfcb ]

During Tx ring allocation, the actual ring size configured in the HW
ends up being twice the number of txd parameter specified to the driver.
The power of 2 ring size wrongly adds a +1 while sending the ring
create command to the FW.

Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_txr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 4518538f7..9cd44a93c 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -101,7 +101,7 @@ int bnxt_init_tx_ring_struct(struct bnxt_tx_queue *txq, unsigned int socket_id)
 	if (ring == NULL)
 		return -ENOMEM;
 	txr->tx_ring_struct = ring;
-	ring->ring_size = rte_align32pow2(txq->nb_tx_desc + 1);
+	ring->ring_size = rte_align32pow2(txq->nb_tx_desc);
 	ring->ring_mask = ring->ring_size - 1;
 	ring->bd = (void *)txr->tx_desc_ring;
 	ring->bd_dma = txr->tx_desc_mapping;
-- 
2.14.2

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

* [dpdk-stable] patch 'net/qede/base: fix VF LRO tunnel configuration' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (13 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/bnxt: fix size of Tx ring in HW' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'eal/ppc: remove the braces in memory barrier macros' " luca.boccassi
                       ` (18 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Harish Patil; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From fb0ceb09ac56fc8f56832c1f1bbdf0f54894481c Mon Sep 17 00:00:00 2001
From: Harish Patil <harish.patil@cavium.com>
Date: Sat, 27 Jan 2018 13:15:25 -0800
Subject: [PATCH] net/qede/base: fix VF LRO tunnel configuration

[ upstream commit 92bed231a0da88e43b480c7d6700592a06131404 ]

Add missing LRO tunnel configuration parameters for VF over sriov channel.

Fixes: ec94dbc57362 ("qede: add base driver")

Signed-off-by: Harish Patil <harish.patil@cavium.com>
---
 drivers/net/qede/base/ecore_vf.c      | 6 ++++++
 drivers/net/qede/base/ecore_vfpf_if.h | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/drivers/net/qede/base/ecore_vf.c b/drivers/net/qede/base/ecore_vf.c
index 5ff8f28a4..de0c5877e 100644
--- a/drivers/net/qede/base/ecore_vf.c
+++ b/drivers/net/qede/base/ecore_vf.c
@@ -1027,6 +1027,12 @@ ecore_vf_pf_vport_update(struct ecore_hwfn *p_hwfn,
 		if (sge_tpa_params->tpa_gro_consistent_flg)
 			p_sge_tpa_tlv->sge_tpa_flags |=
 			    VFPF_TPA_GRO_CONSIST_FLAG;
+		if (sge_tpa_params->tpa_ipv4_tunn_en_flg)
+			p_sge_tpa_tlv->sge_tpa_flags |=
+			    VFPF_TPA_TUNN_IPV4_EN_FLAG;
+		if (sge_tpa_params->tpa_ipv6_tunn_en_flg)
+			p_sge_tpa_tlv->sge_tpa_flags |=
+			    VFPF_TPA_TUNN_IPV6_EN_FLAG;
 
 		p_sge_tpa_tlv->tpa_max_aggs_num =
 		    sge_tpa_params->tpa_max_aggs_num;
diff --git a/drivers/net/qede/base/ecore_vfpf_if.h b/drivers/net/qede/base/ecore_vfpf_if.h
index 149d092b9..cc835d768 100644
--- a/drivers/net/qede/base/ecore_vfpf_if.h
+++ b/drivers/net/qede/base/ecore_vfpf_if.h
@@ -379,6 +379,8 @@ struct vfpf_vport_update_sge_tpa_tlv {
 	#define VFPF_TPA_PKT_SPLIT_FLAG      (1 << 2)
 	#define VFPF_TPA_HDR_DATA_SPLIT_FLAG (1 << 3)
 	#define VFPF_TPA_GRO_CONSIST_FLAG    (1 << 4)
+	#define VFPF_TPA_TUNN_IPV4_EN_FLAG   (1 << 5)
+	#define VFPF_TPA_TUNN_IPV6_EN_FLAG   (1 << 6)
 
 	u8			update_sge_tpa_flags;
 	#define VFPF_UPDATE_SGE_DEPRECATED_FLAG	   (1 << 0)
-- 
2.14.2

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

* [dpdk-stable] patch 'eal/ppc: remove the braces in memory barrier macros' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (14 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/qede/base: fix VF LRO tunnel configuration' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'mk: support renamed Makefile in external project' " luca.boccassi
                       ` (17 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 31f13165af00c0cd118565274ef26d1d2b70f941 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Date: Tue, 30 Jan 2018 16:23:18 +0530
Subject: [PATCH] eal/ppc: remove the braces in memory barrier macros

[ upstream commit 257515a50057fa97605cc13e5b3b9cc9f964c299 ]

Calling rte_smp_{w/r}mb macro expands into a compound block, which
would break compiling a else clause following it, if that calling
place has been terminated already with ";", as in below code.
This patch adds { } around this macro to allow compiling else too.

Fixes: d23a6bd04d ("eal/ppc: fix memory barrier for IBM POWER")
Fixes: 05c3fd7110 ("eal/ppc: atomic operations for IBM Power")

Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
---
 lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h b/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h
index fb4fccb48..37f5eff20 100644
--- a/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h
+++ b/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h
@@ -64,9 +64,9 @@ extern "C" {
  * occur before the STORE operations generated after.
  */
 #ifdef RTE_ARCH_64
-#define	rte_wmb() {asm volatile("lwsync" : : : "memory"); }
+#define	rte_wmb() asm volatile("lwsync" : : : "memory")
 #else
-#define	rte_wmb() {asm volatile("sync" : : : "memory"); }
+#define	rte_wmb() asm volatile("sync" : : : "memory")
 #endif
 
 /**
@@ -76,9 +76,9 @@ extern "C" {
  * occur before the LOAD operations generated after.
  */
 #ifdef RTE_ARCH_64
-#define	rte_rmb() {asm volatile("lwsync" : : : "memory"); }
+#define	rte_rmb() asm volatile("lwsync" : : : "memory")
 #else
-#define	rte_rmb() {asm volatile("sync" : : : "memory"); }
+#define	rte_rmb() asm volatile("sync" : : : "memory")
 #endif
 
 #define rte_smp_mb() rte_mb()
-- 
2.14.2

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

* [dpdk-stable] patch 'mk: support renamed Makefile in external project' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (15 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'eal/ppc: remove the braces in memory barrier macros' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/ixgbe: fix reset error handling' " luca.boccassi
                       ` (16 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Marko Kovacevic; +Cc: Vipin Varghese, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From b5e9cf29037490cf9084424080b16c3899c342e6 Mon Sep 17 00:00:00 2001
From: Marko Kovacevic <marko.kovacevic@intel.com>
Date: Mon, 22 Jan 2018 10:59:05 +0000
Subject: [PATCH] mk: support renamed Makefile in external project

[ upstream commit 3a5c339d51a4846ee95a848bf493b7fcc80819dc ]

The build system made a recursive call to "make" after
creating the build directory. This recursive call used
the hard-coded filename "Makefile", which prevented
builds from working if the file was renamed and make
called using "make -f". Taking the filename from
MAKEFILES_LIST make variable fixes this.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: Vipin Varghese <vipin.varghese@intel.com>
---
 mk/internal/rte.extvars.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mk/internal/rte.extvars.mk b/mk/internal/rte.extvars.mk
index e2462fd2a..723c01530 100644
--- a/mk/internal/rte.extvars.mk
+++ b/mk/internal/rte.extvars.mk
@@ -48,7 +48,7 @@ ifeq ("$(origin M)", "command line")
 RTE_EXTMK := $(abspath $(M))
 endif
 endif
-RTE_EXTMK ?= $(RTE_SRCDIR)/Makefile
+RTE_EXTMK ?= $(RTE_SRCDIR)/$(firstword $(MAKEFILE_LIST))
 export RTE_EXTMK
 
 # RTE_SDK_BIN must point to .config, include/ and lib/.
-- 
2.14.2

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

* [dpdk-stable] patch 'net/ixgbe: fix reset error handling' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (16 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'mk: support renamed Makefile in external project' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'test/pmd_perf: declare variables as static' " luca.boccassi
                       ` (15 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Wenzhuo Lu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From d7e97d28bf963648fc07ddbedfc406857cebfffa Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Mon, 29 Jan 2018 16:07:26 +0800
Subject: [PATCH] net/ixgbe: fix reset error handling

[ upstream commit f69166c9a3c968d5162af586b68b43df5fca4e34 ]

Add error handling for resetting HW.

Fixes: 0a45657a6794 ("pci: rework interrupt handling")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 941195b8e..80ee5f04a 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4208,7 +4208,11 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
 
 	PMD_INIT_FUNC_TRACE();
 
-	hw->mac.ops.reset_hw(hw);
+	err = hw->mac.ops.reset_hw(hw);
+	if (err) {
+		PMD_INIT_LOG(ERR, "Unable to reset vf hardware (%d)", err);
+		return err;
+	}
 	hw->mac.get_link_status = true;
 
 	/* negotiate mailbox API version to use with the PF. */
-- 
2.14.2

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

* [dpdk-stable] patch 'test/pmd_perf: declare variables as static' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (17 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/ixgbe: fix reset error handling' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'examples/bond: check mbuf allocation' " luca.boccassi
                       ` (14 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From af7f5aadd7cd620a2db18dd5365832fd020384c6 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Fri, 19 Jan 2018 14:37:13 +0000
Subject: [PATCH] test/pmd_perf: declare variables as static

[ upstream commit 532e5242db15b311594c4a633d520ed3ae87b38d ]

Some variables in the PMD perf test were declared as global,
but they are only used in this test, so they should actually
be declared as static.

Fixes: 002ade70e933 ("app/test: measure cycles per packet in Rx/Tx")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test/test_pmd_perf.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index afab180f9..e0db34dc6 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -321,10 +321,10 @@ alloc_lcore(uint16_t socketid)
 	return (uint16_t)-1;
 }
 
-volatile uint64_t stop;
-uint64_t count;
-uint64_t drop;
-uint64_t idle;
+static volatile uint64_t stop;
+static uint64_t count;
+static uint64_t drop;
+static uint64_t idle;
 
 static void
 reset_count(void)
@@ -557,7 +557,7 @@ main_loop(__rte_unused void *args)
 	return 0;
 }
 
-rte_atomic64_t start;
+static rte_atomic64_t start;
 
 static inline int
 poll_burst(void *args)
-- 
2.14.2

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

* [dpdk-stable] patch 'examples/bond: check mbuf allocation' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (18 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'test/pmd_perf: declare variables as static' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'mk: fix external build' " luca.boccassi
                       ` (13 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 20a67d749382fe17d7e19e358ddcc6cf7a8e888b Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Wed, 24 Jan 2018 13:16:46 +0000
Subject: [PATCH] examples/bond: check mbuf allocation

[ upstream commit 0bb76fc945e626941de2c6e881b69f4e4ef61478 ]

Coverity issue: 257008
Fixes: cc7e8ae84faa ("examples/bond: add example application for link bonding mode 6")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
 examples/bond/main.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/examples/bond/main.c b/examples/bond/main.c
index 9a4ec8073..f1303e3c6 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -437,6 +437,11 @@ static void cmd_obj_send_parsed(void *parsed_result,
 				(BOND_IP_3 << 16) | (BOND_IP_4 << 24);
 
 	created_pkt = rte_pktmbuf_alloc(mbuf_pool);
+	if (created_pkt == NULL) {
+		cmdline_printf(cl, "Failed to allocate mbuf\n");
+		return;
+	}
+
 	pkt_size = sizeof(struct ether_hdr) + sizeof(struct arp_hdr);
 	created_pkt->data_len = pkt_size;
 	created_pkt->pkt_len = pkt_size;
-- 
2.14.2

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

* [dpdk-stable] patch 'mk: fix external build' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (19 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'examples/bond: check mbuf allocation' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'test/memzone: handle previously allocated memzones' " luca.boccassi
                       ` (12 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Marko Kovacevic; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From e533afea4f70eb0126103e3683b4165dd8b5bdb1 Mon Sep 17 00:00:00 2001
From: Marko Kovacevic <marko.kovacevic@intel.com>
Date: Mon, 5 Feb 2018 15:45:31 +0000
Subject: [PATCH] mk: fix external build

[ upstream commit c36fddd4372305ecf7a25a8417aa720571177a54 ]

Code commit for 'make -f' support, breaks the build in cases where
entries in $(MAKEFILE_LIST) are absolute paths. This commit uses
notdir and firstword to ensure that only the local filename is used.

Fixes: 3a5c339d51a4 ("mk: support renamed Makefile in external project")

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
---
 mk/internal/rte.extvars.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mk/internal/rte.extvars.mk b/mk/internal/rte.extvars.mk
index 723c01530..ea41ebfeb 100644
--- a/mk/internal/rte.extvars.mk
+++ b/mk/internal/rte.extvars.mk
@@ -48,7 +48,7 @@ ifeq ("$(origin M)", "command line")
 RTE_EXTMK := $(abspath $(M))
 endif
 endif
-RTE_EXTMK ?= $(RTE_SRCDIR)/$(firstword $(MAKEFILE_LIST))
+RTE_EXTMK ?= $(RTE_SRCDIR)/$(notdir $(firstword $(MAKEFILE_LIST)))
 export RTE_EXTMK
 
 # RTE_SDK_BIN must point to .config, include/ and lib/.
-- 
2.14.2

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

* [dpdk-stable] patch 'test/memzone: handle previously allocated memzones' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (20 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'mk: fix external build' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'usertools/devbind: remove unused function' " luca.boccassi
                       ` (11 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Phil Yang, Radoslaw Biernacki, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 822a7dc7e259404ce515ed8b167aee5e6dfd7fb6 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Thu, 1 Feb 2018 10:14:50 +0000
Subject: [PATCH] test/memzone: handle previously allocated memzones

[ upstream commit 5c45e0fdeddfc773fab63e12d086c4f2052cda40 ]

Currently, memzone autotest expects there to be no memzones
present by the time the test is run. Some hardware drivers
will allocate memzones for internal use during initialization,
resulting in tests failing due to unexpected memzones being
allocated before the test was run.

Fix this by making sure all memzones allocated by this test
have a common prefix, and making callback increment a counter
on encountering memzones with this prefix. Also, separately
increment another counter that will count total number of
memzones left after test, and compares it to previously stored
number of memzones, to ensure that we didn't accidentally
allocated/freed any memzones we weren't supposed to. This
also doubles as a test for correct operation of memzone_walk().

Fixes: 71330483a193 ("test/memzone: fix memory leak")

Signed-off-by: Phil Yang <phil.yang@arm.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
---
 app/test/test_memzone.c | 225 ++++++++++++++++++++++++++++++------------------
 1 file changed, 140 insertions(+), 85 deletions(-)

diff --git a/app/test/test_memzone.c b/app/test/test_memzone.c
index 91d8e6a87..53be29f0e 100644
--- a/app/test/test_memzone.c
+++ b/app/test/test_memzone.c
@@ -33,6 +33,7 @@
 
 #include <stdio.h>
 #include <stdint.h>
+#include <string.h>
 #include <inttypes.h>
 #include <sys/queue.h>
 
@@ -76,6 +77,8 @@
  * - Check flags for specific huge page size reservation
  */
 
+#define TEST_MEMZONE_NAME(suffix) "MZ_TEST_" suffix
+
 /* Test if memory overlaps: return 1 if true, or 0 if false. */
 static int
 is_memory_overlap(phys_addr_t ptr1, size_t len1, phys_addr_t ptr2, size_t len2)
@@ -92,14 +95,14 @@ test_memzone_invalid_alignment(void)
 {
 	const struct rte_memzone * mz;
 
-	mz = rte_memzone_lookup("invalid_alignment");
+	mz = rte_memzone_lookup(TEST_MEMZONE_NAME("invalid_alignment"));
 	if (mz != NULL) {
 		printf("Zone with invalid alignment has been reserved\n");
 		return -1;
 	}
 
-	mz = rte_memzone_reserve_aligned("invalid_alignment", 100,
-			SOCKET_ID_ANY, 0, 100);
+	mz = rte_memzone_reserve_aligned(TEST_MEMZONE_NAME("invalid_alignment"),
+					 100, SOCKET_ID_ANY, 0, 100);
 	if (mz != NULL) {
 		printf("Zone with invalid alignment has been reserved\n");
 		return -1;
@@ -112,14 +115,16 @@ test_memzone_reserving_zone_size_bigger_than_the_maximum(void)
 {
 	const struct rte_memzone * mz;
 
-	mz = rte_memzone_lookup("zone_size_bigger_than_the_maximum");
+	mz = rte_memzone_lookup(
+			TEST_MEMZONE_NAME("zone_size_bigger_than_the_maximum"));
 	if (mz != NULL) {
 		printf("zone_size_bigger_than_the_maximum has been reserved\n");
 		return -1;
 	}
 
-	mz = rte_memzone_reserve("zone_size_bigger_than_the_maximum", (size_t)-1,
-			SOCKET_ID_ANY, 0);
+	mz = rte_memzone_reserve(
+			TEST_MEMZONE_NAME("zone_size_bigger_than_the_maximum"),
+			(size_t)-1, SOCKET_ID_ANY, 0);
 	if (mz != NULL) {
 		printf("It is impossible to reserve such big a memzone\n");
 		return -1;
@@ -166,8 +171,8 @@ test_memzone_reserve_flags(void)
 	 * available page size (i.e 1GB ) when 2MB pages are unavailable.
 	 */
 	if (hugepage_2MB_avail) {
-		mz = rte_memzone_reserve("flag_zone_2M", size, SOCKET_ID_ANY,
-				RTE_MEMZONE_2MB);
+		mz = rte_memzone_reserve(TEST_MEMZONE_NAME("flag_zone_2M"),
+				size, SOCKET_ID_ANY, RTE_MEMZONE_2MB);
 		if (mz == NULL) {
 			printf("MEMZONE FLAG 2MB\n");
 			return -1;
@@ -181,7 +186,8 @@ test_memzone_reserve_flags(void)
 			return -1;
 		}
 
-		mz = rte_memzone_reserve("flag_zone_2M_HINT", size, SOCKET_ID_ANY,
+		mz = rte_memzone_reserve(TEST_MEMZONE_NAME("flag_zone_2M_HINT"),
+				size, SOCKET_ID_ANY,
 				RTE_MEMZONE_2MB|RTE_MEMZONE_SIZE_HINT_ONLY);
 		if (mz == NULL) {
 			printf("MEMZONE FLAG 2MB\n");
@@ -200,7 +206,9 @@ test_memzone_reserve_flags(void)
 		 * HINT flag is indicated
 		 */
 		if (!hugepage_1GB_avail) {
-			mz = rte_memzone_reserve("flag_zone_1G_HINT", size, SOCKET_ID_ANY,
+			mz = rte_memzone_reserve(
+					TEST_MEMZONE_NAME("flag_zone_1G_HINT"),
+					size, SOCKET_ID_ANY,
 					RTE_MEMZONE_1GB|RTE_MEMZONE_SIZE_HINT_ONLY);
 			if (mz == NULL) {
 				printf("MEMZONE FLAG 1GB & HINT\n");
@@ -215,8 +223,9 @@ test_memzone_reserve_flags(void)
 				return -1;
 			}
 
-			mz = rte_memzone_reserve("flag_zone_1G", size, SOCKET_ID_ANY,
-					RTE_MEMZONE_1GB);
+			mz = rte_memzone_reserve(
+					TEST_MEMZONE_NAME("flag_zone_1G"), size,
+					SOCKET_ID_ANY, RTE_MEMZONE_1GB);
 			if (mz != NULL) {
 				printf("MEMZONE FLAG 1GB\n");
 				return -1;
@@ -226,8 +235,8 @@ test_memzone_reserve_flags(void)
 
 	/*As with 2MB tests above for 1GB huge page requests*/
 	if (hugepage_1GB_avail) {
-		mz = rte_memzone_reserve("flag_zone_1G", size, SOCKET_ID_ANY,
-				RTE_MEMZONE_1GB);
+		mz = rte_memzone_reserve(TEST_MEMZONE_NAME("flag_zone_1G"),
+				size, SOCKET_ID_ANY, RTE_MEMZONE_1GB);
 		if (mz == NULL) {
 			printf("MEMZONE FLAG 1GB\n");
 			return -1;
@@ -241,7 +250,8 @@ test_memzone_reserve_flags(void)
 			return -1;
 		}
 
-		mz = rte_memzone_reserve("flag_zone_1G_HINT", size, SOCKET_ID_ANY,
+		mz = rte_memzone_reserve(TEST_MEMZONE_NAME("flag_zone_1G_HINT"),
+				size, SOCKET_ID_ANY,
 				RTE_MEMZONE_1GB|RTE_MEMZONE_SIZE_HINT_ONLY);
 		if (mz == NULL) {
 			printf("MEMZONE FLAG 1GB\n");
@@ -260,7 +270,9 @@ test_memzone_reserve_flags(void)
 		 * HINT flag is indicated
 		 */
 		if (!hugepage_2MB_avail) {
-			mz = rte_memzone_reserve("flag_zone_2M_HINT", size, SOCKET_ID_ANY,
+			mz = rte_memzone_reserve(
+					TEST_MEMZONE_NAME("flag_zone_2M_HINT"),
+					size, SOCKET_ID_ANY,
 					RTE_MEMZONE_2MB|RTE_MEMZONE_SIZE_HINT_ONLY);
 			if (mz == NULL){
 				printf("MEMZONE FLAG 2MB & HINT\n");
@@ -274,8 +286,9 @@ test_memzone_reserve_flags(void)
 				printf("Fail memzone free\n");
 				return -1;
 			}
-			mz = rte_memzone_reserve("flag_zone_2M", size, SOCKET_ID_ANY,
-					RTE_MEMZONE_2MB);
+			mz = rte_memzone_reserve(
+					TEST_MEMZONE_NAME("flag_zone_2M"), size,
+					SOCKET_ID_ANY, RTE_MEMZONE_2MB);
 			if (mz != NULL) {
 				printf("MEMZONE FLAG 2MB\n");
 				return -1;
@@ -283,8 +296,10 @@ test_memzone_reserve_flags(void)
 		}
 
 		if (hugepage_2MB_avail && hugepage_1GB_avail) {
-			mz = rte_memzone_reserve("flag_zone_2M_HINT", size, SOCKET_ID_ANY,
-								RTE_MEMZONE_2MB|RTE_MEMZONE_1GB);
+			mz = rte_memzone_reserve(
+					TEST_MEMZONE_NAME("flag_zone_2M_HINT"),
+					size, SOCKET_ID_ANY,
+					RTE_MEMZONE_2MB|RTE_MEMZONE_1GB);
 			if (mz == NULL) {
 				printf("BOTH SIZES SET\n");
 				return -1;
@@ -308,8 +323,8 @@ test_memzone_reserve_flags(void)
 	 * page size (i.e 16GB ) when 16MB pages are unavailable.
 	 */
 	if (hugepage_16MB_avail) {
-		mz = rte_memzone_reserve("flag_zone_16M", size, SOCKET_ID_ANY,
-				RTE_MEMZONE_16MB);
+		mz = rte_memzone_reserve(TEST_MEMZONE_NAME("flag_zone_16M"),
+				size, SOCKET_ID_ANY, RTE_MEMZONE_16MB);
 		if (mz == NULL) {
 			printf("MEMZONE FLAG 16MB\n");
 			return -1;
@@ -323,8 +338,10 @@ test_memzone_reserve_flags(void)
 			return -1;
 		}
 
-		mz = rte_memzone_reserve("flag_zone_16M_HINT", size,
-		SOCKET_ID_ANY, RTE_MEMZONE_16MB|RTE_MEMZONE_SIZE_HINT_ONLY);
+		mz = rte_memzone_reserve(
+				TEST_MEMZONE_NAME("flag_zone_16M_HINT"), size,
+				SOCKET_ID_ANY,
+				RTE_MEMZONE_16MB|RTE_MEMZONE_SIZE_HINT_ONLY);
 		if (mz == NULL) {
 			printf("MEMZONE FLAG 2MB\n");
 			return -1;
@@ -342,9 +359,11 @@ test_memzone_reserve_flags(void)
 		 * unless HINT flag is indicated
 		 */
 		if (!hugepage_16GB_avail) {
-			mz = rte_memzone_reserve("flag_zone_16G_HINT", size,
-				SOCKET_ID_ANY,
-				RTE_MEMZONE_16GB|RTE_MEMZONE_SIZE_HINT_ONLY);
+			mz = rte_memzone_reserve(
+					TEST_MEMZONE_NAME("flag_zone_16G_HINT"),
+					size, SOCKET_ID_ANY,
+					RTE_MEMZONE_16GB |
+					RTE_MEMZONE_SIZE_HINT_ONLY);
 			if (mz == NULL) {
 				printf("MEMZONE FLAG 16GB & HINT\n");
 				return -1;
@@ -358,8 +377,10 @@ test_memzone_reserve_flags(void)
 				return -1;
 			}
 
-			mz = rte_memzone_reserve("flag_zone_16G", size,
-				SOCKET_ID_ANY, RTE_MEMZONE_16GB);
+			mz = rte_memzone_reserve(
+					TEST_MEMZONE_NAME("flag_zone_16G"),
+					size,
+					SOCKET_ID_ANY, RTE_MEMZONE_16GB);
 			if (mz != NULL) {
 				printf("MEMZONE FLAG 16GB\n");
 				return -1;
@@ -368,8 +389,8 @@ test_memzone_reserve_flags(void)
 	}
 	/*As with 16MB tests above for 16GB huge page requests*/
 	if (hugepage_16GB_avail) {
-		mz = rte_memzone_reserve("flag_zone_16G", size, SOCKET_ID_ANY,
-				RTE_MEMZONE_16GB);
+		mz = rte_memzone_reserve(TEST_MEMZONE_NAME("flag_zone_16G"),
+				size, SOCKET_ID_ANY, RTE_MEMZONE_16GB);
 		if (mz == NULL) {
 			printf("MEMZONE FLAG 16GB\n");
 			return -1;
@@ -383,8 +404,10 @@ test_memzone_reserve_flags(void)
 			return -1;
 		}
 
-		mz = rte_memzone_reserve("flag_zone_16G_HINT", size,
-		SOCKET_ID_ANY, RTE_MEMZONE_16GB|RTE_MEMZONE_SIZE_HINT_ONLY);
+		mz = rte_memzone_reserve(
+				TEST_MEMZONE_NAME("flag_zone_16G_HINT"), size,
+				SOCKET_ID_ANY,
+				RTE_MEMZONE_16GB|RTE_MEMZONE_SIZE_HINT_ONLY);
 		if (mz == NULL) {
 			printf("MEMZONE FLAG 16GB\n");
 			return -1;
@@ -402,9 +425,11 @@ test_memzone_reserve_flags(void)
 		 * unless HINT flag is indicated
 		 */
 		if (!hugepage_16MB_avail) {
-			mz = rte_memzone_reserve("flag_zone_16M_HINT", size,
-				SOCKET_ID_ANY,
-				RTE_MEMZONE_16MB|RTE_MEMZONE_SIZE_HINT_ONLY);
+			mz = rte_memzone_reserve(
+					TEST_MEMZONE_NAME("flag_zone_16M_HINT"),
+					size, SOCKET_ID_ANY,
+					RTE_MEMZONE_16MB |
+					RTE_MEMZONE_SIZE_HINT_ONLY);
 			if (mz == NULL) {
 				printf("MEMZONE FLAG 16MB & HINT\n");
 				return -1;
@@ -417,8 +442,9 @@ test_memzone_reserve_flags(void)
 				printf("Fail memzone free\n");
 				return -1;
 			}
-			mz = rte_memzone_reserve("flag_zone_16M", size,
-				SOCKET_ID_ANY, RTE_MEMZONE_16MB);
+			mz = rte_memzone_reserve(
+					TEST_MEMZONE_NAME("flag_zone_16M"),
+					size, SOCKET_ID_ANY, RTE_MEMZONE_16MB);
 			if (mz != NULL) {
 				printf("MEMZONE FLAG 16MB\n");
 				return -1;
@@ -426,9 +452,10 @@ test_memzone_reserve_flags(void)
 		}
 
 		if (hugepage_16MB_avail && hugepage_16GB_avail) {
-			mz = rte_memzone_reserve("flag_zone_16M_HINT", size,
-				SOCKET_ID_ANY,
-				RTE_MEMZONE_16MB|RTE_MEMZONE_16GB);
+			mz = rte_memzone_reserve(
+					TEST_MEMZONE_NAME("flag_zone_16M_HINT"),
+					size, SOCKET_ID_ANY,
+					RTE_MEMZONE_16MB|RTE_MEMZONE_16GB);
 			if (mz == NULL) {
 				printf("BOTH SIZES SET\n");
 				return -1;
@@ -484,7 +511,8 @@ test_memzone_reserve_max(void)
 		return 0;
 	}
 
-	mz = rte_memzone_reserve("max_zone", 0, SOCKET_ID_ANY, 0);
+	mz = rte_memzone_reserve(TEST_MEMZONE_NAME("max_zone"), 0,
+			SOCKET_ID_ANY, 0);
 	if (mz == NULL){
 		printf("Failed to reserve a big chunk of memory - %s\n",
 				rte_strerror(rte_errno));
@@ -526,8 +554,8 @@ test_memzone_reserve_max_aligned(void)
 		return 0;
 	}
 
-	mz = rte_memzone_reserve_aligned("max_zone_aligned", 0,
-			SOCKET_ID_ANY, 0, align);
+	mz = rte_memzone_reserve_aligned(TEST_MEMZONE_NAME("max_zone_aligned"),
+			0, SOCKET_ID_ANY, 0, align);
 	if (mz == NULL){
 		printf("Failed to reserve a big chunk of memory - %s\n",
 				rte_strerror(rte_errno));
@@ -564,24 +592,29 @@ test_memzone_aligned(void)
 	const struct rte_memzone *memzone_aligned_1024;
 
 	/* memzone that should automatically be adjusted to align on 64 bytes */
-	memzone_aligned_32 = rte_memzone_reserve_aligned("aligned_32", 100,
-				SOCKET_ID_ANY, 0, 32);
+	memzone_aligned_32 = rte_memzone_reserve_aligned(
+			TEST_MEMZONE_NAME("aligned_32"), 100, SOCKET_ID_ANY, 0,
+			32);
 
 	/* memzone that is supposed to be aligned on a 128 byte boundary */
-	memzone_aligned_128 = rte_memzone_reserve_aligned("aligned_128", 100,
-				SOCKET_ID_ANY, 0, 128);
+	memzone_aligned_128 = rte_memzone_reserve_aligned(
+			TEST_MEMZONE_NAME("aligned_128"), 100, SOCKET_ID_ANY, 0,
+			128);
 
 	/* memzone that is supposed to be aligned on a 256 byte boundary */
-	memzone_aligned_256 = rte_memzone_reserve_aligned("aligned_256", 100,
-				SOCKET_ID_ANY, 0, 256);
+	memzone_aligned_256 = rte_memzone_reserve_aligned(
+			TEST_MEMZONE_NAME("aligned_256"), 100, SOCKET_ID_ANY, 0,
+			256);
 
 	/* memzone that is supposed to be aligned on a 512 byte boundary */
-	memzone_aligned_512 = rte_memzone_reserve_aligned("aligned_512", 100,
-				SOCKET_ID_ANY, 0, 512);
+	memzone_aligned_512 = rte_memzone_reserve_aligned(
+			TEST_MEMZONE_NAME("aligned_512"), 100, SOCKET_ID_ANY, 0,
+			512);
 
 	/* memzone that is supposed to be aligned on a 1024 byte boundary */
-	memzone_aligned_1024 = rte_memzone_reserve_aligned("aligned_1024", 100,
-				SOCKET_ID_ANY, 0, 1024);
+	memzone_aligned_1024 = rte_memzone_reserve_aligned(
+			TEST_MEMZONE_NAME("aligned_1024"), 100, SOCKET_ID_ANY,
+			0, 1024);
 
 	printf("check alignments and lengths\n");
 	if (memzone_aligned_32 == NULL) {
@@ -750,37 +783,46 @@ static int
 test_memzone_bounded(void)
 {
 	const struct rte_memzone *memzone_err;
-	const char *name;
 	int rc;
 
 	/* should fail as boundary is not power of two */
-	name = "bounded_error_31";
-	if ((memzone_err = rte_memzone_reserve_bounded(name,
-			100, SOCKET_ID_ANY, 0, 32, UINT32_MAX)) != NULL) {
+	memzone_err = rte_memzone_reserve_bounded(
+			TEST_MEMZONE_NAME("bounded_error_31"), 100,
+			SOCKET_ID_ANY, 0, 32, UINT32_MAX);
+	if (memzone_err != NULL) {
 		printf("%s(%s)created a memzone with invalid boundary "
 			"conditions\n", __func__, memzone_err->name);
 		return -1;
 	}
 
 	/* should fail as len is greater then boundary */
-	name = "bounded_error_32";
-	if ((memzone_err = rte_memzone_reserve_bounded(name,
-			100, SOCKET_ID_ANY, 0, 32, 32)) != NULL) {
+	memzone_err = rte_memzone_reserve_bounded(
+			TEST_MEMZONE_NAME("bounded_error_32"), 100,
+			SOCKET_ID_ANY, 0, 32, 32);
+	if (memzone_err != NULL) {
 		printf("%s(%s)created a memzone with invalid boundary "
 			"conditions\n", __func__, memzone_err->name);
 		return -1;
 	}
 
-	if ((rc = check_memzone_bounded("bounded_128", 100, 128, 128)) != 0)
+	rc = check_memzone_bounded(TEST_MEMZONE_NAME("bounded_128"), 100, 128,
+			128);
+	if (rc != 0)
 		return rc;
 
-	if ((rc = check_memzone_bounded("bounded_256", 100, 256, 128)) != 0)
+	rc = check_memzone_bounded(TEST_MEMZONE_NAME("bounded_256"), 100, 256,
+			128);
+	if (rc != 0)
 		return rc;
 
-	if ((rc = check_memzone_bounded("bounded_1K", 100, 64, 1024)) != 0)
+	rc = check_memzone_bounded(TEST_MEMZONE_NAME("bounded_1K"), 100, 64,
+			1024);
+	if (rc != 0)
 		return rc;
 
-	if ((rc = check_memzone_bounded("bounded_1K_MAX", 0, 64, 1024)) != 0)
+	rc = check_memzone_bounded(TEST_MEMZONE_NAME("bounded_1K_MAX"), 0, 64,
+			1024);
+	if (rc != 0)
 		return rc;
 
 	return 0;
@@ -793,25 +835,28 @@ test_memzone_free(void)
 	int i;
 	char name[20];
 
-	mz[0] = rte_memzone_reserve("tempzone0", 2000, SOCKET_ID_ANY, 0);
-	mz[1] = rte_memzone_reserve("tempzone1", 4000, SOCKET_ID_ANY, 0);
+	mz[0] = rte_memzone_reserve(TEST_MEMZONE_NAME("tempzone0"), 2000,
+			SOCKET_ID_ANY, 0);
+	mz[1] = rte_memzone_reserve(TEST_MEMZONE_NAME("tempzone1"), 4000,
+			SOCKET_ID_ANY, 0);
 
 	if (mz[0] > mz[1])
 		return -1;
-	if (!rte_memzone_lookup("tempzone0"))
+	if (!rte_memzone_lookup(TEST_MEMZONE_NAME("tempzone0")))
 		return -1;
-	if (!rte_memzone_lookup("tempzone1"))
+	if (!rte_memzone_lookup(TEST_MEMZONE_NAME("tempzone1")))
 		return -1;
 
 	if (rte_memzone_free(mz[0])) {
 		printf("Fail memzone free - tempzone0\n");
 		return -1;
 	}
-	if (rte_memzone_lookup("tempzone0")) {
+	if (rte_memzone_lookup(TEST_MEMZONE_NAME("tempzone0"))) {
 		printf("Found previously free memzone - tempzone0\n");
 		return -1;
 	}
-	mz[2] = rte_memzone_reserve("tempzone2", 2000, SOCKET_ID_ANY, 0);
+	mz[2] = rte_memzone_reserve(TEST_MEMZONE_NAME("tempzone2"), 2000,
+			SOCKET_ID_ANY, 0);
 
 	if (mz[2] > mz[1]) {
 		printf("tempzone2 should have gotten the free entry from tempzone0\n");
@@ -821,7 +866,7 @@ test_memzone_free(void)
 		printf("Fail memzone free - tempzone2\n");
 		return -1;
 	}
-	if (rte_memzone_lookup("tempzone2")) {
+	if (rte_memzone_lookup(TEST_MEMZONE_NAME("tempzone2"))) {
 		printf("Found previously free memzone - tempzone2\n");
 		return -1;
 	}
@@ -829,14 +874,15 @@ test_memzone_free(void)
 		printf("Fail memzone free - tempzone1\n");
 		return -1;
 	}
-	if (rte_memzone_lookup("tempzone1")) {
+	if (rte_memzone_lookup(TEST_MEMZONE_NAME("tempzone1"))) {
 		printf("Found previously free memzone - tempzone1\n");
 		return -1;
 	}
 
 	i = 0;
 	do {
-		snprintf(name, sizeof(name), "tempzone%u", i);
+		snprintf(name, sizeof(name), TEST_MEMZONE_NAME("tempzone%u"),
+				i);
 		mz[i] = rte_memzone_reserve(name, 1, SOCKET_ID_ANY, 0);
 	} while (mz[i++] != NULL);
 
@@ -844,7 +890,8 @@ test_memzone_free(void)
 		printf("Fail memzone free - tempzone0\n");
 		return -1;
 	}
-	mz[0] = rte_memzone_reserve("tempzone0new", 0, SOCKET_ID_ANY, 0);
+	mz[0] = rte_memzone_reserve(TEST_MEMZONE_NAME("tempzone0new"), 0,
+			SOCKET_ID_ANY, 0);
 
 	if (mz[0] == NULL) {
 		printf("Fail to create memzone - tempzone0new - when MAX memzones were "
@@ -871,16 +918,16 @@ test_memzone_basic(void)
 	const struct rte_memzone *memzone4;
 	const struct rte_memzone *mz;
 
-	memzone1 = rte_memzone_reserve("testzone1", 100,
+	memzone1 = rte_memzone_reserve(TEST_MEMZONE_NAME("testzone1"), 100,
 				SOCKET_ID_ANY, 0);
 
-	memzone2 = rte_memzone_reserve("testzone2", 1000,
+	memzone2 = rte_memzone_reserve(TEST_MEMZONE_NAME("testzone2"), 1000,
 				0, 0);
 
-	memzone3 = rte_memzone_reserve("testzone3", 1000,
+	memzone3 = rte_memzone_reserve(TEST_MEMZONE_NAME("testzone3"), 1000,
 				1, 0);
 
-	memzone4 = rte_memzone_reserve("testzone4", 1024,
+	memzone4 = rte_memzone_reserve(TEST_MEMZONE_NAME("testzone4"), 1024,
 				SOCKET_ID_ANY, 0);
 
 	/* memzone3 may be NULL if we don't have NUMA */
@@ -932,12 +979,12 @@ test_memzone_basic(void)
 		return -1;
 
 	printf("test zone lookup\n");
-	mz = rte_memzone_lookup("testzone1");
+	mz = rte_memzone_lookup(TEST_MEMZONE_NAME("testzone1"));
 	if (mz != memzone1)
 		return -1;
 
 	printf("test duplcate zone name\n");
-	mz = rte_memzone_reserve("testzone1", 100,
+	mz = rte_memzone_reserve(TEST_MEMZONE_NAME("testzone1"), 100,
 			SOCKET_ID_ANY, 0);
 	if (mz != NULL)
 		return -1;
@@ -962,16 +1009,22 @@ test_memzone_basic(void)
 	return 0;
 }
 
-static int memzone_calk_called;
-static void memzone_walk_clb(const struct rte_memzone *mz __rte_unused,
+static int test_memzones_left;
+static int memzone_walk_cnt;
+static void memzone_walk_clb(const struct rte_memzone *mz,
 			     void *arg __rte_unused)
 {
-	memzone_calk_called = 1;
+	memzone_walk_cnt++;
+	if (!strncmp(TEST_MEMZONE_NAME(""), mz->name, RTE_MEMZONE_NAMESIZE))
+		test_memzones_left++;
 }
 
 static int
 test_memzone(void)
 {
+	/* take note of how many memzones were allocated before running */
+	int memzone_cnt = rte_eal_get_configuration()->mem_config->memzone_cnt;
+
 	printf("test basic memzone API\n");
 	if (test_memzone_basic() < 0)
 		return -1;
@@ -1009,8 +1062,10 @@ test_memzone(void)
 		return -1;
 
 	printf("check memzone cleanup\n");
+	memzone_walk_cnt = 0;
+	test_memzones_left = 0;
 	rte_memzone_walk(memzone_walk_clb, NULL);
-	if (memzone_calk_called) {
+	if (memzone_walk_cnt != memzone_cnt || test_memzones_left > 0) {
 		printf("there are some memzones left after test\n");
 		rte_memzone_dump(stdout);
 		return -1;
-- 
2.14.2

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

* [dpdk-stable] patch 'usertools/devbind: remove unused function' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (21 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'test/memzone: handle previously allocated memzones' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/bonding: check error of MAC address setting' " luca.boccassi
                       ` (10 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From ab9697529faf41101a24fa9688db0fe950159c59 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Wed, 24 Jan 2018 13:16:06 +0000
Subject: [PATCH] usertools/devbind: remove unused function

[ upstream commit 02e157e4a84e437bc4bfd542bab7f51772493fe7 ]

Fixes: 629395b063e8 ("igb_uio: remove PCI id table")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 tools/dpdk-devbind.py | 34 ----------------------------------
 1 file changed, 34 deletions(-)

diff --git a/tools/dpdk-devbind.py b/tools/dpdk-devbind.py
index e4c6d521d..e7cfcd02a 100755
--- a/tools/dpdk-devbind.py
+++ b/tools/dpdk-devbind.py
@@ -126,40 +126,6 @@ def check_output(args, stderr=None):
                             stderr=stderr).communicate()[0]
 
 
-def find_module(mod):
-    '''find the .ko file for kernel module named mod.
-    Searches the $RTE_SDK/$RTE_TARGET directory, the kernel
-    modules directory and finally under the parent directory of
-    the script '''
-    # check $RTE_SDK/$RTE_TARGET directory
-    if 'RTE_SDK' in os.environ and 'RTE_TARGET' in os.environ:
-        path = "%s/%s/kmod/%s.ko" % (os.environ['RTE_SDK'],
-                                     os.environ['RTE_TARGET'], mod)
-        if exists(path):
-            return path
-
-    # check using depmod
-    try:
-        depmod_out = check_output(["modinfo", "-n", mod],
-                                  stderr=subprocess.STDOUT).lower()
-        if "error" not in depmod_out:
-            path = depmod_out.strip()
-            if exists(path):
-                return path
-    except:  # if modinfo can't find module, it fails, so continue
-        pass
-
-    # check for a copy based off current path
-    tools_dir = dirname(abspath(sys.argv[0]))
-    if (tools_dir.endswith("tools")):
-        base_dir = dirname(tools_dir)
-        find_out = check_output(["find", base_dir, "-name", mod + ".ko"])
-        if len(find_out) > 0:  # something matched
-            path = find_out.splitlines()[0]
-            if exists(path):
-                return path
-
-
 def check_modules():
     '''Checks that igb_uio is loaded'''
     global dpdk_drivers
-- 
2.14.2

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

* [dpdk-stable] patch 'net/bonding: check error of MAC address setting' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (22 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'usertools/devbind: remove unused function' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/qede: fix few log messages' " luca.boccassi
                       ` (9 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 8dc7f949baf607fd4e9a23ca6330f8b739431caa Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Thu, 1 Feb 2018 17:21:26 +0000
Subject: [PATCH] net/bonding: check error of MAC address setting

[ upstream commit a508daa1a43491ef347774852fe9ee3ff960182c ]

Coverity issue: 260405
Fixes: 2efb58cbab6e ("bond: new link bonding library")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
 drivers/net/bonding/rte_eth_bond_api.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index 29e2de5fd..4b6f1471c 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -412,8 +412,13 @@ __eth_bond_slave_add_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id)
 	if (internals->slave_count < 1) {
 		/* if MAC is not user defined then use MAC of first slave add to
 		 * bonded device */
-		if (!internals->user_defined_mac)
-			mac_address_set(bonded_eth_dev, slave_eth_dev->data->mac_addrs);
+		if (!internals->user_defined_mac) {
+			if (mac_address_set(bonded_eth_dev,
+					    slave_eth_dev->data->mac_addrs)) {
+				RTE_BOND_LOG(ERR, "Failed to set MAC address");
+				return -1;
+			}
+		}
 
 		/* Inherit eth dev link properties from first slave */
 		link_properties_set(bonded_eth_dev,
-- 
2.14.2

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

* [dpdk-stable] patch 'net/qede: fix few log messages' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (23 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/bonding: check error of MAC address setting' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'app/testpmd: fix port index in RSS forward config' " luca.boccassi
                       ` (8 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From d3f8ca8bdaa5bb96bafcaa35d7d48349308db9b2 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Fri, 2 Feb 2018 22:03:18 -0800
Subject: [PATCH] net/qede: fix few log messages

[ upstream commit 651f3d4d0f1329b1dcf933e6dc207be44ef51d01 ]

Fixes: 9e334305178f ("net/qede: fix MTU set and max Rx length")
Fixes: 22d07d939c3c ("net/qede/base: update")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
 drivers/net/qede/base/ecore_dcbx.c | 7 +++----
 drivers/net/qede/qede_rxtx.c       | 2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/qede/base/ecore_dcbx.c b/drivers/net/qede/base/ecore_dcbx.c
index 8aa3c0b7b..8e521ecb3 100644
--- a/drivers/net/qede/base/ecore_dcbx.c
+++ b/drivers/net/qede/base/ecore_dcbx.c
@@ -239,10 +239,9 @@ ecore_dcbx_get_app_protocol_type(struct ecore_hwfn *p_hwfn,
 		status = true;
 	} else {
 		*type = DCBX_MAX_PROTOCOL_TYPE;
-		DP_ERR(p_hwfn,
-		       "No action required, App TLV id = 0x%x"
-		       " app_prio_bitmap = 0x%x\n",
-		       id, app_prio_bitmap);
+		DP_VERBOSE(p_hwfn, ECORE_MSG_DCB,
+			    "No action required, App TLV entry = 0x%x\n",
+			   app_prio_bitmap);
 	}
 
 	return status;
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index 9cce13df0..9948d2e80 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -222,7 +222,7 @@ qede_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	dev->data->rx_queues[queue_idx] = rxq;
 
 	DP_INFO(edev, "rxq %d num_desc %u rx_buf_size=%u socket %u\n",
-		  queue_idx, nb_desc, qdev->mtu, socket_id);
+		  queue_idx, nb_desc, rxq->rx_buf_size, socket_id);
 
 	return 0;
 err4:
-- 
2.14.2

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

* [dpdk-stable] patch 'app/testpmd: fix port index in RSS forward config' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (24 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'net/qede: fix few log messages' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:46     ` [dpdk-stable] patch 'app/testpmd: fix port topology " luca.boccassi
                       ` (7 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Matan Azrad; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From d793677634673a495d81be51807097278a6ab656 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Mon, 5 Feb 2018 14:09:21 +0000
Subject: [PATCH] app/testpmd: fix port index in RSS forward config

[ upstream commit 13cb6fae7991e2213cf8ce39fe3caa1c804511e1 ]

When multi-queue ports are configured by the user, the testpmd streams
are created by rss_fwd_config_setup() function.

This function may configure to the streams either invalid Rx ports or
invalid Tx ports.

An invalid Tx port is configured when the number of ports is odd.
In this case, the last Tx port will be always invalid.

An invalid Rx port is configured when NUMA support is configured by the
user and the number of forward ports is much smaller than the number of
all ports. In this case, also the Tx port is invalid.

Change calculations to get valid ports.

Fixes: af75078 ("first public release")

Signed-off-by: Matan Azrad <matan@mellanox.com>
---
 app/test-pmd/config.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index c50b62efd..351df5715 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1262,7 +1262,8 @@ rss_fwd_config_setup(void)
 		 * if we are in loopback, simply send stuff out through the
 		 * ingress port
 		 */
-		if (port_topology == PORT_TOPOLOGY_LOOP)
+		if (port_topology == PORT_TOPOLOGY_LOOP ||
+		    txp >= cur_fwd_config.nb_fwd_ports)
 			txp = rxp;
 
 		fs->rx_port = fwd_ports_ids[rxp];
@@ -1279,11 +1280,7 @@ rss_fwd_config_setup(void)
 		 * Restart from RX queue 0 on next RX port
 		 */
 		rxq = 0;
-		if (numa_support && (nb_fwd_ports <= (nb_ports >> 1)))
-			rxp = (portid_t)
-				(rxp + ((nb_ports >> 1) / nb_fwd_ports));
-		else
-			rxp = (portid_t) (rxp + 1);
+		rxp++;
 	}
 }
 
-- 
2.14.2

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

* [dpdk-stable] patch 'app/testpmd: fix port topology in RSS forward config' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (25 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'app/testpmd: fix port index in RSS forward config' " luca.boccassi
@ 2018-02-07 16:46     ` luca.boccassi
  2018-02-07 16:47     ` [dpdk-stable] patch 'examples/ip_pipeline: fix timer period unit' " luca.boccassi
                       ` (6 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:46 UTC (permalink / raw)
  To: Matan Azrad; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 00f5e2b202092bfec2dad0bf6a7a98a331d40fc8 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Mon, 5 Feb 2018 14:09:22 +0000
Subject: [PATCH] app/testpmd: fix port topology in RSS forward config

[ upstream commit 4deefb6f7107dd6a40900be4f1d6a6844a702505 ]

The testpmd user can configure port topology mode to define the port
topology between the testpmd forward ports(paired, chained and loop).

When multi-queue ports are configured by the user, the testpmd
streams are created by rss_fwd_config_setup() function, this function
doesn't take into account the chained topology mode and configures the
forward streams with paired topology mode in this case.

Configure the stream Tx port by dedicated function which calculates
a valid Tx port index as a function of the topology mode and the Rx
port index.

Fixes: af75078 ("first public release")

Signed-off-by: Matan Azrad <matan@mellanox.com>
---
 app/test-pmd/config.c | 49 +++++++++++++++++++++++++++++++------------------
 1 file changed, 31 insertions(+), 18 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 351df5715..69fa04be4 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1155,6 +1155,36 @@ setup_fwd_config_of_each_lcore(struct fwd_config *cfg)
 	}
 }
 
+static portid_t
+fwd_topology_tx_port_get(portid_t rxp)
+{
+	static int warning_once = 1;
+
+	RTE_ASSERT(rxp < cur_fwd_config.nb_fwd_ports);
+
+	switch (port_topology) {
+	default:
+	case PORT_TOPOLOGY_PAIRED:
+		if ((rxp & 0x1) == 0) {
+			if (rxp + 1 < cur_fwd_config.nb_fwd_ports)
+				return rxp + 1;
+			if (warning_once) {
+				printf("\nWarning! port-topology=paired"
+				       " and odd forward ports number,"
+				       " the last port will pair with"
+				       " itself.\n\n");
+				warning_once = 0;
+			}
+			return rxp;
+		}
+		return rxp - 1;
+	case PORT_TOPOLOGY_CHAINED:
+		return (rxp + 1) % cur_fwd_config.nb_fwd_ports;
+	case PORT_TOPOLOGY_LOOP:
+		return rxp;
+	}
+}
+
 static void
 simple_fwd_config_setup(void)
 {
@@ -1217,11 +1247,6 @@ simple_fwd_config_setup(void)
  * For the RSS forwarding test all streams distributed over lcores. Each stream
  * being composed of a RX queue to poll on a RX port for input messages,
  * associated with a TX queue of a TX port where to send forwarded packets.
- * All packets received on the RX queue of index "RxQj" of the RX port "RxPi"
- * are sent on the TX queue "TxQl" of the TX port "TxPk" according to the two
- * following rules:
- *    - TxPk = (RxPi + 1) if RxPi is even, (RxPi - 1) if RxPi is odd
- *    - TxQl = RxQj
  */
 static void
 rss_fwd_config_setup(void)
@@ -1253,19 +1278,7 @@ rss_fwd_config_setup(void)
 		struct fwd_stream *fs;
 
 		fs = fwd_streams[sm_id];
-
-		if ((rxp & 0x1) == 0)
-			txp = (portid_t) (rxp + 1);
-		else
-			txp = (portid_t) (rxp - 1);
-		/*
-		 * if we are in loopback, simply send stuff out through the
-		 * ingress port
-		 */
-		if (port_topology == PORT_TOPOLOGY_LOOP ||
-		    txp >= cur_fwd_config.nb_fwd_ports)
-			txp = rxp;
-
+		txp = fwd_topology_tx_port_get(rxp);
 		fs->rx_port = fwd_ports_ids[rxp];
 		fs->rx_queue = rxq;
 		fs->tx_port = fwd_ports_ids[txp];
-- 
2.14.2

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

* [dpdk-stable] patch 'examples/ip_pipeline: fix timer period unit' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (26 preceding siblings ...)
  2018-02-07 16:46     ` [dpdk-stable] patch 'app/testpmd: fix port topology " luca.boccassi
@ 2018-02-07 16:47     ` luca.boccassi
  2018-02-07 16:47     ` [dpdk-stable] patch 'test/reorder: fix memory leak' " luca.boccassi
                       ` (5 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:47 UTC (permalink / raw)
  To: Bao-Long Tran; +Cc: Jasvinder Singh, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 830c7e392dd3b8f310e0d688e9e89eb1b57cbacc Mon Sep 17 00:00:00 2001
From: Bao-Long Tran <longtb5@viettel.com.vn>
Date: Wed, 31 Jan 2018 15:48:16 +0700
Subject: [PATCH] examples/ip_pipeline: fix timer period unit

[ upstream commit 07b7b0b5a922a44c24252cb62e4ebba3b8774674 ]

The timer_period option specified by users via config file
should have unit of 1 millisecond. However timer_period is
internally converted to unit of 10 millisecond.

Fixes: 4e14069328fc ("examples/ip_pipeline: measure CPU utilization")

Signed-off-by: Bao-Long Tran <longtb5@viettel.com.vn>
Reviewed-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
 examples/ip_pipeline/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c
index d46bd3659..0e1438c11 100644
--- a/examples/ip_pipeline/init.c
+++ b/examples/ip_pipeline/init.c
@@ -1701,7 +1701,7 @@ app_init_pipelines(struct app_params *app)
 		data->ptype = ptype;
 
 		data->timer_period = (rte_get_tsc_hz() *
-			params->timer_period) / 100;
+			params->timer_period) / 1000;
 	}
 }
 
-- 
2.14.2

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

* [dpdk-stable] patch 'test/reorder: fix memory leak' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (27 preceding siblings ...)
  2018-02-07 16:47     ` [dpdk-stable] patch 'examples/ip_pipeline: fix timer period unit' " luca.boccassi
@ 2018-02-07 16:47     ` luca.boccassi
  2018-02-07 16:47     ` [dpdk-stable] patch 'test/ring_perf: " luca.boccassi
                       ` (4 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:47 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 38b6c7667203b8fe488f6b4251624fdf0ade9b8b Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Tue, 6 Feb 2018 13:35:38 +0000
Subject: [PATCH] test/reorder: fix memory leak

[ upstream commit 8d0e39debc2eaaf684d78d222152b34f08a325b5 ]

Add a teardown function that frees allocated resources.

Fixes: d0c9b58d7156 ("app/test: new reorder unit test")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 app/test/test_reorder.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/app/test/test_reorder.c b/app/test/test_reorder.c
index e8a0a2f23..26dab0c2b 100644
--- a/app/test/test_reorder.c
+++ b/app/test/test_reorder.c
@@ -362,9 +362,20 @@ test_setup(void)
 	return 0;
 }
 
+static void
+test_teardown(void)
+{
+	rte_reorder_free(test_params->b);
+	test_params->b = NULL;
+	rte_mempool_free(test_params->p);
+	test_params->p = NULL;
+}
+
+
 static struct unit_test_suite reorder_test_suite  = {
 
 	.setup = test_setup,
+	.teardown = test_teardown,
 	.suite_name = "Reorder Unit Test Suite",
 	.unit_test_cases = {
 		TEST_CASE(test_reorder_create),
-- 
2.14.2

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

* [dpdk-stable] patch 'test/ring_perf: fix memory leak' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (28 preceding siblings ...)
  2018-02-07 16:47     ` [dpdk-stable] patch 'test/reorder: fix memory leak' " luca.boccassi
@ 2018-02-07 16:47     ` luca.boccassi
  2018-02-07 16:47     ` [dpdk-stable] patch 'test/table: " luca.boccassi
                       ` (3 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:47 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 6bfcc3271016cab722c12b11f178b4ca82b06b67 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Tue, 6 Feb 2018 13:35:40 +0000
Subject: [PATCH] test/ring_perf: fix memory leak

[ upstream commit cac64abd2572e3d9b1a34d44bbb3fcaf359d3d14 ]

Fixes: ac3fb3019c52 ("app: rework ring tests")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 app/test/test_ring_perf.c | 36 ++++++++++++++++++++----------------
 1 file changed, 20 insertions(+), 16 deletions(-)

diff --git a/app/test/test_ring_perf.c b/app/test/test_ring_perf.c
index 320c20cd2..b4e4daeca 100644
--- a/app/test/test_ring_perf.c
+++ b/app/test/test_ring_perf.c
@@ -60,9 +60,6 @@
  */
 static const volatile unsigned bulk_sizes[] = { 8, 32 };
 
-/* The ring structure used for tests */
-static struct rte_ring *r;
-
 struct lcore_pair {
 	unsigned c1, c2;
 };
@@ -143,7 +140,7 @@ get_two_sockets(struct lcore_pair *lcp)
 
 /* Get cycle counts for dequeuing from an empty ring. Should be 2 or 3 cycles */
 static void
-test_empty_dequeue(void)
+test_empty_dequeue(struct rte_ring *r)
 {
 	const unsigned iter_shift = 26;
 	const unsigned iterations = 1<<iter_shift;
@@ -171,6 +168,7 @@ test_empty_dequeue(void)
  * and return two. Input = burst size, output = cycle average for sp/sc & mp/mc
  */
 struct thread_params {
+	struct rte_ring *r;
 	unsigned size;        /* input value, the burst size */
 	double spsc, mpmc;    /* output value, the single or multi timings */
 };
@@ -185,6 +183,7 @@ enqueue_bulk(void *p)
 	const unsigned iter_shift = 23;
 	const unsigned iterations = 1<<iter_shift;
 	struct thread_params *params = p;
+	struct rte_ring *r = params->r;
 	const unsigned size = params->size;
 	unsigned i;
 	void *burst[MAX_BURST] = {0};
@@ -220,6 +219,7 @@ dequeue_bulk(void *p)
 	const unsigned iter_shift = 23;
 	const unsigned iterations = 1<<iter_shift;
 	struct thread_params *params = p;
+	struct rte_ring *r = params->r;
 	const unsigned size = params->size;
 	unsigned i;
 	void *burst[MAX_BURST] = {0};
@@ -250,7 +250,7 @@ dequeue_bulk(void *p)
  * used to measure ring perf between hyperthreads, cores and sockets.
  */
 static void
-run_on_core_pair(struct lcore_pair *cores,
+run_on_core_pair(struct lcore_pair *cores, struct rte_ring *r,
 		lcore_function_t f1, lcore_function_t f2)
 {
 	struct thread_params param1 = {0}, param2 = {0};
@@ -258,6 +258,7 @@ run_on_core_pair(struct lcore_pair *cores,
 	for (i = 0; i < sizeof(bulk_sizes)/sizeof(bulk_sizes[0]); i++) {
 		lcore_count = 0;
 		param1.size = param2.size = bulk_sizes[i];
+		param1.r = param2.r = r;
 		if (cores->c1 == rte_get_master_lcore()) {
 			rte_eal_remote_launch(f2, &param2, cores->c2);
 			f1(&param1);
@@ -280,7 +281,7 @@ run_on_core_pair(struct lcore_pair *cores,
  * takes on a single lcore. Result is for comparison with the bulk enq+deq.
  */
 static void
-test_single_enqueue_dequeue(void)
+test_single_enqueue_dequeue(struct rte_ring *r)
 {
 	const unsigned iter_shift = 24;
 	const unsigned iterations = 1<<iter_shift;
@@ -313,7 +314,7 @@ test_single_enqueue_dequeue(void)
  * as for the bulk function called on a single lcore.
  */
 static void
-test_burst_enqueue_dequeue(void)
+test_burst_enqueue_dequeue(struct rte_ring *r)
 {
 	const unsigned iter_shift = 23;
 	const unsigned iterations = 1<<iter_shift;
@@ -347,7 +348,7 @@ test_burst_enqueue_dequeue(void)
 
 /* Times enqueue and dequeue on a single lcore */
 static void
-test_bulk_enqueue_dequeue(void)
+test_bulk_enqueue_dequeue(struct rte_ring *r)
 {
 	const unsigned iter_shift = 23;
 	const unsigned iterations = 1<<iter_shift;
@@ -385,32 +386,35 @@ static int
 test_ring_perf(void)
 {
 	struct lcore_pair cores;
+	struct rte_ring *r = NULL;
+
 	r = rte_ring_create(RING_NAME, RING_SIZE, rte_socket_id(), 0);
-	if (r == NULL && (r = rte_ring_lookup(RING_NAME)) == NULL)
+	if (r == NULL)
 		return -1;
 
 	printf("### Testing single element and burst enq/deq ###\n");
-	test_single_enqueue_dequeue();
-	test_burst_enqueue_dequeue();
+	test_single_enqueue_dequeue(r);
+	test_burst_enqueue_dequeue(r);
 
 	printf("\n### Testing empty dequeue ###\n");
-	test_empty_dequeue();
+	test_empty_dequeue(r);
 
 	printf("\n### Testing using a single lcore ###\n");
-	test_bulk_enqueue_dequeue();
+	test_bulk_enqueue_dequeue(r);
 
 	if (get_two_hyperthreads(&cores) == 0) {
 		printf("\n### Testing using two hyperthreads ###\n");
-		run_on_core_pair(&cores, enqueue_bulk, dequeue_bulk);
+		run_on_core_pair(&cores, r, enqueue_bulk, dequeue_bulk);
 	}
 	if (get_two_cores(&cores) == 0) {
 		printf("\n### Testing using two physical cores ###\n");
-		run_on_core_pair(&cores, enqueue_bulk, dequeue_bulk);
+		run_on_core_pair(&cores, r, enqueue_bulk, dequeue_bulk);
 	}
 	if (get_two_sockets(&cores) == 0) {
 		printf("\n### Testing using two NUMA nodes ###\n");
-		run_on_core_pair(&cores, enqueue_bulk, dequeue_bulk);
+		run_on_core_pair(&cores, r, enqueue_bulk, dequeue_bulk);
 	}
+	rte_ring_free(r);
 	return 0;
 }
 
-- 
2.14.2

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

* [dpdk-stable] patch 'test/table: fix memory leak' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (29 preceding siblings ...)
  2018-02-07 16:47     ` [dpdk-stable] patch 'test/ring_perf: " luca.boccassi
@ 2018-02-07 16:47     ` luca.boccassi
  2018-02-07 16:47     ` [dpdk-stable] patch 'test/timer_perf: " luca.boccassi
                       ` (2 subsequent siblings)
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:47 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From b0545730b56159064b6bba5a17c2d7d98452a646 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Tue, 6 Feb 2018 13:35:41 +0000
Subject: [PATCH] test/table: fix memory leak

[ upstream commit c1d30e443b624f8281b08ae7651feaf4b5ba1a09 ]

Always deallocate allocated resources after the test is done.

Fixes: 5205954791cb ("app/test: packet framework unit tests")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 app/test/test_table.c | 44 ++++++++++++++++++++++++++++----------------
 1 file changed, 28 insertions(+), 16 deletions(-)

diff --git a/app/test/test_table.c b/app/test/test_table.c
index 1faa0a6d8..31eac117c 100644
--- a/app/test/test_table.c
+++ b/app/test/test_table.c
@@ -82,6 +82,14 @@ uint64_t pipeline_test_hash(void *key,
 	return signature;
 }
 
+static void
+app_free_resources(void) {
+	int i;
+	for (i = 0; i < N_PORTS; i++)
+		rte_ring_free(rings_rx[i]);
+	rte_mempool_free(pool);
+}
+
 static void
 app_init_mbuf_pools(void)
 {
@@ -141,18 +149,20 @@ app_init_rings(void)
 static int
 test_table(void)
 {
-	int status, failures;
+	int status, ret;
 	unsigned i;
 
-	failures = 0;
+	ret = TEST_SUCCESS;
 
 	app_init_rings();
 	app_init_mbuf_pools();
 
 	printf("\n\n\n\n************Pipeline tests************\n");
 
-	if (test_table_pipeline() < 0)
-		return -1;
+	if (test_table_pipeline() < 0) {
+		ret = TEST_FAILED;
+		goto end;
+	}
 
 	printf("\n\n\n\n************Port tests************\n");
 	for (i = 0; i < n_port_tests; i++) {
@@ -160,8 +170,8 @@ test_table(void)
 		if (status < 0) {
 			printf("\nPort test number %d failed (%d).\n", i,
 				status);
-			failures++;
-			return -1;
+			ret = TEST_FAILED;
+			goto end;
 		}
 	}
 
@@ -171,8 +181,8 @@ test_table(void)
 		if (status < 0) {
 			printf("\nTable test number %d failed (%d).\n", i,
 				status);
-			failures++;
-			return -1;
+			ret = TEST_FAILED;
+			goto end;
 		}
 	}
 
@@ -182,21 +192,23 @@ test_table(void)
 		if (status < 0) {
 			printf("\nCombined table test number %d failed with "
 				"reason number %d.\n", i, status);
-			failures++;
-			return -1;
+			ret = TEST_FAILED;
+			goto end;
 		}
 	}
 
-	if (failures)
-		return -1;
-
 #ifdef RTE_LIBRTE_ACL
 	printf("\n\n\n\n************ACL tests************\n");
-	if (test_table_acl() < 0)
-		return -1;
+	if (test_table_acl() < 0) {
+		ret = TEST_FAILED;
+		goto end;
+	}
 #endif
 
-	return 0;
+end:
+	app_free_resources();
+
+	return ret;
 }
 
 REGISTER_TEST_COMMAND(table_autotest, test_table);
-- 
2.14.2

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

* [dpdk-stable] patch 'test/timer_perf: fix memory leak' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (30 preceding siblings ...)
  2018-02-07 16:47     ` [dpdk-stable] patch 'test/table: " luca.boccassi
@ 2018-02-07 16:47     ` luca.boccassi
  2018-02-07 16:47     ` [dpdk-stable] patch 'net/i40e: fix Rx interrupt' " luca.boccassi
  2018-02-09 10:40     ` [dpdk-stable] patch 'net/bnxt: fix Rx checksum flags' " Luca Boccassi
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:47 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From de9e0e97d7c0fe071167cf19e70d7e017bd93cf8 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Tue, 6 Feb 2018 13:35:42 +0000
Subject: [PATCH] test/timer_perf: fix memory leak

[ upstream commit 863fc5beca5d2ad0cd49e31a3e2b5a848f786c67 ]

Fixes: 277afaf3dbcb ("app/test: add timer_perf")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 app/test/test_timer_perf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test/test_timer_perf.c b/app/test/test_timer_perf.c
index fa77efbd2..f6bbdf338 100644
--- a/app/test/test_timer_perf.c
+++ b/app/test/test_timer_perf.c
@@ -155,6 +155,7 @@ test_timer_perf(void)
 	printf("Time per rte_timer_manage with zero callbacks: %"PRIu64" cycles\n",
 			(end_tsc - start_tsc + iterations/2) / iterations);
 
+	rte_free(tms);
 	return 0;
 }
 
-- 
2.14.2

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

* [dpdk-stable] patch 'net/i40e: fix Rx interrupt' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (31 preceding siblings ...)
  2018-02-07 16:47     ` [dpdk-stable] patch 'test/timer_perf: " luca.boccassi
@ 2018-02-07 16:47     ` luca.boccassi
  2018-02-09 10:40     ` [dpdk-stable] patch 'net/bnxt: fix Rx checksum flags' " Luca Boccassi
  33 siblings, 0 replies; 111+ messages in thread
From: luca.boccassi @ 2018-02-07 16:47 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Helin Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 1f903ee2546e72a066c291c08b560c9d712b020f Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Tue, 6 Feb 2018 13:33:31 +0800
Subject: [PATCH] net/i40e: fix Rx interrupt

[ upstream commit 378cc7f569a678e1c8469094104b757864c4ad05 ]

This patch fixes interval error and corrects macros when
enabling Rx interrupt mode. The patch also fixes a logical
error during supporting multiple drivers.

Fixes: cfdfca493cae ("net/i40e: fix multiple driver support")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 21 +++++++--------------
 1 file changed, 7 insertions(+), 14 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index ba1120aa1..6df9b4600 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -9885,31 +9885,23 @@ i40e_dev_get_dcb_info(struct rte_eth_dev *dev,
 static int
 i40e_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
 {
-	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	struct rte_intr_handle *intr_handle = &dev->pci_dev->intr_handle;
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	uint16_t interval =
-		i40e_calc_itr_interval(RTE_LIBRTE_I40E_ITR_INTERVAL,
-				       pf->support_multi_driver);
 	uint16_t msix_intr;
 
 	msix_intr = intr_handle->intr_vec[queue_id];
 	if (msix_intr == I40E_MISC_VEC_ID)
 		I40E_WRITE_REG(hw, I40E_PFINT_DYN_CTL0,
-			       I40E_PFINT_DYN_CTLN_INTENA_MASK |
-			       I40E_PFINT_DYN_CTLN_CLEARPBA_MASK |
-			       (0 << I40E_PFINT_DYN_CTLN_ITR_INDX_SHIFT) |
-			       (interval <<
-				I40E_PFINT_DYN_CTLN_INTERVAL_SHIFT));
+			       I40E_PFINT_DYN_CTL0_INTENA_MASK |
+			       I40E_PFINT_DYN_CTL0_CLEARPBA_MASK |
+			       I40E_PFINT_DYN_CTL0_ITR_INDX_MASK);
 	else
 		I40E_WRITE_REG(hw,
 			       I40E_PFINT_DYN_CTLN(msix_intr -
 						   I40E_RX_VEC_START),
 			       I40E_PFINT_DYN_CTLN_INTENA_MASK |
 			       I40E_PFINT_DYN_CTLN_CLEARPBA_MASK |
-			       (0 << I40E_PFINT_DYN_CTLN_ITR_INDX_SHIFT) |
-			       (interval <<
-				I40E_PFINT_DYN_CTLN_INTERVAL_SHIFT));
+			       I40E_PFINT_DYN_CTLN_ITR_INDX_MASK);
 
 	I40E_WRITE_FLUSH(hw);
 	rte_intr_enable(&dev->pci_dev->intr_handle);
@@ -9926,12 +9918,13 @@ i40e_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
 
 	msix_intr = intr_handle->intr_vec[queue_id];
 	if (msix_intr == I40E_MISC_VEC_ID)
-		I40E_WRITE_REG(hw, I40E_PFINT_DYN_CTL0, 0);
+		I40E_WRITE_REG(hw, I40E_PFINT_DYN_CTL0,
+			       I40E_PFINT_DYN_CTL0_ITR_INDX_MASK);
 	else
 		I40E_WRITE_REG(hw,
 			       I40E_PFINT_DYN_CTLN(msix_intr -
 						   I40E_RX_VEC_START),
-			       0);
+			       I40E_PFINT_DYN_CTLN_ITR_INDX_MASK);
 	I40E_WRITE_FLUSH(hw);
 
 	return 0;
-- 
2.14.2

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

* [dpdk-stable] patch 'net/bnxt: fix Rx checksum flags' has been queued to LTS release 16.11.5
  2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
                       ` (32 preceding siblings ...)
  2018-02-07 16:47     ` [dpdk-stable] patch 'net/i40e: fix Rx interrupt' " luca.boccassi
@ 2018-02-09 10:40     ` Luca Boccassi
  2018-02-09 10:40       ` [dpdk-stable] patch 'net/bnxt: fix link speed setting with autoneg off' " Luca Boccassi
                         ` (2 more replies)
  33 siblings, 3 replies; 111+ messages in thread
From: Luca Boccassi @ 2018-02-09 10:40 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/11/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 19ce80fa87092b057e42c6620897625813038076 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Tue, 6 Feb 2018 14:39:31 +0100
Subject: [PATCH] net/bnxt: fix Rx checksum flags

[ upstream commit 0fc49cbb2cab782bf44e1a29e7c8e1c22af576c8 ]

Fix the Rx offload flags when the IP or L4 checksum is seen as incorrect
by the hardware. In this case, the proper value is PKT_RX_IP_CKSUM_BAD.

PKT_RX_IP_CKSUM_NONE means that the checksum may be incorrect in the
packet headers, but the integrity of the IP header is verified. This is
mostly useful for virtual drivers.

Fixes: 7ec39d8c524b ("net/bnxt: update status of Rx IP/L4 CKSUM")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 980f3ec58..825337160 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -152,12 +152,12 @@ static uint16_t bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
 	if (likely(RX_CMP_IP_CS_OK(rxcmp1)))
 		mbuf->ol_flags |= PKT_RX_IP_CKSUM_GOOD;
 	else
-		mbuf->ol_flags |= PKT_RX_IP_CKSUM_NONE;
+		mbuf->ol_flags |= PKT_RX_IP_CKSUM_BAD;
 
 	if (likely(RX_CMP_L4_CS_OK(rxcmp1)))
 		mbuf->ol_flags |= PKT_RX_L4_CKSUM_GOOD;
 	else
-		mbuf->ol_flags |= PKT_RX_L4_CKSUM_NONE;
+		mbuf->ol_flags |= PKT_RX_L4_CKSUM_BAD;
 
 	if (rxcmp1->errors_v2 & RX_CMP_L2_ERRORS) {
 		/* Re-install the mbuf back to the rx ring */
-- 
2.14.2

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

* [dpdk-stable] patch 'net/bnxt: fix link speed setting with autoneg off' has been queued to LTS release 16.11.5
  2018-02-09 10:40     ` [dpdk-stable] patch 'net/bnxt: fix Rx checksum flags' " Luca Boccassi
@ 2018-02-09 10:40       ` Luca Boccassi
  2018-02-11 12:49         ` [dpdk-stable] patch 'eal/ppc: support sPAPR IOMMU for vfio-pci' " Luca Boccassi
  2018-02-09 10:40       ` [dpdk-stable] patch 'net/i40e: check multi-driver option parsing' " Luca Boccassi
  2018-02-09 10:40       ` [dpdk-stable] patch 'app/testpmd: fix flow director filter' " Luca Boccassi
  2 siblings, 1 reply; 111+ messages in thread
From: Luca Boccassi @ 2018-02-09 10:40 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/11/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 8b86c92c7fd052a5f149ddd0f7e5c8e452d21482 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Tue, 6 Feb 2018 17:16:14 -0800
Subject: [PATCH] net/bnxt: fix link speed setting with autoneg off

[ upstream commit 90cc14d77359bb3f8e48f4ef966ee77a52703949 ]

When Autoneg is turned off especially on remote side,
link does not come up. This patch fixes that.

Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt.h      |  1 +
 drivers/net/bnxt/bnxt_hwrm.c | 16 +++++++++++++---
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index ff3c24063..b934605ef 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -110,6 +110,7 @@ struct bnxt_link_info {
 	uint16_t		link_speed;
 	uint16_t		support_speeds;
 	uint16_t		auto_link_speed;
+	uint16_t		force_link_speed;
 	uint16_t		auto_link_speed_mask;
 	uint32_t		preemphasis;
 	uint8_t			phy_type;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index af6ae8bba..8ff4c15d4 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -504,7 +504,8 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf)
 				HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_ALL_SPEEDS;
 		}
 		/* AutoNeg - Advertise speeds specified. */
-		if (conf->auto_link_speed_mask) {
+		if (conf->auto_link_speed_mask &&
+		    !(conf->phy_flags & HWRM_PORT_PHY_CFG_INPUT_FLAGS_FORCE)) {
 			req.auto_mode =
 				HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_SPEED_MASK;
 			req.auto_link_speed_mask =
@@ -566,6 +567,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
 	link_info->support_speeds = rte_le_to_cpu_16(resp->support_speeds);
 	link_info->auto_link_speed = rte_le_to_cpu_16(resp->auto_link_speed);
 	link_info->preemphasis = rte_le_to_cpu_32(resp->preemphasis);
+	link_info->force_link_speed = rte_le_to_cpu_16(resp->force_link_speed);
 	link_info->phy_ver[0] = resp->phy_maj;
 	link_info->phy_ver[1] = resp->phy_min;
 	link_info->phy_ver[2] = resp->phy_bld;
@@ -1521,7 +1523,9 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
 	autoneg = bnxt_check_eth_link_autoneg(dev_conf->link_speeds);
 	speed = bnxt_parse_eth_link_speed(dev_conf->link_speeds);
 	link_req.phy_flags = HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESET_PHY;
-	if (autoneg == 1) {
+	/* Autoneg can be done only when the FW allows */
+	if (autoneg == 1 && !(bp->link_info.auto_link_speed ||
+				bp->link_info.force_link_speed)) {
 		link_req.phy_flags |=
 				HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESTART_AUTONEG;
 		link_req.auto_link_speed_mask =
@@ -1539,7 +1543,13 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
 		}
 
 		link_req.phy_flags |= HWRM_PORT_PHY_CFG_INPUT_FLAGS_FORCE;
-		link_req.link_speed = speed;
+		/* If user wants a particular speed try that first. */
+		if (speed)
+			link_req.link_speed = speed;
+		else if (bp->link_info.force_link_speed)
+			link_req.link_speed = bp->link_info.force_link_speed;
+		else
+			link_req.link_speed = bp->link_info.auto_link_speed;
 	}
 	link_req.duplex = bnxt_parse_eth_link_duplex(dev_conf->link_speeds);
 	link_req.auto_pause = bp->link_info.auto_pause;
-- 
2.14.2

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

* [dpdk-stable] patch 'net/i40e: check multi-driver option parsing' has been queued to LTS release 16.11.5
  2018-02-09 10:40     ` [dpdk-stable] patch 'net/bnxt: fix Rx checksum flags' " Luca Boccassi
  2018-02-09 10:40       ` [dpdk-stable] patch 'net/bnxt: fix link speed setting with autoneg off' " Luca Boccassi
@ 2018-02-09 10:40       ` Luca Boccassi
  2018-02-09 10:40       ` [dpdk-stable] patch 'app/testpmd: fix flow director filter' " Luca Boccassi
  2 siblings, 0 replies; 111+ messages in thread
From: Luca Boccassi @ 2018-02-09 10:40 UTC (permalink / raw)
  To: Beilei Xing; +Cc: John McNamara, Jingjing Wu, Helin Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/11/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 6b82e58d019b1522c624ba7c8e2875c1c44a4d08 Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Thu, 8 Feb 2018 21:18:12 +0800
Subject: [PATCH] net/i40e: check multi-driver option parsing

[ upstream commit 7469a495aec98082bcd4219cf7a25c6c3867c11a ]

This patch fixes the coverity CHECKED_RETURN issue.

Coverity issue: 261779
Fixes: cfdfca493cae ("net/i40e: fix multiple driver support")

Reported-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 6df9b4600..0b270b690 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1016,8 +1016,12 @@ i40e_support_multi_driver(struct rte_eth_dev *dev)
 			    "the first invalid or last valid one is used !",
 			    ETH_I40E_SUPPORT_MULTI_DRIVER);
 
-	rte_kvargs_process(kvlist, ETH_I40E_SUPPORT_MULTI_DRIVER,
-			   i40e_parse_multi_drv_handler, pf);
+	if (rte_kvargs_process(kvlist, ETH_I40E_SUPPORT_MULTI_DRIVER,
+			       i40e_parse_multi_drv_handler, pf) < 0) {
+		rte_kvargs_free(kvlist);
+		return -EINVAL;
+	}
+
 	rte_kvargs_free(kvlist);
 	return 0;
 }
-- 
2.14.2

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

* [dpdk-stable] patch 'app/testpmd: fix flow director filter' has been queued to LTS release 16.11.5
  2018-02-09 10:40     ` [dpdk-stable] patch 'net/bnxt: fix Rx checksum flags' " Luca Boccassi
  2018-02-09 10:40       ` [dpdk-stable] patch 'net/bnxt: fix link speed setting with autoneg off' " Luca Boccassi
  2018-02-09 10:40       ` [dpdk-stable] patch 'net/i40e: check multi-driver option parsing' " Luca Boccassi
@ 2018-02-09 10:40       ` Luca Boccassi
  2 siblings, 0 replies; 111+ messages in thread
From: Luca Boccassi @ 2018-02-09 10:40 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Jingjing Wu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/11/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 9cab9cbc28a8d4348600301a49772e4bfffad128 Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Thu, 8 Feb 2018 20:35:40 +0800
Subject: [PATCH] app/testpmd: fix flow director filter

[ upstream commit 0abd847be0d146a022b5bb46e4f53d7adaf64c64 ]

This patch fixes issue during dealing with flow
director filter.

Fixes: 6c684f579df5 ("app/testpmd: add or delete flow director filter")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
 app/test-pmd/cmdline.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index f4ff318dc..7171bd631 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -8387,11 +8387,11 @@ struct cmd_flow_director_result {
 	uint16_t port_dst;
 	cmdline_fixed_string_t verify_tag;
 	uint32_t verify_tag_value;
-	cmdline_ipaddr_t tos;
+	cmdline_fixed_string_t tos;
 	uint8_t tos_value;
-	cmdline_ipaddr_t proto;
+	cmdline_fixed_string_t proto;
 	uint8_t proto_value;
-	cmdline_ipaddr_t ttl;
+	cmdline_fixed_string_t ttl;
 	uint8_t ttl_value;
 	cmdline_fixed_string_t vlan;
 	uint16_t vlan_value;
@@ -8923,7 +8923,7 @@ cmdline_parse_inst_t cmd_add_del_sctp_flow_director = {
 		(void *)&cmd_flow_director_flow_type,
 		(void *)&cmd_flow_director_src,
 		(void *)&cmd_flow_director_ip_src,
-		(void *)&cmd_flow_director_port_dst,
+		(void *)&cmd_flow_director_port_src,
 		(void *)&cmd_flow_director_dst,
 		(void *)&cmd_flow_director_ip_dst,
 		(void *)&cmd_flow_director_port_dst,
-- 
2.14.2

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

* [dpdk-stable] patch 'eal/ppc: support sPAPR IOMMU for vfio-pci' has been queued to LTS release 16.11.5
  2018-02-09 10:40       ` [dpdk-stable] patch 'net/bnxt: fix link speed setting with autoneg off' " Luca Boccassi
@ 2018-02-11 12:49         ` Luca Boccassi
  2018-02-11 12:49           ` [dpdk-stable] patch 'igb_uio: switch to new irq function for MSI-X' " Luca Boccassi
                             ` (2 more replies)
  0 siblings, 3 replies; 111+ messages in thread
From: Luca Boccassi @ 2018-02-11 12:49 UTC (permalink / raw)
  To: Gowrishankar Muthukrishnan; +Cc: Anatoly Burakov, Chao Zhu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From d9ceb5272b33254683435b11771a90089fc721be Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Date: Mon, 6 Mar 2017 20:34:15 +0530
Subject: [PATCH] eal/ppc: support sPAPR IOMMU for vfio-pci

[ backported from upstream commit 0fe9830b53452a6747cae9ff1a6bfc737b839a9d ]

Below changes adds pci probing support for vfio-pci devices in power8.

Signed-off-by: Gowrishankar Muthukrishnan <gowrishankar.m@linux.vnet.ibm.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
---
 lib/librte_eal/linuxapp/eal/eal_vfio.c | 90 ++++++++++++++++++++++++++++++++++
 lib/librte_eal/linuxapp/eal/eal_vfio.h | 25 ++++++++++
 2 files changed, 115 insertions(+)

diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c
index 7ea20f3e2..dd451071d 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c
@@ -50,12 +50,15 @@
 static struct vfio_config vfio_cfg;
 
 static int vfio_type1_dma_map(int);
+static int vfio_spapr_dma_map(int);
 static int vfio_noiommu_dma_map(int);
 
 /* IOMMU types we support */
 static const struct vfio_iommu_type iommu_types[] = {
 	/* x86 IOMMU, otherwise known as type 1 */
 	{ RTE_VFIO_TYPE1, "Type 1", &vfio_type1_dma_map},
+	/* ppc64 IOMMU, otherwise known as spapr */
+	{ RTE_VFIO_SPAPR, "sPAPR", &vfio_spapr_dma_map},
 	/* IOMMU-less mode */
 	{ RTE_VFIO_NOIOMMU, "No-IOMMU", &vfio_noiommu_dma_map},
 };
@@ -539,6 +542,93 @@ vfio_type1_dma_map(int vfio_container_fd)
 	return 0;
 }
 
+static int
+vfio_spapr_dma_map(int vfio_container_fd)
+{
+	const struct rte_memseg *ms = rte_eal_get_physmem_layout();
+	int i, ret;
+
+	struct vfio_iommu_spapr_register_memory reg = {
+		.argsz = sizeof(reg),
+		.flags = 0
+	};
+	struct vfio_iommu_spapr_tce_info info = {
+		.argsz = sizeof(info),
+	};
+	struct vfio_iommu_spapr_tce_create create = {
+		.argsz = sizeof(create),
+	};
+	struct vfio_iommu_spapr_tce_remove remove = {
+		.argsz = sizeof(remove),
+	};
+
+	/* query spapr iommu info */
+	ret = ioctl(vfio_container_fd, VFIO_IOMMU_SPAPR_TCE_GET_INFO, &info);
+	if (ret) {
+		RTE_LOG(ERR, EAL, "  cannot get iommu info, "
+				"error %i (%s)\n", errno, strerror(errno));
+		return -1;
+	}
+
+	/* remove default DMA of 32 bit window */
+	remove.start_addr = info.dma32_window_start;
+	ret = ioctl(vfio_container_fd, VFIO_IOMMU_SPAPR_TCE_REMOVE, &remove);
+	if (ret) {
+		RTE_LOG(ERR, EAL, "  cannot remove default DMA window, "
+				"error %i (%s)\n", errno, strerror(errno));
+		return -1;
+	}
+
+	/* calculate window size based on number of hugepages configured */
+	create.window_size = rte_eal_get_physmem_size();
+	create.page_shift = __builtin_ctzll(ms->hugepage_sz);
+	create.levels = 2;
+
+	ret = ioctl(vfio_container_fd, VFIO_IOMMU_SPAPR_TCE_CREATE, &create);
+	if (ret) {
+		RTE_LOG(ERR, EAL, "  cannot create new DMA window, "
+				"error %i (%s)\n", errno, strerror(errno));
+		return -1;
+	}
+
+	/* map all DPDK segments for DMA. use 1:1 PA to IOVA mapping */
+	for (i = 0; i < RTE_MAX_MEMSEG; i++) {
+		struct vfio_iommu_type1_dma_map dma_map;
+
+		if (ms[i].addr == NULL)
+			break;
+
+		reg.vaddr = (uintptr_t) ms[i].addr;
+		reg.size = ms[i].len;
+		ret = ioctl(vfio_container_fd,
+			VFIO_IOMMU_SPAPR_REGISTER_MEMORY, &reg);
+		if (ret) {
+			RTE_LOG(ERR, EAL, "  cannot register vaddr for IOMMU, "
+				"error %i (%s)\n", errno, strerror(errno));
+			return -1;
+		}
+
+		memset(&dma_map, 0, sizeof(dma_map));
+		dma_map.argsz = sizeof(struct vfio_iommu_type1_dma_map);
+		dma_map.vaddr = ms[i].addr_64;
+		dma_map.size = ms[i].len;
+		dma_map.iova = ms[i].phys_addr;
+		dma_map.flags = VFIO_DMA_MAP_FLAG_READ |
+				 VFIO_DMA_MAP_FLAG_WRITE;
+
+		ret = ioctl(vfio_container_fd, VFIO_IOMMU_MAP_DMA, &dma_map);
+
+		if (ret) {
+			RTE_LOG(ERR, EAL, "  cannot set up DMA remapping, "
+				"error %i (%s)\n", errno, strerror(errno));
+			return -1;
+		}
+
+	}
+
+	return 0;
+}
+
 static int
 vfio_noiommu_dma_map(int __rte_unused vfio_container_fd)
 {
diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.h b/lib/librte_eal/linuxapp/eal/eal_vfio.h
index 29f7f3eca..ac31a4fc1 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.h
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.h
@@ -54,6 +54,31 @@
 
 #define RTE_VFIO_TYPE1 VFIO_TYPE1_IOMMU
 
+#ifndef VFIO_SPAPR_TCE_v2_IOMMU
+#define RTE_VFIO_SPAPR 7
+#define VFIO_IOMMU_SPAPR_REGISTER_MEMORY _IO(VFIO_TYPE, VFIO_BASE + 17)
+#define VFIO_IOMMU_SPAPR_TCE_CREATE _IO(VFIO_TYPE, VFIO_BASE + 19)
+#define VFIO_IOMMU_SPAPR_TCE_REMOVE _IO(VFIO_TYPE, VFIO_BASE + 20)
+struct vfio_iommu_spapr_register_memory {
+	uint32_t argsz;
+	uint32_t flags;
+	uint64_t vaddr;
+	uint64_t size;
+};
+struct vfio_iommu_spapr_tce_create {
+	uint32_t argsz;
+	uint32_t page_shift;
+	uint64_t window_size;
+	uint32_t levels;
+};
+struct vfio_iommu_spapr_tce_remove {
+	uint32_t argsz;
+	uint64_t start_addr;
+};
+#else
+#define RTE_VFIO_SPAPR VFIO_SPAPR_TCE_v2_IOMMU
+#endif
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)
 #define RTE_VFIO_NOIOMMU 8
 #else
-- 
2.14.2

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

* [dpdk-stable] patch 'igb_uio: switch to new irq function for MSI-X' has been queued to LTS release 16.11.5
  2018-02-11 12:49         ` [dpdk-stable] patch 'eal/ppc: support sPAPR IOMMU for vfio-pci' " Luca Boccassi
@ 2018-02-11 12:49           ` Luca Boccassi
  2018-02-15 12:03             ` [dpdk-stable] patch 'ethdev: fix data alignment' " Luca Boccassi
  2018-02-11 12:49           ` [dpdk-stable] patch 'igb_uio: fix IRQ disable on recent kernels' " Luca Boccassi
  2018-02-11 12:49           ` [dpdk-stable] patch 'igb_uio: fix MSI-X IRQ assignment with new IRQ function' " Luca Boccassi
  2 siblings, 1 reply; 111+ messages in thread
From: Luca Boccassi @ 2018-02-11 12:49 UTC (permalink / raw)
  To: Nicolas Dichtel; +Cc: David Marchand, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From d797ceba4ae934c11694ed3495604e55339cff30 Mon Sep 17 00:00:00 2001
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Thu, 20 Apr 2017 15:11:23 +0200
Subject: [PATCH] igb_uio: switch to new irq function for MSI-X

[ backported from upstream commit 99bb58f3adc73046b538874a0944578146ee1189 ]

pci_enable_msix() will be removed in kernel 4.12.
The new API pci_alloc_irq_vectors() is available
since linux 4.8, thus let's use it.

Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=aff171641d18
Link: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=4244de1c64de

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Reviewed-by: David Marchand <david.marchand@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/linuxapp/igb_uio/compat.h  |  4 ++++
 lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 11 +++++++++++
 2 files changed, 15 insertions(+)

diff --git a/lib/librte_eal/linuxapp/igb_uio/compat.h b/lib/librte_eal/linuxapp/igb_uio/compat.h
index 0d781e482..b800a53cd 100644
--- a/lib/librte_eal/linuxapp/igb_uio/compat.h
+++ b/lib/librte_eal/linuxapp/igb_uio/compat.h
@@ -123,3 +123,7 @@ static bool pci_check_and_mask_intx(struct pci_dev *pdev)
 }
 
 #endif /* < 3.3.0 */
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)
+#define HAVE_PCI_ENABLE_MSIX
+#endif
diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
index df41e457a..683cd8cf1 100644
--- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
+++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
@@ -325,7 +325,9 @@ static int
 igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 {
 	struct rte_uio_pci_dev *udev;
+#ifdef HAVE_PCI_ENABLE_MSIX
 	struct msix_entry msix_entry;
+#endif
 	int err;
 
 	udev = kzalloc(sizeof(struct rte_uio_pci_dev), GFP_KERNEL);
@@ -379,6 +381,7 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 	switch (igbuio_intr_mode_preferred) {
 	case RTE_INTR_MODE_MSIX:
 		/* Only 1 msi-x vector needed */
+#ifdef HAVE_PCI_ENABLE_MSIX
 		msix_entry.entry = 0;
 		if (pci_enable_msix(dev, &msix_entry, 1) == 0) {
 			dev_dbg(&dev->dev, "using MSI-X");
@@ -386,6 +389,14 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 			udev->mode = RTE_INTR_MODE_MSIX;
 			break;
 		}
+#else
+		if (pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_MSIX) == 1) {
+			dev_dbg(&dev->dev, "using MSI-X");
+			udev->info.irq = pci_irq_vector(dev, 0);
+			udev->mode = RTE_INTR_MODE_MSIX;
+			break;
+		}
+#endif
 		/* fall back to INTX */
 	case RTE_INTR_MODE_LEGACY:
 		if (pci_intx_mask_supported(dev)) {
-- 
2.14.2

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

* [dpdk-stable] patch 'igb_uio: fix IRQ disable on recent kernels' has been queued to LTS release 16.11.5
  2018-02-11 12:49         ` [dpdk-stable] patch 'eal/ppc: support sPAPR IOMMU for vfio-pci' " Luca Boccassi
  2018-02-11 12:49           ` [dpdk-stable] patch 'igb_uio: switch to new irq function for MSI-X' " Luca Boccassi
@ 2018-02-11 12:49           ` Luca Boccassi
  2018-02-11 12:49           ` [dpdk-stable] patch 'igb_uio: fix MSI-X IRQ assignment with new IRQ function' " Luca Boccassi
  2 siblings, 0 replies; 111+ messages in thread
From: Luca Boccassi @ 2018-02-11 12:49 UTC (permalink / raw)
  To: Markus Theil; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 530abc0cd524403d081fa19540ab778c320eb37f Mon Sep 17 00:00:00 2001
From: Markus Theil <markus.theil@tu-ilmenau.de>
Date: Tue, 5 Sep 2017 14:04:02 +0200
Subject: [PATCH] igb_uio: fix IRQ disable on recent kernels

[ backported from upstream commit 9838673e32fd0af4aa03f4d230ba9be318b4f9d7 ]

igb_uio already allocates irqs using pci_alloc_irq_vectors on
recent kernels >= 4.8. The interrupt disable code was not
using the corresponding pci_free_irq_vectors, but the also
deprecated pci_disable_msix, before this fix.

Fixes: 99bb58f3adc7 ("igb_uio: switch to new irq function for MSI-X")
Cc: stable@dpdk.org

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/linuxapp/igb_uio/compat.h  |  4 ++--
 lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 14 ++++++++++++--
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/linuxapp/igb_uio/compat.h b/lib/librte_eal/linuxapp/igb_uio/compat.h
index b800a53cd..38259330c 100644
--- a/lib/librte_eal/linuxapp/igb_uio/compat.h
+++ b/lib/librte_eal/linuxapp/igb_uio/compat.h
@@ -124,6 +124,6 @@ static bool pci_check_and_mask_intx(struct pci_dev *pdev)
 
 #endif /* < 3.3.0 */
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)
-#define HAVE_PCI_ENABLE_MSIX
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
+#define HAVE_ALLOC_IRQ_VECTORS 1
 #endif
diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
index 683cd8cf1..b6406d861 100644
--- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
+++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
@@ -325,7 +325,7 @@ static int
 igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 {
 	struct rte_uio_pci_dev *udev;
-#ifdef HAVE_PCI_ENABLE_MSIX
+#ifndef HAVE_ALLOC_IRQ_VECTORS
 	struct msix_entry msix_entry;
 #endif
 	int err;
@@ -381,7 +381,7 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 	switch (igbuio_intr_mode_preferred) {
 	case RTE_INTR_MODE_MSIX:
 		/* Only 1 msi-x vector needed */
-#ifdef HAVE_PCI_ENABLE_MSIX
+#ifndef HAVE_ALLOC_IRQ_VECTORS
 		msix_entry.entry = 0;
 		if (pci_enable_msix(dev, &msix_entry, 1) == 0) {
 			dev_dbg(&dev->dev, "using MSI-X");
@@ -440,8 +440,13 @@ fail_remove_group:
 	sysfs_remove_group(&dev->dev.kobj, &dev_attr_grp);
 fail_release_iomem:
 	igbuio_pci_release_iomem(&udev->info);
+#ifndef HAVE_ALLOC_IRQ_VECTORS
 	if (udev->mode == RTE_INTR_MODE_MSIX)
 		pci_disable_msix(udev->pdev);
+#else
+	if (udev->mode == RTE_INTR_MODE_MSIX)
+		pci_free_irq_vectors(udev->pdev);
+#endif
 	pci_disable_device(dev);
 fail_free:
 	kfree(udev);
@@ -457,8 +462,13 @@ igbuio_pci_remove(struct pci_dev *dev)
 	sysfs_remove_group(&dev->dev.kobj, &dev_attr_grp);
 	uio_unregister_device(&udev->info);
 	igbuio_pci_release_iomem(&udev->info);
+#ifndef HAVE_ALLOC_IRQ_VECTORS
 	if (udev->mode == RTE_INTR_MODE_MSIX)
 		pci_disable_msix(dev);
+#else
+	if (udev->mode == RTE_INTR_MODE_MSIX)
+		pci_free_irq_vectors(dev);
+#endif
 	pci_disable_device(dev);
 	pci_set_drvdata(dev, NULL);
 	kfree(udev);
-- 
2.14.2

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

* [dpdk-stable] patch 'igb_uio: fix MSI-X IRQ assignment with new IRQ function' has been queued to LTS release 16.11.5
  2018-02-11 12:49         ` [dpdk-stable] patch 'eal/ppc: support sPAPR IOMMU for vfio-pci' " Luca Boccassi
  2018-02-11 12:49           ` [dpdk-stable] patch 'igb_uio: switch to new irq function for MSI-X' " Luca Boccassi
  2018-02-11 12:49           ` [dpdk-stable] patch 'igb_uio: fix IRQ disable on recent kernels' " Luca Boccassi
@ 2018-02-11 12:49           ` Luca Boccassi
  2 siblings, 0 replies; 111+ messages in thread
From: Luca Boccassi @ 2018-02-11 12:49 UTC (permalink / raw)
  To: Markus Theil; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/13/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 12072d9c907386f5c0030e8c82026da818e5ab2c Mon Sep 17 00:00:00 2001
From: Markus Theil <markus.theil@tu-ilmenau.de>
Date: Tue, 5 Sep 2017 14:04:03 +0200
Subject: [PATCH] igb_uio: fix MSI-X IRQ assignment with new IRQ function

[ backported from upstream commit d26fc87aa26953f97e6c93d07ee9cc1415e44e20 ]

The patch which introduced the usage of pci_alloc_irq_vectors
came after the patch which switched to non-threaded ISR (f0d1896fa1),
but did not use non-threaded ISR, if pci_alloc_irq_vectors
is used.

Fixes: 99bb58f3adc7 ("igb_uio: switch to new irq function for MSI-X")
Cc: stable@dpdk.org

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
index b6406d861..9f00f07ab 100644
--- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
+++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
@@ -392,6 +392,7 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 #else
 		if (pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_MSIX) == 1) {
 			dev_dbg(&dev->dev, "using MSI-X");
+			udev->info.irq_flags = IRQF_NO_THREAD;
 			udev->info.irq = pci_irq_vector(dev, 0);
 			udev->mode = RTE_INTR_MODE_MSIX;
 			break;
-- 
2.14.2

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

* [dpdk-stable] patch 'ethdev: fix data alignment' has been queued to LTS release 16.11.5
  2018-02-11 12:49           ` [dpdk-stable] patch 'igb_uio: switch to new irq function for MSI-X' " Luca Boccassi
@ 2018-02-15 12:03             ` Luca Boccassi
  2018-02-15 12:03               ` [dpdk-stable] patch 'net/virtio: fix mbuf data offset for simple Rx' " Luca Boccassi
                                 ` (5 more replies)
  0 siblings, 6 replies; 111+ messages in thread
From: Luca Boccassi @ 2018-02-15 12:03 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Pavan Nikhilesh, Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/17/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 648370d23204f13c3ec35baf68ed4f9e539a5bfd Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Date: Mon, 12 Feb 2018 18:43:43 +0530
Subject: [PATCH] ethdev: fix data alignment

[ upstream commit 740cecb24f52a945c0d40d6073ff0b2acc5c0616 ]

The struct rte_eth_dev_data is used in ethdev fastpath routines
and it not aligned to cache line size. This patch fixes the ethdev
data alignment.

The alignment was broken from the "first public release" changeset
where ethdev data address was aligned only to the first port.
Remaining ports alignment was defined by the size of the struct
(rte_eth_dev_data). This scheme is not guaranteed to be cache line
aligned all the time.

"ethdev: add port ownership" change set introduced a
rte_eth_dev_shared_data container for port ownership change,
This resulted in rte_eth_dev->data memory for the first port also
as cache unaligned.

Added a compiler alignment attribute to make sure
rte_eth_dev->data always cache aligned so that CPU/compiler
1) Avoid sharing the element with another cache line
2) Can load/store the elements in struct rte_eth_dev_data as
naturally aligned.

Some platform like thunderX could see performance regression of 1%
at "ethdev: add port ownership" change set with
1 port/1 queue l3fwd application and this patch fixes that regression.

example command:
sudo ./examples/l3fwd/build/l3fwd -c 0xff00 -- -p 0x1 --config="(0,0,9)"

Fixes: af75078fece3 ("first public release")
Fixes: 5b7ba31148a8 ("ethdev: add port ownership")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_ether/rte_ethdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 13a7c8a86..dc6d0cc91 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -1694,7 +1694,7 @@ struct rte_eth_dev_data {
 	enum rte_kernel_driver kdrv;    /**< Kernel driver passthrough */
 	int numa_node;  /**< NUMA node connection */
 	const char *drv_name;   /**< Driver name */
-};
+} __rte_cache_aligned;
 
 /** Device supports hotplug detach */
 #define RTE_ETH_DEV_DETACHABLE   0x0001
-- 
2.14.2

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

* [dpdk-stable] patch 'net/virtio: fix mbuf data offset for simple Rx' has been queued to LTS release 16.11.5
  2018-02-15 12:03             ` [dpdk-stable] patch 'ethdev: fix data alignment' " Luca Boccassi
@ 2018-02-15 12:03               ` Luca Boccassi
  2018-02-15 12:03               ` [dpdk-stable] patch 'net/virtio: fix resuming port with Rx vector path' " Luca Boccassi
                                 ` (4 subsequent siblings)
  5 siblings, 0 replies; 111+ messages in thread
From: Luca Boccassi @ 2018-02-15 12:03 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/17/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 7afdb08d88e46b6dabb71a5d3cbfb8c473f2c4be Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Mon, 12 Feb 2018 16:46:10 +0100
Subject: [PATCH] net/virtio: fix mbuf data offset for simple Rx

[ upstream commit 9fedc2da388cbe261e43c7b1cafb7463ccce3747 ]

The mbuf->data_off was was not properly set for the first received
mbufs. Fix this by setting it in virtqueue_enqueue_recv_refill_simple(),
which is used to enqueue the first mbuf in the ring.

The function virtio_rxq_rearm_vec(), which is used to rearm the ring
with new mbufs, is valid and does not need to be updated.

Fixes: cab0461234e7 ("virtio: fill Rx avail ring with blank mbufs")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_rxtx_simple.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/virtio/virtio_rxtx_simple.c b/drivers/net/virtio/virtio_rxtx_simple.c
index a6c0b34e7..aa29b6eec 100644
--- a/drivers/net/virtio/virtio_rxtx_simple.c
+++ b/drivers/net/virtio/virtio_rxtx_simple.c
@@ -66,6 +66,7 @@ virtqueue_enqueue_recv_refill_simple(struct virtqueue *vq,
 	uint16_t desc_idx;
 
 	cookie->port = vq->rxq.port_id;
+	cookie->data_off = RTE_PKTMBUF_HEADROOM;
 
 	desc_idx = vq->vq_avail_idx & (vq->vq_nentries - 1);
 	dxp = &vq->vq_descx[desc_idx];
-- 
2.14.2

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

* [dpdk-stable] patch 'net/virtio: fix resuming port with Rx vector path' has been queued to LTS release 16.11.5
  2018-02-15 12:03             ` [dpdk-stable] patch 'ethdev: fix data alignment' " Luca Boccassi
  2018-02-15 12:03               ` [dpdk-stable] patch 'net/virtio: fix mbuf data offset for simple Rx' " Luca Boccassi
@ 2018-02-15 12:03               ` Luca Boccassi
  2018-02-15 12:03               ` [dpdk-stable] patch 'net/vhost: fix log messages on create/destroy' " Luca Boccassi
                                 ` (3 subsequent siblings)
  5 siblings, 0 replies; 111+ messages in thread
From: Luca Boccassi @ 2018-02-15 12:03 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Olivier Matz, Tiwei Bie, Jianfeng Tan, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/17/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From a7fd826d344d65863e9164bf5dbf45c6d0d6ae7d Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Mon, 12 Feb 2018 16:46:11 +0100
Subject: [PATCH] net/virtio: fix resuming port with Rx vector path

[ upstream commit 478574706638ff78cbc7e82731a4eae743322ac6 ]

Since commit efc83a1e7fc3 ("net/virtio: fix queue setup consistency"),
when resuming a virtio port, the rx rings are refilled with new mbufs
until they are full (vq->vq_free_cnt == 0). This is done without
ensuring that the descriptor index remains a multiple of
RTE_VIRTIO_VPMD_RX_REARM_THRESH, which is a prerequisite when using the
vector mode. This can cause an out of bound access in the rx ring.

This commit changes the vector refill method from
virtqueue_enqueue_recv_refill_simple() to virtio_rxq_rearm_vec(), which
properly checks that the refill is done by batch of
RTE_VIRTIO_VPMD_RX_REARM_THRESH.

As virtqueue_enqueue_recv_refill_simple() is no more used, this
patch also removes the function.

Fixes: efc83a1e7fc3 ("net/virtio: fix queue setup consistency")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
---
 drivers/net/virtio/virtio_rxtx.c        | 38 ++++++++++++++++++---------------
 drivers/net/virtio/virtio_rxtx.h        |  3 ---
 drivers/net/virtio/virtio_rxtx_simple.c | 31 +--------------------------
 drivers/net/virtio/virtio_rxtx_simple.h |  2 +-
 4 files changed, 23 insertions(+), 51 deletions(-)

diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 285af8a37..c2fe9eb57 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -61,6 +61,7 @@
 #include "virtio_pci.h"
 #include "virtqueue.h"
 #include "virtio_rxtx.h"
+#include "virtio_rxtx_simple.h"
 
 #ifdef RTE_LIBRTE_VIRTIO_DEBUG_DUMP
 #define VIRTIO_DUMP_PACKET(m, len) rte_pktmbuf_dump(stdout, m, len)
@@ -458,6 +459,8 @@ virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx)
 			vq->vq_ring.desc[desc_idx].flags =
 				VRING_DESC_F_WRITE;
 		}
+
+		virtio_rxq_vec_setup(rxvq);
 	}
 
 	memset(&rxvq->fake_mbuf, 0, sizeof(rxvq->fake_mbuf));
@@ -467,30 +470,31 @@ virtio_dev_rx_queue_setup_finish(struct rte_eth_dev *dev, uint16_t queue_idx)
 			&rxvq->fake_mbuf;
 	}
 
-	while (!virtqueue_full(vq)) {
-		m = rte_mbuf_raw_alloc(rxvq->mpool);
-		if (m == NULL)
-			break;
+	if (hw->use_simple_rxtx) {
+		while (vq->vq_free_cnt >= RTE_VIRTIO_VPMD_RX_REARM_THRESH) {
+			virtio_rxq_rearm_vec(rxvq);
+			nbufs += RTE_VIRTIO_VPMD_RX_REARM_THRESH;
+		}
+	} else {
+		while (!virtqueue_full(vq)) {
+			m = rte_mbuf_raw_alloc(rxvq->mpool);
+			if (m == NULL)
+				break;
 
-		/* Enqueue allocated buffers */
-		if (hw->use_simple_rxtx)
-			error = virtqueue_enqueue_recv_refill_simple(vq, m);
-		else
+			/* Enqueue allocated buffers */
 			error = virtqueue_enqueue_recv_refill(vq, m);
-
-		if (error) {
-			rte_pktmbuf_free(m);
-			break;
+			if (error) {
+				rte_pktmbuf_free(m);
+				break;
+			}
+			nbufs++;
 		}
-		nbufs++;
+
+		vq_update_avail_idx(vq);
 	}
 
-	vq_update_avail_idx(vq);
-
 	PMD_INIT_LOG(DEBUG, "Allocated %d bufs", nbufs);
 
-	virtio_rxq_vec_setup(rxvq);
-
 	VIRTQUEUE_DUMP(vq);
 
 	return 0;
diff --git a/drivers/net/virtio/virtio_rxtx.h b/drivers/net/virtio/virtio_rxtx.h
index 28f82d6a8..e2db823d4 100644
--- a/drivers/net/virtio/virtio_rxtx.h
+++ b/drivers/net/virtio/virtio_rxtx.h
@@ -88,7 +88,4 @@ struct virtnet_ctl {
 
 int virtio_rxq_vec_setup(struct virtnet_rx *rxvq);
 
-int virtqueue_enqueue_recv_refill_simple(struct virtqueue *vq,
-	struct rte_mbuf *m);
-
 #endif /* _VIRTIO_RXTX_H_ */
diff --git a/drivers/net/virtio/virtio_rxtx_simple.c b/drivers/net/virtio/virtio_rxtx_simple.c
index aa29b6eec..5285c2b18 100644
--- a/drivers/net/virtio/virtio_rxtx_simple.c
+++ b/drivers/net/virtio/virtio_rxtx_simple.c
@@ -57,35 +57,6 @@
 #pragma GCC diagnostic ignored "-Wcast-qual"
 #endif
 
-int __attribute__((cold))
-virtqueue_enqueue_recv_refill_simple(struct virtqueue *vq,
-	struct rte_mbuf *cookie)
-{
-	struct vq_desc_extra *dxp;
-	struct vring_desc *start_dp;
-	uint16_t desc_idx;
-
-	cookie->port = vq->rxq.port_id;
-	cookie->data_off = RTE_PKTMBUF_HEADROOM;
-
-	desc_idx = vq->vq_avail_idx & (vq->vq_nentries - 1);
-	dxp = &vq->vq_descx[desc_idx];
-	dxp->cookie = (void *)cookie;
-	vq->sw_ring[desc_idx] = cookie;
-
-	start_dp = vq->vq_ring.desc;
-	start_dp[desc_idx].addr =
-		VIRTIO_MBUF_ADDR(cookie, vq) +
-		RTE_PKTMBUF_HEADROOM - vq->hw->vtnet_hdr_size;
-	start_dp[desc_idx].len = cookie->buf_len -
-		RTE_PKTMBUF_HEADROOM + vq->hw->vtnet_hdr_size;
-
-	vq->vq_free_cnt--;
-	vq->vq_avail_idx++;
-
-	return 0;
-}
-
 uint16_t
 virtio_xmit_pkts_simple(void *tx_queue, struct rte_mbuf **tx_pkts,
 	uint16_t nb_pkts)
@@ -103,7 +74,7 @@ virtio_xmit_pkts_simple(void *tx_queue, struct rte_mbuf **tx_pkts,
 	rte_compiler_barrier();
 
 	if (nb_used >= VIRTIO_TX_FREE_THRESH)
-		virtio_xmit_cleanup(vq);
+		virtio_xmit_cleanup_simple(vq);
 
 	nb_commit = nb_pkts = RTE_MIN((vq->vq_free_cnt >> 1), nb_pkts);
 	desc_idx = (uint16_t)(vq->vq_avail_idx & desc_idx_max);
diff --git a/drivers/net/virtio/virtio_rxtx_simple.h b/drivers/net/virtio/virtio_rxtx_simple.h
index b08f85948..bca677c0f 100644
--- a/drivers/net/virtio/virtio_rxtx_simple.h
+++ b/drivers/net/virtio/virtio_rxtx_simple.h
@@ -89,7 +89,7 @@ virtio_rxq_rearm_vec(struct virtnet_rx *rxvq)
 #define VIRTIO_TX_FREE_NR 32
 /* TODO: vq->tx_free_cnt could mean num of free slots so we could avoid shift */
 static inline void
-virtio_xmit_cleanup(struct virtqueue *vq)
+virtio_xmit_cleanup_simple(struct virtqueue *vq)
 {
 	uint16_t i, desc_idx;
 	uint32_t nb_free = 0;
-- 
2.14.2

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

* [dpdk-stable] patch 'net/vhost: fix log messages on create/destroy' has been queued to LTS release 16.11.5
  2018-02-15 12:03             ` [dpdk-stable] patch 'ethdev: fix data alignment' " Luca Boccassi
  2018-02-15 12:03               ` [dpdk-stable] patch 'net/virtio: fix mbuf data offset for simple Rx' " Luca Boccassi
  2018-02-15 12:03               ` [dpdk-stable] patch 'net/virtio: fix resuming port with Rx vector path' " Luca Boccassi
@ 2018-02-15 12:03               ` Luca Boccassi
  2018-02-15 12:03               ` [dpdk-stable] patch 'net/virtio-user: fix start with kernel vhost' " Luca Boccassi
                                 ` (2 subsequent siblings)
  5 siblings, 0 replies; 111+ messages in thread
From: Luca Boccassi @ 2018-02-15 12:03 UTC (permalink / raw)
  To: Jianfeng Tan; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/17/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From c950c3ddba913260cb4aec61c282e4fdec4467ca Mon Sep 17 00:00:00 2001
From: Jianfeng Tan <jianfeng.tan@intel.com>
Date: Mon, 12 Feb 2018 03:20:26 +0000
Subject: [PATCH] net/vhost: fix log messages on create/destroy

[ upstream commit 601e65370a7e41c72e4081d101c706a1e09fcf76 ]

The original words are not accurate. For example, as destroy_device
callback gets called, it does not necessarily mean that the connection
is closed.

Fixes: ee584e9710b9 ("vhost: add driver on top of the library")

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 328dde081..8fde6030e 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -558,7 +558,7 @@ new_device(int vid)
 		rte_atomic32_set(&vq->allow_queuing, 1);
 	}
 
-	RTE_LOG(INFO, PMD, "New connection established\n");
+	RTE_LOG(INFO, PMD, "Vhost device %d created\n", vid);
 
 	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 
@@ -625,7 +625,7 @@ destroy_device(int vid)
 	state->max_vring = 0;
 	rte_spinlock_unlock(&state->lock);
 
-	RTE_LOG(INFO, PMD, "Connection closed\n");
+	RTE_LOG(INFO, PMD, "Vhost device %d destroyed\n", vid);
 
 	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
-- 
2.14.2

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

* [dpdk-stable] patch 'net/virtio-user: fix start with kernel vhost' has been queued to LTS release 16.11.5
  2018-02-15 12:03             ` [dpdk-stable] patch 'ethdev: fix data alignment' " Luca Boccassi
                                 ` (2 preceding siblings ...)
  2018-02-15 12:03               ` [dpdk-stable] patch 'net/vhost: fix log messages on create/destroy' " Luca Boccassi
@ 2018-02-15 12:03               ` Luca Boccassi
  2018-02-15 12:03               ` [dpdk-stable] patch 'examples/exception_path: align stats on cache line' " Luca Boccassi
  2018-02-15 12:03               ` [dpdk-stable] patch 'doc: fix outdated link to IPsec white paper' " Luca Boccassi
  5 siblings, 0 replies; 111+ messages in thread
From: Luca Boccassi @ 2018-02-15 12:03 UTC (permalink / raw)
  To: Jianfeng Tan; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/17/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 46c71a6e94c76ac2d9e3dfb07694940d28db5369 Mon Sep 17 00:00:00 2001
From: Jianfeng Tan <jianfeng.tan@intel.com>
Date: Mon, 12 Feb 2018 03:20:27 +0000
Subject: [PATCH] net/virtio-user: fix start with kernel vhost

[ upstream commit bce7e9050f9b5e92cead60e8ac7768812ce898f2 ]

After reset owner in below patch, we failed to set owner before
sending further vhost messages. It is OK with vhost user implemented
DPDK/VPP/Contrail, but it sees "Operation not permitted" error when
used with vhost kernel.

We fix this by setting owner every time the device is started.

Fixes: 0d6a8752ac9d ("net/virtio-user: fix crash as features change")

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_user/virtio_user_dev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 91f6a59a9..8bb155d8c 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -142,6 +142,9 @@ virtio_user_start_device(struct virtio_user_dev *dev)
 	uint64_t features;
 	int ret;
 
+	/* Do not check return as already done in init, or reset in stop */
+	vhost_user_sock(dev->vhostfd, VHOST_USER_SET_OWNER, NULL);
+
 	/* Step 0: tell vhost to create queues */
 	if (virtio_user_queue_setup(dev, virtio_user_create_queue) < 0)
 		goto error;
@@ -240,6 +243,7 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
 		PMD_INIT_LOG(ERR, "backend set up fails");
 		return -1;
 	}
+
 	if (vhost_user_sock(dev->vhostfd, VHOST_USER_SET_OWNER, NULL) < 0) {
 		PMD_INIT_LOG(ERR, "set_owner fails: %s", strerror(errno));
 		return -1;
-- 
2.14.2

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

* [dpdk-stable] patch 'examples/exception_path: align stats on cache line' has been queued to LTS release 16.11.5
  2018-02-15 12:03             ` [dpdk-stable] patch 'ethdev: fix data alignment' " Luca Boccassi
                                 ` (3 preceding siblings ...)
  2018-02-15 12:03               ` [dpdk-stable] patch 'net/virtio-user: fix start with kernel vhost' " Luca Boccassi
@ 2018-02-15 12:03               ` Luca Boccassi
  2018-02-15 12:03               ` [dpdk-stable] patch 'doc: fix outdated link to IPsec white paper' " Luca Boccassi
  5 siblings, 0 replies; 111+ messages in thread
From: Luca Boccassi @ 2018-02-15 12:03 UTC (permalink / raw)
  To: Dustin Lundquist; +Cc: Remy Horton, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/17/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 908fe358e3dee537d7883776ea740f409d548a46 Mon Sep 17 00:00:00 2001
From: Dustin Lundquist <dustin@null-ptr.net>
Date: Tue, 13 Feb 2018 08:58:56 -0800
Subject: [PATCH] examples/exception_path: align stats on cache line

[ upstream commit ec94968ed4c53d7fa16a49b7243ece10b93ab8ba ]

Align stats structure to cache line to prevent bouncing per CPU stats
structure between cache lines.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Dustin Lundquist <dustin@null-ptr.net>
Acked-by: Remy Horton <remy.horton@intel.com>
---
 examples/exception_path/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/exception_path/main.c b/examples/exception_path/main.c
index 89bf1cc06..331d2f484 100644
--- a/examples/exception_path/main.c
+++ b/examples/exception_path/main.c
@@ -141,7 +141,7 @@ struct stats {
 	uint64_t rx;
 	uint64_t tx;
 	uint64_t dropped;
-};
+} __rte_cache_aligned;
 
 /* Array of lcore-specific stats */
 static struct stats lcore_stats[RTE_MAX_LCORE];
-- 
2.14.2

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

* [dpdk-stable] patch 'doc: fix outdated link to IPsec white paper' has been queued to LTS release 16.11.5
  2018-02-15 12:03             ` [dpdk-stable] patch 'ethdev: fix data alignment' " Luca Boccassi
                                 ` (4 preceding siblings ...)
  2018-02-15 12:03               ` [dpdk-stable] patch 'examples/exception_path: align stats on cache line' " Luca Boccassi
@ 2018-02-15 12:03               ` Luca Boccassi
  5 siblings, 0 replies; 111+ messages in thread
From: Luca Boccassi @ 2018-02-15 12:03 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.5

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/17/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 7d767d0b63b0f43be1a6e528547c789dd6ffcab4 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Wed, 14 Feb 2018 17:14:06 +0000
Subject: [PATCH] doc: fix outdated link to IPsec white paper

[ upstream commit d429cc0b53735cc7b1e304ec1d0f35ae06ace7d0 ]

Fixes: 924e84f87306 ("aesni_mb: add driver for multi buffer based crypto")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/cryptodevs/aesni_mb.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/cryptodevs/aesni_mb.rst b/doc/guides/cryptodevs/aesni_mb.rst
index 10e5473d2..4d44d5296 100644
--- a/doc/guides/cryptodevs/aesni_mb.rst
+++ b/doc/guides/cryptodevs/aesni_mb.rst
@@ -34,7 +34,7 @@ AESN-NI Multi Buffer Crytpo Poll Mode Driver
 The AESNI MB PMD (**librte_pmd_aesni_mb**) provides poll mode crypto driver
 support for utilizing Intel multi buffer library, see the white paper
 `Fast Multi-buffer IPsec Implementations on Intel® Architecture Processors
-<https://www-ssl.intel.com/content/www/us/en/intelligent-systems/intel-technology/fast-multi-buffer-ipsec-implementations-ia-processors-paper.html?wapkw=multi+buffer>`_.
+<https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/fast-multi-buffer-ipsec-implementations-ia-processors-paper.pdf>`_.
 
 The AES-NI MB PMD has current only been tested on Fedora 21 64-bit with gcc.
 
-- 
2.14.2

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

end of thread, other threads:[~2018-02-15 12:03 UTC | newest]

Thread overview: 111+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-26 13:12 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 16.11.5 luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'eal: update assertion macro' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'contigmem: fix build on FreeBSD 12' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'mem: fix mmap error check on huge page attach' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'app/testpmd: fix crash of txonly with multiple segments' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'mbuf: cleanup function to get last segment' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'bus/pci: fix interrupt handler type' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'memzone: fix leak on allocation error' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'malloc: protect stats with lock' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'malloc: fix end for bounded elements' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'vfio: fix enabled check on error' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'pmdinfogen: fix cross compilation for ARM big endian' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'lpm: fix ARM big endian build' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/i40e: " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/ixgbe: " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'examples/l3fwd-power: fix Rx without interrupt' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'examples/l3fwd-power: fix frequency detection' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/nfp: fix MTU settings' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/nfp: fix jumbo " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/nfp: fix CRC strip check behaviour' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/thunderx: fix multi segment Tx function return' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/szedata2: fix check of mmap return value' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/bonding: fix activated slave in 8023ad mode' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/qede: fix to reject config with no Rx queue' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'ethdev: fix missing imissed counter in xstats' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'ethdev: fix typo in functions comment' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/i40e: fix VLAN offload setting' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/fm10k: fix logical port delete' " luca.boccassi
2018-01-26 13:12 ` [dpdk-stable] patch 'net/igb: fix Tx queue number assignment' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'vhost: fix dequeue zero copy with virtio1' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/virtio: fix incorrect cast' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/virtio: fix vector Rx flushing' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'examples/vhost: fix sending ARP packet to self' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/ixgbe: fix the failure of number of Tx queue check' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e/base: fix NVM lock' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e/base: fix link LED blink' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e/base: fix compile issue for GCC 6.3' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/ixgbe/base: add media type of fixed fiber' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e: fix VSI MAC filter on primary address change' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/bnxt: parse checksum offload flags' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/bonding: fix setting slave MAC addresses' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'ethdev: fix link autonegotiation value' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/pcap: fix the NUMA id display in logs' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/ixgbe: fix max queue number for VF' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e: fix VF reset stats crash' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/ixgbe: fix mailbox interrupt handler' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/e1000: " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/mlx5: fix deadlock of link status alarm' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'vhost: fix error code check when creating thread' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'examples/vhost: fix startup check' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'pdump: fix error check when creating/canceling thread' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'app/procinfo: add compilation option in config' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'test: register test as failed if setup failed' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'test/table: fix uninitialized parameter' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'test/memzone: fix wrong test' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'test/memzone: fix NULL freeing' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'test/memzone: fix freeing test' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'test/crypto: fix missing include' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix corner case for SPI value' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e: fix flag for MAC address write' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'vhost: fix mbuf free' " luca.boccassi
2018-01-26 13:13 ` [dpdk-stable] patch 'net/i40e: fix flow director Rx resource defect' " luca.boccassi
2018-02-07 16:46   ` [dpdk-stable] patch 'keepalive: fix state alignment' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'eal/x86: use lock-prefixed instructions for SMP barrier' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'mbuf: fix NULL freeing when debug enabled' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'crypto/qat: fix null auth algo overwrite' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'net/enic: fix crash due to static max number of queues' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'net/mlx5: fix missing RSS capability' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'net/ena: do not set Tx L4 offloads in Rx path' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'net/virtio: fix Rx and Tx handler selection for ARM32' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'net/virtio: fix queue flushing with vector Rx enabled' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'net/virtio: fix memory leak when reinitializing device' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'net/virtio: fix typo in function name' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'net/i40e: fix VF Rx interrupt enabling' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'net/ixgbe: " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'net/e1000: " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'net/bnxt: fix size of Tx ring in HW' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'net/qede/base: fix VF LRO tunnel configuration' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'eal/ppc: remove the braces in memory barrier macros' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'mk: support renamed Makefile in external project' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'net/ixgbe: fix reset error handling' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'test/pmd_perf: declare variables as static' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'examples/bond: check mbuf allocation' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'mk: fix external build' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'test/memzone: handle previously allocated memzones' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'usertools/devbind: remove unused function' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'net/bonding: check error of MAC address setting' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'net/qede: fix few log messages' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'app/testpmd: fix port index in RSS forward config' " luca.boccassi
2018-02-07 16:46     ` [dpdk-stable] patch 'app/testpmd: fix port topology " luca.boccassi
2018-02-07 16:47     ` [dpdk-stable] patch 'examples/ip_pipeline: fix timer period unit' " luca.boccassi
2018-02-07 16:47     ` [dpdk-stable] patch 'test/reorder: fix memory leak' " luca.boccassi
2018-02-07 16:47     ` [dpdk-stable] patch 'test/ring_perf: " luca.boccassi
2018-02-07 16:47     ` [dpdk-stable] patch 'test/table: " luca.boccassi
2018-02-07 16:47     ` [dpdk-stable] patch 'test/timer_perf: " luca.boccassi
2018-02-07 16:47     ` [dpdk-stable] patch 'net/i40e: fix Rx interrupt' " luca.boccassi
2018-02-09 10:40     ` [dpdk-stable] patch 'net/bnxt: fix Rx checksum flags' " Luca Boccassi
2018-02-09 10:40       ` [dpdk-stable] patch 'net/bnxt: fix link speed setting with autoneg off' " Luca Boccassi
2018-02-11 12:49         ` [dpdk-stable] patch 'eal/ppc: support sPAPR IOMMU for vfio-pci' " Luca Boccassi
2018-02-11 12:49           ` [dpdk-stable] patch 'igb_uio: switch to new irq function for MSI-X' " Luca Boccassi
2018-02-15 12:03             ` [dpdk-stable] patch 'ethdev: fix data alignment' " Luca Boccassi
2018-02-15 12:03               ` [dpdk-stable] patch 'net/virtio: fix mbuf data offset for simple Rx' " Luca Boccassi
2018-02-15 12:03               ` [dpdk-stable] patch 'net/virtio: fix resuming port with Rx vector path' " Luca Boccassi
2018-02-15 12:03               ` [dpdk-stable] patch 'net/vhost: fix log messages on create/destroy' " Luca Boccassi
2018-02-15 12:03               ` [dpdk-stable] patch 'net/virtio-user: fix start with kernel vhost' " Luca Boccassi
2018-02-15 12:03               ` [dpdk-stable] patch 'examples/exception_path: align stats on cache line' " Luca Boccassi
2018-02-15 12:03               ` [dpdk-stable] patch 'doc: fix outdated link to IPsec white paper' " Luca Boccassi
2018-02-11 12:49           ` [dpdk-stable] patch 'igb_uio: fix IRQ disable on recent kernels' " Luca Boccassi
2018-02-11 12:49           ` [dpdk-stable] patch 'igb_uio: fix MSI-X IRQ assignment with new IRQ function' " Luca Boccassi
2018-02-09 10:40       ` [dpdk-stable] patch 'net/i40e: check multi-driver option parsing' " Luca Boccassi
2018-02-09 10:40       ` [dpdk-stable] patch 'app/testpmd: fix flow director filter' " Luca Boccassi

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).