patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1
@ 2018-07-30 16:10 Christian Ehrhardt
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/qede: fix for devargs' " Christian Ehrhardt
                   ` (175 more replies)
  0 siblings, 176 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:10 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 2fd8c4963d4891a3c3daf317c4eb3ce7cf6500f6 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Tue, 22 May 2018 16:16:03 -0700
Subject: [PATCH] net/qede: fix VF MTU update

[ upstream commit d121a6b5f781525f65257920e97c1f033229f5e8 ]

This patch fixes VF MTU update to work without having to restart the
vport and there by not requiring port re-configuration. It adds a
VF MTU Update TLV to achieve the same. Firmware can handle VF MTU update
by just pausing the vport.

Fixes: dd28bc8c6ef4 ("net/qede: fix VF port creation sequence")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
 drivers/net/qede/base/ecore_sriov.c   |  44 ++++++++++
 drivers/net/qede/base/ecore_vf.c      |  33 +++++++
 drivers/net/qede/base/ecore_vf.h      |   9 ++
 drivers/net/qede/base/ecore_vfpf_if.h |  16 ++++
 drivers/net/qede/qede_ethdev.c        | 120 +++++++++++++++-----------
 drivers/net/qede/qede_ethdev.h        |   1 +
 6 files changed, 175 insertions(+), 48 deletions(-)

diff --git a/drivers/net/qede/base/ecore_sriov.c b/drivers/net/qede/base/ecore_sriov.c
index 451aabb12..b6997b81a 100644
--- a/drivers/net/qede/base/ecore_sriov.c
+++ b/drivers/net/qede/base/ecore_sriov.c
@@ -61,6 +61,8 @@ const char *ecore_channel_tlvs_string[] = {
 	"CHANNEL_TLV_COALESCE_UPDATE",
 	"CHANNEL_TLV_QID",
 	"CHANNEL_TLV_COALESCE_READ",
+	"CHANNEL_TLV_BULLETIN_UPDATE_MAC",
+	"CHANNEL_TLV_UPDATE_MTU",
 	"CHANNEL_TLV_MAX"
 };
 
@@ -2858,6 +2860,45 @@ out:
 			       length, status);
 }
 
+static enum _ecore_status_t
+ecore_iov_vf_pf_update_mtu(struct ecore_hwfn *p_hwfn,
+				    struct ecore_ptt *p_ptt,
+				    struct ecore_vf_info *p_vf)
+{
+	struct ecore_iov_vf_mbx *mbx = &p_vf->vf_mbx;
+	struct ecore_sp_vport_update_params params;
+	enum _ecore_status_t rc = ECORE_SUCCESS;
+	struct vfpf_update_mtu_tlv *p_req;
+	u8 status = PFVF_STATUS_SUCCESS;
+
+	/* Valiate PF can send such a request */
+	if (!p_vf->vport_instance) {
+		DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
+			   "No VPORT instance available for VF[%d], failing MTU update\n",
+			   p_vf->abs_vf_id);
+		status = PFVF_STATUS_FAILURE;
+		goto send_status;
+	}
+
+	p_req = &mbx->req_virt->update_mtu;
+
+	OSAL_MEMSET(&params, 0, sizeof(params));
+	params.opaque_fid =  p_vf->opaque_fid;
+	params.vport_id = p_vf->vport_id;
+	params.mtu = p_req->mtu;
+	rc = ecore_sp_vport_update(p_hwfn, &params, ECORE_SPQ_MODE_EBLOCK,
+				   OSAL_NULL);
+
+	if (rc)
+		status = PFVF_STATUS_FAILURE;
+send_status:
+	ecore_iov_prepare_resp(p_hwfn, p_ptt, p_vf,
+			       CHANNEL_TLV_UPDATE_MTU,
+			       sizeof(struct pfvf_def_resp_tlv),
+			       status);
+	return rc;
+}
+
 void *ecore_iov_search_list_tlvs(struct ecore_hwfn *p_hwfn,
 				 void *p_tlvs_list, u16 req_type)
 {
@@ -4140,6 +4181,9 @@ void ecore_iov_process_mbx_req(struct ecore_hwfn *p_hwfn,
 		case CHANNEL_TLV_COALESCE_READ:
 			ecore_iov_vf_pf_get_coalesce(p_hwfn, p_ptt, p_vf);
 			break;
+		case CHANNEL_TLV_UPDATE_MTU:
+			ecore_iov_vf_pf_update_mtu(p_hwfn, p_ptt, p_vf);
+			break;
 		}
 	} else if (ecore_iov_tlv_supported(mbx->first_tlv.tl.type)) {
 		/* If we've received a message from a VF we consider malicious
diff --git a/drivers/net/qede/base/ecore_vf.c b/drivers/net/qede/base/ecore_vf.c
index b7b3b872f..94e09c30b 100644
--- a/drivers/net/qede/base/ecore_vf.c
+++ b/drivers/net/qede/base/ecore_vf.c
@@ -1628,6 +1628,39 @@ exit:
 	return rc;
 }
 
+enum _ecore_status_t
+ecore_vf_pf_update_mtu(struct ecore_hwfn *p_hwfn, u16 mtu)
+{
+	struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
+	struct vfpf_update_mtu_tlv *p_req;
+	struct pfvf_def_resp_tlv *p_resp;
+	enum _ecore_status_t rc;
+
+	if (!mtu)
+		return ECORE_INVAL;
+
+	/* clear mailbox and prep header tlv */
+	p_req = ecore_vf_pf_prep(p_hwfn, CHANNEL_TLV_UPDATE_MTU,
+				 sizeof(*p_req));
+	p_req->mtu = mtu;
+	DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
+		   "Requesting MTU update to %d\n", mtu);
+
+	/* add list termination tlv */
+	ecore_add_tlv(&p_iov->offset,
+		      CHANNEL_TLV_LIST_END,
+		      sizeof(struct channel_list_end_tlv));
+
+	p_resp = &p_iov->pf2vf_reply->default_resp;
+	rc = ecore_send_msg2pf(p_hwfn, &p_resp->hdr.status, sizeof(*p_resp));
+	if (p_resp->hdr.status == PFVF_STATUS_NOT_SUPPORTED)
+		rc = ECORE_INVAL;
+
+	ecore_vf_pf_req_end(p_hwfn, rc);
+
+	return rc;
+}
+
 u16 ecore_vf_get_igu_sb_id(struct ecore_hwfn *p_hwfn,
 			   u16               sb_id)
 {
diff --git a/drivers/net/qede/base/ecore_vf.h b/drivers/net/qede/base/ecore_vf.h
index e26b30bf8..52c630f83 100644
--- a/drivers/net/qede/base/ecore_vf.h
+++ b/drivers/net/qede/base/ecore_vf.h
@@ -319,5 +319,14 @@ void ecore_vf_set_vf_start_tunn_update_param(struct ecore_tunnel_info *p_tun);
 
 u32 ecore_vf_hw_bar_size(struct ecore_hwfn *p_hwfn,
 		     enum BAR_ID bar_id);
+
+/**
+ * @brief - ecore_vf_pf_update_mtu Update MTU for VF.
+ *
+ * @param p_hwfn
+ * @param - mtu
+ */
+enum _ecore_status_t
+ecore_vf_pf_update_mtu(struct ecore_hwfn *p_hwfn, u16 mtu);
 #endif
 #endif /* __ECORE_VF_H__ */
diff --git a/drivers/net/qede/base/ecore_vfpf_if.h b/drivers/net/qede/base/ecore_vfpf_if.h
index dce937e0d..c8828ad1e 100644
--- a/drivers/net/qede/base/ecore_vfpf_if.h
+++ b/drivers/net/qede/base/ecore_vfpf_if.h
@@ -531,6 +531,18 @@ struct pfvf_read_coal_resp_tlv {
 	u8 padding[6];
 };
 
+struct vfpf_bulletin_update_mac_tlv {
+	struct vfpf_first_tlv first_tlv;
+	u8 mac[ETH_ALEN];
+	u8 padding[2];
+};
+
+struct vfpf_update_mtu_tlv {
+	struct vfpf_first_tlv first_tlv;
+	u16 mtu;
+	u8 padding[6];
+};
+
 union vfpf_tlvs {
 	struct vfpf_first_tlv			first_tlv;
 	struct vfpf_acquire_tlv			acquire;
@@ -545,6 +557,8 @@ union vfpf_tlvs {
 	struct vfpf_update_tunn_param_tlv	tunn_param_update;
 	struct vfpf_update_coalesce		update_coalesce;
 	struct vfpf_read_coal_req_tlv		read_coal_req;
+	struct vfpf_bulletin_update_mac_tlv	bulletin_update_mac;
+	struct vfpf_update_mtu_tlv		update_mtu;
 	struct tlv_buffer_size			tlv_buf_size;
 };
 
@@ -675,6 +689,8 @@ enum {
 	CHANNEL_TLV_COALESCE_UPDATE,
 	CHANNEL_TLV_QID,
 	CHANNEL_TLV_COALESCE_READ,
+	CHANNEL_TLV_BULLETIN_UPDATE_MAC,
+	CHANNEL_TLV_UPDATE_MTU,
 	CHANNEL_TLV_MAX,
 
 	/* Required for iterating over vport-update tlvs.
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 3206cc6c6..8f3713988 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -603,37 +603,6 @@ int qede_enable_tpa(struct rte_eth_dev *eth_dev, bool flg)
 	return 0;
 }
 
-/* Update MTU via vport-update without doing port restart.
- * The vport must be deactivated before calling this API.
- */
-int qede_update_mtu(struct rte_eth_dev *eth_dev, uint16_t mtu)
-{
-	struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
-	struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
-	struct ecore_sp_vport_update_params params;
-	struct ecore_hwfn *p_hwfn;
-	int rc;
-	int i;
-
-	memset(&params, 0, sizeof(struct ecore_sp_vport_update_params));
-	params.vport_id = 0;
-	params.mtu = mtu;
-	params.vport_id = 0;
-	for_each_hwfn(edev, i) {
-		p_hwfn = &edev->hwfns[i];
-		params.opaque_fid = p_hwfn->hw_info.opaque_fid;
-		rc = ecore_sp_vport_update(p_hwfn, &params,
-				ECORE_SPQ_MODE_EBLOCK, NULL);
-		if (rc != ECORE_SUCCESS) {
-			DP_ERR(edev, "Failed to update MTU\n");
-			return -1;
-		}
-	}
-	DP_INFO(edev, "MTU updated to %u\n", mtu);
-
-	return 0;
-}
-
 static void qede_set_ucast_cmn_params(struct ecore_filter_ucast *ucast)
 {
 	memset(ucast, 0, sizeof(struct ecore_filter_ucast));
@@ -1296,6 +1265,12 @@ static int qede_dev_start(struct rte_eth_dev *eth_dev)
 
 	PMD_INIT_FUNC_TRACE(edev);
 
+	/* Update MTU only if it has changed */
+	if (eth_dev->data->mtu != qdev->mtu) {
+		if (qede_update_mtu(eth_dev, qdev->mtu))
+			goto err;
+	}
+
 	/* Configure TPA parameters */
 	if (rxmode->offloads & DEV_RX_OFFLOAD_TCP_LRO) {
 		if (qede_enable_tpa(eth_dev, true))
@@ -2056,6 +2031,72 @@ qede_set_mc_addr_list(struct rte_eth_dev *eth_dev, struct ether_addr *mc_addrs,
 	return qede_add_mcast_filters(eth_dev, mc_addrs, mc_addrs_num);
 }
 
+/* Update MTU via vport-update without doing port restart.
+ * The vport must be deactivated before calling this API.
+ */
+int qede_update_mtu(struct rte_eth_dev *eth_dev, uint16_t mtu)
+{
+	struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
+	struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
+	struct ecore_hwfn *p_hwfn;
+	int rc;
+	int i;
+
+	if (IS_PF(edev)) {
+		struct ecore_sp_vport_update_params params;
+
+		memset(&params, 0, sizeof(struct ecore_sp_vport_update_params));
+		params.vport_id = 0;
+		params.mtu = mtu;
+		params.vport_id = 0;
+		for_each_hwfn(edev, i) {
+			p_hwfn = &edev->hwfns[i];
+			params.opaque_fid = p_hwfn->hw_info.opaque_fid;
+			rc = ecore_sp_vport_update(p_hwfn, &params,
+					ECORE_SPQ_MODE_EBLOCK, NULL);
+			if (rc != ECORE_SUCCESS)
+				goto err;
+		}
+	} else {
+		for_each_hwfn(edev, i) {
+			p_hwfn = &edev->hwfns[i];
+			rc = ecore_vf_pf_update_mtu(p_hwfn, mtu);
+			if (rc == ECORE_INVAL) {
+				DP_INFO(edev, "VF MTU Update TLV not supported\n");
+				/* Recreate vport */
+				rc = qede_start_vport(qdev, mtu);
+				if (rc != ECORE_SUCCESS)
+					goto err;
+
+				/* Restore config lost due to vport stop */
+				qede_mac_addr_set(eth_dev, &qdev->primary_mac);
+
+				if (eth_dev->data->promiscuous)
+					qede_promiscuous_enable(eth_dev);
+				else
+					qede_promiscuous_disable(eth_dev);
+
+				if (eth_dev->data->all_multicast)
+					qede_allmulticast_enable(eth_dev);
+				else
+					qede_allmulticast_disable(eth_dev);
+
+				qede_vlan_offload_set(eth_dev,
+						      qdev->vlan_offload_mask);
+			} else if (rc != ECORE_SUCCESS) {
+				goto err;
+			}
+		}
+	}
+	DP_INFO(edev, "%s MTU updated to %u\n", IS_PF(edev) ? "PF" : "VF", mtu);
+
+	return 0;
+
+err:
+	DP_ERR(edev, "Failed to update MTU\n");
+	return -1;
+}
+
 static int qede_flow_ctrl_set(struct rte_eth_dev *eth_dev,
 			      struct rte_eth_fc_conf *fc_conf)
 {
@@ -2463,7 +2504,6 @@ static int qede_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
 			qede_mac_addr_remove(dev, 0);
 	}
 	rte_delay_ms(1000);
-	qede_start_vport(qdev, mtu); /* Recreate vport */
 	qdev->mtu = mtu;
 
 	/* Fix up RX buf size for all queues of the port */
@@ -2487,22 +2527,6 @@ static int qede_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
 	else
 		dev->data->dev_conf.rxmode.jumbo_frame = 0;
 
-	/* Restore config lost due to vport stop */
-	if (IS_PF(edev))
-		qede_mac_addr_set(dev, &qdev->primary_mac);
-
-	if (dev->data->promiscuous)
-		qede_promiscuous_enable(dev);
-	else
-		qede_promiscuous_disable(dev);
-
-	if (dev->data->all_multicast)
-		qede_allmulticast_enable(dev);
-	else
-		qede_allmulticast_disable(dev);
-
-	qede_vlan_offload_set(dev, qdev->vlan_offload_mask);
-
 	if (!dev->data->dev_started && restart) {
 		qede_dev_start(dev);
 		dev->data->dev_started = 1;
diff --git a/drivers/net/qede/qede_ethdev.h b/drivers/net/qede/qede_ethdev.h
index a335d4da3..9b80011aa 100644
--- a/drivers/net/qede/qede_ethdev.h
+++ b/drivers/net/qede/qede_ethdev.h
@@ -34,6 +34,7 @@
 #include "base/nvm_cfg.h"
 #include "base/ecore_sp_commands.h"
 #include "base/ecore_l2.h"
+#include "base/ecore_vf.h"
 
 #include "qede_logs.h"
 #include "qede_if.h"
-- 
2.17.1

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

* [dpdk-stable] patch 'net/qede: fix for devargs' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
@ 2018-07-30 16:10 ` Christian Ehrhardt
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/cxgbe: report configured link auto-negotiation' " Christian Ehrhardt
                   ` (174 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:10 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 66f747c1db999467c49f7bc71b0107b843d7c819 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Tue, 22 May 2018 16:16:04 -0700
Subject: [PATCH] net/qede: fix for devargs

[ upstream commit a16aef523c11b6e64a809242c77ff7f2c5e9a864 ]

Do not error out on invalid devarg, log the message and continue.
Decide updating the tx-switching config in check args. Add a check for
VF when disabling tx-switching

Fixes: 612ce81b2007 ("net/qede: add devargs to disable NPAR Tx switching")
Fixes: f64b91b0eb5d ("net/qede: replace config option with run-time arg")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
 drivers/net/qede/qede_ethdev.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 8f3713988..137f91060 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -518,14 +518,9 @@ int qede_activate_vport(struct rte_eth_dev *eth_dev, bool flg)
 	params.update_vport_active_tx_flg = 1;
 	params.vport_active_rx_flg = flg;
 	params.vport_active_tx_flg = flg;
-	if (!qdev->enable_tx_switching) {
-		if ((QEDE_NPAR_TX_SWITCHING != NULL) ||
-		    ((QEDE_VF_TX_SWITCHING != NULL) && IS_VF(edev))) {
-			params.update_tx_switching_flg = 1;
-			params.tx_switching_flg = !flg;
-			DP_INFO(edev, "%s tx-switching is disabled\n",
-				QEDE_NPAR_TX_SWITCHING ? "NPAR" : "VF");
-		}
+	if (~qdev->enable_tx_switching & flg) {
+		params.update_tx_switching_flg = 1;
+		params.tx_switching_flg = !flg;
 	}
 	for_each_hwfn(edev, i) {
 		p_hwfn = &edev->hwfns[i];
@@ -1362,8 +1357,12 @@ static int qede_args_check(const char *key, const char *val, void *opaque)
 	}
 
 	if ((strcmp(QEDE_NPAR_TX_SWITCHING, key) == 0) ||
-	    (strcmp(QEDE_VF_TX_SWITCHING, key) == 0))
+	    ((strcmp(QEDE_VF_TX_SWITCHING, key) == 0) && IS_VF(edev))) {
 		qdev->enable_tx_switching = !!tmp;
+		DP_INFO(edev, "Disabling %s tx-switching\n",
+			strcmp(QEDE_NPAR_TX_SWITCHING, key) ?
+			"VF" : "NPAR");
+	}
 
 	return ret;
 }
@@ -1438,7 +1437,8 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
 
 	/* Parse devargs and fix up rxmode */
 	if (qede_args(eth_dev))
-		return -ENOTSUP;
+		DP_NOTICE(edev, false,
+			  "Invalid devargs supplied, requested change will not take effect\n");
 
 	if (!(rxmode->mq_mode == ETH_MQ_RX_NONE ||
 	      rxmode->mq_mode == ETH_MQ_RX_RSS)) {
-- 
2.17.1

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

* [dpdk-stable] patch 'net/cxgbe: report configured link auto-negotiation' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/qede: fix for devargs' " Christian Ehrhardt
@ 2018-07-30 16:10 ` Christian Ehrhardt
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/mvpp2: check pointer before using it' " Christian Ehrhardt
                   ` (173 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:10 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From d0724a1c4876019d83ffc35b52e0e97bd691f477 Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Wed, 23 May 2018 23:30:49 +0530
Subject: [PATCH] net/cxgbe: report configured link auto-negotiation

[ upstream commit e0ac655a3646cb28e1244b1e68074f8aa02f674e ]

Report current configured link auto-negotiation. Also initialize
rte_eth_link.

Coverity issue: 280648
Fixes: f5b3c7b29357 ("net/cxgbevf: fix inter-VM traffic when physical link down")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/cxgbe_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index 61115e26a..32450915c 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -204,13 +204,14 @@ int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev,
 	struct port_info *pi = (struct port_info *)(eth_dev->data->dev_private);
 	struct adapter *adapter = pi->adapter;
 	struct sge *s = &adapter->sge;
-	struct rte_eth_link new_link;
+	struct rte_eth_link new_link = { 0 };
 	unsigned int work_done, budget = 4;
 
 	cxgbe_poll(&s->fw_evtq, NULL, budget, &work_done);
 
 	new_link.link_status = force_linkup(adapter) ?
 			       ETH_LINK_UP : pi->link_cfg.link_ok;
+	new_link.link_autoneg = pi->link_cfg.autoneg;
 	new_link.link_duplex = ETH_LINK_FULL_DUPLEX;
 	new_link.link_speed = pi->link_cfg.speed;
 
-- 
2.17.1

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

* [dpdk-stable] patch 'net/mvpp2: check pointer before using it' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/qede: fix for devargs' " Christian Ehrhardt
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/cxgbe: report configured link auto-negotiation' " Christian Ehrhardt
@ 2018-07-30 16:10 ` Christian Ehrhardt
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/qede: fix L2-handles used for RSS hash update' " Christian Ehrhardt
                   ` (172 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:10 UTC (permalink / raw)
  To: Tomasz Duszynski; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 8ffc855855616a57da0dd461f37d3b1f6ce251ab Mon Sep 17 00:00:00 2001
From: Tomasz Duszynski <tdu@semihalf.com>
Date: Mon, 4 Jun 2018 11:24:28 +0200
Subject: [PATCH] net/mvpp2: check pointer before using it

[ upstream commit 42ab8427d4c67532df0b91b8e55e695f8c4f3bb6 ]

Avoid NULL dereference by checking pointer before using it.

Note that the fixes tag is before the driver was renamed
to mvpp2, so the patch will not apply that far back.

Fixes: 3588aaa68eab ("net/mrvl: fix HIF objects allocation")

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index ea6a7864f..f5bae3939 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -1612,9 +1612,12 @@ mrvl_rx_queue_release(void *rxq)
 	if (core_id == LCORE_ID_ANY)
 		core_id = 0;
 
+	if (!q)
+		return;
+
 	hif = mrvl_get_hif(q->priv, core_id);
 
-	if (!q || !hif)
+	if (!hif)
 		return;
 
 	tc = q->priv->rxq_map[q->queue_id].tc;
-- 
2.17.1

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

* [dpdk-stable] patch 'net/qede: fix L2-handles used for RSS hash update' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (2 preceding siblings ...)
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/mvpp2: check pointer before using it' " Christian Ehrhardt
@ 2018-07-30 16:10 ` Christian Ehrhardt
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/qede: fix memory alloc for multiple port reconfig' " Christian Ehrhardt
                   ` (171 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:10 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: Kevin Traynor, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 765c9b0950846a60b4fe7c044f1751b488884b64 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Tue, 5 Jun 2018 16:03:57 -0700
Subject: [PATCH] net/qede: fix L2-handles used for RSS hash update

[ upstream commit bed6cd4e33f972b89bb317b9ad8f699e7e6c8e7d ]

Fix fast path array index which is used for passing L2 handles to RSS
indirection table, properly distribute rxq handles for indirection table.
Currently, it is using the local copy of indirection table. When the RX
queue configuration changes the local copy becomes invalid.

Fixes: 69d7ba88f1a1 ("net/qede/base: use L2-handles for RSS configuration")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Reviewed-by: Kevin Traynor <ktraynor@redhat.com>
---
 drivers/net/qede/qede_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 137f91060..cd9ec1070 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -2251,7 +2251,7 @@ int qede_rss_hash_update(struct rte_eth_dev *eth_dev,
 	vport_update_params.vport_id = 0;
 	/* pass the L2 handles instead of qids */
 	for (i = 0 ; i < ECORE_RSS_IND_TABLE_SIZE ; i++) {
-		idx = qdev->rss_ind_table[i];
+		idx = i % QEDE_RSS_COUNT(qdev);
 		rss_params.rss_ind_table[i] = qdev->fp_array[idx].rxq->handle;
 	}
 	vport_update_params.rss_params = &rss_params;
-- 
2.17.1

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

* [dpdk-stable] patch 'net/qede: fix memory alloc for multiple port reconfig' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (3 preceding siblings ...)
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/qede: fix L2-handles used for RSS hash update' " Christian Ehrhardt
@ 2018-07-30 16:10 ` Christian Ehrhardt
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/qede: fix incorrect link status update' " Christian Ehrhardt
                   ` (170 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:10 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: Kevin Traynor, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From ec15251501fdc2fca1f2e946563488efb73bb3ed Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Thu, 7 Jun 2018 09:30:20 -0700
Subject: [PATCH] net/qede: fix memory alloc for multiple port reconfig

[ upstream commit 7105b24f4bb89b23b8efeb516d5b69d85e18568f ]

Multiple port reconfigurations can lead to memory allocation failures
due to hitting RTE memzone limit or no more room in config while
reserving memzone.

When freeing memzones, update the memzone mapping and the memzone count.
Release Rx and Tx queue rings allocated during queue setup.

Fixes: a39001d90dbd ("net/qede: fix DMA memory leak")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Reviewed-by: Kevin Traynor <ktraynor@redhat.com>
---
 drivers/net/qede/base/bcm_osal.c |  5 +++++
 drivers/net/qede/qede_rxtx.c     | 21 +++++++++++----------
 2 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/drivers/net/qede/base/bcm_osal.c b/drivers/net/qede/base/bcm_osal.c
index ca1c2b113..72627dfec 100644
--- a/drivers/net/qede/base/bcm_osal.c
+++ b/drivers/net/qede/base/bcm_osal.c
@@ -201,6 +201,11 @@ void osal_dma_free_mem(struct ecore_dev *p_dev, dma_addr_t phys)
 			DP_VERBOSE(p_dev, ECORE_MSG_SP,
 				"Free memzone %s\n", ecore_mz_mapping[j]->name);
 			rte_memzone_free(ecore_mz_mapping[j]);
+			while (j < ecore_mz_count - 1) {
+				ecore_mz_mapping[j] = ecore_mz_mapping[j + 1];
+				j++;
+			}
+			ecore_mz_count--;
 			return;
 		}
 	}
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index bdb5d6f11..4fa1c615b 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -192,9 +192,15 @@ static void qede_rx_queue_release_mbufs(struct qede_rx_queue *rxq)
 void qede_rx_queue_release(void *rx_queue)
 {
 	struct qede_rx_queue *rxq = rx_queue;
+	struct qede_dev *qdev = rxq->qdev;
+	struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
+
+	PMD_INIT_FUNC_TRACE(edev);
 
 	if (rxq) {
 		qede_rx_queue_release_mbufs(rxq);
+		qdev->ops->common->chain_free(edev, &rxq->rx_bd_ring);
+		qdev->ops->common->chain_free(edev, &rxq->rx_comp_ring);
 		rte_free(rxq->sw_rx_ring);
 		rte_free(rxq);
 	}
@@ -350,9 +356,14 @@ static void qede_tx_queue_release_mbufs(struct qede_tx_queue *txq)
 void qede_tx_queue_release(void *tx_queue)
 {
 	struct qede_tx_queue *txq = tx_queue;
+	struct qede_dev *qdev = txq->qdev;
+	struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
+
+	PMD_INIT_FUNC_TRACE(edev);
 
 	if (txq) {
 		qede_tx_queue_release_mbufs(txq);
+		qdev->ops->common->chain_free(edev, &txq->tx_pbl);
 		rte_free(txq->sw_tx_ring);
 		rte_free(txq);
 	}
@@ -441,8 +452,6 @@ void qede_dealloc_fp_resc(struct rte_eth_dev *eth_dev)
 	struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
 	struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
 	struct qede_fastpath *fp;
-	struct qede_rx_queue *rxq;
-	struct qede_tx_queue *txq;
 	uint16_t sb_idx;
 	uint8_t i;
 
@@ -467,21 +476,13 @@ void qede_dealloc_fp_resc(struct rte_eth_dev *eth_dev)
 	for (i = 0; i < eth_dev->data->nb_rx_queues; i++) {
 		if (eth_dev->data->rx_queues[i]) {
 			qede_rx_queue_release(eth_dev->data->rx_queues[i]);
-			rxq = eth_dev->data->rx_queues[i];
-			qdev->ops->common->chain_free(edev,
-						      &rxq->rx_bd_ring);
-			qdev->ops->common->chain_free(edev,
-						      &rxq->rx_comp_ring);
 			eth_dev->data->rx_queues[i] = NULL;
 		}
 	}
 
 	for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
 		if (eth_dev->data->tx_queues[i]) {
-			txq = eth_dev->data->tx_queues[i];
 			qede_tx_queue_release(eth_dev->data->tx_queues[i]);
-			qdev->ops->common->chain_free(edev,
-						      &txq->tx_pbl);
 			eth_dev->data->tx_queues[i] = NULL;
 		}
 	}
-- 
2.17.1

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

* [dpdk-stable] patch 'net/qede: fix incorrect link status update' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (4 preceding siblings ...)
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/qede: fix memory alloc for multiple port reconfig' " Christian Ehrhardt
@ 2018-07-30 16:10 ` Christian Ehrhardt
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/qede: fix link change event notification' " Christian Ehrhardt
                   ` (169 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:10 UTC (permalink / raw)
  To: Shahed Shaikh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 61f9333f49122768aa4fbf6a00a94e81a315fc3a Mon Sep 17 00:00:00 2001
From: Shahed Shaikh <shahed.shaikh@cavium.com>
Date: Thu, 7 Jun 2018 09:30:51 -0700
Subject: [PATCH] net/qede: fix incorrect link status update

[ upstream commit c6034a20d9e221dc6125db57e4378520af3a515d ]

qede_link_update() always returns -1 i.e. link not changed,
because it compares the variables which always hold same value.

Fix this function by using rte_eth_linkstatus_set().

Fixes: 2ea6f76aff40 ("qede: add core driver")

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
---
 drivers/net/qede/qede_ethdev.c | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index cd9ec1070..7a63d0564 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1590,18 +1590,20 @@ qede_link_update(struct rte_eth_dev *eth_dev, __rte_unused int wait_to_complete)
 {
 	struct qede_dev *qdev = eth_dev->data->dev_private;
 	struct ecore_dev *edev = &qdev->edev;
+	struct qed_link_output q_link;
+	struct rte_eth_link link;
 	uint16_t link_duplex;
-	struct qed_link_output link;
-	struct rte_eth_link *curr = &eth_dev->data->dev_link;
 
-	memset(&link, 0, sizeof(struct qed_link_output));
-	qdev->ops->common->get_link(edev, &link);
+	memset(&q_link, 0, sizeof(q_link));
+	memset(&link, 0, sizeof(link));
+
+	qdev->ops->common->get_link(edev, &q_link);
 
 	/* Link Speed */
-	curr->link_speed = link.speed;
+	link.link_speed = q_link.speed;
 
 	/* Link Mode */
-	switch (link.duplex) {
+	switch (q_link.duplex) {
 	case QEDE_DUPLEX_HALF:
 		link_duplex = ETH_LINK_HALF_DUPLEX;
 		break;
@@ -1612,21 +1614,20 @@ qede_link_update(struct rte_eth_dev *eth_dev, __rte_unused int wait_to_complete)
 	default:
 		link_duplex = -1;
 	}
-	curr->link_duplex = link_duplex;
+	link.link_duplex = link_duplex;
 
 	/* Link Status */
-	curr->link_status = (link.link_up) ? ETH_LINK_UP : ETH_LINK_DOWN;
+	link.link_status = q_link.link_up ? ETH_LINK_UP : ETH_LINK_DOWN;
 
 	/* AN */
-	curr->link_autoneg = (link.supported_caps & QEDE_SUPPORTED_AUTONEG) ?
+	link.link_autoneg = (q_link.supported_caps & QEDE_SUPPORTED_AUTONEG) ?
 			     ETH_LINK_AUTONEG : ETH_LINK_FIXED;
 
 	DP_INFO(edev, "Link - Speed %u Mode %u AN %u Status %u\n",
-		curr->link_speed, curr->link_duplex,
-		curr->link_autoneg, curr->link_status);
+		link.link_speed, link.link_duplex,
+		link.link_autoneg, link.link_status);
 
-	/* return 0 means link status changed, -1 means not changed */
-	return ((curr->link_status == link.link_up) ? -1 : 0);
+	return rte_eth_linkstatus_set(eth_dev, &link);
 }
 
 static void qede_promiscuous_enable(struct rte_eth_dev *eth_dev)
-- 
2.17.1

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

* [dpdk-stable] patch 'net/qede: fix link change event notification' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (5 preceding siblings ...)
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/qede: fix incorrect link status update' " Christian Ehrhardt
@ 2018-07-30 16:10 ` Christian Ehrhardt
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/bnxt: add missing ids in xstats' " Christian Ehrhardt
                   ` (168 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:10 UTC (permalink / raw)
  To: Shahed Shaikh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 8beb51e90341197455739b1babf272d091c5e061 Mon Sep 17 00:00:00 2001
From: Shahed Shaikh <shahed.shaikh@cavium.com>
Date: Thu, 7 Jun 2018 09:30:52 -0700
Subject: [PATCH] net/qede: fix link change event notification

[ upstream commit cfab13aa93897524a4c8d4f6e30d91e7dd9e247b ]

As per existing behavior, when firmware sends a link change
notification, PMD only updates the link structure but does
not notify applications about it.
This results in application sending packets even when link
status is down.

Fix this issue by issuing RTE_ETH_EVENT_INTR_LSC.

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

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
---
 drivers/net/qede/qede_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c
index c3407fe94..de5a7ca80 100644
--- a/drivers/net/qede/qede_main.c
+++ b/drivers/net/qede/qede_main.c
@@ -634,8 +634,11 @@ void qed_link_update(struct ecore_hwfn *hwfn)
 {
 	struct ecore_dev *edev = hwfn->p_dev;
 	struct qede_dev *qdev = (struct qede_dev *)edev;
+	struct rte_eth_dev *dev = (struct rte_eth_dev *)qdev->ethdev;
 
-	qede_link_update((struct rte_eth_dev *)qdev->ethdev, 0);
+	if (!qede_link_update(dev, 0))
+		_rte_eth_dev_callback_process(dev,
+					      RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int qed_drain(struct ecore_dev *edev)
-- 
2.17.1

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

* [dpdk-stable] patch 'net/bnxt: add missing ids in xstats' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (6 preceding siblings ...)
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/qede: fix link change event notification' " Christian Ehrhardt
@ 2018-07-30 16:10 ` Christian Ehrhardt
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/ena: check pointer before memset' " Christian Ehrhardt
                   ` (167 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:10 UTC (permalink / raw)
  To: David Marchand; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From ff904fb451f3a3b077e390d0dc15771082cab777 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@6wind.com>
Date: Thu, 7 Jun 2018 07:36:05 +0200
Subject: [PATCH] net/bnxt: add missing ids in xstats

[ upstream commit 6765998874ec7e1068b8646559e2f92ec0d3f308 ]

The xstats API expects that the driver fills both values and ids for
each filled entries.

Fixes: bfb9c2260be2 ("net/bnxt: support xstats get/reset")

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_stats.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index bbd4e78b7..a5d3c8660 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -278,6 +278,7 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
 	count = 0;
 	for (i = 0; i < RTE_DIM(bnxt_rx_stats_strings); i++) {
 		uint64_t *rx_stats = (uint64_t *)bp->hw_rx_port_stats;
+		xstats[count].id = count;
 		xstats[count].value = rte_le_to_cpu_64(
 				*(uint64_t *)((char *)rx_stats +
 				bnxt_rx_stats_strings[i].offset));
@@ -286,6 +287,7 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
 
 	for (i = 0; i < RTE_DIM(bnxt_tx_stats_strings); i++) {
 		uint64_t *tx_stats = (uint64_t *)bp->hw_tx_port_stats;
+		xstats[count].id = count;
 		xstats[count].value = rte_le_to_cpu_64(
 				 *(uint64_t *)((char *)tx_stats +
 				bnxt_tx_stats_strings[i].offset));
@@ -293,6 +295,7 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
 	}
 
 	/* The Tx drop pkts aka the Anti spoof coounter */
+	xstats[count].id = count;
 	xstats[count].value = rte_le_to_cpu_64(tx_drop_pkts);
 	count++;
 
-- 
2.17.1

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

* [dpdk-stable] patch 'net/ena: check pointer before memset' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (7 preceding siblings ...)
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/bnxt: add missing ids in xstats' " Christian Ehrhardt
@ 2018-07-30 16:10 ` Christian Ehrhardt
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/ena: change memory type' " Christian Ehrhardt
                   ` (166 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:10 UTC (permalink / raw)
  To: Rafal Kozik; +Cc: Michal Krawczyk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 7f9283e2e0406aaa7e38ed664564d8a935a5c577 Mon Sep 17 00:00:00 2001
From: Rafal Kozik <rk@semihalf.com>
Date: Thu, 7 Jun 2018 11:43:18 +0200
Subject: [PATCH] net/ena: check pointer before memset

[ upstream commit 46916aa17d4b2007df8c0454f99ba0ca8b8cb93b ]

Need to check if memory allocation succeed before using it.
Using memset on NULL pointer cause segfault.

Fixes: 9ba7981ec992 ("ena: add communication layer for DPDK")

Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
---
 drivers/net/ena/base/ena_plat_dpdk.h | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h
index 93345199a..0ee440c21 100644
--- a/drivers/net/ena/base/ena_plat_dpdk.h
+++ b/drivers/net/ena/base/ena_plat_dpdk.h
@@ -190,10 +190,15 @@ typedef uint64_t dma_addr_t;
 				"ena_alloc_%d", ena_alloc_cnt++);	\
 		mz = rte_memzone_reserve(z_name, size, SOCKET_ID_ANY,	\
 				RTE_MEMZONE_IOVA_CONTIG);		\
-		memset(mz->addr, 0, size);				\
-		virt = mz->addr;					\
-		phys = mz->iova;					\
 		handle = mz;						\
+		if (mz == NULL) {					\
+			virt = NULL;					\
+			phys = 0;					\
+		} else {						\
+			memset(mz->addr, 0, size);			\
+			virt = mz->addr;				\
+			phys = mz->iova;				\
+		}							\
 	} while (0)
 #define ENA_MEM_FREE_COHERENT(dmadev, size, virt, phys, handle) 	\
 		({ ENA_TOUCH(size); ENA_TOUCH(phys);			\
@@ -209,9 +214,14 @@ typedef uint64_t dma_addr_t;
 				"ena_alloc_%d", ena_alloc_cnt++);	\
 		mz = rte_memzone_reserve(z_name, size, node,		\
 				RTE_MEMZONE_IOVA_CONTIG);		\
-		memset(mz->addr, 0, size);				\
-		virt = mz->addr;					\
-		phys = mz->iova;					\
+		if (mz == NULL) {					\
+			virt = NULL;					\
+			phys = 0;					\
+		} else {						\
+			memset(mz->addr, 0, size);			\
+			virt = mz->addr;				\
+			phys = mz->iova;				\
+		}							\
 	} while (0)
 
 #define ENA_MEM_ALLOC_NODE(dmadev, size, virt, node, dev_node) \
-- 
2.17.1

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

* [dpdk-stable] patch 'net/ena: change memory type' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (8 preceding siblings ...)
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/ena: check pointer before memset' " Christian Ehrhardt
@ 2018-07-30 16:10 ` Christian Ehrhardt
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/ena: fix GENMASK_ULL macro' " Christian Ehrhardt
                   ` (165 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:10 UTC (permalink / raw)
  To: Rafal Kozik; +Cc: Michal Krawczyk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 5b1a15bf781ed82a96aa37f40604768290090c5f Mon Sep 17 00:00:00 2001
From: Rafal Kozik <rk@semihalf.com>
Date: Thu, 7 Jun 2018 11:43:19 +0200
Subject: [PATCH] net/ena: change memory type

[ upstream commit 9f32c7e7e6ce58ab772913f54f8328c1c0186a17 ]

ENA_MEM_ALLOC_NODE not need to use contiguous physical memory.
Also using memset without checking if allocation succeed can cause
segmentation fault.

To avoid both issue use rte_zmalloc_socket.

Fixes: 3d3edc265fc8 ("net/ena: make coherent memory allocation NUMA-aware")

Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
---
 drivers/net/ena/base/ena_plat_dpdk.h | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h
index 0ee440c21..e7917c506 100644
--- a/drivers/net/ena/base/ena_plat_dpdk.h
+++ b/drivers/net/ena/base/ena_plat_dpdk.h
@@ -226,15 +226,8 @@ typedef uint64_t dma_addr_t;
 
 #define ENA_MEM_ALLOC_NODE(dmadev, size, virt, node, dev_node) \
 	do {								\
-		const struct rte_memzone *mz;				\
-		char z_name[RTE_MEMZONE_NAMESIZE];			\
 		ENA_TOUCH(dmadev); ENA_TOUCH(dev_node);			\
-		snprintf(z_name, sizeof(z_name),			\
-				"ena_alloc_%d", ena_alloc_cnt++);	\
-		mz = rte_memzone_reserve(z_name, size, node,		\
-				RTE_MEMZONE_IOVA_CONTIG);		\
-		memset(mz->addr, 0, size);				\
-		virt = mz->addr;					\
+		virt = rte_zmalloc_socket(NULL, size, 0, node);		\
 	} while (0)
 
 #define ENA_MEM_ALLOC(dmadev, size) rte_zmalloc(NULL, size, 1)
-- 
2.17.1

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

* [dpdk-stable] patch 'net/ena: fix GENMASK_ULL macro' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (9 preceding siblings ...)
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/ena: change memory type' " Christian Ehrhardt
@ 2018-07-30 16:10 ` Christian Ehrhardt
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/ena: set link speed as none' " Christian Ehrhardt
                   ` (164 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:10 UTC (permalink / raw)
  To: Rafal Kozik; +Cc: Michal Krawczyk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From f1b0bb2dc286f85dae0c261fe434a5a41365bf0b Mon Sep 17 00:00:00 2001
From: Rafal Kozik <rk@semihalf.com>
Date: Thu, 7 Jun 2018 11:43:20 +0200
Subject: [PATCH] net/ena: fix GENMASK_ULL macro

[ upstream commit 7544aee8d0b4ae0262b1ba7e1539cf8171664df7 ]

When use GENMASK_ULL(63,0) left shift by 64 bits is performed.
Shifting by number greater or equal then word length
is undefined operation and failed on some platforms.

Fixes: 9ba7981ec992 ("ena: add communication layer for DPDK")

Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
---
 drivers/net/ena/base/ena_plat_dpdk.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h
index e7917c506..558966517 100644
--- a/drivers/net/ena/base/ena_plat_dpdk.h
+++ b/drivers/net/ena/base/ena_plat_dpdk.h
@@ -116,11 +116,13 @@ typedef uint64_t dma_addr_t;
 #define ENA_MIN16(x, y) RTE_MIN((x), (y))
 #define ENA_MIN8(x, y) RTE_MIN((x), (y))
 
+#define BITS_PER_LONG_LONG (__SIZEOF_LONG_LONG__ * 8)
 #define U64_C(x) x ## ULL
 #define BIT(nr)         (1UL << (nr))
 #define BITS_PER_LONG	(__SIZEOF_LONG__ * 8)
 #define GENMASK(h, l)	(((~0UL) << (l)) & (~0UL >> (BITS_PER_LONG - 1 - (h))))
-#define GENMASK_ULL(h, l) (((U64_C(1) << ((h) - (l) + 1)) - 1) << (l))
+#define GENMASK_ULL(h, l) (((~0ULL) - (1ULL << (l)) + 1) & \
+			  (~0ULL >> (BITS_PER_LONG_LONG - 1 - (h))))
 
 #ifdef RTE_LIBRTE_ENA_COM_DEBUG
 #define ena_trc_dbg(format, arg...)					\
-- 
2.17.1

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

* [dpdk-stable] patch 'net/ena: set link speed as none' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (10 preceding siblings ...)
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/ena: fix GENMASK_ULL macro' " Christian Ehrhardt
@ 2018-07-30 16:10 ` Christian Ehrhardt
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/nfp: fix unused header reference' " Christian Ehrhardt
                   ` (163 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:10 UTC (permalink / raw)
  To: Rafal Kozik; +Cc: Michal Krawczyk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 50f554fdd9b55643fc2c573ac0ac005c715b2057 Mon Sep 17 00:00:00 2001
From: Rafal Kozik <rk@semihalf.com>
Date: Thu, 7 Jun 2018 11:43:22 +0200
Subject: [PATCH] net/ena: set link speed as none

[ upstream commit 41e59028dd8ab2038a7655c6fc3098222661aa53 ]

Link speed should is not limited to 10Gb/s and it shouldn't be hardcoded.

They link speed is set to none instead and the applications shouldn't
rely on this value when using ENA PMD.

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

Signed-off-by: Rafal Kozik <rk@semihalf.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
---
 drivers/net/ena/ena_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index c595cc7e6..f10bee236 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -725,7 +725,7 @@ static int ena_link_update(struct rte_eth_dev *dev,
 	struct rte_eth_link *link = &dev->data->dev_link;
 
 	link->link_status = ETH_LINK_UP;
-	link->link_speed = ETH_SPEED_NUM_10G;
+	link->link_speed = ETH_SPEED_NUM_NONE;
 	link->link_duplex = ETH_LINK_FULL_DUPLEX;
 
 	return 0;
-- 
2.17.1

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

* [dpdk-stable] patch 'net/nfp: fix unused header reference' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (11 preceding siblings ...)
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/ena: set link speed as none' " Christian Ehrhardt
@ 2018-07-30 16:10 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/nfp: fix field initialization in Tx descriptor' " Christian Ehrhardt
                   ` (162 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:10 UTC (permalink / raw)
  To: Alejandro Lucero; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 05d543931d246866d179963bcc7e1c04ab2617c2 Mon Sep 17 00:00:00 2001
From: Alejandro Lucero <alejandro.lucero@netronome.com>
Date: Mon, 11 Jun 2018 12:20:46 +0100
Subject: [PATCH] net/nfp: fix unused header reference

[ upstream commit 8c7cd2fa4e3d5441d725d8f1a888dad1633d3b52 ]

Apart from not being used, this is causing problem when compiling
DPDK with the musl library as reported by bugzilla.

Bugzilla ID: 40
Fixes: c7e9729da6b5 ("net/nfp: support CPP")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 drivers/net/nfp/nfpcore/nfp-common/nfp_platform.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/nfp/nfpcore/nfp-common/nfp_platform.h b/drivers/net/nfp/nfpcore/nfp-common/nfp_platform.h
index b8541c593..d46574b10 100644
--- a/drivers/net/nfp/nfpcore/nfp-common/nfp_platform.h
+++ b/drivers/net/nfp/nfpcore/nfp-common/nfp_platform.h
@@ -13,7 +13,6 @@
 #include <stdlib.h>
 #include <ctype.h>
 #include <inttypes.h>
-#include <sys/cdefs.h>
 #include <sys/stat.h>
 #include <limits.h>
 #include <errno.h>
-- 
2.17.1

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

* [dpdk-stable] patch 'net/nfp: fix field initialization in Tx descriptor' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (12 preceding siblings ...)
  2018-07-30 16:10 ` [dpdk-stable] patch 'net/nfp: fix unused header reference' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'app/testpmd: fix crash when attaching a device' " Christian Ehrhardt
                   ` (161 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Alejandro Lucero; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 4c541a7a1f43cd886dff930686eaa6c5ccb4054c Mon Sep 17 00:00:00 2001
From: Alejandro Lucero <alejandro.lucero@netronome.com>
Date: Mon, 11 Jun 2018 10:50:37 +0100
Subject: [PATCH] net/nfp: fix field initialization in Tx descriptor

[ upstream commit 01f65293ceb94921a35554fa7b17bc0ec1764c96 ]

TX descriptor eop_offset field is not initialized and it could
contain garbage. This patch fixes the potential problem setting
EOP as the only subfield. The other subfield, data offset, is
not used by now.

Fixes: b812daadad0d ("nfp: add Rx and Tx")

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

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index faad1ee9b..36586969f 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2253,11 +2253,15 @@ nfp_net_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 				txq->wr_p = 0;
 
 			pkt_size -= dma_size;
-			if (!pkt_size)
-				/* End of packet */
-				txds->offset_eop |= PCIE_DESC_TX_EOP;
+
+			/*
+			 * Making the EOP, packets with just one segment
+			 * the priority
+			 */
+			if (likely(!pkt_size))
+				txds->offset_eop = PCIE_DESC_TX_EOP;
 			else
-				txds->offset_eop &= PCIE_DESC_TX_OFFSET_MASK;
+				txds->offset_eop = 0;
 
 			pkt = pkt->next;
 			/* Referencing next free TX descriptor */
-- 
2.17.1

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

* [dpdk-stable] patch 'app/testpmd: fix crash when attaching a device' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (13 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/nfp: fix field initialization in Tx descriptor' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bonding: always update bonding link status' " Christian Ehrhardt
                   ` (160 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Adrien Mazarguil; +Cc: Bernard Iremonger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 75e9d719c9a69bd0d142115f4578c38cb9054fa3 Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Date: Wed, 13 Jun 2018 18:27:43 +0200
Subject: [PATCH] app/testpmd: fix crash when attaching a device

[ upstream commit 422515b9aab0f1161631276d682303356e243c07 ]

Below commit checks global device information to determine if a port uses
the softnic driver once initialized. Problem is that this information is
not available at this point when a port is initialized interactively
through a "port attach XXX" command, crashing testpmd.

This patch systematically initializes global device information to address
this issue.

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

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test-pmd/testpmd.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 35cf26674..24c199844 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2355,16 +2355,15 @@ init_port_config(void)
 {
 	portid_t pid;
 	struct rte_port *port;
-	struct rte_eth_dev_info dev_info;
 
 	RTE_ETH_FOREACH_DEV(pid) {
 		port = &ports[pid];
 		port->dev_conf.fdir_conf = fdir_conf;
+		rte_eth_dev_info_get(pid, &port->dev_info);
 		if (nb_rxq > 1) {
-			rte_eth_dev_info_get(pid, &dev_info);
 			port->dev_conf.rx_adv_conf.rss_conf.rss_key = NULL;
 			port->dev_conf.rx_adv_conf.rss_conf.rss_hf =
-				rss_hf & dev_info.flow_type_rss_offloads;
+				rss_hf & port->dev_info.flow_type_rss_offloads;
 		} else {
 			port->dev_conf.rx_adv_conf.rss_conf.rss_key = NULL;
 			port->dev_conf.rx_adv_conf.rss_conf.rss_hf = 0;
-- 
2.17.1

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

* [dpdk-stable] patch 'net/bonding: always update bonding link status' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (14 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'app/testpmd: fix crash when attaching a device' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bonding: fix MAC address reset' " Christian Ehrhardt
                   ` (159 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Chas Williams; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 6509fb50d41bc9c0ac563f0c9edd4fd8a2226087 Mon Sep 17 00:00:00 2001
From: Chas Williams <chas3@att.com>
Date: Thu, 17 May 2018 19:22:52 -0400
Subject: [PATCH] net/bonding: always update bonding link status

[ upstream commit 0e677a35349f316d50ba25485354363f3e65c12e ]

When the first ETH_LINK_UP slave is added to a bonding device, it is
immediately activated.  If these are polling slaves, there will be a
later link state event, when last_link_status doesn't match link_status.
But because this slave is already activated, the bonding device's link
status isn't updated.

To fix this, we always attempt to update the bonding device's link status
in the link state change callback.

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

Signed-off-by: Chas Williams <chas3@att.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 02d94b1b1..f155ff779 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2664,10 +2664,8 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 
 	rte_eth_link_get_nowait(port_id, &link);
 	if (link.link_status) {
-		if (active_pos < internals->active_slave_count) {
-			rte_spinlock_unlock(&internals->lsc_lock);
-			return rc;
-		}
+		if (active_pos < internals->active_slave_count)
+			goto link_update;
 
 		/* if no active slave ports then set this port to be primary port */
 		if (internals->active_slave_count < 1) {
@@ -2686,10 +2684,8 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 				internals->primary_port == port_id)
 			bond_ethdev_primary_set(internals, port_id);
 	} else {
-		if (active_pos == internals->active_slave_count) {
-			rte_spinlock_unlock(&internals->lsc_lock);
-			return rc;
-		}
+		if (active_pos == internals->active_slave_count)
+			goto link_update;
 
 		/* Remove from active slave list */
 		deactivate_slave(bonded_eth_dev, port_id);
@@ -2708,6 +2704,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 		}
 	}
 
+link_update:
 	/**
 	 * Update bonded device link properties after any change to active
 	 * slaves
@@ -2745,7 +2742,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 
 	rte_spinlock_unlock(&internals->lsc_lock);
 
-	return 0;
+	return rc;
 }
 
 static int
-- 
2.17.1

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

* [dpdk-stable] patch 'net/bonding: fix MAC address reset' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (15 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bonding: always update bonding link status' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx4: fix minor resource leak during init' " Christian Ehrhardt
                   ` (158 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Kiran Kumar; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From be0a4cc0c6f791c8f6fcda1a3d360bbefc678a06 Mon Sep 17 00:00:00 2001
From: Kiran Kumar <kiran.kokkilagadda@caviumnetworks.com>
Date: Wed, 23 May 2018 14:41:21 +0530
Subject: [PATCH] net/bonding: fix MAC address reset

[ upstream commit fb6eb1e69c499feb5f36193b906c910553835cc6 ]

Currently when resetting bond mac address, we are getting the
persisted mac address from slave info considering primary port
as index. But we need to compare the port id from slave info
with the primary port to get the primary slave index and get
the persisted mac address. Without this fix, persisted mac addr
will be zero and rte_eth_dev_default_mac_addr_set will fail.

Fixes: a45b288ef21a ("bond: support link status polling")

Signed-off-by: Kiran Kumar <kiran.kokkilagadda@caviumnetworks.com>
---
 drivers/net/bonding/rte_eth_bond_api.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index d558df8b9..d1a110ec9 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -716,9 +716,21 @@ rte_eth_bond_mac_address_reset(uint16_t bonded_port_id)
 	internals->user_defined_mac = 0;
 
 	if (internals->slave_count > 0) {
+		int slave_port;
+		/* Get the primary slave location based on the primary port
+		 * number as, while slave_add(), we will keep the primary
+		 * slave based on slave_count,but not based on the primary port.
+		 */
+		for (slave_port = 0; slave_port < internals->slave_count;
+		     slave_port++) {
+			if (internals->slaves[slave_port].port_id ==
+			    internals->primary_port)
+				break;
+		}
+
 		/* Set MAC Address of Bonded Device */
 		if (mac_address_set(bonded_eth_dev,
-				&internals->slaves[internals->primary_port].persisted_mac_addr)
+			&internals->slaves[slave_port].persisted_mac_addr)
 				!= 0) {
 			RTE_BOND_LOG(ERR, "Failed to set MAC address on bonded device");
 			return -1;
-- 
2.17.1

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

* [dpdk-stable] patch 'net/mlx4: fix minor resource leak during init' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (16 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bonding: fix MAC address reset' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix errno object in probe function' " Christian Ehrhardt
                   ` (157 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Adrien Mazarguil; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 9afac427152c69e97ec2113aad3dd7cc5c47156b Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Date: Tue, 22 May 2018 17:36:59 +0200
Subject: [PATCH] net/mlx4: fix minor resource leak during init

[ upstream commit 66f2ac0f8b857d880185fa32ba7229181be4d536 ]

Temporary IB device context and list are not freed in case of a successful
initialization of the device.

This issue is caused by the two following commits, the first of which
causes initialization to return early, while the second one goes a bit
overboard while switching to negative errno values; an internal variable
(err) is needed to tell success from failure at the end of the function
since rte_errno is not reliable enough.

Fixes: f2318196c71a ("net/mlx4: remove limitation on number of instances")
Fixes: 9d14b27308a0 ("net/mlx4: standardize on negative errno values")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 drivers/net/mlx4/mlx4.c | 37 +++++++++++++++++++------------------
 1 file changed, 19 insertions(+), 18 deletions(-)

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index a29814b3b..d151a9055 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -575,14 +575,14 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 	ibv_dev = list[i];
 	DEBUG("device opened");
 	if (mlx4_glue->query_device(attr_ctx, &device_attr)) {
-		rte_errno = ENODEV;
+		err = ENODEV;
 		goto error;
 	}
 	INFO("%u port(s) detected", device_attr.phys_port_cnt);
 	conf.ports.present |= (UINT64_C(1) << device_attr.phys_port_cnt) - 1;
 	if (mlx4_args(pci_dev->device.devargs, &conf)) {
 		ERROR("failed to process device arguments");
-		rte_errno = EINVAL;
+		err = EINVAL;
 		goto error;
 	}
 	/* Use all ports when none are defined */
@@ -590,7 +590,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 		conf.ports.enabled = conf.ports.present;
 	/* Retrieve extended device attributes. */
 	if (mlx4_glue->query_device_ex(attr_ctx, NULL, &device_attr_ex)) {
-		rte_errno = ENODEV;
+		err = ENODEV;
 		goto error;
 	}
 	assert(device_attr.max_sge >= MLX4_MAX_SGE);
@@ -609,18 +609,18 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 		DEBUG("using port %u", port);
 		ctx = mlx4_glue->open_device(ibv_dev);
 		if (ctx == NULL) {
-			rte_errno = ENODEV;
+			err = ENODEV;
 			goto port_error;
 		}
 		/* Check port status. */
 		err = mlx4_glue->query_port(ctx, port, &port_attr);
 		if (err) {
-			rte_errno = err;
-			ERROR("port query failed: %s", strerror(rte_errno));
+			err = ENODEV;
+			ERROR("port query failed: %s", strerror(err));
 			goto port_error;
 		}
 		if (port_attr.link_layer != IBV_LINK_LAYER_ETHERNET) {
-			rte_errno = ENOTSUP;
+			err = ENOTSUP;
 			ERROR("port %d is not configured in Ethernet mode",
 			      port);
 			goto port_error;
@@ -630,15 +630,16 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 			      port, mlx4_glue->port_state_str(port_attr.state),
 			      port_attr.state);
 		/* Make asynchronous FD non-blocking to handle interrupts. */
-		if (mlx4_fd_set_non_blocking(ctx->async_fd) < 0) {
+		err = mlx4_fd_set_non_blocking(ctx->async_fd);
+		if (err) {
 			ERROR("cannot make asynchronous FD non-blocking: %s",
-			      strerror(rte_errno));
+			      strerror(err));
 			goto port_error;
 		}
 		/* Allocate protection domain. */
 		pd = mlx4_glue->alloc_pd(ctx);
 		if (pd == NULL) {
-			rte_errno = ENOMEM;
+			err = ENOMEM;
 			ERROR("PD allocation failure");
 			goto port_error;
 		}
@@ -647,7 +648,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 				   sizeof(*priv),
 				   RTE_CACHE_LINE_SIZE);
 		if (priv == NULL) {
-			rte_errno = ENOMEM;
+			err = ENOMEM;
 			ERROR("priv allocation failure");
 			goto port_error;
 		}
@@ -677,9 +678,10 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 		DEBUG("FCS stripping toggling is %ssupported",
 		      priv->hw_fcs_strip ? "" : "not ");
 		/* Configure the first MAC address by default. */
-		if (mlx4_get_mac(priv, &mac.addr_bytes)) {
+		err = mlx4_get_mac(priv, &mac.addr_bytes);
+		if (err) {
 			ERROR("cannot get MAC address, is mlx4_en loaded?"
-			      " (rte_errno: %s)", strerror(rte_errno));
+			      " (error: %s)", strerror(err));
 			goto port_error;
 		}
 		INFO("port %u MAC address is %02x:%02x:%02x:%02x:%02x:%02x",
@@ -712,8 +714,8 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 			eth_dev = rte_eth_dev_allocate(name);
 		}
 		if (eth_dev == NULL) {
+			err = ENOMEM;
 			ERROR("can not allocate rte ethdev");
-			rte_errno = ENOMEM;
 			goto port_error;
 		}
 		eth_dev->data->dev_private = priv;
@@ -776,8 +778,6 @@ port_error:
 			rte_eth_dev_release_port(eth_dev);
 		break;
 	}
-	if (i == device_attr.phys_port_cnt)
-		return 0;
 	/*
 	 * XXX if something went wrong in the loop above, there is a resource
 	 * leak (ctx, pd, priv, dpdk ethdev) but we can do nothing about it as
@@ -789,8 +789,9 @@ error:
 		claim_zero(mlx4_glue->close_device(attr_ctx));
 	if (list)
 		mlx4_glue->free_device_list(list);
-	assert(rte_errno >= 0);
-	return -rte_errno;
+	if (err)
+		rte_errno = err;
+	return -err;
 }
 
 static const struct rte_pci_id mlx4_pci_id_map[] = {
-- 
2.17.1

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

* [dpdk-stable] patch 'net/mlx5: fix errno object in probe function' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (17 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx4: fix minor resource leak during init' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix missing errno " Christian Ehrhardt
                   ` (156 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Adrien Mazarguil; +Cc: Yongseok Koh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 6be5557ae1b1352154d7833c931c9a5e47b70aa0 Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Date: Thu, 24 May 2018 14:17:55 +0200
Subject: [PATCH] net/mlx5: fix errno object in probe function

[ upstream commit 8c3c2372ed304834609521cc96194fc0a41ce06a ]

Fixes: a6d83b6a9209 ("net/mlx5: standardize on negative errno values")

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

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index c933e274f..e4e32cb36 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1109,7 +1109,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 			DRV_LOG(ERR,
 				"port %u cannot get MAC address, is mlx5_en"
 				" loaded? (errno: %s)",
-				eth_dev->data->port_id, strerror(errno));
+				eth_dev->data->port_id, strerror(rte_errno));
 			err = ENODEV;
 			goto port_error;
 		}
-- 
2.17.1

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

* [dpdk-stable] patch 'net/mlx5: fix missing errno in probe function' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (18 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix errno object in probe function' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix error message " Christian Ehrhardt
                   ` (155 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Adrien Mazarguil; +Cc: Yongseok Koh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From fe665e11846027231e34c941ddc9cd0f987844cd Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Date: Thu, 24 May 2018 14:17:57 +0200
Subject: [PATCH] net/mlx5: fix missing errno in probe function

[ upstream commit c6ce7e34ad5e970e91ffd0c9e484d89bef55f70e ]

Fixes: b43802b4bdfe ("net/mlx5: support 16 hardware priorities")

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

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index e4e32cb36..d95b3ea39 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1192,6 +1192,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 		if (verb_priorities < MLX5_VERBS_FLOW_PRIO_8) {
 			DRV_LOG(ERR, "port %u wrong Verbs flow priorities: %u",
 				eth_dev->data->port_id, verb_priorities);
+			err = ENOTSUP;
 			goto port_error;
 		}
 		priv->config.max_verbs_prio = verb_priorities;
-- 
2.17.1

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

* [dpdk-stable] patch 'net/mlx5: fix error message in probe function' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (19 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix missing errno " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix crash in device probe' " Christian Ehrhardt
                   ` (154 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Adrien Mazarguil; +Cc: Yongseok Koh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 8fc490566da3046e81b1922cc34bfac2109203b6 Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Date: Fri, 25 May 2018 18:15:36 +0200
Subject: [PATCH] net/mlx5: fix error message in probe function

[ upstream commit 93068a9d5ad819f36a72086db2d73d0042e3852c ]

Error values passed to strerror() must be positive.

Fixes: 012ad9944dfc ("net/mlx5: fix probe return value polarity")

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

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index d95b3ea39..8680e480a 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1002,9 +1002,9 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 		priv->mtu = ETHER_MTU;
 		err = mlx5_args(&config, pci_dev->device.devargs);
 		if (err) {
-			DRV_LOG(ERR, "failed to process device arguments: %s",
-				strerror(err));
 			err = rte_errno;
+			DRV_LOG(ERR, "failed to process device arguments: %s",
+				strerror(rte_errno));
 			goto port_error;
 		}
 		err = mlx5_glue->query_device_ex(ctx, NULL, &device_attr_ex);
-- 
2.17.1

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

* [dpdk-stable] patch 'net/mlx5: fix crash in device probe' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (20 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix error message " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix log initialization' " Christian Ehrhardt
                   ` (153 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Xueming Li; +Cc: Adrien Mazarguil, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From bcb0a5926b1a948332050a3179e99951f7399491 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@mellanox.com>
Date: Tue, 12 Jun 2018 19:38:11 +0800
Subject: [PATCH] net/mlx5: fix crash in device probe

[ upstream commit a9fc0b0ef0c276fcea082b20574e27cca1bac3e8 ]

This patch initializes counter descriptor struct before invoking Verbs
api to avoid segmentation fault.

Fixes: 9a761de8ea14 ("net/mlx5: flow counter support")

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 drivers/net/mlx5/mlx5.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 8680e480a..c7e4b3bf1 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -706,7 +706,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	int i;
 	struct mlx5dv_context attrs_out = {0};
 #ifdef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT
-	struct ibv_counter_set_description cs_desc;
+	struct ibv_counter_set_description cs_desc = { .counter_type = 0 };
 #endif
 
 	/* Prepare shared data between primary and secondary process. */
-- 
2.17.1

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

* [dpdk-stable] patch 'net/mlx5: fix log initialization' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (21 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix crash in device probe' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'eventdev: fix port in Rx adapter internal function' " Christian Ehrhardt
                   ` (152 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Nelio Laranjeiro, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 2dde8975ee5851780a7711db5c77cb0583f8adbc Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 13 Jun 2018 11:46:26 -0700
Subject: [PATCH] net/mlx5: fix log initialization

[ upstream commit 3d96644aa3af431ed881b900971b8228e93889a9 ]

The mlx5 driver had two init functions, but this could
cause log initialization to be done after the
other initialization. Also, the name of the function does
not match convention (cut/paste error?).

Fix by initializing log type first at start of the pmd_init.
This also gets rid of having two constructor functions.

Fixes: a170a30d22a8 ("net/mlx5: use dynamic logging")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx5/mlx5.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index c7e4b3bf1..bd2a5b9c1 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1440,6 +1440,11 @@ RTE_INIT(rte_mlx5_pmd_init);
 static void
 rte_mlx5_pmd_init(void)
 {
+	/* Initialize driver log type. */
+	mlx5_logtype = rte_log_register("pmd.net.mlx5");
+	if (mlx5_logtype >= 0)
+		rte_log_set_level(mlx5_logtype, RTE_LOG_NOTICE);
+
 	/* Build the static tables for Verbs conversion. */
 	mlx5_set_ptype_table();
 	mlx5_set_cksum_table();
@@ -1481,11 +1486,3 @@ rte_mlx5_pmd_init(void)
 RTE_PMD_EXPORT_NAME(net_mlx5, __COUNTER__);
 RTE_PMD_REGISTER_PCI_TABLE(net_mlx5, mlx5_pci_id_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_mlx5, "* ib_uverbs & mlx5_core & mlx5_ib");
-
-/** Initialize driver log type. */
-RTE_INIT(vdev_netvsc_init_log)
-{
-	mlx5_logtype = rte_log_register("pmd.net.mlx5");
-	if (mlx5_logtype >= 0)
-		rte_log_set_level(mlx5_logtype, RTE_LOG_NOTICE);
-}
-- 
2.17.1

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

* [dpdk-stable] patch 'eventdev: fix port in Rx adapter internal function' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (22 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix log initialization' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'doc: fix octeontx eventdev selftest argument' " Christian Ehrhardt
                   ` (151 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Nikhil Rao; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 8a40eb893faf4eec4b2fdf8acb7750f81e97a529 Mon Sep 17 00:00:00 2001
From: Nikhil Rao <nikhil.rao@intel.com>
Date: Wed, 23 May 2018 02:36:42 +0530
Subject: [PATCH] eventdev: fix port in Rx adapter internal function

[ upstream commit d89fd4cd132720fea1d9497a375d50489e7dd0b7 ]

The dev_id parameter to fill_event_buffer() should be 16 bit,
also rename to to eth_dev_id to avoid confusion with event device
id elsewhere in the file.

Fixes: c2189c907dd1 ("eventdev: make ethdev port identifiers 16-bit")

Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 lib/librte_eventdev/rte_event_eth_rx_adapter.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
index 6f7050952..273df1e9b 100644
--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
@@ -418,14 +418,14 @@ flush_event_buffer(struct rte_event_eth_rx_adapter *rx_adapter)
 
 static inline void
 fill_event_buffer(struct rte_event_eth_rx_adapter *rx_adapter,
-	uint8_t dev_id,
+	uint16_t eth_dev_id,
 	uint16_t rx_queue_id,
 	struct rte_mbuf **mbufs,
 	uint16_t num)
 {
 	uint32_t i;
 	struct eth_device_info *eth_device_info =
-					&rx_adapter->eth_devices[dev_id];
+					&rx_adapter->eth_devices[eth_dev_id];
 	struct eth_rx_queue_info *eth_rx_queue_info =
 					&eth_device_info->rx_queue[rx_queue_id];
 
-- 
2.17.1

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

* [dpdk-stable] patch 'doc: fix octeontx eventdev selftest argument' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (23 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'eventdev: fix port in Rx adapter internal function' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'eventdev: fix missing update to Rx adaper WRR position' " Christian Ehrhardt
                   ` (150 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Pavan Nikhilesh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From bc3439dba02f44f470eb64797e54b9afa016c738 Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Date: Fri, 8 Jun 2018 09:02:27 +0530
Subject: [PATCH] doc: fix octeontx eventdev selftest argument

[ upstream commit 3b8bcfcd96e64d199392550928be7c7665571bcb ]

Fixes: 3516327e00fd ("event/octeontx: add selftest to device arguments")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 doc/guides/eventdevs/octeontx.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/eventdevs/octeontx.rst b/doc/guides/eventdevs/octeontx.rst
index 3dcf6afbd..18cfc7a9a 100644
--- a/doc/guides/eventdevs/octeontx.rst
+++ b/doc/guides/eventdevs/octeontx.rst
@@ -96,7 +96,7 @@ The tests are run once the vdev creation is successfully complete.
 
 .. code-block:: console
 
-    --vdev="event_octeontx,self_test=1"
+    --vdev="event_octeontx,selftest=1"
 
 
 Enable TIMvf stats
-- 
2.17.1

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

* [dpdk-stable] patch 'eventdev: fix missing update to Rx adaper WRR position' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (24 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'doc: fix octeontx eventdev selftest argument' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'eventdev: add event buffer flush in Rx adapter' " Christian Ehrhardt
                   ` (149 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Nikhil Rao; +Cc: Gage Eads, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 66e5fab928144d379fef72b689b8125d8bfee631 Mon Sep 17 00:00:00 2001
From: Nikhil Rao <nikhil.rao@intel.com>
Date: Sun, 3 Jun 2018 17:11:08 +0530
Subject: [PATCH] eventdev: fix missing update to Rx adaper WRR position

[ upstream commit 524dc20023b2e00cd9a021ae60cb4b91f51786e6 ]

After dequeuing Rx packets and enqueueing them to the
temporary buffer towards eventdev, the packet Rx loop exits
if the temporary buffer is full but the current WRR position
is not saved.

Save away the current value of the WRR position, so packets
are dequeued from the correct Rx queue in the next invocation.

Fixes: 9c38b704d280 ("eventdev: add eth Rx adapter implementation")

Suggested-by: Gage Eads <gage.eads@intel.com>
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
---
 lib/librte_eventdev/rte_event_eth_rx_adapter.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
index 273df1e9b..c2b5d4d83 100644
--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
@@ -517,8 +517,10 @@ eth_rx_poll(struct rte_event_eth_rx_adapter *rx_adapter)
 		 */
 		if (buf->count >= BATCH_SIZE)
 			flush_event_buffer(rx_adapter);
-		if (BATCH_SIZE > (ETH_EVENT_BUFFER_SIZE - buf->count))
+		if (BATCH_SIZE > (ETH_EVENT_BUFFER_SIZE - buf->count)) {
+			rx_adapter->wrr_pos = wrr_pos;
 			break;
+		}
 
 		stats->rx_poll_count++;
 		n = rte_eth_rx_burst(d, qid, mbufs, BATCH_SIZE);
-- 
2.17.1

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

* [dpdk-stable] patch 'eventdev: add event buffer flush in Rx adapter' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (25 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'eventdev: fix missing update to Rx adaper WRR position' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'eventdev: fix internal port logic " Christian Ehrhardt
                   ` (148 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Nikhil Rao; +Cc: Narender Vangati, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 097bf6945489849486acb73bd1606c0824d9e746 Mon Sep 17 00:00:00 2001
From: Nikhil Rao <nikhil.rao@intel.com>
Date: Sun, 3 Jun 2018 18:12:25 +0530
Subject: [PATCH] eventdev: add event buffer flush in Rx adapter

[ upstream commit 6b83f59355437c0631a64e5ecb9f080c17a8ba24 ]

Add an event buffer flush when the current invocation
of the Rx adapter is completed.

This patch provides lower latency in case there is a
BATCH_SIZE of events in the event buffer.

Suggested-by: Narender Vangati <narender.vangati@intel.com>
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 lib/librte_eventdev/rte_event_eth_rx_adapter.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
index c2b5d4d83..e353424ce 100644
--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
@@ -490,7 +490,7 @@ fill_event_buffer(struct rte_event_eth_rx_adapter *rx_adapter,
  * the hypervisor's switching layer where adjustments can be made to deal with
  * it.
  */
-static inline uint32_t
+static inline void
 eth_rx_poll(struct rte_event_eth_rx_adapter *rx_adapter)
 {
 	uint32_t num_queue;
@@ -519,7 +519,7 @@ eth_rx_poll(struct rte_event_eth_rx_adapter *rx_adapter)
 			flush_event_buffer(rx_adapter);
 		if (BATCH_SIZE > (ETH_EVENT_BUFFER_SIZE - buf->count)) {
 			rx_adapter->wrr_pos = wrr_pos;
-			break;
+			return;
 		}
 
 		stats->rx_poll_count++;
@@ -535,7 +535,7 @@ eth_rx_poll(struct rte_event_eth_rx_adapter *rx_adapter)
 			if (nb_rx > max_nb_rx) {
 				rx_adapter->wrr_pos =
 				    (wrr_pos + 1) % rx_adapter->wrr_len;
-				return nb_rx;
+				break;
 			}
 		}
 
@@ -543,20 +543,18 @@ eth_rx_poll(struct rte_event_eth_rx_adapter *rx_adapter)
 			wrr_pos = 0;
 	}
 
-	return nb_rx;
+	if (buf->count >= BATCH_SIZE)
+		flush_event_buffer(rx_adapter);
 }
 
 static int
 event_eth_rx_adapter_service_func(void *args)
 {
 	struct rte_event_eth_rx_adapter *rx_adapter = args;
-	struct rte_eth_event_enqueue_buffer *buf;
 
-	buf = &rx_adapter->event_enqueue_buffer;
 	if (rte_spinlock_trylock(&rx_adapter->rx_lock) == 0)
 		return 0;
-	if (eth_rx_poll(rx_adapter) == 0 && buf->count)
-		flush_event_buffer(rx_adapter);
+	eth_rx_poll(rx_adapter);
 	rte_spinlock_unlock(&rx_adapter->rx_lock);
 	return 0;
 }
-- 
2.17.1

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

* [dpdk-stable] patch 'eventdev: fix internal port logic in Rx adapter' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (26 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'eventdev: add event buffer flush in Rx adapter' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'eventdev: fix Rx SW adapter stop' " Christian Ehrhardt
                   ` (147 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Nikhil Rao; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 7200a549415f5137c80fb3ea1ac2e5b60d592a35 Mon Sep 17 00:00:00 2001
From: Nikhil Rao <nikhil.rao@intel.com>
Date: Sun, 3 Jun 2018 19:40:46 +0530
Subject: [PATCH] eventdev: fix internal port logic in Rx adapter

[ upstream commit d411c4074fe6d90b695f9d9c4982b8c45f2a675d ]

Set the internal_event_port flag when the ethdev-eventdev
packet transfer is implemented in hardware and add a check
for the flag to ignore the connection when setting up the
WRR polling sequence.

Fixes: 9c38b704d280 ("eventdev: add eth Rx adapter implementation")

Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 lib/librte_eventdev/rte_event_eth_rx_adapter.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
index e353424ce..ad174ac07 100644
--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
@@ -224,6 +224,8 @@ eth_poll_wrr_calc(struct rte_event_eth_rx_adapter *rx_adapter)
 			nb_rx_queues = dev_info->dev->data->nb_rx_queues;
 			if (dev_info->rx_queue == NULL)
 				continue;
+			if (dev_info->internal_event_port)
+				continue;
 			for (q = 0; q < nb_rx_queues; q++) {
 				struct eth_rx_queue_info *queue_info =
 					&dev_info->rx_queue[q];
@@ -1050,6 +1052,7 @@ rte_event_eth_rx_adapter_queue_add(uint8_t id,
 				&rte_eth_devices[eth_dev_id],
 				rx_queue_id, queue_conf);
 		if (ret == 0) {
+			dev_info->internal_event_port = 1;
 			update_queue_info(rx_adapter,
 					&rx_adapter->eth_devices[eth_dev_id],
 					rx_queue_id,
@@ -1057,6 +1060,7 @@ rte_event_eth_rx_adapter_queue_add(uint8_t id,
 		}
 	} else {
 		rte_spinlock_lock(&rx_adapter->rx_lock);
+		dev_info->internal_event_port = 0;
 		ret = init_service(rx_adapter, id);
 		if (ret == 0)
 			ret = add_rx_queue(rx_adapter, eth_dev_id, rx_queue_id,
-- 
2.17.1

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

* [dpdk-stable] patch 'eventdev: fix Rx SW adapter stop' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (27 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'eventdev: fix internal port logic " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'bus/dpaa: fix build' " Christian Ehrhardt
                   ` (146 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Nikhil Rao; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From a4238669685893a8b6e8039150c97344ad336cf6 Mon Sep 17 00:00:00 2001
From: Nikhil Rao <nikhil.rao@intel.com>
Date: Mon, 4 Jun 2018 18:25:17 +0530
Subject: [PATCH] eventdev: fix Rx SW adapter stop

[ upstream commit a66a83744667f31ee97e18eefa90105c462ed81b ]

The Rx adapter stop call does not guarantee that the
SW service function will not execute after the
rte_event_eth_rx_adapter_stop() call.

Add a "started" flag to prevent the adapter from executing
if stop has been called.

Fixes: 9c38b704d280 ("eventdev: add eth Rx adapter implementation")

Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
---
 lib/librte_eventdev/rte_event_eth_rx_adapter.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
index ad174ac07..ce1f62db7 100644
--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
@@ -91,6 +91,8 @@ struct rte_event_eth_rx_adapter {
 	int socket_id;
 	/* Per adapter EAL service */
 	uint32_t service_id;
+	/* Adapter started flag */
+	uint8_t rxa_started;
 } __rte_cache_aligned;
 
 /* Per eth device */
@@ -556,6 +558,10 @@ event_eth_rx_adapter_service_func(void *args)
 
 	if (rte_spinlock_trylock(&rx_adapter->rx_lock) == 0)
 		return 0;
+	if (!rx_adapter->rxa_started) {
+		return 0;
+		rte_spinlock_unlock(&rx_adapter->rx_lock);
+	}
 	eth_rx_poll(rx_adapter);
 	rte_spinlock_unlock(&rx_adapter->rx_lock);
 	return 0;
@@ -847,8 +853,12 @@ rx_adapter_ctrl(uint8_t id, int start)
 						&rte_eth_devices[i]);
 	}
 
-	if (use_service)
+	if (use_service) {
+		rte_spinlock_lock(&rx_adapter->rx_lock);
+		rx_adapter->rxa_started = start;
 		rte_service_runstate_set(rx_adapter->service_id, start);
+		rte_spinlock_unlock(&rx_adapter->rx_lock);
+	}
 
 	return 0;
 }
-- 
2.17.1

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

* [dpdk-stable] patch 'bus/dpaa: fix build' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (28 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'eventdev: fix Rx SW adapter stop' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'kni: fix build with gcc 8.1' " Christian Ehrhardt
                   ` (145 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Shreyansh Jain, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From da8a90991927cf183d66930e0d649e59e6ab59fd Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 20 Jun 2018 12:38:06 +0200
Subject: [PATCH] bus/dpaa: fix build

[ upstream commit ce819b84220ef4abe87cccc71c78e7f4bc7a2f8b ]

The DPAA bus driver is defining some macros without prefix.
So it can conflict with other libraries like libbsd:

	drivers/bus/dpaa/include/compat.h:53:
		error: "__packed" redefined
	/usr/include/bsd/sys/cdefs.h:120:
		note: this is the location of the previous definition

Fixes: 39f373cf015a ("bus/dpaa: add compatibility and helper macros")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 drivers/bus/dpaa/include/compat.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/bus/dpaa/include/compat.h b/drivers/bus/dpaa/include/compat.h
index e4b570214..92241d231 100644
--- a/drivers/bus/dpaa/include/compat.h
+++ b/drivers/bus/dpaa/include/compat.h
@@ -48,9 +48,15 @@
  */
 
 /* Required compiler attributes */
+#ifndef __maybe_unused
 #define __maybe_unused	__rte_unused
+#endif
+#ifndef __always_unused
 #define __always_unused	__rte_unused
+#endif
+#ifndef __packed
 #define __packed	__rte_packed
+#endif
 #define noinline	__attribute__((noinline))
 
 #define L1_CACHE_BYTES 64
-- 
2.17.1

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

* [dpdk-stable] patch 'kni: fix build with gcc 8.1' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (29 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'bus/dpaa: fix build' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net: rename u16 to fix shadowed declaration' " Christian Ehrhardt
                   ` (144 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From fb10c87180eec0a72792150d8d4db9c224e9c613 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 26 Jun 2018 12:38:07 +0100
Subject: [PATCH] kni: fix build with gcc 8.1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit a36b40dd8ecfb61648045e418551f75055ca77f9 ]

Error observed when CONFIG_RTE_KNI_KMOD_ETHTOOL config option is
enabled.

build error:
In function ‘strncpy’,
    inlined from ‘igb_get_drvinfo’ at
    kernel/linux/kni/igb_ethtool.c:814:2:
    include/linux/string.h:246:9: error: ‘__builtin_strncpy’ output
    may be truncated copying 31 bytes from a string of length 42
    [-Werror=stringop-truncation]
      return __builtin_strncpy(p, q, size);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixed by using strlcpy instead of strncpy.

adapter->fw_version size kept same because of
c3698192940c ("kni: fix build with gcc 7.1")

Also next line strncpy usage replaced with strlcpy while arround.

Fixes: c3698192940c ("kni: fix build with gcc 7.1")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 kernel/linux/kni/ethtool/igb/igb_ethtool.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/kernel/linux/kni/ethtool/igb/igb_ethtool.c b/kernel/linux/kni/ethtool/igb/igb_ethtool.c
index 064528bcf..002f75c48 100644
--- a/kernel/linux/kni/ethtool/igb/igb_ethtool.c
+++ b/kernel/linux/kni/ethtool/igb/igb_ethtool.c
@@ -811,9 +811,10 @@ static void igb_get_drvinfo(struct net_device *netdev,
 	strncpy(drvinfo->driver,  igb_driver_name, sizeof(drvinfo->driver) - 1);
 	strncpy(drvinfo->version, igb_driver_version, sizeof(drvinfo->version) - 1);
 
-	strncpy(drvinfo->fw_version, adapter->fw_version,
-		sizeof(drvinfo->fw_version) - 1);
-	strncpy(drvinfo->bus_info, pci_name(adapter->pdev), sizeof(drvinfo->bus_info) -1);
+	strlcpy(drvinfo->fw_version, adapter->fw_version,
+		sizeof(drvinfo->fw_version));
+	strlcpy(drvinfo->bus_info, pci_name(adapter->pdev),
+		sizeof(drvinfo->bus_info));
 	drvinfo->n_stats = IGB_STATS_LEN;
 	drvinfo->testinfo_len = IGB_TEST_LEN;
 	drvinfo->regdump_len = igb_get_regs_len(netdev);
-- 
2.17.1

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

* [dpdk-stable] patch 'net: rename u16 to fix shadowed declaration' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (30 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'kni: fix build with gcc 8.1' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'cryptodev: fix ABI breakage' " Christian Ehrhardt
                   ` (143 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Gage Eads; +Cc: Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 2f486308a10e205f3151af79a44e05289921a9b4 Mon Sep 17 00:00:00 2001
From: Gage Eads <gage.eads@intel.com>
Date: Mon, 4 Jun 2018 14:40:00 -0500
Subject: [PATCH] net: rename u16 to fix shadowed declaration

[ upstream commit 68248ad1b9a8a5e84611346b699dd5d4f1bbe37d ]

This patch renames u16 to u16_buf. u16 as a variable name causes a shadowed
declaration warning if, for example, the application also typedefs u16
(e.g. by including a header containing "typedef unsigned short u16") and
the application is built with -Wshadow.

Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_net/rte_ip.h | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
index 72dc2456a..f2a8904a2 100644
--- a/lib/librte_net/rte_ip.h
+++ b/lib/librte_net/rte_ip.h
@@ -108,25 +108,25 @@ __rte_raw_cksum(const void *buf, size_t len, uint32_t sum)
 	/* workaround gcc strict-aliasing warning */
 	uintptr_t ptr = (uintptr_t)buf;
 	typedef uint16_t __attribute__((__may_alias__)) u16_p;
-	const u16_p *u16 = (const u16_p *)ptr;
-
-	while (len >= (sizeof(*u16) * 4)) {
-		sum += u16[0];
-		sum += u16[1];
-		sum += u16[2];
-		sum += u16[3];
-		len -= sizeof(*u16) * 4;
-		u16 += 4;
+	const u16_p *u16_buf = (const u16_p *)ptr;
+
+	while (len >= (sizeof(*u16_buf) * 4)) {
+		sum += u16_buf[0];
+		sum += u16_buf[1];
+		sum += u16_buf[2];
+		sum += u16_buf[3];
+		len -= sizeof(*u16_buf) * 4;
+		u16_buf += 4;
 	}
-	while (len >= sizeof(*u16)) {
-		sum += *u16;
-		len -= sizeof(*u16);
-		u16 += 1;
+	while (len >= sizeof(*u16_buf)) {
+		sum += *u16_buf;
+		len -= sizeof(*u16_buf);
+		u16_buf += 1;
 	}
 
 	/* if length is in odd bytes */
 	if (len == 1)
-		sum += *((const uint8_t *)u16);
+		sum += *((const uint8_t *)u16_buf);
 
 	return sum;
 }
-- 
2.17.1

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

* [dpdk-stable] patch 'cryptodev: fix ABI breakage' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (31 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net: rename u16 to fix shadowed declaration' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-31  4:57   ` Gujjar, Abhinandan S
  2018-07-30 16:11 ` [dpdk-stable] patch 'ipc: fix locking while sending messages' " Christian Ehrhardt
                   ` (142 subsequent siblings)
  175 siblings, 1 reply; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Konstantin Ananyev, Abhinandan Gujjar, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 58a40173c60e142288bb3ab2447b29254cc2a733 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Wed, 13 Jun 2018 10:36:48 +0100
Subject: [PATCH] cryptodev: fix ABI breakage

[ upstream commit ce5e6bf69eb32d5ea1d95e2a623f8f9d284a806d ]

In 17.08, the crypto operation was restructured,
and some reserved bytes (5) were added  to have the mempool
pointer aligned to 64 bits, since the structure is expected
to be aligned to 64 bits, allowing future additions with no
ABI breakage needed.

In 18.05, a new 2-byte field was added, so the reserved bytes
were reduced to 3. However, this field was added after the first 3 bytes
of the structure, causing it to be placed in an offset of 4 bytes,
and therefore, forcing the mempool pointer to be placed after 16 bytes,
instead of a 8 bytes, causing unintentionally the ABI breakage.

This commit fixes the breakage, by swapping the reserved bytes
and the private_data_offset field, so the latter is aligned to 2 bytes
and the offset of the mempool pointer returns to its original offset,
8 bytes.

Fixes: 54c836846603 ("cryptodev: set private data for session-less mode")

Reported-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
 lib/librte_cryptodev/rte_crypto.h | 51 +++++++++++++++++++------------
 1 file changed, 31 insertions(+), 20 deletions(-)

diff --git a/lib/librte_cryptodev/rte_crypto.h b/lib/librte_cryptodev/rte_crypto.h
index 25404264b..a16be656d 100644
--- a/lib/librte_cryptodev/rte_crypto.h
+++ b/lib/librte_cryptodev/rte_crypto.h
@@ -73,26 +73,37 @@ enum rte_crypto_op_sess_type {
  * rte_cryptodev_enqueue_burst() / rte_cryptodev_dequeue_burst() .
  */
 struct rte_crypto_op {
-	uint8_t type;
-	/**< operation type */
-	uint8_t status;
-	/**<
-	 * operation status - this is reset to
-	 * RTE_CRYPTO_OP_STATUS_NOT_PROCESSED on allocation from mempool and
-	 * will be set to RTE_CRYPTO_OP_STATUS_SUCCESS after crypto operation
-	 * is successfully processed by a crypto PMD
-	 */
-	uint8_t sess_type;
-	/**< operation session type */
-	uint16_t private_data_offset;
-	/**< Offset to indicate start of private data (if any). The offset
-	 * is counted from the start of the rte_crypto_op including IV.
-	 * The private data may be used by the application to store
-	 * information which should remain untouched in the library/driver
-	 */
-
-	uint8_t reserved[3];
-	/**< Reserved bytes to fill 64 bits for future additions */
+	__extension__
+	union {
+		uint64_t raw;
+		__extension__
+		struct {
+			uint8_t type;
+			/**< operation type */
+			uint8_t status;
+			/**<
+			 * operation status - this is reset to
+			 * RTE_CRYPTO_OP_STATUS_NOT_PROCESSED on allocation
+			 * from mempool and will be set to
+			 * RTE_CRYPTO_OP_STATUS_SUCCESS after crypto operation
+			 * is successfully processed by a crypto PMD
+			 */
+			uint8_t sess_type;
+			/**< operation session type */
+			uint8_t reserved[3];
+			/**< Reserved bytes to fill 64 bits for
+			 * future additions
+			 */
+			uint16_t private_data_offset;
+			/**< Offset to indicate start of private data (if any).
+			 * The offset is counted from the start of the
+			 * rte_crypto_op including IV.
+			 * The private data may be used by the application
+			 * to store information which should remain untouched
+			 * in the library/driver
+			 */
+		};
+	};
 	struct rte_mempool *mempool;
 	/**< crypto operation mempool which operation is allocated from */
 
-- 
2.17.1

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

* [dpdk-stable] patch 'ipc: fix locking while sending messages' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (32 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'cryptodev: fix ABI breakage' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: clean-up developer logs' " Christian Ehrhardt
                   ` (141 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 27fdec7f7575c83d08c7765916f449676a66f0b3 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Wed, 27 Jun 2018 10:44:25 +0100
Subject: [PATCH] ipc: fix locking while sending messages

[ upstream commit 53fd532e3961092b51c536fc6760ad91c6e4bb93 ]

Previously, we were putting an exclusive lock to prevent secondary
processes spinning up while we are sending our messages. However,
using exclusive locks had an effect of disallowing multiple
simultaenous unrelated messages/requests being sent, which was
not the intention behind locking.

Fix it to put a shared lock on the directory. That way, we still
prevent secondary process initializations while sending data over
IPC, but allow multiple unrelated transmissions to proceed.

Fixes: 89f1fe7e6d95 ("eal: lock IPC directory on init and send")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Qi Zhang <qi.z.zhang@intel.com>
---
 lib/librte_eal/common/eal_common_proc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c
index 707d8ab30..f010ef59e 100644
--- a/lib/librte_eal/common/eal_common_proc.c
+++ b/lib/librte_eal/common/eal_common_proc.c
@@ -786,7 +786,7 @@ mp_send(struct rte_mp_msg *msg, const char *peer, int type)
 
 	dir_fd = dirfd(mp_dir);
 	/* lock the directory to prevent processes spinning up while we send */
-	if (flock(dir_fd, LOCK_EX)) {
+	if (flock(dir_fd, LOCK_SH)) {
 		RTE_LOG(ERR, EAL, "Unable to lock directory %s\n",
 			mp_dir_path);
 		rte_errno = errno;
@@ -1020,7 +1020,7 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,
 
 	dir_fd = dirfd(mp_dir);
 	/* lock the directory to prevent processes spinning up while we send */
-	if (flock(dir_fd, LOCK_EX)) {
+	if (flock(dir_fd, LOCK_SH)) {
 		RTE_LOG(ERR, EAL, "Unable to lock directory %s\n",
 			mp_dir_path);
 		closedir(mp_dir);
@@ -1146,7 +1146,7 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
 	dir_fd = dirfd(mp_dir);
 
 	/* lock the directory to prevent processes spinning up while we send */
-	if (flock(dir_fd, LOCK_EX)) {
+	if (flock(dir_fd, LOCK_SH)) {
 		RTE_LOG(ERR, EAL, "Unable to lock directory %s\n",
 			mp_dir_path);
 		rte_errno = errno;
-- 
2.17.1

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

* [dpdk-stable] patch 'net/mlx5: clean-up developer logs' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (33 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'ipc: fix locking while sending messages' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix error number handling' " Christian Ehrhardt
                   ` (140 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Nelio Laranjeiro; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 20896e6635ec5d4d6687dcc08fdd14d30876419a Mon Sep 17 00:00:00 2001
From: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Date: Tue, 5 Jun 2018 10:45:22 +0200
Subject: [PATCH] net/mlx5: clean-up developer logs

[ upstream commit c44fbc7cc2fb6cf62956d6b5bb2c0206884ad568 ]

Split maintainers logs from user logs.

A lot of debug logs are present providing internal information on how
the PMD works to users.  Such logs should not be available for them and
thus should remain available only when the PMD is compiled in debug
mode.

This commits removes some useless debug logs, move the Maintainers ones
under DEBUG and also move dump into debug mode only.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx5/mlx5_mr.c      | 119 +++++++++++++++-----------------
 drivers/net/mlx5/mlx5_mr.h      |   5 +-
 drivers/net/mlx5/mlx5_rxq.c     |  56 +--------------
 drivers/net/mlx5/mlx5_trigger.c |   2 -
 drivers/net/mlx5/mlx5_txq.c     |  18 +----
 5 files changed, 62 insertions(+), 138 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_mr.c b/drivers/net/mlx5/mlx5_mr.c
index 08105a443..1d1bcb5fe 100644
--- a/drivers/net/mlx5/mlx5_mr.c
+++ b/drivers/net/mlx5/mlx5_mr.c
@@ -198,9 +198,8 @@ mlx5_mr_btree_init(struct mlx5_mr_btree *bt, int n, int socket)
 				      0, socket);
 	if (bt->table == NULL) {
 		rte_errno = ENOMEM;
-		DRV_LOG(ERR,
-			"failed to allocate memory for btree cache on socket %d",
-			socket);
+		DEBUG("failed to allocate memory for btree cache on socket %d",
+		      socket);
 		return -rte_errno;
 	}
 	bt->size = n;
@@ -208,8 +207,8 @@ mlx5_mr_btree_init(struct mlx5_mr_btree *bt, int n, int socket)
 	(*bt->table)[bt->len++] = (struct mlx5_mr_cache) {
 		.lkey = UINT32_MAX,
 	};
-	DRV_LOG(DEBUG, "initialized B-tree %p with table %p",
-		(void *)bt, (void *)bt->table);
+	DEBUG("initialized B-tree %p with table %p",
+	      (void *)bt, (void *)bt->table);
 	return 0;
 }
 
@@ -224,8 +223,8 @@ mlx5_mr_btree_free(struct mlx5_mr_btree *bt)
 {
 	if (bt == NULL)
 		return;
-	DRV_LOG(DEBUG, "freeing B-tree %p with table %p",
-		(void *)bt, (void *)bt->table);
+	DEBUG("freeing B-tree %p with table %p",
+	      (void *)bt, (void *)bt->table);
 	rte_free(bt->table);
 	memset(bt, 0, sizeof(*bt));
 }
@@ -236,9 +235,10 @@ mlx5_mr_btree_free(struct mlx5_mr_btree *bt)
  * @param bt
  *   Pointer to B-tree structure.
  */
-static void
-mlx5_mr_btree_dump(struct mlx5_mr_btree *bt)
+void
+mlx5_mr_btree_dump(struct mlx5_mr_btree *bt __rte_unused)
 {
+#ifndef NDEBUG
 	int idx;
 	struct mlx5_mr_cache *lkp_tbl;
 
@@ -248,11 +248,11 @@ mlx5_mr_btree_dump(struct mlx5_mr_btree *bt)
 	for (idx = 0; idx < bt->len; ++idx) {
 		struct mlx5_mr_cache *entry = &lkp_tbl[idx];
 
-		DRV_LOG(DEBUG,
-			"B-tree(%p)[%u],"
-			" [0x%" PRIxPTR ", 0x%" PRIxPTR ") lkey=0x%x",
-			(void *)bt, idx, entry->start, entry->end, entry->lkey);
+		DEBUG("B-tree(%p)[%u],"
+		      " [0x%" PRIxPTR ", 0x%" PRIxPTR ") lkey=0x%x",
+		      (void *)bt, idx, entry->start, entry->end, entry->lkey);
 	}
+#endif
 }
 
 /**
@@ -576,11 +576,10 @@ alloc_resources:
 	assert(msl->page_sz == ms->hugepage_sz);
 	/* Number of memsegs in the range. */
 	ms_n = len / msl->page_sz;
-	DRV_LOG(DEBUG,
-		"port %u extending %p to [0x%" PRIxPTR ", 0x%" PRIxPTR "),"
-		" page_sz=0x%" PRIx64 ", ms_n=%u",
-		dev->data->port_id, (void *)addr,
-		data.start, data.end, msl->page_sz, ms_n);
+	DEBUG("port %u extending %p to [0x%" PRIxPTR ", 0x%" PRIxPTR "),"
+	      " page_sz=0x%" PRIx64 ", ms_n=%u",
+	      dev->data->port_id, (void *)addr,
+	      data.start, data.end, msl->page_sz, ms_n);
 	/* Size of memory for bitmap. */
 	bmp_size = rte_bitmap_get_memory_footprint(ms_n);
 	mr = rte_zmalloc_socket(NULL,
@@ -589,10 +588,9 @@ alloc_resources:
 				bmp_size,
 				RTE_CACHE_LINE_SIZE, msl->socket_id);
 	if (mr == NULL) {
-		DRV_LOG(WARNING,
-			"port %u unable to allocate memory for a new MR of"
-			" address (%p).",
-			dev->data->port_id, (void *)addr);
+		DEBUG("port %u unable to allocate memory for a new MR of"
+		      " address (%p).",
+		      dev->data->port_id, (void *)addr);
 		rte_errno = ENOMEM;
 		goto err_nolock;
 	}
@@ -606,10 +604,9 @@ alloc_resources:
 	bmp_mem = RTE_PTR_ALIGN_CEIL(mr + 1, RTE_CACHE_LINE_SIZE);
 	mr->ms_bmp = rte_bitmap_init(ms_n, bmp_mem, bmp_size);
 	if (mr->ms_bmp == NULL) {
-		DRV_LOG(WARNING,
-			"port %u unable to initialize bitamp for a new MR of"
-			" address (%p).",
-			dev->data->port_id, (void *)addr);
+		DEBUG("port %u unable to initialize bitamp for a new MR of"
+		      " address (%p).",
+		      dev->data->port_id, (void *)addr);
 		rte_errno = EINVAL;
 		goto err_nolock;
 	}
@@ -625,11 +622,10 @@ alloc_resources:
 	data_re = data;
 	if (len > msl->page_sz &&
 	    !rte_memseg_contig_walk(mr_find_contig_memsegs_cb, &data_re)) {
-		DRV_LOG(WARNING,
-			"port %u unable to find virtually contiguous"
-			" chunk for address (%p)."
-			" rte_memseg_contig_walk() failed.",
-			dev->data->port_id, (void *)addr);
+		DEBUG("port %u unable to find virtually contiguous"
+		      " chunk for address (%p)."
+		      " rte_memseg_contig_walk() failed.",
+		      dev->data->port_id, (void *)addr);
 		rte_errno = ENXIO;
 		goto err_memlock;
 	}
@@ -657,9 +653,8 @@ alloc_resources:
 		 * here again.
 		 */
 		mr_btree_insert(&priv->mr.cache, entry);
-		DRV_LOG(DEBUG,
-			"port %u found MR for %p on final lookup, abort",
-			dev->data->port_id, (void *)addr);
+		DEBUG("port %u found MR for %p on final lookup, abort",
+		      dev->data->port_id, (void *)addr);
 		rte_rwlock_write_unlock(&priv->mr.rwlock);
 		rte_rwlock_read_unlock(&mcfg->memory_hotplug_lock);
 		/*
@@ -707,22 +702,20 @@ alloc_resources:
 	mr->ibv_mr = mlx5_glue->reg_mr(priv->pd, (void *)data.start, len,
 				       IBV_ACCESS_LOCAL_WRITE);
 	if (mr->ibv_mr == NULL) {
-		DRV_LOG(WARNING,
-			"port %u fail to create a verbs MR for address (%p)",
-			dev->data->port_id, (void *)addr);
+		DEBUG("port %u fail to create a verbs MR for address (%p)",
+		      dev->data->port_id, (void *)addr);
 		rte_errno = EINVAL;
 		goto err_mrlock;
 	}
 	assert((uintptr_t)mr->ibv_mr->addr == data.start);
 	assert(mr->ibv_mr->length == len);
 	LIST_INSERT_HEAD(&priv->mr.mr_list, mr, mr);
-	DRV_LOG(DEBUG,
-		"port %u MR CREATED (%p) for %p:\n"
-		"  [0x%" PRIxPTR ", 0x%" PRIxPTR "),"
-		" lkey=0x%x base_idx=%u ms_n=%u, ms_bmp_n=%u",
-		dev->data->port_id, (void *)mr, (void *)addr,
-		data.start, data.end, rte_cpu_to_be_32(mr->ibv_mr->lkey),
-		mr->ms_base_idx, mr->ms_n, mr->ms_bmp_n);
+	DEBUG("port %u MR CREATED (%p) for %p:\n"
+	      "  [0x%" PRIxPTR ", 0x%" PRIxPTR "),"
+	      " lkey=0x%x base_idx=%u ms_n=%u, ms_bmp_n=%u",
+	      dev->data->port_id, (void *)mr, (void *)addr,
+	      data.start, data.end, rte_cpu_to_be_32(mr->ibv_mr->lkey),
+	      mr->ms_base_idx, mr->ms_n, mr->ms_bmp_n);
 	/* Insert to the global cache table. */
 	mr_insert_dev_cache(dev, mr);
 	/* Fill in output data. */
@@ -797,8 +790,8 @@ mlx5_mr_mem_event_free_cb(struct rte_eth_dev *dev, const void *addr, size_t len)
 	int i;
 	int rebuild = 0;
 
-	DRV_LOG(DEBUG, "port %u free callback: addr=%p, len=%zu",
-		dev->data->port_id, addr, len);
+	DEBUG("port %u free callback: addr=%p, len=%zu",
+	      dev->data->port_id, addr, len);
 	msl = rte_mem_virt2memseg_list(addr);
 	/* addr and len must be page-aligned. */
 	assert((uintptr_t)addr == RTE_ALIGN((uintptr_t)addr, msl->page_sz));
@@ -825,14 +818,14 @@ mlx5_mr_mem_event_free_cb(struct rte_eth_dev *dev, const void *addr, size_t len)
 		pos = ms_idx - mr->ms_base_idx;
 		assert(rte_bitmap_get(mr->ms_bmp, pos));
 		assert(pos < mr->ms_bmp_n);
-		DRV_LOG(DEBUG, "port %u MR(%p): clear bitmap[%u] for addr %p",
-			dev->data->port_id, (void *)mr, pos, (void *)start);
+		DEBUG("port %u MR(%p): clear bitmap[%u] for addr %p",
+		      dev->data->port_id, (void *)mr, pos, (void *)start);
 		rte_bitmap_clear(mr->ms_bmp, pos);
 		if (--mr->ms_n == 0) {
 			LIST_REMOVE(mr, mr);
 			LIST_INSERT_HEAD(&priv->mr.mr_free_list, mr, mr);
-			DRV_LOG(DEBUG, "port %u remove MR(%p) from list",
-				dev->data->port_id, (void *)mr);
+			DEBUG("port %u remove MR(%p) from list",
+			      dev->data->port_id, (void *)mr);
 		}
 		/*
 		 * MR is fragmented or will be freed. the global cache must be
@@ -852,13 +845,11 @@ mlx5_mr_mem_event_free_cb(struct rte_eth_dev *dev, const void *addr, size_t len)
 		 * before the core sees the newly allocated memory.
 		 */
 		++priv->mr.dev_gen;
-		DRV_LOG(DEBUG, "broadcasting local cache flush, gen=%d",
-			priv->mr.dev_gen);
+		DEBUG("broadcasting local cache flush, gen=%d",
+		      priv->mr.dev_gen);
 		rte_smp_wmb();
 	}
 	rte_rwlock_write_unlock(&priv->mr.rwlock);
-	if (rebuild && rte_log_get_level(mlx5_logtype) == RTE_LOG_DEBUG)
-		mlx5_mr_dump_dev(dev);
 }
 
 /**
@@ -1123,8 +1114,9 @@ mlx5_mr_update_mp(struct rte_eth_dev *dev, struct mlx5_mr_ctrl *mr_ctrl,
  *   Pointer to Ethernet device.
  */
 void
-mlx5_mr_dump_dev(struct rte_eth_dev *dev)
+mlx5_mr_dump_dev(struct rte_eth_dev *dev __rte_unused)
 {
+#ifndef NDEBUG
 	struct priv *priv = dev->data->dev_private;
 	struct mlx5_mr *mr;
 	int mr_n = 0;
@@ -1135,11 +1127,10 @@ mlx5_mr_dump_dev(struct rte_eth_dev *dev)
 	LIST_FOREACH(mr, &priv->mr.mr_list, mr) {
 		unsigned int n;
 
-		DRV_LOG(DEBUG,
-			"port %u MR[%u], LKey = 0x%x, ms_n = %u, ms_bmp_n = %u",
-			dev->data->port_id, mr_n++,
-			rte_cpu_to_be_32(mr->ibv_mr->lkey),
-			mr->ms_n, mr->ms_bmp_n);
+		DEBUG("port %u MR[%u], LKey = 0x%x, ms_n = %u, ms_bmp_n = %u",
+		      dev->data->port_id, mr_n++,
+		      rte_cpu_to_be_32(mr->ibv_mr->lkey),
+		      mr->ms_n, mr->ms_bmp_n);
 		if (mr->ms_n == 0)
 			continue;
 		for (n = 0; n < mr->ms_bmp_n; ) {
@@ -1148,14 +1139,14 @@ mlx5_mr_dump_dev(struct rte_eth_dev *dev)
 			n = mr_find_next_chunk(mr, &ret, n);
 			if (!ret.end)
 				break;
-			DRV_LOG(DEBUG,
-				"  chunk[%u], [0x%" PRIxPTR ", 0x%" PRIxPTR ")",
-				chunk_n++, ret.start, ret.end);
+			DEBUG("  chunk[%u], [0x%" PRIxPTR ", 0x%" PRIxPTR ")",
+			      chunk_n++, ret.start, ret.end);
 		}
 	}
-	DRV_LOG(DEBUG, "port %u dumping global cache", dev->data->port_id);
+	DEBUG("port %u dumping global cache", dev->data->port_id);
 	mlx5_mr_btree_dump(&priv->mr.cache);
 	rte_rwlock_read_unlock(&priv->mr.rwlock);
+#endif
 }
 
 /**
diff --git a/drivers/net/mlx5/mlx5_mr.h b/drivers/net/mlx5/mlx5_mr.h
index e0b28215c..a57003fe9 100644
--- a/drivers/net/mlx5/mlx5_mr.h
+++ b/drivers/net/mlx5/mlx5_mr.h
@@ -74,9 +74,12 @@ void mlx5_mr_mem_event_cb(enum rte_mem_event event_type, const void *addr,
 			  size_t len, void *arg);
 int mlx5_mr_update_mp(struct rte_eth_dev *dev, struct mlx5_mr_ctrl *mr_ctrl,
 		      struct rte_mempool *mp);
-void mlx5_mr_dump_dev(struct rte_eth_dev *dev);
 void mlx5_mr_release(struct rte_eth_dev *dev);
 
+/* Debug purpose functions. */
+void mlx5_mr_btree_dump(struct mlx5_mr_btree *bt);
+void mlx5_mr_dump_dev(struct rte_eth_dev *dev);
+
 /**
  * Look up LKey from given lookup table by linear search. Firstly look up the
  * last-hit entry. If miss, the entire array is searched. If found, update the
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index de3f869ed..17db7c160 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -993,8 +993,6 @@ mlx5_rxq_ibv_new(struct rte_eth_dev *dev, uint16_t idx)
 	DRV_LOG(DEBUG, "port %u rxq %u updated with %p", dev->data->port_id,
 		idx, (void *)&tmpl);
 	rte_atomic32_inc(&tmpl->refcnt);
-	DRV_LOG(DEBUG, "port %u Verbs Rx queue %u: refcnt %d",
-		dev->data->port_id, idx, rte_atomic32_read(&tmpl->refcnt));
 	LIST_INSERT_HEAD(&priv->rxqsibv, tmpl, next);
 	priv->verbs_alloc_ctx.type = MLX5_VERBS_ALLOC_TYPE_NONE;
 	return tmpl;
@@ -1036,9 +1034,6 @@ mlx5_rxq_ibv_get(struct rte_eth_dev *dev, uint16_t idx)
 	rxq_ctrl = container_of(rxq_data, struct mlx5_rxq_ctrl, rxq);
 	if (rxq_ctrl->ibv) {
 		rte_atomic32_inc(&rxq_ctrl->ibv->refcnt);
-		DRV_LOG(DEBUG, "port %u Verbs Rx queue %u: refcnt %d",
-			dev->data->port_id, rxq_ctrl->idx,
-			rte_atomic32_read(&rxq_ctrl->ibv->refcnt));
 	}
 	return rxq_ctrl->ibv;
 }
@@ -1058,9 +1053,6 @@ mlx5_rxq_ibv_release(struct mlx5_rxq_ibv *rxq_ibv)
 	assert(rxq_ibv);
 	assert(rxq_ibv->wq);
 	assert(rxq_ibv->cq);
-	DRV_LOG(DEBUG, "port %u Verbs Rx queue %u: refcnt %d",
-		PORT_ID(rxq_ibv->rxq_ctrl->priv),
-		rxq_ibv->rxq_ctrl->idx, rte_atomic32_read(&rxq_ibv->refcnt));
 	if (rte_atomic32_dec_and_test(&rxq_ibv->refcnt)) {
 		rxq_free_elts(rxq_ibv->rxq_ctrl);
 		claim_zero(mlx5_glue->destroy_wq(rxq_ibv->wq));
@@ -1449,8 +1441,6 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 		(struct rte_mbuf *(*)[1 << tmpl->rxq.elts_n])(tmpl + 1);
 	tmpl->idx = idx;
 	rte_atomic32_inc(&tmpl->refcnt);
-	DRV_LOG(DEBUG, "port %u Rx queue %u: refcnt %d", dev->data->port_id,
-		idx, rte_atomic32_read(&tmpl->refcnt));
 	LIST_INSERT_HEAD(&priv->rxqsctrl, tmpl, next);
 	return tmpl;
 error:
@@ -1481,9 +1471,6 @@ mlx5_rxq_get(struct rte_eth_dev *dev, uint16_t idx)
 					rxq);
 		mlx5_rxq_ibv_get(dev, idx);
 		rte_atomic32_inc(&rxq_ctrl->refcnt);
-		DRV_LOG(DEBUG, "port %u Rx queue %u: refcnt %d",
-			dev->data->port_id, rxq_ctrl->idx,
-			rte_atomic32_read(&rxq_ctrl->refcnt));
 	}
 	return rxq_ctrl;
 }
@@ -1511,8 +1498,6 @@ mlx5_rxq_release(struct rte_eth_dev *dev, uint16_t idx)
 	assert(rxq_ctrl->priv);
 	if (rxq_ctrl->ibv && !mlx5_rxq_ibv_release(rxq_ctrl->ibv))
 		rxq_ctrl->ibv = NULL;
-	DRV_LOG(DEBUG, "port %u Rx queue %u: refcnt %d", dev->data->port_id,
-		rxq_ctrl->idx, rte_atomic32_read(&rxq_ctrl->refcnt));
 	if (rte_atomic32_dec_and_test(&rxq_ctrl->refcnt)) {
 		mlx5_mr_btree_free(&rxq_ctrl->rxq.mr_ctrl.cache_bh);
 		LIST_REMOVE(rxq_ctrl, next);
@@ -1630,14 +1615,10 @@ mlx5_ind_table_ibv_new(struct rte_eth_dev *dev, const uint16_t *queues,
 	}
 	rte_atomic32_inc(&ind_tbl->refcnt);
 	LIST_INSERT_HEAD(&priv->ind_tbls, ind_tbl, next);
-	DEBUG("port %u new indirection table %p: queues:%u refcnt:%d",
-	      dev->data->port_id, (void *)ind_tbl, 1 << wq_n,
-	      rte_atomic32_read(&ind_tbl->refcnt));
 	return ind_tbl;
 error:
 	rte_free(ind_tbl);
-	DRV_LOG(DEBUG, "port %u cannot create indirection table",
-		dev->data->port_id);
+	DEBUG("port %u cannot create indirection table", dev->data->port_id);
 	return NULL;
 }
 
@@ -1672,9 +1653,6 @@ mlx5_ind_table_ibv_get(struct rte_eth_dev *dev, const uint16_t *queues,
 		unsigned int i;
 
 		rte_atomic32_inc(&ind_tbl->refcnt);
-		DRV_LOG(DEBUG, "port %u indirection table %p: refcnt %d",
-			dev->data->port_id, (void *)ind_tbl,
-			rte_atomic32_read(&ind_tbl->refcnt));
 		for (i = 0; i != ind_tbl->queues_n; ++i)
 			mlx5_rxq_get(dev, ind_tbl->queues[i]);
 	}
@@ -1698,15 +1676,9 @@ mlx5_ind_table_ibv_release(struct rte_eth_dev *dev,
 {
 	unsigned int i;
 
-	DRV_LOG(DEBUG, "port %u indirection table %p: refcnt %d",
-		dev->data->port_id, (void *)ind_tbl,
-		rte_atomic32_read(&ind_tbl->refcnt));
-	if (rte_atomic32_dec_and_test(&ind_tbl->refcnt)) {
+	if (rte_atomic32_dec_and_test(&ind_tbl->refcnt))
 		claim_zero(mlx5_glue->destroy_rwq_ind_table
 			   (ind_tbl->ind_table));
-		DEBUG("port %u delete indirection table %p: queues: %u",
-		      dev->data->port_id, (void *)ind_tbl, ind_tbl->queues_n);
-	}
 	for (i = 0; i != ind_tbl->queues_n; ++i)
 		claim_nonzero(mlx5_rxq_release(dev, ind_tbl->queues[i]));
 	if (!rte_atomic32_read(&ind_tbl->refcnt)) {
@@ -1823,13 +1795,6 @@ mlx5_hrxq_new(struct rte_eth_dev *dev,
 			.pd = priv->pd,
 		 },
 		 &qp_init_attr);
-	DEBUG("port %u new QP:%p ind_tbl:%p hash_fields:0x%" PRIx64
-	      " tunnel:0x%x level:%u dv_attr:comp_mask:0x%" PRIx64
-	      " create_flags:0x%x",
-	      dev->data->port_id, (void *)qp, (void *)ind_tbl,
-	      (tunnel && rss_level == 2 ? (uint32_t)IBV_RX_HASH_INNER : 0) |
-	      hash_fields, tunnel, rss_level,
-	      qp_init_attr.comp_mask, qp_init_attr.create_flags);
 #else
 	qp = mlx5_glue->create_qp_ex
 		(priv->ctx,
@@ -1851,10 +1816,6 @@ mlx5_hrxq_new(struct rte_eth_dev *dev,
 			.rwq_ind_tbl = ind_tbl->ind_table,
 			.pd = priv->pd,
 		 });
-	DEBUG("port %u new QP:%p ind_tbl:%p hash_fields:0x%" PRIx64
-	      " tunnel:0x%x level:%hhu",
-	      dev->data->port_id, (void *)qp, (void *)ind_tbl,
-	      hash_fields, tunnel, rss_level);
 #endif
 	if (!qp) {
 		rte_errno = errno;
@@ -1872,9 +1833,6 @@ mlx5_hrxq_new(struct rte_eth_dev *dev,
 	memcpy(hrxq->rss_key, rss_key, rss_key_len);
 	rte_atomic32_inc(&hrxq->refcnt);
 	LIST_INSERT_HEAD(&priv->hrxqs, hrxq, next);
-	DRV_LOG(DEBUG, "port %u hash Rx queue %p: refcnt %d",
-		dev->data->port_id, (void *)hrxq,
-		rte_atomic32_read(&hrxq->refcnt));
 	return hrxq;
 error:
 	err = rte_errno; /* Save rte_errno before cleanup. */
@@ -1937,9 +1895,6 @@ mlx5_hrxq_get(struct rte_eth_dev *dev,
 			continue;
 		}
 		rte_atomic32_inc(&hrxq->refcnt);
-		DRV_LOG(DEBUG, "port %u hash Rx queue %p: refcnt %d",
-			dev->data->port_id, (void *)hrxq,
-			rte_atomic32_read(&hrxq->refcnt));
 		return hrxq;
 	}
 	return NULL;
@@ -1959,15 +1914,8 @@ mlx5_hrxq_get(struct rte_eth_dev *dev,
 int
 mlx5_hrxq_release(struct rte_eth_dev *dev, struct mlx5_hrxq *hrxq)
 {
-	DRV_LOG(DEBUG, "port %u hash Rx queue %p: refcnt %d",
-		dev->data->port_id, (void *)hrxq,
-		rte_atomic32_read(&hrxq->refcnt));
 	if (rte_atomic32_dec_and_test(&hrxq->refcnt)) {
 		claim_zero(mlx5_glue->destroy_qp(hrxq->qp));
-		DEBUG("port %u delete QP %p: hash: 0x%" PRIx64 ", tunnel:"
-		      " 0x%x, level: %u",
-		      dev->data->port_id, (void *)hrxq, hrxq->hash_fields,
-		      hrxq->tunnel, hrxq->rss_level);
 		mlx5_ind_table_ibv_release(dev, hrxq->ind_table);
 		LIST_REMOVE(hrxq, next);
 		rte_free(hrxq);
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 3e7c0a90f..4d2078bbd 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -167,8 +167,6 @@ mlx5_dev_start(struct rte_eth_dev *dev)
 			dev->data->port_id, strerror(rte_errno));
 		goto error;
 	}
-	if (rte_log_get_level(mlx5_logtype) == RTE_LOG_DEBUG)
-		mlx5_mr_dump_dev(dev);
 	ret = mlx5_rx_intr_vec_enable(dev);
 	if (ret) {
 		DRV_LOG(ERR, "port %u Rx interrupt vector creation failed",
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 691ea0713..068f36d99 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -514,8 +514,6 @@ mlx5_txq_ibv_new(struct rte_eth_dev *dev, uint16_t idx)
 		rte_errno = EINVAL;
 		goto error;
 	}
-	DRV_LOG(DEBUG, "port %u Verbs Tx queue %u: refcnt %d",
-		dev->data->port_id, idx, rte_atomic32_read(&txq_ibv->refcnt));
 	LIST_INSERT_HEAD(&priv->txqsibv, txq_ibv, next);
 	txq_ibv->txq_ctrl = txq_ctrl;
 	priv->verbs_alloc_ctx.type = MLX5_VERBS_ALLOC_TYPE_NONE;
@@ -553,12 +551,8 @@ mlx5_txq_ibv_get(struct rte_eth_dev *dev, uint16_t idx)
 	if (!(*priv->txqs)[idx])
 		return NULL;
 	txq_ctrl = container_of((*priv->txqs)[idx], struct mlx5_txq_ctrl, txq);
-	if (txq_ctrl->ibv) {
+	if (txq_ctrl->ibv)
 		rte_atomic32_inc(&txq_ctrl->ibv->refcnt);
-		DRV_LOG(DEBUG, "port %u Verbs Tx queue %u: refcnt %d",
-			dev->data->port_id, txq_ctrl->idx,
-		      rte_atomic32_read(&txq_ctrl->ibv->refcnt));
-	}
 	return txq_ctrl->ibv;
 }
 
@@ -575,9 +569,6 @@ int
 mlx5_txq_ibv_release(struct mlx5_txq_ibv *txq_ibv)
 {
 	assert(txq_ibv);
-	DRV_LOG(DEBUG, "port %u Verbs Tx queue %u: refcnt %d",
-		PORT_ID(txq_ibv->txq_ctrl->priv),
-		txq_ibv->txq_ctrl->idx, rte_atomic32_read(&txq_ibv->refcnt));
 	if (rte_atomic32_dec_and_test(&txq_ibv->refcnt)) {
 		claim_zero(mlx5_glue->destroy_qp(txq_ibv->qp));
 		claim_zero(mlx5_glue->destroy_cq(txq_ibv->cq));
@@ -778,8 +769,6 @@ mlx5_txq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 		(struct rte_mbuf *(*)[1 << tmpl->txq.elts_n])(tmpl + 1);
 	tmpl->txq.stats.idx = idx;
 	rte_atomic32_inc(&tmpl->refcnt);
-	DRV_LOG(DEBUG, "port %u Tx queue %u: refcnt %d", dev->data->port_id,
-		idx, rte_atomic32_read(&tmpl->refcnt));
 	LIST_INSERT_HEAD(&priv->txqsctrl, tmpl, next);
 	return tmpl;
 error:
@@ -809,9 +798,6 @@ mlx5_txq_get(struct rte_eth_dev *dev, uint16_t idx)
 				    txq);
 		mlx5_txq_ibv_get(dev, idx);
 		rte_atomic32_inc(&ctrl->refcnt);
-		DRV_LOG(DEBUG, "port %u Tx queue %u refcnt %d",
-			dev->data->port_id,
-			ctrl->idx, rte_atomic32_read(&ctrl->refcnt));
 	}
 	return ctrl;
 }
@@ -837,8 +823,6 @@ mlx5_txq_release(struct rte_eth_dev *dev, uint16_t idx)
 	if (!(*priv->txqs)[idx])
 		return 0;
 	txq = container_of((*priv->txqs)[idx], struct mlx5_txq_ctrl, txq);
-	DRV_LOG(DEBUG, "port %u Tx queue %u: refcnt %d", dev->data->port_id,
-		txq->idx, rte_atomic32_read(&txq->refcnt));
 	if (txq->ibv && !mlx5_txq_ibv_release(txq->ibv))
 		txq->ibv = NULL;
 	if (priv->uar_base)
-- 
2.17.1

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

* [dpdk-stable] patch 'net/mlx5: fix error number handling' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (34 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: clean-up developer logs' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/ixgbe: fix crash on detach' " Christian Ehrhardt
                   ` (139 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: Nelio Laranjeiro, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From e657445767edf908dfc7f01ea6cd169a7c4afba8 Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Tue, 19 Jun 2018 16:13:13 -0700
Subject: [PATCH] net/mlx5: fix error number handling

[ upstream commit 5cffc8b28dc874d04df7675abf7187c271524f70 ]

rte_errno should be saved only if error has occurred because rte_errno
could have garbage value.

Fixes: a6d83b6a9209 ("net/mlx5: standardize on negative errno values")

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

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 994be05be..45207d70e 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -3561,15 +3561,17 @@ wrong_flow:
 		/* The flow does not match. */
 		continue;
 	}
-	ret = rte_errno; /* Save rte_errno before cleanup. */
 	if (flow)
 		mlx5_flow_list_destroy(dev, &priv->flows, flow);
 exit:
+	if (ret)
+		ret = rte_errno; /* Save rte_errno before cleanup. */
 	for (i = 0; i != hash_rxq_init_n; ++i) {
 		if (parser.queue[i].ibv_attr)
 			rte_free(parser.queue[i].ibv_attr);
 	}
-	rte_errno = ret; /* Restore rte_errno. */
+	if (ret)
+		rte_errno = ret; /* Restore rte_errno. */
 	return -rte_errno;
 }
 
-- 
2.17.1

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

* [dpdk-stable] patch 'net/ixgbe: fix crash on detach' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (35 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix error number handling' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/ixgbe: add support for VLAN in IP mode FDIR' " Christian Ehrhardt
                   ` (138 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Anatoly Burakov, Remy Horton, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From f31a63a1e7437dc68b4c3be3f96942799c749f45 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Thu, 31 May 2018 10:53:07 +0100
Subject: [PATCH] net/ixgbe: fix crash on detach

[ upstream commit beaa005850a27f6e83f30296c1d0893d1ff49925 ]

When detaching a port bound to ixgbe PMD, if the port
does not have any VFs, *vfinfo is not set and there is
a NULL dereference attempt, when calling
rte_eth_switch_domain_free(), which expects VFs to be used,
causing a segmentation fault.

Steps to reproduce:

./testpmd -- -i
testpmd> port stop all
testpmd> port close all
testpmd> port detach 0

Bugzilla ID: 57
Fixes: cf80ba6e2038 ("net/ixgbe: add support for representor ports")

Reported-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tested-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
---
 drivers/net/ixgbe/ixgbe_pf.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index 4d199c802..c381acf44 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -135,14 +135,14 @@ void ixgbe_pf_host_uninit(struct rte_eth_dev *eth_dev)
 	RTE_ETH_DEV_SRIOV(eth_dev).def_vmdq_idx = 0;
 	RTE_ETH_DEV_SRIOV(eth_dev).def_pool_q_idx = 0;
 
-	ret = rte_eth_switch_domain_free((*vfinfo)->switch_domain_id);
-	if (ret)
-		PMD_INIT_LOG(WARNING, "failed to free switch domain: %d", ret);
-
 	vf_num = dev_num_vf(eth_dev);
 	if (vf_num == 0)
 		return;
 
+	ret = rte_eth_switch_domain_free((*vfinfo)->switch_domain_id);
+	if (ret)
+		PMD_INIT_LOG(WARNING, "failed to free switch domain: %d", ret);
+
 	rte_free(*vfinfo);
 	*vfinfo = NULL;
 }
-- 
2.17.1

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

* [dpdk-stable] patch 'net/ixgbe: add support for VLAN in IP mode FDIR' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (36 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/ixgbe: fix crash on detach' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/ixgbe: fix tunnel id format error for " Christian Ehrhardt
                   ` (137 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Wenzhuo Lu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 9f2abb2e4ce982e1586c5a7ae6d36cbed0f7beec Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Wed, 13 Jun 2018 16:09:55 +0800
Subject: [PATCH] net/ixgbe: add support for VLAN in IP mode FDIR

[ upstream commit 2ee9fecfc3f449d6c2596cf34517d5728b541ee9 ]

In IP mode FDIR, X550 can support not only 4 tuple parameters
but also vlan tci in protocol, so add this feature to flow parser.

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

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

diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index eb0644c82..1f2007f6d 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -1739,7 +1739,8 @@ ixgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev,
 				return -rte_errno;
 			}
 		} else {
-			if (item->type != RTE_FLOW_ITEM_TYPE_IPV4) {
+			if (item->type != RTE_FLOW_ITEM_TYPE_IPV4 &&
+					item->type != RTE_FLOW_ITEM_TYPE_VLAN) {
 				memset(rule, 0, sizeof(struct ixgbe_fdir_rule));
 				rte_flow_error_set(error, EINVAL,
 					RTE_FLOW_ERROR_TYPE_ITEM,
-- 
2.17.1

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

* [dpdk-stable] patch 'net/ixgbe: fix tunnel id format error for FDIR' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (37 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/ixgbe: add support for VLAN in IP mode FDIR' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/ixgbe: fix tunnel type set " Christian Ehrhardt
                   ` (136 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Wenzhuo Lu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 250d6e579f6c6f6b79acb25737ea9cb9081ff09d Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Wed, 13 Jun 2018 16:11:22 +0800
Subject: [PATCH] net/ixgbe: fix tunnel id format error for FDIR

[ upstream commit e7d406851909b1c3cc24ee8c61044dccf9902559 ]

In cloud mode for FDIR, tunnel id should be set as protocol
request, the lower 8 bits should be set as reserved.

Fixes: 82fb702077f6 ("ixgbe: support new flow director modes for X550")
Fixes: 11777435c727 ("net/ixgbe: parse flow director filter")

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

diff --git a/drivers/net/ixgbe/ixgbe_fdir.c b/drivers/net/ixgbe/ixgbe_fdir.c
index d5e51797c..67ab627fa 100644
--- a/drivers/net/ixgbe/ixgbe_fdir.c
+++ b/drivers/net/ixgbe/ixgbe_fdir.c
@@ -774,7 +774,7 @@ ixgbe_fdir_filter_to_atr_input(const struct rte_eth_fdir_filter *fdir_filter,
 		input->formatted.tunnel_type =
 			fdir_filter->input.flow.tunnel_flow.tunnel_type;
 		input->formatted.tni_vni =
-			fdir_filter->input.flow.tunnel_flow.tunnel_id;
+			fdir_filter->input.flow.tunnel_flow.tunnel_id >> 8;
 	}
 
 	return 0;
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 1f2007f6d..000f4ad28 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -2488,10 +2488,8 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,
 			rule->b_spec = TRUE;
 			vxlan_spec = item->spec;
 			rte_memcpy(((uint8_t *)
-				&rule->ixgbe_fdir.formatted.tni_vni + 1),
+				&rule->ixgbe_fdir.formatted.tni_vni),
 				vxlan_spec->vni, RTE_DIM(vxlan_spec->vni));
-			rule->ixgbe_fdir.formatted.tni_vni = rte_be_to_cpu_32(
-				rule->ixgbe_fdir.formatted.tni_vni);
 		}
 	}
 
@@ -2588,7 +2586,6 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,
 			/* tni is a 24-bits bit field */
 			rte_memcpy(&rule->ixgbe_fdir.formatted.tni_vni,
 			nvgre_spec->tni, RTE_DIM(nvgre_spec->tni));
-			rule->ixgbe_fdir.formatted.tni_vni <<= 8;
 		}
 	}
 
-- 
2.17.1

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

* [dpdk-stable] patch 'net/ixgbe: fix tunnel type set error for FDIR' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (38 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/ixgbe: fix tunnel id format error for " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/ixgbe: fix mask bits register " Christian Ehrhardt
                   ` (135 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Wenzhuo Lu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 01384a56e7965dc6ba9634e3fd31017da9bea4bc Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Thu, 14 Jun 2018 16:17:28 +0800
Subject: [PATCH] net/ixgbe: fix tunnel type set error for FDIR

[ upstream commit 876b450ed99d2c96c5b71360cc84f7b0b8f506f4 ]

Tunnel type format should be translated to ixgbe required format
before register set in FDIR cloud mode, Ans also some register
not useful in cloud mode but only useful in IP mode should be set
to zero as datasheet request.

Fixes: 82fb702077f6 ("ixgbe: support new flow director modes for X550")
Fixes: 11777435c727 ("net/ixgbe: parse flow director filter")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.h |  5 +++++
 drivers/net/ixgbe/ixgbe_fdir.c   | 19 +++++++++++++++----
 drivers/net/ixgbe/ixgbe_flow.c   |  4 ++--
 3 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index e42ec30d3..d0b93968b 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -100,6 +100,11 @@
 #define IXGBE_5TUPLE_MAX_PRI            7
 #define IXGBE_5TUPLE_MIN_PRI            1
 
+/* bit of VXLAN tunnel type | 7 bits of zeros  | 8 bits of zeros*/
+#define IXGBE_FDIR_VXLAN_TUNNEL_TYPE    0x8000
+/* bit of NVGRE tunnel type | 7 bits of zeros  | 8 bits of zeros*/
+#define IXGBE_FDIR_NVGRE_TUNNEL_TYPE    0x0
+
 #define IXGBE_RSS_OFFLOAD_ALL ( \
 	ETH_RSS_IPV4 | \
 	ETH_RSS_NONFRAG_IPV4_TCP | \
diff --git a/drivers/net/ixgbe/ixgbe_fdir.c b/drivers/net/ixgbe/ixgbe_fdir.c
index 67ab627fa..6baf8255e 100644
--- a/drivers/net/ixgbe/ixgbe_fdir.c
+++ b/drivers/net/ixgbe/ixgbe_fdir.c
@@ -771,8 +771,17 @@ ixgbe_fdir_filter_to_atr_input(const struct rte_eth_fdir_filter *fdir_filter,
 			input->formatted.inner_mac,
 			fdir_filter->input.flow.tunnel_flow.mac_addr.addr_bytes,
 			sizeof(input->formatted.inner_mac));
-		input->formatted.tunnel_type =
-			fdir_filter->input.flow.tunnel_flow.tunnel_type;
+		if (fdir_filter->input.flow.tunnel_flow.tunnel_type ==
+				RTE_FDIR_TUNNEL_TYPE_VXLAN)
+			input->formatted.tunnel_type =
+					IXGBE_FDIR_VXLAN_TUNNEL_TYPE;
+		else if (fdir_filter->input.flow.tunnel_flow.tunnel_type ==
+				RTE_FDIR_TUNNEL_TYPE_NVGRE)
+			input->formatted.tunnel_type =
+					IXGBE_FDIR_NVGRE_TUNNEL_TYPE;
+		else
+			PMD_DRV_LOG(ERR, " invalid tunnel type arguments.");
+
 		input->formatted.tni_vni =
 			fdir_filter->input.flow.tunnel_flow.tunnel_id >> 8;
 	}
@@ -1001,8 +1010,7 @@ fdir_write_perfect_filter_82599(struct ixgbe_hw *hw,
 			IXGBE_WRITE_REG(hw, IXGBE_FDIRSIPv6(2), 0);
 		} else {
 			/* tunnel mode */
-			if (input->formatted.tunnel_type !=
-				RTE_FDIR_TUNNEL_TYPE_NVGRE)
+			if (input->formatted.tunnel_type)
 				tunnel_type = 0x80000000;
 			tunnel_type |= addr_high;
 			IXGBE_WRITE_REG(hw, IXGBE_FDIRSIPv6(0), addr_low);
@@ -1010,6 +1018,9 @@ fdir_write_perfect_filter_82599(struct ixgbe_hw *hw,
 			IXGBE_WRITE_REG(hw, IXGBE_FDIRSIPv6(2),
 					input->formatted.tni_vni);
 		}
+		IXGBE_WRITE_REG(hw, IXGBE_FDIRIPSA, 0);
+		IXGBE_WRITE_REG(hw, IXGBE_FDIRIPDA, 0);
+		IXGBE_WRITE_REG(hw, IXGBE_FDIRPORT, 0);
 	}
 
 	/* record vlan (little-endian) and flex_bytes(big-endian) */
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 000f4ad28..1adf1b803 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -2438,7 +2438,7 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,
 	/* Get the VxLAN info */
 	if (item->type == RTE_FLOW_ITEM_TYPE_VXLAN) {
 		rule->ixgbe_fdir.formatted.tunnel_type =
-			RTE_FDIR_TUNNEL_TYPE_VXLAN;
+				IXGBE_FDIR_VXLAN_TUNNEL_TYPE;
 
 		/* Only care about VNI, others should be masked. */
 		if (!item->mask) {
@@ -2496,7 +2496,7 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,
 	/* Get the NVGRE info */
 	if (item->type == RTE_FLOW_ITEM_TYPE_NVGRE) {
 		rule->ixgbe_fdir.formatted.tunnel_type =
-			RTE_FDIR_TUNNEL_TYPE_NVGRE;
+				IXGBE_FDIR_NVGRE_TUNNEL_TYPE;
 
 		/**
 		 * Only care about flags0, flags1, protocol and TNI,
-- 
2.17.1

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

* [dpdk-stable] patch 'net/ixgbe: fix mask bits register set error for FDIR' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (39 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/ixgbe: fix tunnel type set " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/i40e: fix shifts of 32-bit value' " Christian Ehrhardt
                   ` (134 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Wenzhuo Lu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 0c1c8910b5f4da2a7a5e3918e46b529ecda809aa Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Fri, 15 Jun 2018 14:08:03 +0800
Subject: [PATCH] net/ixgbe: fix mask bits register set error for FDIR

[ upstream commit 5dadd757188e68260880924dea38c22858ac2ca9 ]

MAC address bits in mask registers should be set to zero
when the is mac mask is 0xFF, otherwise if it is 0x0
these bits should be to 0x3F.

Fixes: 82fb702077f6 ("ixgbe: support new flow director modes for X550")

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

diff --git a/drivers/net/ixgbe/ixgbe_fdir.c b/drivers/net/ixgbe/ixgbe_fdir.c
index 6baf8255e..e559f0fa8 100644
--- a/drivers/net/ixgbe/ixgbe_fdir.c
+++ b/drivers/net/ixgbe/ixgbe_fdir.c
@@ -394,9 +394,12 @@ fdir_set_input_mask_x550(struct rte_eth_dev *dev)
 				IXGBE_FDIRIP6M_TNI_VNI;
 
 	if (mode == RTE_FDIR_MODE_PERFECT_TUNNEL) {
-		mac_mask = info->mask.mac_addr_byte_mask;
-		fdiripv6m |= (mac_mask << IXGBE_FDIRIP6M_INNER_MAC_SHIFT)
-				& IXGBE_FDIRIP6M_INNER_MAC;
+		fdiripv6m |= IXGBE_FDIRIP6M_INNER_MAC;
+		mac_mask = info->mask.mac_addr_byte_mask &
+			(IXGBE_FDIRIP6M_INNER_MAC >>
+			IXGBE_FDIRIP6M_INNER_MAC_SHIFT);
+		fdiripv6m &= ~((mac_mask << IXGBE_FDIRIP6M_INNER_MAC_SHIFT) &
+				IXGBE_FDIRIP6M_INNER_MAC);
 
 		switch (info->mask.tunnel_type_mask) {
 		case 0:
-- 
2.17.1

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

* [dpdk-stable] patch 'net/i40e: fix shifts of 32-bit value' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (40 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/ixgbe: fix mask bits register " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'app/testpmd: fix VLAN TCI mask set error for FDIR' " Christian Ehrhardt
                   ` (133 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 7b6c7182bdee51db89e3993fe6e3604fe77481dc Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Wed, 23 May 2018 15:46:46 +0800
Subject: [PATCH] net/i40e: fix shifts of 32-bit value

[ upstream commit bc98bf3a2d0301a17707bc04e95fc32746a397c4 ]

Cppcheck reports following error,
(error) Shifting 32-bit value by 36 bits is undefined behaviour

According to datasheet, there's PHY type and PHY type extension
in setting PHY config command, should exclude PHY type extension
when setting PHY type.

Fixes: 1bb8f661168d ("net/i40e: fix link down and negotiation")

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

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 13c5d3296..9f80e70ce 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2065,8 +2065,8 @@ i40e_phy_conf_link(struct i40e_hw *hw,
 
 
 
-	/* To enable link, phy_type mask needs to include each type */
-	for (cnt = I40E_PHY_TYPE_SGMII; cnt < I40E_PHY_TYPE_MAX; cnt++)
+	/* PHY type mask needs to include each type except PHY type extension */
+	for (cnt = I40E_PHY_TYPE_SGMII; cnt < I40E_PHY_TYPE_25GBASE_KR; cnt++)
 		phy_type_mask |= 1 << cnt;
 
 	/* use get_phy_abilities_resp value for the rest */
-- 
2.17.1

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

* [dpdk-stable] patch 'app/testpmd: fix VLAN TCI mask set error for FDIR' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (41 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/i40e: fix shifts of 32-bit value' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/i40e: workaround performance degradation' " Christian Ehrhardt
                   ` (132 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Wenzhuo Lu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 798e16b72cd4f169ddee0421a46e885c94c4ec9a Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Tue, 5 Jun 2018 17:12:11 +0800
Subject: [PATCH] app/testpmd: fix VLAN TCI mask set error for FDIR

[ upstream commit 26f579aa274b46f42d77228dd6628c951cba05a1 ]

The vlan tci mask should be set to 0xEFFF, not 0x0,
the wrong mask will cause mask error for register set.

Fixes: d9d5e6f2f0ba ("app/testpmd: set default flow director mask")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 app/test-pmd/testpmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 24c199844..63c2a5aca 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -346,7 +346,7 @@ struct rte_fdir_conf fdir_conf = {
 	.pballoc = RTE_FDIR_PBALLOC_64K,
 	.status = RTE_FDIR_REPORT_STATUS,
 	.mask = {
-		.vlan_tci_mask = 0x0,
+		.vlan_tci_mask = 0xFFEF,
 		.ipv4_mask     = {
 			.src_ip = 0xFFFFFFFF,
 			.dst_ip = 0xFFFFFFFF,
-- 
2.17.1

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

* [dpdk-stable] patch 'net/i40e: workaround performance degradation' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (42 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'app/testpmd: fix VLAN TCI mask set error for FDIR' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/i40e: do not reset device info data' " Christian Ehrhardt
                   ` (131 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Haiyue Wang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 663163c5643d368cc90ec1f8a036d90c6035082c Mon Sep 17 00:00:00 2001
From: Haiyue Wang <haiyue.wang@intel.com>
Date: Wed, 13 Jun 2018 13:52:41 +0800
Subject: [PATCH] net/i40e: workaround performance degradation

[ upstream commit 3320d4a240daab15559d3e671bd44573a89cf017 ]

The GL_SWR_PM_UP_THR value is not impacted from the link speed, its
value is set according to the total number of ports for a better
pipe-monitor configuration.

All bellowing relevant device IDs are considered (NICs, LOMs, Mezz
and Backplane):

Device-ID  Value        Comments
0x1572     0x03030303   10G SFI
0x1581     0x03030303   10G Backplane
0x1586     0x03030303   10G BaseT
0x1589     0x03030303   10G BaseT (FortPond)
0x1580     0x06060606   40G Backplane
0x1583     0x06060606   2x40G QSFP
0x1584     0x06060606   1x40G QSFP
0x1587     0x06060606   20G Backplane (HP)
0x1588     0x06060606   20G KR2 (HP)
0x158A     0x06060606   25G Backplane
0x158B     0x06060606   25G SFP28

Fixes: c9223a2bf53c ("i40e: workaround for XL710 performance")
Fixes: 75d133dd3296 ("net/i40e: enable 25G device")

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

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 9f80e70ce..50bbc77ae 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -10003,6 +10003,60 @@ i40e_pctype_to_flowtype(const struct i40e_adapter *adapter,
 #define I40E_GL_SWR_PM_UP_THR_SF_VALUE   0x06060606
 #define I40E_GL_SWR_PM_UP_THR            0x269FBC
 
+/*
+ * GL_SWR_PM_UP_THR:
+ * The value is not impacted from the link speed, its value is set according
+ * to the total number of ports for a better pipe-monitor configuration.
+ */
+static bool
+i40e_get_swr_pm_cfg(struct i40e_hw *hw, uint32_t *value)
+{
+#define I40E_GL_SWR_PM_EF_DEVICE(dev) \
+		.device_id = (dev),   \
+		.val = I40E_GL_SWR_PM_UP_THR_EF_VALUE
+
+#define I40E_GL_SWR_PM_SF_DEVICE(dev) \
+		.device_id = (dev),   \
+		.val = I40E_GL_SWR_PM_UP_THR_SF_VALUE
+
+	static const struct {
+		uint16_t device_id;
+		uint32_t val;
+	} swr_pm_table[] = {
+		{ I40E_GL_SWR_PM_EF_DEVICE(I40E_DEV_ID_SFP_XL710) },
+		{ I40E_GL_SWR_PM_EF_DEVICE(I40E_DEV_ID_KX_C) },
+		{ I40E_GL_SWR_PM_EF_DEVICE(I40E_DEV_ID_10G_BASE_T) },
+		{ I40E_GL_SWR_PM_EF_DEVICE(I40E_DEV_ID_10G_BASE_T4) },
+
+		{ I40E_GL_SWR_PM_SF_DEVICE(I40E_DEV_ID_KX_B) },
+		{ I40E_GL_SWR_PM_SF_DEVICE(I40E_DEV_ID_QSFP_A) },
+		{ I40E_GL_SWR_PM_SF_DEVICE(I40E_DEV_ID_QSFP_B) },
+		{ I40E_GL_SWR_PM_SF_DEVICE(I40E_DEV_ID_20G_KR2) },
+		{ I40E_GL_SWR_PM_SF_DEVICE(I40E_DEV_ID_20G_KR2_A) },
+		{ I40E_GL_SWR_PM_SF_DEVICE(I40E_DEV_ID_25G_B) },
+		{ I40E_GL_SWR_PM_SF_DEVICE(I40E_DEV_ID_25G_SFP28) },
+	};
+	uint32_t i;
+
+	if (value == NULL) {
+		PMD_DRV_LOG(ERR, "value is NULL");
+		return false;
+	}
+
+	for (i = 0; i < RTE_DIM(swr_pm_table); i++) {
+		if (hw->device_id == swr_pm_table[i].device_id) {
+			*value = swr_pm_table[i].val;
+
+			PMD_DRV_LOG(DEBUG, "Device 0x%x with GL_SWR_PM_UP_THR "
+				    "value - 0x%08x",
+				    hw->device_id, *value);
+			return true;
+		}
+	}
+
+	return false;
+}
+
 static int
 i40e_dev_sync_phy_type(struct i40e_hw *hw)
 {
@@ -10067,13 +10121,16 @@ i40e_configure_registers(struct i40e_hw *hw)
 		}
 
 		if (reg_table[i].addr == I40E_GL_SWR_PM_UP_THR) {
-			if (I40E_PHY_TYPE_SUPPORT_40G(hw->phy.phy_types) || /* For XL710 */
-			    I40E_PHY_TYPE_SUPPORT_25G(hw->phy.phy_types)) /* For XXV710 */
-				reg_table[i].val =
-					I40E_GL_SWR_PM_UP_THR_SF_VALUE;
-			else /* For X710 */
-				reg_table[i].val =
-					I40E_GL_SWR_PM_UP_THR_EF_VALUE;
+			uint32_t cfg_val;
+
+			if (!i40e_get_swr_pm_cfg(hw, &cfg_val)) {
+				PMD_DRV_LOG(DEBUG, "Device 0x%x skips "
+					    "GL_SWR_PM_UP_THR value fixup",
+					    hw->device_id);
+				continue;
+			}
+
+			reg_table[i].val = cfg_val;
 		}
 
 		ret = i40e_aq_debug_read_register(hw, reg_table[i].addr,
-- 
2.17.1

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

* [dpdk-stable] patch 'net/i40e: do not reset device info data' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (43 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/i40e: workaround performance degradation' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'vhost: fix missing increment of log cache count' " Christian Ehrhardt
                   ` (130 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Damjan Marion; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 115caaa254dcb464d2464409f058a1ec72509b80 Mon Sep 17 00:00:00 2001
From: Damjan Marion <damarion@cisco.com>
Date: Wed, 6 Jun 2018 22:31:25 +0200
Subject: [PATCH] net/i40e: do not reset device info data

[ upstream commit 2a4ed72338d7030ce1bbb0cee8aa213cdae6b54c ]

At this point valid data is already set by rte_eth_get_device_info.
device field becomes zero and consumer is not able to retrieve pci data.

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

Signed-off-by: Damjan Marion <damarion@cisco.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 804e44530..86b38d202 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2182,7 +2182,6 @@ i40evf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 {
 	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 
-	memset(dev_info, 0, sizeof(*dev_info));
 	dev_info->max_rx_queues = vf->vsi_res->num_queue_pairs;
 	dev_info->max_tx_queues = vf->vsi_res->num_queue_pairs;
 	dev_info->min_rx_bufsize = I40E_BUF_SIZE_MIN;
-- 
2.17.1

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

* [dpdk-stable] patch 'vhost: fix missing increment of log cache count' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (44 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/i40e: do not reset device info data' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: separate generic tunnel TSO from the standard one' " Christian Ehrhardt
                   ` (129 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Peng He, Ilya Maximets, Tiwei Bie, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 48e12a9e0659f50147166f5645f29a1559820f9d Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Fri, 15 Jun 2018 15:48:46 +0200
Subject: [PATCH] vhost: fix missing increment of log cache count

[ upstream commit e11411b52ae1e778fecaf0b896ff1f6aa4da7c99 ]

The log_cache_nb_elem was never incremented, resulting
in all dirty pages to be missed during live migration.

Fixes: c16915b87109 ("vhost: improve dirty pages logging performance")

Reported-by: Peng He <xnhp0320@icloud.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Ilya Maximets <i.maximets@samsung.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
 lib/librte_vhost/vhost.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index 58c425a5c..edddd0f53 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -428,6 +428,7 @@ vhost_log_cache_page(struct virtio_net *dev, struct vhost_virtqueue *vq,
 
 	vq->log_cache[i].offset = offset;
 	vq->log_cache[i].val = (1UL << bit_nr);
+	vq->log_cache_nb_elem++;
 }
 
 static __rte_always_inline void
-- 
2.17.1

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

* [dpdk-stable] patch 'net/mlx5: separate generic tunnel TSO from the standard one' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (45 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'vhost: fix missing increment of log cache count' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/pcap: fix multiple queues' " Christian Ehrhardt
                   ` (128 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Shahaf Shuler; +Cc: Yongseok Koh, Nelio Laranjeiro, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 1f1a643b8e479241295dde876236efe214a9d3ba Mon Sep 17 00:00:00 2001
From: Shahaf Shuler <shahafs@mellanox.com>
Date: Sun, 24 Jun 2018 09:22:26 +0300
Subject: [PATCH] net/mlx5: separate generic tunnel TSO from the standard one

[ upstream commit e46821e9fcdc6039e3c0e3756a39217b56694d0f ]

The generic tunnel TSO was depended in the regular one capabilities to
be enabled.

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_txq.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 068f36d99..669b91319 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -113,15 +113,20 @@ mlx5_get_tx_port_offloads(struct rte_eth_dev *dev)
 			     DEV_TX_OFFLOAD_TCP_CKSUM);
 	if (config->tso)
 		offloads |= DEV_TX_OFFLOAD_TCP_TSO;
+	if (config->swp) {
+		if (config->hw_csum)
+			offloads |= DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM;
+		if (config->tso)
+			offloads |= (DEV_TX_OFFLOAD_IP_TNL_TSO |
+				     DEV_TX_OFFLOAD_UDP_TNL_TSO);
+	}
+
 	if (config->tunnel_en) {
 		if (config->hw_csum)
 			offloads |= DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM;
 		if (config->tso)
 			offloads |= (DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
 				     DEV_TX_OFFLOAD_GRE_TNL_TSO);
-		if (config->swp)
-			offloads |= (DEV_TX_OFFLOAD_IP_TNL_TSO |
-				     DEV_TX_OFFLOAD_UDP_TNL_TSO);
 	}
 	return offloads;
 }
@@ -707,7 +712,7 @@ txq_set_params(struct mlx5_txq_ctrl *txq_ctrl)
 						   max_tso_inline);
 		txq_ctrl->txq.tso_en = 1;
 	}
-	txq_ctrl->txq.tunnel_en = config->tunnel_en;
+	txq_ctrl->txq.tunnel_en = config->tunnel_en | config->swp;
 	txq_ctrl->txq.swp_en = ((DEV_TX_OFFLOAD_IP_TNL_TSO |
 				 DEV_TX_OFFLOAD_UDP_TNL_TSO |
 				 DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM) &
-- 
2.17.1

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

* [dpdk-stable] patch 'net/pcap: fix multiple queues' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (46 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: separate generic tunnel TSO from the standard one' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/thunderx: fix build with gcc optimization on' " Christian Ehrhardt
                   ` (127 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Ido Goshen; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From a48d79a3e7ad04fb9bb0706329c58623682a4e32 Mon Sep 17 00:00:00 2001
From: Ido Goshen <ido@cgstowernetworks.com>
Date: Tue, 19 Jun 2018 17:37:25 +0300
Subject: [PATCH] net/pcap: fix multiple queues

[ upstream commit 8ffda7673fa71e6a666963fc0ea4969d65dd09da ]

Change open_rx/tx_pcap/iface functions to open only a single pcap/dumper
and not loop num_of_queue times
The num_of_queue loop is already achieved by the
caller rte_kvargs_process

Fixing:
1. Opens N requested pcaps/dumpers instead of N^2
2. Leak of pcap/dumper's which are being overwritten by
   the sequential calls to open_rx/tx_pcap/iface functions
3. Use the filename/iface args per queue and not just the last one
   that overwrites the previous names

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

Signed-off-by: Ido Goshen <ido@cgstowernetworks.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/pcap/rte_eth_pcap.c | 86 ++++++++++++++-------------------
 1 file changed, 36 insertions(+), 50 deletions(-)

diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 6bd4a7d79..b4f81acce 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -665,19 +665,19 @@ static const struct eth_dev_ops ops = {
 static int
 open_rx_pcap(const char *key, const char *value, void *extra_args)
 {
-	unsigned int i;
 	const char *pcap_filename = value;
 	struct pmd_devargs *rx = extra_args;
 	pcap_t *pcap = NULL;
 
-	for (i = 0; i < rx->num_of_queue; i++) {
-		if (open_single_rx_pcap(pcap_filename, &pcap) < 0)
-			return -1;
+	if (rx->num_of_queue >= RTE_PMD_PCAP_MAX_QUEUES)
+		return -1;
+	if (open_single_rx_pcap(pcap_filename, &pcap) < 0)
+		return -1;
 
-		rx->queue[i].pcap = pcap;
-		rx->queue[i].name = pcap_filename;
-		rx->queue[i].type = key;
-	}
+	rx->queue[rx->num_of_queue].pcap = pcap;
+	rx->queue[rx->num_of_queue].name = pcap_filename;
+	rx->queue[rx->num_of_queue].type = key;
+	rx->num_of_queue++;
 
 	return 0;
 }
@@ -689,19 +689,19 @@ open_rx_pcap(const char *key, const char *value, void *extra_args)
 static int
 open_tx_pcap(const char *key, const char *value, void *extra_args)
 {
-	unsigned int i;
 	const char *pcap_filename = value;
 	struct pmd_devargs *dumpers = extra_args;
 	pcap_dumper_t *dumper;
 
-	for (i = 0; i < dumpers->num_of_queue; i++) {
-		if (open_single_tx_pcap(pcap_filename, &dumper) < 0)
-			return -1;
+	if (dumpers->num_of_queue >= RTE_PMD_PCAP_MAX_QUEUES)
+		return -1;
+	if (open_single_tx_pcap(pcap_filename, &dumper) < 0)
+		return -1;
 
-		dumpers->queue[i].dumper = dumper;
-		dumpers->queue[i].name = pcap_filename;
-		dumpers->queue[i].type = key;
-	}
+	dumpers->queue[dumpers->num_of_queue].dumper = dumper;
+	dumpers->queue[dumpers->num_of_queue].name = pcap_filename;
+	dumpers->queue[dumpers->num_of_queue].type = key;
+	dumpers->num_of_queue++;
 
 	return 0;
 }
@@ -732,18 +732,18 @@ open_rx_tx_iface(const char *key, const char *value, void *extra_args)
 static inline int
 open_rx_iface(const char *key, const char *value, void *extra_args)
 {
-	unsigned int i;
 	const char *iface = value;
 	struct pmd_devargs *rx = extra_args;
 	pcap_t *pcap = NULL;
 
-	for (i = 0; i < rx->num_of_queue; i++) {
-		if (open_single_iface(iface, &pcap) < 0)
-			return -1;
-		rx->queue[i].pcap = pcap;
-		rx->queue[i].name = iface;
-		rx->queue[i].type = key;
-	}
+	if (rx->num_of_queue >= RTE_PMD_PCAP_MAX_QUEUES)
+		return -1;
+	if (open_single_iface(iface, &pcap) < 0)
+		return -1;
+	rx->queue[rx->num_of_queue].pcap = pcap;
+	rx->queue[rx->num_of_queue].name = iface;
+	rx->queue[rx->num_of_queue].type = key;
+	rx->num_of_queue++;
 
 	return 0;
 }
@@ -754,18 +754,18 @@ open_rx_iface(const char *key, const char *value, void *extra_args)
 static int
 open_tx_iface(const char *key, const char *value, void *extra_args)
 {
-	unsigned int i;
 	const char *iface = value;
 	struct pmd_devargs *tx = extra_args;
 	pcap_t *pcap;
 
-	for (i = 0; i < tx->num_of_queue; i++) {
-		if (open_single_iface(iface, &pcap) < 0)
-			return -1;
-		tx->queue[i].pcap = pcap;
-		tx->queue[i].name = iface;
-		tx->queue[i].type = key;
-	}
+	if (tx->num_of_queue >= RTE_PMD_PCAP_MAX_QUEUES)
+		return -1;
+	if (open_single_iface(iface, &pcap) < 0)
+		return -1;
+	tx->queue[tx->num_of_queue].pcap = pcap;
+	tx->queue[tx->num_of_queue].name = iface;
+	tx->queue[tx->num_of_queue].type = key;
+	tx->num_of_queue++;
 
 	return 0;
 }
@@ -958,15 +958,8 @@ pmd_pcap_probe(struct rte_vdev_device *dev)
 	 * We check whether we want to open a RX stream from a real NIC or a
 	 * pcap file
 	 */
-	pcaps.num_of_queue = rte_kvargs_count(kvlist, ETH_PCAP_RX_PCAP_ARG);
-	if (pcaps.num_of_queue)
-		is_rx_pcap = 1;
-	else
-		pcaps.num_of_queue = rte_kvargs_count(kvlist,
-				ETH_PCAP_RX_IFACE_ARG);
-
-	if (pcaps.num_of_queue > RTE_PMD_PCAP_MAX_QUEUES)
-		pcaps.num_of_queue = RTE_PMD_PCAP_MAX_QUEUES;
+	is_rx_pcap = rte_kvargs_count(kvlist, ETH_PCAP_RX_PCAP_ARG) ? 1 : 0;
+	pcaps.num_of_queue = 0;
 
 	if (is_rx_pcap)
 		ret = rte_kvargs_process(kvlist, ETH_PCAP_RX_PCAP_ARG,
@@ -982,15 +975,8 @@ pmd_pcap_probe(struct rte_vdev_device *dev)
 	 * We check whether we want to open a TX stream to a real NIC or a
 	 * pcap file
 	 */
-	dumpers.num_of_queue = rte_kvargs_count(kvlist, ETH_PCAP_TX_PCAP_ARG);
-	if (dumpers.num_of_queue)
-		is_tx_pcap = 1;
-	else
-		dumpers.num_of_queue = rte_kvargs_count(kvlist,
-				ETH_PCAP_TX_IFACE_ARG);
-
-	if (dumpers.num_of_queue > RTE_PMD_PCAP_MAX_QUEUES)
-		dumpers.num_of_queue = RTE_PMD_PCAP_MAX_QUEUES;
+	is_tx_pcap = rte_kvargs_count(kvlist, ETH_PCAP_TX_PCAP_ARG) ? 1 : 0;
+	dumpers.num_of_queue = 0;
 
 	if (is_tx_pcap)
 		ret = rte_kvargs_process(kvlist, ETH_PCAP_TX_PCAP_ARG,
-- 
2.17.1

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

* [dpdk-stable] patch 'net/thunderx: fix build with gcc optimization on' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (47 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/pcap: fix multiple queues' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/qede: fix unicast MAC address handling in VF' " Christian Ehrhardt
                   ` (126 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Richard Walsh, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From dfe938c95301462ea6c29b02f2afcfe24baf9c8e Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 21 Jun 2018 19:14:50 +0100
Subject: [PATCH] net/thunderx: fix build with gcc optimization on
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit d90141961b9acead2a3cfacc7547ac1a256979eb ]

build error gcc version 6.3.1 20161221 (Red Hat 6.3.1-1),
with EXTRA_CFLAGS="-O3":

.../drivers/net/thunderx/nicvf_ethdev.c:907:9:
   error: ‘txq’ may be used uninitialized in this function
   [-Werror=maybe-uninitialized]
  if (txq->pool_free == nicvf_single_pool_free_xmited_buffers)
      ~~~^~~~~~~~~~~
.../drivers/net/thunderx/nicvf_ethdev.c:886:20:
   note: ‘txq’ was declared here
  struct nicvf_txq *txq;
                    ^~~

Same error on function 'nicvf_eth_dev_init' and 'nicvf_dev_start', it
seems 'nicvf_set_tx_function' inlined when optimization enabled.

Initialize the txq and add NULL check before using it to fix.

Fixes: 7413feee662d ("net/thunderx: add device start/stop and close")

Reported-by: Richard Walsh <richard.walsh@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 drivers/net/thunderx/nicvf_ethdev.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index 99fcd516b..4ab1bfbe6 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -883,7 +883,7 @@ nicvf_dev_tx_queue_release(void *sq)
 static void
 nicvf_set_tx_function(struct rte_eth_dev *dev)
 {
-	struct nicvf_txq *txq;
+	struct nicvf_txq *txq = NULL;
 	size_t i;
 	bool multiseg = false;
 
@@ -904,6 +904,9 @@ nicvf_set_tx_function(struct rte_eth_dev *dev)
 		dev->tx_pkt_burst = nicvf_xmit_pkts;
 	}
 
+	if (!txq)
+		return;
+
 	if (txq->pool_free == nicvf_single_pool_free_xmited_buffers)
 		PMD_DRV_LOG(DEBUG, "Using single-mempool tx free method");
 	else
-- 
2.17.1

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

* [dpdk-stable] patch 'net/qede: fix unicast MAC address handling in VF' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (48 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/thunderx: fix build with gcc optimization on' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/qede: fix legacy interrupt mode' " Christian Ehrhardt
                   ` (125 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Shahed Shaikh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From f8c8284593655a60bc2b5b32113f35ee500f772a Mon Sep 17 00:00:00 2001
From: Shahed Shaikh <shahed.shaikh@cavium.com>
Date: Sat, 23 Jun 2018 14:20:31 -0700
Subject: [PATCH] net/qede: fix unicast MAC address handling in VF

[ upstream commit c7641841af2aaf05bca987a5a0eff5a7fe96caeb ]

We did not register unicast mac configuration handlers
for VF causing failure in bonding of VFs.

Also, mac_addr_set operation requires mac_remove followed
by mac_add.

Fixes: 86a2265e59d7 ("qede: add SRIOV support")

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
---
 drivers/net/qede/qede_ethdev.c | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 7a63d0564..1cae47424 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -957,7 +957,11 @@ qede_mac_addr_add(struct rte_eth_dev *eth_dev, struct ether_addr *mac_addr,
 	struct ecore_filter_ucast ucast;
 	int re;
 
+	if (!is_valid_assigned_ether_addr(mac_addr))
+		return -EINVAL;
+
 	qede_set_ucast_cmn_params(&ucast);
+	ucast.opcode = ECORE_FILTER_ADD;
 	ucast.type = ECORE_FILTER_MAC;
 	ether_addr_copy(mac_addr, (struct ether_addr *)&ucast.mac);
 	re = (int)qede_mac_int_ops(eth_dev, &ucast, 1);
@@ -979,6 +983,9 @@ qede_mac_addr_remove(struct rte_eth_dev *eth_dev, uint32_t index)
 		return;
 	}
 
+	if (!is_valid_assigned_ether_addr(&eth_dev->data->mac_addrs[index]))
+		return;
+
 	qede_set_ucast_cmn_params(&ucast);
 	ucast.opcode = ECORE_FILTER_REMOVE;
 	ucast.type = ECORE_FILTER_MAC;
@@ -1002,8 +1009,9 @@ qede_mac_addr_set(struct rte_eth_dev *eth_dev, struct ether_addr *mac_addr)
 		return -EPERM;
 	}
 
-	qede_mac_addr_add(eth_dev, mac_addr, 0, 0);
-	return 0;
+	qede_mac_addr_remove(eth_dev, 0);
+
+	return qede_mac_addr_add(eth_dev, mac_addr, 0, 0);
 }
 
 static void qede_config_accept_any_vlan(struct qede_dev *qdev, bool flg)
@@ -3024,6 +3032,9 @@ static const struct eth_dev_ops qede_eth_vf_dev_ops = {
 	.mtu_set = qede_set_mtu,
 	.udp_tunnel_port_add = qede_udp_dst_port_add,
 	.udp_tunnel_port_del = qede_udp_dst_port_del,
+	.mac_addr_add = qede_mac_addr_add,
+	.mac_addr_remove = qede_mac_addr_remove,
+	.mac_addr_set = qede_mac_addr_set,
 };
 
 static void qede_update_pf_params(struct ecore_dev *edev)
@@ -3188,7 +3199,7 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 						ECORE_LEADING_HWFN(edev),
 						vf_mac,
 						&is_mac_forced);
-			if (is_mac_exist && is_mac_forced) {
+			if (is_mac_exist) {
 				DP_INFO(edev, "VF macaddr received from PF\n");
 				ether_addr_copy((struct ether_addr *)&vf_mac,
 						&eth_dev->data->mac_addrs[0]);
-- 
2.17.1

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

* [dpdk-stable] patch 'net/qede: fix legacy interrupt mode' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (49 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/qede: fix unicast MAC address handling in VF' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/qede: remove primary MAC removal' " Christian Ehrhardt
                   ` (124 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Shahed Shaikh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 2defa16444fa1dbc4b06a55484f3da7560ea72db Mon Sep 17 00:00:00 2001
From: Shahed Shaikh <shahed.shaikh@cavium.com>
Date: Sat, 23 Jun 2018 14:20:32 -0700
Subject: [PATCH] net/qede: fix legacy interrupt mode

[ upstream commit 245aec2893380e442169c8a1914c36daa444efd3 ]

qede pmd does not have support for legacy interrupt mode.
This causes slow path completion failure with uio_pci_generic module,
since it uses legacy interrupt (INTx) mode.

Fix this issue by installing legacy interrupt handler.

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

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
---
 drivers/net/qede/qede_ethdev.c | 40 +++++++++++++++++++++++++++++++---
 drivers/net/qede/qede_main.c   |  2 +-
 2 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 1cae47424..8bbfa95e3 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -338,6 +338,24 @@ static void qede_interrupt_action(struct ecore_hwfn *p_hwfn)
 	ecore_int_sp_dpc((osal_int_ptr_t)(p_hwfn));
 }
 
+static void
+qede_interrupt_handler_intx(void *param)
+{
+	struct rte_eth_dev *eth_dev = (struct rte_eth_dev *)param;
+	struct qede_dev *qdev = eth_dev->data->dev_private;
+	struct ecore_dev *edev = &qdev->edev;
+	u64 status;
+
+	/* Check if our device actually raised an interrupt */
+	status = ecore_int_igu_read_sisr_reg(ECORE_LEADING_HWFN(edev));
+	if (status & 0x1) {
+		qede_interrupt_action(ECORE_LEADING_HWFN(edev));
+
+		if (rte_intr_enable(eth_dev->intr_handle))
+			DP_ERR(edev, "rte_intr_enable failed\n");
+	}
+}
+
 static void
 qede_interrupt_handler(void *param)
 {
@@ -3063,6 +3081,7 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 	/* Fix up ecore debug level */
 	uint32_t dp_module = ~0 & ~ECORE_MSG_HW;
 	uint8_t dp_level = ECORE_LEVEL_VERBOSE;
+	uint32_t int_mode;
 	int rc;
 
 	/* Extract key data structures */
@@ -3107,8 +3126,22 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 		return -ENODEV;
 	}
 	qede_update_pf_params(edev);
-	rte_intr_callback_register(&pci_dev->intr_handle,
-				   qede_interrupt_handler, (void *)eth_dev);
+
+	switch (pci_dev->intr_handle.type) {
+	case RTE_INTR_HANDLE_UIO_INTX:
+	case RTE_INTR_HANDLE_VFIO_LEGACY:
+		int_mode = ECORE_INT_MODE_INTA;
+		rte_intr_callback_register(&pci_dev->intr_handle,
+					   qede_interrupt_handler_intx,
+					   (void *)eth_dev);
+		break;
+	default:
+		int_mode = ECORE_INT_MODE_MSIX;
+		rte_intr_callback_register(&pci_dev->intr_handle,
+					   qede_interrupt_handler,
+					   (void *)eth_dev);
+	}
+
 	if (rte_intr_enable(&pci_dev->intr_handle)) {
 		DP_ERR(edev, "rte_intr_enable() failed\n");
 		return -ENODEV;
@@ -3116,7 +3149,8 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 
 	/* Start the Slowpath-process */
 	memset(&params, 0, sizeof(struct qed_slowpath_params));
-	params.int_mode = ECORE_INT_MODE_MSIX;
+
+	params.int_mode = int_mode;
 	params.drv_major = QEDE_PMD_VERSION_MAJOR;
 	params.drv_minor = QEDE_PMD_VERSION_MINOR;
 	params.drv_rev = QEDE_PMD_VERSION_REVISION;
diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c
index de5a7ca80..2885e5d45 100644
--- a/drivers/net/qede/qede_main.c
+++ b/drivers/net/qede/qede_main.c
@@ -281,7 +281,7 @@ static int qed_slowpath_start(struct ecore_dev *edev,
 	/* Start the slowpath */
 	memset(&hw_init_params, 0, sizeof(hw_init_params));
 	hw_init_params.b_hw_start = true;
-	hw_init_params.int_mode = ECORE_INT_MODE_MSIX;
+	hw_init_params.int_mode = params->int_mode;
 	hw_init_params.allow_npar_tx_switch = true;
 	hw_init_params.bin_fw_data = data;
 
-- 
2.17.1

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

* [dpdk-stable] patch 'net/qede: remove primary MAC removal' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (50 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/qede: fix legacy interrupt mode' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/ena: fix SIGFPE with 0 Rx queue' " Christian Ehrhardt
                   ` (123 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 030c48fb62f16475daeafe8ef49ef1c4ce0662d1 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Sat, 23 Jun 2018 14:20:33 -0700
Subject: [PATCH] net/qede: remove primary MAC removal

[ upstream commit 475ff28951b69ce0c46514e8c6a6e8bfd91c5eb3 ]

This was added to dev_stop when set MTU requested vport restart.
We are not requiring vport restart any more with set MTU as it just
needs vport to be inactive and doesn't need the port reconfigured.

Fixes: d121a6b5f781 ("net/qede: fix VF MTU update")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
 drivers/net/qede/qede_ethdev.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 8bbfa95e3..b726e89d1 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1355,9 +1355,6 @@ static void qede_dev_stop(struct rte_eth_dev *eth_dev)
 	/* Disable traffic */
 	ecore_hw_stop_fastpath(edev); /* TBD - loop */
 
-	if (IS_PF(edev))
-		qede_mac_addr_remove(eth_dev, 0);
-
 	DP_INFO(edev, "Device is stopped\n");
 }
 
@@ -2096,8 +2093,6 @@ int qede_update_mtu(struct rte_eth_dev *eth_dev, uint16_t mtu)
 					goto err;
 
 				/* Restore config lost due to vport stop */
-				qede_mac_addr_set(eth_dev, &qdev->primary_mac);
-
 				if (eth_dev->data->promiscuous)
 					qede_promiscuous_enable(eth_dev);
 				else
@@ -2526,9 +2521,6 @@ static int qede_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
 		dev->data->dev_started = 0;
 		qede_dev_stop(dev);
 		restart = true;
-	} else {
-		if (IS_PF(edev))
-			qede_mac_addr_remove(dev, 0);
 	}
 	rte_delay_ms(1000);
 	qdev->mtu = mtu;
-- 
2.17.1

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

* [dpdk-stable] patch 'net/ena: fix SIGFPE with 0 Rx queue' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (51 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/qede: remove primary MAC removal' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'app/testpmd: fix missing count action fields' " Christian Ehrhardt
                   ` (122 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Daria Kolistratova; +Cc: Michal Krawczyk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From ca555cb5281b400f86c51d420a85012039ec19bf Mon Sep 17 00:00:00 2001
From: Daria Kolistratova <daria.kolistratova@intel.com>
Date: Tue, 26 Jun 2018 18:38:56 +0100
Subject: [PATCH] net/ena: fix SIGFPE with 0 Rx queue

[ upstream commit 361913ad6f8c05fc541fe4bfdae3b0dc095ae3af ]

When the number of rx queues is 0 (what can be when application does
not receive) failed with SIGFPE.
It happens when the application is also requesting ETH_MQ_RX_RSS_FLAG
in the rte_dev->data->dev_conf.rxmode.mq_mode.
Fixed adding zero rx queues check.

Signed-off-by: Daria Kolistratova <daria.kolistratova@intel.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
---
 drivers/net/ena/ena_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index f10bee236..ebc911168 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -924,7 +924,7 @@ static int ena_start(struct rte_eth_dev *dev)
 		return rc;
 
 	if (adapter->rte_dev->data->dev_conf.rxmode.mq_mode &
-	    ETH_MQ_RX_RSS_FLAG) {
+	    ETH_MQ_RX_RSS_FLAG && adapter->rte_dev->data->nb_rx_queues > 0) {
 		rc = ena_rss_init_default(adapter);
 		if (rc)
 			return rc;
-- 
2.17.1

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

* [dpdk-stable] patch 'app/testpmd: fix missing count action fields' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (52 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/ena: fix SIGFPE with 0 Rx queue' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix Rx buffer replenishment threshold' " Christian Ehrhardt
                   ` (121 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Nelio Laranjeiro; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 7649bff53cad9adcacf7b7ab101794d85a2194c7 Mon Sep 17 00:00:00 2001
From: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Date: Thu, 31 May 2018 16:33:34 +0200
Subject: [PATCH] app/testpmd: fix missing count action fields

[ upstream commit 28f40fd91e7ea5a24715eef6ff470f8586feedfc ]

COUNT action has been modified and has several fields not addressable
though testpmd.  In addition, as those fields are not definable testpmd
is providing an empty configuration which is undefined.

Fixes: fb8fd96d4251 ("ethdev: add shared counter to flow API")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 app/test-pmd/cmdline_flow.c  | 29 +++++++++++++++++++++++++++--
 lib/librte_ethdev/rte_flow.c |  2 +-
 2 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 9918d7fda..934cf7e90 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -194,6 +194,8 @@ enum index {
 	ACTION_QUEUE_INDEX,
 	ACTION_DROP,
 	ACTION_COUNT,
+	ACTION_COUNT_SHARED,
+	ACTION_COUNT_ID,
 	ACTION_RSS,
 	ACTION_RSS_FUNC,
 	ACTION_RSS_LEVEL,
@@ -788,6 +790,13 @@ static const enum index action_queue[] = {
 	ZERO,
 };
 
+static const enum index action_count[] = {
+	ACTION_COUNT_ID,
+	ACTION_COUNT_SHARED,
+	ACTION_NEXT,
+	ZERO,
+};
+
 static const enum index action_rss[] = {
 	ACTION_RSS_FUNC,
 	ACTION_RSS_LEVEL,
@@ -2022,10 +2031,26 @@ static const struct token token_list[] = {
 	[ACTION_COUNT] = {
 		.name = "count",
 		.help = "enable counters for this rule",
-		.priv = PRIV_ACTION(COUNT, 0),
-		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
+		.priv = PRIV_ACTION(COUNT,
+				    sizeof(struct rte_flow_action_count)),
+		.next = NEXT(action_count),
 		.call = parse_vc,
 	},
+	[ACTION_COUNT_ID] = {
+		.name = "identifier",
+		.help = "counter identifier to use",
+		.next = NEXT(action_count, NEXT_ENTRY(UNSIGNED)),
+		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_count, id)),
+		.call = parse_vc_conf,
+	},
+	[ACTION_COUNT_SHARED] = {
+		.name = "shared",
+		.help = "shared counter",
+		.next = NEXT(action_count, NEXT_ENTRY(BOOLEAN)),
+		.args = ARGS(ARGS_ENTRY_BF(struct rte_flow_action_count,
+					   shared, 1)),
+		.call = parse_vc_conf,
+	},
 	[ACTION_RSS] = {
 		.name = "rss",
 		.help = "spread packets among several queues",
diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c
index b2afba089..2e87e59f3 100644
--- a/lib/librte_ethdev/rte_flow.c
+++ b/lib/librte_ethdev/rte_flow.c
@@ -84,7 +84,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {
 	MK_FLOW_ACTION(FLAG, 0),
 	MK_FLOW_ACTION(QUEUE, sizeof(struct rte_flow_action_queue)),
 	MK_FLOW_ACTION(DROP, 0),
-	MK_FLOW_ACTION(COUNT, 0),
+	MK_FLOW_ACTION(COUNT, sizeof(struct rte_flow_action_count)),
 	MK_FLOW_ACTION(RSS, sizeof(struct rte_flow_action_rss)),
 	MK_FLOW_ACTION(PF, 0),
 	MK_FLOW_ACTION(VF, sizeof(struct rte_flow_action_vf)),
-- 
2.17.1

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

* [dpdk-stable] patch 'net/mlx5: fix Rx buffer replenishment threshold' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (53 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'app/testpmd: fix missing count action fields' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix invalid error check' " Christian Ehrhardt
                   ` (120 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: Shahaf Shuler, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From e839cc451f8f0fcd02926c2189aa5e942934216a Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Tue, 26 Jun 2018 04:33:35 -0700
Subject: [PATCH] net/mlx5: fix Rx buffer replenishment threshold

[ upstream commit e10245a13b2e340f48ce80484f19bcbc13e9ebe6 ]

The threshold of buffer replenishment for vectorized Rx burst is a constant
value (64). If the size of Rx queue is comparatively small, device could
run out of buffers. For example, if the size of Rx queue is 128, buffers
are replenished only twice per a wraparound. This can cause jitter in
receiving packets and the jitter can cause unnecessary retransmission for
TCP connections.

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

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
 drivers/net/mlx5/mlx5_defs.h          | 5 +++--
 drivers/net/mlx5/mlx5_rxtx_vec.h      | 4 ++--
 drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 2 +-
 drivers/net/mlx5/mlx5_rxtx_vec_sse.h  | 2 +-
 4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_defs.h b/drivers/net/mlx5/mlx5_defs.h
index 51124cdcc..b52f7dcbe 100644
--- a/drivers/net/mlx5/mlx5_defs.h
+++ b/drivers/net/mlx5/mlx5_defs.h
@@ -64,10 +64,11 @@
 #define MLX5_VPMD_MIN_TXQS 4
 
 /* Threshold of buffer replenishment for vectorized Rx. */
-#define MLX5_VPMD_RXQ_RPLNSH_THRESH   64U
+#define MLX5_VPMD_RXQ_RPLNSH_THRESH(n) \
+	(RTE_MIN(MLX5_VPMD_RX_MAX_BURST, (unsigned int)(n) >> 2))
 
 /* Maximum size of burst for vectorized Rx. */
-#define MLX5_VPMD_RX_MAX_BURST        MLX5_VPMD_RXQ_RPLNSH_THRESH
+#define MLX5_VPMD_RX_MAX_BURST 64U
 
 /*
  * Maximum size of burst for vectorized Tx. This is related to the maximum size
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.h b/drivers/net/mlx5/mlx5_rxtx_vec.h
index 598dc7519..fb884f92f 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec.h
@@ -91,9 +91,9 @@ mlx5_rx_replenish_bulk_mbuf(struct mlx5_rxq_data *rxq, uint16_t n)
 		&((volatile struct mlx5_wqe_data_seg *)rxq->wqes)[elts_idx];
 	unsigned int i;
 
-	assert(n >= MLX5_VPMD_RXQ_RPLNSH_THRESH);
+	assert(n >= MLX5_VPMD_RXQ_RPLNSH_THRESH(q_n));
 	assert(n <= (uint16_t)(q_n - (rxq->rq_ci - rxq->rq_pi)));
-	assert(MLX5_VPMD_RXQ_RPLNSH_THRESH > MLX5_VPMD_DESCS_PER_LOOP);
+	assert(MLX5_VPMD_RXQ_RPLNSH_THRESH(q_n) > MLX5_VPMD_DESCS_PER_LOOP);
 	/* Not to cross queue end. */
 	n = RTE_MIN(n - MLX5_VPMD_DESCS_PER_LOOP, q_n - elts_idx);
 	if (rte_mempool_get_bulk(rxq->mp, (void *)elts, n) < 0) {
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
index 71a5eaf23..3ebf34823 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
@@ -739,7 +739,7 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
 	 *   N - (rq_ci - rq_pi) := # of buffers consumed (to be replenished).
 	 */
 	repl_n = q_n - (rxq->rq_ci - rxq->rq_pi);
-	if (repl_n >= MLX5_VPMD_RXQ_RPLNSH_THRESH)
+	if (repl_n >= MLX5_VPMD_RXQ_RPLNSH_THRESH(q_n))
 		mlx5_rx_replenish_bulk_mbuf(rxq, repl_n);
 	/* See if there're unreturned mbufs from compressed CQE. */
 	rcvd_pkt = rxq->cq_ci - rxq->rq_pi;
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
index 3e985d61d..f0d888831 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
@@ -724,7 +724,7 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
 	 *   N - (rq_ci - rq_pi) := # of buffers consumed (to be replenished).
 	 */
 	repl_n = q_n - (rxq->rq_ci - rxq->rq_pi);
-	if (repl_n >= MLX5_VPMD_RXQ_RPLNSH_THRESH)
+	if (repl_n >= MLX5_VPMD_RXQ_RPLNSH_THRESH(q_n))
 		mlx5_rx_replenish_bulk_mbuf(rxq, repl_n);
 	/* See if there're unreturned mbufs from compressed CQE. */
 	rcvd_pkt = rxq->cq_ci - rxq->rq_pi;
-- 
2.17.1

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

* [dpdk-stable] patch 'net/mlx5: fix invalid error check' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (54 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix Rx buffer replenishment threshold' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'doc: update qede management firmware guide' " Christian Ehrhardt
                   ` (119 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Adrien Mazarguil; +Cc: Nelio Laranjeiro, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 64ba5b166d0a623d0bcc4d95733b0e9a75cc593e Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Date: Wed, 27 Jun 2018 11:20:52 +0200
Subject: [PATCH] net/mlx5: fix invalid error check

[ upstream commit f264c7980ca5b5f574c5f4c93644daf702124e4d ]

Since its return type is unsigned, if_nametoindex() returns 0 in case of
error, never -1.

Fixes: ccdcba53a3f4 ("net/mlx5: use Netlink to add/remove MAC addresses")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx5/mlx5_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 90488af33..ebe5cb6e3 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -192,13 +192,13 @@ int
 mlx5_ifindex(const struct rte_eth_dev *dev)
 {
 	char ifname[IF_NAMESIZE];
-	int ret;
+	unsigned int ret;
 
 	ret = mlx5_get_ifname(dev, &ifname);
 	if (ret)
 		return ret;
 	ret = if_nametoindex(ifname);
-	if (ret == -1) {
+	if (ret == 0) {
 		rte_errno = errno;
 		return -rte_errno;
 	}
-- 
2.17.1

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

* [dpdk-stable] patch 'doc: update qede management firmware guide' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (55 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix invalid error check' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/qede: fix default extended VLAN offload config' " Christian Ehrhardt
                   ` (118 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 7c8ea8df9409209108c74e0b2bfbdaaa1ec533fd Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Wed, 27 Jun 2018 17:32:05 -0700
Subject: [PATCH] doc: update qede management firmware guide

[ upstream commit 1fc3afdf7886eaf65ff61ed57d62e1438adcbe53 ]

Fixes: c49a438fce90 ("doc: update qede guide and features")
Fixes: db86fbe54d90 ("doc: update qede PMD NIC guide")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
 doc/guides/nics/qede.rst | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/doc/guides/nics/qede.rst b/doc/guides/nics/qede.rst
index a4adf7567..cba388681 100644
--- a/doc/guides/nics/qede.rst
+++ b/doc/guides/nics/qede.rst
@@ -66,12 +66,13 @@ Prerequisites
   or `QLogic Driver Download Center <http://driverdownloads.qlogic.com/QLogicDriverDownloads_UI/DefaultNewSearch.aspx>`_.
   To download firmware file from QLogic website, select adapter category, model and DPDK Poll Mode Driver.
 
-- Requires management firmware (MFW) version **8.34.x.x** or higher to be
-  flashed on to the adapter. If the required management firmware is not
-  available then download from
-  `QLogic Driver Download Center <http://driverdownloads.qlogic.com/QLogicDriverDownloads_UI/DefaultNewSearch.aspx>`_.
-  For downloading firmware upgrade utility, select adapter category, model and Linux distro.
-  To flash the management firmware refer to the instructions in the QLogic Firmware Upgrade Utility Readme document.
+- Requires the NIC be updated minimally with **8.30.x.x** Management firmware(MFW) version supported for that NIC.
+  It is highly recommended that the NIC be updated with the latest available management firmware version to get latest feature  set.
+  Management Firmware and Firmware Upgrade Utility for Cavium FastLinQ(r) branded adapters can be downloaded from
+  `Driver Download Center <http://driverdownloads.qlogic.com/QLogicDriverDownloads_UI/DefaultNewSearch.aspx>`_.
+  For downloading Firmware Upgrade Utility, select NIC category, model and Linux distro.
+  To update the management firmware, refer to the instructions in the Firmware Upgrade Utility Readme document.
+  For OEM branded adapters please follow the instruction provided by the OEM to update the Management Firmware on the NIC.
 
 - SR-IOV requires Linux PF driver version **8.20.x.x** or higher.
   If the required PF driver is not available then download it from
-- 
2.17.1

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

* [dpdk-stable] patch 'net/qede: fix default extended VLAN offload config' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (56 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'doc: update qede management firmware guide' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/qede: fix Rx/Tx offload flags' " Christian Ehrhardt
                   ` (117 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From aa2cbaafe1a870aa41ce584013848fd05e58dba9 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody@cavium.com>
Date: Wed, 27 Jun 2018 23:01:57 -0700
Subject: [PATCH] net/qede: fix default extended VLAN offload config

[ upstream commit c6dd1eb8a55c1f66da8398508ea8a749799eef18 ]

This patch disables extended VLAN offload by default as PMD does not
support it.

Fixes: d87246a43759 ("net/qede: enable and disable VLAN filtering")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
 drivers/net/qede/qede_ethdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index b726e89d1..68c8c899b 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1494,8 +1494,7 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
 
 	/* Enable VLAN offloads by default */
 	ret = qede_vlan_offload_set(eth_dev, ETH_VLAN_STRIP_MASK  |
-					     ETH_VLAN_FILTER_MASK |
-					     ETH_VLAN_EXTEND_MASK);
+					     ETH_VLAN_FILTER_MASK);
 	if (ret)
 		return ret;
 
-- 
2.17.1

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

* [dpdk-stable] patch 'net/qede: fix Rx/Tx offload flags' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (57 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/qede: fix default extended VLAN offload config' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix clear port stats' " Christian Ehrhardt
                   ` (116 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Shahed Shaikh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 1755009b24a1d6881717c874adc7ad44909d60ef Mon Sep 17 00:00:00 2001
From: Shahed Shaikh <shahed.shaikh@cavium.com>
Date: Wed, 27 Jun 2018 23:01:58 -0700
Subject: [PATCH] net/qede: fix Rx/Tx offload flags

[ upstream commit 048a68edc0c01c9bf3daf3f90334861559436fe9 ]

 - We don't support QinQ offload, so removing it now.
 - Fix incorrect offload flags in default rxconf
   Since qede PMD does not support per queue rx offload, it
   should not set default_rxconf.offload flags in .dev_infos_get().
   Although these offloads are enabled by default, they are per port
   and not per queue.

Fixes: 946dfd18a4ec ("net/qede: convert to new Rx/Tx offloads API")

Signed-off-by: Shahed Shaikh <shahed.shaikh@cavium.com>
---
 drivers/net/qede/qede_ethdev.c | 7 +------
 drivers/net/qede/qede_rxtx.c   | 2 +-
 drivers/net/qede/qede_rxtx.h   | 1 -
 3 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 68c8c899b..876052772 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1568,7 +1568,6 @@ qede_dev_info_get(struct rte_eth_dev *eth_dev,
 				     DEV_TX_OFFLOAD_UDP_CKSUM	|
 				     DEV_TX_OFFLOAD_TCP_CKSUM	|
 				     DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM |
-				     DEV_TX_OFFLOAD_QINQ_INSERT |
 				     DEV_TX_OFFLOAD_MULTI_SEGS  |
 				     DEV_TX_OFFLOAD_TCP_TSO	|
 				     DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
@@ -1582,11 +1581,7 @@ qede_dev_info_get(struct rte_eth_dev *eth_dev,
 	dev_info->default_rxconf = (struct rte_eth_rxconf) {
 		/* Packets are always dropped if no descriptors are available */
 		.rx_drop_en = 1,
-		/* The below RX offloads are always enabled */
-		.offloads = (DEV_RX_OFFLOAD_CRC_STRIP  |
-			     DEV_RX_OFFLOAD_IPV4_CKSUM |
-			     DEV_RX_OFFLOAD_TCP_CKSUM  |
-			     DEV_RX_OFFLOAD_UDP_CKSUM),
+		.offloads = 0,
 	};
 
 	memset(&link, 0, sizeof(struct qed_link_output));
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index 4fa1c615b..174e3776e 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -1971,7 +1971,7 @@ qede_xmit_pkts(void *p_txq, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		}
 
 		/* Descriptor based VLAN insertion */
-		if (tx_ol_flags & (PKT_TX_VLAN_PKT | PKT_TX_QINQ_PKT)) {
+		if (tx_ol_flags & PKT_TX_VLAN_PKT) {
 			vlan = rte_cpu_to_le_16(mbuf->vlan_tci);
 			bd1_bd_flags_bf |=
 			    1 << ETH_TX_1ST_BD_FLAGS_VLAN_INSERTION_SHIFT;
diff --git a/drivers/net/qede/qede_rxtx.h b/drivers/net/qede/qede_rxtx.h
index 84a834d2c..37cab7e35 100644
--- a/drivers/net/qede/qede_rxtx.h
+++ b/drivers/net/qede/qede_rxtx.h
@@ -147,7 +147,6 @@
 				   PKT_TX_TCP_SEG)
 
 #define QEDE_TX_OFFLOAD_MASK (QEDE_TX_CSUM_OFFLOAD_MASK | \
-			      PKT_TX_QINQ_PKT           | \
 			      PKT_TX_VLAN_PKT		| \
 			      PKT_TX_TUNNEL_VXLAN	| \
 			      PKT_TX_TUNNEL_GENEVE	| \
-- 
2.17.1

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

* [dpdk-stable] patch 'net/bnxt: fix clear port stats' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (58 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/qede: fix Rx/Tx offload flags' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix close operation' " Christian Ehrhardt
                   ` (115 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 194d3495a8d404365e00ffe3a7009b205a8f6a34 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 28 Jun 2018 13:15:27 -0700
Subject: [PATCH] net/bnxt: fix clear port stats

[ upstream commit a15fd8c005e75022140b5d83d15f0b10100b94f2 ]

PORT_CLR_STATS is not allowed for VFs, NPAR, MultiHost functions
or when SR-IOV is enabled.
Don't send the HWRM command in such cases.

Fixes: bfb9c2260be2 ("net/bnxt: support xstats get/reset")

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

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index afaaf8c41..d19aea569 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -98,6 +98,7 @@ struct bnxt_child_vf_info {
 struct bnxt_pf_info {
 #define BNXT_FIRST_PF_FID	1
 #define BNXT_MAX_VFS(bp)	(bp->pf.max_vfs)
+#define BNXT_TOTAL_VFS(bp)	((bp)->pf.total_vfs)
 #define BNXT_FIRST_VF_FID	128
 #define BNXT_PF_RINGS_USED(bp)	bnxt_get_num_queues(bp)
 #define BNXT_PF_RINGS_AVAIL(bp)	(bp->pf.max_cp_rings - BNXT_PF_RINGS_USED(bp))
@@ -105,6 +106,9 @@ struct bnxt_pf_info {
 	uint16_t		first_vf_id;
 	uint16_t		active_vfs;
 	uint16_t		max_vfs;
+	uint16_t		total_vfs; /* Total VFs possible.
+					    * Not necessarily enabled.
+					    */
 	uint32_t		func_cfg_flags;
 	void			*vf_req_buf;
 	rte_iova_t		vf_req_buf_dma_addr;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index d6fdc1b88..f441d4610 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -506,6 +506,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
 	if (BNXT_PF(bp)) {
 		bp->pf.port_id = resp->port_id;
 		bp->pf.first_vf_id = rte_le_to_cpu_16(resp->first_vf_id);
+		bp->pf.total_vfs = rte_le_to_cpu_16(resp->max_vfs);
 		new_max_vfs = bp->pdev->max_vfs;
 		if (new_max_vfs != bp->pf.max_vfs) {
 			if (bp->pf.vf_info)
@@ -3151,7 +3152,9 @@ int bnxt_hwrm_port_clr_stats(struct bnxt *bp)
 	struct bnxt_pf_info *pf = &bp->pf;
 	int rc;
 
-	if (!(bp->flags & BNXT_FLAG_PORT_STATS))
+	/* Not allowed on NS2 device, NPAR, MultiHost, VF */
+	if (!(bp->flags & BNXT_FLAG_PORT_STATS) || BNXT_VF(bp) ||
+	    BNXT_NPAR(bp) || BNXT_MH(bp) || BNXT_TOTAL_VFS(bp))
 		return 0;
 
 	HWRM_PREP(req, PORT_CLR_STATS);
-- 
2.17.1

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

* [dpdk-stable] patch 'net/bnxt: fix close operation' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (59 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix clear port stats' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix HW Tx checksum offload check' " Christian Ehrhardt
                   ` (114 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From ed210f058c67f24d58f0d22ff839d33af8dfe218 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 28 Jun 2018 13:15:31 -0700
Subject: [PATCH] net/bnxt: fix close operation

[ upstream commit 3c2e87c10b6f2c249a26e419b565bff5589b4637 ]

We are not cleaning up all the memory and also not unregistering
the driver during device close operation. This patch fixes the issue.

Fixes: 893074951314 ("net/bnxt: free memory in close operation")

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

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 6e56bfd36..ee5b86bfe 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -152,6 +152,7 @@ static const struct rte_pci_id bnxt_pci_id_map[] = {
 static int bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask);
 static void bnxt_print_link_info(struct rte_eth_dev *eth_dev);
 static int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu);
+static int bnxt_dev_uninit(struct rte_eth_dev *eth_dev);
 
 /***********************/
 
@@ -664,6 +665,8 @@ static void bnxt_dev_close_op(struct rte_eth_dev *eth_dev)
 		rte_free(bp->grp_info);
 		bp->grp_info = NULL;
 	}
+
+	bnxt_dev_uninit(eth_dev);
 }
 
 static void bnxt_mac_addr_remove_op(struct rte_eth_dev *eth_dev,
@@ -3112,7 +3115,6 @@ init_err_disable:
 	return rc;
 }
 
-static int bnxt_dev_uninit(struct rte_eth_dev *eth_dev);
 
 #define ALLOW_FUNC(x)	\
 	{ \
@@ -3404,13 +3406,15 @@ error:
 }
 
 static int
-bnxt_dev_uninit(struct rte_eth_dev *eth_dev) {
+bnxt_dev_uninit(struct rte_eth_dev *eth_dev)
+{
 	struct bnxt *bp = eth_dev->data->dev_private;
 	int rc;
 
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return -EPERM;
 
+	PMD_DRV_LOG(DEBUG, "Calling Device uninit\n");
 	bnxt_disable_int(bp);
 	bnxt_free_int(bp);
 	bnxt_free_mem(bp);
@@ -3424,8 +3428,17 @@ bnxt_dev_uninit(struct rte_eth_dev *eth_dev) {
 	}
 	rc = bnxt_hwrm_func_driver_unregister(bp, 0);
 	bnxt_free_hwrm_resources(bp);
-	rte_memzone_free((const struct rte_memzone *)bp->tx_mem_zone);
-	rte_memzone_free((const struct rte_memzone *)bp->rx_mem_zone);
+
+	if (bp->tx_mem_zone) {
+		rte_memzone_free((const struct rte_memzone *)bp->tx_mem_zone);
+		bp->tx_mem_zone = NULL;
+	}
+
+	if (bp->rx_mem_zone) {
+		rte_memzone_free((const struct rte_memzone *)bp->rx_mem_zone);
+		bp->rx_mem_zone = NULL;
+	}
+
 	if (bp->dev_stopped == 0)
 		bnxt_dev_close_op(eth_dev);
 	if (bp->pf.vf_info)
-- 
2.17.1

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

* [dpdk-stable] patch 'net/bnxt: fix HW Tx checksum offload check' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (60 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix close operation' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: check for invalid vNIC id' " Christian Ehrhardt
                   ` (113 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Xiaoxin Peng, Jason He, Qingmin Liu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From d11d5a3219b143b190080d9f420c77f34d2e9c82 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 28 Jun 2018 13:15:33 -0700
Subject: [PATCH] net/bnxt: fix HW Tx checksum offload check

[ upstream commit f10258e39ec2a08d79585ecaf494198ba49bc6eb ]

Add more checks for checksum calculation offload.
Also check for tunnel frames and select the proper
buffer descriptor size.

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

Signed-off-by: Xiaoxin Peng <xiaoxin.peng@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Jason He <jason.he@broadcom.com>
Reviewed-by: Qingmin Liu <qingmin.liu@broadcom.com>
---
 drivers/net/bnxt/bnxt_txr.c | 51 ++++++++++++++++++++++++++++++++++---
 drivers/net/bnxt/bnxt_txr.h | 10 ++++++++
 2 files changed, 58 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 470fddd56..c8f9f1340 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -133,7 +133,9 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
 
 	if (tx_pkt->ol_flags & (PKT_TX_TCP_SEG | PKT_TX_TCP_CKSUM |
 				PKT_TX_UDP_CKSUM | PKT_TX_IP_CKSUM |
-				PKT_TX_VLAN_PKT | PKT_TX_OUTER_IP_CKSUM))
+				PKT_TX_VLAN_PKT | PKT_TX_OUTER_IP_CKSUM |
+				PKT_TX_TUNNEL_GRE | PKT_TX_TUNNEL_VXLAN |
+				PKT_TX_TUNNEL_GENEVE))
 		long_bd = true;
 
 	tx_buf = &txr->tx_buf_ring[txr->tx_prod];
@@ -194,16 +196,46 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
 			/* Outer IP, Inner IP, Inner TCP/UDP CSO */
 			txbd1->lflags |= TX_BD_FLG_TIP_IP_TCP_UDP_CHKSUM;
 			txbd1->mss = 0;
+		} else if ((tx_pkt->ol_flags & PKT_TX_OIP_IIP_TCP_CKSUM) ==
+			   PKT_TX_OIP_IIP_TCP_CKSUM) {
+			/* Outer IP, Inner IP, Inner TCP/UDP CSO */
+			txbd1->lflags |= TX_BD_FLG_TIP_IP_TCP_UDP_CHKSUM;
+			txbd1->mss = 0;
+		} else if ((tx_pkt->ol_flags & PKT_TX_OIP_IIP_UDP_CKSUM) ==
+			   PKT_TX_OIP_IIP_UDP_CKSUM) {
+			/* Outer IP, Inner IP, Inner TCP/UDP CSO */
+			txbd1->lflags |= TX_BD_FLG_TIP_IP_TCP_UDP_CHKSUM;
+			txbd1->mss = 0;
 		} else if ((tx_pkt->ol_flags & PKT_TX_IIP_TCP_UDP_CKSUM) ==
 			   PKT_TX_IIP_TCP_UDP_CKSUM) {
 			/* (Inner) IP, (Inner) TCP/UDP CSO */
 			txbd1->lflags |= TX_BD_FLG_IP_TCP_UDP_CHKSUM;
 			txbd1->mss = 0;
+		} else if ((tx_pkt->ol_flags & PKT_TX_IIP_UDP_CKSUM) ==
+			   PKT_TX_IIP_UDP_CKSUM) {
+			/* (Inner) IP, (Inner) TCP/UDP CSO */
+			txbd1->lflags |= TX_BD_FLG_IP_TCP_UDP_CHKSUM;
+			txbd1->mss = 0;
+		} else if ((tx_pkt->ol_flags & PKT_TX_IIP_TCP_CKSUM) ==
+			   PKT_TX_IIP_TCP_CKSUM) {
+			/* (Inner) IP, (Inner) TCP/UDP CSO */
+			txbd1->lflags |= TX_BD_FLG_IP_TCP_UDP_CHKSUM;
+			txbd1->mss = 0;
 		} else if ((tx_pkt->ol_flags & PKT_TX_OIP_TCP_UDP_CKSUM) ==
 			   PKT_TX_OIP_TCP_UDP_CKSUM) {
 			/* Outer IP, (Inner) TCP/UDP CSO */
 			txbd1->lflags |= TX_BD_FLG_TIP_TCP_UDP_CHKSUM;
 			txbd1->mss = 0;
+		} else if ((tx_pkt->ol_flags & PKT_TX_OIP_UDP_CKSUM) ==
+			   PKT_TX_OIP_UDP_CKSUM) {
+			/* Outer IP, (Inner) TCP/UDP CSO */
+			txbd1->lflags |= TX_BD_FLG_TIP_TCP_UDP_CHKSUM;
+			txbd1->mss = 0;
+		} else if ((tx_pkt->ol_flags & PKT_TX_OIP_TCP_CKSUM) ==
+			   PKT_TX_OIP_TCP_CKSUM) {
+			/* Outer IP, (Inner) TCP/UDP CSO */
+			txbd1->lflags |= TX_BD_FLG_TIP_TCP_UDP_CHKSUM;
+			txbd1->mss = 0;
 		} else if ((tx_pkt->ol_flags & PKT_TX_OIP_IIP_CKSUM) ==
 			   PKT_TX_OIP_IIP_CKSUM) {
 			/* Outer IP, Inner IP CSO */
@@ -214,11 +246,23 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
 			/* TCP/UDP CSO */
 			txbd1->lflags |= TX_BD_LONG_LFLAGS_TCP_UDP_CHKSUM;
 			txbd1->mss = 0;
-		} else if (tx_pkt->ol_flags & PKT_TX_IP_CKSUM) {
+		} else if ((tx_pkt->ol_flags & PKT_TX_TCP_CKSUM) ==
+			   PKT_TX_TCP_CKSUM) {
+			/* TCP/UDP CSO */
+			txbd1->lflags |= TX_BD_LONG_LFLAGS_TCP_UDP_CHKSUM;
+			txbd1->mss = 0;
+		} else if ((tx_pkt->ol_flags & PKT_TX_UDP_CKSUM) ==
+			   PKT_TX_UDP_CKSUM) {
+			/* TCP/UDP CSO */
+			txbd1->lflags |= TX_BD_LONG_LFLAGS_TCP_UDP_CHKSUM;
+			txbd1->mss = 0;
+		} else if ((tx_pkt->ol_flags & PKT_TX_IP_CKSUM) ==
+			   PKT_TX_IP_CKSUM) {
 			/* IP CSO */
 			txbd1->lflags |= TX_BD_LONG_LFLAGS_IP_CHKSUM;
 			txbd1->mss = 0;
-		} else if (tx_pkt->ol_flags & PKT_TX_OUTER_IP_CKSUM) {
+		} else if ((tx_pkt->ol_flags & PKT_TX_OUTER_IP_CKSUM) ==
+			   PKT_TX_OUTER_IP_CKSUM) {
 			/* IP CSO */
 			txbd1->lflags |= TX_BD_LONG_LFLAGS_T_IP_CHKSUM;
 			txbd1->mss = 0;
@@ -242,6 +286,7 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
 	}
 
 	txbd->flags_type |= TX_BD_LONG_FLAGS_PACKET_END;
+	txbd1->lflags = rte_cpu_to_le_32(txbd1->lflags);
 
 	txr->tx_prod = RING_NEXT(txr->tx_ring_struct, txr->tx_prod);
 
diff --git a/drivers/net/bnxt/bnxt_txr.h b/drivers/net/bnxt/bnxt_txr.h
index 15c7e5a09..7f3c7cdb0 100644
--- a/drivers/net/bnxt/bnxt_txr.h
+++ b/drivers/net/bnxt/bnxt_txr.h
@@ -45,10 +45,20 @@ int bnxt_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id);
 
 #define PKT_TX_OIP_IIP_TCP_UDP_CKSUM	(PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM | \
 					PKT_TX_IP_CKSUM | PKT_TX_OUTER_IP_CKSUM)
+#define PKT_TX_OIP_IIP_UDP_CKSUM	(PKT_TX_UDP_CKSUM | \
+					PKT_TX_IP_CKSUM | PKT_TX_OUTER_IP_CKSUM)
+#define PKT_TX_OIP_IIP_TCP_CKSUM	(PKT_TX_TCP_CKSUM | \
+					PKT_TX_IP_CKSUM | PKT_TX_OUTER_IP_CKSUM)
 #define PKT_TX_IIP_TCP_UDP_CKSUM	(PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM | \
 					PKT_TX_IP_CKSUM)
+#define PKT_TX_IIP_TCP_CKSUM		(PKT_TX_TCP_CKSUM | PKT_TX_IP_CKSUM)
+#define PKT_TX_IIP_UDP_CKSUM		(PKT_TX_UDP_CKSUM | PKT_TX_IP_CKSUM)
 #define PKT_TX_OIP_TCP_UDP_CKSUM	(PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM | \
 					PKT_TX_OUTER_IP_CKSUM)
+#define PKT_TX_OIP_UDP_CKSUM		(PKT_TX_UDP_CKSUM | \
+					PKT_TX_OUTER_IP_CKSUM)
+#define PKT_TX_OIP_TCP_CKSUM		(PKT_TX_TCP_CKSUM | \
+					PKT_TX_OUTER_IP_CKSUM)
 #define PKT_TX_OIP_IIP_CKSUM		(PKT_TX_IP_CKSUM |	\
 					 PKT_TX_OUTER_IP_CKSUM)
 #define PKT_TX_TCP_UDP_CKSUM		(PKT_TX_TCP_CKSUM | PKT_TX_UDP_CKSUM)
-- 
2.17.1

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

* [dpdk-stable] patch 'net/bnxt: check for invalid vNIC id' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (61 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix HW Tx checksum offload check' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix Tx with multiple mbuf' " Christian Ehrhardt
                   ` (112 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Jay Ding; +Cc: Randy Schacher, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From c27d1824fabd3dce04c66abbbe7adf15665ddca1 Mon Sep 17 00:00:00 2001
From: Jay Ding <jay.ding@broadcom.com>
Date: Thu, 28 Jun 2018 13:15:38 -0700
Subject: [PATCH] net/bnxt: check for invalid vNIC id

[ upstream commit e9950366d08f20e4d968fd76dcd0d5bc8afc09a0 ]

Passing an invalid fw_vnic_id to the firmware will cause the
bnxt_hwrm_vnic_plcmode_cfg command to fail.
Add a check for VNIC id before sending message to firmware.

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

Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index f441d4610..fcd7c51cf 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1560,6 +1560,11 @@ int bnxt_hwrm_vnic_plcmode_cfg(struct bnxt *bp,
 	struct hwrm_vnic_plcmodes_cfg_output *resp = bp->hwrm_cmd_resp_addr;
 	uint16_t size;
 
+	if (vnic->fw_vnic_id == INVALID_HW_RING_ID) {
+		PMD_DRV_LOG(DEBUG, "VNIC ID %x\n", vnic->fw_vnic_id);
+		return rc;
+	}
+
 	HWRM_PREP(req, VNIC_PLCMODES_CFG);
 
 	req.flags = rte_cpu_to_le_32(
-- 
2.17.1

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

* [dpdk-stable] patch 'net/bnxt: fix Tx with multiple mbuf' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (62 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: check for invalid vNIC id' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: revert reset of L2 filter id' " Christian Ehrhardt
                   ` (111 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Xiaoxin Peng
  Cc: Herry Chen, Jason He, Scott Branden, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From bdb2ec25466fb6dda1ced26393066971f0d7e6fc Mon Sep 17 00:00:00 2001
From: Xiaoxin Peng <xiaoxin.peng@broadcom.com>
Date: Thu, 28 Jun 2018 13:15:40 -0700
Subject: [PATCH] net/bnxt: fix Tx with multiple mbuf

[ upstream commit b2a4a69f7b663f712437c7c31dc0916ffe4ad84b ]

When using multi-mbuf to xmit large packets, we need to use total
packet lengths (sum of all segments) to set txbd->flags_type.
Packets will not be sent when using tx_pkt->data_len(The first
segment of packets).

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

Signed-off-by: Xiaoxin Peng <xiaoxin.peng@broadcom.com>
Reviewed-by: Herry Chen <herry.chen@broadcom.com>
Reviewed-by: Jason He <jason.he@broadcom.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_txr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index c8f9f1340..2fb84e68e 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -151,10 +151,10 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
 	txbd->opaque = txr->tx_prod;
 	txbd->flags_type = tx_buf->nr_bds << TX_BD_LONG_FLAGS_BD_CNT_SFT;
 	txbd->len = tx_pkt->data_len;
-	if (txbd->len >= 2014)
+	if (tx_pkt->pkt_len >= 2014)
 		txbd->flags_type |= TX_BD_LONG_FLAGS_LHINT_GTE2K;
 	else
-		txbd->flags_type |= lhint_arr[txbd->len >> 9];
+		txbd->flags_type |= lhint_arr[tx_pkt->pkt_len >> 9];
 	txbd->address = rte_cpu_to_le_32(rte_mbuf_data_iova(tx_buf->mbuf));
 
 	if (long_bd) {
-- 
2.17.1

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

* [dpdk-stable] patch 'net/bnxt: revert reset of L2 filter id' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (63 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix Tx with multiple mbuf' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: check filter type before clearing it' " Christian Ehrhardt
                   ` (110 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 4daaab34c199a2357b050950d630b12fe97b68ec Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Thu, 28 Jun 2018 13:15:41 -0700
Subject: [PATCH] net/bnxt: revert reset of L2 filter id

[ upstream commit 82dbef2c853be4162d672529710c3959e15993e1 ]

The L2 filter id is needed in many scenarios particularly when
we are repurposing the same ntuple filter with different destination
queues. This patch reverts a commit in which the L2 filter id was being
reset in clear_ntuple_filter().

Fixes: 1383434c9089 ("net/bnxt: reset L2 filter id once filter is freed")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index fcd7c51cf..ebea5118d 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -3808,7 +3808,6 @@ int bnxt_hwrm_clear_ntuple_filter(struct bnxt *bp,
 	HWRM_UNLOCK();
 
 	filter->fw_ntuple_filter_id = UINT64_MAX;
-	filter->fw_l2_filter_id = UINT64_MAX;
 
 	return 0;
 }
-- 
2.17.1

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

* [dpdk-stable] patch 'net/bnxt: check filter type before clearing it' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (64 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: revert reset of L2 filter id' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix set MTU' " Christian Ehrhardt
                   ` (109 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 608a2b6956cdf2a52f5f01ef7e17a2aa95977061 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 28 Jun 2018 13:15:42 -0700
Subject: [PATCH] net/bnxt: check filter type before clearing it

[ upstream commit 0cc1fcdeb525b614339d996796e9063599610387 ]

In bnxt_free_filter_mem(), check the filter type and call the
appropriate HWRM command to clear the filter from HW.

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

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

diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c
index e36da9977..4a510f4f4 100644
--- a/drivers/net/bnxt/bnxt_filter.c
+++ b/drivers/net/bnxt/bnxt_filter.c
@@ -117,16 +117,29 @@ void bnxt_free_filter_mem(struct bnxt *bp)
 	max_filters = bp->max_l2_ctx;
 	for (i = 0; i < max_filters; i++) {
 		filter = &bp->filter_info[i];
-		if (filter->fw_l2_filter_id != ((uint64_t)-1)) {
-			PMD_DRV_LOG(ERR, "HWRM filter is not freed??\n");
+		if (filter->fw_l2_filter_id != ((uint64_t)-1) &&
+		    filter->filter_type == HWRM_CFA_L2_FILTER) {
+			PMD_DRV_LOG(ERR, "L2 filter is not free\n");
 			/* Call HWRM to try to free filter again */
 			rc = bnxt_hwrm_clear_l2_filter(bp, filter);
 			if (rc)
 				PMD_DRV_LOG(ERR,
-				       "HWRM filter cannot be freed rc = %d\n",
-					rc);
+					    "Cannot free L2 filter: %d\n",
+					    rc);
 		}
 		filter->fw_l2_filter_id = UINT64_MAX;
+
+		if (filter->fw_ntuple_filter_id != ((uint64_t)-1) &&
+		    filter->filter_type == HWRM_CFA_NTUPLE_FILTER) {
+			PMD_DRV_LOG(ERR, "NTUPLE filter is not free\n");
+			/* Call HWRM to try to free filter again */
+			rc = bnxt_hwrm_clear_ntuple_filter(bp, filter);
+			if (rc)
+				PMD_DRV_LOG(ERR,
+					    "Cannot free NTUPLE filter: %d\n",
+					    rc);
+		}
+		filter->fw_ntuple_filter_id = UINT64_MAX;
 	}
 	STAILQ_INIT(&bp->free_filter_list);
 
-- 
2.17.1

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

* [dpdk-stable] patch 'net/bnxt: fix set MTU' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (65 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: check filter type before clearing it' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix incorrect IO address handling in Tx' " Christian Ehrhardt
                   ` (108 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From fe206006c7c7a72001b5724071c25c05ef832198 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 28 Jun 2018 13:15:43 -0700
Subject: [PATCH] net/bnxt: fix set MTU

[ upstream commit e80e88a097771ef814611f3592291a527fe1a9cd ]

There is no need to update bnxt_hwrm_vnic_plcmode_cfg if new MTU is
not greater than the max data the mbuf can accommodate.

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

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

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index ee5b86bfe..7cdabb1ec 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1566,6 +1566,7 @@ static int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
 
 	for (i = 0; i < bp->nr_vnics; i++) {
 		struct bnxt_vnic_info *vnic = &bp->vnic_info[i];
+		uint16_t size = 0;
 
 		vnic->mru = bp->eth_dev->data->mtu + ETHER_HDR_LEN +
 					ETHER_CRC_LEN + VLAN_TAG_SIZE * 2;
@@ -1573,9 +1574,14 @@ static int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
 		if (rc)
 			break;
 
-		rc = bnxt_hwrm_vnic_plcmode_cfg(bp, vnic);
-		if (rc)
-			return rc;
+		size = rte_pktmbuf_data_room_size(bp->rx_queues[0]->mb_pool);
+		size -= RTE_PKTMBUF_HEADROOM;
+
+		if (size < new_mtu) {
+			rc = bnxt_hwrm_vnic_plcmode_cfg(bp, vnic);
+			if (rc)
+				return rc;
+		}
 	}
 
 	return rc;
-- 
2.17.1

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

* [dpdk-stable] patch 'net/bnxt: fix incorrect IO address handling in Tx' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (66 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix set MTU' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix to move a flow to a different queue' " Christian Ehrhardt
                   ` (107 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 099ed47903b68e7fdf145cb484f697bdcfa5d942 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 28 Jun 2018 13:15:44 -0700
Subject: [PATCH] net/bnxt: fix incorrect IO address handling in Tx

[ upstream commit 90362583e21407272d85882b4ff01fd2ca3f0ac7 ]

rte_mbuf_data_iova returns a 64-bit address. But we are incorrectly
using only 32-bits of that. Use rte_cpu_to_le_64 instead of
rte_cpu_to_le_32

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

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

diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 2fb84e68e..71e108806 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -155,7 +155,7 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
 		txbd->flags_type |= TX_BD_LONG_FLAGS_LHINT_GTE2K;
 	else
 		txbd->flags_type |= lhint_arr[tx_pkt->pkt_len >> 9];
-	txbd->address = rte_cpu_to_le_32(rte_mbuf_data_iova(tx_buf->mbuf));
+	txbd->address = rte_cpu_to_le_64(rte_mbuf_data_iova(tx_buf->mbuf));
 
 	if (long_bd) {
 		txbd->flags_type |= TX_BD_LONG_TYPE_TX_BD_LONG;
@@ -278,7 +278,7 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
 		tx_buf = &txr->tx_buf_ring[txr->tx_prod];
 
 		txbd = &txr->tx_desc_ring[txr->tx_prod];
-		txbd->address = rte_cpu_to_le_32(rte_mbuf_data_iova(m_seg));
+		txbd->address = rte_cpu_to_le_64(rte_mbuf_data_iova(m_seg));
 		txbd->flags_type = TX_BD_SHORT_TYPE_TX_BD_SHORT;
 		txbd->len = m_seg->data_len;
 
-- 
2.17.1

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

* [dpdk-stable] patch 'net/bnxt: fix to move a flow to a different queue' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (67 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix incorrect IO address handling in Tx' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix Rx ring count limitation' " Christian Ehrhardt
                   ` (106 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 0f3d230650a27b8257b262b9386602a91f5bce16 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Thu, 28 Jun 2018 13:15:46 -0700
Subject: [PATCH] net/bnxt: fix to move a flow to a different queue

[ upstream commit 16fea16455f4c0d23585fc4f00bbbcf1aae6bc73 ]

While moving a flow to a different destination queue,
the l2_filter_id being passed to the FW command was incorrect.
Fix it by re-using the matching filter's l2_filter_id since
that is supposed to be the same in this case.

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

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_filter.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c
index 4a510f4f4..6fd71d23d 100644
--- a/drivers/net/bnxt/bnxt_filter.c
+++ b/drivers/net/bnxt/bnxt_filter.c
@@ -1068,9 +1068,13 @@ bnxt_match_filter(struct bnxt *bp, struct bnxt_filter_info *nf)
 				    sizeof(nf->dst_ipaddr_mask))) {
 				if (mf->dst_id == nf->dst_id)
 					return -EEXIST;
-				/* Same Flow, Different queue
+				/*
+				 * Same Flow, Different queue
 				 * Clear the old ntuple filter
+				 * Reuse the matching L2 filter
+				 * ID for the new filter
 				 */
+				nf->fw_l2_filter_id = mf->fw_l2_filter_id;
 				if (nf->filter_type == HWRM_CFA_EM_FILTER)
 					bnxt_hwrm_clear_em_filter(bp, mf);
 				if (nf->filter_type == HWRM_CFA_NTUPLE_FILTER)
-- 
2.17.1

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

* [dpdk-stable] patch 'net/bnxt: fix Rx ring count limitation' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (68 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix to move a flow to a different queue' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: use correct flags during VLAN configuration' " Christian Ehrhardt
                   ` (105 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 2574806dcff56d0b04ee5d7641ff941b0bdf25b3 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 28 Jun 2018 13:15:48 -0700
Subject: [PATCH] net/bnxt: fix Rx ring count limitation

[ upstream commit 0a256e4a548b849be5c13f5c18046f3910584245 ]

Fixed size of fw_grp_ids in VNIC is limiting the number of Rx rings
being created. With this patch we are allocating fw_grp_ids dynamically,
allowing us to get over this artificial limit.

Fixes: 9738793f28ec ("net/bnxt: add VNIC functions and structs")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 11 +++++++++++
 drivers/net/bnxt/bnxt_hwrm.c   |  5 ++++-
 drivers/net/bnxt/bnxt_vnic.c   |  5 +----
 drivers/net/bnxt/bnxt_vnic.h   |  6 +-----
 4 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 7cdabb1ec..8c483346e 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -245,6 +245,17 @@ static int bnxt_init_chip(struct bnxt *bp)
 	/* VNIC configuration */
 	for (i = 0; i < bp->nr_vnics; i++) {
 		struct bnxt_vnic_info *vnic = &bp->vnic_info[i];
+		uint32_t size = sizeof(*vnic->fw_grp_ids) * bp->max_ring_grps;
+
+		vnic->fw_grp_ids = rte_zmalloc("vnic_fw_grp_ids", size, 0);
+		if (!vnic->fw_grp_ids) {
+			PMD_DRV_LOG(ERR,
+				    "Failed to alloc %d bytes for group ids\n",
+				    size);
+			rc = -ENOMEM;
+			goto err_out;
+		}
+		memset(vnic->fw_grp_ids, -1, size);
 
 		rc = bnxt_hwrm_vnic_alloc(bp, vnic);
 		if (rc) {
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index ebea5118d..65684dac2 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1266,8 +1266,9 @@ int bnxt_hwrm_vnic_alloc(struct bnxt *bp, struct bnxt_vnic_info *vnic)
 	/* map ring groups to this vnic */
 	PMD_DRV_LOG(DEBUG, "Alloc VNIC. Start %x, End %x\n",
 		vnic->start_grp_id, vnic->end_grp_id);
-	for (i = vnic->start_grp_id, j = 0; i <= vnic->end_grp_id; i++, j++)
+	for (i = vnic->start_grp_id, j = 0; i < vnic->end_grp_id; i++, j++)
 		vnic->fw_grp_ids[j] = bp->grp_info[i].fw_grp_id;
+
 	vnic->dflt_ring_grp = bp->grp_info[vnic->start_grp_id].fw_grp_id;
 	vnic->rss_rule = (uint16_t)HWRM_NA_SIGNATURE;
 	vnic->cos_rule = (uint16_t)HWRM_NA_SIGNATURE;
@@ -2063,6 +2064,8 @@ void bnxt_free_all_hwrm_resources(struct bnxt *bp)
 		bnxt_hwrm_vnic_tpa_cfg(bp, vnic, false);
 
 		bnxt_hwrm_vnic_free(bp, vnic);
+
+		rte_free(vnic->fw_grp_ids);
 	}
 	/* Ring resources */
 	bnxt_free_all_hwrm_rings(bp);
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index 19d06af55..c0577cd76 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -39,7 +39,7 @@ void bnxt_init_vnics(struct bnxt *bp)
 {
 	struct bnxt_vnic_info *vnic;
 	uint16_t max_vnics;
-	int i, j;
+	int i;
 
 	max_vnics = bp->max_vnics;
 	STAILQ_INIT(&bp->free_vnic_list);
@@ -52,9 +52,6 @@ void bnxt_init_vnics(struct bnxt *bp)
 		vnic->hash_mode =
 			HWRM_VNIC_RSS_CFG_INPUT_HASH_MODE_FLAGS_DEFAULT;
 
-		for (j = 0; j < MAX_QUEUES_PER_VNIC; j++)
-			vnic->fw_grp_ids[j] = (uint16_t)HWRM_NA_SIGNATURE;
-
 		prandom_bytes(vnic->rss_hash_key, HW_HASH_KEY_SIZE);
 		STAILQ_INIT(&vnic->filter);
 		STAILQ_INIT(&vnic->flow_list);
diff --git a/drivers/net/bnxt/bnxt_vnic.h b/drivers/net/bnxt/bnxt_vnic.h
index c521d7e5a..9029f78c3 100644
--- a/drivers/net/bnxt/bnxt_vnic.h
+++ b/drivers/net/bnxt/bnxt_vnic.h
@@ -15,13 +15,9 @@ struct bnxt_vnic_info {
 
 	uint16_t	fw_vnic_id; /* returned by Chimp during alloc */
 	uint16_t	rss_rule;
-#define MAX_NUM_TRAFFIC_CLASSES		8
-#define MAX_NUM_RSS_QUEUES_PER_VNIC	16
-#define MAX_QUEUES_PER_VNIC	(MAX_NUM_RSS_QUEUES_PER_VNIC + \
-				 MAX_NUM_TRAFFIC_CLASSES)
 	uint16_t	start_grp_id;
 	uint16_t	end_grp_id;
-	uint16_t	fw_grp_ids[MAX_QUEUES_PER_VNIC];
+	uint16_t	*fw_grp_ids;
 	uint16_t	dflt_ring_grp;
 	uint16_t	mru;
 	uint16_t	hash_type;
-- 
2.17.1

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

* [dpdk-stable] patch 'net/bnxt: use correct flags during VLAN configuration' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (69 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix Rx ring count limitation' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/enic: fix receive packet types' " Christian Ehrhardt
                   ` (104 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 982e59f619cecae450ad7a2d1be771b6c61e1bce Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Thu, 28 Jun 2018 13:15:49 -0700
Subject: [PATCH] net/bnxt: use correct flags during VLAN configuration

[ upstream commit 246c5cc5f05e337782aed9afcf8dc61fe971fa52 ]

Setting of VLAN filter cmd was being done with incorrect flag value.
We need to use inner vlan fields instead of outer vlan.

Fixes: 7fe5668d2ea3 ("net/bnxt: support VLAN filter and strip")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 10 +++++-----
 drivers/net/bnxt/bnxt_hwrm.c   |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 8c483346e..d4866490c 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1301,9 +1301,9 @@ static int bnxt_add_vlan_filter(struct bnxt *bp, uint16_t vlan_id)
 	struct bnxt_vnic_info *vnic;
 	unsigned int i;
 	int rc = 0;
-	uint32_t en = HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_OVLAN |
-		HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_OVLAN_MASK;
-	uint32_t chk = HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_OVLAN;
+	uint32_t en = HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN |
+		HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN_MASK;
+	uint32_t chk = HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN;
 
 	/* Cycle through all VNICs */
 	for (i = 0; i < bp->nr_vnics; i++) {
@@ -1350,8 +1350,8 @@ static int bnxt_add_vlan_filter(struct bnxt *bp, uint16_t vlan_id)
 				memcpy(new_filter->l2_addr, filter->l2_addr,
 				       ETHER_ADDR_LEN);
 				/* MAC + VLAN ID filter */
-				new_filter->l2_ovlan = vlan_id;
-				new_filter->l2_ovlan_mask = 0xF000;
+				new_filter->l2_ivlan = vlan_id;
+				new_filter->l2_ivlan_mask = 0xF000;
 				new_filter->enables |= en;
 				rc = bnxt_hwrm_set_l2_filter(bp,
 							     vnic->fw_vnic_id,
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 65684dac2..5e8b14c41 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -376,13 +376,13 @@ int bnxt_hwrm_set_l2_filter(struct bnxt *bp,
 		req.l2_ovlan = filter->l2_ovlan;
 	if (enables &
 	    HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN)
-		req.l2_ovlan = filter->l2_ivlan;
+		req.l2_ivlan = filter->l2_ivlan;
 	if (enables &
 	    HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_OVLAN_MASK)
 		req.l2_ovlan_mask = filter->l2_ovlan_mask;
 	if (enables &
 	    HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN_MASK)
-		req.l2_ovlan_mask = filter->l2_ivlan_mask;
+		req.l2_ivlan_mask = filter->l2_ivlan_mask;
 	if (enables & HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_SRC_ID)
 		req.src_id = rte_cpu_to_le_32(filter->src_id);
 	if (enables & HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_SRC_TYPE)
-- 
2.17.1

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

* [dpdk-stable] patch 'net/enic: fix receive packet types' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (70 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: use correct flags during VLAN configuration' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/enic: update the UDP RSS detection mechanism' " Christian Ehrhardt
                   ` (103 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: John Daley, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 4622131992002bfeb98557fec5f028590dbd109d Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim@cisco.com>
Date: Fri, 29 Jun 2018 02:29:30 -0700
Subject: [PATCH] net/enic: fix receive packet types

[ upstream commit 15666e53093b75b1c025aac42faa2d85ded24e0a ]

Fix missing or incorrect packet types discovered by DTS.
- Non-IP inner packets
  Set the tunnel flag.
- Inner Ethernet packets
  All supported tunnel packets have Ethernet as inner packets. So, set
  INNER_L2_ETHER for all tunnel types.
- IPv4 fragments carrying TCP/UDP
  The NIC indicates TCP/UDP based on the protocol in IP header. For
  fragments, ignore that bit and always set L4_FRAG.
- IPv6 fragments
  The NIC does regconize fragments (IPv6 packets with fragment extension
  headers). Set packet types for these.

Fixes: 93fb21fdbe23 ("net/enic: enable overlay offload for VXLAN and GENEVE")

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

diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c
index 8853a2044..bbb0444ad 100644
--- a/drivers/net/enic/enic_rxtx.c
+++ b/drivers/net/enic/enic_rxtx.c
@@ -137,51 +137,81 @@ enic_cq_rx_flags_to_pkt_type(struct cq_desc *cqd, uint8_t tnl)
 	 */
 	static const uint32_t cq_type_table[128] __rte_cache_aligned = {
 		[0x00] = RTE_PTYPE_UNKNOWN,
+		[0x01] = RTE_PTYPE_UNKNOWN |
+			 RTE_PTYPE_TUNNEL_GRENAT |
+			 RTE_PTYPE_INNER_L2_ETHER,
 		[0x20] = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_NONFRAG,
 		[0x21] = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_NONFRAG |
 			 RTE_PTYPE_TUNNEL_GRENAT |
+			 RTE_PTYPE_INNER_L2_ETHER |
 			 RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
 			 RTE_PTYPE_INNER_L4_NONFRAG,
 		[0x22] = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP,
 		[0x23] = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
 			 RTE_PTYPE_TUNNEL_GRENAT |
+			 RTE_PTYPE_INNER_L2_ETHER |
 			 RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
 			 RTE_PTYPE_INNER_L4_UDP,
 		[0x24] = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_TCP,
 		[0x25] = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_TCP |
 			 RTE_PTYPE_TUNNEL_GRENAT |
+			 RTE_PTYPE_INNER_L2_ETHER |
 			 RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
 			 RTE_PTYPE_INNER_L4_TCP,
 		[0x60] = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_FRAG,
 		[0x61] = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_FRAG |
 			 RTE_PTYPE_TUNNEL_GRENAT |
+			 RTE_PTYPE_INNER_L2_ETHER |
 			 RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
 			 RTE_PTYPE_INNER_L4_FRAG,
-		[0x62] = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP,
-		[0x63] = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
+		[0x62] = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_FRAG,
+		[0x63] = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_FRAG |
 			 RTE_PTYPE_TUNNEL_GRENAT |
+			 RTE_PTYPE_INNER_L2_ETHER |
 			 RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
-			 RTE_PTYPE_INNER_L4_UDP,
-		[0x64] = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_TCP,
-		[0x65] = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_TCP |
+			 RTE_PTYPE_INNER_L4_FRAG,
+		[0x64] = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_FRAG,
+		[0x65] = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_L4_FRAG |
 			 RTE_PTYPE_TUNNEL_GRENAT |
+			 RTE_PTYPE_INNER_L2_ETHER |
 			 RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
-			 RTE_PTYPE_INNER_L4_TCP,
+			 RTE_PTYPE_INNER_L4_FRAG,
 		[0x10] = RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | RTE_PTYPE_L4_NONFRAG,
 		[0x11] = RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | RTE_PTYPE_L4_NONFRAG |
 			 RTE_PTYPE_TUNNEL_GRENAT |
+			 RTE_PTYPE_INNER_L2_ETHER |
 			 RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
 			 RTE_PTYPE_INNER_L4_NONFRAG,
 		[0x12] = RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | RTE_PTYPE_L4_UDP,
 		[0x13] = RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | RTE_PTYPE_L4_UDP |
 			 RTE_PTYPE_TUNNEL_GRENAT |
+			 RTE_PTYPE_INNER_L2_ETHER |
 			 RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
 			 RTE_PTYPE_INNER_L4_UDP,
 		[0x14] = RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | RTE_PTYPE_L4_TCP,
 		[0x15] = RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | RTE_PTYPE_L4_TCP |
 			 RTE_PTYPE_TUNNEL_GRENAT |
+			 RTE_PTYPE_INNER_L2_ETHER |
 			 RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
 			 RTE_PTYPE_INNER_L4_TCP,
+		[0x50] = RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | RTE_PTYPE_L4_FRAG,
+		[0x51] = RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | RTE_PTYPE_L4_FRAG |
+			 RTE_PTYPE_TUNNEL_GRENAT |
+			 RTE_PTYPE_INNER_L2_ETHER |
+			 RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
+			 RTE_PTYPE_INNER_L4_FRAG,
+		[0x52] = RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | RTE_PTYPE_L4_FRAG,
+		[0x53] = RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | RTE_PTYPE_L4_FRAG |
+			 RTE_PTYPE_TUNNEL_GRENAT |
+			 RTE_PTYPE_INNER_L2_ETHER |
+			 RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
+			 RTE_PTYPE_INNER_L4_FRAG,
+		[0x54] = RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | RTE_PTYPE_L4_FRAG,
+		[0x55] = RTE_PTYPE_L3_IPV6_EXT_UNKNOWN | RTE_PTYPE_L4_FRAG |
+			 RTE_PTYPE_TUNNEL_GRENAT |
+			 RTE_PTYPE_INNER_L2_ETHER |
+			 RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
+			 RTE_PTYPE_INNER_L4_FRAG,
 		/* All others reserved */
 	};
 	cqrd_flags &= CQ_ENET_RQ_DESC_FLAGS_IPV4_FRAGMENT
-- 
2.17.1

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

* [dpdk-stable] patch 'net/enic: update the UDP RSS detection mechanism' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (71 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/enic: fix receive packet types' " Christian Ehrhardt
@ 2018-07-30 16:11 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/enic: do not overwrite admin Tx queue limit' " Christian Ehrhardt
                   ` (102 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:11 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: John Daley, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 094fcec30e786b952a0c294ca9ce929a2315de7a Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim@cisco.com>
Date: Fri, 29 Jun 2018 02:29:31 -0700
Subject: [PATCH] net/enic: update the UDP RSS detection mechanism

[ upstream commit 5bc989e6db9df8acbf8129a4ea4a78d8614944f7 ]

The UDP RSS interface has changed in the release firmware for 100G VIC
adapters. The capability bit is now in NIC_CFG. Also the driver is
supposed to use CMD_NIC_CFG_CHK and check if RSS config is
successful. No more changes are expected with respect to UDP RSS API.

Fixes: 94c351895888 ("net/enic: update UDP RSS controls")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/base/vnic_dev.c    | 16 ++++++++++++++++
 drivers/net/enic/base/vnic_dev.h    |  4 ++++
 drivers/net/enic/base/vnic_devcmd.h | 23 ++++++++++++++++++++++-
 drivers/net/enic/base/vnic_enet.h   |  5 ++---
 drivers/net/enic/base/vnic_nic.h    |  4 ++--
 drivers/net/enic/enic.h             |  2 ++
 drivers/net/enic/enic_main.c        |  9 ++++++---
 drivers/net/enic/enic_res.c         | 11 +++++++----
 8 files changed, 61 insertions(+), 13 deletions(-)

diff --git a/drivers/net/enic/base/vnic_dev.c b/drivers/net/enic/base/vnic_dev.c
index 8483f76f3..16e8814a6 100644
--- a/drivers/net/enic/base/vnic_dev.c
+++ b/drivers/net/enic/base/vnic_dev.c
@@ -528,6 +528,22 @@ parse_max_level:
 	return 0;
 }
 
+void vnic_dev_capable_udp_rss_weak(struct vnic_dev *vdev, bool *cfg_chk,
+				   bool *weak)
+{
+	u64 a0 = CMD_NIC_CFG, a1 = 0;
+	int wait = 1000;
+	int err;
+
+	*cfg_chk = false;
+	*weak = false;
+	err = vnic_dev_cmd(vdev, CMD_CAPABILITY, &a0, &a1, wait);
+	if (err == 0 && a0 != 0 && a1 != 0) {
+		*cfg_chk = true;
+		*weak = !!((a1 >> 32) & CMD_NIC_CFG_CAPF_UDP_WEAK);
+	}
+}
+
 int vnic_dev_capable(struct vnic_dev *vdev, enum vnic_devcmd_cmd cmd)
 {
 	u64 a0 = (u32)cmd, a1 = 0;
diff --git a/drivers/net/enic/base/vnic_dev.h b/drivers/net/enic/base/vnic_dev.h
index 3c9084304..270a47bd2 100644
--- a/drivers/net/enic/base/vnic_dev.h
+++ b/drivers/net/enic/base/vnic_dev.h
@@ -6,6 +6,8 @@
 #ifndef _VNIC_DEV_H_
 #define _VNIC_DEV_H_
 
+#include <stdbool.h>
+
 #include <rte_pci.h>
 #include <rte_bus_pci.h>
 
@@ -109,6 +111,8 @@ int vnic_dev_capable_adv_filters(struct vnic_dev *vdev);
 int vnic_dev_capable(struct vnic_dev *vdev, enum vnic_devcmd_cmd cmd);
 int vnic_dev_capable_filter_mode(struct vnic_dev *vdev, u32 *mode,
 				 u8 *filter_actions);
+void vnic_dev_capable_udp_rss_weak(struct vnic_dev *vdev, bool *cfg_chk,
+				   bool *weak);
 int vnic_dev_asic_info(struct vnic_dev *vdev, u16 *asic_type, u16 *asic_rev);
 int vnic_dev_spec(struct vnic_dev *vdev, unsigned int offset, size_t size,
 	void *value);
diff --git a/drivers/net/enic/base/vnic_devcmd.h b/drivers/net/enic/base/vnic_devcmd.h
index 2865eb4d4..a22d8a76c 100644
--- a/drivers/net/enic/base/vnic_devcmd.h
+++ b/drivers/net/enic/base/vnic_devcmd.h
@@ -138,9 +138,27 @@ enum vnic_devcmd_cmd {
 	/* del VLAN id in (u16)a0 */
 	CMD_VLAN_DEL            = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 15),
 
-	/* nic_cfg in (u32)a0 */
+	/*
+	 * nic_cfg in (u32)a0
+	 *
+	 * Capability query:
+	 * out: (u64) a0= 1 if a1 is valid
+	 *      (u64) a1= (NIC_CFG bits supported) | (flags << 32)
+	 *                              (flags are CMD_NIC_CFG_CAPF_xxx)
+	 */
 	CMD_NIC_CFG             = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 16),
 
+	/*
+	 * nic_cfg_chk  (same as nic_cfg, but may return error)
+	 * in (u32)a0
+	 *
+	 * Capability query:
+	 * out: (u64) a0= 1 if a1 is valid
+	 *      (u64) a1= (NIC_CFG bits supported) | (flags << 32)
+	 *                              (flags are CMD_NIC_CFG_CAPF_xxx)
+	 */
+	CMD_NIC_CFG_CHK         = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 16),
+
 	/* union vnic_rss_key in mem: (u64)a0=paddr, (u16)a1=len */
 	CMD_RSS_KEY             = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 17),
 
@@ -605,6 +623,9 @@ enum filter_cap_mode {
 /* flags for CMD_INIT */
 #define CMD_INITF_DEFAULT_MAC	0x1	/* init with default mac addr */
 
+/* flags for CMD_NIC_CFG */
+#define CMD_NIC_CFG_CAPF_UDP_WEAK	(1ULL << 0) /* Bodega-style UDP RSS */
+
 /* flags for CMD_PACKET_FILTER */
 #define CMD_PFILTER_DIRECTED		0x01
 #define CMD_PFILTER_MULTICAST		0x02
diff --git a/drivers/net/enic/base/vnic_enet.h b/drivers/net/enic/base/vnic_enet.h
index 49504a7da..901f3b46e 100644
--- a/drivers/net/enic/base/vnic_enet.h
+++ b/drivers/net/enic/base/vnic_enet.h
@@ -53,9 +53,8 @@ struct vnic_enet_config {
 #define VENETF_NVGRE    0x20000 /* NVGRE offload */
 #define VENETF_GRPINTR  0x40000 /* group interrupt */
 #define VENETF_NICSWITCH        0x80000 /* NICSWITCH enabled */
-#define VENETF_RSSHASH_UDP_WEAK 0x100000 /* VIC has Bodega-style UDP RSS */
-#define VENETF_RSSHASH_UDPIPV4  0x200000 /* Hash on UDP + IPv4 fields */
-#define VENETF_RSSHASH_UDPIPV6  0x400000 /* Hash on UDP + IPv6 fields */
+#define VENETF_RSSHASH_UDPIPV4  0x100000 /* Hash on UDP + IPv4 fields */
+#define VENETF_RSSHASH_UDPIPV6  0x200000 /* Hash on UDP + IPv6 fields */
 
 #define VENET_INTR_TYPE_MIN	0	/* Timer specs min interrupt spacing */
 #define VENET_INTR_TYPE_IDLE	1	/* Timer specs idle time before irq */
diff --git a/drivers/net/enic/base/vnic_nic.h b/drivers/net/enic/base/vnic_nic.h
index e318d0cb5..160408522 100644
--- a/drivers/net/enic/base/vnic_nic.h
+++ b/drivers/net/enic/base/vnic_nic.h
@@ -32,8 +32,8 @@
 #define NIC_CFG_RSS_HASH_TYPE_TCP_IPV4		(1 << 2)
 #define NIC_CFG_RSS_HASH_TYPE_IPV6		(1 << 3)
 #define NIC_CFG_RSS_HASH_TYPE_TCP_IPV6		(1 << 4)
-#define NIC_CFG_RSS_HASH_TYPE_IPV6_EX		(1 << 5)
-#define NIC_CFG_RSS_HASH_TYPE_TCP_IPV6_EX	(1 << 6)
+#define NIC_CFG_RSS_HASH_TYPE_RSVD1		(1 << 5)
+#define NIC_CFG_RSS_HASH_TYPE_RSVD2		(1 << 6)
 #define NIC_CFG_RSS_HASH_TYPE_UDP_IPV6		(1 << 7)
 
 static inline void vnic_set_nic_cfg(u32 *nic_cfg,
diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h
index ee83fe573..ea0a688d3 100644
--- a/drivers/net/enic/enic.h
+++ b/drivers/net/enic/enic.h
@@ -123,6 +123,8 @@ struct enic {
 	u8 filter_actions; /* HW supported actions */
 	bool vxlan;
 	bool disable_overlay; /* devargs disable_overlay=1 */
+	bool nic_cfg_chk;     /* NIC_CFG_CHK available */
+	bool udp_rss_weak;    /* Bodega style UDP RSS */
 
 	unsigned int flags;
 	unsigned int priv_flags;
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index a25d303de..899603fa7 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1197,7 +1197,7 @@ int enic_set_rss_conf(struct enic *enic, struct rte_eth_rss_conf *rss_conf)
 			rss_hash_type |= NIC_CFG_RSS_HASH_TYPE_TCP_IPV4;
 		if (rss_hf & ETH_RSS_NONFRAG_IPV4_UDP) {
 			rss_hash_type |= NIC_CFG_RSS_HASH_TYPE_UDP_IPV4;
-			if (ENIC_SETTING(enic, RSSHASH_UDP_WEAK)) {
+			if (enic->udp_rss_weak) {
 				/*
 				 * 'TCP' is not a typo. The "weak" version of
 				 * UDP RSS requires both the TCP and UDP bits
@@ -1213,7 +1213,7 @@ int enic_set_rss_conf(struct enic *enic, struct rte_eth_rss_conf *rss_conf)
 			rss_hash_type |= NIC_CFG_RSS_HASH_TYPE_TCP_IPV6;
 		if (rss_hf & (ETH_RSS_NONFRAG_IPV6_UDP | ETH_RSS_IPV6_UDP_EX)) {
 			rss_hash_type |= NIC_CFG_RSS_HASH_TYPE_UDP_IPV6;
-			if (ENIC_SETTING(enic, RSSHASH_UDP_WEAK))
+			if (enic->udp_rss_weak)
 				rss_hash_type |= NIC_CFG_RSS_HASH_TYPE_TCP_IPV6;
 		}
 	} else {
@@ -1237,8 +1237,11 @@ int enic_set_rss_conf(struct enic *enic, struct rte_eth_rss_conf *rss_conf)
 		enic->rss_hf = rss_hf;
 		enic->rss_hash_type = rss_hash_type;
 		enic->rss_enable = rss_enable;
+	} else {
+		dev_err(enic, "Failed to update RSS configurations."
+			" hash=0x%x\n", rss_hash_type);
 	}
-	return 0;
+	return ret;
 }
 
 int enic_set_vlan_strip(struct enic *enic)
diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c
index 6b404c3c0..d1113b2f1 100644
--- a/drivers/net/enic/enic_res.c
+++ b/drivers/net/enic/enic_res.c
@@ -82,6 +82,8 @@ int enic_get_vnic_config(struct enic *enic)
 			"Error getting filter modes, %d\n", err);
 		return err;
 	}
+	vnic_dev_capable_udp_rss_weak(enic->vdev, &enic->nic_cfg_chk,
+				      &enic->udp_rss_weak);
 
 	dev_info(enic, "Flow api filter mode: %s Actions: %s%s%s\n",
 		((enic->flow_filter_mode == FILTER_DPDK_1) ? "DPDK" :
@@ -124,7 +126,7 @@ int enic_get_vnic_config(struct enic *enic)
 		ENIC_SETTING(enic, RXCSUM) ? "yes" : "no",
 		ENIC_SETTING(enic, RSS) ?
 			(ENIC_SETTING(enic, RSSHASH_UDPIPV4) ? "+UDP" :
-			((ENIC_SETTING(enic, RSSHASH_UDP_WEAK) ? "+udp" :
+			((enic->udp_rss_weak ? "+udp" :
 			"yes"))) : "no",
 		c->intr_mode == VENET_INTR_MODE_INTX ? "INTx" :
 		c->intr_mode == VENET_INTR_MODE_MSI ? "MSI" :
@@ -161,7 +163,7 @@ int enic_get_vnic_config(struct enic *enic)
 	if (ENIC_SETTING(enic, RSSHASH_TCPIPV6))
 		enic->flow_type_rss_offloads |= ETH_RSS_NONFRAG_IPV6_TCP |
 			ETH_RSS_IPV6_TCP_EX;
-	if (ENIC_SETTING(enic, RSSHASH_UDP_WEAK))
+	if (enic->udp_rss_weak)
 		enic->flow_type_rss_offloads |=
 			ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_NONFRAG_IPV6_UDP |
 			ETH_RSS_IPV6_UDP_EX;
@@ -235,6 +237,7 @@ int enic_set_nic_cfg(struct enic *enic, u8 rss_default_cpu, u8 rss_hash_type,
 	u8 rss_hash_bits, u8 rss_base_cpu, u8 rss_enable, u8 tso_ipid_split_en,
 	u8 ig_vlan_strip_en)
 {
+	enum vnic_devcmd_cmd cmd;
 	u64 a0, a1;
 	u32 nic_cfg;
 	int wait = 1000;
@@ -245,8 +248,8 @@ int enic_set_nic_cfg(struct enic *enic, u8 rss_default_cpu, u8 rss_hash_type,
 
 	a0 = nic_cfg;
 	a1 = 0;
-
-	return vnic_dev_cmd(enic->vdev, CMD_NIC_CFG, &a0, &a1, wait);
+	cmd = enic->nic_cfg_chk ? CMD_NIC_CFG_CHK : CMD_NIC_CFG;
+	return vnic_dev_cmd(enic->vdev, cmd, &a0, &a1, wait);
 }
 
 int enic_set_rss_key(struct enic *enic, dma_addr_t key_pa, u64 len)
-- 
2.17.1

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

* [dpdk-stable] patch 'net/enic: do not overwrite admin Tx queue limit' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (72 preceding siblings ...)
  2018-07-30 16:11 ` [dpdk-stable] patch 'net/enic: update the UDP RSS detection mechanism' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/enic: initialize RQ fetch index before enabling RQ' " Christian Ehrhardt
                   ` (101 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: John Daley, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 04b10906c49b86391c8a56798cf6934f10c25f40 Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim@cisco.com>
Date: Fri, 29 Jun 2018 02:29:32 -0700
Subject: [PATCH] net/enic: do not overwrite admin Tx queue limit

[ upstream commit 2a7e3d54659cd12d337ad816dcf202eec1af1367 ]

Currently, enic_alloc_wq (via rte_eth_tx_queue_setup) may overwrite
the admin limit with a lower value. This is wrong as seen in the
following sequence.

1. UCS admin-set Tx queue limit (config.wq_desc_count) = 4096
2. Set up tx queue with 512 descriptors
   The admin limit (config.wq_desc_count) becomes 512.
3. Stop ports and now set up Tx queue with 1024 descriptors.
   This fails because 1024 is greater than the admin limit (512).

Do not modify the admin limit, and when queried, report the current
number of descriptors instead of the admin limit. The rx queue setup
(enic_alloc_rq) does not this problem.

Fixes: fefed3d1e62c ("enic: new driver")

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

diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 286308924..6ebad8d96 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -731,13 +731,14 @@ static void enicpmd_dev_rxq_info_get(struct rte_eth_dev *dev,
 }
 
 static void enicpmd_dev_txq_info_get(struct rte_eth_dev *dev,
-				     __rte_unused uint16_t tx_queue_id,
+				     uint16_t tx_queue_id,
 				     struct rte_eth_txq_info *qinfo)
 {
 	struct enic *enic = pmd_priv(dev);
+	struct vnic_wq *wq = &enic->wq[tx_queue_id];
 
 	ENICPMD_FUNC_TRACE();
-	qinfo->nb_desc = enic->config.wq_desc_count;
+	qinfo->nb_desc = wq->ring.desc_count;
 	memset(&qinfo->conf, 0, sizeof(qinfo->conf));
 	qinfo->conf.offloads = enic->tx_offload_capa;
 	/* tx_thresh, and all the other fields are not applicable for enic */
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 899603fa7..aba2ff5a7 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -869,25 +869,23 @@ int enic_alloc_wq(struct enic *enic, uint16_t queue_idx,
 	static int instance;
 
 	wq->socket_id = socket_id;
-	if (nb_desc) {
-		if (nb_desc > enic->config.wq_desc_count) {
-			dev_warning(enic,
-				"WQ %d - number of tx desc in cmd line (%d)"\
-				"is greater than that in the UCSM/CIMC adapter"\
-				"policy.  Applying the value in the adapter "\
-				"policy (%d)\n",
-				queue_idx, nb_desc, enic->config.wq_desc_count);
-		} else if (nb_desc != enic->config.wq_desc_count) {
-			enic->config.wq_desc_count = nb_desc;
-			dev_info(enic,
-				"TX Queues - effective number of descs:%d\n",
-				nb_desc);
-		}
+	if (nb_desc > enic->config.wq_desc_count) {
+		dev_warning(enic,
+			    "WQ %d - number of tx desc in cmd line (%d) "
+			    "is greater than that in the UCSM/CIMC adapter "
+			    "policy.  Applying the value in the adapter "
+			    "policy (%d)\n",
+			    queue_idx, nb_desc, enic->config.wq_desc_count);
+		nb_desc = enic->config.wq_desc_count;
+	} else if (nb_desc != enic->config.wq_desc_count) {
+		dev_info(enic,
+			 "TX Queues - effective number of descs:%d\n",
+			 nb_desc);
 	}
 
 	/* Allocate queue resources */
 	err = vnic_wq_alloc(enic->vdev, &enic->wq[queue_idx], queue_idx,
-		enic->config.wq_desc_count,
+		nb_desc,
 		sizeof(struct wq_enet_desc));
 	if (err) {
 		dev_err(enic, "error in allocation of wq\n");
@@ -895,7 +893,7 @@ int enic_alloc_wq(struct enic *enic, uint16_t queue_idx,
 	}
 
 	err = vnic_cq_alloc(enic->vdev, &enic->cq[cq_index], cq_index,
-		socket_id, enic->config.wq_desc_count,
+		socket_id, nb_desc,
 		sizeof(struct cq_enet_wq_desc));
 	if (err) {
 		vnic_wq_free(wq);
-- 
2.17.1

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

* [dpdk-stable] patch 'net/enic: initialize RQ fetch index before enabling RQ' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (73 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/enic: do not overwrite admin Tx queue limit' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/sfc: cut non VLAN ID bits from TCI' " Christian Ehrhardt
                   ` (100 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: John Daley, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From cc55940370fbd614bea804fa6716e5e647a479c3 Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim@cisco.com>
Date: Fri, 29 Jun 2018 02:29:33 -0700
Subject: [PATCH] net/enic: initialize RQ fetch index before enabling RQ

[ upstream commit 1c7c3ad1a001239c78403ab0155ef2b3f4a4fa37 ]

The fetch index must be initialized only when RQ is
disabled. Otherwise, it may lead to stale entries in IG descriptor
cache on the VIC.

Fixes: a74629cfa3a1 ("net/enic: enable RQ first and then post Rx buffers")

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

diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index aba2ff5a7..863d2463c 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -320,6 +320,8 @@ enic_alloc_rx_queue_mbufs(struct enic *enic, struct vnic_rq *rq)
 	 * enic_start_rq().
 	 */
 	rq->need_initial_post = true;
+	/* Initialize fetch index while RQ is disabled */
+	iowrite32(0, &rq->ctrl->fetch_index);
 	return 0;
 }
 
@@ -345,7 +347,6 @@ enic_initial_post_rx(struct enic *enic, struct vnic_rq *rq)
 	dev_debug(enic, "port=%u, qidx=%u, Write %u posted idx, %u sw held\n",
 		enic->port_id, rq->index, rq->posted_index, rq->rx_nb_hold);
 	iowrite32(rq->posted_index, &rq->ctrl->posted_index);
-	iowrite32(0, &rq->ctrl->fetch_index);
 	rte_rmb();
 	rq->need_initial_post = false;
 }
-- 
2.17.1

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

* [dpdk-stable] patch 'net/sfc: cut non VLAN ID bits from TCI' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (74 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/enic: initialize RQ fetch index before enabling RQ' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/sfc: discard packets with bad CRC on EF10 ESSB Rx' " Christian Ehrhardt
                   ` (99 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Roman Zhukov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From d4ea23f02750a20acd698a17cba321b0b89f3a6b Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Fri, 29 Jun 2018 16:23:31 +0100
Subject: [PATCH] net/sfc: cut non VLAN ID bits from TCI

[ upstream commit 8028142107a858a146bfdbaa010b7e77ff987342 ]

TCI may contain PCP or DEI bits. Matching of these bits is not
supported, but the bits still may be set in specification value and
not covered by mask. So, these bits should be ignored.

Fixes: 894080975e1e ("net/sfc: support VLAN in flow API filters")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Roman Zhukov <roman.zhukov@oktetlabs.ru>
---
 drivers/net/sfc/sfc_flow.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c
index 5613d59a9..18387415e 100644
--- a/drivers/net/sfc/sfc_flow.c
+++ b/drivers/net/sfc/sfc_flow.c
@@ -371,7 +371,8 @@ sfc_flow_parse_vlan(const struct rte_flow_item *item,
 	 * the outer tag and the next matches the inner tag.
 	 */
 	if (mask->tci == supp_mask.tci) {
-		vid = rte_bswap16(spec->tci);
+		/* Apply mask to keep VID only */
+		vid = rte_bswap16(spec->tci & mask->tci);
 
 		if (!(efx_spec->efs_match_flags &
 		      EFX_FILTER_MATCH_OUTER_VID)) {
-- 
2.17.1

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

* [dpdk-stable] patch 'net/sfc: discard packets with bad CRC on EF10 ESSB Rx' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (75 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/sfc: cut non VLAN ID bits from TCI' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/sfc: fix double-free in EF10 ESSB Rx queue purge' " Christian Ehrhardt
                   ` (98 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Ivan Malov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 8a1cc21102b0fcebf6e82aa0931390219bf22866 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Fri, 29 Jun 2018 16:27:05 +0100
Subject: [PATCH] net/sfc: discard packets with bad CRC on EF10 ESSB Rx

[ upstream commit aeeb5571eeb213ddf9b42a37b620acfa39c1e4bf ]

Fixes: 390f9b8d82c9 ("net/sfc: support equal stride super-buffer Rx mode")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
---
 drivers/net/sfc/sfc_ef10_essb_rx.c | 7 +++++++
 drivers/net/sfc/sfc_ef10_rx_ev.h   | 6 +++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_ef10_essb_rx.c b/drivers/net/sfc/sfc_ef10_essb_rx.c
index 5f5af602c..a3b988fcf 100644
--- a/drivers/net/sfc/sfc_ef10_essb_rx.c
+++ b/drivers/net/sfc/sfc_ef10_essb_rx.c
@@ -322,6 +322,12 @@ sfc_ef10_essb_rx_get_pending(struct sfc_ef10_essb_rxq *rxq,
 			const efx_qword_t *qwordp;
 			uint16_t pkt_len;
 
+			/* Buffers to be discarded have 0 in packet type */
+			if (unlikely(m->packet_type == 0)) {
+				rte_mempool_put(rxq->refill_mb_pool, m);
+				goto next_buf;
+			}
+
 			rx_pkts[n_rx_pkts++] = m;
 
 			/* Parse pseudo-header */
@@ -357,6 +363,7 @@ sfc_ef10_essb_rx_get_pending(struct sfc_ef10_essb_rxq *rxq,
 				EFX_QWORD_FIELD(*qwordp,
 						ES_EZ_ESSB_RX_PREFIX_MARK);
 
+next_buf:
 			m = sfc_ef10_essb_next_mbuf(rxq, m);
 		} while (todo_bufs-- > 0);
 	}
diff --git a/drivers/net/sfc/sfc_ef10_rx_ev.h b/drivers/net/sfc/sfc_ef10_rx_ev.h
index 615bd29b4..37b40056e 100644
--- a/drivers/net/sfc/sfc_ef10_rx_ev.h
+++ b/drivers/net/sfc/sfc_ef10_rx_ev.h
@@ -37,8 +37,10 @@ sfc_ef10_rx_ev_to_offloads(const efx_qword_t rx_ev, struct rte_mbuf *m,
 	if (unlikely(rx_ev.eq_u64[0] &
 		rte_cpu_to_le_64((1ull << ESF_DZ_RX_ECC_ERR_LBN) |
 				 (1ull << ESF_DZ_RX_ECRC_ERR_LBN) |
-				 (1ull << ESF_DZ_RX_PARSE_INCOMPLETE_LBN))))
+				 (1ull << ESF_DZ_RX_PARSE_INCOMPLETE_LBN)))) {
+		/* Zero packet type is used as a marker to dicard bad packets */
 		goto done;
+	}
 
 #if SFC_EF10_RX_EV_ENCAP_SUPPORT
 	switch (EFX_QWORD_FIELD(rx_ev, ESF_EZ_RX_ENCAP_HDR)) {
@@ -157,6 +159,8 @@ sfc_ef10_rx_ev_to_offloads(const efx_qword_t rx_ev, struct rte_mbuf *m,
 		SFC_ASSERT(false);
 	}
 
+	SFC_ASSERT(l2_ptype != 0);
+
 done:
 	m->ol_flags = ol_flags & ol_mask;
 	m->packet_type = tun_ptype | l2_ptype | l3_ptype | l4_ptype;
-- 
2.17.1

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

* [dpdk-stable] patch 'net/sfc: fix double-free in EF10 ESSB Rx queue purge' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (76 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/sfc: discard packets with bad CRC on EF10 ESSB Rx' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/fm10k: remove unused constant' " Christian Ehrhardt
                   ` (97 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Ivan Malov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 3af3bae48c9cf96063928ac44720d47f85173d4e Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Fri, 29 Jun 2018 16:41:06 +0100
Subject: [PATCH] net/sfc: fix double-free in EF10 ESSB Rx queue purge

[ upstream commit 20680dae4602d4f71e860c0f7532b1c369aa89b3 ]

Number of buffers left in completed descriptor may be 0. If so,
all buffers of the descriptor are freed once again.

Fixes: 390f9b8d82c9 ("net/sfc: support equal stride super-buffer Rx mode")

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

diff --git a/drivers/net/sfc/sfc_ef10_essb_rx.c b/drivers/net/sfc/sfc_ef10_essb_rx.c
index a3b988fcf..000de2e34 100644
--- a/drivers/net/sfc/sfc_ef10_essb_rx.c
+++ b/drivers/net/sfc/sfc_ef10_essb_rx.c
@@ -654,29 +654,20 @@ static void
 sfc_ef10_essb_rx_qpurge(struct sfc_dp_rxq *dp_rxq)
 {
 	struct sfc_ef10_essb_rxq *rxq = sfc_ef10_essb_rxq_by_dp_rxq(dp_rxq);
-	unsigned int i, j;
+	unsigned int i;
 	const struct sfc_ef10_essb_rx_sw_desc *rxd;
 	struct rte_mbuf *m;
 
-	if (rxq->completed != rxq->added && rxq->left_in_completed > 0) {
-		rxd = &rxq->sw_ring[rxq->completed & rxq->rxq_ptr_mask];
-		m = sfc_ef10_essb_mbuf_by_index(rxq, rxd->first_mbuf,
-				rxq->block_size - rxq->left_in_completed);
-		do {
-			rxq->left_in_completed--;
-			rte_mempool_put(rxq->refill_mb_pool, m);
-			m = sfc_ef10_essb_next_mbuf(rxq, m);
-		} while (rxq->left_in_completed > 0);
-		rxq->completed++;
-	}
-
 	for (i = rxq->completed; i != rxq->added; ++i) {
 		rxd = &rxq->sw_ring[i & rxq->rxq_ptr_mask];
-		m = rxd->first_mbuf;
-		for (j = 0; j < rxq->block_size; ++j) {
+		m = sfc_ef10_essb_mbuf_by_index(rxq, rxd->first_mbuf,
+				rxq->block_size - rxq->left_in_completed);
+		while (rxq->left_in_completed > 0) {
 			rte_mempool_put(rxq->refill_mb_pool, m);
 			m = sfc_ef10_essb_next_mbuf(rxq, m);
+			rxq->left_in_completed--;
 		}
+		rxq->left_in_completed = rxq->block_size;
 	}
 
 	rxq->flags &= ~SFC_EF10_ESSB_RXQ_STARTED;
-- 
2.17.1

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

* [dpdk-stable] patch 'net/fm10k: remove unused constant' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (77 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/sfc: fix double-free in EF10 ESSB Rx queue purge' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/cxgbe: fix Rx channel map and queue type' " Christian Ehrhardt
                   ` (96 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 925421d9b5d4e90723f0cc76a860e8aefb6fb5d5 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Mon, 2 Jul 2018 23:27:49 +0200
Subject: [PATCH] net/fm10k: remove unused constant

[ upstream commit adeddc9c1890a42fafe887d7d1457145310491f6 ]

The macro FM10K_SIMPLE_TX_FLAG was used with old Tx queue flags.
It is no longer used and was forgotten when cleaning old Tx flags.

Fixes: 1778ef67e2e7 ("net/fm10k: remove dependence on Tx queue flags")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/fm10k/fm10k.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/fm10k/fm10k.h b/drivers/net/fm10k/fm10k.h
index ef3078091..a46d427f7 100644
--- a/drivers/net/fm10k/fm10k.h
+++ b/drivers/net/fm10k/fm10k.h
@@ -106,9 +106,6 @@
 #define FM10K_MISC_VEC_ID               RTE_INTR_VEC_ZERO_OFFSET
 #define FM10K_RX_VEC_START              RTE_INTR_VEC_RXTX_OFFSET
 
-#define FM10K_SIMPLE_TX_FLAG ((uint32_t)ETH_TXQ_FLAGS_NOMULTSEGS | \
-				ETH_TXQ_FLAGS_NOOFFLOADS)
-
 struct fm10k_macvlan_filter_info {
 	uint16_t vlan_num;       /* Total VLAN number */
 	uint16_t mac_num;        /* Total mac number */
-- 
2.17.1

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

* [dpdk-stable] patch 'net/cxgbe: fix Rx channel map and queue type' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (78 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/fm10k: remove unused constant' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/cxgbevf: add missing Tx byte counters' " Christian Ehrhardt
                   ` (95 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From dd89212fdb5c50c4240f1155d5b3b857ec84e44f Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Sat, 30 Jun 2018 00:53:54 +0530
Subject: [PATCH] net/cxgbe: fix Rx channel map and queue type

[ upstream commit 3abe17195741436aaeb59af44749cfce988a8d7a ]

Set the Rx channel map and ingress queue type properly to allow firmware
to manage the internal mapping correctly.

Fixes: 6c2809628cd5 ("net/cxgbe: improve latency for slow traffic")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/base/t4fw_interface.h |  8 ++++++++
 drivers/net/cxgbe/cxgbe_compat.h        |  9 ---------
 drivers/net/cxgbe/sge.c                 | 10 +++++++---
 3 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/drivers/net/cxgbe/base/t4fw_interface.h b/drivers/net/cxgbe/base/t4fw_interface.h
index 852e8f3c7..ef3fcb114 100644
--- a/drivers/net/cxgbe/base/t4fw_interface.h
+++ b/drivers/net/cxgbe/base/t4fw_interface.h
@@ -636,6 +636,11 @@ enum fw_iq_type {
 	FW_IQ_TYPE_FL_INT_CAP,
 };
 
+enum fw_iq_iqtype {
+	FW_IQ_IQTYPE_NIC = 1,
+	FW_IQ_IQTYPE_OFLD,
+};
+
 struct fw_iq_cmd {
 	__be32 op_to_vfn;
 	__be32 alloc_to_len16;
@@ -769,6 +774,9 @@ struct fw_iq_cmd {
 	(((x) >> S_FW_IQ_CMD_IQFLINTCONGEN) & M_FW_IQ_CMD_IQFLINTCONGEN)
 #define F_FW_IQ_CMD_IQFLINTCONGEN	V_FW_IQ_CMD_IQFLINTCONGEN(1U)
 
+#define S_FW_IQ_CMD_IQTYPE	24
+#define V_FW_IQ_CMD_IQTYPE(x)	((x) << S_FW_IQ_CMD_IQTYPE)
+
 #define S_FW_IQ_CMD_FL0CNGCHMAP		20
 #define M_FW_IQ_CMD_FL0CNGCHMAP		0xf
 #define V_FW_IQ_CMD_FL0CNGCHMAP(x)	((x) << S_FW_IQ_CMD_FL0CNGCHMAP)
diff --git a/drivers/net/cxgbe/cxgbe_compat.h b/drivers/net/cxgbe/cxgbe_compat.h
index 779bcf165..d33452861 100644
--- a/drivers/net/cxgbe/cxgbe_compat.h
+++ b/drivers/net/cxgbe/cxgbe_compat.h
@@ -198,15 +198,6 @@ static inline int cxgbe_fls(int x)
 	return x ? sizeof(x) * 8 - __builtin_clz(x) : 0;
 }
 
-/**
- * cxgbe_ffs - find first bit set
- * @x: the word to search
- */
-static inline int cxgbe_ffs(int x)
-{
-	return x ? __builtin_ffs(x) : 0;
-}
-
 static inline unsigned long ilog2(unsigned long n)
 {
 	unsigned int e = 0;
diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c
index b5d3611da..7fee2cc1a 100644
--- a/drivers/net/cxgbe/sge.c
+++ b/drivers/net/cxgbe/sge.c
@@ -1764,12 +1764,16 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
 			    F_FW_CMD_WRITE | F_FW_CMD_EXEC);
 
 	if (is_pf4(adap)) {
-		pciechan = cong > 0 ? cxgbe_ffs(cong) - 1 : pi->tx_chan;
+		pciechan = pi->tx_chan;
 		c.op_to_vfn |= htonl(V_FW_IQ_CMD_PFN(adap->pf) |
 				     V_FW_IQ_CMD_VFN(0));
 		if (cong >= 0)
-			c.iqns_to_fl0congen = htonl(F_FW_IQ_CMD_IQFLINTCONGEN |
-						    F_FW_IQ_CMD_IQRO);
+			c.iqns_to_fl0congen =
+				htonl(F_FW_IQ_CMD_IQFLINTCONGEN |
+				      V_FW_IQ_CMD_IQTYPE(cong ?
+							 FW_IQ_IQTYPE_NIC :
+							 FW_IQ_IQTYPE_OFLD) |
+				      F_FW_IQ_CMD_IQRO);
 	} else {
 		pciechan = pi->port_id;
 	}
-- 
2.17.1

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

* [dpdk-stable] patch 'net/cxgbevf: add missing Tx byte counters' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (79 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/cxgbe: fix Rx channel map and queue type' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/bonding: do not clear active slave count' " Christian Ehrhardt
                   ` (94 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 066e395efbfeafde73c25f37489e04bbe3b84c30 Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Sat, 30 Jun 2018 00:53:55 +0530
Subject: [PATCH] net/cxgbevf: add missing Tx byte counters

[ upstream commit d67692bacff307ef0748b1fcd0b155ee6c82f469 ]

Fixes: a0a344a8f728 ("net/cxgbe: add VF port statistics")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/base/t4_regs.h   | 3 +++
 drivers/net/cxgbe/base/t4vf_hw.c   | 6 ++++++
 drivers/net/cxgbe/cxgbevf_ethdev.c | 1 +
 3 files changed, 10 insertions(+)

diff --git a/drivers/net/cxgbe/base/t4_regs.h b/drivers/net/cxgbe/base/t4_regs.h
index c0d6ddcac..48a751411 100644
--- a/drivers/net/cxgbe/base/t4_regs.h
+++ b/drivers/net/cxgbe/base/t4_regs.h
@@ -783,8 +783,11 @@
 #define A_MPS_STAT_RX_BG_3_LB_TRUNC_FRAME_L 0x96b8
 #define A_MPS_STAT_RX_BG_3_LB_TRUNC_FRAME_H 0x96bc
 
+#define A_MPS_VF_STAT_TX_VF_BCAST_BYTES_L 0x80
 #define A_MPS_VF_STAT_TX_VF_BCAST_FRAMES_L 0x88
+#define A_MPS_VF_STAT_TX_VF_MCAST_BYTES_L 0x90
 #define A_MPS_VF_STAT_TX_VF_MCAST_FRAMES_L 0x98
+#define A_MPS_VF_STAT_TX_VF_UCAST_BYTES_L 0xa0
 #define A_MPS_VF_STAT_TX_VF_UCAST_FRAMES_L 0xa8
 #define A_MPS_VF_STAT_TX_VF_DROP_FRAMES_L 0xb0
 #define A_MPS_VF_STAT_RX_VF_BCAST_FRAMES_L 0xd0
diff --git a/drivers/net/cxgbe/base/t4vf_hw.c b/drivers/net/cxgbe/base/t4vf_hw.c
index 9fd0b8791..d96456bbe 100644
--- a/drivers/net/cxgbe/base/t4vf_hw.c
+++ b/drivers/net/cxgbe/base/t4vf_hw.c
@@ -683,6 +683,9 @@ static int t4vf_get_port_stats_fw(struct adapter *adapter, int pidx,
 	/*
 	 * Translate firmware statistics into host native statistics.
 	 */
+	p->tx_octets = be64_to_cpu(fwstats.tx_bcast_bytes) +
+		       be64_to_cpu(fwstats.tx_mcast_bytes) +
+		       be64_to_cpu(fwstats.tx_ucast_bytes);
 	p->tx_bcast_frames = be64_to_cpu(fwstats.tx_bcast_frames);
 	p->tx_mcast_frames = be64_to_cpu(fwstats.tx_mcast_frames);
 	p->tx_ucast_frames = be64_to_cpu(fwstats.tx_ucast_frames);
@@ -722,6 +725,9 @@ void t4vf_get_port_stats(struct adapter *adapter, int pidx,
 #define GET_STAT(name) \
 	t4_read_reg64(adapter, \
 			T4VF_MPS_BASE_ADDR + A_MPS_VF_STAT_##name##_L)
+	p->tx_octets = GET_STAT(TX_VF_BCAST_BYTES) +
+		       GET_STAT(TX_VF_MCAST_BYTES) +
+		       GET_STAT(TX_VF_UCAST_BYTES);
 	p->tx_bcast_frames = GET_STAT(TX_VF_BCAST_FRAMES);
 	p->tx_mcast_frames = GET_STAT(TX_VF_MCAST_FRAMES);
 	p->tx_ucast_frames = GET_STAT(TX_VF_UCAST_FRAMES);
diff --git a/drivers/net/cxgbe/cxgbevf_ethdev.c b/drivers/net/cxgbe/cxgbevf_ethdev.c
index a942ba6b6..43fa75f7a 100644
--- a/drivers/net/cxgbe/cxgbevf_ethdev.c
+++ b/drivers/net/cxgbe/cxgbevf_ethdev.c
@@ -50,6 +50,7 @@ static int cxgbevf_dev_stats_get(struct rte_eth_dev *eth_dev,
 	/* TX Stats */
 	eth_stats->opackets = ps.tx_bcast_frames + ps.tx_mcast_frames +
 			      ps.tx_ucast_frames;
+	eth_stats->obytes = ps.tx_octets;
 	eth_stats->oerrors  = ps.tx_drop;
 
 	for (i = 0; i < pi->n_rx_qsets; i++) {
-- 
2.17.1

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

* [dpdk-stable] patch 'net/bonding: do not clear active slave count' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (80 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/cxgbevf: add missing Tx byte counters' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'doc: fix limitations for dpaa crypto' " Christian Ehrhardt
                   ` (93 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Chas Williams; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 4564a681fc58e0d84a28e1d4ccf1c32d51ff4587 Mon Sep 17 00:00:00 2001
From: Chas Williams <chas3@att.com>
Date: Tue, 3 Jul 2018 22:28:32 -0400
Subject: [PATCH] net/bonding: do not clear active slave count

[ upstream commit 69bce062132bd2b4a943fafbb710215a7999d198 ]

When the bond PMD is stopped, the active slave count is reset.
For 802.3ad mode this potentially leaks memory and clears state since
a second sequential activate_slave() will occur when the bond PMD is
restarted and the LSC callback is triggered while the active slave
count is 0. To fix this, don't clear the active slave count when
stopping. Only deactivate_slave() should be used to clear the slaves.

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

Signed-off-by: Chas Williams <chas3@att.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index f155ff779..756fa0487 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2173,7 +2173,6 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev)
 			tlb_last_obytets[internals->active_slaves[i]] = 0;
 	}
 
-	internals->active_slave_count = 0;
 	internals->link_status_polling_enabled = 0;
 	for (i = 0; i < internals->slave_count; i++)
 		internals->slaves[i].last_link_status = 0;
-- 
2.17.1

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

* [dpdk-stable] patch 'doc: fix limitations for dpaa crypto' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (81 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/bonding: do not clear active slave count' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'doc: fix limitations for dpaa2 " Christian Ehrhardt
                   ` (92 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From b1f956643b9b0164a6314e2fb5e4c4898a15f75b Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Thu, 21 Jun 2018 14:43:40 +0530
Subject: [PATCH] doc: fix limitations for dpaa crypto

[ upstream commit 31ce190ef15ecb8c11e3a505b7497df90d858ac9 ]

Fixes: a74af788c632 ("crypto/dpaa_sec: support scatter gather")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/cryptodevs/dpaa_sec.rst | 1 -
 1 file changed, 1 deletion(-)

diff --git a/doc/guides/cryptodevs/dpaa_sec.rst b/doc/guides/cryptodevs/dpaa_sec.rst
index c14d6d7b1..a6283c7e6 100644
--- a/doc/guides/cryptodevs/dpaa_sec.rst
+++ b/doc/guides/cryptodevs/dpaa_sec.rst
@@ -94,7 +94,6 @@ For blacklisting a DPAA device, following commands can be used.
 Limitations
 -----------
 
-* Chained mbufs are not supported.
 * Hash followed by Cipher mode is not supported
 * Only supports the session-oriented API implementation (session-less APIs are not supported).
 
-- 
2.17.1

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

* [dpdk-stable] patch 'doc: fix limitations for dpaa2 crypto' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (82 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'doc: fix limitations for dpaa crypto' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'crypto/virtio: fix IV physical address' " Christian Ehrhardt
                   ` (91 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 78384ed7a2e201c074c50c6cedee88350c44daa2 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Thu, 21 Jun 2018 14:43:41 +0530
Subject: [PATCH] doc: fix limitations for dpaa2 crypto

[ upstream commit 260014edb510693fea6d7e60c17e9f023a26baf2 ]

Fixes: 37f96eb01bce ("crypto/dpaa2_sec: support scatter gather")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/cryptodevs/dpaa2_sec.rst | 1 -
 1 file changed, 1 deletion(-)

diff --git a/doc/guides/cryptodevs/dpaa2_sec.rst b/doc/guides/cryptodevs/dpaa2_sec.rst
index 3ea24c8aa..86d0a8ddb 100644
--- a/doc/guides/cryptodevs/dpaa2_sec.rst
+++ b/doc/guides/cryptodevs/dpaa2_sec.rst
@@ -148,7 +148,6 @@ Where x is the device object id as configured in resource container.
 Limitations
 -----------
 
-* Chained mbufs are not supported.
 * Hash followed by Cipher mode is not supported
 * Only supports the session-oriented API implementation (session-less APIs are not supported).
 
-- 
2.17.1

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

* [dpdk-stable] patch 'crypto/virtio: fix IV physical address' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (83 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'doc: fix limitations for dpaa2 " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'security: fix crash on destroy null session' " Christian Ehrhardt
                   ` (90 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Fan Zhang; +Cc: Jay Zhou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From a4e7d4e4149bff1c9ad898612ae1510f48d2f75e Mon Sep 17 00:00:00 2001
From: Fan Zhang <roy.fan.zhang@intel.com>
Date: Tue, 26 Jun 2018 03:10:48 +0100
Subject: [PATCH] crypto/virtio: fix IV physical address

[ upstream commit b063e843fa03c6af076ae9f5bce73e97211d8989 ]

The physical address of IV required by Virtio was computed using
crypto operations' physical address plus the offset. However not
all crypto ops will have physical address field initialized and
compute it runtimely is costly. This patch fixes this problem by
adding iv field in virtio_crypto_op_cookie and does a memcpy of
iv instead.

Fixes: 82adb12a1fce ("crypto/virtio: support burst enqueue/dequeue")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Reviewed-by: Jay Zhou <jianjay.zhou@huawei.com>
---
 drivers/crypto/virtio/virtio_cryptodev.c |  6 ++++++
 drivers/crypto/virtio/virtio_cryptodev.h |  3 +++
 drivers/crypto/virtio/virtio_rxtx.c      | 14 +++++++++++++-
 3 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index df88953f6..f9c890bb3 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -1223,6 +1223,12 @@ virtio_crypto_sym_pad_op_ctrl_req(
 	/* Get cipher xform from crypto xform chain */
 	cipher_xform = virtio_crypto_get_cipher_xform(xform);
 	if (cipher_xform) {
+		if (cipher_xform->iv.length > VIRTIO_CRYPTO_MAX_IV_SIZE) {
+			VIRTIO_CRYPTO_SESSION_LOG_ERR(
+				"cipher IV size cannot be longer than %u",
+				VIRTIO_CRYPTO_MAX_IV_SIZE);
+			return -1;
+		}
 		if (is_chainned)
 			ret = virtio_crypto_sym_pad_cipher_param(
 				&ctrl->u.sym_create_session.u.chain.para
diff --git a/drivers/crypto/virtio/virtio_cryptodev.h b/drivers/crypto/virtio/virtio_cryptodev.h
index e402c0309..0fd7b722e 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.h
+++ b/drivers/crypto/virtio/virtio_cryptodev.h
@@ -16,6 +16,8 @@
 
 #define NUM_ENTRY_VIRTIO_CRYPTO_OP 7
 
+#define VIRTIO_CRYPTO_MAX_IV_SIZE 16
+
 extern uint8_t cryptodev_virtio_driver_id;
 
 enum virtio_crypto_cmd_id {
@@ -29,6 +31,7 @@ struct virtio_crypto_op_cookie {
 	struct virtio_crypto_op_data_req data_req;
 	struct virtio_crypto_inhdr inhdr;
 	struct vring_desc desc[NUM_ENTRY_VIRTIO_CRYPTO_OP];
+	uint8_t iv[VIRTIO_CRYPTO_MAX_IV_SIZE];
 };
 
 /*
diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c
index 450392843..4f695f3e6 100644
--- a/drivers/crypto/virtio/virtio_rxtx.c
+++ b/drivers/crypto/virtio/virtio_rxtx.c
@@ -203,6 +203,8 @@ virtqueue_crypto_sym_enqueue_xmit(
 	uint16_t req_data_len = sizeof(struct virtio_crypto_op_data_req);
 	uint32_t indirect_vring_addr_offset = req_data_len +
 		sizeof(struct virtio_crypto_inhdr);
+	uint32_t indirect_iv_addr_offset = indirect_vring_addr_offset +
+			sizeof(struct vring_desc) * NUM_ENTRY_VIRTIO_CRYPTO_OP;
 	struct rte_crypto_sym_op *sym_op = cop->sym;
 	struct virtio_crypto_session *session =
 		(struct virtio_crypto_session *)get_session_private_data(
@@ -259,7 +261,17 @@ virtqueue_crypto_sym_enqueue_xmit(
 
 	/* indirect vring: iv of cipher */
 	if (session->iv.length) {
-		desc[idx].addr = cop->phys_addr + session->iv.offset;
+		if (cop->phys_addr)
+			desc[idx].addr = cop->phys_addr + session->iv.offset;
+		else {
+			rte_memcpy(crypto_op_cookie->iv,
+					rte_crypto_op_ctod_offset(cop,
+					uint8_t *, session->iv.offset),
+					session->iv.length);
+			desc[idx].addr = indirect_op_data_req_phys_addr +
+				indirect_iv_addr_offset;
+		}
+
 		desc[idx].len = session->iv.length;
 		desc[idx++].flags = VRING_DESC_F_NEXT;
 	}
-- 
2.17.1

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

* [dpdk-stable] patch 'security: fix crash on destroy null session' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (84 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'crypto/virtio: fix IV physical address' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'test/crypto: fix device id when stopping port' " Christian Ehrhardt
                   ` (89 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 77810fbf1fce91d69c12cf3854e78df8d6f96244 Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Thu, 5 Jul 2018 11:04:42 +0100
Subject: [PATCH] security: fix crash on destroy null session

[ upstream commit 8a29f519ef1b2fdddb0324e867006c76c70173cb ]

rte_security_session_destroy should return -EINVAL if session is NULL,
but segfaults because of rte_mempool_from_obj(NULL) call.

Fixes: c261d1431bd8 ("security: introduce security API and framework")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 lib/librte_security/rte_security.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/librte_security/rte_security.c b/lib/librte_security/rte_security.c
index 1e559c99c..f862e9426 100644
--- a/lib/librte_security/rte_security.c
+++ b/lib/librte_security/rte_security.c
@@ -91,7 +91,6 @@ rte_security_session_destroy(struct rte_security_ctx *instance,
 			     struct rte_security_session *sess)
 {
 	int ret;
-	struct rte_mempool *mp = rte_mempool_from_obj(sess);
 
 	RTE_FUNC_PTR_OR_ERR_RET(*instance->ops->session_destroy, -ENOTSUP);
 
@@ -100,7 +99,7 @@ rte_security_session_destroy(struct rte_security_ctx *instance,
 
 	ret = instance->ops->session_destroy(instance->device, sess);
 	if (!ret)
-		rte_mempool_put(mp, (void *)sess);
+		rte_mempool_put(rte_mempool_from_obj(sess), (void *)sess);
 
 	return ret;
 }
-- 
2.17.1

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

* [dpdk-stable] patch 'test/crypto: fix device id when stopping port' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (85 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'security: fix crash on destroy null session' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'maintainers: update for Mellanox PMDs' " Christian Ehrhardt
                   ` (88 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 92b9ac5feadd02d178c615eb26285ce24eec7458 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Wed, 4 Jul 2018 15:19:38 +0530
Subject: [PATCH] test/crypto: fix device id when stopping port

[ upstream commit bb6f0b734f306c48bedac0df66cc9b8f62b595aa ]

dev_id is valid, while ts_params->valid_devs[devid] may
result a different value in case multiple devices are present
and any of the device is being used.

Fixes: 202d375c60bc ("app/test: add cryptodev unit and performance tests")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 test/test/test_cryptodev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 389f79677..e252feeaa 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -585,7 +585,7 @@ test_device_configure_invalid_dev_id(void)
 	dev_id = ts_params->valid_devs[ts_params->valid_dev_count - 1];
 
 	/* Stop the device in case it's started so it can be configured */
-	rte_cryptodev_stop(ts_params->valid_devs[dev_id]);
+	rte_cryptodev_stop(dev_id);
 
 	TEST_ASSERT_SUCCESS(rte_cryptodev_configure(dev_id, &ts_params->conf),
 			"Failed test for rte_cryptodev_configure: "
-- 
2.17.1

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

* [dpdk-stable] patch 'maintainers: update for Mellanox PMDs' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (86 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'test/crypto: fix device id when stopping port' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'mk: fix cross build' " Christian Ehrhardt
                   ` (87 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Adrien Mazarguil
  Cc: Nelio Laranjeiro, Shahaf Shuler, Matan Azrad, Yongseok Koh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 1a9aa3672e2d5a56a47a0674cd048e4677589ccd Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Date: Thu, 5 Jul 2018 11:19:46 +0200
Subject: [PATCH] maintainers: update for Mellanox PMDs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit c754c7d809347e264cc305b1e389cb322e1e1ab3 ]

Shahaf and Matan volunteered to replace Nélio and myself as maintainers for
mlx4 and mlx5 PMDs. Cheers!

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 MAINTAINERS | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 4667fa7fb..18d649a7a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -576,15 +576,15 @@ F: doc/guides/nics/mvpp2.rst
 F: doc/guides/nics/features/mvpp2.ini
 
 Mellanox mlx4
-M: Adrien Mazarguil <adrien.mazarguil@6wind.com>
+M: Matan Azrad <matan@mellanox.com>
+M: Shahaf Shuler <shahafs@mellanox.com>
 T: git://dpdk.org/next/dpdk-next-net-mlx
 F: drivers/net/mlx4/
 F: doc/guides/nics/mlx4.rst
 F: doc/guides/nics/features/mlx4.ini
 
 Mellanox mlx5
-M: Adrien Mazarguil <adrien.mazarguil@6wind.com>
-M: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
+M: Shahaf Shuler <shahafs@mellanox.com>
 M: Yongseok Koh <yskoh@mellanox.com>
 T: git://dpdk.org/next/dpdk-next-net-mlx
 F: drivers/net/mlx5/
-- 
2.17.1

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

* [dpdk-stable] patch 'mk: fix cross build' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (87 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'maintainers: update for Mellanox PMDs' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'devtools: fix ninja command in build test' " Christian Ehrhardt
                   ` (86 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Gavin Hu
  Cc: Honnappa Nagarahalli, Steve Capper, Ali Alnubani,
	Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 3786acf1299ab213bc58ac5d4148d0583d794133 Mon Sep 17 00:00:00 2001
From: Gavin Hu <gavin.hu@arm.com>
Date: Sat, 30 Jun 2018 01:27:33 +0800
Subject: [PATCH] mk: fix cross build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit ebaa070de85e49ad01214b1940c7cdcdba2f4ef6 ]

The "-Wimplicit-fallthrough=2" option was introduced into gcc 7.0, it was
enabled when the cross compiler gcc is greater than 7.0, but for the host
side buildtools/pmdinfogen, if the native gcc is older than 7.0, or the
host cc compiler is clang, it should not be enabled.

The fix is to differentiate the host gcc Werror options from the cross gcc.

gcc -Wp,-MD,./.pmdinfogen.o.d.tmp  -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wmissing-declarations -Wold-style-definition
-Wpointer-arith -Wcast-align -Wnested-externs -Wcast-qual
-Wformat-nonliteral -Wformat-security -Wundef -Wwrite-strings -Wdeprecated
-Werror -Wimplicit-fallthrough=2 -Dbbb -Wno-format-truncation -g
-I/dpdk/build/include    -o pmdinfogen.o -c
~/dpdk/buildtools/pmdinfogen/pmdinfogen.c gcc: error:
unrecognized command line option ‘-Wimplicit-fallthrough=2’

Fixes: ced3e6f8 ("mk: adjust gcc flags for new gcc 7 warnings")

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Tested-by: Ali Alnubani <alialnu@mellanox.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 buildtools/pmdinfogen/Makefile           | 2 +-
 mk/toolchain/gcc/rte.toolchain-compat.mk | 5 +++++
 mk/toolchain/gcc/rte.vars.mk             | 9 +++++++++
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/buildtools/pmdinfogen/Makefile b/buildtools/pmdinfogen/Makefile
index bf07b6f2e..ff7a5fae6 100644
--- a/buildtools/pmdinfogen/Makefile
+++ b/buildtools/pmdinfogen/Makefile
@@ -41,7 +41,7 @@ HOSTAPP = dpdk-pmdinfogen
 #
 SRCS-y += pmdinfogen.c
 
-HOST_CFLAGS += $(WERROR_FLAGS) -g
+HOST_CFLAGS += $(HOST_WERROR_FLAGS) -g
 HOST_CFLAGS += -I$(RTE_OUTPUT)/include
 
 include $(RTE_SDK)/mk/rte.hostapp.mk
diff --git a/mk/toolchain/gcc/rte.toolchain-compat.mk b/mk/toolchain/gcc/rte.toolchain-compat.mk
index 255c89677..1e4434fa9 100644
--- a/mk/toolchain/gcc/rte.toolchain-compat.mk
+++ b/mk/toolchain/gcc/rte.toolchain-compat.mk
@@ -15,6 +15,11 @@ GCC_MINOR = $(shell echo __GNUC_MINOR__ | $(CC) -E -x c - | tail -n 1)
 GCC_PATCHLEVEL = $(shell echo __GNUC_PATCHLEVEL__ | $(CC) -E -x c - | tail -n 1)
 GCC_VERSION = $(GCC_MAJOR)$(GCC_MINOR)
 
+HOST_GCC_MAJOR = $(shell echo __GNUC__ | $(HOSTCC) -E -x c - | tail -n 1)
+HOST_GCC_MINOR = $(shell echo __GNUC_MINOR__ | $(HOSTCC) -E -x c - | tail -n 1)
+HOST_GCC_PATCHLEVEL = $(shell echo __GNUC_PATCHLEVEL__ | $(HOSTCC) -E -x c - | tail -n 1)
+HOST_GCC_VERSION = $(HOST_GCC_MAJOR)$(HOST_GCC_MINOR)
+
 # if GCC is older than 4.x
 ifeq ($(shell test $(GCC_VERSION) -lt 40 && echo 1), 1)
 	MACHINE_CFLAGS =
diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk
index 7e4531bab..d8b99faf6 100644
--- a/mk/toolchain/gcc/rte.vars.mk
+++ b/mk/toolchain/gcc/rte.vars.mk
@@ -71,6 +71,15 @@ ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1)
 WERROR_FLAGS += -Wno-uninitialized
 endif
 
+HOST_WERROR_FLAGS := $(WERROR_FLAGS)
+
+ifeq ($(shell test $(HOST_GCC_VERSION) -gt 70 && echo 1), 1)
+# Tell GCC only to error for switch fallthroughs without a suitable comment
+HOST_WERROR_FLAGS += -Wimplicit-fallthrough=2
+# Ignore errors for snprintf truncation
+HOST_WERROR_FLAGS += -Wno-format-truncation
+endif
+
 ifeq ($(shell test $(GCC_VERSION) -gt 70 && echo 1), 1)
 # Tell GCC only to error for switch fallthroughs without a suitable comment
 WERROR_FLAGS += -Wimplicit-fallthrough=2
-- 
2.17.1

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

* [dpdk-stable] patch 'devtools: fix ninja command in build test' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (88 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'mk: fix cross build' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'build: fix for host clang and cross gcc' " Christian Ehrhardt
                   ` (85 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Gavin Hu; +Cc: Phil Yang, Song Zhu, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 589b2d46c5a45f28300e5b1bb1eb1e66a05457db Mon Sep 17 00:00:00 2001
From: Gavin Hu <gavin.hu@arm.com>
Date: Sat, 30 Jun 2018 01:27:36 +0800
Subject: [PATCH] devtools: fix ninja command in build test

[ upstream commit c0d022070f7c7a77c1a47fee55f971b2afb763d4 ]

On some linux distributions, eg: CentOS, the ninja executable has a
different name: ninja-build, this patch is to check and adapt to it
accordingly.

./devtools/test-meson-builds.sh: line 24: ninja: command not found

Fixes: a55277a788 ("devtools: add test script for meson builds")

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Song Zhu <song.zhu@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 devtools/test-meson-builds.sh | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 9868c325b..20d8c1a26 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -10,6 +10,15 @@
 srcdir=$(dirname $(readlink -m $0))/..
 MESON=${MESON:-meson}
 
+if command -v ninja >/dev/null 2>&1 ; then
+	ninja_cmd=ninja
+elif command -v ninja-build >/dev/null 2>&1 ; then
+	ninja_cmd=ninja-build
+else
+	echo "ERROR: ninja is not found" >&2
+	exit 1
+fi
+
 build () # <directory> <meson options>
 {
 	builddir=$1
@@ -20,8 +29,8 @@ build () # <directory> <meson options>
 		$MESON $options $srcdir $builddir
 		unset CC
 	fi
-	echo "ninja -C $builddir"
-	ninja -C $builddir
+	echo "$ninja_cmd -C $builddir"
+	$ninja_cmd -C $builddir
 }
 
 # shared and static linked builds with gcc and clang
-- 
2.17.1

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

* [dpdk-stable] patch 'build: fix for host clang and cross gcc' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (89 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'devtools: fix ninja command in build test' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'event/octeontx: fix flush callback' " Christian Ehrhardt
                   ` (84 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Gavin Hu; +Cc: Phil Yang, Song Zhu, Steve Capper, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 48a952537d6072d91ed21eb518d8c4160e8fff74 Mon Sep 17 00:00:00 2001
From: Gavin Hu <gavin.hu@arm.com>
Date: Sat, 30 Jun 2018 01:27:37 +0800
Subject: [PATCH] build: fix for host clang and cross gcc

[ upstream commit d292a42fc86b6b3ab69abb36f3112720cceb0b4b ]

The following error hits if host cc compiler is clang(default one in most
linux distributions) and the cross compiler is gcc.

The root cause is: the hybride compilers add the warning options to the
meson project as project arguments, which apply for both host compiling and
cross compiling. But some options such as '-Wno-format-truncation' are not
supported nor recognized by clang, so they have to be removed from the
project arguments for the host compiler to run smoothily and added back as
cflags for the cross compiler to compile for cross source files.

The fix is remove unrecognized warning options from the meson project
arguments shared by gcc and clang, as add them specifically for gcc or
clang as cflags.

[265/893] Compiling C object
'buildtools/pmdinfogen/pmdinfogen@exe/pmdinfogen.c.o'.  warning: unknown
warning option '-Wno-format-truncation' [-Wunknown-warning-option]

Fixes: a55277a788 ("devtools: add test script for meson builds")

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Song Zhu <song.zhu@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 config/meson.build    | 3 +--
 drivers/meson.build   | 3 +++
 examples/meson.build  | 4 ++++
 lib/meson.build       | 4 ++++
 test/test/meson.build | 7 ++++++-
 5 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index 50081b572..272d4a838 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -57,8 +57,7 @@ add_project_arguments('-include', 'rte_config.h', language: 'c')
 warning_flags = [
 	'-Wsign-compare',
 	'-Wcast-qual',
-	'-Wno-address-of-packed-member',
-	'-Wno-format-truncation'
+	'-Wno-address-of-packed-member'
 ]
 foreach arg: warning_flags
 	if cc.has_argument(arg)
diff --git a/drivers/meson.build b/drivers/meson.build
index ac6c97297..1737d86b8 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -32,6 +32,9 @@ foreach class:driver_classes
 		sources = []
 		objs = []
 		cflags = machine_args
+		if cc.has_argument('-Wno-format-truncation')
+			cflags += '-Wno-format-truncation'
+		endif
 		includes = [include_directories(drv_path)]
 		# set up internal deps. Drivers can append/override as necessary
 		deps = std_deps
diff --git a/examples/meson.build b/examples/meson.build
index 3d1568497..e6558875a 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -24,6 +24,10 @@ foreach example: examples
 	sources = []
 	allow_experimental_apis = false
 	cflags = machine_args
+	if cc.has_argument('-Wno-format-truncation')
+		cflags += '-Wno-format-truncation'
+	endif
+
 	ext_deps = [execinfo]
 	includes = [include_directories(example)]
 	deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline']
diff --git a/lib/meson.build b/lib/meson.build
index 9d11571f9..fefb3605d 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -34,6 +34,10 @@ foreach l:libraries
 	headers = []
 	includes = []
 	cflags = machine_args
+	if cc.has_argument('-Wno-format-truncation')
+	    cflags += '-Wno-format-truncation'
+	endif
+
 	objs = [] # other object files to link against, used e.g. for
 	          # instruction-set optimized versions of code
 
diff --git a/test/test/meson.build b/test/test/meson.build
index a907fd256..dc4ba5514 100644
--- a/test/test/meson.build
+++ b/test/test/meson.build
@@ -235,6 +235,11 @@ if dpdk_conf.has('RTE_LIBRTE_KNI')
 	test_deps += 'kni'
 endif
 
+cflags = machine_args
+if cc.has_argument('-Wno-format-truncation')
+    cflags += '-Wno-format-truncation'
+endif
+
 test_dep_objs = []
 compress_test_dep = dependency('zlib', required: false)
 if compress_test_dep.found()
@@ -260,7 +265,7 @@ if get_option('tests')
 		test_sources,
 		link_whole: link_libs,
 		dependencies: test_dep_objs,
-		c_args: [machine_args, '-DALLOW_EXPERIMENTAL_API'],
+		c_args: [cflags, '-DALLOW_EXPERIMENTAL_API'],
 		install_rpath: driver_install_path,
 		install: false)
 
-- 
2.17.1

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

* [dpdk-stable] patch 'event/octeontx: fix flush callback' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (90 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'build: fix for host clang and cross gcc' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'bus/dpaa: fix phandle support for Linux 4.16' " Christian Ehrhardt
                   ` (83 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From c5b9107c92880c84c903a3ea33b3ce622eef79a1 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Date: Fri, 15 Jun 2018 11:14:06 +0530
Subject: [PATCH] event/octeontx: fix flush callback

[ upstream commit 6461abf76b89f96d667adec8ca151c5d25f70fcc ]

When event queues are being flushed the getwork operation used to extract
events should be a grouped getwork operation to the specific event queue.

Fixes: 8384f0e039ea ("event/octeontx: support device stop flush callback")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 drivers/event/octeontx/ssovf_worker.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/drivers/event/octeontx/ssovf_worker.c b/drivers/event/octeontx/ssovf_worker.c
index d8bbc7149..fffa9024d 100644
--- a/drivers/event/octeontx/ssovf_worker.c
+++ b/drivers/event/octeontx/ssovf_worker.c
@@ -204,6 +204,8 @@ ssows_flush_events(struct ssows *ws, uint8_t queue_id,
 	uint32_t reg_off;
 	struct rte_event ev;
 	uint64_t enable, aq_cnt = 1, cq_ds_cnt = 1;
+	uint64_t get_work0, get_work1;
+	uint64_t sched_type_queue;
 	uint8_t *base = ssovf_bar(OCTEONTX_SSO_GROUP, queue_id, 0);
 
 	enable = ssovf_read64(base + SSO_VHGRP_QCTL);
@@ -219,7 +221,20 @@ ssows_flush_events(struct ssows *ws, uint8_t queue_id,
 		cq_ds_cnt = ssovf_read64(base + SSO_VHGRP_INT_CNT);
 		/* Extract cq and ds count */
 		cq_ds_cnt &= 0x1FFF1FFF0000;
-		ssows_get_work(ws, &ev);
+
+		ssovf_load_pair(get_work0, get_work1, ws->base + reg_off);
+
+		sched_type_queue = (get_work0 >> 32) & 0xfff;
+		ws->cur_tt = sched_type_queue & 0x3;
+		ws->cur_grp = sched_type_queue >> 2;
+		sched_type_queue = sched_type_queue << 38;
+		ev.event = sched_type_queue | (get_work0 & 0xffffffff);
+		if (get_work1 && ev.event_type == RTE_EVENT_TYPE_ETHDEV)
+			ev.mbuf = ssovf_octeontx_wqe_to_pkt(get_work1,
+					(ev.event >> 20) & 0x7F);
+		else
+			ev.u64 = get_work1;
+
 		if (fn != NULL && ev.u64 != 0)
 			fn(arg, ev);
 	}
-- 
2.17.1

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

* [dpdk-stable] patch 'bus/dpaa: fix phandle support for Linux 4.16' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (91 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'event/octeontx: fix flush callback' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'bus/dpaa: fix SVR id fetch location' " Christian Ehrhardt
                   ` (82 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Alok Makhariya; +Cc: Shreyansh Jain, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From c368a490614c84dc85d95ac1b72e2c9bfc929382 Mon Sep 17 00:00:00 2001
From: Alok Makhariya <alok.makhariya@nxp.com>
Date: Fri, 6 Jul 2018 13:39:58 +0530
Subject: [PATCH] bus/dpaa: fix phandle support for Linux 4.16

[ upstream commit a4f24c37074c0c9f1068ef9e1a90c0b3dd0147c4 ]

Fixes: 2183c6f69d7e ("bus/dpaa: add OF parser for device scanning")

Signed-off-by: Alok Makhariya <alok.makhariya@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 drivers/bus/dpaa/base/fman/of.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/bus/dpaa/base/fman/of.c b/drivers/bus/dpaa/base/fman/of.c
index 1b2dbe266..eb55cb913 100644
--- a/drivers/bus/dpaa/base/fman/of.c
+++ b/drivers/bus/dpaa/base/fman/of.c
@@ -182,6 +182,11 @@ linear_dir(struct dt_dir *d)
 				DPAA_BUS_LOG(DEBUG, "Duplicate lphandle in %s",
 					     d->node.node.full_name);
 			d->lphandle = f;
+		} else if (!strcmp(f->node.node.name, "phandle")) {
+			if (d->lphandle)
+				DPAA_BUS_LOG(DEBUG, "Duplicate lphandle in %s",
+					     d->node.node.full_name);
+			d->lphandle = f;
 		} else if (!strcmp(f->node.node.name, "#address-cells")) {
 			if (d->a_cells)
 				DPAA_BUS_LOG(DEBUG, "Duplicate a_cells in %s",
-- 
2.17.1

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

* [dpdk-stable] patch 'bus/dpaa: fix SVR id fetch location' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (92 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'bus/dpaa: fix phandle support for Linux 4.16' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'bus/dpaa: fix buffer offset setting in FMAN' " Christian Ehrhardt
                   ` (81 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Shreyansh Jain, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 447eb0f08252d9380818fb114778ff7fa0fc5cd0 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Fri, 6 Jul 2018 13:39:59 +0530
Subject: [PATCH] bus/dpaa: fix SVR id fetch location

[ upstream commit 28aca20e98d3c83ac7525924213c7871738bb803 ]

Otherwise the SVR may not be available for dpaa init.

Fixes: 3b59b73dea08 ("bus/dpaa: update platform SoC value register routines")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 drivers/bus/dpaa/dpaa_bus.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 20462065c..7956bd05e 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -539,6 +539,13 @@ rte_dpaa_bus_probe(void)
 	unsigned int svr_ver;
 	int probe_all = rte_dpaa_bus.bus.conf.scan_mode != RTE_BUS_SCAN_WHITELIST;
 
+	svr_file = fopen(DPAA_SOC_ID_FILE, "r");
+	if (svr_file) {
+		if (fscanf(svr_file, "svr:%x", &svr_ver) > 0)
+			dpaa_svr_family = svr_ver & SVR_MASK;
+		fclose(svr_file);
+	}
+
 	/* For each registered driver, and device, call the driver->probe */
 	TAILQ_FOREACH(dev, &rte_dpaa_bus.device_list, next) {
 		TAILQ_FOREACH(drv, &rte_dpaa_bus.driver_list, next) {
@@ -569,13 +576,6 @@ rte_dpaa_bus_probe(void)
 	if (!TAILQ_EMPTY(&rte_dpaa_bus.device_list))
 		rte_mbuf_set_platform_mempool_ops(DPAA_MEMPOOL_OPS_NAME);
 
-	svr_file = fopen(DPAA_SOC_ID_FILE, "r");
-	if (svr_file) {
-		if (fscanf(svr_file, "svr:%x", &svr_ver) > 0)
-			dpaa_svr_family = svr_ver & SVR_MASK;
-		fclose(svr_file);
-	}
-
 	return 0;
 }
 
-- 
2.17.1

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

* [dpdk-stable] patch 'bus/dpaa: fix buffer offset setting in FMAN' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (93 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'bus/dpaa: fix SVR id fetch location' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/dpaa: fix queue error handling and logs' " Christian Ehrhardt
                   ` (80 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Shreyansh Jain, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From c7979e3a02dfe598566aa3644ed541c213b03529 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Fri, 6 Jul 2018 13:40:00 +0530
Subject: [PATCH] bus/dpaa: fix buffer offset setting in FMAN

[ upstream commit 0975e5df8380b82fd74997997221447e565efc2b ]

The buffer offset was incorrectly being set at 64,
thus not honoring the packet headroom.

Fixes: 6d6b4f49a155 ("bus/dpaa: add FMAN hardware operations")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 drivers/bus/dpaa/base/fman/fman_hw.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/drivers/bus/dpaa/base/fman/fman_hw.c b/drivers/bus/dpaa/base/fman/fman_hw.c
index 0148b98e7..7ada7fa47 100644
--- a/drivers/bus/dpaa/base/fman/fman_hw.c
+++ b/drivers/bus/dpaa/base/fman/fman_hw.c
@@ -16,6 +16,8 @@
 #include <fsl_fman_crc64.h>
 #include <fsl_bman.h>
 
+#define FMAN_SP_EXT_BUF_MARG_START_SHIFT            16
+
 /* Instantiate the global variable that the inline CRC64 implementation (in
  * <fsl_fman.h>) depends on.
  */
@@ -422,20 +424,16 @@ fman_if_set_fc_quanta(struct fman_if *fm_if, u16 pause_quanta)
 int
 fman_if_get_fdoff(struct fman_if *fm_if)
 {
-	u32 fmbm_ricp;
+	u32 fmbm_rebm;
 	int fdoff;
-	int iceof_mask = 0x001f0000;
-	int icsz_mask = 0x0000001f;
 
 	struct __fman_if *__if = container_of(fm_if, struct __fman_if, __if);
 
 	assert(fman_ccsr_map_fd != -1);
 
-	fmbm_ricp =
-		   in_be32(&((struct rx_bmi_regs *)__if->bmi_map)->fmbm_ricp);
-	/*iceof + icsz*/
-	fdoff = ((fmbm_ricp & iceof_mask) >> 16) * 16 +
-		(fmbm_ricp & icsz_mask) * 16;
+	fmbm_rebm = in_be32(&((struct rx_bmi_regs *)__if->bmi_map)->fmbm_rebm);
+
+	fdoff = (fmbm_rebm >> FMAN_SP_EXT_BUF_MARG_START_SHIFT) & 0x1ff;
 
 	return fdoff;
 }
@@ -502,12 +500,16 @@ fman_if_set_fdoff(struct fman_if *fm_if, uint32_t fd_offset)
 {
 	struct __fman_if *__if = container_of(fm_if, struct __fman_if, __if);
 	unsigned int *fmbm_rebm;
+	int val = 0;
+	int fmbm_mask = 0x01ff0000;
+
+	val = fd_offset << FMAN_SP_EXT_BUF_MARG_START_SHIFT;
 
 	assert(fman_ccsr_map_fd != -1);
 
 	fmbm_rebm = &((struct rx_bmi_regs *)__if->bmi_map)->fmbm_rebm;
 
-	out_be32(fmbm_rebm, in_be32(fmbm_rebm) | (fd_offset << 16));
+	out_be32(fmbm_rebm, (in_be32(fmbm_rebm) & ~fmbm_mask) | val);
 }
 
 void
-- 
2.17.1

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

* [dpdk-stable] patch 'net/dpaa: fix queue error handling and logs' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (94 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'bus/dpaa: fix buffer offset setting in FMAN' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/dpaa2: fix prefetch Rx to honor number of packets' " Christian Ehrhardt
                   ` (79 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Shreyansh Jain, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From a0c6b48ad24e719a12453b61a0a3a97d16068a50 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Fri, 6 Jul 2018 13:40:01 +0530
Subject: [PATCH] net/dpaa: fix queue error handling and logs

[ upstream commit 6fd3639a824e53157e717bf05a45801ab5edc7be ]

Fixes: 5e7455931442 ("net/dpaa: support Rx queue configurations with eventdev")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 34 ++++++++++++++++++++++++++--------
 1 file changed, 26 insertions(+), 8 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index d014a11aa..79ba6bda1 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -516,7 +516,15 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 
 	PMD_INIT_FUNC_TRACE();
 
-	DPAA_PMD_INFO("Rx queue setup for queue index: %d", queue_idx);
+	if (queue_idx >= dev->data->nb_rx_queues) {
+		rte_errno = EOVERFLOW;
+		DPAA_PMD_ERR("%p: queue index out of range (%u >= %u)",
+		      (void *)dev, queue_idx, dev->data->nb_rx_queues);
+		return -rte_errno;
+	}
+
+	DPAA_PMD_INFO("Rx queue setup for queue index: %d fq_id (0x%x)",
+			queue_idx, rxq->fqid);
 
 	if (!dpaa_intf->bp_info || dpaa_intf->bp_info->mp != mp) {
 		struct fman_if_ic_params icp;
@@ -580,9 +588,11 @@ int dpaa_eth_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 			opts.fqd.fq_ctrl |= QM_FQCTRL_CGE;
 		}
 		ret = qman_init_fq(rxq, flags, &opts);
-		if (ret)
-			DPAA_PMD_ERR("Channel/Queue association failed. fqid %d"
-				     " ret: %d", rxq->fqid, ret);
+		if (ret) {
+			DPAA_PMD_ERR("Channel/Q association failed. fqid 0x%x "
+				"ret:%d(%s)", rxq->fqid, ret, strerror(ret));
+			return ret;
+		}
 		rxq->cb.dqrr_dpdk_pull_cb = dpaa_rx_cb;
 		rxq->cb.dqrr_prepare = dpaa_rx_cb_prepare;
 		rxq->is_static = true;
@@ -657,8 +667,8 @@ dpaa_eth_eventq_attach(const struct rte_eth_dev *dev,
 
 	ret = qman_init_fq(rxq, flags, &opts);
 	if (ret) {
-		DPAA_PMD_ERR("Channel/Queue association failed. fqid %d ret:%d",
-			     rxq->fqid, ret);
+		DPAA_PMD_ERR("Ev-Channel/Q association failed. fqid 0x%x "
+				"ret:%d(%s)", rxq->fqid, ret, strerror(ret));
 		return ret;
 	}
 
@@ -715,7 +725,15 @@ int dpaa_eth_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 
 	PMD_INIT_FUNC_TRACE();
 
-	DPAA_PMD_INFO("Tx queue setup for queue index: %d", queue_idx);
+	if (queue_idx >= dev->data->nb_tx_queues) {
+		rte_errno = EOVERFLOW;
+		DPAA_PMD_ERR("%p: queue index out of range (%u >= %u)",
+		      (void *)dev, queue_idx, dev->data->nb_tx_queues);
+		return -rte_errno;
+	}
+
+	DPAA_PMD_INFO("Tx queue setup for queue index: %d fq_id (0x%x)",
+			queue_idx, dpaa_intf->tx_queues[queue_idx].fqid);
 	dev->data->tx_queues[queue_idx] = &dpaa_intf->tx_queues[queue_idx];
 	return 0;
 }
@@ -1016,7 +1034,7 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx,
 	DPAA_PMD_DEBUG("creating rx fq %p, fqid %d", fq, fqid);
 	ret = qman_create_fq(fqid, QMAN_FQ_FLAG_NO_ENQUEUE, fq);
 	if (ret) {
-		DPAA_PMD_ERR("create rx fqid %d failed with ret: %d",
+		DPAA_PMD_ERR("create rx fqid 0x%x failed with ret: %d",
 			fqid, ret);
 		return ret;
 	}
-- 
2.17.1

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

* [dpdk-stable] patch 'net/dpaa2: fix prefetch Rx to honor number of packets' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (95 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/dpaa: fix queue error handling and logs' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'raw/dpaa2_qdma: fix IOVA as VA flag' " Christian Ehrhardt
                   ` (78 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Shreyansh Jain, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 5861ec0e3ab300e66bb26e65bd676aa960f499e5 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Fri, 6 Jul 2018 13:40:02 +0530
Subject: [PATCH] net/dpaa2: fix prefetch Rx to honor number of packets

[ upstream commit 65a70a98f1dbbff474d54151337f05d4752932a1 ]

This patch fixes prefetch rx routine to
set the next prefetch request to the size of nb_pkts.
It assumes that next request would ideally be
of same size.

Fixes: 4bc5ab88dbd6 ("net/dpaa2: fix Tx only mode")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 drivers/net/dpaa2/dpaa2_rxtx.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index dac086d61..ef109a621 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -447,6 +447,12 @@ eth_copy_mbuf_to_fd(struct rte_mbuf *mbuf,
 return 0;
 }
 
+/* This function assumes that caller will be keep the same value for nb_pkts
+ * across calls per queue, if that is not the case, better use non-prefetch
+ * version of rx call.
+ * It will return the packets as requested in previous call without honoring
+ * the current nb_pkts or bufs space.
+ */
 uint16_t
 dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 {
@@ -454,7 +460,7 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	struct dpaa2_queue *dpaa2_q = (struct dpaa2_queue *)queue;
 	struct qbman_result *dq_storage, *dq_storage1 = NULL;
 	uint32_t fqid = dpaa2_q->fqid;
-	int ret, num_rx = 0;
+	int ret, num_rx = 0, pull_size;
 	uint8_t pending, status;
 	struct qbman_swp *swp;
 	const struct qbman_fd *fd, *next_fd;
@@ -470,12 +476,12 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		}
 	}
 	swp = DPAA2_PER_LCORE_ETHRX_PORTAL;
-
+	pull_size = (nb_pkts > DPAA2_DQRR_RING_SIZE) ?
+					       DPAA2_DQRR_RING_SIZE : nb_pkts;
 	if (unlikely(!q_storage->active_dqs)) {
 		q_storage->toggle = 0;
 		dq_storage = q_storage->dq_storage[q_storage->toggle];
-		q_storage->last_num_pkts = (nb_pkts > DPAA2_DQRR_RING_SIZE) ?
-					       DPAA2_DQRR_RING_SIZE : nb_pkts;
+		q_storage->last_num_pkts = pull_size;
 		qbman_pull_desc_clear(&pulldesc);
 		qbman_pull_desc_set_numframes(&pulldesc,
 					      q_storage->last_num_pkts);
@@ -514,7 +520,7 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	q_storage->toggle ^= 1;
 	dq_storage1 = q_storage->dq_storage[q_storage->toggle];
 	qbman_pull_desc_clear(&pulldesc);
-	qbman_pull_desc_set_numframes(&pulldesc, DPAA2_DQRR_RING_SIZE);
+	qbman_pull_desc_set_numframes(&pulldesc, pull_size);
 	qbman_pull_desc_set_fq(&pulldesc, fqid);
 	qbman_pull_desc_set_storage(&pulldesc, dq_storage1,
 		(uint64_t)(DPAA2_VADDR_TO_IOVA(dq_storage1)), 1);
-- 
2.17.1

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

* [dpdk-stable] patch 'raw/dpaa2_qdma: fix IOVA as VA flag' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (96 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/dpaa2: fix prefetch Rx to honor number of packets' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'mempool/octeontx: fix pool to aura mapping' " Christian Ehrhardt
                   ` (77 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From b61fb94e454730007e56d3503569dd7ee845a923 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Thu, 21 Jun 2018 14:45:14 +0530
Subject: [PATCH] raw/dpaa2_qdma: fix IOVA as VA flag

[ upstream commit 8232129e57233239a580636a8b533b7725f90e9e ]

Fixes: b1ee472fed58 ("raw/dpaa2_qdma: introduce the DPAA2 QDMA driver")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
index 1d15c3029..e4608a46d 100644
--- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
+++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
@@ -985,6 +985,7 @@ rte_dpaa2_qdma_remove(struct rte_dpaa2_device *dpaa2_dev)
 }
 
 static struct rte_dpaa2_driver rte_dpaa2_qdma_pmd = {
+	.drv_flags = RTE_DPAA2_DRV_IOVA_AS_VA,
 	.drv_type = DPAA2_QDMA,
 	.probe = rte_dpaa2_qdma_probe,
 	.remove = rte_dpaa2_qdma_remove,
-- 
2.17.1

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

* [dpdk-stable] patch 'mempool/octeontx: fix pool to aura mapping' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (97 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'raw/dpaa2_qdma: fix IOVA as VA flag' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'hash: fix multiwriter lock memory allocation' " Christian Ehrhardt
                   ` (76 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Santosh Shukla, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 4a1824759a567df5284723ea50a525b4380f9623 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Date: Tue, 3 Jul 2018 10:20:41 +0530
Subject: [PATCH] mempool/octeontx: fix pool to aura mapping

[ upstream commit 179c7e893f64195c5b1f12fddf34b1921386837a ]

HW needs each pool to be mapped to an aura set of 16 auras.
Previously, pool to aura mapping was considered to be 1:1.

Fixes: 02fd6c744350 ("mempool/octeontx: support allocation")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 drivers/event/octeontx/timvf_evdev.c      |  2 +-
 drivers/mempool/octeontx/octeontx_fpavf.c | 45 ++++++++++++++---------
 drivers/mempool/octeontx/octeontx_fpavf.h |  9 +++++
 drivers/net/octeontx/octeontx_ethdev.c    |  6 +--
 drivers/net/octeontx/octeontx_rxtx.c      |  2 +-
 5 files changed, 42 insertions(+), 22 deletions(-)

diff --git a/drivers/event/octeontx/timvf_evdev.c b/drivers/event/octeontx/timvf_evdev.c
index c4fbd2d86..8a045c250 100644
--- a/drivers/event/octeontx/timvf_evdev.c
+++ b/drivers/event/octeontx/timvf_evdev.c
@@ -174,7 +174,7 @@ timvf_ring_start(const struct rte_event_timer_adapter *adptr)
 	if (use_fpa) {
 		pool = (uintptr_t)((struct rte_mempool *)
 				timr->chunk_pool)->pool_id;
-		ret = octeontx_fpa_bufpool_gpool(pool);
+		ret = octeontx_fpa_bufpool_gaura(pool);
 		if (ret < 0) {
 			timvf_log_dbg("Unable to get gaura id");
 			ret = -ENOMEM;
diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c
index 7aecaa85d..c287dd799 100644
--- a/drivers/mempool/octeontx/octeontx_fpavf.c
+++ b/drivers/mempool/octeontx/octeontx_fpavf.c
@@ -243,7 +243,7 @@ octeontx_fpapf_pool_setup(unsigned int gpool, unsigned int buf_size,
 		POOL_LTYPE(0x2) | POOL_STYPE(0) | POOL_SET_NAT_ALIGN |
 		POOL_ENA;
 
-	cfg.aid = 0;
+	cfg.aid = FPA_AURA_IDX(gpool);
 	cfg.pool_cfg = reg;
 	cfg.pool_stack_base = phys_addr;
 	cfg.pool_stack_end = phys_addr + memsz;
@@ -327,7 +327,7 @@ octeontx_fpapf_aura_attach(unsigned int gpool_index)
 	hdr.vfid = gpool_index;
 	hdr.res_code = 0;
 	memset(&cfg, 0x0, sizeof(struct octeontx_mbox_fpa_cfg));
-	cfg.aid = gpool_index; /* gpool is guara */
+	cfg.aid = FPA_AURA_IDX(gpool_index);
 
 	ret = octeontx_mbox_send(&hdr, &cfg,
 					sizeof(struct octeontx_mbox_fpa_cfg),
@@ -335,7 +335,8 @@ octeontx_fpapf_aura_attach(unsigned int gpool_index)
 	if (ret < 0) {
 		fpavf_log_err("Could not attach fpa ");
 		fpavf_log_err("aura %d to pool %d. Err=%d. FuncErr=%d\n",
-			      gpool_index, gpool_index, ret, hdr.res_code);
+			      FPA_AURA_IDX(gpool_index), gpool_index, ret,
+			      hdr.res_code);
 		ret = -EACCES;
 		goto err;
 	}
@@ -355,14 +356,15 @@ octeontx_fpapf_aura_detach(unsigned int gpool_index)
 		goto err;
 	}
 
-	cfg.aid = gpool_index; /* gpool is gaura */
+	cfg.aid = FPA_AURA_IDX(gpool_index);
 	hdr.coproc = FPA_COPROC;
 	hdr.msg = FPA_DETACHAURA;
 	hdr.vfid = gpool_index;
 	ret = octeontx_mbox_send(&hdr, &cfg, sizeof(cfg), NULL, 0);
 	if (ret < 0) {
 		fpavf_log_err("Couldn't detach FPA aura %d Err=%d FuncErr=%d\n",
-			      gpool_index, ret, hdr.res_code);
+			      FPA_AURA_IDX(gpool_index), ret,
+			      hdr.res_code);
 		ret = -EINVAL;
 	}
 
@@ -469,6 +471,7 @@ octeontx_fpa_bufpool_free_count(uintptr_t handle)
 {
 	uint64_t cnt, limit, avail;
 	uint8_t gpool;
+	uint16_t gaura;
 	uintptr_t pool_bar;
 
 	if (unlikely(!octeontx_fpa_handle_valid(handle)))
@@ -476,14 +479,16 @@ octeontx_fpa_bufpool_free_count(uintptr_t handle)
 
 	/* get the gpool */
 	gpool = octeontx_fpa_bufpool_gpool(handle);
+	/* get the aura */
+	gaura = octeontx_fpa_bufpool_gaura(handle);
 
 	/* Get pool bar address from handle */
 	pool_bar = handle & ~(uint64_t)FPA_GPOOL_MASK;
 
 	cnt = fpavf_read64((void *)((uintptr_t)pool_bar +
-				FPA_VF_VHAURA_CNT(gpool)));
+				FPA_VF_VHAURA_CNT(gaura)));
 	limit = fpavf_read64((void *)((uintptr_t)pool_bar +
-				FPA_VF_VHAURA_CNT_LIMIT(gpool)));
+				FPA_VF_VHAURA_CNT_LIMIT(gaura)));
 
 	avail = fpavf_read64((void *)((uintptr_t)pool_bar +
 				FPA_VF_VHPOOL_AVAILABLE(gpool)));
@@ -496,6 +501,7 @@ octeontx_fpa_bufpool_create(unsigned int object_size, unsigned int object_count,
 				unsigned int buf_offset, int node_id)
 {
 	unsigned int gpool;
+	unsigned int gaura;
 	uintptr_t gpool_handle;
 	uintptr_t pool_bar;
 	int res;
@@ -545,16 +551,18 @@ octeontx_fpa_bufpool_create(unsigned int object_size, unsigned int object_count,
 		goto error_pool_destroy;
 	}
 
+	gaura = FPA_AURA_IDX(gpool);
+
 	/* Release lock */
 	rte_spinlock_unlock(&fpadev.lock);
 
 	/* populate AURA registers */
 	fpavf_write64(object_count, (void *)((uintptr_t)pool_bar +
-			 FPA_VF_VHAURA_CNT(gpool)));
+			 FPA_VF_VHAURA_CNT(gaura)));
 	fpavf_write64(object_count, (void *)((uintptr_t)pool_bar +
-			 FPA_VF_VHAURA_CNT_LIMIT(gpool)));
+			 FPA_VF_VHAURA_CNT_LIMIT(gaura)));
 	fpavf_write64(object_count + 1, (void *)((uintptr_t)pool_bar +
-			 FPA_VF_VHAURA_CNT_THRESHOLD(gpool)));
+			 FPA_VF_VHAURA_CNT_THRESHOLD(gaura)));
 
 	octeontx_fpapf_start_count(gpool);
 
@@ -581,6 +589,7 @@ octeontx_fpa_bufpool_destroy(uintptr_t handle, int node_id)
 	uint64_t sz;
 	uint64_t cnt, avail;
 	uint8_t gpool;
+	uint16_t gaura;
 	uintptr_t pool_bar;
 	int ret;
 
@@ -594,13 +603,15 @@ octeontx_fpa_bufpool_destroy(uintptr_t handle, int node_id)
 
 	/* get the pool */
 	gpool = octeontx_fpa_bufpool_gpool(handle);
+	/* get the aura */
+	gaura = octeontx_fpa_bufpool_gaura(handle);
 
 	/* Get pool bar address from handle */
 	pool_bar = handle & ~(uint64_t)FPA_GPOOL_MASK;
 
 	 /* Check for no outstanding buffers */
 	cnt = fpavf_read64((void *)((uintptr_t)pool_bar +
-					FPA_VF_VHAURA_CNT(gpool)));
+					FPA_VF_VHAURA_CNT(gaura)));
 	if (cnt) {
 		fpavf_log_dbg("buffer exist in pool cnt %" PRId64 "\n", cnt);
 		return -EBUSY;
@@ -613,9 +624,9 @@ octeontx_fpa_bufpool_destroy(uintptr_t handle, int node_id)
 
 	/* Prepare to empty the entire POOL */
 	fpavf_write64(avail, (void *)((uintptr_t)pool_bar +
-			 FPA_VF_VHAURA_CNT_LIMIT(gpool)));
+			 FPA_VF_VHAURA_CNT_LIMIT(gaura)));
 	fpavf_write64(avail + 1, (void *)((uintptr_t)pool_bar +
-			 FPA_VF_VHAURA_CNT_THRESHOLD(gpool)));
+			 FPA_VF_VHAURA_CNT_THRESHOLD(gaura)));
 
 	/* Empty the pool */
 	/* Invalidate the POOL */
@@ -627,11 +638,11 @@ octeontx_fpa_bufpool_destroy(uintptr_t handle, int node_id)
 		/* Yank a buffer from the pool */
 		node = (void *)(uintptr_t)
 			fpavf_read64((void *)
-				    (pool_bar + FPA_VF_VHAURA_OP_ALLOC(gpool)));
+				    (pool_bar + FPA_VF_VHAURA_OP_ALLOC(gaura)));
 
 		if (node == NULL) {
 			fpavf_log_err("GAURA[%u] missing %" PRIx64 " buf\n",
-				      gpool, avail);
+				      gaura, avail);
 			break;
 		}
 
@@ -665,9 +676,9 @@ octeontx_fpa_bufpool_destroy(uintptr_t handle, int node_id)
 
 	/* Deactivate the AURA */
 	fpavf_write64(0, (void *)((uintptr_t)pool_bar +
-			FPA_VF_VHAURA_CNT_LIMIT(gpool)));
+			FPA_VF_VHAURA_CNT_LIMIT(gaura)));
 	fpavf_write64(0, (void *)((uintptr_t)pool_bar +
-			FPA_VF_VHAURA_CNT_THRESHOLD(gpool)));
+			FPA_VF_VHAURA_CNT_THRESHOLD(gaura)));
 
 	ret = octeontx_fpapf_aura_detach(gpool);
 	if (ret) {
diff --git a/drivers/mempool/octeontx/octeontx_fpavf.h b/drivers/mempool/octeontx/octeontx_fpavf.h
index b76f40e75..b00be137a 100644
--- a/drivers/mempool/octeontx/octeontx_fpavf.h
+++ b/drivers/mempool/octeontx/octeontx_fpavf.h
@@ -14,6 +14,7 @@
 
 #define	FPA_VF_MAX			32
 #define FPA_GPOOL_MASK			(FPA_VF_MAX-1)
+#define FPA_GAURA_SHIFT			4
 
 /* FPA VF register offsets */
 #define FPA_VF_INT(x)			(0x200ULL | ((x) << 22))
@@ -36,6 +37,7 @@
 #define FPA_VF_FREE_ADDRS_S(x, y, z)	\
 	((x) | (((y) & 0x1ff) << 3) | ((((z) & 1)) << 14))
 
+#define FPA_AURA_IDX(gpool)			(gpool << FPA_GAURA_SHIFT)
 /* FPA VF register offsets from VF_BAR4, size 2 MByte */
 #define	FPA_VF_MSIX_VEC_ADDR		0x00000
 #define	FPA_VF_MSIX_VEC_CTL		0x00008
@@ -102,4 +104,11 @@ octeontx_fpa_bufpool_gpool(uintptr_t handle)
 {
 	return (uint8_t)handle & FPA_GPOOL_MASK;
 }
+
+static __rte_always_inline uint16_t
+octeontx_fpa_bufpool_gaura(uintptr_t handle)
+{
+	return octeontx_fpa_bufpool_gpool(handle) << FPA_GAURA_SHIFT;
+}
+
 #endif	/* __OCTEONTX_FPAVF_H__ */
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 1eb453b21..705378186 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -787,7 +787,7 @@ octeontx_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t qidx,
 	pki_qos_cfg_t pki_qos;
 	uintptr_t pool;
 	int ret, port;
-	uint8_t gaura;
+	uint16_t gaura;
 	unsigned int ev_queues = (nic->ev_queues * nic->port_id) + qidx;
 	unsigned int ev_ports = (nic->ev_ports * nic->port_id) + qidx;
 
@@ -898,8 +898,8 @@ octeontx_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t qidx,
 
 		pool = (uintptr_t)mb_pool->pool_id;
 
-		/* Get the gpool Id */
-		gaura = octeontx_fpa_bufpool_gpool(pool);
+		/* Get the gaura Id */
+		gaura = octeontx_fpa_bufpool_gaura(pool);
 
 		pki_qos.qpg_qos = PKI_QPG_QOS_NONE;
 		pki_qos.num_entry = 1;
diff --git a/drivers/net/octeontx/octeontx_rxtx.c b/drivers/net/octeontx/octeontx_rxtx.c
index 2502d90e9..a9149b4e1 100644
--- a/drivers/net/octeontx/octeontx_rxtx.c
+++ b/drivers/net/octeontx/octeontx_rxtx.c
@@ -31,7 +31,7 @@ __octeontx_xmit_pkts(void *lmtline_va, void *ioreg_va, int64_t *fc_status_va,
 		return -ENOSPC;
 
 	/* Get the gaura Id */
-	gaura_id = octeontx_fpa_bufpool_gpool((uintptr_t)tx_pkt->pool->pool_id);
+	gaura_id = octeontx_fpa_bufpool_gaura((uintptr_t)tx_pkt->pool->pool_id);
 
 	/* Setup PKO_SEND_HDR_S */
 	cmd_buf[0] = tx_pkt->data_len & 0xffff;
-- 
2.17.1

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

* [dpdk-stable] patch 'hash: fix multiwriter lock memory allocation' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (98 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'mempool/octeontx: fix pool to aura mapping' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'hash: fix a multi-writer race condition' " Christian Ehrhardt
                   ` (75 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Yipeng Wang; +Cc: Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 1ec8d4e3f68af244317be80ed029ac5b179c9bd8 Mon Sep 17 00:00:00 2001
From: Yipeng Wang <yipeng1.wang@intel.com>
Date: Tue, 10 Jul 2018 09:59:54 -0700
Subject: [PATCH] hash: fix multiwriter lock memory allocation

[ upstream commit 27c813679ea961b94d3184c09e50a055ad726da3 ]

When malloc for multiwriter_lock, the align should be
RTE_CACHE_LINE_SIZE rather than LCORE_CACHE_SIZE.

Also there should be check to verify the success of
rte_malloc.

Fixes: be856325cba3 ("hash: add scalable multi-writer insertion with Intel TSX")

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 lib/librte_hash/rte_cuckoo_hash.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c
index a07543a29..80dcf41e8 100644
--- a/lib/librte_hash/rte_cuckoo_hash.c
+++ b/lib/librte_hash/rte_cuckoo_hash.c
@@ -281,7 +281,10 @@ rte_hash_create(const struct rte_hash_parameters *params)
 			h->add_key = ADD_KEY_MULTIWRITER;
 			h->multiwriter_lock = rte_malloc(NULL,
 							sizeof(rte_spinlock_t),
-							LCORE_CACHE_SIZE);
+							RTE_CACHE_LINE_SIZE);
+			if (h->multiwriter_lock == NULL)
+				goto err_unlock;
+
 			rte_spinlock_init(h->multiwriter_lock);
 		}
 	} else
-- 
2.17.1

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

* [dpdk-stable] patch 'hash: fix a multi-writer race condition' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (99 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'hash: fix multiwriter lock memory allocation' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'hash: fix key slot size accuracy' " Christian Ehrhardt
                   ` (74 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Yipeng Wang; +Cc: Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 2d95ec64b377cb47f6d63249e47c9c48dd888631 Mon Sep 17 00:00:00 2001
From: Yipeng Wang <yipeng1.wang@intel.com>
Date: Tue, 10 Jul 2018 09:59:55 -0700
Subject: [PATCH] hash: fix a multi-writer race condition

[ upstream commit eb067d431d9411a0054bc3ec084b0e9eadbb0a16 ]

Current multi-writer implementation uses Intel TSX to
protect the cuckoo path moving but not the cuckoo
path searching. After searching, we need to verify again if
the same empty slot still exists at the beginning of the TSX
region. Otherwise another writer could occupy the empty slot
before the TSX region. Current code does not verify.

Fixes: be856325cba3 ("hash: add scalable multi-writer insertion with Intel TSX")

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 lib/librte_hash/rte_cuckoo_hash_x86.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_hash/rte_cuckoo_hash_x86.h b/lib/librte_hash/rte_cuckoo_hash_x86.h
index 2c5b017e3..981d7bdd6 100644
--- a/lib/librte_hash/rte_cuckoo_hash_x86.h
+++ b/lib/librte_hash/rte_cuckoo_hash_x86.h
@@ -66,6 +66,9 @@ rte_hash_cuckoo_move_insert_mw_tm(const struct rte_hash *h,
 	while (try < RTE_HASH_TSX_MAX_RETRY) {
 		status = rte_xbegin();
 		if (likely(status == RTE_XBEGIN_STARTED)) {
+			/* In case empty slot was gone before entering TSX */
+			if (curr_bkt->key_idx[curr_slot] != EMPTY_SLOT)
+				rte_xabort(RTE_XABORT_CUCKOO_PATH_INVALIDED);
 			while (likely(curr_node->prev != NULL)) {
 				prev_node = curr_node->prev;
 				prev_bkt = prev_node->bkt;
-- 
2.17.1

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

* [dpdk-stable] patch 'hash: fix key slot size accuracy' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (100 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'hash: fix a multi-writer race condition' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'mem: do not leave unmapped holes in EAL memory area' " Christian Ehrhardt
                   ` (73 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Yipeng Wang; +Cc: Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From fca6f9ebf21f57eb924dbcb20e1ff220d8b73e1d Mon Sep 17 00:00:00 2001
From: Yipeng Wang <yipeng1.wang@intel.com>
Date: Tue, 10 Jul 2018 09:59:56 -0700
Subject: [PATCH] hash: fix key slot size accuracy

[ upstream commit 575a48c961f47f1078bd1ceacf8484fb1038f7f8 ]

This commit calculates the needed key slot size more
accurately. The previous local cache fix requires
the free slot ring to be larger than actually needed.
The calculation of the value is inaccurate.

Fixes: 5915699153d7 ("hash: fix scaling by reducing contention")

Signed-off-by: Yipeng Wang <yipeng1.wang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 lib/librte_hash/rte_cuckoo_hash.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c
index 80dcf41e8..11602af38 100644
--- a/lib/librte_hash/rte_cuckoo_hash.c
+++ b/lib/librte_hash/rte_cuckoo_hash.c
@@ -126,13 +126,13 @@ rte_hash_create(const struct rte_hash_parameters *params)
 		 * except for the first cache
 		 */
 		num_key_slots = params->entries + (RTE_MAX_LCORE - 1) *
-					LCORE_CACHE_SIZE + 1;
+					(LCORE_CACHE_SIZE - 1) + 1;
 	else
 		num_key_slots = params->entries + 1;
 
 	snprintf(ring_name, sizeof(ring_name), "HT_%s", params->name);
 	/* Create ring (Dummy slot index is not enqueued) */
-	r = rte_ring_create(ring_name, rte_align32pow2(num_key_slots - 1),
+	r = rte_ring_create(ring_name, rte_align32pow2(num_key_slots),
 			params->socket_id, 0);
 	if (r == NULL) {
 		RTE_LOG(ERR, HASH, "memory allocation failed\n");
@@ -291,7 +291,7 @@ rte_hash_create(const struct rte_hash_parameters *params)
 		h->add_key = ADD_KEY_SINGLEWRITER;
 
 	/* Populate free slots ring. Entry zero is reserved for key misses. */
-	for (i = 1; i < params->entries + 1; i++)
+	for (i = 1; i < num_key_slots; i++)
 		rte_ring_sp_enqueue(r, (void *)((uintptr_t) i));
 
 	te->data = (void *) h;
@@ -373,7 +373,7 @@ void
 rte_hash_reset(struct rte_hash *h)
 {
 	void *ptr;
-	unsigned i;
+	uint32_t tot_ring_cnt, i;
 
 	if (h == NULL)
 		return;
@@ -386,7 +386,13 @@ rte_hash_reset(struct rte_hash *h)
 		rte_pause();
 
 	/* Repopulate the free slots ring. Entry zero is reserved for key misses */
-	for (i = 1; i < h->entries + 1; i++)
+	if (h->hw_trans_mem_support)
+		tot_ring_cnt = h->entries + (RTE_MAX_LCORE - 1) *
+					(LCORE_CACHE_SIZE - 1);
+	else
+		tot_ring_cnt = h->entries;
+
+	for (i = 1; i < tot_ring_cnt + 1; i++)
 		rte_ring_sp_enqueue(h->free_slots, (void *)((uintptr_t) i));
 
 	if (h->hw_trans_mem_support) {
-- 
2.17.1

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

* [dpdk-stable] patch 'mem: do not leave unmapped holes in EAL memory area' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (101 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'hash: fix key slot size accuracy' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'mem: do not unmap overlapping region on mmap failure' " Christian Ehrhardt
                   ` (72 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Dariusz Stojaczyk; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 417fa405f8b549e2caf22b377260dc232f411da3 Mon Sep 17 00:00:00 2001
From: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Date: Fri, 1 Jun 2018 14:59:19 +0200
Subject: [PATCH] mem: do not leave unmapped holes in EAL memory area

[ upstream commit 637175ab95ed1dad3790a3c565fe8eaf422aa2c3 ]

EAL reserves a huge area in virtual address space
to provide virtual address contiguity for e.g.
future memory extensions (memory hotplug). During
memory hotplug, if the hugepage mmap succeeds but
doesn't suffice EAL's requiriments, the EAL would
unmap this mapping straight away, leaving a hole in
its virtual memory area and making it available
to everyone. As EAL still thinks it owns the entire
region, it may try to mmap it later with MAP_FIXED,
possibly overriding a user's mapping that was made
in the meantime.

This patch ensures each hole is mapped back by EAL,
so that it won't be available to anyone else.

Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runtime")

Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/linuxapp/eal/eal_memalloc.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/lib/librte_eal/linuxapp/eal/eal_memalloc.c b/lib/librte_eal/linuxapp/eal/eal_memalloc.c
index 8c11f98c9..6be668055 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memalloc.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memalloc.c
@@ -39,6 +39,7 @@
 #include "eal_filesystem.h"
 #include "eal_internal_cfg.h"
 #include "eal_memalloc.h"
+#include "eal_private.h"
 
 /*
  * not all kernel version support fallocate on hugetlbfs, so fall back to
@@ -490,6 +491,8 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,
 	int ret = 0;
 	int fd;
 	size_t alloc_sz;
+	int flags;
+	void *new_addr;
 
 	/* takes out a read lock on segment or segment list */
 	fd = get_seg_fd(path, sizeof(path), hi, list_idx, seg_idx);
@@ -585,6 +588,20 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,
 
 mapped:
 	munmap(addr, alloc_sz);
+	flags = MAP_FIXED;
+#ifdef RTE_ARCH_PPC_64
+	flags |= MAP_HUGETLB;
+#endif
+	new_addr = eal_get_virtual_area(addr, &alloc_sz, alloc_sz, 0, flags);
+	if (new_addr != addr) {
+		if (new_addr != NULL)
+			munmap(new_addr, alloc_sz);
+		/* we're leaving a hole in our virtual address space. if
+		 * somebody else maps this hole now, we could accidentally
+		 * override it in the future.
+		 */
+		RTE_LOG(CRIT, EAL, "Can't mmap holes in our virtual address space\n");
+	}
 resized:
 	if (internal_config.single_file_segments) {
 		resize_hugefile(fd, path, list_idx, seg_idx, map_offset,
-- 
2.17.1

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

* [dpdk-stable] patch 'mem: do not unmap overlapping region on mmap failure' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (102 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'mem: do not leave unmapped holes in EAL memory area' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'mem: avoid crash on memseg query with invalid address' " Christian Ehrhardt
                   ` (71 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Dariusz Stojaczyk; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From ca9746df21edfc99ef63bce5f24c8762d5a98add Mon Sep 17 00:00:00 2001
From: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Date: Fri, 1 Jun 2018 14:59:20 +0200
Subject: [PATCH] mem: do not unmap overlapping region on mmap failure

[ upstream commit 0762c438b8da8486b283f4da0c01a85f684b8896 ]

This isn't documented in the manuals, but a failed
mmap(..., MAP_FIXED) may still unmap overlapping
regions. In such case, we need to remap these regions
back into our address space to ensure mem contiguity.
We do it unconditionally now on mmap failure just to
be safe.

Verified on Linux 4.9.0-4-amd64. I was getting
ENOMEM when trying to map hugetlbfs with no space
left, and the previous anonymous mapping was still
being removed.

Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runtime")

Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/linuxapp/eal/eal_memalloc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_memalloc.c b/lib/librte_eal/linuxapp/eal/eal_memalloc.c
index 6be668055..81c94d54e 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memalloc.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memalloc.c
@@ -527,7 +527,10 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,
 	if (va == MAP_FAILED) {
 		RTE_LOG(DEBUG, EAL, "%s(): mmap() failed: %s\n", __func__,
 			strerror(errno));
-		goto resized;
+		/* mmap failed, but the previous region might have been
+		 * unmapped anyway. try to remap it
+		 */
+		goto unmapped;
 	}
 	if (va != addr) {
 		RTE_LOG(DEBUG, EAL, "%s(): wrong mmap() address\n", __func__);
@@ -588,6 +591,7 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,
 
 mapped:
 	munmap(addr, alloc_sz);
+unmapped:
 	flags = MAP_FIXED;
 #ifdef RTE_ARCH_PPC_64
 	flags |= MAP_HUGETLB;
-- 
2.17.1

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

* [dpdk-stable] patch 'mem: avoid crash on memseg query with invalid address' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (103 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'mem: do not unmap overlapping region on mmap failure' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'mem: fix alignment of requested virtual areas' " Christian Ehrhardt
                   ` (70 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Dariusz Stojaczyk; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 2a52089e410619de1590e591cddb26824354e574 Mon Sep 17 00:00:00 2001
From: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Date: Mon, 4 Jun 2018 07:33:41 +0200
Subject: [PATCH] mem: avoid crash on memseg query with invalid address

[ upstream commit 09037cf36c0888b6310d0e56739954e7bf691f97 ]

When trying to use it with an address that's not
managed by DPDK it would segfault due to a missing
check. The doc says this function returns either
a pointer or NULL, so let it do so.

Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists")

Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/eal_common_memory.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_eal/common/eal_common_memory.c b/lib/librte_eal/common/eal_common_memory.c
index 4f0688f9d..ecc5bb248 100644
--- a/lib/librte_eal/common/eal_common_memory.c
+++ b/lib/librte_eal/common/eal_common_memory.c
@@ -536,6 +536,9 @@ virt2memseg(const void *addr, const struct rte_memseg_list *msl)
 	void *start, *end;
 	int ms_idx;
 
+	if (msl == NULL)
+		return NULL;
+
 	/* a memseg list was specified, check if it's the right one */
 	start = msl->base_va;
 	end = RTE_PTR_ADD(start, (size_t)msl->page_sz * msl->memseg_arr.len);
-- 
2.17.1

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

* [dpdk-stable] patch 'mem: fix alignment of requested virtual areas' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (104 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'mem: avoid crash on memseg query with invalid address' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'mem: fix alignment requested with --base-virtaddr' " Christian Ehrhardt
                   ` (69 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Lei Yao, Dariusz Stojaczyk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From a132f9990766c2fdb0a6895614bd37f91038d966 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Mon, 16 Jul 2018 15:57:19 +0100
Subject: [PATCH] mem: fix alignment of requested virtual areas

[ upstream commit d5dd22c9f6ba86ce9175d84a8f95946edbdb04fc ]

The original code did not align any addresses that were requested as
page-aligned, but were different because addr_is_hint was set.

Below fix by Dariusz has introduced an issue where all unaligned addresses
were left as unaligned.

This patch is a partial revert of
commit 7fa7216ed48d ("mem: fix alignment of requested virtual areas")

and implements a proper fix for this issue, by asking for alignment in all
but the following two cases:

1) page size is equal to system page size, or
2) we got an aligned requested address, and will not accept a different one

This ensures that alignment is performed in all cases, except for those we
can guarantee that the address will not need alignment.

Fixes: b7cc54187ea4 ("mem: move virtual area function in common directory")
Fixes: 7fa7216ed48d ("mem: fix alignment of requested virtual areas")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
Acked-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
---
 lib/librte_eal/common/eal_common_memory.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_memory.c b/lib/librte_eal/common/eal_common_memory.c
index ecc5bb248..341c28ad7 100644
--- a/lib/librte_eal/common/eal_common_memory.c
+++ b/lib/librte_eal/common/eal_common_memory.c
@@ -63,14 +63,17 @@ eal_get_virtual_area(void *requested_addr, size_t *size,
 		addr_is_hint = true;
 	}
 
-	/* if requested address is not aligned by page size, or if requested
-	 * address is NULL, add page size to requested length as we may get an
-	 * address that's aligned by system page size, which can be smaller than
-	 * our requested page size. additionally, we shouldn't try to align if
-	 * system page size is the same as requested page size.
+	/* we don't need alignment of resulting pointer in the following cases:
+	 *
+	 * 1. page size is equal to system size
+	 * 2. we have a requested address, and it is page-aligned, and we will
+	 *    be discarding the address if we get a different one.
+	 *
+	 * for all other cases, alignment is potentially necessary.
 	 */
 	no_align = (requested_addr != NULL &&
-		((uintptr_t)requested_addr & (page_sz - 1)) == 0) ||
+		requested_addr == RTE_PTR_ALIGN(requested_addr, page_sz) &&
+		!addr_is_hint) ||
 		page_sz == system_page_sz;
 
 	do {
-- 
2.17.1

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

* [dpdk-stable] patch 'mem: fix alignment requested with --base-virtaddr' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (105 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'mem: fix alignment of requested virtual areas' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'mem: do not use --base-virtaddr in secondary processes' " Christian Ehrhardt
                   ` (68 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Dariusz Stojaczyk; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From e1d6c50eb969293ae5de74ffc4dd6e5167a3e30e Mon Sep 17 00:00:00 2001
From: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Date: Fri, 15 Jun 2018 17:13:04 +0200
Subject: [PATCH] mem: fix alignment requested with --base-virtaddr

[ upstream commit 9dac150f98b2e09d83c0b06e36baf3045dee833e ]

Whenever a calculated base-virtaddr offset had to be
manually aligned to requested page_sz, we did not take
account of that alignment in incrementing the base-virtaddr
offset further. The next requested virtual area could print
a warning "hint [...] not respected!" and let the system
pick an address instead. As a result, this breaks secondary
process support on many system configurations.

Fixes: b7cc54187ea4 ("mem: move virtual area function in common directory")

Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/eal_common_memory.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_memory.c b/lib/librte_eal/common/eal_common_memory.c
index 341c28ad7..87ed05eab 100644
--- a/lib/librte_eal/common/eal_common_memory.c
+++ b/lib/librte_eal/common/eal_common_memory.c
@@ -34,7 +34,7 @@
 
 #define MEMSEG_LIST_FMT "memseg-%" PRIu64 "k-%i-%i"
 
-static uint64_t baseaddr_offset;
+static void *next_baseaddr;
 static uint64_t system_page_sz;
 
 void *
@@ -56,9 +56,11 @@ eal_get_virtual_area(void *requested_addr, size_t *size,
 	allow_shrink = (flags & EAL_VIRTUAL_AREA_ALLOW_SHRINK) > 0;
 	unmap = (flags & EAL_VIRTUAL_AREA_UNMAP) > 0;
 
-	if (requested_addr == NULL && internal_config.base_virtaddr != 0) {
-		requested_addr = (void *) (internal_config.base_virtaddr +
-				(size_t)baseaddr_offset);
+	if (next_baseaddr == NULL && internal_config.base_virtaddr != 0)
+		next_baseaddr = (void *) internal_config.base_virtaddr;
+
+	if (requested_addr == NULL && next_baseaddr != NULL) {
+		requested_addr = next_baseaddr;
 		requested_addr = RTE_PTR_ALIGN(requested_addr, page_sz);
 		addr_is_hint = true;
 	}
@@ -119,6 +121,8 @@ eal_get_virtual_area(void *requested_addr, size_t *size,
 		RTE_LOG(WARNING, EAL, "WARNING! Base virtual address hint (%p != %p) not respected!\n",
 			requested_addr, aligned_addr);
 		RTE_LOG(WARNING, EAL, "   This may cause issues with mapping memory into secondary processes\n");
+	} else if (next_baseaddr != NULL) {
+		next_baseaddr = RTE_PTR_ADD(aligned_addr, *size);
 	}
 
 	RTE_LOG(DEBUG, EAL, "Virtual area found at %p (size = 0x%zx)\n",
@@ -151,8 +155,6 @@ eal_get_virtual_area(void *requested_addr, size_t *size,
 			munmap(aligned_end, after_len);
 	}
 
-	baseaddr_offset += *size;
-
 	return aligned_addr;
 }
 
-- 
2.17.1

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

* [dpdk-stable] patch 'mem: do not use --base-virtaddr in secondary processes' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (106 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'mem: fix alignment requested with --base-virtaddr' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'eal: fix return codes on thread naming failure' " Christian Ehrhardt
                   ` (67 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Dariusz Stojaczyk; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 2ab94a2efa3bb0d5f92a630ee86e29a1b2badb1c Mon Sep 17 00:00:00 2001
From: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Date: Mon, 18 Jun 2018 21:53:09 +0200
Subject: [PATCH] mem: do not use --base-virtaddr in secondary processes

[ upstream commit 6c0fb7547b32ac29336ed21f21be5a306248af99 ]

Since secondary process' address space is highly dictated
by the primary process' mappings, it doesn't make much
sense to use base-virtaddr for secondary processes.

This patch is intended to fix PCI resource mapping
in secondary processes using the same base-virtaddr
as their primary processes. PCI uses the end of the hugepage
memory area to map all resources. [pci_find_max_end_va()]
It works for primary processes, but can't be mapped 1:1
by secondary ones, as the same addresses are currently always
occupied by shadow memseg lists, which were created with
eal_get_virtual_area(NULL, ...).

```
PRIMARY PROCESS
0x6e00e00000    388K rw-s- fbarray_memseg-2048k-1-3
0x6e01000000 16777216K r----   [ anon ]
0x7201000000     16K rw-s- resource0

SECONDARY PROCESS
0x6e00e00000    388K rw-s- fbarray_memseg-2048k-1-3
0x6e01000000 16777216K r----   [ anon ]
0x7201000000      4K rw-s- fbarray_memseg-1048576k-0-0_203213
```

Fixes: 524e43c2ad9a ("mem: prepare memseg lists for multiprocess sync")

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

diff --git a/lib/librte_eal/common/eal_common_memory.c b/lib/librte_eal/common/eal_common_memory.c
index 87ed05eab..fee4b80b1 100644
--- a/lib/librte_eal/common/eal_common_memory.c
+++ b/lib/librte_eal/common/eal_common_memory.c
@@ -56,7 +56,8 @@ eal_get_virtual_area(void *requested_addr, size_t *size,
 	allow_shrink = (flags & EAL_VIRTUAL_AREA_ALLOW_SHRINK) > 0;
 	unmap = (flags & EAL_VIRTUAL_AREA_UNMAP) > 0;
 
-	if (next_baseaddr == NULL && internal_config.base_virtaddr != 0)
+	if (next_baseaddr == NULL && internal_config.base_virtaddr != 0 &&
+			rte_eal_process_type() == RTE_PROC_PRIMARY)
 		next_baseaddr = (void *) internal_config.base_virtaddr;
 
 	if (requested_addr == NULL && next_baseaddr != NULL) {
-- 
2.17.1

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

* [dpdk-stable] patch 'eal: fix return codes on thread naming failure' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (107 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'mem: do not use --base-virtaddr in secondary processes' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'eal: fix return codes on control thread " Christian Ehrhardt
                   ` (66 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Dariusz Stojaczyk; +Cc: Anatoly Burakov, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 91fd2f6659ec664dcfe195e5b3a47f52ed900d1a Mon Sep 17 00:00:00 2001
From: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Date: Tue, 10 Jul 2018 12:44:46 +0200
Subject: [PATCH] eal: fix return codes on thread naming failure

[ upstream commit 82dcc8b4bcb8adcb7fc819839833e74a3d0ad497 ]

The doc says this function returns negative errno
on error, but it currently returns either -1 or
positive errno.

It was incorrectly assumed that pthread_setname_np()
returns negative error numbers. It always returns
positive ones, so this patch negates its return value
before returning.

Fixes: 3901ed99c2f8 ("eal: fix thread naming on FreeBSD")

Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_eal/linuxapp/eal/eal_thread.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_thread.c b/lib/librte_eal/linuxapp/eal/eal_thread.c
index f652ff988..b496fc711 100644
--- a/lib/librte_eal/linuxapp/eal/eal_thread.c
+++ b/lib/librte_eal/linuxapp/eal/eal_thread.c
@@ -176,7 +176,7 @@ int rte_sys_gettid(void)
 
 int rte_thread_setname(pthread_t id, const char *name)
 {
-	int ret = -1;
+	int ret = ENOSYS;
 #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
 #if __GLIBC_PREREQ(2, 12)
 	ret = pthread_setname_np(id, name);
@@ -184,5 +184,5 @@ int rte_thread_setname(pthread_t id, const char *name)
 #endif
 	RTE_SET_USED(id);
 	RTE_SET_USED(name);
-	return ret;
+	return -ret;
 }
-- 
2.17.1

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

* [dpdk-stable] patch 'eal: fix return codes on control thread failure' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (108 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'eal: fix return codes on thread naming failure' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'eal/bsd: fix memory segment index display' " Christian Ehrhardt
                   ` (65 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Dariusz Stojaczyk; +Cc: Anatoly Burakov, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From ed41f001370d20421a927a38f3ac33b549cdb450 Mon Sep 17 00:00:00 2001
From: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Date: Tue, 10 Jul 2018 12:44:47 +0200
Subject: [PATCH] eal: fix return codes on control thread failure

[ upstream commit 6770a5f8a24855e679e78dbe6abf13dbc5543926 ]

This function returned positive error numbers instead
of negative ones as desbribed in the doc. What's worse,
multiple of its callers only check for (rc < 0) to detect
failure.

It was incorrectly assumed that pthread_create
and pthread_setaffinity_np return negative errnos. They
always returns positive ones, so this patch negates their
return values before returning.

Fixes: 9e5afc72c909 ("eal: add function to create control threads")

Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_eal/common/eal_common_thread.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_thread.c b/lib/librte_eal/common/eal_common_thread.c
index 42398630a..1b91c42b8 100644
--- a/lib/librte_eal/common/eal_common_thread.c
+++ b/lib/librte_eal/common/eal_common_thread.c
@@ -175,7 +175,7 @@ rte_ctrl_thread_create(pthread_t *thread, const char *name,
 
 	params = malloc(sizeof(*params));
 	if (!params)
-		return -1;
+		return -ENOMEM;
 
 	params->start_routine = start_routine;
 	params->arg = arg;
@@ -185,7 +185,7 @@ rte_ctrl_thread_create(pthread_t *thread, const char *name,
 	ret = pthread_create(thread, attr, rte_thread_init, (void *)params);
 	if (ret != 0) {
 		free(params);
-		return ret;
+		return -ret;
 	}
 
 	if (name != NULL) {
@@ -227,5 +227,5 @@ fail:
 	}
 	pthread_cancel(*thread);
 	pthread_join(*thread, NULL);
-	return ret;
+	return -ret;
 }
-- 
2.17.1

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

* [dpdk-stable] patch 'eal/bsd: fix memory segment index display' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (109 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'eal: fix return codes on control thread " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'malloc: fix pad erasing' " Christian Ehrhardt
                   ` (64 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From cd45cc857f4485b588c187b1839d310d97697f90 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Thu, 28 Jun 2018 12:41:47 +0100
Subject: [PATCH] eal/bsd: fix memory segment index display

[ upstream commit 953e6913c1916c189f19bc149049da271ddccab1 ]

Segment index was set to 0 at start but was never incremented.
This has no consequences other than displayed number of segments
allocated at initialization. Fix this by incrementing it after
displaying.

Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists")

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

diff --git a/lib/librte_eal/bsdapp/eal/eal_memory.c b/lib/librte_eal/bsdapp/eal/eal_memory.c
index a5e034789..ca06de2f8 100644
--- a/lib/librte_eal/bsdapp/eal/eal_memory.c
+++ b/lib/librte_eal/bsdapp/eal/eal_memory.c
@@ -200,7 +200,7 @@ rte_eal_hugepage_init(void)
 
 			RTE_LOG(INFO, EAL, "Mapped memory segment %u @ %p: physaddr:0x%"
 					PRIx64", len %zu\n",
-					seg_idx, addr, physaddr, page_sz);
+					seg_idx++, addr, physaddr, page_sz);
 
 			total_mem += seg->len;
 		}
-- 
2.17.1

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

* [dpdk-stable] patch 'malloc: fix pad erasing' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (110 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'eal/bsd: fix memory segment index display' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'eal/linux: fix invalid syntax in interrupts' " Christian Ehrhardt
                   ` (63 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 721ae6f82296a0ba96a6cd1cab39a6ffd1aca246 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Thu, 31 May 2018 18:05:40 +0100
Subject: [PATCH] malloc: fix pad erasing

[ upstream commit e43a9f52b7ff1758a34662030d6fa78ff9313d59 ]

Previously, when joining adjacent free elements, we were erasing
trailer and header, but did not erase the padding. Fix this by
accounting for padding on erase, and do not erase padding twice
by adjusting data pointer and data len to not include padding.

Fixes: bb372060dad4 ("malloc: make heap a doubly-linked list")

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

diff --git a/lib/librte_eal/common/malloc_elem.c b/lib/librte_eal/common/malloc_elem.c
index 9bfe9b9b4..944587bc5 100644
--- a/lib/librte_eal/common/malloc_elem.c
+++ b/lib/librte_eal/common/malloc_elem.c
@@ -386,16 +386,18 @@ malloc_elem_join_adjacent_free(struct malloc_elem *elem)
 	if (elem->next != NULL && elem->next->state == ELEM_FREE &&
 			next_elem_is_adjacent(elem)) {
 		void *erase;
+		size_t erase_len;
 
 		/* we will want to erase the trailer and header */
 		erase = RTE_PTR_SUB(elem->next, MALLOC_ELEM_TRAILER_LEN);
+		erase_len = MALLOC_ELEM_OVERHEAD + elem->next->pad;
 
 		/* remove from free list, join to this one */
 		malloc_elem_free_list_remove(elem->next);
 		join_elem(elem, elem->next);
 
-		/* erase header and trailer */
-		memset(erase, 0, MALLOC_ELEM_OVERHEAD);
+		/* erase header, trailer and pad */
+		memset(erase, 0, erase_len);
 	}
 
 	/*
@@ -406,9 +408,11 @@ malloc_elem_join_adjacent_free(struct malloc_elem *elem)
 			prev_elem_is_adjacent(elem)) {
 		struct malloc_elem *new_elem;
 		void *erase;
+		size_t erase_len;
 
 		/* we will want to erase trailer and header */
 		erase = RTE_PTR_SUB(elem, MALLOC_ELEM_TRAILER_LEN);
+		erase_len = MALLOC_ELEM_OVERHEAD + elem->pad;
 
 		/* remove from free list, join to this one */
 		malloc_elem_free_list_remove(elem->prev);
@@ -416,8 +420,8 @@ malloc_elem_join_adjacent_free(struct malloc_elem *elem)
 		new_elem = elem->prev;
 		join_elem(new_elem, elem);
 
-		/* erase header and trailer */
-		memset(erase, 0, MALLOC_ELEM_OVERHEAD);
+		/* erase header, trailer and pad */
+		memset(erase, 0, erase_len);
 
 		elem = new_elem;
 	}
@@ -436,8 +440,8 @@ malloc_elem_free(struct malloc_elem *elem)
 	void *ptr;
 	size_t data_len;
 
-	ptr = RTE_PTR_ADD(elem, sizeof(*elem));
-	data_len = elem->size - MALLOC_ELEM_OVERHEAD;
+	ptr = RTE_PTR_ADD(elem, MALLOC_ELEM_HEADER_LEN + elem->pad);
+	data_len = elem->size - elem->pad - MALLOC_ELEM_OVERHEAD;
 
 	elem = malloc_elem_join_adjacent_free(elem);
 
-- 
2.17.1

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

* [dpdk-stable] patch 'eal/linux: fix invalid syntax in interrupts' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (111 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'malloc: fix pad erasing' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'eal/linux: fix uninitialized value' " Christian Ehrhardt
                   ` (62 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From db6c9c7cb2277b5f40e12458e68049543f05f968 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Fri, 1 Jun 2018 10:08:10 +0100
Subject: [PATCH] eal/linux: fix invalid syntax in interrupts

[ upstream commit 462dd3722eb7dec0db5833fbccb044e06d2a8e50 ]

Parentheses were missing. It worked because macro is enclosed in
parentheses, so syntax was valid after macro expansion.

Bugzilla ID: 58
Fixes: 0a45657a6794 ("pci: rework interrupt handling")

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

diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
index 056d41c12..a631124d3 100644
--- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c
+++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
@@ -420,7 +420,7 @@ rte_intr_callback_register(const struct rte_intr_handle *intr_handle,
 	TAILQ_FOREACH(src, &intr_sources, next) {
 		if (src->intr_handle.fd == intr_handle->fd) {
 			/* we had no interrupts for this */
-			if TAILQ_EMPTY(&src->callbacks)
+			if (TAILQ_EMPTY(&src->callbacks))
 				wake_thread = 1;
 
 			TAILQ_INSERT_TAIL(&(src->callbacks), callback, next);
-- 
2.17.1

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

* [dpdk-stable] patch 'eal/linux: fix uninitialized value' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (112 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'eal/linux: fix invalid syntax in interrupts' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'vfio: fix uninitialized variable' " Christian Ehrhardt
                   ` (61 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 772d4e3c64145973b790fc89b2f98ade1c45c432 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Fri, 1 Jun 2018 10:08:11 +0100
Subject: [PATCH] eal/linux: fix uninitialized value

[ upstream commit 96712b33afa547a6b872f15e5e723e8120b33ad6 ]

The value is not used, but some static analyzers may give out a
warning. Fix it by assigning default value of zero.

Bugzilla ID: 58
Fixes: cdc242f260e7 ("eal/linux: support running as unprivileged user")

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

diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c
index c917de1c2..c53e6ed36 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
@@ -66,7 +66,7 @@ static bool phys_addrs_available = true;
 static void
 test_phys_addrs_available(void)
 {
-	uint64_t tmp;
+	uint64_t tmp = 0;
 	phys_addr_t physaddr;
 
 	if (!rte_eal_has_hugepages()) {
-- 
2.17.1

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

* [dpdk-stable] patch 'vfio: fix uninitialized variable' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (113 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'eal/linux: fix uninitialized value' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/mlx5: fix build with rdma-core v19' " Christian Ehrhardt
                   ` (60 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 059e1493c1c031daebb0d29088fbc729bcefe040 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Fri, 1 Jun 2018 10:08:12 +0100
Subject: [PATCH] vfio: fix uninitialized variable

[ upstream commit c63a42535ada8e4226b9a41bb7757d0d045f8a72 ]

Some static analyzers complain about it, even though
value is never used if not initialized. To avoid additional
false positives about a potential null-pointer dereferences,
also add a null-check.

Bugzilla ID: 58
Fixes: ea2dc1066870 ("vfio: add multi container support")

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

diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c
index a2bbdfbf4..4b7fcf3d6 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c
@@ -1778,7 +1778,7 @@ int __rte_experimental
 rte_vfio_container_group_unbind(int container_fd, int iommu_group_num)
 {
 	struct vfio_config *vfio_cfg;
-	struct vfio_group *cur_grp;
+	struct vfio_group *cur_grp = NULL;
 	int i;
 
 	vfio_cfg = get_vfio_cfg_by_container_fd(container_fd);
@@ -1795,7 +1795,7 @@ rte_vfio_container_group_unbind(int container_fd, int iommu_group_num)
 	}
 
 	/* This should not happen */
-	if (i == VFIO_MAX_GROUPS) {
+	if (i == VFIO_MAX_GROUPS || cur_grp == NULL) {
 		RTE_LOG(ERR, EAL, "Specified group number not found\n");
 		return -1;
 	}
-- 
2.17.1

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

* [dpdk-stable] patch 'net/mlx5: fix build with rdma-core v19' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (114 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'vfio: fix uninitialized variable' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'ethdev: check queue stats mapping input arguments' " Christian Ehrhardt
                   ` (59 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Shahaf Shuler; +Cc: Stephen Hemminger, Ferruh Yigit, Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From c74ede60bda78c19af6f4bd9cf9fe93808317c8c Mon Sep 17 00:00:00 2001
From: Shahaf Shuler <shahafs@mellanox.com>
Date: Thu, 12 Jul 2018 09:40:32 +0300
Subject: [PATCH] net/mlx5: fix build with rdma-core v19

[ upstream commit 06b1fe3f6d2121009b3b879e92b8cca25d4c0c42 ]

The flow counter support introduced by
commit 9a761de8ea14 ("net/mlx5: flow counter support") was intend to
work only with MLNX_OFED_4.3 as the upstream rdma-core
libraries were lack such support.

On rdma-core v19 the support for the flow counters was added but with
different user APIs, hence causing compilation issues on the PMD.

This patch fix the compilation errors by forcing the flow counters
to be enabled only with MLNX_OFED APIs.
Once MLNX_OFED and rdma-core APIs will be aligned, a proper patch to
support the new API will be submitted.

Fixes: 9a761de8ea14 ("net/mlx5: flow counter support")

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
 drivers/net/mlx5/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile
index 8a5229e61..03bbfc309 100644
--- a/drivers/net/mlx5/Makefile
+++ b/drivers/net/mlx5/Makefile
@@ -150,7 +150,7 @@ mlx5_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh
 	$Q sh -- '$<' '$@' \
 		HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT \
 		infiniband/verbs.h \
-		enum IBV_FLOW_SPEC_ACTION_COUNT \
+		type 'struct ibv_counter_set_init_attr' \
 		$(AUTOCONF_OUTPUT)
 
 # Create mlx5_autoconf.h or update it in case it differs from the new one.
-- 
2.17.1

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

* [dpdk-stable] patch 'ethdev: check queue stats mapping input arguments' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (115 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'net/mlx5: fix build with rdma-core v19' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'app/testpmd: fix typo in setting Tx offload command' " Christian Ehrhardt
                   ` (58 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Kiran Kumar; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From b58a253ff1f08b5297c29c2e3d1af29974e6b16f Mon Sep 17 00:00:00 2001
From: Kiran Kumar <kkokkilagadda@caviumnetworks.com>
Date: Wed, 11 Jul 2018 14:11:59 +0530
Subject: [PATCH] ethdev: check queue stats mapping input arguments

[ upstream commit de9c75a5485832104d2a0c246544ba3a511802b4 ]

With current implementation, we are not checking for queue_id range
and stat_idx range in stats mapping function. This patch will add
check for queue_id and stat_idx range.

Fixes: 5de201df892 ("ethdev: add stats per queue")

Signed-off-by: Kiran Kumar <kkokkilagadda@caviumnetworks.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 lib/librte_ethdev/rte_ethdev.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index cd4bfd3c6..5d1471b99 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -2456,6 +2456,16 @@ set_queue_stats_mapping(uint16_t port_id, uint16_t queue_id, uint8_t stat_idx,
 	dev = &rte_eth_devices[port_id];
 
 	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_stats_mapping_set, -ENOTSUP);
+
+	if (is_rx && (queue_id >= dev->data->nb_rx_queues))
+		return -EINVAL;
+
+	if (!is_rx && (queue_id >= dev->data->nb_tx_queues))
+		return -EINVAL;
+
+	if (stat_idx >= RTE_ETHDEV_QUEUE_STAT_CNTRS)
+		return -EINVAL;
+
 	return (*dev->dev_ops->queue_stats_mapping_set)
 			(dev, queue_id, stat_idx, is_rx);
 }
-- 
2.17.1

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

* [dpdk-stable] patch 'app/testpmd: fix typo in setting Tx offload command' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (116 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'ethdev: check queue stats mapping input arguments' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'malloc: do not skip pad on free' " Christian Ehrhardt
                   ` (57 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Bernard Iremonger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From d03288c3a30dad57a53d67abbafe21fa4b1d510c Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 5 Jul 2018 17:58:00 +0100
Subject: [PATCH] app/testpmd: fix typo in setting Tx offload command

[ upstream commit d9ddc004e6968baece016124cc2d000c55afc8aa ]

udp_cksum is duplicated, second one should be tcp_cksum

Fixes: c73a9071877a ("app/testpmd: add commands to test new offload API")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test-pmd/cmdline.c                      | 8 ++++----
 doc/guides/testpmd_app_ug/testpmd_funcs.rst | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 27e2aa8c8..6d67dbd43 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -17051,7 +17051,7 @@ cmdline_parse_token_string_t cmd_config_per_port_tx_offload_result_tx_offload =
 cmdline_parse_token_string_t cmd_config_per_port_tx_offload_result_offload =
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_port_tx_offload_result,
-		 offload, "vlan_insert#ipv4_cksum#udp_cksum#udp_cksum#"
+		 offload, "vlan_insert#ipv4_cksum#udp_cksum#tcp_cksum#"
 			  "sctp_cksum#tcp_tso#udp_tso#outer_ipv4_cksum#"
 			  "qinq_insert#vxlan_tnl_tso#gre_tnl_tso#"
 			  "ipip_tnl_tso#geneve_tnl_tso#macsec_insert#"
@@ -17132,7 +17132,7 @@ cmdline_parse_inst_t cmd_config_per_port_tx_offload = {
 	.f = cmd_config_per_port_tx_offload_parsed,
 	.data = NULL,
 	.help_str = "port config <port_id> tx_offload "
-		    "vlan_insert|ipv4_cksum|udp_cksum|udp_cksum|"
+		    "vlan_insert|ipv4_cksum|udp_cksum|tcp_cksum|"
 		    "sctp_cksum|tcp_tso|udp_tso|outer_ipv4_cksum|"
 		    "qinq_insert|vxlan_tnl_tso|gre_tnl_tso|"
 		    "ipip_tnl_tso|geneve_tnl_tso|macsec_insert|"
@@ -17183,7 +17183,7 @@ cmdline_parse_token_string_t cmd_config_per_queue_tx_offload_result_txoffload =
 cmdline_parse_token_string_t cmd_config_per_queue_tx_offload_result_offload =
 	TOKEN_STRING_INITIALIZER
 		(struct cmd_config_per_queue_tx_offload_result,
-		 offload, "vlan_insert#ipv4_cksum#udp_cksum#udp_cksum#"
+		 offload, "vlan_insert#ipv4_cksum#udp_cksum#tcp_cksum#"
 			  "sctp_cksum#tcp_tso#udp_tso#outer_ipv4_cksum#"
 			  "qinq_insert#vxlan_tnl_tso#gre_tnl_tso#"
 			  "ipip_tnl_tso#geneve_tnl_tso#macsec_insert#"
@@ -17236,7 +17236,7 @@ cmdline_parse_inst_t cmd_config_per_queue_tx_offload = {
 	.f = cmd_config_per_queue_tx_offload_parsed,
 	.data = NULL,
 	.help_str = "port <port_id> txq <queue_id> tx_offload "
-		    "vlan_insert|ipv4_cksum|udp_cksum|udp_cksum|"
+		    "vlan_insert|ipv4_cksum|udp_cksum|tcp_cksum|"
 		    "sctp_cksum|tcp_tso|udp_tso|outer_ipv4_cksum|"
 		    "qinq_insert|vxlan_tnl_tso|gre_tnl_tso|"
 		    "ipip_tnl_tso|geneve_tnl_tso|macsec_insert|"
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 0d6fd50ca..91e074592 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -1510,7 +1510,7 @@ Enable or disable a per port Tx offloading on all Tx queues of a port::
    testpmd> port config (port_id) tx_offload (offloading) on|off
 
 * ``offloading``: can be any of these offloading capability:
-                  vlan_insert, ipv4_cksum, udp_cksum, udp_cksum,
+                  vlan_insert, ipv4_cksum, udp_cksum, tcp_cksum,
                   sctp_cksum, tcp_tso, udp_tso, outer_ipv4_cksum,
                   qinq_insert, vxlan_tnl_tso, gre_tnl_tso,
                   ipip_tnl_tso, geneve_tnl_tso, macsec_insert,
@@ -1526,7 +1526,7 @@ Enable or disable a per queue Tx offloading only on a specific Tx queue::
    testpmd> port (port_id) txq (queue_id) tx_offload (offloading) on|off
 
 * ``offloading``: can be any of these offloading capability:
-                  vlan_insert, ipv4_cksum, udp_cksum, udp_cksum,
+                  vlan_insert, ipv4_cksum, udp_cksum, tcp_cksum,
                   sctp_cksum, tcp_tso, udp_tso, outer_ipv4_cksum,
                   qinq_insert, vxlan_tnl_tso, gre_tnl_tso,
                   ipip_tnl_tso, geneve_tnl_tso, macsec_insert,
-- 
2.17.1

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

* [dpdk-stable] patch 'malloc: do not skip pad on free' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (117 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'app/testpmd: fix typo in setting Tx offload command' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'eal: fix hotplug add and remove' " Christian Ehrhardt
                   ` (56 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 086e05c754768deac7b0813d136b03241ae71464 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Thu, 19 Jul 2018 10:42:46 +0100
Subject: [PATCH] malloc: do not skip pad on free

[ upstream commit 9554dbb50a8a22942128a0e5bcb52243a4f723ab ]

Previously, we were skipping erasing pad because we were
expecting it to be freed when we were merging adjacent
segments. However, if there were no adjacent segments to
merge, we would've skipped erasing the pad, leaving non-zero
memory in our free space.

Fix this by including pad in the erasing unconditionally.

Fixes: e43a9f52b7ff ("malloc: fix pad erasing")

Reported-by: Andrew Rybchenko <arybchenko@solarflare.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 lib/librte_eal/common/malloc_elem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/malloc_elem.c b/lib/librte_eal/common/malloc_elem.c
index 944587bc5..a39a8e611 100644
--- a/lib/librte_eal/common/malloc_elem.c
+++ b/lib/librte_eal/common/malloc_elem.c
@@ -440,8 +440,8 @@ malloc_elem_free(struct malloc_elem *elem)
 	void *ptr;
 	size_t data_len;
 
-	ptr = RTE_PTR_ADD(elem, MALLOC_ELEM_HEADER_LEN + elem->pad);
-	data_len = elem->size - elem->pad - MALLOC_ELEM_OVERHEAD;
+	ptr = RTE_PTR_ADD(elem, MALLOC_ELEM_HEADER_LEN);
+	data_len = elem->size - MALLOC_ELEM_OVERHEAD;
 
 	elem = malloc_elem_join_adjacent_free(elem);
 
-- 
2.17.1

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

* [dpdk-stable] patch 'eal: fix hotplug add and remove' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (118 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'malloc: do not skip pad on free' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'vfio: fix PCI address comparison' " Christian Ehrhardt
                   ` (55 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Gaetan Rivet, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 81c2ea6390212c959872e06b58ed35c790a5aa4f Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Thu, 12 Jul 2018 22:01:41 +0800
Subject: [PATCH] eal: fix hotplug add and remove

[ upstream commit 196e9a486cb1a0fd929a15244e7d9169ef5ede00 ]

If hotplug add an already plugged PCI device, it will
cause rte_pci_device->device.name be corrupted due to unexpected
rte_devargs_remove. Also if try to hotplug remove an already
unplugged device, it will cause segment fault due to unexpected
bus->unplug on a rte_device whose driver is NULL.
The patch fix these issues.

Fixes: 7e8b26650146 ("eal: fix hotplug add / remove")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
 lib/librte_eal/common/eal_common_dev.c | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c
index 61cb3b162..0fa8c815d 100644
--- a/lib/librte_eal/common/eal_common_dev.c
+++ b/lib/librte_eal/common/eal_common_dev.c
@@ -42,18 +42,6 @@ static struct dev_event_cb_list dev_event_cbs;
 /* spinlock for device callbacks */
 static rte_spinlock_t dev_event_lock = RTE_SPINLOCK_INITIALIZER;
 
-static int cmp_detached_dev_name(const struct rte_device *dev,
-	const void *_name)
-{
-	const char *name = _name;
-
-	/* skip attached devices */
-	if (dev->driver != NULL)
-		return 1;
-
-	return strcmp(dev->name, name);
-}
-
 static int cmp_dev_name(const struct rte_device *dev, const void *_name)
 {
 	const char *name = _name;
@@ -151,14 +139,19 @@ int __rte_experimental rte_eal_hotplug_add(const char *busname, const char *devn
 	if (ret)
 		goto err_devarg;
 
-	dev = bus->find_device(NULL, cmp_detached_dev_name, devname);
+	dev = bus->find_device(NULL, cmp_dev_name, devname);
 	if (dev == NULL) {
-		RTE_LOG(ERR, EAL, "Cannot find unplugged device (%s)\n",
+		RTE_LOG(ERR, EAL, "Cannot find device (%s)\n",
 			devname);
 		ret = -ENODEV;
 		goto err_devarg;
 	}
 
+	if (dev->driver != NULL) {
+		RTE_LOG(ERR, EAL, "Device is already plugged\n");
+		return -EEXIST;
+	}
+
 	ret = bus->plug(dev);
 	if (ret) {
 		RTE_LOG(ERR, EAL, "Driver cannot attach the device (%s)\n",
@@ -200,6 +193,11 @@ rte_eal_hotplug_remove(const char *busname, const char *devname)
 		return -EINVAL;
 	}
 
+	if (dev->driver == NULL) {
+		RTE_LOG(ERR, EAL, "Device is already unplugged\n");
+		return -ENOENT;
+	}
+
 	ret = bus->unplug(dev);
 	if (ret)
 		RTE_LOG(ERR, EAL, "Driver cannot detach the device (%s)\n",
-- 
2.17.1

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

* [dpdk-stable] patch 'vfio: fix PCI address comparison' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (119 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'eal: fix hotplug add and remove' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'vfio: remove uneccessary IPC for group fd clear' " Christian Ehrhardt
                   ` (54 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Gaetan Rivet, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 7b4fab5a318ebd003875596edc0b7d5b7b6a5416 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Thu, 12 Jul 2018 22:01:42 +0800
Subject: [PATCH] vfio: fix PCI address comparison

[ upstream commit 2a3de3710fbc54499867b44951b5b41cdb2aba35 ]

When use memcmp to compare two PCI address, sizeof(struct rte_pci_addr)
is 4 bytes aligned, and it is 8. While only 7 byte of struct rte_pci_addr
is valid. So compare the 8th byte will cause the unexpected result, which
happens when repeatedly attach/detach a device.

Fixes: 94c0776b1bad ("vfio: support hotplug")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
 drivers/bus/pci/linux/pci_vfio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index aeeaa9ed8..933b95540 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -642,7 +642,7 @@ pci_vfio_unmap_resource(struct rte_pci_device *dev)
 	vfio_res_list = RTE_TAILQ_CAST(rte_vfio_tailq.head, mapped_pci_res_list);
 	/* Get vfio_res */
 	TAILQ_FOREACH(vfio_res, vfio_res_list, next) {
-		if (memcmp(&vfio_res->pci_addr, &dev->addr, sizeof(dev->addr)))
+		if (rte_pci_addr_cmp(&vfio_res->pci_addr, &dev->addr))
 			continue;
 		break;
 	}
-- 
2.17.1

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

* [dpdk-stable] patch 'vfio: remove uneccessary IPC for group fd clear' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (120 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'vfio: fix PCI address comparison' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix IPv4 checksum at Tx' " Christian Ehrhardt
                   ` (53 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 43ba050cbe8914374148d5371cfd7911f16d88c9 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Thu, 12 Jul 2018 22:01:44 +0800
Subject: [PATCH] vfio: remove uneccessary IPC for group fd clear

[ upstream commit 6a015363b3eacf1f2d245734a58c9dfd47bc386d ]

Clear vfio_group_fd is not necessary to involve any IPC.
Also, current IPC implementation for SOCKET_CLR_GROUP is not
correct. rte_vfio_clear_group on secondary will always fail,
that prevent device be detached correctly on a secondary process.
The patch simply removes all IPC related stuff in
rte_vfio_clear_group.

Fixes: 83a73c5fef66 ("vfio: use generic multi-process channel")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/linuxapp/eal/eal_vfio.c        | 45 ++++---------------
 lib/librte_eal/linuxapp/eal/eal_vfio.h        |  1 -
 .../linuxapp/eal/eal_vfio_mp_sync.c           |  8 ----
 3 files changed, 8 insertions(+), 46 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c
index 4b7fcf3d6..807e640bc 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c
@@ -575,10 +575,6 @@ int
 rte_vfio_clear_group(int vfio_group_fd)
 {
 	int i;
-	struct rte_mp_msg mp_req, *mp_rep;
-	struct rte_mp_reply mp_reply;
-	struct timespec ts = {.tv_sec = 5, .tv_nsec = 0};
-	struct vfio_mp_param *p = (struct vfio_mp_param *)mp_req.param;
 	struct vfio_config *vfio_cfg;
 
 	vfio_cfg = get_vfio_cfg_by_group_fd(vfio_group_fd);
@@ -587,40 +583,15 @@ rte_vfio_clear_group(int vfio_group_fd)
 		return -1;
 	}
 
-	if (internal_config.process_type == RTE_PROC_PRIMARY) {
-
-		i = get_vfio_group_idx(vfio_group_fd);
-		if (i < 0)
-			return -1;
-		vfio_cfg->vfio_groups[i].group_num = -1;
-		vfio_cfg->vfio_groups[i].fd = -1;
-		vfio_cfg->vfio_groups[i].devices = 0;
-		vfio_cfg->vfio_active_groups--;
-		return 0;
-	}
-
-	p->req = SOCKET_CLR_GROUP;
-	p->group_num = vfio_group_fd;
-	strcpy(mp_req.name, EAL_VFIO_MP);
-	mp_req.len_param = sizeof(*p);
-	mp_req.num_fds = 0;
-
-	if (rte_mp_request_sync(&mp_req, &mp_reply, &ts) == 0 &&
-	    mp_reply.nb_received == 1) {
-		mp_rep = &mp_reply.msgs[0];
-		p = (struct vfio_mp_param *)mp_rep->param;
-		if (p->result == SOCKET_OK) {
-			free(mp_reply.msgs);
-			return 0;
-		} else if (p->result == SOCKET_NO_FD)
-			RTE_LOG(ERR, EAL, "  BAD VFIO group fd!\n");
-		else
-			RTE_LOG(ERR, EAL, "  no such VFIO group fd!\n");
-
-		free(mp_reply.msgs);
-	}
+	i = get_vfio_group_idx(vfio_group_fd);
+	if (i < 0)
+		return -1;
+	vfio_cfg->vfio_groups[i].group_num = -1;
+	vfio_cfg->vfio_groups[i].fd = -1;
+	vfio_cfg->vfio_groups[i].devices = 0;
+	vfio_cfg->vfio_active_groups--;
 
-	return -1;
+	return 0;
 }
 
 int
diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.h b/lib/librte_eal/linuxapp/eal/eal_vfio.h
index e65b10374..68d4750a5 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.h
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.h
@@ -129,7 +129,6 @@ int vfio_mp_sync_setup(void);
 
 #define SOCKET_REQ_CONTAINER 0x100
 #define SOCKET_REQ_GROUP 0x200
-#define SOCKET_CLR_GROUP 0x300
 #define SOCKET_OK 0x0
 #define SOCKET_NO_FD 0x1
 #define SOCKET_ERR 0xFF
diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c b/lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c
index 9c202bb08..680a24aae 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c
@@ -55,14 +55,6 @@ vfio_mp_primary(const struct rte_mp_msg *msg, const void *peer)
 			reply.fds[0] = fd;
 		}
 		break;
-	case SOCKET_CLR_GROUP:
-		r->req = SOCKET_CLR_GROUP;
-		r->group_num = m->group_num;
-		if (rte_vfio_clear_group(m->group_num) < 0)
-			r->result = SOCKET_NO_FD;
-		else
-			r->result = SOCKET_OK;
-		break;
 	case SOCKET_REQ_CONTAINER:
 		r->req = SOCKET_REQ_CONTAINER;
 		fd = rte_vfio_get_container_fd();
-- 
2.17.1

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

* [dpdk-stable] patch 'examples/ipsec-secgw: fix IPv4 checksum at Tx' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (121 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'vfio: remove uneccessary IPC for group fd clear' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'compress/isal: fix offset usage' " Christian Ehrhardt
                   ` (52 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: Radu Nicolau, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 8416ca128d4953207b895b41d01c51657740cc2f Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
Date: Wed, 6 Jun 2018 13:04:01 +0100
Subject: [PATCH] examples/ipsec-secgw: fix IPv4 checksum at Tx

[ upstream commit b45be46dfd4548acd8f130841d02e97ab7bc7eb8 ]

For ESP transport and BYPASS mode the app might generate output
packets with invalid IPv4 header checksum.
At least such behavior was observed on few Intel NICs.
The reason is that the app didn't set ipv4 header checksum to zero
before passing it to the HW.

Fixes: 906257e965b7 ("examples/ipsec-secgw: support IPv6")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index a5da8b280..e1e861e52 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -331,6 +331,7 @@ prepare_tx_pkt(struct rte_mbuf *pkt, uint16_t port)
 		pkt->l3_len = sizeof(struct ip);
 		pkt->l2_len = ETHER_HDR_LEN;
 
+		ip->ip_sum = 0;
 		ethhdr->ether_type = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
 	} else {
 		pkt->ol_flags |= PKT_TX_IPV6;
-- 
2.17.1

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

* [dpdk-stable] patch 'compress/isal: fix offset usage' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (122 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix IPv4 checksum at Tx' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'compress/isal: fix log type name' " Christian Ehrhardt
                   ` (51 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Lee Daly; +Cc: Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 543765d49e80314be3ffd5f028b5360c4d280006 Mon Sep 17 00:00:00 2001
From: Lee Daly <lee.daly@intel.com>
Date: Wed, 11 Jul 2018 15:21:45 +0100
Subject: [PATCH] compress/isal: fix offset usage

[ upstream commit 6a000343ed2be981337e990cff717e9cb7de13f2 ]

This patch allows the ISA-L compression PMD,
to be used with offsets in the mbuf.
Offsets can now be used for source and destination buffers,
during compression or decompression.

Fixes: 7bf4f0630af6 ("compress/isal: add ISA-L decomp functionality")
Fixes: dc49e6aa4879 ("compress/isal: add ISA-L compression functionality")

Signed-off-by: Lee Daly <lee.daly@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 drivers/compress/isal/isal_compress_pmd.c | 66 +++++++++++++++++------
 1 file changed, 49 insertions(+), 17 deletions(-)

diff --git a/drivers/compress/isal/isal_compress_pmd.c b/drivers/compress/isal/isal_compress_pmd.c
index 0f025a3bf..78051f1c5 100644
--- a/drivers/compress/isal/isal_compress_pmd.c
+++ b/drivers/compress/isal/isal_compress_pmd.c
@@ -211,19 +211,6 @@ process_isal_deflate(struct rte_comp_op *op, struct isal_comp_qp *qp,
 	qp->stream->level = priv_xform->compress.level;
 	qp->stream->level_buf_size = priv_xform->level_buffer_size;
 
-	/* Point compression stream structure to input/output buffers */
-	qp->stream->avail_in = op->src.length;
-	qp->stream->next_in = rte_pktmbuf_mtod(op->m_src, uint8_t *);
-	qp->stream->avail_out = op->m_dst->data_len;
-	qp->stream->next_out  = rte_pktmbuf_mtod(op->m_dst, uint8_t *);
-	qp->stream->end_of_stream = 1; /* All input consumed in one go */
-
-	if (unlikely(!qp->stream->next_in || !qp->stream->next_out)) {
-		ISAL_PMD_LOG(ERR, "Invalid source or destination buffers\n");
-		op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
-		return -1;
-	}
-
 	/* Set op huffman code */
 	if (priv_xform->compress.deflate.huffman == RTE_COMP_HUFFMAN_FIXED)
 		isal_deflate_set_hufftables(qp->stream, NULL,
@@ -238,6 +225,35 @@ process_isal_deflate(struct rte_comp_op *op, struct isal_comp_qp *qp,
 		isal_deflate_set_hufftables(qp->stream, NULL,
 				IGZIP_HUFFTABLE_DEFAULT);
 
+	qp->stream->end_of_stream = 1; /* All input consumed in one go */
+	if ((op->src.length + op->src.offset) > op->m_src->data_len) {
+		ISAL_PMD_LOG(ERR, "Input mbuf not big enough for the length and"
+				" offset provided.\n");
+		op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
+		return -1;
+	}
+	/* Point compression stream to input buffer */
+	qp->stream->avail_in = op->src.length;
+	qp->stream->next_in = rte_pktmbuf_mtod_offset(op->m_src, uint8_t *,
+			op->src.offset);
+
+	if (op->dst.offset > op->m_dst->data_len) {
+		ISAL_PMD_LOG(ERR, "Output mbuf not big enough for the length"
+				" and offset provided.\n");
+		op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
+		return -1;
+	}
+	/*  Point compression stream to output buffer */
+	qp->stream->avail_out = op->m_dst->data_len - op->dst.offset;
+	qp->stream->next_out  = rte_pktmbuf_mtod_offset(op->m_dst, uint8_t *,
+		op->dst.offset);
+
+	if (unlikely(!qp->stream->next_in || !qp->stream->next_out)) {
+		ISAL_PMD_LOG(ERR, "Invalid source or destination buffers\n");
+		op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
+		return -1;
+	}
+
 	/* Execute compression operation */
 	ret =  isal_deflate_stateless(qp->stream);
 
@@ -277,11 +293,27 @@ process_isal_inflate(struct rte_comp_op *op, struct isal_comp_qp *qp)
 	/* Initialize decompression state */
 	isal_inflate_init(qp->state);
 
-	/* Point decompression state structure to input/output buffers */
+	if ((op->src.length + op->src.offset) > op->m_src->data_len) {
+		ISAL_PMD_LOG(ERR, "Input mbuf not big enough for the length and"
+				" offset provided.\n");
+		op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
+		return -1;
+	}
+	/* Point decompression state to input buffer */
 	qp->state->avail_in = op->src.length;
-	qp->state->next_in = rte_pktmbuf_mtod(op->m_src, uint8_t *);
-	qp->state->avail_out = op->m_dst->data_len;
-	qp->state->next_out  = rte_pktmbuf_mtod(op->m_dst, uint8_t *);
+	qp->state->next_in = rte_pktmbuf_mtod_offset(op->m_src, uint8_t *,
+			op->src.offset);
+
+	if (op->dst.offset > op->m_dst->data_len) {
+		ISAL_PMD_LOG(ERR, "Output mbuf not big enough for the length "
+				"and offset provided.\n");
+		op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
+		return -1;
+	}
+	/* Point decompression state to output buffer */
+	qp->state->avail_out = op->m_dst->data_len - op->dst.offset;
+	qp->state->next_out  = rte_pktmbuf_mtod_offset(op->m_dst, uint8_t *,
+			op->dst.offset);
 
 	if (unlikely(!qp->state->next_in || !qp->state->next_out)) {
 		ISAL_PMD_LOG(ERR, "Invalid source or destination buffers\n");
-- 
2.17.1

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

* [dpdk-stable] patch 'compress/isal: fix log type name' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (123 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'compress/isal: fix offset usage' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'compress/isal: set null pointer after freeing' " Christian Ehrhardt
                   ` (50 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Lee Daly, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 43555395c9c3b27d43e43577072165ffa6cb4179 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Wed, 11 Jul 2018 07:38:44 +0100
Subject: [PATCH] compress/isal: fix log type name

[ upstream commit 23edc362ff53b190b1a4ca0abf5619a5d45bac5a ]

There is a naming convention for logtypes of PMDs:
"pmd.driverType.driverName".
Therefore, the logtype for ISA-L PMD should be "pmd.compress.isal".

Fixes: 490e725b95b2 ("compress/isal: add device init and de-init")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Lee Daly <lee.daly@intel.com>
---
 drivers/compress/isal/isal_compress_pmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/compress/isal/isal_compress_pmd.c b/drivers/compress/isal/isal_compress_pmd.c
index 78051f1c5..fa557c08e 100644
--- a/drivers/compress/isal/isal_compress_pmd.c
+++ b/drivers/compress/isal/isal_compress_pmd.c
@@ -497,7 +497,7 @@ RTE_INIT(isal_init_log);
 static void
 isal_init_log(void)
 {
-	isal_logtype_driver = rte_log_register("comp_isal");
+	isal_logtype_driver = rte_log_register("pmd.compress.isal");
 	if (isal_logtype_driver >= 0)
 		rte_log_set_level(isal_logtype_driver, RTE_LOG_INFO);
 }
-- 
2.17.1

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

* [dpdk-stable] patch 'compress/isal: set null pointer after freeing' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (124 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'compress/isal: fix log type name' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'compress/isal: fix memory leak' " Christian Ehrhardt
                   ` (49 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Lee Daly, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 9d1f05325367b9b64dcea8820dd4cea5a5e96206 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Wed, 11 Jul 2018 07:38:45 +0100
Subject: [PATCH] compress/isal: set null pointer after freeing

[ upstream commit 2d02781c7ad90cd68dd0a05ce3323b2b0d8a991c ]

Fixes: b0e23c458a6f ("compress/isal: add queue pair related ops")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Lee Daly <lee.daly@intel.com>
---
 drivers/compress/isal/isal_compress_pmd_ops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/compress/isal/isal_compress_pmd_ops.c b/drivers/compress/isal/isal_compress_pmd_ops.c
index 970a0413b..83b09c2dc 100644
--- a/drivers/compress/isal/isal_compress_pmd_ops.c
+++ b/drivers/compress/isal/isal_compress_pmd_ops.c
@@ -165,8 +165,8 @@ isal_comp_pmd_qp_release(struct rte_compressdev *dev, uint16_t qp_id)
 	if (qp->state != NULL)
 		rte_free(qp->state);
 
-	if (dev->data->queue_pairs[qp_id] != NULL)
-		rte_free(dev->data->queue_pairs[qp_id]);
+	rte_free(qp);
+	dev->data->queue_pairs[qp_id] = NULL;
 
 	return 0;
 }
-- 
2.17.1

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

* [dpdk-stable] patch 'compress/isal: fix memory leak' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (125 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'compress/isal: set null pointer after freeing' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix digest with AEAD algo' " Christian Ehrhardt
                   ` (48 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Lee Daly, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 0196d4bbacd0c2f5ae8ae16e048f1c7c391c5d71 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Wed, 11 Jul 2018 07:38:46 +0100
Subject: [PATCH] compress/isal: fix memory leak

[ upstream commit f51c2901549085d176e5adc70777758481165fb9 ]

Processed operations ring is created for each queue pair,
but it was not being freed when the queue pair was released.

Fixes: b0e23c458a6f ("compress/isal: add queue pair related ops")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Lee Daly <lee.daly@intel.com>
---
 drivers/compress/isal/isal_compress_pmd_ops.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/compress/isal/isal_compress_pmd_ops.c b/drivers/compress/isal/isal_compress_pmd_ops.c
index 83b09c2dc..534a22859 100644
--- a/drivers/compress/isal/isal_compress_pmd_ops.c
+++ b/drivers/compress/isal/isal_compress_pmd_ops.c
@@ -165,6 +165,9 @@ isal_comp_pmd_qp_release(struct rte_compressdev *dev, uint16_t qp_id)
 	if (qp->state != NULL)
 		rte_free(qp->state);
 
+	if (qp->processed_pkts != NULL)
+		rte_ring_free(qp->processed_pkts);
+
 	rte_free(qp);
 	dev->data->queue_pairs[qp_id] = NULL;
 
-- 
2.17.1

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

* [dpdk-stable] patch 'examples/l2fwd-crypto: fix digest with AEAD algo' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (126 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'compress/isal: fix memory leak' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'examples/l2fwd-crypto: check return value on IV size check' " Christian Ehrhardt
                   ` (47 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Ankur Dwivedi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From a4c41de0d6892e42e8cf6d7738800a965735ad6c Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Mon, 16 Jul 2018 09:26:16 +0100
Subject: [PATCH] examples/l2fwd-crypto: fix digest with AEAD algo

[ upstream commit 6df38301de93165d2b12e793f2cf0e084414d917 ]

When performing authentication verification (both for AEAD algorithms,
such as AES-GCM, or for authentication algorithms, such as SHA1-HMAC),
the digest address is calculated based on the packet size and the
algorithm used (substracting digest size and IP header to the packet size).

However, for AEAD algorithms, this was not calculated correctly,
since the digest size was not being substracted.

Bugzilla ID: 44
Fixes: 2661f4fbe93d ("examples/l2fwd-crypto: add AEAD parameters")

Reported-by: Ankur Dwivedi <ankur.dwivedi@cavium.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tested-by: Ankur Dwivedi <ankur.dwivedi@cavium.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 4bca87b19..41c99cc04 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -407,7 +407,7 @@ l2fwd_simple_crypto_enqueue(struct rte_mbuf *m,
 	/* Zero pad data to be crypto'd so it is block aligned */
 	data_len  = rte_pktmbuf_data_len(m) - ipdata_offset;
 
-	if (cparams->do_hash && cparams->hash_verify)
+	if ((cparams->do_hash || cparams->do_aead) && cparams->hash_verify)
 		data_len -= cparams->digest_length;
 
 	if (cparams->do_cipher) {
-- 
2.17.1

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

* [dpdk-stable] patch 'examples/l2fwd-crypto: check return value on IV size check' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (127 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix digest with AEAD algo' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'examples/l2fwd-crypto: skip device not supporting operation' " Christian Ehrhardt
                   ` (46 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Fiona Trahe, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From b7bb17845f9394c500109dd763ec375ed46d446b Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Thu, 19 Jul 2018 09:39:55 +0100
Subject: [PATCH] examples/l2fwd-crypto: check return value on IV size check

[ upstream commit 53b9a5b66d6e2df2e0d92586d6636f03c529ea1a ]

IV size parameter is checked through a function,
but its return value was not checked.

Fixes: 0fbd75a99fc9 ("cryptodev: move IV parameters to session")
Fixes: acf8616901b5 ("cryptodev: add auth IV")
Fixes: 2661f4fbe93d ("examples/l2fwd-crypto: add AEAD parameters")

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 | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 41c99cc04..646512da6 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -2049,10 +2049,11 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 
 			options->block_size = cap->sym.aead.block_size;
 
-			check_iv_param(&cap->sym.aead.iv_size,
+			if (check_iv_param(&cap->sym.aead.iv_size,
 					options->aead_iv_param,
 					options->aead_iv_random_size,
-					&options->aead_iv.length);
+					&options->aead_iv.length) < 0)
+				return -1;
 
 			/*
 			 * Check if length of provided AEAD key is supported
@@ -2157,10 +2158,11 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 
 			options->block_size = cap->sym.cipher.block_size;
 
-			check_iv_param(&cap->sym.cipher.iv_size,
+			if (check_iv_param(&cap->sym.cipher.iv_size,
 					options->cipher_iv_param,
 					options->cipher_iv_random_size,
-					&options->cipher_iv.length);
+					&options->cipher_iv.length) < 0)
+				return -1;
 
 			/*
 			 * Check if length of provided cipher key is supported
@@ -2213,10 +2215,11 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 			if (cap == NULL)
 				continue;
 
-			check_iv_param(&cap->sym.auth.iv_size,
+			if (check_iv_param(&cap->sym.auth.iv_size,
 					options->auth_iv_param,
 					options->auth_iv_random_size,
-					&options->auth_iv.length);
+					&options->auth_iv.length) < 0)
+				return -1;
 			/*
 			 * Check if length of provided auth key is supported
 			 * by the algorithm chosen.
-- 
2.17.1

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

* [dpdk-stable] patch 'examples/l2fwd-crypto: skip device not supporting operation' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (128 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'examples/l2fwd-crypto: check return value on IV size check' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix bypass rule processing' " Christian Ehrhardt
                   ` (45 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Fiona Trahe, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 5530bb5285c66de7dd2d5d50297d3205b4991445 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Thu, 19 Jul 2018 09:39:56 +0100
Subject: [PATCH] examples/l2fwd-crypto: skip device not supporting operation

[ upstream commit a8fd8881ddf7be88c05e0fb258a54e861ae54a29 ]

When a crypto device does not support an algorithm, it is skipped
and not used. However, when it does support it, but not the rest
of the parameters (IV, key, AAD sizes...), application stops.
Instead, the device should be skipped and the search of a suitable
device should continue.

Fixes: a061e50a0d97 ("examples/l2fwd-crypto: fix ambiguous input key size")

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 | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 646512da6..e204d2282 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -2053,7 +2053,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 					options->aead_iv_param,
 					options->aead_iv_random_size,
 					&options->aead_iv.length) < 0)
-				return -1;
+				continue;
 
 			/*
 			 * Check if length of provided AEAD key is supported
@@ -2067,7 +2067,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 						cap->sym.aead.key_size.increment)
 							!= 0) {
 					printf("Unsupported aead key length\n");
-					return -1;
+					continue;
 				}
 			/*
 			 * Check if length of the aead key to be randomly generated
@@ -2080,7 +2080,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 						cap->sym.aead.key_size.increment)
 							!= 0) {
 					printf("Unsupported aead key length\n");
-					return -1;
+					continue;
 				}
 				options->aead_xform.aead.key.length =
 							options->aead_key_random_size;
@@ -2105,7 +2105,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 						cap->sym.aead.aad_size.increment)
 							!= 0) {
 					printf("Unsupported AAD length\n");
-					return -1;
+					continue;
 				}
 			/*
 			 * Check if length of AAD to be randomly generated
@@ -2118,7 +2118,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 						cap->sym.aead.aad_size.increment)
 							!= 0) {
 					printf("Unsupported AAD length\n");
-					return -1;
+					continue;
 				}
 				options->aad.length = options->aad_random_size;
 			/* No size provided, use minimum size. */
@@ -2136,7 +2136,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 						cap->sym.aead.digest_size.increment)
 							!= 0) {
 					printf("Unsupported digest length\n");
-					return -1;
+					continue;
 				}
 				options->aead_xform.aead.digest_length =
 							options->digest_size;
@@ -2162,7 +2162,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 					options->cipher_iv_param,
 					options->cipher_iv_random_size,
 					&options->cipher_iv.length) < 0)
-				return -1;
+				continue;
 
 			/*
 			 * Check if length of provided cipher key is supported
@@ -2176,7 +2176,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 						cap->sym.cipher.key_size.increment)
 							!= 0) {
 					printf("Unsupported cipher key length\n");
-					return -1;
+					continue;
 				}
 			/*
 			 * Check if length of the cipher key to be randomly generated
@@ -2189,7 +2189,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 						cap->sym.cipher.key_size.increment)
 							!= 0) {
 					printf("Unsupported cipher key length\n");
-					return -1;
+					continue;
 				}
 				options->cipher_xform.cipher.key.length =
 							options->ckey_random_size;
@@ -2219,7 +2219,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 					options->auth_iv_param,
 					options->auth_iv_random_size,
 					&options->auth_iv.length) < 0)
-				return -1;
+				continue;
 			/*
 			 * Check if length of provided auth key is supported
 			 * by the algorithm chosen.
@@ -2232,7 +2232,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 						cap->sym.auth.key_size.increment)
 							!= 0) {
 					printf("Unsupported auth key length\n");
-					return -1;
+					continue;
 				}
 			/*
 			 * Check if length of the auth key to be randomly generated
@@ -2245,7 +2245,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 						cap->sym.auth.key_size.increment)
 							!= 0) {
 					printf("Unsupported auth key length\n");
-					return -1;
+					continue;
 				}
 				options->auth_xform.auth.key.length =
 							options->akey_random_size;
@@ -2267,7 +2267,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 						cap->sym.auth.digest_size.increment)
 							!= 0) {
 					printf("Unsupported digest length\n");
-					return -1;
+					continue;
 				}
 				options->auth_xform.auth.digest_length =
 							options->digest_size;
-- 
2.17.1

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

* [dpdk-stable] patch 'examples/ipsec-secgw: fix bypass rule processing' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (129 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'examples/l2fwd-crypto: skip device not supporting operation' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'eal: fix error message for unsupported platforms' " Christian Ehrhardt
                   ` (44 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 9a7335c08b92867fa6e5fdbb4b8c22cf89c593b0 Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
Date: Tue, 5 Jun 2018 15:16:02 +0100
Subject: [PATCH] examples/ipsec-secgw: fix bypass rule processing

[ upstream commit c1fe6dbfcec2b17dd5fd115dcdec2ea573c4de0d ]

For outbound ports BYPASS rule is erroneously treated as PROTECT one
with SA idx zero.

Fixes: 2a5106af132b ("examples/ipsec-secgw: fix corner case for SPI value")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index e1e861e52..892e0c68c 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -511,11 +511,13 @@ outbound_sp(struct sp_ctx *sp, struct traffic_type *ip,
 		sa_idx = ip->res[i] & PROTECT_MASK;
 		if (ip->res[i] & DISCARD)
 			rte_pktmbuf_free(m);
+		else if (ip->res[i] & BYPASS)
+			ip->pkts[j++] = m;
 		else if (sa_idx < IPSEC_SA_MAX_ENTRIES) {
 			ipsec->res[ipsec->num] = sa_idx;
 			ipsec->pkts[ipsec->num++] = m;
-		} else /* BYPASS */
-			ip->pkts[j++] = m;
+		} else /* invalid SA idx */
+			rte_pktmbuf_free(m);
 	}
 	ip->num = j;
 }
-- 
2.17.1

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

* [dpdk-stable] patch 'eal: fix error message for unsupported platforms' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (130 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix bypass rule processing' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:12 ` [dpdk-stable] patch 'devtools: remove already enabled nfp from build test' " Christian Ehrhardt
                   ` (43 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 4b04b9dfaa8ee8a3ac3bd95ef2c98e709e0c622d Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 20 Jul 2018 15:13:10 +0100
Subject: [PATCH] eal: fix error message for unsupported platforms

[ upstream commit 7ab927f70a693f15b679d033512cb5802fa10c9b ]

When building with meson on e.g. cygwin, the error message about an
unsupported platform referenced an unknown variable since
"host_machine" was missing an "_".

Fixes: 844514c73569 ("eal: build with meson")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_eal/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/meson.build b/lib/librte_eal/meson.build
index 4aa63e3d0..d5fed0b22 100644
--- a/lib/librte_eal/meson.build
+++ b/lib/librte_eal/meson.build
@@ -18,7 +18,7 @@ elif host_machine.system() == 'freebsd'
 	subdir('bsdapp/eal')
 
 else
-	error('unsupported system type @0@'.format(hostmachine.system()))
+	error('unsupported system type "@0@"'.format(host_machine.system()))
 endif
 
 version = 7  # the version of the EAL API
-- 
2.17.1

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

* [dpdk-stable] patch 'devtools: remove already enabled nfp from build test' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (131 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'eal: fix error message for unsupported platforms' " Christian Ehrhardt
@ 2018-07-30 16:12 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/i40e: fix PPPoL2TP packet type parsing' " Christian Ehrhardt
                   ` (42 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:12 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Alejandro Lucero, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 19b9bd3054934fdb8045553cb4ca72181bba3361 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Thu, 19 Jul 2018 04:03:31 +0100
Subject: [PATCH] devtools: remove already enabled nfp from build test

[ upstream commit 62d58259e5d7bc195e842ca761e1a87c6db34031 ]

NFP PMD does not have any external dependency.
It only requires Linux OS, so it is not needed
to be enabled in the test-build script.

Fixes: 80987c40fd28 ("config: enable nfp driver on Linux")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 devtools/test-build.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/devtools/test-build.sh b/devtools/test-build.sh
index 3ea82bb46..f6db99fb0 100755
--- a/devtools/test-build.sh
+++ b/devtools/test-build.sh
@@ -153,7 +153,6 @@ config () # <directory> <target> <options>
 		sed -ri       's,(PMD_SZEDATA2=)n,\1y,' $1/.config
 		test "$DPDK_DEP_ZLIB" != y || \
 		sed -ri          's,(BNX2X_PMD=)n,\1y,' $1/.config
-		sed -ri            's,(NFP_PMD=)n,\1y,' $1/.config
 		test "$DPDK_DEP_PCAP" != y || \
 		sed -ri               's,(PCAP=)n,\1y,' $1/.config
 		test -z "$ARMV8_CRYPTO_LIB_PATH" || \
-- 
2.17.1

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

* [dpdk-stable] patch 'net/i40e: fix PPPoL2TP packet type parsing' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (132 preceding siblings ...)
  2018-07-30 16:12 ` [dpdk-stable] patch 'devtools: remove already enabled nfp from build test' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/i40e: fix packet type parsing with DDP' " Christian Ehrhardt
                   ` (41 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Xueqin Lin, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From bd4474aa6a57edfa20b7e011e6052beddcd83227 Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Thu, 5 Jul 2018 09:36:14 +0800
Subject: [PATCH] net/i40e: fix PPPoL2TP packet type parsing

[ upstream commit 525fd36991d50e07dd0d3111e07dc257429fb90e ]

Since PPPoL2TP profile is updated, PPPoL2TP packet type
parser will be false with the current parser function.
This patch fixes the issue.

Fixes: 11556c915a08 ("net/i40e: improve packet type parser")

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

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 50bbc77ae..4b4f53b32 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -12127,7 +12127,8 @@ i40e_update_customized_ptype(struct rte_eth_dev *dev, uint8_t *pkg,
 					ptype_mapping[i].sw_ptype |=
 						RTE_PTYPE_TUNNEL_GRENAT;
 					in_tunnel = true;
-				} else if (!strncasecmp(name, "L2TPV2CTL", 9)) {
+				} else if (!strncasecmp(name, "L2TPV2CTL", 9) ||
+					   !strncasecmp(name, "L2TPV2", 6)) {
 					ptype_mapping[i].sw_ptype |=
 						RTE_PTYPE_TUNNEL_L2TP;
 					in_tunnel = true;
-- 
2.17.1

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

* [dpdk-stable] patch 'net/i40e: fix packet type parsing with DDP' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (133 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/i40e: fix PPPoL2TP packet type parsing' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/i40e: fix setting TPID with AQ command' " Christian Ehrhardt
                   ` (40 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Xueqin Lin, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From bd3bb0ac0f35d21d7797607409925654ea147020 Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Thu, 5 Jul 2018 09:36:29 +0800
Subject: [PATCH] net/i40e: fix packet type parsing with DDP

[ upstream commit 840f15cdab1693d0a8f2915d32dbe92a57dff1f2 ]

To parse packet type correctly, profile needs to be
loaded again to update tables in SW even if profile
has exited. But previously packet type parser will
be false after loading profile when profile already
exists.
This patch fixes the issue.

Fixes: 0585f5c3d264 ("net/i40e: fix DDP profile DEL operation")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Tested-by: Xueqin Lin <xueqin.lin@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/rte_pmd_i40e.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index 7aa1a7518..4ffee8bcf 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -1709,6 +1709,7 @@ rte_pmd_i40e_process_ddp_package(uint16_t port, uint8_t *buff,
 				PMD_DRV_LOG(ERR, "Profile of group 0 already exists.");
 			else if (is_exist == 3)
 				PMD_DRV_LOG(ERR, "Profile of different group already exists");
+			i40e_update_customized_info(dev, buff, size, op);
 			rte_free(profile_info_sec);
 			return -EEXIST;
 		}
-- 
2.17.1

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

* [dpdk-stable] patch 'net/i40e: fix setting TPID with AQ command' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (134 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/i40e: fix packet type parsing with DDP' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/i40e: fix Tx queue setup after stop' " Christian Ehrhardt
                   ` (39 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 3abd2b301dcd554c44a0fa7bc6fd7c8231e59e37 Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Thu, 5 Jul 2018 15:03:08 +0800
Subject: [PATCH] net/i40e: fix setting TPID with AQ command

[ upstream commit 2c99142384db1796e42209f5fc112c8babc402c0 ]

TPID can be set by set_switch_config AdminQ command on
new FW release. But find fail to set 0x88A8 on some NICs.
According to the datasheet, Switch Tag value should not
be identical to either the First Tag or Second Tag values.
So set something other than common Ethertype for internal
switching.

Fixes: 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of register setting")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-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 4b4f53b32..ee0781335 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1236,6 +1236,13 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
 	hw->bus.func = pci_dev->addr.function;
 	hw->adapter_stopped = 0;
 
+	/*
+	 * Switch Tag value should not be identical to either the First Tag
+	 * or Second Tag values. So set something other than common Ethertype
+	 * for internal switching.
+	 */
+	hw->switch_tag = 0xffff;
+
 	/* Check if need to support multi-driver */
 	i40e_support_multi_driver(dev);
 
-- 
2.17.1

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

* [dpdk-stable] patch 'net/i40e: fix Tx queue setup after stop' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (135 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/i40e: fix setting TPID with AQ command' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/i40e: fix link speed' " Christian Ehrhardt
                   ` (38 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Shaopeng He; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 6c0d25f11345d29ea1831c2c3db342672fde9107 Mon Sep 17 00:00:00 2001
From: Shaopeng He <shaopeng.he@intel.com>
Date: Tue, 10 Jul 2018 06:37:27 -0400
Subject: [PATCH] net/i40e: fix Tx queue setup after stop

[ upstream commit e062bdc6cbaef636b68e1cdd2a0aa14eebbdc1c6 ]

Currently, i40e_dev_tx_queue_setup_runtime checks simple tx and treats
mbuf fast free offloading as No-simple, which is classified as simple tx
in i40e_set_tx_function_flag. This inconsistent behavior causes tx queue
setup fail after queue was stopped. This patch fixes this bug.

Fixes: 399421100e08 ("net/i40e: fix missing mbuf fast free offload")

Signed-off-by: Shaopeng He <shaopeng.he@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 6032d5541..2bbb82fc3 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2087,7 +2087,7 @@ i40e_dev_tx_queue_setup_runtime(struct rte_eth_dev *dev,
 	}
 	/* check simple tx conflict */
 	if (ad->tx_simple_allowed) {
-		if (txq->offloads != 0 ||
+		if ((txq->offloads & ~DEV_TX_OFFLOAD_MBUF_FAST_FREE) != 0 ||
 				txq->tx_rs_thresh < RTE_PMD_I40E_TX_MAX_BURST) {
 			PMD_DRV_LOG(ERR, "No-simple tx is required.");
 			return -EINVAL;
-- 
2.17.1

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

* [dpdk-stable] patch 'net/i40e: fix link speed' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (136 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/i40e: fix Tx queue setup after stop' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/i40e: fix check of flow director programming status' " Christian Ehrhardt
                   ` (37 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Xiaoyun Li; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 6533b8e374afa2d7920fb2c79fc79368b072e924 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Tue, 10 Jul 2018 17:30:54 +0800
Subject: [PATCH] net/i40e: fix link speed

[ upstream commit 9214ee18eef97709eca481998cf7dca50520896c ]

When link needs to go up, I40E_AQ_PHY_AN_ENABLED is always be set in DPDK.
So all speeds are always set. This causes speed config never works.

This patch fixes this issue and only allows to set available speeds. If
link needs to go up and speed setting is not supported, it will print
warning and set default available speeds. And when link needs to go down,
link speed field should be set to non-zero to avoid link down issue when
binding back to kernel driver.

Fixes: ca7e599d4506 ("net/i40e: fix link management")
Fixes: 1bb8f661168d ("net/i40e: fix link down and negotiation")

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 67 +++++++++++++++++++++-------------
 1 file changed, 41 insertions(+), 26 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index ee0781335..4702c9379 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2033,27 +2033,40 @@ i40e_phy_conf_link(struct i40e_hw *hw,
 	struct i40e_aq_get_phy_abilities_resp phy_ab;
 	struct i40e_aq_set_phy_config phy_conf;
 	enum i40e_aq_phy_type cnt;
+	uint8_t avail_speed;
 	uint32_t phy_type_mask = 0;
 
 	const uint8_t mask = I40E_AQ_PHY_FLAG_PAUSE_TX |
 			I40E_AQ_PHY_FLAG_PAUSE_RX |
 			I40E_AQ_PHY_FLAG_PAUSE_RX |
 			I40E_AQ_PHY_FLAG_LOW_POWER;
-	const uint8_t advt = I40E_LINK_SPEED_40GB |
-			I40E_LINK_SPEED_25GB |
-			I40E_LINK_SPEED_10GB |
-			I40E_LINK_SPEED_1GB |
-			I40E_LINK_SPEED_100MB;
 	int ret = -ENOTSUP;
 
+	/* To get phy capabilities of available speeds. */
+	status = i40e_aq_get_phy_capabilities(hw, false, true, &phy_ab,
+					      NULL);
+	if (status) {
+		PMD_DRV_LOG(ERR, "Failed to get PHY capabilities: %d\n",
+				status);
+		return ret;
+	}
+	avail_speed = phy_ab.link_speed;
 
+	/* To get the current phy config. */
 	status = i40e_aq_get_phy_capabilities(hw, false, false, &phy_ab,
 					      NULL);
-	if (status)
+	if (status) {
+		PMD_DRV_LOG(ERR, "Failed to get the current PHY config: %d\n",
+				status);
 		return ret;
+	}
 
-	/* If link already up, no need to set up again */
-	if (is_up && phy_ab.phy_type != 0)
+	/* If link needs to go up and it is in autoneg mode the speed is OK,
+	 * no need to set up again.
+	 */
+	if (is_up && phy_ab.phy_type != 0 &&
+		     abilities & I40E_AQ_PHY_AN_ENABLED &&
+		     phy_ab.link_speed != 0)
 		return I40E_SUCCESS;
 
 	memset(&phy_conf, 0, sizeof(phy_conf));
@@ -2062,15 +2075,17 @@ i40e_phy_conf_link(struct i40e_hw *hw,
 	abilities &= ~mask;
 	abilities |= phy_ab.abilities & mask;
 
-	/* update ablities and speed */
-	if (abilities & I40E_AQ_PHY_AN_ENABLED)
-		phy_conf.link_speed = advt;
-	else
-		phy_conf.link_speed = is_up ? force_speed : phy_ab.link_speed;
-
 	phy_conf.abilities = abilities;
 
-
+	/* If link needs to go up, but the force speed is not supported,
+	 * Warn users and config the default available speeds.
+	 */
+	if (is_up && !(force_speed & avail_speed)) {
+		PMD_DRV_LOG(WARNING, "Invalid speed setting, set to default!\n");
+		phy_conf.link_speed = avail_speed;
+	} else {
+		phy_conf.link_speed = is_up ? force_speed : avail_speed;
+	}
 
 	/* PHY type mask needs to include each type except PHY type extension */
 	for (cnt = I40E_PHY_TYPE_SGMII; cnt < I40E_PHY_TYPE_25GBASE_KR; cnt++)
@@ -2106,11 +2121,18 @@ i40e_apply_link_speed(struct rte_eth_dev *dev)
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct rte_eth_conf *conf = &dev->data->dev_conf;
 
+	if (conf->link_speeds == ETH_LINK_SPEED_AUTONEG) {
+		conf->link_speeds = ETH_LINK_SPEED_40G |
+				    ETH_LINK_SPEED_25G |
+				    ETH_LINK_SPEED_20G |
+				    ETH_LINK_SPEED_10G |
+				    ETH_LINK_SPEED_1G |
+				    ETH_LINK_SPEED_100M;
+	}
 	speed = i40e_parse_link_speeds(conf->link_speeds);
-	abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
-	if (!(conf->link_speeds & ETH_LINK_SPEED_FIXED))
-		abilities |= I40E_AQ_PHY_AN_ENABLED;
-	abilities |= I40E_AQ_PHY_LINK_ENABLED;
+	abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK |
+		     I40E_AQ_PHY_AN_ENABLED |
+		     I40E_AQ_PHY_LINK_ENABLED;
 
 	return i40e_phy_conf_link(hw, abilities, speed, true);
 }
@@ -2227,13 +2249,6 @@ i40e_dev_start(struct rte_eth_dev *dev)
 	}
 
 	/* Apply link configure */
-	if (dev->data->dev_conf.link_speeds & ~(ETH_LINK_SPEED_100M |
-				ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G |
-				ETH_LINK_SPEED_20G | ETH_LINK_SPEED_25G |
-				ETH_LINK_SPEED_40G)) {
-		PMD_DRV_LOG(ERR, "Invalid link setting");
-		goto err_up;
-	}
 	ret = i40e_apply_link_speed(dev);
 	if (I40E_SUCCESS != ret) {
 		PMD_DRV_LOG(ERR, "Fail to apply link setting");
-- 
2.17.1

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

* [dpdk-stable] patch 'net/i40e: fix check of flow director programming status' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (137 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/i40e: fix link speed' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'ethdev: fix queue statistics mapping documentation' " Christian Ehrhardt
                   ` (36 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 706bb70fc0e5b5909c02fb6cae06868d116b6444 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Fri, 13 Jul 2018 11:16:33 +0800
Subject: [PATCH] net/i40e: fix check of flow director programming status

[ upstream commit 7546dc4a1331340ecb665af9af0a005bb8b657c8 ]

In i40e FDIR PMD code for checking programming status
function i40e_check_fdir_programming_status(), the initial value
of return value ret should be set to -1 not 0, because if DD bit of
I40E_RX_DESC_STATUS_DD is not write back, this function will return
0 to upper function, this give an error info to upper function, the
fact for this is it is time out for DD write back and it should return
-1.

Fixes: 05999aab4ca6 ("i40e: add or delete flow director")

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

diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index a4a61d1c3..7140237a0 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -1361,6 +1361,8 @@ i40e_check_fdir_programming_status(struct i40e_rx_queue *rxq)
 			I40E_PCI_REG_WRITE(rxq->qrx_tail, rxq->nb_rx_desc - 1);
 		else
 			I40E_PCI_REG_WRITE(rxq->qrx_tail, rxq->rx_tail - 1);
+	} else {
+		ret = -1;
 	}
 
 	return ret;
-- 
2.17.1

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

* [dpdk-stable] patch 'ethdev: fix queue statistics mapping documentation' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (138 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/i40e: fix check of flow director programming status' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/cxgbe: fix init failure due to new flash parts' " Christian Ehrhardt
                   ` (35 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From f29ade09e29f9e064077c8ba5544af9297caa9bf Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Date: Fri, 29 Jun 2018 15:14:43 +0530
Subject: [PATCH] ethdev: fix queue statistics mapping documentation

[ upstream commit 97f5f8cbadbeb47cc283251564e56a6c20ceec00 ]

The RTE_MAX_ETHPORT_QUEUE_STATS_MAPS does not exists, change
to the correct definition(RTE_ETHDEV_QUEUE_STAT_CNTRS)

Fixes: 5de201df8927 ("ethdev: add stats per queue")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 lib/librte_ethdev/rte_ethdev.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 36e3984ea..375ea24ce 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -2144,7 +2144,7 @@ void rte_eth_xstats_reset(uint16_t port_id);
  * @param stat_idx
  *   The per-queue packet statistics functionality number that the transmit
  *   queue is to be assigned.
- *   The value must be in the range [0, RTE_MAX_ETHPORT_QUEUE_STATS_MAPS - 1].
+ *   The value must be in the range [0, RTE_ETHDEV_QUEUE_STAT_CNTRS - 1].
  * @return
  *   Zero if successful. Non-zero otherwise.
  */
@@ -2164,7 +2164,7 @@ int rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id,
  * @param stat_idx
  *   The per-queue packet statistics functionality number that the receive
  *   queue is to be assigned.
- *   The value must be in the range [0, RTE_MAX_ETHPORT_QUEUE_STATS_MAPS - 1].
+ *   The value must be in the range [0, RTE_ETHDEV_QUEUE_STAT_CNTRS - 1].
  * @return
  *   Zero if successful. Non-zero otherwise.
  */
-- 
2.17.1

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

* [dpdk-stable] patch 'net/cxgbe: fix init failure due to new flash parts' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (139 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'ethdev: fix queue statistics mapping documentation' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/thunderx: avoid sq door bell write on zero packet' " Christian Ehrhardt
                   ` (34 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 1a98ad3427ff6b36b224d6729a838b5a0195a1f9 Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Mon, 9 Jul 2018 21:13:23 +0530
Subject: [PATCH] net/cxgbe: fix init failure due to new flash parts

[ upstream commit 9726c51df05037e505ffcb4aa2e6d4f0385c3ef1 ]

Add decode logic for new flash parts shipped with new Chelsio NICs
to fix initialization failure on these NICs.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/base/t4_hw.c | 97 +++++++++++++++++++++++++++++-----
 1 file changed, 84 insertions(+), 13 deletions(-)

diff --git a/drivers/net/cxgbe/base/t4_hw.c b/drivers/net/cxgbe/base/t4_hw.c
index e5ef73b67..a8d7bad8f 100644
--- a/drivers/net/cxgbe/base/t4_hw.c
+++ b/drivers/net/cxgbe/base/t4_hw.c
@@ -4616,9 +4616,8 @@ struct flash_desc {
 int t4_get_flash_params(struct adapter *adapter)
 {
 	/*
-	 * Table for non-Numonix supported flash parts.  Numonix parts are left
-	 * to the preexisting well-tested code.  All flash parts have 64KB
-	 * sectors.
+	 * Table for non-standard supported Flash parts.  Note, all Flash
+	 * parts must have 64KB sectors.
 	 */
 	static struct flash_desc supported_flash[] = {
 		{ 0x00150201, 4 << 20 },       /* Spansion 4MB S25FL032P */
@@ -4627,7 +4626,7 @@ int t4_get_flash_params(struct adapter *adapter)
 	int ret;
 	u32 flashid = 0;
 	unsigned int part, manufacturer;
-	unsigned int density, size;
+	unsigned int density, size = 0;
 
 	/**
 	 * Issue a Read ID Command to the Flash part.  We decode supported
@@ -4642,6 +4641,9 @@ int t4_get_flash_params(struct adapter *adapter)
 	if (ret < 0)
 		return ret;
 
+	/**
+	 * Check to see if it's one of our non-standard supported Flash parts.
+	 */
 	for (part = 0; part < ARRAY_SIZE(supported_flash); part++) {
 		if (supported_flash[part].vendor_and_model_id == flashid) {
 			adapter->params.sf_size =
@@ -4652,6 +4654,15 @@ int t4_get_flash_params(struct adapter *adapter)
 		}
 	}
 
+	/**
+	 * Decode Flash part size.  The code below looks repetative with
+	 * common encodings, but that's not guaranteed in the JEDEC
+	 * specification for the Read JADEC ID command.  The only thing that
+	 * we're guaranteed by the JADEC specification is where the
+	 * Manufacturer ID is in the returned result.  After that each
+	 * Manufacturer ~could~ encode things completely differently.
+	 * Note, all Flash parts must have 64KB sectors.
+	 */
 	manufacturer = flashid & 0xff;
 	switch (manufacturer) {
 	case 0x20: { /* Micron/Numonix */
@@ -4688,20 +4699,80 @@ int t4_get_flash_params(struct adapter *adapter)
 		case 0x22:
 			size = 1 << 28; /* 256MB */
 			break;
-		default:
-			dev_err(adapter, "Micron Flash Part has bad size, ID = %#x, Density code = %#x\n",
-				flashid, density);
-			return -EINVAL;
 		}
+		break;
+	}
 
-		adapter->params.sf_size = size;
-		adapter->params.sf_nsec = size / SF_SEC_SIZE;
+	case 0x9d: { /* ISSI -- Integrated Silicon Solution, Inc. */
+		/**
+		 * This Density -> Size decoding table is taken from ISSI
+		 * Data Sheets.
+		 */
+		density = (flashid >> 16) & 0xff;
+		switch (density) {
+		case 0x16:
+			size = 1 << 25; /* 32MB */
+			break;
+		case 0x17:
+			size = 1 << 26; /* 64MB */
+			break;
+		}
 		break;
 	}
-	default:
-		dev_err(adapter, "Unsupported Flash Part, ID = %#x\n", flashid);
-		return -EINVAL;
+
+	case 0xc2: { /* Macronix */
+		/**
+		 * This Density -> Size decoding table is taken from Macronix
+		 * Data Sheets.
+		 */
+		density = (flashid >> 16) & 0xff;
+		switch (density) {
+		case 0x17:
+			size = 1 << 23; /* 8MB */
+			break;
+		case 0x18:
+			size = 1 << 24; /* 16MB */
+			break;
+		}
+		break;
+	}
+
+	case 0xef: { /* Winbond */
+		/**
+		 * This Density -> Size decoding table is taken from Winbond
+		 * Data Sheets.
+		 */
+		density = (flashid >> 16) & 0xff;
+		switch (density) {
+		case 0x17:
+			size = 1 << 23; /* 8MB */
+			break;
+		case 0x18:
+			size = 1 << 24; /* 16MB */
+			break;
+		}
+		break;
 	}
+	}
+
+	/* If we didn't recognize the FLASH part, that's no real issue: the
+	 * Hardware/Software contract says that Hardware will _*ALWAYS*_
+	 * use a FLASH part which is at least 4MB in size and has 64KB
+	 * sectors.  The unrecognized FLASH part is likely to be much larger
+	 * than 4MB, but that's all we really need.
+	 */
+	if (size == 0) {
+		dev_warn(adapter,
+			 "Unknown Flash Part, ID = %#x, assuming 4MB\n",
+			 flashid);
+		size = 1 << 22;
+	}
+
+	/**
+	 * Store decoded Flash size and fall through into vetting code.
+	 */
+	adapter->params.sf_size = size;
+	adapter->params.sf_nsec = size / SF_SEC_SIZE;
 
 found:
 	/*
-- 
2.17.1

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

* [dpdk-stable] patch 'net/thunderx: avoid sq door bell write on zero packet' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (140 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/cxgbe: fix init failure due to new flash parts' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'app/testpmd: fix little performance drop' " Christian Ehrhardt
                   ` (33 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Kiran Kumar; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 5935307ac8c07e08826605b058982102a315bd94 Mon Sep 17 00:00:00 2001
From: Kiran Kumar <kkokkilagadda@caviumnetworks.com>
Date: Wed, 11 Jul 2018 13:54:36 +0530
Subject: [PATCH] net/thunderx: avoid sq door bell write on zero packet

[ upstream commit 47636efe878dd8885bb47b142765c9ccae6babe3 ]

Avoid sq door bell write on zero packet case to reduce additional
traffic on register bus.

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

Signed-off-by: Kiran Kumar <kkokkilagadda@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 drivers/net/thunderx/nicvf_rxtx.c | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/drivers/net/thunderx/nicvf_rxtx.c b/drivers/net/thunderx/nicvf_rxtx.c
index 72305d9d2..6e075e23c 100644
--- a/drivers/net/thunderx/nicvf_rxtx.c
+++ b/drivers/net/thunderx/nicvf_rxtx.c
@@ -162,12 +162,14 @@ nicvf_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		free_desc -= TX_DESC_PER_PKT;
 	}
 
-	sq->tail = tail;
-	sq->xmit_bufs += i;
-	rte_wmb();
+	if (likely(i)) {
+		sq->tail = tail;
+		sq->xmit_bufs += i;
+		rte_wmb();
 
-	/* Inform HW to xmit the packets */
-	nicvf_addr_write(sq->sq_door, i * TX_DESC_PER_PKT);
+		/* Inform HW to xmit the packets */
+		nicvf_addr_write(sq->sq_door, i * TX_DESC_PER_PKT);
+	}
 	return i;
 }
 
@@ -218,12 +220,14 @@ nicvf_xmit_pkts_multiseg(void *tx_queue, struct rte_mbuf **tx_pkts,
 		}
 	}
 
-	sq->tail = tail;
-	sq->xmit_bufs += used_bufs;
-	rte_wmb();
+	if (likely(used_desc)) {
+		sq->tail = tail;
+		sq->xmit_bufs += used_bufs;
+		rte_wmb();
 
-	/* Inform HW to xmit the packets */
-	nicvf_addr_write(sq->sq_door, used_desc);
+		/* Inform HW to xmit the packets */
+		nicvf_addr_write(sq->sq_door, used_desc);
+	}
 	return i;
 }
 
-- 
2.17.1

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

* [dpdk-stable] patch 'app/testpmd: fix little performance drop' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (141 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/thunderx: avoid sq door bell write on zero packet' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/sfc: fix filter exceptions logic' " Christian Ehrhardt
                   ` (32 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Xiaoyun Li; +Cc: Wenzhuo Lu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 9aa29ee0cff7636027c717745b1d43abd85a8b0c Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Thu, 12 Jul 2018 15:55:46 +0800
Subject: [PATCH] app/testpmd: fix little performance drop

[ upstream commit 4918a35756e505efac912c3fd23473b0d3183e85 ]

There is about 3% perf drop. And it is because of a bitrate
calculation in the datapath. So improve it by maintaining an array
of port indexes in testpmd, which is updated with ethdev events.

Fixes: 8728ccf37615 ("fix ethdev ports enumeration")

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 app/test-pmd/testpmd.c | 26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 63c2a5aca..acdce2a01 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -127,6 +127,8 @@ portid_t nb_ports;             /**< Number of probed ethernet ports. */
 struct fwd_lcore **fwd_lcores; /**< For all probed logical cores. */
 lcoreid_t nb_lcores;           /**< Number of probed logical cores. */
 
+portid_t ports_ids[RTE_MAX_ETHPORTS]; /**< Store all port ids. */
+
 /*
  * Test Forwarding Configuration.
  *    nb_fwd_lcores <= nb_cfg_lcores <= nb_lcores
@@ -1148,8 +1150,9 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd)
 	uint64_t tics_per_1sec;
 	uint64_t tics_datum;
 	uint64_t tics_current;
-	uint16_t idx_port;
+	uint16_t i, cnt_ports;
 
+	cnt_ports = nb_ports;
 	tics_datum = rte_rdtsc();
 	tics_per_1sec = rte_get_timer_hz();
 #endif
@@ -1164,9 +1167,9 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd)
 			tics_current = rte_rdtsc();
 			if (tics_current - tics_datum >= tics_per_1sec) {
 				/* Periodic bitrate calculation */
-				RTE_ETH_FOREACH_DEV(idx_port)
+				for (i = 0; i < cnt_ports; i++)
 					rte_stats_bitrate_calc(bitrate_data,
-						idx_port);
+						ports_ids[i]);
 				tics_datum = tics_current;
 			}
 		}
@@ -1971,6 +1974,7 @@ attach_port(char *identifier)
 	reconfig(pi, socket_id);
 	rte_eth_promiscuous_enable(pi);
 
+	ports_ids[nb_ports] = pi;
 	nb_ports = rte_eth_dev_count_avail();
 
 	ports[pi].port_status = RTE_PORT_STOPPED;
@@ -1985,6 +1989,7 @@ void
 detach_port(portid_t port_id)
 {
 	char name[RTE_ETH_NAME_MAX_LEN];
+	uint16_t i;
 
 	printf("Detaching a port...\n");
 
@@ -2001,6 +2006,13 @@ detach_port(portid_t port_id)
 		return;
 	}
 
+	for (i = 0; i < nb_ports; i++) {
+		if (ports_ids[i] == port_id) {
+			ports_ids[i] = ports_ids[nb_ports-1];
+			ports_ids[nb_ports-1] = 0;
+			break;
+		}
+	}
 	nb_ports = rte_eth_dev_count_avail();
 
 	update_fwd_ports(RTE_MAX_ETHPORTS);
@@ -2652,6 +2664,7 @@ main(int argc, char** argv)
 {
 	int diag;
 	portid_t port_id;
+	uint16_t count;
 	int ret;
 
 	signal(SIGINT, signal_handler);
@@ -2671,7 +2684,12 @@ main(int argc, char** argv)
 	rte_pdump_init(NULL);
 #endif
 
-	nb_ports = (portid_t) rte_eth_dev_count_avail();
+	count = 0;
+	RTE_ETH_FOREACH_DEV(port_id) {
+		ports_ids[count] = port_id;
+		count++;
+	}
+	nb_ports = (portid_t) count;
 	if (nb_ports == 0)
 		TESTPMD_LOG(WARNING, "No probed ethernet devices\n");
 
-- 
2.17.1

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

* [dpdk-stable] patch 'net/sfc: fix filter exceptions logic' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (142 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'app/testpmd: fix little performance drop' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/sfc: move Rx checksum offload check to device level' " Christian Ehrhardt
                   ` (31 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Igor Romanov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 036e06f939ea092b07276213bcf2fc75eaf95a01 Mon Sep 17 00:00:00 2001
From: Igor Romanov <igor.romanov@oktetlabs.ru>
Date: Sat, 14 Jul 2018 08:38:23 +0100
Subject: [PATCH] net/sfc: fix filter exceptions logic

[ upstream commit b0df5b32aedab8dec1fe7dd52aaba9a8356eaff0 ]

Now exception logic handles these cases:

When FW variant does not support filters with transport ports, but
IP protocol filters are supported, TCP/UDP protocol filters may be
used. When FW variant does not support filters with IPv4/6 addresses
or IP protocol, but filters with EtherType are supported, IPv4 and
IPv6 EtherTypes may be used

Fixes: 096dba799b4a ("net/sfc: avoid creation of ineffective flow rules")

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_filter.c | 14 ++++++++++++++
 drivers/net/sfc/sfc_filter.h | 10 ++++++++++
 drivers/net/sfc/sfc_flow.c   | 17 +++++++++++------
 3 files changed, 35 insertions(+), 6 deletions(-)

diff --git a/drivers/net/sfc/sfc_filter.c b/drivers/net/sfc/sfc_filter.c
index 77e2ea562..6ff380a36 100644
--- a/drivers/net/sfc/sfc_filter.c
+++ b/drivers/net/sfc/sfc_filter.c
@@ -75,6 +75,7 @@ int
 sfc_filter_attach(struct sfc_adapter *sa)
 {
 	int rc;
+	unsigned int i;
 
 	sfc_log_init(sa, "entry");
 
@@ -88,6 +89,19 @@ sfc_filter_attach(struct sfc_adapter *sa)
 
 	efx_filter_fini(sa->nic);
 
+	sa->filter.supports_ip_proto_or_addr_filter = B_FALSE;
+	sa->filter.supports_rem_or_local_port_filter = B_FALSE;
+	for (i = 0; i < sa->filter.supported_match_num; ++i) {
+		if (sa->filter.supported_match[i] &
+		    (EFX_FILTER_MATCH_IP_PROTO | EFX_FILTER_MATCH_LOC_HOST |
+		     EFX_FILTER_MATCH_REM_HOST))
+			sa->filter.supports_ip_proto_or_addr_filter = B_TRUE;
+
+		if (sa->filter.supported_match[i] &
+		    (EFX_FILTER_MATCH_LOC_PORT | EFX_FILTER_MATCH_REM_PORT))
+			sa->filter.supports_rem_or_local_port_filter = B_TRUE;
+	}
+
 	sfc_log_init(sa, "done");
 
 	return 0;
diff --git a/drivers/net/sfc/sfc_filter.h b/drivers/net/sfc/sfc_filter.h
index d3e1c2f9c..64ab114e0 100644
--- a/drivers/net/sfc/sfc_filter.h
+++ b/drivers/net/sfc/sfc_filter.h
@@ -25,6 +25,16 @@ struct sfc_filter {
 	uint32_t			*supported_match;
 	/** List of flow rules */
 	struct sfc_flow_list		flow_list;
+	/**
+	 * Supports any of ip_proto, remote host or local host
+	 * filters. This flag is used for filter match exceptions
+	 */
+	boolean_t			supports_ip_proto_or_addr_filter;
+	/**
+	 * Supports any of remote port or local port filters.
+	 * This flag is used for filter match exceptions
+	 */
+	boolean_t			supports_rem_or_local_port_filter;
 };
 
 struct sfc_adapter;
diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c
index 18387415e..bfb7b24f0 100644
--- a/drivers/net/sfc/sfc_flow.c
+++ b/drivers/net/sfc/sfc_flow.c
@@ -2095,11 +2095,14 @@ sfc_flow_is_match_with_vids(efx_filter_match_flags_t match_flags,
  * Check whether the spec maps to a hardware filter which is known to be
  * ineffective despite being valid.
  *
+ * @param filter[in]
+ *   SFC filter with list of supported filters.
  * @param spec[in]
  *   SFC flow specification.
  */
 static boolean_t
-sfc_flow_is_match_flags_exception(struct sfc_flow_spec *spec)
+sfc_flow_is_match_flags_exception(struct sfc_filter *filter,
+				  struct sfc_flow_spec *spec)
 {
 	unsigned int i;
 	uint16_t ether_type;
@@ -2115,8 +2118,9 @@ sfc_flow_is_match_flags_exception(struct sfc_flow_spec *spec)
 						EFX_FILTER_MATCH_ETHER_TYPE |
 						EFX_FILTER_MATCH_LOC_MAC)) {
 			ether_type = spec->filters[i].efs_ether_type;
-			if (ether_type == EFX_ETHER_TYPE_IPV4 ||
-			    ether_type == EFX_ETHER_TYPE_IPV6)
+			if (filter->supports_ip_proto_or_addr_filter &&
+			    (ether_type == EFX_ETHER_TYPE_IPV4 ||
+			     ether_type == EFX_ETHER_TYPE_IPV6))
 				return B_TRUE;
 		} else if (sfc_flow_is_match_with_vids(match_flags,
 				EFX_FILTER_MATCH_ETHER_TYPE |
@@ -2126,8 +2130,9 @@ sfc_flow_is_match_flags_exception(struct sfc_flow_spec *spec)
 				EFX_FILTER_MATCH_IP_PROTO |
 				EFX_FILTER_MATCH_LOC_MAC)) {
 			ip_proto = spec->filters[i].efs_ip_proto;
-			if (ip_proto == EFX_IPPROTO_TCP ||
-			    ip_proto == EFX_IPPROTO_UDP)
+			if (filter->supports_rem_or_local_port_filter &&
+			    (ip_proto == EFX_IPPROTO_TCP ||
+			     ip_proto == EFX_IPPROTO_UDP))
 				return B_TRUE;
 		}
 	}
@@ -2154,7 +2159,7 @@ sfc_flow_validate_match_flags(struct sfc_adapter *sa,
 			return rc;
 	}
 
-	if (sfc_flow_is_match_flags_exception(&flow->spec)) {
+	if (sfc_flow_is_match_flags_exception(&sa->filter, &flow->spec)) {
 		rte_flow_error_set(error, ENOTSUP,
 			RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
 			"The flow rule pattern is unsupported");
-- 
2.17.1

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

* [dpdk-stable] patch 'net/sfc: move Rx checksum offload check to device level' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (143 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/sfc: fix filter exceptions logic' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/sfc: fix Rx queue offloads reporting in queue info' " Christian Ehrhardt
                   ` (30 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Ivan Malov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From b943c5d49dfe64ffb3151c0bad65ba87aded9dbc Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Sun, 15 Jul 2018 10:56:13 +0100
Subject: [PATCH] net/sfc: move Rx checksum offload check to device level

[ upstream commit eacbad76325e592f9f6a7601d35b176887777044 ]

Rx checksum offloads are on device level and should be checked and
enforced on device level.

Avoid logging of Rx checksum offloads enforced for each Rx queue.

Fixes: ff6a1197c3b1 ("net/sfc: convert to new Rx offload API")

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

diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index cc76a5b15..dd23e7464 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -817,10 +817,8 @@ sfc_rx_get_queue_offload_caps(struct sfc_adapter *sa)
 static int
 sfc_rx_qcheck_conf(struct sfc_adapter *sa, unsigned int rxq_max_fill_level,
 		   const struct rte_eth_rxconf *rx_conf,
-		   uint64_t offloads)
+		   __rte_unused uint64_t offloads)
 {
-	uint64_t offloads_supported = sfc_rx_get_dev_offload_caps(sa) |
-				      sfc_rx_get_queue_offload_caps(sa);
 	int rc = 0;
 
 	if (rx_conf->rx_thresh.pthresh != 0 ||
@@ -842,14 +840,6 @@ sfc_rx_qcheck_conf(struct sfc_adapter *sa, unsigned int rxq_max_fill_level,
 		rc = EINVAL;
 	}
 
-	if ((offloads & DEV_RX_OFFLOAD_CHECKSUM) !=
-	    DEV_RX_OFFLOAD_CHECKSUM)
-		sfc_warn(sa, "Rx checksum offloads cannot be disabled - always on (IPv4/TCP/UDP)");
-
-	if ((offloads_supported & DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM) &&
-	    (~offloads & DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM))
-		sfc_warn(sa, "Rx outer IPv4 checksum offload cannot be disabled - always on");
-
 	return rc;
 }
 
@@ -1424,6 +1414,8 @@ sfc_rx_qinit_info(struct sfc_adapter *sa, unsigned int sw_index)
 static int
 sfc_rx_check_mode(struct sfc_adapter *sa, struct rte_eth_rxmode *rxmode)
 {
+	uint64_t offloads_supported = sfc_rx_get_dev_offload_caps(sa) |
+				      sfc_rx_get_queue_offload_caps(sa);
 	struct sfc_rss *rss = &sa->rss;
 	int rc = 0;
 
@@ -1449,6 +1441,18 @@ sfc_rx_check_mode(struct sfc_adapter *sa, struct rte_eth_rxmode *rxmode)
 		rxmode->hw_strip_crc = 1;
 	}
 
+	if ((rxmode->offloads & DEV_RX_OFFLOAD_CHECKSUM) !=
+	    DEV_RX_OFFLOAD_CHECKSUM) {
+		sfc_warn(sa, "Rx checksum offloads cannot be disabled - always on (IPv4/TCP/UDP)");
+		rxmode->offloads |= DEV_RX_OFFLOAD_CHECKSUM;
+	}
+
+	if ((offloads_supported & DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM) &&
+	    (~rxmode->offloads & DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM)) {
+		sfc_warn(sa, "Rx outer IPv4 checksum offload cannot be disabled - always on");
+		rxmode->offloads |= DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM;
+	}
+
 	return rc;
 }
 
-- 
2.17.1

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

* [dpdk-stable] patch 'net/sfc: fix Rx queue offloads reporting in queue info' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (144 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/sfc: move Rx checksum offload check to device level' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/sfc: fix assert in set multicast address list' " Christian Ehrhardt
                   ` (29 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Ivan Malov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 34cbea4323bacefc137faa2259bad9ce2202b429 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Sun, 15 Jul 2018 10:56:14 +0100
Subject: [PATCH] net/sfc: fix Rx queue offloads reporting in queue info

[ upstream commit b7294d8808fd0591a29edc33c70794acd378db84 ]

CRC_STRIP offload is always enabled, but lost here.

It is more robust to use device level offloads directly to
compose returned value.

Fixes: ff6a1197c3b1 ("net/sfc: convert to new Rx offload API")

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

diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 1b6499f85..7e666da55 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -1057,9 +1057,7 @@ sfc_rx_queue_info_get(struct rte_eth_dev *dev, uint16_t rx_queue_id,
 	qinfo->conf.rx_free_thresh = rxq->refill_threshold;
 	qinfo->conf.rx_drop_en = 1;
 	qinfo->conf.rx_deferred_start = rxq_info->deferred_start;
-	qinfo->conf.offloads = DEV_RX_OFFLOAD_IPV4_CKSUM |
-			       DEV_RX_OFFLOAD_UDP_CKSUM |
-			       DEV_RX_OFFLOAD_TCP_CKSUM;
+	qinfo->conf.offloads = dev->data->dev_conf.rxmode.offloads;
 	if (rxq_info->type_flags & EFX_RXQ_FLAG_SCATTER) {
 		qinfo->conf.offloads |= DEV_RX_OFFLOAD_SCATTER;
 		qinfo->scattered_rx = 1;
-- 
2.17.1

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

* [dpdk-stable] patch 'net/sfc: fix assert in set multicast address list' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (145 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/sfc: fix Rx queue offloads reporting in queue info' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/sfc: handle unknown L3 packet class in EF10 event parser' " Christian Ehrhardt
                   ` (28 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 9a990b589ee5e1b459878fdfcd04cd61cf095b5e Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Wed, 18 Jul 2018 08:40:06 +0100
Subject: [PATCH] net/sfc: fix assert in set multicast address list

[ upstream commit d0dcfe9824bb3386608834a1595f9154487ef24f ]

Return value equal to zero means success and really expected.

Fixes: 0fa0070e4391 ("net/sfc: support multicast addresses list controls")

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

diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 7e666da55..933c7cb76 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -1029,7 +1029,7 @@ sfc_set_mc_addr_list(struct rte_eth_dev *dev, struct ether_addr *mc_addr_set,
 	if (rc != 0)
 		sfc_err(sa, "cannot set multicast address list (rc = %u)", rc);
 
-	SFC_ASSERT(rc > 0);
+	SFC_ASSERT(rc >= 0);
 	return -rc;
 }
 
-- 
2.17.1

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

* [dpdk-stable] patch 'net/sfc: handle unknown L3 packet class in EF10 event parser' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (146 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/sfc: fix assert in set multicast address list' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/ixgbe: fix missing null check on detach' " Christian Ehrhardt
                   ` (27 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From eca9138c66994aab0104fa261af844c393cb6db8 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Wed, 18 Jul 2018 08:43:13 +0100
Subject: [PATCH] net/sfc: handle unknown L3 packet class in EF10 event parser

[ upstream commit 812bb2087d93e060276cfbaa0cbb7dcf1c563084 ]

Fix debug build assertion if unknown L3 packet is received.

Fixes: 638bddc99faa ("net/sfc: implement EF10 native Rx datapath")
Fixes: c121f00836ca ("net/sfc: move EF10 Rx event parser to shared header")

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

diff --git a/drivers/net/sfc/sfc_ef10_rx_ev.h b/drivers/net/sfc/sfc_ef10_rx_ev.h
index 37b40056e..868c755f2 100644
--- a/drivers/net/sfc/sfc_ef10_rx_ev.h
+++ b/drivers/net/sfc/sfc_ef10_rx_ev.h
@@ -122,6 +122,8 @@ sfc_ef10_rx_ev_to_offloads(const efx_qword_t rx_ev, struct rte_mbuf *m,
 		if (tun_ptype == 0)
 			l2_ptype = RTE_PTYPE_L2_ETHER_ARP;
 		break;
+	case ESE_DZ_L3_CLASS_UNKNOWN:
+		break;
 	default:
 		/* Unexpected Layer 3 class */
 		SFC_ASSERT(false);
-- 
2.17.1

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

* [dpdk-stable] patch 'net/ixgbe: fix missing null check on detach' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (147 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/sfc: handle unknown L3 packet class in EF10 event parser' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/bonding: fix invalid port id' " Christian Ehrhardt
                   ` (26 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Remy Horton, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From eae0b860ceb2eb286a5e3bb1329bf90acfc6c625 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 16 Jul 2018 20:47:04 +0800
Subject: [PATCH] net/ixgbe: fix missing null check on detach

[ upstream commit 1ec01cd0962abd1fe2f32322ff135ac708cb3b8d ]

Add missing NULL point check inside ixgbe_pf_host_uninit, or it may cause
segment fault when detaching a device.

Fixes: cf80ba6e2038 ("net/ixgbe: add support for representor ports")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
---
 drivers/net/ixgbe/ixgbe_pf.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index c381acf44..4b833ffab 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -128,8 +128,6 @@ void ixgbe_pf_host_uninit(struct rte_eth_dev *eth_dev)
 
 	PMD_INIT_FUNC_TRACE();
 
-	vfinfo = IXGBE_DEV_PRIVATE_TO_P_VFDATA(eth_dev->data->dev_private);
-
 	RTE_ETH_DEV_SRIOV(eth_dev).active = 0;
 	RTE_ETH_DEV_SRIOV(eth_dev).nb_q_per_pool = 0;
 	RTE_ETH_DEV_SRIOV(eth_dev).def_vmdq_idx = 0;
@@ -139,6 +137,10 @@ void ixgbe_pf_host_uninit(struct rte_eth_dev *eth_dev)
 	if (vf_num == 0)
 		return;
 
+	vfinfo = IXGBE_DEV_PRIVATE_TO_P_VFDATA(eth_dev->data->dev_private);
+	if (*vfinfo == NULL)
+		return;
+
 	ret = rte_eth_switch_domain_free((*vfinfo)->switch_domain_id);
 	if (ret)
 		PMD_INIT_LOG(WARNING, "failed to free switch domain: %d", ret);
-- 
2.17.1

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

* [dpdk-stable] patch 'net/bonding: fix invalid port id' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (148 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/ixgbe: fix missing null check on detach' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/mlx5: fix TCI mask filter' " Christian Ehrhardt
                   ` (25 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: Chas Williams, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From e58c3c7792e85840111143820532d35641f43cf2 Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Wed, 18 Jul 2018 12:12:01 +0100
Subject: [PATCH] net/bonding: fix invalid port id

[ upstream commit 1620175b400e2247cd69240c1e3cbcc5c1889dbe ]

Setting up the bonding options before calling rte_eth_dev_probing_finish
triggers an invalid port id error because of port state not set, or set
unused

Fixes: fbe90cdd776c ("ethdev: add probing finish function")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Chas Williams <chas3@att.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 756fa0487..eea262552 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3115,6 +3115,7 @@ bond_probe(struct rte_vdev_device *dev)
 	internals = rte_eth_devices[port_id].data->dev_private;
 	internals->kvlist = kvlist;
 
+	rte_eth_dev_probing_finish(&rte_eth_devices[port_id]);
 
 	if (rte_kvargs_count(kvlist, PMD_BOND_AGG_MODE_KVARG) == 1) {
 		if (rte_kvargs_process(kvlist,
@@ -3134,7 +3135,6 @@ bond_probe(struct rte_vdev_device *dev)
 		rte_eth_bond_8023ad_agg_selection_set(port_id, AGG_STABLE);
 	}
 
-	rte_eth_dev_probing_finish(&rte_eth_devices[port_id]);
 	RTE_BOND_LOG(INFO, "Create bonded device %s on port %d in mode %u on "
 			"socket %u.",	name, port_id, bonding_mode, socket_id);
 	return 0;
-- 
2.17.1

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

* [dpdk-stable] patch 'net/mlx5: fix TCI mask filter' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (149 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/bonding: fix invalid port id' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/mlx5: fix assert for Tx completion queue count' " Christian Ehrhardt
                   ` (24 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Nelio Laranjeiro; +Cc: Yongseok Koh, Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From d96696cd3355fe14ee5613df54177c83649cedeb Mon Sep 17 00:00:00 2001
From: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Date: Mon, 23 Jul 2018 09:18:40 +0200
Subject: [PATCH] net/mlx5: fix TCI mask filter

[ upstream commit 2bc98393ac3ab980557187257369ec436a8f9eeb ]

In mlx5_traffic_enable() the TCI mask for the VLAN is wrong causing the
sub flow engine to reject the rule.

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

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

diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 4d2078bbd..d02a626ae 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -300,9 +300,8 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
 			struct rte_flow_item_vlan vlan_spec = {
 				.tci = rte_cpu_to_be_16(vlan),
 			};
-			struct rte_flow_item_vlan vlan_mask = {
-				.tci = 0xffff,
-			};
+			struct rte_flow_item_vlan vlan_mask =
+				rte_flow_item_vlan_mask;
 
 			ret = mlx5_ctrl_flow_vlan(dev, &bcast, &bcast,
 						  &vlan_spec, &vlan_mask);
@@ -339,9 +338,8 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
 			struct rte_flow_item_vlan vlan_spec = {
 				.tci = rte_cpu_to_be_16(vlan),
 			};
-			struct rte_flow_item_vlan vlan_mask = {
-				.tci = 0xffff,
-			};
+			struct rte_flow_item_vlan vlan_mask =
+				rte_flow_item_vlan_mask;
 
 			ret = mlx5_ctrl_flow_vlan(dev, &unicast,
 						  &unicast_mask,
-- 
2.17.1

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

* [dpdk-stable] patch 'net/mlx5: fix assert for Tx completion queue count' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (150 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/mlx5: fix TCI mask filter' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/mlx5: fix queue rollback when starting device' " Christian Ehrhardt
                   ` (23 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: Xueming Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From e06686966bdc6469ce8858442730c65f4afed698 Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Mon, 23 Jul 2018 11:00:10 -0700
Subject: [PATCH] net/mlx5: fix assert for Tx completion queue count

[ upstream commit c618e7e82bfed1da91f1dbabdd06e0a39fdb7b78 ]

There should be at least one Tx CQE remained if Tx WQ and txq->elts[] have
available slots to send a packet because the size of Tx CQ is exactly
calculated from the size of other resources. As it is guaranteed, it is
checked by an assertion.

max_elts is checked after the assertion for Tx CQ. If no slot is available
in txq->elts[], the assertion would be wrong.

Fixes: 2eefbec531c7 ("net/mlx5: add missing sanity checks for Tx completion queue")
Fixes: 6ce84bd88919 ("net/mlx5: add enhanced multi-packet send for ConnectX-5")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Xueming Li <xuemingl@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx.c          | 28 ++++++++-------------------
 drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 14 ++++----------
 drivers/net/mlx5/mlx5_rxtx_vec_sse.h  | 14 ++++----------
 3 files changed, 16 insertions(+), 40 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 527859461..2354fa0ce 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -503,8 +503,6 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
 	/* Start processing. */
 	mlx5_tx_complete(txq);
 	max_elts = (elts_n - (elts_head - txq->elts_tail));
-	/* A CQE slot must always be available. */
-	assert((1u << txq->cqe_n) - (txq->cq_pi - txq->cq_ci));
 	max_wqe = (1u << txq->wqe_n) - (txq->wqe_ci - txq->wqe_pi);
 	if (unlikely(!max_wqe))
 		return 0;
@@ -816,14 +814,13 @@ next_wqe:
 	/* Check whether completion threshold has been reached. */
 	comp = txq->elts_comp + i + j + k;
 	if (comp >= MLX5_TX_COMP_THRESH) {
+		/* A CQE slot must always be available. */
+		assert((1u << txq->cqe_n) - (txq->cq_pi++ - txq->cq_ci));
 		/* Request completion on last WQE. */
 		last_wqe->ctrl2 = rte_cpu_to_be_32(8);
 		/* Save elts_head in unused "immediate" field of WQE. */
 		last_wqe->ctrl3 = txq->elts_head;
 		txq->elts_comp = 0;
-#ifndef NDEBUG
-		++txq->cq_pi;
-#endif
 	} else {
 		txq->elts_comp = comp;
 	}
@@ -942,8 +939,6 @@ mlx5_tx_burst_mpw(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
 	/* Start processing. */
 	mlx5_tx_complete(txq);
 	max_elts = (elts_n - (elts_head - txq->elts_tail));
-	/* A CQE slot must always be available. */
-	assert((1u << txq->cqe_n) - (txq->cq_pi - txq->cq_ci));
 	max_wqe = (1u << txq->wqe_n) - (txq->wqe_ci - txq->wqe_pi);
 	if (unlikely(!max_wqe))
 		return 0;
@@ -1032,14 +1027,13 @@ mlx5_tx_burst_mpw(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
 	if (comp >= MLX5_TX_COMP_THRESH) {
 		volatile struct mlx5_wqe *wqe = mpw.wqe;
 
+		/* A CQE slot must always be available. */
+		assert((1u << txq->cqe_n) - (txq->cq_pi++ - txq->cq_ci));
 		/* Request completion on last WQE. */
 		wqe->ctrl[2] = rte_cpu_to_be_32(8);
 		/* Save elts_head in unused "immediate" field of WQE. */
 		wqe->ctrl[3] = elts_head;
 		txq->elts_comp = 0;
-#ifndef NDEBUG
-		++txq->cq_pi;
-#endif
 	} else {
 		txq->elts_comp = comp;
 	}
@@ -1171,8 +1165,6 @@ mlx5_tx_burst_mpw_inline(void *dpdk_txq, struct rte_mbuf **pkts,
 	/* Start processing. */
 	mlx5_tx_complete(txq);
 	max_elts = (elts_n - (elts_head - txq->elts_tail));
-	/* A CQE slot must always be available. */
-	assert((1u << txq->cqe_n) - (txq->cq_pi - txq->cq_ci));
 	do {
 		struct rte_mbuf *buf = *(pkts++);
 		uintptr_t addr;
@@ -1329,14 +1321,13 @@ mlx5_tx_burst_mpw_inline(void *dpdk_txq, struct rte_mbuf **pkts,
 	if (comp >= MLX5_TX_COMP_THRESH) {
 		volatile struct mlx5_wqe *wqe = mpw.wqe;
 
+		/* A CQE slot must always be available. */
+		assert((1u << txq->cqe_n) - (txq->cq_pi++ - txq->cq_ci));
 		/* Request completion on last WQE. */
 		wqe->ctrl[2] = rte_cpu_to_be_32(8);
 		/* Save elts_head in unused "immediate" field of WQE. */
 		wqe->ctrl[3] = elts_head;
 		txq->elts_comp = 0;
-#ifndef NDEBUG
-		++txq->cq_pi;
-#endif
 	} else {
 		txq->elts_comp = comp;
 	}
@@ -1459,8 +1450,6 @@ txq_burst_empw(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,
 	/* Start processing. */
 	mlx5_tx_complete(txq);
 	max_elts = (elts_n - (elts_head - txq->elts_tail));
-	/* A CQE slot must always be available. */
-	assert((1u << txq->cqe_n) - (txq->cq_pi - txq->cq_ci));
 	max_wqe = (1u << txq->wqe_n) - (txq->wqe_ci - txq->wqe_pi);
 	if (unlikely(!max_wqe))
 		return 0;
@@ -1616,15 +1605,14 @@ txq_burst_empw(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,
 			 (1 << txq->wqe_n) / MLX5_TX_COMP_THRESH_INLINE_DIV) {
 		volatile struct mlx5_wqe *wqe = mpw.wqe;
 
+		/* A CQE slot must always be available. */
+		assert((1u << txq->cqe_n) - (txq->cq_pi++ - txq->cq_ci));
 		/* Request completion on last WQE. */
 		wqe->ctrl[2] = rte_cpu_to_be_32(8);
 		/* Save elts_head in unused "immediate" field of WQE. */
 		wqe->ctrl[3] = elts_head;
 		txq->elts_comp = 0;
 		txq->mpw_comp = txq->wqe_ci;
-#ifndef NDEBUG
-		++txq->cq_pi;
-#endif
 	} else {
 		txq->elts_comp += j;
 	}
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
index 3ebf34823..b37b7381c 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
@@ -107,8 +107,6 @@ txq_scatter_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,
 
 	assert(elts_n > pkts_n);
 	mlx5_tx_complete(txq);
-	/* A CQE slot must always be available. */
-	assert((1u << txq->cqe_n) - (txq->cq_pi - txq->cq_ci));
 	if (unlikely(!pkts_n))
 		return 0;
 	for (n = 0; n < pkts_n; ++n) {
@@ -176,12 +174,11 @@ txq_scatter_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,
 	txq->elts_comp += (uint16_t)(elts_head - txq->elts_head);
 	txq->elts_head = elts_head;
 	if (txq->elts_comp >= MLX5_TX_COMP_THRESH) {
+		/* A CQE slot must always be available. */
+		assert((1u << txq->cqe_n) - (txq->cq_pi++ - txq->cq_ci));
 		wqe->ctrl[2] = rte_cpu_to_be_32(8);
 		wqe->ctrl[3] = txq->elts_head;
 		txq->elts_comp = 0;
-#ifndef NDEBUG
-		++txq->cq_pi;
-#endif
 	}
 #ifdef MLX5_PMD_SOFT_COUNTERS
 	txq->stats.opackets += n;
@@ -245,8 +242,6 @@ txq_burst_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts, uint16_t pkts_n,
 	assert(elts_n > pkts_n);
 	mlx5_tx_complete(txq);
 	max_elts = (elts_n - (elts_head - txq->elts_tail));
-	/* A CQE slot must always be available. */
-	assert((1u << txq->cqe_n) - (txq->cq_pi - txq->cq_ci));
 	max_wqe = (1u << txq->wqe_n) - (txq->wqe_ci - txq->wqe_pi);
 	pkts_n = RTE_MIN((unsigned int)RTE_MIN(pkts_n, max_wqe), max_elts);
 	if (unlikely(!pkts_n))
@@ -282,11 +277,10 @@ txq_burst_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts, uint16_t pkts_n,
 	if (txq->elts_comp + pkts_n < MLX5_TX_COMP_THRESH) {
 		txq->elts_comp += pkts_n;
 	} else {
+		/* A CQE slot must always be available. */
+		assert((1u << txq->cqe_n) - (txq->cq_pi++ - txq->cq_ci));
 		/* Request a completion. */
 		txq->elts_comp = 0;
-#ifndef NDEBUG
-		++txq->cq_pi;
-#endif
 		comp_req = 8;
 	}
 	/* Fill CTRL in the header. */
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
index f0d888831..54b3783cf 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
@@ -107,8 +107,6 @@ txq_scatter_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,
 
 	assert(elts_n > pkts_n);
 	mlx5_tx_complete(txq);
-	/* A CQE slot must always be available. */
-	assert((1u << txq->cqe_n) - (txq->cq_pi - txq->cq_ci));
 	if (unlikely(!pkts_n))
 		return 0;
 	for (n = 0; n < pkts_n; ++n) {
@@ -177,12 +175,11 @@ txq_scatter_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts,
 	txq->elts_comp += (uint16_t)(elts_head - txq->elts_head);
 	txq->elts_head = elts_head;
 	if (txq->elts_comp >= MLX5_TX_COMP_THRESH) {
+		/* A CQE slot must always be available. */
+		assert((1u << txq->cqe_n) - (txq->cq_pi++ - txq->cq_ci));
 		wqe->ctrl[2] = rte_cpu_to_be_32(8);
 		wqe->ctrl[3] = txq->elts_head;
 		txq->elts_comp = 0;
-#ifndef NDEBUG
-		++txq->cq_pi;
-#endif
 	}
 #ifdef MLX5_PMD_SOFT_COUNTERS
 	txq->stats.opackets += n;
@@ -244,8 +241,6 @@ txq_burst_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts, uint16_t pkts_n,
 	assert(elts_n > pkts_n);
 	mlx5_tx_complete(txq);
 	max_elts = (elts_n - (elts_head - txq->elts_tail));
-	/* A CQE slot must always be available. */
-	assert((1u << txq->cqe_n) - (txq->cq_pi - txq->cq_ci));
 	max_wqe = (1u << txq->wqe_n) - (txq->wqe_ci - txq->wqe_pi);
 	pkts_n = RTE_MIN((unsigned int)RTE_MIN(pkts_n, max_wqe), max_elts);
 	assert(pkts_n <= MLX5_DSEG_MAX - nb_dword_in_hdr);
@@ -283,11 +278,10 @@ txq_burst_v(struct mlx5_txq_data *txq, struct rte_mbuf **pkts, uint16_t pkts_n,
 	if (txq->elts_comp + pkts_n < MLX5_TX_COMP_THRESH) {
 		txq->elts_comp += pkts_n;
 	} else {
+		/* A CQE slot must always be available. */
+		assert((1u << txq->cqe_n) - (txq->cq_pi++ - txq->cq_ci));
 		/* Request a completion. */
 		txq->elts_comp = 0;
-#ifndef NDEBUG
-		++txq->cq_pi;
-#endif
 		comp_req = 8;
 	}
 	/* Fill CTRL in the header. */
-- 
2.17.1

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

* [dpdk-stable] patch 'net/mlx5: fix queue rollback when starting device' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (151 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/mlx5: fix assert for Tx completion queue count' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/mlx5: fix invalid network interface index' " Christian Ehrhardt
                   ` (22 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 64e056caae509ef4bdc3632ba716ae7b3cd75382 Mon Sep 17 00:00:00 2001
From: Yongseok Koh <yskoh@mellanox.com>
Date: Mon, 23 Jul 2018 13:57:04 -0700
Subject: [PATCH] net/mlx5: fix queue rollback when starting device

[ upstream commit 24f653a7e8bff5f500894a07771dd6718966e9be ]

mlx5_rxq_start() and mlx5_rxq_stop() must be strictly paired because
internal reference counter is increased or decreased inside. Also,
mlx5_rxq_get() must be paired with mlx5_rxq_release().

Fixes: 7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support")
Fixes: a1366b1a2be3 ("net/mlx5: add reference counter on DPDK Rx queues")
Fixes: 6e78005a9b30 ("net/mlx5: add reference counter on DPDK Tx queues")

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_trigger.c | 33 ++++++++++++++++++++-------------
 1 file changed, 20 insertions(+), 13 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index d02a626ae..e2a9bb703 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -46,7 +46,6 @@ mlx5_txq_start(struct rte_eth_dev *dev)
 	unsigned int i;
 	int ret;
 
-	/* Add memory regions to Tx queues. */
 	for (i = 0; i != priv->txqs_n; ++i) {
 		struct mlx5_txq_ctrl *txq_ctrl = mlx5_txq_get(dev, i);
 
@@ -60,12 +59,17 @@ mlx5_txq_start(struct rte_eth_dev *dev)
 		}
 	}
 	ret = mlx5_tx_uar_remap(dev, priv->ctx->cmd_fd);
-	if (ret)
+	if (ret) {
+		/* Adjust index for rollback. */
+		i = priv->txqs_n - 1;
 		goto error;
+	}
 	return 0;
 error:
 	ret = rte_errno; /* Save rte_errno before cleanup. */
-	mlx5_txq_stop(dev);
+	do {
+		mlx5_txq_release(dev, i);
+	} while (i-- != 0);
 	rte_errno = ret; /* Restore rte_errno. */
 	return -rte_errno;
 }
@@ -103,8 +107,10 @@ mlx5_rxq_start(struct rte_eth_dev *dev)
 	int ret = 0;
 
 	/* Allocate/reuse/resize mempool for Multi-Packet RQ. */
-	if (mlx5_mprq_alloc_mp(dev))
-		goto error;
+	if (mlx5_mprq_alloc_mp(dev)) {
+		/* Should not release Rx queues but return immediately. */
+		return -rte_errno;
+	}
 	for (i = 0; i != priv->rxqs_n; ++i) {
 		struct mlx5_rxq_ctrl *rxq_ctrl = mlx5_rxq_get(dev, i);
 		struct rte_mempool *mp;
@@ -130,7 +136,9 @@ mlx5_rxq_start(struct rte_eth_dev *dev)
 	return 0;
 error:
 	ret = rte_errno; /* Save rte_errno before cleanup. */
-	mlx5_rxq_stop(dev);
+	do {
+		mlx5_rxq_release(dev, i);
+	} while (i-- != 0);
 	rte_errno = ret; /* Restore rte_errno. */
 	return -rte_errno;
 }
@@ -152,21 +160,21 @@ mlx5_dev_start(struct rte_eth_dev *dev)
 	struct priv *priv = dev->data->dev_private;
 	int ret;
 
-	dev->data->dev_started = 1;
-	DRV_LOG(DEBUG, "port %u allocating and configuring hash Rx queues",
-		dev->data->port_id);
+	DRV_LOG(DEBUG, "port %u starting device", dev->data->port_id);
 	ret = mlx5_txq_start(dev);
 	if (ret) {
 		DRV_LOG(ERR, "port %u Tx queue allocation failed: %s",
 			dev->data->port_id, strerror(rte_errno));
-		goto error;
+		return -rte_errno;
 	}
 	ret = mlx5_rxq_start(dev);
 	if (ret) {
 		DRV_LOG(ERR, "port %u Rx queue allocation failed: %s",
 			dev->data->port_id, strerror(rte_errno));
-		goto error;
+		mlx5_txq_stop(dev);
+		return -rte_errno;
 	}
+	dev->data->dev_started = 1;
 	ret = mlx5_rx_intr_vec_enable(dev);
 	if (ret) {
 		DRV_LOG(ERR, "port %u Rx interrupt vector creation failed",
@@ -221,8 +229,7 @@ mlx5_dev_stop(struct rte_eth_dev *dev)
 	dev->tx_pkt_burst = removed_tx_burst;
 	rte_wmb();
 	usleep(1000 * priv->rxqs_n);
-	DRV_LOG(DEBUG, "port %u cleaning up and destroying hash Rx queues",
-		dev->data->port_id);
+	DRV_LOG(DEBUG, "port %u stopping device", dev->data->port_id);
 	mlx5_flow_stop(dev, &priv->flows);
 	mlx5_traffic_disable(dev);
 	mlx5_rx_intr_vec_disable(dev);
-- 
2.17.1

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

* [dpdk-stable] patch 'net/mlx5: fix invalid network interface index' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (152 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/mlx5: fix queue rollback when starting device' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-08-01 20:49   ` Yongseok Koh
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/mlx5: fix linkage of glue lib with gcc 4.7.2' " Christian Ehrhardt
                   ` (21 subsequent siblings)
  175 siblings, 1 reply; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Adrien Mazarguil; +Cc: Nelio Laranjeiro, Yongseok Koh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 2049afe07c264d2e4e3754588a264dd17cadaf4f Mon Sep 17 00:00:00 2001
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Date: Wed, 25 Jul 2018 13:24:33 +0200
Subject: [PATCH] net/mlx5: fix invalid network interface index

[ upstream commit 3f8cb05df5407369025fbc8b67f0f9595b781f73 ]

Network interface indices being unsigned, an invalid index or error is
normally expressed through a zero value (see if_nametoindex()).

mlx5_ifindex() has a signed return type for negative values in case of
error. Since mlx5_nl.c does not check for errors, these may be fed back as
invalid interfaces indices to subsequent system calls. This usage would
have been correct if mlx5_ifindex() returned a zero value instead.

This patch makes mlx5_ifindex() unsigned for convenience.

Fixes: ccdcba53a3f4 ("net/mlx5: use Netlink to add/remove MAC addresses")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5.h        |  1 +
 drivers/net/mlx5/mlx5_ethdev.c | 20 ++++++++------------
 drivers/net/mlx5/mlx5_nl.c     |  6 +++---
 3 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 997b04a33..8f1335200 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -211,6 +211,7 @@ int mlx5_getenv_int(const char *);
 
 int mlx5_get_ifname(const struct rte_eth_dev *dev, char (*ifname)[IF_NAMESIZE]);
 int mlx5_ifindex(const struct rte_eth_dev *dev);
+unsigned int mlx5_ifindex(const struct rte_eth_dev *dev);
 int mlx5_ifreq(const struct rte_eth_dev *dev, int req, struct ifreq *ifr);
 int mlx5_get_mtu(struct rte_eth_dev *dev, uint16_t *mtu);
 int mlx5_set_flags(struct rte_eth_dev *dev, unsigned int keep,
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index ebe5cb6e3..f04385307 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -185,24 +185,20 @@ try_dev_id:
  *   Pointer to Ethernet device.
  *
  * @return
- *   Interface index on success, a negative errno value otherwise and
- *   rte_errno is set.
+ *   Nonzero interface index on success, zero otherwise and rte_errno is set.
  */
-int
+unsigned int
 mlx5_ifindex(const struct rte_eth_dev *dev)
 {
 	char ifname[IF_NAMESIZE];
-	unsigned int ret;
+	unsigned int ifindex;
 
-	ret = mlx5_get_ifname(dev, &ifname);
-	if (ret)
-		return ret;
-	ret = if_nametoindex(ifname);
-	if (ret == 0) {
+	if (mlx5_get_ifname(dev, &ifname))
+		return 0;
+	ifindex = if_nametoindex(ifname);
+	if (!ifindex)
 		rte_errno = errno;
-		return -rte_errno;
-	}
-	return ret;
+	return ifindex;
 }
 
 /**
diff --git a/drivers/net/mlx5/mlx5_nl.c b/drivers/net/mlx5/mlx5_nl.c
index dca85835a..87110795d 100644
--- a/drivers/net/mlx5/mlx5_nl.c
+++ b/drivers/net/mlx5/mlx5_nl.c
@@ -311,7 +311,7 @@ mlx5_nl_mac_addr_list(struct rte_eth_dev *dev, struct ether_addr (*mac)[],
 		      int *mac_n)
 {
 	struct priv *priv = dev->data->dev_private;
-	int iface_idx = mlx5_ifindex(dev);
+	unsigned int iface_idx = mlx5_ifindex(dev);
 	struct {
 		struct nlmsghdr	hdr;
 		struct ifinfomsg ifm;
@@ -370,7 +370,7 @@ mlx5_nl_mac_addr_modify(struct rte_eth_dev *dev, struct ether_addr *mac,
 			int add)
 {
 	struct priv *priv = dev->data->dev_private;
-	int iface_idx = mlx5_ifindex(dev);
+	unsigned int iface_idx = mlx5_ifindex(dev);
 	struct {
 		struct nlmsghdr hdr;
 		struct ndmsg ndm;
@@ -549,7 +549,7 @@ static int
 mlx5_nl_device_flags(struct rte_eth_dev *dev, uint32_t flags, int enable)
 {
 	struct priv *priv = dev->data->dev_private;
-	int iface_idx = mlx5_ifindex(dev);
+	unsigned int iface_idx = mlx5_ifindex(dev);
 	struct {
 		struct nlmsghdr hdr;
 		struct ifinfomsg ifi;
-- 
2.17.1

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

* [dpdk-stable] patch 'net/mlx5: fix linkage of glue lib with gcc 4.7.2' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (153 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/mlx5: fix invalid network interface index' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'vhost: release locks on RARP packet failure' " Christian Ehrhardt
                   ` (20 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Yaroslav Brustinov; +Cc: Shahaf Shuler, Adrien Mazarguil, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From ebb63c0144a9a8372fe49ccb12c2a6a6ebb4587d Mon Sep 17 00:00:00 2001
From: Yaroslav Brustinov <ybrustin@cisco.com>
Date: Thu, 19 Jul 2018 13:00:22 +0300
Subject: [PATCH] net/mlx5: fix linkage of glue lib with gcc 4.7.2

[ upstream commit 2854ba22c583cd4b40c2d52e3279dece175ce1ca ]

addressing a gcc 4.7.2 bug that cannot be reproduced with latter
versions:

"bin/ld: Warning: alignment 8 of symbol `mlx5_glue' in
src/dpdk/drivers/net/mlx5/mlx5_glue.c.21.o is smaller than 16 in
src/dpdk/drivers/net/mlx5/mlx5_rxq.c.21.o"

Fix it be forcing the alignment of the glue lib.

Fixes: 0e83b8e536c1 ("net/mlx5: move rdma-core calls to separate file")

Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 drivers/net/mlx5/mlx5_glue.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_glue.c b/drivers/net/mlx5/mlx5_glue.c
index c7965e51f..84f9492a7 100644
--- a/drivers/net/mlx5/mlx5_glue.c
+++ b/drivers/net/mlx5/mlx5_glue.c
@@ -4,6 +4,7 @@
  */
 
 #include <errno.h>
+#include <stdalign.h>
 #include <stddef.h>
 #include <stdint.h>
 
@@ -23,6 +24,8 @@
 #pragma GCC diagnostic error "-Wpedantic"
 #endif
 
+#include <rte_config.h>
+
 #include "mlx5_autoconf.h"
 #include "mlx5_glue.h"
 
@@ -343,6 +346,7 @@ mlx5_glue_dv_create_qp(struct ibv_context *context,
 #endif
 }
 
+alignas(RTE_CACHE_LINE_SIZE)
 const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue){
 	.version = MLX5_GLUE_VERSION,
 	.fork_init = mlx5_glue_fork_init,
-- 
2.17.1

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

* [dpdk-stable] patch 'vhost: release locks on RARP packet failure' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (154 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/mlx5: fix linkage of glue lib with gcc 4.7.2' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'drivers/net: fix crash in secondary process' " Christian Ehrhardt
                   ` (19 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Jens Freimann, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 409270a5e3508fb36b028f1c88cd3caca6d69fef Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Wed, 25 Jul 2018 22:18:11 +0800
Subject: [PATCH] vhost: release locks on RARP packet failure

[ upstream commit 0989161b2636a9c9fc526baebaa7fb473e36a3cb ]

Fixes: eefac9536a90 ("vhost: postpone device creation until rings are mapped")

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
---
 lib/librte_vhost/virtio_net.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 76ec5f089..4aefaf416 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -1505,7 +1505,8 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id,
 		if (rarp_mbuf == NULL) {
 			RTE_LOG(ERR, VHOST_DATA,
 				"Failed to make RARP packet.\n");
-			return 0;
+			count = 0;
+			goto out;
 		}
 		count -= 1;
 	}
-- 
2.17.1

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

* [dpdk-stable] patch 'drivers/net: fix crash in secondary process' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (155 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'vhost: release locks on RARP packet failure' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'ring: fix declaration after statement' " Christian Ehrhardt
                   ` (18 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Vipin Varghese, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From cbf95ed319ecf2f76e6d19d481876b684d520fc8 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Fri, 20 Jul 2018 15:54:23 +0100
Subject: [PATCH] drivers/net: fix crash in secondary process

[ upstream commit d1c3ab220a367085451f595d94e481320e091a77 ]

Calling rte_eth_dev_info_get() on secondary process cause a crash
because eth_dev->device is not set properly.

Fixes: ee27edbe0c10 ("drivers/net: share vdev data to secondary process")

Reported-by: Vipin Varghese <vipin.varghese@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/af_packet/rte_eth_af_packet.c | 1 +
 drivers/net/bonding/rte_eth_bond_pmd.c    | 1 +
 drivers/net/dpaa/dpaa_ethdev.c            | 2 ++
 drivers/net/failsafe/failsafe.c           | 1 +
 drivers/net/kni/rte_eth_kni.c             | 1 +
 drivers/net/null/rte_eth_null.c           | 1 +
 drivers/net/octeontx/octeontx_ethdev.c    | 3 +++
 drivers/net/pcap/rte_eth_pcap.c           | 1 +
 drivers/net/tap/rte_eth_tap.c             | 2 ++
 drivers/net/vhost/rte_eth_vhost.c         | 1 +
 10 files changed, 14 insertions(+)

diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index ea47abbf8..149a8f2ba 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -935,6 +935,7 @@ rte_pmd_af_packet_probe(struct rte_vdev_device *dev)
 		}
 		/* TODO: request info from primary to set up Rx and Tx */
 		eth_dev->dev_ops = &ops;
+		eth_dev->device = &dev->device;
 		rte_eth_dev_probing_finish(eth_dev);
 		return 0;
 	}
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index eea262552..b0f820c0d 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3061,6 +3061,7 @@ bond_probe(struct rte_vdev_device *dev)
 		}
 		/* TODO: request info from primary to set up Rx and Tx */
 		eth_dev->dev_ops = &default_dev_ops;
+		eth_dev->device = &dev->device;
 		rte_eth_dev_probing_finish(eth_dev);
 		return 0;
 	}
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 79ba6bda1..8e1f44166 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -1390,6 +1390,8 @@ rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv,
 		eth_dev = rte_eth_dev_attach_secondary(dpaa_dev->name);
 		if (!eth_dev)
 			return -ENOMEM;
+		eth_dev->device = &dpaa_dev->device;
+		eth_dev->dev_ops = &dpaa_devops;
 		rte_eth_dev_probing_finish(eth_dev);
 		return 0;
 	}
diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index eafbb75df..10d915267 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -328,6 +328,7 @@ rte_pmd_failsafe_probe(struct rte_vdev_device *vdev)
 		}
 		/* TODO: request info from primary to set up Rx and Tx */
 		eth_dev->dev_ops = &failsafe_ops;
+		eth_dev->device = &vdev->device;
 		rte_eth_dev_probing_finish(eth_dev);
 		return 0;
 	}
diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index ab63ea427..da003c14e 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -419,6 +419,7 @@ eth_kni_probe(struct rte_vdev_device *vdev)
 		}
 		/* TODO: request info from primary to set up Rx and Tx */
 		eth_dev->dev_ops = &eth_kni_ops;
+		eth_dev->device = &vdev->device;
 		rte_eth_dev_probing_finish(eth_dev);
 		return 0;
 	}
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 1d2e6b9e9..24f91f76d 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -623,6 +623,7 @@ rte_pmd_null_probe(struct rte_vdev_device *dev)
 		}
 		/* TODO: request info from primary to set up Rx and Tx */
 		eth_dev->dev_ops = &ops;
+		eth_dev->device = &dev->device;
 		rte_eth_dev_probing_finish(eth_dev);
 		return 0;
 	}
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 705378186..c8eb91046 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -1014,6 +1014,8 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
 		if (eth_dev == NULL)
 			return -ENODEV;
 
+		eth_dev->dev_ops = &octeontx_dev_ops;
+		eth_dev->device = &dev->device;
 		eth_dev->tx_pkt_burst = octeontx_xmit_pkts;
 		eth_dev->rx_pkt_burst = octeontx_recv_pkts;
 		rte_eth_dev_probing_finish(eth_dev);
@@ -1182,6 +1184,7 @@ octeontx_probe(struct rte_vdev_device *dev)
 		}
 		/* TODO: request info from primary to set up Rx and Tx */
 		eth_dev->dev_ops = &octeontx_dev_ops;
+		eth_dev->device = &dev->device;
 		rte_eth_dev_probing_finish(eth_dev);
 		return 0;
 	}
diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index b4f81acce..385803deb 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -925,6 +925,7 @@ pmd_pcap_probe(struct rte_vdev_device *dev)
 		}
 		/* TODO: request info from primary to set up Rx and Tx */
 		eth_dev->dev_ops = &ops;
+		eth_dev->device = &dev->device;
 		rte_eth_dev_probing_finish(eth_dev);
 		return 0;
 	}
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 5531fe9d9..b582b8349 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1690,6 +1690,7 @@ rte_pmd_tun_probe(struct rte_vdev_device *dev)
 			return -1;
 		}
 		eth_dev->dev_ops = &ops;
+		eth_dev->device = &dev->device;
 		return 0;
 	}
 
@@ -1759,6 +1760,7 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
 		}
 		/* TODO: request info from primary to set up Rx and Tx */
 		eth_dev->dev_ops = &ops;
+		eth_dev->device = &dev->device;
 		rte_eth_dev_probing_finish(eth_dev);
 		return 0;
 	}
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index ba9d768a0..39453abe4 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -1353,6 +1353,7 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)
 		}
 		/* TODO: request info from primary to set up Rx and Tx */
 		eth_dev->dev_ops = &ops;
+		eth_dev->device = &dev->device;
 		rte_eth_dev_probing_finish(eth_dev);
 		return 0;
 	}
-- 
2.17.1

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

* [dpdk-stable] patch 'ring: fix declaration after statement' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (156 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'drivers/net: fix crash in secondary process' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'ring: fix sign conversion warning' " Christian Ehrhardt
                   ` (17 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Andy Green; +Cc: Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 11bb04336e933901e3e818a860a5bee475d92741 Mon Sep 17 00:00:00 2001
From: Andy Green <andy@warmcat.com>
Date: Mon, 28 May 2018 17:03:38 +0800
Subject: [PATCH] ring: fix declaration after statement

[ upstream commit 44c41b85775cdc084545ec3aa918b81e93d8d387 ]

On gcc 5.4.0 / native aarch64 from Ubuntu 16.04:

In function '__rte_ring_move_prod_head':
rte_ring_c11_mem.h:69:3: warning:
ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
   const uint32_t cons_tail = r->cons.tail;
   ^

In function '__rte_ring_move_cons_head':
rte_ring_c11_mem.h:136:3: warning:
ISO C90 forbids mixed declarations and code
[-Wdeclaration-after-statement]
   const uint32_t prod_tail = r->prod.tail;
   ^

Fixes: 39368ebfc6 ("ring: introduce C11 memory model barrier option")

Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_ring/rte_ring_c11_mem.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_ring/rte_ring_c11_mem.h b/lib/librte_ring/rte_ring_c11_mem.h
index cb3f82b1a..94df3c4a6 100644
--- a/lib/librte_ring/rte_ring_c11_mem.h
+++ b/lib/librte_ring/rte_ring_c11_mem.h
@@ -66,14 +66,14 @@ __rte_ring_move_prod_head(struct rte_ring *r, unsigned int is_sp,
 
 		*old_head = __atomic_load_n(&r->prod.head,
 					__ATOMIC_ACQUIRE);
-		const uint32_t cons_tail = r->cons.tail;
+
 		/*
 		 *  The subtraction is done between two unsigned 32bits value
 		 * (the result is always modulo 32 bits even if we have
 		 * *old_head > cons_tail). So 'free_entries' is always between 0
 		 * and capacity (which is < size).
 		 */
-		*free_entries = (capacity + cons_tail - *old_head);
+		*free_entries = (capacity + r->cons.tail - *old_head);
 
 		/* check that we have enough room in ring */
 		if (unlikely(n > *free_entries))
@@ -133,13 +133,13 @@ __rte_ring_move_cons_head(struct rte_ring *r, int is_sc,
 		n = max;
 		*old_head = __atomic_load_n(&r->cons.head,
 					__ATOMIC_ACQUIRE);
-		const uint32_t prod_tail = r->prod.tail;
+
 		/* The subtraction is done between two unsigned 32bits value
 		 * (the result is always modulo 32 bits even if we have
 		 * cons_head > prod_tail). So 'entries' is always between 0
 		 * and size(ring)-1.
 		 */
-		*entries = (prod_tail - *old_head);
+		*entries = (r->prod.tail - *old_head);
 
 		/* Set the actual entries for dequeue */
 		if (n > *entries)
-- 
2.17.1

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

* [dpdk-stable] patch 'ring: fix sign conversion warning' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (157 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'ring: fix declaration after statement' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'app/eventdev: fix order test service init' " Christian Ehrhardt
                   ` (16 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Andy Green; +Cc: Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From f4cfa4eb0aab0f67bfe6bdc931d025fe93408a79 Mon Sep 17 00:00:00 2001
From: Andy Green <andy@warmcat.com>
Date: Mon, 28 May 2018 17:03:43 +0800
Subject: [PATCH] ring: fix sign conversion warning

[ upstream commit ea771bc2a96dd67102656ad81c68edeed5974179 ]

On gcc 5.4.0 / native aarch64 from Ubuntu 16.04:

In function '__rte_ring_do_dequeue':
rte_ring.h: 385:35: warning:
conversion to 'int' from 'unsigned int' may change
the sign of the result [-Wsign-conversion]
  n = __rte_ring_move_cons_head(r, is_sc, n, behavior,
                                   ^

Fixes: e8ed5056c8 ("ring: remove signed type flip-flopping")

Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_ring/rte_ring.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h
index 124582251..de1a5f366 100644
--- a/lib/librte_ring/rte_ring.h
+++ b/lib/librte_ring/rte_ring.h
@@ -382,7 +382,7 @@ __rte_ring_do_dequeue(struct rte_ring *r, void **obj_table,
 	uint32_t cons_head, cons_next;
 	uint32_t entries;
 
-	n = __rte_ring_move_cons_head(r, is_sc, n, behavior,
+	n = __rte_ring_move_cons_head(r, (int)is_sc, n, behavior,
 			&cons_head, &cons_next, &entries);
 	if (n == 0)
 		goto end;
-- 
2.17.1

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

* [dpdk-stable] patch 'app/eventdev: fix order test service init' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (158 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'ring: fix sign conversion warning' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'event/octeontx: remove unnecessary port start and stop' " Christian Ehrhardt
                   ` (15 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Gage Eads, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From c33ec247ec21a4c0b58a39769c648eeddb43bb43 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Date: Fri, 13 Jul 2018 14:21:14 +0530
Subject: [PATCH] app/eventdev: fix order test service init

[ upstream commit 9d0c15b6c5956cce6038448b8115e8e911cfaefb ]

Previous modification to evt_service_setup() broke order_queue/atq
tests.

Fixes: b0333c55dfa5 ("app/eventdev: add service core configuration")

Reported-by: Gage Eads <gage.eads@intel.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Gage Eads <gage.eads@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 app/test-eventdev/test_order_atq.c   | 12 ++++++++----
 app/test-eventdev/test_order_queue.c | 12 ++++++++----
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/app/test-eventdev/test_order_atq.c b/app/test-eventdev/test_order_atq.c
index c57fbbfa6..35debcfdc 100644
--- a/app/test-eventdev/test_order_atq.c
+++ b/app/test-eventdev/test_order_atq.c
@@ -151,10 +151,14 @@ order_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt)
 	if (ret)
 		return ret;
 
-	ret = evt_service_setup(opt->dev_id);
-	if (ret) {
-		evt_err("No service lcore found to run event dev.");
-		return ret;
+	if (!evt_has_distributed_sched(opt->dev_id)) {
+		uint32_t service_id;
+		rte_event_dev_service_id_get(opt->dev_id, &service_id);
+		ret = evt_service_setup(service_id);
+		if (ret) {
+			evt_err("No service lcore found to run event dev.");
+			return ret;
+		}
 	}
 
 	ret = rte_event_dev_start(opt->dev_id);
diff --git a/app/test-eventdev/test_order_queue.c b/app/test-eventdev/test_order_queue.c
index f603a0230..17f7b9845 100644
--- a/app/test-eventdev/test_order_queue.c
+++ b/app/test-eventdev/test_order_queue.c
@@ -164,10 +164,14 @@ order_queue_eventdev_setup(struct evt_test *test, struct evt_options *opt)
 	if (ret)
 		return ret;
 
-	ret = evt_service_setup(opt->dev_id);
-	if (ret) {
-		evt_err("No service lcore found to run event dev.");
-		return ret;
+	if (!evt_has_distributed_sched(opt->dev_id)) {
+		uint32_t service_id;
+		rte_event_dev_service_id_get(opt->dev_id, &service_id);
+		ret = evt_service_setup(service_id);
+		if (ret) {
+			evt_err("No service lcore found to run event dev.");
+			return ret;
+		}
 	}
 
 	ret = rte_event_dev_start(opt->dev_id);
-- 
2.17.1

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

* [dpdk-stable] patch 'event/octeontx: remove unnecessary port start and stop' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (159 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'app/eventdev: fix order test service init' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'app/testpmd: fix buffer leak in TM command' " Christian Ehrhardt
                   ` (14 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 1bbd87c0a64ff13aefc7063361284125ce7129d7 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Date: Thu, 19 Jul 2018 17:17:47 +0530
Subject: [PATCH] event/octeontx: remove unnecessary port start and stop

[ upstream commit 56aa489e8ea48282f830b67f36772beaa478bade ]

Modifying port state is not necessary when starting/stopping Rx adapter
as it is same as starting/stopping ethdev.

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

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 drivers/event/octeontx/ssovf_evdev.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index 2df70b52a..f98296f18 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -476,14 +476,9 @@ static int
 ssovf_eth_rx_adapter_start(const struct rte_eventdev *dev,
 					const struct rte_eth_dev *eth_dev)
 {
-	int ret;
-	const struct octeontx_nic *nic = eth_dev->data->dev_private;
 	RTE_SET_USED(dev);
+	RTE_SET_USED(eth_dev);
 
-	ret = strncmp(eth_dev->data->name, "eth_octeontx", 12);
-	if (ret)
-		return 0;
-	octeontx_pki_port_start(nic->port_id);
 	return 0;
 }
 
@@ -492,14 +487,9 @@ static int
 ssovf_eth_rx_adapter_stop(const struct rte_eventdev *dev,
 		const struct rte_eth_dev *eth_dev)
 {
-	int ret;
-	const struct octeontx_nic *nic = eth_dev->data->dev_private;
 	RTE_SET_USED(dev);
+	RTE_SET_USED(eth_dev);
 
-	ret = strncmp(eth_dev->data->name, "eth_octeontx", 12);
-	if (ret)
-		return 0;
-	octeontx_pki_port_stop(nic->port_id);
 	return 0;
 }
 
-- 
2.17.1

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

* [dpdk-stable] patch 'app/testpmd: fix buffer leak in TM command' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (160 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'event/octeontx: remove unnecessary port start and stop' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'app/testpmd: fix crash on TM command error' " Christian Ehrhardt
                   ` (13 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: Jasvinder Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From c48bd26a410043e700353b99f2e4e179fa65783a Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <nithin.dabilpuram@caviumnetworks.com>
Date: Thu, 5 Jul 2018 11:15:46 +0530
Subject: [PATCH] app/testpmd: fix buffer leak in TM command

[ upstream commit b23ee8f2ac5de4a52573f844ba3c4f3261c3f7e7 ]

Free the buffer allocated for shared_shaper_id array in
case of configuration without shared shapers.

Fixes: 996cb153af06 ("app/testpmd: add commands for TM nodes and hierarchy commit")

Signed-off-by: Nithin Dabilpuram <nithin.dabilpuram@caviumnetworks.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
 app/test-pmd/cmdline_tm.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c
index c904e44f0..7c1601fa2 100644
--- a/app/test-pmd/cmdline_tm.c
+++ b/app/test-pmd/cmdline_tm.c
@@ -1599,10 +1599,12 @@ static void cmd_add_port_tm_nonleaf_node_parsed(void *parsed_result,
 		np.shaper_profile_id = res->shaper_profile_id;
 
 	np.n_shared_shapers = n_shared_shapers;
-	if (np.n_shared_shapers)
+	if (np.n_shared_shapers) {
 		np.shared_shaper_id = &shared_shaper_id[0];
-	else
-		np.shared_shaper_id = NULL;
+	} else {
+		free(shared_shaper_id);
+		shared_shaper_id = NULL;
+	}
 
 	np.nonleaf.n_sp_priorities = res->n_sp_priorities;
 	np.stats_mask = res->stats_mask;
@@ -1758,10 +1760,12 @@ static void cmd_add_port_tm_leaf_node_parsed(void *parsed_result,
 
 	np.n_shared_shapers = n_shared_shapers;
 
-	if (np.n_shared_shapers)
+	if (np.n_shared_shapers) {
 		np.shared_shaper_id = &shared_shaper_id[0];
-	else
-		np.shared_shaper_id = NULL;
+	} else {
+		free(shared_shaper_id);
+		shared_shaper_id = NULL;
+	}
 
 	np.leaf.cman = res->cman_mode;
 	np.leaf.wred.wred_profile_id = res->wred_profile_id;
-- 
2.17.1

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

* [dpdk-stable] patch 'app/testpmd: fix crash on TM command error' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (161 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'app/testpmd: fix buffer leak in TM command' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'app/testpmd: fix help for TM commit command' " Christian Ehrhardt
                   ` (12 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Krzysztof Kanas; +Cc: Bernard Iremonger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From c606c90f801fe475fbfbfb9384586ce98ab3f3ed Mon Sep 17 00:00:00 2001
From: Krzysztof Kanas <krzysztof.kanas@caviumnetworks.com>
Date: Wed, 25 Jul 2018 14:41:48 +0200
Subject: [PATCH] app/testpmd: fix crash on TM command error

[ upstream commit a27e56d29f0b495cd1549828f5d2a3e623ebad80 ]

print_err_msg uses message field that may be not initialized causing
segmentation fault.

Fixes: 12f76f5247e2 ("app/testpmd: add command to resume a TM node")

Signed-off-by: Krzysztof Kanas <krzysztof.kanas@caviumnetworks.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test-pmd/cmdline_tm.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c
index 7c1601fa2..27291015f 100644
--- a/app/test-pmd/cmdline_tm.c
+++ b/app/test-pmd/cmdline_tm.c
@@ -234,6 +234,7 @@ static void cmd_show_port_tm_cap_parsed(void *parsed_result,
 		return;
 
 	memset(&cap, 0, sizeof(struct rte_tm_capabilities));
+	memset(&error, 0, sizeof(struct rte_tm_error));
 	ret = rte_tm_capabilities_get(port_id, &cap, &error);
 	if (ret) {
 		print_err_msg(&error);
@@ -374,6 +375,7 @@ static void cmd_show_port_tm_level_cap_parsed(void *parsed_result,
 		return;
 
 	memset(&lcap, 0, sizeof(struct rte_tm_level_capabilities));
+	memset(&error, 0, sizeof(struct rte_tm_error));
 	ret = rte_tm_level_capabilities_get(port_id, level_id, &lcap, &error);
 	if (ret) {
 		print_err_msg(&error);
@@ -498,6 +500,7 @@ static void cmd_show_port_tm_node_cap_parsed(void *parsed_result,
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
 		return;
 
+	memset(&error, 0, sizeof(struct rte_tm_error));
 	/* Node id must be valid */
 	ret = rte_tm_node_type_get(port_id, node_id, &is_leaf, &error);
 	if (ret != 0) {
@@ -615,6 +618,7 @@ static void cmd_show_port_tm_node_stats_parsed(void *parsed_result,
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
 		return;
 
+	memset(&error, 0, sizeof(struct rte_tm_error));
 	/* Port status */
 	if (!port_is_started(port_id)) {
 		printf(" Port %u not started (error)\n", port_id);
@@ -727,6 +731,7 @@ static void cmd_show_port_tm_node_type_parsed(void *parsed_result,
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
 		return;
 
+	memset(&error, 0, sizeof(struct rte_tm_error));
 	ret = rte_tm_node_type_get(port_id, node_id, &is_leaf, &error);
 	if (ret != 0) {
 		print_err_msg(&error);
@@ -832,6 +837,7 @@ static void cmd_add_port_tm_node_shaper_profile_parsed(void *parsed_result,
 
 	/* Private shaper profile params */
 	memset(&sp, 0, sizeof(struct rte_tm_shaper_params));
+	memset(&error, 0, sizeof(struct rte_tm_error));
 	sp.peak.rate = res->tb_rate;
 	sp.peak.size = res->tb_size;
 	sp.pkt_length_adjust = pkt_len_adjust;
@@ -919,6 +925,7 @@ static void cmd_del_port_tm_node_shaper_profile_parsed(void *parsed_result,
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
 		return;
 
+	memset(&error, 0, sizeof(struct rte_tm_error));
 	ret = rte_tm_shaper_profile_delete(port_id, shaper_id, &error);
 	if (ret != 0) {
 		print_err_msg(&error);
@@ -1004,6 +1011,7 @@ static void cmd_add_port_tm_node_shared_shaper_parsed(void *parsed_result,
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
 		return;
 
+	memset(&error, 0, sizeof(struct rte_tm_error));
 	/* Command type: add */
 	if ((strcmp(res->cmd_type, "add") == 0) &&
 		(port_is_started(port_id))) {
@@ -1098,6 +1106,7 @@ static void cmd_del_port_tm_node_shared_shaper_parsed(void *parsed_result,
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
 		return;
 
+	memset(&error, 0, sizeof(struct rte_tm_error));
 	ret = rte_tm_shared_shaper_delete(port_id, shared_shaper_id, &error);
 	if (ret != 0) {
 		print_err_msg(&error);
@@ -1254,6 +1263,7 @@ static void cmd_add_port_tm_node_wred_profile_parsed(void *parsed_result,
 		return;
 
 	memset(&wp, 0, sizeof(struct rte_tm_wred_params));
+	memset(&error, 0, sizeof(struct rte_tm_error));
 
 	/* WRED Params  (Green Color)*/
 	color = RTE_TM_GREEN;
@@ -1369,6 +1379,7 @@ static void cmd_del_port_tm_node_wred_profile_parsed(void *parsed_result,
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
 		return;
 
+	memset(&error, 0, sizeof(struct rte_tm_error));
 	ret = rte_tm_wred_profile_delete(port_id, wred_profile_id, &error);
 	if (ret != 0) {
 		print_err_msg(&error);
@@ -1455,6 +1466,7 @@ static void cmd_set_port_tm_node_shaper_profile_parsed(void *parsed_result,
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
 		return;
 
+	memset(&error, 0, sizeof(struct rte_tm_error));
 	/* Port status */
 	if (!port_is_started(port_id)) {
 		printf(" Port %u not started (error)\n", port_id);
@@ -1571,6 +1583,7 @@ static void cmd_add_port_tm_nonleaf_node_parsed(void *parsed_result,
 		return;
 
 	memset(&np, 0, sizeof(struct rte_tm_node_params));
+	memset(&error, 0, sizeof(struct rte_tm_error));
 
 	/* Node parameters */
 	if (res->parent_node_id < 0)
@@ -1731,6 +1744,7 @@ static void cmd_add_port_tm_leaf_node_parsed(void *parsed_result,
 		return;
 
 	memset(&np, 0, sizeof(struct rte_tm_node_params));
+	memset(&error, 0, sizeof(struct rte_tm_error));
 
 	/* Node parameters */
 	if (res->parent_node_id < 0)
@@ -1848,6 +1862,7 @@ static void cmd_del_port_tm_node_parsed(void *parsed_result,
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
 		return;
 
+	memset(&error, 0, sizeof(struct rte_tm_error));
 	/* Port status */
 	if (port_is_started(port_id)) {
 		printf(" Port %u not stopped (error)\n", port_id);
@@ -1937,6 +1952,7 @@ static void cmd_set_port_tm_node_parent_parsed(void *parsed_result,
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
 		return;
 
+	memset(&error, 0, sizeof(struct rte_tm_error));
 	/* Port status */
 	if (!port_is_started(port_id)) {
 		printf(" Port %u not started (error)\n", port_id);
@@ -2012,6 +2028,7 @@ static void cmd_suspend_port_tm_node_parsed(void *parsed_result,
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
 		return;
 
+	memset(&error, 0, sizeof(struct rte_tm_error));
 	ret = rte_tm_node_suspend(port_id, node_id, &error);
 	if (ret != 0) {
 		print_err_msg(&error);
@@ -2076,6 +2093,7 @@ static void cmd_resume_port_tm_node_parsed(void *parsed_result,
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
 		return;
 
+	memset(&error, 0, sizeof(struct rte_tm_error));
 	ret = rte_tm_node_resume(port_id, node_id, &error);
 	if (ret != 0) {
 		print_err_msg(&error);
@@ -2147,6 +2165,7 @@ static void cmd_port_tm_hierarchy_commit_parsed(void *parsed_result,
 	else
 		clean_on_fail = 0;
 
+	memset(&error, 0, sizeof(struct rte_tm_error));
 	ret = rte_tm_hierarchy_commit(port_id, clean_on_fail, &error);
 	if (ret != 0) {
 		print_err_msg(&error);
-- 
2.17.1

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

* [dpdk-stable] patch 'app/testpmd: fix help for TM commit command' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (162 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'app/testpmd: fix crash on TM command error' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'examples/exception_path: fix out-of-bounds read' " Christian Ehrhardt
                   ` (11 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Krzysztof Kanas; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From dd400a7be57e1b24386ab2e88fe830aa5ddf1c27 Mon Sep 17 00:00:00 2001
From: Krzysztof Kanas <krzysztof.kanas@caviumnetworks.com>
Date: Wed, 25 Jul 2018 14:41:49 +0200
Subject: [PATCH] app/testpmd: fix help for TM commit command

[ upstream commit 2e9bf3a12aaad73294f50bd43420ab62588333f3 ]

Fixes: 996cb153af06 ("app/testpmd: add commands for TM nodes and hierarchy commit")

Signed-off-by: Krzysztof Kanas <krzysztof.kanas@caviumnetworks.com>
---
 app/test-pmd/cmdline_tm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c
index 27291015f..631f17995 100644
--- a/app/test-pmd/cmdline_tm.c
+++ b/app/test-pmd/cmdline_tm.c
@@ -2176,7 +2176,7 @@ static void cmd_port_tm_hierarchy_commit_parsed(void *parsed_result,
 cmdline_parse_inst_t cmd_port_tm_hierarchy_commit = {
 	.f = cmd_port_tm_hierarchy_commit_parsed,
 	.data = NULL,
-	.help_str = "Set port tm node shaper profile",
+	.help_str = "Commit port tm hierarchy",
 	.tokens = {
 		(void *)&cmd_port_tm_hierarchy_commit_port,
 		(void *)&cmd_port_tm_hierarchy_commit_tm,
-- 
2.17.1

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

* [dpdk-stable] patch 'examples/exception_path: fix out-of-bounds read' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (163 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'app/testpmd: fix help for TM commit command' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'examples/l3fwd: remove useless include' " Christian Ehrhardt
                   ` (10 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 3b48eaeb0f532ee7e6220b0a52a2094856afb296 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 16 Jul 2018 17:03:47 +0100
Subject: [PATCH] examples/exception_path: fix out-of-bounds read

[ upstream commit 4341adf272144689540a8e0f615f12eef7e21109 ]

When printing out stats from the exception_path app, all possible
lcore_ids are iterated. However, the app only supports up to 64 cores.
To prevent possible errors, and to remove coverity warnings,
explicitly check for out-of-range lcore ids before printing.

Coverity issue: 268335
Fixes: af75078fece3 ("first public release")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/exception_path/main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/examples/exception_path/main.c b/examples/exception_path/main.c
index 2b381a5d8..63a5a0056 100644
--- a/examples/exception_path/main.c
+++ b/examples/exception_path/main.c
@@ -132,6 +132,9 @@ print_stats(void)
 	       " Lcore    Port            RX            TX    Dropped on TX\n"
 	       "-------  ------  ------------  ------------  ---------------\n");
 	RTE_LCORE_FOREACH(i) {
+		/* limit ourselves to application supported cores only */
+		if (i >= APP_MAX_LCORE)
+			break;
 		printf("%6u %7u %13"PRIu64" %13"PRIu64" %16"PRIu64"\n",
 		       i, (unsigned)port_ids[i],
 		       lcore_stats[i].rx, lcore_stats[i].tx,
-- 
2.17.1

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

* [dpdk-stable] patch 'examples/l3fwd: remove useless include' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (164 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'examples/exception_path: fix out-of-bounds read' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'bitrate: add sanity check on parameters' " Christian Ehrhardt
                   ` (9 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Rami Rosen; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 7f93a01ef41a6382abdeb03ba2e6b1415c0dbbcd Mon Sep 17 00:00:00 2001
From: Rami Rosen <rami.rosen@intel.com>
Date: Mon, 2 Jul 2018 20:55:23 +0300
Subject: [PATCH] examples/l3fwd: remove useless include

[ upstream commit 8dedd737452fe2c8d74cce786aa6cc0ea91ed5c0 ]

This patch removes unneeded include of rte_mempool.h in
two modules in examples/l3fwd.

Fixes: 268888b5b020 ("examples/l3fwd: modularize")

Signed-off-by: Rami Rosen <rami.rosen@intel.com>
---
 examples/l3fwd/l3fwd_em.c  | 1 -
 examples/l3fwd/l3fwd_lpm.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c
index 9dc3b8c4f..fa8f82be6 100644
--- a/examples/l3fwd/l3fwd_em.c
+++ b/examples/l3fwd/l3fwd_em.c
@@ -18,7 +18,6 @@
 #include <rte_debug.h>
 #include <rte_ether.h>
 #include <rte_ethdev.h>
-#include <rte_mempool.h>
 #include <rte_cycles.h>
 #include <rte_mbuf.h>
 #include <rte_ip.h>
diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c
index a747126a2..b1dc195ad 100644
--- a/examples/l3fwd/l3fwd_lpm.c
+++ b/examples/l3fwd/l3fwd_lpm.c
@@ -17,7 +17,6 @@
 #include <rte_debug.h>
 #include <rte_ether.h>
 #include <rte_ethdev.h>
-#include <rte_mempool.h>
 #include <rte_cycles.h>
 #include <rte_mbuf.h>
 #include <rte_ip.h>
-- 
2.17.1

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

* [dpdk-stable] patch 'bitrate: add sanity check on parameters' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (165 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'examples/l3fwd: remove useless include' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'metrics: add check for invalid key' " Christian Ehrhardt
                   ` (8 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Remy Horton; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 4312b6d5f4914302678100a98ba40f413dcf44da Mon Sep 17 00:00:00 2001
From: Remy Horton <remy.horton@intel.com>
Date: Thu, 12 Jul 2018 11:49:48 +0100
Subject: [PATCH] bitrate: add sanity check on parameters

[ upstream commit 90b0e5aaf4e3a56a4dac57aceb425930450cec85 ]

If rte_stats_bitrate_reg() or rte_stats_bitrate_calc() are
passed NULL as the parameter for the stats structure, the
result is a crash. Fixed by adding a sanity check that makes
sure the passed-in pointer is not NULL.

Fixes: 2ad7ba9a6567 ("bitrate: add bitrate statistics library")

Signed-off-by: Remy Horton <remy.horton@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_bitratestats/rte_bitrate.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c
index 964e3c39f..c4b28f624 100644
--- a/lib/librte_bitratestats/rte_bitrate.c
+++ b/lib/librte_bitratestats/rte_bitrate.c
@@ -47,6 +47,9 @@ rte_stats_bitrate_reg(struct rte_stats_bitrates *bitrate_data)
 	};
 	int return_value;
 
+	if (bitrate_data == NULL)
+		return -EINVAL;
+
 	return_value = rte_metrics_reg_names(&names[0], ARRAY_SIZE(names));
 	if (return_value >= 0)
 		bitrate_data->id_stats_set = return_value;
@@ -65,6 +68,9 @@ rte_stats_bitrate_calc(struct rte_stats_bitrates *bitrate_data,
 	const int64_t alpha_percent = 20;
 	uint64_t values[6];
 
+	if (bitrate_data == NULL)
+		return -EINVAL;
+
 	ret_code = rte_eth_stats_get(port_id, &eth_stats);
 	if (ret_code != 0)
 		return ret_code;
-- 
2.17.1

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

* [dpdk-stable] patch 'metrics: add check for invalid key' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (166 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'bitrate: add sanity check on parameters' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'metrics: do not fail silently when uninitialised' " Christian Ehrhardt
                   ` (7 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Remy Horton; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 7df968d8fd82a7d1e3a18fd17687a3a702672bd7 Mon Sep 17 00:00:00 2001
From: Remy Horton <remy.horton@intel.com>
Date: Fri, 6 Jul 2018 14:21:19 +0100
Subject: [PATCH] metrics: add check for invalid key

[ upstream commit 50d2459fdde1916c2ebce1a3751ab2fa59c0766f ]

This patchset adds a check to rte_metrics_update_values()
that prevents the updating of metrics when presented with
an invalid metric key. Previously, doing the latter could
result in a crash.

Fixes: 349950ddb9c5 ("metrics: add information metrics library")

Signed-off-by: Remy Horton <remy.horton@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_metrics/rte_metrics.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/librte_metrics/rte_metrics.c b/lib/librte_metrics/rte_metrics.c
index 258f0582c..b5638f553 100644
--- a/lib/librte_metrics/rte_metrics.c
+++ b/lib/librte_metrics/rte_metrics.c
@@ -159,6 +159,11 @@ rte_metrics_update_values(int port_id,
 	stats = memzone->addr;
 
 	rte_spinlock_lock(&stats->lock);
+
+	if (key >= stats->cnt_stats) {
+		rte_spinlock_unlock(&stats->lock);
+		return -EINVAL;
+	}
 	idx_metric = key;
 	cnt_setsize = 1;
 	while (idx_metric < stats->cnt_stats) {
-- 
2.17.1

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

* [dpdk-stable] patch 'metrics: do not fail silently when uninitialised' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (167 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'metrics: add check for invalid key' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'metrics: disallow null as metric name' " Christian Ehrhardt
                   ` (6 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Remy Horton; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 80305879395ed0820267dd5f7e84ab9b431fd801 Mon Sep 17 00:00:00 2001
From: Remy Horton <remy.horton@intel.com>
Date: Mon, 2 Jul 2018 15:55:47 +0100
Subject: [PATCH] metrics: do not fail silently when uninitialised

[ upstream commit a84bdf6a101f2ab3c3859a40f366962d78c12868 ]

If rte_metrics_init() had not been called and hence the internal
metric storage is not allocated, rte_metrics_get_values() and
rte_metrics_get_name() would silently fail by returning zero
(i.e. no metrics registered). This patch changes the result of
this scenario to an explicit fail by returning -EIO.

Fixes: 349950ddb9c5 ("metrics: add information metrics library")

Signed-off-by: Remy Horton <remy.horton@intel.com>
---
 lib/librte_metrics/rte_metrics.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/lib/librte_metrics/rte_metrics.c b/lib/librte_metrics/rte_metrics.c
index b5638f553..038f58bf8 100644
--- a/lib/librte_metrics/rte_metrics.c
+++ b/lib/librte_metrics/rte_metrics.c
@@ -205,9 +205,8 @@ rte_metrics_get_names(struct rte_metric_name *names,
 	int return_value;
 
 	memzone = rte_memzone_lookup(RTE_METRICS_MEMZONE_NAME);
-	/* If not allocated, fail silently */
 	if (memzone == NULL)
-		return 0;
+		return -EIO;
 
 	stats = memzone->addr;
 	rte_spinlock_lock(&stats->lock);
@@ -243,9 +242,9 @@ rte_metrics_get_values(int port_id,
 		return -EINVAL;
 
 	memzone = rte_memzone_lookup(RTE_METRICS_MEMZONE_NAME);
-	/* If not allocated, fail silently */
 	if (memzone == NULL)
-		return 0;
+		return -EIO;
+
 	stats = memzone->addr;
 	rte_spinlock_lock(&stats->lock);
 
-- 
2.17.1

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

* [dpdk-stable] patch 'metrics: disallow null as metric name' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (168 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'metrics: do not fail silently when uninitialised' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'test: fix EAL flags autotest on FreeBSD' " Christian Ehrhardt
                   ` (5 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Remy Horton; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 5eee77dcb8b4491167ded34b8a2bbfd5f618bdf0 Mon Sep 17 00:00:00 2001
From: Remy Horton <remy.horton@intel.com>
Date: Mon, 2 Jul 2018 14:46:08 +0100
Subject: [PATCH] metrics: disallow null as metric name

[ upstream commit 219731302a0aa5b8edb30a6bc1cdea64e7824a98 ]

This patch adds a sanity check so that names passed into
rte_metrics_reg_names() and the wrapper rte_metrics_reg_name()
cannot be NULL.

Fixes: 349950ddb9c5 ("metrics: add information metrics library")

Signed-off-by: Remy Horton <remy.horton@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_metrics/rte_metrics.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_metrics/rte_metrics.c b/lib/librte_metrics/rte_metrics.c
index 038f58bf8..99a96b651 100644
--- a/lib/librte_metrics/rte_metrics.c
+++ b/lib/librte_metrics/rte_metrics.c
@@ -96,6 +96,9 @@ rte_metrics_reg_names(const char * const *names, uint16_t cnt_names)
 	/* Some sanity checks */
 	if (cnt_names < 1 || names == NULL)
 		return -EINVAL;
+	for (idx_name = 0; idx_name < cnt_names; idx_name++)
+		if (names[idx_name] == NULL)
+			return -EINVAL;
 
 	memzone = rte_memzone_lookup(RTE_METRICS_MEMZONE_NAME);
 	if (memzone == NULL)
-- 
2.17.1

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

* [dpdk-stable] patch 'test: fix EAL flags autotest on FreeBSD' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (169 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'metrics: disallow null as metric name' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'test/flow_classify: fix return types' " Christian Ehrhardt
                   ` (4 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Changqing Wu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From e36758d2a6bcba2025316791caa5e33217a1dd66 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Mon, 16 Jul 2018 17:34:04 +0100
Subject: [PATCH] test: fix EAL flags autotest on FreeBSD

[ upstream commit b5d878e6db56c76ffe5e8c69b6c19faac4e97d80 ]

FreeBSD does not support running multiple primary processes
concurrently, because all DPDK instances will allocate memory
from the same place (memory provided by contigmem driver).
While it is technically possible to launch a DPDK process
using no-shconf switch, it will actually corrupt main process'
for the above reason.

Fix EAL flags autotest to not run primary processes unless
both no-shconf and no-huge are specified.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Changqing Wu <changqingx.wu@intel.com>
---
 test/test/test_eal_flags.c | 33 +++++++++++++++++----------------
 1 file changed, 17 insertions(+), 16 deletions(-)

diff --git a/test/test/test_eal_flags.c b/test/test/test_eal_flags.c
index f840ca50b..8d1da2c60 100644
--- a/test/test/test_eal_flags.c
+++ b/test/test/test_eal_flags.c
@@ -376,17 +376,17 @@ test_invalid_vdev_flag(void)
 #endif
 
 	/* Test with invalid vdev option */
-	const char *vdevinval[] = {prgname, prefix, "-n", "1",
+	const char *vdevinval[] = {prgname, prefix, no_huge, "-n", "1",
 				"-c", "1", vdev, "eth_dummy"};
 
 	/* Test with valid vdev option */
-	const char *vdevval1[] = {prgname, prefix, "-n", "1",
+	const char *vdevval1[] = {prgname, prefix, no_huge, "-n", "1",
 	"-c", "1", vdev, "net_ring0"};
 
-	const char *vdevval2[] = {prgname, prefix, "-n", "1",
+	const char *vdevval2[] = {prgname, prefix, no_huge, "-n", "1",
 	"-c", "1", vdev, "net_ring0,args=test"};
 
-	const char *vdevval3[] = {prgname, prefix, "-n", "1",
+	const char *vdevval3[] = {prgname, prefix, no_huge, "-n", "1",
 	"-c", "1", vdev, "net_ring0,nodeaction=r1:0:CREATE"};
 
 	if (launch_proc(vdevinval) == 0) {
@@ -849,13 +849,10 @@ test_misc_flags(void)
 	const char *argv4[] = {prgname, prefix, mp_flag, "-c", "1", "--syslog"};
 	/* With invalid --syslog */
 	const char *argv5[] = {prgname, prefix, mp_flag, "-c", "1", "--syslog", "error"};
-	/* With no-sh-conf */
+	/* With no-sh-conf, also use no-huge to ensure this test runs on BSD */
 	const char *argv6[] = {prgname, "-c", "1", "-n", "2", "-m", DEFAULT_MEM_SIZE,
-			no_shconf, nosh_prefix };
+			no_shconf, nosh_prefix, no_huge};
 
-#ifdef RTE_EXEC_ENV_BSDAPP
-	return 0;
-#endif
 	/* With --huge-dir */
 	const char *argv7[] = {prgname, "-c", "1", "-n", "2", "-m", DEFAULT_MEM_SIZE,
 			"--file-prefix=hugedir", "--huge-dir", hugepath};
@@ -889,6 +886,7 @@ test_misc_flags(void)
 	const char *argv15[] = {prgname, "--file-prefix=intr",
 			"-c", "1", "-n", "2", "--vfio-intr=invalid"};
 
+	/* run all tests also applicable to FreeBSD first */
 
 	if (launch_proc(argv0) == 0) {
 		printf("Error - process ran ok with invalid flag\n");
@@ -902,6 +900,16 @@ test_misc_flags(void)
 		printf("Error - process did not run ok with -v flag\n");
 		return -1;
 	}
+	if (launch_proc(argv6) != 0) {
+		printf("Error - process did not run ok with --no-shconf flag\n");
+		return -1;
+	}
+
+#ifdef RTE_EXEC_ENV_BSDAPP
+	/* no more tests to be done on FreeBSD */
+	return 0;
+#endif
+
 	if (launch_proc(argv3) != 0) {
 		printf("Error - process did not run ok with --syslog flag\n");
 		return -1;
@@ -914,13 +922,6 @@ test_misc_flags(void)
 		printf("Error - process run ok with invalid --syslog flag\n");
 		return -1;
 	}
-	if (launch_proc(argv6) != 0) {
-		printf("Error - process did not run ok with --no-shconf flag\n");
-		return -1;
-	}
-#ifdef RTE_EXEC_ENV_BSDAPP
-	return 0;
-#endif
 	if (launch_proc(argv7) != 0) {
 		printf("Error - process did not run ok with --huge-dir flag\n");
 		return -1;
-- 
2.17.1

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

* [dpdk-stable] patch 'test/flow_classify: fix return types' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (170 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'test: fix EAL flags autotest on FreeBSD' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'test/hash: fix multiwriter with non consecutive cores' " Christian Ehrhardt
                   ` (3 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Reshma Pattan; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 8a2d2beecaabe9e6f3ebe0933e5f5bb592120621 Mon Sep 17 00:00:00 2001
From: Reshma Pattan <reshma.pattan@intel.com>
Date: Tue, 17 Jul 2018 17:44:45 +0100
Subject: [PATCH] test/flow_classify: fix return types

[ upstream commit 4f872116c59a1342dd7ab7165adf05a624480b70 ]

UTs should return either TEST_SUCCESS or TEST_FAILED only.
They should not return 0, -1 and any other value.

Fixes: 9c9befea4f ("test: add flow classify unit tests")

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 test/test/test_flow_classify.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/test/test/test_flow_classify.c b/test/test/test_flow_classify.c
index fc83b69ae..5f5beeee7 100644
--- a/test/test/test_flow_classify.c
+++ b/test/test/test_flow_classify.c
@@ -871,32 +871,32 @@ test_flow_classify(void)
 		printf("Line %i: f_create has failed!\n", __LINE__);
 		rte_flow_classifier_free(cls->cls);
 		rte_free(cls);
-		return -1;
+		return TEST_FAILED;
 	}
 	printf("Created table_acl for for IPv4 five tuple packets\n");
 
 	ret = init_mbufpool();
 	if (ret) {
 		printf("Line %i: init_mbufpool has failed!\n", __LINE__);
-		return -1;
+		return TEST_FAILED;
 	}
 
 	if (test_invalid_parameters() < 0)
-		return -1;
+		return TEST_FAILED;
 	if (test_valid_parameters() < 0)
-		return -1;
+		return TEST_FAILED;
 	if (test_invalid_patterns() < 0)
-		return -1;
+		return TEST_FAILED;
 	if (test_invalid_actions() < 0)
-		return -1;
+		return TEST_FAILED;
 	if (test_query_udp() < 0)
-		return -1;
+		return TEST_FAILED;
 	if (test_query_tcp() < 0)
-		return -1;
+		return TEST_FAILED;
 	if (test_query_sctp() < 0)
-		return -1;
+		return TEST_FAILED;
 
-	return 0;
+	return TEST_SUCCESS;
 }
 
 REGISTER_TEST_COMMAND(flow_classify_autotest, test_flow_classify);
-- 
2.17.1

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

* [dpdk-stable] patch 'test/hash: fix multiwriter with non consecutive cores' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (171 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'test/flow_classify: fix return types' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'test/hash: fix potential memory leak' " Christian Ehrhardt
                   ` (2 subsequent siblings)
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 43a27800c2f0dca23221801810b382208fe6ad5d Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Tue, 17 Jul 2018 14:31:50 +0100
Subject: [PATCH] test/hash: fix multiwriter with non consecutive cores

[ upstream commit 0c992822901464d440534d337838fd08acf233d4 ]

When non consecutive cores are passed into the test application,
the distribution of the keys that each thread needs to insert
is not correct, since it assumes that there are no cores skipped
between the master core and the worker core.

Fixes: be856325cba3 ("hash: add scalable multi-writer insertion with Intel TSX")

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

diff --git a/test/test/test_hash_multiwriter.c b/test/test/test_hash_multiwriter.c
index ef5fce3d2..b9144a0da 100644
--- a/test/test/test_hash_multiwriter.c
+++ b/test/test/test_hash_multiwriter.c
@@ -48,18 +48,29 @@ static rte_atomic64_t ginsertions;
 static int use_htm;
 
 static int
-test_hash_multiwriter_worker(__attribute__((unused)) void *arg)
+test_hash_multiwriter_worker(void *arg)
 {
 	uint64_t i, offset;
+	uint16_t pos_core;
 	uint32_t lcore_id = rte_lcore_id();
 	uint64_t begin, cycles;
+	uint16_t *enabled_core_ids = (uint16_t *)arg;
 
-	offset = (lcore_id - rte_get_master_lcore())
-		* tbl_multiwriter_test_params.nb_tsx_insertion;
+	for (pos_core = 0; pos_core < rte_lcore_count(); pos_core++) {
+		if (enabled_core_ids[pos_core] == lcore_id)
+			break;
+	}
+
+	/*
+	 * Calculate offset for entries based on the position of the
+	 * logical core, from the master core (not counting not enabled cores)
+	 */
+	offset = pos_core * tbl_multiwriter_test_params.nb_tsx_insertion;
 
 	printf("Core #%d inserting %d: %'"PRId64" - %'"PRId64"\n",
 	       lcore_id, tbl_multiwriter_test_params.nb_tsx_insertion,
-	       offset, offset + tbl_multiwriter_test_params.nb_tsx_insertion);
+	       offset,
+	       offset + tbl_multiwriter_test_params.nb_tsx_insertion - 1);
 
 	begin = rte_rdtsc_precise();
 
@@ -88,6 +99,8 @@ test_hash_multiwriter(void)
 {
 	unsigned int i, rounded_nb_total_tsx_insertion;
 	static unsigned calledCount = 1;
+	uint16_t enabled_core_ids[RTE_MAX_LCORE];
+	uint16_t core_id;
 
 	uint32_t *keys;
 	uint32_t *found;
@@ -158,9 +171,27 @@ test_hash_multiwriter(void)
 	rte_atomic64_init(&ginsertions);
 	rte_atomic64_clear(&ginsertions);
 
+	/* Get list of enabled cores */
+	i = 0;
+	for (core_id = 0; core_id < RTE_MAX_LCORE; core_id++) {
+		if (i == rte_lcore_count())
+			break;
+
+		if (rte_lcore_is_enabled(core_id)) {
+			enabled_core_ids[i] = core_id;
+			i++;
+		}
+	}
+
+	if (i != rte_lcore_count()) {
+		printf("Number of enabled cores in list is different from "
+				"number given by rte_lcore_count()\n");
+		goto err3;
+	}
+
 	/* Fire all threads. */
 	rte_eal_mp_remote_launch(test_hash_multiwriter_worker,
-				 NULL, CALL_MASTER);
+				 enabled_core_ids, CALL_MASTER);
 	rte_eal_mp_wait_lcore();
 
 	while (rte_hash_iterate(handle, &next_key, &next_data, &iter) >= 0) {
-- 
2.17.1

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

* [dpdk-stable] patch 'test/hash: fix potential memory leak' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (172 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'test/hash: fix multiwriter with non consecutive cores' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'doc: fix bonding command in testpmd' " Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'doc: fix typo in vdev_netvsc guide' " Christian Ehrhardt
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 1cd582bc78629d4956fc68f5165ab6548275c45b Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Tue, 17 Jul 2018 14:31:51 +0100
Subject: [PATCH] test/hash: fix potential memory leak

[ upstream commit a4492ab49ec3b829745c9060a1719354e0a572b7 ]

In the multiwriter test, if "found" array allocation failed,
the memory of "keys" array, which was successfully allocated
could not be freed, since by this time, tbl_multiwriter_test_params.keys
was not set to this array, which is the pointer freed when finishing
the test or when a failure happens.

To solve this, tbl_multiwriter_test_params.keys is set to the "keys"
address, just after allocating and filling the array.

Fixes: be856325cba3 ("hash: add scalable multi-writer insertion with Intel TSX")

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

diff --git a/test/test/test_hash_multiwriter.c b/test/test/test_hash_multiwriter.c
index b9144a0da..a8ff811a5 100644
--- a/test/test/test_hash_multiwriter.c
+++ b/test/test/test_hash_multiwriter.c
@@ -153,16 +153,17 @@ test_hash_multiwriter(void)
 		goto err1;
 	}
 
+	for (i = 0; i < nb_entries; i++)
+		keys[i] = i;
+
+	tbl_multiwriter_test_params.keys = keys;
+
 	found = rte_zmalloc(NULL, sizeof(uint32_t) * nb_entries, 0);
 	if (found == NULL) {
 		printf("RTE_ZMALLOC failed\n");
 		goto err2;
 	}
 
-	for (i = 0; i < nb_entries; i++)
-		keys[i] = i;
-
-	tbl_multiwriter_test_params.keys = keys;
 	tbl_multiwriter_test_params.found = found;
 
 	rte_atomic64_init(&gcycles);
-- 
2.17.1

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

* [dpdk-stable] patch 'doc: fix bonding command in testpmd' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (173 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'test/hash: fix potential memory leak' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  2018-07-30 16:13 ` [dpdk-stable] patch 'doc: fix typo in vdev_netvsc guide' " Christian Ehrhardt
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Shreyansh Jain; +Cc: Ferruh Yigit, Bernard Iremonger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From 7b458e902d8b343c94765ac73b97f4b5640d2381 Mon Sep 17 00:00:00 2001
From: Shreyansh Jain <shreyansh.jain@nxp.com>
Date: Wed, 25 Jul 2018 17:01:32 +0530
Subject: [PATCH] doc: fix bonding command in testpmd

[ upstream commit 0c00abfd85448449d73acc09cc6fe445dba37b50 ]

Fixes: ac718398f477 ("doc: testpmd application user guide")

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 91e074592..861735952 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -1986,7 +1986,7 @@ Create a new bonding device::
 
 For example, to create a bonded device in mode 1 on socket 0::
 
-   testpmd> create bonded 1 0
+   testpmd> create bonded device 1 0
    created new bonded device (port X)
 
 add bonding slave
-- 
2.17.1

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

* [dpdk-stable] patch 'doc: fix typo in vdev_netvsc guide' has been queued to stable release 18.05.1
  2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
                   ` (174 preceding siblings ...)
  2018-07-30 16:13 ` [dpdk-stable] patch 'doc: fix bonding command in testpmd' " Christian Ehrhardt
@ 2018-07-30 16:13 ` Christian Ehrhardt
  175 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-07-30 16:13 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.05.1

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
>From b3db9260549876573ff7d8d364b5549f2d25579c Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <sthemmin@microsoft.com>
Date: Wed, 25 Jul 2018 10:51:46 -0700
Subject: [PATCH] doc: fix typo in vdev_netvsc guide

[ upstream commit 2be90f79159ee16a0e95cbda9befbcdf94ad060b ]

Fixes: 56252de779a6 ("net/vdev_netvsc: add automatic probing")

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
---
 doc/guides/nics/vdev_netvsc.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/nics/vdev_netvsc.rst b/doc/guides/nics/vdev_netvsc.rst
index e02ae9acb..d1da07118 100644
--- a/doc/guides/nics/vdev_netvsc.rst
+++ b/doc/guides/nics/vdev_netvsc.rst
@@ -93,7 +93,7 @@ The following device parameters are supported:
 
 - ``ignore`` [int]
 
-  If nonzero, ignores the driver runnig (actually used to disable the
+  If nonzero, ignores the driver running (actually used to disable the
   auto-detection in Hyper-V VM).
 
 .. note::
-- 
2.17.1

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

* Re: [dpdk-stable] patch 'cryptodev: fix ABI breakage' has been queued to stable release 18.05.1
  2018-07-30 16:11 ` [dpdk-stable] patch 'cryptodev: fix ABI breakage' " Christian Ehrhardt
@ 2018-07-31  4:57   ` Gujjar, Abhinandan S
  0 siblings, 0 replies; 180+ messages in thread
From: Gujjar, Abhinandan S @ 2018-07-31  4:57 UTC (permalink / raw)
  To: Christian Ehrhardt, De Lara Guarch, Pablo
  Cc: Ananyev, Konstantin, dpdk stable

Hi Christian,

It looks good to me. 

Thanks
Abhinandan

> -----Original Message-----
> From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
> Sent: Monday, July 30, 2018 9:41 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Gujjar, Abhinandan S
> <abhinandan.gujjar@intel.com>; dpdk stable <stable@dpdk.org>
> Subject: patch 'cryptodev: fix ABI breakage' has been queued to stable release
> 18.05.1
> 
> Hi,
> 
> FYI, your patch has been queued to stable release 18.05.1
> 
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 08/01/18. So please shout if
> anyone has objections.
> 
> Thanks.
> 
> Christian Ehrhardt <christian.ehrhardt@canonical.com>
> 
> ---
> From 58a40173c60e142288bb3ab2447b29254cc2a733 Mon Sep 17 00:00:00
> 2001
> From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> Date: Wed, 13 Jun 2018 10:36:48 +0100
> Subject: [PATCH] cryptodev: fix ABI breakage
> 
> [ upstream commit ce5e6bf69eb32d5ea1d95e2a623f8f9d284a806d ]
> 
> In 17.08, the crypto operation was restructured, and some reserved bytes (5)
> were added  to have the mempool pointer aligned to 64 bits, since the structure
> is expected to be aligned to 64 bits, allowing future additions with no ABI
> breakage needed.
> 
> In 18.05, a new 2-byte field was added, so the reserved bytes were reduced to 3.
> However, this field was added after the first 3 bytes of the structure, causing it
> to be placed in an offset of 4 bytes, and therefore, forcing the mempool pointer
> to be placed after 16 bytes, instead of a 8 bytes, causing unintentionally the ABI
> breakage.
> 
> This commit fixes the breakage, by swapping the reserved bytes and the
> private_data_offset field, so the latter is aligned to 2 bytes and the offset of the
> mempool pointer returns to its original offset,
> 8 bytes.
> 
> Fixes: 54c836846603 ("cryptodev: set private data for session-less mode")
> 
> Reported-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
> ---
>  lib/librte_cryptodev/rte_crypto.h | 51 +++++++++++++++++++------------
>  1 file changed, 31 insertions(+), 20 deletions(-)
> 
> diff --git a/lib/librte_cryptodev/rte_crypto.h b/lib/librte_cryptodev/rte_crypto.h
> index 25404264b..a16be656d 100644
> --- a/lib/librte_cryptodev/rte_crypto.h
> +++ b/lib/librte_cryptodev/rte_crypto.h
> @@ -73,26 +73,37 @@ enum rte_crypto_op_sess_type {
>   * rte_cryptodev_enqueue_burst() / rte_cryptodev_dequeue_burst() .
>   */
>  struct rte_crypto_op {
> -	uint8_t type;
> -	/**< operation type */
> -	uint8_t status;
> -	/**<
> -	 * operation status - this is reset to
> -	 * RTE_CRYPTO_OP_STATUS_NOT_PROCESSED on allocation from
> mempool and
> -	 * will be set to RTE_CRYPTO_OP_STATUS_SUCCESS after crypto
> operation
> -	 * is successfully processed by a crypto PMD
> -	 */
> -	uint8_t sess_type;
> -	/**< operation session type */
> -	uint16_t private_data_offset;
> -	/**< Offset to indicate start of private data (if any). The offset
> -	 * is counted from the start of the rte_crypto_op including IV.
> -	 * The private data may be used by the application to store
> -	 * information which should remain untouched in the library/driver
> -	 */
> -
> -	uint8_t reserved[3];
> -	/**< Reserved bytes to fill 64 bits for future additions */
> +	__extension__
> +	union {
> +		uint64_t raw;
> +		__extension__
> +		struct {
> +			uint8_t type;
> +			/**< operation type */
> +			uint8_t status;
> +			/**<
> +			 * operation status - this is reset to
> +			 * RTE_CRYPTO_OP_STATUS_NOT_PROCESSED on
> allocation
> +			 * from mempool and will be set to
> +			 * RTE_CRYPTO_OP_STATUS_SUCCESS after crypto
> operation
> +			 * is successfully processed by a crypto PMD
> +			 */
> +			uint8_t sess_type;
> +			/**< operation session type */
> +			uint8_t reserved[3];
> +			/**< Reserved bytes to fill 64 bits for
> +			 * future additions
> +			 */
> +			uint16_t private_data_offset;
> +			/**< Offset to indicate start of private data (if any).
> +			 * The offset is counted from the start of the
> +			 * rte_crypto_op including IV.
> +			 * The private data may be used by the application
> +			 * to store information which should remain untouched
> +			 * in the library/driver
> +			 */
> +		};
> +	};
>  	struct rte_mempool *mempool;
>  	/**< crypto operation mempool which operation is allocated from */
> 
> --
> 2.17.1

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

* Re: [dpdk-stable] patch 'net/mlx5: fix invalid network interface index' has been queued to stable release 18.05.1
  2018-07-30 16:13 ` [dpdk-stable] patch 'net/mlx5: fix invalid network interface index' " Christian Ehrhardt
@ 2018-08-01 20:49   ` Yongseok Koh
  2018-08-03  7:14     ` Christian Ehrhardt
  0 siblings, 1 reply; 180+ messages in thread
From: Yongseok Koh @ 2018-08-01 20:49 UTC (permalink / raw)
  To: Christian Ehrhardt; +Cc: Adrien Mazarguil, Nélio Laranjeiro, dpdk stable


> On Jul 30, 2018, at 9:13 AM, Christian Ehrhardt <christian.ehrhardt@canonical.com> wrote:
> 
> Hi,
> 
> FYI, your patch has been queued to stable release 18.05.1
> 
> Note it hasn't been pushed to https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdpdk.org%2Fbrowse%2Fdpdk-stable&amp;data=02%7C01%7Cyskoh%40mellanox.com%7C672bbc6bc5d74492636508d5f6387a4e%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636685644792733413&amp;sdata=jqe2g7yUGj6J6lLNo0k0G4s2SUY1vf2ji98YCc0y9wM%3D&amp;reserved=0 yet.
> It will be pushed if I get no objections before 08/01/18. So please
> shout if anyone has objections.
> 
> Thanks.
> 
> Christian Ehrhardt <christian.ehrhardt@canonical.com>
> 
> ---
> From 2049afe07c264d2e4e3754588a264dd17cadaf4f Mon Sep 17 00:00:00 2001
> From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> Date: Wed, 25 Jul 2018 13:24:33 +0200
> Subject: [PATCH] net/mlx5: fix invalid network interface index
> 
> [ upstream commit 3f8cb05df5407369025fbc8b67f0f9595b781f73 ]
> 
> Network interface indices being unsigned, an invalid index or error is
> normally expressed through a zero value (see if_nametoindex()).
> 
> mlx5_ifindex() has a signed return type for negative values in case of
> error. Since mlx5_nl.c does not check for errors, these may be fed back as
> invalid interfaces indices to subsequent system calls. This usage would
> have been correct if mlx5_ifindex() returned a zero value instead.
> 
> This patch makes mlx5_ifindex() unsigned for convenience.
> 
> Fixes: ccdcba53a3f4 ("net/mlx5: use Netlink to add/remove MAC addresses")
> 
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> Acked-by: Yongseok Koh <yskoh@mellanox.com>
> ---
> drivers/net/mlx5/mlx5.h        |  1 +
> drivers/net/mlx5/mlx5_ethdev.c | 20 ++++++++------------
> drivers/net/mlx5/mlx5_nl.c     |  6 +++---
> 3 files changed, 12 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
> index 997b04a33..8f1335200 100644
> --- a/drivers/net/mlx5/mlx5.h
> +++ b/drivers/net/mlx5/mlx5.h
> @@ -211,6 +211,7 @@ int mlx5_getenv_int(const char *);
> 
> int mlx5_get_ifname(const struct rte_eth_dev *dev, char (*ifname)[IF_NAMESIZE]);
> int mlx5_ifindex(const struct rte_eth_dev *dev);
> +unsigned int mlx5_ifindex(const struct rte_eth_dev *dev);

Hi Christian

This line is to replace the upper line. In the original patch:

-int mlx5_ifindex(const struct rte_eth_dev *dev);
+unsigned int mlx5_ifindex(const struct rte_eth_dev *dev);

Please fix it.


Thanks,
Yongseok

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

* Re: [dpdk-stable] patch 'net/mlx5: fix invalid network interface index' has been queued to stable release 18.05.1
  2018-08-01 20:49   ` Yongseok Koh
@ 2018-08-03  7:14     ` Christian Ehrhardt
  0 siblings, 0 replies; 180+ messages in thread
From: Christian Ehrhardt @ 2018-08-03  7:14 UTC (permalink / raw)
  To: yskoh; +Cc: adrien.mazarguil, nelio.laranjeiro, stable

Thanks for the feedback Yongseok!

I added a fixup patch to the 18.05 stable branch for it.

On Wed, Aug 1, 2018 at 10:49 PM Yongseok Koh <yskoh@mellanox.com> wrote:

>
> > On Jul 30, 2018, at 9:13 AM, Christian Ehrhardt <
> christian.ehrhardt@canonical.com> wrote:
> >
> > Hi,
> >
> > FYI, your patch has been queued to stable release 18.05.1
> >
> > Note it hasn't been pushed to
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdpdk.org%2Fbrowse%2Fdpdk-stable&amp;data=02%7C01%7Cyskoh%40mellanox.com%7C672bbc6bc5d74492636508d5f6387a4e%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636685644792733413&amp;sdata=jqe2g7yUGj6J6lLNo0k0G4s2SUY1vf2ji98YCc0y9wM%3D&amp;reserved=0
> yet.
> > It will be pushed if I get no objections before 08/01/18. So please
> > shout if anyone has objections.
> >
> > Thanks.
> >
> > Christian Ehrhardt <christian.ehrhardt@canonical.com>
> >
> > ---
> > From 2049afe07c264d2e4e3754588a264dd17cadaf4f Mon Sep 17 00:00:00 2001
> > From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> > Date: Wed, 25 Jul 2018 13:24:33 +0200
> > Subject: [PATCH] net/mlx5: fix invalid network interface index
> >
> > [ upstream commit 3f8cb05df5407369025fbc8b67f0f9595b781f73 ]
> >
> > Network interface indices being unsigned, an invalid index or error is
> > normally expressed through a zero value (see if_nametoindex()).
> >
> > mlx5_ifindex() has a signed return type for negative values in case of
> > error. Since mlx5_nl.c does not check for errors, these may be fed back
> as
> > invalid interfaces indices to subsequent system calls. This usage would
> > have been correct if mlx5_ifindex() returned a zero value instead.
> >
> > This patch makes mlx5_ifindex() unsigned for convenience.
> >
> > Fixes: ccdcba53a3f4 ("net/mlx5: use Netlink to add/remove MAC addresses")
> >
> > Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> > Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> > Acked-by: Yongseok Koh <yskoh@mellanox.com>
> > ---
> > drivers/net/mlx5/mlx5.h        |  1 +
> > drivers/net/mlx5/mlx5_ethdev.c | 20 ++++++++------------
> > drivers/net/mlx5/mlx5_nl.c     |  6 +++---
> > 3 files changed, 12 insertions(+), 15 deletions(-)
> >
> > diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
> > index 997b04a33..8f1335200 100644
> > --- a/drivers/net/mlx5/mlx5.h
> > +++ b/drivers/net/mlx5/mlx5.h
> > @@ -211,6 +211,7 @@ int mlx5_getenv_int(const char *);
> >
> > int mlx5_get_ifname(const struct rte_eth_dev *dev, char
> (*ifname)[IF_NAMESIZE]);
> > int mlx5_ifindex(const struct rte_eth_dev *dev);
> > +unsigned int mlx5_ifindex(const struct rte_eth_dev *dev);
>
> Hi Christian
>
> This line is to replace the upper line. In the original patch:
>
> -int mlx5_ifindex(const struct rte_eth_dev *dev);
> +unsigned int mlx5_ifindex(const struct rte_eth_dev *dev);
>
> Please fix it.
>
>
> Thanks,
> Yongseok
>
>

-- 
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd

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

end of thread, other threads:[~2018-08-03  7:15 UTC | newest]

Thread overview: 180+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-30 16:10 [dpdk-stable] patch 'net/qede: fix VF MTU update' has been queued to stable release 18.05.1 Christian Ehrhardt
2018-07-30 16:10 ` [dpdk-stable] patch 'net/qede: fix for devargs' " Christian Ehrhardt
2018-07-30 16:10 ` [dpdk-stable] patch 'net/cxgbe: report configured link auto-negotiation' " Christian Ehrhardt
2018-07-30 16:10 ` [dpdk-stable] patch 'net/mvpp2: check pointer before using it' " Christian Ehrhardt
2018-07-30 16:10 ` [dpdk-stable] patch 'net/qede: fix L2-handles used for RSS hash update' " Christian Ehrhardt
2018-07-30 16:10 ` [dpdk-stable] patch 'net/qede: fix memory alloc for multiple port reconfig' " Christian Ehrhardt
2018-07-30 16:10 ` [dpdk-stable] patch 'net/qede: fix incorrect link status update' " Christian Ehrhardt
2018-07-30 16:10 ` [dpdk-stable] patch 'net/qede: fix link change event notification' " Christian Ehrhardt
2018-07-30 16:10 ` [dpdk-stable] patch 'net/bnxt: add missing ids in xstats' " Christian Ehrhardt
2018-07-30 16:10 ` [dpdk-stable] patch 'net/ena: check pointer before memset' " Christian Ehrhardt
2018-07-30 16:10 ` [dpdk-stable] patch 'net/ena: change memory type' " Christian Ehrhardt
2018-07-30 16:10 ` [dpdk-stable] patch 'net/ena: fix GENMASK_ULL macro' " Christian Ehrhardt
2018-07-30 16:10 ` [dpdk-stable] patch 'net/ena: set link speed as none' " Christian Ehrhardt
2018-07-30 16:10 ` [dpdk-stable] patch 'net/nfp: fix unused header reference' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/nfp: fix field initialization in Tx descriptor' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'app/testpmd: fix crash when attaching a device' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/bonding: always update bonding link status' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/bonding: fix MAC address reset' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx4: fix minor resource leak during init' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix errno object in probe function' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix missing errno " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix error message " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix crash in device probe' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix log initialization' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'eventdev: fix port in Rx adapter internal function' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'doc: fix octeontx eventdev selftest argument' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'eventdev: fix missing update to Rx adaper WRR position' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'eventdev: add event buffer flush in Rx adapter' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'eventdev: fix internal port logic " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'eventdev: fix Rx SW adapter stop' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'bus/dpaa: fix build' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'kni: fix build with gcc 8.1' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net: rename u16 to fix shadowed declaration' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'cryptodev: fix ABI breakage' " Christian Ehrhardt
2018-07-31  4:57   ` Gujjar, Abhinandan S
2018-07-30 16:11 ` [dpdk-stable] patch 'ipc: fix locking while sending messages' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: clean-up developer logs' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix error number handling' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/ixgbe: fix crash on detach' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/ixgbe: add support for VLAN in IP mode FDIR' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/ixgbe: fix tunnel id format error for " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/ixgbe: fix tunnel type set " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/ixgbe: fix mask bits register " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/i40e: fix shifts of 32-bit value' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'app/testpmd: fix VLAN TCI mask set error for FDIR' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/i40e: workaround performance degradation' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/i40e: do not reset device info data' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'vhost: fix missing increment of log cache count' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: separate generic tunnel TSO from the standard one' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/pcap: fix multiple queues' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/thunderx: fix build with gcc optimization on' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/qede: fix unicast MAC address handling in VF' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/qede: fix legacy interrupt mode' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/qede: remove primary MAC removal' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/ena: fix SIGFPE with 0 Rx queue' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'app/testpmd: fix missing count action fields' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix Rx buffer replenishment threshold' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/mlx5: fix invalid error check' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'doc: update qede management firmware guide' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/qede: fix default extended VLAN offload config' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/qede: fix Rx/Tx offload flags' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix clear port stats' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix close operation' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix HW Tx checksum offload check' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: check for invalid vNIC id' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix Tx with multiple mbuf' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: revert reset of L2 filter id' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: check filter type before clearing it' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix set MTU' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix incorrect IO address handling in Tx' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix to move a flow to a different queue' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: fix Rx ring count limitation' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/bnxt: use correct flags during VLAN configuration' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/enic: fix receive packet types' " Christian Ehrhardt
2018-07-30 16:11 ` [dpdk-stable] patch 'net/enic: update the UDP RSS detection mechanism' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'net/enic: do not overwrite admin Tx queue limit' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'net/enic: initialize RQ fetch index before enabling RQ' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'net/sfc: cut non VLAN ID bits from TCI' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'net/sfc: discard packets with bad CRC on EF10 ESSB Rx' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'net/sfc: fix double-free in EF10 ESSB Rx queue purge' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'net/fm10k: remove unused constant' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'net/cxgbe: fix Rx channel map and queue type' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'net/cxgbevf: add missing Tx byte counters' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'net/bonding: do not clear active slave count' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'doc: fix limitations for dpaa crypto' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'doc: fix limitations for dpaa2 " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'crypto/virtio: fix IV physical address' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'security: fix crash on destroy null session' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'test/crypto: fix device id when stopping port' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'maintainers: update for Mellanox PMDs' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'mk: fix cross build' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'devtools: fix ninja command in build test' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'build: fix for host clang and cross gcc' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'event/octeontx: fix flush callback' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'bus/dpaa: fix phandle support for Linux 4.16' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'bus/dpaa: fix SVR id fetch location' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'bus/dpaa: fix buffer offset setting in FMAN' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'net/dpaa: fix queue error handling and logs' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'net/dpaa2: fix prefetch Rx to honor number of packets' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'raw/dpaa2_qdma: fix IOVA as VA flag' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'mempool/octeontx: fix pool to aura mapping' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'hash: fix multiwriter lock memory allocation' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'hash: fix a multi-writer race condition' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'hash: fix key slot size accuracy' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'mem: do not leave unmapped holes in EAL memory area' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'mem: do not unmap overlapping region on mmap failure' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'mem: avoid crash on memseg query with invalid address' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'mem: fix alignment of requested virtual areas' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'mem: fix alignment requested with --base-virtaddr' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'mem: do not use --base-virtaddr in secondary processes' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'eal: fix return codes on thread naming failure' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'eal: fix return codes on control thread " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'eal/bsd: fix memory segment index display' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'malloc: fix pad erasing' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'eal/linux: fix invalid syntax in interrupts' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'eal/linux: fix uninitialized value' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'vfio: fix uninitialized variable' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'net/mlx5: fix build with rdma-core v19' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'ethdev: check queue stats mapping input arguments' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'app/testpmd: fix typo in setting Tx offload command' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'malloc: do not skip pad on free' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'eal: fix hotplug add and remove' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'vfio: fix PCI address comparison' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'vfio: remove uneccessary IPC for group fd clear' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix IPv4 checksum at Tx' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'compress/isal: fix offset usage' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'compress/isal: fix log type name' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'compress/isal: set null pointer after freeing' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'compress/isal: fix memory leak' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix digest with AEAD algo' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'examples/l2fwd-crypto: check return value on IV size check' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'examples/l2fwd-crypto: skip device not supporting operation' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix bypass rule processing' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'eal: fix error message for unsupported platforms' " Christian Ehrhardt
2018-07-30 16:12 ` [dpdk-stable] patch 'devtools: remove already enabled nfp from build test' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'net/i40e: fix PPPoL2TP packet type parsing' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'net/i40e: fix packet type parsing with DDP' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'net/i40e: fix setting TPID with AQ command' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'net/i40e: fix Tx queue setup after stop' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'net/i40e: fix link speed' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'net/i40e: fix check of flow director programming status' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'ethdev: fix queue statistics mapping documentation' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'net/cxgbe: fix init failure due to new flash parts' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'net/thunderx: avoid sq door bell write on zero packet' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'app/testpmd: fix little performance drop' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'net/sfc: fix filter exceptions logic' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'net/sfc: move Rx checksum offload check to device level' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'net/sfc: fix Rx queue offloads reporting in queue info' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'net/sfc: fix assert in set multicast address list' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'net/sfc: handle unknown L3 packet class in EF10 event parser' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'net/ixgbe: fix missing null check on detach' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'net/bonding: fix invalid port id' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'net/mlx5: fix TCI mask filter' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'net/mlx5: fix assert for Tx completion queue count' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'net/mlx5: fix queue rollback when starting device' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'net/mlx5: fix invalid network interface index' " Christian Ehrhardt
2018-08-01 20:49   ` Yongseok Koh
2018-08-03  7:14     ` Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'net/mlx5: fix linkage of glue lib with gcc 4.7.2' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'vhost: release locks on RARP packet failure' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'drivers/net: fix crash in secondary process' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'ring: fix declaration after statement' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'ring: fix sign conversion warning' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'app/eventdev: fix order test service init' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'event/octeontx: remove unnecessary port start and stop' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'app/testpmd: fix buffer leak in TM command' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'app/testpmd: fix crash on TM command error' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'app/testpmd: fix help for TM commit command' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'examples/exception_path: fix out-of-bounds read' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'examples/l3fwd: remove useless include' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'bitrate: add sanity check on parameters' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'metrics: add check for invalid key' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'metrics: do not fail silently when uninitialised' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'metrics: disallow null as metric name' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'test: fix EAL flags autotest on FreeBSD' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'test/flow_classify: fix return types' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'test/hash: fix multiwriter with non consecutive cores' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'test/hash: fix potential memory leak' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'doc: fix bonding command in testpmd' " Christian Ehrhardt
2018-07-30 16:13 ` [dpdk-stable] patch 'doc: fix typo in vdev_netvsc guide' " Christian Ehrhardt

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).