patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3
@ 2017-07-14 10:33 Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/i40e/base: fix Tx error stats on VF' " Yuanhan Liu
                   ` (37 more replies)
  0 siblings, 38 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Herakliusz Lipiec; +Cc: Helin Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From e7e697ecd01775ea3a9eed35dc6f8ad94a41963d Mon Sep 17 00:00:00 2001
From: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Date: Tue, 9 May 2017 15:37:34 +0100
Subject: [PATCH] net/i40e: add return value checks

[ upstream commit 799c5c602df35495e300613f7e9b7b54db7f38cf ]

Coverity issue: 1379362
Coverity issue: 1379365
Fixes: 71d35259ff67 ("i40e: tear down flow director")

Signed-off-by: Herakliusz Lipiec <herakliusz.lipiec@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
---
 drivers/net/i40e/i40e_fdir.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 335bf15..e78610b 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -294,8 +294,12 @@ i40e_fdir_teardown(struct i40e_pf *pf)
 	vsi = pf->fdir.fdir_vsi;
 	if (!vsi)
 		return;
-	i40e_switch_tx_queue(hw, vsi->base_queue, FALSE);
-	i40e_switch_rx_queue(hw, vsi->base_queue, FALSE);
+	int err = i40e_switch_tx_queue(hw, vsi->base_queue, FALSE);
+	if (err)
+		PMD_DRV_LOG(DEBUG, "Failed to do FDIR TX switch off");
+	err = i40e_switch_rx_queue(hw, vsi->base_queue, FALSE);
+	if (err)
+		PMD_DRV_LOG(DEBUG, "Failed to do FDIR RX switch off");
 	i40e_dev_rx_queue_release(pf->fdir.rxq);
 	pf->fdir.rxq = NULL;
 	i40e_dev_tx_queue_release(pf->fdir.txq);
-- 
2.7.4

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

* [dpdk-stable] patch 'net/i40e/base: fix Tx error stats on VF' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/mlx5: fix completion buffer size' " Yuanhan Liu
                   ` (36 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Wenzhuo Lu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From 9037fc78e162dcaa3d075432de0b97b3b9662590 Mon Sep 17 00:00:00 2001
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
Date: Thu, 18 May 2017 11:29:04 +0800
Subject: [PATCH] net/i40e/base: fix Tx error stats on VF

[ upstream commit bc9ee862baa7c7aab11dd3be97389421396e1622 ]

Unfortunately the datasheet has a mistake. The
address of the TX error counter is wrong.

Fixes: 8db9e2a1b232 ("i40e: base driver")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/i40e/base/i40e_register.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/i40e/base/i40e_register.h b/drivers/net/i40e/base/i40e_register.h
index fd0a723..caa2e1e 100644
--- a/drivers/net/i40e/base/i40e_register.h
+++ b/drivers/net/i40e/base/i40e_register.h
@@ -2805,7 +2805,7 @@ POSSIBILITY OF SUCH DAMAGE.
 #define I40E_GLV_RUPP_MAX_INDEX  383
 #define I40E_GLV_RUPP_RUPP_SHIFT 0
 #define I40E_GLV_RUPP_RUPP_MASK  I40E_MASK(0xFFFFFFFF, I40E_GLV_RUPP_RUPP_SHIFT)
-#define I40E_GLV_TEPC(_VSI)      (0x00344000 + ((_VSI) * 4)) /* _i=0...383 */ /* Reset: CORER */
+#define I40E_GLV_TEPC(_VSI)      (0x00344000 + ((_VSI) * 8)) /* _i=0...383 */ /* Reset: CORER */
 #define I40E_GLV_TEPC_MAX_INDEX  383
 #define I40E_GLV_TEPC_TEPC_SHIFT 0
 #define I40E_GLV_TEPC_TEPC_MASK  I40E_MASK(0xFFFFFFFF, I40E_GLV_TEPC_TEPC_SHIFT)
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mlx5: fix completion buffer size' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/i40e/base: fix Tx error stats on VF' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/igb: fix add/delete of flex filters' " Yuanhan Liu
                   ` (35 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Shahaf Shuler; +Cc: Yongseok Koh, Nelio Laranjeiro, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From 092c670e0dff3bb525c08bcc71d46c79d1674e2b Mon Sep 17 00:00:00 2001
From: Shahaf Shuler <shahafs@mellanox.com>
Date: Thu, 18 May 2017 13:44:45 +0300
Subject: [PATCH] net/mlx5: fix completion buffer size

[ upstream commit 626e8bfb84d55a7234d9b79c35bd7005f076fd0d ]

Completion buffer size was computed wrongly, causing
completion polling to wraparound too early and miss entries.

Fixing it by using Direct Verbs to query the CQ info.

Fixes: 6218063b39a6 ("net/mlx5: refactor Rx data path")
Fixes: 1d88ba171942 ("net/mlx5: refactor Tx data path")

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 14 +++++++++-----
 drivers/net/mlx5/mlx5_txq.c | 14 +++++++++-----
 2 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 118f6d6..aea203b 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -868,12 +868,16 @@ static inline int
 rxq_setup(struct rxq_ctrl *tmpl)
 {
 	struct ibv_cq *ibcq = tmpl->cq;
-	struct mlx5_cq *cq = to_mxxx(cq, cq);
+	struct ibv_mlx5_cq_info cq_info;
 	struct mlx5_rwq *rwq = container_of(tmpl->wq, struct mlx5_rwq, wq);
 	struct rte_mbuf *(*elts)[1 << tmpl->rxq.elts_n] =
 		rte_calloc_socket("RXQ", 1, sizeof(*elts), 0, tmpl->socket);
 
-	if (cq->cqe_sz != RTE_CACHE_LINE_SIZE) {
+	if (ibv_mlx5_exp_get_cq_info(ibcq, &cq_info)) {
+		ERROR("Unable to query CQ info. check your OFED.");
+		return ENOTSUP;
+	}
+	if (cq_info.cqe_size != RTE_CACHE_LINE_SIZE) {
 		ERROR("Wrong MLX5_CQE_SIZE environment variable value: "
 		      "it should be set to %u", RTE_CACHE_LINE_SIZE);
 		return EINVAL;
@@ -881,16 +885,16 @@ rxq_setup(struct rxq_ctrl *tmpl)
 	if (elts == NULL)
 		return ENOMEM;
 	tmpl->rxq.rq_db = rwq->rq.db;
-	tmpl->rxq.cqe_n = log2above(ibcq->cqe);
+	tmpl->rxq.cqe_n = log2above(cq_info.cqe_cnt);
 	tmpl->rxq.cq_ci = 0;
 	tmpl->rxq.rq_ci = 0;
-	tmpl->rxq.cq_db = cq->dbrec;
+	tmpl->rxq.cq_db = cq_info.dbrec;
 	tmpl->rxq.wqes =
 		(volatile struct mlx5_wqe_data_seg (*)[])
 		(uintptr_t)rwq->rq.buff;
 	tmpl->rxq.cqes =
 		(volatile struct mlx5_cqe (*)[])
-		(uintptr_t)cq->active_buf->buf;
+		(uintptr_t)cq_info.buf;
 	tmpl->rxq.elts = elts;
 	return 0;
 }
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index c286367..a31e4e5 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -205,14 +205,18 @@ txq_setup(struct txq_ctrl *tmpl, struct txq_ctrl *txq_ctrl)
 {
 	struct mlx5_qp *qp = to_mqp(tmpl->qp);
 	struct ibv_cq *ibcq = tmpl->cq;
-	struct mlx5_cq *cq = to_mxxx(cq, cq);
+	struct ibv_mlx5_cq_info cq_info;
 
-	if (cq->cqe_sz != RTE_CACHE_LINE_SIZE) {
+	if (ibv_mlx5_exp_get_cq_info(ibcq, &cq_info)) {
+		ERROR("Unable to query CQ info. check your OFED.");
+		return ENOTSUP;
+	}
+	if (cq_info.cqe_size != RTE_CACHE_LINE_SIZE) {
 		ERROR("Wrong MLX5_CQE_SIZE environment variable value: "
 		      "it should be set to %u", RTE_CACHE_LINE_SIZE);
 		return EINVAL;
 	}
-	tmpl->txq.cqe_n = log2above(ibcq->cqe);
+	tmpl->txq.cqe_n = log2above(cq_info.cqe_cnt);
 	tmpl->txq.qp_num_8s = qp->ctrl_seg.qp_num << 8;
 	tmpl->txq.wqes =
 		(volatile struct mlx5_wqe64 (*)[])
@@ -220,10 +224,10 @@ txq_setup(struct txq_ctrl *tmpl, struct txq_ctrl *txq_ctrl)
 	tmpl->txq.wqe_n = log2above(qp->sq.wqe_cnt);
 	tmpl->txq.qp_db = &qp->gen_data.db[MLX5_SND_DBR];
 	tmpl->txq.bf_reg = qp->gen_data.bf->reg;
-	tmpl->txq.cq_db = cq->dbrec;
+	tmpl->txq.cq_db = cq_info.dbrec;
 	tmpl->txq.cqes =
 		(volatile struct mlx5_cqe (*)[])
-		(uintptr_t)cq->active_buf->buf;
+		(uintptr_t)cq_info.buf;
 	tmpl->txq.elts =
 		(struct rte_mbuf *(*)[1 << tmpl->txq.elts_n])
 		((uintptr_t)txq_ctrl + sizeof(*txq_ctrl));
-- 
2.7.4

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

* [dpdk-stable] patch 'net/igb: fix add/delete of flex filters' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/i40e/base: fix Tx error stats on VF' " Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/mlx5: fix completion buffer size' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/cxgbe: fix port statistics' " Yuanhan Liu
                   ` (34 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Markus Theil; +Cc: Wenzhuo Lu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From 01ea4420fd9242ab74f3e140f6b456e72d0e5fcc Mon Sep 17 00:00:00 2001
From: Markus Theil <markus.theil@tu-ilmenau.de>
Date: Mon, 22 May 2017 12:17:50 +0200
Subject: [PATCH] net/igb: fix add/delete of flex filters

[ upstream commit 167e7b9ae531491f10f495587cb59ae271430abb ]

Before this patch, flex_filter->index was always zero when it was read
and used after rte_zmalloc. The corresponding code was therefore moved
into the add and delete parts of the if/else statement.

Fixes: 231d43909a31 ("igb: migrate flex filter to new API")

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/e1000/igb_ethdev.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index be2600d..0a94ecc 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -3736,10 +3736,6 @@ eth_igb_add_del_flex_filter(struct rte_eth_dev *dev,
 	}
 
 	wufc = E1000_READ_REG(hw, E1000_WUFC);
-	if (flex_filter->index < E1000_MAX_FHFT)
-		reg_off = E1000_FHFT(flex_filter->index);
-	else
-		reg_off = E1000_FHFT_EXT(flex_filter->index - E1000_MAX_FHFT);
 
 	if (add) {
 		if (eth_igb_flex_filter_lookup(&filter_info->flex_list,
@@ -3769,6 +3765,11 @@ eth_igb_add_del_flex_filter(struct rte_eth_dev *dev,
 			return -ENOSYS;
 		}
 
+		if (flex_filter->index < E1000_MAX_FHFT)
+			reg_off = E1000_FHFT(flex_filter->index);
+		else
+			reg_off = E1000_FHFT_EXT(flex_filter->index - E1000_MAX_FHFT);
+
 		E1000_WRITE_REG(hw, E1000_WUFC, wufc | E1000_WUFC_FLEX_HQ |
 				(E1000_WUFC_FLX0 << flex_filter->index));
 		queueing = filter->len |
@@ -3797,6 +3798,11 @@ eth_igb_add_del_flex_filter(struct rte_eth_dev *dev,
 			return -ENOENT;
 		}
 
+		if (it->index < E1000_MAX_FHFT)
+			reg_off = E1000_FHFT(it->index);
+		else
+			reg_off = E1000_FHFT_EXT(it->index - E1000_MAX_FHFT);
+
 		for (i = 0; i < E1000_FHFT_SIZE_IN_DWD; i++)
 			E1000_WRITE_REG(hw, reg_off + i * sizeof(uint32_t), 0);
 		E1000_WRITE_REG(hw, E1000_WUFC, wufc &
-- 
2.7.4

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

* [dpdk-stable] patch 'net/cxgbe: fix port statistics' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (2 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/igb: fix add/delete of flex filters' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/mlx5: fix exception handling' " Yuanhan Liu
                   ` (33 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: Kumar Sanghvi, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From a7bd289f483c992d5159cf7359cf0e2b1f61a2ae Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Sat, 27 May 2017 09:16:27 +0530
Subject: [PATCH] net/cxgbe: fix port statistics

[ upstream commit ea6a99c077212c5b054b951ef0cc19520076f50d ]

Do not count pause frames as part of normal TX/RX Frame/Byte counts.
Also, switch to using software counters rather than hardware for RX
stats.

Fixes: 856505d303f4 ("cxgbe: add port statistics")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
---
 drivers/net/cxgbe/base/t4_hw.c   | 20 ++++++++++++++++++++
 drivers/net/cxgbe/base/t4_regs.h | 18 ++++++++++++++++++
 drivers/net/cxgbe/cxgbe_ethdev.c |  4 ++--
 3 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/drivers/net/cxgbe/base/t4_hw.c b/drivers/net/cxgbe/base/t4_hw.c
index 9dca8da..19afdac 100644
--- a/drivers/net/cxgbe/base/t4_hw.c
+++ b/drivers/net/cxgbe/base/t4_hw.c
@@ -2136,6 +2136,7 @@ unsigned int t4_get_mps_bg_map(struct adapter *adap, int idx)
 void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p)
 {
 	u32 bgmap = t4_get_mps_bg_map(adap, idx);
+	u32 stat_ctl = t4_read_reg(adap, A_MPS_STAT_CTL);
 
 #define GET_STAT(name) \
 	t4_read_reg64(adap, \
@@ -2168,6 +2169,15 @@ void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p)
 	p->tx_ppp6             = GET_STAT(TX_PORT_PPP6);
 	p->tx_ppp7             = GET_STAT(TX_PORT_PPP7);
 
+	if (CHELSIO_CHIP_VERSION(adap->params.chip) >= CHELSIO_T5) {
+		if (stat_ctl & F_COUNTPAUSESTATTX) {
+			p->tx_frames -= p->tx_pause;
+			p->tx_octets -= p->tx_pause * 64;
+		}
+		if (stat_ctl & F_COUNTPAUSEMCTX)
+			p->tx_mcast_frames -= p->tx_pause;
+	}
+
 	p->rx_octets           = GET_STAT(RX_PORT_BYTES);
 	p->rx_frames           = GET_STAT(RX_PORT_FRAMES);
 	p->rx_bcast_frames     = GET_STAT(RX_PORT_BCAST);
@@ -2195,6 +2205,16 @@ void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p)
 	p->rx_ppp5             = GET_STAT(RX_PORT_PPP5);
 	p->rx_ppp6             = GET_STAT(RX_PORT_PPP6);
 	p->rx_ppp7             = GET_STAT(RX_PORT_PPP7);
+
+	if (CHELSIO_CHIP_VERSION(adap->params.chip) >= CHELSIO_T5) {
+		if (stat_ctl & F_COUNTPAUSESTATRX) {
+			p->rx_frames -= p->rx_pause;
+			p->rx_octets -= p->rx_pause * 64;
+		}
+		if (stat_ctl & F_COUNTPAUSEMCRX)
+			p->rx_mcast_frames -= p->rx_pause;
+	}
+
 	p->rx_ovflow0 = (bgmap & 1) ? GET_STAT_COM(RX_BG_0_MAC_DROP_FRAME) : 0;
 	p->rx_ovflow1 = (bgmap & 2) ? GET_STAT_COM(RX_BG_1_MAC_DROP_FRAME) : 0;
 	p->rx_ovflow2 = (bgmap & 4) ? GET_STAT_COM(RX_BG_2_MAC_DROP_FRAME) : 0;
diff --git a/drivers/net/cxgbe/base/t4_regs.h b/drivers/net/cxgbe/base/t4_regs.h
index 9057e40..9c132dc 100644
--- a/drivers/net/cxgbe/base/t4_regs.h
+++ b/drivers/net/cxgbe/base/t4_regs.h
@@ -553,6 +553,24 @@
 #define V_VF(x) ((x) << S_VF)
 #define G_VF(x) (((x) >> S_VF) & M_VF)
 
+#define A_MPS_STAT_CTL 0x9600
+
+#define S_COUNTPAUSEMCRX    5
+#define V_COUNTPAUSEMCRX(x) ((x) << S_COUNTPAUSEMCRX)
+#define F_COUNTPAUSEMCRX    V_COUNTPAUSEMCRX(1U)
+
+#define S_COUNTPAUSESTATRX    4
+#define V_COUNTPAUSESTATRX(x) ((x) << S_COUNTPAUSESTATRX)
+#define F_COUNTPAUSESTATRX    V_COUNTPAUSESTATRX(1U)
+
+#define S_COUNTPAUSEMCTX    3
+#define V_COUNTPAUSEMCTX(x) ((x) << S_COUNTPAUSEMCTX)
+#define F_COUNTPAUSEMCTX    V_COUNTPAUSEMCTX(1U)
+
+#define S_COUNTPAUSESTATTX    2
+#define V_COUNTPAUSESTATTX(x) ((x) << S_COUNTPAUSESTATTX)
+#define F_COUNTPAUSESTATTX    V_COUNTPAUSESTATTX(1U)
+
 #define A_MPS_PORT_STAT_TX_PORT_BYTES_L 0x400
 #define A_MPS_PORT_STAT_TX_PORT_BYTES_H 0x404
 #define A_MPS_PORT_STAT_TX_PORT_FRAMES_L 0x408
diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index b7f28eb..06437c1 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -654,8 +654,6 @@ static void cxgbe_dev_stats_get(struct rte_eth_dev *eth_dev,
 	cxgbe_stats_get(pi, &ps);
 
 	/* RX Stats */
-	eth_stats->ipackets = ps.rx_frames;
-	eth_stats->ibytes   = ps.rx_octets;
 	eth_stats->imissed  = ps.rx_ovflow0 + ps.rx_ovflow1 +
 			      ps.rx_ovflow2 + ps.rx_ovflow3 +
 			      ps.rx_trunc0 + ps.rx_trunc1 +
@@ -675,6 +673,8 @@ static void cxgbe_dev_stats_get(struct rte_eth_dev *eth_dev,
 
 		eth_stats->q_ipackets[i] = rxq->stats.pkts;
 		eth_stats->q_ibytes[i] = rxq->stats.rx_bytes;
+		eth_stats->ipackets += eth_stats->q_ipackets[i];
+		eth_stats->ibytes += eth_stats->q_ibytes[i];
 	}
 
 	for (i = 0; i < pi->n_tx_qsets; i++) {
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mlx5: fix exception handling' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (3 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/cxgbe: fix port statistics' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/mlx5: fix redundant free of Tx buffer' " Yuanhan Liu
                   ` (32 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: Adrien Mazarguil, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From 9a11edd11af9542ddcdfdc78e06da393c71dcd41 Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Mon, 29 May 2017 18:02:59 -0700
Subject: [PATCH] net/mlx5: fix exception handling

[ upstream commit 70aee77ec6284d18ae30486b545b0527c2082bce ]

A sanity check is required in priv_fdir_disable(). If resizing Rx queue
fails, this can cause a crash by referencing a NULL pointer.

Fixes: 76f5c99e6840 ("mlx5: support flow director")
Fixes: 0cdddf4d0626 ("net/mlx5: split Rx queue structure")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 drivers/net/mlx5/mlx5_fdir.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_fdir.c b/drivers/net/mlx5/mlx5_fdir.c
index 1acf682..70a5dd0 100644
--- a/drivers/net/mlx5/mlx5_fdir.c
+++ b/drivers/net/mlx5/mlx5_fdir.c
@@ -731,9 +731,11 @@ priv_fdir_disable(struct priv *priv)
 
 	/* Destroy flow director context in each RX queue. */
 	for (i = 0; (i != priv->rxqs_n); i++) {
-		struct rxq_ctrl *rxq_ctrl =
-			container_of((*priv->rxqs)[i], struct rxq_ctrl, rxq);
+		struct rxq_ctrl *rxq_ctrl;
 
+		if (!(*priv->rxqs)[i])
+			continue;
+		rxq_ctrl = container_of((*priv->rxqs)[i], struct rxq_ctrl, rxq);
 		if (!rxq_ctrl->fdir_queue)
 			continue;
 		priv_fdir_queue_destroy(priv, rxq_ctrl->fdir_queue);
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mlx5: fix redundant free of Tx buffer' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (4 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/mlx5: fix exception handling' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/igb: fix checksum valid flags' " Yuanhan Liu
                   ` (31 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: Nelio Laranjeiro, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From 5990e4c0b48e1e3e1dbbf4bd087b0b65891cf73f Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Wed, 31 May 2017 10:48:45 -0700
Subject: [PATCH] net/mlx5: fix redundant free of Tx buffer

[ upstream commit c80711c3fbfdae1449ad1cbc6b31067087bd9561 ]

SW completion ring of Tx (txq->elts) stores individual mbufs even if a
multi-segmented packet is sent. rte_pktmbuf_free_seg() must be used when
cleaning up the completion ring. Otherwise, chained mbufs are redundantly
freed and finally it would cause a crash.

Fixes: 1d88ba171942 ("net/mlx5: refactor Tx data path")

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

diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index a31e4e5..d0c4dce 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -115,7 +115,7 @@ txq_free_elts(struct txq_ctrl *txq_ctrl)
 		struct rte_mbuf *elt = (*elts)[elts_tail];
 
 		assert(elt != NULL);
-		rte_pktmbuf_free(elt);
+		rte_pktmbuf_free_seg(elt);
 #ifndef NDEBUG
 		/* Poisoning. */
 		memset(&(*elts)[elts_tail],
-- 
2.7.4

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

* [dpdk-stable] patch 'net/igb: fix checksum valid flags' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (5 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/mlx5: fix redundant free of Tx buffer' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/i40e: exclude internal packet's byte count' " Yuanhan Liu
                   ` (30 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Wenzhuo Lu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From 1bc1e85b609ea002863f347be3dd74458dc545e0 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Wed, 31 May 2017 11:03:12 +0800
Subject: [PATCH] net/igb: fix checksum valid flags

[ upstream commit 760110abd68d84014b48bb84945276016d3e7616 ]

To enable L4 checksum offload for SCTP packets, E1000_RXCSUM_CRCOFL
should be set.

Otherwise, for SCTP packets even L4 checksum not calculated, it will
return PKT_RX_L4_CKSUM_GOOD.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/e1000/igb_rxtx.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index dbd37ac..556d460 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -2179,9 +2179,11 @@ eth_igb_rx_init(struct rte_eth_dev *dev)
 
 	/* Enable both L3/L4 rx checksum offload */
 	if (dev->data->dev_conf.rxmode.hw_ip_checksum)
-		rxcsum |= (E1000_RXCSUM_IPOFL  | E1000_RXCSUM_TUOFL);
+		rxcsum |= (E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL |
+				E1000_RXCSUM_CRCOFL);
 	else
-		rxcsum &= ~(E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL);
+		rxcsum &= ~(E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL |
+				E1000_RXCSUM_CRCOFL);
 	E1000_WRITE_REG(hw, E1000_RXCSUM, rxcsum);
 
 	/* Setup the Receive Control Register. */
-- 
2.7.4

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

* [dpdk-stable] patch 'net/i40e: exclude internal packet's byte count' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (6 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/igb: fix checksum valid flags' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/i40e: fix VF statistics' " Yuanhan Liu
                   ` (29 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From 0e8a05b462ae056bb3a198c0cc866132bdfe0bde Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Thu, 1 Jun 2017 13:55:45 -0400
Subject: [PATCH] net/i40e: exclude internal packet's byte count

[ upstream commit 0bcdc44510ef5efd7c0069cdd0161e6f446c254b ]

Tx/Rx byte counts of internal managed packet should be
excluded from the total rx/tx bytes.

Fixes: 9aace75fc82e ("i40e: fix statistics")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 21 +++++++++++++++++++--
 drivers/net/i40e/i40e_ethdev.h |  5 +++++
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 4e4cd16..975f27a 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2146,6 +2146,19 @@ i40e_read_stats_registers(struct i40e_pf *pf, struct i40e_hw *hw)
 	struct i40e_hw_port_stats *ns = &pf->stats; /* new stats */
 	struct i40e_hw_port_stats *os = &pf->stats_offset; /* old stats */
 
+	/* Get rx/tx bytes of internal transfer packets */
+	i40e_stat_update_48(hw, I40E_GLV_GORCH(hw->port),
+			I40E_GLV_GORCL(hw->port),
+			pf->offset_loaded,
+			&pf->internal_rx_bytes_offset,
+			&pf->internal_rx_bytes);
+
+	i40e_stat_update_48(hw, I40E_GLV_GOTCH(hw->port),
+			I40E_GLV_GOTCL(hw->port),
+			pf->offset_loaded,
+			&pf->internal_tx_bytes_offset,
+			&pf->internal_tx_bytes);
+
 	/* Get statistics of struct i40e_eth_stats */
 	i40e_stat_update_48(hw, I40E_GLPRT_GORCH(hw->port),
 			    I40E_GLPRT_GORCL(hw->port),
@@ -2167,7 +2180,7 @@ i40e_read_stats_registers(struct i40e_pf *pf, struct i40e_hw *hw)
 	 * so subtract ETHER_CRC_LEN from the byte counter for each rx packet.
 	 */
 	ns->eth.rx_bytes -= (ns->eth.rx_unicast + ns->eth.rx_multicast +
-		ns->eth.rx_broadcast) * ETHER_CRC_LEN;
+		ns->eth.rx_broadcast) * ETHER_CRC_LEN + pf->internal_rx_bytes;
 
 	i40e_stat_update_32(hw, I40E_GLPRT_RDPC(hw->port),
 			    pf->offset_loaded, &os->eth.rx_discards,
@@ -2195,7 +2208,7 @@ i40e_read_stats_registers(struct i40e_pf *pf, struct i40e_hw *hw)
 			    pf->offset_loaded, &os->eth.tx_broadcast,
 			    &ns->eth.tx_broadcast);
 	ns->eth.tx_bytes -= (ns->eth.tx_unicast + ns->eth.tx_multicast +
-		ns->eth.tx_broadcast) * ETHER_CRC_LEN;
+		ns->eth.tx_broadcast) * ETHER_CRC_LEN + pf->internal_tx_bytes;
 	/* GLPRT_TEPC not supported */
 
 	/* additional port specific stats */
@@ -4920,6 +4933,10 @@ i40e_pf_setup(struct i40e_pf *pf)
 	pf->offset_loaded = FALSE;
 	memset(&pf->stats, 0, sizeof(struct i40e_hw_port_stats));
 	memset(&pf->stats_offset, 0, sizeof(struct i40e_hw_port_stats));
+	pf->internal_rx_bytes = 0;
+	pf->internal_tx_bytes = 0;
+	pf->internal_rx_bytes_offset = 0;
+	pf->internal_tx_bytes_offset = 0;
 
 	ret = i40e_pf_get_switch_config(pf);
 	if (ret != I40E_SUCCESS) {
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index 5f3ecd9..f283319 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -431,6 +431,11 @@ struct i40e_pf {
 
 	struct i40e_hw_port_stats stats_offset;
 	struct i40e_hw_port_stats stats;
+	/* internal packet byte count, it should be excluded from the total */
+	uint64_t internal_rx_bytes;
+	uint64_t internal_tx_bytes;
+	uint64_t internal_rx_bytes_offset;
+	uint64_t internal_tx_bytes_offset;
 	bool offset_loaded;
 
 	struct rte_eth_dev_data *dev_data; /* Pointer to the device data */
-- 
2.7.4

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

* [dpdk-stable] patch 'net/i40e: fix VF statistics' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (7 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/i40e: exclude internal packet's byte count' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/bnxt: fix reporting of link status' " Yuanhan Liu
                   ` (28 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Qi Zhang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From 6e6f1b63f33228c856d702b623e2749419502dcc Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 5 Jun 2017 17:14:20 -0400
Subject: [PATCH] net/i40e: fix VF statistics

[ upstream commit 98abce237ba75e06e30f92bf361bc0de22098cb4 ]

CRC bytes should be excluded, so rx/tx bytes of VF stats is aligned
with PF stats.

Fixes: 9aace75fc82e ("i40e: fix statistics")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 975f27a..afa2098 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2096,6 +2096,10 @@ i40e_update_vsi_stats(struct i40e_vsi *vsi)
 	i40e_stat_update_48(hw, I40E_GLV_BPRCH(idx), I40E_GLV_BPRCL(idx),
 			    vsi->offset_loaded, &oes->rx_broadcast,
 			    &nes->rx_broadcast);
+	/* exclude CRC bytes */
+	nes->rx_bytes -= (nes->rx_unicast + nes->rx_multicast +
+		nes->rx_broadcast) * ETHER_CRC_LEN;
+
 	i40e_stat_update_32(hw, I40E_GLV_RDPC(idx), vsi->offset_loaded,
 			    &oes->rx_discards, &nes->rx_discards);
 	/* GLV_REPC not supported */
@@ -2115,6 +2119,9 @@ i40e_update_vsi_stats(struct i40e_vsi *vsi)
 	i40e_stat_update_48(hw, I40E_GLV_BPTCH(idx), I40E_GLV_BPTCL(idx),
 			    vsi->offset_loaded,  &oes->tx_broadcast,
 			    &nes->tx_broadcast);
+	/* exclude CRC bytes */
+	nes->tx_bytes -= (nes->tx_unicast + nes->tx_multicast +
+		nes->tx_broadcast) * ETHER_CRC_LEN;
 	/* GLV_TDPC not supported */
 	i40e_stat_update_32(hw, I40E_GLV_TEPC(idx), vsi->offset_loaded,
 			    &oes->tx_errors, &nes->tx_errors);
-- 
2.7.4

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

* [dpdk-stable] patch 'net/bnxt: fix reporting of link status' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (8 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/i40e: fix VF statistics' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'kni: fix build with gcc 7.1' " Yuanhan Liu
                   ` (27 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Stephen Hurd, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From fc8eecb2a34fe50654d62073e559d20a2790674e Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 8 Jun 2017 23:24:48 -0500
Subject: [PATCH] net/bnxt: fix reporting of link status

[ upstream commit bc8ee8572e8e5f82e4cd695c107f3fbcc42a5674 ]

This patch fixes incorrect reporting of link status

1) When link is down, set speed to zero. Otherwise a wrong non-zero
   speed will be displayed.

2) DAC cables can detect there is a signal, but it necessarily does not
   mean link is up. Code previously treated this as link up.

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

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 07e7124..e7ae5c7 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -534,7 +534,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
 	HWRM_CHECK_RESULT;
 
 	link_info->phy_link_status = resp->link;
-	if (link_info->phy_link_status != HWRM_PORT_PHY_QCFG_OUTPUT_LINK_NO_LINK) {
+	if (link_info->phy_link_status == HWRM_PORT_PHY_QCFG_OUTPUT_LINK_LINK) {
 		link_info->link_up = 1;
 		link_info->link_speed = rte_le_to_cpu_16(resp->link_speed);
 	} else {
@@ -1436,7 +1436,7 @@ int bnxt_get_hwrm_link_config(struct bnxt *bp, struct rte_eth_link *link)
 		link->link_speed =
 			bnxt_parse_hw_link_speed(link_info->link_speed);
 	else
-		link->link_speed = ETH_LINK_SPEED_10M;
+		link->link_speed = ETH_SPEED_NUM_NONE;
 	link->link_duplex = bnxt_parse_hw_link_duplex(link_info->duplex);
 	link->link_status = link_info->link_up;
 	link->link_autoneg = link_info->auto_mode ==
-- 
2.7.4

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

* [dpdk-stable] patch 'kni: fix build with gcc 7.1' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (9 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/bnxt: fix reporting of link status' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/enic: " Yuanhan Liu
                   ` (26 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Nirmoy Das, Markos Chandras, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From 2807cae5824d29a7c4d9c0d2cb8853833fc506d2 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 13 Jun 2017 17:42:08 +0100
Subject: [PATCH] kni: fix build with gcc 7.1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit c3698192940ca9786cb2871272a585638c50d194 ]

build error:
.../dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_main.c:
  In function ‘igb_kni_probe’:
.../dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_main.c:2483:30:
  error: ‘%d’ directive output may be truncated writing between 1 and 5
  bytes into a region of size between 0 and 11
  [-Werror=format-truncation=]
        "%d.%d, 0x%08x, %d.%d.%d",
                              ^~
.../dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_main.c:2483:8:
  note: directive argument in the range [0, 65535]
        "%d.%d, 0x%08x, %d.%d.%d",
        ^~~~~~~~~~~~~~~~~~~~~~~~~
.../dpdk/build/build/lib/librte_eal/linuxapp/kni/igb_main.c:2481:4:
  note: ‘snprintf’ output between 23 and 43 bytes into a destination of
  size 32
    snprintf(adapter->fw_version,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        sizeof(adapter->fw_version),
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        "%d.%d, 0x%08x, %d.%d.%d",
        ~~~~~~~~~~~~~~~~~~~~~~~~~~
        fw.eep_major, fw.eep_minor, fw.etrack_id,
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        fw.or_major, fw.or_build, fw.or_patch);
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixed by increasing buffer size to 43 as suggested in compiler log.

Fixes: b9ee370557f1 ("kni: update kernel driver ethtool baseline")

Reported-by: Nirmoy Das <ndas@suse.de>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Markos Chandras <mchandras@suse.de>
---
 lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h
index d077b49..8667f29 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h
@@ -607,7 +607,7 @@ struct igb_adapter {
 	int int_mode;
 	u32 rss_queues;
 	u32 vmdq_pools;
-	char fw_version[32];
+	char fw_version[43];
 	u32 wvbr;
 	struct igb_mac_addr *mac_table;
 #ifdef CONFIG_IGB_VMDQ_NETDEV
-- 
2.7.4

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

* [dpdk-stable] patch 'net/enic: fix build with gcc 7.1' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (10 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'kni: fix build with gcc 7.1' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/mlx5: " Yuanhan Liu
                   ` (25 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From a7bc12b58e70881284b11c25d6fa88a7e11753f9 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 13 Jun 2017 17:42:10 +0100
Subject: [PATCH] net/enic: fix build with gcc 7.1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit a45962823d863890265bd9033be09a33afb6199f ]

build error:

.../dpdk/drivers/net/enic/base/vnic_dev.c:
  In function ‘vnic_dev_get_mac_addr’:
.../dpdk/drivers/net/enic/base/vnic_dev.c:470:12:
  error: ‘a0’ is used uninitialized in this function
  [-Werror=uninitialized]
  args[0] = *a0;
            ^~~
...dpdk/drivers/net/enic/base/vnic_dev.c:
  In function ‘vnic_dev_classifier’:
...dpdk/drivers/net/enic/base/vnic_dev.c:471:12:
  error: ‘a1’ may be used uninitialized in this function
  [-Werror=maybe-uninitialized]
  args[1] = *a1;
            ^~~
Fixed by providing initial values.

Fixes: 9913fbb91df0 ("enic/base: common code")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/enic/base/vnic_dev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/enic/base/vnic_dev.c b/drivers/net/enic/base/vnic_dev.c
index 84e4840..1cd031a 100644
--- a/drivers/net/enic/base/vnic_dev.c
+++ b/drivers/net/enic/base/vnic_dev.c
@@ -645,7 +645,7 @@ int vnic_dev_soft_reset_done(struct vnic_dev *vdev, int *done)
 
 int vnic_dev_get_mac_addr(struct vnic_dev *vdev, u8 *mac_addr)
 {
-	u64 a0, a1 = 0;
+	u64 a0 = 0, a1 = 0;
 	int wait = 1000;
 	int err, i;
 
@@ -1021,7 +1021,7 @@ int vnic_dev_set_mac_addr(struct vnic_dev *vdev, u8 *mac_addr)
 int vnic_dev_classifier(struct vnic_dev *vdev, u8 cmd, u16 *entry,
 	struct filter_v2 *data)
 {
-	u64 a0, a1;
+	u64 a0 = 0, a1 = 0;
 	int wait = 1000;
 	dma_addr_t tlv_pa;
 	int ret = -EINVAL;
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mlx5: fix build with gcc 7.1' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (11 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/enic: " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'vhost: fix guest pages memory leak' " Yuanhan Liu
                   ` (24 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Adrien Mazarguil, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From 031afb4a7b662035092a99a07c00e492fcbf3c19 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 13 Jun 2017 17:42:11 +0100
Subject: [PATCH] net/mlx5: fix build with gcc 7.1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit aee3d4d6d5a6dbfa0a503f25f0f2bec8e6476477 ]

build error:
.../dpdk/drivers/net/mlx5/mlx5_fdir.c:
  In function ‘fdir_filter_to_flow_desc’:
.../dpdk/drivers/net/mlx5/mlx5_fdir.c:146:18:
 error: this statement may fall through [-Werror=implicit-fallthrough=]
   desc->dst_port = fdir_filter->input.flow.udp4_flow.dst_port;
   ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.../dpdk/drivers/net/mlx5/mlx5_fdir.c:147:2: note: here
  case RTE_ETH_FLOW_NONFRAG_IPV4_OTHER:
  ^~~~

Fixed by adding fallthrough comment to the code.

Fixes: 76f5c99e6840 ("mlx5: support flow director")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 drivers/net/mlx5/mlx5_fdir.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/mlx5_fdir.c b/drivers/net/mlx5/mlx5_fdir.c
index 70a5dd0..d4c19e5 100644
--- a/drivers/net/mlx5/mlx5_fdir.c
+++ b/drivers/net/mlx5/mlx5_fdir.c
@@ -142,6 +142,7 @@ fdir_filter_to_flow_desc(const struct rte_eth_fdir_filter *fdir_filter,
 	case RTE_ETH_FLOW_NONFRAG_IPV4_TCP:
 		desc->src_port = fdir_filter->input.flow.udp4_flow.src_port;
 		desc->dst_port = fdir_filter->input.flow.udp4_flow.dst_port;
+		/* fallthrough */
 	case RTE_ETH_FLOW_NONFRAG_IPV4_OTHER:
 		desc->src_ip[0] = fdir_filter->input.flow.ip4_flow.src_ip;
 		desc->dst_ip[0] = fdir_filter->input.flow.ip4_flow.dst_ip;
-- 
2.7.4

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

* [dpdk-stable] patch 'vhost: fix guest pages memory leak' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (12 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/mlx5: " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/virtio: zero the whole memory zone' " Yuanhan Liu
                   ` (23 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Dariusz Stojaczyk; +Cc: Jens Freimann, Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From bfbcbaa68dee163c153b2f26bf61729af6b53c41 Mon Sep 17 00:00:00 2001
From: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Date: Fri, 26 May 2017 13:59:14 +0200
Subject: [PATCH] vhost: fix guest pages memory leak

[ upstream commit 29c7c2fdaa4e88eebee6e3abaa15858d9616b1aa ]

This patch fixes a memory leak.
virtio_net::guest_pages is allocated in vhost_setup_mem_table(),
reallocated in add_one_guest_page(), but never freed.

Fixes: e246896178e6 ("vhost: get guest/host physical address mappings")

Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jens Freimann <jfreiman@redhat.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 lib/librte_vhost/vhost_user.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 0cb1c67..d25e1c0 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -110,6 +110,10 @@ vhost_backend_cleanup(struct virtio_net *dev)
 		rte_free(dev->mem);
 		dev->mem = NULL;
 	}
+
+	free(dev->guest_pages);
+	dev->guest_pages = NULL;
+
 	if (dev->log_addr) {
 		munmap((void *)(uintptr_t)dev->log_addr, dev->log_size);
 		dev->log_addr = 0;
-- 
2.7.4

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

* [dpdk-stable] patch 'net/virtio: zero the whole memory zone' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (13 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'vhost: fix guest pages memory leak' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'lpm: fix index of tbl8' " Yuanhan Liu
                   ` (22 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From 0915c9dc62af2de401d90289669a51b965ba5a42 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Mon, 12 Jun 2017 12:34:30 +0800
Subject: [PATCH] net/virtio: zero the whole memory zone

[ upstream commit 5bdd24e451c711129218c88292cae8e891e7506a ]

Zero the whole memory zone instead of the first few bytes.

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

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 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 452ad2a..1d2b8e4 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -423,7 +423,7 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx)
 		}
 	}
 
-	memset(mz->addr, 0, sizeof(mz->len));
+	memset(mz->addr, 0, mz->len);
 
 	vq->vq_ring_mem = mz->phys_addr;
 	vq->vq_ring_virt_mem = mz->addr;
-- 
2.7.4

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

* [dpdk-stable] patch 'lpm: fix index of tbl8' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (14 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/virtio: zero the whole memory zone' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'ip_frag: free mbufs on reassembly table destroy' " Yuanhan Liu
                   ` (21 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Wei Dai; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From 19cc2bb34051031ff9d076d7246821cd8ab2692c Mon Sep 17 00:00:00 2001
From: Wei Dai <wei.dai@intel.com>
Date: Mon, 19 Jun 2017 12:14:38 +0800
Subject: [PATCH] lpm: fix index of tbl8

[ upstream commit 9d042b3ee0cc67e2db6cc81ef454113957793d2b ]

>From v20 to v1604, number of tbl8 can be up to 1<<24,
(uint8_t) or (uint16_t) may truncate the number of
index of tlb8 in v1604 and cause wrong number.

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

Signed-off-by: Wei Dai <wei.dai@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_lpm/rte_lpm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c
index 8c15c4c..978ac60 100644
--- a/lib/librte_lpm/rte_lpm.c
+++ b/lib/librte_lpm/rte_lpm.c
@@ -1034,7 +1034,7 @@ add_depth_big_v1604(struct rte_lpm *lpm, uint32_t ip_masked, uint8_t depth,
 		 */
 
 		struct rte_lpm_tbl_entry new_tbl24_entry = {
-			.group_idx = (uint8_t)tbl8_group_index,
+			.group_idx = tbl8_group_index,
 			.valid = VALID,
 			.valid_group = 1,
 			.depth = 0,
@@ -1080,7 +1080,7 @@ add_depth_big_v1604(struct rte_lpm *lpm, uint32_t ip_masked, uint8_t depth,
 		 */
 
 		struct rte_lpm_tbl_entry new_tbl24_entry = {
-				.group_idx = (uint8_t)tbl8_group_index,
+				.group_idx = tbl8_group_index,
 				.valid = VALID,
 				.valid_group = 1,
 				.depth = 0,
-- 
2.7.4

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

* [dpdk-stable] patch 'ip_frag: free mbufs on reassembly table destroy' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (15 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'lpm: fix index of tbl8' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'mem: fix malloc element resize with padding' " Yuanhan Liu
                   ` (20 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Dahir Osman; +Cc: Matt Peters, Allain Legacy, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From 7d272acbdf4495f32dff48b86d7627df18b52cf5 Mon Sep 17 00:00:00 2001
From: Dahir Osman <dahir.osman@windriver.com>
Date: Mon, 5 Jun 2017 11:49:01 -0400
Subject: [PATCH] ip_frag: free mbufs on reassembly table destroy

[ upstream commit 95908f52393da36c47905a777f64c0650585c12b ]

The rte_ip_frag_table_destroy procedure simply releases the memory for the
table without freeing the packet buffers that may be referenced in the hash
table for in-flight or incomplete packet reassembly operations.  To prevent
leaked mbufs go through the list of fragments and free each one
individually.

Fixes: 416707812c03 ("ip_frag: refactor reassembly code into a proper library")

Reported-by: Matt Peters <matt.peters@windriver.com>
Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_ip_frag/ip_frag_common.h       | 20 ++++++++++++++++++++
 lib/librte_ip_frag/rte_ip_frag.h          |  7 ++-----
 lib/librte_ip_frag/rte_ip_frag_common.c   | 13 +++++++++++++
 lib/librte_ip_frag/rte_ipfrag_version.map |  7 +++++++
 4 files changed, 42 insertions(+), 5 deletions(-)

diff --git a/lib/librte_ip_frag/ip_frag_common.h b/lib/librte_ip_frag/ip_frag_common.h
index 835e4f9..9f56196 100644
--- a/lib/librte_ip_frag/ip_frag_common.h
+++ b/lib/librte_ip_frag/ip_frag_common.h
@@ -130,6 +130,26 @@ ip_frag_free(struct ip_frag_pkt *fp, struct rte_ip_frag_death_row *dr)
 	dr->cnt = k;
 }
 
+/* delete fragment's mbufs immediately instead of using death row */
+static inline void
+ip_frag_free_immediate(struct ip_frag_pkt *fp)
+{
+	uint32_t i;
+
+	for (i = 0; i < fp->last_idx; i++) {
+		if (fp->frags[i].mb != NULL) {
+			IP_FRAG_LOG(DEBUG, "%s:%d\n"
+			    "mbuf: %p, tms: %" PRIu64", key: <%" PRIx64 ", %#x>\n",
+			    __func__, __LINE__, fp->frags[i].mb, fp->start,
+			    fp->key.src_dst[0], fp->key.id);
+			rte_pktmbuf_free(fp->frags[i].mb);
+			fp->frags[i].mb = NULL;
+		}
+	}
+
+	fp->last_idx = 0;
+}
+
 /* if key is empty, mark key as in use */
 static inline void
 ip_frag_inuse(struct rte_ip_frag_tbl *tbl, const struct  ip_frag_pkt *fp)
diff --git a/lib/librte_ip_frag/rte_ip_frag.h b/lib/librte_ip_frag/rte_ip_frag.h
index 6708906..ff16f4c 100644
--- a/lib/librte_ip_frag/rte_ip_frag.h
+++ b/lib/librte_ip_frag/rte_ip_frag.h
@@ -180,11 +180,8 @@ struct rte_ip_frag_tbl * rte_ip_frag_table_create(uint32_t bucket_num,
  * @param tbl
  *   Fragmentation table to free.
  */
-static inline void
-rte_ip_frag_table_destroy(struct rte_ip_frag_tbl *tbl)
-{
-	rte_free(tbl);
-}
+void
+rte_ip_frag_table_destroy(struct rte_ip_frag_tbl *tbl);
 
 /**
  * This function implements the fragmentation of IPv6 packets.
diff --git a/lib/librte_ip_frag/rte_ip_frag_common.c b/lib/librte_ip_frag/rte_ip_frag_common.c
index 6176ff4..8460f8e 100644
--- a/lib/librte_ip_frag/rte_ip_frag_common.c
+++ b/lib/librte_ip_frag/rte_ip_frag_common.c
@@ -109,6 +109,19 @@ rte_ip_frag_table_create(uint32_t bucket_num, uint32_t bucket_entries,
 	return tbl;
 }
 
+/* delete fragmentation table */
+void
+rte_ip_frag_table_destroy(struct rte_ip_frag_tbl *tbl)
+{
+	struct ip_frag_pkt *fp;
+
+	TAILQ_FOREACH(fp, &tbl->lru, lru) {
+		ip_frag_free_immediate(fp);
+	}
+
+	rte_free(tbl);
+}
+
 /* dump frag table statistics to file */
 void
 rte_ip_frag_table_statistics_dump(FILE *f, const struct rte_ip_frag_tbl *tbl)
diff --git a/lib/librte_ip_frag/rte_ipfrag_version.map b/lib/librte_ip_frag/rte_ipfrag_version.map
index 354fa08..d1acf07 100644
--- a/lib/librte_ip_frag/rte_ipfrag_version.map
+++ b/lib/librte_ip_frag/rte_ipfrag_version.map
@@ -11,3 +11,10 @@ DPDK_2.0 {
 
 	local: *;
 };
+
+DPDK_17.08 {
+    global:
+
+    rte_ip_frag_table_destroy;
+
+} DPDK_2.0;
-- 
2.7.4

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

* [dpdk-stable] patch 'mem: fix malloc element resize with padding' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (16 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'ip_frag: free mbufs on reassembly table destroy' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix option parsing' " Yuanhan Liu
                   ` (19 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Jamie Lavigne; +Cc: Sergio Gonzalez Monroy, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From 473e0736fdd56daee55ee1596a8e15bc7efb9f4e Mon Sep 17 00:00:00 2001
From: Jamie Lavigne <lavignen@amazon.com>
Date: Thu, 8 Jun 2017 19:12:17 +0000
Subject: [PATCH] mem: fix malloc element resize with padding

[ upstream commit 6dc931654f6cc90fdf61b278d465cbdf87f795e0 ]

Currently when a malloc_elem is split after resizing, any padding
present in the elem is ignored.  This causes the resized elem to be too
small when padding is present, and user data can overwrite the beginning
of the following malloc_elem.

Solve this by including the size of the padding when computing where to
split the malloc_elem.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Jamie Lavigne <lavignen@amazon.com>
Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
---
 lib/librte_eal/common/malloc_elem.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/lib/librte_eal/common/malloc_elem.c b/lib/librte_eal/common/malloc_elem.c
index 42568e1..08516af 100644
--- a/lib/librte_eal/common/malloc_elem.c
+++ b/lib/librte_eal/common/malloc_elem.c
@@ -314,17 +314,16 @@ malloc_elem_free(struct malloc_elem *elem)
 int
 malloc_elem_resize(struct malloc_elem *elem, size_t size)
 {
-	const size_t new_size = size + MALLOC_ELEM_OVERHEAD;
+	const size_t new_size = size + elem->pad + MALLOC_ELEM_OVERHEAD;
 	/* if we request a smaller size, then always return ok */
-	const size_t current_size = elem->size - elem->pad;
-	if (current_size >= new_size)
+	if (elem->size >= new_size)
 		return 0;
 
 	struct malloc_elem *next = RTE_PTR_ADD(elem, elem->size);
 	rte_spinlock_lock(&elem->heap->lock);
 	if (next ->state != ELEM_FREE)
 		goto err_return;
-	if (current_size + next->size < new_size)
+	if (elem->size + next->size < new_size)
 		goto err_return;
 
 	/* we now know the element fits, so remove from free list,
@@ -333,7 +332,7 @@ malloc_elem_resize(struct malloc_elem *elem, size_t size)
 	elem_free_list_remove(next);
 	join_elem(elem, next);
 
-	if (elem->size - new_size >= MIN_DATA_SIZE + MALLOC_ELEM_OVERHEAD){
+	if (elem->size - new_size >= MIN_DATA_SIZE + MALLOC_ELEM_OVERHEAD) {
 		/* now we have a big block together. Lets cut it down a bit, by splitting */
 		struct malloc_elem *split_pt = RTE_PTR_ADD(elem, new_size);
 		split_pt = RTE_PTR_ALIGN_CEIL(split_pt, RTE_CACHE_LINE_SIZE);
-- 
2.7.4

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

* [dpdk-stable] patch 'examples/l2fwd-crypto: fix option parsing' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (17 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'mem: fix malloc element resize with padding' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix application help' " Yuanhan Liu
                   ` (18 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From ae79a8c2522c7f024287d74d7a593cd358499ddb Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Wed, 24 May 2017 11:28:02 +0100
Subject: [PATCH] examples/l2fwd-crypto: fix option parsing

[ upstream commit f1ae15bac8aaa75aeb4fa886fd4d74d34c373193 ]

Statistics period time option is parsed with -T argument,
but -t was accepted by mistake, instead.

Fixes: 387259bd6c67 ("examples/l2fwd-crypto: add sample application")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/l2fwd-crypto/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 0728231..196bec9 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -1379,7 +1379,7 @@ l2fwd_crypto_parse_args(struct l2fwd_crypto_options *options,
 
 	l2fwd_crypto_default_options(options);
 
-	while ((opt = getopt_long(argc, argvopt, "p:q:st:", lgopts,
+	while ((opt = getopt_long(argc, argvopt, "p:q:sT:", lgopts,
 			&option_index)) != EOF) {
 		switch (opt) {
 		/* long options */
-- 
2.7.4

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

* [dpdk-stable] patch 'examples/l2fwd-crypto: fix application help' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (18 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix option parsing' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'cryptodev: fix device stop function' " Yuanhan Liu
                   ` (17 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Fiona Trahe, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From a248c2d5f1c08d0636803e9532e08046783c9cfe Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Thu, 22 Jun 2017 13:02:32 +0100
Subject: [PATCH] examples/l2fwd-crypto: fix application help

[ upstream commit a3c2e34b7f979304f7c51f1f1baf4a4353986f98 ]

Chain parameter can be CIPHER_HASH, HASH_CIPHER,
CIPHER_ONLY or HASH_ONLY, but only the first two
were shown in the application help.

Fixes: 1a75e9f3fadb ("examples/l2fwd-crypto: add cipher/hash only cases")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
 examples/l2fwd-crypto/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 196bec9..91d2c41 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -869,7 +869,8 @@ l2fwd_crypto_usage(const char *prgname)
 		" (0 to disable, 10 default, 86400 maximum)\n"
 
 		"  --cdev_type HW / SW / ANY\n"
-		"  --chain HASH_CIPHER / CIPHER_HASH\n"
+		"  --chain HASH_CIPHER / CIPHER_HASH / CIPHER_ONLY /"
+		" HASH_ONLY\n"
 
 		"  --cipher_algo ALGO\n"
 		"  --cipher_op ENCRYPT / DECRYPT\n"
-- 
2.7.4

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

* [dpdk-stable] patch 'cryptodev: fix device stop function' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (19 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix application help' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'test/crypto: fix overflow' " Yuanhan Liu
                   ` (16 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Kirill Rybalchenko; +Cc: Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From e3054c760f24883da1ccfab299b52fb991a32065 Mon Sep 17 00:00:00 2001
From: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Date: Wed, 14 Jun 2017 09:42:46 +0100
Subject: [PATCH] cryptodev: fix device stop function

[ upstream commit fe09afb73b349bdb25b343a09810ba1bfe6e5bcf ]

Flag dev_started should be cleared after dev_stop() function call
because the flag is checked inside the dev_stop() function.

Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for crypto devices")

Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 lib/librte_cryptodev/rte_cryptodev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 54e95d5..c836a2c 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -737,8 +737,8 @@ rte_cryptodev_stop(uint8_t dev_id)
 		return;
 	}
 
-	dev->data->dev_started = 0;
 	(*dev->dev_ops->dev_stop)(dev);
+	dev->data->dev_started = 0;
 }
 
 int
-- 
2.7.4

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

* [dpdk-stable] patch 'test/crypto: fix overflow' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (20 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'cryptodev: fix device stop function' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'mbuf: fix debug checks for headroom and tailroom' " Yuanhan Liu
                   ` (15 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From b4e8455da1ecd9adabcf59e05010f184ee5dfb4f Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Wed, 28 Jun 2017 10:31:03 +0100
Subject: [PATCH] test/crypto: fix overflow

[ upstream commit 405268c73de200733afe7eaa60d003be1f86e855 ]

In one of the SNOW3G unit tests, insufficient memory
was allocated, leading to a buffer overflow.

Fixes: 2b52e1e95aab ("app/test: add SNOW 3G UEA2 with offset")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test/test_cryptodev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 872f8b4..2754653 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -2944,8 +2944,7 @@ test_snow3g_encryption_offset_oop(const struct snow3g_test_data *tdata)
 	rte_hexdump(stdout, "ciphertext:", ciphertext, plaintext_len);
 #endif
 
-	expected_ciphertext_shifted = rte_malloc(NULL,
-			ceil_byte_length(plaintext_len + extra_offset), 0);
+	expected_ciphertext_shifted = rte_malloc(NULL, plaintext_len, 8);
 
 	TEST_ASSERT_NOT_NULL(expected_ciphertext_shifted,
 			"failed to reserve memory for ciphertext shifted\n");
-- 
2.7.4

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

* [dpdk-stable] patch 'mbuf: fix debug checks for headroom and tailroom' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (21 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'test/crypto: fix overflow' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'contigmem: free allocated memory on error' " Yuanhan Liu
                   ` (14 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Vasily Philipov; +Cc: Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From e496325ee597bf8c478aacaae02c464d6a113d8e Mon Sep 17 00:00:00 2001
From: Vasily Philipov <vasilyf@mellanox.com>
Date: Wed, 28 Jun 2017 15:25:12 +0300
Subject: [PATCH] mbuf: fix debug checks for headroom and tailroom

[ upstream commit 814baffdb6910c1a949bd7c5ce3c6807f703c799 ]

rte_pktmbuf_headroom() and rte_pktmbuf_tailroom() should be usable
with any segment, not only with headered ones, so is_header should be 0
when we call for sanity check inside them.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_mbuf/rte_mbuf.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index ead7c6e..00b8495 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -1331,7 +1331,7 @@ static inline void rte_pktmbuf_refcnt_update(struct rte_mbuf *m, int16_t v)
  */
 static inline uint16_t rte_pktmbuf_headroom(const struct rte_mbuf *m)
 {
-	__rte_mbuf_sanity_check(m, 1);
+	__rte_mbuf_sanity_check(m, 0);
 	return m->data_off;
 }
 
@@ -1345,7 +1345,7 @@ static inline uint16_t rte_pktmbuf_headroom(const struct rte_mbuf *m)
  */
 static inline uint16_t rte_pktmbuf_tailroom(const struct rte_mbuf *m)
 {
-	__rte_mbuf_sanity_check(m, 1);
+	__rte_mbuf_sanity_check(m, 0);
 	return (uint16_t)(m->buf_len - rte_pktmbuf_headroom(m) -
 			  m->data_len);
 }
-- 
2.7.4

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

* [dpdk-stable] patch 'contigmem: free allocated memory on error' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (22 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'mbuf: fix debug checks for headroom and tailroom' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'contigmem: do not zero pages during each mmap' " Yuanhan Liu
                   ` (13 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From 3e35cc5b148610735f7c0039afd4076b0c173f58 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Sun, 4 Jun 2017 13:53:23 +0800
Subject: [PATCH] contigmem: free allocated memory on error

[ upstream commit 5f51eca22489cc85aea23210d2e61e1f56870b7c ]

Fixes: 764bf26873b9 ("add FreeBSD support")

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_eal/bsdapp/contigmem/contigmem.c | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/bsdapp/contigmem/contigmem.c b/lib/librte_eal/bsdapp/contigmem/contigmem.c
index da971de..03e3e8d 100644
--- a/lib/librte_eal/bsdapp/contigmem/contigmem.c
+++ b/lib/librte_eal/bsdapp/contigmem/contigmem.c
@@ -123,19 +123,21 @@ static int
 contigmem_load()
 {
 	char index_string[8], description[32];
-	int  i;
+	int  i, error = 0;
 
 	if (contigmem_num_buffers > RTE_CONTIGMEM_MAX_NUM_BUFS) {
 		printf("%d buffers requested is greater than %d allowed\n",
 				contigmem_num_buffers, RTE_CONTIGMEM_MAX_NUM_BUFS);
-		return EINVAL;
+		error = EINVAL;
+		goto error;
 	}
 
 	if (contigmem_buffer_size < PAGE_SIZE ||
 			(contigmem_buffer_size & (contigmem_buffer_size - 1)) != 0) {
 		printf("buffer size 0x%lx is not greater than PAGE_SIZE and "
 				"power of two\n", contigmem_buffer_size);
-		return EINVAL;
+		error = EINVAL;
+		goto error;
 	}
 
 	for (i = 0; i < contigmem_num_buffers; i++) {
@@ -145,7 +147,8 @@ contigmem_load()
 
 		if (contigmem_buffers[i] == NULL) {
 			printf("contigmalloc failed for buffer %d\n", i);
-			return ENOMEM;
+			error = ENOMEM;
+			goto error;
 		}
 
 		printf("%2u: virt=%p phys=%p\n", i, contigmem_buffers[i],
@@ -165,6 +168,14 @@ contigmem_load()
 			GID_WHEEL, 0600, "contigmem");
 
 	return 0;
+
+error:
+	for (i = 0; i < contigmem_num_buffers; i++)
+		if (contigmem_buffers[i] != NULL)
+			contigfree(contigmem_buffers[i], contigmem_buffer_size,
+					M_CONTIGMEM);
+
+	return error;
 }
 
 static int
-- 
2.7.4

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

* [dpdk-stable] patch 'contigmem: do not zero pages during each mmap' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (23 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'contigmem: free allocated memory on error' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'eal: fix config file path when checking process' " Yuanhan Liu
                   ` (12 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From 156fe3d7888a680342a6c3345284fa3a4a10b82b Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Sun, 4 Jun 2017 13:53:24 +0800
Subject: [PATCH] contigmem: do not zero pages during each mmap

[ upstream commit 190ce8645e1ebeb0733f9dbc7fa854b50d1dac2e ]

Don't zero the pages during each mmap. Instead, only zero the pages
when they are not already mmapped. Otherwise, the multi-process
support will be broken, as the pages will be zeroed when secondary
processes map the memory. Besides, track the open and mmap operations
on the cdev, and prevent the module from being unloaded when it is
still in use.

Fixes: 82f931805506 ("contigmem: zero all pages during mmap")

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_eal/bsdapp/contigmem/contigmem.c | 186 ++++++++++++++++++++++++----
 1 file changed, 160 insertions(+), 26 deletions(-)

diff --git a/lib/librte_eal/bsdapp/contigmem/contigmem.c b/lib/librte_eal/bsdapp/contigmem/contigmem.c
index 03e3e8d..e8fb908 100644
--- a/lib/librte_eal/bsdapp/contigmem/contigmem.c
+++ b/lib/librte_eal/bsdapp/contigmem/contigmem.c
@@ -50,24 +50,37 @@ __FBSDID("$FreeBSD$");
 
 #include <vm/vm.h>
 #include <vm/pmap.h>
+#include <vm/vm_param.h>
 #include <vm/vm_object.h>
 #include <vm/vm_page.h>
 #include <vm/vm_pager.h>
+#include <vm/vm_phys.h>
+
+struct contigmem_buffer {
+	void           *addr;
+	int             refcnt;
+	struct mtx      mtx;
+};
+
+struct contigmem_vm_handle {
+	int             buffer_index;
+};
 
 static int              contigmem_load(void);
 static int              contigmem_unload(void);
 static int              contigmem_physaddr(SYSCTL_HANDLER_ARGS);
 
-static d_mmap_t         contigmem_mmap;
 static d_mmap_single_t  contigmem_mmap_single;
 static d_open_t         contigmem_open;
+static d_close_t        contigmem_close;
 
 static int              contigmem_num_buffers = RTE_CONTIGMEM_DEFAULT_NUM_BUFS;
 static int64_t          contigmem_buffer_size = RTE_CONTIGMEM_DEFAULT_BUF_SIZE;
 
 static eventhandler_tag contigmem_eh_tag;
-static void            *contigmem_buffers[RTE_CONTIGMEM_MAX_NUM_BUFS];
+static struct contigmem_buffer contigmem_buffers[RTE_CONTIGMEM_MAX_NUM_BUFS];
 static struct cdev     *contigmem_cdev = NULL;
+static int              contigmem_refcnt;
 
 TUNABLE_INT("hw.contigmem.num_buffers", &contigmem_num_buffers);
 TUNABLE_QUAD("hw.contigmem.buffer_size", &contigmem_buffer_size);
@@ -78,6 +91,8 @@ SYSCTL_INT(_hw_contigmem, OID_AUTO, num_buffers, CTLFLAG_RD,
 	&contigmem_num_buffers, 0, "Number of contigmem buffers allocated");
 SYSCTL_QUAD(_hw_contigmem, OID_AUTO, buffer_size, CTLFLAG_RD,
 	&contigmem_buffer_size, 0, "Size of each contiguous buffer");
+SYSCTL_INT(_hw_contigmem, OID_AUTO, num_references, CTLFLAG_RD,
+	&contigmem_refcnt, 0, "Number of references to contigmem");
 
 static SYSCTL_NODE(_hw_contigmem, OID_AUTO, physaddr, CTLFLAG_RD, 0,
 	"physaddr");
@@ -114,9 +129,10 @@ MODULE_VERSION(contigmem, 1);
 static struct cdevsw contigmem_ops = {
 	.d_name         = "contigmem",
 	.d_version      = D_VERSION,
-	.d_mmap         = contigmem_mmap,
+	.d_flags        = D_TRACKCLOSE,
 	.d_mmap_single  = contigmem_mmap_single,
 	.d_open         = contigmem_open,
+	.d_close        = contigmem_close,
 };
 
 static int
@@ -124,6 +140,7 @@ contigmem_load()
 {
 	char index_string[8], description[32];
 	int  i, error = 0;
+	void *addr;
 
 	if (contigmem_num_buffers > RTE_CONTIGMEM_MAX_NUM_BUFS) {
 		printf("%d buffers requested is greater than %d allowed\n",
@@ -141,18 +158,20 @@ contigmem_load()
 	}
 
 	for (i = 0; i < contigmem_num_buffers; i++) {
-		contigmem_buffers[i] =
-				contigmalloc(contigmem_buffer_size, M_CONTIGMEM, M_ZERO, 0,
-			BUS_SPACE_MAXADDR, contigmem_buffer_size, 0);
-
-		if (contigmem_buffers[i] == NULL) {
+		addr = contigmalloc(contigmem_buffer_size, M_CONTIGMEM, M_ZERO,
+			0, BUS_SPACE_MAXADDR, contigmem_buffer_size, 0);
+		if (addr == NULL) {
 			printf("contigmalloc failed for buffer %d\n", i);
 			error = ENOMEM;
 			goto error;
 		}
 
-		printf("%2u: virt=%p phys=%p\n", i, contigmem_buffers[i],
-				(void *)pmap_kextract((vm_offset_t)contigmem_buffers[i]));
+		printf("%2u: virt=%p phys=%p\n", i, addr,
+			(void *)pmap_kextract((vm_offset_t)addr));
+
+		mtx_init(&contigmem_buffers[i].mtx, "contigmem", NULL, MTX_DEF);
+		contigmem_buffers[i].addr = addr;
+		contigmem_buffers[i].refcnt = 0;
 
 		snprintf(index_string, sizeof(index_string), "%d", i);
 		snprintf(description, sizeof(description),
@@ -170,10 +189,13 @@ contigmem_load()
 	return 0;
 
 error:
-	for (i = 0; i < contigmem_num_buffers; i++)
-		if (contigmem_buffers[i] != NULL)
-			contigfree(contigmem_buffers[i], contigmem_buffer_size,
-					M_CONTIGMEM);
+	for (i = 0; i < contigmem_num_buffers; i++) {
+		if (contigmem_buffers[i].addr != NULL)
+			contigfree(contigmem_buffers[i].addr,
+				contigmem_buffer_size, M_CONTIGMEM);
+		if (mtx_initialized(&contigmem_buffers[i].mtx))
+			mtx_destroy(&contigmem_buffers[i].mtx);
+	}
 
 	return error;
 }
@@ -183,16 +205,22 @@ contigmem_unload()
 {
 	int i;
 
+	if (contigmem_refcnt > 0)
+		return EBUSY;
+
 	if (contigmem_cdev != NULL)
 		destroy_dev(contigmem_cdev);
 
 	if (contigmem_eh_tag != NULL)
 		EVENTHANDLER_DEREGISTER(process_exit, contigmem_eh_tag);
 
-	for (i = 0; i < RTE_CONTIGMEM_MAX_NUM_BUFS; i++)
-		if (contigmem_buffers[i] != NULL)
-			contigfree(contigmem_buffers[i], contigmem_buffer_size,
-					M_CONTIGMEM);
+	for (i = 0; i < RTE_CONTIGMEM_MAX_NUM_BUFS; i++) {
+		if (contigmem_buffers[i].addr != NULL)
+			contigfree(contigmem_buffers[i].addr,
+				contigmem_buffer_size, M_CONTIGMEM);
+		if (mtx_initialized(&contigmem_buffers[i].mtx))
+			mtx_destroy(&contigmem_buffers[i].mtx);
+	}
 
 	return 0;
 }
@@ -203,7 +231,7 @@ contigmem_physaddr(SYSCTL_HANDLER_ARGS)
 	uint64_t	physaddr;
 	int		index = (int)(uintptr_t)arg1;
 
-	physaddr = (uint64_t)vtophys(contigmem_buffers[index]);
+	physaddr = (uint64_t)vtophys(contigmem_buffers[index].addr);
 	return sysctl_handle_64(oidp, &physaddr, 0, req);
 }
 
@@ -211,22 +239,121 @@ static int
 contigmem_open(struct cdev *cdev, int fflags, int devtype,
 		struct thread *td)
 {
+
+	atomic_add_int(&contigmem_refcnt, 1);
+
+	return 0;
+}
+
+static int
+contigmem_close(struct cdev *cdev, int fflags, int devtype,
+		struct thread *td)
+{
+
+	atomic_subtract_int(&contigmem_refcnt, 1);
+
 	return 0;
 }
 
 static int
-contigmem_mmap(struct cdev *cdev, vm_ooffset_t offset, vm_paddr_t *paddr,
-		int prot, vm_memattr_t *memattr)
+contigmem_cdev_pager_ctor(void *handle, vm_ooffset_t size, vm_prot_t prot,
+		vm_ooffset_t foff, struct ucred *cred, u_short *color)
 {
+	struct contigmem_vm_handle *vmh = handle;
+	struct contigmem_buffer *buf;
+
+	buf = &contigmem_buffers[vmh->buffer_index];
+
+	atomic_add_int(&contigmem_refcnt, 1);
+
+	mtx_lock(&buf->mtx);
+	if (buf->refcnt == 0)
+		memset(buf->addr, 0, contigmem_buffer_size);
+	buf->refcnt++;
+	mtx_unlock(&buf->mtx);
 
-	*paddr = offset;
 	return 0;
 }
 
+static void
+contigmem_cdev_pager_dtor(void *handle)
+{
+	struct contigmem_vm_handle *vmh = handle;
+	struct contigmem_buffer *buf;
+
+	buf = &contigmem_buffers[vmh->buffer_index];
+
+	mtx_lock(&buf->mtx);
+	buf->refcnt--;
+	mtx_unlock(&buf->mtx);
+
+	free(vmh, M_CONTIGMEM);
+
+	atomic_subtract_int(&contigmem_refcnt, 1);
+}
+
+static int
+contigmem_cdev_pager_fault(vm_object_t object, vm_ooffset_t offset, int prot,
+		vm_page_t *mres)
+{
+	vm_paddr_t paddr;
+	vm_page_t m_paddr, page;
+	vm_memattr_t memattr, memattr1;
+
+	memattr = object->memattr;
+
+	VM_OBJECT_WUNLOCK(object);
+
+	paddr = offset;
+
+	m_paddr = vm_phys_paddr_to_vm_page(paddr);
+	if (m_paddr != NULL) {
+		memattr1 = pmap_page_get_memattr(m_paddr);
+		if (memattr1 != memattr)
+			memattr = memattr1;
+	}
+
+	if (((*mres)->flags & PG_FICTITIOUS) != 0) {
+		/*
+		 * If the passed in result page is a fake page, update it with
+		 * the new physical address.
+		 */
+		page = *mres;
+		VM_OBJECT_WLOCK(object);
+		vm_page_updatefake(page, paddr, memattr);
+	} else {
+		vm_page_t mret;
+		/*
+		 * Replace the passed in reqpage page with our own fake page and
+		 * free up the original page.
+		 */
+		page = vm_page_getfake(paddr, memattr);
+		VM_OBJECT_WLOCK(object);
+		mret = vm_page_replace(page, object, (*mres)->pindex);
+		KASSERT(mret == *mres,
+		    ("invalid page replacement, old=%p, ret=%p", *mres, mret));
+		vm_page_lock(mret);
+		vm_page_free(mret);
+		vm_page_unlock(mret);
+		*mres = page;
+	}
+
+	page->valid = VM_PAGE_BITS_ALL;
+
+	return VM_PAGER_OK;
+}
+
+static struct cdev_pager_ops contigmem_cdev_pager_ops = {
+	.cdev_pg_ctor = contigmem_cdev_pager_ctor,
+	.cdev_pg_dtor = contigmem_cdev_pager_dtor,
+	.cdev_pg_fault = contigmem_cdev_pager_fault,
+};
+
 static int
 contigmem_mmap_single(struct cdev *cdev, vm_ooffset_t *offset, vm_size_t size,
 		struct vm_object **obj, int nprot)
 {
+	struct contigmem_vm_handle *vmh;
 	uint64_t buffer_index;
 
 	/*
@@ -238,10 +365,17 @@ contigmem_mmap_single(struct cdev *cdev, vm_ooffset_t *offset, vm_size_t size,
 	if (buffer_index >= contigmem_num_buffers)
 		return EINVAL;
 
-	memset(contigmem_buffers[buffer_index], 0, contigmem_buffer_size);
-	*offset = (vm_ooffset_t)vtophys(contigmem_buffers[buffer_index]);
-	*obj = vm_pager_allocate(OBJT_DEVICE, cdev, size, nprot, *offset,
-			curthread->td_ucred);
+	if (size > contigmem_buffer_size)
+		return EINVAL;
+
+	vmh = malloc(sizeof(*vmh), M_CONTIGMEM, M_NOWAIT | M_ZERO);
+	if (vmh == NULL)
+		return ENOMEM;
+	vmh->buffer_index = buffer_index;
+
+	*offset = (vm_ooffset_t)vtophys(contigmem_buffers[buffer_index].addr);
+	*obj = cdev_pager_allocate(vmh, OBJT_DEVICE, &contigmem_cdev_pager_ops,
+			size, nprot, *offset, curthread->td_ucred);
 
 	return 0;
 }
-- 
2.7.4

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

* [dpdk-stable] patch 'eal: fix config file path when checking process' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (24 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'contigmem: do not zero pages during each mmap' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/igb: fix flex filter length' " Yuanhan Liu
                   ` (11 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Jianfeng Tan; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From d69a292319ce50ea217efa15beb5390e1b15c991 Mon Sep 17 00:00:00 2001
From: Jianfeng Tan <jianfeng.tan@intel.com>
Date: Mon, 26 Jun 2017 06:49:46 +0000
Subject: [PATCH] eal: fix config file path when checking process

[ upstream commit 641566b38be46069c796c6e1ce2a89f3df2c2591 ]

When primary process is booted with --file-prefix option, the API,
rte_eal_primary_proc_alive(), uses a wrong config file path to
check if primary process is alive.

Fix it by calling helper function to get config file path.

Fixes: dd3e00138d74 ("eal: check if primary process is alive")

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
---
 lib/librte_eal/common/eal_common_proc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c
index 12e0fca..60526ca 100644
--- a/lib/librte_eal/common/eal_common_proc.c
+++ b/lib/librte_eal/common/eal_common_proc.c
@@ -46,10 +46,10 @@ rte_eal_primary_proc_alive(const char *config_file_path)
 	if (config_file_path)
 		config_fd = open(config_file_path, O_RDONLY);
 	else {
-		char default_path[PATH_MAX+1];
-		snprintf(default_path, PATH_MAX, RUNTIME_CONFIG_FMT,
-			 default_config_dir, "rte");
-		config_fd = open(default_path, O_RDONLY);
+		const char *path;
+
+		path = eal_runtime_config_path();
+		config_fd = open(path, O_RDONLY);
 	}
 	if (config_fd < 0)
 		return 0;
-- 
2.7.4

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

* [dpdk-stable] patch 'net/igb: fix flex filter length' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (25 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'eal: fix config file path when checking process' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/fm10k: initialize link status in device start' " Yuanhan Liu
                   ` (10 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Wei Zhao; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From bf98449857163ea8067330b4b6d255918d35f639 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Fri, 16 Jun 2017 13:04:24 +0800
Subject: [PATCH] net/igb: fix flex filter length

[ upstream commit d68e62c67b5fc96aecaf969de2edc9946461975d ]

igb flex filter supports recognizing any arbitrary pattern within first
128 bytes of the packet.

But the macro E1000_FLEX_FILTERS_MASK_SIZE only covers first 64 bytes.

Fixes: 231d43909a31 ("igb: migrate flex filter to new API")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/e1000/e1000_ethdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/e1000/e1000_ethdev.h b/drivers/net/e1000/e1000_ethdev.h
index 6c25c8d..d648789 100644
--- a/drivers/net/e1000/e1000_ethdev.h
+++ b/drivers/net/e1000/e1000_ethdev.h
@@ -82,7 +82,7 @@
 #define E1000_MAX_FLEX_FILTER_DWDS \
 	(E1000_MAX_FLEX_FILTER_LEN / sizeof(uint32_t))
 #define E1000_FLEX_FILTERS_MASK_SIZE \
-	(E1000_MAX_FLEX_FILTER_DWDS / 4)
+	(E1000_MAX_FLEX_FILTER_DWDS / 2)
 #define E1000_FHFT_QUEUEING_LEN          0x0000007F
 #define E1000_FHFT_QUEUEING_QUEUE        0x00000700
 #define E1000_FHFT_QUEUEING_PRIO         0x00070000
-- 
2.7.4

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

* [dpdk-stable] patch 'net/fm10k: initialize link status in device start' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (26 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/igb: fix flex filter length' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/bonding: fix when NTT flag updated' " Yuanhan Liu
                   ` (9 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Xiao Wang; +Cc: Jing Chen, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From 1c805714a429d808c13984fdf3ae8026caa37a84 Mon Sep 17 00:00:00 2001
From: Xiao Wang <xiao.w.wang@intel.com>
Date: Thu, 22 Jun 2017 04:20:03 -0700
Subject: [PATCH] net/fm10k: initialize link status in device start

[ upstream commit 20c0a0c4e8c6cd626a93f2a4b0cdc3cb2a36b6ac ]

Fm10k host driver can't manage PHY directly and provides a fake link
status by always reporting LINK_UP. We should initialize link status
in device start, otherwise application will get LINK_DOWN status
when LSC configured.

Fixes: 9ae6068c86da ("fm10k: add dev start/stop")

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
---
 drivers/net/fm10k/fm10k_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 32b0ea9..d04efdc 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -83,6 +83,7 @@ static void fm10k_rx_queue_release(void *queue);
 static void fm10k_set_rx_function(struct rte_eth_dev *dev);
 static void fm10k_set_tx_function(struct rte_eth_dev *dev);
 static int fm10k_check_ftag(struct rte_devargs *devargs);
+static int fm10k_link_update(struct rte_eth_dev *dev, int wait_to_complete);
 
 struct fm10k_xstats_name_off {
 	char name[RTE_ETH_XSTATS_NAME_SIZE];
@@ -1164,6 +1165,8 @@ fm10k_dev_start(struct rte_eth_dev *dev)
 	if (!(dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_VMDQ_FLAG))
 		fm10k_vlan_filter_set(dev, hw->mac.default_vid, true);
 
+	fm10k_link_update(dev, 0);
+
 	return 0;
 }
 
-- 
2.7.4

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

* [dpdk-stable] patch 'net/bonding: fix when NTT flag updated' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (27 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/fm10k: initialize link status in device start' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/vmxnet3: fix receive queue memory leak' " Yuanhan Liu
                   ` (8 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Sha Zhang; +Cc: Declan Doherty, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From 7723209218aaba1e9f88cbe38b55ba01b620e3f2 Mon Sep 17 00:00:00 2001
From: Sha Zhang <zhangsha.zhang@huawei.com>
Date: Mon, 22 May 2017 15:52:11 +0800
Subject: [PATCH] net/bonding: fix when NTT flag updated

[ upstream commit 95efa3cd649163094a7b0536d0a01d68f4267d3a ]

According to the standard, state machine of LACP should transmit lacpdu
when partner's state changes from slow to fast, rather than from fast
to slow.

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

Signed-off-by: Sha Zhang <zhangsha.zhang@huawei.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 2f7ae70..aa84b93 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -435,7 +435,7 @@ periodic_machine(struct bond_dev_private *internals, uint8_t slave_id)
 			 * In other case (was fast and now it is slow) just switch
 			 * timeout to slow without forcing send of LACP (because standard
 			 * say so)*/
-			if (!is_partner_fast)
+			if (is_partner_fast)
 				SM_FLAG_SET(port, NTT);
 		} else
 			return; /* Nothing changed */
-- 
2.7.4

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

* [dpdk-stable] patch 'net/vmxnet3: fix receive queue memory leak' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (28 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/bonding: fix when NTT flag updated' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/i40e: fix division by 0' " Yuanhan Liu
                   ` (7 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Mandeep Rohilla; +Cc: Shrikrishna Khare, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From bd54dd03ec7b85bbb0311146595588898cb5e97c Mon Sep 17 00:00:00 2001
From: Mandeep Rohilla <mrohilla@brocade.com>
Date: Thu, 15 Jun 2017 08:17:41 -0400
Subject: [PATCH] net/vmxnet3: fix receive queue memory leak

[ upstream commit 0bf3a2c07e8f18b7ab3cdf42a4c932af8f7280fc ]

This addresses an mbuf leak in an error condition during packet
receive.

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

Signed-off-by: Mandeep Rohilla <mrohilla@brocade.com>
Acked-by: Shrikrishna Khare <skhare@vmware.com>
---
 drivers/net/vmxnet3/vmxnet3_rxtx.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index 3ded18e..3056f4f 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -734,6 +734,12 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 				   (int)(rcd - (struct Vmxnet3_RxCompDesc *)
 					 rxq->comp_ring.base), rcd->rxdIdx);
 			rte_pktmbuf_free_seg(rxm);
+			if (rxq->start_seg) {
+				struct rte_mbuf *start = rxq->start_seg;
+
+				rxq->start_seg = NULL;
+				rte_pktmbuf_free(start);
+			}
 			goto rcd_done;
 		}
 
-- 
2.7.4

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

* [dpdk-stable] patch 'net/i40e: fix division by 0' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (29 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/vmxnet3: fix receive queue memory leak' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/bnxt: fix get link config' " Yuanhan Liu
                   ` (6 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Yong Wang; +Cc: Jingjing Wu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From e4cfe6205efdff66da14ab233ba2f1cd2b3eb9be Mon Sep 17 00:00:00 2001
From: Yong Wang <wang.yong19@zte.com.cn>
Date: Fri, 23 Jun 2017 06:57:47 -0400
Subject: [PATCH] net/i40e: fix division by 0

[ upstream commit b734923ddc348886bea968ecd4cda5090f2c2934 ]

In function i40e_vsi_config_tc_queue_mapping(), if 'enabled_tcmap' is 0,
'total_tc' might be 0. Then 'total_tc' might be used in a division
by 0 in "qpnum_per_tc = i40e_align_floor(vsi->nb_qps / total_tc)".

Fix it by changing 'total_tc' from 0 to 1 just as func
i40e_vsi_update_queue_mapping() does.

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

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index afa2098..4a1f4c8 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -4012,6 +4012,8 @@ i40e_vsi_config_tc_queue_mapping(struct i40e_vsi *vsi,
 	for (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++)
 		if (enabled_tcmap & (1 << i))
 			total_tc++;
+	if (total_tc == 0)
+		total_tc = 1;
 	vsi->enabled_tc = enabled_tcmap;
 
 	/* Number of queues per enabled TC */
-- 
2.7.4

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

* [dpdk-stable] patch 'net/bnxt: fix get link config' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (30 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/i40e: fix division by 0' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/bnxt: fix autoneg on 10GBase-T links' " Yuanhan Liu
                   ` (5 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Stephen Hurd, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From f573b96b45558a4b1df01ea73d4128096cdca4df Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Fri, 30 Jun 2017 09:20:18 -0500
Subject: [PATCH] net/bnxt: fix get link config

[ upstream commit 3bf11d86deed48e3a51092e778e845c963ac4792 ]

This patch fixes the get link configuration code.
bnxt_get_hwrm_link_config was using wrong macros and wrongly
deriving link speed based on link status which was causing
incorrect link information to be displayed in few scenarios.

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

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index e7ae5c7..c8a87c8 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -534,13 +534,10 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,
 	HWRM_CHECK_RESULT;
 
 	link_info->phy_link_status = resp->link;
-	if (link_info->phy_link_status == HWRM_PORT_PHY_QCFG_OUTPUT_LINK_LINK) {
-		link_info->link_up = 1;
-		link_info->link_speed = rte_le_to_cpu_16(resp->link_speed);
-	} else {
-		link_info->link_up = 0;
-		link_info->link_speed = 0;
-	}
+	link_info->link_up =
+		(link_info->phy_link_status ==
+		 HWRM_PORT_PHY_QCFG_OUTPUT_LINK_LINK) ? 1 : 0;
+	link_info->link_speed = rte_le_to_cpu_16(resp->link_speed);
 	link_info->duplex = resp->duplex;
 	link_info->pause = resp->pause;
 	link_info->auto_pause = resp->auto_pause;
@@ -1432,7 +1429,7 @@ int bnxt_get_hwrm_link_config(struct bnxt *bp, struct rte_eth_link *link)
 			"Get link config failed with rc %d\n", rc);
 		goto exit;
 	}
-	if (link_info->link_up)
+	if (link_info->link_speed)
 		link->link_speed =
 			bnxt_parse_hw_link_speed(link_info->link_speed);
 	else
@@ -1441,7 +1438,7 @@ int bnxt_get_hwrm_link_config(struct bnxt *bp, struct rte_eth_link *link)
 	link->link_status = link_info->link_up;
 	link->link_autoneg = link_info->auto_mode ==
 		HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_NONE ?
-		ETH_LINK_SPEED_FIXED : ETH_LINK_SPEED_AUTONEG;
+		ETH_LINK_FIXED : ETH_LINK_AUTONEG;
 exit:
 	return rc;
 }
-- 
2.7.4

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

* [dpdk-stable] patch 'net/bnxt: fix autoneg on 10GBase-T links' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (31 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/bnxt: fix get link config' " Yuanhan Liu
@ 2017-07-14 10:33 ` Yuanhan Liu
  2017-07-14 10:34 ` [dpdk-stable] patch 'net/bnxt: fix set link config' " Yuanhan Liu
                   ` (4 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:33 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Stephen Hurd, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From 3efb8b650d128417076010d923cd714abb2c18b1 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Fri, 30 Jun 2017 09:20:19 -0500
Subject: [PATCH] net/bnxt: fix autoneg on 10GBase-T links

[ upstream commit 5f5083e2ce02c75eca963ebfa331dfadf69aad11 ]

We are not passing proper speed mask causing autoneg to not work
properly on 10GBase-T links. Use supported speeds from phy_qcfg
for auto mask to fix this.

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

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index c8a87c8..c26837c 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1332,12 +1332,16 @@ static int bnxt_valid_link_speed(uint32_t link_speed, uint8_t port_id)
 	return 0;
 }
 
-static uint16_t bnxt_parse_eth_link_speed_mask(uint32_t link_speed)
+static uint16_t
+bnxt_parse_eth_link_speed_mask(struct bnxt *bp, uint32_t link_speed)
 {
 	uint16_t ret = 0;
 
-	if (link_speed == ETH_LINK_SPEED_AUTONEG)
+	if (link_speed == ETH_LINK_SPEED_AUTONEG) {
+		if (bp->link_info.support_speeds)
+			return bp->link_info.support_speeds;
 		link_speed = BNXT_SUPPORTED_SPEEDS;
+	}
 
 	if (link_speed & ETH_LINK_SPEED_100M)
 		ret |= HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_100MB;
@@ -1471,7 +1475,8 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)
 		link_req.auto_mode =
 				HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_SPEED_MASK;
 		link_req.auto_link_speed_mask =
-			bnxt_parse_eth_link_speed_mask(dev_conf->link_speeds);
+			bnxt_parse_eth_link_speed_mask(bp,
+						       dev_conf->link_speeds);
 	} else {
 		link_req.phy_flags |= HWRM_PORT_PHY_CFG_INPUT_FLAGS_FORCE;
 		link_req.link_speed = speed;
-- 
2.7.4

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

* [dpdk-stable] patch 'net/bnxt: fix set link config' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (32 preceding siblings ...)
  2017-07-14 10:33 ` [dpdk-stable] patch 'net/bnxt: fix autoneg on 10GBase-T links' " Yuanhan Liu
@ 2017-07-14 10:34 ` Yuanhan Liu
  2017-07-14 10:34 ` [dpdk-stable] patch 'net/mlx4: fix mbuf poisoning in debug code' " Yuanhan Liu
                   ` (3 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:34 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Stephen Hurd, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From 30746283838f1b9d6b96493d2fbd0b20883f56fa Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Fri, 30 Jun 2017 09:20:20 -0500
Subject: [PATCH] net/bnxt: fix set link config

[ upstream commit 63d499f0c4ad4f02d8c7bbd0e36b57a97307ba71 ]

bnxt_hwrm_port_phy_cfg() was not setting enables appropriately.
This was causing undesired issues with link config.
This patch takes care of that.

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

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index c26837c..fef010f 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -476,6 +476,8 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf)
 	struct hwrm_port_phy_cfg_input req = {0};
 	struct hwrm_port_phy_cfg_output *resp = bp->hwrm_cmd_resp_addr;
 	uint32_t enables = 0;
+	uint32_t link_speed_mask =
+		HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_LINK_SPEED_MASK;
 
 	HWRM_PREP(req, PORT_PHY_CFG, -1, resp);
 
@@ -487,14 +489,20 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf)
 		 * any auto mode, even "none".
 		 */
 		if (!conf->link_speed) {
-			req.auto_mode |= conf->auto_mode;
-			enables = HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_MODE;
-			req.auto_link_speed_mask = conf->auto_link_speed_mask;
-			enables |=
-			   HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_LINK_SPEED_MASK;
-			req.auto_link_speed = bp->link_info.auto_link_speed;
-			enables |=
+			req.auto_mode = conf->auto_mode;
+			enables |= HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_MODE;
+			if (conf->auto_mode ==
+			    HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_SPEED_MASK) {
+				req.auto_link_speed_mask =
+					conf->auto_link_speed_mask;
+				enables |= link_speed_mask;
+			}
+			if (bp->link_info.auto_link_speed) {
+				req.auto_link_speed =
+					bp->link_info.auto_link_speed;
+				enables |=
 				HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_LINK_SPEED;
+			}
 		}
 		req.auto_duplex = conf->duplex;
 		enables |= HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_DUPLEX;
-- 
2.7.4

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

* [dpdk-stable] patch 'net/mlx4: fix mbuf poisoning in debug code' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (33 preceding siblings ...)
  2017-07-14 10:34 ` [dpdk-stable] patch 'net/bnxt: fix set link config' " Yuanhan Liu
@ 2017-07-14 10:34 ` Yuanhan Liu
  2017-07-14 10:34 ` [dpdk-stable] patch 'test/bonding: fix mode 4 names' " Yuanhan Liu
                   ` (2 subsequent siblings)
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:34 UTC (permalink / raw)
  To: Vasily Philipov; +Cc: Adrien Mazarguil, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From 496d42edbb06743f6a178038c334983c32ac862a Mon Sep 17 00:00:00 2001
From: Vasily Philipov <vasilyf@mellanox.com>
Date: Wed, 5 Jul 2017 14:49:22 +0300
Subject: [PATCH] net/mlx4: fix mbuf poisoning in debug code

[ upstream commit 4be06219012181c6f500c8f23440baaf7d4d3618 ]

In debug mode, all mbuf ol_flags are temporarily enabled while sitting
in the Rx queue to detect otherwise silent data corruption, however
some of them are special (indirect and control) and must be cleared
before returning mbufs to the pool to avoid crashing.

Fixes: 7fae69eeff13 ("mlx4: new poll mode driver")

Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 drivers/net/mlx4/mlx4.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 83f9143..f682413 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -3157,6 +3157,13 @@ mlx4_rx_burst_sp(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 			NB_SEGS(rep) = 0x2a;
 			PORT(rep) = 0x2a;
 			rep->ol_flags = -1;
+			/*
+			 * Clear special flags in mbuf to avoid
+			 * crashing while freeing.
+			 */
+			rep->ol_flags &=
+				~(uint64_t)(IND_ATTACHED_MBUF |
+					    CTRL_MBUF_FLAG);
 #endif
 			assert(rep->buf_len == seg->buf_len);
 			/* Reconfigure sge to use rep instead of seg. */
-- 
2.7.4

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

* [dpdk-stable] patch 'test/bonding: fix mode 4 names' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (34 preceding siblings ...)
  2017-07-14 10:34 ` [dpdk-stable] patch 'net/mlx4: fix mbuf poisoning in debug code' " Yuanhan Liu
@ 2017-07-14 10:34 ` Yuanhan Liu
  2017-07-14 10:34 ` [dpdk-stable] patch 'vhost: fix checking of device features' " Yuanhan Liu
  2017-07-14 10:34 ` [dpdk-stable] patch 'net/virtio-user: fix crash when detaching device' " Yuanhan Liu
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:34 UTC (permalink / raw)
  To: Daniel Mrzyglod; +Cc: Declan Doherty, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From 5d4203c75dbb7b3b89a071b7b1e524dd1d48c694 Mon Sep 17 00:00:00 2001
From: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Date: Wed, 5 Jul 2017 17:27:47 +0200
Subject: [PATCH] test/bonding: fix mode 4 names

[ upstream commit e4beca01c53714701b7fa4a5d92af413ae5ac4a4 ]

ring network driver is limited to 32 characters
the name of device was extended to net_ring_unit_test_mode4_slave_0
which is 33 characters long.

Fixes: 5e41ab250dfa ("app/test: unit tests for bonding mode 4")

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
 app/test/test_link_bonding_mode4.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/test/test_link_bonding_mode4.c b/app/test/test_link_bonding_mode4.c
index dc33973..292ea3d 100644
--- a/app/test/test_link_bonding_mode4.c
+++ b/app/test/test_link_bonding_mode4.c
@@ -73,11 +73,11 @@
 #define MAX_PKT_BURST           (32)
 #define DEF_PKT_BURST           (16)
 
-#define BONDED_DEV_NAME         ("unit_test_mode4_bond_dev")
+#define BONDED_DEV_NAME         ("ut_mode4_bond_dev")
 
-#define SLAVE_DEV_NAME_FMT      ("unit_test_mode4_slave_%d")
-#define SLAVE_RX_QUEUE_FMT      ("unit_test_mode4_slave_%d_rx")
-#define SLAVE_TX_QUEUE_FMT      ("unit_test_mode4_slave_%d_tx")
+#define SLAVE_DEV_NAME_FMT      ("ut_mode4_slave_%d")
+#define SLAVE_RX_QUEUE_FMT      ("ut_mode4_slave_%d_rx")
+#define SLAVE_TX_QUEUE_FMT      ("ut_mode4_slave_%d_tx")
 
 #define INVALID_SOCKET_ID       (-1)
 #define INVALID_PORT_ID         (0xFF)
-- 
2.7.4

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

* [dpdk-stable] patch 'vhost: fix checking of device features' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (35 preceding siblings ...)
  2017-07-14 10:34 ` [dpdk-stable] patch 'test/bonding: fix mode 4 names' " Yuanhan Liu
@ 2017-07-14 10:34 ` Yuanhan Liu
  2017-07-14 10:34 ` [dpdk-stable] patch 'net/virtio-user: fix crash when detaching device' " Yuanhan Liu
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:34 UTC (permalink / raw)
  To: Ivan Dyukov; +Cc: Maxime Coquelin, Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From ba3547df77dd5b7affd65c23a5712f087fb0d6e8 Mon Sep 17 00:00:00 2001
From: Ivan Dyukov <i.dyukov@samsung.com>
Date: Wed, 28 Jun 2017 15:40:31 +0300
Subject: [PATCH] vhost: fix checking of device features

[ upstream commit c665d9a231945181af0a6e6fbeae7f56657f964a ]

To compare enabled features in current device we must use bit
mask instead of bit position.

Fixes: c843af3aa13e ("vhost: access header only if offloading is supported")

Signed-off-by: Ivan Dyukov <i.dyukov@samsung.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 lib/librte_vhost/virtio_net.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 7d5b04c..ec9f1e5 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -644,9 +644,11 @@ static inline bool
 virtio_net_with_host_offload(struct virtio_net *dev)
 {
 	if (dev->features &
-			(VIRTIO_NET_F_CSUM | VIRTIO_NET_F_HOST_ECN |
-			 VIRTIO_NET_F_HOST_TSO4 | VIRTIO_NET_F_HOST_TSO6 |
-			 VIRTIO_NET_F_HOST_UFO))
+			((1ULL << VIRTIO_NET_F_CSUM) |
+			 (1ULL << VIRTIO_NET_F_HOST_ECN) |
+			 (1ULL << VIRTIO_NET_F_HOST_TSO4) |
+			 (1ULL << VIRTIO_NET_F_HOST_TSO6) |
+			 (1ULL << VIRTIO_NET_F_HOST_UFO)))
 		return true;
 
 	return false;
-- 
2.7.4

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

* [dpdk-stable] patch 'net/virtio-user: fix crash when detaching device' has been queued to LTS release 16.11.3
  2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
                   ` (36 preceding siblings ...)
  2017-07-14 10:34 ` [dpdk-stable] patch 'vhost: fix checking of device features' " Yuanhan Liu
@ 2017-07-14 10:34 ` Yuanhan Liu
  37 siblings, 0 replies; 39+ messages in thread
From: Yuanhan Liu @ 2017-07-14 10:34 UTC (permalink / raw)
  To: Allain Legacy; +Cc: Yuanhan Liu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 16.11.3

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

Thanks.

	--yliu

---
>From 3408bd4476dba421003947c950b98690738f26d7 Mon Sep 17 00:00:00 2001
From: Allain Legacy <allain.legacy@windriver.com>
Date: Fri, 23 Jun 2017 08:41:37 -0400
Subject: [PATCH] net/virtio-user: fix crash when detaching device

[ upstream commit 2a7b7d837ff70b6a58221924aa885eb0daf7f2c9 ]

The rte_eth_dev.data pointer is set to a reference to a static table.
Attempting to rte_free() it leads to a panic.  For example, the
following commands result in a panic if run in testpmd

  testpmd> port attach virtio_user0,path=/dev/vhost-net,iface=test0
  testpmd> port stop 2
  testpmd> port close 2
  testpmd> port detach 2

Fixes: ce2eabdd43ec ("net/virtio-user: add virtual device")

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 drivers/net/virtio/virtio_user_ethdev.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index f018724..b1bd623 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -479,7 +479,6 @@ virtio_user_pmd_remove(const char *name)
 	virtio_user_dev_uninit(dev);
 
 	rte_free(eth_dev->data->dev_private);
-	rte_free(eth_dev->data);
 	rte_eth_dev_release_port(eth_dev);
 
 	return 0;
-- 
2.7.4

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

end of thread, other threads:[~2017-07-14 10:37 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-14 10:33 [dpdk-stable] patch 'net/i40e: add return value checks' has been queued to LTS release 16.11.3 Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'net/i40e/base: fix Tx error stats on VF' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'net/mlx5: fix completion buffer size' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'net/igb: fix add/delete of flex filters' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'net/cxgbe: fix port statistics' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'net/mlx5: fix exception handling' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'net/mlx5: fix redundant free of Tx buffer' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'net/igb: fix checksum valid flags' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'net/i40e: exclude internal packet's byte count' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'net/i40e: fix VF statistics' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'net/bnxt: fix reporting of link status' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'kni: fix build with gcc 7.1' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'net/enic: " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'net/mlx5: " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'vhost: fix guest pages memory leak' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'net/virtio: zero the whole memory zone' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'lpm: fix index of tbl8' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'ip_frag: free mbufs on reassembly table destroy' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'mem: fix malloc element resize with padding' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix option parsing' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix application help' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'cryptodev: fix device stop function' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'test/crypto: fix overflow' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'mbuf: fix debug checks for headroom and tailroom' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'contigmem: free allocated memory on error' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'contigmem: do not zero pages during each mmap' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'eal: fix config file path when checking process' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'net/igb: fix flex filter length' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'net/fm10k: initialize link status in device start' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'net/bonding: fix when NTT flag updated' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'net/vmxnet3: fix receive queue memory leak' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'net/i40e: fix division by 0' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'net/bnxt: fix get link config' " Yuanhan Liu
2017-07-14 10:33 ` [dpdk-stable] patch 'net/bnxt: fix autoneg on 10GBase-T links' " Yuanhan Liu
2017-07-14 10:34 ` [dpdk-stable] patch 'net/bnxt: fix set link config' " Yuanhan Liu
2017-07-14 10:34 ` [dpdk-stable] patch 'net/mlx4: fix mbuf poisoning in debug code' " Yuanhan Liu
2017-07-14 10:34 ` [dpdk-stable] patch 'test/bonding: fix mode 4 names' " Yuanhan Liu
2017-07-14 10:34 ` [dpdk-stable] patch 'vhost: fix checking of device features' " Yuanhan Liu
2017-07-14 10:34 ` [dpdk-stable] patch 'net/virtio-user: fix crash when detaching device' " 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).