patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'eal/arm: fix file descriptor leak when getting CPU features' has been queued to stable release 16.07.2
@ 2016-11-15 11:40 Yuanhan Liu
  2016-11-15 11:40 ` [dpdk-stable] patch 'eal/ppc: " Yuanhan Liu
                   ` (11 more replies)
  0 siblings, 12 replies; 14+ messages in thread
From: Yuanhan Liu @ 2016-11-15 11:40 UTC (permalink / raw)
  To: Jianbo Liu; +Cc: Yuanhan Liu, Jan Viktorin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.07.2

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

Thanks.

	--yliu

---
>From 56a61b6c907cde4fa15f38166196436564953cf3 Mon Sep 17 00:00:00 2001
From: Jianbo Liu <jianbo.liu@linaro.org>
Date: Fri, 4 Nov 2016 15:16:42 +0530
Subject: [PATCH] eal/arm: fix file descriptor leak when getting CPU features

[ upstream commit a1ed637873a748cc73867db00b2e3c120571ff59 ]

Close the file descriptor after finish using it.

Fixes: b94e5c94 ("eal/arm: add CPU flags for ARMv7")
Fixes: 97523f82 ("eal/arm: add CPU flags for ARMv8")

Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
Acked-by: Jan Viktorin <viktorin@rehivetech.com>
---
 lib/librte_eal/common/arch/arm/rte_cpuflags.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_eal/common/arch/arm/rte_cpuflags.c b/lib/librte_eal/common/arch/arm/rte_cpuflags.c
index 23240ef..79160a6 100644
--- a/lib/librte_eal/common/arch/arm/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/arm/rte_cpuflags.c
@@ -148,6 +148,7 @@ rte_cpu_get_features(hwcap_registers_t out)
 				out[REG_PLATFORM] = 0x0001;
 		}
 	}
+	close(auxv_fd);
 }
 
 /*
-- 
1.9.0

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

* [dpdk-stable] patch 'eal/ppc: fix file descriptor leak when getting CPU features' has been queued to stable release 16.07.2
  2016-11-15 11:40 [dpdk-stable] patch 'eal/arm: fix file descriptor leak when getting CPU features' has been queued to stable release 16.07.2 Yuanhan Liu
@ 2016-11-15 11:40 ` Yuanhan Liu
  2016-11-15 11:40 ` [dpdk-stable] patch 'lpm: fix freeing memory' " Yuanhan Liu
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Yuanhan Liu @ 2016-11-15 11:40 UTC (permalink / raw)
  To: Jianbo Liu; +Cc: Yuanhan Liu, Jan Viktorin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.07.2

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

Thanks.

	--yliu

---
>From 72db06e6e96e4f62875d5c090cc5e07704192ff0 Mon Sep 17 00:00:00 2001
From: Jianbo Liu <jianbo.liu@linaro.org>
Date: Fri, 4 Nov 2016 15:16:43 +0530
Subject: [PATCH] eal/ppc: fix file descriptor leak when getting CPU features

[ upstream commit 545f16daf6867640261fe7bd263c777a8c61a3c1 ]

Close the file descriptor after finish using it.

Fixes: 9ae15538 ("eal/ppc: cpu flag checks for IBM Power")

Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
Acked-by: Jan Viktorin <viktorin@rehivetech.com>
---
 lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c b/lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c
index a8147c8..fcf96e0 100644
--- a/lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c
+++ b/lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c
@@ -116,6 +116,7 @@ rte_cpu_get_features(hwcap_registers_t out)
 		else if (auxv.a_type == AT_HWCAP2)
 			out[REG_HWCAP2] = auxv.a_un.a_val;
 	}
+	close(auxv_fd);
 }
 
 /*
-- 
1.9.0

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

* [dpdk-stable] patch 'lpm: fix freeing memory' has been queued to stable release 16.07.2
  2016-11-15 11:40 [dpdk-stable] patch 'eal/arm: fix file descriptor leak when getting CPU features' has been queued to stable release 16.07.2 Yuanhan Liu
  2016-11-15 11:40 ` [dpdk-stable] patch 'eal/ppc: " Yuanhan Liu
@ 2016-11-15 11:40 ` Yuanhan Liu
  2016-11-15 11:40 ` [dpdk-stable] patch 'pci: fix probing error if no driver found' " Yuanhan Liu
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Yuanhan Liu @ 2016-11-15 11:40 UTC (permalink / raw)
  To: Wei Dai; +Cc: Yuanhan Liu, Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.07.2

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

Thanks.

	--yliu

---
>From 6c7778fd4e31b7fc8940b462becb0c441c25c052 Mon Sep 17 00:00:00 2001
From: Wei Dai <wei.dai@intel.com>
Date: Thu, 3 Nov 2016 18:15:59 +0800
Subject: [PATCH] lpm: fix freeing memory
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit c7e9d6a6ed90a022067f42727d5d1675a3f3df11 ]
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The memory pointed by lpm->rules_tbl should also be freed
when memory malloc for tbl8 fails in rte_lpm_create_v1604( ).
And the memory pointed by lpm->tbl8 should also be freed
when the lpm object is freed in rte_lpm_free_v1604( ).

Fixes: f1f7261838b3 ("lpm: add a new config structure for IPv4")

Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Signed-off-by: Wei Dai <wei.dai@intel.com>
---
 lib/librte_lpm/rte_lpm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c
index 24fec4b..e1b5d94 100644
--- a/lib/librte_lpm/rte_lpm.c
+++ b/lib/librte_lpm/rte_lpm.c
@@ -321,6 +321,7 @@ rte_lpm_create_v1604(const char *name, int socket_id,
 
 	if (lpm->tbl8 == NULL) {
 		RTE_LOG(ERR, LPM, "LPM tbl8 memory allocation failed\n");
+		rte_free(lpm->rules_tbl);
 		rte_free(lpm);
 		lpm = NULL;
 		rte_free(te);
@@ -402,6 +403,7 @@ rte_lpm_free_v1604(struct rte_lpm *lpm)
 
 	rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK);
 
+	rte_free(lpm->tbl8);
 	rte_free(lpm->rules_tbl);
 	rte_free(lpm);
 	rte_free(te);
-- 
1.9.0

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

* [dpdk-stable] patch 'pci: fix probing error if no driver found' has been queued to stable release 16.07.2
  2016-11-15 11:40 [dpdk-stable] patch 'eal/arm: fix file descriptor leak when getting CPU features' has been queued to stable release 16.07.2 Yuanhan Liu
  2016-11-15 11:40 ` [dpdk-stable] patch 'eal/ppc: " Yuanhan Liu
  2016-11-15 11:40 ` [dpdk-stable] patch 'lpm: fix freeing memory' " Yuanhan Liu
@ 2016-11-15 11:40 ` Yuanhan Liu
  2016-11-15 11:40 ` [dpdk-stable] patch 'net/ixgbe: fix VF registers' " Yuanhan Liu
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Yuanhan Liu @ 2016-11-15 11:40 UTC (permalink / raw)
  To: Igor Ryzhov; +Cc: Yuanhan Liu, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.07.2

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

Thanks.

	--yliu

---
>From 6574d3263257418b0314d132bf6ee668fad1c4b6 Mon Sep 17 00:00:00 2001
From: Igor Ryzhov <iryzhov@nfware.com>
Date: Thu, 4 Aug 2016 14:50:06 +0300
Subject: [PATCH] pci: fix probing error if no driver found

[ upstream commit 25c62ca4eb0cb4bae0db9628ef343f246cc11820 ]

The rte_eal_pci_probe_one function could return false positive result if
no driver is found for the device.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Acked-by: David Marchand <david.marchand@6wind.com>
---
 lib/librte_eal/common/eal_common_pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
index eb44998..096c65e 100644
--- a/lib/librte_eal/common/eal_common_pci.c
+++ b/lib/librte_eal/common/eal_common_pci.c
@@ -344,7 +344,7 @@ rte_eal_pci_probe_one(const struct rte_pci_addr *addr)
 			continue;
 
 		ret = pci_probe_all_drivers(dev);
-		if (ret < 0)
+		if (ret)
 			goto err_return;
 		return 0;
 	}
-- 
1.9.0

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

* [dpdk-stable] patch 'net/ixgbe: fix VF registers' has been queued to stable release 16.07.2
  2016-11-15 11:40 [dpdk-stable] patch 'eal/arm: fix file descriptor leak when getting CPU features' has been queued to stable release 16.07.2 Yuanhan Liu
                   ` (2 preceding siblings ...)
  2016-11-15 11:40 ` [dpdk-stable] patch 'pci: fix probing error if no driver found' " Yuanhan Liu
@ 2016-11-15 11:40 ` Yuanhan Liu
  2016-11-15 11:40 ` [dpdk-stable] patch 'app/testpmd: fix DCB configuration' " Yuanhan Liu
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Yuanhan Liu @ 2016-11-15 11:40 UTC (permalink / raw)
  To: Wenzhuo Lu; +Cc: Yuanhan Liu, Xuekun Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.07.2

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

Thanks.

	--yliu

---
>From b1e45cb787d3cbd7b4c8da94729f49eae66b5f02 Mon Sep 17 00:00:00 2001
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
Date: Sun, 6 Nov 2016 11:57:04 -0500
Subject: [PATCH] net/ixgbe: fix VF registers

[ upstream commit 4882214cee33ab5e628a58974cd31c36c58ad426 ]

Some VF registers are using PF's name or address by mistake.
Although some of them are sharing the same addresses.

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

Reported-by: Xuekun Hu <xuekun.hu@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/ixgbe/ixgbe_regs.h | 40 ++++++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_regs.h b/drivers/net/ixgbe/ixgbe_regs.h
index c7457a6..773e169 100644
--- a/drivers/net/ixgbe/ixgbe_regs.h
+++ b/drivers/net/ixgbe/ixgbe_regs.h
@@ -56,10 +56,10 @@ static const struct reg_info ixgbe_regs_general[] = {
 };
 
 static const struct reg_info ixgbevf_regs_general[] = {
-	{IXGBE_CTRL, 1, 1, "IXGBE_CTRL"},
-	{IXGBE_STATUS, 1, 1, "IXGBE_STATUS"},
+	{IXGBE_VFCTRL, 1, 1, "IXGBE_VFCTRL"},
+	{IXGBE_VFSTATUS, 1, 1, "IXGBE_VFSTATUS"},
 	{IXGBE_VFLINKS, 1, 1, "IXGBE_VFLINKS"},
-	{IXGBE_FRTIMER, 1, 1, "IXGBE_FRTIMER"},
+	{IXGBE_VFFRTIMER, 1, 1, "IXGBE_VFFRTIMER"},
 	{IXGBE_VFMAILBOX, 1, 1, "IXGBE_VFMAILBOX"},
 	{IXGBE_VFMBMEM, 16, 4, "IXGBE_VFMBMEM"},
 	{IXGBE_VFRXMEMWRAP, 1, 1, "IXGBE_VFRXMEMWRAP"},
@@ -145,17 +145,17 @@ static const struct reg_info ixgbe_regs_rxdma[] = {
 };
 
 static const struct reg_info ixgbevf_regs_rxdma[] = {
-	{IXGBE_RDBAL(0), 8, 0x40, "IXGBE_RDBAL"},
-	{IXGBE_RDBAH(0), 8, 0x40, "IXGBE_RDBAH"},
-	{IXGBE_RDLEN(0), 8, 0x40, "IXGBE_RDLEN"},
-	{IXGBE_RDH(0), 8, 0x40, "IXGBE_RDH"},
-	{IXGBE_RDT(0), 8, 0x40, "IXGBE_RDT"},
-	{IXGBE_RXDCTL(0), 8, 0x40, "IXGBE_RXDCTL"},
-	{IXGBE_SRRCTL(0), 8, 0x40, "IXGBE_SRRCTL"},
+	{IXGBE_VFRDBAL(0), 8, 0x40, "IXGBE_VFRDBAL"},
+	{IXGBE_VFRDBAH(0), 8, 0x40, "IXGBE_VFRDBAH"},
+	{IXGBE_VFRDLEN(0), 8, 0x40, "IXGBE_VFRDLEN"},
+	{IXGBE_VFRDH(0), 8, 0x40, "IXGBE_VFRDH"},
+	{IXGBE_VFRDT(0), 8, 0x40, "IXGBE_VFRDT"},
+	{IXGBE_VFRXDCTL(0), 8, 0x40, "IXGBE_VFRXDCTL"},
+	{IXGBE_VFSRRCTL(0), 8, 0x40, "IXGBE_VFSRRCTL"},
 	{IXGBE_VFPSRTYPE, 1, 1,	"IXGBE_VFPSRTYPE"},
 	{IXGBE_VFRSCCTL(0), 8, 0x40, "IXGBE_VFRSCCTL"},
-	{IXGBE_PVFDCA_RXCTRL(0), 8, 0x40, "IXGBE_PVFDCA_RXCTRL"},
-	{IXGBE_PVFDCA_TXCTRL(0), 8, 0x40, "IXGBE_PVFDCA_TXCTRL"},
+	{IXGBE_VFDCA_RXCTRL(0), 8, 0x40, "IXGBE_VFDCA_RXCTRL"},
+	{IXGBE_VFDCA_TXCTRL(0), 8, 0x40, "IXGBE_VFDCA_TXCTRL"},
 	{0, 0, 0, ""}
 };
 
@@ -193,14 +193,14 @@ static struct reg_info ixgbe_regs_tx[] = {
 };
 
 static const struct reg_info ixgbevf_regs_tx[] = {
-	{IXGBE_TDBAL(0), 4, 0x40, "IXGBE_TDBAL"},
-	{IXGBE_TDBAH(0), 4, 0x40, "IXGBE_TDBAH"},
-	{IXGBE_TDLEN(0), 4, 0x40, "IXGBE_TDLEN"},
-	{IXGBE_TDH(0), 4, 0x40, "IXGBE_TDH"},
-	{IXGBE_TDT(0), 4, 0x40, "IXGBE_TDT"},
-	{IXGBE_TXDCTL(0), 4, 0x40, "IXGBE_TXDCTL"},
-	{IXGBE_TDWBAL(0), 4, 0x40, "IXGBE_TDWBAL"},
-	{IXGBE_TDWBAH(0), 4, 0x40, "IXGBE_TDWBAH"},
+	{IXGBE_VFTDBAL(0), 4, 0x40, "IXGBE_VFTDBAL"},
+	{IXGBE_VFTDBAH(0), 4, 0x40, "IXGBE_VFTDBAH"},
+	{IXGBE_VFTDLEN(0), 4, 0x40, "IXGBE_VFTDLEN"},
+	{IXGBE_VFTDH(0), 4, 0x40, "IXGBE_VFTDH"},
+	{IXGBE_VFTDT(0), 4, 0x40, "IXGBE_VFTDT"},
+	{IXGBE_VFTXDCTL(0), 4, 0x40, "IXGBE_VFTXDCTL"},
+	{IXGBE_VFTDWBAL(0), 4, 0x40, "IXGBE_VFTDWBAL"},
+	{IXGBE_VFTDWBAH(0), 4, 0x40, "IXGBE_VFTDWBAH"},
 	{0, 0, 0, ""}
 };
 
-- 
1.9.0

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

* [dpdk-stable] patch 'app/testpmd: fix DCB configuration' has been queued to stable release 16.07.2
  2016-11-15 11:40 [dpdk-stable] patch 'eal/arm: fix file descriptor leak when getting CPU features' has been queued to stable release 16.07.2 Yuanhan Liu
                   ` (3 preceding siblings ...)
  2016-11-15 11:40 ` [dpdk-stable] patch 'net/ixgbe: fix VF registers' " Yuanhan Liu
@ 2016-11-15 11:40 ` Yuanhan Liu
  2016-11-15 11:40 ` [dpdk-stable] patch 'net/i40e: " Yuanhan Liu
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Yuanhan Liu @ 2016-11-15 11:40 UTC (permalink / raw)
  To: Bernard Iremonger; +Cc: Yuanhan Liu, Jingjing Wu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.07.2

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

Thanks.

	--yliu

---
>From ba2fc3f001eed6ea46ecb9f43b8c31038c896be5 Mon Sep 17 00:00:00 2001
From: Bernard Iremonger <bernard.iremonger@intel.com>
Date: Thu, 3 Nov 2016 17:35:38 +0000
Subject: [PATCH] app/testpmd: fix DCB configuration

[ upstream commit 86ef65ee58caace3a54ae94bb5b387070b28d539 ]

Data Centre Bridge (DCB) configuration fails when SRIOV is
enabled if nb_rxq or nb_txq are greater than nb_q_per_pool.

The failure occurs during configuration of the ixgbe PMD when
it is started, in the ixgbe_check_mq_mode function.

Fixes: 2a977b891f99 ("app/testpmd: fix DCB configuration")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
 app/test-pmd/testpmd.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 8bcafa3..8d0905e 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2003,8 +2003,13 @@ init_port_dcb_config(portid_t pid,
 	 * and has the same number of rxq and txq in dcb mode
 	 */
 	if (dcb_mode == DCB_VT_ENABLED) {
-		nb_rxq = rte_port->dev_info.max_rx_queues;
-		nb_txq = rte_port->dev_info.max_tx_queues;
+		if (rte_port->dev_info.max_vfs > 0) {
+			nb_rxq = rte_port->dev_info.nb_rx_queues;
+			nb_txq = rte_port->dev_info.nb_tx_queues;
+		} else {
+			nb_rxq = rte_port->dev_info.max_rx_queues;
+			nb_txq = rte_port->dev_info.max_tx_queues;
+		}
 	} else {
 		/*if vt is disabled, use all pf queues */
 		if (rte_port->dev_info.vmdq_pool_base == 0) {
-- 
1.9.0

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

* [dpdk-stable] patch 'net/i40e: fix DCB configuration' has been queued to stable release 16.07.2
  2016-11-15 11:40 [dpdk-stable] patch 'eal/arm: fix file descriptor leak when getting CPU features' has been queued to stable release 16.07.2 Yuanhan Liu
                   ` (4 preceding siblings ...)
  2016-11-15 11:40 ` [dpdk-stable] patch 'app/testpmd: fix DCB configuration' " Yuanhan Liu
@ 2016-11-15 11:40 ` Yuanhan Liu
  2016-11-15 11:40 ` [dpdk-stable] patch 'net/enic: fix max packet length check' " Yuanhan Liu
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Yuanhan Liu @ 2016-11-15 11:40 UTC (permalink / raw)
  To: Jingjing Wu; +Cc: Yuanhan Liu, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.07.2

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

Thanks.

	--yliu

---
>From aba9c7a3b1874f93347e2881f1fc55096393b8f7 Mon Sep 17 00:00:00 2001
From: Jingjing Wu <jingjing.wu@intel.com>
Date: Fri, 4 Nov 2016 13:42:33 +0800
Subject: [PATCH] net/i40e: fix DCB configuration

[ upstream commit c6431c891d9e9691e3205fe5c5350071cbaeb852 ]

Removing stopping LLDP in firmware is a workaround for a
known errata which can cause Rx hang. But the changing will
cause DCB configuration fails. That is because when LLDP is
enabled, the return value of i40e_init_dcb is success. But
following check just considered the case when LLDP agent
is disabled.
This patch fixes this issue.

Fixes: fcbd40d4327b ("net/i40e: fix Rx hang when disable LLDP")

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

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 7614525..0a8f55d 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -9193,12 +9193,12 @@ i40e_dcb_init_configure(struct rte_eth_dev *dev, bool sw_dcb)
 	 */
 	if (sw_dcb == TRUE) {
 		ret = i40e_init_dcb(hw);
-		/* if sw_dcb, lldp agent is stopped, the return from
+		/* If lldp agent is stopped, the return value from
 		 * i40e_init_dcb we expect is failure with I40E_AQ_RC_EPERM
-		 * adminq status.
+		 * adminq status. Otherwise, it should return success.
 		 */
-		if (ret != I40E_SUCCESS &&
-		    hw->aq.asq_last_status == I40E_AQ_RC_EPERM) {
+		if ((ret == I40E_SUCCESS) || (ret != I40E_SUCCESS &&
+		    hw->aq.asq_last_status == I40E_AQ_RC_EPERM)) {
 			memset(&hw->local_dcbx_config, 0,
 				sizeof(struct i40e_dcbx_config));
 			/* set dcb default configuration */
@@ -9227,8 +9227,8 @@ i40e_dcb_init_configure(struct rte_eth_dev *dev, bool sw_dcb)
 				return -ENOSYS;
 			}
 		} else {
-			PMD_INIT_LOG(ERR, "DCBX configuration failed, err = %d,"
-					  " aq_err = %d.", ret,
+			PMD_INIT_LOG(ERR, "DCB initialization in FW fails,"
+					  " err = %d, aq_err = %d.", ret,
 					  hw->aq.asq_last_status);
 			return -ENOTSUP;
 		}
-- 
1.9.0

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

* [dpdk-stable] patch 'net/enic: fix max packet length check' has been queued to stable release 16.07.2
  2016-11-15 11:40 [dpdk-stable] patch 'eal/arm: fix file descriptor leak when getting CPU features' has been queued to stable release 16.07.2 Yuanhan Liu
                   ` (5 preceding siblings ...)
  2016-11-15 11:40 ` [dpdk-stable] patch 'net/i40e: " Yuanhan Liu
@ 2016-11-15 11:40 ` Yuanhan Liu
  2016-11-15 11:40 ` [dpdk-stable] patch 'net/mlx5: fix handling of small mbuf sizes' " Yuanhan Liu
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Yuanhan Liu @ 2016-11-15 11:40 UTC (permalink / raw)
  To: John Daley; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.07.2

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

Thanks.

	--yliu

---
>From aae0ea76a1deb1f3730ed667f11fe08611ee5a5e Mon Sep 17 00:00:00 2001
From: John Daley <johndale@cisco.com>
Date: Tue, 1 Nov 2016 11:08:28 -0700
Subject: [PATCH] net/enic: fix max packet length check

[ upstream commit f201fd0585fa8bdc2c3005c2f363460e487cda2d ]

When the device was configured with an explicit maximum packet length,
it would fail if the value was greater than MTU configured in CIMC/UCSM
(plus L2 header length). It should have been compared against maximum
allowed by the device.

Fixes: bb34ffb848a0 ("net/enic: determine max egress packet size and max MTU")

Signed-off-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic_ethdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 946a499..04e7ba8 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -440,8 +440,7 @@ static void enicpmd_dev_info_get(struct rte_eth_dev *eth_dev,
 	device_info->max_rx_queues = enic->conf_rq_count / 2;
 	device_info->max_tx_queues = enic->conf_wq_count;
 	device_info->min_rx_bufsize = ENIC_MIN_MTU;
-	device_info->max_rx_pktlen = enic->rte_dev->data->mtu
-				   + ETHER_HDR_LEN + 4;
+	device_info->max_rx_pktlen = enic->max_mtu + ETHER_HDR_LEN + 4;
 	device_info->max_mac_addrs = 1;
 	device_info->rx_offload_capa =
 		DEV_RX_OFFLOAD_VLAN_STRIP |
-- 
1.9.0

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

* [dpdk-stable] patch 'net/mlx5: fix handling of small mbuf sizes' has been queued to stable release 16.07.2
  2016-11-15 11:40 [dpdk-stable] patch 'eal/arm: fix file descriptor leak when getting CPU features' has been queued to stable release 16.07.2 Yuanhan Liu
                   ` (6 preceding siblings ...)
  2016-11-15 11:40 ` [dpdk-stable] patch 'net/enic: fix max packet length check' " Yuanhan Liu
@ 2016-11-15 11:40 ` Yuanhan Liu
  2016-11-15 11:40 ` [dpdk-stable] patch 'net/mlx5: fix Rx checksum macros' " Yuanhan Liu
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Yuanhan Liu @ 2016-11-15 11:40 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: Yuanhan Liu, Adrien Mazarguil, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.07.2

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

Thanks.

	--yliu

---
>From 98c9088ef962f615c9cdf773d4bd9ca1b975bc74 Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@mellanox.com>
Date: Mon, 24 Oct 2016 11:10:59 +0300
Subject: [PATCH] net/mlx5: fix handling of small mbuf sizes

[ upstream commit 4827cbff602aef4d9afcc19742841063a0ecd08f ]

When mbufs are smaller than MRU, multi-segment support must be enabled to
default set when not in promiscuous or allmulticast modes.

Fixes: 9964b965ad69 ("net/mlx5: re-add Rx scatter support")

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 2d98c99..7dbe8dd 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -945,6 +945,11 @@ rxq_ctrl_setup(struct rte_eth_dev *dev, struct rxq_ctrl *rxq_ctrl,
 	(void)conf; /* Thresholds configuration (ignored). */
 	/* Enable scattered packets support for this queue if necessary. */
 	assert(mb_len >= RTE_PKTMBUF_HEADROOM);
+	/* If smaller than MRU, multi-segment support must be enabled. */
+	if (mb_len < (priv->mtu > dev->data->dev_conf.rxmode.max_rx_pkt_len ?
+		     dev->data->dev_conf.rxmode.max_rx_pkt_len :
+		     priv->mtu))
+		dev->data->dev_conf.rxmode.jumbo_frame = 1;
 	if ((dev->data->dev_conf.rxmode.jumbo_frame) &&
 	    (dev->data->dev_conf.rxmode.max_rx_pkt_len >
 	     (mb_len - RTE_PKTMBUF_HEADROOM))) {
-- 
1.9.0

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

* [dpdk-stable] patch 'net/mlx5: fix Rx checksum macros' has been queued to stable release 16.07.2
  2016-11-15 11:40 [dpdk-stable] patch 'eal/arm: fix file descriptor leak when getting CPU features' has been queued to stable release 16.07.2 Yuanhan Liu
                   ` (7 preceding siblings ...)
  2016-11-15 11:40 ` [dpdk-stable] patch 'net/mlx5: fix handling of small mbuf sizes' " Yuanhan Liu
@ 2016-11-15 11:40 ` Yuanhan Liu
  2016-11-15 11:40 ` [dpdk-stable] patch 'net/vmxnet3: fix mbuf release on reset/stop' " Yuanhan Liu
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: Yuanhan Liu @ 2016-11-15 11:40 UTC (permalink / raw)
  To: Nelio Laranjeiro; +Cc: Yuanhan Liu, Adrien Mazarguil, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.07.2

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

Thanks.

	--yliu

---
>From 029864cda6be7c266e76f8d7cebf4af1439a2931 Mon Sep 17 00:00:00 2001
From: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Date: Wed, 2 Nov 2016 11:39:37 +0100
Subject: [PATCH] net/mlx5: fix Rx checksum macros

[ upstream commit 350f4c482e466ca5eeec338030142ef618975664 ]

Add missing:

 - MLX5_CQE_RX_IPV4_PACKET
 - MLX5_CQE_RX_IPV6_PACKET
 - MLX5_CQE_RX_OUTER_IPV4_PACKET
 - MLX5_CQE_RX_OUTER_IPV6_PACKET
 - MLX5_CQE_RX_TUNNEL_PACKET
 - MLX5_CQE_RX_OUTER_IP_CSUM_OK
 - MLX5_CQE_RX_OUTER_TCP_UDP_CSUM_OK

Fixes: 51a50a3d9b8f ("net/mlx5: add definitions for data path without Verbs")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 drivers/net/mlx5/mlx5_prm.h  | 21 +++++++++++++++++++++
 drivers/net/mlx5/mlx5_rxtx.c | 16 ++++++++--------
 2 files changed, 29 insertions(+), 8 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h
index e23d5cb..1c369ca 100644
--- a/drivers/net/mlx5/mlx5_prm.h
+++ b/drivers/net/mlx5/mlx5_prm.h
@@ -77,6 +77,27 @@
 #define MLX5_OPCODE_TSO MLX5_OPCODE_LSO_MPW /* Compat with OFED 3.3. */
 #endif
 
+/* IPv4 packet. */
+#define MLX5_CQE_RX_IPV4_PACKET (1u << 2)
+
+/* IPv6 packet. */
+#define MLX5_CQE_RX_IPV6_PACKET (1u << 3)
+
+/* Outer IPv4 packet. */
+#define MLX5_CQE_RX_OUTER_IPV4_PACKET (1u << 7)
+
+/* Outer IPv6 packet. */
+#define MLX5_CQE_RX_OUTER_IPV6_PACKET (1u << 8)
+
+/* Tunnel packet bit in the CQE. */
+#define MLX5_CQE_RX_TUNNEL_PACKET (1u << 4)
+
+/* Outer IP checksum OK. */
+#define MLX5_CQE_RX_OUTER_IP_CSUM_OK (1u << 5)
+
+/* Outer UDP header and checksum OK. */
+#define MLX5_CQE_RX_OUTER_TCP_UDP_CSUM_OK (1u << 6)
+
 /* Subset of struct mlx5_wqe_eth_seg. */
 struct mlx5_wqe_eth_seg_small {
 	uint32_t rsvd0;
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index bb76f2c..79f7fa9 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1081,19 +1081,19 @@ rxq_cq_to_pkt_type(volatile struct mlx5_cqe64 *cqe)
 	uint8_t flags = cqe->l4_hdr_type_etc;
 	uint8_t info = cqe->rsvd0[0];
 
-	if (info & IBV_EXP_CQ_RX_TUNNEL_PACKET)
+	if (info & MLX5_CQE_RX_TUNNEL_PACKET)
 		pkt_type =
 			TRANSPOSE(flags,
-				  IBV_EXP_CQ_RX_OUTER_IPV4_PACKET,
+				  MLX5_CQE_RX_OUTER_IPV4_PACKET,
 				  RTE_PTYPE_L3_IPV4) |
 			TRANSPOSE(flags,
-				  IBV_EXP_CQ_RX_OUTER_IPV6_PACKET,
+				  MLX5_CQE_RX_OUTER_IPV6_PACKET,
 				  RTE_PTYPE_L3_IPV6) |
 			TRANSPOSE(flags,
-				  IBV_EXP_CQ_RX_IPV4_PACKET,
+				  MLX5_CQE_RX_IPV4_PACKET,
 				  RTE_PTYPE_INNER_L3_IPV4) |
 			TRANSPOSE(flags,
-				  IBV_EXP_CQ_RX_IPV6_PACKET,
+				  MLX5_CQE_RX_IPV6_PACKET,
 				  RTE_PTYPE_INNER_L3_IPV6);
 	else
 		pkt_type =
@@ -1236,13 +1236,13 @@ rxq_cq_to_ol_flags(struct rxq *rxq, volatile struct mlx5_cqe64 *cqe)
 	 * of PKT_RX_EIP_CKSUM_BAD because the latter is not functional
 	 * (its value is 0).
 	 */
-	if ((info & IBV_EXP_CQ_RX_TUNNEL_PACKET) && (rxq->csum_l2tun))
+	if ((info & MLX5_CQE_RX_TUNNEL_PACKET) && (rxq->csum_l2tun))
 		ol_flags |=
 			TRANSPOSE(~cqe->l4_hdr_type_etc,
-				  IBV_EXP_CQ_RX_OUTER_IP_CSUM_OK,
+				  MLX5_CQE_RX_OUTER_IP_CSUM_OK,
 				  PKT_RX_IP_CKSUM_BAD) |
 			TRANSPOSE(~cqe->l4_hdr_type_etc,
-				  IBV_EXP_CQ_RX_OUTER_TCP_UDP_CSUM_OK,
+				  MLX5_CQE_RX_OUTER_TCP_UDP_CSUM_OK,
 				  PKT_RX_L4_CKSUM_BAD);
 	return ol_flags;
 }
-- 
1.9.0

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

* [dpdk-stable] patch 'net/vmxnet3: fix mbuf release on reset/stop' has been queued to stable release 16.07.2
  2016-11-15 11:40 [dpdk-stable] patch 'eal/arm: fix file descriptor leak when getting CPU features' has been queued to stable release 16.07.2 Yuanhan Liu
                   ` (8 preceding siblings ...)
  2016-11-15 11:40 ` [dpdk-stable] patch 'net/mlx5: fix Rx checksum macros' " Yuanhan Liu
@ 2016-11-15 11:40 ` Yuanhan Liu
  2016-11-15 11:40 ` [dpdk-stable] patch 'mempool: fix leak if populate fails' " Yuanhan Liu
  2016-11-15 11:40 ` [dpdk-stable] patch 'net/virtio: revert fix restart' " Yuanhan Liu
  11 siblings, 0 replies; 14+ messages in thread
From: Yuanhan Liu @ 2016-11-15 11:40 UTC (permalink / raw)
  To: Yong Wang; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.07.2

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

Thanks.

	--yliu

---
>From 67a7da450f1c1a139086f39ca72a69941a246cfd Mon Sep 17 00:00:00 2001
From: Yong Wang <yongwang@vmware.com>
Date: Wed, 26 Oct 2016 10:45:07 -0700
Subject: [PATCH] net/vmxnet3: fix mbuf release on reset/stop

[ upstream commit 646edddf075bbe6865ebb12ac3da4effab28a571 ]

During device reset/stop, vmxnet3 releases all mbufs in tx and
rx cmd ring.  For rx, we should go over all ring descriptors and
free using rte_pktmbuf_free_seg() instead of rte_pktmbuf_free()
as the metadata of the mbuf might not be properly initialized
(initialization after mempool creation is done in the rx routine)
and the mbuf should always be a single-segment one when populated.
For tx, we can use the existing way as mbuf, if any, will be a
valid one stashed in the eop.

Fixes: dfaff37fc46d ("vmxnet3: import new vmxnet3 poll mode driver implementation")

Signed-off-by: Yong Wang <yongwang@vmware.com>
---
 drivers/net/vmxnet3/vmxnet3_rxtx.c | 34 +++++++++++++++++++++++++++++-----
 1 file changed, 29 insertions(+), 5 deletions(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index 9deeb3f..88df576 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -141,10 +141,10 @@ vmxnet3_txq_dump(struct vmxnet3_tx_queue *txq)
 #endif
 
 static void
-vmxnet3_cmd_ring_release_mbufs(vmxnet3_cmd_ring_t *ring)
+vmxnet3_tx_cmd_ring_release_mbufs(vmxnet3_cmd_ring_t *ring)
 {
 	while (ring->next2comp != ring->next2fill) {
-		/* No need to worry about tx desc ownership, device is quiesced by now. */
+		/* No need to worry about desc ownership, device is quiesced by now. */
 		vmxnet3_buf_info_t *buf_info = ring->buf_info + ring->next2comp;
 
 		if (buf_info->m) {
@@ -158,9 +158,27 @@ vmxnet3_cmd_ring_release_mbufs(vmxnet3_cmd_ring_t *ring)
 }
 
 static void
+vmxnet3_rx_cmd_ring_release_mbufs(vmxnet3_cmd_ring_t *ring)
+{
+	uint32_t i;
+
+	for (i = 0; i < ring->size; i++) {
+		/* No need to worry about desc ownership, device is quiesced by now. */
+		vmxnet3_buf_info_t *buf_info = &ring->buf_info[i];
+
+		if (buf_info->m) {
+			rte_pktmbuf_free_seg(buf_info->m);
+			buf_info->m = NULL;
+			buf_info->bufPA = 0;
+			buf_info->len = 0;
+		}
+		vmxnet3_cmd_ring_adv_next2comp(ring);
+	}
+}
+
+static void
 vmxnet3_cmd_ring_release(vmxnet3_cmd_ring_t *ring)
 {
-	vmxnet3_cmd_ring_release_mbufs(ring);
 	rte_free(ring->buf_info);
 	ring->buf_info = NULL;
 }
@@ -172,6 +190,8 @@ vmxnet3_dev_tx_queue_release(void *txq)
 	vmxnet3_tx_queue_t *tq = txq;
 
 	if (tq != NULL) {
+		/* Release mbufs */
+		vmxnet3_tx_cmd_ring_release_mbufs(&tq->cmd_ring);
 		/* Release the cmd_ring */
 		vmxnet3_cmd_ring_release(&tq->cmd_ring);
 	}
@@ -184,6 +204,10 @@ vmxnet3_dev_rx_queue_release(void *rxq)
 	vmxnet3_rx_queue_t *rq = rxq;
 
 	if (rq != NULL) {
+		/* Release mbufs */
+		for (i = 0; i < VMXNET3_RX_CMDRING_SIZE; i++)
+			vmxnet3_rx_cmd_ring_release_mbufs(&rq->cmd_ring[i]);
+
 		/* Release both the cmd_rings */
 		for (i = 0; i < VMXNET3_RX_CMDRING_SIZE; i++)
 			vmxnet3_cmd_ring_release(&rq->cmd_ring[i]);
@@ -201,7 +225,7 @@ vmxnet3_dev_tx_queue_reset(void *txq)
 
 	if (tq != NULL) {
 		/* Release the cmd_ring mbufs */
-		vmxnet3_cmd_ring_release_mbufs(&tq->cmd_ring);
+		vmxnet3_tx_cmd_ring_release_mbufs(&tq->cmd_ring);
 	}
 
 	/* Tx vmxnet rings structure initialization*/
@@ -230,7 +254,7 @@ vmxnet3_dev_rx_queue_reset(void *rxq)
 	if (rq != NULL) {
 		/* Release both the cmd_rings mbufs */
 		for (i = 0; i < VMXNET3_RX_CMDRING_SIZE; i++)
-			vmxnet3_cmd_ring_release_mbufs(&rq->cmd_ring[i]);
+			vmxnet3_rx_cmd_ring_release_mbufs(&rq->cmd_ring[i]);
 	}
 
 	ring0 = &rq->cmd_ring[0];
-- 
1.9.0

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

* [dpdk-stable] patch 'mempool: fix leak if populate fails' has been queued to stable release 16.07.2
  2016-11-15 11:40 [dpdk-stable] patch 'eal/arm: fix file descriptor leak when getting CPU features' has been queued to stable release 16.07.2 Yuanhan Liu
                   ` (9 preceding siblings ...)
  2016-11-15 11:40 ` [dpdk-stable] patch 'net/vmxnet3: fix mbuf release on reset/stop' " Yuanhan Liu
@ 2016-11-15 11:40 ` Yuanhan Liu
  2016-11-15 11:40 ` [dpdk-stable] patch 'net/virtio: revert fix restart' " Yuanhan Liu
  11 siblings, 0 replies; 14+ messages in thread
From: Yuanhan Liu @ 2016-11-15 11:40 UTC (permalink / raw)
  To: Nipun Gupta; +Cc: Yuanhan Liu, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.07.2

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

Thanks.

	--yliu

---
>From c74cc134159f5d3b4e057cf768a4a7887ead645f Mon Sep 17 00:00:00 2001
From: Nipun Gupta <nipun.gupta@nxp.com>
Date: Fri, 11 Nov 2016 21:17:10 +0530
Subject: [PATCH] mempool: fix leak if populate fails

[ upstream commit f5e9ed5c4e35a4cc2db7c10cf855e701472af864 ]

This patch fixes the issue of memzone not being freed incase the
rte_mempool_populate_phys fails in the rte_mempool_populate_default

This issue was identified when testing with OVS ~2.6
- configure the system with low memory (e.g. < 500 MB)
- add bridge and dpdk interfaces
- delete brigde
- keep on repeating the above sequence.

Fixes: d1d914ebbc25 ("mempool: allocate in several memory chunks by default")

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_mempool/rte_mempool.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index 411a332..ad7c470 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -579,8 +579,10 @@ rte_mempool_populate_default(struct rte_mempool *mp)
 				mz->len, pg_sz,
 				rte_mempool_memchunk_mz_free,
 				(void *)(uintptr_t)mz);
-		if (ret < 0)
+		if (ret < 0) {
+			rte_memzone_free(mz);
 			goto fail;
+		}
 	}
 
 	return mp->size;
-- 
1.9.0

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

* [dpdk-stable] patch 'net/virtio: revert fix restart' has been queued to stable release 16.07.2
  2016-11-15 11:40 [dpdk-stable] patch 'eal/arm: fix file descriptor leak when getting CPU features' has been queued to stable release 16.07.2 Yuanhan Liu
                   ` (10 preceding siblings ...)
  2016-11-15 11:40 ` [dpdk-stable] patch 'mempool: fix leak if populate fails' " Yuanhan Liu
@ 2016-11-15 11:40 ` Yuanhan Liu
  11 siblings, 0 replies; 14+ messages in thread
From: Yuanhan Liu @ 2016-11-15 11:40 UTC (permalink / raw)
  To: Yuanhan Liu; +Cc: Kyle Larose, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.07.2

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

Thanks.

	--yliu

---
>From 60030e50665bad4136c90dc20d0575700f5f46d7 Mon Sep 17 00:00:00 2001
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Date: Sat, 5 Nov 2016 17:40:56 +0800
Subject: [PATCH] net/virtio: revert fix restart

[ backported from upstream commit 3f3b3d549bd5f308aaf425a9ab58473e4fb812b1 ]

This reverts commit 9a0615af7746 ("virtio: fix restart"); conflict is
manually addressed.

Kyle reported an issue with above commit

    qemu-kvm: Guest moved used index from 5 to 1

with following steps,

    1) Start my virtio interfaces
    2) Send some traffic into/out of the interfaces
    3) Stop the interfaces
    4) Start the interfaces
    5) Send some more traffic

And here are some quotes from Kyle's analysis,

    Prior to the patch, if an interface were stopped then started, without
    restarting the application, the queues would be left as-is, because
    hw->started would be set to 1. Now, calling stop sets hw->started to 0,
    which means the next call to start will "touch the queues". This is the
    unintended side-effect that causes the problem.

We should not touch the queues once the init is done, otherwise, the vring
state of virtio PMD driver and vhost-user would be inconsistent, leading
some issue like above.

Thus this patch is reverted.

Fixes: 9a0615af7746 ("virtio: fix restart")

Reported-by: Kyle Larose <klarose@sandvine.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
(cherry picked from commit 3f3b3d549bd5f308aaf425a9ab58473e4fb812b1)

Conflicts:
	drivers/net/virtio/virtio_ethdev.c
---
 drivers/net/virtio/virtio_ethdev.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 4cee067..86cf8a3 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -549,13 +549,11 @@ virtio_dev_close(struct rte_eth_dev *dev)
 
 	PMD_INIT_LOG(DEBUG, "virtio_dev_close");
 
-	if (hw->started == 1)
-		virtio_dev_stop(dev);
-
 	/* reset the NIC */
 	if (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)
 		vtpci_irq_config(hw, VIRTIO_MSI_NO_VECTOR);
 	vtpci_reset(hw);
+	hw->started = 0;
 	virtio_dev_free_mbufs(dev);
 	virtio_free_queues(dev);
 }
@@ -1275,9 +1273,10 @@ eth_virtio_dev_uninit(struct rte_eth_dev *eth_dev)
 	if (rte_eal_process_type() == RTE_PROC_SECONDARY)
 		return -EPERM;
 
-	/* Close it anyway since there's no way to know if closed */
-	virtio_dev_close(eth_dev);
-
+	if (hw->started == 1) {
+		virtio_dev_stop(eth_dev);
+		virtio_dev_close(eth_dev);
+	}
 	pci_dev = eth_dev->pci_dev;
 
 	eth_dev->dev_ops = NULL;
@@ -1486,12 +1485,9 @@ static void
 virtio_dev_stop(struct rte_eth_dev *dev)
 {
 	struct rte_eth_link link;
-	struct virtio_hw *hw = dev->data->dev_private;
 
 	PMD_INIT_LOG(DEBUG, "stop");
 
-	hw->started = 0;
-
 	if (dev->data->dev_conf.intr_conf.lsc)
 		rte_intr_disable(&dev->pci_dev->intr_handle);
 
-- 
1.9.0

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

* [dpdk-stable] patch 'app/testpmd: fix DCB configuration' has been queued to stable release 16.07.2
  2016-11-02 10:20 [dpdk-stable] patch 'examples/ipsec-secgw: check SP only when setup' " Yuanhan Liu
@ 2016-11-02 10:21 ` Yuanhan Liu
  0 siblings, 0 replies; 14+ messages in thread
From: Yuanhan Liu @ 2016-11-02 10:21 UTC (permalink / raw)
  To: Wenzhuo Lu; +Cc: Bernard Iremonger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 16.07.2

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

Thanks.

	--yliu

---
>From de9093a795631175fe0d9bedf42ffc217cb35ffb Mon Sep 17 00:00:00 2001
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
Date: Mon, 26 Sep 2016 09:11:11 +0800
Subject: [PATCH] app/testpmd: fix DCB configuration

[ upstream commit 2a977b891f994d0e216812275af2156fb8566944 ]

An issue is found that DCB cannot be configured on ixgbe
NICs. It's said the TX queue number is not right.
On ixgbe the max TX queue number is not fixed, it depends
on the multi-queue mode.

This patch adds the device configuration before getting
info in the DCB configuration process. So the right info
can be got depending on the configuration.

Fixes: 1a572499 ("app/testpmd: setup DCB forwarding based on traffic class")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test-pmd/testpmd.c | 45 +++++++++++++++++++++++++++------------------
 1 file changed, 27 insertions(+), 18 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index e9c7412..8bcafa3 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1964,17 +1964,36 @@ init_port_dcb_config(portid_t pid,
 		     uint8_t pfc_en)
 {
 	struct rte_eth_conf port_conf;
-	struct rte_eth_dev_info dev_info;
 	struct rte_port *rte_port;
 	int retval;
 	uint16_t i;
 
-	rte_eth_dev_info_get(pid, &dev_info);
+	rte_port = &ports[pid];
+
+	memset(&port_conf, 0, sizeof(struct rte_eth_conf));
+	/* Enter DCB configuration status */
+	dcb_config = 1;
+
+	/*set configuration of DCB in vt mode and DCB in non-vt mode*/
+	retval = get_eth_dcb_conf(&port_conf, dcb_mode, num_tcs, pfc_en);
+	if (retval < 0)
+		return retval;
+	port_conf.rxmode.hw_vlan_filter = 1;
+
+	/**
+	 * Write the configuration into the device.
+	 * Set the numbers of RX & TX queues to 0, so
+	 * the RX & TX queues will not be setup.
+	 */
+	(void)rte_eth_dev_configure(pid, 0, 0, &port_conf);
+
+	rte_eth_dev_info_get(pid, &rte_port->dev_info);
 
 	/* If dev_info.vmdq_pool_base is greater than 0,
 	 * the queue id of vmdq pools is started after pf queues.
 	 */
-	if (dcb_mode == DCB_VT_ENABLED && dev_info.vmdq_pool_base > 0) {
+	if (dcb_mode == DCB_VT_ENABLED &&
+	    rte_port->dev_info.vmdq_pool_base > 0) {
 		printf("VMDQ_DCB multi-queue mode is nonsensical"
 			" for port %d.", pid);
 		return -1;
@@ -1984,13 +2003,13 @@ init_port_dcb_config(portid_t pid,
 	 * and has the same number of rxq and txq in dcb mode
 	 */
 	if (dcb_mode == DCB_VT_ENABLED) {
-		nb_rxq = dev_info.max_rx_queues;
-		nb_txq = dev_info.max_tx_queues;
+		nb_rxq = rte_port->dev_info.max_rx_queues;
+		nb_txq = rte_port->dev_info.max_tx_queues;
 	} else {
 		/*if vt is disabled, use all pf queues */
-		if (dev_info.vmdq_pool_base == 0) {
-			nb_rxq = dev_info.max_rx_queues;
-			nb_txq = dev_info.max_tx_queues;
+		if (rte_port->dev_info.vmdq_pool_base == 0) {
+			nb_rxq = rte_port->dev_info.max_rx_queues;
+			nb_txq = rte_port->dev_info.max_tx_queues;
 		} else {
 			nb_rxq = (queueid_t)num_tcs;
 			nb_txq = (queueid_t)num_tcs;
@@ -1999,16 +2018,6 @@ init_port_dcb_config(portid_t pid,
 	}
 	rx_free_thresh = 64;
 
-	memset(&port_conf, 0, sizeof(struct rte_eth_conf));
-	/* Enter DCB configuration status */
-	dcb_config = 1;
-
-	/*set configuration of DCB in vt mode and DCB in non-vt mode*/
-	retval = get_eth_dcb_conf(&port_conf, dcb_mode, num_tcs, pfc_en);
-	if (retval < 0)
-		return retval;
-
-	rte_port = &ports[pid];
 	memcpy(&rte_port->dev_conf, &port_conf, sizeof(struct rte_eth_conf));
 
 	rxtx_port_config(rte_port);
-- 
1.9.0

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

end of thread, other threads:[~2016-11-15 11:39 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-15 11:40 [dpdk-stable] patch 'eal/arm: fix file descriptor leak when getting CPU features' has been queued to stable release 16.07.2 Yuanhan Liu
2016-11-15 11:40 ` [dpdk-stable] patch 'eal/ppc: " Yuanhan Liu
2016-11-15 11:40 ` [dpdk-stable] patch 'lpm: fix freeing memory' " Yuanhan Liu
2016-11-15 11:40 ` [dpdk-stable] patch 'pci: fix probing error if no driver found' " Yuanhan Liu
2016-11-15 11:40 ` [dpdk-stable] patch 'net/ixgbe: fix VF registers' " Yuanhan Liu
2016-11-15 11:40 ` [dpdk-stable] patch 'app/testpmd: fix DCB configuration' " Yuanhan Liu
2016-11-15 11:40 ` [dpdk-stable] patch 'net/i40e: " Yuanhan Liu
2016-11-15 11:40 ` [dpdk-stable] patch 'net/enic: fix max packet length check' " Yuanhan Liu
2016-11-15 11:40 ` [dpdk-stable] patch 'net/mlx5: fix handling of small mbuf sizes' " Yuanhan Liu
2016-11-15 11:40 ` [dpdk-stable] patch 'net/mlx5: fix Rx checksum macros' " Yuanhan Liu
2016-11-15 11:40 ` [dpdk-stable] patch 'net/vmxnet3: fix mbuf release on reset/stop' " Yuanhan Liu
2016-11-15 11:40 ` [dpdk-stable] patch 'mempool: fix leak if populate fails' " Yuanhan Liu
2016-11-15 11:40 ` [dpdk-stable] patch 'net/virtio: revert fix restart' " Yuanhan Liu
  -- strict thread matches above, loose matches on Subject: below --
2016-11-02 10:20 [dpdk-stable] patch 'examples/ipsec-secgw: check SP only when setup' " Yuanhan Liu
2016-11-02 10:21 ` [dpdk-stable] patch 'app/testpmd: fix DCB configuration' " 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).