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 17.11.1
@ 2018-01-24 15:31 Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'app/testpmd: remove xenvirt again' " Yuanhan Liu
                   ` (156 more replies)
  0 siblings, 157 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From c4b60502e7135b683f48de568698281b42dd83f6 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 99338c5..e0f427a 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 e38a756..443a3f2 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
@@ -3941,4 +3941,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.7.4

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

* [dpdk-stable] patch 'app/testpmd: remove xenvirt again' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'mk: remove TILE-Gx machine type' " Yuanhan Liu
                   ` (155 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Timothy Redaelli; +Cc: Luca Boccassi, Eelco Chaudron, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From ce1027183ee41058993c20d2a1b94cece127e692 Mon Sep 17 00:00:00 2001
From: Timothy Redaelli <tredaelli@redhat.com>
Date: Fri, 17 Nov 2017 15:40:17 +0100
Subject: [PATCH] app/testpmd: remove xenvirt again

[ upstream commit 72224f55b215d30abe670f0720a4d0dc30641ae7 ]

The xenvirt PMD was removed from 17.11
while this link parameter was added.

Fixes: 5b590fbe09b6 ("app/testpmd: add traffic management forwarding mode")

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
---
 app/test-pmd/Makefile | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile
index d21308f..4993c91 100644
--- a/app/test-pmd/Makefile
+++ b/app/test-pmd/Makefile
@@ -83,10 +83,6 @@ ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD),y)
 LDLIBS += -lrte_pmd_bnxt
 endif
 
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_XENVIRT),y)
-LDLIBS += -lrte_pmd_xenvirt
-endif
-
 ifeq ($(CONFIG_RTE_LIBRTE_PMD_SOFTNIC),y)
 LDLIBS += -lrte_pmd_softnic
 endif
-- 
2.7.4

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

* [dpdk-stable] patch 'mk: remove TILE-Gx machine type' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'app/testpmd: remove xenvirt again' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'bus/dpaa: fix build when assert enabled' " Yuanhan Liu
                   ` (154 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 2583f758c78d86c6aaa3a031924bafaaf1db8fd8 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Fri, 15 Dec 2017 23:09:49 +0000
Subject: [PATCH] mk: remove TILE-Gx machine type

[ upstream commit e976052a1106153c93c802e5ffd2f6c8a29f239f ]

This file was forgotten when removing TILE-Gx arch.

Fixes: 31123211bd27 ("remove unmaintained TILE-Gx architecture")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 mk/machine/tilegx/rte.vars.mk | 57 -------------------------------------------
 1 file changed, 57 deletions(-)
 delete mode 100644 mk/machine/tilegx/rte.vars.mk

diff --git a/mk/machine/tilegx/rte.vars.mk b/mk/machine/tilegx/rte.vars.mk
deleted file mode 100644
index c8256f1..0000000
--- a/mk/machine/tilegx/rte.vars.mk
+++ /dev/null
@@ -1,57 +0,0 @@
-#   BSD LICENSE
-#
-#   Copyright (C) EZchip Semiconductor Ltd. 2015.
-#
-#   Redistribution and use in source and binary forms, with or without
-#   modification, are permitted provided that the following conditions
-#   are met:
-#
-#     * Redistributions of source code must retain the above copyright
-#       notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above copyright
-#       notice, this list of conditions and the following disclaimer in
-#       the documentation and/or other materials provided with the
-#       distribution.
-#     * Neither the name of EZchip Semiconductor nor the names of its
-#       contributors may be used to endorse or promote products derived
-#       from this software without specific prior written permission.
-#
-#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#
-# machine:
-#
-#   - can define ARCH variable (overridden by cmdline value)
-#   - can define CROSS variable (overridden by cmdline value)
-#   - define MACHINE_CFLAGS variable (overridden by cmdline value)
-#   - define MACHINE_LDFLAGS variable (overridden by cmdline value)
-#   - define MACHINE_ASFLAGS variable (overridden by cmdline value)
-#   - can define CPU_CFLAGS variable (overridden by cmdline value) that
-#     overrides the one defined in arch.
-#   - can define CPU_LDFLAGS variable (overridden by cmdline value) that
-#     overrides the one defined in arch.
-#   - can define CPU_ASFLAGS variable (overridden by cmdline value) that
-#     overrides the one defined in arch.
-#   - may override any previously defined variable
-#
-
-# ARCH =
-# CROSS =
-# MACHINE_CFLAGS =
-# MACHINE_LDFLAGS =
-# MACHINE_ASFLAGS =
-# CPU_CFLAGS =
-# CPU_LDFLAGS =
-# CPU_ASFLAGS =
-
-MACHINE_CFLAGS =
-- 
2.7.4

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

* [dpdk-stable] patch 'bus/dpaa: fix build when assert enabled' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'app/testpmd: remove xenvirt again' " Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'mk: remove TILE-Gx machine type' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'app/testpmd: fix port id allocation' " Yuanhan Liu
                   ` (153 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Shreyansh Jain, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From b1d6ccffd526db6983f1069d24bdadf73d353c75 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Fri, 22 Dec 2017 02:13:16 +0000
Subject: [PATCH] bus/dpaa: fix build when assert enabled

[ upstream commit 996672d3514a3d2bd9ca8648c526e874f6b69232 ]

Enabling CONFIG_RTE_ENABLE_ASSERT cause build error because some fields
protected by RTE_LIBRTE_DPAA_HWDEBUG macro accessed within DPAA_ASSERT.

All DPAA_ASSERT macro usage causing the build error wrapped with
RTE_LIBRTE_DPAA_HWDEBUG macro.

Fixes: f38f61e982f8 ("bus/dpaa: add BMAN hardware interfaces")
Fixes: c47ff048b99a ("bus/dpaa: add QMAN driver core routines")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 drivers/bus/dpaa/base/qbman/bman.h | 32 ++++++++++++++++---
 drivers/bus/dpaa/base/qbman/qman.c |  5 +++
 drivers/bus/dpaa/base/qbman/qman.h | 64 ++++++++++++++++++++++++++++++++++++--
 3 files changed, 94 insertions(+), 7 deletions(-)

diff --git a/drivers/bus/dpaa/base/qbman/bman.h b/drivers/bus/dpaa/base/qbman/bman.h
index 4b088da..ef0a896 100644
--- a/drivers/bus/dpaa/base/qbman/bman.h
+++ b/drivers/bus/dpaa/base/qbman/bman.h
@@ -228,7 +228,9 @@ static inline void bm_rcr_finish(struct bm_portal *portal)
 	u8 pi = bm_in(RCR_PI_CINH) & (BM_RCR_SIZE - 1);
 	u8 ci = bm_in(RCR_CI_CINH) & (BM_RCR_SIZE - 1);
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(!rcr->busy);
+#endif
 	if (pi != RCR_PTR2IDX(rcr->cursor))
 		pr_crit("losing uncommitted RCR entries\n");
 	if (ci != rcr->ci)
@@ -241,7 +243,9 @@ static inline struct bm_rcr_entry *bm_rcr_start(struct bm_portal *portal)
 {
 	register struct bm_rcr *rcr = &portal->rcr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(!rcr->busy);
+#endif
 	if (!rcr->available)
 		return NULL;
 #ifdef RTE_LIBRTE_DPAA_HWDEBUG
@@ -255,8 +259,8 @@ static inline void bm_rcr_abort(struct bm_portal *portal)
 {
 	__maybe_unused register struct bm_rcr *rcr = &portal->rcr;
 
-	DPAA_ASSERT(rcr->busy);
 #ifdef RTE_LIBRTE_DPAA_HWDEBUG
+	DPAA_ASSERT(rcr->busy);
 	rcr->busy = 0;
 #endif
 }
@@ -266,8 +270,10 @@ static inline struct bm_rcr_entry *bm_rcr_pend_and_next(
 {
 	register struct bm_rcr *rcr = &portal->rcr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(rcr->busy);
 	DPAA_ASSERT(rcr->pmode != bm_rcr_pvb);
+#endif
 	if (rcr->available == 1)
 		return NULL;
 	rcr->cursor->__dont_write_directly__verb = myverb | rcr->vbit;
@@ -282,8 +288,10 @@ static inline void bm_rcr_pci_commit(struct bm_portal *portal, u8 myverb)
 {
 	register struct bm_rcr *rcr = &portal->rcr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(rcr->busy);
 	DPAA_ASSERT(rcr->pmode == bm_rcr_pci);
+#endif
 	rcr->cursor->__dont_write_directly__verb = myverb | rcr->vbit;
 	RCR_INC(rcr);
 	rcr->available--;
@@ -298,7 +306,9 @@ static inline void bm_rcr_pce_prefetch(struct bm_portal *portal)
 {
 	__maybe_unused register struct bm_rcr *rcr = &portal->rcr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(rcr->pmode == bm_rcr_pce);
+#endif
 	bm_cl_invalidate(RCR_PI);
 	bm_cl_touch_rw(RCR_PI);
 }
@@ -307,8 +317,10 @@ static inline void bm_rcr_pce_commit(struct bm_portal *portal, u8 myverb)
 {
 	register struct bm_rcr *rcr = &portal->rcr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(rcr->busy);
 	DPAA_ASSERT(rcr->pmode == bm_rcr_pce);
+#endif
 	rcr->cursor->__dont_write_directly__verb = myverb | rcr->vbit;
 	RCR_INC(rcr);
 	rcr->available--;
@@ -324,8 +336,10 @@ static inline void bm_rcr_pvb_commit(struct bm_portal *portal, u8 myverb)
 	register struct bm_rcr *rcr = &portal->rcr;
 	struct bm_rcr_entry *rcursor;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(rcr->busy);
 	DPAA_ASSERT(rcr->pmode == bm_rcr_pvb);
+#endif
 	lwsync();
 	rcursor = rcr->cursor;
 	rcursor->__dont_write_directly__verb = myverb | rcr->vbit;
@@ -342,7 +356,9 @@ static inline u8 bm_rcr_cci_update(struct bm_portal *portal)
 	register struct bm_rcr *rcr = &portal->rcr;
 	u8 diff, old_ci = rcr->ci;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(rcr->cmode == bm_rcr_cci);
+#endif
 	rcr->ci = bm_in(RCR_CI_CINH) & (BM_RCR_SIZE - 1);
 	diff = bm_cyc_diff(BM_RCR_SIZE, old_ci, rcr->ci);
 	rcr->available += diff;
@@ -353,7 +369,9 @@ static inline void bm_rcr_cce_prefetch(struct bm_portal *portal)
 {
 	__maybe_unused register struct bm_rcr *rcr = &portal->rcr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(rcr->cmode == bm_rcr_cce);
+#endif
 	bm_cl_touch_ro(RCR_CI);
 }
 
@@ -362,7 +380,9 @@ static inline u8 bm_rcr_cce_update(struct bm_portal *portal)
 	register struct bm_rcr *rcr = &portal->rcr;
 	u8 diff, old_ci = rcr->ci;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(rcr->cmode == bm_rcr_cce);
+#endif
 	rcr->ci = bm_cl_in(RCR_CI) & (BM_RCR_SIZE - 1);
 	bm_cl_invalidate(RCR_CI);
 	diff = bm_cyc_diff(BM_RCR_SIZE, old_ci, rcr->ci);
@@ -420,8 +440,8 @@ static inline void bm_mc_finish(struct bm_portal *portal)
 {
 	__maybe_unused register struct bm_mc *mc = &portal->mc;
 
-	DPAA_ASSERT(mc->state == mc_idle);
 #ifdef RTE_LIBRTE_DPAA_HWDEBUG
+	DPAA_ASSERT(mc->state == mc_idle);
 	if (mc->state != mc_idle)
 		pr_crit("Losing incomplete MC command\n");
 #endif
@@ -431,8 +451,8 @@ static inline struct bm_mc_command *bm_mc_start(struct bm_portal *portal)
 {
 	register struct bm_mc *mc = &portal->mc;
 
-	DPAA_ASSERT(mc->state == mc_idle);
 #ifdef RTE_LIBRTE_DPAA_HWDEBUG
+	DPAA_ASSERT(mc->state == mc_idle);
 	mc->state = mc_user;
 #endif
 	dcbz_64(mc->cr);
@@ -443,8 +463,8 @@ static inline void bm_mc_abort(struct bm_portal *portal)
 {
 	__maybe_unused register struct bm_mc *mc = &portal->mc;
 
-	DPAA_ASSERT(mc->state == mc_user);
 #ifdef RTE_LIBRTE_DPAA_HWDEBUG
+	DPAA_ASSERT(mc->state == mc_user);
 	mc->state = mc_idle;
 #endif
 }
@@ -454,7 +474,9 @@ static inline void bm_mc_commit(struct bm_portal *portal, u8 myverb)
 	register struct bm_mc *mc = &portal->mc;
 	struct bm_mc_result *rr = mc->rr + mc->rridx;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(mc->state == mc_user);
+#endif
 	lwsync();
 	mc->cr->__dont_write_directly__verb = myverb | mc->vbit;
 	dcbf(mc->cr);
@@ -469,7 +491,9 @@ static inline struct bm_mc_result *bm_mc_result(struct bm_portal *portal)
 	register struct bm_mc *mc = &portal->mc;
 	struct bm_mc_result *rr = mc->rr + mc->rridx;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(mc->state == mc_hw);
+#endif
 	/* The inactive response register's verb byte always returns zero until
 	 * its command is submitted and completed. This includes the valid-bit,
 	 * in case you were wondering.
diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c
index 87fec60..b851110 100644
--- a/drivers/bus/dpaa/base/qbman/qman.c
+++ b/drivers/bus/dpaa/base/qbman/qman.c
@@ -416,7 +416,9 @@ static inline void qm_eqcr_finish(struct qm_portal *portal)
 	qm_cl_invalidate(EQCR_CI);
 	eqcr->ci = qm_cl_in(EQCR_CI) & (QM_EQCR_SIZE - 1);
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(!eqcr->busy);
+#endif
 	if (pi != EQCR_PTR2IDX(eqcr->cursor))
 		pr_crit("losing uncommitted EQCR entries\n");
 	if (ci != eqcr->ci)
@@ -505,7 +507,9 @@ static inline void qm_mr_pvb_update(struct qm_portal *portal)
 	register struct qm_mr *mr = &portal->mr;
 	const struct qm_mr_entry *res = qm_cl(mr->ring, mr->pi);
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(mr->pmode == qm_mr_pvb);
+#endif
 	/* when accessing 'verb', use __raw_readb() to ensure that compiler
 	 * inlining doesn't try to optimise out "excess reads".
 	 */
@@ -1267,6 +1271,7 @@ void qman_destroy_fq(struct qman_fq *fq, u32 flags __maybe_unused)
 	switch (fq->state) {
 	case qman_fq_state_parked:
 		DPAA_ASSERT(flags & QMAN_FQ_DESTROY_PARKED);
+		/* Fallthrough */
 	case qman_fq_state_oos:
 		if (fq_isset(fq, QMAN_FQ_FLAG_DYNAMIC_FQID))
 			qman_release_fqid(fq->fqid);
diff --git a/drivers/bus/dpaa/base/qbman/qman.h b/drivers/bus/dpaa/base/qbman/qman.h
index 2c0f694..283cd31 100644
--- a/drivers/bus/dpaa/base/qbman/qman.h
+++ b/drivers/bus/dpaa/base/qbman/qman.h
@@ -267,7 +267,9 @@ static inline struct qm_eqcr_entry *qm_eqcr_start_no_stash(struct qm_portal
 {
 	register struct qm_eqcr *eqcr = &portal->eqcr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(!eqcr->busy);
+#endif
 	if (!eqcr->available)
 		return NULL;
 
@@ -284,7 +286,9 @@ static inline struct qm_eqcr_entry *qm_eqcr_start_stash(struct qm_portal
 	register struct qm_eqcr *eqcr = &portal->eqcr;
 	u8 diff, old_ci;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(!eqcr->busy);
+#endif
 	if (!eqcr->available) {
 		old_ci = eqcr->ci;
 		eqcr->ci = qm_cl_in(EQCR_CI) & (QM_EQCR_SIZE - 1);
@@ -303,8 +307,8 @@ static inline void qm_eqcr_abort(struct qm_portal *portal)
 {
 	__maybe_unused register struct qm_eqcr *eqcr = &portal->eqcr;
 
-	DPAA_ASSERT(eqcr->busy);
 #ifdef RTE_LIBRTE_DPAA_HWDEBUG
+	DPAA_ASSERT(eqcr->busy);
 	eqcr->busy = 0;
 #endif
 }
@@ -314,8 +318,10 @@ static inline struct qm_eqcr_entry *qm_eqcr_pend_and_next(
 {
 	register struct qm_eqcr *eqcr = &portal->eqcr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(eqcr->busy);
 	DPAA_ASSERT(eqcr->pmode != qm_eqcr_pvb);
+#endif
 	if (eqcr->available == 1)
 		return NULL;
 	eqcr->cursor->__dont_write_directly__verb = myverb | eqcr->vbit;
@@ -336,8 +342,10 @@ static inline void qm_eqcr_pci_commit(struct qm_portal *portal, u8 myverb)
 {
 	register struct qm_eqcr *eqcr = &portal->eqcr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	EQCR_COMMIT_CHECKS(eqcr);
 	DPAA_ASSERT(eqcr->pmode == qm_eqcr_pci);
+#endif
 	eqcr->cursor->__dont_write_directly__verb = myverb | eqcr->vbit;
 	EQCR_INC(eqcr);
 	eqcr->available--;
@@ -353,7 +361,9 @@ static inline void qm_eqcr_pce_prefetch(struct qm_portal *portal)
 {
 	__maybe_unused register struct qm_eqcr *eqcr = &portal->eqcr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(eqcr->pmode == qm_eqcr_pce);
+#endif
 	qm_cl_invalidate(EQCR_PI);
 	qm_cl_touch_rw(EQCR_PI);
 }
@@ -362,8 +372,10 @@ static inline void qm_eqcr_pce_commit(struct qm_portal *portal, u8 myverb)
 {
 	register struct qm_eqcr *eqcr = &portal->eqcr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	EQCR_COMMIT_CHECKS(eqcr);
 	DPAA_ASSERT(eqcr->pmode == qm_eqcr_pce);
+#endif
 	eqcr->cursor->__dont_write_directly__verb = myverb | eqcr->vbit;
 	EQCR_INC(eqcr);
 	eqcr->available--;
@@ -380,8 +392,10 @@ static inline void qm_eqcr_pvb_commit(struct qm_portal *portal, u8 myverb)
 	register struct qm_eqcr *eqcr = &portal->eqcr;
 	struct qm_eqcr_entry *eqcursor;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	EQCR_COMMIT_CHECKS(eqcr);
 	DPAA_ASSERT(eqcr->pmode == qm_eqcr_pvb);
+#endif
 	lwsync();
 	eqcursor = eqcr->cursor;
 	eqcursor->__dont_write_directly__verb = myverb | eqcr->vbit;
@@ -503,7 +517,9 @@ static inline u8 qm_dqrr_pci_update(struct qm_portal *portal)
 	register struct qm_dqrr *dqrr = &portal->dqrr;
 	u8 diff, old_pi = dqrr->pi;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(dqrr->pmode == qm_dqrr_pci);
+#endif
 	dqrr->pi = qm_in(DQRR_PI_CINH) & (QM_DQRR_SIZE - 1);
 	diff = qm_cyc_diff(QM_DQRR_SIZE, old_pi, dqrr->pi);
 	dqrr->fill += diff;
@@ -514,7 +530,9 @@ static inline void qm_dqrr_pce_prefetch(struct qm_portal *portal)
 {
 	__maybe_unused register struct qm_dqrr *dqrr = &portal->dqrr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(dqrr->pmode == qm_dqrr_pce);
+#endif
 	qm_cl_invalidate(DQRR_PI);
 	qm_cl_touch_ro(DQRR_PI);
 }
@@ -524,7 +542,9 @@ static inline u8 qm_dqrr_pce_update(struct qm_portal *portal)
 	register struct qm_dqrr *dqrr = &portal->dqrr;
 	u8 diff, old_pi = dqrr->pi;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(dqrr->pmode == qm_dqrr_pce);
+#endif
 	dqrr->pi = qm_cl_in(DQRR_PI) & (QM_DQRR_SIZE - 1);
 	diff = qm_cyc_diff(QM_DQRR_SIZE, old_pi, dqrr->pi);
 	dqrr->fill += diff;
@@ -536,7 +556,9 @@ static inline void qm_dqrr_pvb_update(struct qm_portal *portal)
 	register struct qm_dqrr *dqrr = &portal->dqrr;
 	const struct qm_dqrr_entry *res = qm_cl(dqrr->ring, dqrr->pi);
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(dqrr->pmode == qm_dqrr_pvb);
+#endif
 	/* when accessing 'verb', use __raw_readb() to ensure that compiler
 	 * inlining doesn't try to optimise out "excess reads".
 	 */
@@ -552,7 +574,9 @@ static inline void qm_dqrr_cci_consume(struct qm_portal *portal, u8 num)
 {
 	register struct qm_dqrr *dqrr = &portal->dqrr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(dqrr->cmode == qm_dqrr_cci);
+#endif
 	dqrr->ci = (dqrr->ci + num) & (QM_DQRR_SIZE - 1);
 	qm_out(DQRR_CI_CINH, dqrr->ci);
 }
@@ -561,7 +585,9 @@ static inline void qm_dqrr_cci_consume_to_current(struct qm_portal *portal)
 {
 	register struct qm_dqrr *dqrr = &portal->dqrr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(dqrr->cmode == qm_dqrr_cci);
+#endif
 	dqrr->ci = DQRR_PTR2IDX(dqrr->cursor);
 	qm_out(DQRR_CI_CINH, dqrr->ci);
 }
@@ -570,7 +596,9 @@ static inline void qm_dqrr_cce_prefetch(struct qm_portal *portal)
 {
 	__maybe_unused register struct qm_dqrr *dqrr = &portal->dqrr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(dqrr->cmode == qm_dqrr_cce);
+#endif
 	qm_cl_invalidate(DQRR_CI);
 	qm_cl_touch_rw(DQRR_CI);
 }
@@ -579,7 +607,9 @@ static inline void qm_dqrr_cce_consume(struct qm_portal *portal, u8 num)
 {
 	register struct qm_dqrr *dqrr = &portal->dqrr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(dqrr->cmode == qm_dqrr_cce);
+#endif
 	dqrr->ci = (dqrr->ci + num) & (QM_DQRR_SIZE - 1);
 	qm_cl_out(DQRR_CI, dqrr->ci);
 }
@@ -588,7 +618,9 @@ static inline void qm_dqrr_cce_consume_to_current(struct qm_portal *portal)
 {
 	register struct qm_dqrr *dqrr = &portal->dqrr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(dqrr->cmode == qm_dqrr_cce);
+#endif
 	dqrr->ci = DQRR_PTR2IDX(dqrr->cursor);
 	qm_cl_out(DQRR_CI, dqrr->ci);
 }
@@ -598,7 +630,9 @@ static inline void qm_dqrr_cdc_consume_1(struct qm_portal *portal, u8 idx,
 {
 	__maybe_unused register struct qm_dqrr *dqrr = &portal->dqrr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(dqrr->cmode == qm_dqrr_cdc);
+#endif
 	DPAA_ASSERT(idx < QM_DQRR_SIZE);
 	qm_out(DQRR_DCAP, (0 << 8) |	/* S */
 		((park ? 1 : 0) << 6) |	/* PK */
@@ -612,7 +646,9 @@ static inline void qm_dqrr_cdc_consume_1ptr(struct qm_portal *portal,
 	__maybe_unused register struct qm_dqrr *dqrr = &portal->dqrr;
 	u8 idx = DQRR_PTR2IDX(dq);
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(dqrr->cmode == qm_dqrr_cdc);
+#endif
 	DPAA_ASSERT(idx < QM_DQRR_SIZE);
 	qm_out(DQRR_DCAP, (0 << 8) |		/* DQRR_DCAP::S */
 		((park ? 1 : 0) << 6) |		/* DQRR_DCAP::PK */
@@ -623,7 +659,9 @@ static inline void qm_dqrr_cdc_consume_n(struct qm_portal *portal, u16 bitmask)
 {
 	__maybe_unused register struct qm_dqrr *dqrr = &portal->dqrr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(dqrr->cmode == qm_dqrr_cdc);
+#endif
 	qm_out(DQRR_DCAP, (1 << 8) |		/* DQRR_DCAP::S */
 		((u32)bitmask << 16));		/* DQRR_DCAP::DCAP_CI */
 	dqrr->ci = qm_in(DQRR_CI_CINH) & (QM_DQRR_SIZE - 1);
@@ -634,7 +672,9 @@ static inline u8 qm_dqrr_cdc_cci(struct qm_portal *portal)
 {
 	__maybe_unused register struct qm_dqrr *dqrr = &portal->dqrr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(dqrr->cmode == qm_dqrr_cdc);
+#endif
 	return qm_in(DQRR_CI_CINH) & (QM_DQRR_SIZE - 1);
 }
 
@@ -642,7 +682,9 @@ static inline void qm_dqrr_cdc_cce_prefetch(struct qm_portal *portal)
 {
 	__maybe_unused register struct qm_dqrr *dqrr = &portal->dqrr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(dqrr->cmode == qm_dqrr_cdc);
+#endif
 	qm_cl_invalidate(DQRR_CI);
 	qm_cl_touch_ro(DQRR_CI);
 }
@@ -651,7 +693,9 @@ static inline u8 qm_dqrr_cdc_cce(struct qm_portal *portal)
 {
 	__maybe_unused register struct qm_dqrr *dqrr = &portal->dqrr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(dqrr->cmode == qm_dqrr_cdc);
+#endif
 	return qm_cl_in(DQRR_CI) & (QM_DQRR_SIZE - 1);
 }
 
@@ -659,7 +703,9 @@ static inline u8 qm_dqrr_get_ci(struct qm_portal *portal)
 {
 	register struct qm_dqrr *dqrr = &portal->dqrr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(dqrr->cmode != qm_dqrr_cdc);
+#endif
 	return dqrr->ci;
 }
 
@@ -667,7 +713,9 @@ static inline void qm_dqrr_park(struct qm_portal *portal, u8 idx)
 {
 	__maybe_unused register struct qm_dqrr *dqrr = &portal->dqrr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(dqrr->cmode != qm_dqrr_cdc);
+#endif
 	qm_out(DQRR_DCAP, (0 << 8) |		/* S */
 		(1 << 6) |			/* PK */
 		(idx & (QM_DQRR_SIZE - 1)));	/* DCAP_CI */
@@ -677,7 +725,9 @@ static inline void qm_dqrr_park_current(struct qm_portal *portal)
 {
 	register struct qm_dqrr *dqrr = &portal->dqrr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(dqrr->cmode != qm_dqrr_cdc);
+#endif
 	qm_out(DQRR_DCAP, (0 << 8) |		/* S */
 		(1 << 6) |			/* PK */
 		DQRR_PTR2IDX(dqrr->cursor));	/* DCAP_CI */
@@ -766,7 +816,9 @@ static inline void qm_mr_cci_consume(struct qm_portal *portal, u8 num)
 {
 	register struct qm_mr *mr = &portal->mr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(mr->cmode == qm_mr_cci);
+#endif
 	mr->ci = (mr->ci + num) & (QM_MR_SIZE - 1);
 	qm_out(MR_CI_CINH, mr->ci);
 }
@@ -775,7 +827,9 @@ static inline void qm_mr_cci_consume_to_current(struct qm_portal *portal)
 {
 	register struct qm_mr *mr = &portal->mr;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(mr->cmode == qm_mr_cci);
+#endif
 	mr->ci = MR_PTR2IDX(mr->cursor);
 	qm_out(MR_CI_CINH, mr->ci);
 }
@@ -806,8 +860,8 @@ static inline void qm_mc_finish(struct qm_portal *portal)
 {
 	__maybe_unused register struct qm_mc *mc = &portal->mc;
 
-	DPAA_ASSERT(mc->state == qman_mc_idle);
 #ifdef RTE_LIBRTE_DPAA_HWDEBUG
+	DPAA_ASSERT(mc->state == qman_mc_idle);
 	if (mc->state != qman_mc_idle)
 		pr_crit("Losing incomplete MC command\n");
 #endif
@@ -817,8 +871,8 @@ static inline struct qm_mc_command *qm_mc_start(struct qm_portal *portal)
 {
 	register struct qm_mc *mc = &portal->mc;
 
-	DPAA_ASSERT(mc->state == qman_mc_idle);
 #ifdef RTE_LIBRTE_DPAA_HWDEBUG
+	DPAA_ASSERT(mc->state == qman_mc_idle);
 	mc->state = qman_mc_user;
 #endif
 	dcbz_64(mc->cr);
@@ -830,7 +884,9 @@ static inline void qm_mc_commit(struct qm_portal *portal, u8 myverb)
 	register struct qm_mc *mc = &portal->mc;
 	struct qm_mc_result *rr = mc->rr + mc->rridx;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(mc->state == qman_mc_user);
+#endif
 	lwsync();
 	mc->cr->__dont_write_directly__verb = myverb | mc->vbit;
 	dcbf(mc->cr);
@@ -845,7 +901,9 @@ static inline struct qm_mc_result *qm_mc_result(struct qm_portal *portal)
 	register struct qm_mc *mc = &portal->mc;
 	struct qm_mc_result *rr = mc->rr + mc->rridx;
 
+#ifdef RTE_LIBRTE_DPAA_HWDEBUG
 	DPAA_ASSERT(mc->state == qman_mc_hw);
+#endif
 	/* The inactive response register's verb byte always returns zero until
 	 * its command is submitted and completed. This includes the valid-bit,
 	 * in case you were wondering.
-- 
2.7.4

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

* [dpdk-stable] patch 'app/testpmd: fix port id allocation' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (2 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'bus/dpaa: fix build when assert enabled' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'app/testpmd: fix crash of txonly with multiple segments' " Yuanhan Liu
                   ` (152 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Yanglong Wu; +Cc: Zhiyong Yang, Wenzhuo Lu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 51f4b259f034d8d91f314681c19d1bac821ab195 Mon Sep 17 00:00:00 2001
From: Yanglong Wu <yanglong.wu@intel.com>
Date: Tue, 2 Jan 2018 13:35:42 +0800
Subject: [PATCH] app/testpmd: fix port id allocation

[ upstream commit 2c9808149cdf97313e54e1dcdebe251c010a3f7d ]

In the feature of increasing port_id range from 8 bits to 16 bits,
vlan port_id allocation function was forget to substitute UINT8 with
UINT16, so the vlan port_id was allocated as a inccrete number.

Fixes: 28caa76aea71 ("app/testpmd: fix port id type")

Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Reviewed-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 app/test-pmd/cmdline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index f71d963..8990ebf 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -3352,7 +3352,7 @@ cmdline_parse_token_num_t cmd_vlan_tpid_tpid =
 			      tp_id, UINT16);
 cmdline_parse_token_num_t cmd_vlan_tpid_portid =
 	TOKEN_NUM_INITIALIZER(struct cmd_vlan_tpid_result,
-			      port_id, UINT8);
+			      port_id, UINT16);
 
 cmdline_parse_inst_t cmd_vlan_tpid = {
 	.f = cmd_vlan_tpid_parsed,
-- 
2.7.4

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

* [dpdk-stable] patch 'app/testpmd: fix crash of txonly with multiple segments' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (3 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'app/testpmd: fix port id allocation' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'kni: fix build dependency' " Yuanhan Liu
                   ` (151 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: Wenzhuo Lu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 6a08ab331fcc674c78ec4f84c72e6301444f629d 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 309c738..4ce4d61 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -104,6 +104,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.7.4

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

* [dpdk-stable] patch 'kni: fix build dependency' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (4 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'app/testpmd: fix crash of txonly with multiple segments' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'service: fix number mapped cores count' " Yuanhan Liu
                   ` (150 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Bernard Iremonger, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From c23404e1066ef6dba0bc5c730b7511da7488b5d6 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 12 Dec 2017 18:39:56 +0000
Subject: [PATCH] kni: fix build dependency

[ upstream commit 3f88210ae54827ca20230298da0d6cf903585122 ]

kni library has a dependency to new PCI library, adding that dependency.

build error:
  CC rte_kni.o
In file included from dpdk/lib/librte_kni/rte_kni.c:48:0:
  dpdk/build/include/rte_kni.h:49:21:
  fatal error: rte_pci.h: No such file or directory
    #include <rte_pci.h>
                       ^

Fixes: c752998b5e2e ("pci: introduce library and driver")

Reported-by: Bernard Iremonger <bernard.iremonger@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 lib/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/Makefile b/lib/Makefile
index dc4e8df..26113cd 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -125,5 +125,6 @@ ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP),y)
 DIRS-$(CONFIG_RTE_LIBRTE_KNI) += librte_kni
 endif
 DEPDIRS-librte_kni := librte_eal librte_mempool librte_mbuf librte_ether
+DEPDIRS-librte_kni += librte_pci
 
 include $(RTE_SDK)/mk/rte.subdir.mk
-- 
2.7.4

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

* [dpdk-stable] patch 'service: fix number mapped cores count' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (5 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'kni: fix build dependency' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'service: fix lcore role after delete' " Yuanhan Liu
                   ` (149 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Harry van Haaren, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From b431891c6adad4b52178e61fdb7810fa6df1f028 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Date: Tue, 9 Jan 2018 15:10:41 +0530
Subject: [PATCH] service: fix number mapped cores count

[ upstream commit 088a05f057d68ad48fe6788bb276d5d4bd151fb1 ]

When adding service the number of mapped cores should only be incremented
when the core is not already a service core or vice versa.

Fixes: 21698354c832 ("service: introduce service cores concept")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 lib/librte_eal/common/rte_service.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
index ae97e6b..2630770 100644
--- a/lib/librte_eal/common/rte_service.c
+++ b/lib/librte_eal/common/rte_service.c
@@ -545,10 +545,14 @@ service_update(struct rte_service_spec *service, uint32_t lcore,
 
 	uint64_t sid_mask = UINT64_C(1) << sid;
 	if (set) {
-		if (*set) {
+		uint64_t lcore_mapped = lcore_states[lcore].service_mask &
+			sid_mask;
+
+		if (*set && !lcore_mapped) {
 			lcore_states[lcore].service_mask |= sid_mask;
 			rte_atomic32_inc(&rte_services[sid].num_mapped_cores);
-		} else {
+		}
+		if (!*set && lcore_mapped) {
 			lcore_states[lcore].service_mask &= ~(sid_mask);
 			rte_atomic32_dec(&rte_services[sid].num_mapped_cores);
 		}
-- 
2.7.4

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

* [dpdk-stable] patch 'service: fix lcore role after delete' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (6 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'service: fix number mapped cores count' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'service: fix service core launch' " Yuanhan Liu
                   ` (148 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Harry van Haaren; +Cc: Pavan Nikhilesh, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 7a393b2d5812120d1e85e6aa48cd004f8be1f2f2 Mon Sep 17 00:00:00 2001
From: Harry van Haaren <harry.van.haaren@intel.com>
Date: Tue, 9 Jan 2018 13:37:40 +0000
Subject: [PATCH] service: fix lcore role after delete

[ upstream commit 54e7456a3bfdf2d7fe651ec25e951fe4b44be569 ]

This patch fixes the reset of the service core,
that when rte_service_lcore_del() is called, the
lcore_role is restored to RTE.

This issue was reported as when running the unit tests, an
error was thrown that "failed to allocate lcore". Investigating
revealed that the state of the service-cores after del() was
not allowing a core to be re-used at a later point in time.

Fixes: 21698354c832 ("service: introduce service cores concept")

Reported-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 lib/librte_eal/common/rte_service.c | 36 +++++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 17 deletions(-)

diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
index 2630770..9ff4136 100644
--- a/lib/librte_eal/common/rte_service.c
+++ b/lib/librte_eal/common/rte_service.c
@@ -587,23 +587,6 @@ rte_service_map_lcore_get(uint32_t id, uint32_t lcore)
 	return ret;
 }
 
-int32_t rte_service_lcore_reset_all(void)
-{
-	/* loop over cores, reset all to mask 0 */
-	uint32_t i;
-	for (i = 0; i < RTE_MAX_LCORE; i++) {
-		lcore_states[i].service_mask = 0;
-		lcore_states[i].is_service_core = 0;
-		lcore_states[i].runstate = RUNSTATE_STOPPED;
-	}
-	for (i = 0; i < RTE_SERVICE_NUM_MAX; i++)
-		rte_atomic32_set(&rte_services[i].num_mapped_cores, 0);
-
-	rte_smp_wmb();
-
-	return 0;
-}
-
 static void
 set_lcore_state(uint32_t lcore, int32_t state)
 {
@@ -618,6 +601,25 @@ set_lcore_state(uint32_t lcore, int32_t state)
 	lcore_states[lcore].is_service_core = (state == ROLE_SERVICE);
 }
 
+int32_t rte_service_lcore_reset_all(void)
+{
+	/* loop over cores, reset all to mask 0 */
+	uint32_t i;
+	for (i = 0; i < RTE_MAX_LCORE; i++) {
+		if (lcore_states[i].is_service_core) {
+			lcore_states[i].service_mask = 0;
+			set_lcore_state(i, ROLE_RTE);
+			lcore_states[i].runstate = RUNSTATE_STOPPED;
+		}
+	}
+	for (i = 0; i < RTE_SERVICE_NUM_MAX; i++)
+		rte_atomic32_set(&rte_services[i].num_mapped_cores, 0);
+
+	rte_smp_wmb();
+
+	return 0;
+}
+
 int32_t
 rte_service_lcore_add(uint32_t lcore)
 {
-- 
2.7.4

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

* [dpdk-stable] patch 'service: fix service core launch' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (7 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'service: fix lcore role after delete' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'bus/pci: fix interrupt handler type' " Yuanhan Liu
                   ` (147 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Harry van Haaren; +Cc: Pavan Nikhilesh, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 5f08be4f43eb9ed21378092de389344a100588a0 Mon Sep 17 00:00:00 2001
From: Harry van Haaren <harry.van.haaren@intel.com>
Date: Tue, 9 Jan 2018 13:37:41 +0000
Subject: [PATCH] service: fix service core launch

[ upstream commit 72e6d1b94bd7c173af0500369e5bc34be8e58ec1 ]

This patch fixes a potential bug, which was not consistently
showing up in the unit tests. The issue was that the service-
lcore being started was not in a "WAIT" state, and hence EAL
would return -EBUSY instead of launching the lcore.

In order to ensure a core is in a launch-ready state, the application
must call rte_eal_wait_lcore, to ensure that the core has completed
its previous task, and that EAL is ready to re-launch it.

The call to rte_eal_wait_lcore() is explicitly not in the
service core function, to make it visible to the application.
Requiring an explicit function call ensures the developer sees
that a lcore could block in the rte_eal_wait_lcore() function
if the core hasn't returned from its previous function.

>From a usability perspective, hiding the wait_lcore() inside
service cores would cause confusion.

This patch adds rte_eal_wait_lcore() calls to the unit tests,
to ensure that the lcores for testing functionality are ready
to run the test.

Fixes: 21698354c832 ("service: introduce service cores concept")

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 lib/librte_eal/common/include/rte_service.h |  4 +++-
 test/test/test_service_cores.c              | 10 +++++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_service.h b/lib/librte_eal/common/include/rte_service.h
index 9272440..495b531 100644
--- a/lib/librte_eal/common/include/rte_service.h
+++ b/lib/librte_eal/common/include/rte_service.h
@@ -274,7 +274,9 @@ int32_t rte_service_run_iter_on_app_lcore(uint32_t id,
  * Start a service core.
  *
  * Starting a core makes the core begin polling. Any services assigned to it
- * will be run as fast as possible.
+ * will be run as fast as possible. The application must ensure that the lcore
+ * is in a launchable state: e.g. call *rte_eal_lcore_wait* on the lcore_id
+ * before calling this function.
  *
  * @retval 0 Success
  * @retval -EINVAL Failed to start core. The *lcore_id* passed in is not
diff --git a/test/test/test_service_cores.c b/test/test/test_service_cores.c
index 311c704..ebff8b0 100644
--- a/test/test/test_service_cores.c
+++ b/test/test/test_service_cores.c
@@ -348,6 +348,7 @@ service_lcore_en_dis_able(void)
 
 	/* call remote_launch to verify that app can launch ex-service lcore */
 	service_remote_launch_flag = 0;
+	rte_eal_wait_lcore(slcore_id);
 	int ret = rte_eal_remote_launch(service_remote_launch_func, NULL,
 					slcore_id);
 	TEST_ASSERT_EQUAL(0, ret, "Ex-service core remote launch failed.");
@@ -362,7 +363,7 @@ static int
 service_lcore_running_check(void)
 {
 	uint64_t tick = service_tick;
-	rte_delay_ms(SERVICE_DELAY * 10);
+	rte_delay_ms(SERVICE_DELAY * 100);
 	/* if (tick != service_tick) we know the lcore as polled the service */
 	return tick != service_tick;
 }
@@ -505,6 +506,10 @@ service_threaded_test(int mt_safe)
 	if (!mt_safe)
 		test_params[1] = 1;
 
+	/* wait for lcores before start() */
+	rte_eal_wait_lcore(slcore_1);
+	rte_eal_wait_lcore(slcore_2);
+
 	rte_service_lcore_start(slcore_1);
 	rte_service_lcore_start(slcore_2);
 
@@ -518,6 +523,8 @@ service_threaded_test(int mt_safe)
 	TEST_ASSERT_EQUAL(0, rte_service_runstate_set(sid, 0),
 			"Failed to stop MT Safe service");
 
+	rte_eal_wait_lcore(slcore_1);
+	rte_eal_wait_lcore(slcore_2);
 	unregister_all();
 
 	/* return the value of the callback pass_test variable to caller */
@@ -611,6 +618,7 @@ service_app_lcore_poll_impl(const int mt_safe)
 	rte_service_runstate_set(id, 1);
 
 	uint32_t app_core2 = rte_get_next_lcore(slcore_id, 1, 1);
+	rte_eal_wait_lcore(app_core2);
 	int app_core2_ret = rte_eal_remote_launch(service_run_on_app_core_func,
 						  &id, app_core2);
 
-- 
2.7.4

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

* [dpdk-stable] patch 'bus/pci: fix interrupt handler type' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (8 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'service: fix service core launch' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'memzone: fix leak on allocation error' " Yuanhan Liu
                   ` (146 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Zhiyong Yang; +Cc: Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 295c63b38533e5053eb78a8d89776a553d7e5802 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>
---
 drivers/bus/pci/linux/pci.c      | 1 -
 drivers/bus/pci/linux/pci_vfio.c | 2 --
 drivers/bus/pci/pci_common_uio.c | 1 -
 3 files changed, 4 deletions(-)

diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index 5da6728..ec31216 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -723,7 +723,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);
 
diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index 1f93fa4..e7d7f5d 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -459,7 +459,6 @@ pci_vfio_map_resource_primary(struct rte_pci_device *dev)
 	struct pci_map *maps;
 
 	dev->intr_handle.fd = -1;
-	dev->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN;
 
 	/* store PCI address string */
 	snprintf(pci_addr, sizeof(pci_addr), PCI_PRI_FMT,
@@ -576,7 +575,6 @@ pci_vfio_map_resource_secondary(struct rte_pci_device *dev)
 	struct pci_map *maps;
 
 	dev->intr_handle.fd = -1;
-	dev->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN;
 
 	/* store PCI address string */
 	snprintf(pci_addr, sizeof(pci_addr), PCI_PRI_FMT,
diff --git a/drivers/bus/pci/pci_common_uio.c b/drivers/bus/pci/pci_common_uio.c
index 0671131..b75988d 100644
--- a/drivers/bus/pci/pci_common_uio.c
+++ b/drivers/bus/pci/pci_common_uio.c
@@ -119,7 +119,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)
-- 
2.7.4

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

* [dpdk-stable] patch 'memzone: fix leak on allocation error' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (9 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'bus/pci: fix interrupt handler type' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'malloc: protect stats with lock' " Yuanhan Liu
                   ` (145 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From e0246c95ec2d5feb9d7709e1c42b83342ced99c8 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 ea072a2..b682b00 100644
--- a/lib/librte_eal/common/eal_common_memzone.c
+++ b/lib/librte_eal/common/eal_common_memzone.c
@@ -237,7 +237,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();
@@ -245,6 +245,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.7.4

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

* [dpdk-stable] patch 'malloc: protect stats with lock' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (10 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'memzone: fix leak on allocation error' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'malloc: fix end for bounded elements' " Yuanhan Liu
                   ` (144 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From fa38beb1544757d515247cf719148326738be146 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 267a4c6..c731f1c 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 3ccbef0..3b1166f 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.7.4

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

* [dpdk-stable] patch 'malloc: fix end for bounded elements' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (11 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'malloc: protect stats with lock' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'vfio: fix enabled check on error' " Yuanhan Liu
                   ` (143 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 8430a91880bda9831451b2644b6ac905194e78fa 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 98bcd37..f6cbc42 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.7.4

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

* [dpdk-stable] patch 'vfio: fix enabled check on error' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (12 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'malloc: fix end for bounded elements' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'pmdinfogen: fix cross compilation for ARM big endian' " Yuanhan Liu
                   ` (142 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From c9a6a409f0fd31d795f3c7fb08ddcce04961ceac 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 58f0123..fb1a622 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c
@@ -525,7 +525,7 @@ rte_vfio_enable(const char *modname)
 int
 rte_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.7.4

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

* [dpdk-stable] patch 'pmdinfogen: fix cross compilation for ARM big endian' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (13 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'vfio: fix enabled check on error' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'lpm: fix ARM big endian build' " Yuanhan Liu
                   ` (141 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 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 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 13d57a9cbd408b0a45e9772763bf23402f4ad229 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 96ccbf3..b07dbcf 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.7.4

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

* [dpdk-stable] patch 'lpm: fix ARM big endian build' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (14 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'pmdinfogen: fix cross compilation for ARM big endian' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'bus/dpaa: " Yuanhan Liu
                   ` (140 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 31df9733d22226c7c6f46b2fb2474229ffc88ff3 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 e1f1fad..dda74a9 100644
--- a/lib/librte_lpm/rte_lpm.c
+++ b/lib/librte_lpm/rte_lpm.c
@@ -912,7 +912,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,
@@ -958,7 +958,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,
@@ -1365,7 +1365,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,
@@ -1668,7 +1668,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.7.4

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

* [dpdk-stable] patch 'bus/dpaa: fix ARM big endian build' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (15 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'lpm: fix ARM big endian build' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/i40e: " Yuanhan Liu
                   ` (139 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From a9cc5ad1061dd5cb09dd482cdcfc1cfba65752b5 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Mon, 18 Dec 2017 13:26:47 +0530
Subject: [PATCH] bus/dpaa: fix ARM big endian build

[ upstream commit 0d941d16d3ccc7b1bbd81f6bf58bddbd3b3eea3b ]

Fix the following compilation error when compiling
with ARM BE compiler.

drivers/bus/dpaa/include/fsl_qman.h:1997:25:
error: statement with no effect [-Werror=unused-value]
 #define hw_sg_to_cpu(x) (x)

Fixes: c47ff048b99a ("bus/dpaa: add QMAN driver core routines")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/dpaa/include/fsl_qman.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/dpaa/include/fsl_qman.h b/drivers/bus/dpaa/include/fsl_qman.h
index eedfd7e..72556dc 100644
--- a/drivers/bus/dpaa/include/fsl_qman.h
+++ b/drivers/bus/dpaa/include/fsl_qman.h
@@ -1993,8 +1993,8 @@ static inline int qman_poll_fq_for_init(struct qman_fq *fq)
 }
 
 #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
-#define cpu_to_hw_sg(x) (x)
-#define hw_sg_to_cpu(x) (x)
+#define cpu_to_hw_sg(x)
+#define hw_sg_to_cpu(x)
 #else
 #define cpu_to_hw_sg(x)  __cpu_to_hw_sg(x)
 #define hw_sg_to_cpu(x)  __hw_sg_to_cpu(x)
-- 
2.7.4

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

* [dpdk-stable] patch 'net/i40e: fix ARM big endian build' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (16 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'bus/dpaa: " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/ixgbe: " Yuanhan Liu
                   ` (138 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From dd18ba50b3d9340dab332271ef32b8f96b5f1191 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 | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 811cc9f..a92933c 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -6951,7 +6951,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];
@@ -6984,8 +6984,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->element.ipaddr.v4.data,
-				&rte_cpu_to_le_32(ipv4_addr),
+				&ipv4_addr_le,
 				sizeof(pfilter->element.ipaddr.v4.data));
 	} else {
 		ip_type = I40E_AQC_ADD_CLOUD_FLAGS_IPV6;
@@ -7302,7 +7303,7 @@ i40e_dev_consistent_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 variable to convert ipv6 byte order */
 	uint32_t convert_ipv6[4];
@@ -7338,8 +7339,9 @@ i40e_dev_consistent_tunnel_filter_set(struct i40e_pf *pf,
 	if (tunnel_filter->ip_type == I40E_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->element.ipaddr.v4.data,
-				&rte_cpu_to_le_32(ipv4_addr),
+				&ipv4_addr_le,
 				sizeof(pfilter->element.ipaddr.v4.data));
 	} else {
 		ip_type = I40E_AQC_ADD_CLOUD_FLAGS_IPV6;
-- 
2.7.4

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

* [dpdk-stable] patch 'net/ixgbe: fix ARM big endian build' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (17 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/i40e: " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'mempool/octeontx: fix improper memory barrier' " Yuanhan Liu
                   ` (137 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From dab35120edc4a3235ef9bec09bd042830dc8cc2d 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 7f85713..5e6ad95 100644
--- a/drivers/net/ixgbe/base/ixgbe_common.c
+++ b/drivers/net/ixgbe/base/ixgbe_common.c
@@ -4607,7 +4607,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 */
@@ -4627,7 +4627,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.7.4

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

* [dpdk-stable] patch 'mempool/octeontx: fix improper memory barrier' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (18 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/ixgbe: " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'mempool: fix first memory area notification' " Yuanhan Liu
                   ` (136 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Santosh Shukla, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From d925af2c087da01457f861890d06a5c288901a13 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Date: Mon, 8 Jan 2018 10:10:43 +0530
Subject: [PATCH] mempool/octeontx: fix improper memory barrier

[ upstream commit b6f26c9db26482d0e8c004b138aa72bdf5f6c975 ]

Use smp barrier instead of IO barrier when sending mbox request as the
write has to be reflected between cores not IO devices.

Fixes: 6da9d24574db ("event/octeontx: add mailbox support")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
---
 drivers/mempool/octeontx/octeontx_mbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mempool/octeontx/octeontx_mbox.c b/drivers/mempool/octeontx/octeontx_mbox.c
index 9525da1..6c69003 100644
--- a/drivers/mempool/octeontx/octeontx_mbox.c
+++ b/drivers/mempool/octeontx/octeontx_mbox.c
@@ -128,7 +128,7 @@ mbox_send_request(struct mbox *m, struct octeontx_mbox_hdr *hdr,
 
 	/* Write the msg header */
 	rte_write64(new_hdr.u64, ram_mbox_hdr);
-	rte_io_wmb();
+	rte_smp_wmb();
 	/* Notify PF about the new msg - write to MBOX reg generates PF IRQ */
 	rte_write64(0, m->reg);
 }
-- 
2.7.4

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

* [dpdk-stable] patch 'mempool: fix first memory area notification' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (19 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'mempool/octeontx: fix improper memory barrier' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'mempool/octeontx: fix memory area registration' " Yuanhan Liu
                   ` (135 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Santosh Shukla, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 067290d2e49e1cbed648856128a6d915306de1e4 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Date: Sun, 24 Dec 2017 18:17:55 +0530
Subject: [PATCH] mempool: fix first memory area notification

[ upstream commit be2d94e5ebe9210d10389ad0646529300363833b ]

Mempool creation needs to be completed first before notifying mempool to
register the mempool area.

Fixes: 12b8cc1a7e86 ("mempool: notify memory area to pool")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
---
 lib/librte_mempool/rte_mempool.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index d50dba4..6d17022 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -367,11 +367,6 @@ rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
 	struct rte_mempool_memhdr *memhdr;
 	int ret;
 
-	/* Notify memory area to mempool */
-	ret = rte_mempool_ops_register_memory_area(mp, vaddr, iova, len);
-	if (ret != -ENOTSUP && ret < 0)
-		return ret;
-
 	/* create the internal ring if not already done */
 	if ((mp->flags & MEMPOOL_F_POOL_CREATED) == 0) {
 		ret = rte_mempool_ops_alloc(mp);
@@ -380,6 +375,11 @@ rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr,
 		mp->flags |= MEMPOOL_F_POOL_CREATED;
 	}
 
+	/* Notify memory area to mempool */
+	ret = rte_mempool_ops_register_memory_area(mp, vaddr, iova, len);
+	if (ret != -ENOTSUP && ret < 0)
+		return ret;
+
 	/* mempool is already populated */
 	if (mp->populated_size >= mp->size)
 		return -ENOSPC;
-- 
2.7.4

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

* [dpdk-stable] patch 'mempool/octeontx: fix memory area registration' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (20 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'mempool: fix first memory area notification' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'app/testpmd: fix port configuration print' " Yuanhan Liu
                   ` (134 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Santosh Shukla, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 8b81a1f950ae1561b97ab05141e9ed5006acf804 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Date: Sun, 24 Dec 2017 18:17:56 +0530
Subject: [PATCH] mempool/octeontx: fix memory area registration

[ upstream commit f477a4696572201cf26534c83a42ec7dc8098fd8 ]

Clean up the dependency between alloc and memory area registration, this
removes the need for SLIST data structure and octeontx_pool_list.

Fixes: 2baa3f0b7de5 ("mempool/octeontx: support memory area ops")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
---
 drivers/mempool/octeontx/octeontx_fpavf.c       | 23 ++------
 drivers/mempool/octeontx/octeontx_fpavf.h       |  6 ++-
 drivers/mempool/octeontx/rte_mempool_octeontx.c | 72 ++-----------------------
 3 files changed, 12 insertions(+), 89 deletions(-)

diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c
index 3bc50f3..28f431e 100644
--- a/drivers/mempool/octeontx/octeontx_fpavf.c
+++ b/drivers/mempool/octeontx/octeontx_fpavf.c
@@ -386,8 +386,8 @@ err:
 	return ret;
 }
 
-static int
-octeontx_fpavf_pool_setup(uintptr_t handle, unsigned long memsz,
+int
+octeontx_fpavf_pool_set_range(uintptr_t handle, unsigned long memsz,
 			  void *memva, uint16_t gpool)
 {
 	uint64_t va_end;
@@ -509,12 +509,9 @@ octeontx_fpa_bufpool_free_count(uintptr_t handle)
 
 uintptr_t
 octeontx_fpa_bufpool_create(unsigned int object_size, unsigned int object_count,
-				unsigned int buf_offset, char **va_start,
-				int node_id)
+				unsigned int buf_offset, int node_id)
 {
 	unsigned int gpool;
-	void *memva;
-	unsigned long memsz;
 	uintptr_t gpool_handle;
 	uintptr_t pool_bar;
 	int res;
@@ -522,9 +519,6 @@ octeontx_fpa_bufpool_create(unsigned int object_size, unsigned int object_count,
 	RTE_SET_USED(node_id);
 	RTE_BUILD_BUG_ON(sizeof(struct rte_mbuf) > OCTEONTX_FPAVF_BUF_OFFSET);
 
-	if (unlikely(*va_start == NULL))
-		goto error_end;
-
 	object_size = RTE_CACHE_LINE_ROUNDUP(object_size);
 	if (object_size > FPA_MAX_OBJ_SIZE) {
 		errno = EINVAL;
@@ -567,15 +561,6 @@ octeontx_fpa_bufpool_create(unsigned int object_size, unsigned int object_count,
 		goto error_pool_destroy;
 	}
 
-	/* vf pool setup */
-	memsz = object_size * object_count;
-	memva = *va_start;
-	res = octeontx_fpavf_pool_setup(pool_bar, memsz, memva, gpool);
-	if (res < 0) {
-		errno = res;
-		goto error_gaura_detach;
-	}
-
 	/* Release lock */
 	rte_spinlock_unlock(&fpadev.lock);
 
@@ -591,8 +576,6 @@ octeontx_fpa_bufpool_create(unsigned int object_size, unsigned int object_count,
 
 	return gpool_handle;
 
-error_gaura_detach:
-	(void) octeontx_fpapf_aura_detach(gpool);
 error_pool_destroy:
 	octeontx_fpavf_free(gpool);
 	octeontx_fpapf_pool_destroy(gpool);
diff --git a/drivers/mempool/octeontx/octeontx_fpavf.h b/drivers/mempool/octeontx/octeontx_fpavf.h
index 1d09f00..bc5dc3b 100644
--- a/drivers/mempool/octeontx/octeontx_fpavf.h
+++ b/drivers/mempool/octeontx/octeontx_fpavf.h
@@ -114,8 +114,10 @@ do {							\
 
 uintptr_t
 octeontx_fpa_bufpool_create(unsigned int object_size, unsigned int object_count,
-				unsigned int buf_offset, char **va_start,
-				int node);
+				unsigned int buf_offset, int node);
+int
+octeontx_fpavf_pool_set_range(uintptr_t handle, unsigned long memsz,
+			  void *memva, uint16_t gpool);
 int
 octeontx_fpa_bufpool_destroy(uintptr_t handle, int node);
 int
diff --git a/drivers/mempool/octeontx/rte_mempool_octeontx.c b/drivers/mempool/octeontx/rte_mempool_octeontx.c
index e89355c..fc0cab9 100644
--- a/drivers/mempool/octeontx/rte_mempool_octeontx.c
+++ b/drivers/mempool/octeontx/rte_mempool_octeontx.c
@@ -36,55 +36,18 @@
 
 #include "octeontx_fpavf.h"
 
-/*
- * Per-pool descriptor.
- * Links mempool with the corresponding memzone,
- * that provides memory under the pool's elements.
- */
-struct octeontx_pool_info {
-	const struct rte_mempool *mp;
-	uintptr_t mz_addr;
-
-	SLIST_ENTRY(octeontx_pool_info) link;
-};
-
-SLIST_HEAD(octeontx_pool_list, octeontx_pool_info);
-
-/* List of the allocated pools */
-static struct octeontx_pool_list octeontx_pool_head =
-				SLIST_HEAD_INITIALIZER(octeontx_pool_head);
-/* Spinlock to protect pool list */
-static rte_spinlock_t pool_list_lock = RTE_SPINLOCK_INITIALIZER;
-
 static int
 octeontx_fpavf_alloc(struct rte_mempool *mp)
 {
 	uintptr_t pool;
-	struct octeontx_pool_info *pool_info;
 	uint32_t memseg_count = mp->size;
 	uint32_t object_size;
-	uintptr_t va_start;
 	int rc = 0;
 
-	rte_spinlock_lock(&pool_list_lock);
-	SLIST_FOREACH(pool_info, &octeontx_pool_head, link) {
-		if (pool_info->mp == mp)
-			break;
-	}
-	if (pool_info == NULL) {
-		rte_spinlock_unlock(&pool_list_lock);
-		return -ENXIO;
-	}
-
-	/* virtual hugepage mapped addr */
-	va_start = pool_info->mz_addr;
-	rte_spinlock_unlock(&pool_list_lock);
-
 	object_size = mp->elt_size + mp->header_size + mp->trailer_size;
 
 	pool = octeontx_fpa_bufpool_create(object_size, memseg_count,
 						OCTEONTX_FPAVF_BUF_OFFSET,
-						(char **)&va_start,
 						mp->socket_id);
 	rc = octeontx_fpa_bufpool_block_size(pool);
 	if (rc < 0)
@@ -109,27 +72,9 @@ _end:
 static void
 octeontx_fpavf_free(struct rte_mempool *mp)
 {
-	struct octeontx_pool_info *pool_info;
 	uintptr_t pool;
-
 	pool = (uintptr_t)mp->pool_id;
 
-	rte_spinlock_lock(&pool_list_lock);
-	SLIST_FOREACH(pool_info, &octeontx_pool_head, link) {
-		if (pool_info->mp == mp)
-			break;
-	}
-
-	if (pool_info == NULL) {
-		rte_spinlock_unlock(&pool_list_lock);
-		rte_panic("%s: trying to free pool with no valid metadata",
-		    __func__);
-	}
-
-	SLIST_REMOVE(&octeontx_pool_head, pool_info, octeontx_pool_info, link);
-	rte_spinlock_unlock(&pool_list_lock);
-
-	rte_free(pool_info);
 	octeontx_fpa_bufpool_destroy(pool, mp->socket_id);
 }
 
@@ -222,21 +167,14 @@ static int
 octeontx_fpavf_register_memory_area(const struct rte_mempool *mp,
 				    char *vaddr, rte_iova_t paddr, size_t len)
 {
-	struct octeontx_pool_info *pool_info;
-
 	RTE_SET_USED(paddr);
-	RTE_SET_USED(len);
+	uint8_t gpool;
+	uintptr_t pool_bar;
 
-	pool_info = rte_malloc("octeontx_pool_info", sizeof(*pool_info), 0);
-	if (pool_info == NULL)
-		return -ENOMEM;
+	gpool = octeontx_fpa_bufpool_gpool(mp->pool_id);
+	pool_bar = mp->pool_id & ~(uint64_t)FPA_GPOOL_MASK;
 
-	pool_info->mp = mp;
-	pool_info->mz_addr = (uintptr_t)vaddr;
-	rte_spinlock_lock(&pool_list_lock);
-	SLIST_INSERT_HEAD(&octeontx_pool_head, pool_info, link);
-	rte_spinlock_unlock(&pool_list_lock);
-	return 0;
+	return octeontx_fpavf_pool_set_range(pool_bar, len, vaddr, gpool);
 }
 
 static struct rte_mempool_ops octeontx_fpavf_ops = {
-- 
2.7.4

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

* [dpdk-stable] patch 'app/testpmd: fix port configuration print' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (21 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'mempool/octeontx: fix memory area registration' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'app/testpmd: fix flowgen forwarding offload flags' " Yuanhan Liu
                   ` (133 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Shahaf Shuler; +Cc: Wenzhuo Lu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From b151124f33c4e14c30c1e14ab09fcb9d023556c3 Mon Sep 17 00:00:00 2001
From: Shahaf Shuler <shahafs@mellanox.com>
Date: Wed, 10 Jan 2018 11:09:09 +0200
Subject: [PATCH] app/testpmd: fix port configuration print

[ upstream commit 75c530c1bd535110b31241bed63e102d922fc885 ]

The print of the port configuration was only according to configuration
of the first port.

Fixes: f2c5125a686a ("app/testpmd: use default Rx/Tx port configuration")

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 app/test-pmd/config.c | 48 ++++++++++++++++++++++++++++++------------------
 1 file changed, 30 insertions(+), 18 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index cd2ac11..8a2d30c 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1655,33 +1655,45 @@ fwd_lcores_config_display(void)
 void
 rxtx_config_display(void)
 {
-	printf("  %s packet forwarding%s - CRC stripping %s - "
-	       "packets/burst=%d\n", cur_fwd_eng->fwd_mode_name,
+	portid_t pid;
+
+	printf("  %s packet forwarding%s packets/burst=%d\n",
+	       cur_fwd_eng->fwd_mode_name,
 	       retry_enabled == 0 ? "" : " with retry",
-	       rx_mode.hw_strip_crc ? "enabled" : "disabled",
 	       nb_pkt_per_burst);
 
 	if (cur_fwd_eng == &tx_only_engine || cur_fwd_eng == &flow_gen_engine)
 		printf("  packet len=%u - nb packet segments=%d\n",
 				(unsigned)tx_pkt_length, (int) tx_pkt_nb_segs);
 
-	struct rte_eth_rxconf *rx_conf = &ports[0].rx_conf;
-	struct rte_eth_txconf *tx_conf = &ports[0].tx_conf;
-
 	printf("  nb forwarding cores=%d - nb forwarding ports=%d\n",
 	       nb_fwd_lcores, nb_fwd_ports);
-	printf("  RX queues=%d - RX desc=%d - RX free threshold=%d\n",
-	       nb_rxq, nb_rxd, rx_conf->rx_free_thresh);
-	printf("  RX threshold registers: pthresh=%d hthresh=%d wthresh=%d\n",
-	       rx_conf->rx_thresh.pthresh, rx_conf->rx_thresh.hthresh,
-	       rx_conf->rx_thresh.wthresh);
-	printf("  TX queues=%d - TX desc=%d - TX free threshold=%d\n",
-	       nb_txq, nb_txd, tx_conf->tx_free_thresh);
-	printf("  TX threshold registers: pthresh=%d hthresh=%d wthresh=%d\n",
-	       tx_conf->tx_thresh.pthresh, tx_conf->tx_thresh.hthresh,
-	       tx_conf->tx_thresh.wthresh);
-	printf("  TX RS bit threshold=%d - TXQ flags=0x%"PRIx32"\n",
-	       tx_conf->tx_rs_thresh, tx_conf->txq_flags);
+
+	RTE_ETH_FOREACH_DEV(pid) {
+		struct rte_eth_rxconf *rx_conf = &ports[pid].rx_conf;
+		struct rte_eth_txconf *tx_conf = &ports[pid].tx_conf;
+
+		printf("  port %d:\n", (unsigned int)pid);
+		printf("  CRC stripping %s\n",
+				ports[pid].dev_conf.rxmode.hw_strip_crc ?
+				"enabled" : "disabled");
+		printf("  RX queues=%d - RX desc=%d - RX free threshold=%d\n",
+				nb_rxq, nb_rxd, rx_conf->rx_free_thresh);
+		printf("  RX threshold registers: pthresh=%d hthresh=%d "
+		       " wthresh=%d\n",
+				rx_conf->rx_thresh.pthresh,
+				rx_conf->rx_thresh.hthresh,
+				rx_conf->rx_thresh.wthresh);
+		printf("  TX queues=%d - TX desc=%d - TX free threshold=%d\n",
+				nb_txq, nb_txd, tx_conf->tx_free_thresh);
+		printf("  TX threshold registers: pthresh=%d hthresh=%d "
+		       " wthresh=%d\n",
+				tx_conf->tx_thresh.pthresh,
+				tx_conf->tx_thresh.hthresh,
+				tx_conf->tx_thresh.wthresh);
+		printf("  TX RS bit threshold=%d - TXQ flags=0x%"PRIx32"\n",
+				tx_conf->tx_rs_thresh, tx_conf->txq_flags);
+	}
 }
 
 void
-- 
2.7.4

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

* [dpdk-stable] patch 'app/testpmd: fix flowgen forwarding offload flags' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (22 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'app/testpmd: fix port configuration print' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'examples/l3fwd-power: fix Rx without interrupt' " Yuanhan Liu
                   ` (132 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Shahaf Shuler; +Cc: Wenzhuo Lu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 45954b8cb72d999fcd0bf5aa36ebb7476cf0a235 Mon Sep 17 00:00:00 2001
From: Shahaf Shuler <shahafs@mellanox.com>
Date: Wed, 10 Jan 2018 11:09:13 +0200
Subject: [PATCH] app/testpmd: fix flowgen forwarding offload flags

[ upstream commit b62678f7a3e4f423496b4cbd593c2c37f9283685 ]

The mbuf ol_flags were taken directly from testpmd internal enumeration
leading to incorrect values.

addressing only insertion offload flags as the checksum flags by
the application design are only with csum forwarding.

Fixes: e9e23a617eb8 ("app/testpmd: add flowgen forwarding engine")

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 app/test-pmd/flowgen.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
index acf9af9..46478fc 100644
--- a/app/test-pmd/flowgen.c
+++ b/app/test-pmd/flowgen.c
@@ -123,7 +123,7 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
 	struct ipv4_hdr *ip_hdr;
 	struct udp_hdr *udp_hdr;
 	uint16_t vlan_tci, vlan_tci_outer;
-	uint16_t ol_flags;
+	uint64_t ol_flags;
 	uint16_t nb_rx;
 	uint16_t nb_tx;
 	uint16_t nb_pkt;
@@ -151,7 +151,13 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
 	mbp = current_fwd_lcore()->mbp;
 	vlan_tci = ports[fs->tx_port].tx_vlan_id;
 	vlan_tci_outer = ports[fs->tx_port].tx_vlan_id_outer;
-	ol_flags = ports[fs->tx_port].tx_ol_flags;
+
+	if (ports[fs->tx_port].tx_ol_flags & TESTPMD_TX_OFFLOAD_INSERT_VLAN)
+		ol_flags = PKT_TX_VLAN_PKT;
+	if (ports[fs->tx_port].tx_ol_flags & TESTPMD_TX_OFFLOAD_INSERT_QINQ)
+		ol_flags |= PKT_TX_QINQ_PKT;
+	if (ports[fs->tx_port].tx_ol_flags & TESTPMD_TX_OFFLOAD_MACSEC)
+		ol_flags |= PKT_TX_MACSEC;
 
 	for (nb_pkt = 0; nb_pkt < nb_pkt_per_burst; nb_pkt++) {
 		pkt = rte_mbuf_raw_alloc(mbp);
-- 
2.7.4

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

* [dpdk-stable] patch 'examples/l3fwd-power: fix Rx without interrupt' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (23 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'app/testpmd: fix flowgen forwarding offload flags' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'examples/l3fwd-power: fix frequency detection' " Yuanhan Liu
                   ` (131 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Nikhil Agarwal; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 6f41a182089463c2bb81f313c138f1cad75f3069 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 0a4ed14..d335b0d 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -1051,9 +1051,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.7.4

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

* [dpdk-stable] patch 'examples/l3fwd-power: fix frequency detection' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (24 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'examples/l3fwd-power: fix Rx without interrupt' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'timer: fix reset on service cores' " Yuanhan Liu
                   ` (130 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Nikhil Agarwal; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 39d670535edc0be13d1b8383fb49ca2085322004 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 d335b0d..50c3702 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -79,8 +79,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 */
@@ -875,7 +873,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 queueid;
@@ -890,6 +888,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];
@@ -935,7 +935,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.7.4

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

* [dpdk-stable] patch 'timer: fix reset on service cores' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (25 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'examples/l3fwd-power: fix frequency detection' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/mlx5: cleanup allocation of ethtool stats' " Yuanhan Liu
                   ` (129 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Erik Gabriel Carrillo; +Cc: Pavan Nikhilesh, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From f95a50138aee23a2560390e87809ed7914448980 Mon Sep 17 00:00:00 2001
From: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Date: Fri, 12 Jan 2018 15:31:05 -0600
Subject: [PATCH] timer: fix reset on service cores

[ upstream commit d33fbd51e58545666dc9980484fc7c6a1a0d5439 ]

The return value of rte_lcore_has_role is misinterpreted in the timer
reset function.  The return values of rte_lcore_has_role will be changed
in a future DPDK release, but this commit fixes this call site until
that happens.

Fixes: 351f463456f8 ("timer: allow reset on service cores")

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 lib/librte_timer/rte_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c
index 88826f5..ba436cd 100644
--- a/lib/librte_timer/rte_timer.c
+++ b/lib/librte_timer/rte_timer.c
@@ -432,7 +432,7 @@ rte_timer_reset(struct rte_timer *tim, uint64_t ticks,
 
 	if (unlikely((tim_lcore != (unsigned)LCORE_ID_ANY) &&
 			!(rte_lcore_is_enabled(tim_lcore) ||
-				rte_lcore_has_role(tim_lcore, ROLE_SERVICE))))
+			  rte_lcore_has_role(tim_lcore, ROLE_SERVICE) == 0)))
 		return -1;
 
 	if (type == PERIODICAL)
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mlx5: cleanup allocation of ethtool stats' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (26 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'timer: fix reset on service cores' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/bonding: fix bonding in 8023ad mode' " Yuanhan Liu
                   ` (128 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Thierry Herbelot; +Cc: Nelio Laranjeiro, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From c6a459eb512872e357fb3ad82f4e02b06d75a6c5 Mon Sep 17 00:00:00 2001
From: Thierry Herbelot <thierry.herbelot@6wind.com>
Date: Fri, 17 Nov 2017 14:51:34 +0100
Subject: [PATCH] net/mlx5: cleanup allocation of ethtool stats

[ upstream commit 25b73ba6f3ea0894bf3cfc64e999f71a7e4f6787 ]

Simplify the computation for the needed size:
- exact size for the structure header,
- exact size for a number of 64-bit counters.

Fixes: a4193ae3bc4f ("net/mlx5: support extended statistics")

Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx5/mlx5_stats.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c
index 5e225d3..2427585 100644
--- a/drivers/net/mlx5/mlx5_stats.c
+++ b/drivers/net/mlx5/mlx5_stats.c
@@ -143,11 +143,9 @@ priv_read_dev_counters(struct priv *priv, uint64_t *stats)
 	struct mlx5_xstats_ctrl *xstats_ctrl = &priv->xstats_ctrl;
 	unsigned int i;
 	struct ifreq ifr;
-	unsigned int stats_sz = (xstats_ctrl->stats_n * sizeof(uint64_t)) +
-				 sizeof(struct ethtool_stats);
-	struct ethtool_stats et_stats[(stats_sz + (
-				      sizeof(struct ethtool_stats) - 1)) /
-				      sizeof(struct ethtool_stats)];
+	unsigned int stats_sz = xstats_ctrl->stats_n * sizeof(uint64_t);
+	unsigned char et_stat_buf[sizeof(struct ethtool_stats) + stats_sz];
+	struct ethtool_stats *et_stats = (struct ethtool_stats *)et_stat_buf;
 
 	et_stats->cmd = ETHTOOL_GSTATS;
 	et_stats->n_stats = xstats_ctrl->stats_n;
-- 
2.7.4

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

* [dpdk-stable] patch 'net/bonding: fix bonding in 8023ad mode' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (27 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/mlx5: cleanup allocation of ethtool stats' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/nfp: fix MTU settings' " Yuanhan Liu
                   ` (127 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Jacek Piasecki; +Cc: Radu Nicolau, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 577e1ac277f053df2e6c2608f84226c3c88c1e23 Mon Sep 17 00:00:00 2001
From: Jacek Piasecki <jacekx.piasecki@intel.com>
Date: Tue, 8 Aug 2017 14:56:43 +0200
Subject: [PATCH] net/bonding: fix bonding in 8023ad mode

[ upstream commit 1184582b5f80b2915d45e4015fb4e762954119e3 ]

This patch blocks possibility to set master bonding by
rte_eth_bond_mode_set() in 802.3ad mode, as the API
doesn't prevent this.

Fixes: 6d72657ce379 ("net/bonding: add other aggregator modes")

Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
Reviewed-by: Radu Nicolau <radu.nicolau@intel.com>
---
 drivers/net/bonding/rte_eth_bond_api.c     | 29 ++++++++++++++++++++++++++++-
 drivers/net/bonding/rte_eth_bond_private.h |  3 +++
 2 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index 980e636..703bb39 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -63,6 +63,25 @@ valid_bonded_port_id(uint16_t port_id)
 }
 
 int
+check_for_master_bonded_ethdev(const struct rte_eth_dev *eth_dev)
+{
+	int i;
+	struct bond_dev_private *internals;
+
+	if (check_for_bonded_ethdev(eth_dev) != 0)
+		return 0;
+
+	internals = eth_dev->data->dev_private;
+
+	/* Check if any of slave devices is a bonded device */
+	for (i = 0; i < internals->slave_count; i++)
+		if (valid_bonded_port_id(internals->slaves[i].port_id) == 0)
+			return 1;
+
+	return 0;
+}
+
+int
 valid_slave_port_id(uint16_t port_id, uint8_t mode)
 {
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -1);
@@ -496,10 +515,18 @@ rte_eth_bond_slave_remove(uint16_t bonded_port_id, uint16_t slave_port_id)
 int
 rte_eth_bond_mode_set(uint16_t bonded_port_id, uint8_t mode)
 {
+	struct rte_eth_dev *bonded_eth_dev;
+
 	if (valid_bonded_port_id(bonded_port_id) != 0)
 		return -1;
 
-	return bond_ethdev_mode_set(&rte_eth_devices[bonded_port_id], mode);
+	bonded_eth_dev = &rte_eth_devices[bonded_port_id];
+
+	if (check_for_master_bonded_ethdev(bonded_eth_dev) != 0 &&
+			mode == BONDING_MODE_8023AD)
+		return -1;
+
+	return bond_ethdev_mode_set(bonded_eth_dev, mode);
 }
 
 int
diff --git a/drivers/net/bonding/rte_eth_bond_private.h b/drivers/net/bonding/rte_eth_bond_private.h
index 1392da9..a5cfa6a 100644
--- a/drivers/net/bonding/rte_eth_bond_private.h
+++ b/drivers/net/bonding/rte_eth_bond_private.h
@@ -183,6 +183,9 @@ struct bond_dev_private {
 extern const struct eth_dev_ops default_dev_ops;
 
 int
+check_for_master_bonded_ethdev(const struct rte_eth_dev *eth_dev);
+
+int
 check_for_bonded_ethdev(const struct rte_eth_dev *eth_dev);
 
 /* Search given slave array to find position of given id.
-- 
2.7.4

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

* [dpdk-stable] patch 'net/nfp: fix MTU settings' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (28 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/bonding: fix bonding in 8023ad mode' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/nfp: fix jumbo " Yuanhan Liu
                   ` (126 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Alejandro Lucero; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 75dba7383ded16160b2f4633b14e5578dd2ef809 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 0501156..9a7b0b2 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1196,7 +1196,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;
 
@@ -2774,7 +2774,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.7.4

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

* [dpdk-stable] patch 'net/nfp: fix jumbo settings' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (29 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/nfp: fix MTU settings' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/nfp: fix CRC strip check behaviour' " Yuanhan Liu
                   ` (125 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Alejandro Lucero; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 03e87d16d5c4a83265bb984e738448e67bac5b02 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 9a7b0b2..4aec94d 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -489,7 +489,7 @@ nfp_net_configure(struct rte_eth_dev *dev)
 	}
 
 	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");
@@ -1469,6 +1469,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.7.4

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

* [dpdk-stable] patch 'net/nfp: fix CRC strip check behaviour' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (30 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/nfp: fix jumbo " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/thunderx: fix multi segment Tx function return' " Yuanhan Liu
                   ` (124 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Alejandro Lucero; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From fdad105bd353811bc03c8157cba573f1ebaa1d62 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 4aec94d..fa8ff3c 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -491,10 +491,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");
-		return -EINVAL;
-	}
+	if (!rxmode->hw_strip_crc)
+		PMD_INIT_LOG(INFO, "HW does strip CRC and it is not configurable");
 
 	if (rxmode->enable_scatter) {
 		PMD_INIT_LOG(INFO, "Scatter not supported");
-- 
2.7.4

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

* [dpdk-stable] patch 'net/thunderx: fix multi segment Tx function return' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (31 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/nfp: fix CRC strip check behaviour' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/mlx5: fix Tx checksum offloads' " Yuanhan Liu
                   ` (123 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Sunil Kulkarni, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 0709630ae742ac3e527dc187940963f7aa83cf5d 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 e27776e..9d69cf4 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.7.4

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

* [dpdk-stable] patch 'net/mlx5: fix Tx checksum offloads' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (32 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/thunderx: fix multi segment Tx function return' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/mlx4: fix unnecessary include' " Yuanhan Liu
                   ` (122 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Nélio Laranjeiro; +Cc: Yongseok Koh, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 6c337e3f65271c4f56f0f6f8bab8de83afb06060 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= <nelio.laranjeiro@6wind.com>
Date: Mon, 20 Nov 2017 16:35:47 +0100
Subject: [PATCH] net/mlx5: fix Tx checksum offloads

[ upstream commit 4aa15eb19afe1da7704342286f3aad642a83b8e0 ]

Tx checksum offloads are correctly handled in a single Tx burst function
whereas the capability is always set.
This causes VXLAN packet with checksum offloads request to be ignored when
the (E)MPS Tx functions are selected.

Fixes: f5fde5205101 ("net/mlx5: add hardware checksum offload for tunnel packets")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5.c               |  2 +-
 drivers/net/mlx5/mlx5_rxtx.c          | 41 +++++++----------------------------
 drivers/net/mlx5/mlx5_rxtx.h          | 34 +++++++++++++++++++++++++++++
 drivers/net/mlx5/mlx5_rxtx_vec.c      | 19 +---------------
 drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 19 ++--------------
 drivers/net/mlx5/mlx5_rxtx_vec_sse.h  | 19 ++--------------
 6 files changed, 48 insertions(+), 86 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 0548d17..a5eb3fd 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -802,7 +802,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 		priv->hw_csum_l2tun = !!(exp_device_attr.exp_device_cap_flags &
 					 IBV_DEVICE_VXLAN_SUPPORT);
 #endif
-		DEBUG("L2 tunnel checksum offloads are %ssupported",
+		DEBUG("Rx L2 tunnel checksum offloads are %ssupported",
 		      (priv->hw_csum_l2tun ? "" : "not "));
 
 #ifdef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 2d30c50..32bfa30 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -374,7 +374,7 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
 		uint16_t pkt_inline_sz = MLX5_WQE_DWORD_SIZE + 2;
 		uint16_t tso_header_sz = 0;
 		uint16_t ehdr;
-		uint8_t cs_flags = 0;
+		uint8_t cs_flags;
 		uint64_t tso = 0;
 		uint16_t tso_segsz = 0;
 #ifdef MLX5_PMD_SOFT_COUNTERS
@@ -417,23 +417,7 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
 		if (pkts_n - i > 1)
 			rte_prefetch0(
 			    rte_pktmbuf_mtod(*(pkts + 1), volatile void *));
-		/* Should we enable HW CKSUM offload */
-		if (buf->ol_flags &
-		    (PKT_TX_IP_CKSUM | PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM)) {
-			const uint64_t is_tunneled = buf->ol_flags &
-						     (PKT_TX_TUNNEL_GRE |
-						      PKT_TX_TUNNEL_VXLAN);
-
-			if (is_tunneled && txq->tunnel_en) {
-				cs_flags = MLX5_ETH_WQE_L3_INNER_CSUM |
-					   MLX5_ETH_WQE_L4_INNER_CSUM;
-				if (buf->ol_flags & PKT_TX_OUTER_IP_CKSUM)
-					cs_flags |= MLX5_ETH_WQE_L3_CSUM;
-			} else {
-				cs_flags = MLX5_ETH_WQE_L3_CSUM |
-					   MLX5_ETH_WQE_L4_CSUM;
-			}
-		}
+		cs_flags = txq_ol_cksum_to_cs(txq, buf);
 		raw = ((uint8_t *)(uintptr_t)wqe) + 2 * MLX5_WQE_DWORD_SIZE;
 		/* Replace the Ethernet type by the VLAN if necessary. */
 		if (buf->ol_flags & PKT_TX_VLAN_PKT) {
@@ -847,7 +831,7 @@ mlx5_tx_burst_mpw(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
 		struct rte_mbuf *buf = *(pkts++);
 		uint32_t length;
 		unsigned int segs_n = buf->nb_segs;
-		uint32_t cs_flags = 0;
+		uint32_t cs_flags;
 
 		/*
 		 * Make sure there is enough room to store this packet and
@@ -863,10 +847,7 @@ mlx5_tx_burst_mpw(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
 		}
 		max_elts -= segs_n;
 		--pkts_n;
-		/* Should we enable HW CKSUM offload */
-		if (buf->ol_flags &
-		    (PKT_TX_IP_CKSUM | PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM))
-			cs_flags = MLX5_ETH_WQE_L3_CSUM | MLX5_ETH_WQE_L4_CSUM;
+		cs_flags = txq_ol_cksum_to_cs(txq, buf);
 		/* Retrieve packet information. */
 		length = PKT_LEN(buf);
 		assert(length);
@@ -1072,7 +1053,7 @@ mlx5_tx_burst_mpw_inline(void *dpdk_txq, struct rte_mbuf **pkts,
 		uintptr_t addr;
 		uint32_t length;
 		unsigned int segs_n = buf->nb_segs;
-		uint32_t cs_flags = 0;
+		uint8_t cs_flags;
 
 		/*
 		 * Make sure there is enough room to store this packet and
@@ -1093,10 +1074,7 @@ mlx5_tx_burst_mpw_inline(void *dpdk_txq, struct rte_mbuf **pkts,
 		 * iteration.
 		 */
 		max_wqe = (1u << txq->wqe_n) - (txq->wqe_ci - txq->wqe_pi);
-		/* Should we enable HW CKSUM offload */
-		if (buf->ol_flags &
-		    (PKT_TX_IP_CKSUM | PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM))
-			cs_flags = MLX5_ETH_WQE_L3_CSUM | MLX5_ETH_WQE_L4_CSUM;
+		cs_flags = txq_ol_cksum_to_cs(txq, buf);
 		/* Retrieve packet information. */
 		length = PKT_LEN(buf);
 		/* Start new session if packet differs. */
@@ -1366,7 +1344,7 @@ mlx5_tx_burst_empw(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
 		unsigned int do_inline = 0; /* Whether inline is possible. */
 		uint32_t length;
 		unsigned int segs_n = buf->nb_segs;
-		uint32_t cs_flags = 0;
+		uint8_t cs_flags;
 
 		/*
 		 * Make sure there is enough room to store this packet and
@@ -1380,10 +1358,7 @@ mlx5_tx_burst_empw(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
 			txq->stats.oerrors++;
 			break;
 		}
-		/* Should we enable HW CKSUM offload. */
-		if (buf->ol_flags &
-		    (PKT_TX_IP_CKSUM | PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM))
-			cs_flags = MLX5_ETH_WQE_L3_CSUM | MLX5_ETH_WQE_L4_CSUM;
+		cs_flags = txq_ol_cksum_to_cs(txq, buf);
 		/* Retrieve packet information. */
 		length = PKT_LEN(buf);
 		/* Start new session if:
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index d34f3cc..63eb12c 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -617,4 +617,38 @@ mlx5_tx_dbrec(struct mlx5_txq_data *txq, volatile struct mlx5_wqe *wqe)
 	mlx5_tx_dbrec_cond_wmb(txq, wqe, 1);
 }
 
+/**
+ * Convert the Checksum offloads to Verbs.
+ *
+ * @param txq_data
+ *   Pointer to the Tx queue.
+ * @param buf
+ *   Pointer to the mbuf.
+ *
+ * @return
+ *   the converted cs_flags.
+ */
+static __rte_always_inline uint8_t
+txq_ol_cksum_to_cs(struct mlx5_txq_data *txq_data, struct rte_mbuf *buf)
+{
+	uint8_t cs_flags = 0;
+
+	/* Should we enable HW CKSUM offload */
+	if (buf->ol_flags &
+	    (PKT_TX_IP_CKSUM | PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM)) {
+		if (txq_data->tunnel_en &&
+		    (buf->ol_flags &
+		     (PKT_TX_TUNNEL_GRE | PKT_TX_TUNNEL_VXLAN))) {
+			cs_flags = MLX5_ETH_WQE_L3_INNER_CSUM |
+				   MLX5_ETH_WQE_L4_INNER_CSUM;
+			if (buf->ol_flags & PKT_TX_OUTER_IP_CKSUM)
+				cs_flags |= MLX5_ETH_WQE_L3_CSUM;
+		} else {
+			cs_flags = MLX5_ETH_WQE_L3_CSUM |
+				   MLX5_ETH_WQE_L4_CSUM;
+		}
+	}
+	return cs_flags;
+}
+
 #endif /* RTE_PMD_MLX5_RXTX_H_ */
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.c b/drivers/net/mlx5/mlx5_rxtx_vec.c
index ba6c8ce..3aca17c 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec.c
+++ b/drivers/net/mlx5/mlx5_rxtx_vec.c
@@ -123,24 +123,7 @@ txq_calc_offload(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,
 	for (pos = 1; pos < pkts_n; ++pos)
 		if ((pkts[pos]->ol_flags ^ pkts[0]->ol_flags) & ol_mask)
 			break;
-	/* Should open another MPW session for the rest. */
-	if (pkts[0]->ol_flags &
-	    (PKT_TX_IP_CKSUM | PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM)) {
-		const uint64_t is_tunneled =
-			pkts[0]->ol_flags &
-			(PKT_TX_TUNNEL_GRE |
-			 PKT_TX_TUNNEL_VXLAN);
-
-		if (is_tunneled && txq->tunnel_en) {
-			*cs_flags = MLX5_ETH_WQE_L3_INNER_CSUM |
-				    MLX5_ETH_WQE_L4_INNER_CSUM;
-			if (pkts[0]->ol_flags & PKT_TX_OUTER_IP_CKSUM)
-				*cs_flags |= MLX5_ETH_WQE_L3_CSUM;
-		} else {
-			*cs_flags = MLX5_ETH_WQE_L3_CSUM |
-				    MLX5_ETH_WQE_L4_CSUM;
-		}
-	}
+	*cs_flags = txq_ol_cksum_to_cs(txq, pkts[0]);
 	return pos;
 }
 
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
index c721d80..77ce0c3 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
@@ -149,7 +149,7 @@ txq_scatter_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,
 			11, 10,  9,  8, /* bswap32 */
 			12, 13, 14, 15
 		};
-		uint8_t cs_flags = 0;
+		uint8_t cs_flags;
 		uint16_t max_elts;
 		uint16_t max_wqe;
 		uint8x16_t *t_wqe;
@@ -168,22 +168,7 @@ txq_scatter_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,
 			break;
 		wqe = &((volatile struct mlx5_wqe64 *)
 			 txq->wqes)[wqe_ci & wq_mask].hdr;
-		if (buf->ol_flags &
-		     (PKT_TX_IP_CKSUM | PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM)) {
-			const uint64_t is_tunneled =
-				buf->ol_flags & (PKT_TX_TUNNEL_GRE |
-						 PKT_TX_TUNNEL_VXLAN);
-
-			if (is_tunneled && txq->tunnel_en) {
-				cs_flags = MLX5_ETH_WQE_L3_INNER_CSUM |
-					   MLX5_ETH_WQE_L4_INNER_CSUM;
-				if (buf->ol_flags & PKT_TX_OUTER_IP_CKSUM)
-					cs_flags |= MLX5_ETH_WQE_L3_CSUM;
-			} else {
-				cs_flags = MLX5_ETH_WQE_L3_CSUM |
-					   MLX5_ETH_WQE_L4_CSUM;
-			}
-		}
+		cs_flags = txq_ol_cksum_to_cs(txq, buf);
 		/* Title WQEBB pointer. */
 		t_wqe = (uint8x16_t *)wqe;
 		dseg = (uint8_t *)(wqe + 1);
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
index 2b9f160..f256811 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
@@ -148,7 +148,7 @@ txq_scatter_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,
 				      8,  9, 10, 11, /* bswap32 */
 				      4,  5,  6,  7, /* bswap32 */
 				      0,  1,  2,  3  /* bswap32 */);
-		uint8_t cs_flags = 0;
+		uint8_t cs_flags;
 		uint16_t max_elts;
 		uint16_t max_wqe;
 		__m128i *t_wqe, *dseg;
@@ -170,22 +170,7 @@ txq_scatter_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,
 		}
 		wqe = &((volatile struct mlx5_wqe64 *)
 			 txq->wqes)[wqe_ci & wq_mask].hdr;
-		if (buf->ol_flags &
-		     (PKT_TX_IP_CKSUM | PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM)) {
-			const uint64_t is_tunneled =
-				buf->ol_flags & (PKT_TX_TUNNEL_GRE |
-						 PKT_TX_TUNNEL_VXLAN);
-
-			if (is_tunneled && txq->tunnel_en) {
-				cs_flags = MLX5_ETH_WQE_L3_INNER_CSUM |
-					   MLX5_ETH_WQE_L4_INNER_CSUM;
-				if (buf->ol_flags & PKT_TX_OUTER_IP_CKSUM)
-					cs_flags |= MLX5_ETH_WQE_L3_CSUM;
-			} else {
-				cs_flags = MLX5_ETH_WQE_L3_CSUM |
-					   MLX5_ETH_WQE_L4_CSUM;
-			}
-		}
+		cs_flags = txq_ol_cksum_to_cs(txq, buf);
 		/* Title WQEBB pointer. */
 		t_wqe = (__m128i *)wqe;
 		dseg = (__m128i *)(wqe + 1);
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mlx4: fix unnecessary include' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (33 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/mlx5: fix Tx checksum offloads' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/szedata2: fix check of mmap return value' " Yuanhan Liu
                   ` (121 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Adrien Mazarguil; +Cc: Neil Horman, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 4fa69fa7ca9e20c103eec2e90b3aa7fa0fe3e2fd Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Date: Thu, 23 Nov 2017 18:37:56 +0100
Subject: [PATCH] net/mlx4: fix unnecessary include

[ upstream commit 3058dd9bca06b38e26a9c60fe63f86582eeca134 ]

Fixes: a2ce2121c01c ("net/mlx4: separate Tx configuration functions")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
---
 drivers/net/mlx4/mlx4_txq.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/mlx4/mlx4_txq.c b/drivers/net/mlx4/mlx4_txq.c
index 7882a4d..17f3b00 100644
--- a/drivers/net/mlx4/mlx4_txq.c
+++ b/drivers/net/mlx4/mlx4_txq.c
@@ -59,7 +59,6 @@
 #include <rte_mempool.h>
 
 #include "mlx4.h"
-#include "mlx4_autoconf.h"
 #include "mlx4_prm.h"
 #include "mlx4_rxtx.h"
 #include "mlx4_utils.h"
-- 
2.7.4

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

* [dpdk-stable] patch 'net/szedata2: fix check of mmap return value' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (34 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/mlx4: fix unnecessary include' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'bus/fslmc: fix the cplusplus macro closure' " Yuanhan Liu
                   ` (120 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Matej Vido; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From f23f5e9f683c982ab7c75d8ec6752de715fd94cc 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 74f151c..af0580a 100644
--- a/drivers/net/szedata2/rte_eth_szedata2.c
+++ b/drivers/net/szedata2/rte_eth_szedata2.c
@@ -1553,7 +1553,7 @@ rte_szedata2_eth_dev_init(struct rte_eth_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.7.4

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

* [dpdk-stable] patch 'bus/fslmc: fix the cplusplus macro closure' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (35 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/szedata2: fix check of mmap return value' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'drivers: change the deprecated memseg physaddr to IOVA' " Yuanhan Liu
                   ` (119 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 0e5db82f3f92ead4841a2b9b4af657cbf17c15c0 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Fri, 8 Dec 2017 10:51:14 +0530
Subject: [PATCH] bus/fslmc: fix the cplusplus macro closure

[ upstream commit 7adf01cf803a1f845c0dd95961cf6ff103636cba ]

Fixes: 10f1614f36a6 ("drivers: refactor DPAA2 object definition")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/rte_fslmc.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/bus/fslmc/rte_fslmc.h b/drivers/bus/fslmc/rte_fslmc.h
index 4c32db6..0814e69 100644
--- a/drivers/bus/fslmc/rte_fslmc.h
+++ b/drivers/bus/fslmc/rte_fslmc.h
@@ -175,10 +175,6 @@ static void dpaa2initfn_ ##nm(void) \
 } \
 RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
 
-#ifdef __cplusplus
-}
-#endif
-
 /**
  * Register a DPAA2 MC Object driver.
  *
@@ -198,4 +194,8 @@ static void dpaa2objinitfn_ ##nm(void) \
 } \
 RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _RTE_FSLMC_H_ */
-- 
2.7.4

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

* [dpdk-stable] patch 'drivers: change the deprecated memseg physaddr to IOVA' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (36 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'bus/fslmc: fix the cplusplus macro closure' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/mlx4: revert workaround for broken Verbs' " Yuanhan Liu
                   ` (118 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Santosh Shukla, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 32509649039d1c1334644891ba5ab7aa8e1df59b Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Fri, 8 Dec 2017 10:51:15 +0530
Subject: [PATCH] drivers: change the deprecated memseg physaddr to IOVA

[ upstream commit 2aab833725cced38cd2596940f58c89857f7ec03 ]

DPAA and DPAA2 drivers were using memseg physaddr, which
has been deprecated.

Fixes: 7ba49d39f14c ("mem: rename segment address from physical to IOVA")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
---
 drivers/bus/dpaa/rte_dpaa_bus.h         | 6 +++---
 drivers/bus/fslmc/fslmc_vfio.c          | 2 +-
 drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 8 ++++----
 drivers/crypto/dpaa_sec/dpaa_sec.c      | 8 ++++----
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/bus/dpaa/rte_dpaa_bus.h b/drivers/bus/dpaa/rte_dpaa_bus.h
index eafc944..bc933af 100644
--- a/drivers/bus/dpaa/rte_dpaa_bus.h
+++ b/drivers/bus/dpaa/rte_dpaa_bus.h
@@ -113,10 +113,10 @@ static inline void *rte_dpaa_mem_ptov(phys_addr_t paddr)
 	int i;
 
 	for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr != NULL; i++) {
-		if (paddr >= memseg[i].phys_addr && paddr <
-			memseg[i].phys_addr + memseg[i].len)
+		if (paddr >= memseg[i].iova && paddr <
+			memseg[i].iova + memseg[i].len)
 			return (uint8_t *)(memseg[i].addr) +
-			       (paddr - memseg[i].phys_addr);
+			       (paddr - memseg[i].iova);
 	}
 
 	return NULL;
diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index 7831201..a936321 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -249,7 +249,7 @@ int rte_fslmc_vfio_dmamap(void)
 		dma_map.size = memseg[i].len;
 		dma_map.vaddr = memseg[i].addr_64;
 #ifdef RTE_LIBRTE_DPAA2_USE_PHYS_IOVA
-		dma_map.iova = memseg[i].phys_addr;
+		dma_map.iova = memseg[i].iova;
 #else
 		dma_map.iova = dma_map.vaddr;
 #endif
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
index c1b842f..ece1a7d 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
@@ -284,10 +284,10 @@ static void *dpaa2_mem_ptov(phys_addr_t paddr)
 	int i;
 
 	for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr_64 != 0; i++) {
-		if (paddr >= memseg[i].phys_addr &&
-		   (char *)paddr < (char *)memseg[i].phys_addr + memseg[i].len)
+		if (paddr >= memseg[i].iova &&
+		   (char *)paddr < (char *)memseg[i].iova + memseg[i].len)
 			return (void *)(memseg[i].addr_64
-				+ (paddr - memseg[i].phys_addr));
+				+ (paddr - memseg[i].iova));
 	}
 	return NULL;
 }
@@ -301,7 +301,7 @@ static phys_addr_t dpaa2_mem_vtop(uint64_t vaddr)
 	for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr_64 != 0; i++) {
 		if (vaddr >= memseg[i].addr_64 &&
 		    vaddr < memseg[i].addr_64 + memseg[i].len)
-			return memseg[i].phys_addr
+			return memseg[i].iova
 				+ (vaddr - memseg[i].addr_64);
 	}
 	return (phys_addr_t)(NULL);
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 16155b1..438dd3b 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -121,7 +121,7 @@ dpaa_mem_vtop(void *vaddr)
 	for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr_64 != 0; i++) {
 		if (vaddr_64 >= memseg[i].addr_64 &&
 		    vaddr_64 < memseg[i].addr_64 + memseg[i].len) {
-			paddr = memseg[i].phys_addr +
+			paddr = memseg[i].iova +
 				(vaddr_64 - memseg[i].addr_64);
 
 			return (rte_iova_t)paddr;
@@ -137,10 +137,10 @@ dpaa_mem_ptov(rte_iova_t paddr)
 	int i;
 
 	for (i = 0; i < RTE_MAX_MEMSEG && memseg[i].addr_64 != 0; i++) {
-		if (paddr >= memseg[i].phys_addr &&
-		    (char *)paddr < (char *)memseg[i].phys_addr + memseg[i].len)
+		if (paddr >= memseg[i].iova &&
+		    (char *)paddr < (char *)memseg[i].iova + memseg[i].len)
 			return (void *)(memseg[i].addr_64 +
-					(paddr - memseg[i].phys_addr));
+					(paddr - memseg[i].iova));
 	}
 	return NULL;
 }
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mlx4: revert workaround for broken Verbs' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (37 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'drivers: change the deprecated memseg physaddr to IOVA' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/mlx5: fix flow type for allmulti rules' " Yuanhan Liu
                   ` (117 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Matan Azrad; +Cc: Adrien Mazarguil, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 92a6ceb8e91ecf50b344d2a50f52dad7f0a07288 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Wed, 29 Nov 2017 09:21:26 +0000
Subject: [PATCH] net/mlx4: revert workaround for broken Verbs

[ upstream commit c2b3dba84ad319003df04a5a9fa163a953224e83 ]

This workaround was needed to properly handle device removal with old
Mellanox OFED releases that are not supported by this PMD anymore.

Starting from rdma-core v16 this removal issue shouldn't happen when
setting MLX4_DEVICE_FATAL_CLEANUP environment variable to 1.

Set the aforementioned variable to 1.

Reverts: 5f4677c6ad5e ("net/mlx4: workaround verbs error after plug-out")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 config/common_base            | 1 -
 doc/guides/nics/mlx4.rst      | 8 --------
 drivers/net/mlx4/Makefile     | 4 ----
 drivers/net/mlx4/mlx4.c       | 6 ++++++
 drivers/net/mlx4/mlx4_utils.h | 6 ------
 5 files changed, 6 insertions(+), 19 deletions(-)

diff --git a/config/common_base b/config/common_base
index e74febe..b8ee8f9 100644
--- a/config/common_base
+++ b/config/common_base
@@ -230,7 +230,6 @@ CONFIG_RTE_LIBRTE_FM10K_INC_VECTOR=y
 #
 CONFIG_RTE_LIBRTE_MLX4_PMD=n
 CONFIG_RTE_LIBRTE_MLX4_DEBUG=n
-CONFIG_RTE_LIBRTE_MLX4_DEBUG_BROKEN_VERBS=n
 CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE=8
 
 #
diff --git a/doc/guides/nics/mlx4.rst b/doc/guides/nics/mlx4.rst
index 22341b9..cab45df 100644
--- a/doc/guides/nics/mlx4.rst
+++ b/doc/guides/nics/mlx4.rst
@@ -92,14 +92,6 @@ These options can be modified in the ``.config`` file.
   adds additional run-time checks and debugging messages at the cost of
   lower performance.
 
-- ``CONFIG_RTE_LIBRTE_MLX4_DEBUG_BROKEN_VERBS`` (default **n**)
-
-  Mellanox OFED versions earlier than 4.2 may return false errors from
-  Verbs object destruction APIs after the device is plugged out.
-  Enabling this option replaces assertion checks that cause the program
-  to abort with harmless debugging messages as a workaround.
-  Relevant only when CONFIG_RTE_LIBRTE_MLX4_DEBUG is enabled.
-
 - ``CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE`` (default **8**)
 
   Maximum number of cached memory pools (MPs) per TX queue. Each MP from
diff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile
index f1f47c2..1f95e0d 100644
--- a/drivers/net/mlx4/Makefile
+++ b/drivers/net/mlx4/Makefile
@@ -82,10 +82,6 @@ ifdef CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE
 CFLAGS += -DMLX4_PMD_TX_MP_CACHE=$(CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE)
 endif
 
-ifeq ($(CONFIG_RTE_LIBRTE_MLX4_DEBUG_BROKEN_VERBS),y)
-CFLAGS += -DMLX4_PMD_DEBUG_BROKEN_VERBS
-endif
-
 include $(RTE_SDK)/mk/rte.lib.mk
 
 # Generate and clean-up mlx4_autoconf.h.
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index f9e4f9d..97dac64 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -708,6 +708,12 @@ static void
 rte_mlx4_pmd_init(void)
 {
 	/*
+	 * MLX4_DEVICE_FATAL_CLEANUP tells ibv_destroy functions we
+	 * want to get success errno value in case of calling them
+	 * when the device was removed.
+	 */
+	setenv("MLX4_DEVICE_FATAL_CLEANUP", "1", 1);
+	/*
 	 * RDMAV_HUGEPAGES_SAFE tells ibv_fork_init() we intend to use
 	 * huge pages. Calling ibv_fork_init() during init allows
 	 * applications to use fork() safely for purposes other than
diff --git a/drivers/net/mlx4/mlx4_utils.h b/drivers/net/mlx4/mlx4_utils.h
index dc529c9..4f11405 100644
--- a/drivers/net/mlx4/mlx4_utils.h
+++ b/drivers/net/mlx4/mlx4_utils.h
@@ -70,13 +70,7 @@ pmd_drv_log_basename(const char *s)
 			__func__, \
 			RTE_FMT_TAIL(__VA_ARGS__,)))
 #define DEBUG(...) PMD_DRV_LOG(DEBUG, __VA_ARGS__)
-#ifndef MLX4_PMD_DEBUG_BROKEN_VERBS
 #define claim_zero(...) assert((__VA_ARGS__) == 0)
-#else /* MLX4_PMD_DEBUG_BROKEN_VERBS */
-#define claim_zero(...) \
-	(void)(((__VA_ARGS__) == 0) || \
-		DEBUG("Assertion `(" # __VA_ARGS__ ") == 0' failed (IGNORED)."))
-#endif /* MLX4_PMD_DEBUG_BROKEN_VERBS */
 
 #else /* NDEBUG */
 
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mlx5: fix flow type for allmulti rules' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (38 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/mlx4: revert workaround for broken Verbs' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-02-13 11:56   ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/mlx4: fix Tx packet drop application report' " Yuanhan Liu
                   ` (116 subsequent siblings)
  156 siblings, 1 reply; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: Nelio Laranjeiro, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From b187189e1371cba301f85e1f11c3c7d0211e4a0a Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@mellanox.com>
Date: Tue, 5 Dec 2017 11:37:50 +0200
Subject: [PATCH] net/mlx5: fix flow type for allmulti rules

[ upstream commit 0a40a1363a4df8043f9a7e93289eda2ea52815a7 ]

Chnaged ibv_flow_attr type for allmulti rule to IBV_FLOW_ATTR_MC_DEFAULT
instead of IBV_FLOW_ATTR_NORMAL, in case allmulti was enabled.

Fixes: 272733b5 ("net/mlx5: use flow to enable unicast traffic")

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx5/mlx5_flow.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index f32dfdd..75ea299 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -432,6 +432,7 @@ static const struct mlx5_flow_items mlx5_flow_items[] = {
 /** Structure to pass to the conversion function. */
 struct mlx5_flow_parse {
 	uint32_t inner; /**< Set once VXLAN is encountered. */
+	uint32_t allmulti:1; /**< Set once allmulti dst MAC is encountered. */
 	uint32_t create:1;
 	/**< Whether resources should remain after a validate. */
 	uint32_t drop:1; /**< Target is a drop queue. */
@@ -1206,6 +1207,17 @@ exit_free:
 			}
 		}
 	}
+	if (parser->allmulti &&
+	    parser->layer == HASH_RXQ_ETH) {
+		for (i = 0; i != hash_rxq_init_n; ++i) {
+			if (!parser->queue[i].ibv_attr)
+				continue;
+			if (parser->queue[i].ibv_attr->num_of_specs != 1)
+				break;
+			parser->queue[i].ibv_attr->type =
+						IBV_FLOW_ATTR_MC_DEFAULT;
+		}
+	}
 	return ret;
 exit_enomem:
 	for (i = 0; i != hash_rxq_init_n; ++i) {
@@ -1311,6 +1323,7 @@ mlx5_flow_create_eth(const struct rte_flow_item *item,
 		eth.val.ether_type &= eth.mask.ether_type;
 	}
 	mlx5_flow_create_copy(parser, &eth, eth_size);
+	parser->allmulti = eth.val.dst_mac[0] & 1;
 	return 0;
 }
 
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mlx4: fix Tx packet drop application report' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (39 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/mlx5: fix flow type for allmulti rules' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/bonding: fix activated slave in 8023ad mode' " Yuanhan Liu
                   ` (115 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Matan Azrad; +Cc: Adrien Mazarguil, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From d8876839f2bf136dcb3220141d517cb3cf4c68b2 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Wed, 6 Dec 2017 17:57:49 +0000
Subject: [PATCH] net/mlx4: fix Tx packet drop application report

[ upstream commit e3ecea72a85626a0708625b7ad9a290ebdecfe24 ]

When invalid lkey is sent to HW, HW sends an error notification in
completion function.

The previous code wouldn't crash but doesn't add any application report
in case of completion error, so application cannot know that packet
actually was dropped in case of invalid lkey.

Return back the lkey validation to Tx path.

Fixes: 2eee458746bc ("net/mlx4: remove error flows from Tx fast path")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 drivers/net/mlx4/mlx4_rxtx.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/mlx4/mlx4_rxtx.c b/drivers/net/mlx4/mlx4_rxtx.c
index 2bfa8b1..0d008ed 100644
--- a/drivers/net/mlx4/mlx4_rxtx.c
+++ b/drivers/net/mlx4/mlx4_rxtx.c
@@ -468,7 +468,6 @@ mlx4_tx_burst_segs(struct rte_mbuf *buf, struct txq *txq,
 		/* Memory region key (big endian) for this memory pool. */
 		lkey = mlx4_txq_mp2mr(txq, mlx4_txq_mb2mp(sbuf));
 		dseg->lkey = rte_cpu_to_be_32(lkey);
-#ifndef NDEBUG
 		/* Calculate the needed work queue entry size for this packet */
 		if (unlikely(dseg->lkey == rte_cpu_to_be_32((uint32_t)-1))) {
 			/* MR does not exist. */
@@ -486,7 +485,6 @@ mlx4_tx_burst_segs(struct rte_mbuf *buf, struct txq *txq,
 					(sq->head & sq->txbb_cnt) ? 0 : 1);
 			return -1;
 		}
-#endif /* NDEBUG */
 		if (likely(sbuf->data_len)) {
 			byte_count = rte_cpu_to_be_32(sbuf->data_len);
 		} else {
@@ -636,7 +634,6 @@ mlx4_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
 			/* Memory region key (big endian). */
 			lkey = mlx4_txq_mp2mr(txq, mlx4_txq_mb2mp(buf));
 			dseg->lkey = rte_cpu_to_be_32(lkey);
-#ifndef NDEBUG
 			if (unlikely(dseg->lkey ==
 				rte_cpu_to_be_32((uint32_t)-1))) {
 				/* MR does not exist. */
@@ -655,7 +652,6 @@ mlx4_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
 				elt->buf = NULL;
 				break;
 			}
-#endif /* NDEBUG */
 			/* Never be TXBB aligned, no need compiler barrier. */
 			dseg->byte_count = rte_cpu_to_be_32(buf->data_len);
 			/* Fill the control parameters for this packet. */
-- 
2.7.4

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

* [dpdk-stable] patch 'net/bonding: fix activated slave in 8023ad mode' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (40 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/mlx4: fix Tx packet drop application report' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/qede: fix to enable LRO over tunnels' " Yuanhan Liu
                   ` (114 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Jerry Lilijun; +Cc: Kyle Larose, Declan Doherty, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 12cd8fb9a71903c79cbeeae82208cbbbac5535d8 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 eee9e50..1351808 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -1173,7 +1173,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.7.4

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

* [dpdk-stable] patch 'net/qede: fix to enable LRO over tunnels' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (41 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/bonding: fix activated slave in 8023ad mode' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/qede: fix to reject config with no Rx queue' " Yuanhan Liu
                   ` (113 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Harish Patil; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 35d796a4ba540392d89bb06808781aa686f50c48 Mon Sep 17 00:00:00 2001
From: Harish Patil <harish.patil@cavium.com>
Date: Wed, 13 Dec 2017 22:36:01 -0800
Subject: [PATCH] net/qede: fix to enable LRO over tunnels

[ upstream commit 749d2329f3cef4d3ccbd00000193a728f9393557 ]

Enable LRO feature to work with tunnel encapsulation protocols.

Fixes: 29540be7efce ("net/qede: support LRO/TSO offloads")

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

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 6f5ba2a..cc473d6 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -482,8 +482,8 @@ qede_update_sge_tpa_params(struct ecore_sge_tpa_params *sge_tpa_params,
 	/* Enable LRO in split mode */
 	sge_tpa_params->tpa_ipv4_en_flg = enable;
 	sge_tpa_params->tpa_ipv6_en_flg = enable;
-	sge_tpa_params->tpa_ipv4_tunn_en_flg = false;
-	sge_tpa_params->tpa_ipv6_tunn_en_flg = false;
+	sge_tpa_params->tpa_ipv4_tunn_en_flg = enable;
+	sge_tpa_params->tpa_ipv6_tunn_en_flg = enable;
 	/* set if tpa enable changes */
 	sge_tpa_params->update_tpa_en_flg = 1;
 	/* set if tpa parameters should be handled */
-- 
2.7.4

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

* [dpdk-stable] patch 'net/qede: fix to reject config with no Rx queue' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (42 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/qede: fix to enable LRO over tunnels' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/sfc: stop periodic DMA if MAC stats upload fails' " Yuanhan Liu
                   ` (112 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Harish Patil; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 5e9f158973e9c6b5b68e205f55356ad06de2f2ac 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 cc473d6..0128cec 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1233,6 +1233,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)
 		eth_dev->data->scattered_rx = 1;
-- 
2.7.4

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

* [dpdk-stable] patch 'net/sfc: stop periodic DMA if MAC stats upload fails' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (43 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/qede: fix to reject config with no Rx queue' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/sfc: fix multicast address list copy memory leak' " Yuanhan Liu
                   ` (111 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Ivan Malov, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 49abd1876f62ee747793be207e7711057b600a37 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Wed, 13 Dec 2017 07:12:16 +0000
Subject: [PATCH] net/sfc: stop periodic DMA if MAC stats upload fails

[ upstream commit 6636afdf77d76324deddf9664737390f81423b04 ]

Fixes: 3b257f7e6c0f ("net/sfc: request MAC stats upload immediately on port start")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
---
 drivers/net/sfc/sfc_port.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_port.c b/drivers/net/sfc/sfc_port.c
index c1466a7..55d8d46 100644
--- a/drivers/net/sfc/sfc_port.c
+++ b/drivers/net/sfc/sfc_port.c
@@ -279,10 +279,10 @@ fail_port_init_dev_link:
 	(void)efx_mac_drain(sa->nic, B_TRUE);
 
 fail_mac_drain:
+fail_mac_stats_upload:
 	(void)efx_mac_stats_periodic(sa->nic, &port->mac_stats_dma_mem,
 				     0, B_FALSE);
 
-fail_mac_stats_upload:
 fail_mac_stats_periodic:
 fail_mcast_address_list_set:
 fail_mac_filter_set:
-- 
2.7.4

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

* [dpdk-stable] patch 'net/sfc: fix multicast address list copy memory leak' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (44 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/sfc: stop periodic DMA if MAC stats upload fails' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/sfc: fix DMA memory leak after kvarg processing failure' " Yuanhan Liu
                   ` (110 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Ivan Malov, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From c74131149b360153d492dad88624805e34f63bc4 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Wed, 13 Dec 2017 07:12:17 +0000
Subject: [PATCH] net/sfc: fix multicast address list copy memory leak

[ upstream commit 8ae36890ca06bf66972f88d2f44040888ac94c6e ]

Fixes: 295f647a38a2 ("net/sfc: set multicast address list in started state only")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
---
 drivers/net/sfc/sfc_port.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/sfc/sfc_port.c b/drivers/net/sfc/sfc_port.c
index 55d8d46..d71ec18 100644
--- a/drivers/net/sfc/sfc_port.c
+++ b/drivers/net/sfc/sfc_port.c
@@ -406,7 +406,10 @@ sfc_port_attach(struct sfc_adapter *sa)
 fail_kvarg_stats_update_period_ms:
 fail_mac_stats_dma_alloc:
 	rte_free(port->mac_stats_buf);
+
 fail_mac_stats_buf_alloc:
+	rte_free(port->mcast_addrs);
+
 fail_mcast_addr_list_buf_alloc:
 	sfc_log_init(sa, "failed %d", rc);
 	return rc;
@@ -422,6 +425,8 @@ sfc_port_detach(struct sfc_adapter *sa)
 	sfc_dma_free(sa, &port->mac_stats_dma_mem);
 	rte_free(port->mac_stats_buf);
 
+	rte_free(port->mcast_addrs);
+
 	sfc_log_init(sa, "done");
 }
 
-- 
2.7.4

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

* [dpdk-stable] patch 'net/sfc: fix DMA memory leak after kvarg processing failure' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (45 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/sfc: fix multicast address list copy memory leak' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'ethdev: fix missing imissed counter in xstats' " Yuanhan Liu
                   ` (109 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Ivan Malov, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 7bde4179ecfb45410a49de26fcf0d07f80596b0a Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Wed, 13 Dec 2017 07:12:18 +0000
Subject: [PATCH] net/sfc: fix DMA memory leak after kvarg processing failure

[ upstream commit 1883f4b8a5fa87f4d62992127012602c14c312e8 ]

Fixes: e56fa9c23e7a ("net/sfc: add kvarg control for MAC statistics update period")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
---
 drivers/net/sfc/sfc_port.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/sfc/sfc_port.c b/drivers/net/sfc/sfc_port.c
index d71ec18..6cfd0e3 100644
--- a/drivers/net/sfc/sfc_port.c
+++ b/drivers/net/sfc/sfc_port.c
@@ -404,6 +404,8 @@ sfc_port_attach(struct sfc_adapter *sa)
 	return 0;
 
 fail_kvarg_stats_update_period_ms:
+	sfc_dma_free(sa, &port->mac_stats_dma_mem);
+
 fail_mac_stats_dma_alloc:
 	rte_free(port->mac_stats_buf);
 
-- 
2.7.4

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

* [dpdk-stable] patch 'ethdev: fix missing imissed counter in xstats' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (46 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/sfc: fix DMA memory leak after kvarg processing failure' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/sfc: fix main MAC address handling' " Yuanhan Liu
                   ` (108 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Thibaut Collet, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 5537bb13250b095b34b8d04880d5dbe02401746d 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 318af28..4f492e3 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -93,6 +93,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.7.4

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

* [dpdk-stable] patch 'net/sfc: fix main MAC address handling' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (47 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'ethdev: fix missing imissed counter in xstats' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/mlx5: fix VLAN configuration after port stop' " Yuanhan Liu
                   ` (107 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Ivan Malov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 3e73ef459b548207b0851d4a29f60befdfa650dd Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Wed, 20 Dec 2017 09:52:14 +0000
Subject: [PATCH] net/sfc: fix main MAC address handling

[ upstream commit 642088ddff841783f27b4a73f50c917ea2cfa953 ]

There is a school of thought that rte_eth_dev_default_mac_addr_set()
must call the PMD callback first and then save the new MAC address
in dev->data->mac_addrs[0]. If this concept gets approved, it will
break the current approach used in sfc driver as the latter relies
on the assumption that the new MAC address is already contained in
dev->data->mac_addrs[0], and, if adapter restart is needed to make
the HW apply the new address, the outdated value will be retrieved
from dev->data. In order to preclude any possible bugs, this patch
adds device private storage for the up-to-date copy of the address.

Fixes: c100fd464bb7 ("net/sfc: support main MAC address change")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc.h        |  2 ++
 drivers/net/sfc/sfc_ethdev.c | 19 ++++++++++++++++---
 drivers/net/sfc/sfc_port.c   | 10 ++++++++--
 3 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h
index 7f11bf2..b72eba0 100644
--- a/drivers/net/sfc/sfc.h
+++ b/drivers/net/sfc/sfc.h
@@ -158,6 +158,8 @@ struct sfc_port {
 	boolean_t			promisc;
 	boolean_t			allmulti;
 
+	struct ether_addr		default_mac_addr;
+
 	unsigned int			max_mcast_addrs;
 	unsigned int			nb_mcast_addrs;
 	uint8_t				*mcast_addrs;
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 2f5f86f..fabcc32 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -926,6 +926,12 @@ sfc_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
 
 	sfc_adapter_lock(sa);
 
+	/*
+	 * Copy the address to the device private data so that
+	 * it could be recalled in the case of adapter restart.
+	 */
+	ether_addr_copy(mac_addr, &port->default_mac_addr);
+
 	if (port->isolated) {
 		sfc_err(sa, "isolated mode is active on the port");
 		sfc_err(sa, "will not set MAC address");
@@ -961,9 +967,9 @@ sfc_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
 
 		/*
 		 * Since setting MAC address with filters installed is not
-		 * allowed on the adapter, one needs to simply restart adapter
-		 * so that the new MAC address will be taken from an outer
-		 * storage and set flawlessly by means of sfc_start() call
+		 * allowed on the adapter, the new MAC address will be set
+		 * by means of adapter restart. sfc_start() shall retrieve
+		 * the new address from the device private data and set it.
 		 */
 		sfc_stop(sa);
 		rc = sfc_start(sa);
@@ -972,6 +978,13 @@ sfc_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
 	}
 
 unlock:
+	/*
+	 * In the case of failure sa->port->default_mac_addr does not
+	 * need rollback since no error code is returned, and the upper
+	 * API will anyway update the external MAC address storage.
+	 * To be consistent with that new value it is better to keep
+	 * the device private value the same.
+	 */
 	sfc_adapter_unlock(sa);
 }
 
diff --git a/drivers/net/sfc/sfc_port.c b/drivers/net/sfc/sfc_port.c
index 6cfd0e3..5254394 100644
--- a/drivers/net/sfc/sfc_port.c
+++ b/drivers/net/sfc/sfc_port.c
@@ -188,10 +188,10 @@ sfc_port_start(struct sfc_adapter *sa)
 		goto fail_mac_pdu_set;
 
 	if (!port->isolated) {
-		struct ether_addr *mac_addrs = sa->eth_dev->data->mac_addrs;
+		struct ether_addr *addr = &port->default_mac_addr;
 
 		sfc_log_init(sa, "set MAC address");
-		rc = efx_mac_addr_set(sa->nic, mac_addrs[0].addr_bytes);
+		rc = efx_mac_addr_set(sa->nic, addr->addr_bytes);
 		if (rc != 0)
 			goto fail_mac_addr_set;
 
@@ -342,6 +342,8 @@ int
 sfc_port_attach(struct sfc_adapter *sa)
 {
 	struct sfc_port *port = &sa->port;
+	const efx_nic_cfg_t *encp = efx_nic_cfg_get(sa->nic);
+	const struct ether_addr *from;
 	long kvarg_stats_update_period_ms;
 	int rc;
 
@@ -353,6 +355,10 @@ sfc_port_attach(struct sfc_adapter *sa)
 	port->flow_ctrl = EFX_FCNTL_RESPOND | EFX_FCNTL_GENERATE;
 	port->flow_ctrl_autoneg = B_TRUE;
 
+	RTE_BUILD_BUG_ON(sizeof(encp->enc_mac_addr) != sizeof(*from));
+	from = (const struct ether_addr *)(encp->enc_mac_addr);
+	ether_addr_copy(from, &port->default_mac_addr);
+
 	port->max_mcast_addrs = EFX_MAC_MULTICAST_LIST_MAX;
 	port->nb_mcast_addrs = 0;
 	port->mcast_addrs = rte_calloc_socket("mcast_addr_list_buf",
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mlx5: fix VLAN configuration after port stop' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (48 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/sfc: fix main MAC address handling' " Yuanhan Liu
@ 2018-01-24 15:31 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix Memory Region registration' " Yuanhan Liu
                   ` (106 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:31 UTC (permalink / raw)
  To: Shahaf Shuler; +Cc: Nelio Laranjeiro, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 2e82fea4f48a86682273e37c9fddec390bac1cc9 Mon Sep 17 00:00:00 2001
From: Shahaf Shuler <shahafs@mellanox.com>
Date: Wed, 13 Dec 2017 16:03:10 +0200
Subject: [PATCH] net/mlx5: fix VLAN configuration after port stop

[ upstream commit 3a76da0ac85ff90280ec612dd444a553a4782f7b ]

Ethdev layer has an API to configure vlan setting on the flight, i.e.
when the port state is start.

Calling such API when the port is stopped may cause segmentation fault
as the related Verbs contexts has not been created yet.

Fixes: 09cb5b581762 ("net/mlx5: separate DPDK from verbs Rx queue objects")

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx5/mlx5_vlan.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_vlan.c b/drivers/net/mlx5/mlx5_vlan.c
index 6fc315e..198a69e 100644
--- a/drivers/net/mlx5/mlx5_vlan.c
+++ b/drivers/net/mlx5/mlx5_vlan.c
@@ -127,6 +127,11 @@ priv_vlan_strip_queue_set(struct priv *priv, uint16_t idx, int on)
 
 	DEBUG("set VLAN offloads 0x%x for port %d queue %d",
 	      vlan_offloads, rxq->port_id, idx);
+	if (!rxq_ctrl->ibv) {
+		/* Update related bits in RX queue. */
+		rxq->vlan_strip = !!on;
+		return;
+	}
 	mod = (struct ibv_wq_attr){
 		.attr_mask = IBV_WQ_ATTR_FLAGS,
 		.flags_mask = IBV_WQ_FLAGS_CVLAN_STRIPPING,
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mlx5: fix Memory Region registration' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (49 preceding siblings ...)
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/mlx5: fix VLAN configuration after port stop' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix overflow of Memory Region cache' " Yuanhan Liu
                   ` (105 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: Hanoch Haim, Nelio Laranjeiro, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From adb951a9b30705134c56c0cd6b4ffe37736a67f5 Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Thu, 14 Dec 2017 17:59:17 -0800
Subject: [PATCH] net/mlx5: fix Memory Region registration

[ upstream commit 3a6f2eb8c5c597d6675a8fbb9563010c0c546521 ]

Although granularity of chunks in a mempool is a cacheline, addresses are
extended to align to page boundary for performance reason in device when
registering a MR (Memory Region). This could make some regions overlap,
then can cause Tx completion error due to incorrect LKEY search. If the
error occurs, the Tx queue will get stuck. To avoid it, end address of a
packet segment is used in LKEY search.

Fixes: b0b093845793 ("net/mlx5: use buffer address for LKEY search")

Reported-by: Hanoch Haim <hhaim@cisco.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx5/mlx5_rxtx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 63eb12c..9ed30a8 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -544,7 +544,7 @@ static __rte_always_inline uint32_t
 mlx5_tx_mb2mr(struct mlx5_txq_data *txq, struct rte_mbuf *mb)
 {
 	uint16_t i = txq->mr_cache_idx;
-	uintptr_t addr = rte_pktmbuf_mtod(mb, uintptr_t);
+	uintptr_t addr = rte_pktmbuf_mtod_offset(mb, uintptr_t, DATA_LEN(mb));
 	struct mlx5_mr *mr;
 
 	assert(i < RTE_DIM(txq->mp2mr));
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mlx5: fix overflow of Memory Region cache' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (50 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix Memory Region registration' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix RSS key configuration' " Yuanhan Liu
                   ` (104 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: Nelio Laranjeiro, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From eda82c93d3c101c5cf94c4fb0a829bb90bf28c3b Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Thu, 14 Dec 2017 17:59:18 -0800
Subject: [PATCH] net/mlx5: fix overflow of Memory Region cache

[ upstream commit de48f16525e23cd04ee4c1c5b74392123529758a ]

If there're more MR(Memroy Region)'s than the size of per-queue cache, the
cache can be overflowed and corrupt the following data structure in
mlx5_txq_data.

Fixes: 6e78005a9b30 ("net/mlx5: add reference counter on DPDK Tx queues")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx5/mlx5_trigger.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 5de2d02..3540b5d 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -64,8 +64,11 @@ priv_txq_start(struct priv *priv)
 
 		if (!txq_ctrl)
 			continue;
-		LIST_FOREACH(mr, &priv->mr, next)
+		LIST_FOREACH(mr, &priv->mr, next) {
 			priv_txq_mp2mr_reg(priv, &txq_ctrl->txq, mr->mp, idx++);
+			if (idx == MLX5_PMD_TX_MP_CACHE)
+				break;
+		}
 		txq_alloc_elts(txq_ctrl);
 		txq_ctrl->ibv = mlx5_priv_txq_ibv_new(priv, i);
 		if (!txq_ctrl->ibv) {
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mlx5: fix RSS key configuration' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (51 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix overflow of Memory Region cache' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix HW checksum offload for outer IP' " Yuanhan Liu
                   ` (103 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Shahaf Shuler; +Cc: Yongseok Koh, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From c1253aff6a367fcdbe578f08cce6f2ad9c988bff Mon Sep 17 00:00:00 2001
From: Shahaf Shuler <shahafs@mellanox.com>
Date: Tue, 26 Dec 2017 09:40:41 +0200
Subject: [PATCH] net/mlx5: fix RSS key configuration

[ upstream commit 21e3a9747fd67f0581842d4070b4e34a4885cbbe ]

The trigger for PMD to use the application RSS configuration should be
based on the validity of rss_key and not the rss_key_len. Otherwise
segmentation fault can occur if application provide valid RSS key length
but without any RSS key.

Fixes: 29c1d8bb3e79 ("net/mlx5: handle a single RSS hash key for all protocols")

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

diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index a3cef68..b518083 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -577,7 +577,7 @@ dev_configure(struct rte_eth_dev *dev)
 	unsigned int j;
 	unsigned int reta_idx_n;
 	const uint8_t use_app_rss_key =
-		!!dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key_len;
+		!!dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key;
 
 	if (use_app_rss_key &&
 	    (dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key_len !=
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mlx5: fix HW checksum offload for outer IP' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (52 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix RSS key configuration' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix un-supported RSS hash fields use' " Yuanhan Liu
                   ` (102 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: Shahaf Shuler, Nelio Laranjeiro, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 37c5da413aff723786329d6a96b368cbabe64a18 Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Wed, 3 Jan 2018 00:06:22 -0800
Subject: [PATCH] net/mlx5: fix HW checksum offload for outer IP

[ upstream commit d1eded3a8e6fa28087eef3062081a8b0f2dca222 ]

Checking HW checksum offload flag for outer IP is missing. If flag is set
for only outer IP, this can't be set properly.

Fixes: f5fde5205101 ("net/mlx5: add hardware checksum offload for tunnel packets")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx5/mlx5_rxtx.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 9ed30a8..f1a4989 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -635,7 +635,8 @@ txq_ol_cksum_to_cs(struct mlx5_txq_data *txq_data, struct rte_mbuf *buf)
 
 	/* Should we enable HW CKSUM offload */
 	if (buf->ol_flags &
-	    (PKT_TX_IP_CKSUM | PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM)) {
+	    (PKT_TX_IP_CKSUM | PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM |
+	     PKT_TX_OUTER_IP_CKSUM)) {
 		if (txq_data->tunnel_en &&
 		    (buf->ol_flags &
 		     (PKT_TX_TUNNEL_GRE | PKT_TX_TUNNEL_VXLAN))) {
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mlx5: fix un-supported RSS hash fields use' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (53 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix HW checksum offload for outer IP' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix VLAN offload setting' " Yuanhan Liu
                   ` (101 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Nélio Laranjeiro; +Cc: Yongseok Koh, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From a003543e486ad1aa228823dbefec5a0214dc0161 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= <nelio.laranjeiro@6wind.com>
Date: Wed, 3 Jan 2018 10:14:19 +0100
Subject: [PATCH] net/mlx5: fix un-supported RSS hash fields use

[ upstream commit b365799b3cd440437367b4539f1792eb65c86cc7 ]

MLX5 NIC does not support all hash fields, this patch limit by refusing
impossible RSS combination to avoid errors.

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

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_defs.h |  5 +++++
 drivers/net/mlx5/mlx5_flow.c | 11 +++++++++--
 drivers/net/mlx5/mlx5_rss.c  |  5 +++++
 3 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_defs.h b/drivers/net/mlx5/mlx5_defs.h
index 3a7706c..64bb071 100644
--- a/drivers/net/mlx5/mlx5_defs.h
+++ b/drivers/net/mlx5/mlx5_defs.h
@@ -34,6 +34,8 @@
 #ifndef RTE_PMD_MLX5_DEFS_H_
 #define RTE_PMD_MLX5_DEFS_H_
 
+#include <rte_ethdev.h>
+
 #include "mlx5_autoconf.h"
 
 /* Reported driver name. */
@@ -105,4 +107,7 @@
 /* Number of packets vectorized Rx can simultaneously process in a loop. */
 #define MLX5_VPMD_DESCS_PER_LOOP      4
 
+/* Supported RSS */
+#define MLX5_RSS_HF_MASK (~(ETH_RSS_IP | ETH_RSS_UDP | ETH_RSS_TCP))
+
 #endif /* RTE_PMD_MLX5_DEFS_H_ */
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 75ea299..c16b571 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -50,6 +50,7 @@
 #include <rte_malloc.h>
 
 #include "mlx5.h"
+#include "mlx5_defs.h"
 #include "mlx5_prm.h"
 
 /* Define minimal priority for control plane flows. */
@@ -579,9 +580,15 @@ priv_flow_convert_rss_conf(struct priv *priv,
 			   struct mlx5_flow_parse *parser,
 			   const struct rte_eth_rss_conf *rss_conf)
 {
-	const struct rte_eth_rss_conf *rss =
-		rss_conf ? rss_conf : &priv->rss_conf;
+	const struct rte_eth_rss_conf *rss;
 
+	if (rss_conf) {
+		if (rss_conf->rss_hf & MLX5_RSS_HF_MASK)
+			return EINVAL;
+		rss = rss_conf;
+	} else {
+		rss = &priv->rss_conf;
+	}
 	if (rss->rss_key_len > 40)
 		return EINVAL;
 	parser->rss_conf.rss_key_len = rss->rss_key_len;
diff --git a/drivers/net/mlx5/mlx5_rss.c b/drivers/net/mlx5/mlx5_rss.c
index f3de46d..7c0cf4d 100644
--- a/drivers/net/mlx5/mlx5_rss.c
+++ b/drivers/net/mlx5/mlx5_rss.c
@@ -51,6 +51,7 @@
 #include <rte_ethdev.h>
 
 #include "mlx5.h"
+#include "mlx5_defs.h"
 #include "mlx5_rxtx.h"
 
 /**
@@ -72,6 +73,10 @@ mlx5_rss_hash_update(struct rte_eth_dev *dev,
 	int ret = 0;
 
 	priv_lock(priv);
+	if (rss_conf->rss_hf & MLX5_RSS_HF_MASK) {
+		ret = -EINVAL;
+		goto out;
+	}
 	if (rss_conf->rss_key && rss_conf->rss_key_len) {
 		priv->rss_conf.rss_key = rte_realloc(priv->rss_conf.rss_key,
 						     rss_conf->rss_key_len, 0);
-- 
2.7.4

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

* [dpdk-stable] patch 'net/i40e: fix VLAN offload setting' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (54 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix un-supported RSS hash fields use' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/fm10k: fix logical port delete' " Yuanhan Liu
                   ` (100 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From d43014cc382585b45c5cd25c8d0d68037df24c33 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 a92933c..ffdf7d7 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -5315,15 +5315,15 @@ 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;
 	ret = i40e_vlan_offload_set(dev, mask);
 	if (ret) {
 		PMD_DRV_LOG(INFO, "Failed to update vlan offload");
 		return ret;
 	}
 
-	/* 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.7.4

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

* [dpdk-stable] patch 'net/fm10k: fix logical port delete' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (55 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix VLAN offload setting' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/ixgbe: fix wrong PBA setting' " Yuanhan Liu
                   ` (99 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Xiao Wang; +Cc: Helin Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 4a8cdc6f4b81cd8bf4c10e835925e13d834f298e 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 2d05a46..58dac38 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -54,7 +54,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)
@@ -1242,7 +1242,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.7.4

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

* [dpdk-stable] patch 'net/ixgbe: fix wrong PBA setting' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (56 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/fm10k: fix logical port delete' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/igb: fix Tx queue number assignment' " Yuanhan Liu
                   ` (98 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Wenzhuo Lu; +Cc: Wei Dai, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 339d9668891d36bcda403ae624ea80409a1700bc Mon Sep 17 00:00:00 2001
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
Date: Mon, 20 Nov 2017 11:37:45 +0800
Subject: [PATCH] net/ixgbe: fix wrong PBA setting

[ upstream commit 6b75183ac4d08b34c476285f4650557aa3e38e19 ]

The datasheet says, if using MSI-X mode, the PBA support
bit of the GPIE register must be set to 1.
DPDK uses polling mode, we cannot hit this issue in the
scenario DPDK PF + DPDK VF. If we use DPDK PF + kernel VF,
as the kernel driver uses interrpt mode, VF may hit RX hang
after running hours.

Fixes: 00e30184daa0 ("ixgbe: add PF support")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
---
 drivers/net/ixgbe/ixgbe_pf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index 676e92c..0114694 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -273,7 +273,7 @@ int ixgbe_pf_host_configure(struct rte_eth_dev *eth_dev)
 
 	gpie = IXGBE_READ_REG(hw, IXGBE_GPIE);
 	gpie &= ~IXGBE_GPIE_VTMODE_MASK;
-	gpie |= IXGBE_GPIE_MSIX_MODE;
+	gpie |= IXGBE_GPIE_MSIX_MODE | IXGBE_GPIE_PBA_SUPPORT;
 
 	switch (RTE_ETH_DEV_SRIOV(eth_dev).active) {
 	case ETH_64_POOLS:
-- 
2.7.4

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

* [dpdk-stable] patch 'net/igb: fix Tx queue number assignment' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (57 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/ixgbe: fix wrong PBA setting' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix VLAN offload setting issue' " Yuanhan Liu
                   ` (97 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Yangchao Zhou; +Cc: Wei Dai, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 2b59636521ff565ccb53fdb194c222859278c0f9 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 fdc139f..a600fba 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -1212,7 +1212,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.7.4

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

* [dpdk-stable] patch 'net/i40e: fix VLAN offload setting issue' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (58 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/igb: fix Tx queue number assignment' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix FDIR input set conflict' " Yuanhan Liu
                   ` (96 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Jingjing Wu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 8cfbfabc75c1963d94e25da84617539a0b05b6fa Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Fri, 8 Dec 2017 15:40:33 +0800
Subject: [PATCH] net/i40e: fix VLAN offload setting issue

[ upstream commit 54f19c9c3b251fd0e229c5a7ebb570eed5afe68c ]

When using kernel PF + DPDK VF, if setting VLAN strip on
or off in VF side after setting PVID for VF with ethtool in
PF side, it will cause VF Tx error. The root cause is that
Rx VLAN offload is not permitted after setting PVID for VF
in kernel PF side.
This patch fixes the issue by check VLAN offload capability
when setting VLAN offload.

Fixes: 5f0b95d59a98 ("net/i40e: support VLAN stripping for VF")

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

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 91b5bb0..4927b14 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1585,13 +1585,19 @@ static int
 i40evf_init_vlan(struct rte_eth_dev *dev)
 {
 	/* Apply vlan offload setting */
-	return i40evf_vlan_offload_set(dev, ETH_VLAN_STRIP_MASK);
+	i40evf_vlan_offload_set(dev, ETH_VLAN_STRIP_MASK);
+
+	return 0;
 }
 
 static int
 i40evf_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 {
 	struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
+	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
+
+	if (!(vf->vf_res->vf_offload_flags & VIRTCHNL_VF_OFFLOAD_VLAN))
+		return -ENOTSUP;
 
 	/* Vlan stripping setting */
 	if (mask & ETH_VLAN_STRIP_MASK) {
-- 
2.7.4

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

* [dpdk-stable] patch 'net/i40e: fix FDIR input set conflict' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (59 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix VLAN offload setting issue' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/ixgbe: fix tunnel filter fail problem' " Yuanhan Liu
                   ` (95 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From e31777db64d2ac0ba400a14ca3deabe7ee1ced1a Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Mon, 18 Dec 2017 13:20:57 +0800
Subject: [PATCH] net/i40e: fix FDIR input set conflict

[ upstream commit fade5c874397f24770b2464903ddc2c423a034b6 ]

The first FDIR rule for some PCTYPE will configure input set and
create flow, the following flows must use the same input set,
otherwise it will cause input set conflict and fail to create flow.
If it creates the first rule after flow flush, input set should be
re-configured.

Fixes: 42044b69c67d ("net/i40e: support input set selection for FDIR")

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

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 7e4936e..a9e7a0d 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -4406,6 +4406,7 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf)
 	struct rte_eth_dev *dev = pf->adapter->eth_dev;
 	struct i40e_fdir_info *fdir_info = &pf->fdir;
 	struct i40e_fdir_filter *fdir_filter;
+	enum i40e_filter_pctype pctype;
 	struct rte_flow *flow;
 	void *temp;
 	int ret;
@@ -4427,6 +4428,10 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf)
 				rte_free(flow);
 			}
 		}
+
+		for (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
+		     pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++)
+			pf->fdir.inset_flag[pctype] = 0;
 	}
 
 	return ret;
-- 
2.7.4

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

* [dpdk-stable] patch 'net/ixgbe: fix tunnel filter fail problem' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (60 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix FDIR input set conflict' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: add FDIR NVGRE parameter check' " Yuanhan Liu
                   ` (94 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Wenzhuo Lu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 6f0ac971ade8950983b9ffd593a97033d2112e81 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Mon, 8 Jan 2018 11:35:36 +0800
Subject: [PATCH] net/ixgbe: fix tunnel filter fail problem

[ upstream commit aa291959273a36412a51685ecad0f6166e81d41a ]

Add a mode type check for tunnel mode, if FDIR is in this mode,
it does not need to do sanity check for x550.

Fixes: a2ba854ec616 ("net/ixgbe: fix MAC VLAN filter fail problem")

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

diff --git a/drivers/net/ixgbe/ixgbe_fdir.c b/drivers/net/ixgbe/ixgbe_fdir.c
index 9281dc1..c117647 100644
--- a/drivers/net/ixgbe/ixgbe_fdir.c
+++ b/drivers/net/ixgbe/ixgbe_fdir.c
@@ -1277,7 +1277,8 @@ ixgbe_fdir_filter_program(struct rte_eth_dev *dev,
 	     IXGBE_ATR_FLOW_TYPE_IPV6) &&
 	    (info->mask.src_port_mask != 0 ||
 	     info->mask.dst_port_mask != 0) &&
-	     rule->mode != RTE_FDIR_MODE_PERFECT_MAC_VLAN) {
+	    (rule->mode != RTE_FDIR_MODE_PERFECT_MAC_VLAN &&
+	     rule->mode != RTE_FDIR_MODE_PERFECT_TUNNEL)) {
 		PMD_DRV_LOG(ERR, "By this device,"
 			    " IPv4 is not supported without"
 			    " L4 protocol and ports masked!");
-- 
2.7.4

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

* [dpdk-stable] patch 'net/i40e: add FDIR NVGRE parameter check' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (61 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/ixgbe: fix tunnel filter fail problem' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix setting of MAC address on i40evf' " Yuanhan Liu
                   ` (93 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From fbc91761b542e70920cee0f003032f26ac3fbe92 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Fri, 22 Dec 2017 13:11:05 +0800
Subject: [PATCH] net/i40e: add FDIR NVGRE parameter check

[ upstream commit 0ecc6d6c663bc9906db9f82833f7c49c97df8321 ]

Add mask parameter check to nvgre parser for flow API.

Fixes: 30965ca34127 ("net/i40e: add NVGRE flow parsing")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_flow.c | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index a9e7a0d..b935ea7 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -3610,6 +3610,41 @@ i40e_flow_parse_nvgre_pattern(__rte_unused struct rte_eth_dev *dev,
 						       "Invalid TNI mask");
 					return -rte_errno;
 				}
+				if (nvgre_mask->protocol &&
+					nvgre_mask->protocol != 0xFFFF) {
+					rte_flow_error_set(error, EINVAL,
+						RTE_FLOW_ERROR_TYPE_ITEM,
+						item,
+						"Invalid NVGRE item");
+					return -rte_errno;
+				}
+				if (nvgre_mask->c_k_s_rsvd0_ver &&
+					nvgre_mask->c_k_s_rsvd0_ver !=
+					rte_cpu_to_be_16(0xFFFF)) {
+					rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid NVGRE item");
+					return -rte_errno;
+				}
+				if (nvgre_spec->c_k_s_rsvd0_ver !=
+					rte_cpu_to_be_16(0x2000) &&
+					nvgre_mask->c_k_s_rsvd0_ver) {
+					rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid NVGRE item");
+					return -rte_errno;
+				}
+				if (nvgre_mask->protocol &&
+					nvgre_spec->protocol !=
+					rte_cpu_to_be_16(0x6558)) {
+					rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid NVGRE item");
+					return -rte_errno;
+				}
 				rte_memcpy(((uint8_t *)&tenant_id_be + 1),
 					   nvgre_spec->tni, 3);
 				filter->tenant_id =
-- 
2.7.4

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

* [dpdk-stable] patch 'net/i40e: fix setting of MAC address on i40evf' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (62 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: add FDIR NVGRE parameter check' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'vhost: fix crash' " Yuanhan Liu
                   ` (92 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 1bbd934f9944382755b92528c6bcd349b7cf4948 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Wed, 3 Jan 2018 14:34:18 +0100
Subject: [PATCH] net/i40e: fix setting of MAC address on i40evf

[ upstream commit b8a0cebddac88c784c9d2b71481ba358b401cccf ]

When setting the MAC address, the ethdev layer copies the new mac
address in dev->data->mac_addrs[0] before calling the dev_ops.

Therefore, "is_same_ether_addr(mac_addr, dev->data->mac_addrs)" was
always true, and the MAC was never set. Remove this test to fix the
issue.

Fixes: 943c2d899a0c ("net/i40e: set VF MAC from VF")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 4927b14..e2cdc7f 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2687,9 +2687,6 @@ i40evf_set_default_mac_addr(struct rte_eth_dev *dev,
 		return;
 	}
 
-	if (is_same_ether_addr(mac_addr, dev->data->mac_addrs))
-		return;
-
 	if (vf->flags & I40E_FLAG_VF_MAC_BY_PF)
 		return;
 
-- 
2.7.4

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

* [dpdk-stable] patch 'vhost: fix crash' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (63 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix setting of MAC address on i40evf' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'vhost: fix dequeue zero copy with virtio1' " Yuanhan Liu
                   ` (91 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Jianfeng Tan
  Cc: Yang Zhang, Xin Long, Yi Yang, Maxime Coquelin, Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From e1fd3c6f9e695da2e74a939bba129b92a0d09d95 Mon Sep 17 00:00:00 2001
From: Jianfeng Tan <jianfeng.tan@intel.com>
Date: Wed, 15 Nov 2017 11:41:08 +0000
Subject: [PATCH] vhost: fix crash

[ upstream commit cab278dee9290ee48062576b09d21e6c1eb0214b ]

In a running VM, operations (like device attach/detach) will
trigger the QEMU to resend set_mem_table to vhost-user backend.

DPDK vhost-user handles this message rudely by unmap all existing
regions and map new ones. This might lead to segfault if there
is pmd thread just trying to touch those unmapped memory regions.

But for most cases, except VM memory hotplug, QEMU still sends the
set_mem_table message even the memory regions are not changed as
QEMU vhost-user filters out those not backed by file (fd > 0).

To fix this case, we add a check in the handler to see if the
memory regions are really changed; if not, we just keep old memory
regions.

Fixes: 8f972312b8f4 ("vhost: support vhost-user")

Reported-by: Yang Zhang <zy107165@alibaba-inc.com>
Reported-by: Xin Long <longxin.xl@alibaba-inc.com>
Signed-off-by: Yi Yang <yi.y.yang@intel.com>
Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
 lib/librte_vhost/vhost_user.c | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index f4c7ce4..6f3869c 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -573,6 +573,30 @@ dump_guest_pages(struct virtio_net *dev)
 #define dump_guest_pages(dev)
 #endif
 
+static bool
+vhost_memory_changed(struct VhostUserMemory *new,
+		     struct rte_vhost_memory *old)
+{
+	uint32_t i;
+
+	if (new->nregions != old->nregions)
+		return true;
+
+	for (i = 0; i < new->nregions; ++i) {
+		VhostUserMemoryRegion *new_r = &new->regions[i];
+		struct rte_vhost_mem_region *old_r = &old->regions[i];
+
+		if (new_r->guest_phys_addr != old_r->guest_phys_addr)
+			return true;
+		if (new_r->memory_size != old_r->size)
+			return true;
+		if (new_r->userspace_addr != old_r->guest_user_addr)
+			return true;
+	}
+
+	return false;
+}
+
 static int
 vhost_user_set_mem_table(struct virtio_net *dev, struct VhostUserMsg *pmsg)
 {
@@ -585,6 +609,16 @@ vhost_user_set_mem_table(struct virtio_net *dev, struct VhostUserMsg *pmsg)
 	uint32_t i;
 	int fd;
 
+	if (dev->mem && !vhost_memory_changed(&memory, dev->mem)) {
+		RTE_LOG(INFO, VHOST_CONFIG,
+			"(%d) memory regions not changed\n", dev->vid);
+
+		for (i = 0; i < memory.nregions; i++)
+			close(pmsg->fds[i]);
+
+		return 0;
+	}
+
 	if (dev->mem) {
 		free_mem_region(dev);
 		rte_free(dev->mem);
-- 
2.7.4

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

* [dpdk-stable] patch 'vhost: fix dequeue zero copy with virtio1' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (64 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'vhost: fix crash' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/virtio: fix incorrect cast' " Yuanhan Liu
                   ` (90 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Junjie Chen; +Cc: Maxime Coquelin, Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 4e3a3edf297b981d35c63e7a0a7c6286cfae3ee4 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 6fee16e..79d80f7 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -977,7 +977,8 @@ copy_desc_to_mbuf(struct virtio_net *dev, struct vhost_virtqueue *vq,
 					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_iova = hpa;
 
 			/*
-- 
2.7.4

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

* [dpdk-stable] patch 'net/virtio: fix incorrect cast' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (65 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'vhost: fix dequeue zero copy with virtio1' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/virtio: fix vector Rx flushing' " Yuanhan Liu
                   ` (89 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 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 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From faee0665f376a685ca63304f3d10d55ab7f1d86d 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 e0328f6..770c039 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -893,7 +893,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++) {
@@ -906,7 +906,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.7.4

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

* [dpdk-stable] patch 'net/virtio: fix vector Rx flushing' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (66 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/virtio: fix incorrect cast' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/virtio: fix typo in LRO support' " Yuanhan Liu
                   ` (88 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 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 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 82b3cc87817cd1a66df0f57cbe1cd85bb55b6071 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 770c039..0b243f2 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1860,7 +1860,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 c3a536f..696d0e4 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"
 
 /*
  * Two types of mbuf to be cleaned:
@@ -62,8 +63,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;
@@ -74,13 +77,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_rx) {
+			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_rx) {
+		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 2305d91..ab466c2 100644
--- a/drivers/net/virtio/virtqueue.h
+++ b/drivers/net/virtio/virtqueue.h
@@ -304,7 +304,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.7.4

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

* [dpdk-stable] patch 'net/virtio: fix typo in LRO support' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (67 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/virtio: fix vector Rx flushing' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'examples/vhost: fix sending ARP packet to self' " Yuanhan Liu
                   ` (87 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Maxime Coquelin, Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From f1fd54f1507e15c571052d0bfc1c1c1b409affd8 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Mon, 11 Dec 2017 13:13:30 +0800
Subject: [PATCH] net/virtio: fix typo in LRO support

[ upstream commit b628cb242941170c938dec96dec96b65be4c17f9 ]

Fixes: 86d59b21468a ("net/virtio: support LRO")
Fixes: ec9f3d122a58 ("net/virtio: revert not claiming LRO support")

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
 drivers/net/virtio/virtio_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 0b243f2..95da470 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1754,7 +1754,7 @@ virtio_dev_configure(struct rte_eth_dev *dev)
 
 	if (rxmode->enable_lro &&
 		(!vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO4) ||
-			!vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO4))) {
+		 !vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO6))) {
 		PMD_DRV_LOG(ERR,
 			"Large Receive Offload not available on this host");
 		return -ENOTSUP;
-- 
2.7.4

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

* [dpdk-stable] patch 'examples/vhost: fix sending ARP packet to self' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (68 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/virtio: fix typo in LRO support' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'event/octeontx: fix Rx adapter port id mapping' " Yuanhan Liu
                   ` (86 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Junjie Chen; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 7ebd90ad727d900fd96fec99cfa208a662cecb2b 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 89a61f0..10a7f5d 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -964,7 +964,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.7.4

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

* [dpdk-stable] patch 'event/octeontx: fix Rx adapter port id mapping' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (69 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'examples/vhost: fix sending ARP packet to self' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-26 16:00   ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/sfc: fix label name to be consistent' " Yuanhan Liu
                   ` (85 subsequent siblings)
  156 siblings, 1 reply; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Santosh Shukla, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 3ab8effa1fd5b07c88688ff14e816e0a314d7778 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Date: Tue, 19 Dec 2017 23:31:45 +0530
Subject: [PATCH] event/octeontx: fix Rx adapter port id mapping

[ upstream commit 9b4298339652c5f4c3a1391ed26caa5bbb26c158 ]

When octeontx event dev receives a packet for the event Rx adapter, the
mbuf port id should contain the appropriate ethdev id instead of
internal channel info.

Fixes: 45a914c5bd71 ("event/octeontx: support event Rx adapter")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
---
 drivers/event/octeontx/Makefile       | 2 +-
 drivers/event/octeontx/ssovf_worker.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/event/octeontx/Makefile b/drivers/event/octeontx/Makefile
index fdf1b73..2604412 100644
--- a/drivers/event/octeontx/Makefile
+++ b/drivers/event/octeontx/Makefile
@@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
 CFLAGS += -I$(RTE_SDK)/drivers/mempool/octeontx/
 CFLAGS += -I$(RTE_SDK)/drivers/net/octeontx/
 
-LDLIBS += -lrte_eal -lrte_eventdev -lrte_mempool_octeontx
+LDLIBS += -lrte_eal -lrte_eventdev -lrte_mempool_octeontx -lrte_pmd_octeontx
 LDLIBS += -lrte_bus_pci
 LDLIBS += -lrte_bus_vdev
 
diff --git a/drivers/event/octeontx/ssovf_worker.h b/drivers/event/octeontx/ssovf_worker.h
index bf76ac8..4c9a4c4 100644
--- a/drivers/event/octeontx/ssovf_worker.h
+++ b/drivers/event/octeontx/ssovf_worker.h
@@ -53,7 +53,7 @@ enum {
 /* SSO Operations */
 
 static __rte_always_inline struct rte_mbuf *
-ssovf_octeontx_wqe_to_pkt(uint64_t work, uint16_t port_id)
+ssovf_octeontx_wqe_to_pkt(uint64_t work, uint16_t port_info)
 {
 	struct rte_mbuf *mbuf;
 	octtx_wqe_t *wqe = (octtx_wqe_t *)(uintptr_t)work;
@@ -69,7 +69,7 @@ ssovf_octeontx_wqe_to_pkt(uint64_t work, uint16_t port_id)
 	mbuf->data_len = mbuf->pkt_len;
 	mbuf->nb_segs = 1;
 	mbuf->ol_flags = 0;
-	mbuf->port = port_id;
+	mbuf->port = rte_octeontx_pchan_map[port_info >> 4][port_info & 0xF];
 	rte_mbuf_refcnt_set(mbuf, 1);
 	return mbuf;
 }
@@ -89,7 +89,7 @@ ssows_get_work(struct ssows *ws, struct rte_event *ev)
 	ev->event = sched_type_queue | (get_work0 & 0xffffffff);
 	if (get_work1 && ev->event_type == RTE_EVENT_TYPE_ETHDEV) {
 		ev->mbuf = ssovf_octeontx_wqe_to_pkt(get_work1,
-				(ev->event >> 20) & 0xF);
+				(ev->event >> 20) & 0x7F);
 	} else {
 		ev->u64 = get_work1;
 	}
-- 
2.7.4

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

* [dpdk-stable] patch 'net/sfc: fix label name to be consistent' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (70 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'event/octeontx: fix Rx adapter port id mapping' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/sfc: do not hold management event queue lock while MCDI' " Yuanhan Liu
                   ` (84 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Ivan Malov, Andy Moreton, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 0d5df5edad4ccc5c786c2e43764fac5637a3aad6 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Sun, 24 Dec 2017 10:46:31 +0000
Subject: [PATCH] net/sfc: fix label name to be consistent

[ upstream commit 815689241fd90727af1b395e7af34c41951133d7 ]

Management event queue is the right name of event queue 0.

Fixes: 3b809c27b1fe ("net/sfc: support link status change interrupt")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
---
 drivers/net/sfc/sfc_ev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/sfc/sfc_ev.c b/drivers/net/sfc/sfc_ev.c
index a16dc27..b29eb2f 100644
--- a/drivers/net/sfc/sfc_ev.c
+++ b/drivers/net/sfc/sfc_ev.c
@@ -743,7 +743,7 @@ sfc_ev_start(struct sfc_adapter *sa)
 	if (sa->intr.lsc_intr) {
 		rc = sfc_ev_qprime(sa->mgmt_evq);
 		if (rc != 0)
-			goto fail_evq0_prime;
+			goto fail_mgmt_evq_prime;
 	}
 
 	rte_spinlock_unlock(&sa->mgmt_evq_lock);
@@ -763,7 +763,7 @@ sfc_ev_start(struct sfc_adapter *sa)
 
 	return 0;
 
-fail_evq0_prime:
+fail_mgmt_evq_prime:
 	sfc_ev_qstop(sa->mgmt_evq);
 
 fail_mgmt_evq_start:
-- 
2.7.4

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

* [dpdk-stable] patch 'net/sfc: do not hold management event queue lock while MCDI' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (71 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/sfc: fix label name to be consistent' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/sfc: fix incorrect bitwise ORing of L3/L4 packet types' " Yuanhan Liu
                   ` (83 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Ivan Malov, Andy Moreton, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 72cbe69159dc8522b13da5e6d77227d266e7cc2b Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Sun, 24 Dec 2017 10:46:32 +0000
Subject: [PATCH] net/sfc: do not hold management event queue lock while MCDI

[ upstream commit f042136ee2ed1cff425dd28c69c7c5f80acc4526 ]

MCDI execution may require MCDI proxy handling which involves
management event queue polling. So, it is a bad idea to hold
managment event queue lock when MCDI is executed.

Event queue creation and destruction are MCDI operations.

Fixes: 4650ed44c120 ("net/sfc: support MCDI proxy")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
---
 drivers/net/sfc/sfc.h      | 22 ++++++++++++++++++++++
 drivers/net/sfc/sfc_ev.c   | 23 ++++++++++++++---------
 drivers/net/sfc/sfc_intr.c |  5 +++--
 3 files changed, 39 insertions(+), 11 deletions(-)

diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h
index b72eba0..ef980a4 100644
--- a/drivers/net/sfc/sfc.h
+++ b/drivers/net/sfc/sfc.h
@@ -212,7 +212,29 @@ struct sfc_adapter {
 	unsigned int			evq_count;
 
 	unsigned int			mgmt_evq_index;
+	/*
+	 * The lock is used to serialise management event queue polling
+	 * which can be done from different context. Also the lock
+	 * guarantees that mgmt_evq_running is preserved while the lock
+	 * is held. It is used to serialise polling and start/stop
+	 * operations.
+	 *
+	 * Locks which may be held when the lock is acquired:
+	 *  - adapter lock, when:
+	 *    - device start/stop to change mgmt_evq_running
+	 *    - any control operations in client side MCDI proxy handling to
+	 *	poll management event queue waiting for proxy response
+	 *  - MCDI lock, when:
+	 *    - any control operations in client side MCDI proxy handling to
+	 *	poll management event queue waiting for proxy response
+	 *
+	 * Locks which are acquired with the lock held:
+	 *  - nic_lock, when:
+	 *    - MC event processing on management event queue polling
+	 *	(e.g. MC REBOOT or BADASSERT events)
+	 */
 	rte_spinlock_t			mgmt_evq_lock;
+	bool				mgmt_evq_running;
 	struct sfc_evq			*mgmt_evq;
 
 	unsigned int			rxq_count;
diff --git a/drivers/net/sfc/sfc_ev.c b/drivers/net/sfc/sfc_ev.c
index b29eb2f..5fbebbf 100644
--- a/drivers/net/sfc/sfc_ev.c
+++ b/drivers/net/sfc/sfc_ev.c
@@ -565,10 +565,8 @@ void
 sfc_ev_mgmt_qpoll(struct sfc_adapter *sa)
 {
 	if (rte_spinlock_trylock(&sa->mgmt_evq_lock)) {
-		struct sfc_evq *mgmt_evq = sa->mgmt_evq;
-
-		if (mgmt_evq->init_state == SFC_EVQ_STARTED)
-			sfc_ev_qpoll(mgmt_evq);
+		if (sa->mgmt_evq_running)
+			sfc_ev_qpoll(sa->mgmt_evq);
 
 		rte_spinlock_unlock(&sa->mgmt_evq_lock);
 	}
@@ -734,20 +732,26 @@ sfc_ev_start(struct sfc_adapter *sa)
 		goto fail_ev_init;
 
 	/* Start management EVQ used for global events */
-	rte_spinlock_lock(&sa->mgmt_evq_lock);
 
+	/*
+	 * Management event queue start polls the queue, but it cannot
+	 * interfere with other polling contexts since mgmt_evq_running
+	 * is false yet.
+	 */
 	rc = sfc_ev_qstart(sa->mgmt_evq, sa->mgmt_evq_index);
 	if (rc != 0)
 		goto fail_mgmt_evq_start;
 
+	rte_spinlock_lock(&sa->mgmt_evq_lock);
+	sa->mgmt_evq_running = true;
+	rte_spinlock_unlock(&sa->mgmt_evq_lock);
+
 	if (sa->intr.lsc_intr) {
 		rc = sfc_ev_qprime(sa->mgmt_evq);
 		if (rc != 0)
 			goto fail_mgmt_evq_prime;
 	}
 
-	rte_spinlock_unlock(&sa->mgmt_evq_lock);
-
 	/*
 	 * Start management EVQ polling. If interrupts are disabled
 	 * (not used), it is required to process link status change
@@ -767,7 +771,6 @@ fail_mgmt_evq_prime:
 	sfc_ev_qstop(sa->mgmt_evq);
 
 fail_mgmt_evq_start:
-	rte_spinlock_unlock(&sa->mgmt_evq_lock);
 	efx_ev_fini(sa->nic);
 
 fail_ev_init:
@@ -783,9 +786,11 @@ sfc_ev_stop(struct sfc_adapter *sa)
 	sfc_ev_mgmt_periodic_qpoll_stop(sa);
 
 	rte_spinlock_lock(&sa->mgmt_evq_lock);
-	sfc_ev_qstop(sa->mgmt_evq);
+	sa->mgmt_evq_running = false;
 	rte_spinlock_unlock(&sa->mgmt_evq_lock);
 
+	sfc_ev_qstop(sa->mgmt_evq);
+
 	efx_ev_fini(sa->nic);
 }
 
diff --git a/drivers/net/sfc/sfc_intr.c b/drivers/net/sfc/sfc_intr.c
index ee59cb1..de65f8c 100644
--- a/drivers/net/sfc/sfc_intr.c
+++ b/drivers/net/sfc/sfc_intr.c
@@ -57,8 +57,9 @@ sfc_intr_handle_mgmt_evq(struct sfc_adapter *sa)
 
 	evq = sa->mgmt_evq;
 
-	if (evq->init_state != SFC_EVQ_STARTED) {
-		sfc_log_init(sa, "interrupt on stopped EVQ %u", evq->evq_index);
+	if (!sa->mgmt_evq_running) {
+		sfc_log_init(sa, "interrupt on not running management EVQ %u",
+			     evq->evq_index);
 	} else {
 		sfc_ev_qpoll(evq);
 
-- 
2.7.4

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

* [dpdk-stable] patch 'net/sfc: fix incorrect bitwise ORing of L3/L4 packet types' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (72 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/sfc: do not hold management event queue lock while MCDI' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/ixgbe: fix parsing FDIR NVGRE issue' " Yuanhan Liu
                   ` (82 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 323a87b69d4c508f370894b3c66b321a9b82ea2c Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Sun, 24 Dec 2017 10:46:40 +0000
Subject: [PATCH] net/sfc: fix incorrect bitwise ORing of L3/L4 packet types

[ upstream commit fb96ec5612c2434e8690acd2e27a9b5374c6f62d ]

Not a bug since value is set only once, but it is still incorrect.

Fixes: 638bddc99faa ("net/sfc: implement EF10 native Rx datapath")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_ef10_rx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/sfc/sfc_ef10_rx.c b/drivers/net/sfc/sfc_ef10_rx.c
index 18d60c6..4c76f74 100644
--- a/drivers/net/sfc/sfc_ef10_rx.c
+++ b/drivers/net/sfc/sfc_ef10_rx.c
@@ -286,10 +286,10 @@ sfc_ef10_rx_ev_to_offloads(struct sfc_ef10_rxq *rxq, const efx_qword_t rx_ev,
 			 PKT_RX_IP_CKSUM_BAD : PKT_RX_IP_CKSUM_GOOD);
 		break;
 	case ESE_DZ_L3_CLASS_IP6_FRAG:
-		l4_ptype |= RTE_PTYPE_L4_FRAG;
+		l4_ptype = RTE_PTYPE_L4_FRAG;
 		/* FALLTHROUGH */
 	case ESE_DZ_L3_CLASS_IP6:
-		l3_ptype |= RTE_PTYPE_L3_IPV6_EXT_UNKNOWN;
+		l3_ptype = RTE_PTYPE_L3_IPV6_EXT_UNKNOWN;
 		ol_flags |= PKT_RX_RSS_HASH;
 		break;
 	case ESE_DZ_L3_CLASS_ARP:
-- 
2.7.4

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

* [dpdk-stable] patch 'net/ixgbe: fix parsing FDIR NVGRE issue' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (73 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/sfc: fix incorrect bitwise ORing of L3/L4 packet types' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix FDIR rule confiliction " Yuanhan Liu
                   ` (81 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Qi Zhang, Wenzhuo Lu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 295d54a58d5854413f20926593a0c551a76fce60 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Fri, 22 Dec 2017 13:45:59 +0800
Subject: [PATCH] net/ixgbe: fix parsing FDIR NVGRE issue

[ upstream commit cdcd6b686ef1a759b730afb1e2ebbf878f7a8953 ]

This patch fixes the issue of mask check in NVGRE parser
for flow API.

Fixes: 11777435c727 ("net/ixgbe: parse flow director filter")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/ixgbe/ixgbe_flow.c | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 19c2d47..07abb34 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -2466,8 +2466,7 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,
 				item, "Not supported by fdir filter");
 			return -rte_errno;
 		}
-		if (nvgre_mask->c_k_s_rsvd0_ver !=
-			rte_cpu_to_be_16(0x3000) ||
+		if (nvgre_mask->protocol &&
 		    nvgre_mask->protocol != 0xFFFF) {
 			memset(rule, 0, sizeof(struct ixgbe_fdir_rule));
 			rte_flow_error_set(error, EINVAL,
@@ -2475,6 +2474,15 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,
 				item, "Not supported by fdir filter");
 			return -rte_errno;
 		}
+		if (nvgre_mask->c_k_s_rsvd0_ver &&
+		    nvgre_mask->c_k_s_rsvd0_ver !=
+			rte_cpu_to_be_16(0xFFFF)) {
+			memset(rule, 0, sizeof(struct ixgbe_fdir_rule));
+			rte_flow_error_set(error, EINVAL,
+				RTE_FLOW_ERROR_TYPE_ITEM,
+				item, "Not supported by fdir filter");
+			return -rte_errno;
+		}
 		/* TNI must be totally masked or not. */
 		if (nvgre_mask->tni[0] &&
 		    ((nvgre_mask->tni[0] != 0xFF) ||
@@ -2496,7 +2504,15 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,
 			nvgre_spec =
 				(const struct rte_flow_item_nvgre *)item->spec;
 			if (nvgre_spec->c_k_s_rsvd0_ver !=
-			    rte_cpu_to_be_16(0x2000) ||
+			    rte_cpu_to_be_16(0x2000) &&
+				nvgre_mask->c_k_s_rsvd0_ver) {
+				memset(rule, 0, sizeof(struct ixgbe_fdir_rule));
+				rte_flow_error_set(error, EINVAL,
+					RTE_FLOW_ERROR_TYPE_ITEM,
+					item, "Not supported by fdir filter");
+				return -rte_errno;
+			}
+			if (nvgre_mask->protocol &&
 			    nvgre_spec->protocol !=
 			    rte_cpu_to_be_16(NVGRE_PROTOCOL)) {
 				memset(rule, 0, sizeof(struct ixgbe_fdir_rule));
-- 
2.7.4

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

* [dpdk-stable] patch 'net/i40e: fix FDIR rule confiliction issue' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (74 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/ixgbe: fix parsing FDIR NVGRE issue' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: exclude LLDP packet count' " Yuanhan Liu
                   ` (80 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 3e3d216cfe594d3504d2d14e91de7f694194f00e Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Thu, 30 Nov 2017 14:36:08 +0800
Subject: [PATCH] net/i40e: fix FDIR rule confiliction issue

[ upstream commit 301c2abeef640cf545d7763c5760d66593640e49 ]

Failed to create two FDIR rules with different vlan id for
the same PCTYPE. Root cause is that wrong hash key length
is used.

Fixes: 4149825bbdb9 ("net/i40e: finish integration FDIR with generic flow API")

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

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index ffdf7d7..aff8de0 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1006,7 +1006,7 @@ i40e_init_fdir_filter_list(struct rte_eth_dev *dev)
 	struct rte_hash_parameters fdir_hash_params = {
 		.name = fdir_hash_name,
 		.entries = I40E_MAX_FDIR_FILTER_NUM,
-		.key_len = sizeof(struct rte_eth_fdir_input),
+		.key_len = sizeof(struct i40e_fdir_input),
 		.hash_func = rte_hash_crc,
 		.hash_func_init_val = 0,
 		.socket_id = rte_socket_id(),
-- 
2.7.4

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

* [dpdk-stable] patch 'net/i40e: exclude LLDP packet count' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (75 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix FDIR rule confiliction " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/ixgbe: fix the failure of number of Tx queue check' " Yuanhan Liu
                   ` (79 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 58ca4e3e5790b9a29311aab2827ea03dac855be0 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 11 Dec 2017 13:09:51 -0500
Subject: [PATCH] net/i40e: exclude LLDP packet count

[ upstream commit 2b38f509c33eab1178d5736c06d4c84c20500dbc ]

When use port stats register to calculate the packet count, LLDP packets
are counted in statistics which is not expected, the patch exclude this
number from total number.

Fixes: 763de290cbd1 ("net/i40e: fix packet count for PF")

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

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index aff8de0..14de929 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2531,6 +2531,22 @@ i40e_read_stats_registers(struct i40e_pf *pf, struct i40e_hw *hw)
 			    pf->offset_loaded,
 			    &pf->internal_stats_offset.rx_broadcast,
 			    &pf->internal_stats.rx_broadcast);
+	/* Get total internal tx packet count */
+	i40e_stat_update_48(hw, I40E_GLV_UPTCH(hw->port),
+			    I40E_GLV_UPTCL(hw->port),
+			    pf->offset_loaded,
+			    &pf->internal_stats_offset.tx_unicast,
+			    &pf->internal_stats.tx_unicast);
+	i40e_stat_update_48(hw, I40E_GLV_MPTCH(hw->port),
+			    I40E_GLV_MPTCL(hw->port),
+			    pf->offset_loaded,
+			    &pf->internal_stats_offset.tx_multicast,
+			    &pf->internal_stats.tx_multicast);
+	i40e_stat_update_48(hw, I40E_GLV_BPTCH(hw->port),
+			    I40E_GLV_BPTCL(hw->port),
+			    pf->offset_loaded,
+			    &pf->internal_stats_offset.tx_broadcast,
+			    &pf->internal_stats.tx_broadcast);
 
 	/* exclude CRC size */
 	pf->internal_stats.rx_bytes -= (pf->internal_stats.rx_unicast +
@@ -2560,16 +2576,32 @@ i40e_read_stats_registers(struct i40e_pf *pf, struct i40e_hw *hw)
 	ns->eth.rx_bytes -= (ns->eth.rx_unicast + ns->eth.rx_multicast +
 		ns->eth.rx_broadcast) * ETHER_CRC_LEN;
 
-	/* Workaround: it is possible I40E_GLV_GORCH[H/L] is updated before
-	 * I40E_GLPRT_GORCH[H/L], so there is a small window that cause negtive
+	/* exclude internal rx bytes
+	 * Workaround: it is possible I40E_GLV_GORCH[H/L] is updated before
+	 * I40E_GLPRT_GORCH[H/L], so there is a small window that cause negative
 	 * value.
+	 * same to I40E_GLV_UPRC[H/L], I40E_GLV_MPRC[H/L], I40E_GLV_BPRC[H/L].
 	 */
 	if (ns->eth.rx_bytes < pf->internal_stats.rx_bytes)
 		ns->eth.rx_bytes = 0;
-	/* exlude internal rx bytes */
 	else
 		ns->eth.rx_bytes -= pf->internal_stats.rx_bytes;
 
+	if (ns->eth.rx_unicast < pf->internal_stats.rx_unicast)
+		ns->eth.rx_unicast = 0;
+	else
+		ns->eth.rx_unicast -= pf->internal_stats.rx_unicast;
+
+	if (ns->eth.rx_multicast < pf->internal_stats.rx_multicast)
+		ns->eth.rx_multicast = 0;
+	else
+		ns->eth.rx_multicast -= pf->internal_stats.rx_multicast;
+
+	if (ns->eth.rx_broadcast < pf->internal_stats.rx_broadcast)
+		ns->eth.rx_broadcast = 0;
+	else
+		ns->eth.rx_broadcast -= pf->internal_stats.rx_broadcast;
+
 	i40e_stat_update_32(hw, I40E_GLPRT_RDPC(hw->port),
 			    pf->offset_loaded, &os->eth.rx_discards,
 			    &ns->eth.rx_discards);
@@ -2598,12 +2630,32 @@ i40e_read_stats_registers(struct i40e_pf *pf, struct i40e_hw *hw)
 	ns->eth.tx_bytes -= (ns->eth.tx_unicast + ns->eth.tx_multicast +
 		ns->eth.tx_broadcast) * ETHER_CRC_LEN;
 
-	/* exclude internal tx bytes */
+	/* exclude internal tx bytes
+	 * Workaround: it is possible I40E_GLV_GOTCH[H/L] is updated before
+	 * I40E_GLPRT_GOTCH[H/L], so there is a small window that cause negative
+	 * value.
+	 * same to I40E_GLV_UPTC[H/L], I40E_GLV_MPTC[H/L], I40E_GLV_BPTC[H/L].
+	 */
 	if (ns->eth.tx_bytes < pf->internal_stats.tx_bytes)
 		ns->eth.tx_bytes = 0;
 	else
 		ns->eth.tx_bytes -= pf->internal_stats.tx_bytes;
 
+	if (ns->eth.tx_unicast < pf->internal_stats.tx_unicast)
+		ns->eth.tx_unicast = 0;
+	else
+		ns->eth.tx_unicast -= pf->internal_stats.tx_unicast;
+
+	if (ns->eth.tx_multicast < pf->internal_stats.tx_multicast)
+		ns->eth.tx_multicast = 0;
+	else
+		ns->eth.tx_multicast -= pf->internal_stats.tx_multicast;
+
+	if (ns->eth.tx_broadcast < pf->internal_stats.tx_broadcast)
+		ns->eth.tx_broadcast = 0;
+	else
+		ns->eth.tx_broadcast -= pf->internal_stats.tx_broadcast;
+
 	/* GLPRT_TEPC not supported */
 
 	/* additional port specific stats */
-- 
2.7.4

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

* [dpdk-stable] patch 'net/ixgbe: fix the failure of number of Tx queue check' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (76 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: exclude LLDP packet count' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix VSI MAC filter on primary address change' " Yuanhan Liu
                   ` (78 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Yanglong Wu; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 5c9b886f3b5a1e6a8ec7c01cfecd64bce08c18ec 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 ff19a56..b720485 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -95,6 +95,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. */
@@ -2194,9 +2197,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 = 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 =
+		pci_dev->max_vfs * RTE_ETH_DEV_SRIOV(dev).nb_q_per_pool;
 	return 0;
 }
 
-- 
2.7.4

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

* [dpdk-stable] patch 'net/i40e: fix VSI MAC filter on primary address change' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (77 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/ixgbe: fix the failure of number of Tx queue check' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix overwriting bit-fields in SW Rx queue' " Yuanhan Liu
                   ` (77 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Laurent Hardy, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 3e026d20900e5d42c00a9c91c4c564422579dd7b 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 14de929..5f1faf1 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -10872,12 +10872,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.7.4

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

* [dpdk-stable] patch 'net/mlx5: fix overwriting bit-fields in SW Rx queue' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (78 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix VSI MAC filter on primary address change' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/dpaa: fix uninitialized and unused variables' " Yuanhan Liu
                   ` (76 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 92f916d15846b95e46a2a75b4d0f3e19a50505d0 Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Tue, 9 Jan 2018 09:38:50 -0800
Subject: [PATCH] net/mlx5: fix overwriting bit-fields in SW Rx queue

[ upstream commit d27fb0de2f2ae072f2dbdb236c1d10bd2b19b28f ]

Bit-fields in mlx5_rxq_data can be changed on the fly by a control plane -
e.g. rxq->mark. However, vectorized Rx uses a bit-field to mark pending
errors. Even if one bit is written, consequence is to write the whole
integer and this can cause a synchronization issue - two entities write to
a same block without locking. As the pending_err bit is entirely internal
use for the datapath, this can be replaced with a local variable.

Fixes: 6cb559d67b83 ("net/mlx5: add vectorized Rx/Tx burst for x86")
Fixes: 570acdb1da8a ("net/mlx5: add vectorized Rx/Tx burst for ARM")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx.h          | 3 +--
 drivers/net/mlx5/mlx5_rxtx_vec.c      | 6 +++---
 drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 9 ++++++---
 drivers/net/mlx5/mlx5_rxtx_vec_sse.h  | 8 ++++++--
 4 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index f1a4989..301cd75 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -114,8 +114,7 @@ struct mlx5_rxq_data {
 	unsigned int elts_n:4; /* Log 2 of Mbufs. */
 	unsigned int rss_hash:1; /* RSS hash result is enabled. */
 	unsigned int mark:1; /* Marked flow available on the queue. */
-	unsigned int pending_err:1; /* CQE error needs to be handled. */
-	unsigned int :14; /* Remaining bits. */
+	unsigned int :15; /* Remaining bits. */
 	volatile uint32_t *rq_db;
 	volatile uint32_t *cq_db;
 	uint16_t port_id;
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.c b/drivers/net/mlx5/mlx5_rxtx_vec.c
index 3aca17c..101aa15 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec.c
+++ b/drivers/net/mlx5/mlx5_rxtx_vec.c
@@ -244,7 +244,6 @@ rxq_handle_pending_error(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts,
 	rxq->stats.ipackets -= (pkts_n - n);
 	rxq->stats.ibytes -= err_bytes;
 #endif
-	rxq->pending_err = 0;
 	return n;
 }
 
@@ -266,9 +265,10 @@ mlx5_rx_burst_vec(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 {
 	struct mlx5_rxq_data *rxq = dpdk_rxq;
 	uint16_t nb_rx;
+	uint64_t err = 0;
 
-	nb_rx = rxq_burst_v(rxq, pkts, pkts_n);
-	if (unlikely(rxq->pending_err))
+	nb_rx = rxq_burst_v(rxq, pkts, pkts_n, &err);
+	if (unlikely(err))
 		nb_rx = rxq_handle_pending_error(rxq, pkts, nb_rx);
 	return nb_rx;
 }
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
index 77ce0c3..ce5ad0e 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
@@ -650,12 +650,16 @@ rxq_cq_to_ptype_oflags_v(struct mlx5_rxq_data *rxq,
  *   Array to store received packets.
  * @param pkts_n
  *   Maximum number of packets in array.
+ * @param[out] err
+ *   Pointer to a flag. Set non-zero value if pkts array has at least one error
+ *   packet to handle.
  *
  * @return
  *   Number of packets received including errors (<= pkts_n).
  */
 static inline uint16_t
-rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
+rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
+	    uint64_t *err)
 {
 	const uint16_t q_n = 1 << rxq->cqe_n;
 	const uint16_t q_mask = q_n - 1;
@@ -955,8 +959,7 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 		opcode = vceq_u16(resp_err_check, opcode);
 		opcode = vbic_u16(opcode, invalid_mask);
 		/* D.4 mark if any error is set */
-		rxq->pending_err |=
-			!!vget_lane_u64(vreinterpret_u64_u16(opcode), 0);
+		*err |= vget_lane_u64(vreinterpret_u64_u16(opcode), 0);
 		/* C.4 fill in mbuf - rearm_data and packet_type. */
 		rxq_cq_to_ptype_oflags_v(rxq, ptype_info, flow_tag,
 					 opcode, &elts[pos]);
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
index f256811..3e5de62 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
@@ -654,12 +654,16 @@ rxq_cq_to_ptype_oflags_v(struct mlx5_rxq_data *rxq, __m128i cqes[4],
  *   Array to store received packets.
  * @param pkts_n
  *   Maximum number of packets in array.
+ * @param[out] err
+ *   Pointer to a flag. Set non-zero value if pkts array has at least one error
+ *   packet to handle.
  *
  * @return
  *   Number of packets received including errors (<= pkts_n).
  */
 static inline uint16_t
-rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
+rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
+	    uint64_t *err)
 {
 	const uint16_t q_n = 1 << rxq->cqe_n;
 	const uint16_t q_mask = q_n - 1;
@@ -921,7 +925,7 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 		opcode = _mm_packs_epi32(opcode, zero);
 		opcode = _mm_andnot_si128(invalid_mask, opcode);
 		/* D.4 mark if any error is set */
-		rxq->pending_err |= !!_mm_cvtsi128_si64(opcode);
+		*err |= _mm_cvtsi128_si64(opcode);
 		/* D.5 fill in mbuf - rearm_data and packet_type. */
 		rxq_cq_to_ptype_oflags_v(rxq, cqes, opcode, &pkts[pos]);
 		if (rxq->hw_timestamp) {
-- 
2.7.4

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

* [dpdk-stable] patch 'net/dpaa: fix uninitialized and unused variables' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (79 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix overwriting bit-fields in SW Rx queue' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/dpaa: fix the mbuf packet type if zero' " Yuanhan Liu
                   ` (75 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From deb7adc2a8b678049e94f3ad2327a4bbc827a9a0 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Wed, 10 Jan 2018 16:16:23 +0530
Subject: [PATCH] net/dpaa: fix uninitialized and unused variables

[ upstream commit 8d804cf1a2f75b935a70de40cc1d0b286d50bf60 ]

This patch fixes the issues reported by NXP's internal
coverity build.

Fixes: 05ba55bc2b1a ("net/dpaa: add packet dump for debugging")
Fixes: 37f9b54bd3cf ("net/dpaa: support Tx and Rx queue setup")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 6 +++---
 drivers/net/dpaa/dpaa_rxtx.c   | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index cf5a2ec..3023302 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -723,7 +723,7 @@ static int dpaa_fc_set_default(struct dpaa_if *dpaa_intf)
 static int dpaa_rx_queue_init(struct qman_fq *fq,
 			      uint32_t fqid)
 {
-	struct qm_mcc_initfq opts;
+	struct qm_mcc_initfq opts = {0};
 	int ret;
 
 	PMD_INIT_FUNC_TRACE();
@@ -769,7 +769,7 @@ static int dpaa_rx_queue_init(struct qman_fq *fq,
 static int dpaa_tx_queue_init(struct qman_fq *fq,
 			      struct fman_if *fman_intf)
 {
-	struct qm_mcc_initfq opts;
+	struct qm_mcc_initfq opts = {0};
 	int ret;
 
 	PMD_INIT_FUNC_TRACE();
@@ -800,7 +800,7 @@ static int dpaa_tx_queue_init(struct qman_fq *fq,
 /* Initialise a DEBUG FQ ([rt]x_error, rx_default). */
 static int dpaa_debug_queue_init(struct qman_fq *fq, uint32_t fqid)
 {
-	struct qm_mcc_initfq opts;
+	struct qm_mcc_initfq opts = {0};
 	int ret;
 
 	PMD_INIT_FUNC_TRACE();
diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index 41e57f2..771e141 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -665,7 +665,7 @@ tx_on_external_pool(struct qman_fq *txq, struct rte_mbuf *mbuf,
 		return 1;
 	}
 
-	DPAA_MBUF_TO_CONTIG_FD(mbuf, fd_arr, dpaa_intf->bp_info->bpid);
+	DPAA_MBUF_TO_CONTIG_FD(dmable_mbuf, fd_arr, dpaa_intf->bp_info->bpid);
 
 	return 0;
 }
-- 
2.7.4

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

* [dpdk-stable] patch 'net/dpaa: fix the mbuf packet type if zero' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (80 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/dpaa: fix uninitialized and unused variables' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/dpaa: fix FW version code' " Yuanhan Liu
                   ` (74 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Ashish Jain; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 7b07235c7c25cf50d75ee5bf32308b462161c8fb Mon Sep 17 00:00:00 2001
From: Ashish Jain <ashish.jain@nxp.com>
Date: Wed, 10 Jan 2018 16:16:24 +0530
Subject: [PATCH] net/dpaa: fix the mbuf packet type if zero

[ upstream commit d565c887384e6850e663dcb97815fe3c840d7c38 ]

Populate the mbuf field packet_type which is required
for calculating checksum while transmitting frames

Fixes: 8cffdcbe85aa ("net/dpaa: support scattered Rx")

Signed-off-by: Ashish Jain <ashish.jain@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_rxtx.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index 771e141..c0cfec9 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -58,6 +58,7 @@
 #include <rte_ip.h>
 #include <rte_tcp.h>
 #include <rte_udp.h>
+#include <rte_net.h>
 
 #include "dpaa_ethdev.h"
 #include "dpaa_rxtx.h"
@@ -504,6 +505,15 @@ dpaa_eth_mbuf_to_sg_fd(struct rte_mbuf *mbuf,
 	fd->opaque_addr = 0;
 
 	if (mbuf->ol_flags & DPAA_TX_CKSUM_OFFLOAD_MASK) {
+		if (!mbuf->packet_type) {
+			struct rte_net_hdr_lens hdr_lens;
+
+			mbuf->packet_type = rte_net_get_ptype(mbuf, &hdr_lens,
+					RTE_PTYPE_L2_MASK | RTE_PTYPE_L3_MASK
+					| RTE_PTYPE_L4_MASK);
+			mbuf->l2_len = hdr_lens.l2_len;
+			mbuf->l3_len = hdr_lens.l3_len;
+		}
 		if (temp->data_off < DEFAULT_TX_ICEOF
 			+ sizeof(struct dpaa_eth_parse_results_t))
 			temp->data_off = DEFAULT_TX_ICEOF
@@ -611,6 +621,15 @@ tx_on_dpaa_pool_unsegmented(struct rte_mbuf *mbuf,
 	}
 
 	if (mbuf->ol_flags & DPAA_TX_CKSUM_OFFLOAD_MASK) {
+		if (!mbuf->packet_type) {
+			struct rte_net_hdr_lens hdr_lens;
+
+			mbuf->packet_type = rte_net_get_ptype(mbuf, &hdr_lens,
+					RTE_PTYPE_L2_MASK | RTE_PTYPE_L3_MASK
+					| RTE_PTYPE_L4_MASK);
+			mbuf->l2_len = hdr_lens.l2_len;
+			mbuf->l3_len = hdr_lens.l3_len;
+		}
 		if (mbuf->data_off < (DEFAULT_TX_ICEOF +
 		    sizeof(struct dpaa_eth_parse_results_t))) {
 			DPAA_DP_LOG(DEBUG, "Checksum offload Err: "
-- 
2.7.4

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

* [dpdk-stable] patch 'net/dpaa: fix FW version code' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (81 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/dpaa: fix the mbuf packet type if zero' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/bnxt: fix double increment of idx during Tx ring alloc' " Yuanhan Liu
                   ` (73 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From b6842c2b2fe8e61d6e0fd345240cfcc371bee5d2 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Wed, 10 Jan 2018 16:16:25 +0530
Subject: [PATCH] net/dpaa: fix FW version code

[ upstream commit a8e78906afba01d60a86c19c50ba0e43c5c1d13b ]

fix the soc id path and missing fclose

Fixes: cf0fab1d2ca5 ("net/dpaa: support firmware version get API")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 14 +++++---------
 drivers/net/dpaa/dpaa_ethdev.h |  2 +-
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 3023302..29678c5 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -212,19 +212,15 @@ dpaa_fw_version_get(struct rte_eth_dev *dev __rte_unused,
 		DPAA_PMD_ERR("Unable to open SoC device");
 		return -ENOTSUP; /* Not supported on this infra */
 	}
-
-	ret = fscanf(svr_file, "svr:%x", &svr_ver);
-	if (ret <= 0) {
+	if (fscanf(svr_file, "svr:%x", &svr_ver) <= 0)
 		DPAA_PMD_ERR("Unable to read SoC device");
-		return -ENOTSUP; /* Not supported on this infra */
-	}
 
-	ret = snprintf(fw_version, fw_size,
-		       "svr:%x-fman-v%x",
-		       svr_ver,
-		       fman_ip_rev);
+	fclose(svr_file);
 
+	ret = snprintf(fw_version, fw_size, "SVR:%x-fman-v%x",
+		       svr_ver, fman_ip_rev);
 	ret += 1; /* add the size of '\0' */
+
 	if (fw_size < (uint32_t)ret)
 		return ret;
 	else
diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h
index 5457d61..ec5ae13 100644
--- a/drivers/net/dpaa/dpaa_ethdev.h
+++ b/drivers/net/dpaa/dpaa_ethdev.h
@@ -46,7 +46,7 @@
 /* DPAA SoC identifier; If this is not available, it can be concluded
  * that board is non-DPAA. Single slot is currently supported.
  */
-#define DPAA_SOC_ID_FILE		"sys/devices/soc0/soc_id"
+#define DPAA_SOC_ID_FILE		"/sys/devices/soc0/soc_id"
 
 #define DPAA_MBUF_HW_ANNOTATION		64
 #define DPAA_FD_PTA_SIZE		64
-- 
2.7.4

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

* [dpdk-stable] patch 'net/bnxt: fix double increment of idx during Tx ring alloc' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (82 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/dpaa: fix FW version code' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/bnxt: parse checksum offload flags' " Yuanhan Liu
                   ` (72 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From fa0de80155492bb2d83eba36932e86995c62114e Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Mon, 8 Jan 2018 12:24:26 -0800
Subject: [PATCH] net/bnxt: fix double increment of idx during Tx ring alloc

[ upstream commit 1005d96445e9df72d9a907e0c82843528efed939 ]

We are incrementing idx twice while allocating Tx rings.
Since this is passed to the firmware, it may cause unexpected behavior.

Fixes: daef48efe5e5 ("net/bnxt: support set MTU")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ring.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c
index 0fa2f0c..e0ca0e7 100644
--- a/drivers/net/bnxt/bnxt_ring.c
+++ b/drivers/net/bnxt/bnxt_ring.c
@@ -362,9 +362,6 @@ int bnxt_alloc_hwrm_rings(struct bnxt *bp)
 		struct bnxt_ring *ring = txr->tx_ring_struct;
 		unsigned int idx = i + 1 + bp->rx_cp_nr_rings;
 
-		/* Account for AGG Rings. AGG ring cnt = Rx Cmpl ring cnt */
-		idx += bp->rx_cp_nr_rings;
-
 		/* Tx cmpl */
 		rc = bnxt_hwrm_ring_alloc(bp, cp_ring,
 					HWRM_RING_ALLOC_INPUT_RING_TYPE_L2_CMPL,
-- 
2.7.4

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

* [dpdk-stable] patch 'net/bnxt: parse checksum offload flags' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (83 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/bnxt: fix double increment of idx during Tx ring alloc' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/bnxt: fix group info usage' " Yuanhan Liu
                   ` (71 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From e5da9455dca3ab7791b6ffcee4f7fb63f6f8440b 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 8ca4bbd..4a152aa 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -217,23 +217,28 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
 					tx_pkt->outer_l3_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.7.4

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

* [dpdk-stable] patch 'net/bnxt: fix group info usage' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (84 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/bnxt: parse checksum offload flags' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/bnxt: fix check for ether type' " Yuanhan Liu
                   ` (70 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 36dd8aa0949e820fa93061907e826497383e71e5 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Mon, 8 Jan 2018 12:24:28 -0800
Subject: [PATCH] net/bnxt: fix group info usage

[ upstream commit ee5d7bddab2751fe54bdee50ac3c9840bcc3be64 ]

Ring groups is a Rx only attribute. Make sure there are sufficient
ring groups available. Return an error if they are not available.

Fixes: 37d6161a68ba ("net/bnxt: add ring group alloc/free")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_cpr.c    |  1 -
 drivers/net/bnxt/bnxt_ethdev.c | 15 +++++++++++++--
 drivers/net/bnxt/bnxt_hwrm.c   | 14 ++++----------
 drivers/net/bnxt/bnxt_ring.c   |  4 +++-
 drivers/net/bnxt/bnxt_ring.h   |  2 +-
 5 files changed, 21 insertions(+), 15 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index 19c684c..cde8adc 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -165,7 +165,6 @@ int bnxt_alloc_def_cp_ring(struct bnxt *bp)
 		goto err_out;
 	cpr->cp_doorbell = bp->pdev->mem_resource[2].addr;
 	B_CP_DIS_DB(cpr, cpr->cp_raw_cons);
-	bp->grp_info[0].cp_fw_ring_id = cp_ring->fw_ring_id;
 	if (BNXT_PF(bp))
 		rc = bnxt_hwrm_func_cfg_def_cp(bp);
 	else
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 3b6813c..7832e20 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -393,7 +393,10 @@ static int bnxt_init_nic(struct bnxt *bp)
 {
 	int rc;
 
-	bnxt_init_ring_grps(bp);
+	rc = bnxt_init_ring_grps(bp);
+	if (rc)
+		return rc;
+
 	bnxt_init_vnics(bp);
 	bnxt_init_filters(bp);
 
@@ -2939,11 +2942,19 @@ skip_init:
 	/* Copy the permanent MAC from the qcap response address now. */
 	memcpy(bp->mac_addr, bp->dflt_mac_addr, sizeof(bp->mac_addr));
 	memcpy(&eth_dev->data->mac_addrs[0], bp->mac_addr, ETHER_ADDR_LEN);
+
+	if (bp->max_ring_grps < bp->rx_cp_nr_rings) {
+		/* 1 ring is for default completion ring */
+		RTE_LOG(ERR, PMD, "Insufficient resource: Ring Group\n");
+		rc = -ENOSPC;
+		goto error_free;
+	}
+
 	bp->grp_info = rte_zmalloc("bnxt_grp_info",
 				sizeof(*bp->grp_info) * bp->max_ring_grps, 0);
 	if (!bp->grp_info) {
 		RTE_LOG(ERR, PMD,
-			"Failed to alloc %zu bytes needed to store group info table\n",
+			"Failed to alloc %zu bytes to store group info table\n",
 			sizeof(*bp->grp_info) * bp->max_ring_grps);
 		rc = -ENOMEM;
 		goto error_free;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index d2c800d..564e3f7 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1046,7 +1046,6 @@ int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
 	cpr->hw_stats_ctx_id = rte_le_to_cpu_16(resp->stat_ctx_id);
 
 	HWRM_UNLOCK();
-	bp->grp_info[idx].fw_stats_ctx = cpr->hw_stats_ctx_id;
 
 	return rc;
 }
@@ -1569,19 +1568,15 @@ int bnxt_free_all_hwrm_stat_ctxs(struct bnxt *bp)
 
 	for (i = 0; i < bp->rx_cp_nr_rings + bp->tx_cp_nr_rings; i++) {
 
-		if (i >= bp->rx_cp_nr_rings)
+		if (i >= bp->rx_cp_nr_rings) {
 			cpr = bp->tx_queues[i - bp->rx_cp_nr_rings]->cp_ring;
-		else
+		} else {
 			cpr = bp->rx_queues[i]->cp_ring;
+			bp->grp_info[i].fw_stats_ctx = -1;
+		}
 		if (cpr->hw_stats_ctx_id != HWRM_NA_SIGNATURE) {
 			rc = bnxt_hwrm_stat_ctx_free(bp, cpr, i);
 			cpr->hw_stats_ctx_id = HWRM_NA_SIGNATURE;
-			/*
-			 * TODO. Need a better way to reset grp_info.stats_ctx
-			 * for Rx rings only. stats_ctx is not saved for Tx
-			 * in grp_info.
-			 */
-			bp->grp_info[i].fw_stats_ctx = cpr->hw_stats_ctx_id;
 			if (rc)
 				return rc;
 		}
@@ -1641,7 +1636,6 @@ static void bnxt_free_cp_ring(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
 	bnxt_hwrm_ring_free(bp, cp_ring,
 			HWRM_RING_FREE_INPUT_RING_TYPE_L2_CMPL);
 	cp_ring->fw_ring_id = INVALID_HW_RING_ID;
-	bp->grp_info[idx].cp_fw_ring_id = INVALID_HW_RING_ID;
 	memset(cpr->cp_desc_ring, 0, cpr->cp_ring_struct->ring_size *
 			sizeof(*cpr->cp_desc_ring));
 	cpr->cp_raw_cons = 0;
diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c
index e0ca0e7..59d1035 100644
--- a/drivers/net/bnxt/bnxt_ring.c
+++ b/drivers/net/bnxt/bnxt_ring.c
@@ -63,13 +63,15 @@ void bnxt_free_ring(struct bnxt_ring *ring)
  * Ring groups
  */
 
-void bnxt_init_ring_grps(struct bnxt *bp)
+int bnxt_init_ring_grps(struct bnxt *bp)
 {
 	unsigned int i;
 
 	for (i = 0; i < bp->max_ring_grps; i++)
 		memset(&bp->grp_info[i], (uint8_t)HWRM_NA_SIGNATURE,
 		       sizeof(struct bnxt_ring_grp_info));
+
+	return 0;
 }
 
 /*
diff --git a/drivers/net/bnxt/bnxt_ring.h b/drivers/net/bnxt/bnxt_ring.h
index 164f482..a88ab55 100644
--- a/drivers/net/bnxt/bnxt_ring.h
+++ b/drivers/net/bnxt/bnxt_ring.h
@@ -94,7 +94,7 @@ struct bnxt_tx_ring_info;
 struct bnxt_rx_ring_info;
 struct bnxt_cp_ring_info;
 void bnxt_free_ring(struct bnxt_ring *ring);
-void bnxt_init_ring_grps(struct bnxt *bp);
+int bnxt_init_ring_grps(struct bnxt *bp);
 int bnxt_alloc_rings(struct bnxt *bp, uint16_t qidx,
 			    struct bnxt_tx_ring_info *tx_ring_info,
 			    struct bnxt_rx_ring_info *rx_ring_info,
-- 
2.7.4

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

* [dpdk-stable] patch 'net/bnxt: fix check for ether type' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (85 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/bnxt: fix group info usage' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/bnxt: fix duplicate filter pattern creation error' " Yuanhan Liu
                   ` (69 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 7f12fd066e33676aaf0bb9e6faf1739afccc3d72 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Mon, 8 Jan 2018 12:24:32 -0800
Subject: [PATCH] net/bnxt: fix check for ether type

[ upstream commit 2b30803c096b42976cd199660c9ddec54588d928 ]

As per documentation, While supporting ethertype_filters matching
ether_types 0x0800 (IPv4) and 0x86DD (IPv6) is invalid.
But we were wrongly doing that. This patch fixes it.

Fixes: 5ef3b79fdfe6 ("net/bnxt: support flow filter ops")

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

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 7832e20..5f0aae4 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1726,9 +1726,9 @@ bnxt_match_and_validate_ether_filter(struct bnxt *bp,
 	int match = 0;
 	*ret = 0;
 
-	if (efilter->ether_type != ETHER_TYPE_IPv4 &&
-		efilter->ether_type != ETHER_TYPE_IPv6) {
-		RTE_LOG(ERR, PMD, "unsupported ether_type(0x%04x) in"
+	if (efilter->ether_type == ETHER_TYPE_IPv4 ||
+		efilter->ether_type == ETHER_TYPE_IPv6) {
+		RTE_LOG(ERR, PMD, "invalid ether_type(0x%04x) in"
 			" ethertype filter.", efilter->ether_type);
 		*ret = -EINVAL;
 		goto exit;
-- 
2.7.4

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

* [dpdk-stable] patch 'net/bnxt: fix duplicate filter pattern creation error' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (86 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/bnxt: fix check for ether type' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/bnxt: fix duplicate pattern for 5tuple filter' " Yuanhan Liu
                   ` (68 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 94859d52f3f5aa3f55a2c5401c511a587228faaf Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Mon, 8 Jan 2018 12:24:34 -0800
Subject: [PATCH] net/bnxt: fix duplicate filter pattern creation error

[ upstream commit 46667f9377ffcb48af3c6d8998dd4bc6df8436f5 ]

If the attribute/pattern for a flow is the same, with only the 'action'
i.e the destination queue index changing, allow it by cleaning up
the older ntuple filter and updating the existing flow with
the new filter rule having the new destination queue ID.
Also, clear the L2 filter during flow_destroy after destroying
the ntuple filter, otherwise the flow record is not completely purged
from the HW.

Fixes: 5ef3b79fdfe6 ("net/bnxt: support flow filter ops")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_filter.c | 42 +++++++++++++++++++++++++++++++++++++-----
 drivers/net/bnxt/bnxt_hwrm.c   |  1 -
 2 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c
index 65d30fb..32af606 100644
--- a/drivers/net/bnxt/bnxt_filter.c
+++ b/drivers/net/bnxt/bnxt_filter.c
@@ -1042,8 +1042,23 @@ bnxt_match_filter(struct bnxt *bp, struct bnxt_filter_info *nf)
 			    !memcmp(mf->dst_ipaddr, nf->dst_ipaddr,
 				    sizeof(nf->dst_ipaddr)) &&
 			    !memcmp(mf->dst_ipaddr_mask, nf->dst_ipaddr_mask,
-				    sizeof(nf->dst_ipaddr_mask)))
-				return -EEXIST;
+				    sizeof(nf->dst_ipaddr_mask))) {
+				if (mf->dst_id == nf->dst_id)
+					return -EEXIST;
+				/* Same Flow, Different queue
+				 * Clear the old ntuple filter
+				 */
+				if (nf->filter_type == HWRM_CFA_EM_FILTER)
+					bnxt_hwrm_clear_em_filter(bp, mf);
+				if (nf->filter_type == HWRM_CFA_NTUPLE_FILTER)
+					bnxt_hwrm_clear_ntuple_filter(bp, mf);
+				/* Free the old filter, update flow
+				 * with new filter
+				 */
+				bnxt_free_filter(bp, mf);
+				flow->filter = nf;
+				return -EXDEV;
+			}
 		}
 	}
 	return 0;
@@ -1059,6 +1074,7 @@ bnxt_flow_create(struct rte_eth_dev *dev,
 	struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
 	struct bnxt_filter_info *filter;
 	struct bnxt_vnic_info *vnic = NULL;
+	bool update_flow = false;
 	struct rte_flow *flow;
 	unsigned int i;
 	int ret = 0;
@@ -1089,9 +1105,17 @@ bnxt_flow_create(struct rte_eth_dev *dev,
 		goto free_filter;
 
 	ret = bnxt_match_filter(bp, filter);
-	if (ret != 0) {
+	if (ret == -EEXIST) {
 		RTE_LOG(DEBUG, PMD, "Flow already exists.\n");
+		/* Clear the filter that was created as part of
+		 * validate_and_parse_flow() above
+		 */
+		bnxt_hwrm_clear_l2_filter(bp, filter);
 		goto free_filter;
+	} else if (ret == -EXDEV) {
+		RTE_LOG(DEBUG, PMD, "Flow with same pattern exists");
+		RTE_LOG(DEBUG, PMD, "Updating with different destination\n");
+		update_flow = true;
 	}
 
 	if (filter->filter_type == HWRM_CFA_EM_FILTER) {
@@ -1114,22 +1138,29 @@ bnxt_flow_create(struct rte_eth_dev *dev,
 	if (!ret) {
 		flow->filter = filter;
 		flow->vnic = vnic;
+		if (update_flow) {
+			ret = -EXDEV;
+			goto free_flow;
+		}
 		RTE_LOG(ERR, PMD, "Successfully created flow.\n");
 		STAILQ_INSERT_TAIL(&vnic->flow_list, flow, next);
 		return flow;
 	}
 free_filter:
-	filter->fw_l2_filter_id = -1;
 	bnxt_free_filter(bp, filter);
 free_flow:
 	if (ret == -EEXIST)
 		rte_flow_error_set(error, ret,
 				   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
 				   "Matching Flow exists.");
+	else if (ret == -EXDEV)
+		rte_flow_error_set(error, ret,
+				   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
+				   "Flow with pattern exists, updating destination queue");
 	else
 		rte_flow_error_set(error, -ret,
 				   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
-			   "Failed to create flow.");
+				   "Failed to create flow.");
 	rte_free(flow);
 	flow = NULL;
 	return flow;
@@ -1153,6 +1184,7 @@ bnxt_flow_destroy(struct rte_eth_dev *dev,
 	if (filter->filter_type == HWRM_CFA_NTUPLE_FILTER)
 		ret = bnxt_hwrm_clear_ntuple_filter(bp, filter);
 
+	bnxt_hwrm_clear_l2_filter(bp, filter);
 	if (!ret) {
 		STAILQ_REMOVE(&vnic->flow_list, flow, rte_flow, next);
 		rte_free(flow);
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 564e3f7..3b93bb5 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -3569,7 +3569,6 @@ int bnxt_hwrm_clear_ntuple_filter(struct bnxt *bp,
 	HWRM_UNLOCK();
 
 	filter->fw_ntuple_filter_id = -1;
-	filter->fw_l2_filter_id = -1;
 
 	return 0;
 }
-- 
2.7.4

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

* [dpdk-stable] patch 'net/bnxt: fix duplicate pattern for 5tuple filter' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (87 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/bnxt: fix duplicate filter pattern creation error' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/bnxt: free the aggregation ring' " Yuanhan Liu
                   ` (67 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From e4306449fde5465a8806f304044c477a4111f86f Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Mon, 8 Jan 2018 12:24:35 -0800
Subject: [PATCH] net/bnxt: fix duplicate pattern for 5tuple filter

[ upstream commit ba09f838464db72d5c6b6589f84f6a465e5594b1 ]

When user re-issues same 5 tuple filter pattern cmd with different
destination queue, it would flag it as an existing match.
However, when deletion on this filter was attempted, it would crash
as the 'vnic' from which the filter was being removed from would be
different.  Fix by updating the filter in the scenario where there
is a pattern match and only the destination queue varies.

Fixes: b7435d660a8c ("net/bnxt: add ntuple filtering support")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 32 +++++++++++++++++++++++---------
 1 file changed, 23 insertions(+), 9 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 5f0aae4..99242c4 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1956,7 +1956,8 @@ parse_ntuple_filter(struct bnxt *bp,
 
 static struct bnxt_filter_info*
 bnxt_match_ntuple_filter(struct bnxt *bp,
-			 struct bnxt_filter_info *bfilter)
+			 struct bnxt_filter_info *bfilter,
+			 struct bnxt_vnic_info **mvnic)
 {
 	struct bnxt_filter_info *mfilter = NULL;
 	int i;
@@ -1975,8 +1976,11 @@ bnxt_match_ntuple_filter(struct bnxt *bp,
 			    bfilter->dst_port == mfilter->dst_port &&
 			    bfilter->dst_port_mask == mfilter->dst_port_mask &&
 			    bfilter->flags == mfilter->flags &&
-			    bfilter->enables == mfilter->enables)
+			    bfilter->enables == mfilter->enables) {
+				if (mvnic)
+					*mvnic = vnic;
 				return mfilter;
+			}
 		}
 	}
 	return NULL;
@@ -1988,7 +1992,7 @@ bnxt_cfg_ntuple_filter(struct bnxt *bp,
 		       enum rte_filter_op filter_op)
 {
 	struct bnxt_filter_info *bfilter, *mfilter, *filter1;
-	struct bnxt_vnic_info *vnic, *vnic0;
+	struct bnxt_vnic_info *vnic, *vnic0, *mvnic;
 	int ret;
 
 	if (nfilter->flags != RTE_5TUPLE_FLAGS) {
@@ -2026,12 +2030,22 @@ bnxt_cfg_ntuple_filter(struct bnxt *bp,
 	bfilter->ethertype = 0x800;
 	bfilter->enables |= NTUPLE_FLTR_ALLOC_INPUT_EN_ETHERTYPE;
 
-	mfilter = bnxt_match_ntuple_filter(bp, bfilter);
+	mfilter = bnxt_match_ntuple_filter(bp, bfilter, &mvnic);
 
-	if (mfilter != NULL && filter_op == RTE_ETH_FILTER_ADD) {
-		RTE_LOG(ERR, PMD, "filter exists.");
+	if (mfilter != NULL && filter_op == RTE_ETH_FILTER_ADD &&
+	    bfilter->dst_id == mfilter->dst_id) {
+		RTE_LOG(ERR, PMD, "filter exists.\n");
 		ret = -EEXIST;
 		goto free_filter;
+	} else if (mfilter != NULL && filter_op == RTE_ETH_FILTER_ADD &&
+		   bfilter->dst_id != mfilter->dst_id) {
+		mfilter->dst_id = vnic->fw_vnic_id;
+		ret = bnxt_hwrm_set_ntuple_filter(bp, mfilter->dst_id, mfilter);
+		STAILQ_REMOVE(&mvnic->filter, mfilter, bnxt_filter_info, next);
+		STAILQ_INSERT_TAIL(&vnic->filter, mfilter, next);
+		RTE_LOG(ERR, PMD, "filter with matching pattern exists.\n");
+		RTE_LOG(ERR, PMD, " Updated it to the new destination queue\n");
+		goto free_filter;
 	}
 	if (mfilter == NULL && filter_op == RTE_ETH_FILTER_DELETE) {
 		RTE_LOG(ERR, PMD, "filter doesn't exist.");
@@ -2053,11 +2067,11 @@ bnxt_cfg_ntuple_filter(struct bnxt *bp,
 		}
 		ret = bnxt_hwrm_clear_ntuple_filter(bp, mfilter);
 
-		STAILQ_REMOVE(&vnic->filter, mfilter, bnxt_filter_info,
-			      next);
+		STAILQ_REMOVE(&vnic->filter, mfilter, bnxt_filter_info, next);
 		bnxt_free_filter(bp, mfilter);
-		bfilter->fw_l2_filter_id = -1;
+		mfilter->fw_l2_filter_id = -1;
 		bnxt_free_filter(bp, bfilter);
+		bfilter->fw_l2_filter_id = -1;
 	}
 
 	return 0;
-- 
2.7.4

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

* [dpdk-stable] patch 'net/bnxt: free the aggregation ring' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (88 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/bnxt: fix duplicate pattern for 5tuple filter' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/bonding: fix setting slave MAC addresses' " Yuanhan Liu
                   ` (66 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From ceb9a2901d42ab78791d8ba6974c47f1f5e67f51 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Mon, 8 Jan 2018 12:24:36 -0800
Subject: [PATCH] net/bnxt: free the aggregation ring

[ upstream commit ed5aab3d3e8745b70c81fb8a0c152ed28acb8d9d ]

bnxt_free_all_hwrm_rings() was freeing all the Rx Rings including
zero-ing out the memory for the Aggregation rings, but was not issuing
the FW cmd to destroy the AGG ring(s) from HW. This would manifest in
problems when port stop/port start would be issued as there would be a
HW ring leak every time port stop was issued.

Fixes: daef48efe5e5 ("net/bnxt: support set MTU")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 3b93bb5..51b0056 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1691,10 +1691,17 @@ int bnxt_free_all_hwrm_rings(struct bnxt *bp)
 					rxr->rx_ring_struct->ring_size *
 					sizeof(*rxr->rx_buf_ring));
 			rxr->rx_prod = 0;
+		}
+		ring = rxr->ag_ring_struct;
+		if (ring->fw_ring_id != INVALID_HW_RING_ID) {
+			bnxt_hwrm_ring_free(bp, ring,
+					    HWRM_RING_FREE_INPUT_RING_TYPE_RX);
+			ring->fw_ring_id = INVALID_HW_RING_ID;
 			memset(rxr->ag_buf_ring, 0,
-					rxr->ag_ring_struct->ring_size *
-					sizeof(*rxr->ag_buf_ring));
+			       rxr->ag_ring_struct->ring_size *
+			       sizeof(*rxr->ag_buf_ring));
 			rxr->ag_prod = 0;
+			bp->grp_info[i].ag_fw_ring_id = INVALID_HW_RING_ID;
 		}
 		if (cpr->cp_ring_struct->fw_ring_id != INVALID_HW_RING_ID) {
 			bnxt_free_cp_ring(bp, cpr, idx);
-- 
2.7.4

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

* [dpdk-stable] patch 'net/bonding: fix setting slave MAC addresses' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (89 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/bnxt: free the aggregation ring' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'ethdev: fix link autonegotiation value' " Yuanhan Liu
                   ` (65 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Chas Williams; +Cc: Declan Doherty, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From b3831c7ec3b2a6ba964b441dd7621e62bbfeb2e8 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 703bb39..532683b 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -453,7 +453,7 @@ __eth_bond_slave_remove_lock_free(uint16_t bonded_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 fe23289..1d3fbeb 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1500,7 +1500,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);
@@ -1518,15 +1519,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.7.4

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

* [dpdk-stable] patch 'ethdev: fix link autonegotiation value' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (90 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/bonding: fix setting slave MAC addresses' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/enic: fix L4 Rx ptype comparison' " Yuanhan Liu
                   ` (64 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Andrew Rybchenko, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From fe2e88da408746c13bbe30d41eb82ceab2e85265 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/failsafe/failsafe.c           |  2 +-
 drivers/net/kni/rte_eth_kni.c             |  2 +-
 drivers/net/null/rte_eth_null.c           |  2 +-
 drivers/net/octeontx/octeontx_ethdev.c    |  4 ++--
 drivers/net/pcap/rte_eth_pcap.c           |  2 +-
 drivers/net/ring/rte_eth_ring.c           |  2 +-
 drivers/net/softnic/rte_eth_softnic.c     |  2 +-
 drivers/net/szedata2/rte_eth_szedata2.c   |  2 +-
 drivers/net/tap/rte_eth_tap.c             |  2 +-
 drivers/net/thunderx/nicvf_ethdev.c       |  2 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.c      |  2 +-
 lib/librte_ether/rte_ethdev.h             | 14 +++++++-------
 15 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index fa84eb9..d515408 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.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_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 a0c3b4d..29dac6e 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -1209,7 +1209,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 a600fba..c783019 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -2435,7 +2435,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/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index 6bc5aba..8336510 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -46,7 +46,7 @@ static const struct rte_eth_link eth_link = {
 	.link_speed = ETH_SPEED_NUM_10G,
 	.link_duplex = ETH_LINK_FULL_DUPLEX,
 	.link_status = ETH_LINK_UP,
-	.link_autoneg = ETH_LINK_SPEED_AUTONEG,
+	.link_autoneg = ETH_LINK_AUTONEG,
 };
 
 static int
diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index 8f26953..c1a2ea5 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -90,7 +90,7 @@ static const 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 int is_kni_initialized;
 
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 032c30e..726a5c5 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -91,7 +91,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/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index bd24ec3..b52700e 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -572,8 +572,8 @@ octeontx_dev_link_update(struct rte_eth_dev *dev,
 		break;
 	}
 
-	link.link_duplex = ETH_LINK_AUTONEG;
-	link.link_autoneg = ETH_LINK_SPEED_AUTONEG;
+	link.link_duplex = ETH_LINK_FULL_DUPLEX;
+	link.link_autoneg = ETH_LINK_AUTONEG;
 
 	return octeontx_atomic_write_link_status(dev, &link);
 }
diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 5a86752..3efb451 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 a73c631..8583a67 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -89,7 +89,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/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c
index 3e47c2f..c8f918d 100644
--- a/drivers/net/softnic/rte_eth_softnic.c
+++ b/drivers/net/softnic/rte_eth_softnic.c
@@ -551,7 +551,7 @@ pmd_ethdev_register(struct rte_vdev_device *vdev,
 	soft_dev->data->dev_private = dev_private;
 	soft_dev->data->dev_link.link_speed = hard_speed;
 	soft_dev->data->dev_link.link_duplex = ETH_LINK_FULL_DUPLEX;
-	soft_dev->data->dev_link.link_autoneg = ETH_LINK_SPEED_FIXED;
+	soft_dev->data->dev_link.link_autoneg = ETH_LINK_AUTONEG;
 	soft_dev->data->dev_link.link_status = ETH_LINK_DOWN;
 	soft_dev->data->mac_addrs = &eth_addr;
 	soft_dev->data->promiscuous = 1;
diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c
index af0580a..45aebed 100644
--- a/drivers/net/szedata2/rte_eth_szedata2.c
+++ b/drivers/net/szedata2/rte_eth_szedata2.c
@@ -1214,7 +1214,7 @@ eth_link_update(struct rte_eth_dev *dev,
 
 	link.link_status = (link_is_up) ? 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/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 6b27679..fdb77c1 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -99,7 +99,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 void
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index d65d3ce..c62371c 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -100,7 +100,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 82d59ca..93d9649 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -1172,7 +1172,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 341c2d6..96555a8 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.7.4

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

* [dpdk-stable] patch 'net/enic: fix L4 Rx ptype comparison' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (91 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'ethdev: fix link autonegotiation value' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/pcap: fix the NUMA id display in logs' " Yuanhan Liu
                   ` (63 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: John Daley, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 0130f02f20bd755d30a577e20db008194bc9798a Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim@cisco.com>
Date: Wed, 10 Jan 2018 01:17:04 -0800
Subject: [PATCH] net/enic: fix L4 Rx ptype comparison

[ upstream commit 5dbff3af25a4a68980992f5040246e1d7f20b4cd ]

For non-UDP/TCP packets, enic may wrongly set PKT_RX_L4_CKSUM_BAD in
ol_flags. The comparison that checks if a packet is UDP or TCP assumes
that RTE_PTYPE_L4 values are bit flags, but they are not. For example,
the following evaluates to true because NONFRAG is 0x600 and UDP is
0x200, and causes the current code to think the packet is UDP.

!!(RTE_PTYPE_L4_NONFRAG & RTE_PTYPE_L4_UDP)

So, fix this by comparing the packet type against UDP and TCP
individually.

Fixes: 453d15059b58 ("net/enic: use new Rx checksum flags")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic_rxtx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c
index a3663d5..831c90a 100644
--- a/drivers/net/enic/enic_rxtx.c
+++ b/drivers/net/enic/enic_rxtx.c
@@ -285,7 +285,8 @@ enic_cq_rx_to_pkt_flags(struct cq_desc *cqd, struct rte_mbuf *mbuf)
 			else
 				pkt_flags |= PKT_RX_IP_CKSUM_BAD;
 
-			if (l4_flags & (RTE_PTYPE_L4_UDP | RTE_PTYPE_L4_TCP)) {
+			if (l4_flags == RTE_PTYPE_L4_UDP ||
+			    l4_flags == RTE_PTYPE_L4_TCP) {
 				if (enic_cq_rx_desc_tcp_udp_csum_ok(cqrd))
 					pkt_flags |= PKT_RX_L4_CKSUM_GOOD;
 				else
-- 
2.7.4

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

* [dpdk-stable] patch 'net/pcap: fix the NUMA id display in logs' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (92 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/enic: fix L4 Rx ptype comparison' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/failsafe: fix Rx safe check compiler hint' " Yuanhan Liu
                   ` (62 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Vipin Varghese; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From eeacf1f62b50842246687a005f879b91e425456b 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 3efb451..3385d04 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -806,7 +806,7 @@ pmd_init_internals(struct rte_vdev_device *vdev,
 	const char *name;
 
 	name = rte_vdev_device_name(vdev);
-	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
@@ -1036,7 +1036,7 @@ pmd_pcap_remove(struct rte_vdev_device *dev)
 {
 	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 (!dev)
-- 
2.7.4

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

* [dpdk-stable] patch 'net/failsafe: fix Rx safe check compiler hint' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (93 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/pcap: fix the NUMA id display in logs' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/tap: remove unused kernel version definitions' " Yuanhan Liu
                   ` (61 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Matan Azrad; +Cc: Gaetan Rivet, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 89e3394fe94e53e712d4f62bf9071bb36d53ad19 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Tue, 19 Dec 2017 17:14:27 +0000
Subject: [PATCH] net/failsafe: fix Rx safe check compiler hint

[ upstream commit e6282283090b479953b8c0f951977c82cc368322 ]

failsafe_rx_burst function is used when there are no sub-devices or at
least one of them has been removed, on the other hand, when all the
sub-devices are present, failsafe_rx_burst_fast function is used.

So it's really expected that some of the sub-devices will be unsafe for
Rx burst in failsafe_rx_burst execution.

Remove unlikely compiler hint from fs_rx_unsafe calling.

Fixes: a46f8d584eb8 ("net/failsafe: add fail-safe PMD")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
 drivers/net/failsafe/failsafe_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/failsafe/failsafe_rxtx.c b/drivers/net/failsafe/failsafe_rxtx.c
index 70157c8..178294c 100644
--- a/drivers/net/failsafe/failsafe_rxtx.c
+++ b/drivers/net/failsafe/failsafe_rxtx.c
@@ -111,7 +111,7 @@ failsafe_rx_burst(void *queue,
 		if (i == priv->subs_tail)
 			i = priv->subs_head;
 		sdev = &priv->subs[i];
-		if (unlikely(fs_rx_unsafe(sdev)))
+		if (fs_rx_unsafe(sdev))
 			continue;
 		sub_rxq = ETH(sdev)->data->rx_queues[rxq->qid];
 		FS_ATOMIC_P(rxq->refcnt[sdev->sid]);
-- 
2.7.4

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

* [dpdk-stable] patch 'net/tap: remove unused kernel version definitions' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (94 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/failsafe: fix Rx safe check compiler hint' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mrvl: fix multiple probe' " Yuanhan Liu
                   ` (60 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Stephen Hemminger, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 978fab1f55ca2461d3877a467515abd5c189af19 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 27 Dec 2017 10:28:36 -0800
Subject: [PATCH] net/tap: remove unused kernel version definitions

[ upstream commit d732ec19dcad45070c85e5b43aca95b2d49ec8a6 ]

The TAP device does not use these definitions in current version.
And kernel version is not the correct way to detect features.

Fixes: 7c2d03d65f5e ("net/tap: remove Linux version check")

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/tap/rte_eth_tap.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index fdb77c1..036028f 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -60,7 +60,6 @@
 #include <net/if.h>
 #include <linux/if_tun.h>
 #include <linux/if_ether.h>
-#include <linux/version.h>
 #include <fcntl.h>
 
 #include <rte_eth_tap.h>
@@ -78,9 +77,6 @@
 #define ETH_TAP_MAC_ARG         "mac"
 #define ETH_TAP_MAC_FIXED       "fixed"
 
-#define FLOWER_KERNEL_VERSION KERNEL_VERSION(4, 2, 0)
-#define FLOWER_VLAN_KERNEL_VERSION KERNEL_VERSION(4, 9, 0)
-
 static struct rte_vdev_driver pmd_tap_drv;
 
 static const char *valid_arguments[] = {
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mrvl: fix multiple probe' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (95 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/tap: remove unused kernel version definitions' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mrvl: fix HIF objects allocation' " Yuanhan Liu
                   ` (59 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Natalie Samsonov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 3766e74912f3ed439e7d2bec517ca9b3850c948c Mon Sep 17 00:00:00 2001
From: Natalie Samsonov <nsamsono@marvell.com>
Date: Thu, 11 Jan 2018 16:35:39 +0100
Subject: [PATCH] net/mrvl: fix multiple probe

[ upstream commit 10bce9cf9b47f85d3c5c447ca0aa5ad8c28dfce0 ]

MUSDK library initialization and cleanup should be done once.
This commit fixes that by doing necessary initialization once the first
port is probed and cleanup once the last port is removed.

Fixes: 0ddc9b815b11 ("net/mrvl: add net PMD skeleton")

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
---
 drivers/net/mrvl/mrvl_ethdev.c | 78 +++++++++++++++++++++++++++++-------------
 drivers/net/mrvl/mrvl_ethdev.h |  3 --
 drivers/net/mrvl/mrvl_qos.c    |  2 +-
 3 files changed, 56 insertions(+), 27 deletions(-)

diff --git a/drivers/net/mrvl/mrvl_ethdev.c b/drivers/net/mrvl/mrvl_ethdev.c
index 2936165..efaf124 100644
--- a/drivers/net/mrvl/mrvl_ethdev.c
+++ b/drivers/net/mrvl/mrvl_ethdev.c
@@ -115,6 +115,11 @@ struct pp2_bpool *mrvl_port_to_bpool_lookup[RTE_MAX_ETHPORTS];
 int mrvl_port_bpool_size[PP2_NUM_PKT_PROC][PP2_BPOOL_NUM_POOLS][RTE_MAX_LCORE];
 uint64_t cookie_addr_high = MRVL_COOKIE_ADDR_INVALID;
 
+struct mrvl_ifnames {
+	const char *names[PP2_NUM_ETH_PPIO * PP2_NUM_PKT_PROC];
+	int idx;
+};
+
 /*
  * To use buffer harvesting based on loopback port shadow queue structure
  * was introduced for buffers information bookkeeping.
@@ -160,10 +165,9 @@ struct mrvl_txq {
  */
 struct mrvl_shadow_txq shadow_txqs[RTE_MAX_ETHPORTS][RTE_MAX_LCORE];
 
-/** Number of ports configured. */
-int mrvl_ports_nb;
 static int mrvl_lcore_first;
 static int mrvl_lcore_last;
+static int mrvl_dev_num;
 
 static inline int
 mrvl_get_bpool_size(int pp2_id, int pool_id)
@@ -583,8 +587,10 @@ mrvl_dev_stop(struct rte_eth_dev *dev)
 	mrvl_dev_set_link_down(dev);
 	mrvl_flush_rx_queues(dev);
 	mrvl_flush_tx_shadow_queues(dev);
-	if (priv->qos_tbl)
+	if (priv->qos_tbl) {
 		pp2_cls_qos_tbl_deinit(priv->qos_tbl);
+		priv->qos_tbl = NULL;
+	}
 	pp2_ppio_deinit(priv->ppio);
 	priv->ppio = NULL;
 }
@@ -2034,6 +2040,7 @@ mrvl_eth_dev_create(struct rte_vdev_device *vdev, const char *name)
 
 	eth_dev->rx_pkt_burst = mrvl_rx_pkt_burst;
 	eth_dev->tx_pkt_burst = mrvl_tx_pkt_burst;
+	eth_dev->data->kdrv = RTE_KDRV_NONE;
 	eth_dev->data->dev_private = priv;
 	eth_dev->device = &vdev->device;
 	eth_dev->dev_ops = &mrvl_ops;
@@ -2067,6 +2074,7 @@ mrvl_eth_dev_destroy(const char *name)
 
 	priv = eth_dev->data->dev_private;
 	pp2_bpool_deinit(priv->bpool);
+	used_bpools[priv->pp_id] &= ~(1 << priv->bpool_bit);
 	rte_free(priv);
 	rte_free(eth_dev->data->mac_addrs);
 	rte_eth_dev_release_port(eth_dev);
@@ -2090,9 +2098,9 @@ static int
 mrvl_get_ifnames(const char *key __rte_unused, const char *value,
 		 void *extra_args)
 {
-	const char **ifnames = extra_args;
+	struct mrvl_ifnames *ifnames = extra_args;
 
-	ifnames[mrvl_ports_nb++] = value;
+	ifnames->names[ifnames->idx++] = value;
 
 	return 0;
 }
@@ -2141,6 +2149,8 @@ mrvl_deinit_hifs(void)
 		if (hifs[i])
 			pp2_hif_deinit(hifs[i]);
 	}
+	used_hifs = MRVL_MUSDK_HIFS_RESERVED;
+	memset(hifs, 0, sizeof(hifs));
 }
 
 static void mrvl_set_first_last_cores(int core_id)
@@ -2165,7 +2175,7 @@ static int
 rte_pmd_mrvl_probe(struct rte_vdev_device *vdev)
 {
 	struct rte_kvargs *kvlist;
-	const char *ifnames[PP2_NUM_ETH_PPIO * PP2_NUM_PKT_PROC];
+	struct mrvl_ifnames ifnames;
 	int ret = -EINVAL;
 	uint32_t i, ifnum, cfgnum, core_id;
 	const char *params;
@@ -2179,21 +2189,34 @@ rte_pmd_mrvl_probe(struct rte_vdev_device *vdev)
 		return -EINVAL;
 
 	ifnum = rte_kvargs_count(kvlist, MRVL_IFACE_NAME_ARG);
-	if (ifnum > RTE_DIM(ifnames))
+	if (ifnum > RTE_DIM(ifnames.names))
 		goto out_free_kvlist;
 
+	ifnames.idx = 0;
 	rte_kvargs_process(kvlist, MRVL_IFACE_NAME_ARG,
 			   mrvl_get_ifnames, &ifnames);
 
-	cfgnum = rte_kvargs_count(kvlist, MRVL_CFG_ARG);
-	if (cfgnum > 1) {
-		RTE_LOG(ERR, PMD, "Cannot handle more than one config file!\n");
-		goto out_free_kvlist;
-	} else if (cfgnum == 1) {
-		rte_kvargs_process(kvlist, MRVL_CFG_ARG,
-				   mrvl_get_qoscfg, &mrvl_qos_cfg);
+
+	/*
+	 * The below system initialization should be done only once,
+	 * on the first provided configuration file
+	 */
+	if (!mrvl_qos_cfg) {
+		cfgnum = rte_kvargs_count(kvlist, MRVL_CFG_ARG);
+		RTE_LOG(INFO, PMD, "Parsing config file!\n");
+		if (cfgnum > 1) {
+			RTE_LOG(ERR, PMD, "Cannot handle more than one config file!\n");
+			goto out_free_kvlist;
+		} else if (cfgnum == 1) {
+			rte_kvargs_process(kvlist, MRVL_CFG_ARG,
+					   mrvl_get_qoscfg, &mrvl_qos_cfg);
+		}
 	}
 
+	if (mrvl_dev_num)
+		goto init_devices;
+
+	RTE_LOG(INFO, PMD, "Perform MUSDK initializations\n");
 	/*
 	 * ret == -EEXIST is correct, it means DMA
 	 * has been already initialized (by another PMD).
@@ -2217,12 +2240,14 @@ rte_pmd_mrvl_probe(struct rte_vdev_device *vdev)
 	if (ret)
 		goto out_deinit_hifs;
 
+init_devices:
 	for (i = 0; i < ifnum; i++) {
-		RTE_LOG(INFO, PMD, "Creating %s\n", ifnames[i]);
-		ret = mrvl_eth_dev_create(vdev, ifnames[i]);
+		RTE_LOG(INFO, PMD, "Creating %s\n", ifnames.names[i]);
+		ret = mrvl_eth_dev_create(vdev, ifnames.names[i]);
 		if (ret)
 			goto out_cleanup;
 	}
+	mrvl_dev_num += ifnum;
 
 	rte_kvargs_free(kvlist);
 
@@ -2238,12 +2263,15 @@ rte_pmd_mrvl_probe(struct rte_vdev_device *vdev)
 	return 0;
 out_cleanup:
 	for (; i > 0; i--)
-		mrvl_eth_dev_destroy(ifnames[i]);
+		mrvl_eth_dev_destroy(ifnames.names[i]);
 out_deinit_hifs:
-	mrvl_deinit_hifs();
-	mrvl_deinit_pp2();
+	if (mrvl_dev_num == 0) {
+		mrvl_deinit_hifs();
+		mrvl_deinit_pp2();
+	}
 out_deinit_dma:
-	mv_sys_dma_mem_destroy();
+	if (mrvl_dev_num == 0)
+		mv_sys_dma_mem_destroy();
 out_free_kvlist:
 	rte_kvargs_free(kvlist);
 
@@ -2276,11 +2304,15 @@ rte_pmd_mrvl_remove(struct rte_vdev_device *vdev)
 
 		rte_eth_dev_get_name_by_port(i, ifname);
 		mrvl_eth_dev_destroy(ifname);
+		mrvl_dev_num--;
 	}
 
-	mrvl_deinit_hifs();
-	mrvl_deinit_pp2();
-	mv_sys_dma_mem_destroy();
+	if (mrvl_dev_num == 0) {
+		RTE_LOG(INFO, PMD, "Perform MUSDK deinit\n");
+		mrvl_deinit_hifs();
+		mrvl_deinit_pp2();
+		mv_sys_dma_mem_destroy();
+	}
 
 	return 0;
 }
diff --git a/drivers/net/mrvl/mrvl_ethdev.h b/drivers/net/mrvl/mrvl_ethdev.h
index 2a4ab5a..7764da1 100644
--- a/drivers/net/mrvl/mrvl_ethdev.h
+++ b/drivers/net/mrvl/mrvl_ethdev.h
@@ -110,7 +110,4 @@ struct mrvl_priv {
 	uint16_t nb_rx_queues;
 };
 
-/** Number of ports configured. */
-extern int mrvl_ports_nb;
-
 #endif /* _MRVL_ETHDEV_H_ */
diff --git a/drivers/net/mrvl/mrvl_qos.c b/drivers/net/mrvl/mrvl_qos.c
index 7c9943a..fbb3681 100644
--- a/drivers/net/mrvl/mrvl_qos.c
+++ b/drivers/net/mrvl/mrvl_qos.c
@@ -369,7 +369,7 @@ mrvl_get_qoscfg(const char *key __rte_unused, const char *path,
 	}
 
 	/* Use the number of ports given as vdev parameters. */
-	for (n = 0; n < mrvl_ports_nb; ++n) {
+	for (n = 0; n < (PP2_NUM_ETH_PPIO * PP2_NUM_PKT_PROC); ++n) {
 		snprintf(sec_name, sizeof(sec_name), "%s %d %s",
 			MRVL_TOK_PORT, n, MRVL_TOK_DEFAULT);
 
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mrvl: fix HIF objects allocation' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (96 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mrvl: fix multiple probe' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mrvl: fix oversize bpool handling' " Yuanhan Liu
                   ` (58 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Natalie Samsonov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 6a273d22b5b14bc2fb59a9a4bb93ee3b4989612b Mon Sep 17 00:00:00 2001
From: Natalie Samsonov <nsamsono@marvell.com>
Date: Thu, 11 Jan 2018 16:35:40 +0100
Subject: [PATCH] net/mrvl: fix HIF objects allocation

[ upstream commit 3588aaa68eab05f57b5af36e95df446bfcfee7ce ]

1. Add checking for non-EAL threads.

2. Create hif objects on first use since sometimes on probe not all
   lcores are initialized and can be added later.
   In this case the hif objects for later cores were not created and
   this caused system crash.

Fixes: 0ddc9b815b11 ("net/mrvl: add net PMD skeleton")

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
---
 drivers/net/mrvl/mrvl_ethdev.c | 181 ++++++++++++++++++++++++-----------------
 1 file changed, 107 insertions(+), 74 deletions(-)

diff --git a/drivers/net/mrvl/mrvl_ethdev.c b/drivers/net/mrvl/mrvl_ethdev.c
index efaf124..7fef37c 100644
--- a/drivers/net/mrvl/mrvl_ethdev.c
+++ b/drivers/net/mrvl/mrvl_ethdev.c
@@ -194,6 +194,59 @@ mrvl_reserve_bit(int *bitmap, int max)
 	return n;
 }
 
+static int
+mrvl_init_hif(int core_id)
+{
+	struct pp2_hif_params params;
+	char match[MRVL_MATCH_LEN];
+	int ret;
+
+	ret = mrvl_reserve_bit(&used_hifs, MRVL_MUSDK_HIFS_MAX);
+	if (ret < 0) {
+		RTE_LOG(ERR, PMD, "Failed to allocate hif %d\n", core_id);
+		return ret;
+	}
+
+	snprintf(match, sizeof(match), "hif-%d", ret);
+	memset(&params, 0, sizeof(params));
+	params.match = match;
+	params.out_size = MRVL_PP2_AGGR_TXQD_MAX;
+	ret = pp2_hif_init(&params, &hifs[core_id]);
+	if (ret) {
+		RTE_LOG(ERR, PMD, "Failed to initialize hif %d\n", core_id);
+		return ret;
+	}
+
+	return 0;
+}
+
+static inline struct pp2_hif*
+mrvl_get_hif(struct mrvl_priv *priv, int core_id)
+{
+	int ret;
+
+	if (likely(hifs[core_id] != NULL))
+		return hifs[core_id];
+
+	rte_spinlock_lock(&priv->lock);
+
+	ret = mrvl_init_hif(core_id);
+	if (ret < 0) {
+		RTE_LOG(ERR, PMD, "Failed to allocate hif %d\n", core_id);
+		goto out;
+	}
+
+	if (core_id < mrvl_lcore_first)
+		mrvl_lcore_first = core_id;
+
+	if (core_id > mrvl_lcore_last)
+		mrvl_lcore_last = core_id;
+out:
+	rte_spinlock_unlock(&priv->lock);
+
+	return hifs[core_id];
+}
+
 /**
  * Configure rss based on dpdk rss configuration.
  *
@@ -550,8 +603,15 @@ static void
 mrvl_flush_bpool(struct rte_eth_dev *dev)
 {
 	struct mrvl_priv *priv = dev->data->dev_private;
+	struct pp2_hif *hif;
 	uint32_t num;
 	int ret;
+	unsigned int core_id = rte_lcore_id();
+
+	if (core_id == LCORE_ID_ANY)
+		core_id = 0;
+
+	hif = mrvl_get_hif(priv, core_id);
 
 	ret = pp2_bpool_get_num_buffs(priv->bpool, &num);
 	if (ret) {
@@ -563,8 +623,7 @@ mrvl_flush_bpool(struct rte_eth_dev *dev)
 		struct pp2_buff_inf inf;
 		uint64_t addr;
 
-		ret = pp2_bpool_get_buff(hifs[rte_lcore_id()], priv->bpool,
-					 &inf);
+		ret = pp2_bpool_get_buff(hif, priv->bpool, &inf);
 		if (ret)
 			break;
 
@@ -1137,9 +1196,19 @@ mrvl_fill_bpool(struct mrvl_rxq *rxq, int num)
 	struct buff_release_entry entries[MRVL_PP2_TXD_MAX];
 	struct rte_mbuf *mbufs[MRVL_PP2_TXD_MAX];
 	int i, ret;
-	unsigned int core_id = rte_lcore_id();
-	struct pp2_hif *hif = hifs[core_id];
-	struct pp2_bpool *bpool = rxq->priv->bpool;
+	unsigned int core_id;
+	struct pp2_hif *hif;
+	struct pp2_bpool *bpool;
+
+	core_id = rte_lcore_id();
+	if (core_id == LCORE_ID_ANY)
+		core_id = 0;
+
+	hif = mrvl_get_hif(rxq->priv, core_id);
+	if (!hif)
+		return -1;
+
+	bpool = rxq->priv->bpool;
 
 	ret = rte_pktmbuf_alloc_bulk(rxq->mp, mbufs, num);
 	if (ret)
@@ -1275,8 +1344,15 @@ mrvl_rx_queue_release(void *rxq)
 	struct mrvl_rxq *q = rxq;
 	struct pp2_ppio_tc_params *tc_params;
 	int i, num, tc, inq;
+	struct pp2_hif *hif;
+	unsigned int core_id = rte_lcore_id();
 
-	if (!q)
+	if (core_id == LCORE_ID_ANY)
+		core_id = 0;
+
+	hif = mrvl_get_hif(q->priv, core_id);
+
+	if (!q || !hif)
 		return;
 
 	tc = q->priv->rxq_map[q->queue_id].tc;
@@ -1287,7 +1363,7 @@ mrvl_rx_queue_release(void *rxq)
 		struct pp2_buff_inf inf;
 		uint64_t addr;
 
-		pp2_bpool_get_buff(hifs[rte_lcore_id()], q->priv->bpool, &inf);
+		pp2_bpool_get_buff(hif, q->priv->bpool, &inf);
 		addr = cookie_addr_high | inf.cookie;
 		rte_pktmbuf_free((struct rte_mbuf *)addr);
 	}
@@ -1563,9 +1639,12 @@ mrvl_rx_pkt_burst(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 	struct pp2_bpool *bpool;
 	int i, ret, rx_done = 0;
 	int num;
+	struct pp2_hif *hif;
 	unsigned int core_id = rte_lcore_id();
 
-	if (unlikely(!q->priv->ppio))
+	hif = mrvl_get_hif(q->priv, core_id);
+
+	if (unlikely(!q->priv->ppio || !hif))
 		return 0;
 
 	bpool = q->priv->bpool;
@@ -1608,7 +1687,7 @@ mrvl_rx_pkt_burst(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 				.cookie = (pp2_cookie_t)(uint64_t)mbuf,
 			};
 
-			pp2_bpool_put_buff(hifs[core_id], bpool, &binf);
+			pp2_bpool_put_buff(hif, bpool, &binf);
 			mrvl_port_bpool_size
 				[bpool->pp2_id][bpool->id][core_id]++;
 			q->drop_mac++;
@@ -1654,7 +1733,7 @@ mrvl_rx_pkt_burst(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 				q->priv->bpool_init_size);
 
 			for (i = 0; i < pkt_to_remove; i++) {
-				pp2_bpool_get_buff(hifs[core_id], bpool, &buff);
+				pp2_bpool_get_buff(hif, bpool, &buff);
 				mbuf = (struct rte_mbuf *)
 					(cookie_addr_high | buff.cookie);
 				rte_pktmbuf_free(mbuf);
@@ -1746,11 +1825,12 @@ mrvl_prepare_proto_info(uint64_t ol_flags, uint32_t packet_type,
  */
 static inline void
 mrvl_free_sent_buffers(struct pp2_ppio *ppio, struct pp2_hif *hif,
-		       struct mrvl_shadow_txq *sq, int qid, int force)
+		       unsigned int core_id, struct mrvl_shadow_txq *sq,
+		       int qid, int force)
 {
 	struct buff_release_entry *entry;
 	uint16_t nb_done = 0, num = 0, skip_bufs = 0;
-	int i, core_id = rte_lcore_id();
+	int i;
 
 	pp2_ppio_get_num_outq_done(ppio, hif, qid, &nb_done);
 
@@ -1824,17 +1904,21 @@ mrvl_tx_pkt_burst(void *txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 {
 	struct mrvl_txq *q = txq;
 	struct mrvl_shadow_txq *sq = &shadow_txqs[q->port_id][rte_lcore_id()];
-	struct pp2_hif *hif = hifs[rte_lcore_id()];
+	struct pp2_hif *hif;
 	struct pp2_ppio_desc descs[nb_pkts];
+	unsigned int core_id = rte_lcore_id();
 	int i, ret, bytes_sent = 0;
 	uint16_t num, sq_free_size;
 	uint64_t addr;
 
-	if (unlikely(!q->priv->ppio))
+	hif = mrvl_get_hif(q->priv, core_id);
+
+	if (unlikely(!q->priv->ppio || !hif))
 		return 0;
 
 	if (sq->size)
-		mrvl_free_sent_buffers(q->priv->ppio, hif, sq, q->queue_id, 0);
+		mrvl_free_sent_buffers(q->priv->ppio, hif, core_id,
+				       sq, q->queue_id, 0);
 
 	sq_free_size = MRVL_PP2_TX_SHADOWQ_SIZE - sq->size - 1;
 	if (unlikely(nb_pkts > sq_free_size)) {
@@ -2106,38 +2190,6 @@ mrvl_get_ifnames(const char *key __rte_unused, const char *value,
 }
 
 /**
- * Initialize per-lcore MUSDK hardware interfaces (hifs).
- *
- * @return
- *   0 on success, negative error value otherwise.
- */
-static int
-mrvl_init_hifs(void)
-{
-	struct pp2_hif_params params;
-	char match[MRVL_MATCH_LEN];
-	int i, ret;
-
-	RTE_LCORE_FOREACH(i) {
-		ret = mrvl_reserve_bit(&used_hifs, MRVL_MUSDK_HIFS_MAX);
-		if (ret < 0)
-			return ret;
-
-		snprintf(match, sizeof(match), "hif-%d", ret);
-		memset(&params, 0, sizeof(params));
-		params.match = match;
-		params.out_size = MRVL_PP2_AGGR_TXQD_MAX;
-		ret = pp2_hif_init(&params, &hifs[i]);
-		if (ret) {
-			RTE_LOG(ERR, PMD, "Failed to initialize hif %d\n", i);
-			return ret;
-		}
-	}
-
-	return 0;
-}
-
-/**
  * Deinitialize per-lcore MUSDK hardware interfaces (hifs).
  */
 static void
@@ -2145,7 +2197,7 @@ mrvl_deinit_hifs(void)
 {
 	int i;
 
-	RTE_LCORE_FOREACH(i) {
+	for (i = mrvl_lcore_first; i <= mrvl_lcore_last; i++) {
 		if (hifs[i])
 			pp2_hif_deinit(hifs[i]);
 	}
@@ -2153,15 +2205,6 @@ mrvl_deinit_hifs(void)
 	memset(hifs, 0, sizeof(hifs));
 }
 
-static void mrvl_set_first_last_cores(int core_id)
-{
-	if (core_id < mrvl_lcore_first)
-		mrvl_lcore_first = core_id;
-
-	if (core_id > mrvl_lcore_last)
-		mrvl_lcore_last = core_id;
-}
-
 /**
  * DPDK callback to register the virtual device.
  *
@@ -2177,7 +2220,7 @@ rte_pmd_mrvl_probe(struct rte_vdev_device *vdev)
 	struct rte_kvargs *kvlist;
 	struct mrvl_ifnames ifnames;
 	int ret = -EINVAL;
-	uint32_t i, ifnum, cfgnum, core_id;
+	uint32_t i, ifnum, cfgnum;
 	const char *params;
 
 	params = rte_vdev_device_args(vdev);
@@ -2236,9 +2279,10 @@ rte_pmd_mrvl_probe(struct rte_vdev_device *vdev)
 		goto out_deinit_dma;
 	}
 
-	ret = mrvl_init_hifs();
-	if (ret)
-		goto out_deinit_hifs;
+	memset(mrvl_port_bpool_size, 0, sizeof(mrvl_port_bpool_size));
+
+	mrvl_lcore_first = RTE_MAX_LCORE;
+	mrvl_lcore_last = 0;
 
 init_devices:
 	for (i = 0; i < ifnum; i++) {
@@ -2251,24 +2295,13 @@ init_devices:
 
 	rte_kvargs_free(kvlist);
 
-	memset(mrvl_port_bpool_size, 0, sizeof(mrvl_port_bpool_size));
-
-	mrvl_lcore_first = RTE_MAX_LCORE;
-	mrvl_lcore_last = 0;
-
-	RTE_LCORE_FOREACH(core_id) {
-		mrvl_set_first_last_cores(core_id);
-	}
-
 	return 0;
 out_cleanup:
 	for (; i > 0; i--)
 		mrvl_eth_dev_destroy(ifnames.names[i]);
-out_deinit_hifs:
-	if (mrvl_dev_num == 0) {
-		mrvl_deinit_hifs();
+
+	if (mrvl_dev_num == 0)
 		mrvl_deinit_pp2();
-	}
 out_deinit_dma:
 	if (mrvl_dev_num == 0)
 		mv_sys_dma_mem_destroy();
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mrvl: fix oversize bpool handling' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (97 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mrvl: fix HIF objects allocation' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mrvl: fix shadow queue tail and size calculations' " Yuanhan Liu
                   ` (57 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Natalie Samsonov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 8acd505556d91b7783ae80b6332812afe478729f Mon Sep 17 00:00:00 2001
From: Natalie Samsonov <nsamsono@marvell.com>
Date: Thu, 11 Jan 2018 16:35:41 +0100
Subject: [PATCH] net/mrvl: fix oversize bpool handling

[ upstream commit a9bd1322b8cfe277e3ba2b81423e99ae14cd5d57 ]

Don't return mbuf to dpdk pool if failed to get buffer from the bpool.
Fix maximum bpool size calculation to prevent unnecessary bpool
oversize cases when working with small rx queues.

Fixes: 0ddc9b815b11 ("net/mrvl: add net PMD skeleton")

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
---
 drivers/net/mrvl/mrvl_ethdev.c | 41 ++++++++++++++++++++++++++++++-----------
 1 file changed, 30 insertions(+), 11 deletions(-)

diff --git a/drivers/net/mrvl/mrvl_ethdev.c b/drivers/net/mrvl/mrvl_ethdev.c
index 7fef37c..d1ecbf8 100644
--- a/drivers/net/mrvl/mrvl_ethdev.c
+++ b/drivers/net/mrvl/mrvl_ethdev.c
@@ -169,6 +169,8 @@ static int mrvl_lcore_first;
 static int mrvl_lcore_last;
 static int mrvl_dev_num;
 
+static int mrvl_fill_bpool(struct mrvl_rxq *rxq, int num);
+
 static inline int
 mrvl_get_bpool_size(int pp2_id, int pool_id)
 {
@@ -465,20 +467,13 @@ mrvl_dev_start(struct rte_eth_dev *dev)
 {
 	struct mrvl_priv *priv = dev->data->dev_private;
 	char match[MRVL_MATCH_LEN];
-	int ret;
+	int ret = 0, def_init_size;
 
 	snprintf(match, sizeof(match), "ppio-%d:%d",
 		 priv->pp_id, priv->ppio_id);
 	priv->ppio_params.match = match;
 
 	/*
-	 * Calculate the maximum bpool size for refill feature to 1.5 of the
-	 * configured size. In case the bpool size will exceed this value,
-	 * superfluous buffers will be removed
-	 */
-	priv->bpool_max_size = priv->bpool_init_size +
-			      (priv->bpool_init_size >> 1);
-	/*
 	 * Calculate the minimum bpool size for refill feature as follows:
 	 * 2 default burst sizes multiply by number of rx queues.
 	 * If the bpool size will be below this value, new buffers will
@@ -486,6 +481,29 @@ mrvl_dev_start(struct rte_eth_dev *dev)
 	 */
 	priv->bpool_min_size = priv->nb_rx_queues * MRVL_BURST_SIZE * 2;
 
+	/* In case initial bpool size configured in queues setup is
+	 * smaller than minimum size add more buffers
+	 */
+	def_init_size = priv->bpool_min_size + MRVL_BURST_SIZE * 2;
+	if (priv->bpool_init_size < def_init_size) {
+		int buffs_to_add = def_init_size - priv->bpool_init_size;
+
+		priv->bpool_init_size += buffs_to_add;
+		ret = mrvl_fill_bpool(dev->data->rx_queues[0], buffs_to_add);
+		if (ret)
+			RTE_LOG(ERR, PMD, "Failed to add buffers to bpool\n");
+	}
+
+	/*
+	 * Calculate the maximum bpool size for refill feature as follows:
+	 * maximum number of descriptors in rx queue multiply by number
+	 * of rx queues plus minimum bpool size.
+	 * In case the bpool size will exceed this value, superfluous buffers
+	 * will be removed
+	 */
+	priv->bpool_max_size = (priv->nb_rx_queues * MRVL_PP2_RXD_MAX) +
+				priv->bpool_min_size;
+
 	ret = pp2_ppio_init(&priv->ppio_params, &priv->ppio);
 	if (ret)
 		return ret;
@@ -1733,14 +1751,15 @@ mrvl_rx_pkt_burst(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 				q->priv->bpool_init_size);
 
 			for (i = 0; i < pkt_to_remove; i++) {
-				pp2_bpool_get_buff(hif, bpool, &buff);
+				ret = pp2_bpool_get_buff(hif, bpool, &buff);
+				if (ret)
+					break;
 				mbuf = (struct rte_mbuf *)
 					(cookie_addr_high | buff.cookie);
 				rte_pktmbuf_free(mbuf);
 			}
 			mrvl_port_bpool_size
-				[bpool->pp2_id][bpool->id][core_id] -=
-								pkt_to_remove;
+				[bpool->pp2_id][bpool->id][core_id] -= i;
 		}
 		rte_spinlock_unlock(&q->priv->lock);
 	}
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mrvl: fix shadow queue tail and size calculations' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (98 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mrvl: fix oversize bpool handling' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mrvl: keep shadow Txqs inside PMD Txq' " Yuanhan Liu
                   ` (56 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Natalie Samsonov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From a8a65286a1f32c10045e4d1d46800d2934593c97 Mon Sep 17 00:00:00 2001
From: Natalie Samsonov <nsamsono@marvell.com>
Date: Thu, 11 Jan 2018 16:35:42 +0100
Subject: [PATCH] net/mrvl: fix shadow queue tail and size calculations

[ upstream commit b2e5d0868ee7445ebb26e47e10a0a52409428ebe ]

Reset skip_buf after use to avoid wrong tail and size calculations.

Fixes: afb4d0d0bf91 ("net/mrvl: add Rx/Tx support")

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
---
 drivers/net/mrvl/mrvl_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mrvl/mrvl_ethdev.c b/drivers/net/mrvl/mrvl_ethdev.c
index d1ecbf8..a85a565 100644
--- a/drivers/net/mrvl/mrvl_ethdev.c
+++ b/drivers/net/mrvl/mrvl_ethdev.c
@@ -1896,6 +1896,7 @@ skip:
 		sq->tail = (sq->tail + num) & MRVL_PP2_TX_SHADOWQ_MASK;
 		sq->size -= num;
 		num = 0;
+		skip_bufs = 0;
 	}
 
 	if (likely(num)) {
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mrvl: keep shadow Txqs inside PMD Txq' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (99 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mrvl: fix shadow queue tail and size calculations' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/ixgbe: fix max queue number for VF' " Yuanhan Liu
                   ` (55 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Natalie Samsonov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From e1a8067cb2d3162205a13b9b058c076e9b4c86c0 Mon Sep 17 00:00:00 2001
From: Natalie Samsonov <nsamsono@marvell.com>
Date: Thu, 11 Jan 2018 16:35:43 +0100
Subject: [PATCH] net/mrvl: keep shadow Txqs inside PMD Txq

[ upstream commit c49ef7ef7fa3b246922e2ac641cb871c5b10801e ]

Change shadow queues allocation from port/core to txq/core.
Use array of shadow queues (one per lcore) for each tx queue object to
avoid data corruption when few tx queues are handled by one lcore and
buffers that were not sent yet, can be released and used for receive.

Fixes: 0ddc9b815b11 ("net/mrvl: add net PMD skeleton")

Signed-off-by: Natalie Samsonov <nsamsono@marvell.com>
---
 drivers/net/mrvl/mrvl_ethdev.c | 47 ++++++++++++++++++++++++------------------
 1 file changed, 27 insertions(+), 20 deletions(-)

diff --git a/drivers/net/mrvl/mrvl_ethdev.c b/drivers/net/mrvl/mrvl_ethdev.c
index a85a565..9a35819 100644
--- a/drivers/net/mrvl/mrvl_ethdev.c
+++ b/drivers/net/mrvl/mrvl_ethdev.c
@@ -154,22 +154,17 @@ struct mrvl_txq {
 	int queue_id;
 	int port_id;
 	uint64_t bytes_sent;
+	struct mrvl_shadow_txq shadow_txqs[RTE_MAX_LCORE];
 };
 
-/*
- * Every tx queue should have dedicated shadow tx queue.
- *
- * Ports assigned by DPDK might not start at zero or be continuous so
- * as a workaround define shadow queues for each possible port so that
- * we eventually fit somewhere.
- */
-struct mrvl_shadow_txq shadow_txqs[RTE_MAX_ETHPORTS][RTE_MAX_LCORE];
-
 static int mrvl_lcore_first;
 static int mrvl_lcore_last;
 static int mrvl_dev_num;
 
 static int mrvl_fill_bpool(struct mrvl_rxq *rxq, int num);
+static inline void mrvl_free_sent_buffers(struct pp2_ppio *ppio,
+			struct pp2_hif *hif, unsigned int core_id,
+			struct mrvl_shadow_txq *sq, int qid, int force);
 
 static inline int
 mrvl_get_bpool_size(int pp2_id, int pool_id)
@@ -593,21 +588,32 @@ mrvl_flush_rx_queues(struct rte_eth_dev *dev)
 static void
 mrvl_flush_tx_shadow_queues(struct rte_eth_dev *dev)
 {
-	int i;
+	int i, j;
+	struct mrvl_txq *txq;
 
 	RTE_LOG(INFO, PMD, "Flushing tx shadow queues\n");
-	for (i = 0; i < RTE_MAX_LCORE; i++) {
-		struct mrvl_shadow_txq *sq =
-			&shadow_txqs[dev->data->port_id][i];
+	for (i = 0; i < dev->data->nb_tx_queues; i++) {
+		txq = (struct mrvl_txq *)dev->data->tx_queues[i];
+
+		for (j = 0; j < RTE_MAX_LCORE; j++) {
+			struct mrvl_shadow_txq *sq;
+
+			if (!hifs[j])
+				continue;
 
-		while (sq->tail != sq->head) {
-			uint64_t addr = cookie_addr_high |
+			sq = &txq->shadow_txqs[j];
+			mrvl_free_sent_buffers(txq->priv->ppio,
+				hifs[j], j, sq, txq->queue_id, 1);
+			while (sq->tail != sq->head) {
+				uint64_t addr = cookie_addr_high |
 					sq->ent[sq->tail].buff.cookie;
-			rte_pktmbuf_free((struct rte_mbuf *)addr);
-			sq->tail = (sq->tail + 1) & MRVL_PP2_TX_SHADOWQ_MASK;
+				rte_pktmbuf_free(
+					(struct rte_mbuf *)addr);
+				sq->tail = (sq->tail + 1) &
+					    MRVL_PP2_TX_SHADOWQ_MASK;
+			}
+			memset(sq, 0, sizeof(*sq));
 		}
-
-		memset(sq, 0, sizeof(*sq));
 	}
 }
 
@@ -1923,7 +1929,7 @@ static uint16_t
 mrvl_tx_pkt_burst(void *txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 {
 	struct mrvl_txq *q = txq;
-	struct mrvl_shadow_txq *sq = &shadow_txqs[q->port_id][rte_lcore_id()];
+	struct mrvl_shadow_txq *sq;
 	struct pp2_hif *hif;
 	struct pp2_ppio_desc descs[nb_pkts];
 	unsigned int core_id = rte_lcore_id();
@@ -1932,6 +1938,7 @@ mrvl_tx_pkt_burst(void *txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 	uint64_t addr;
 
 	hif = mrvl_get_hif(q->priv, core_id);
+	sq = &q->shadow_txqs[core_id];
 
 	if (unlikely(!q->priv->ppio || !hif))
 		return 0;
-- 
2.7.4

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

* [dpdk-stable] patch 'net/ixgbe: fix max queue number for VF' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (100 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mrvl: keep shadow Txqs inside PMD Txq' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix setting MAC address of " Yuanhan Liu
                   ` (54 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Yanglong Wu; +Cc: Wei Dai, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 3779d4c6dd74012ae5cea390256a2b917ef48f7b 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 b720485..9c09610 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2240,8 +2240,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.7.4

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

* [dpdk-stable] patch 'net/i40e: fix setting MAC address of VF' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (101 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/ixgbe: fix max queue number for VF' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix port segmentation fault when restart' " Yuanhan Liu
                   ` (53 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 7a2ba416b4c49b08e4d640d7f8510da1d74a6686 Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Tue, 9 Jan 2018 18:37:44 +0800
Subject: [PATCH] net/i40e: fix setting MAC address of VF

[ upstream commit 8d1e8e70ff4bff2a0135aa970552f1dcc4628e43 ]

New MAC address is copied to dev->data->mac_addrs[0] before calling
setting MAC address ops. So it will fail when deleting
dev->data->mac_addrs[0]. Deleting hw->mac.addr will fix the issue.

Fixes: 943c2d899a0c ("net/i40e: set VF MAC from VF")

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

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index e2cdc7f..922306f 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2681,6 +2681,7 @@ i40evf_set_default_mac_addr(struct rte_eth_dev *dev,
 			    struct ether_addr *mac_addr)
 {
 	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
+	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
 	if (!is_valid_assigned_ether_addr(mac_addr)) {
 		PMD_DRV_LOG(ERR, "Tried to set invalid MAC address.");
@@ -2690,7 +2691,9 @@ i40evf_set_default_mac_addr(struct rte_eth_dev *dev,
 	if (vf->flags & I40E_FLAG_VF_MAC_BY_PF)
 		return;
 
-	i40evf_del_mac_addr_by_addr(dev, dev->data->mac_addrs);
+	i40evf_del_mac_addr_by_addr(dev, (struct ether_addr *)hw->mac.addr);
 
 	i40evf_add_mac_addr(dev, mac_addr, 0, 0);
+
+	ether_addr_copy(mac_addr, (struct ether_addr *)hw->mac.addr);
 }
-- 
2.7.4

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

* [dpdk-stable] patch 'net/i40e: fix port segmentation fault when restart' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (102 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix setting MAC address of " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix VF reset stats crash' " Yuanhan Liu
                   ` (52 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 79ac724895e5dd92747f3cda154979f909e16c61 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Fri, 12 Jan 2018 14:59:19 +0800
Subject: [PATCH] net/i40e: fix port segmentation fault when restart

[ upstream commit 37b68eacfc9901f9c30f2127c68ef806e2bd2a61 ]

This patch will go into the process of clear all queue region
related configuration when dev stop even if there is no queue region
command before, so this is a bug, it may cause error. So add code
to check if there is queue configuration exist when flush queue
region config and remove this process when device stop. Queue region
clear only do when device initialization or PMD get flush command.

Fixes: 7cbecc2f7424 ("net/i40e: support queue region set and flush")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c  |  3 ---
 drivers/net/i40e/rte_pmd_i40e.c | 27 ++++++++++++++-------------
 2 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 5f1faf1..bd83e7b 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2154,9 +2154,6 @@ i40e_dev_stop(struct rte_eth_dev *dev)
 	/* reset hierarchy commit */
 	pf->tm_conf.committed = false;
 
-	/* Remove all the queue region configuration */
-	i40e_flush_queue_region_all_conf(dev, hw, pf, 0);
-
 	hw->adapter_stopped = 1;
 }
 
diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index aeb92af..c2e2466 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -2845,22 +2845,23 @@ i40e_flush_queue_region_all_conf(struct rte_eth_dev *dev,
 		return 0;
 	}
 
-	info->queue_region_number = 1;
-	info->region[0].queue_num = main_vsi->nb_used_qps;
-	info->region[0].queue_start_index = 0;
+	if (info->queue_region_number) {
+		info->queue_region_number = 1;
+		info->region[0].queue_num = main_vsi->nb_used_qps;
+		info->region[0].queue_start_index = 0;
 
-	ret = i40e_vsi_update_queue_region_mapping(hw, pf);
-	if (ret != I40E_SUCCESS)
-		PMD_DRV_LOG(INFO, "Failed to flush queue region mapping.");
-
-	ret = i40e_dcb_init_configure(dev, TRUE);
-	if (ret != I40E_SUCCESS) {
-		PMD_DRV_LOG(INFO, "Failed to flush dcb.");
-		pf->flags &= ~I40E_FLAG_DCB;
-	}
+		ret = i40e_vsi_update_queue_region_mapping(hw, pf);
+		if (ret != I40E_SUCCESS)
+			PMD_DRV_LOG(INFO, "Failed to flush queue region mapping.");
 
-	i40e_init_queue_region_conf(dev);
+		ret = i40e_dcb_init_configure(dev, TRUE);
+		if (ret != I40E_SUCCESS) {
+			PMD_DRV_LOG(INFO, "Failed to flush dcb.");
+			pf->flags &= ~I40E_FLAG_DCB;
+		}
 
+		i40e_init_queue_region_conf(dev);
+	}
 	return 0;
 }
 
-- 
2.7.4

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

* [dpdk-stable] patch 'net/i40e: fix VF reset stats crash' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (103 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix port segmentation fault when restart' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix deadlock of link status alarm' " Yuanhan Liu
                   ` (51 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: David Harton; +Cc: Harry van Haaren, Wei Zhao, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 64e3e5117e4e4465e0fca7bba214a660fd66e8d7 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 922306f..6160e2f 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -945,14 +945,16 @@ i40evf_update_stats(struct i40e_vsi *vsi,
 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_query_stats(dev, &pstats);
+	ret = i40evf_query_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.7.4

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

* [dpdk-stable] patch 'net/mlx5: fix deadlock of link status alarm' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (104 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix VF reset stats crash' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix missing attribute size for drop action' " Yuanhan Liu
                   ` (50 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: Nelio Laranjeiro, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 1a408b8a82bdddaa33c69a7c890b9b1cfea6d5f2 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 e6a69b8..1a4f444 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -165,6 +165,22 @@ priv_lock(struct priv *priv)
 }
 
 /**
+ * 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.
  *
  * @param priv
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index b518083..ce0d769 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -1224,8 +1224,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_link_status_update(priv);
 	priv_unlock(priv);
@@ -1295,9 +1299,10 @@ priv_dev_interrupt_handler_uninstall(struct priv *priv, struct rte_eth_dev *dev)
 	if (priv->primary_socket)
 		rte_intr_callback_unregister(&priv->intr_handle_socket,
 					     mlx5_dev_handler_socket, 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;
 	priv->intr_handle_socket.fd = 0;
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mlx5: fix missing attribute size for drop action' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (105 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix deadlock of link status alarm' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix calculation of flow ID flag' " Yuanhan Liu
                   ` (49 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: Nelio Laranjeiro, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 35a4f7f757a3c80e82b756e36e774c55ba8b5fa6 Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Wed, 10 Jan 2018 09:50:38 -0800
Subject: [PATCH] net/mlx5: fix missing attribute size for drop action

[ upstream commit 64a5a065cfb2b468ce47b09ffe9a62859656bc26 ]

Adding the size of ibv_flow_spec_action_drop is missing. This can cause
overflow when converting rte_flow to ibv_flow and thus corrupt memory.

Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx5/mlx5_flow.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index c16b571..00f4bec 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -885,6 +885,10 @@ priv_flow_convert_items_validate(struct priv *priv,
 				parser->queue[n].offset += cur_item->dst_sz;
 		}
 	}
+	if (parser->drop) {
+		parser->queue[HASH_RXQ_ETH].offset +=
+			sizeof(struct ibv_flow_spec_action_drop);
+	}
 	if (parser->mark) {
 		for (i = 0; i != hash_rxq_init_n; ++i)
 			parser->queue[i].offset +=
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mlx5: fix calculation of flow ID flag' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (106 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix missing attribute size for drop action' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'vhost: fix error code check when creating thread' " Yuanhan Liu
                   ` (48 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: Xueming Li, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 24d622b663c60c178c6559204cbf89e082d41399 Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Wed, 10 Jan 2018 23:57:53 -0800
Subject: [PATCH] net/mlx5: fix calculation of flow ID flag

[ upstream commit 6a59d647196271832ad15ed0c33cab060aa50c4a ]

PKT_RX_FDIR_ID should be set only if flow_tag is neither non-zero nor
MLX5_FLOW_MARK_DEFAULT.

Fixes: 6cb559d67b83 ("net/mlx5: add vectorized Rx/Tx burst for x86")
Fixes: 570acdb1da8a ("net/mlx5: add vectorized Rx/Tx burst for ARM")

Reported-by: Xueming Li <xuemingl@mellanox.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Xueming Li <xuemingl@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 10 +++++++---
 drivers/net/mlx5/mlx5_rxtx_vec_sse.h  |  4 ++--
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
index ce5ad0e..06f83ef 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
@@ -575,11 +575,15 @@ rxq_cq_to_ptype_oflags_v(struct mlx5_rxq_data *rxq,
 	if (rxq->mark) {
 		const uint32x4_t ft_def = vdupq_n_u32(MLX5_FLOW_MARK_DEFAULT);
 		const uint32x4_t fdir_flags = vdupq_n_u32(PKT_RX_FDIR);
-		const uint32x4_t fdir_id_flags = vdupq_n_u32(PKT_RX_FDIR_ID);
+		uint32x4_t fdir_id_flags = vdupq_n_u32(PKT_RX_FDIR_ID);
+		uint32x4_t invalid_mask;
 
 		/* Check if flow tag is non-zero then set PKT_RX_FDIR. */
-		ol_flags = vorrq_u32(ol_flags, vbicq_u32(fdir_flags,
-							 vceqzq_u32(flow_tag)));
+		invalid_mask = vceqzq_u32(flow_tag);
+		ol_flags = vorrq_u32(ol_flags,
+				     vbicq_u32(fdir_flags, invalid_mask));
+		/* Mask out invalid entries. */
+		fdir_id_flags = vbicq_u32(fdir_id_flags, invalid_mask);
 		/* Check if flow tag MLX5_FLOW_MARK_DEFAULT. */
 		ol_flags = vorrq_u32(ol_flags,
 				     vbicq_u32(fdir_id_flags,
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
index 3e5de62..7ef2c59 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
@@ -576,7 +576,7 @@ rxq_cq_to_ptype_oflags_v(struct mlx5_rxq_data *rxq, __m128i cqes[4],
 			_mm_set_epi32(0xffffff00, 0xffffff00,
 				      0xffffff00, 0xffffff00);
 		const __m128i fdir_flags = _mm_set1_epi32(PKT_RX_FDIR);
-		const __m128i fdir_id_flags = _mm_set1_epi32(PKT_RX_FDIR_ID);
+		__m128i fdir_id_flags = _mm_set1_epi32(PKT_RX_FDIR_ID);
 		__m128i flow_tag, invalid_mask;
 
 		flow_tag = _mm_and_si128(pinfo, pinfo_ft_mask);
@@ -586,7 +586,7 @@ rxq_cq_to_ptype_oflags_v(struct mlx5_rxq_data *rxq, __m128i cqes[4],
 					_mm_andnot_si128(invalid_mask,
 							 fdir_flags));
 		/* Mask out invalid entries. */
-		flow_tag = _mm_andnot_si128(invalid_mask, flow_tag);
+		fdir_id_flags = _mm_andnot_si128(invalid_mask, fdir_id_flags);
 		/* Check if flow tag MLX5_FLOW_MARK_DEFAULT. */
 		ol_flags = _mm_or_si128(ol_flags,
 					_mm_andnot_si128(
-- 
2.7.4

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

* [dpdk-stable] patch 'vhost: fix error code check when creating thread' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (107 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix calculation of flow ID flag' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:32 ` [dpdk-stable] patch 'examples/vhost: fix startup check' " Yuanhan Liu
                   ` (47 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Maxime Coquelin, Jens Freimann, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 12c0a0276118fa3db7cc8d9329eb024a29fa2f5c 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 | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index 422da00..811e6bf 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -472,7 +472,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");
 		if (pthread_mutex_destroy(&reconn_list.mutex)) {
 			RTE_LOG(ERR, VHOST_CONFIG,
@@ -678,9 +678,8 @@ 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)
 				goto out_mutex;
-			}
 		}
 	} else {
 		vsocket->is_server = true;
@@ -837,7 +836,7 @@ rte_vhost_driver_start(const char *path)
 	if (fdset_tid == 0) {
 		int ret = pthread_create(&fdset_tid, NULL, fdset_event_dispatch,
 				     &vhost_user.fdset);
-		if (ret < 0)
+		if (ret != 0)
 			RTE_LOG(ERR, VHOST_CONFIG,
 				"failed to create fdset handling thread");
 	}
-- 
2.7.4

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

* [dpdk-stable] patch 'examples/vhost: fix startup check' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (108 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'vhost: fix error code check when creating thread' " Yuanhan Liu
@ 2018-01-24 15:32 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'net/i40e: fix ISO C in exported header' " Yuanhan Liu
                   ` (46 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:32 UTC (permalink / raw)
  To: Zhiyong Yang; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From fb0654dcddd4af1f61b7e38600b4c1bb32d60a4e 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 10a7f5d..1f532fe 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -279,12 +279,6 @@ port_init(uint16_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.7.4

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

* [dpdk-stable] patch 'net/i40e: fix ISO C in exported header' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (109 preceding siblings ...)
  2018-01-24 15:32 ` [dpdk-stable] patch 'examples/vhost: fix startup check' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'flow_classify: " Yuanhan Liu
                   ` (45 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Adrien Mazarguil; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 92b282730408327fa3bb8e15086e4e63a3912842 Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Date: Thu, 21 Dec 2017 13:59:57 +0100
Subject: [PATCH] net/i40e: fix ISO C in exported header

[ upstream commit 12f98775745a3001f724d5e3904389e275a90773 ]

Reported by check-includes.sh:

 [...]/rte_pmd_i40e.h:97:30: error: ISO C restricts enumerator values to
     range of `int' [-Werror=pedantic]
   RTE_PMD_I40E_PKG_INFO_MAX = 0xFFFFFFFF
                               ^

Fixes: edeab742edac ("net/i40e: get information about DDP profile")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/rte_pmd_i40e.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/i40e/rte_pmd_i40e.h b/drivers/net/i40e/rte_pmd_i40e.h
index 580ca4a..49f4427 100644
--- a/drivers/net/i40e/rte_pmd_i40e.h
+++ b/drivers/net/i40e/rte_pmd_i40e.h
@@ -94,7 +94,7 @@ enum rte_pmd_i40e_package_info {
 	RTE_PMD_I40E_PKG_INFO_PCTYPE_LIST,
 	RTE_PMD_I40E_PKG_INFO_PTYPE_NUM,
 	RTE_PMD_I40E_PKG_INFO_PTYPE_LIST,
-	RTE_PMD_I40E_PKG_INFO_MAX = 0xFFFFFFFF
+	RTE_PMD_I40E_PKG_INFO_MAX = (int)0xFFFFFFFF
 };
 
 /**
-- 
2.7.4

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

* [dpdk-stable] patch 'flow_classify: fix ISO C in exported header' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (110 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'net/i40e: fix ISO C in exported header' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'member: " Yuanhan Liu
                   ` (44 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Adrien Mazarguil; +Cc: Bernard Iremonger, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 6a4657782cd766a89040c6dc921bd66daed8dc5f Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Date: Thu, 21 Dec 2017 13:59:59 +0100
Subject: [PATCH] flow_classify: fix ISO C in exported header

[ upstream commit 2ca53556544a2479327765fca5d9572b3dc268d6 ]

Reported by check-includes.sh:

 [...]/rte_flow_classify.h:85:47: error: ISO C does not permit named
     variadic macros [-Werror=variadic-macros]
  #define RTE_FLOW_CLASSIFY_LOG(level, fmt, args...) \
                                                ^

Fixes: be41ac2a330f ("flow_classify: introduce flow classify library")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 lib/librte_flow_classify/rte_flow_classify.h | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lib/librte_flow_classify/rte_flow_classify.h b/lib/librte_flow_classify/rte_flow_classify.h
index 1211873..e14bc78 100644
--- a/lib/librte_flow_classify/rte_flow_classify.h
+++ b/lib/librte_flow_classify/rte_flow_classify.h
@@ -70,6 +70,7 @@
  *    with rte_flow_classifier_free()
  */
 
+#include <rte_common.h>
 #include <rte_ethdev.h>
 #include <rte_ether.h>
 #include <rte_flow.h>
@@ -82,9 +83,12 @@ extern "C" {
 
 extern int librte_flow_classify_logtype;
 
-#define RTE_FLOW_CLASSIFY_LOG(level, fmt, args...) \
-rte_log(RTE_LOG_ ## level, librte_flow_classify_logtype, "%s(): " fmt, \
-	__func__, ## args)
+#define RTE_FLOW_CLASSIFY_LOG(level, ...) \
+	rte_log(RTE_LOG_ ## level, \
+		librte_flow_classify_logtype, \
+		RTE_FMT("%s(): " RTE_FMT_HEAD(__VA_ARGS__,), \
+			__func__, \
+			RTE_FMT_TAIL(__VA_ARGS__,)))
 
 /** Opaque data type for flow classifier */
 struct rte_flow_classifier;
-- 
2.7.4

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

* [dpdk-stable] patch 'member: fix ISO C in exported header' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (111 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'flow_classify: " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'lib: fix missing includes in exported headers' " Yuanhan Liu
                   ` (43 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Adrien Mazarguil; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 6977be20d7c262d348985115009d1f03cce37480 Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Date: Thu, 21 Dec 2017 14:00:02 +0100
Subject: [PATCH] member: fix ISO C in exported header

[ upstream commit 34c709f9b21cc5bc9bad338e908ebca08a6dfc37 ]

Reported by check-includes.sh:

 [...]/rte_member.h:107:40: error: ISO C does not permit named variadic
     macros [-Werror=variadic-macros]
  #define RTE_MEMBER_LOG(level, fmt, args...) \
                                         ^

Fixes: 857ed6c68cf2 ("member: implement main API")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 lib/librte_member/rte_member.h | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/lib/librte_member/rte_member.h b/lib/librte_member/rte_member.h
index 9b0c8f9..fa08711 100644
--- a/lib/librte_member/rte_member.h
+++ b/lib/librte_member/rte_member.h
@@ -80,6 +80,8 @@ extern "C" {
 
 #include <stdint.h>
 
+#include <rte_common.h>
+
 /** The set ID type that stored internally in hash table based set summary. */
 typedef uint16_t member_set_t;
 /** Invalid set ID used to mean no match found. */
@@ -104,9 +106,12 @@ typedef uint16_t member_set_t;
 
 extern int librte_member_logtype;
 
-#define RTE_MEMBER_LOG(level, fmt, args...) \
-rte_log(RTE_LOG_ ## level, librte_member_logtype, "%s(): " fmt, \
-	__func__, ## args)
+#define RTE_MEMBER_LOG(level, ...) \
+	rte_log(RTE_LOG_ ## level, \
+		librte_member_logtype, \
+		RTE_FMT("%s(): " RTE_FMT_HEAD(__VA_ARGS__,), \
+			__func__, \
+			RTE_FMT_TAIL(__VA_ARGS__,)))
 
 /** @internal setsummary structure. */
 struct rte_member_setsum;
-- 
2.7.4

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

* [dpdk-stable] patch 'lib: fix missing includes in exported headers' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (112 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'member: " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'igb_uio: allow multi-process access' " Yuanhan Liu
                   ` (42 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Adrien Mazarguil; +Cc: Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 6a1caf307c517449be53b2ff4c16658616572ec5 Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Date: Thu, 21 Dec 2017 14:00:04 +0100
Subject: [PATCH] lib: fix missing includes in exported headers
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 0d440d081ca1b5cccbb3b991908842c70731e460 ]

Many exported headers rely on definitions found in rte_config.h without
including it, as shown by the following command:

 grep -L '^#include <rte_config.h>' -- \
  $(grep -Rl \
    $(sed -n '/^#define \([^ ]\+\).*$/{s//\1/;H;};${x;s/\n//;s/\n/\\|/g;p;}' \
      build/include/rte_config.h) \
    -- build/include/)

We cannot assume external applications will include rte_config.h on their
own, neither directly nor through a -include parameter like DPDK does
internally.

This not only causes obvious compilation failures that can be reproduced
with check-includes.sh such as:

 [...]/rte_memory.h:88:43: error: ‘RTE_CACHE_LINE_SIZE’ was not declared in
     this scope
  #define __rte_cache_aligned __rte_aligned(RTE_CACHE_LINE_SIZE)
                                            ^

It also results in less visible issues, for instance rte_hash_crc.h relying
on RTE_ARCH_X86_64's presence to provide dedicated inline functions.

This patch partially reverts the commit below and adds missing include
lines to the remaining files.

Fixes: f1a7a5c5f404 ("remove include of generated config header")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/net/avp/rte_avp_common.h                              | 1 +
 lib/librte_cmdline/cmdline_cirbuf.h                           | 2 ++
 lib/librte_cryptodev/rte_cryptodev.h                          | 1 +
 lib/librte_cryptodev/rte_cryptodev_pmd.h                      | 1 +
 lib/librte_eal/common/include/arch/x86/rte_atomic.h           | 1 +
 lib/librte_eal/common/include/arch/x86/rte_byteorder.h        | 1 +
 lib/librte_eal/common/include/arch/x86/rte_cycles.h           | 1 +
 lib/librte_eal/common/include/arch/x86/rte_memcpy.h           | 1 +
 lib/librte_eal/common/include/arch/x86/rte_vect.h             | 1 +
 lib/librte_eal/common/include/generic/rte_byteorder.h         | 1 +
 lib/librte_eal/common/include/rte_bitmap.h                    | 1 +
 lib/librte_eal/common/include/rte_common.h                    | 2 ++
 lib/librte_eal/common/include/rte_dev.h                       | 1 +
 lib/librte_eal/common/include/rte_eal.h                       | 1 +
 lib/librte_eal/common/include/rte_eal_memconfig.h             | 1 +
 lib/librte_eal/common/include/rte_keepalive.h                 | 1 +
 lib/librte_eal/common/include/rte_lcore.h                     | 1 +
 lib/librte_eal/common/include/rte_log.h                       | 1 +
 lib/librte_eal/common/include/rte_memory.h                    | 1 +
 lib/librte_eal/common/include/rte_service.h                   | 1 +
 lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h | 1 +
 lib/librte_ether/rte_ethdev.h                                 | 1 +
 lib/librte_ether/rte_ethdev_pci.h                             | 1 +
 lib/librte_ether/rte_ethdev_vdev.h                            | 1 +
 lib/librte_eventdev/rte_eventdev.h                            | 1 +
 lib/librte_eventdev/rte_eventdev_pmd.h                        | 1 +
 lib/librte_eventdev/rte_eventdev_pmd_pci.h                    | 1 +
 lib/librte_eventdev/rte_eventdev_pmd_vdev.h                   | 1 +
 lib/librte_hash/rte_fbk_hash.h                                | 1 +
 lib/librte_hash/rte_hash_crc.h                                | 1 +
 lib/librte_hash/rte_jhash.h                                   | 1 +
 lib/librte_hash/rte_thash.h                                   | 1 +
 lib/librte_ip_frag/rte_ip_frag.h                              | 1 +
 lib/librte_lpm/rte_lpm.h                                      | 1 +
 lib/librte_mbuf/rte_mbuf.h                                    | 1 +
 lib/librte_member/rte_member.h                                | 1 +
 lib/librte_mempool/rte_mempool.h                              | 1 +
 lib/librte_ring/rte_ring.h                                    | 1 +
 lib/librte_table/rte_lru.h                                    | 1 +
 lib/librte_table/rte_lru_x86.h                                | 2 ++
 lib/librte_timer/rte_timer.h                                  | 1 +
 41 files changed, 44 insertions(+)

diff --git a/drivers/net/avp/rte_avp_common.h b/drivers/net/avp/rte_avp_common.h
index 54437e9..81dfe5e 100644
--- a/drivers/net/avp/rte_avp_common.h
+++ b/drivers/net/avp/rte_avp_common.h
@@ -63,6 +63,7 @@
 #else
 #include <stdint.h>
 #include <rte_common.h>
+#include <rte_config.h>
 #include <rte_memory.h>
 #include <rte_ether.h>
 #include <rte_atomic.h>
diff --git a/lib/librte_cmdline/cmdline_cirbuf.h b/lib/librte_cmdline/cmdline_cirbuf.h
index 6321dec..87407ef 100644
--- a/lib/librte_cmdline/cmdline_cirbuf.h
+++ b/lib/librte_cmdline/cmdline_cirbuf.h
@@ -61,6 +61,8 @@
 #ifndef _CIRBUF_H_
 #define _CIRBUF_H_
 
+#include <rte_config.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index dade554..ed92f98 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -49,6 +49,7 @@ extern "C" {
 #include "rte_crypto.h"
 #include "rte_dev.h"
 #include <rte_common.h>
+#include <rte_config.h>
 
 extern const char **rte_cyptodev_names;
 
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 744405e..c3bf91c 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -46,6 +46,7 @@ extern "C" {
 
 #include <string.h>
 
+#include <rte_config.h>
 #include <rte_dev.h>
 #include <rte_malloc.h>
 #include <rte_mbuf.h>
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 4eac666..ea665d5 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_atomic.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_atomic.h
@@ -40,6 +40,7 @@ extern "C" {
 
 #include <stdint.h>
 #include <rte_common.h>
+#include <rte_config.h>
 #include <emmintrin.h>
 #include "generic/rte_atomic.h"
 
diff --git a/lib/librte_eal/common/include/arch/x86/rte_byteorder.h b/lib/librte_eal/common/include/arch/x86/rte_byteorder.h
index 251f11b..126f29e 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_byteorder.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_byteorder.h
@@ -40,6 +40,7 @@ extern "C" {
 
 #include <stdint.h>
 #include <rte_common.h>
+#include <rte_config.h>
 #include "generic/rte_byteorder.h"
 
 #ifndef RTE_BYTE_ORDER
diff --git a/lib/librte_eal/common/include/arch/x86/rte_cycles.h b/lib/librte_eal/common/include/arch/x86/rte_cycles.h
index 1bb3e1d..b95bece 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_cycles.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_cycles.h
@@ -47,6 +47,7 @@ extern int rte_cycles_vmware_tsc_map;
 #include <rte_branch_prediction.h>
 #endif
 #include <rte_common.h>
+#include <rte_config.h>
 
 static inline uint64_t
 rte_rdtsc(void)
diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
index 74c280c..596d777 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
@@ -45,6 +45,7 @@
 #include <string.h>
 #include <rte_vect.h>
 #include <rte_common.h>
+#include <rte_config.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/lib/librte_eal/common/include/arch/x86/rte_vect.h b/lib/librte_eal/common/include/arch/x86/rte_vect.h
index 03fc991..893b812 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_vect.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_vect.h
@@ -41,6 +41,7 @@
  */
 
 #include <stdint.h>
+#include <rte_config.h>
 #include "generic/rte_vect.h"
 
 #if (defined(__ICC) || (__GNUC__ == 4 &&  __GNUC_MINOR__ < 4))
diff --git a/lib/librte_eal/common/include/generic/rte_byteorder.h b/lib/librte_eal/common/include/generic/rte_byteorder.h
index e5e820d..29e70c9 100644
--- a/lib/librte_eal/common/include/generic/rte_byteorder.h
+++ b/lib/librte_eal/common/include/generic/rte_byteorder.h
@@ -51,6 +51,7 @@
 #endif
 
 #include <rte_common.h>
+#include <rte_config.h>
 
 /*
  * Compile-time endianness detection
diff --git a/lib/librte_eal/common/include/rte_bitmap.h b/lib/librte_eal/common/include/rte_bitmap.h
index 010d752..b9067e6 100644
--- a/lib/librte_eal/common/include/rte_bitmap.h
+++ b/lib/librte_eal/common/include/rte_bitmap.h
@@ -66,6 +66,7 @@ extern "C" {
 
 #include <string.h>
 #include <rte_common.h>
+#include <rte_config.h>
 #include <rte_debug.h>
 #include <rte_memory.h>
 #include <rte_branch_prediction.h>
diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h
index de853e1..f1d24b8 100644
--- a/lib/librte_eal/common/include/rte_common.h
+++ b/lib/librte_eal/common/include/rte_common.h
@@ -51,6 +51,8 @@ extern "C" {
 #include <errno.h>
 #include <limits.h>
 
+#include <rte_config.h>
+
 #ifndef typeof
 #define typeof __typeof__
 #endif
diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
index 9342e0c..8088dcc 100644
--- a/lib/librte_eal/common/include/rte_dev.h
+++ b/lib/librte_eal/common/include/rte_dev.h
@@ -49,6 +49,7 @@ extern "C" {
 #include <stdio.h>
 #include <sys/queue.h>
 
+#include <rte_config.h>
 #include <rte_log.h>
 
 __attribute__((format(printf, 2, 0)))
diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h
index 8e4e71c..78b0e00 100644
--- a/lib/librte_eal/common/include/rte_eal.h
+++ b/lib/librte_eal/common/include/rte_eal.h
@@ -43,6 +43,7 @@
 #include <stdint.h>
 #include <sched.h>
 
+#include <rte_config.h>
 #include <rte_per_lcore.h>
 #include <rte_bus.h>
 
diff --git a/lib/librte_eal/common/include/rte_eal_memconfig.h b/lib/librte_eal/common/include/rte_eal_memconfig.h
index b9eee70..c963b45 100644
--- a/lib/librte_eal/common/include/rte_eal_memconfig.h
+++ b/lib/librte_eal/common/include/rte_eal_memconfig.h
@@ -34,6 +34,7 @@
 #ifndef _RTE_EAL_MEMCONFIG_H_
 #define _RTE_EAL_MEMCONFIG_H_
 
+#include <rte_config.h>
 #include <rte_tailq.h>
 #include <rte_memory.h>
 #include <rte_memzone.h>
diff --git a/lib/librte_eal/common/include/rte_keepalive.h b/lib/librte_eal/common/include/rte_keepalive.h
index 88ad8e4..e9f8f08 100644
--- a/lib/librte_eal/common/include/rte_keepalive.h
+++ b/lib/librte_eal/common/include/rte_keepalive.h
@@ -39,6 +39,7 @@
 #ifndef _KEEPALIVE_H_
 #define _KEEPALIVE_H_
 
+#include <rte_config.h>
 #include <rte_memory.h>
 
 #ifndef RTE_KEEPALIVE_MAXCORES
diff --git a/lib/librte_eal/common/include/rte_lcore.h b/lib/librte_eal/common/include/rte_lcore.h
index c89e6ba..3735da0 100644
--- a/lib/librte_eal/common/include/rte_lcore.h
+++ b/lib/librte_eal/common/include/rte_lcore.h
@@ -40,6 +40,7 @@
  * API for lcore and socket manipulation
  *
  */
+#include <rte_config.h>
 #include <rte_per_lcore.h>
 #include <rte_eal.h>
 #include <rte_launch.h>
diff --git a/lib/librte_eal/common/include/rte_log.h b/lib/librte_eal/common/include/rte_log.h
index 6c2d356..0bb1068 100644
--- a/lib/librte_eal/common/include/rte_log.h
+++ b/lib/librte_eal/common/include/rte_log.h
@@ -51,6 +51,7 @@ extern "C" {
 #include <stdarg.h>
 
 #include <rte_common.h>
+#include <rte_config.h>
 
 struct rte_log_dynamic_type;
 
diff --git a/lib/librte_eal/common/include/rte_memory.h b/lib/librte_eal/common/include/rte_memory.h
index 14aacea..80a8fc0 100644
--- a/lib/librte_eal/common/include/rte_memory.h
+++ b/lib/librte_eal/common/include/rte_memory.h
@@ -49,6 +49,7 @@ extern "C" {
 #endif
 
 #include <rte_common.h>
+#include <rte_config.h>
 
 __extension__
 enum rte_page_sizes {
diff --git a/lib/librte_eal/common/include/rte_service.h b/lib/librte_eal/common/include/rte_service.h
index 495b531..80b90fa 100644
--- a/lib/librte_eal/common/include/rte_service.h
+++ b/lib/librte_eal/common/include/rte_service.h
@@ -59,6 +59,7 @@ extern "C" {
 #include <stdint.h>
 #include <sys/queue.h>
 
+#include <rte_config.h>
 #include <rte_lcore.h>
 
 #define RTE_SERVICE_NAME_MAX 32
diff --git a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h
index 2ac879f..794cd4f 100644
--- a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h
+++ b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h
@@ -64,6 +64,7 @@
 #define RTE_STD_C11
 #else
 #include <rte_common.h>
+#include <rte_config.h>
 #endif
 
 /**
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 96555a8..2cc2eed 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -181,6 +181,7 @@ extern "C" {
 #include <rte_devargs.h>
 #include <rte_errno.h>
 #include <rte_common.h>
+#include <rte_config.h>
 
 #include "rte_ether.h"
 #include "rte_eth_ctrl.h"
diff --git a/lib/librte_ether/rte_ethdev_pci.h b/lib/librte_ether/rte_ethdev_pci.h
index 722075e..ad64a16 100644
--- a/lib/librte_ether/rte_ethdev_pci.h
+++ b/lib/librte_ether/rte_ethdev_pci.h
@@ -37,6 +37,7 @@
 #include <rte_malloc.h>
 #include <rte_pci.h>
 #include <rte_bus_pci.h>
+#include <rte_config.h>
 #include <rte_ethdev.h>
 
 /**
diff --git a/lib/librte_ether/rte_ethdev_vdev.h b/lib/librte_ether/rte_ethdev_vdev.h
index ff92e6e..feb5a3e 100644
--- a/lib/librte_ether/rte_ethdev_vdev.h
+++ b/lib/librte_ether/rte_ethdev_vdev.h
@@ -34,6 +34,7 @@
 #ifndef _RTE_ETHDEV_VDEV_H_
 #define _RTE_ETHDEV_VDEV_H_
 
+#include <rte_config.h>
 #include <rte_malloc.h>
 #include <rte_bus_vdev.h>
 #include <rte_ethdev.h>
diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
index f1949ff..9134b49 100644
--- a/lib/librte_eventdev/rte_eventdev.h
+++ b/lib/librte_eventdev/rte_eventdev.h
@@ -239,6 +239,7 @@ extern "C" {
 #endif
 
 #include <rte_common.h>
+#include <rte_config.h>
 #include <rte_memory.h>
 #include <rte_errno.h>
 
diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h
index 7a206c5..b78423d 100644
--- a/lib/librte_eventdev/rte_eventdev_pmd.h
+++ b/lib/librte_eventdev/rte_eventdev_pmd.h
@@ -47,6 +47,7 @@ extern "C" {
 #include <string.h>
 
 #include <rte_common.h>
+#include <rte_config.h>
 #include <rte_dev.h>
 #include <rte_log.h>
 #include <rte_malloc.h>
diff --git a/lib/librte_eventdev/rte_eventdev_pmd_pci.h b/lib/librte_eventdev/rte_eventdev_pmd_pci.h
index ade32b5..8da40be 100644
--- a/lib/librte_eventdev/rte_eventdev_pmd_pci.h
+++ b/lib/librte_eventdev/rte_eventdev_pmd_pci.h
@@ -47,6 +47,7 @@ extern "C" {
 
 #include <string.h>
 
+#include <rte_config.h>
 #include <rte_eal.h>
 #include <rte_lcore.h>
 #include <rte_pci.h>
diff --git a/lib/librte_eventdev/rte_eventdev_pmd_vdev.h b/lib/librte_eventdev/rte_eventdev_pmd_vdev.h
index 56232de..f77d59b 100644
--- a/lib/librte_eventdev/rte_eventdev_pmd_vdev.h
+++ b/lib/librte_eventdev/rte_eventdev_pmd_vdev.h
@@ -46,6 +46,7 @@ extern "C" {
 
 #include <string.h>
 
+#include <rte_config.h>
 #include <rte_debug.h>
 #include <rte_eal.h>
 #include <rte_bus_vdev.h>
diff --git a/lib/librte_hash/rte_fbk_hash.h b/lib/librte_hash/rte_fbk_hash.h
index c39c097..e0d42b4 100644
--- a/lib/librte_hash/rte_fbk_hash.h
+++ b/lib/librte_hash/rte_fbk_hash.h
@@ -54,6 +54,7 @@ extern "C" {
 
 #include <string.h>
 
+#include <rte_config.h>
 #ifndef RTE_FBK_HASH_FUNC_DEFAULT
 #if defined(RTE_ARCH_X86) || defined(RTE_MACHINE_CPUFLAG_CRC32)
 #include <rte_hash_crc.h>
diff --git a/lib/librte_hash/rte_hash_crc.h b/lib/librte_hash/rte_hash_crc.h
index 4f815ae..93188c2 100644
--- a/lib/librte_hash/rte_hash_crc.h
+++ b/lib/librte_hash/rte_hash_crc.h
@@ -45,6 +45,7 @@ extern "C" {
 #endif
 
 #include <stdint.h>
+#include <rte_config.h>
 #include <rte_cpuflags.h>
 #include <rte_branch_prediction.h>
 #include <rte_common.h>
diff --git a/lib/librte_hash/rte_jhash.h b/lib/librte_hash/rte_jhash.h
index 3eca138..42c4568 100644
--- a/lib/librte_hash/rte_jhash.h
+++ b/lib/librte_hash/rte_jhash.h
@@ -48,6 +48,7 @@ extern "C" {
 #include <string.h>
 #include <limits.h>
 
+#include <rte_config.h>
 #include <rte_log.h>
 #include <rte_byteorder.h>
 
diff --git a/lib/librte_hash/rte_thash.h b/lib/librte_hash/rte_thash.h
index 4fa5e07..a6ddb7b 100644
--- a/lib/librte_hash/rte_thash.h
+++ b/lib/librte_hash/rte_thash.h
@@ -53,6 +53,7 @@ extern "C" {
 
 #include <stdint.h>
 #include <rte_byteorder.h>
+#include <rte_config.h>
 #include <rte_ip.h>
 #include <rte_common.h>
 
diff --git a/lib/librte_ip_frag/rte_ip_frag.h b/lib/librte_ip_frag/rte_ip_frag.h
index 9f8cede..0144164 100644
--- a/lib/librte_ip_frag/rte_ip_frag.h
+++ b/lib/librte_ip_frag/rte_ip_frag.h
@@ -48,6 +48,7 @@ extern "C" {
 #include <stdint.h>
 #include <stdio.h>
 
+#include <rte_config.h>
 #include <rte_malloc.h>
 #include <rte_memory.h>
 #include <rte_ip.h>
diff --git a/lib/librte_lpm/rte_lpm.h b/lib/librte_lpm/rte_lpm.h
index 682865e..650c51d 100644
--- a/lib/librte_lpm/rte_lpm.h
+++ b/lib/librte_lpm/rte_lpm.h
@@ -45,6 +45,7 @@
 #include <stdlib.h>
 #include <rte_branch_prediction.h>
 #include <rte_byteorder.h>
+#include <rte_config.h>
 #include <rte_memory.h>
 #include <rte_common.h>
 #include <rte_vect.h>
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index ce8a05d..e5d7643 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -62,6 +62,7 @@
 
 #include <stdint.h>
 #include <rte_common.h>
+#include <rte_config.h>
 #include <rte_mempool.h>
 #include <rte_memory.h>
 #include <rte_atomic.h>
diff --git a/lib/librte_member/rte_member.h b/lib/librte_member/rte_member.h
index fa08711..56dd3b3 100644
--- a/lib/librte_member/rte_member.h
+++ b/lib/librte_member/rte_member.h
@@ -81,6 +81,7 @@ extern "C" {
 #include <stdint.h>
 
 #include <rte_common.h>
+#include <rte_config.h>
 
 /** The set ID type that stored internally in hash table based set summary. */
 typedef uint16_t member_set_t;
diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index 721227f..e21026a 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -69,6 +69,7 @@
 #include <inttypes.h>
 #include <sys/queue.h>
 
+#include <rte_config.h>
 #include <rte_spinlock.h>
 #include <rte_log.h>
 #include <rte_debug.h>
diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h
index e924438..7069d52 100644
--- a/lib/librte_ring/rte_ring.h
+++ b/lib/librte_ring/rte_ring.h
@@ -96,6 +96,7 @@ extern "C" {
 #include <sys/queue.h>
 #include <errno.h>
 #include <rte_common.h>
+#include <rte_config.h>
 #include <rte_memory.h>
 #include <rte_lcore.h>
 #include <rte_atomic.h>
diff --git a/lib/librte_table/rte_lru.h b/lib/librte_table/rte_lru.h
index 93258ef..a73b2ff 100644
--- a/lib/librte_table/rte_lru.h
+++ b/lib/librte_table/rte_lru.h
@@ -38,6 +38,7 @@
 extern "C" {
 #endif
 
+#include <rte_config.h>
 #ifdef RTE_ARCH_X86_64
 #include "rte_lru_x86.h"
 #elif defined(RTE_ARCH_ARM64)
diff --git a/lib/librte_table/rte_lru_x86.h b/lib/librte_table/rte_lru_x86.h
index 10f513c..b4f6052 100644
--- a/lib/librte_table/rte_lru_x86.h
+++ b/lib/librte_table/rte_lru_x86.h
@@ -40,6 +40,8 @@ extern "C" {
 
 #include <stdint.h>
 
+#include <rte_config.h>
+
 #ifndef RTE_TABLE_HASH_LRU_STRATEGY
 #define RTE_TABLE_HASH_LRU_STRATEGY                        2
 #endif
diff --git a/lib/librte_timer/rte_timer.h b/lib/librte_timer/rte_timer.h
index a276a73..3b50155 100644
--- a/lib/librte_timer/rte_timer.h
+++ b/lib/librte_timer/rte_timer.h
@@ -67,6 +67,7 @@
 #include <stdint.h>
 #include <stddef.h>
 #include <rte_common.h>
+#include <rte_config.h>
 
 #ifdef __cplusplus
 extern "C" {
-- 
2.7.4

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

* [dpdk-stable] patch 'igb_uio: allow multi-process access' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (113 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'lib: fix missing includes in exported headers' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'pdump: fix error check when creating/canceling thread' " Yuanhan Liu
                   ` (41 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Xiao Wang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From caedec7911c6f04ceb41a777ca3665b8df44e329 Mon Sep 17 00:00:00 2001
From: Xiao Wang <xiao.w.wang@intel.com>
Date: Mon, 1 Jan 2018 14:00:10 -0800
Subject: [PATCH] igb_uio: allow multi-process access

[ upstream commit 19685d5aa79c2f86486b0afee6db4c7a280ea7b3 ]

In some case, one device are accessed by different processes via
different BARs, so one uio device may be opened by more than one
process, for this case we just need to enable interrupt once, and
pci_clear_master only when the last process closed.

Fixes: 5f6ff30dc507 ("igb_uio: fix interrupt enablement after FLR in VM")

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
index a3a98c1..1826adb 100644
--- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
+++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
@@ -45,6 +45,8 @@ struct rte_uio_pci_dev {
 	struct uio_info info;
 	struct pci_dev *pdev;
 	enum rte_intr_mode mode;
+	struct mutex lock;
+	int refcnt;
 };
 
 static char *intr_mode;
@@ -336,11 +338,18 @@ igbuio_pci_open(struct uio_info *info, struct inode *inode)
 	struct pci_dev *dev = udev->pdev;
 	int err;
 
+	mutex_lock(&udev->lock);
+	if (++udev->refcnt > 1) {
+		mutex_unlock(&udev->lock);
+		return 0;
+	}
+
 	/* set bus master, which was cleared by the reset function */
 	pci_set_master(dev);
 
 	/* enable interrupts */
 	err = igbuio_pci_enable_interrupts(udev);
+	mutex_unlock(&udev->lock);
 	if (err) {
 		dev_err(&dev->dev, "Enable interrupt fails\n");
 		return err;
@@ -354,12 +363,19 @@ igbuio_pci_release(struct uio_info *info, struct inode *inode)
 	struct rte_uio_pci_dev *udev = info->priv;
 	struct pci_dev *dev = udev->pdev;
 
+	mutex_lock(&udev->lock);
+	if (--udev->refcnt > 0) {
+		mutex_unlock(&udev->lock);
+		return 0;
+	}
+
 	/* disable interrupts */
 	igbuio_pci_disable_interrupts(udev);
 
 	/* stop the device from further DMA */
 	pci_clear_master(dev);
 
+	mutex_unlock(&udev->lock);
 	return 0;
 }
 
@@ -480,6 +496,7 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 	if (!udev)
 		return -ENOMEM;
 
+	mutex_init(&udev->lock);
 	/*
 	 * enable device: ask low-level code to enable I/O and
 	 * memory
@@ -570,6 +587,7 @@ igbuio_pci_remove(struct pci_dev *dev)
 {
 	struct rte_uio_pci_dev *udev = pci_get_drvdata(dev);
 
+	mutex_destroy(&udev->lock);
 	sysfs_remove_group(&dev->dev.kobj, &dev_attr_grp);
 	uio_unregister_device(&udev->info);
 	igbuio_pci_release_iomem(&udev->info);
-- 
2.7.4

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

* [dpdk-stable] patch 'pdump: fix error check when creating/canceling thread' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (114 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'igb_uio: allow multi-process access' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'app/testpmd: fix invalid Rx queue number setting' " Yuanhan Liu
                   ` (40 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Olivier Matz; +Cc: John McNamara, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 9374e9d0b63588f508d0828b0af212b4c263262b 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 bc18f81..44dcc95 100644
--- a/lib/librte_pdump/rte_pdump.c
+++ b/lib/librte_pdump/rte_pdump.c
@@ -581,7 +581,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. */
@@ -604,7 +604,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.7.4

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

* [dpdk-stable] patch 'app/testpmd: fix invalid Rx queue number setting' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (115 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'pdump: fix error check when creating/canceling thread' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'app/testpmd: fix invalid Tx " Yuanhan Liu
                   ` (39 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Wei Dai; +Cc: Konstantin Ananyev, Yuan Peng, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From e082ddac1a03cbd326987863f0497f230d5f254c Mon Sep 17 00:00:00 2001
From: Wei Dai <wei.dai@intel.com>
Date: Fri, 12 Jan 2018 19:31:21 +0800
Subject: [PATCH] app/testpmd: fix invalid Rx queue number setting

[ upstream commit 3f7311ba0beee75068c52fe521fff021ff506a14 ]

If an invalid number of RX queues is configured from testpmd run-time
command like "port config all rxq number" or from --rxq in the command
to start testpmd, the global variable nb_rxq is updated by this invalid
value without this patch. It may cause testpmd crash. This patch refuses
invalid rxq setting and keeps its last correct value.

Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings")

Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
---
 app/test-pmd/cmdline.c    |  2 ++
 app/test-pmd/parameters.c |  7 ++++---
 app/test-pmd/testpmd.c    | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 app/test-pmd/testpmd.h    |  3 +++
 4 files changed, 55 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 8990ebf..6296a30 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1501,6 +1501,8 @@ cmd_config_rx_tx_parsed(void *parsed_result,
 			printf("Warning: Either rx or tx queues should be non zero\n");
 			return;
 		}
+		if (check_nb_rxq(res->value) != 0)
+			return;
 		nb_rxq = res->value;
 	}
 	else if (!strcmp(res->name, "txq")) {
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 84e7a63..26f61b9 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -565,6 +565,7 @@ launch_args_parse(int argc, char** argv)
 	int n, opt;
 	char **argvopt;
 	int opt_idx;
+	portid_t pid;
 	enum { TX, RX };
 
 	static struct option lgopts[] = {
@@ -951,12 +952,12 @@ launch_args_parse(int argc, char** argv)
 				rss_hf = ETH_RSS_UDP;
 			if (!strcmp(lgopts[opt_idx].name, "rxq")) {
 				n = atoi(optarg);
-				if (n >= 0 && n <= (int) MAX_QUEUE_ID)
+				if (n >= 0 && check_nb_rxq((queueid_t)n) == 0)
 					nb_rxq = (queueid_t) n;
 				else
 					rte_exit(EXIT_FAILURE, "rxq %d invalid - must be"
-						  " >= 0 && <= %d\n", n,
-						  (int) MAX_QUEUE_ID);
+						  " >= 0 && <= %u\n", n,
+						  get_allowed_max_nb_rxq(&pid));
 			}
 			if (!strcmp(lgopts[opt_idx].name, "txq")) {
 				n = atoi(optarg);
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index c3ab448..7b2d2c8 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -568,6 +568,52 @@ check_socket_id(const unsigned int socket_id)
 	return 0;
 }
 
+/*
+ * Get the allowed maximum number of RX queues.
+ * *pid return the port id which has minimal value of
+ * max_rx_queues in all ports.
+ */
+queueid_t
+get_allowed_max_nb_rxq(portid_t *pid)
+{
+	queueid_t allowed_max_rxq = MAX_QUEUE_ID;
+	portid_t pi;
+	struct rte_eth_dev_info dev_info;
+
+	RTE_ETH_FOREACH_DEV(pi) {
+		rte_eth_dev_info_get(pi, &dev_info);
+		if (dev_info.max_rx_queues < allowed_max_rxq) {
+			allowed_max_rxq = dev_info.max_rx_queues;
+			*pid = pi;
+		}
+	}
+	return allowed_max_rxq;
+}
+
+/*
+ * Check input rxq is valid or not.
+ * If input rxq is not greater than any of maximum number
+ * of RX queues of all ports, it is valid.
+ * if valid, return 0, else return -1
+ */
+int
+check_nb_rxq(queueid_t rxq)
+{
+	queueid_t allowed_max_rxq;
+	portid_t pid = 0;
+
+	allowed_max_rxq = get_allowed_max_nb_rxq(&pid);
+	if (rxq > allowed_max_rxq) {
+		printf("Fail: input rxq (%u) can't be greater "
+		       "than max_rx_queues (%u) of port %u\n",
+		       rxq,
+		       allowed_max_rxq,
+		       pid);
+		return -1;
+	}
+	return 0;
+}
+
 static void
 init_config(void)
 {
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 1639d27..825ebb9 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -728,6 +728,9 @@ enum print_warning {
 int port_id_is_invalid(portid_t port_id, enum print_warning warning);
 int new_socket_id(unsigned int socket_id);
 
+queueid_t get_allowed_max_nb_rxq(portid_t *pid);
+int check_nb_rxq(queueid_t rxq);
+
 /*
  * Work-around of a compilation error with ICC on invocations of the
  * rte_be_to_cpu_16() function.
-- 
2.7.4

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

* [dpdk-stable] patch 'app/testpmd: fix invalid Tx queue number setting' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (116 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'app/testpmd: fix invalid Rx queue number setting' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'app/procinfo: add compilation option in config' " Yuanhan Liu
                   ` (38 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Wei Dai; +Cc: Konstantin Ananyev, Yuan Peng, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From b4dfd3a71eeac116ee839421ee7846d117affae9 Mon Sep 17 00:00:00 2001
From: Wei Dai <wei.dai@intel.com>
Date: Fri, 12 Jan 2018 19:31:22 +0800
Subject: [PATCH] app/testpmd: fix invalid Tx queue number setting

[ upstream commit 36db4f6c70b43f307dd2a1ece19d910a3548349d ]

If an invalid number of TX queues is configured from testpmd run-time
command like "port config all txq number" or from --txq in the command
to start testpmd, the global variable nb_txq is updated by this invalid
value without this patch. It may cause testpmd crash. This patch refuses
invalid txq setting and keeps its last correct value.

Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings")

Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Tested-by: Yuan Peng <yuan.peng@intel.com>
---
 app/test-pmd/cmdline.c    |  2 ++
 app/test-pmd/parameters.c |  6 +++---
 app/test-pmd/testpmd.c    | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 app/test-pmd/testpmd.h    |  2 ++
 4 files changed, 53 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 6296a30..8979627 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1510,6 +1510,8 @@ cmd_config_rx_tx_parsed(void *parsed_result,
 			printf("Warning: Either rx or tx queues should be non zero\n");
 			return;
 		}
+		if (check_nb_txq(res->value) != 0)
+			return;
 		nb_txq = res->value;
 	}
 	else if (!strcmp(res->name, "rxd")) {
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 26f61b9..8fbb515 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -961,12 +961,12 @@ launch_args_parse(int argc, char** argv)
 			}
 			if (!strcmp(lgopts[opt_idx].name, "txq")) {
 				n = atoi(optarg);
-				if (n >= 0 && n <= (int) MAX_QUEUE_ID)
+				if (n >= 0 && check_nb_txq((queueid_t)n) == 0)
 					nb_txq = (queueid_t) n;
 				else
 					rte_exit(EXIT_FAILURE, "txq %d invalid - must be"
-						  " >= 0 && <= %d\n", n,
-						  (int) MAX_QUEUE_ID);
+						  " >= 0 && <= %u\n", n,
+						  get_allowed_max_nb_txq(&pid));
 			}
 			if (!nb_rxq && !nb_txq) {
 				rte_exit(EXIT_FAILURE, "Either rx or tx queues should "
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 7b2d2c8..f66f4c6 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -614,6 +614,52 @@ check_nb_rxq(queueid_t rxq)
 	return 0;
 }
 
+/*
+ * Get the allowed maximum number of TX queues.
+ * *pid return the port id which has minimal value of
+ * max_tx_queues in all ports.
+ */
+queueid_t
+get_allowed_max_nb_txq(portid_t *pid)
+{
+	queueid_t allowed_max_txq = MAX_QUEUE_ID;
+	portid_t pi;
+	struct rte_eth_dev_info dev_info;
+
+	RTE_ETH_FOREACH_DEV(pi) {
+		rte_eth_dev_info_get(pi, &dev_info);
+		if (dev_info.max_tx_queues < allowed_max_txq) {
+			allowed_max_txq = dev_info.max_tx_queues;
+			*pid = pi;
+		}
+	}
+	return allowed_max_txq;
+}
+
+/*
+ * Check input txq is valid or not.
+ * If input txq is not greater than any of maximum number
+ * of TX queues of all ports, it is valid.
+ * if valid, return 0, else return -1
+ */
+int
+check_nb_txq(queueid_t txq)
+{
+	queueid_t allowed_max_txq;
+	portid_t pid = 0;
+
+	allowed_max_txq = get_allowed_max_nb_txq(&pid);
+	if (txq > allowed_max_txq) {
+		printf("Fail: input txq (%u) can't be greater "
+		       "than max_tx_queues (%u) of port %u\n",
+		       txq,
+		       allowed_max_txq,
+		       pid);
+		return -1;
+	}
+	return 0;
+}
+
 static void
 init_config(void)
 {
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 825ebb9..92e1607 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -730,6 +730,8 @@ int new_socket_id(unsigned int socket_id);
 
 queueid_t get_allowed_max_nb_rxq(portid_t *pid);
 int check_nb_rxq(queueid_t rxq);
+queueid_t get_allowed_max_nb_txq(portid_t *pid);
+int check_nb_txq(queueid_t txq);
 
 /*
  * Work-around of a compilation error with ICC on invocations of the
-- 
2.7.4

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

* [dpdk-stable] patch 'app/procinfo: add compilation option in config' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (117 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'app/testpmd: fix invalid Tx " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'test: register test as failed if setup failed' " Yuanhan Liu
                   ` (37 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 5359c7fbb5bd2b7dbf53f85ab693b33b71f0fc78 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 7ea02b0..6398c18 100644
--- a/app/Makefile
+++ b/app/Makefile
@@ -32,7 +32,7 @@
 include $(RTE_SDK)/mk/rte.vars.mk
 
 DIRS-$(CONFIG_RTE_TEST_PMD) += test-pmd
-DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += proc_info
+DIRS-$(CONFIG_RTE_PROC_INFO) += proc_info
 DIRS-$(CONFIG_RTE_LIBRTE_PDUMP) += pdump
 
 ifeq ($(CONFIG_RTE_LIBRTE_CRYPTODEV),y)
diff --git a/config/common_base b/config/common_base
index b8ee8f9..67c2432 100644
--- a/config/common_base
+++ b/config/common_base
@@ -804,6 +804,11 @@ 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
 #
 CONFIG_RTE_TEST_PMD=y
diff --git a/config/common_linuxapp b/config/common_linuxapp
index 74c7d64..15c6961 100644
--- a/config/common_linuxapp
+++ b/config/common_linuxapp
@@ -50,3 +50,4 @@ CONFIG_RTE_LIBRTE_AVP_PMD=y
 CONFIG_RTE_LIBRTE_NFP_PMD=y
 CONFIG_RTE_LIBRTE_POWER=y
 CONFIG_RTE_VIRTIO_USER=y
+CONFIG_RTE_PROC_INFO=y
-- 
2.7.4

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

* [dpdk-stable] patch 'test: register test as failed if setup failed' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (118 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'app/procinfo: add compilation option in config' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'test/table: fix uninitialized parameter' " Yuanhan Liu
                   ` (36 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Declan Doherty, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From b8dd6a1e2f3fcb59195a570461fc90013e752285 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>
---
 test/test/test.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/test/test/test.c b/test/test/test.c
index 0e6ff7c..fe41d40 100644
--- a/test/test/test.c
+++ b/test/test/test.c
@@ -162,8 +162,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.7.4

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

* [dpdk-stable] patch 'test/table: fix uninitialized parameter' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (119 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'test: register test as failed if setup failed' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'test/memzone: fix wrong test' " Yuanhan Liu
                   ` (35 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From e8875eecc35325fac7aea727899c5df094629c73 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>
---
 test/test/test_table_acl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/test/test_table_acl.c b/test/test/test_table_acl.c
index 08c100f..6fcf4cc 100644
--- a/test/test/test_table_acl.c
+++ b/test/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.7.4

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

* [dpdk-stable] patch 'test/memzone: fix wrong test' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (120 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'test/table: fix uninitialized parameter' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'test/memzone: fix NULL freeing' " Yuanhan Liu
                   ` (34 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 58b4dcdf7d6b6a10686ff681773059cae373b5d7 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>
---
 test/test/test_memzone.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/test/test/test_memzone.c b/test/test/test_memzone.c
index 1cf235a..49b6b68 100644
--- a/test/test/test_memzone.c
+++ b/test/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.7.4

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

* [dpdk-stable] patch 'test/memzone: fix NULL freeing' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (121 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'test/memzone: fix wrong test' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'test/memzone: fix freeing test' " Yuanhan Liu
                   ` (33 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Phil Yang; +Cc: Jianbo Liu, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 0d4f00ad24ebe525605190780a0c24182e1c5c68 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>
---
 test/test/test_memzone.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/test/test/test_memzone.c b/test/test/test_memzone.c
index 49b6b68..f734754 100644
--- a/test/test/test_memzone.c
+++ b/test/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.7.4

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

* [dpdk-stable] patch 'test/memzone: fix freeing test' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (122 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'test/memzone: fix NULL freeing' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'mbuf: fix performance of freeing with non atomic refcnt' " Yuanhan Liu
                   ` (32 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Phil Yang; +Cc: Jianbo Liu, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 44aa3126c7c088c5dac74bc0bcd235ad64ae9b9a 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>
---
 test/test/test_memzone.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/test/test_memzone.c b/test/test/test_memzone.c
index f734754..1115ee0 100644
--- a/test/test/test_memzone.c
+++ b/test/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.7.4

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

* [dpdk-stable] patch 'mbuf: fix performance of freeing with non atomic refcnt' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (123 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'test/memzone: fix freeing test' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'mempool/octeontx: fix natural alignment being optimized out' " Yuanhan Liu
                   ` (31 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Hanoch Haim, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 964b426f0087924f6d07d0009cf190d22a091e4f Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Fri, 8 Dec 2017 16:46:51 +0100
Subject: [PATCH] mbuf: fix performance of freeing with non atomic refcnt

[ upstream commit 6d714a237d8a306837a5f87711f9af9063376fed ]

When RTE_MBUF_REFCNT_ATOMIC=n, the decrement of the mbuf reference
counter uses an atomic operation. This is not necessary and impacts
the performance (seen with TRex traffic generator).

We cannot replace rte_atomic16_add_return() by rte_mbuf_refcnt_update()
because it would add an additional check.

Solves this by introducing __rte_mbuf_refcnt_update(), which
updates the reference counter without doing anything else.

Fixes: 8f094a9ac5d7 ("mbuf: set mbuf fields while in pool")

Suggested-by: Hanoch Haim <hhaim@cisco.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_mbuf/rte_mbuf.h | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index e5d7643..bf85124 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -765,6 +765,13 @@ rte_mbuf_refcnt_set(struct rte_mbuf *m, uint16_t new_value)
 	rte_atomic16_set(&m->refcnt_atomic, new_value);
 }
 
+/* internal */
+static inline uint16_t
+__rte_mbuf_refcnt_update(struct rte_mbuf *m, int16_t value)
+{
+	return (uint16_t)(rte_atomic16_add_return(&m->refcnt_atomic, value));
+}
+
 /**
  * Adds given value to an mbuf's refcnt and returns its new value.
  * @param m
@@ -789,19 +796,26 @@ rte_mbuf_refcnt_update(struct rte_mbuf *m, int16_t value)
 		return 1 + value;
 	}
 
-	return (uint16_t)(rte_atomic16_add_return(&m->refcnt_atomic, value));
+	return __rte_mbuf_refcnt_update(m, value);
 }
 
 #else /* ! RTE_MBUF_REFCNT_ATOMIC */
 
+/* internal */
+static inline uint16_t
+__rte_mbuf_refcnt_update(struct rte_mbuf *m, int16_t value)
+{
+	m->refcnt = (uint16_t)(m->refcnt + value);
+	return m->refcnt;
+}
+
 /**
  * Adds given value to an mbuf's refcnt and returns its new value.
  */
 static inline uint16_t
 rte_mbuf_refcnt_update(struct rte_mbuf *m, int16_t value)
 {
-	m->refcnt = (uint16_t)(m->refcnt + value);
-	return m->refcnt;
+	return __rte_mbuf_refcnt_update(m, value);
 }
 
 /**
@@ -1365,8 +1379,7 @@ rte_pktmbuf_prefree_seg(struct rte_mbuf *m)
 
 		return m;
 
-       } else if (rte_atomic16_add_return(&m->refcnt_atomic, -1) == 0) {
-
+	} else if (__rte_mbuf_refcnt_update(m, -1) == 0) {
 
 		if (RTE_MBUF_INDIRECT(m))
 			rte_pktmbuf_detach(m);
-- 
2.7.4

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

* [dpdk-stable] patch 'mempool/octeontx: fix natural alignment being optimized out' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (124 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'mbuf: fix performance of freeing with non atomic refcnt' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'member: fix memory leak on error' " Yuanhan Liu
                   ` (30 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Santosh Shukla, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 715ec77fa5fdfc89c52c30d671dd66442d64afb3 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Date: Thu, 18 Jan 2018 19:14:33 +0530
Subject: [PATCH] mempool/octeontx: fix natural alignment being optimized out

[ upstream commit 9ac7f8e57290df0e1d3da6c33010feb5ccb66dfb ]

The mbox messages are naturally aligned and in some cases compiler
optimization might disregard natural alignment.
Use volatile key word to force compiler to disable optimizing and
maintain alignment.

Fixes: aecb8e093b52 ("event/octeontx: introduce specialized mbox message copy")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
---
 drivers/mempool/octeontx/octeontx_mbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mempool/octeontx/octeontx_mbox.c b/drivers/mempool/octeontx/octeontx_mbox.c
index 6c69003..a38bfe6 100644
--- a/drivers/mempool/octeontx/octeontx_mbox.c
+++ b/drivers/mempool/octeontx/octeontx_mbox.c
@@ -89,7 +89,7 @@ struct mbox_ram_hdr {
 };
 
 static inline void
-mbox_msgcpy(uint8_t *d, const uint8_t *s, uint16_t size)
+mbox_msgcpy(volatile uint8_t *d, volatile const uint8_t *s, uint16_t size)
 {
 	uint16_t i;
 
-- 
2.7.4

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

* [dpdk-stable] patch 'member: fix memory leak on error' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (125 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'mempool/octeontx: fix natural alignment being optimized out' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'eventdev: set error code in port link/unlink functions' " Yuanhan Liu
                   ` (29 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Yipeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From d346286df3b5ca979ed1a4a8dfd0a294492f4ae7 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Fri, 12 Jan 2018 17:23:16 +0000
Subject: [PATCH] member: fix memory leak on error

[ upstream commit 5988076ac3393a0ca46e8dca0baa4d0c4f672b44 ]

rte_member may have allocated a tailq entry or setum before failure,
so free them.

Fixes: 857ed6c68cf2 ("member: implement main API")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
---
 lib/librte_member/rte_member.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/librte_member/rte_member.c b/lib/librte_member/rte_member.c
index cc9ea84..c3a238b 100644
--- a/lib/librte_member/rte_member.c
+++ b/lib/librte_member/rte_member.c
@@ -191,8 +191,9 @@ rte_member_create(const struct rte_member_parameters *params)
 	return setsum;
 
 error_unlock_exit:
+	rte_free(te);
+	rte_free(setsum);
 	rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK);
-	rte_member_free(setsum);
 	return NULL;
 }
 
-- 
2.7.4

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

* [dpdk-stable] patch 'eventdev: set error code in port link/unlink functions' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (126 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'member: fix memory leak on error' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'test/eventdev: use CPU event type' " Yuanhan Liu
                   ` (28 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Gage Eads; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 146c3669870b1400c369376872d2e1fe5e60b14e Mon Sep 17 00:00:00 2001
From: Gage Eads <gage.eads@intel.com>
Date: Tue, 14 Nov 2017 16:44:10 -0600
Subject: [PATCH] eventdev: set error code in port link/unlink functions

[ upstream commit c75f7897ea35aeb5fe8e2937733a071ea9304b99 ]

The return value for rte_event_port_{link, unlink}() is defined as the
"number of {links, unlinks} actually established." However, the eventdev
layer's error checking returns negative error values. This commit aligns
the eventdev code with the API definition by having it set rte_errno and
return 0 if it detects an error.

Fixes: 4f0804bbdfb9 ("eventdev: implement the northbound APIs")

Signed-off-by: Gage Eads <gage.eads@intel.com>
---
 lib/librte_eventdev/rte_eventdev.c     | 36 ++++++++++++++++++++++++----------
 lib/librte_eventdev/rte_eventdev_pmd.h |  8 ++++++++
 2 files changed, 34 insertions(+), 10 deletions(-)

diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c
index ce6a5dc..e0c2a78 100644
--- a/lib/librte_eventdev/rte_eventdev.c
+++ b/lib/librte_eventdev/rte_eventdev.c
@@ -832,13 +832,19 @@ rte_event_port_link(uint8_t dev_id, uint8_t port_id,
 	uint16_t *links_map;
 	int i, diag;
 
-	RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL);
+	RTE_EVENTDEV_VALID_DEVID_OR_ERRNO_RET(dev_id, -EINVAL, 0);
 	dev = &rte_eventdevs[dev_id];
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->port_link, -ENOTSUP);
+
+	if (*dev->dev_ops->port_link == NULL) {
+		RTE_PMD_DEBUG_TRACE("Function not supported\n");
+		rte_errno = -ENOTSUP;
+		return 0;
+	}
 
 	if (!is_valid_port(dev, port_id)) {
 		RTE_EDEV_LOG_ERR("Invalid port_id=%" PRIu8, port_id);
-		return -EINVAL;
+		rte_errno = -EINVAL;
+		return 0;
 	}
 
 	if (queues == NULL) {
@@ -857,8 +863,10 @@ rte_event_port_link(uint8_t dev_id, uint8_t port_id,
 	}
 
 	for (i = 0; i < nb_links; i++)
-		if (queues[i] >= dev->data->nb_queues)
-			return -EINVAL;
+		if (queues[i] >= dev->data->nb_queues) {
+			rte_errno = -EINVAL;
+			return 0;
+		}
 
 	diag = (*dev->dev_ops->port_link)(dev, dev->data->ports[port_id],
 						queues, priorities, nb_links);
@@ -883,13 +891,19 @@ rte_event_port_unlink(uint8_t dev_id, uint8_t port_id,
 	int i, diag;
 	uint16_t *links_map;
 
-	RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL);
+	RTE_EVENTDEV_VALID_DEVID_OR_ERRNO_RET(dev_id, -EINVAL, 0);
 	dev = &rte_eventdevs[dev_id];
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->port_unlink, -ENOTSUP);
+
+	if (*dev->dev_ops->port_unlink == NULL) {
+		RTE_PMD_DEBUG_TRACE("Function not supported\n");
+		rte_errno = -ENOTSUP;
+		return 0;
+	}
 
 	if (!is_valid_port(dev, port_id)) {
 		RTE_EDEV_LOG_ERR("Invalid port_id=%" PRIu8, port_id);
-		return -EINVAL;
+		rte_errno = -EINVAL;
+		return 0;
 	}
 
 	if (queues == NULL) {
@@ -900,8 +914,10 @@ rte_event_port_unlink(uint8_t dev_id, uint8_t port_id,
 	}
 
 	for (i = 0; i < nb_unlinks; i++)
-		if (queues[i] >= dev->data->nb_queues)
-			return -EINVAL;
+		if (queues[i] >= dev->data->nb_queues) {
+			rte_errno = -EINVAL;
+			return 0;
+		}
 
 	diag = (*dev->dev_ops->port_unlink)(dev, dev->data->ports[port_id],
 					queues, nb_unlinks);
diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h
index b78423d..64535f2 100644
--- a/lib/librte_eventdev/rte_eventdev_pmd.h
+++ b/lib/librte_eventdev/rte_eventdev_pmd.h
@@ -77,6 +77,14 @@ extern "C" {
 	} \
 } while (0)
 
+#define RTE_EVENTDEV_VALID_DEVID_OR_ERRNO_RET(dev_id, errno, retval) do { \
+	if (!rte_event_pmd_is_valid_dev((dev_id))) { \
+		RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
+		rte_errno = errno; \
+		return retval; \
+	} \
+} while (0)
+
 #define RTE_EVENTDEV_VALID_DEVID_OR_RET(dev_id) do { \
 	if (!rte_event_pmd_is_valid_dev((dev_id))) { \
 		RTE_EDEV_LOG_ERR("Invalid dev_id=%d\n", dev_id); \
-- 
2.7.4

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

* [dpdk-stable] patch 'test/eventdev: use CPU event type' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (127 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'eventdev: set error code in port link/unlink functions' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'event/sw: fix queue memory leak and multi-link bug' " Yuanhan Liu
                   ` (27 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Pavan Nikhilesh, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From f47ae7192182a3571fddeec22db3074eb3fa8824 Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Date: Mon, 4 Dec 2017 13:41:18 +0530
Subject: [PATCH] test/eventdev: use CPU event type

[ upstream commit 8f87757ab01874c37f690171d5d6b9fe243e0bc9 ]

octeontx test application was using non RTE_EVENT_TYPE_CPU
event type to generate the event from CPU.  Upon the introduction
of ethdev Rx adapter, RTE_EVENT_TYPE_ETHDEV has special
meaning. So avoid using non RTE_EVENT_TYPE_CPU event types
to inject events from CPU.

Fixes: d0d654986018 ("net/octeontx: support event Rx adapter")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 test/test/test_eventdev_octeontx.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/test/test_eventdev_octeontx.c b/test/test/test_eventdev_octeontx.c
index dbc36d9..8fddb4f 100644
--- a/test/test/test_eventdev_octeontx.c
+++ b/test/test/test_eventdev_octeontx.c
@@ -355,7 +355,7 @@ generate_random_events(const unsigned int total_events)
 	for (i = 0; i < total_events; i++) {
 		ret = inject_events(
 			rte_rand() % info.max_event_queue_flows /*flow_id */,
-			rte_rand() % (RTE_EVENT_TYPE_CPU + 1) /* event_type */,
+			RTE_EVENT_TYPE_CPU /* event_type */,
 			rte_rand() % 256 /* sub_event_type */,
 			rte_rand() % (RTE_SCHED_TYPE_PARALLEL + 1),
 			rte_rand() % queue_count /* queue */,
@@ -745,7 +745,7 @@ test_queue_to_port_single_link(void)
 
 		ret = inject_events(
 			0x100 /*flow_id */,
-			rte_rand() % (RTE_EVENT_TYPE_CPU + 1) /* event_type */,
+			RTE_EVENT_TYPE_CPU /* event_type */,
 			rte_rand() % 256 /* sub_event_type */,
 			rte_rand() % (RTE_SCHED_TYPE_PARALLEL + 1),
 			queue /* queue */,
@@ -824,7 +824,7 @@ test_queue_to_port_multi_link(void)
 
 		ret = inject_events(
 			0x100 /*flow_id */,
-			rte_rand() % (RTE_EVENT_TYPE_CPU + 1) /* event_type */,
+			RTE_EVENT_TYPE_CPU /* event_type */,
 			rte_rand() % 256 /* sub_event_type */,
 			rte_rand() % (RTE_SCHED_TYPE_PARALLEL + 1),
 			queue /* queue */,
-- 
2.7.4

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

* [dpdk-stable] patch 'event/sw: fix queue memory leak and multi-link bug' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (128 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'test/eventdev: use CPU event type' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'eventdev: fix doxygen comments' " Yuanhan Liu
                   ` (26 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Gage Eads; +Cc: Harry van Haaren, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 0adf9b4ffe82278e379cb6306f962490a6b872ce Mon Sep 17 00:00:00 2001
From: Gage Eads <gage.eads@intel.com>
Date: Wed, 29 Nov 2017 21:08:33 -0600
Subject: [PATCH] event/sw: fix queue memory leak and multi-link bug

[ upstream commit e1f2dcdb8f5c01bb1296c5c6c03d39cdf368b91a ]

This commit reinitializes a queue before it is reconfigured, such that
reorder buffer memory is not leaked.

This bug masked a few other problems, which this commit corrects as well:
- sw_port_link() allowed a port to link to a queue twice, such that the
  port could then successfully unlink the queue twice. Now the link
  function checks whether a port is already linked to the queue, and if so
  returns success but doesn't assign the a port a second slot in the
  queue's cq map.
- test_eventdev.c's test_eventdev_unlink() was unlinking a queue twice
  from the same port, and expecting the second unlink to succeed. Now the
  test unlinks, links, then unlinks again.
- test_eventdev.c's test_eventdev_link_get() was linking a single queue but
  expecting the unlink function to return nb_queues (where nb_queues > 1).
  The test now checks for a return value of 1.

Fixes: 5ffb2f142d95 ("event/sw: support event queues")
Fixes: 371a688fc159 ("event/sw: support linking queues to ports")
Fixes: f8f9d233ea0e ("test/eventdev: add unit tests")

Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 drivers/event/sw/sw_evdev.c | 46 +++++++++++++++++++++++++++++----------------
 test/test/test_eventdev.c   |  7 +++++--
 2 files changed, 35 insertions(+), 18 deletions(-)

diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index fd11079..d989346 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -62,6 +62,7 @@ sw_port_link(struct rte_eventdev *dev, void *port, const uint8_t queues[],
 	RTE_SET_USED(priorities);
 	for (i = 0; i < num; i++) {
 		struct sw_qid *q = &sw->qids[queues[i]];
+		unsigned int j;
 
 		/* check for qid map overflow */
 		if (q->cq_num_mapped_cqs >= RTE_DIM(q->cq_map)) {
@@ -74,6 +75,15 @@ sw_port_link(struct rte_eventdev *dev, void *port, const uint8_t queues[],
 			break;
 		}
 
+		for (j = 0; j < q->cq_num_mapped_cqs; j++) {
+			if (q->cq_map[j] == p->id)
+				break;
+		}
+
+		/* check if port is already linked */
+		if (j < q->cq_num_mapped_cqs)
+			continue;
+
 		if (q->type == SW_SCHED_TYPE_DIRECT) {
 			/* check directed qids only map to one port */
 			if (p->num_qids_mapped > 0) {
@@ -338,6 +348,23 @@ cleanup:
 	return -EINVAL;
 }
 
+static void
+sw_queue_release(struct rte_eventdev *dev, uint8_t id)
+{
+	struct sw_evdev *sw = sw_pmd_priv(dev);
+	struct sw_qid *qid = &sw->qids[id];
+	uint32_t i;
+
+	for (i = 0; i < SW_IQS_MAX; i++)
+		iq_ring_destroy(qid->iq[i]);
+
+	if (qid->type == RTE_SCHED_TYPE_ORDERED) {
+		rte_free(qid->reorder_buffer);
+		rte_ring_free(qid->reorder_buffer_freelist);
+	}
+	memset(qid, 0, sizeof(*qid));
+}
+
 static int
 sw_queue_setup(struct rte_eventdev *dev, uint8_t queue_id,
 		const struct rte_event_queue_conf *conf)
@@ -355,24 +382,11 @@ sw_queue_setup(struct rte_eventdev *dev, uint8_t queue_id,
 	}
 
 	struct sw_evdev *sw = sw_pmd_priv(dev);
-	return qid_init(sw, queue_id, type, conf);
-}
-
-static void
-sw_queue_release(struct rte_eventdev *dev, uint8_t id)
-{
-	struct sw_evdev *sw = sw_pmd_priv(dev);
-	struct sw_qid *qid = &sw->qids[id];
-	uint32_t i;
 
-	for (i = 0; i < SW_IQS_MAX; i++)
-		iq_ring_destroy(qid->iq[i]);
+	if (sw->qids[queue_id].initialized)
+		sw_queue_release(dev, queue_id);
 
-	if (qid->type == RTE_SCHED_TYPE_ORDERED) {
-		rte_free(qid->reorder_buffer);
-		rte_ring_free(qid->reorder_buffer_freelist);
-	}
-	memset(qid, 0, sizeof(*qid));
+	return qid_init(sw, queue_id, type, conf);
 }
 
 static void
diff --git a/test/test/test_eventdev.c b/test/test/test_eventdev.c
index ba39cba..1ed2a1d 100644
--- a/test/test/test_eventdev.c
+++ b/test/test/test_eventdev.c
@@ -839,6 +839,9 @@ test_eventdev_unlink(void)
 	for (i = 0; i < nb_queues; i++)
 		queues[i] = i;
 
+	ret = rte_event_port_link(TEST_DEV_ID, 0, NULL, NULL, 0);
+	TEST_ASSERT(ret >= 0, "Failed to link with NULL device%d",
+				 TEST_DEV_ID);
 
 	ret = rte_event_port_unlink(TEST_DEV_ID, 0, queues, nb_queues);
 	TEST_ASSERT(ret == nb_queues, "Failed to unlink(device%d) ret=%d",
@@ -899,9 +902,9 @@ test_eventdev_link_get(void)
 	ret = rte_event_port_links_get(TEST_DEV_ID, 0, queues, priorities);
 	TEST_ASSERT(ret == 1, "(%d)Wrong link get ret=%d expected=%d",
 					TEST_DEV_ID, ret, 1);
-	/* unlink all*/
+	/* unlink the queue */
 	ret = rte_event_port_unlink(TEST_DEV_ID, 0, NULL, 0);
-	TEST_ASSERT(ret == nb_queues, "Failed to unlink(device%d) ret=%d",
+	TEST_ASSERT(ret == 1, "Failed to unlink(device%d) ret=%d",
 				 TEST_DEV_ID, ret);
 
 	/* 4links and 2 unlinks */
-- 
2.7.4

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

* [dpdk-stable] patch 'eventdev: fix doxygen comments' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (129 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'event/sw: fix queue memory leak and multi-link bug' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'bus/pci: forbid IOVA mode if IOMMU address width too small' " Yuanhan Liu
                   ` (25 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Kevin Laatz, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 631ecfdf369397f1e04d79aabf1f349036ce9e07 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Date: Sat, 9 Dec 2017 20:10:07 +0530
Subject: [PATCH] eventdev: fix doxygen comments

[ upstream commit aa01e4cfcf5235ea6c0d43182dc1742fcc8cae75 ]

Fix doxygen return values and indentation.

Fixes: 64103dbcd673 ("eventdev: add dev attribute get function")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
---
 lib/librte_eventdev/rte_eventdev.h | 50 ++++++++++++++++++++++----------------
 1 file changed, 29 insertions(+), 21 deletions(-)

diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
index 9134b49..eb1024d 100644
--- a/lib/librte_eventdev/rte_eventdev.h
+++ b/lib/librte_eventdev/rte_eventdev.h
@@ -421,9 +421,9 @@ rte_event_dev_info_get(uint8_t dev_id, struct rte_event_dev_info *dev_info);
  * @param[out] attr_value A pointer that will be filled in with the attribute
  *             value if successful.
  *
- * @retval 0 Successfully retrieved attribute value
- *         -EINVAL Invalid device or  *attr_id* provided, or *attr_value*
- *         is NULL
+ * @return
+ *   - 0: Successfully retrieved attribute value
+ *   - -EINVAL: Invalid device or  *attr_id* provided, or *attr_value* is NULL
  */
 int
 rte_event_dev_attr_get(uint8_t dev_id, uint32_t attr_id,
@@ -641,18 +641,22 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id,
 /**
  * Get an attribute from a queue.
  *
- * @param dev_id Eventdev id
- * @param queue_id Eventdev queue id
- * @param attr_id The attribute ID to retrieve
- * @param[out] attr_value A pointer that will be filled in with the attribute
- *             value if successful
+ * @param dev_id
+ *   Eventdev id
+ * @param queue_id
+ *   Eventdev queue id
+ * @param attr_id
+ *   The attribute ID to retrieve
+ * @param[out] attr_value
+ *   A pointer that will be filled in with the attribute value if successful
  *
- * @retval 0 Successfully returned value
- *         -EINVAL invalid device, queue or attr_id provided, or attr_value
- *         was NULL
- *         -EOVERFLOW returned when attr_id is set to
- *         RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE and event_queue_cfg is set to
- *         RTE_EVENT_QUEUE_CFG_ALL_TYPES
+ * @return
+ *   - 0: Successfully returned value
+ *   - -EINVAL: invalid device, queue or attr_id provided, or attr_value was
+ *		NULL
+ *   - -EOVERFLOW: returned when attr_id is set to
+ *   RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE and event_queue_cfg is set to
+ *   RTE_EVENT_QUEUE_CFG_ALL_TYPES
  */
 int
 rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,
@@ -755,14 +759,18 @@ rte_event_port_setup(uint8_t dev_id, uint8_t port_id,
 /**
  * Get an attribute from a port.
  *
- * @param dev_id Eventdev id
- * @param port_id Eventdev port id
- * @param attr_id The attribute ID to retrieve
- * @param[out] attr_value A pointer that will be filled in with the attribute
- *             value if successful
+ * @param dev_id
+ *   Eventdev id
+ * @param port_id
+ *   Eventdev port id
+ * @param attr_id
+ *   The attribute ID to retrieve
+ * @param[out] attr_value
+ *   A pointer that will be filled in with the attribute value if successful
  *
- * @retval 0 Successfully returned value
- *         -EINVAL Invalid device, port or attr_id, or attr_value was NULL
+ * @return
+ *   - 0: Successfully returned value
+ *   - (-EINVAL) Invalid device, port or attr_id, or attr_value was NULL
  */
 int
 rte_event_port_attr_get(uint8_t dev_id, uint8_t port_id, uint32_t attr_id,
-- 
2.7.4

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

* [dpdk-stable] patch 'bus/pci: forbid IOVA mode if IOMMU address width too small' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (130 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'eventdev: fix doxygen comments' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'doc: fix lists of supported crypto algorithms' " Yuanhan Liu
                   ` (24 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Chas Williams, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 3a88f146b4e8fff0b643dfd68f5d97f2c3217a3d Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Fri, 12 Jan 2018 11:22:20 +0100
Subject: [PATCH] bus/pci: forbid IOVA mode if IOMMU address width too small

[ upstream commit 54a328f552ff2e0098c3f96f9e32302675f2bcf4 ]

Intel VT-d supports different address widths for the IOVAs, from
39 bits to 56 bits.

While recent processors support at least 48 bits, VT-d emulation
currently only supports 39 bits. It makes DMA mapping to fail in this
case when using VA as IOVA mode, as user-space virtual addresses uses
up to 47 bits (see kernel's Documentation/x86/x86_64/mm.txt).

This patch parses VT-d CAP register value available in sysfs, and
forbid VA as IOVA mode if the GAW is 39 bits or unknown.

Fixes: f37dfab21c98 ("drivers/net: enable IOVA mode for Intel PMDs")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Chas Williams <chas3@att.com>
---
 drivers/bus/pci/linux/pci.c | 90 ++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 81 insertions(+), 9 deletions(-)

diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index ec31216..74deef3 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -576,6 +576,82 @@ pci_one_device_has_iova_va(void)
 	return 0;
 }
 
+#if defined(RTE_ARCH_X86)
+static bool
+pci_one_device_iommu_support_va(struct rte_pci_device *dev)
+{
+#define VTD_CAP_MGAW_SHIFT	16
+#define VTD_CAP_MGAW_MASK	(0x3fULL << VTD_CAP_MGAW_SHIFT)
+#define X86_VA_WIDTH 47 /* From Documentation/x86/x86_64/mm.txt */
+	struct rte_pci_addr *addr = &dev->addr;
+	char filename[PATH_MAX];
+	FILE *fp;
+	uint64_t mgaw, vtd_cap_reg = 0;
+
+	snprintf(filename, sizeof(filename),
+		 "%s/" PCI_PRI_FMT "/iommu/intel-iommu/cap",
+		 rte_pci_get_sysfs_path(), addr->domain, addr->bus, addr->devid,
+		 addr->function);
+	if (access(filename, F_OK) == -1) {
+		/* We don't have an Intel IOMMU, assume VA supported*/
+		return true;
+	}
+
+	/* We have an intel IOMMU */
+	fp = fopen(filename, "r");
+	if (fp == NULL) {
+		RTE_LOG(ERR, EAL, "%s(): can't open %s\n", __func__, filename);
+		return false;
+	}
+
+	if (fscanf(fp, "%" PRIx64, &vtd_cap_reg) != 1) {
+		RTE_LOG(ERR, EAL, "%s(): can't read %s\n", __func__, filename);
+		fclose(fp);
+		return false;
+	}
+
+	fclose(fp);
+
+	mgaw = ((vtd_cap_reg & VTD_CAP_MGAW_MASK) >> VTD_CAP_MGAW_SHIFT) + 1;
+	if (mgaw < X86_VA_WIDTH)
+		return false;
+
+	return true;
+}
+#elif defined(RTE_ARCH_PPC_64)
+static bool
+pci_one_device_iommu_support_va(__rte_unused struct rte_pci_device *dev)
+{
+	return false;
+}
+#else
+static bool
+pci_one_device_iommu_support_va(__rte_unused struct rte_pci_device *dev)
+{
+	return true;
+}
+#endif
+
+/*
+ * All devices IOMMUs support VA as IOVA
+ */
+static bool
+pci_devices_iommu_support_va(void)
+{
+	struct rte_pci_device *dev = NULL;
+	struct rte_pci_driver *drv = NULL;
+
+	FOREACH_DRIVER_ON_PCIBUS(drv) {
+		FOREACH_DEVICE_ON_PCIBUS(dev) {
+			if (!rte_pci_match(drv, dev))
+				continue;
+			if (!pci_one_device_iommu_support_va(dev))
+				return false;
+		}
+	}
+	return true;
+}
+
 /*
  * Get iommu class of PCI devices on the bus.
  */
@@ -586,12 +662,7 @@ rte_pci_get_iommu_class(void)
 	bool is_vfio_noiommu_enabled = true;
 	bool has_iova_va;
 	bool is_bound_uio;
-	bool spapr_iommu =
-#if defined(RTE_ARCH_PPC_64)
-		true;
-#else
-		false;
-#endif
+	bool iommu_no_va;
 
 	is_bound = pci_one_device_is_bound();
 	if (!is_bound)
@@ -599,13 +670,14 @@ rte_pci_get_iommu_class(void)
 
 	has_iova_va = pci_one_device_has_iova_va();
 	is_bound_uio = pci_one_device_bound_uio();
+	iommu_no_va = !pci_devices_iommu_support_va();
 #ifdef VFIO_PRESENT
 	is_vfio_noiommu_enabled = rte_vfio_noiommu_is_enabled() == true ?
 					true : false;
 #endif
 
 	if (has_iova_va && !is_bound_uio && !is_vfio_noiommu_enabled &&
-			!spapr_iommu)
+			!iommu_no_va)
 		return RTE_IOVA_VA;
 
 	if (has_iova_va) {
@@ -614,8 +686,8 @@ rte_pci_get_iommu_class(void)
 			RTE_LOG(WARNING, EAL, "vfio-noiommu mode configured\n");
 		if (is_bound_uio)
 			RTE_LOG(WARNING, EAL, "few device bound to UIO\n");
-		if (spapr_iommu)
-			RTE_LOG(WARNING, EAL, "sPAPR IOMMU does not support IOVA as VA\n");
+		if (iommu_no_va)
+			RTE_LOG(WARNING, EAL, "IOMMU does not support IOVA as VA\n");
 	}
 
 	return RTE_IOVA_PA;
-- 
2.7.4

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

* [dpdk-stable] patch 'doc: fix lists of supported crypto algorithms' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (131 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'bus/pci: forbid IOVA mode if IOMMU address width too small' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'doc: fix format in OpenSSL installation guide' " Yuanhan Liu
                   ` (23 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Andrea Grandi; +Cc: Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From e46d579a4867369bee052f51c269d37553c7c617 Mon Sep 17 00:00:00 2001
From: Andrea Grandi <andrea.grandi@intel.com>
Date: Wed, 22 Nov 2017 10:03:11 -0800
Subject: [PATCH] doc: fix lists of supported crypto algorithms

[ upstream commit 655c901bf7345e2eb7e2bb603a6c30ac6feff3c9 ]

Add a missing space must before the first item of the list to display it
correctly in the User Guide.

Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")
Fixes: b79e4c00af0e ("cryptodev: use AES-GCM/CCM as AEAD algorithms")

Signed-off-by: Andrea Grandi <andrea.grandi@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/cryptodevs/openssl.rst | 3 +++
 doc/guides/cryptodevs/qat.rst     | 1 +
 2 files changed, 4 insertions(+)

diff --git a/doc/guides/cryptodevs/openssl.rst b/doc/guides/cryptodevs/openssl.rst
index 243ea36..7b455ed 100644
--- a/doc/guides/cryptodevs/openssl.rst
+++ b/doc/guides/cryptodevs/openssl.rst
@@ -44,6 +44,7 @@ Features
 OpenSSL PMD has support for:
 
 Supported cipher algorithms:
+
 * ``RTE_CRYPTO_CIPHER_3DES_CBC``
 * ``RTE_CRYPTO_CIPHER_AES_CBC``
 * ``RTE_CRYPTO_CIPHER_AES_CTR``
@@ -51,6 +52,7 @@ Supported cipher algorithms:
 * ``RTE_CRYPTO_CIPHER_DES_DOCSISBPI``
 
 Supported authentication algorithms:
+
 * ``RTE_CRYPTO_AUTH_AES_GMAC``
 * ``RTE_CRYPTO_AUTH_MD5``
 * ``RTE_CRYPTO_AUTH_SHA1``
@@ -66,6 +68,7 @@ Supported authentication algorithms:
 * ``RTE_CRYPTO_AUTH_SHA512_HMAC``
 
 Supported AEAD algorithms:
+
 * ``RTE_CRYPTO_AEAD_AES_GCM``
 * ``RTE_CRYPTO_AEAD_AES_CCM``
 
diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst
index cb17b6b..581cd2f 100644
--- a/doc/guides/cryptodevs/qat.rst
+++ b/doc/guides/cryptodevs/qat.rst
@@ -78,6 +78,7 @@ Hash algorithms:
 * ``RTE_CRYPTO_AUTH_ZUC_EIA3``
 
 Supported AEAD algorithms:
+
 * ``RTE_CRYPTO_AEAD_AES_GCM``
 
 
-- 
2.7.4

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

* [dpdk-stable] patch 'doc: fix format in OpenSSL installation guide' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (132 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'doc: fix lists of supported crypto algorithms' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'test/crypto: fix missing include' " Yuanhan Liu
                   ` (22 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Andrea Grandi; +Cc: Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 6f2bffc368f703cad68476ffcbc5fe8deabeee20 Mon Sep 17 00:00:00 2001
From: Andrea Grandi <andrea.grandi@intel.com>
Date: Wed, 22 Nov 2017 10:03:12 -0800
Subject: [PATCH] doc: fix format in OpenSSL installation guide

[ upstream commit 37553e5f25e872f6d01693f979ae927e4371a04b ]

List of supported OpenSSL versions and code block with dependencies were
not properly formatted.

Fixes: d61f70b4c918 ("crypto/libcrypto: add driver for OpenSSL library")

Signed-off-by: Andrea Grandi <andrea.grandi@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/cryptodevs/openssl.rst | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/doc/guides/cryptodevs/openssl.rst b/doc/guides/cryptodevs/openssl.rst
index 7b455ed..61a4da3 100644
--- a/doc/guides/cryptodevs/openssl.rst
+++ b/doc/guides/cryptodevs/openssl.rst
@@ -80,17 +80,23 @@ To compile openssl PMD, it has to be enabled in the config/common_base file
 and appropriate openssl packages have to be installed in the build environment.
 
 The newest openssl library version is supported:
+
 * 1.0.2h-fips  3 May 2016.
+
 Older versions that were also verified:
+
 * 1.0.1f 6 Jan 2014
 * 1.0.1 14 Mar 2012
 
 For Ubuntu 14.04 LTS these packages have to be installed in the build system:
-sudo apt-get install openssl
-sudo apt-get install libc6-dev-i386 (for i686-native-linuxapp-gcc target)
+
+.. code-block:: console
+
+    sudo apt-get install openssl
+    sudo apt-get install libc6-dev-i386 # for i686-native-linuxapp-gcc target
 
 This code was also verified on Fedora 24.
-This code was NOT yet verified on FreeBSD.
+This code has NOT been verified on FreeBSD yet.
 
 Initialization
 --------------
-- 
2.7.4

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

* [dpdk-stable] patch 'test/crypto: fix missing include' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (133 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'doc: fix format in OpenSSL installation guide' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix usage of incorrect port' " Yuanhan Liu
                   ` (21 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From d4779d2c006d8d31b9b9f268736ce9ba0e027604 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>
---
 test/test/test_cryptodev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 1bed65d..7997b48 100644
--- a/test/test/test_cryptodev.c
+++ b/test/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.7.4

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

* [dpdk-stable] patch 'examples/ipsec-secgw: fix usage of incorrect port' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (134 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'test/crypto: fix missing include' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'security: fix device operation type' " Yuanhan Liu
                   ` (20 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Anoob Joseph; +Cc: Akhil Goyal, Radu Nicolau, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 24c54aaf0970b969bddea44485d6ea7180e37dee Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Date: Tue, 12 Dec 2017 08:32:25 +0000
Subject: [PATCH] examples/ipsec-secgw: fix usage of incorrect port

[ upstream commit 3de3a0418c35deb9a0dd657701b6a22fb6dcb4db ]

When security offload is enabled, the packet should be forwarded on the
port configured in the SA. Security session will be configured on that
port only, and sending the packet on other ports could result in
unencrypted packets being sent out.

This would have performance improvements too, as the per packet LPM
lookup would be avoided for IPsec packets, in inline mode.

Fixes: ec17993a145a ("examples/ipsec-secgw: support security offload")

Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
---
 doc/guides/sample_app_ug/ipsec_secgw.rst |  10 ++-
 examples/ipsec-secgw/ipsec-secgw.c       | 101 ++++++++++++++++++++++++++-----
 2 files changed, 96 insertions(+), 15 deletions(-)

diff --git a/doc/guides/sample_app_ug/ipsec_secgw.rst b/doc/guides/sample_app_ug/ipsec_secgw.rst
index d6cfdbf..ae18acd 100644
--- a/doc/guides/sample_app_ug/ipsec_secgw.rst
+++ b/doc/guides/sample_app_ug/ipsec_secgw.rst
@@ -61,6 +61,12 @@ In case of complete protocol offload, the processing of headers(ESP and outer
 IP header) is done by the hardware and the application does not need to
 add/remove them during outbound/inbound processing.
 
+For inline offloaded outbound traffic, the application will not do the LPM
+lookup for routing, as the port on which the packet has to be forwarded will be
+part of the SA. Security parameters will be configured on that port only, and
+sending the packet on other ports could result in unencrypted packets being
+sent out.
+
 The Path for IPsec Inbound traffic is:
 
 *  Read packets from the port.
@@ -543,7 +549,9 @@ where each options means:
  ``<port_id>``
 
  * Port/device ID of the ethernet/crypto accelerator for which the SA is
-   configured. This option is used when *type* is NOT *no-offload*
+   configured. For *inline-crypto-offload* and *inline-protocol-offload*, this
+   port will be used for routing. The routing table will not be referred in
+   this case.
 
  * Optional: No, if *type* is not *no-offload*
 
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index c98454a..2a406ab 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -585,31 +585,81 @@ process_pkts_outbound_nosp(struct ipsec_ctx *ipsec_ctx,
 		traffic->ip6.num = nb_pkts_out;
 }
 
+static inline int32_t
+get_hop_for_offload_pkt(struct rte_mbuf *pkt, int is_ipv6)
+{
+	struct ipsec_mbuf_metadata *priv;
+	struct ipsec_sa *sa;
+
+	priv = get_priv(pkt);
+
+	sa = priv->sa;
+	if (unlikely(sa == NULL)) {
+		RTE_LOG(ERR, IPSEC, "SA not saved in private data\n");
+		goto fail;
+	}
+
+	if (is_ipv6)
+		return sa->portid;
+
+	/* else */
+	return (sa->portid | RTE_LPM_LOOKUP_SUCCESS);
+
+fail:
+	if (is_ipv6)
+		return -1;
+
+	/* else */
+	return 0;
+}
+
 static inline void
 route4_pkts(struct rt_ctx *rt_ctx, struct rte_mbuf *pkts[], uint8_t nb_pkts)
 {
 	uint32_t hop[MAX_PKT_BURST * 2];
 	uint32_t dst_ip[MAX_PKT_BURST * 2];
+	int32_t pkt_hop = 0;
 	uint16_t i, offset;
+	uint16_t lpm_pkts = 0;
 
 	if (nb_pkts == 0)
 		return;
 
+	/* Need to do an LPM lookup for non-inline packets. Inline packets will
+	 * have port ID in the SA
+	 */
+
 	for (i = 0; i < nb_pkts; i++) {
-		offset = offsetof(struct ip, ip_dst);
-		dst_ip[i] = *rte_pktmbuf_mtod_offset(pkts[i],
-				uint32_t *, offset);
-		dst_ip[i] = rte_be_to_cpu_32(dst_ip[i]);
+		if (!(pkts[i]->ol_flags & PKT_TX_SEC_OFFLOAD)) {
+			/* Security offload not enabled. So an LPM lookup is
+			 * required to get the hop
+			 */
+			offset = offsetof(struct ip, ip_dst);
+			dst_ip[lpm_pkts] = *rte_pktmbuf_mtod_offset(pkts[i],
+					uint32_t *, offset);
+			dst_ip[lpm_pkts] = rte_be_to_cpu_32(dst_ip[lpm_pkts]);
+			lpm_pkts++;
+		}
 	}
 
-	rte_lpm_lookup_bulk((struct rte_lpm *)rt_ctx, dst_ip, hop, nb_pkts);
+	rte_lpm_lookup_bulk((struct rte_lpm *)rt_ctx, dst_ip, hop, lpm_pkts);
+
+	lpm_pkts = 0;
 
 	for (i = 0; i < nb_pkts; i++) {
-		if ((hop[i] & RTE_LPM_LOOKUP_SUCCESS) == 0) {
+		if (pkts[i]->ol_flags & PKT_TX_SEC_OFFLOAD) {
+			/* Read hop from the SA */
+			pkt_hop = get_hop_for_offload_pkt(pkts[i], 0);
+		} else {
+			/* Need to use hop returned by lookup */
+			pkt_hop = hop[lpm_pkts++];
+		}
+
+		if ((pkt_hop & RTE_LPM_LOOKUP_SUCCESS) == 0) {
 			rte_pktmbuf_free(pkts[i]);
 			continue;
 		}
-		send_single_packet(pkts[i], hop[i] & 0xff);
+		send_single_packet(pkts[i], pkt_hop & 0xff);
 	}
 }
 
@@ -619,26 +669,49 @@ route6_pkts(struct rt_ctx *rt_ctx, struct rte_mbuf *pkts[], uint8_t nb_pkts)
 	int32_t hop[MAX_PKT_BURST * 2];
 	uint8_t dst_ip[MAX_PKT_BURST * 2][16];
 	uint8_t *ip6_dst;
+	int32_t pkt_hop = 0;
 	uint16_t i, offset;
+	uint16_t lpm_pkts = 0;
 
 	if (nb_pkts == 0)
 		return;
 
+	/* Need to do an LPM lookup for non-inline packets. Inline packets will
+	 * have port ID in the SA
+	 */
+
 	for (i = 0; i < nb_pkts; i++) {
-		offset = offsetof(struct ip6_hdr, ip6_dst);
-		ip6_dst = rte_pktmbuf_mtod_offset(pkts[i], uint8_t *, offset);
-		memcpy(&dst_ip[i][0], ip6_dst, 16);
+		if (!(pkts[i]->ol_flags & PKT_TX_SEC_OFFLOAD)) {
+			/* Security offload not enabled. So an LPM lookup is
+			 * required to get the hop
+			 */
+			offset = offsetof(struct ip6_hdr, ip6_dst);
+			ip6_dst = rte_pktmbuf_mtod_offset(pkts[i], uint8_t *,
+					offset);
+			memcpy(&dst_ip[lpm_pkts][0], ip6_dst, 16);
+			lpm_pkts++;
+		}
 	}
 
-	rte_lpm6_lookup_bulk_func((struct rte_lpm6 *)rt_ctx, dst_ip,
-			hop, nb_pkts);
+	rte_lpm6_lookup_bulk_func((struct rte_lpm6 *)rt_ctx, dst_ip, hop,
+			lpm_pkts);
+
+	lpm_pkts = 0;
 
 	for (i = 0; i < nb_pkts; i++) {
-		if (hop[i] == -1) {
+		if (pkts[i]->ol_flags & PKT_TX_SEC_OFFLOAD) {
+			/* Read hop from the SA */
+			pkt_hop = get_hop_for_offload_pkt(pkts[i], 1);
+		} else {
+			/* Need to use hop returned by lookup */
+			pkt_hop = hop[lpm_pkts++];
+		}
+
+		if (pkt_hop == -1) {
 			rte_pktmbuf_free(pkts[i]);
 			continue;
 		}
-		send_single_packet(pkts[i], hop[i] & 0xff);
+		send_single_packet(pkts[i], pkt_hop & 0xff);
 	}
 }
 
-- 
2.7.4

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

* [dpdk-stable] patch 'security: fix device operation type' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (135 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix usage of incorrect port' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'crypto: fix pedantic compilation' " Yuanhan Liu
                   ` (19 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Nélio Laranjeiro; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From a32d8608296efa5352467417a38c8f0433d9b9f8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= <nelio.laranjeiro@6wind.com>
Date: Thu, 23 Nov 2017 11:02:37 +0100
Subject: [PATCH] security: fix device operation type

[ upstream commit 9265ef805d461943be406bcfcc7684c8346ff995 ]

Device operation pointers should be constant to avoid any modification
while it is in use.

Fixes: c261d1431bd8 ("security: introduce security API and framework")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 lib/librte_security/rte_security.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_security/rte_security.h b/lib/librte_security/rte_security.h
index 653929b..629f547 100644
--- a/lib/librte_security/rte_security.h
+++ b/lib/librte_security/rte_security.h
@@ -94,7 +94,7 @@ enum rte_security_ipsec_tunnel_type {
 struct rte_security_ctx {
 	void *device;
 	/**< Crypto/ethernet device attached */
-	struct rte_security_ops *ops;
+	const struct rte_security_ops *ops;
 	/**< Pointer to security ops for the device */
 	uint16_t sess_cnt;
 	/**< Number of sessions attached to this context */
-- 
2.7.4

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

* [dpdk-stable] patch 'crypto: fix pedantic compilation' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (136 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'security: fix device operation type' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'security: " Yuanhan Liu
                   ` (18 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Nélio Laranjeiro; +Cc: Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 7204857e14c01572564e63801013f698d893e16d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= <nelio.laranjeiro@6wind.com>
Date: Thu, 23 Nov 2017 11:02:38 +0100
Subject: [PATCH] crypto: fix pedantic compilation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 81c8dff2fd3d5d0f32961002011187ca92d3fef5 ]

/x86_64-native-linuxapp-gcc/include/rte_crypto.h:126:28:
error: ISO C forbids zero-size array ‘sym’ [-Werror=pedantic]
   struct rte_crypto_sym_op sym[0];
                            ^~~
Zero-size array is an extension to the language it cannot be replaced by a
empty size array i.e. [] because structure is inside a union.

Fixes: d2a4223c4c6d ("cryptodev: do not store pointer to op specific params")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 lib/librte_cryptodev/rte_crypto.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_cryptodev/rte_crypto.h b/lib/librte_cryptodev/rte_crypto.h
index 3d672fe..6f0b297 100644
--- a/lib/librte_cryptodev/rte_crypto.h
+++ b/lib/librte_cryptodev/rte_crypto.h
@@ -121,7 +121,7 @@ struct rte_crypto_op {
 	rte_iova_t phys_addr;
 	/**< physical address of crypto operation */
 
-	RTE_STD_C11
+	__extension__
 	union {
 		struct rte_crypto_sym_op sym[0];
 		/**< Symmetric operation parameters */
-- 
2.7.4

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

* [dpdk-stable] patch 'security: fix pedantic compilation' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (137 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'crypto: fix pedantic compilation' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'security: fix enum start value' " Yuanhan Liu
                   ` (17 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Nélio Laranjeiro; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 8168c08caa8146249a6f9ba504e038d3c0f49e98 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= <nelio.laranjeiro@6wind.com>
Date: Thu, 23 Nov 2017 11:02:39 +0100
Subject: [PATCH] security: fix pedantic compilation

[ upstream commit 9ee625c2cfaa2bd0e0b8f8beecdd3ed0a06e8cd5 ]

/x86_64-native-linuxapp-gcc/include/rte_security.h:229:8:
error: struct has no members [-Werror=pedantic]
  struct rte_security_macsec_xform {
         ^~~~~~~~~~~~~~~~~~~~~~~~~
/x86_64-native-linuxapp-gcc/include/rte_security.h:453:3:
error: struct has no members [-Werror=pedantic]
    struct {
    ^~~~~~

Fixes: c261d1431bd8 ("security: introduce security API and framework")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 lib/librte_security/rte_security.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_security/rte_security.h b/lib/librte_security/rte_security.h
index 629f547..fc4cec2 100644
--- a/lib/librte_security/rte_security.h
+++ b/lib/librte_security/rte_security.h
@@ -228,6 +228,7 @@ struct rte_security_ipsec_xform {
  */
 struct rte_security_macsec_xform {
 	/** To be Filled */
+	int dummy;
 };
 
 /**
@@ -452,6 +453,7 @@ struct rte_security_capability {
 		/**< IPsec capability */
 		struct {
 			/* To be Filled */
+			int dummy;
 		} macsec;
 		/**< MACsec capability */
 	};
-- 
2.7.4

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

* [dpdk-stable] patch 'security: fix enum start value' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (138 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'security: " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'cryptodev: add missing CPU flag string' " Yuanhan Liu
                   ` (16 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Akhil Goyal; +Cc: Radu Nicolau, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 4adcb83f10458d54197bf47f8fd93026c41d01f4 Mon Sep 17 00:00:00 2001
From: Akhil Goyal <akhil.goyal@nxp.com>
Date: Wed, 13 Dec 2017 12:45:08 +0530
Subject: [PATCH] security: fix enum start value

[ upstream commit 009ac7157c940194b862be6e8a08acae37383090 ]

enum should be initialized with 1 so that unitialized(memset)
memory may not be treated as a valid enum value.

Fixes: c261d1431bd8 ("security: introduce security API and framework")

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
---
 lib/librte_security/rte_security.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_security/rte_security.h b/lib/librte_security/rte_security.h
index fc4cec2..2b609cb 100644
--- a/lib/librte_security/rte_security.h
+++ b/lib/librte_security/rte_security.h
@@ -60,7 +60,7 @@ extern "C" {
 
 /** IPSec protocol mode */
 enum rte_security_ipsec_sa_mode {
-	RTE_SECURITY_IPSEC_SA_MODE_TRANSPORT,
+	RTE_SECURITY_IPSEC_SA_MODE_TRANSPORT = 1,
 	/**< IPSec Transport mode */
 	RTE_SECURITY_IPSEC_SA_MODE_TUNNEL,
 	/**< IPSec Tunnel mode */
@@ -68,7 +68,7 @@ enum rte_security_ipsec_sa_mode {
 
 /** IPSec Protocol */
 enum rte_security_ipsec_sa_protocol {
-	RTE_SECURITY_IPSEC_SA_PROTO_AH,
+	RTE_SECURITY_IPSEC_SA_PROTO_AH = 1,
 	/**< AH protocol */
 	RTE_SECURITY_IPSEC_SA_PROTO_ESP,
 	/**< ESP protocol */
@@ -76,7 +76,7 @@ enum rte_security_ipsec_sa_protocol {
 
 /** IPSEC tunnel type */
 enum rte_security_ipsec_tunnel_type {
-	RTE_SECURITY_IPSEC_TUNNEL_IPV4,
+	RTE_SECURITY_IPSEC_TUNNEL_IPV4 = 1,
 	/**< Outer header is IPv4 */
 	RTE_SECURITY_IPSEC_TUNNEL_IPV6,
 	/**< Outer header is IPv6 */
@@ -253,7 +253,7 @@ enum rte_security_session_action_type {
 
 /** Security session protocol definition */
 enum rte_security_session_protocol {
-	RTE_SECURITY_PROTOCOL_IPSEC,
+	RTE_SECURITY_PROTOCOL_IPSEC = 1,
 	/**< IPsec Protocol */
 	RTE_SECURITY_PROTOCOL_MACSEC,
 	/**< MACSec Protocol */
-- 
2.7.4

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

* [dpdk-stable] patch 'cryptodev: add missing CPU flag string' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (139 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'security: fix enum start value' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'cryptodev: fix function prototype' " Yuanhan Liu
                   ` (15 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 7d559286f3580464576ddae3a886d561d9c5bbf2 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Wed, 13 Dec 2017 15:54:38 +0000
Subject: [PATCH] cryptodev: add missing CPU flag string

[ upstream commit ab46f829ad09af22027458d48c9702be894e4c33 ]

CPU flag AVX512 was added in a previous release,
but it was not added in the list of strings.

Fixes: 84d796586604 ("crypto/aesni_mb: support AVX512")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 lib/librte_cryptodev/rte_cryptodev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index b40c028..fb9c0d4 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -362,6 +362,8 @@ rte_cryptodev_get_feature_name(uint64_t flag)
 		return "CPU_AVX";
 	case RTE_CRYPTODEV_FF_CPU_AVX2:
 		return "CPU_AVX2";
+	case RTE_CRYPTODEV_FF_CPU_AVX512:
+		return "CPU_AVX512";
 	case RTE_CRYPTODEV_FF_CPU_AESNI:
 		return "CPU_AESNI";
 	case RTE_CRYPTODEV_FF_HW_ACCELERATED:
-- 
2.7.4

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

* [dpdk-stable] patch 'cryptodev: fix function prototype' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (140 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'cryptodev: add missing CPU flag string' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix corner case for SPI value' " Yuanhan Liu
                   ` (14 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 278860927d0ff1638eb0b2a90ad329fe1477596f Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Wed, 13 Dec 2017 15:55:00 +0000
Subject: [PATCH] cryptodev: fix function prototype

[ upstream commit d368364dc3cc22bc0be871ff379ea95dedf94ac5 ]

qp_detach_session function was using the attach_session_t
function prototype, instead of detach_session_t.
Since both of them have the same parameters, there were
no compilation issues, but it is not consistent.

Fixes: d816fdea557c ("cryptodev: add API to associate session with queue pair")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 lib/librte_cryptodev/rte_cryptodev_pmd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index c3bf91c..089848e 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -390,7 +390,7 @@ struct rte_cryptodev_ops {
 	/**< Clear a Crypto sessions private data. */
 	cryptodev_sym_queue_pair_attach_session_t qp_attach_session;
 	/**< Attach session to queue pair. */
-	cryptodev_sym_queue_pair_attach_session_t qp_detach_session;
+	cryptodev_sym_queue_pair_detach_session_t qp_detach_session;
 	/**< Detach session from queue pair. */
 };
 
-- 
2.7.4

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

* [dpdk-stable] patch 'examples/ipsec-secgw: fix corner case for SPI value' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (141 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'cryptodev: fix function prototype' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix missing ingress flow attribute' " Yuanhan Liu
                   ` (13 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Akhil Goyal; +Cc: Radu Nicolau, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 0e03d0be1860f53fbfa0540084accaffbc134c2c 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 2a406ab..b5ec70a 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -407,7 +407,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;
 		}
@@ -472,9 +473,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 4c448e5..b9f4a21 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -269,6 +269,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.7.4

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

* [dpdk-stable] patch 'examples/ipsec-secgw: fix missing ingress flow attribute' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (142 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix corner case for SPI value' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'net: fix ESP header byte ordering definition' " Yuanhan Liu
                   ` (12 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Nélio Laranjeiro; +Cc: Radu Nicolau, Anoob Joseph, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 797eff1f01476d251a8f7c326f4ae55c0aab0e68 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= <nelio.laranjeiro@6wind.com>
Date: Mon, 18 Dec 2017 11:24:35 +0100
Subject: [PATCH] examples/ipsec-secgw: fix missing ingress flow attribute

[ upstream commit a4cde424aa89cab213e12dfbb93e47871fcfe5dc ]

Generic flow API have both direction bits, ingress and egress for rules
which may work on both sides.

Fixes: ec17993a145a ("examples/ipsec-secgw: support security offload")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
---
 examples/ipsec-secgw/ipsec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c
index 70ed227..0797c2c 100644
--- a/examples/ipsec-secgw/ipsec.c
+++ b/examples/ipsec-secgw/ipsec.c
@@ -198,6 +198,8 @@ create_session(struct ipsec_ctx *ipsec_ctx, struct ipsec_sa *sa)
 
 			sa->attr.egress = (sa->direction ==
 					RTE_SECURITY_IPSEC_SA_DIR_EGRESS);
+			sa->attr.ingress = (sa->direction ==
+					RTE_SECURITY_IPSEC_SA_DIR_INGRESS);
 			sa->flow = rte_flow_create(sa->portid,
 				&sa->attr, sa->pattern, sa->action, &err);
 			if (sa->flow == NULL) {
-- 
2.7.4

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

* [dpdk-stable] patch 'net: fix ESP header byte ordering definition' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (143 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix missing ingress flow attribute' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix SPI byte order in flow item' " Yuanhan Liu
                   ` (11 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Nélio Laranjeiro; +Cc: Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 27368148b101723ad68ecdc097317dc7dba197ea Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= <nelio.laranjeiro@6wind.com>
Date: Thu, 11 Jan 2018 10:15:58 +0100
Subject: [PATCH] net: fix ESP header byte ordering definition

[ upstream commit 68bda436a35c0fcad1dcc86ea6559361f87f64d5 ]

ESP header is defined in the RFC2406 [1] as Big Endian fields it should use
the corresponding types in DPDK as well.

[1] https://tools.ietf.org/html/rfc2406

Fixes: d4b684f7197a ("net: add ESP header to generic flow steering")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_net/rte_esp.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_net/rte_esp.h b/lib/librte_net/rte_esp.h
index e228af0..148c06e 100644
--- a/lib/librte_net/rte_esp.h
+++ b/lib/librte_net/rte_esp.h
@@ -49,8 +49,8 @@ extern "C" {
  * ESP Header
  */
 struct esp_hdr {
-	uint32_t spi;  /**< Security Parameters Index */
-	uint32_t seq;  /**< packet sequence number */
+	rte_be32_t spi;  /**< Security Parameters Index */
+	rte_be32_t seq;  /**< packet sequence number */
 } __attribute__((__packed__));
 
 #ifdef __cplusplus
-- 
2.7.4

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

* [dpdk-stable] patch 'examples/ipsec-secgw: fix SPI byte order in flow item' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (144 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'net: fix ESP header byte ordering definition' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'net/qede: replace config option with run-time arg' " Yuanhan Liu
                   ` (10 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Nélio Laranjeiro; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 9477de29e577995271663ca14a077da97efca404 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= <nelio.laranjeiro@6wind.com>
Date: Thu, 11 Jan 2018 10:15:59 +0100
Subject: [PATCH] examples/ipsec-secgw: fix SPI byte order in flow item

[ upstream commit 0bca1d26780e2cdbe03a2cf007839cbba8c830c8 ]

SPI field is defined in the RFC2406 [1] as a big endian field it should be
provided in its final form to the drivers through RTE flow.

[1] https://tools.ietf.org/html/rfc2406

Fixes: ec17993a145a ("examples/ipsec-secgw: support security offload")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 examples/ipsec-secgw/ipsec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c
index 0797c2c..c850c7b 100644
--- a/examples/ipsec-secgw/ipsec.c
+++ b/examples/ipsec-secgw/ipsec.c
@@ -187,7 +187,7 @@ create_session(struct ipsec_ctx *ipsec_ctx, struct ipsec_sa *sa)
 			sa->pattern[2].type = RTE_FLOW_ITEM_TYPE_ESP;
 			sa->pattern[2].spec = &sa->esp_spec;
 			sa->pattern[2].mask = &rte_flow_item_esp_mask;
-			sa->esp_spec.hdr.spi = sa->spi;
+			sa->esp_spec.hdr.spi = rte_cpu_to_be_32(sa->spi);
 
 			sa->pattern[3].type = RTE_FLOW_ITEM_TYPE_END;
 
-- 
2.7.4

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

* [dpdk-stable] patch 'net/qede: replace config option with run-time arg' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (145 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix SPI byte order in flow item' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'net/i40e: fix flag for MAC address write' " Yuanhan Liu
                   ` (9 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 3bcc2ecb4f47574d4c7176c9034577121b904e52 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Fri, 12 Jan 2018 13:50:01 -0800
Subject: [PATCH] net/qede: replace config option with run-time arg

[ upstream commit f64b91b0eb5d4721bbc93cbcc5b6044c1bb04300 ]

This patch adds support for handling run-time driver arguments.
We have removed config option for per VF Tx switching and added
a run-time argument vf_txswitch. By default, the VF Tx switching is
enabled however it can be disabled using run-time argument.

Sample usage to disable per port VF Tx switching is something like...

 -w 05:00.0,vf_txswitch=0 -w 05:00.1,vf_txswitch=0

Fixes: 1282943aa05b ("net/qede: fix default config option")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
 config/common_base             |  1 -
 drivers/net/qede/qede_ethdev.c | 82 ++++++++++++++++++++++++++++++++++++++----
 drivers/net/qede/qede_ethdev.h |  1 +
 3 files changed, 77 insertions(+), 7 deletions(-)

diff --git a/config/common_base b/config/common_base
index 67c2432..214d9a2 100644
--- a/config/common_base
+++ b/config/common_base
@@ -414,7 +414,6 @@ CONFIG_RTE_LIBRTE_QEDE_DEBUG_INFO=n
 CONFIG_RTE_LIBRTE_QEDE_DEBUG_DRIVER=n
 CONFIG_RTE_LIBRTE_QEDE_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_QEDE_DEBUG_RX=n
-CONFIG_RTE_LIBRTE_QEDE_VF_TX_SWITCH=y
 #Provides abs path/name of the firmware file.
 #Empty string denotes driver will use default firmware
 CONFIG_RTE_LIBRTE_QEDE_FW=""
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 0128cec..b0c0997 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -9,6 +9,7 @@
 #include "qede_ethdev.h"
 #include <rte_alarm.h>
 #include <rte_version.h>
+#include <rte_kvargs.h>
 
 /* Globals */
 static const struct qed_eth_ops *qed_ops;
@@ -453,13 +454,13 @@ int qede_activate_vport(struct rte_eth_dev *eth_dev, bool flg)
 	params.update_vport_active_tx_flg = 1;
 	params.vport_active_rx_flg = flg;
 	params.vport_active_tx_flg = flg;
-#ifndef RTE_LIBRTE_QEDE_VF_TX_SWITCH
-	if (IS_VF(edev)) {
-		params.update_tx_switching_flg = 1;
-		params.tx_switching_flg = !flg;
-		DP_INFO(edev, "VF tx-switching is disabled\n");
+	if (!qdev->enable_tx_switching) {
+		if (IS_VF(edev)) {
+			params.update_tx_switching_flg = 1;
+			params.tx_switching_flg = !flg;
+			DP_INFO(edev, "VF tx-switching is disabled\n");
+		}
 	}
-#endif
 	for_each_hwfn(edev, i) {
 		p_hwfn = &edev->hwfns[i];
 		params.opaque_fid = p_hwfn->hw_info.opaque_fid;
@@ -1208,6 +1209,68 @@ static void qede_dev_stop(struct rte_eth_dev *eth_dev)
 	DP_INFO(edev, "Device is stopped\n");
 }
 
+#define QEDE_TX_SWITCHING		"vf_txswitch"
+
+const char *valid_args[] = {
+	QEDE_TX_SWITCHING,
+	NULL,
+};
+
+static int qede_args_check(const char *key, const char *val, void *opaque)
+{
+	unsigned long tmp;
+	int ret = 0;
+	struct rte_eth_dev *eth_dev = opaque;
+	struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
+#ifdef RTE_LIBRTE_QEDE_DEBUG_INFO
+	struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
+#endif
+
+	errno = 0;
+	tmp = strtoul(val, NULL, 0);
+	if (errno) {
+		DP_INFO(edev, "%s: \"%s\" is not a valid integer", key, val);
+		return errno;
+	}
+
+	if (strcmp(QEDE_TX_SWITCHING, key) == 0)
+		qdev->enable_tx_switching = !!tmp;
+
+	return ret;
+}
+
+static int qede_args(struct rte_eth_dev *eth_dev)
+{
+	struct rte_pci_device *pci_dev = RTE_DEV_TO_PCI(eth_dev->device);
+	struct rte_kvargs *kvlist;
+	struct rte_devargs *devargs;
+	int ret;
+	int i;
+
+	devargs = pci_dev->device.devargs;
+	if (!devargs)
+		return 0; /* return success */
+
+	kvlist = rte_kvargs_parse(devargs->args, valid_args);
+	if (kvlist == NULL)
+		return -EINVAL;
+
+	 /* Process parameters. */
+	for (i = 0; (valid_args[i] != NULL); ++i) {
+		if (rte_kvargs_count(kvlist, valid_args[i])) {
+			ret = rte_kvargs_process(kvlist, valid_args[i],
+						 qede_args_check, eth_dev);
+			if (ret != ECORE_SUCCESS) {
+				rte_kvargs_free(kvlist);
+				return ret;
+			}
+		}
+	}
+	rte_kvargs_free(kvlist);
+
+	return 0;
+}
+
 static int qede_dev_configure(struct rte_eth_dev *eth_dev)
 {
 	struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
@@ -1241,6 +1304,13 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
 		return -EINVAL;
 	}
 
+	/* Enable Tx switching by default */
+	qdev->enable_tx_switching = 1;
+
+	/* Parse devargs and fix up rxmode */
+	if (qede_args(eth_dev))
+		return -ENOTSUP;
+
 	/* Sanity checks and throw warnings */
 	if (rxmode->enable_scatter)
 		eth_dev->data->scattered_rx = 1;
diff --git a/drivers/net/qede/qede_ethdev.h b/drivers/net/qede/qede_ethdev.h
index 021de5c..8f21b33 100644
--- a/drivers/net/qede/qede_ethdev.h
+++ b/drivers/net/qede/qede_ethdev.h
@@ -185,6 +185,7 @@ struct qede_dev {
 	struct qede_fastpath *fp_array;
 	uint16_t mtu;
 	uint16_t new_mtu;
+	bool enable_tx_switching;
 	bool rss_enable;
 	struct rte_eth_rss_conf rss_conf;
 	uint16_t rss_ind_table[ECORE_RSS_IND_TABLE_SIZE];
-- 
2.7.4

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

* [dpdk-stable] patch 'net/i40e: fix flag for MAC address write' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (146 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'net/qede: replace config option with run-time arg' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'net/i40e: fix packet type for X722' " Yuanhan Liu
                   ` (8 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Igor Ryzhov; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From e9399aa91a9ee6c2663f2d6049b790458c8e6e21 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 bd83e7b..6c40c46 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -10904,8 +10904,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.7.4

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

* [dpdk-stable] patch 'net/i40e: fix packet type for X722' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (147 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'net/i40e: fix flag for MAC address write' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'net/mlx5: fix IPv6 header fields' " Yuanhan Liu
                   ` (7 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Rosen Xu; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 2c14a5af0e8cbbce3c5b987882a244de6cb80b5c Mon Sep 17 00:00:00 2001
From: Rosen Xu <rosen.xu@intel.com>
Date: Mon, 15 Jan 2018 18:05:55 +0800
Subject: [PATCH] net/i40e: fix packet type for X722

[ upstream commit e8ef26c4db76b9e2f959b8f94a70bf52ba74dc09 ]

Move setting PCType after setting port's MAC type, which can resolve
the issue of PCType doesn't take effect on X722.

Fixes: a286ebeb0714 ("net/i40e: add dynamic mapping of SW flow types to HW pctypes")

Signed-off-by: Rosen Xu <rosen.xu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 6c40c46..87c0cfe 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1096,7 +1096,6 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
 		return 0;
 	}
 	i40e_set_default_ptype_table(dev);
-	i40e_set_default_pctype_table(dev);
 	pci_dev = RTE_ETH_DEV_TO_PCI(dev);
 	intr_handle = &pci_dev->intr_handle;
 
@@ -1142,6 +1141,8 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
 		return ret;
 	}
 
+	i40e_set_default_pctype_table(dev);
+
 	/*
 	 * To work around the NVM issue, initialize registers
 	 * for flexible payload and packet type of QinQ by
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mlx5: fix IPv6 header fields' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (148 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'net/i40e: fix packet type for X722' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'net/sfc: fix initialization of flow structure' " Yuanhan Liu
                   ` (6 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Shachar Beiser; +Cc: Yongseok Koh, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From ec606da5366e96d020817dc0fb52811204662595 Mon Sep 17 00:00:00 2001
From: Shachar Beiser <shacharbe@mellanox.com>
Date: Tue, 16 Jan 2018 11:17:52 +0200
Subject: [PATCH] net/mlx5: fix IPv6 header fields

[ upstream commit e8aafd9405b9f1da345abd2d5ff0d7aabc1ce6f3 ]

There are parameters that are not copy from
spec to verbs structure in the vtc_label

Fixes: 43e9d9794cde ("net/mlx5: support upstream rdma-core")

Signed-off-by: Shachar Beiser <shacharbe@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 00f4bec..654fb1d 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -48,6 +48,7 @@
 #include <rte_flow.h>
 #include <rte_flow_driver.h>
 #include <rte_malloc.h>
+#include <rte_ip.h>
 
 #include "mlx5.h"
 #include "mlx5_defs.h"
@@ -1467,6 +1468,8 @@ mlx5_flow_create_ipv6(const struct rte_flow_item *item,
 		parser->layer = HASH_RXQ_IPV6;
 	if (spec) {
 		unsigned int i;
+		uint32_t vtc_flow_val;
+		uint32_t vtc_flow_mask;
 
 		if (!mask)
 			mask = default_mask;
@@ -1478,7 +1481,20 @@ mlx5_flow_create_ipv6(const struct rte_flow_item *item,
 		       RTE_DIM(ipv6.mask.src_ip));
 		memcpy(&ipv6.mask.dst_ip, mask->hdr.dst_addr,
 		       RTE_DIM(ipv6.mask.dst_ip));
-		ipv6.mask.flow_label = mask->hdr.vtc_flow;
+		vtc_flow_val = rte_be_to_cpu_32(spec->hdr.vtc_flow);
+		vtc_flow_mask = rte_be_to_cpu_32(mask->hdr.vtc_flow);
+		ipv6.val.flow_label =
+			rte_cpu_to_be_32((vtc_flow_val & IPV6_HDR_FL_MASK) >>
+					 IPV6_HDR_FL_SHIFT);
+		ipv6.val.traffic_class = (vtc_flow_val & IPV6_HDR_TC_MASK) >>
+					 IPV6_HDR_TC_SHIFT;
+		ipv6.val.next_hdr = spec->hdr.proto;
+		ipv6.val.hop_limit = spec->hdr.hop_limits;
+		ipv6.mask.flow_label =
+			rte_cpu_to_be_32((vtc_flow_mask & IPV6_HDR_FL_MASK) >>
+					 IPV6_HDR_FL_SHIFT);
+		ipv6.mask.traffic_class = (vtc_flow_mask & IPV6_HDR_TC_MASK) >>
+					  IPV6_HDR_TC_SHIFT;
 		ipv6.mask.next_hdr = mask->hdr.proto;
 		ipv6.mask.hop_limit = mask->hdr.hop_limits;
 		/* Remove unwanted bits from values. */
@@ -1487,6 +1503,7 @@ mlx5_flow_create_ipv6(const struct rte_flow_item *item,
 			ipv6.val.dst_ip[i] &= ipv6.mask.dst_ip[i];
 		}
 		ipv6.val.flow_label &= ipv6.mask.flow_label;
+		ipv6.val.traffic_class &= ipv6.mask.traffic_class;
 		ipv6.val.next_hdr &= ipv6.mask.next_hdr;
 		ipv6.val.hop_limit &= ipv6.mask.hop_limit;
 	}
-- 
2.7.4

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

* [dpdk-stable] patch 'net/sfc: fix initialization of flow structure' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (149 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'net/mlx5: fix IPv6 header fields' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'net/sfc: fix flow RSS check in error handling' " Yuanhan Liu
                   ` (5 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Roman Zhukov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From e49fd421ba6085c1ad1f28cbc5c0a77aecdc86ed Mon Sep 17 00:00:00 2001
From: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Date: Thu, 18 Jan 2018 07:32:55 +0000
Subject: [PATCH] net/sfc: fix initialization of flow structure

[ upstream commit 13195b557b3e20bb84fff0f313137125c0cadfde ]

The rte_flow is already filled in with zeros in the
case of create. So memset() with zeros is needed only
in validation.

Fixes: a9825ccf5bb8 ("net/sfc: support flow API filters")

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_flow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c
index f2050f6..944e424 100644
--- a/drivers/net/sfc/sfc_flow.c
+++ b/drivers/net/sfc/sfc_flow.c
@@ -1126,8 +1126,6 @@ sfc_flow_parse(struct rte_eth_dev *dev,
 	struct sfc_adapter *sa = dev->data->dev_private;
 	int rc;
 
-	memset(&flow->spec, 0, sizeof(flow->spec));
-
 	rc = sfc_flow_parse_attr(attr, flow, error);
 	if (rc != 0)
 		goto fail_bad_value;
@@ -1160,6 +1158,8 @@ sfc_flow_validate(struct rte_eth_dev *dev,
 {
 	struct rte_flow flow;
 
+	memset(&flow, 0, sizeof(flow));
+
 	return sfc_flow_parse(dev, attr, pattern, actions, &flow, error);
 }
 
-- 
2.7.4

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

* [dpdk-stable] patch 'net/sfc: fix flow RSS check in error handling' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (150 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'net/sfc: fix initialization of flow structure' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'vhost: fix mbuf free' " Yuanhan Liu
                   ` (4 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Roman Zhukov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 2acb57929a470061f519b49f0f2689260e4d211b Mon Sep 17 00:00:00 2001
From: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Date: Thu, 18 Jan 2018 07:32:56 +0000
Subject: [PATCH] net/sfc: fix flow RSS check in error handling

[ upstream commit 66070f08b2ff4f1ac37157e12ef47fca6ea44016 ]

RSS is a local variable with address which is never NULL.

Fixes: d77d07391d4d ("net/sfc: support flow API RSS action")

Signed-off-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c
index 944e424..e770b98 100644
--- a/drivers/net/sfc/sfc_flow.c
+++ b/drivers/net/sfc/sfc_flow.c
@@ -1021,7 +1021,7 @@ fail_scale_tbl_set:
 fail_filter_insert:
 fail_scale_key_set:
 fail_scale_mode_set:
-	if (rss != NULL)
+	if (flow->rss)
 		efx_rx_scale_context_free(sa->nic, spec->efs_rss_context);
 
 fail_scale_context_alloc:
-- 
2.7.4

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

* [dpdk-stable] patch 'vhost: fix mbuf free' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (151 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'net/sfc: fix flow RSS check in error handling' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'vhost: protect active rings from async ring changes' " Yuanhan Liu
                   ` (3 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Junjie Chen; +Cc: Maxime Coquelin, Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 92462daad716340aebc973312faba7dce1c7376b 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 79d80f7..17158c1 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -1157,6 +1157,22 @@ mbuf_is_consumed(struct rte_mbuf *m)
 	return true;
 }
 
+static __rte_always_inline void
+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_iova = rte_mempool_virt2iova(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)
@@ -1208,6 +1224,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.7.4

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

* [dpdk-stable] patch 'vhost: protect active rings from async ring changes' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (152 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'vhost: fix mbuf free' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'net/failsafe: fix invalid free' " Yuanhan Liu
                   ` (2 subsequent siblings)
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Victor Kaplansky; +Cc: Maxime Coquelin, Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From b45011203c45861834237dd9103047d3b3009348 Mon Sep 17 00:00:00 2001
From: Victor Kaplansky <victork@redhat.com>
Date: Wed, 17 Jan 2018 15:49:25 +0200
Subject: [PATCH] vhost: protect active rings from async ring changes

[ upstream commit a3688046995f88c518fa27c45b39ae389260b18d ]

When performing live migration or memory hot-plugging,
the changes to the device and vrings made by message handler
done independently from vring usage by PMD threads.

This causes for example segfaults during live-migration
with MQ enable, but in general virtually any request
sent by qemu changing the state of device can cause
problems.

These patches fixes all above issues by adding a spinlock
to every vring and requiring message handler to start operation
only after ensuring that all PMD threads related to the device
are out of critical section accessing the vring data.

Each vring has its own lock in order to not create contention
between PMD threads of different vrings and to prevent
performance degradation by scaling queue pair number.

See https://bugzilla.redhat.com/show_bug.cgi?id=1450680

Signed-off-by: Victor Kaplansky <victork@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
---
 lib/librte_vhost/vhost.c      |  1 +
 lib/librte_vhost/vhost.h      |  6 ++--
 lib/librte_vhost/vhost_user.c | 70 +++++++++++++++++++++++++++++++++++++++++++
 lib/librte_vhost/virtio_net.c | 26 ++++++++++++++--
 4 files changed, 98 insertions(+), 5 deletions(-)

diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index 4f8b73a..dcc42fc 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -259,6 +259,7 @@ alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx)
 
 	dev->virtqueue[vring_idx] = vq;
 	init_vring_queue(dev, vring_idx);
+	rte_spinlock_init(&vq->access_lock);
 
 	dev->nr_vring += 1;
 
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index 1cc81c1..c8f2a81 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -108,12 +108,14 @@ struct vhost_virtqueue {
 
 	/* Backend value to determine if device should started/stopped */
 	int			backend;
+	int			enabled;
+	int			access_ok;
+	rte_spinlock_t		access_lock;
+
 	/* Used to notify the guest (trigger interrupt) */
 	int			callfd;
 	/* Currently unused as polling mode is enabled */
 	int			kickfd;
-	int			enabled;
-	int			access_ok;
 
 	/* Physical address of used ring, for logging */
 	uint64_t		log_guest_addr;
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 6f3869c..3acaacf 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1224,12 +1224,47 @@ vhost_user_check_and_alloc_queue_pair(struct virtio_net *dev, VhostUserMsg *msg)
 	return alloc_vring_queue(dev, vring_idx);
 }
 
+static void
+vhost_user_lock_all_queue_pairs(struct virtio_net *dev)
+{
+	unsigned int i = 0;
+	unsigned int vq_num = 0;
+
+	while (vq_num < dev->nr_vring) {
+		struct vhost_virtqueue *vq = dev->virtqueue[i];
+
+		if (vq) {
+			rte_spinlock_lock(&vq->access_lock);
+			vq_num++;
+		}
+		i++;
+	}
+}
+
+static void
+vhost_user_unlock_all_queue_pairs(struct virtio_net *dev)
+{
+	unsigned int i = 0;
+	unsigned int vq_num = 0;
+
+	while (vq_num < dev->nr_vring) {
+		struct vhost_virtqueue *vq = dev->virtqueue[i];
+
+		if (vq) {
+			rte_spinlock_unlock(&vq->access_lock);
+			vq_num++;
+		}
+		i++;
+	}
+}
+
 int
 vhost_user_msg_handler(int vid, int fd)
 {
 	struct virtio_net *dev;
 	struct VhostUserMsg msg;
 	int ret;
+	int unlock_required = 0;
 
 	dev = get_device(vid);
 	if (dev == NULL)
@@ -1275,6 +1310,38 @@ vhost_user_msg_handler(int vid, int fd)
 		return -1;
 	}
 
+	/*
+	 * Note: we don't lock all queues on VHOST_USER_GET_VRING_BASE,
+	 * since it is sent when virtio stops and device is destroyed.
+	 * destroy_device waits for queues to be inactive, so it is safe.
+	 * Otherwise taking the access_lock would cause a dead lock.
+	 */
+	switch (msg.request.master) {
+	case VHOST_USER_SET_FEATURES:
+	case VHOST_USER_SET_PROTOCOL_FEATURES:
+	case VHOST_USER_SET_OWNER:
+	case VHOST_USER_RESET_OWNER:
+	case VHOST_USER_SET_MEM_TABLE:
+	case VHOST_USER_SET_LOG_BASE:
+	case VHOST_USER_SET_LOG_FD:
+	case VHOST_USER_SET_VRING_NUM:
+	case VHOST_USER_SET_VRING_ADDR:
+	case VHOST_USER_SET_VRING_BASE:
+	case VHOST_USER_SET_VRING_KICK:
+	case VHOST_USER_SET_VRING_CALL:
+	case VHOST_USER_SET_VRING_ERR:
+	case VHOST_USER_SET_VRING_ENABLE:
+	case VHOST_USER_SEND_RARP:
+	case VHOST_USER_NET_SET_MTU:
+	case VHOST_USER_SET_SLAVE_REQ_FD:
+		vhost_user_lock_all_queue_pairs(dev);
+		unlock_required = 1;
+		break;
+	default:
+		break;
+
+	}
+
 	switch (msg.request.master) {
 	case VHOST_USER_GET_FEATURES:
 		msg.payload.u64 = vhost_user_get_features(dev);
@@ -1376,6 +1443,9 @@ vhost_user_msg_handler(int vid, int fd)
 
 	}
 
+	if (unlock_required)
+		vhost_user_unlock_all_queue_pairs(dev);
+
 	if (msg.flags & VHOST_USER_NEED_REPLY) {
 		msg.payload.u64 = !!ret;
 		msg.size = sizeof(msg.payload.u64);
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 17158c1..d347030 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -44,6 +44,7 @@
 #include <rte_udp.h>
 #include <rte_sctp.h>
 #include <rte_arp.h>
+#include <rte_spinlock.h>
 
 #include "iotlb.h"
 #include "vhost.h"
@@ -326,8 +327,11 @@ virtio_dev_rx(struct virtio_net *dev, uint16_t queue_id,
 	}
 
 	vq = dev->virtqueue[queue_id];
+
+	rte_spinlock_lock(&vq->access_lock);
+
 	if (unlikely(vq->enabled == 0))
-		return 0;
+		goto out_access_unlock;
 
 	if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))
 		vhost_user_iotlb_rd_lock(vq);
@@ -419,6 +423,9 @@ out:
 	if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))
 		vhost_user_iotlb_rd_unlock(vq);
 
+out_access_unlock:
+	rte_spinlock_unlock(&vq->access_lock);
+
 	return count;
 }
 
@@ -651,8 +658,11 @@ virtio_dev_merge_rx(struct virtio_net *dev, uint16_t queue_id,
 	}
 
 	vq = dev->virtqueue[queue_id];
+
+	rte_spinlock_lock(&vq->access_lock);
+
 	if (unlikely(vq->enabled == 0))
-		return 0;
+		goto out_access_unlock;
 
 	if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))
 		vhost_user_iotlb_rd_lock(vq);
@@ -715,6 +725,9 @@ out:
 	if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))
 		vhost_user_iotlb_rd_unlock(vq);
 
+out_access_unlock:
+	rte_spinlock_unlock(&vq->access_lock);
+
 	return pkt_idx;
 }
 
@@ -1197,9 +1210,13 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id,
 	}
 
 	vq = dev->virtqueue[queue_id];
-	if (unlikely(vq->enabled == 0))
+
+	if (unlikely(rte_spinlock_trylock(&vq->access_lock) == 0))
 		return 0;
 
+	if (unlikely(vq->enabled == 0))
+		goto out_access_unlock;
+
 	vq->batch_copy_nb_elems = 0;
 
 	if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))
@@ -1374,6 +1391,9 @@ out:
 	if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))
 		vhost_user_iotlb_rd_unlock(vq);
 
+out_access_unlock:
+	rte_spinlock_unlock(&vq->access_lock);
+
 	if (unlikely(rarp_mbuf != NULL)) {
 		/*
 		 * Inject it to the head of "pkts" array, so that switch's mac
-- 
2.7.4

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

* [dpdk-stable] patch 'net/failsafe: fix invalid free' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (153 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'vhost: protect active rings from async ring changes' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'net/i40e: fix flow director Rx resource defect' " Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'net/mlx5: fix memory region lookup' " Yuanhan Liu
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Adrien Mazarguil; +Cc: Gaetan Rivet, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From ef65a9891413b86b63c3734e083c7554c270e87b Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Date: Thu, 18 Jan 2018 13:51:39 +0000
Subject: [PATCH] net/failsafe: fix invalid free

[ upstream commit 9720e325f040dc536ef76606d2437d1653698a17 ]

rte_free() is not supposed to work with pointers returned by calloc().

Fixes: a0194d828100 ("net/failsafe: add flexible device definition")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
 drivers/net/failsafe/failsafe_args.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/failsafe/failsafe_args.c b/drivers/net/failsafe/failsafe_args.c
index cfc83e3..ec63ac9 100644
--- a/drivers/net/failsafe/failsafe_args.c
+++ b/drivers/net/failsafe/failsafe_args.c
@@ -407,7 +407,7 @@ failsafe_args_free(struct rte_eth_dev *dev)
 	uint8_t i;
 
 	FOREACH_SUBDEV(sdev, i, dev) {
-		rte_free(sdev->cmdline);
+		free(sdev->cmdline);
 		sdev->cmdline = NULL;
 		free(sdev->devargs.args);
 		sdev->devargs.args = NULL;
-- 
2.7.4

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

* [dpdk-stable] patch 'net/i40e: fix flow director Rx resource defect' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (154 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'net/failsafe: fix invalid free' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  2018-01-24 15:33 ` [dpdk-stable] patch 'net/mlx5: fix memory region lookup' " Yuanhan Liu
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Jingjing Wu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From d9a3fa774410b9933b351c9c02f1144c0f6ae2cb 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 3d7170d..525611a 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -168,7 +168,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;
@@ -1363,13 +1362,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 ad06b71..078b405 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2749,6 +2749,7 @@ i40e_fdir_setup_rx_resources(struct i40e_pf *pf)
 	rxq->vsi = pf->fdir.fdir_vsi;
 
 	rxq->rx_ring_phys_addr = rz->iova;
+	memset(rz->addr, 0, I40E_FDIR_NUM_RX_DESC * sizeof(union i40e_rx_desc));
 	rxq->rx_ring = (union i40e_rx_desc *)rz->addr;
 
 	/*
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mlx5: fix memory region lookup' has been queued to LTS release 17.11.1
  2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
                   ` (155 preceding siblings ...)
  2018-01-24 15:33 ` [dpdk-stable] patch 'net/i40e: fix flow director Rx resource defect' " Yuanhan Liu
@ 2018-01-24 15:33 ` Yuanhan Liu
  156 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-24 15:33 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: Xueming Li, Nelio Laranjeiro, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.1

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/26/18. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From af08e1a32a95d9076f827f8f37eb35ffe957932f Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Thu, 18 Jan 2018 23:52:55 -0800
Subject: [PATCH] net/mlx5: fix memory region lookup

[ upstream commit f81ec748434bfef078be57fc880313e832765ad1 ]

This patch reverts:
	commit 3a6f2eb8c5c5 ("net/mlx5: fix Memory Region registration")

Although granularity of chunks in a mempool is a cacheline, addresses are
extended to align to page boundary for performance reason in device when
registering a MR (Memory Region). This could make some regions overlap,
then can cause Tx completion error due to incorrect LKEY search. If the
error occurs, the Tx queue will get stuck. It is because buffer address is
compared against aligned addresses for Memory Region. Saving original
addresses of mempool for comparison doesn't create any overlap.

Fixes: b0b093845793 ("net/mlx5: use buffer address for LKEY search")
Fixes: 3a6f2eb8c5c5 ("net/mlx5: fix Memory Region registration")

Reported-by: Xueming Li <xuemingl@mellanox.com>
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx5/mlx5_mr.c   | 5 +++--
 drivers/net/mlx5/mlx5_rxtx.h | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_mr.c b/drivers/net/mlx5/mlx5_mr.c
index 6b29eed..2776dc7 100644
--- a/drivers/net/mlx5/mlx5_mr.c
+++ b/drivers/net/mlx5/mlx5_mr.c
@@ -291,6 +291,9 @@ priv_mr_new(struct priv *priv, struct rte_mempool *mp)
 	DEBUG("mempool %p area start=%p end=%p size=%zu",
 	      (void *)mp, (void *)start, (void *)end,
 	      (size_t)(end - start));
+	/* Save original addresses for exact MR lookup. */
+	mr->start = start;
+	mr->end = end;
 	/* Round start and end to page boundary if found in memory segments. */
 	for (i = 0; (i < RTE_MAX_MEMSEG) && (ms[i].addr != NULL); ++i) {
 		uintptr_t addr = (uintptr_t)ms[i].addr;
@@ -309,8 +312,6 @@ priv_mr_new(struct priv *priv, struct rte_mempool *mp)
 			    IBV_ACCESS_LOCAL_WRITE);
 	mr->mp = mp;
 	mr->lkey = rte_cpu_to_be_32(mr->mr->lkey);
-	mr->start = start;
-	mr->end = (uintptr_t)mr->mr->addr + mr->mr->length;
 	rte_atomic32_inc(&mr->refcnt);
 	DEBUG("%p: new Memory Region %p refcnt: %d", (void *)priv,
 	      (void *)mr, rte_atomic32_read(&mr->refcnt));
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 301cd75..05aec29 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -543,7 +543,7 @@ static __rte_always_inline uint32_t
 mlx5_tx_mb2mr(struct mlx5_txq_data *txq, struct rte_mbuf *mb)
 {
 	uint16_t i = txq->mr_cache_idx;
-	uintptr_t addr = rte_pktmbuf_mtod_offset(mb, uintptr_t, DATA_LEN(mb));
+	uintptr_t addr = rte_pktmbuf_mtod(mb, uintptr_t);
 	struct mlx5_mr *mr;
 
 	assert(i < RTE_DIM(txq->mp2mr));
-- 
2.7.4

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

* Re: [dpdk-stable] patch 'event/octeontx: fix Rx adapter port id mapping' has been queued to LTS release 17.11.1
  2018-01-24 15:32 ` [dpdk-stable] patch 'event/octeontx: fix Rx adapter port id mapping' " Yuanhan Liu
@ 2018-01-26 16:00   ` Yuanhan Liu
  2018-01-29  8:56     ` Pavan Nikhilesh
  0 siblings, 1 reply; 162+ messages in thread
From: Yuanhan Liu @ 2018-01-26 16:00 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Santosh Shukla, dpdk stable

On Wed, Jan 24, 2018 at 11:32:20PM +0800, Yuanhan Liu wrote:
> Hi,
> 
> FYI, your patch has been queued to LTS release 17.11.1
> 
> 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/26/18. So please
> shout if anyone has objections.

I met an build error with this one:

    error: ‘rte_octeontx_pchan_map ’ undeclared (first use in this function)

This patch is then dropped. If you think it's needed for 17.11.1 LTS
release, please do a backport. And sorry for the late notice: it was
my fault, I should have done the build before sending it out.

	--yliu
> 
> Thanks.
> 
> 	--yliu
> 
> ---
> >From 3ab8effa1fd5b07c88688ff14e816e0a314d7778 Mon Sep 17 00:00:00 2001
> From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> Date: Tue, 19 Dec 2017 23:31:45 +0530
> Subject: [PATCH] event/octeontx: fix Rx adapter port id mapping
> 
> [ upstream commit 9b4298339652c5f4c3a1391ed26caa5bbb26c158 ]
> 
> When octeontx event dev receives a packet for the event Rx adapter, the
> mbuf port id should contain the appropriate ethdev id instead of
> internal channel info.
> 
> Fixes: 45a914c5bd71 ("event/octeontx: support event Rx adapter")
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
> ---
>  drivers/event/octeontx/Makefile       | 2 +-
>  drivers/event/octeontx/ssovf_worker.h | 6 +++---
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/event/octeontx/Makefile b/drivers/event/octeontx/Makefile
> index fdf1b73..2604412 100644
> --- a/drivers/event/octeontx/Makefile
> +++ b/drivers/event/octeontx/Makefile
> @@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS)
>  CFLAGS += -I$(RTE_SDK)/drivers/mempool/octeontx/
>  CFLAGS += -I$(RTE_SDK)/drivers/net/octeontx/
>  
> -LDLIBS += -lrte_eal -lrte_eventdev -lrte_mempool_octeontx
> +LDLIBS += -lrte_eal -lrte_eventdev -lrte_mempool_octeontx -lrte_pmd_octeontx
>  LDLIBS += -lrte_bus_pci
>  LDLIBS += -lrte_bus_vdev
>  
> diff --git a/drivers/event/octeontx/ssovf_worker.h b/drivers/event/octeontx/ssovf_worker.h
> index bf76ac8..4c9a4c4 100644
> --- a/drivers/event/octeontx/ssovf_worker.h
> +++ b/drivers/event/octeontx/ssovf_worker.h
> @@ -53,7 +53,7 @@ enum {
>  /* SSO Operations */
>  
>  static __rte_always_inline struct rte_mbuf *
> -ssovf_octeontx_wqe_to_pkt(uint64_t work, uint16_t port_id)
> +ssovf_octeontx_wqe_to_pkt(uint64_t work, uint16_t port_info)
>  {
>  	struct rte_mbuf *mbuf;
>  	octtx_wqe_t *wqe = (octtx_wqe_t *)(uintptr_t)work;
> @@ -69,7 +69,7 @@ ssovf_octeontx_wqe_to_pkt(uint64_t work, uint16_t port_id)
>  	mbuf->data_len = mbuf->pkt_len;
>  	mbuf->nb_segs = 1;
>  	mbuf->ol_flags = 0;
> -	mbuf->port = port_id;
> +	mbuf->port = rte_octeontx_pchan_map[port_info >> 4][port_info & 0xF];
>  	rte_mbuf_refcnt_set(mbuf, 1);
>  	return mbuf;
>  }
> @@ -89,7 +89,7 @@ ssows_get_work(struct ssows *ws, struct rte_event *ev)
>  	ev->event = sched_type_queue | (get_work0 & 0xffffffff);
>  	if (get_work1 && ev->event_type == RTE_EVENT_TYPE_ETHDEV) {
>  		ev->mbuf = ssovf_octeontx_wqe_to_pkt(get_work1,
> -				(ev->event >> 20) & 0xF);
> +				(ev->event >> 20) & 0x7F);
>  	} else {
>  		ev->u64 = get_work1;
>  	}
> -- 
> 2.7.4

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

* Re: [dpdk-stable] patch 'event/octeontx: fix Rx adapter port id mapping' has been queued to LTS release 17.11.1
  2018-01-26 16:00   ` Yuanhan Liu
@ 2018-01-29  8:56     ` Pavan Nikhilesh
  0 siblings, 0 replies; 162+ messages in thread
From: Pavan Nikhilesh @ 2018-01-29  8:56 UTC (permalink / raw)
  To: Yuanhan Liu, Santosh Shukla, dpdk stable; +Cc: dev

Hi Yliu,

On Sat, Jan 27, 2018 at 12:00:29AM +0800, Yuanhan Liu wrote:
> On Wed, Jan 24, 2018 at 11:32:20PM +0800, Yuanhan Liu wrote:
> > Hi,
> >
> > FYI, your patch has been queued to LTS release 17.11.1
> >
> > 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/26/18. So please
> > shout if anyone has objections.
>
> I met an build error with this one:

This is due to map file having improper tag i.e.

http://dpdk.org/dev/patchwork/patch/32510/

+
+DPDK_18.04 {

Fixed while applying.

+	global:
+
+	rte_octeontx_pchan_map;
+
+};

Ferruh fixed it while applying.

Regards,
Pavan.

>
>     error: ‘rte_octeontx_pchan_map ’ undeclared (first use in this function)
>
> This patch is then dropped. If you think it's needed for 17.11.1 LTS
> release, please do a backport. And sorry for the late notice: it was
> my fault, I should have done the build before sending it out.
>
> 	--yliu
> >
> > Thanks.
> >
> > 	--yliu
> >
> > ---
> > >From 3ab8effa1fd5b07c88688ff14e816e0a314d7778 Mon Sep 17 00:00:00 2001
> > From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> > Date: Tue, 19 Dec 2017 23:31:45 +0530
> > Subject: [PATCH] event/octeontx: fix Rx adapter port id mapping
> >
> > [ upstream commit 9b4298339652c5f4c3a1391ed26caa5bbb26c158 ]
> >
> > When octeontx event dev receives a packet for the event Rx adapter, the
> > mbuf port id should contain the appropriate ethdev id instead of
> > internal channel info.
> >
> > Fixes: 45a914c5bd71 ("event/octeontx: support event Rx adapter")
> >
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> > Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
> > ---

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

* Re: [dpdk-stable] patch 'net/mlx5: fix flow type for allmulti rules' has been queued to LTS release 17.11.1
  2018-01-24 15:31 ` [dpdk-stable] patch 'net/mlx5: fix flow type for allmulti rules' " Yuanhan Liu
@ 2018-02-13 11:56   ` Yuanhan Liu
  0 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-02-13 11:56 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: Nelio Laranjeiro, dpdk stable, Shahaf Shuler

On Wed, Jan 24, 2018 at 11:31:49PM +0800, Yuanhan Liu wrote:
> Hi,
> 
> FYI, your patch has been queued to LTS release 17.11.1
> 
> 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/26/18. So please
> shout if anyone has objections.

Per asked Shahaf, this one is now reverted, due to there is a bug.

	--yliu
> 
> ---
> >From b187189e1371cba301f85e1f11c3c7d0211e4a0a Mon Sep 17 00:00:00 2001
> From: Raslan Darawsheh <rasland@mellanox.com>
> Date: Tue, 5 Dec 2017 11:37:50 +0200
> Subject: [PATCH] net/mlx5: fix flow type for allmulti rules
> 
> [ upstream commit 0a40a1363a4df8043f9a7e93289eda2ea52815a7 ]
> 
> Chnaged ibv_flow_attr type for allmulti rule to IBV_FLOW_ATTR_MC_DEFAULT
> instead of IBV_FLOW_ATTR_NORMAL, in case allmulti was enabled.
> 
> Fixes: 272733b5 ("net/mlx5: use flow to enable unicast traffic")
> 
> Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> ---
>  drivers/net/mlx5/mlx5_flow.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> index f32dfdd..75ea299 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -432,6 +432,7 @@ static const struct mlx5_flow_items mlx5_flow_items[] = {
>  /** Structure to pass to the conversion function. */
>  struct mlx5_flow_parse {
>  	uint32_t inner; /**< Set once VXLAN is encountered. */
> +	uint32_t allmulti:1; /**< Set once allmulti dst MAC is encountered. */
>  	uint32_t create:1;
>  	/**< Whether resources should remain after a validate. */
>  	uint32_t drop:1; /**< Target is a drop queue. */
> @@ -1206,6 +1207,17 @@ exit_free:
>  			}
>  		}
>  	}
> +	if (parser->allmulti &&
> +	    parser->layer == HASH_RXQ_ETH) {
> +		for (i = 0; i != hash_rxq_init_n; ++i) {
> +			if (!parser->queue[i].ibv_attr)
> +				continue;
> +			if (parser->queue[i].ibv_attr->num_of_specs != 1)
> +				break;
> +			parser->queue[i].ibv_attr->type =
> +						IBV_FLOW_ATTR_MC_DEFAULT;
> +		}
> +	}
>  	return ret;
>  exit_enomem:
>  	for (i = 0; i != hash_rxq_init_n; ++i) {
> @@ -1311,6 +1323,7 @@ mlx5_flow_create_eth(const struct rte_flow_item *item,
>  		eth.val.ether_type &= eth.mask.ether_type;
>  	}
>  	mlx5_flow_create_copy(parser, &eth, eth_size);
> +	parser->allmulti = eth.val.dst_mac[0] & 1;
>  	return 0;
>  }
>  
> -- 
> 2.7.4

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

* Re: [dpdk-stable] patch 'net/mlx5: fix IPv6 header fields' has been queued to LTS release 17.11.1
@ 2018-02-01  9:17 Yuanhan Liu
  0 siblings, 0 replies; 162+ messages in thread
From: Yuanhan Liu @ 2018-02-01  9:17 UTC (permalink / raw)
  To: Shachar Beiser; +Cc: dpdk stable

FYI, this one has been reverted, for it breaks the MLX5 build:

drivers/net/mlx5/mlx5_flow.c:1487:37: error: 'IPV6_HDR_FL_MASK' undeclared (first use in this function)

If you think it's a must to have for 17.11.1 release, please do backport.

Thanks.

	--yliu

On Wed, Jan 24, 2018 at 11:33:39PM +0800, Yuanhan Liu wrote:
> Hi,
> 
> FYI, your patch has been queued to LTS release 17.11.1
> 
> 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/26/18. So please
> shout if anyone has objections.
> 
> Thanks.
> 
> 	--yliu
> 
> ---
> >From ec606da5366e96d020817dc0fb52811204662595 Mon Sep 17 00:00:00 2001
> From: Shachar Beiser <shacharbe@mellanox.com>
> Date: Tue, 16 Jan 2018 11:17:52 +0200
> Subject: [PATCH] net/mlx5: fix IPv6 header fields
> 
> [ upstream commit e8aafd9405b9f1da345abd2d5ff0d7aabc1ce6f3 ]
> 
> There are parameters that are not copy from
> spec to verbs structure in the vtc_label
> 
> Fixes: 43e9d9794cde ("net/mlx5: support upstream rdma-core")
> 
> Signed-off-by: Shachar Beiser <shacharbe@mellanox.com>
> Acked-by: Yongseok Koh <yskoh@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_flow.c | 19 ++++++++++++++++++-
>  1 file changed, 18 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> index 00f4bec..654fb1d 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -48,6 +48,7 @@
>  #include <rte_flow.h>
>  #include <rte_flow_driver.h>
>  #include <rte_malloc.h>
> +#include <rte_ip.h>
>  
>  #include "mlx5.h"
>  #include "mlx5_defs.h"
> @@ -1467,6 +1468,8 @@ mlx5_flow_create_ipv6(const struct rte_flow_item *item,
>  		parser->layer = HASH_RXQ_IPV6;
>  	if (spec) {
>  		unsigned int i;
> +		uint32_t vtc_flow_val;
> +		uint32_t vtc_flow_mask;
>  
>  		if (!mask)
>  			mask = default_mask;
> @@ -1478,7 +1481,20 @@ mlx5_flow_create_ipv6(const struct rte_flow_item *item,
>  		       RTE_DIM(ipv6.mask.src_ip));
>  		memcpy(&ipv6.mask.dst_ip, mask->hdr.dst_addr,
>  		       RTE_DIM(ipv6.mask.dst_ip));
> -		ipv6.mask.flow_label = mask->hdr.vtc_flow;
> +		vtc_flow_val = rte_be_to_cpu_32(spec->hdr.vtc_flow);
> +		vtc_flow_mask = rte_be_to_cpu_32(mask->hdr.vtc_flow);
> +		ipv6.val.flow_label =
> +			rte_cpu_to_be_32((vtc_flow_val & IPV6_HDR_FL_MASK) >>
> +					 IPV6_HDR_FL_SHIFT);
> +		ipv6.val.traffic_class = (vtc_flow_val & IPV6_HDR_TC_MASK) >>
> +					 IPV6_HDR_TC_SHIFT;
> +		ipv6.val.next_hdr = spec->hdr.proto;
> +		ipv6.val.hop_limit = spec->hdr.hop_limits;
> +		ipv6.mask.flow_label =
> +			rte_cpu_to_be_32((vtc_flow_mask & IPV6_HDR_FL_MASK) >>
> +					 IPV6_HDR_FL_SHIFT);
> +		ipv6.mask.traffic_class = (vtc_flow_mask & IPV6_HDR_TC_MASK) >>
> +					  IPV6_HDR_TC_SHIFT;
>  		ipv6.mask.next_hdr = mask->hdr.proto;
>  		ipv6.mask.hop_limit = mask->hdr.hop_limits;
>  		/* Remove unwanted bits from values. */
> @@ -1487,6 +1503,7 @@ mlx5_flow_create_ipv6(const struct rte_flow_item *item,
>  			ipv6.val.dst_ip[i] &= ipv6.mask.dst_ip[i];
>  		}
>  		ipv6.val.flow_label &= ipv6.mask.flow_label;
> +		ipv6.val.traffic_class &= ipv6.mask.traffic_class;
>  		ipv6.val.next_hdr &= ipv6.mask.next_hdr;
>  		ipv6.val.hop_limit &= ipv6.mask.hop_limit;
>  	}
> -- 
> 2.7.4

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

end of thread, other threads:[~2018-02-13 11:56 UTC | newest]

Thread overview: 162+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-24 15:31 [dpdk-stable] patch 'kni: fix build with kernel 4.15' has been queued to LTS release 17.11.1 Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'app/testpmd: remove xenvirt again' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'mk: remove TILE-Gx machine type' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'bus/dpaa: fix build when assert enabled' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'app/testpmd: fix port id allocation' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'app/testpmd: fix crash of txonly with multiple segments' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'kni: fix build dependency' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'service: fix number mapped cores count' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'service: fix lcore role after delete' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'service: fix service core launch' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'bus/pci: fix interrupt handler type' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'memzone: fix leak on allocation error' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'malloc: protect stats with lock' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'malloc: fix end for bounded elements' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'vfio: fix enabled check on error' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'pmdinfogen: fix cross compilation for ARM big endian' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'lpm: fix ARM big endian build' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'bus/dpaa: " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'net/i40e: " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'net/ixgbe: " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'mempool/octeontx: fix improper memory barrier' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'mempool: fix first memory area notification' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'mempool/octeontx: fix memory area registration' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'app/testpmd: fix port configuration print' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'app/testpmd: fix flowgen forwarding offload flags' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'examples/l3fwd-power: fix Rx without interrupt' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'examples/l3fwd-power: fix frequency detection' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'timer: fix reset on service cores' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'net/mlx5: cleanup allocation of ethtool stats' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'net/bonding: fix bonding in 8023ad mode' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'net/nfp: fix MTU settings' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'net/nfp: fix jumbo " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'net/nfp: fix CRC strip check behaviour' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'net/thunderx: fix multi segment Tx function return' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'net/mlx5: fix Tx checksum offloads' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'net/mlx4: fix unnecessary include' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'net/szedata2: fix check of mmap return value' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'bus/fslmc: fix the cplusplus macro closure' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'drivers: change the deprecated memseg physaddr to IOVA' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'net/mlx4: revert workaround for broken Verbs' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'net/mlx5: fix flow type for allmulti rules' " Yuanhan Liu
2018-02-13 11:56   ` Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'net/mlx4: fix Tx packet drop application report' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'net/bonding: fix activated slave in 8023ad mode' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'net/qede: fix to enable LRO over tunnels' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'net/qede: fix to reject config with no Rx queue' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'net/sfc: stop periodic DMA if MAC stats upload fails' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'net/sfc: fix multicast address list copy memory leak' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'net/sfc: fix DMA memory leak after kvarg processing failure' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'ethdev: fix missing imissed counter in xstats' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'net/sfc: fix main MAC address handling' " Yuanhan Liu
2018-01-24 15:31 ` [dpdk-stable] patch 'net/mlx5: fix VLAN configuration after port stop' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix Memory Region registration' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix overflow of Memory Region cache' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix RSS key configuration' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix HW checksum offload for outer IP' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix un-supported RSS hash fields use' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix VLAN offload setting' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/fm10k: fix logical port delete' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/ixgbe: fix wrong PBA setting' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/igb: fix Tx queue number assignment' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix VLAN offload setting issue' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix FDIR input set conflict' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/ixgbe: fix tunnel filter fail problem' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: add FDIR NVGRE parameter check' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix setting of MAC address on i40evf' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'vhost: fix crash' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'vhost: fix dequeue zero copy with virtio1' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/virtio: fix incorrect cast' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/virtio: fix vector Rx flushing' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/virtio: fix typo in LRO support' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'examples/vhost: fix sending ARP packet to self' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'event/octeontx: fix Rx adapter port id mapping' " Yuanhan Liu
2018-01-26 16:00   ` Yuanhan Liu
2018-01-29  8:56     ` Pavan Nikhilesh
2018-01-24 15:32 ` [dpdk-stable] patch 'net/sfc: fix label name to be consistent' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/sfc: do not hold management event queue lock while MCDI' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/sfc: fix incorrect bitwise ORing of L3/L4 packet types' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/ixgbe: fix parsing FDIR NVGRE issue' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix FDIR rule confiliction " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: exclude LLDP packet count' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/ixgbe: fix the failure of number of Tx queue check' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix VSI MAC filter on primary address change' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix overwriting bit-fields in SW Rx queue' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/dpaa: fix uninitialized and unused variables' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/dpaa: fix the mbuf packet type if zero' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/dpaa: fix FW version code' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/bnxt: fix double increment of idx during Tx ring alloc' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/bnxt: parse checksum offload flags' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/bnxt: fix group info usage' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/bnxt: fix check for ether type' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/bnxt: fix duplicate filter pattern creation error' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/bnxt: fix duplicate pattern for 5tuple filter' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/bnxt: free the aggregation ring' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/bonding: fix setting slave MAC addresses' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'ethdev: fix link autonegotiation value' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/enic: fix L4 Rx ptype comparison' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/pcap: fix the NUMA id display in logs' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/failsafe: fix Rx safe check compiler hint' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/tap: remove unused kernel version definitions' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/mrvl: fix multiple probe' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/mrvl: fix HIF objects allocation' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/mrvl: fix oversize bpool handling' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/mrvl: fix shadow queue tail and size calculations' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/mrvl: keep shadow Txqs inside PMD Txq' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/ixgbe: fix max queue number for VF' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix setting MAC address of " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix port segmentation fault when restart' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/i40e: fix VF reset stats crash' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix deadlock of link status alarm' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix missing attribute size for drop action' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'net/mlx5: fix calculation of flow ID flag' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'vhost: fix error code check when creating thread' " Yuanhan Liu
2018-01-24 15:32 ` [dpdk-stable] patch 'examples/vhost: fix startup check' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'net/i40e: fix ISO C in exported header' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'flow_classify: " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'member: " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'lib: fix missing includes in exported headers' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'igb_uio: allow multi-process access' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'pdump: fix error check when creating/canceling thread' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'app/testpmd: fix invalid Rx queue number setting' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'app/testpmd: fix invalid Tx " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'app/procinfo: add compilation option in config' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'test: register test as failed if setup failed' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'test/table: fix uninitialized parameter' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'test/memzone: fix wrong test' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'test/memzone: fix NULL freeing' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'test/memzone: fix freeing test' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'mbuf: fix performance of freeing with non atomic refcnt' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'mempool/octeontx: fix natural alignment being optimized out' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'member: fix memory leak on error' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'eventdev: set error code in port link/unlink functions' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'test/eventdev: use CPU event type' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'event/sw: fix queue memory leak and multi-link bug' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'eventdev: fix doxygen comments' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'bus/pci: forbid IOVA mode if IOMMU address width too small' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'doc: fix lists of supported crypto algorithms' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'doc: fix format in OpenSSL installation guide' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'test/crypto: fix missing include' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix usage of incorrect port' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'security: fix device operation type' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'crypto: fix pedantic compilation' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'security: " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'security: fix enum start value' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'cryptodev: add missing CPU flag string' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'cryptodev: fix function prototype' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix corner case for SPI value' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix missing ingress flow attribute' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'net: fix ESP header byte ordering definition' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix SPI byte order in flow item' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'net/qede: replace config option with run-time arg' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'net/i40e: fix flag for MAC address write' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'net/i40e: fix packet type for X722' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'net/mlx5: fix IPv6 header fields' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'net/sfc: fix initialization of flow structure' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'net/sfc: fix flow RSS check in error handling' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'vhost: fix mbuf free' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'vhost: protect active rings from async ring changes' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'net/failsafe: fix invalid free' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'net/i40e: fix flow director Rx resource defect' " Yuanhan Liu
2018-01-24 15:33 ` [dpdk-stable] patch 'net/mlx5: fix memory region lookup' " Yuanhan Liu
2018-02-01  9:17 [dpdk-stable] patch 'net/mlx5: fix IPv6 header fields' " Yuanhan Liu

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).