patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4
@ 2020-07-24 11:57 luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/ice: fix switch action number check' " luca.boccassi
                   ` (191 more replies)
  0 siblings, 192 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 2819f713763a3796cfc05962770e3c813e459ecf Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Wed, 1 Jul 2020 14:53:05 +0100
Subject: [PATCH] vhost: remove zero-copy and client mode restriction

Commits [1] were backported as fixes from the latest DPDK release
to the stable branches. They are detecting if vhost-user client and
zero-copy are being used together. As this can be problematic in
some cases, this combination was being rejected by those patches.

It might be ok to deprecate this combination in latest DPDK,
but for stable releases we should not remove the functionality
as it may be in use with earlier releases from the same stable branch.

In fact, we know that this functionality is used at least in OVS in
multiple releases/active branches.

This patch removes the restriction of zero-copy and client mode
and adds a warning for the user.

[1]
commit a6ae060e3995
("vhost: prevent zero-copy with incompatible client mode")

commit 1c2eaf9a9852
("vhost: fix zero-copy server mode")

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 lib/librte_vhost/socket.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index 2461549fe..dc3ee1e99 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -926,12 +926,10 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
 			ret = -1;
 			goto out_mutex;
 		}
-		if ((flags & RTE_VHOST_USER_CLIENT) != 0) {
-			RTE_LOG(ERR, VHOST_CONFIG,
-			"error: zero copy is incompatible with vhost client mode\n");
-			ret = -1;
-			goto out_mutex;
-		}
+		if ((flags & RTE_VHOST_USER_CLIENT) != 0)
+			RTE_LOG(WARNING, VHOST_CONFIG,
+			"zero copy may be incompatible with vhost client mode\n");
+
 		vsocket->supported_features &= ~(1ULL << VIRTIO_F_IN_ORDER);
 		vsocket->features &= ~(1ULL << VIRTIO_F_IN_ORDER);
 
-- 
2.20.1


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

* [dpdk-stable] patch 'net/ice: fix switch action number check' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: clear promiscuous on PF uninit' " luca.boccassi
                   ` (190 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Qimai Xiao, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 47be9745de536a89775543f98112b600f9653d95 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Thu, 21 May 2020 15:34:11 +0800
Subject: [PATCH] net/ice: fix switch action number check

[ upstream commit 59d3870c7facace93db794a37e136d4a9f6ef0a3 ]

The action number for switch filter should be 1, any
other such as 0 or more than 1 is invalid.

Fixes: 3428c6b6ec1f ("net/ice: add action number check for switch")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Qimai Xiao <qimaix.xiao@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_switch_filter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 6c2473163..b00ac2abe 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -1028,7 +1028,7 @@ ice_switch_check_action(const struct rte_flow_action *actions,
 		}
 	}
 
-	if (actions_num > 1) {
+	if (actions_num != 1) {
 		rte_flow_error_set(error,
 				   EINVAL, RTE_FLOW_ERROR_TYPE_ACTION,
 				   actions,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:48.667982112 +0100
+++ 0002-net-ice-fix-switch-action-number-check.patch	2020-07-24 12:53:48.131003553 +0100
@@ -1,13 +1,14 @@
-From 59d3870c7facace93db794a37e136d4a9f6ef0a3 Mon Sep 17 00:00:00 2001
+From 47be9745de536a89775543f98112b600f9653d95 Mon Sep 17 00:00:00 2001
 From: Wei Zhao <wei.zhao1@intel.com>
 Date: Thu, 21 May 2020 15:34:11 +0800
 Subject: [PATCH] net/ice: fix switch action number check
 
+[ upstream commit 59d3870c7facace93db794a37e136d4a9f6ef0a3 ]
+
 The action number for switch filter should be 1, any
 other such as 0 or more than 1 is invalid.
 
 Fixes: 3428c6b6ec1f ("net/ice: add action number check for switch")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
 Tested-by: Qimai Xiao <qimaix.xiao@intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
-index dd3f4847a..20e8187d3 100644
+index 6c2473163..b00ac2abe 100644
 --- a/drivers/net/ice/ice_switch_filter.c
 +++ b/drivers/net/ice/ice_switch_filter.c
-@@ -1388,7 +1388,7 @@ ice_switch_check_action(const struct rte_flow_action *actions,
+@@ -1028,7 +1028,7 @@ ice_switch_check_action(const struct rte_flow_action *actions,
  		}
  	}
  

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

* [dpdk-stable] patch 'net/hns3: clear promiscuous on PF uninit' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/ice: fix switch action number check' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: fix Tx less than 60 bytes' " luca.boccassi
                   ` (189 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 3bf5b201399a507b0468326864be8b1e4870c88f Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Fri, 22 May 2020 17:21:15 +0800
Subject: [PATCH] net/hns3: clear promiscuous on PF uninit

[ upstream commit 3f28ec4a88abc319d63c652141d716720d93dc47 ]

Currently, promiscuous mode configuration are not cleared during
uninstallation based on hns3 PF device. The residual entries may cause
unnecessary bandwidth usage.

So, we need clear the PF's promisc mode status during the uninit.

Fixes: a45fd0aa0ea1 ("net/hns3: fix Rx queue search with broadcast packet")
Fixes: d51867db65c1 ("net/hns3: add initialization")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 53 +++++++++++++++++++++++++++-------
 1 file changed, 43 insertions(+), 10 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 3271b61fc..dbe747f9d 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -3733,7 +3733,7 @@ hns3_set_promisc_mode(struct hns3_hw *hw, bool en_uc_pmc, bool en_mc_pmc)
 }
 
 static int
-hns3_clear_all_vfs_promisc_mode(struct hns3_hw *hw)
+hns3_promisc_init(struct hns3_hw *hw)
 {
 	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
 	struct hns3_pf *pf = &hns->pf;
@@ -3741,17 +3741,55 @@ hns3_clear_all_vfs_promisc_mode(struct hns3_hw *hw)
 	uint16_t func_id;
 	int ret;
 
+	ret = hns3_set_promisc_mode(hw, false, false);
+	if (ret) {
+		PMD_INIT_LOG(ERR, "failed to set promisc mode, ret = %d", ret);
+		return ret;
+	}
+
+	/*
+	 * In current version VFs are not supported when PF is driven by DPDK
+	 * driver. After PF has been taken over by DPDK, the original VF will
+	 * be invalid. So, there is a possibility of entry residues. It should
+	 * clear VFs's promisc mode to avoid unnecessary bandwidth usage
+	 * during init.
+	 */
 	/* func_id 0 is denoted PF, the VFs start from 1 */
 	for (func_id = 1; func_id < pf->func_num; func_id++) {
 		hns3_promisc_param_init(&param, false, false, false, func_id);
 		ret = hns3_cmd_set_promisc_mode(hw, &param);
-		if (ret)
+		if (ret) {
+			PMD_INIT_LOG(ERR, "failed to clear vf:%d promisc mode,"
+					" ret = %d", func_id, ret);
 			return ret;
+		}
 	}
 
 	return 0;
 }
 
+static void
+hns3_promisc_uninit(struct hns3_hw *hw)
+{
+	struct hns3_promisc_param param;
+	uint16_t func_id;
+	int ret;
+
+	func_id = 0;
+
+	/*
+	 * In current version VFs are not supported when PF is driven by
+	 * DPDK driver, and VFs' promisc mode status has been cleared during
+	 * init and their status will not change. So just clear PF's promisc
+	 * mode status during uninit.
+	 */
+	hns3_promisc_param_init(&param, false, false, false, func_id);
+	ret = hns3_cmd_set_promisc_mode(hw, &param);
+	if (ret)
+		PMD_INIT_LOG(ERR, "failed to clear promisc status during"
+				" uninit, ret = %d", ret);
+}
+
 static int
 hns3_dev_promiscuous_enable(struct rte_eth_dev *dev)
 {
@@ -4092,15 +4130,9 @@ hns3_init_hardware(struct hns3_adapter *hns)
 		goto err_mac_init;
 	}
 
-	ret = hns3_set_promisc_mode(hw, false, false);
+	ret = hns3_promisc_init(hw);
 	if (ret) {
-		PMD_INIT_LOG(ERR, "Failed to set promisc mode: %d", ret);
-		goto err_mac_init;
-	}
-
-	ret = hns3_clear_all_vfs_promisc_mode(hw);
-	if (ret) {
-		PMD_INIT_LOG(ERR, "Failed to clear all vfs promisc mode: %d",
+		PMD_INIT_LOG(ERR, "Failed to init promisc: %d",
 			     ret);
 		goto err_mac_init;
 	}
@@ -4259,6 +4291,7 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev)
 
 	hns3_enable_hw_error_intr(hns, false);
 	hns3_rss_uninit(hns);
+	hns3_promisc_uninit(hw);
 	hns3_fdir_filter_uninit(hns);
 	hns3_uninit_umv_space(hw);
 	hns3_pf_disable_irq0(hw);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:48.705432454 +0100
+++ 0003-net-hns3-clear-promiscuous-on-PF-uninit.patch	2020-07-24 12:53:48.143003777 +0100
@@ -1,8 +1,10 @@
-From 3f28ec4a88abc319d63c652141d716720d93dc47 Mon Sep 17 00:00:00 2001
+From 3bf5b201399a507b0468326864be8b1e4870c88f Mon Sep 17 00:00:00 2001
 From: Chengchang Tang <tangchengchang@huawei.com>
 Date: Fri, 22 May 2020 17:21:15 +0800
 Subject: [PATCH] net/hns3: clear promiscuous on PF uninit
 
+[ upstream commit 3f28ec4a88abc319d63c652141d716720d93dc47 ]
+
 Currently, promiscuous mode configuration are not cleared during
 uninstallation based on hns3 PF device. The residual entries may cause
 unnecessary bandwidth usage.
@@ -11,7 +13,6 @@
 
 Fixes: a45fd0aa0ea1 ("net/hns3: fix Rx queue search with broadcast packet")
 Fixes: d51867db65c1 ("net/hns3: add initialization")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -20,10 +21,10 @@
  1 file changed, 43 insertions(+), 10 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index 06c488659..1c06b8ff1 100644
+index 3271b61fc..dbe747f9d 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -3826,7 +3826,7 @@ hns3_set_promisc_mode(struct hns3_hw *hw, bool en_uc_pmc, bool en_mc_pmc)
+@@ -3733,7 +3733,7 @@ hns3_set_promisc_mode(struct hns3_hw *hw, bool en_uc_pmc, bool en_mc_pmc)
  }
  
  static int
@@ -32,7 +33,7 @@
  {
  	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
  	struct hns3_pf *pf = &hns->pf;
-@@ -3834,16 +3834,54 @@ hns3_clear_all_vfs_promisc_mode(struct hns3_hw *hw)
+@@ -3741,17 +3741,55 @@ hns3_clear_all_vfs_promisc_mode(struct hns3_hw *hw)
  	uint16_t func_id;
  	int ret;
  
@@ -49,7 +50,8 @@
 +	 * clear VFs's promisc mode to avoid unnecessary bandwidth usage
 +	 * during init.
 +	 */
- 	for (func_id = HNS3_1ST_VF_FUNC_ID; func_id < pf->func_num; func_id++) {
+ 	/* func_id 0 is denoted PF, the VFs start from 1 */
+ 	for (func_id = 1; func_id < pf->func_num; func_id++) {
  		hns3_promisc_param_init(&param, false, false, false, func_id);
  		ret = hns3_cmd_set_promisc_mode(hw, &param);
 -		if (ret)
@@ -70,7 +72,7 @@
 +	uint16_t func_id;
 +	int ret;
 +
-+	func_id = HNS3_PF_FUNC_ID;
++	func_id = 0;
 +
 +	/*
 +	 * In current version VFs are not supported when PF is driven by
@@ -88,7 +90,7 @@
  static int
  hns3_dev_promiscuous_enable(struct rte_eth_dev *dev)
  {
-@@ -4186,15 +4224,9 @@ hns3_init_hardware(struct hns3_adapter *hns)
+@@ -4092,15 +4130,9 @@ hns3_init_hardware(struct hns3_adapter *hns)
  		goto err_mac_init;
  	}
  
@@ -106,7 +108,7 @@
  			     ret);
  		goto err_mac_init;
  	}
-@@ -4353,6 +4385,7 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev)
+@@ -4259,6 +4291,7 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev)
  
  	hns3_enable_hw_error_intr(hns, false);
  	hns3_rss_uninit(hns);

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

* [dpdk-stable] patch 'net/hns3: fix Tx less than 60 bytes' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/ice: fix switch action number check' " luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: clear promiscuous on PF uninit' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: add RSS hash offload to Rx configuration' " luca.boccassi
                   ` (188 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Wei Hu (Xavier); +Cc: Hao Chen, Chengchang Tang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 6dbb90a12522d0d840821570b1ba9ed062a25bae Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Fri, 22 May 2020 17:21:16 +0800
Subject: [PATCH] net/hns3: fix Tx less than 60 bytes

[ upstream commit 16c374402fb88e9b9cb004e794156991da7a79a4 ]

Currently, when running testpmd application based on hns3 network engine
with csum fwd mode by "set fwd csum" command in the prompt line, sending
42 consecutive bytes of ARP packets to network port with packets
generator. But in fact hardware can't send the ARP packets and the
related logs as below:
"Preparing packet burst to failed: Invalid argument"

The hardware doesn't support transmit packets less than 60 bytes, and in
the '.tx_pkt_burst' ops implementation function named hns3_xmit_pkts
appending operation has been added for less than 60 bytes packets. So
the interception needs to be removed in the '.tx_pkt_prepare' ops
implementation function named hns3_prep_pkts.

Fixes: de620754a109 ("net/hns3: fix sending packets less than 60 bytes")
Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Hao Chen <chenhao164@huawei.com>
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 34dc389d9..dcaeab267 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -2104,12 +2104,6 @@ hns3_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
 	for (i = 0; i < nb_pkts; i++) {
 		m = tx_pkts[i];
 
-		/* check the size of packet */
-		if (m->pkt_len < HNS3_MIN_FRAME_LEN) {
-			rte_errno = EINVAL;
-			return i;
-		}
-
 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
 		ret = rte_validate_tx_offload(m);
 		if (ret != 0) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:48.750857417 +0100
+++ 0004-net-hns3-fix-Tx-less-than-60-bytes.patch	2020-07-24 12:53:48.143003777 +0100
@@ -1,8 +1,10 @@
-From 16c374402fb88e9b9cb004e794156991da7a79a4 Mon Sep 17 00:00:00 2001
+From 6dbb90a12522d0d840821570b1ba9ed062a25bae Mon Sep 17 00:00:00 2001
 From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
 Date: Fri, 22 May 2020 17:21:16 +0800
 Subject: [PATCH] net/hns3: fix Tx less than 60 bytes
 
+[ upstream commit 16c374402fb88e9b9cb004e794156991da7a79a4 ]
+
 Currently, when running testpmd application based on hns3 network engine
 with csum fwd mode by "set fwd csum" command in the prompt line, sending
 42 consecutive bytes of ARP packets to network port with packets
@@ -18,7 +20,6 @@
 
 Fixes: de620754a109 ("net/hns3: fix sending packets less than 60 bytes")
 Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
 Signed-off-by: Hao Chen <chenhao164@huawei.com>
@@ -28,22 +29,22 @@
  1 file changed, 6 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
-index 8b3ced116..25ba3b820 100644
+index 34dc389d9..dcaeab267 100644
 --- a/drivers/net/hns3/hns3_rxtx.c
 +++ b/drivers/net/hns3/hns3_rxtx.c
-@@ -2313,12 +2313,6 @@ hns3_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -2104,12 +2104,6 @@ hns3_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
  	for (i = 0; i < nb_pkts; i++) {
  		m = tx_pkts[i];
  
 -		/* check the size of packet */
--		if (m->pkt_len < RTE_ETHER_MIN_LEN) {
+-		if (m->pkt_len < HNS3_MIN_FRAME_LEN) {
 -			rte_errno = EINVAL;
 -			return i;
 -		}
 -
- 		if (hns3_pkt_is_tso(m) &&
- 		    (hns3_pkt_need_linearized(m, m->nb_segs) ||
- 		     hns3_check_tso_pkt_valid(m))) {
+ #ifdef RTE_LIBRTE_ETHDEV_DEBUG
+ 		ret = rte_validate_tx_offload(m);
+ 		if (ret != 0) {
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/hns3: add RSS hash offload to Rx configuration' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (2 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: fix Tx less than 60 bytes' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: fix key length when configuring RSS' " luca.boccassi
                   ` (187 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Lijun Ou; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 36e0995b4d49f026bcb0eeb29c1e1d11b2b72179 Mon Sep 17 00:00:00 2001
From: Lijun Ou <oulijun@huawei.com>
Date: Fri, 22 May 2020 17:21:17 +0800
Subject: [PATCH] net/hns3: add RSS hash offload to Rx configuration

[ upstream commit fdae939696a09b4010df004be06c491d9294e319 ]

Rx offload flag `DEV_RX_OFFLOAD_RSS_HASH` which can be used to
enable/disable PMDs write to `rte_mbuf::hash::rss`. The hns3 PMD driver
already can notify the validity of `rte_mbuf::hash:rss` to the
application by enabling `PKT_RX_RSS_HASH` flag in `rte_mbuf::ol_flags`.

Fixes: 19a3ca4c99cf ("net/hns3: add start/stop and configure operations")
Fixes: c37ca66f2b27 ("net/hns3: support RSS")

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    | 1 +
 drivers/net/hns3/hns3_ethdev_vf.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index dbe747f9d..85d432d36 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2228,6 +2228,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
 
 	/* When RSS is not configured, redirect the packet queue 0 */
 	if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) {
+		conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
 		rss_conf = conf->rx_adv_conf.rss_conf;
 		if (rss_conf.rss_key == NULL) {
 			rss_conf.rss_key = rss_cfg->key;
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 251d0efe8..56a1be936 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -543,6 +543,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
 
 	/* When RSS is not configured, redirect the packet queue 0 */
 	if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) {
+		conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
 		rss_conf = conf->rx_adv_conf.rss_conf;
 		if (rss_conf.rss_key == NULL) {
 			rss_conf.rss_key = rss_cfg->key;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:48.790375842 +0100
+++ 0005-net-hns3-add-RSS-hash-offload-to-Rx-configuration.patch	2020-07-24 12:53:48.151003926 +0100
@@ -1,8 +1,10 @@
-From fdae939696a09b4010df004be06c491d9294e319 Mon Sep 17 00:00:00 2001
+From 36e0995b4d49f026bcb0eeb29c1e1d11b2b72179 Mon Sep 17 00:00:00 2001
 From: Lijun Ou <oulijun@huawei.com>
 Date: Fri, 22 May 2020 17:21:17 +0800
 Subject: [PATCH] net/hns3: add RSS hash offload to Rx configuration
 
+[ upstream commit fdae939696a09b4010df004be06c491d9294e319 ]
+
 Rx offload flag `DEV_RX_OFFLOAD_RSS_HASH` which can be used to
 enable/disable PMDs write to `rte_mbuf::hash::rss`. The hns3 PMD driver
 already can notify the validity of `rte_mbuf::hash:rss` to the
@@ -10,7 +12,6 @@
 
 Fixes: 19a3ca4c99cf ("net/hns3: add start/stop and configure operations")
 Fixes: c37ca66f2b27 ("net/hns3: support RSS")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lijun Ou <oulijun@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -20,10 +21,10 @@
  2 files changed, 2 insertions(+)
 
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index 1c06b8ff1..33d7c5c7b 100644
+index dbe747f9d..85d432d36 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -2312,6 +2312,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
+@@ -2228,6 +2228,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
  
  	/* When RSS is not configured, redirect the packet queue 0 */
  	if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) {
@@ -32,10 +33,10 @@
  		if (rss_conf.rss_key == NULL) {
  			rss_conf.rss_key = rss_cfg->key;
 diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
-index 904562e03..16d601270 100644
+index 251d0efe8..56a1be936 100644
 --- a/drivers/net/hns3/hns3_ethdev_vf.c
 +++ b/drivers/net/hns3/hns3_ethdev_vf.c
-@@ -784,6 +784,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
+@@ -543,6 +543,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
  
  	/* When RSS is not configured, redirect the packet queue 0 */
  	if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) {

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

* [dpdk-stable] patch 'net/hns3: fix key length when configuring RSS' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (3 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: add RSS hash offload to Rx configuration' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/bnxt: fix performance for Arm' " luca.boccassi
                   ` (186 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Lijun Ou; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 8a1ae3e12667d43260a9546146d7d35c17884c58 Mon Sep 17 00:00:00 2001
From: Lijun Ou <oulijun@huawei.com>
Date: Fri, 22 May 2020 17:21:18 +0800
Subject: [PATCH] net/hns3: fix key length when configuring RSS

[ upstream commit 40783b1280e1833615885dc98f3c796ad5addb54 ]

When users set the length of RSS hash key greater than the supported
length by hardware, the driver should intercept and can not configure
the wrong key into the hardware.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 1b9dc1dae..7d5ba61c6 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1475,6 +1475,14 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
 		return -EINVAL;
 	}
 
+	if (rss_flow_conf.key_len &&
+	    rss_flow_conf.key_len > RTE_DIM(rss_info->key)) {
+		hns3_err(hw,
+			"input hash key(%u) greater than supported len(%zu)",
+			rss_flow_conf.key_len, RTE_DIM(rss_info->key));
+		return -EINVAL;
+	}
+
 	/* Filter the unsupported flow types */
 	flow_types = rss_flow_conf.types & HNS3_ETH_RSS_SUPPORT;
 	if (flow_types != rss_flow_conf.types)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:48.836950551 +0100
+++ 0006-net-hns3-fix-key-length-when-configuring-RSS.patch	2020-07-24 12:53:48.155004000 +0100
@@ -1,14 +1,15 @@
-From 40783b1280e1833615885dc98f3c796ad5addb54 Mon Sep 17 00:00:00 2001
+From 8a1ae3e12667d43260a9546146d7d35c17884c58 Mon Sep 17 00:00:00 2001
 From: Lijun Ou <oulijun@huawei.com>
 Date: Fri, 22 May 2020 17:21:18 +0800
 Subject: [PATCH] net/hns3: fix key length when configuring RSS
 
+[ upstream commit 40783b1280e1833615885dc98f3c796ad5addb54 ]
+
 When users set the length of RSS hash key greater than the supported
 length by hardware, the driver should intercept and can not configure
 the wrong key into the hardware.
 
 Fixes: c37ca66f2b27 ("net/hns3: support RSS")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lijun Ou <oulijun@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -17,7 +18,7 @@
  1 file changed, 8 insertions(+)
 
 diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
-index aef301a8a..c7851b235 100644
+index 1b9dc1dae..7d5ba61c6 100644
 --- a/drivers/net/hns3/hns3_flow.c
 +++ b/drivers/net/hns3/hns3_flow.c
 @@ -1475,6 +1475,14 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/bnxt: fix performance for Arm' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (4 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: fix key length when configuring RSS' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/netvsc: fix warning when VF is removed' " luca.boccassi
                   ` (185 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Rahul Gupta; +Cc: Kalesh AP, Ajit Khaparde, Lance Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From e86198b452432b721a760e7c97624cccd1d7a6de Mon Sep 17 00:00:00 2001
From: Rahul Gupta <rahul.gupta@broadcom.com>
Date: Fri, 22 May 2020 23:12:09 +0530
Subject: [PATCH] net/bnxt: fix performance for Arm

[ upstream commit bfc1d45875e2c21deb11fa44a6ac4bc7035d33c6 ]

Eliminate unnecessary rte_smp_wmb() before writing to request/completion
doorbells. Use rte_cio_wmb() memory barrier instead of rte_io_wmb()
before writing to tx/rx request queue doorbells and use
rte_compiler_barrier() before writing to tx/rx completion queue
doorbells.

Fixes: 4af9d0c72941 ("net/bnxt: cleanup NQ doorbell")
Fixes: f8168ca0e690 ("net/bnxt: support thor controller")

Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
 drivers/net/bnxt/bnxt_cpr.h  |  6 +++---
 drivers/net/bnxt/bnxt_ring.h | 24 +++++++++++++-----------
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_cpr.h b/drivers/net/bnxt/bnxt_cpr.h
index c2880783f..cccd6cdbe 100644
--- a/drivers/net/bnxt/bnxt_cpr.h
+++ b/drivers/net/bnxt/bnxt_cpr.h
@@ -64,9 +64,9 @@ struct bnxt_db_info;
 				(cons));				\
 } while (0)
 #define B_CP_DIS_DB(cpr, raw_cons)					\
-	rte_write32((DB_CP_FLAGS |					\
-		    RING_CMP(((cpr)->cp_ring_struct), raw_cons)),	\
-		    ((cpr)->cp_db.doorbell))
+	rte_write32_relaxed((DB_CP_FLAGS |				\
+			    RING_CMP(((cpr)->cp_ring_struct), raw_cons)), \
+			    ((cpr)->cp_db.doorbell))
 
 #define B_CP_DB(cpr, raw_cons, ring_mask)				\
 	rte_write32((DB_CP_FLAGS |					\
diff --git a/drivers/net/bnxt/bnxt_ring.h b/drivers/net/bnxt/bnxt_ring.h
index 48a39d788..9913aed05 100644
--- a/drivers/net/bnxt/bnxt_ring.h
+++ b/drivers/net/bnxt/bnxt_ring.h
@@ -82,10 +82,12 @@ void bnxt_free_rxtx_nq_ring(struct bnxt *bp);
 
 static inline void bnxt_db_write(struct bnxt_db_info *db, uint32_t idx)
 {
+	rte_cio_wmb();
+
 	if (db->db_64)
 		rte_write64_relaxed(db->db_key64 | idx, db->doorbell);
 	else
-		rte_write32(db->db_key32 | idx, db->doorbell);
+		rte_write32_relaxed(db->db_key32 | idx, db->doorbell);
 }
 
 /* Ring an NQ doorbell and disable interrupts for the ring. */
@@ -94,10 +96,10 @@ static inline void bnxt_db_nq(struct bnxt_cp_ring_info *cpr)
 	if (unlikely(!cpr->cp_db.db_64))
 		return;
 
-	rte_smp_wmb();
-	rte_write64(cpr->cp_db.db_key64 | DBR_TYPE_NQ |
-		    RING_CMP(cpr->cp_ring_struct, cpr->cp_raw_cons),
-		    cpr->cp_db.doorbell);
+	rte_cio_wmb();
+	rte_write64_relaxed(cpr->cp_db.db_key64 | DBR_TYPE_NQ |
+			    RING_CMP(cpr->cp_ring_struct, cpr->cp_raw_cons),
+			    cpr->cp_db.doorbell);
 }
 
 /* Ring an NQ doorbell and enable interrupts for the ring. */
@@ -106,10 +108,10 @@ static inline void bnxt_db_nq_arm(struct bnxt_cp_ring_info *cpr)
 	if (unlikely(!cpr->cp_db.db_64))
 		return;
 
-	rte_smp_wmb();
-	rte_write64(cpr->cp_db.db_key64 | DBR_TYPE_NQ_ARM |
-		    RING_CMP(cpr->cp_ring_struct, cpr->cp_raw_cons),
-		    cpr->cp_db.doorbell);
+	rte_cio_wmb();
+	rte_write64_relaxed(cpr->cp_db.db_key64 | DBR_TYPE_NQ_ARM |
+			    RING_CMP(cpr->cp_ring_struct, cpr->cp_raw_cons),
+			    cpr->cp_db.doorbell);
 }
 
 static inline void bnxt_db_cq(struct bnxt_cp_ring_info *cpr)
@@ -117,9 +119,9 @@ static inline void bnxt_db_cq(struct bnxt_cp_ring_info *cpr)
 	struct bnxt_db_info *db = &cpr->cp_db;
 	uint32_t idx = RING_CMP(cpr->cp_ring_struct, cpr->cp_raw_cons);
 
-	rte_smp_wmb();
+	rte_compiler_barrier();
 	if (db->db_64)
-		rte_write64(db->db_key64 | idx, db->doorbell);
+		rte_write64_relaxed(db->db_key64 | idx, db->doorbell);
 	else
 		B_CP_DIS_DB(cpr, cpr->cp_raw_cons);
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:48.875692444 +0100
+++ 0007-net-bnxt-fix-performance-for-Arm.patch	2020-07-24 12:53:48.155004000 +0100
@@ -1,8 +1,10 @@
-From bfc1d45875e2c21deb11fa44a6ac4bc7035d33c6 Mon Sep 17 00:00:00 2001
+From e86198b452432b721a760e7c97624cccd1d7a6de Mon Sep 17 00:00:00 2001
 From: Rahul Gupta <rahul.gupta@broadcom.com>
 Date: Fri, 22 May 2020 23:12:09 +0530
 Subject: [PATCH] net/bnxt: fix performance for Arm
 
+[ upstream commit bfc1d45875e2c21deb11fa44a6ac4bc7035d33c6 ]
+
 Eliminate unnecessary rte_smp_wmb() before writing to request/completion
 doorbells. Use rte_cio_wmb() memory barrier instead of rte_io_wmb()
 before writing to tx/rx request queue doorbells and use
@@ -11,7 +13,6 @@
 
 Fixes: 4af9d0c72941 ("net/bnxt: cleanup NQ doorbell")
 Fixes: f8168ca0e690 ("net/bnxt: support thor controller")
-Cc: stable@dpdk.org
 
 Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

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

* [dpdk-stable] patch 'net/netvsc: fix warning when VF is removed' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (5 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/bnxt: fix performance for Arm' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/netvsc: do not query VF link state' " luca.boccassi
                   ` (184 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 370b18ccd659b433b9ff7cde3ea7fd9eb800097b Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 19 May 2020 09:52:27 -0700
Subject: [PATCH] net/netvsc: fix warning when VF is removed

[ upstream commit c6854a41266a962d1f013065db7828517b246fef ]

The code to unset owner of VF device was changing port to invalid
value before calling unset.

Fixes: 4a9efcddaddd ("net/netvsc: fix VF support with secondary process")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/netvsc/hn_vf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/netvsc/hn_vf.c b/drivers/net/netvsc/hn_vf.c
index 1261b2e2e..97333b502 100644
--- a/drivers/net/netvsc/hn_vf.c
+++ b/drivers/net/netvsc/hn_vf.c
@@ -127,12 +127,12 @@ static void hn_vf_remove(struct hn_data *hv)
 		/* Stop incoming packets from arriving on VF */
 		hn_nvs_set_datapath(hv, NVS_DATAPATH_SYNTHETIC);
 
+		/* Give back ownership */
+		rte_eth_dev_owner_unset(hv->vf_port, hv->owner.id);
+
 		/* Stop transmission over VF */
 		hv->vf_port = HN_INVALID_PORT;
 		rte_smp_wmb();
-
-		/* Give back ownership */
-		rte_eth_dev_owner_unset(hv->vf_port, hv->owner.id);
 	}
 	rte_spinlock_unlock(&hv->vf_lock);
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:48.912396938 +0100
+++ 0008-net-netvsc-fix-warning-when-VF-is-removed.patch	2020-07-24 12:53:48.155004000 +0100
@@ -1,13 +1,14 @@
-From c6854a41266a962d1f013065db7828517b246fef Mon Sep 17 00:00:00 2001
+From 370b18ccd659b433b9ff7cde3ea7fd9eb800097b Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Tue, 19 May 2020 09:52:27 -0700
 Subject: [PATCH] net/netvsc: fix warning when VF is removed
 
+[ upstream commit c6854a41266a962d1f013065db7828517b246fef ]
+
 The code to unset owner of VF device was changing port to invalid
 value before calling unset.
 
 Fixes: 4a9efcddaddd ("net/netvsc: fix VF support with secondary process")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 ---
@@ -15,24 +16,25 @@
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/netvsc/hn_vf.c b/drivers/net/netvsc/hn_vf.c
-index b7e3ba46b..a745c7c36 100644
+index 1261b2e2e..97333b502 100644
 --- a/drivers/net/netvsc/hn_vf.c
 +++ b/drivers/net/netvsc/hn_vf.c
-@@ -120,11 +120,11 @@ static void hn_vf_remove(struct hn_data *hv)
+@@ -127,12 +127,12 @@ static void hn_vf_remove(struct hn_data *hv)
  		/* Stop incoming packets from arriving on VF */
  		hn_nvs_set_datapath(hv, NVS_DATAPATH_SYNTHETIC);
  
--		/* Stop transmission over VF */
--		hv->vf_port = HN_INVALID_PORT;
--
- 		/* Give back ownership */
- 		rte_eth_dev_owner_unset(hv->vf_port, hv->owner.id);
++		/* Give back ownership */
++		rte_eth_dev_owner_unset(hv->vf_port, hv->owner.id);
 +
-+		/* Stop transmission over VF */
-+		hv->vf_port = HN_INVALID_PORT;
+ 		/* Stop transmission over VF */
+ 		hv->vf_port = HN_INVALID_PORT;
+ 		rte_smp_wmb();
+-
+-		/* Give back ownership */
+-		rte_eth_dev_owner_unset(hv->vf_port, hv->owner.id);
  	}
+ 	rte_spinlock_unlock(&hv->vf_lock);
  }
- 
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/netvsc: do not query VF link state' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (6 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/netvsc: fix warning when VF is removed' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/netvsc: do not spin forever waiting for reply' " luca.boccassi
                   ` (183 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From bbcbaf834f0ef6e42c17fb47745953747b370e3d Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 19 May 2020 09:52:28 -0700
Subject: [PATCH] net/netvsc: do not query VF link state

[ upstream commit a4f53bec7c0a8eebeb8ccff0afa46bfedf932916 ]

When the primary device link state is queried, there is no
need to query the VF state as well. The application only sees
the state of the synthetic device.

Fixes: dc7680e8597c ("net/netvsc: support integrated VF")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/netvsc/hn_ethdev.c |  4 +-
 drivers/net/netvsc/hn_var.h    |  3 --
 drivers/net/netvsc/hn_vf.c     | 99 +++++-----------------------------
 3 files changed, 15 insertions(+), 91 deletions(-)

diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 6950682a9..20cf1cc90 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -201,7 +201,7 @@ static int hn_parse_args(const struct rte_eth_dev *dev)
  */
 int
 hn_dev_link_update(struct rte_eth_dev *dev,
-		   int wait_to_complete)
+		   int wait_to_complete __rte_unused)
 {
 	struct hn_data *hv = dev->data->dev_private;
 	struct rte_eth_link link, old;
@@ -215,8 +215,6 @@ hn_dev_link_update(struct rte_eth_dev *dev,
 
 	hn_rndis_get_linkspeed(hv);
 
-	hn_vf_link_update(dev, wait_to_complete);
-
 	link = (struct rte_eth_link) {
 		.link_duplex = ETH_LINK_FULL_DUPLEX,
 		.link_autoneg = ETH_LINK_SPEED_FIXED,
diff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h
index b4c617173..4c1e6b8c3 100644
--- a/drivers/net/netvsc/hn_var.h
+++ b/drivers/net/netvsc/hn_var.h
@@ -140,7 +140,6 @@ struct hn_data {
 	uint16_t	rss_ind[128];
 
 	struct rte_eth_dev_owner owner;
-	struct rte_intr_handle vf_intr;
 
 	struct vmbus_channel *channels[HN_MAX_CHANNELS];
 };
@@ -222,8 +221,6 @@ int	hn_vf_mc_addr_list(struct rte_eth_dev *dev,
 			   struct rte_ether_addr *mc_addr_set,
 			   uint32_t nb_mc_addr);
 
-int	hn_vf_link_update(struct rte_eth_dev *dev,
-			  int wait_to_complete);
 int	hn_vf_tx_queue_setup(struct rte_eth_dev *dev,
 			     uint16_t queue_idx, uint16_t nb_desc,
 			     unsigned int socket_id,
diff --git a/drivers/net/netvsc/hn_vf.c b/drivers/net/netvsc/hn_vf.c
index 97333b502..4e774d9d9 100644
--- a/drivers/net/netvsc/hn_vf.c
+++ b/drivers/net/netvsc/hn_vf.c
@@ -100,16 +100,8 @@ int hn_vf_add(struct rte_eth_dev *dev, struct hn_data *hv)
 
 	rte_spinlock_lock(&hv->vf_lock);
 	err = hn_vf_attach(hv, port);
-
-	if (err == 0) {
-		dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
-		hv->vf_intr = (struct rte_intr_handle) {
-			.fd = -1,
-			.type = RTE_INTR_HANDLE_EXT,
-		};
-		dev->intr_handle = &hv->vf_intr;
+	if (err == 0)
 		hn_nvs_set_datapath(hv, NVS_DATAPATH_VF);
-	}
 	rte_spinlock_unlock(&hv->vf_lock);
 
 	return err;
@@ -231,80 +223,6 @@ int hn_vf_info_get(struct hn_data *hv, struct rte_eth_dev_info *info)
 	return ret;
 }
 
-int hn_vf_link_update(struct rte_eth_dev *dev,
-		      int wait_to_complete)
-{
-	struct hn_data *hv = dev->data->dev_private;
-	struct rte_eth_dev *vf_dev;
-	int ret = 0;
-
-	rte_spinlock_lock(&hv->vf_lock);
-	vf_dev = hn_get_vf_dev(hv);
-	if (vf_dev && vf_dev->dev_ops->link_update)
-		ret = (*vf_dev->dev_ops->link_update)(vf_dev, wait_to_complete);
-	rte_spinlock_unlock(&hv->vf_lock);
-
-	return ret;
-}
-
-/* called when VF has link state interrupts enabled */
-static int hn_vf_lsc_event(uint16_t port_id __rte_unused,
-			   enum rte_eth_event_type event,
-			   void *cb_arg, void *out __rte_unused)
-{
-	struct rte_eth_dev *dev = cb_arg;
-
-	if (event != RTE_ETH_EVENT_INTR_LSC)
-		return 0;
-
-	/* if link state has changed pass on */
-	if (hn_dev_link_update(dev, 0) == 0)
-		return 0; /* no change */
-
-	return _rte_eth_dev_callback_process(dev,
-					     RTE_ETH_EVENT_INTR_LSC,
-					     NULL);
-}
-
-static int _hn_vf_configure(struct rte_eth_dev *dev,
-			    uint16_t vf_port,
-			    const struct rte_eth_conf *dev_conf)
-{
-	struct rte_eth_conf vf_conf = *dev_conf;
-	struct rte_eth_dev *vf_dev;
-	int ret;
-
-	vf_dev = &rte_eth_devices[vf_port];
-	if (dev_conf->intr_conf.lsc &&
-	    (vf_dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)) {
-		PMD_DRV_LOG(DEBUG, "enabling LSC for VF %u",
-			    vf_port);
-		vf_conf.intr_conf.lsc = 1;
-	} else {
-		PMD_DRV_LOG(DEBUG, "disabling LSC for VF %u",
-			    vf_port);
-		vf_conf.intr_conf.lsc = 0;
-	}
-
-	ret = rte_eth_dev_configure(vf_port,
-				    dev->data->nb_rx_queues,
-				    dev->data->nb_tx_queues,
-				    &vf_conf);
-	if (ret) {
-		PMD_DRV_LOG(ERR,
-			    "VF configuration failed: %d", ret);
-	} else if (vf_conf.intr_conf.lsc) {
-		ret = rte_eth_dev_callback_register(vf_port,
-						    RTE_ETH_DEV_INTR_LSC,
-						    hn_vf_lsc_event, dev);
-		if (ret)
-			PMD_DRV_LOG(ERR,
-				    "Failed to register LSC callback for VF %u",
-				    vf_port);
-	}
-	return ret;
-}
-
 /*
  * Configure VF if present.
  * Force VF to have same number of queues as synthetic device
@@ -313,11 +231,22 @@ int hn_vf_configure(struct rte_eth_dev *dev,
 		    const struct rte_eth_conf *dev_conf)
 {
 	struct hn_data *hv = dev->data->dev_private;
+	struct rte_eth_conf vf_conf = *dev_conf;
 	int ret = 0;
 
+	/* link state interrupt does not matter here. */
+	vf_conf.intr_conf.lsc = 0;
+
 	rte_spinlock_lock(&hv->vf_lock);
-	if (hv->vf_port != HN_INVALID_PORT)
-		ret = _hn_vf_configure(dev, hv->vf_port, dev_conf);
+	if (hv->vf_port != HN_INVALID_PORT) {
+		ret = rte_eth_dev_configure(hv->vf_port,
+					    dev->data->nb_rx_queues,
+					    dev->data->nb_tx_queues,
+					    &vf_conf);
+		if (ret != 0)
+			PMD_DRV_LOG(ERR,
+				    "VF configuration failed: %d", ret);
+	}
 	rte_spinlock_unlock(&hv->vf_lock);
 	return ret;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:48.946131528 +0100
+++ 0009-net-netvsc-do-not-query-VF-link-state.patch	2020-07-24 12:53:48.159004075 +0100
@@ -1,27 +1,28 @@
-From a4f53bec7c0a8eebeb8ccff0afa46bfedf932916 Mon Sep 17 00:00:00 2001
+From bbcbaf834f0ef6e42c17fb47745953747b370e3d Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Tue, 19 May 2020 09:52:28 -0700
 Subject: [PATCH] net/netvsc: do not query VF link state
 
+[ upstream commit a4f53bec7c0a8eebeb8ccff0afa46bfedf932916 ]
+
 When the primary device link state is queried, there is no
 need to query the VF state as well. The application only sees
 the state of the synthetic device.
 
 Fixes: dc7680e8597c ("net/netvsc: support integrated VF")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 ---
  drivers/net/netvsc/hn_ethdev.c |  4 +-
  drivers/net/netvsc/hn_var.h    |  3 --
- drivers/net/netvsc/hn_vf.c     | 98 +++++-----------------------------
- 3 files changed, 15 insertions(+), 90 deletions(-)
+ drivers/net/netvsc/hn_vf.c     | 99 +++++-----------------------------
+ 3 files changed, 15 insertions(+), 91 deletions(-)
 
 diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
-index 0f4827c54..ac182a548 100644
+index 6950682a9..20cf1cc90 100644
 --- a/drivers/net/netvsc/hn_ethdev.c
 +++ b/drivers/net/netvsc/hn_ethdev.c
-@@ -202,7 +202,7 @@ static int hn_parse_args(const struct rte_eth_dev *dev)
+@@ -201,7 +201,7 @@ static int hn_parse_args(const struct rte_eth_dev *dev)
   */
  int
  hn_dev_link_update(struct rte_eth_dev *dev,
@@ -30,7 +31,7 @@
  {
  	struct hn_data *hv = dev->data->dev_private;
  	struct rte_eth_link link, old;
-@@ -216,8 +216,6 @@ hn_dev_link_update(struct rte_eth_dev *dev,
+@@ -215,8 +215,6 @@ hn_dev_link_update(struct rte_eth_dev *dev,
  
  	hn_rndis_get_linkspeed(hv);
  
@@ -40,10 +41,10 @@
  		.link_duplex = ETH_LINK_FULL_DUPLEX,
  		.link_autoneg = ETH_LINK_SPEED_FIXED,
 diff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h
-index 20363389a..881832d85 100644
+index b4c617173..4c1e6b8c3 100644
 --- a/drivers/net/netvsc/hn_var.h
 +++ b/drivers/net/netvsc/hn_var.h
-@@ -141,7 +141,6 @@ struct hn_data {
+@@ -140,7 +140,6 @@ struct hn_data {
  	uint16_t	rss_ind[128];
  
  	struct rte_eth_dev_owner owner;
@@ -51,7 +52,7 @@
  
  	struct vmbus_channel *channels[HN_MAX_CHANNELS];
  };
-@@ -228,8 +227,6 @@ int	hn_vf_mc_addr_list(struct rte_eth_dev *dev,
+@@ -222,8 +221,6 @@ int	hn_vf_mc_addr_list(struct rte_eth_dev *dev,
  			   struct rte_ether_addr *mc_addr_set,
  			   uint32_t nb_mc_addr);
  
@@ -61,13 +62,14 @@
  			     uint16_t queue_idx, uint16_t nb_desc,
  			     unsigned int socket_id,
 diff --git a/drivers/net/netvsc/hn_vf.c b/drivers/net/netvsc/hn_vf.c
-index a745c7c36..f5f15c046 100644
+index 97333b502..4e774d9d9 100644
 --- a/drivers/net/netvsc/hn_vf.c
 +++ b/drivers/net/netvsc/hn_vf.c
-@@ -97,15 +97,8 @@ int hn_vf_add(struct rte_eth_dev *dev, struct hn_data *hv)
- 	}
+@@ -100,16 +100,8 @@ int hn_vf_add(struct rte_eth_dev *dev, struct hn_data *hv)
  
+ 	rte_spinlock_lock(&hv->vf_lock);
  	err = hn_vf_attach(hv, port);
+-
 -	if (err == 0) {
 -		dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
 -		hv->vf_intr = (struct rte_intr_handle) {
@@ -78,10 +80,10 @@
 +	if (err == 0)
  		hn_nvs_set_datapath(hv, NVS_DATAPATH_VF);
 -	}
+ 	rte_spinlock_unlock(&hv->vf_lock);
  
  	return err;
- }
-@@ -223,80 +216,6 @@ int hn_vf_info_get(struct hn_data *hv, struct rte_eth_dev_info *info)
+@@ -231,80 +223,6 @@ int hn_vf_info_get(struct hn_data *hv, struct rte_eth_dev_info *info)
  	return ret;
  }
  
@@ -92,11 +94,11 @@
 -	struct rte_eth_dev *vf_dev;
 -	int ret = 0;
 -
--	rte_rwlock_read_lock(&hv->vf_lock);
+-	rte_spinlock_lock(&hv->vf_lock);
 -	vf_dev = hn_get_vf_dev(hv);
 -	if (vf_dev && vf_dev->dev_ops->link_update)
 -		ret = (*vf_dev->dev_ops->link_update)(vf_dev, wait_to_complete);
--	rte_rwlock_read_unlock(&hv->vf_lock);
+-	rte_spinlock_unlock(&hv->vf_lock);
 -
 -	return ret;
 -}
@@ -162,7 +164,7 @@
  /*
   * Configure VF if present.
   * Force VF to have same number of queues as synthetic device
-@@ -305,11 +224,22 @@ int hn_vf_configure(struct rte_eth_dev *dev,
+@@ -313,11 +231,22 @@ int hn_vf_configure(struct rte_eth_dev *dev,
  		    const struct rte_eth_conf *dev_conf)
  {
  	struct hn_data *hv = dev->data->dev_private;
@@ -172,7 +174,7 @@
 +	/* link state interrupt does not matter here. */
 +	vf_conf.intr_conf.lsc = 0;
 +
- 	rte_rwlock_read_lock(&hv->vf_lock);
+ 	rte_spinlock_lock(&hv->vf_lock);
 -	if (hv->vf_port != HN_INVALID_PORT)
 -		ret = _hn_vf_configure(dev, hv->vf_port, dev_conf);
 +	if (hv->vf_port != HN_INVALID_PORT) {
@@ -184,7 +186,7 @@
 +			PMD_DRV_LOG(ERR,
 +				    "VF configuration failed: %d", ret);
 +	}
- 	rte_rwlock_read_unlock(&hv->vf_lock);
+ 	rte_spinlock_unlock(&hv->vf_lock);
  	return ret;
  }
 -- 

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

* [dpdk-stable] patch 'net/netvsc: do not spin forever waiting for reply' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (7 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/netvsc: do not query VF link state' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'app/testpmd: fix memory leak on error path' " luca.boccassi
                   ` (182 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 895e0773bd95e6fcc935128fa8ab34c7d5b3f881 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 19 May 2020 09:52:30 -0700
Subject: [PATCH] net/netvsc: do not spin forever waiting for reply

[ upstream commit 3c9be81be917e1659a3a9ab332c277280986ed03 ]

Because of bugs in driver or host a reply to a request might
never occur. Better to give an error than spin forever.

Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/netvsc/hn_rndis.c | 30 ++++++++++++++++++++++++++++--
 1 file changed, 28 insertions(+), 2 deletions(-)

diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
index 2b4714042..bce3dab68 100644
--- a/drivers/net/netvsc/hn_rndis.c
+++ b/drivers/net/netvsc/hn_rndis.c
@@ -10,6 +10,7 @@
 #include <stdio.h>
 #include <errno.h>
 #include <unistd.h>
+#include <time.h>
 
 #include <rte_ethdev_driver.h>
 #include <rte_ethdev.h>
@@ -33,6 +34,9 @@
 #include "hn_rndis.h"
 #include "ndis.h"
 
+#define RNDIS_TIMEOUT_SEC 5
+#define RNDIS_DELAY_MS    10
+
 #define HN_RNDIS_XFER_SIZE		0x4000
 
 #define HN_NDIS_TXCSUM_CAP_IP4		\
@@ -348,7 +352,7 @@ void hn_rndis_receive_response(struct hn_data *hv,
 	rte_smp_wmb();
 
 	if (rte_atomic32_cmpset(&hv->rndis_pending, hdr->rid, 0) == 0) {
-		PMD_DRV_LOG(ERR,
+		PMD_DRV_LOG(NOTICE,
 			    "received id %#x pending id %#x",
 			    hdr->rid, (uint32_t)hv->rndis_pending);
 	}
@@ -371,6 +375,11 @@ static int hn_rndis_exec1(struct hn_data *hv,
 		return -EIO;
 	}
 
+	if (rid == 0) {
+		PMD_DRV_LOG(ERR, "Invalid request id");
+		return -EINVAL;
+	}
+
 	if (comp != NULL &&
 	    rte_atomic32_cmpset(&hv->rndis_pending, 0, rid) == 0) {
 		PMD_DRV_LOG(ERR,
@@ -385,9 +394,26 @@ static int hn_rndis_exec1(struct hn_data *hv,
 	}
 
 	if (comp) {
+		time_t start = time(NULL);
+
 		/* Poll primary channel until response received */
-		while (hv->rndis_pending == rid)
+		while (hv->rndis_pending == rid) {
+			if (hv->closed)
+				return -ENETDOWN;
+
+			if (time(NULL) - start > RNDIS_TIMEOUT_SEC) {
+				PMD_DRV_LOG(ERR,
+					    "RNDIS response timed out");
+
+				rte_atomic32_cmpset(&hv->rndis_pending, rid, 0);
+				return -ETIMEDOUT;
+			}
+
+			if (rte_vmbus_chan_rx_empty(hv->primary->chan))
+				rte_delay_ms(RNDIS_DELAY_MS);
+
 			hn_process_events(hv, 0, 1);
+		}
 
 		memcpy(comp, hv->rndis_resp, comp_len);
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:48.984085277 +0100
+++ 0010-net-netvsc-do-not-spin-forever-waiting-for-reply.patch	2020-07-24 12:53:48.159004075 +0100
@@ -1,13 +1,14 @@
-From 3c9be81be917e1659a3a9ab332c277280986ed03 Mon Sep 17 00:00:00 2001
+From 895e0773bd95e6fcc935128fa8ab34c7d5b3f881 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Tue, 19 May 2020 09:52:30 -0700
 Subject: [PATCH] net/netvsc: do not spin forever waiting for reply
 
+[ upstream commit 3c9be81be917e1659a3a9ab332c277280986ed03 ]
+
 Because of bugs in driver or host a reply to a request might
 never occur. Better to give an error than spin forever.
 
 Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 ---
@@ -15,7 +16,7 @@
  1 file changed, 28 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
-index 6a850ce5f..d186ddeab 100644
+index 2b4714042..bce3dab68 100644
 --- a/drivers/net/netvsc/hn_rndis.c
 +++ b/drivers/net/netvsc/hn_rndis.c
 @@ -10,6 +10,7 @@
@@ -26,7 +27,7 @@
  
  #include <rte_ethdev_driver.h>
  #include <rte_ethdev.h>
-@@ -34,6 +35,9 @@
+@@ -33,6 +34,9 @@
  #include "hn_rndis.h"
  #include "ndis.h"
  
@@ -36,7 +37,7 @@
  #define HN_RNDIS_XFER_SIZE		0x4000
  
  #define HN_NDIS_TXCSUM_CAP_IP4		\
-@@ -354,7 +358,7 @@ void hn_rndis_receive_response(struct hn_data *hv,
+@@ -348,7 +352,7 @@ void hn_rndis_receive_response(struct hn_data *hv,
  	rte_smp_wmb();
  
  	if (rte_atomic32_cmpset(&hv->rndis_pending, hdr->rid, 0) == 0) {
@@ -45,7 +46,7 @@
  			    "received id %#x pending id %#x",
  			    hdr->rid, (uint32_t)hv->rndis_pending);
  	}
-@@ -377,6 +381,11 @@ static int hn_rndis_exec1(struct hn_data *hv,
+@@ -371,6 +375,11 @@ static int hn_rndis_exec1(struct hn_data *hv,
  		return -EIO;
  	}
  
@@ -57,7 +58,7 @@
  	if (comp != NULL &&
  	    rte_atomic32_cmpset(&hv->rndis_pending, 0, rid) == 0) {
  		PMD_DRV_LOG(ERR,
-@@ -391,9 +400,26 @@ static int hn_rndis_exec1(struct hn_data *hv,
+@@ -385,9 +394,26 @@ static int hn_rndis_exec1(struct hn_data *hv,
  	}
  
  	if (comp) {

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

* [dpdk-stable] patch 'app/testpmd: fix memory leak on error path' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (8 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/netvsc: do not spin forever waiting for reply' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: remove needless Tx queue initialization check' " luca.boccassi
                   ` (181 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 77b9982fa2eba4652be86d61c5662958a2902f0c Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Mon, 25 May 2020 09:46:23 +0800
Subject: [PATCH] app/testpmd: fix memory leak on error path

[ upstream commit eb577e575d160eae08bcd9b7acf8a9d8fe795f89 ]

This patch fixes the resource leak issue.

Fixes: e63b50162aa3 ("app/testpmd: clean metering and policing commands")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/cmdline_mtr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test-pmd/cmdline_mtr.c b/app/test-pmd/cmdline_mtr.c
index ab5c8642d..045c2e28d 100644
--- a/app/test-pmd/cmdline_mtr.c
+++ b/app/test-pmd/cmdline_mtr.c
@@ -1262,6 +1262,7 @@ static void cmd_set_port_meter_policer_action_parsed(void *parsed_result,
 	ret = rte_mtr_policer_actions_update(port_id, mtr_id,
 		action_mask, actions, &error);
 	if (ret != 0) {
+		free(actions);
 		print_err_msg(&error);
 		return;
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.024237896 +0100
+++ 0011-app-testpmd-fix-memory-leak-on-error-path.patch	2020-07-24 12:53:48.159004075 +0100
@@ -1,12 +1,13 @@
-From eb577e575d160eae08bcd9b7acf8a9d8fe795f89 Mon Sep 17 00:00:00 2001
+From 77b9982fa2eba4652be86d61c5662958a2902f0c Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Mon, 25 May 2020 09:46:23 +0800
 Subject: [PATCH] app/testpmd: fix memory leak on error path
 
+[ upstream commit eb577e575d160eae08bcd9b7acf8a9d8fe795f89 ]
+
 This patch fixes the resource leak issue.
 
 Fixes: e63b50162aa3 ("app/testpmd: clean metering and policing commands")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -15,7 +16,7 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/app/test-pmd/cmdline_mtr.c b/app/test-pmd/cmdline_mtr.c
-index caa7e9864..ee16244de 100644
+index ab5c8642d..045c2e28d 100644
 --- a/app/test-pmd/cmdline_mtr.c
 +++ b/app/test-pmd/cmdline_mtr.c
 @@ -1262,6 +1262,7 @@ static void cmd_set_port_meter_policer_action_parsed(void *parsed_result,

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

* [dpdk-stable] patch 'net/mlx5: remove needless Tx queue initialization check' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (9 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'app/testpmd: fix memory leak on error path' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: fix unreachable MPLS error path' " luca.boccassi
                   ` (180 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From efe4acdd4a6962bf704b8f7eaffb4731aaa60a05 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@mellanox.com>
Date: Wed, 27 May 2020 08:37:56 +0000
Subject: [PATCH] net/mlx5: remove needless Tx queue initialization check

[ upstream commit c55ec83b5822af0a1be9ad016714b8adc68b1a51 ]

The mlx5_txq_obj_new function defines a pointer named txq_data and
assign value into it. After assigning, the code writer is sure that the
variable does not point to NULL and even express it using assertion.

During the function, the function does dereferencing to the pointer
several times and at no point change its value. However, at the end of
the function at the error label when it wants to free one of the fields
of the structure that txq_data points to, it checks again whether
txq_data is invalid.
This check is unnecessary since it knows for sure that txq_data is
valid.

Remove the aforementioned needless check.

Fixes: 644906881881 ("net/mlx5: add free on completion queue")

Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_txq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index c7751e83c..42dcd7a4b 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -786,7 +786,7 @@ error:
 		claim_zero(mlx5_glue->destroy_cq(tmpl.cq));
 	if (tmpl.qp)
 		claim_zero(mlx5_glue->destroy_qp(tmpl.qp));
-	if (txq_data && txq_data->fcqs)
+	if (txq_data->fcqs)
 		rte_free(txq_data->fcqs);
 	if (txq_obj)
 		rte_free(txq_obj);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.061713647 +0100
+++ 0012-net-mlx5-remove-needless-Tx-queue-initialization-che.patch	2020-07-24 12:53:48.163004149 +0100
@@ -1,8 +1,10 @@
-From c55ec83b5822af0a1be9ad016714b8adc68b1a51 Mon Sep 17 00:00:00 2001
+From efe4acdd4a6962bf704b8f7eaffb4731aaa60a05 Mon Sep 17 00:00:00 2001
 From: Michael Baum <michaelba@mellanox.com>
 Date: Wed, 27 May 2020 08:37:56 +0000
 Subject: [PATCH] net/mlx5: remove needless Tx queue initialization check
 
+[ upstream commit c55ec83b5822af0a1be9ad016714b8adc68b1a51 ]
+
 The mlx5_txq_obj_new function defines a pointer named txq_data and
 assign value into it. After assigning, the code writer is sure that the
 variable does not point to NULL and even express it using assertion.
@@ -18,7 +20,6 @@
 Remove the aforementioned needless check.
 
 Fixes: 644906881881 ("net/mlx5: add free on completion queue")
-Cc: stable@dpdk.org
 
 Signed-off-by: Michael Baum <michaelba@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -27,10 +28,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
-index 7cc620a90..80d99ff94 100644
+index c7751e83c..42dcd7a4b 100644
 --- a/drivers/net/mlx5/mlx5_txq.c
 +++ b/drivers/net/mlx5/mlx5_txq.c
-@@ -793,7 +793,7 @@ error:
+@@ -786,7 +786,7 @@ error:
  		claim_zero(mlx5_glue->destroy_cq(tmpl.cq));
  	if (tmpl.qp)
  		claim_zero(mlx5_glue->destroy_qp(tmpl.qp));

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

* [dpdk-stable] patch 'net/mlx5: fix unreachable MPLS error path' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (10 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: remove needless Tx queue initialization check' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: fix secondary process resources release' " luca.boccassi
                   ` (179 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From edd6234fbd3b8698fab41e7f41ed0aea5b2a80ea Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@mellanox.com>
Date: Wed, 27 May 2020 08:37:57 +0000
Subject: [PATCH] net/mlx5: fix unreachable MPLS error path

[ upstream commit 01de93f2451730d480db8db18921e1bca7cb1f3e ]

The mlx5_flow_validate_item_mpls function checks MPLS item validation.
It first checks if the device supports MPLS, it is done using the ifdef
condition that if it fails to skip to endif and return the appropriate
error.

When MPLS is supported, the preprocessor will copy the body of the
function ending with return 0 followed by the lines that report MPLS
support.
In fact, these lines are unreachable because before them the function
returns 0 and in any case they are unnecessary.

Replace the endif by else and move endif to the end of the
function.

Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function")

Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index e05c35a41..400273f25 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2230,11 +2230,12 @@ mlx5_flow_validate_item_mpls(struct rte_eth_dev *dev __rte_unused,
 	if (ret < 0)
 		return ret;
 	return 0;
-#endif
+#else
 	return rte_flow_error_set(error, ENOTSUP,
 				  RTE_FLOW_ERROR_TYPE_ITEM, item,
 				  "MPLS is not supported by Verbs, please"
 				  " update.");
+#endif
 }
 
 /**
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.096437178 +0100
+++ 0013-net-mlx5-fix-unreachable-MPLS-error-path.patch	2020-07-24 12:53:48.167004224 +0100
@@ -1,8 +1,10 @@
-From 01de93f2451730d480db8db18921e1bca7cb1f3e Mon Sep 17 00:00:00 2001
+From edd6234fbd3b8698fab41e7f41ed0aea5b2a80ea Mon Sep 17 00:00:00 2001
 From: Michael Baum <michaelba@mellanox.com>
 Date: Wed, 27 May 2020 08:37:57 +0000
 Subject: [PATCH] net/mlx5: fix unreachable MPLS error path
 
+[ upstream commit 01de93f2451730d480db8db18921e1bca7cb1f3e ]
+
 The mlx5_flow_validate_item_mpls function checks MPLS item validation.
 It first checks if the device supports MPLS, it is done using the ifdef
 condition that if it fails to skip to endif and return the appropriate
@@ -18,7 +20,6 @@
 function.
 
 Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function")
-Cc: stable@dpdk.org
 
 Signed-off-by: Michael Baum <michaelba@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -27,10 +28,10 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
-index ae478a510..f2c3cf90d 100644
+index e05c35a41..400273f25 100644
 --- a/drivers/net/mlx5/mlx5_flow.c
 +++ b/drivers/net/mlx5/mlx5_flow.c
-@@ -2269,11 +2269,12 @@ mlx5_flow_validate_item_mpls(struct rte_eth_dev *dev __rte_unused,
+@@ -2230,11 +2230,12 @@ mlx5_flow_validate_item_mpls(struct rte_eth_dev *dev __rte_unused,
  	if (ret < 0)
  		return ret;
  	return 0;

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

* [dpdk-stable] patch 'net/mlx5: fix secondary process resources release' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (11 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: fix unreachable MPLS error path' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: fix interrupt installation timing' " luca.boccassi
                   ` (178 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From f32fd4561c6e74e184e3a30d55e7de6581a24a6f Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@mellanox.com>
Date: Thu, 28 May 2020 14:59:49 +0800
Subject: [PATCH] net/mlx5: fix secondary process resources release

[ upstream commit 2786b7bf9084b32dde9a346d92ab1c27f0ffc476 ]

When secondary process starts, it will allocate its own process private
data, and also does remap to UAR register of the Tx queue. Once the
secondary process exits, these resources should be released accordingly.
And the shared resources owned by primary should not be touched.

Currently, once one port in the secondary process spawn failed, all the
other spawned ports will also be released during process exits. However,
the mlx5_dev_close() function does not add the cases for secondary
process, it means call the mlx5_dev_close() function directly in
secondary process releases the resources it should not touch.

Add the case for secondary process release to its own resources in
mlx5_dev_close() function to help it quits gracefully.

Fixes: 942d13e6e7d1 ("net/mlx5: fix sharing context destroy order")
Fixes: 3a8207423a0f ("net/mlx5: close all ports on remove")

Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5.c      | 47 +++++++++++++++++++++++++-----------
 drivers/net/mlx5/mlx5_rxtx.h |  1 +
 drivers/net/mlx5/mlx5_txq.c  | 24 ++++++++++++++++++
 3 files changed, 58 insertions(+), 14 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 8879df317..1e34f6263 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1234,6 +1234,17 @@ mlx5_dev_close(struct rte_eth_dev *dev)
 	unsigned int i;
 	int ret;
 
+	if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
+		/* Check if process_private released. */
+		if (!dev->process_private)
+			return;
+		mlx5_tx_uar_uninit_secondary(dev);
+		mlx5_proc_priv_uninit(dev);
+		rte_eth_dev_release_port(dev);
+		return;
+	}
+	if (!priv->sh)
+		return;
 	DRV_LOG(DEBUG, "port %u closing device \"%s\"",
 		dev->data->port_id,
 		((priv->sh->ctx != NULL) ? priv->sh->ctx->device->name : ""));
@@ -1282,16 +1293,13 @@ mlx5_dev_close(struct rte_eth_dev *dev)
 		close(priv->nl_socket_rdma);
 	if (priv->vmwa_context)
 		mlx5_vlan_vmwa_exit(priv->vmwa_context);
-	if (priv->sh) {
-		/*
-		 * Free the shared context in last turn, because the cleanup
-		 * routines above may use some shared fields, like
-		 * mlx5_nl_mac_addr_flush() uses ibdev_path for retrieveing
-		 * ifindex if Netlink fails.
-		 */
-		mlx5_free_shared_ibctx(priv->sh);
-		priv->sh = NULL;
-	}
+	/*
+	 * Free the shared context in last turn, because the cleanup
+	 * routines above may use some shared fields, like
+	 * mlx5_nl_mac_addr_flush() uses ibdev_path for retrieveing
+	 * ifindex if Netlink fails.
+	 */
+	mlx5_free_shared_ibctx(priv->sh);
 	ret = mlx5_hrxq_verify(dev);
 	if (ret)
 		DRV_LOG(WARNING, "port %u some hash Rx queue still remain",
@@ -2164,11 +2172,11 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 		/* Receive command fd from primary process */
 		err = mlx5_mp_req_verbs_cmd_fd(eth_dev);
 		if (err < 0)
-			return NULL;
+			goto err_secondary;
 		/* Remap UAR for Tx queues. */
 		err = mlx5_tx_uar_init_secondary(eth_dev, err);
 		if (err)
-			return NULL;
+			goto err_secondary;
 		/*
 		 * Ethdev pointer is still required as input since
 		 * the primary device is not accessible from the
@@ -2177,6 +2185,9 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 		eth_dev->rx_pkt_burst = mlx5_select_rx_function(eth_dev);
 		eth_dev->tx_pkt_burst = mlx5_select_tx_function(eth_dev);
 		return eth_dev;
+err_secondary:
+		mlx5_dev_close(eth_dev);
+		return NULL;
 	}
 	/*
 	 * Some parameters ("tx_db_nc" in particularly) are needed in
@@ -3445,8 +3456,16 @@ mlx5_pci_remove(struct rte_pci_device *pci_dev)
 {
 	uint16_t port_id;
 
-	RTE_ETH_FOREACH_DEV_OF(port_id, &pci_dev->device)
-		rte_eth_dev_close(port_id);
+	RTE_ETH_FOREACH_DEV_OF(port_id, &pci_dev->device) {
+		/*
+		 * mlx5_dev_close() is not registered to secondary process,
+		 * call the close function explicitly for secondary process.
+		 */
+		if (rte_eal_process_type() == RTE_PROC_SECONDARY)
+			mlx5_dev_close(&rte_eth_devices[port_id]);
+		else
+			rte_eth_dev_close(port_id);
+	}
 	return 0;
 }
 
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index a50f057c1..daa67e2f5 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -429,6 +429,7 @@ int mlx5_tx_hairpin_queue_setup
 	 const struct rte_eth_hairpin_conf *hairpin_conf);
 void mlx5_tx_queue_release(void *dpdk_txq);
 int mlx5_tx_uar_init_secondary(struct rte_eth_dev *dev, int fd);
+void mlx5_tx_uar_uninit_secondary(struct rte_eth_dev *dev);
 struct mlx5_txq_obj *mlx5_txq_obj_new(struct rte_eth_dev *dev, uint16_t idx,
 				      enum mlx5_txq_obj_type type);
 struct mlx5_txq_obj *mlx5_txq_obj_get(struct rte_eth_dev *dev, uint16_t idx);
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 42dcd7a4b..1947e15f6 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -424,6 +424,30 @@ txq_uar_uninit_secondary(struct mlx5_txq_ctrl *txq_ctrl)
 	munmap(RTE_PTR_ALIGN_FLOOR(addr, page_size), page_size);
 }
 
+/**
+ * Deinitialize Tx UAR registers for secondary process.
+ *
+ * @param dev
+ *   Pointer to Ethernet device.
+ */
+void
+mlx5_tx_uar_uninit_secondary(struct rte_eth_dev *dev)
+{
+	struct mlx5_priv *priv = dev->data->dev_private;
+	struct mlx5_txq_data *txq;
+	struct mlx5_txq_ctrl *txq_ctrl;
+	unsigned int i;
+
+	assert(rte_eal_process_type() == RTE_PROC_SECONDARY);
+	for (i = 0; i != priv->txqs_n; ++i) {
+		if (!(*priv->txqs)[i])
+			continue;
+		txq = (*priv->txqs)[i];
+		txq_ctrl = container_of(txq, struct mlx5_txq_ctrl, txq);
+		txq_uar_uninit_secondary(txq_ctrl);
+	}
+}
+
 /**
  * Initialize Tx UAR registers for secondary process.
  *
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.138701107 +0100
+++ 0014-net-mlx5-fix-secondary-process-resources-release.patch	2020-07-24 12:53:48.175004373 +0100
@@ -1,8 +1,10 @@
-From 2786b7bf9084b32dde9a346d92ab1c27f0ffc476 Mon Sep 17 00:00:00 2001
+From f32fd4561c6e74e184e3a30d55e7de6581a24a6f Mon Sep 17 00:00:00 2001
 From: Suanming Mou <suanmingm@mellanox.com>
 Date: Thu, 28 May 2020 14:59:49 +0800
 Subject: [PATCH] net/mlx5: fix secondary process resources release
 
+[ upstream commit 2786b7bf9084b32dde9a346d92ab1c27f0ffc476 ]
+
 When secondary process starts, it will allocate its own process private
 data, and also does remap to UAR register of the Tx queue. Once the
 secondary process exits, these resources should be released accordingly.
@@ -19,7 +21,6 @@
 
 Fixes: 942d13e6e7d1 ("net/mlx5: fix sharing context destroy order")
 Fixes: 3a8207423a0f ("net/mlx5: close all ports on remove")
-Cc: stable@dpdk.org
 
 Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -30,10 +31,10 @@
  3 files changed, 58 insertions(+), 14 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
-index 5589772eb..81102631a 100644
+index 8879df317..1e34f6263 100644
 --- a/drivers/net/mlx5/mlx5.c
 +++ b/drivers/net/mlx5/mlx5.c
-@@ -1423,6 +1423,17 @@ mlx5_dev_close(struct rte_eth_dev *dev)
+@@ -1234,6 +1234,17 @@ mlx5_dev_close(struct rte_eth_dev *dev)
  	unsigned int i;
  	int ret;
  
@@ -51,10 +52,10 @@
  	DRV_LOG(DEBUG, "port %u closing device \"%s\"",
  		dev->data->port_id,
  		((priv->sh->ctx != NULL) ? priv->sh->ctx->device->name : ""));
-@@ -1512,16 +1523,13 @@ mlx5_dev_close(struct rte_eth_dev *dev)
- 	if (ret)
- 		DRV_LOG(WARNING, "port %u some flows still remain",
- 			dev->data->port_id);
+@@ -1282,16 +1293,13 @@ mlx5_dev_close(struct rte_eth_dev *dev)
+ 		close(priv->nl_socket_rdma);
+ 	if (priv->vmwa_context)
+ 		mlx5_vlan_vmwa_exit(priv->vmwa_context);
 -	if (priv->sh) {
 -		/*
 -		 * Free the shared context in last turn, because the cleanup
@@ -72,12 +73,12 @@
 +	 * ifindex if Netlink fails.
 +	 */
 +	mlx5_free_shared_ibctx(priv->sh);
- 	if (priv->domain_id != RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID) {
- 		unsigned int c = 0;
- 		uint16_t port_id;
-@@ -2409,11 +2417,11 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
+ 	ret = mlx5_hrxq_verify(dev);
+ 	if (ret)
+ 		DRV_LOG(WARNING, "port %u some hash Rx queue still remain",
+@@ -2164,11 +2172,11 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
  		/* Receive command fd from primary process */
- 		err = mlx5_mp_req_verbs_cmd_fd(&mp_id);
+ 		err = mlx5_mp_req_verbs_cmd_fd(eth_dev);
  		if (err < 0)
 -			return NULL;
 +			goto err_secondary;
@@ -89,7 +90,7 @@
  		/*
  		 * Ethdev pointer is still required as input since
  		 * the primary device is not accessible from the
-@@ -2422,6 +2430,9 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
+@@ -2177,6 +2185,9 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
  		eth_dev->rx_pkt_burst = mlx5_select_rx_function(eth_dev);
  		eth_dev->tx_pkt_burst = mlx5_select_tx_function(eth_dev);
  		return eth_dev;
@@ -99,7 +100,7 @@
  	}
  	/*
  	 * Some parameters ("tx_db_nc" in particularly) are needed in
-@@ -3707,8 +3718,16 @@ mlx5_pci_remove(struct rte_pci_device *pci_dev)
+@@ -3445,8 +3456,16 @@ mlx5_pci_remove(struct rte_pci_device *pci_dev)
  {
  	uint16_t port_id;
  
@@ -119,10 +120,10 @@
  }
  
 diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
-index 48f2b7941..26621ff19 100644
+index a50f057c1..daa67e2f5 100644
 --- a/drivers/net/mlx5/mlx5_rxtx.h
 +++ b/drivers/net/mlx5/mlx5_rxtx.h
-@@ -434,6 +434,7 @@ int mlx5_tx_hairpin_queue_setup
+@@ -429,6 +429,7 @@ int mlx5_tx_hairpin_queue_setup
  	 const struct rte_eth_hairpin_conf *hairpin_conf);
  void mlx5_tx_queue_release(void *dpdk_txq);
  int mlx5_tx_uar_init_secondary(struct rte_eth_dev *dev, int fd);
@@ -131,10 +132,10 @@
  				      enum mlx5_txq_obj_type type);
  struct mlx5_txq_obj *mlx5_txq_obj_get(struct rte_eth_dev *dev, uint16_t idx);
 diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
-index 80d99ff94..2047a9a4e 100644
+index 42dcd7a4b..1947e15f6 100644
 --- a/drivers/net/mlx5/mlx5_txq.c
 +++ b/drivers/net/mlx5/mlx5_txq.c
-@@ -427,6 +427,30 @@ txq_uar_uninit_secondary(struct mlx5_txq_ctrl *txq_ctrl)
+@@ -424,6 +424,30 @@ txq_uar_uninit_secondary(struct mlx5_txq_ctrl *txq_ctrl)
  	munmap(RTE_PTR_ALIGN_FLOOR(addr, page_size), page_size);
  }
  
@@ -152,7 +153,7 @@
 +	struct mlx5_txq_ctrl *txq_ctrl;
 +	unsigned int i;
 +
-+	MLX5_ASSERT(rte_eal_process_type() == RTE_PROC_SECONDARY);
++	assert(rte_eal_process_type() == RTE_PROC_SECONDARY);
 +	for (i = 0; i != priv->txqs_n; ++i) {
 +		if (!(*priv->txqs)[i])
 +			continue;

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

* [dpdk-stable] patch 'net/mlx5: fix interrupt installation timing' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (12 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: fix secondary process resources release' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/failsafe: fix RSS RETA size info' " luca.boccassi
                   ` (177 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 5da51166d7493f5a99724d8c424c4a9c2eb5b760 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@mellanox.com>
Date: Thu, 28 May 2020 17:22:09 +0800
Subject: [PATCH] net/mlx5: fix interrupt installation timing

[ upstream commit 33860cfab62ed9a3673b1077899c1c527b09e385 ]

Currently, the DevX counter query works asynchronously with Devx
interrupt handler return the query result. When port closes, the
interrupt handler will be uninstalled and the Devx comp obj will
also be destroyed. Meanwhile the query is still not cancelled.

In this case, counter query may use the invalid Devx comp which
has been destroyed, and query failure with invalid FD will be
reported.

Adjust the shared interrupt install and uninstall timing to make
the counter asynchronous query stop before interrupt uninstall.

Fixes: f15db67df09c ("net/mlx5: accelerate DV flow counter query")

Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5.c         | 101 ++++++++++---
 drivers/net/mlx5/mlx5.h         |   5 -
 drivers/net/mlx5/mlx5_ethdev.c  | 243 --------------------------------
 drivers/net/mlx5/mlx5_trigger.c |  16 ++-
 4 files changed, 96 insertions(+), 269 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 1e34f6263..bb718f27f 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -12,6 +12,7 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <net/if.h>
+#include <fcntl.h>
 #include <sys/mman.h>
 #include <linux/rtnetlink.h>
 
@@ -470,6 +471,85 @@ mlx5_restore_doorbell_mapping_env(int value)
 		setenv(MLX5_SHUT_UP_BF, value ? "1" : "0", 1);
 }
 
+/**
+ * Install shared asynchronous device events handler.
+ * This function is implemented to support event sharing
+ * between multiple ports of single IB device.
+ *
+ * @param sh
+ *   Pointer to mlx5_ibv_shared object.
+ */
+static void
+mlx5_dev_shared_handler_install(struct mlx5_ibv_shared *sh)
+{
+	int ret;
+	int flags;
+
+	sh->intr_handle.fd = -1;
+	flags = fcntl(sh->ctx->async_fd, F_GETFL);
+	ret = fcntl(sh->ctx->async_fd, F_SETFL, flags | O_NONBLOCK);
+	if (ret) {
+		DRV_LOG(INFO, "failed to change file descriptor async event"
+			" queue");
+	} else {
+		sh->intr_handle.fd = sh->ctx->async_fd;
+		sh->intr_handle.type = RTE_INTR_HANDLE_EXT;
+		if (rte_intr_callback_register(&sh->intr_handle,
+					mlx5_dev_interrupt_handler, sh)) {
+			DRV_LOG(INFO, "Fail to install the shared interrupt.");
+			sh->intr_handle.fd = -1;
+		}
+	}
+	if (sh->devx) {
+#ifdef HAVE_IBV_DEVX_ASYNC
+		sh->intr_handle_devx.fd = -1;
+		sh->devx_comp = mlx5_glue->devx_create_cmd_comp(sh->ctx);
+		if (!sh->devx_comp) {
+			DRV_LOG(INFO, "failed to allocate devx_comp.");
+			return;
+		}
+		flags = fcntl(sh->devx_comp->fd, F_GETFL);
+		ret = fcntl(sh->devx_comp->fd, F_SETFL, flags | O_NONBLOCK);
+		if (ret) {
+			DRV_LOG(INFO, "failed to change file descriptor"
+				" devx comp");
+			return;
+		}
+		sh->intr_handle_devx.fd = sh->devx_comp->fd;
+		sh->intr_handle_devx.type = RTE_INTR_HANDLE_EXT;
+		if (rte_intr_callback_register(&sh->intr_handle_devx,
+					mlx5_dev_interrupt_handler_devx, sh)) {
+			DRV_LOG(INFO, "Fail to install the devx shared"
+				" interrupt.");
+			sh->intr_handle_devx.fd = -1;
+		}
+#endif /* HAVE_IBV_DEVX_ASYNC */
+	}
+}
+
+/**
+ * Uninstall shared asynchronous device events handler.
+ * This function is implemented to support event sharing
+ * between multiple ports of single IB device.
+ *
+ * @param dev
+ *   Pointer to mlx5_ibv_shared object.
+ */
+static void
+mlx5_dev_shared_handler_uninstall(struct mlx5_ibv_shared *sh)
+{
+	if (sh->intr_handle.fd >= 0)
+		mlx5_intr_callback_unregister(&sh->intr_handle,
+					      mlx5_dev_interrupt_handler, sh);
+#ifdef HAVE_IBV_DEVX_ASYNC
+	if (sh->intr_handle_devx.fd >= 0)
+		rte_intr_callback_unregister(&sh->intr_handle_devx,
+				  mlx5_dev_interrupt_handler_devx, sh);
+	if (sh->devx_comp)
+		mlx5_glue->devx_destroy_cmd_comp(sh->devx_comp);
+#endif
+}
+
 /**
  * Allocate shared IB device context. If there is multiport device the
  * master and representors will share this context, if there is single
@@ -564,7 +644,6 @@ mlx5_alloc_shared_ibctx(const struct mlx5_dev_spawn_data *spawn,
 		sizeof(sh->ibdev_name));
 	strncpy(sh->ibdev_path, sh->ctx->device->ibdev_path,
 		sizeof(sh->ibdev_path));
-	pthread_mutex_init(&sh->intr_mutex, NULL);
 	/*
 	 * Setting port_id to max unallowed value means
 	 * there is no interrupt subhandler installed for
@@ -624,6 +703,7 @@ mlx5_alloc_shared_ibctx(const struct mlx5_dev_spawn_data *spawn,
 		err = rte_errno;
 		goto error;
 	}
+	mlx5_dev_shared_handler_install(sh);
 	mlx5_flow_counters_mng_init(sh);
 	/* Add device to memory callback list. */
 	rte_rwlock_write_lock(&mlx5_shared_data->mem_event_rwlock);
@@ -697,20 +777,7 @@ mlx5_free_shared_ibctx(struct mlx5_ibv_shared *sh)
 	 *  Only primary process handles async device events.
 	 **/
 	mlx5_flow_counters_mng_close(sh);
-	assert(!sh->intr_cnt);
-	if (sh->intr_cnt)
-		mlx5_intr_callback_unregister
-			(&sh->intr_handle, mlx5_dev_interrupt_handler, sh);
-#ifdef HAVE_MLX5_DEVX_ASYNC_SUPPORT
-	if (sh->devx_intr_cnt) {
-		if (sh->intr_handle_devx.fd)
-			rte_intr_callback_unregister(&sh->intr_handle_devx,
-					  mlx5_dev_interrupt_handler_devx, sh);
-		if (sh->devx_comp)
-			mlx5dv_devx_destroy_cmd_comp(sh->devx_comp);
-	}
-#endif
-	pthread_mutex_destroy(&sh->intr_mutex);
+	mlx5_dev_shared_handler_uninstall(sh);
 	if (sh->pd)
 		claim_zero(mlx5_glue->dealloc_pd(sh->pd));
 	if (sh->tis)
@@ -1248,9 +1315,6 @@ mlx5_dev_close(struct rte_eth_dev *dev)
 	DRV_LOG(DEBUG, "port %u closing device \"%s\"",
 		dev->data->port_id,
 		((priv->sh->ctx != NULL) ? priv->sh->ctx->device->name : ""));
-	/* In case mlx5_dev_stop() has not been called. */
-	mlx5_dev_interrupt_handler_uninstall(dev);
-	mlx5_dev_interrupt_handler_devx_uninstall(dev);
 	mlx5_traffic_disable(dev);
 	mlx5_flow_flush(dev, NULL);
 	mlx5_flow_meter_flush(dev, NULL);
@@ -3362,7 +3426,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 		rte_eth_copy_pci_info(list[i].eth_dev, pci_dev);
 		/* Restore non-PCI flags cleared by the above call. */
 		list[i].eth_dev->data->dev_flags |= restore;
-		mlx5_dev_interrupt_handler_devx_install(list[i].eth_dev);
 		rte_eth_dev_probing_finish(list[i].eth_dev);
 	}
 	if (i != ns) {
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index e4af5d40d..e53934d45 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -682,10 +682,7 @@ struct mlx5_ibv_shared {
 		push_vlan_action_list; /* List of push VLAN actions. */
 	struct mlx5_flow_counter_mng cmng; /* Counters management structure. */
 	/* Shared interrupt handler section. */
-	pthread_mutex_t intr_mutex; /* Interrupt config mutex. */
-	uint32_t intr_cnt; /* Interrupt handler reference counter. */
 	struct rte_intr_handle intr_handle; /* Interrupt handler for device. */
-	uint32_t devx_intr_cnt; /* Devx interrupt handler reference counter. */
 	struct rte_intr_handle intr_handle_devx; /* DEVX interrupt handler. */
 	struct mlx5dv_devx_cmd_comp *devx_comp; /* DEVX async comp obj. */
 	struct mlx5_devx_obj *tis; /* TIS object. */
@@ -838,8 +835,6 @@ void mlx5_dev_interrupt_handler(void *arg);
 void mlx5_dev_interrupt_handler_devx(void *arg);
 void mlx5_dev_interrupt_handler_uninstall(struct rte_eth_dev *dev);
 void mlx5_dev_interrupt_handler_install(struct rte_eth_dev *dev);
-void mlx5_dev_interrupt_handler_devx_uninstall(struct rte_eth_dev *dev);
-void mlx5_dev_interrupt_handler_devx_install(struct rte_eth_dev *dev);
 int mlx5_set_link_down(struct rte_eth_dev *dev);
 int mlx5_set_link_up(struct rte_eth_dev *dev);
 int mlx5_is_removed(struct rte_eth_dev *dev);
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 3b4c5dbe7..3b1f18b3f 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -1475,249 +1475,6 @@ mlx5_dev_interrupt_handler_devx(void *cb_arg)
 #endif /* HAVE_IBV_DEVX_ASYNC */
 }
 
-/**
- * Uninstall shared asynchronous device events handler.
- * This function is implemented to support event sharing
- * between multiple ports of single IB device.
- *
- * @param dev
- *   Pointer to Ethernet device.
- */
-static void
-mlx5_dev_shared_handler_uninstall(struct rte_eth_dev *dev)
-{
-	struct mlx5_priv *priv = dev->data->dev_private;
-	struct mlx5_ibv_shared *sh = priv->sh;
-
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-		return;
-	pthread_mutex_lock(&sh->intr_mutex);
-	assert(priv->ibv_port);
-	assert(priv->ibv_port <= sh->max_port);
-	assert(dev->data->port_id < RTE_MAX_ETHPORTS);
-	if (sh->port[priv->ibv_port - 1].ih_port_id >= RTE_MAX_ETHPORTS)
-		goto exit;
-	assert(sh->port[priv->ibv_port - 1].ih_port_id ==
-					(uint32_t)dev->data->port_id);
-	assert(sh->intr_cnt);
-	sh->port[priv->ibv_port - 1].ih_port_id = RTE_MAX_ETHPORTS;
-	if (!sh->intr_cnt || --sh->intr_cnt)
-		goto exit;
-	mlx5_intr_callback_unregister(&sh->intr_handle,
-				     mlx5_dev_interrupt_handler, sh);
-	sh->intr_handle.fd = 0;
-	sh->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN;
-exit:
-	pthread_mutex_unlock(&sh->intr_mutex);
-}
-
-/**
- * Uninstall devx shared asynchronous device events handler.
- * This function is implemeted to support event sharing
- * between multiple ports of single IB device.
- *
- * @param dev
- *   Pointer to Ethernet device.
- */
-static void
-mlx5_dev_shared_handler_devx_uninstall(struct rte_eth_dev *dev)
-{
-	struct mlx5_priv *priv = dev->data->dev_private;
-	struct mlx5_ibv_shared *sh = priv->sh;
-
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-		return;
-	pthread_mutex_lock(&sh->intr_mutex);
-	assert(priv->ibv_port);
-	assert(priv->ibv_port <= sh->max_port);
-	assert(dev->data->port_id < RTE_MAX_ETHPORTS);
-	if (sh->port[priv->ibv_port - 1].devx_ih_port_id >= RTE_MAX_ETHPORTS)
-		goto exit;
-	assert(sh->port[priv->ibv_port - 1].devx_ih_port_id ==
-					(uint32_t)dev->data->port_id);
-	sh->port[priv->ibv_port - 1].devx_ih_port_id = RTE_MAX_ETHPORTS;
-	if (!sh->devx_intr_cnt || --sh->devx_intr_cnt)
-		goto exit;
-	if (sh->intr_handle_devx.fd) {
-		rte_intr_callback_unregister(&sh->intr_handle_devx,
-					     mlx5_dev_interrupt_handler_devx,
-					     sh);
-		sh->intr_handle_devx.fd = 0;
-		sh->intr_handle_devx.type = RTE_INTR_HANDLE_UNKNOWN;
-	}
-	if (sh->devx_comp) {
-		mlx5_glue->devx_destroy_cmd_comp(sh->devx_comp);
-		sh->devx_comp = NULL;
-	}
-exit:
-	pthread_mutex_unlock(&sh->intr_mutex);
-}
-
-/**
- * Install shared asynchronous device events handler.
- * This function is implemented to support event sharing
- * between multiple ports of single IB device.
- *
- * @param dev
- *   Pointer to Ethernet device.
- */
-static void
-mlx5_dev_shared_handler_install(struct rte_eth_dev *dev)
-{
-	struct mlx5_priv *priv = dev->data->dev_private;
-	struct mlx5_ibv_shared *sh = priv->sh;
-	int ret;
-	int flags;
-
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-		return;
-	pthread_mutex_lock(&sh->intr_mutex);
-	assert(priv->ibv_port);
-	assert(priv->ibv_port <= sh->max_port);
-	assert(dev->data->port_id < RTE_MAX_ETHPORTS);
-	if (sh->port[priv->ibv_port - 1].ih_port_id < RTE_MAX_ETHPORTS) {
-		/* The handler is already installed for this port. */
-		assert(sh->intr_cnt);
-		goto exit;
-	}
-	if (sh->intr_cnt) {
-		sh->port[priv->ibv_port - 1].ih_port_id =
-						(uint32_t)dev->data->port_id;
-		sh->intr_cnt++;
-		goto exit;
-	}
-	/* No shared handler installed. */
-	assert(sh->ctx->async_fd > 0);
-	flags = fcntl(sh->ctx->async_fd, F_GETFL);
-	ret = fcntl(sh->ctx->async_fd, F_SETFL, flags | O_NONBLOCK);
-	if (ret) {
-		DRV_LOG(INFO, "failed to change file descriptor async event"
-			" queue");
-		/* Indicate there will be no interrupts. */
-		dev->data->dev_conf.intr_conf.lsc = 0;
-		dev->data->dev_conf.intr_conf.rmv = 0;
-	} else {
-		sh->intr_handle.fd = sh->ctx->async_fd;
-		sh->intr_handle.type = RTE_INTR_HANDLE_EXT;
-		rte_intr_callback_register(&sh->intr_handle,
-					   mlx5_dev_interrupt_handler, sh);
-		sh->intr_cnt++;
-		sh->port[priv->ibv_port - 1].ih_port_id =
-						(uint32_t)dev->data->port_id;
-	}
-exit:
-	pthread_mutex_unlock(&sh->intr_mutex);
-}
-
-/**
- * Install devx shared asyncronous device events handler.
- * This function is implemeted to support event sharing
- * between multiple ports of single IB device.
- *
- * @param dev
- *   Pointer to Ethernet device.
- */
-static void
-mlx5_dev_shared_handler_devx_install(struct rte_eth_dev *dev)
-{
-	struct mlx5_priv *priv = dev->data->dev_private;
-	struct mlx5_ibv_shared *sh = priv->sh;
-
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-		return;
-	pthread_mutex_lock(&sh->intr_mutex);
-	assert(priv->ibv_port);
-	assert(priv->ibv_port <= sh->max_port);
-	assert(dev->data->port_id < RTE_MAX_ETHPORTS);
-	if (sh->port[priv->ibv_port - 1].devx_ih_port_id < RTE_MAX_ETHPORTS) {
-		/* The handler is already installed for this port. */
-		assert(sh->devx_intr_cnt);
-		goto exit;
-	}
-	if (sh->devx_intr_cnt) {
-		sh->devx_intr_cnt++;
-		sh->port[priv->ibv_port - 1].devx_ih_port_id =
-					(uint32_t)dev->data->port_id;
-		goto exit;
-	}
-	if (priv->config.devx) {
-#ifndef HAVE_IBV_DEVX_ASYNC
-		goto exit;
-#else
-		sh->devx_comp = mlx5_glue->devx_create_cmd_comp(sh->ctx);
-		if (sh->devx_comp) {
-			int flags = fcntl(sh->devx_comp->fd, F_GETFL);
-			int ret = fcntl(sh->devx_comp->fd, F_SETFL,
-				    flags | O_NONBLOCK);
-
-			if (ret) {
-				DRV_LOG(INFO, "failed to change file descriptor"
-					" devx async event queue");
-			} else {
-				sh->intr_handle_devx.fd = sh->devx_comp->fd;
-				sh->intr_handle_devx.type = RTE_INTR_HANDLE_EXT;
-				rte_intr_callback_register
-					(&sh->intr_handle_devx,
-					 mlx5_dev_interrupt_handler_devx, sh);
-				sh->devx_intr_cnt++;
-				sh->port[priv->ibv_port - 1].devx_ih_port_id =
-						(uint32_t)dev->data->port_id;
-			}
-		}
-#endif /* HAVE_IBV_DEVX_ASYNC */
-	}
-exit:
-	pthread_mutex_unlock(&sh->intr_mutex);
-}
-
-/**
- * Uninstall interrupt handler.
- *
- * @param dev
- *   Pointer to Ethernet device.
- */
-void
-mlx5_dev_interrupt_handler_uninstall(struct rte_eth_dev *dev)
-{
-	mlx5_dev_shared_handler_uninstall(dev);
-}
-
-/**
- * Install interrupt handler.
- *
- * @param dev
- *   Pointer to Ethernet device.
- */
-void
-mlx5_dev_interrupt_handler_install(struct rte_eth_dev *dev)
-{
-	mlx5_dev_shared_handler_install(dev);
-}
-
-/**
- * Devx uninstall interrupt handler.
- *
- * @param dev
- *   Pointer to Ethernet device.
- */
-void
-mlx5_dev_interrupt_handler_devx_uninstall(struct rte_eth_dev *dev)
-{
-	mlx5_dev_shared_handler_devx_uninstall(dev);
-}
-
-/**
- * Devx install interrupt handler.
- *
- * @param dev
- *   Pointer to Ethernet device.
- */
-void
-mlx5_dev_interrupt_handler_devx_install(struct rte_eth_dev *dev)
-{
-	mlx5_dev_shared_handler_devx_install(dev);
-}
-
 /**
  * DPDK callback to bring the link DOWN.
  *
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 6fc4190f4..04b06e11d 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -327,7 +327,18 @@ mlx5_dev_start(struct rte_eth_dev *dev)
 	dev->rx_pkt_burst = mlx5_select_rx_function(dev);
 	/* Enable datapath on secondary process. */
 	mlx5_mp_req_start_rxtx(dev);
-	mlx5_dev_interrupt_handler_install(dev);
+	if (priv->sh->intr_handle.fd >= 0) {
+		priv->sh->port[priv->ibv_port - 1].ih_port_id =
+					(uint32_t)dev->data->port_id;
+	} else {
+		DRV_LOG(INFO, "port %u starts without LSC and RMV interrupts.",
+			dev->data->port_id);
+		dev->data->dev_conf.intr_conf.lsc = 0;
+		dev->data->dev_conf.intr_conf.rmv = 0;
+	}
+	if (priv->sh->intr_handle_devx.fd >= 0)
+		priv->sh->port[priv->ibv_port - 1].devx_ih_port_id =
+					(uint32_t)dev->data->port_id;
 	return 0;
 error:
 	ret = rte_errno; /* Save rte_errno before cleanup. */
@@ -366,7 +377,8 @@ mlx5_dev_stop(struct rte_eth_dev *dev)
 	mlx5_flow_stop(dev, &priv->flows);
 	mlx5_traffic_disable(dev);
 	mlx5_rx_intr_vec_disable(dev);
-	mlx5_dev_interrupt_handler_uninstall(dev);
+	priv->sh->port[priv->ibv_port - 1].ih_port_id = RTE_MAX_ETHPORTS;
+	priv->sh->port[priv->ibv_port - 1].devx_ih_port_id = RTE_MAX_ETHPORTS;
 	mlx5_txq_stop(dev);
 	mlx5_rxq_stop(dev);
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.183945780 +0100
+++ 0015-net-mlx5-fix-interrupt-installation-timing.patch	2020-07-24 12:53:48.183004522 +0100
@@ -1,8 +1,10 @@
-From 33860cfab62ed9a3673b1077899c1c527b09e385 Mon Sep 17 00:00:00 2001
+From 5da51166d7493f5a99724d8c424c4a9c2eb5b760 Mon Sep 17 00:00:00 2001
 From: Suanming Mou <suanmingm@mellanox.com>
 Date: Thu, 28 May 2020 17:22:09 +0800
 Subject: [PATCH] net/mlx5: fix interrupt installation timing
 
+[ upstream commit 33860cfab62ed9a3673b1077899c1c527b09e385 ]
+
 Currently, the DevX counter query works asynchronously with Devx
 interrupt handler return the query result. When port closes, the
 interrupt handler will be uninstalled and the Devx comp obj will
@@ -16,7 +18,6 @@
 the counter asynchronous query stop before interrupt uninstall.
 
 Fixes: f15db67df09c ("net/mlx5: accelerate DV flow counter query")
-Cc: stable@dpdk.org
 
 Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -24,14 +25,14 @@
  drivers/net/mlx5/mlx5.c         | 101 ++++++++++---
  drivers/net/mlx5/mlx5.h         |   5 -
  drivers/net/mlx5/mlx5_ethdev.c  | 243 --------------------------------
- drivers/net/mlx5/mlx5_trigger.c |  17 ++-
- 4 files changed, 97 insertions(+), 269 deletions(-)
+ drivers/net/mlx5/mlx5_trigger.c |  16 ++-
+ 4 files changed, 96 insertions(+), 269 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
-index 81102631a..469ff7368 100644
+index 1e34f6263..bb718f27f 100644
 --- a/drivers/net/mlx5/mlx5.c
 +++ b/drivers/net/mlx5/mlx5.c
-@@ -10,6 +10,7 @@
+@@ -12,6 +12,7 @@
  #include <stdlib.h>
  #include <errno.h>
  #include <net/if.h>
@@ -39,7 +40,7 @@
  #include <sys/mman.h>
  #include <linux/rtnetlink.h>
  
-@@ -655,6 +656,85 @@ mlx5_restore_doorbell_mapping_env(int value)
+@@ -470,6 +471,85 @@ mlx5_restore_doorbell_mapping_env(int value)
  		setenv(MLX5_SHUT_UP_BF, value ? "1" : "0", 1);
  }
  
@@ -125,7 +126,7 @@
  /**
   * Allocate shared IB device context. If there is multiport device the
   * master and representors will share this context, if there is single
-@@ -749,7 +829,6 @@ mlx5_alloc_shared_ibctx(const struct mlx5_dev_spawn_data *spawn,
+@@ -564,7 +644,6 @@ mlx5_alloc_shared_ibctx(const struct mlx5_dev_spawn_data *spawn,
  		sizeof(sh->ibdev_name));
  	strncpy(sh->ibdev_path, sh->ctx->device->ibdev_path,
  		sizeof(sh->ibdev_path));
@@ -133,19 +134,19 @@
  	/*
  	 * Setting port_id to max unallowed value means
  	 * there is no interrupt subhandler installed for
-@@ -810,6 +889,7 @@ mlx5_alloc_shared_ibctx(const struct mlx5_dev_spawn_data *spawn,
+@@ -624,6 +703,7 @@ mlx5_alloc_shared_ibctx(const struct mlx5_dev_spawn_data *spawn,
  		err = rte_errno;
  		goto error;
  	}
 +	mlx5_dev_shared_handler_install(sh);
- 	mlx5_flow_aging_init(sh);
  	mlx5_flow_counters_mng_init(sh);
- 	mlx5_flow_ipool_create(sh, config);
-@@ -886,20 +966,7 @@ mlx5_free_shared_ibctx(struct mlx5_ibv_shared *sh)
+ 	/* Add device to memory callback list. */
+ 	rte_rwlock_write_lock(&mlx5_shared_data->mem_event_rwlock);
+@@ -697,20 +777,7 @@ mlx5_free_shared_ibctx(struct mlx5_ibv_shared *sh)
+ 	 *  Only primary process handles async device events.
  	 **/
  	mlx5_flow_counters_mng_close(sh);
- 	mlx5_flow_ipool_destroy(sh);
--	MLX5_ASSERT(!sh->intr_cnt);
+-	assert(!sh->intr_cnt);
 -	if (sh->intr_cnt)
 -		mlx5_intr_callback_unregister
 -			(&sh->intr_handle, mlx5_dev_interrupt_handler, sh);
@@ -163,17 +164,17 @@
  	if (sh->pd)
  		claim_zero(mlx5_glue->dealloc_pd(sh->pd));
  	if (sh->tis)
-@@ -1437,9 +1504,6 @@ mlx5_dev_close(struct rte_eth_dev *dev)
+@@ -1248,9 +1315,6 @@ mlx5_dev_close(struct rte_eth_dev *dev)
  	DRV_LOG(DEBUG, "port %u closing device \"%s\"",
  		dev->data->port_id,
  		((priv->sh->ctx != NULL) ? priv->sh->ctx->device->name : ""));
 -	/* In case mlx5_dev_stop() has not been called. */
 -	mlx5_dev_interrupt_handler_uninstall(dev);
 -	mlx5_dev_interrupt_handler_devx_uninstall(dev);
- 	/*
- 	 * If default mreg copy action is removed at the stop stage,
- 	 * the search will return none and nothing will be done anymore.
-@@ -3624,7 +3688,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+ 	mlx5_traffic_disable(dev);
+ 	mlx5_flow_flush(dev, NULL);
+ 	mlx5_flow_meter_flush(dev, NULL);
+@@ -3362,7 +3426,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
  		rte_eth_copy_pci_info(list[i].eth_dev, pci_dev);
  		/* Restore non-PCI flags cleared by the above call. */
  		list[i].eth_dev->data->dev_flags |= restore;
@@ -182,12 +183,12 @@
  	}
  	if (i != ns) {
 diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
-index d9f5d816f..2908c8b8d 100644
+index e4af5d40d..e53934d45 100644
 --- a/drivers/net/mlx5/mlx5.h
 +++ b/drivers/net/mlx5/mlx5.h
-@@ -512,10 +512,7 @@ struct mlx5_ibv_shared {
- 	struct mlx5_indexed_pool *ipool[MLX5_IPOOL_MAX];
- 	/* Memory Pool for mlx5 flow resources. */
+@@ -682,10 +682,7 @@ struct mlx5_ibv_shared {
+ 		push_vlan_action_list; /* List of push VLAN actions. */
+ 	struct mlx5_flow_counter_mng cmng; /* Counters management structure. */
  	/* Shared interrupt handler section. */
 -	pthread_mutex_t intr_mutex; /* Interrupt config mutex. */
 -	uint32_t intr_cnt; /* Interrupt handler reference counter. */
@@ -196,7 +197,7 @@
  	struct rte_intr_handle intr_handle_devx; /* DEVX interrupt handler. */
  	struct mlx5dv_devx_cmd_comp *devx_comp; /* DEVX async comp obj. */
  	struct mlx5_devx_obj *tis; /* TIS object. */
-@@ -671,8 +668,6 @@ void mlx5_dev_interrupt_handler(void *arg);
+@@ -838,8 +835,6 @@ void mlx5_dev_interrupt_handler(void *arg);
  void mlx5_dev_interrupt_handler_devx(void *arg);
  void mlx5_dev_interrupt_handler_uninstall(struct rte_eth_dev *dev);
  void mlx5_dev_interrupt_handler_install(struct rte_eth_dev *dev);
@@ -206,10 +207,10 @@
  int mlx5_set_link_up(struct rte_eth_dev *dev);
  int mlx5_is_removed(struct rte_eth_dev *dev);
 diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
-index 47f11b963..b837ce636 100644
+index 3b4c5dbe7..3b1f18b3f 100644
 --- a/drivers/net/mlx5/mlx5_ethdev.c
 +++ b/drivers/net/mlx5/mlx5_ethdev.c
-@@ -1444,249 +1444,6 @@ mlx5_dev_interrupt_handler_devx(void *cb_arg)
+@@ -1475,249 +1475,6 @@ mlx5_dev_interrupt_handler_devx(void *cb_arg)
  #endif /* HAVE_IBV_DEVX_ASYNC */
  }
  
@@ -230,14 +231,14 @@
 -	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 -		return;
 -	pthread_mutex_lock(&sh->intr_mutex);
--	MLX5_ASSERT(priv->ibv_port);
--	MLX5_ASSERT(priv->ibv_port <= sh->max_port);
--	MLX5_ASSERT(dev->data->port_id < RTE_MAX_ETHPORTS);
+-	assert(priv->ibv_port);
+-	assert(priv->ibv_port <= sh->max_port);
+-	assert(dev->data->port_id < RTE_MAX_ETHPORTS);
 -	if (sh->port[priv->ibv_port - 1].ih_port_id >= RTE_MAX_ETHPORTS)
 -		goto exit;
--	MLX5_ASSERT(sh->port[priv->ibv_port - 1].ih_port_id ==
+-	assert(sh->port[priv->ibv_port - 1].ih_port_id ==
 -					(uint32_t)dev->data->port_id);
--	MLX5_ASSERT(sh->intr_cnt);
+-	assert(sh->intr_cnt);
 -	sh->port[priv->ibv_port - 1].ih_port_id = RTE_MAX_ETHPORTS;
 -	if (!sh->intr_cnt || --sh->intr_cnt)
 -		goto exit;
@@ -266,13 +267,13 @@
 -	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 -		return;
 -	pthread_mutex_lock(&sh->intr_mutex);
--	MLX5_ASSERT(priv->ibv_port);
--	MLX5_ASSERT(priv->ibv_port <= sh->max_port);
--	MLX5_ASSERT(dev->data->port_id < RTE_MAX_ETHPORTS);
+-	assert(priv->ibv_port);
+-	assert(priv->ibv_port <= sh->max_port);
+-	assert(dev->data->port_id < RTE_MAX_ETHPORTS);
 -	if (sh->port[priv->ibv_port - 1].devx_ih_port_id >= RTE_MAX_ETHPORTS)
 -		goto exit;
--	MLX5_ASSERT(sh->port[priv->ibv_port - 1].devx_ih_port_id ==
--		    (uint32_t)dev->data->port_id);
+-	assert(sh->port[priv->ibv_port - 1].devx_ih_port_id ==
+-					(uint32_t)dev->data->port_id);
 -	sh->port[priv->ibv_port - 1].devx_ih_port_id = RTE_MAX_ETHPORTS;
 -	if (!sh->devx_intr_cnt || --sh->devx_intr_cnt)
 -		goto exit;
@@ -310,12 +311,12 @@
 -	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 -		return;
 -	pthread_mutex_lock(&sh->intr_mutex);
--	MLX5_ASSERT(priv->ibv_port);
--	MLX5_ASSERT(priv->ibv_port <= sh->max_port);
--	MLX5_ASSERT(dev->data->port_id < RTE_MAX_ETHPORTS);
+-	assert(priv->ibv_port);
+-	assert(priv->ibv_port <= sh->max_port);
+-	assert(dev->data->port_id < RTE_MAX_ETHPORTS);
 -	if (sh->port[priv->ibv_port - 1].ih_port_id < RTE_MAX_ETHPORTS) {
 -		/* The handler is already installed for this port. */
--		MLX5_ASSERT(sh->intr_cnt);
+-		assert(sh->intr_cnt);
 -		goto exit;
 -	}
 -	if (sh->intr_cnt) {
@@ -325,7 +326,7 @@
 -		goto exit;
 -	}
 -	/* No shared handler installed. */
--	MLX5_ASSERT(sh->ctx->async_fd > 0);
+-	assert(sh->ctx->async_fd > 0);
 -	flags = fcntl(sh->ctx->async_fd, F_GETFL);
 -	ret = fcntl(sh->ctx->async_fd, F_SETFL, flags | O_NONBLOCK);
 -	if (ret) {
@@ -364,12 +365,12 @@
 -	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 -		return;
 -	pthread_mutex_lock(&sh->intr_mutex);
--	MLX5_ASSERT(priv->ibv_port);
--	MLX5_ASSERT(priv->ibv_port <= sh->max_port);
--	MLX5_ASSERT(dev->data->port_id < RTE_MAX_ETHPORTS);
+-	assert(priv->ibv_port);
+-	assert(priv->ibv_port <= sh->max_port);
+-	assert(dev->data->port_id < RTE_MAX_ETHPORTS);
 -	if (sh->port[priv->ibv_port - 1].devx_ih_port_id < RTE_MAX_ETHPORTS) {
 -		/* The handler is already installed for this port. */
--		MLX5_ASSERT(sh->devx_intr_cnt);
+-		assert(sh->devx_intr_cnt);
 -		goto exit;
 -	}
 -	if (sh->devx_intr_cnt) {
@@ -460,18 +461,10 @@
   * DPDK callback to bring the link DOWN.
   *
 diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
-index 8106598ff..f12319376 100644
+index 6fc4190f4..04b06e11d 100644
 --- a/drivers/net/mlx5/mlx5_trigger.c
 +++ b/drivers/net/mlx5/mlx5_trigger.c
-@@ -269,6 +269,7 @@ error:
- int
- mlx5_dev_start(struct rte_eth_dev *dev)
- {
-+	struct mlx5_priv *priv = dev->data->dev_private;
- 	int ret;
- 	int fine_inline;
- 
-@@ -340,7 +341,18 @@ mlx5_dev_start(struct rte_eth_dev *dev)
+@@ -327,7 +327,18 @@ mlx5_dev_start(struct rte_eth_dev *dev)
  	dev->rx_pkt_burst = mlx5_select_rx_function(dev);
  	/* Enable datapath on secondary process. */
  	mlx5_mp_req_start_rxtx(dev);
@@ -491,9 +484,9 @@
  	return 0;
  error:
  	ret = rte_errno; /* Save rte_errno before cleanup. */
-@@ -382,7 +394,8 @@ mlx5_dev_stop(struct rte_eth_dev *dev)
- 	/* All RX queue flags will be cleared in the flush interface. */
- 	mlx5_flow_list_flush(dev, &priv->flows, true);
+@@ -366,7 +377,8 @@ mlx5_dev_stop(struct rte_eth_dev *dev)
+ 	mlx5_flow_stop(dev, &priv->flows);
+ 	mlx5_traffic_disable(dev);
  	mlx5_rx_intr_vec_disable(dev);
 -	mlx5_dev_interrupt_handler_uninstall(dev);
 +	priv->sh->port[priv->ibv_port - 1].ih_port_id = RTE_MAX_ETHPORTS;

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

* [dpdk-stable] patch 'net/failsafe: fix RSS RETA size info' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (13 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: fix interrupt installation timing' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: fix vectorized Rx burst termination' " luca.boccassi
                   ` (176 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Ian Dolzhansky
  Cc: Andrew Rybchenko, Gaetan Rivet, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From d307ec9062a72b247154d657b041323b734264b7 Mon Sep 17 00:00:00 2001
From: Ian Dolzhansky <ian.dolzhansky@oktetlabs.ru>
Date: Wed, 27 May 2020 15:34:33 +0100
Subject: [PATCH] net/failsafe: fix RSS RETA size info

[ upstream commit 6e8bdf7266db71f43f47f40704ab1122f60c3f17 ]

Failsafe driver has been indicating zero for RSS redirection table size
after device info reporting had been reworked. Report proper value.

Fixes: 4586be3743d4 ("net/failsafe: fix reported device info")

Signed-off-by: Ian Dolzhansky <ian.dolzhansky@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Gaetan Rivet <grive@u256.net>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/failsafe/failsafe_ops.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c
index e1d08e46c..96f7e456f 100644
--- a/drivers/net/failsafe/failsafe_ops.c
+++ b/drivers/net/failsafe/failsafe_ops.c
@@ -1068,6 +1068,13 @@ fs_dev_merge_info(struct rte_eth_dev_info *info,
 	info->rx_queue_offload_capa &= sinfo->rx_queue_offload_capa;
 	info->tx_queue_offload_capa &= sinfo->tx_queue_offload_capa;
 	info->flow_type_rss_offloads &= sinfo->flow_type_rss_offloads;
+
+	/*
+	 * RETA size is a GCD of RETA sizes indicated by sub-devices.
+	 * Each of these sizes is a power of 2, so use the lower one.
+	 */
+	info->reta_size = RTE_MIN(info->reta_size, sinfo->reta_size);
+
 	info->hash_key_size = RTE_MIN(info->hash_key_size,
 				      sinfo->hash_key_size);
 }
@@ -1119,6 +1126,7 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
 	infos->max_hash_mac_addrs = UINT32_MAX;
 	infos->max_vfs = UINT16_MAX;
 	infos->max_vmdq_pools = UINT16_MAX;
+	infos->reta_size = UINT16_MAX;
 	infos->hash_key_size = UINT8_MAX;
 
 	/*
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.225027465 +0100
+++ 0016-net-failsafe-fix-RSS-RETA-size-info.patch	2020-07-24 12:53:48.183004522 +0100
@@ -1,13 +1,14 @@
-From 6e8bdf7266db71f43f47f40704ab1122f60c3f17 Mon Sep 17 00:00:00 2001
+From d307ec9062a72b247154d657b041323b734264b7 Mon Sep 17 00:00:00 2001
 From: Ian Dolzhansky <ian.dolzhansky@oktetlabs.ru>
 Date: Wed, 27 May 2020 15:34:33 +0100
 Subject: [PATCH] net/failsafe: fix RSS RETA size info
 
+[ upstream commit 6e8bdf7266db71f43f47f40704ab1122f60c3f17 ]
+
 Failsafe driver has been indicating zero for RSS redirection table size
 after device info reporting had been reworked. Report proper value.
 
 Fixes: 4586be3743d4 ("net/failsafe: fix reported device info")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ian Dolzhansky <ian.dolzhansky@oktetlabs.ru>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

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

* [dpdk-stable] patch 'net/mlx5: fix vectorized Rx burst termination' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (14 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/failsafe: fix RSS RETA size info' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: remove unsupported VLAN capabilities' " luca.boccassi
                   ` (175 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From e4e924134232556d751dd9aa192c1123c9544a8a Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@mellanox.com>
Date: Tue, 2 Jun 2020 03:50:41 +0000
Subject: [PATCH] net/mlx5: fix vectorized Rx burst termination

[ upstream commit c9cc554ba423641d3515671269c5648dab3bb9ad ]

Maximum burst size of Vectorized Rx burst routine is set to
MLX5_VPMD_RX_MAX_BURST(64). This limits the performance of any
application that would like to gather more than 64 packets from
the single Rx burst for batch processing (i.e. VPP).

The situation gets worse with a mix of zipped and unzipped CQEs.
They are processed separately and the Rx burst function returns
small number of packets every call.

Repeat the cycle of gathering packets from the vectorized Rx routine
until a requested number of packets are collected or there are no
more CQEs left to process.

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

Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx_vec.c         | 17 ++++++++++++-----
 drivers/net/mlx5/mlx5_rxtx_vec_altivec.h | 13 ++++++++++---
 drivers/net/mlx5/mlx5_rxtx_vec_neon.h    | 13 ++++++++++---
 drivers/net/mlx5/mlx5_rxtx_vec_sse.h     | 13 ++++++++++---
 4 files changed, 42 insertions(+), 14 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.c b/drivers/net/mlx5/mlx5_rxtx_vec.c
index d85f90874..dbb4cfaeb 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec.c
+++ b/drivers/net/mlx5/mlx5_rxtx_vec.c
@@ -103,13 +103,20 @@ uint16_t
 mlx5_rx_burst_vec(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 {
 	struct mlx5_rxq_data *rxq = dpdk_rxq;
-	uint16_t nb_rx;
+	uint16_t nb_rx = 0;
+	uint16_t tn = 0;
 	uint64_t err = 0;
+	bool no_cq = false;
 
-	nb_rx = rxq_burst_v(rxq, pkts, pkts_n, &err);
-	if (unlikely(err | rxq->err_state))
-		nb_rx = rxq_handle_pending_error(rxq, pkts, nb_rx);
-	return nb_rx;
+	do {
+		nb_rx = rxq_burst_v(rxq, pkts + tn, pkts_n - tn, &err, &no_cq);
+		if (unlikely(err | rxq->err_state))
+			nb_rx = rxq_handle_pending_error(rxq, pkts + tn, nb_rx);
+		tn += nb_rx;
+		if (unlikely(no_cq))
+			break;
+	} while (tn != pkts_n);
+	return tn;
 }
 
 /**
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
index feb17fe1c..c167672f5 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
@@ -564,13 +564,15 @@ rxq_cq_to_ptype_oflags_v(struct mlx5_rxq_data *rxq,
  * @param[out] err
  *   Pointer to a flag. Set non-zero value if pkts array has at least one error
  *   packet to handle.
+ * @param[out] no_cq
+ *  Pointer to a boolean. Set true if no new CQE seen.
  *
  * @return
  *   Number of packets received including errors (<= pkts_n).
  */
 static inline uint16_t
 rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
-	    uint64_t *err)
+	    uint64_t *err, bool *no_cq)
 {
 	const uint16_t q_n = 1 << rxq->cqe_n;
 	const uint16_t q_mask = q_n - 1;
@@ -663,8 +665,10 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
 	/* Not to cross queue end. */
 	pkts_n = RTE_MIN(pkts_n, q_n - elts_idx);
 	pkts_n = RTE_MIN(pkts_n, q_n - cq_idx);
-	if (!pkts_n)
+	if (!pkts_n) {
+		*no_cq = !rcvd_pkt;
 		return rcvd_pkt;
+	}
 	/* At this point, there shouldn't be any remaining packets. */
 	assert(rxq->decompressed == 0);
 
@@ -1079,8 +1083,10 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
 			break;
 	}
 	/* If no new CQE seen, return without updating cq_db. */
-	if (unlikely(!nocmp_n && comp_idx == MLX5_VPMD_DESCS_PER_LOOP))
+	if (unlikely(!nocmp_n && comp_idx == MLX5_VPMD_DESCS_PER_LOOP)) {
+		*no_cq = true;
 		return rcvd_pkt;
+	}
 	/* Update the consumer indexes for non-compressed CQEs. */
 	assert(nocmp_n <= pkts_n);
 	rxq->cq_ci += nocmp_n;
@@ -1108,6 +1114,7 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
 	}
 	rte_compiler_barrier();
 	*rxq->cq_db = rte_cpu_to_be_32(rxq->cq_ci);
+	*no_cq = !rcvd_pkt;
 	return rcvd_pkt;
 }
 
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
index f92ece429..b2cf857fd 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
@@ -377,13 +377,15 @@ rxq_cq_to_ptype_oflags_v(struct mlx5_rxq_data *rxq,
  * @param[out] err
  *   Pointer to a flag. Set non-zero value if pkts array has at least one error
  *   packet to handle.
+ * @param[out] no_cq
+ *   Pointer to a boolean. Set true if no new CQE seen.
  *
  * @return
  *   Number of packets received including errors (<= pkts_n).
  */
 static inline uint16_t
 rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
-	    uint64_t *err)
+	    uint64_t *err, bool *no_cq)
 {
 	const uint16_t q_n = 1 << rxq->cqe_n;
 	const uint16_t q_mask = q_n - 1;
@@ -484,8 +486,10 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
 	/* Not to cross queue end. */
 	pkts_n = RTE_MIN(pkts_n, q_n - elts_idx);
 	pkts_n = RTE_MIN(pkts_n, q_n - cq_idx);
-	if (!pkts_n)
+	if (!pkts_n) {
+		*no_cq = !rcvd_pkt;
 		return rcvd_pkt;
+	}
 	/* At this point, there shouldn't be any remained packets. */
 	assert(rxq->decompressed == 0);
 	/*
@@ -744,8 +748,10 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
 			break;
 	}
 	/* If no new CQE seen, return without updating cq_db. */
-	if (unlikely(!nocmp_n && comp_idx == MLX5_VPMD_DESCS_PER_LOOP))
+	if (unlikely(!nocmp_n && comp_idx == MLX5_VPMD_DESCS_PER_LOOP)) {
+		*no_cq = true;
 		return rcvd_pkt;
+	}
 	/* Update the consumer indexes for non-compressed CQEs. */
 	assert(nocmp_n <= pkts_n);
 	rxq->cq_ci += nocmp_n;
@@ -773,6 +779,7 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
 	}
 	rte_cio_wmb();
 	*rxq->cq_db = rte_cpu_to_be_32(rxq->cq_ci);
+	*no_cq = !rcvd_pkt;
 	return rcvd_pkt;
 }
 
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
index bb59163a2..9935299d5 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
@@ -383,13 +383,15 @@ rxq_cq_to_ptype_oflags_v(struct mlx5_rxq_data *rxq, __m128i cqes[4],
  * @param[out] err
  *   Pointer to a flag. Set non-zero value if pkts array has at least one error
  *   packet to handle.
+ * @param[out] no_cq
+ *   Pointer to a boolean. Set true if no new CQE seen.
  *
  * @return
  *   Number of packets received including errors (<= pkts_n).
  */
 static inline uint16_t
 rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
-	    uint64_t *err)
+	    uint64_t *err, bool *no_cq)
 {
 	const uint16_t q_n = 1 << rxq->cqe_n;
 	const uint16_t q_mask = q_n - 1;
@@ -471,8 +473,10 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
 	/* Not to cross queue end. */
 	pkts_n = RTE_MIN(pkts_n, q_n - elts_idx);
 	pkts_n = RTE_MIN(pkts_n, q_n - cq_idx);
-	if (!pkts_n)
+	if (!pkts_n) {
+		*no_cq = !rcvd_pkt;
 		return rcvd_pkt;
+	}
 	/* At this point, there shouldn't be any remained packets. */
 	assert(rxq->decompressed == 0);
 	/*
@@ -694,8 +698,10 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
 			break;
 	}
 	/* If no new CQE seen, return without updating cq_db. */
-	if (unlikely(!nocmp_n && comp_idx == MLX5_VPMD_DESCS_PER_LOOP))
+	if (unlikely(!nocmp_n && comp_idx == MLX5_VPMD_DESCS_PER_LOOP)) {
+		*no_cq = true;
 		return rcvd_pkt;
+	}
 	/* Update the consumer indexes for non-compressed CQEs. */
 	assert(nocmp_n <= pkts_n);
 	rxq->cq_ci += nocmp_n;
@@ -723,6 +729,7 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
 	}
 	rte_compiler_barrier();
 	*rxq->cq_db = rte_cpu_to_be_32(rxq->cq_ci);
+	*no_cq = !rcvd_pkt;
 	return rcvd_pkt;
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.263432540 +0100
+++ 0017-net-mlx5-fix-vectorized-Rx-burst-termination.patch	2020-07-24 12:53:48.187004597 +0100
@@ -1,8 +1,10 @@
-From c9cc554ba423641d3515671269c5648dab3bb9ad Mon Sep 17 00:00:00 2001
+From e4e924134232556d751dd9aa192c1123c9544a8a Mon Sep 17 00:00:00 2001
 From: Alexander Kozyrev <akozyrev@mellanox.com>
 Date: Tue, 2 Jun 2020 03:50:41 +0000
 Subject: [PATCH] net/mlx5: fix vectorized Rx burst termination
 
+[ upstream commit c9cc554ba423641d3515671269c5648dab3bb9ad ]
+
 Maximum burst size of Vectorized Rx burst routine is set to
 MLX5_VPMD_RX_MAX_BURST(64). This limits the performance of any
 application that would like to gather more than 64 packets from
@@ -17,7 +19,6 @@
 more CQEs left to process.
 
 Fixes: 6cb559d67b83 ("net/mlx5: add vectorized Rx/Tx burst for x86")
-Cc: stable@dpdk.org
 
 Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -30,7 +31,7 @@
  4 files changed, 42 insertions(+), 14 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.c b/drivers/net/mlx5/mlx5_rxtx_vec.c
-index 1518bdd5b..b38bd203c 100644
+index d85f90874..dbb4cfaeb 100644
 --- a/drivers/net/mlx5/mlx5_rxtx_vec.c
 +++ b/drivers/net/mlx5/mlx5_rxtx_vec.c
 @@ -103,13 +103,20 @@ uint16_t
@@ -60,7 +61,7 @@
  
  /**
 diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
-index 26715ef45..b55138ac7 100644
+index feb17fe1c..c167672f5 100644
 --- a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
 +++ b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
 @@ -564,13 +564,15 @@ rxq_cq_to_ptype_oflags_v(struct mlx5_rxq_data *rxq,
@@ -90,7 +91,7 @@
  		return rcvd_pkt;
 +	}
  	/* At this point, there shouldn't be any remaining packets. */
- 	MLX5_ASSERT(rxq->decompressed == 0);
+ 	assert(rxq->decompressed == 0);
  
 @@ -1079,8 +1083,10 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
  			break;
@@ -102,7 +103,7 @@
  		return rcvd_pkt;
 +	}
  	/* Update the consumer indexes for non-compressed CQEs. */
- 	MLX5_ASSERT(nocmp_n <= pkts_n);
+ 	assert(nocmp_n <= pkts_n);
  	rxq->cq_ci += nocmp_n;
 @@ -1108,6 +1114,7 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
  	}
@@ -113,10 +114,10 @@
  }
  
 diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
-index ecafbf800..3007c0359 100644
+index f92ece429..b2cf857fd 100644
 --- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
 +++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
-@@ -378,13 +378,15 @@ rxq_cq_to_ptype_oflags_v(struct mlx5_rxq_data *rxq,
+@@ -377,13 +377,15 @@ rxq_cq_to_ptype_oflags_v(struct mlx5_rxq_data *rxq,
   * @param[out] err
   *   Pointer to a flag. Set non-zero value if pkts array has at least one error
   *   packet to handle.
@@ -133,7 +134,7 @@
  {
  	const uint16_t q_n = 1 << rxq->cqe_n;
  	const uint16_t q_mask = q_n - 1;
-@@ -485,8 +487,10 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
+@@ -484,8 +486,10 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
  	/* Not to cross queue end. */
  	pkts_n = RTE_MIN(pkts_n, q_n - elts_idx);
  	pkts_n = RTE_MIN(pkts_n, q_n - cq_idx);
@@ -143,9 +144,9 @@
  		return rcvd_pkt;
 +	}
  	/* At this point, there shouldn't be any remained packets. */
- 	MLX5_ASSERT(rxq->decompressed == 0);
+ 	assert(rxq->decompressed == 0);
  	/*
-@@ -745,8 +749,10 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
+@@ -744,8 +748,10 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
  			break;
  	}
  	/* If no new CQE seen, return without updating cq_db. */
@@ -155,9 +156,9 @@
  		return rcvd_pkt;
 +	}
  	/* Update the consumer indexes for non-compressed CQEs. */
- 	MLX5_ASSERT(nocmp_n <= pkts_n);
+ 	assert(nocmp_n <= pkts_n);
  	rxq->cq_ci += nocmp_n;
-@@ -774,6 +780,7 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
+@@ -773,6 +779,7 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
  	}
  	rte_cio_wmb();
  	*rxq->cq_db = rte_cpu_to_be_32(rxq->cq_ci);
@@ -166,10 +167,10 @@
  }
  
 diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
-index 6847ae782..da5960ad8 100644
+index bb59163a2..9935299d5 100644
 --- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
 +++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
-@@ -385,13 +385,15 @@ rxq_cq_to_ptype_oflags_v(struct mlx5_rxq_data *rxq, __m128i cqes[4],
+@@ -383,13 +383,15 @@ rxq_cq_to_ptype_oflags_v(struct mlx5_rxq_data *rxq, __m128i cqes[4],
   * @param[out] err
   *   Pointer to a flag. Set non-zero value if pkts array has at least one error
   *   packet to handle.
@@ -186,7 +187,7 @@
  {
  	const uint16_t q_n = 1 << rxq->cqe_n;
  	const uint16_t q_mask = q_n - 1;
-@@ -473,8 +475,10 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
+@@ -471,8 +473,10 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
  	/* Not to cross queue end. */
  	pkts_n = RTE_MIN(pkts_n, q_n - elts_idx);
  	pkts_n = RTE_MIN(pkts_n, q_n - cq_idx);
@@ -196,9 +197,9 @@
  		return rcvd_pkt;
 +	}
  	/* At this point, there shouldn't be any remained packets. */
- 	MLX5_ASSERT(rxq->decompressed == 0);
+ 	assert(rxq->decompressed == 0);
  	/*
-@@ -696,8 +700,10 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
+@@ -694,8 +698,10 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
  			break;
  	}
  	/* If no new CQE seen, return without updating cq_db. */
@@ -208,9 +209,9 @@
  		return rcvd_pkt;
 +	}
  	/* Update the consumer indexes for non-compressed CQEs. */
- 	MLX5_ASSERT(nocmp_n <= pkts_n);
+ 	assert(nocmp_n <= pkts_n);
  	rxq->cq_ci += nocmp_n;
-@@ -725,6 +731,7 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
+@@ -723,6 +729,7 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
  	}
  	rte_compiler_barrier();
  	*rxq->cq_db = rte_cpu_to_be_32(rxq->cq_ci);

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

* [dpdk-stable] patch 'net/hns3: remove unsupported VLAN capabilities' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (15 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: fix vectorized Rx burst termination' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: fix VLAN strip configuration when setting PVID' " luca.boccassi
                   ` (174 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 5fd7ff3abfeec493c1b121953cab71205d2aa45c Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Wed, 3 Jun 2020 17:31:58 +0800
Subject: [PATCH] net/hns3: remove unsupported VLAN capabilities

[ upstream commit 85c420f5941d0a0e463493e7659fe6ed96afc71b ]

This patch removes unsupported vlan capabilities to avoid misleading
users.

Fixes: a5475d61fa34 ("net/hns3: support VF")
Fixes: 1f5ca0b460cd ("net/hns3: support some device operations")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    | 2 --
 drivers/net/hns3/hns3_ethdev_vf.c | 1 -
 2 files changed, 3 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 85d432d36..f2b0fd704 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2379,9 +2379,7 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
 				 DEV_RX_OFFLOAD_KEEP_CRC |
 				 DEV_RX_OFFLOAD_SCATTER |
 				 DEV_RX_OFFLOAD_VLAN_STRIP |
-				 DEV_RX_OFFLOAD_QINQ_STRIP |
 				 DEV_RX_OFFLOAD_VLAN_FILTER |
-				 DEV_RX_OFFLOAD_VLAN_EXTEND |
 				 DEV_RX_OFFLOAD_JUMBO_FRAME |
 				 DEV_RX_OFFLOAD_RSS_HASH);
 	info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 56a1be936..22cd9eb33 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -665,7 +665,6 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
 				 DEV_RX_OFFLOAD_KEEP_CRC |
 				 DEV_RX_OFFLOAD_SCATTER |
 				 DEV_RX_OFFLOAD_VLAN_STRIP |
-				 DEV_RX_OFFLOAD_QINQ_STRIP |
 				 DEV_RX_OFFLOAD_VLAN_FILTER |
 				 DEV_RX_OFFLOAD_JUMBO_FRAME |
 				 DEV_RX_OFFLOAD_RSS_HASH);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.304406636 +0100
+++ 0018-net-hns3-remove-unsupported-VLAN-capabilities.patch	2020-07-24 12:53:48.191004671 +0100
@@ -1,14 +1,15 @@
-From 85c420f5941d0a0e463493e7659fe6ed96afc71b Mon Sep 17 00:00:00 2001
+From 5fd7ff3abfeec493c1b121953cab71205d2aa45c Mon Sep 17 00:00:00 2001
 From: Chengchang Tang <tangchengchang@huawei.com>
 Date: Wed, 3 Jun 2020 17:31:58 +0800
 Subject: [PATCH] net/hns3: remove unsupported VLAN capabilities
 
+[ upstream commit 85c420f5941d0a0e463493e7659fe6ed96afc71b ]
+
 This patch removes unsupported vlan capabilities to avoid misleading
 users.
 
 Fixes: a5475d61fa34 ("net/hns3: support VF")
 Fixes: 1f5ca0b460cd ("net/hns3: support some device operations")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -18,10 +19,10 @@
  2 files changed, 3 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index 33d7c5c7b..4030bd32a 100644
+index 85d432d36..f2b0fd704 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -2461,9 +2461,7 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
+@@ -2379,9 +2379,7 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
  				 DEV_RX_OFFLOAD_KEEP_CRC |
  				 DEV_RX_OFFLOAD_SCATTER |
  				 DEV_RX_OFFLOAD_VLAN_STRIP |
@@ -32,10 +33,10 @@
  				 DEV_RX_OFFLOAD_RSS_HASH);
  	info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
 diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
-index 16d601270..0fdee4d67 100644
+index 56a1be936..22cd9eb33 100644
 --- a/drivers/net/hns3/hns3_ethdev_vf.c
 +++ b/drivers/net/hns3/hns3_ethdev_vf.c
-@@ -908,7 +908,6 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
+@@ -665,7 +665,6 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
  				 DEV_RX_OFFLOAD_KEEP_CRC |
  				 DEV_RX_OFFLOAD_SCATTER |
  				 DEV_RX_OFFLOAD_VLAN_STRIP |

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

* [dpdk-stable] patch 'net/hns3: fix VLAN strip configuration when setting PVID' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (16 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: remove unsupported VLAN capabilities' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: fix VLAN tags reported in Rx' " luca.boccassi
                   ` (173 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From c9e3e5fd3661202efe9859ad75498c55d35868e4 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Wed, 3 Jun 2020 17:31:59 +0800
Subject: [PATCH] net/hns3: fix VLAN strip configuration when setting PVID

[ upstream commit 4c623ca40013c58d73aec67717583e3ee1cb45e3 ]

Currently, based on hns3 PF device, hardware will strip 2 vlan tags when
ULP calls rte_eth_dev_set_vlan_pvid API function to set a PVID whether
vlan strip related offload is turned on by calling rte_eth_dev_configure
or rte_eth_dev_set_vlan_offload API function.

When receiving a QinQ packet with the pvid tag, if ULP does not
configure the vlan strip by the method mentioned above, a layer of vlan
tag will be lost to ULP, which is not the expected result.

It is supposed to configure the vlan strip according to the upper level
process's configuration.

Fixes: 411d23b9eafb ("net/hns3: support VLAN")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 29 +++++++++++++++++------------
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index f2b0fd704..e7eeb7875 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -823,25 +823,28 @@ hns3_update_vlan_filter_entries(struct hns3_adapter *hns,
 }
 
 static int
-hns3_en_rx_strip_all(struct hns3_adapter *hns, int on)
+hns3_en_pvid_strip(struct hns3_adapter *hns, int on)
 {
+	struct hns3_rx_vtag_cfg *old_cfg = &hns->pf.vtag_config.rx_vcfg;
 	struct hns3_rx_vtag_cfg rx_vlan_cfg;
-	struct hns3_hw *hw = &hns->hw;
 	bool rx_strip_en;
 	int ret;
 
-	rx_strip_en = on ? true : false;
-	rx_vlan_cfg.strip_tag1_en = rx_strip_en;
-	rx_vlan_cfg.strip_tag2_en = rx_strip_en;
+	rx_strip_en = old_cfg->rx_vlan_offload_en ? true : false;
+	if (on) {
+		rx_vlan_cfg.strip_tag1_en = rx_strip_en;
+		rx_vlan_cfg.strip_tag2_en = true;
+	} else {
+		rx_vlan_cfg.strip_tag1_en = false;
+		rx_vlan_cfg.strip_tag2_en = rx_strip_en;
+	}
 	rx_vlan_cfg.vlan1_vlan_prionly = false;
 	rx_vlan_cfg.vlan2_vlan_prionly = false;
-	rx_vlan_cfg.rx_vlan_offload_en = rx_strip_en;
+	rx_vlan_cfg.rx_vlan_offload_en = old_cfg->rx_vlan_offload_en;
 
 	ret = hns3_set_vlan_rx_offload_cfg(hns, &rx_vlan_cfg);
-	if (ret) {
-		hns3_err(hw, "enable strip rx failed, ret =%d", ret);
+	if (ret)
 		return ret;
-	}
 
 	hns3_update_rx_offload_cfg(hns, &rx_vlan_cfg);
 	return ret;
@@ -868,13 +871,15 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
 				    HNS3_PORT_BASE_VLAN_DISABLE;
 	ret = hns3_vlan_txvlan_cfg(hns, port_base_vlan_state, pvid);
 	if (ret) {
-		hns3_err(hw, "Failed to config tx vlan, ret =%d", ret);
+		hns3_err(hw, "failed to config tx vlan for pvid, ret = %d",
+			 ret);
 		return ret;
 	}
 
-	ret = hns3_en_rx_strip_all(hns, on);
+	ret = hns3_en_pvid_strip(hns, on);
 	if (ret) {
-		hns3_err(hw, "Failed to config rx vlan strip, ret =%d", ret);
+		hns3_err(hw, "failed to config rx vlan strip for pvid, "
+			 "ret = %d", ret);
 		return ret;
 	}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.352013441 +0100
+++ 0019-net-hns3-fix-VLAN-strip-configuration-when-setting-P.patch	2020-07-24 12:53:48.199004820 +0100
@@ -1,8 +1,10 @@
-From 4c623ca40013c58d73aec67717583e3ee1cb45e3 Mon Sep 17 00:00:00 2001
+From c9e3e5fd3661202efe9859ad75498c55d35868e4 Mon Sep 17 00:00:00 2001
 From: Chengchang Tang <tangchengchang@huawei.com>
 Date: Wed, 3 Jun 2020 17:31:59 +0800
 Subject: [PATCH] net/hns3: fix VLAN strip configuration when setting PVID
 
+[ upstream commit 4c623ca40013c58d73aec67717583e3ee1cb45e3 ]
+
 Currently, based on hns3 PF device, hardware will strip 2 vlan tags when
 ULP calls rte_eth_dev_set_vlan_pvid API function to set a PVID whether
 vlan strip related offload is turned on by calling rte_eth_dev_configure
@@ -16,7 +18,6 @@
 process's configuration.
 
 Fixes: 411d23b9eafb ("net/hns3: support VLAN")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -25,10 +26,10 @@
  1 file changed, 17 insertions(+), 12 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index 4030bd32a..244a3b827 100644
+index f2b0fd704..e7eeb7875 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -832,25 +832,28 @@ hns3_update_vlan_filter_entries(struct hns3_adapter *hns,
+@@ -823,25 +823,28 @@ hns3_update_vlan_filter_entries(struct hns3_adapter *hns,
  }
  
  static int
@@ -66,7 +67,7 @@
  
  	hns3_update_rx_offload_cfg(hns, &rx_vlan_cfg);
  	return ret;
-@@ -877,13 +880,15 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
+@@ -868,13 +871,15 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
  				    HNS3_PORT_BASE_VLAN_DISABLE;
  	ret = hns3_vlan_txvlan_cfg(hns, port_base_vlan_state, pvid);
  	if (ret) {

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

* [dpdk-stable] patch 'net/hns3: fix VLAN tags reported in Rx' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (17 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: fix VLAN strip configuration when setting PVID' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/i40e: enable NEON Rx/Tx in meson' " luca.boccassi
                   ` (172 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Wei Hu (Xavier); +Cc: Chengchang Tang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 7e6fa0689b7ec6566ab96123deb340c409e0d097 Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Wed, 3 Jun 2020 17:32:00 +0800
Subject: [PATCH] net/hns3: fix VLAN tags reported in Rx

[ upstream commit e28bc1476558467b2898abab306b2317bada3d78 ]

Currently, based on hns3 network engine, driver always reports the
incoming packet's VLAN tags to the structure rte_mbuf those are the
output parameter pointers in '.rx_pkt_burst' ops implementation
function, and never reports PKT_RX_VLAN_STRIPPED flag to the structure
rte_mbuf even if Upper Level Process configured hardware strip by
calling rte_eth_dev_configure or rte_eth_dev_set_vlan_offload API
function. It makes the ULP unable to know the stripping of VLAN.

It is supposed to present the stripped flags to the mbuf ol_flags, and
report the right VLAN tag.

And as hardware constraints, the stripped VLAN tag will always in the Rx
descriptor. Even if setting a PVID based on the function, the PVID will
be reported to the Rx descriptor. So the driver need to determine which
VLAN tag should be reported to output the structure rte_mbuf in
'.rx_pkt_burst' ops implementation function named hns3_recv_pkts.

Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")
Fixes: 411d23b9eafb ("net/hns3: support VLAN")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 48 +++++++++++----------------
 drivers/net/hns3/hns3_ethdev.h | 15 +++++----
 drivers/net/hns3/hns3_rxtx.c   | 60 +++++++++++++++++++++++++++++++---
 3 files changed, 83 insertions(+), 40 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index e7eeb7875..f1066c079 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -35,8 +35,6 @@
 #define HNS3_DEFAULT_PORT_CONF_QUEUES_NUM	1
 
 #define HNS3_SERVICE_INTERVAL		1000000 /* us */
-#define HNS3_PORT_BASE_VLAN_DISABLE	0
-#define HNS3_PORT_BASE_VLAN_ENABLE	1
 #define HNS3_INVLID_PVID		0xFFFF
 
 #define HNS3_FILTER_TYPE_VF		0
@@ -303,15 +301,14 @@ static int
 hns3_restore_vlan_table(struct hns3_adapter *hns)
 {
 	struct hns3_user_vlan_table *vlan_entry;
+	struct hns3_hw *hw = &hns->hw;
 	struct hns3_pf *pf = &hns->pf;
 	uint16_t vlan_id;
 	int ret = 0;
 
-	if (pf->port_base_vlan_cfg.state == HNS3_PORT_BASE_VLAN_ENABLE) {
-		ret = hns3_vlan_pvid_configure(hns, pf->port_base_vlan_cfg.pvid,
-					       1);
-		return ret;
-	}
+	if (hw->port_base_vlan_cfg.state == HNS3_PORT_BASE_VLAN_ENABLE)
+		return hns3_vlan_pvid_configure(hns,
+						hw->port_base_vlan_cfg.pvid, 1);
 
 	LIST_FOREACH(vlan_entry, &pf->vlan_list, next) {
 		if (vlan_entry->hd_tbl_status) {
@@ -328,7 +325,7 @@ hns3_restore_vlan_table(struct hns3_adapter *hns)
 static int
 hns3_vlan_filter_configure(struct hns3_adapter *hns, uint16_t vlan_id, int on)
 {
-	struct hns3_pf *pf = &hns->pf;
+	struct hns3_hw *hw = &hns->hw;
 	bool writen_to_tbl = false;
 	int ret = 0;
 
@@ -346,7 +343,7 @@ hns3_vlan_filter_configure(struct hns3_adapter *hns, uint16_t vlan_id, int on)
 	 * vlan list. The vlan id in vlan list will be writen in vlan filter
 	 * table until port base vlan disabled
 	 */
-	if (pf->port_base_vlan_cfg.state == HNS3_PORT_BASE_VLAN_DISABLE) {
+	if (hw->port_base_vlan_cfg.state == HNS3_PORT_BASE_VLAN_DISABLE) {
 		ret = hns3_set_port_vlan_filter(hns, vlan_id, on);
 		writen_to_tbl = true;
 	}
@@ -500,11 +497,10 @@ static int
 hns3_en_hw_strip_rxvtag(struct hns3_adapter *hns, bool enable)
 {
 	struct hns3_rx_vtag_cfg rxvlan_cfg;
-	struct hns3_pf *pf = &hns->pf;
 	struct hns3_hw *hw = &hns->hw;
 	int ret;
 
-	if (pf->port_base_vlan_cfg.state == HNS3_PORT_BASE_VLAN_DISABLE) {
+	if (hw->port_base_vlan_cfg.state == HNS3_PORT_BASE_VLAN_DISABLE) {
 		rxvlan_cfg.strip_tag1_en = false;
 		rxvlan_cfg.strip_tag2_en = enable;
 	} else {
@@ -719,12 +715,12 @@ hns3_vlan_txvlan_cfg(struct hns3_adapter *hns, uint16_t port_base_vlan_state,
 static void
 hns3_store_port_base_vlan_info(struct hns3_adapter *hns, uint16_t pvid, int on)
 {
-	struct hns3_pf *pf = &hns->pf;
+	struct hns3_hw *hw = &hns->hw;
 
-	pf->port_base_vlan_cfg.state = on ?
+	hw->port_base_vlan_cfg.state = on ?
 	    HNS3_PORT_BASE_VLAN_ENABLE : HNS3_PORT_BASE_VLAN_DISABLE;
 
-	pf->port_base_vlan_cfg.pvid = pvid;
+	hw->port_base_vlan_cfg.pvid = pvid;
 }
 
 static void
@@ -768,13 +764,12 @@ static void
 hns3_remove_all_vlan_table(struct hns3_adapter *hns)
 {
 	struct hns3_hw *hw = &hns->hw;
-	struct hns3_pf *pf = &hns->pf;
 	int ret;
 
 	hns3_rm_all_vlan_table(hns, true);
-	if (pf->port_base_vlan_cfg.pvid != HNS3_INVLID_PVID) {
+	if (hw->port_base_vlan_cfg.pvid != HNS3_INVLID_PVID) {
 		ret = hns3_set_port_vlan_filter(hns,
-						pf->port_base_vlan_cfg.pvid, 0);
+						hw->port_base_vlan_cfg.pvid, 0);
 		if (ret) {
 			hns3_err(hw, "Failed to remove all vlan table, ret =%d",
 				 ret);
@@ -788,7 +783,6 @@ hns3_update_vlan_filter_entries(struct hns3_adapter *hns,
 				uint16_t port_base_vlan_state,
 				uint16_t new_pvid, uint16_t old_pvid)
 {
-	struct hns3_pf *pf = &hns->pf;
 	struct hns3_hw *hw = &hns->hw;
 	int ret = 0;
 
@@ -816,7 +810,7 @@ hns3_update_vlan_filter_entries(struct hns3_adapter *hns,
 		}
 	}
 
-	if (new_pvid == pf->port_base_vlan_cfg.pvid)
+	if (new_pvid == hw->port_base_vlan_cfg.pvid)
 		hns3_add_all_vlan_table(hns);
 
 	return ret;
@@ -853,17 +847,16 @@ hns3_en_pvid_strip(struct hns3_adapter *hns, int on)
 static int
 hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
 {
-	struct hns3_pf *pf = &hns->pf;
 	struct hns3_hw *hw = &hns->hw;
 	uint16_t port_base_vlan_state;
 	uint16_t old_pvid;
 	int ret;
 
-	if (on == 0 && pvid != pf->port_base_vlan_cfg.pvid) {
-		if (pf->port_base_vlan_cfg.pvid != HNS3_INVLID_PVID)
+	if (on == 0 && pvid != hw->port_base_vlan_cfg.pvid) {
+		if (hw->port_base_vlan_cfg.pvid != HNS3_INVLID_PVID)
 			hns3_warn(hw, "Invalid operation! As current pvid set "
 				  "is %u, disable pvid %u is invalid",
-				  pf->port_base_vlan_cfg.pvid, pvid);
+				  hw->port_base_vlan_cfg.pvid, pvid);
 		return 0;
 	}
 
@@ -885,7 +878,7 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
 
 	if (pvid == HNS3_INVLID_PVID)
 		goto out;
-	old_pvid = pf->port_base_vlan_cfg.pvid;
+	old_pvid = hw->port_base_vlan_cfg.pvid;
 	ret = hns3_update_vlan_filter_entries(hns, port_base_vlan_state, pvid,
 					      old_pvid);
 	if (ret) {
@@ -921,11 +914,8 @@ hns3_vlan_pvid_set(struct rte_eth_dev *dev, uint16_t pvid, int on)
 static void
 init_port_base_vlan_info(struct hns3_hw *hw)
 {
-	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
-	struct hns3_pf *pf = &hns->pf;
-
-	pf->port_base_vlan_cfg.state = HNS3_PORT_BASE_VLAN_DISABLE;
-	pf->port_base_vlan_cfg.pvid = HNS3_INVLID_PVID;
+	hw->port_base_vlan_cfg.state = HNS3_PORT_BASE_VLAN_DISABLE;
+	hw->port_base_vlan_cfg.pvid = HNS3_INVLID_PVID;
 }
 
 static int
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index cdbfc70b2..e7d9fe0e0 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -161,6 +161,13 @@ struct hns3_fake_queue_data {
 	uint16_t nb_fake_tx_queues; /* Number of fake TX queues. */
 };
 
+#define HNS3_PORT_BASE_VLAN_DISABLE	0
+#define HNS3_PORT_BASE_VLAN_ENABLE	1
+struct hns3_port_base_vlan_config {
+	uint16_t state;
+	uint16_t pvid;
+};
+
 /* Primary process maintains driver state in main thread.
  *
  * +---------------+
@@ -384,6 +391,8 @@ struct hns3_hw {
 	uint16_t tx_qnum_per_tc;    /* TX queue number per TC */
 
 	uint32_t flag;
+
+	struct hns3_port_base_vlan_config port_base_vlan_cfg;
 	/*
 	 * PMD setup and configuration is not thread safe. Since it is not
 	 * performance sensitive, it is better to guarantee thread-safety
@@ -413,11 +422,6 @@ struct hns3_user_vlan_table {
 	uint16_t vlan_id;
 };
 
-struct hns3_port_base_vlan_config {
-	uint16_t state;
-	uint16_t pvid;
-};
-
 /* Vlan tag configuration for RX direction */
 struct hns3_rx_vtag_cfg {
 	uint8_t rx_vlan_offload_en; /* Whether enable rx vlan offload */
@@ -493,7 +497,6 @@ struct hns3_pf {
 	bool support_sfp_query;
 
 	struct hns3_vtag_cfg vtag_config;
-	struct hns3_port_base_vlan_config port_base_vlan_cfg;
 	LIST_HEAD(vlan_tbl, hns3_user_vlan_table) vlan_list;
 
 	struct hns3_fdir_info fdir; /* flow director info */
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index dcaeab267..3251515fe 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -1255,9 +1255,9 @@ rxd_pkt_info_to_pkt_type(uint32_t pkt_info, uint32_t ol_info)
 
 	static const uint32_t l2table[HNS3_L2TBL_NUM] = {
 		RTE_PTYPE_L2_ETHER,
-		RTE_PTYPE_L2_ETHER_VLAN,
 		RTE_PTYPE_L2_ETHER_QINQ,
-		0
+		RTE_PTYPE_L2_ETHER_VLAN,
+		RTE_PTYPE_L2_ETHER_VLAN
 	};
 
 	static const uint32_t l3table[HNS3_L3TBL_NUM] = {
@@ -1450,6 +1450,58 @@ hns3_rx_set_cksum_flag(struct rte_mbuf *rxm, uint64_t packet_type,
 	}
 }
 
+static inline void
+hns3_rxd_to_vlan_tci(struct rte_eth_dev *dev, struct rte_mbuf *mb,
+		     uint32_t l234_info, const struct hns3_desc *rxd)
+{
+#define HNS3_STRP_STATUS_NUM		0x4
+
+#define HNS3_NO_STRP_VLAN_VLD		0x0
+#define HNS3_INNER_STRP_VLAN_VLD	0x1
+#define HNS3_OUTER_STRP_VLAN_VLD	0x2
+	struct hns3_adapter *hns = dev->data->dev_private;
+	struct hns3_hw *hw = &hns->hw;
+	uint32_t strip_status;
+	uint32_t report_mode;
+
+	/*
+	 * Since HW limitation, the vlan tag will always be inserted into RX
+	 * descriptor when strip the tag from packet, driver needs to determine
+	 * reporting which tag to mbuf according to the PVID configuration
+	 * and vlan striped status.
+	 */
+	static const uint32_t report_type[][HNS3_STRP_STATUS_NUM] = {
+		{
+			HNS3_NO_STRP_VLAN_VLD,
+			HNS3_OUTER_STRP_VLAN_VLD,
+			HNS3_INNER_STRP_VLAN_VLD,
+			HNS3_OUTER_STRP_VLAN_VLD
+		},
+		{
+			HNS3_NO_STRP_VLAN_VLD,
+			HNS3_NO_STRP_VLAN_VLD,
+			HNS3_NO_STRP_VLAN_VLD,
+			HNS3_INNER_STRP_VLAN_VLD
+		}
+	};
+	strip_status = hns3_get_field(l234_info, HNS3_RXD_STRP_TAGP_M,
+				      HNS3_RXD_STRP_TAGP_S);
+	report_mode = report_type[hw->port_base_vlan_cfg.state][strip_status];
+	switch (report_mode) {
+	case HNS3_NO_STRP_VLAN_VLD:
+		mb->vlan_tci = 0;
+		return;
+	case HNS3_INNER_STRP_VLAN_VLD:
+		mb->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
+		mb->vlan_tci = rte_le_to_cpu_16(rxd->rx.vlan_tag);
+		return;
+	case HNS3_OUTER_STRP_VLAN_VLD:
+		mb->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
+		mb->vlan_tci = rte_le_to_cpu_16(rxd->rx.ot_vlan_tag);
+		return;
+	}
+}
+
 uint16_t
 hns3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 {
@@ -1625,10 +1677,8 @@ hns3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 			hns3_rx_set_cksum_flag(first_seg,
 					       first_seg->packet_type,
 					       cksum_err);
+		hns3_rxd_to_vlan_tci(dev, first_seg, l234_info, &rxd);
 
-		first_seg->vlan_tci = rte_le_to_cpu_16(rxd.rx.vlan_tag);
-		first_seg->vlan_tci_outer =
-			rte_le_to_cpu_16(rxd.rx.ot_vlan_tag);
 		rx_pkts[nb_rx++] = first_seg;
 		first_seg = NULL;
 		continue;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.391038171 +0100
+++ 0020-net-hns3-fix-VLAN-tags-reported-in-Rx.patch	2020-07-24 12:53:48.207004969 +0100
@@ -1,8 +1,10 @@
-From e28bc1476558467b2898abab306b2317bada3d78 Mon Sep 17 00:00:00 2001
+From 7e6fa0689b7ec6566ab96123deb340c409e0d097 Mon Sep 17 00:00:00 2001
 From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
 Date: Wed, 3 Jun 2020 17:32:00 +0800
 Subject: [PATCH] net/hns3: fix VLAN tags reported in Rx
 
+[ upstream commit e28bc1476558467b2898abab306b2317bada3d78 ]
+
 Currently, based on hns3 network engine, driver always reports the
 incoming packet's VLAN tags to the structure rte_mbuf those are the
 output parameter pointers in '.rx_pkt_burst' ops implementation
@@ -22,18 +24,17 @@
 
 Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")
 Fixes: 411d23b9eafb ("net/hns3: support VLAN")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
 ---
- drivers/net/hns3/hns3_ethdev.c | 44 ++++++++++---------------
+ drivers/net/hns3/hns3_ethdev.c | 48 +++++++++++----------------
  drivers/net/hns3/hns3_ethdev.h | 15 +++++----
  drivers/net/hns3/hns3_rxtx.c   | 60 +++++++++++++++++++++++++++++++---
- 3 files changed, 82 insertions(+), 37 deletions(-)
+ 3 files changed, 83 insertions(+), 40 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index 244a3b827..62d87582d 100644
+index e7eeb7875..f1066c079 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
 @@ -35,8 +35,6 @@
@@ -45,7 +46,7 @@
  #define HNS3_INVLID_PVID		0xFFFF
  
  #define HNS3_FILTER_TYPE_VF		0
-@@ -313,13 +311,14 @@ static int
+@@ -303,15 +301,14 @@ static int
  hns3_restore_vlan_table(struct hns3_adapter *hns)
  {
  	struct hns3_user_vlan_table *vlan_entry;
@@ -54,15 +55,18 @@
  	uint16_t vlan_id;
  	int ret = 0;
  
--	if (pf->port_base_vlan_cfg.state == HNS3_PORT_BASE_VLAN_ENABLE)
+-	if (pf->port_base_vlan_cfg.state == HNS3_PORT_BASE_VLAN_ENABLE) {
+-		ret = hns3_vlan_pvid_configure(hns, pf->port_base_vlan_cfg.pvid,
+-					       1);
+-		return ret;
+-	}
 +	if (hw->port_base_vlan_cfg.state == HNS3_PORT_BASE_VLAN_ENABLE)
- 		return hns3_vlan_pvid_configure(hns,
--						pf->port_base_vlan_cfg.pvid, 1);
++		return hns3_vlan_pvid_configure(hns,
 +						hw->port_base_vlan_cfg.pvid, 1);
  
  	LIST_FOREACH(vlan_entry, &pf->vlan_list, next) {
  		if (vlan_entry->hd_tbl_status) {
-@@ -336,7 +335,7 @@ hns3_restore_vlan_table(struct hns3_adapter *hns)
+@@ -328,7 +325,7 @@ hns3_restore_vlan_table(struct hns3_adapter *hns)
  static int
  hns3_vlan_filter_configure(struct hns3_adapter *hns, uint16_t vlan_id, int on)
  {
@@ -71,7 +75,7 @@
  	bool writen_to_tbl = false;
  	int ret = 0;
  
-@@ -354,7 +353,7 @@ hns3_vlan_filter_configure(struct hns3_adapter *hns, uint16_t vlan_id, int on)
+@@ -346,7 +343,7 @@ hns3_vlan_filter_configure(struct hns3_adapter *hns, uint16_t vlan_id, int on)
  	 * vlan list. The vlan id in vlan list will be writen in vlan filter
  	 * table until port base vlan disabled
  	 */
@@ -80,7 +84,7 @@
  		ret = hns3_set_port_vlan_filter(hns, vlan_id, on);
  		writen_to_tbl = true;
  	}
-@@ -507,11 +506,10 @@ static int
+@@ -500,11 +497,10 @@ static int
  hns3_en_hw_strip_rxvtag(struct hns3_adapter *hns, bool enable)
  {
  	struct hns3_rx_vtag_cfg rxvlan_cfg;
@@ -93,7 +97,7 @@
  		rxvlan_cfg.strip_tag1_en = false;
  		rxvlan_cfg.strip_tag2_en = enable;
  	} else {
-@@ -728,12 +726,12 @@ hns3_vlan_txvlan_cfg(struct hns3_adapter *hns, uint16_t port_base_vlan_state,
+@@ -719,12 +715,12 @@ hns3_vlan_txvlan_cfg(struct hns3_adapter *hns, uint16_t port_base_vlan_state,
  static void
  hns3_store_port_base_vlan_info(struct hns3_adapter *hns, uint16_t pvid, int on)
  {
@@ -109,7 +113,7 @@
  }
  
  static void
-@@ -777,13 +775,12 @@ static void
+@@ -768,13 +764,12 @@ static void
  hns3_remove_all_vlan_table(struct hns3_adapter *hns)
  {
  	struct hns3_hw *hw = &hns->hw;
@@ -125,7 +129,7 @@
  		if (ret) {
  			hns3_err(hw, "Failed to remove all vlan table, ret =%d",
  				 ret);
-@@ -797,7 +794,6 @@ hns3_update_vlan_filter_entries(struct hns3_adapter *hns,
+@@ -788,7 +783,6 @@ hns3_update_vlan_filter_entries(struct hns3_adapter *hns,
  				uint16_t port_base_vlan_state,
  				uint16_t new_pvid, uint16_t old_pvid)
  {
@@ -133,7 +137,7 @@
  	struct hns3_hw *hw = &hns->hw;
  	int ret = 0;
  
-@@ -825,7 +821,7 @@ hns3_update_vlan_filter_entries(struct hns3_adapter *hns,
+@@ -816,7 +810,7 @@ hns3_update_vlan_filter_entries(struct hns3_adapter *hns,
  		}
  	}
  
@@ -142,7 +146,7 @@
  		hns3_add_all_vlan_table(hns);
  
  	return ret;
-@@ -862,17 +858,16 @@ hns3_en_pvid_strip(struct hns3_adapter *hns, int on)
+@@ -853,17 +847,16 @@ hns3_en_pvid_strip(struct hns3_adapter *hns, int on)
  static int
  hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
  {
@@ -163,7 +167,7 @@
  		return 0;
  	}
  
-@@ -894,7 +889,7 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
+@@ -885,7 +878,7 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
  
  	if (pvid == HNS3_INVLID_PVID)
  		goto out;
@@ -172,7 +176,7 @@
  	ret = hns3_update_vlan_filter_entries(hns, port_base_vlan_state, pvid,
  					      old_pvid);
  	if (ret) {
-@@ -930,11 +925,8 @@ hns3_vlan_pvid_set(struct rte_eth_dev *dev, uint16_t pvid, int on)
+@@ -921,11 +914,8 @@ hns3_vlan_pvid_set(struct rte_eth_dev *dev, uint16_t pvid, int on)
  static void
  init_port_base_vlan_info(struct hns3_hw *hw)
  {
@@ -187,10 +191,10 @@
  
  static int
 diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
-index bc458cb44..21412c44c 100644
+index cdbfc70b2..e7d9fe0e0 100644
 --- a/drivers/net/hns3/hns3_ethdev.h
 +++ b/drivers/net/hns3/hns3_ethdev.h
-@@ -171,6 +171,13 @@ struct hns3_fake_queue_data {
+@@ -161,6 +161,13 @@ struct hns3_fake_queue_data {
  	uint16_t nb_fake_tx_queues; /* Number of fake TX queues. */
  };
  
@@ -204,7 +208,7 @@
  /* Primary process maintains driver state in main thread.
   *
   * +---------------+
-@@ -395,6 +402,8 @@ struct hns3_hw {
+@@ -384,6 +391,8 @@ struct hns3_hw {
  	uint16_t tx_qnum_per_tc;    /* TX queue number per TC */
  
  	uint32_t flag;
@@ -213,7 +217,7 @@
  	/*
  	 * PMD setup and configuration is not thread safe. Since it is not
  	 * performance sensitive, it is better to guarantee thread-safety
-@@ -424,11 +433,6 @@ struct hns3_user_vlan_table {
+@@ -413,11 +422,6 @@ struct hns3_user_vlan_table {
  	uint16_t vlan_id;
  };
  
@@ -225,7 +229,7 @@
  /* Vlan tag configuration for RX direction */
  struct hns3_rx_vtag_cfg {
  	uint8_t rx_vlan_offload_en; /* Whether enable rx vlan offload */
-@@ -504,7 +508,6 @@ struct hns3_pf {
+@@ -493,7 +497,6 @@ struct hns3_pf {
  	bool support_sfp_query;
  
  	struct hns3_vtag_cfg vtag_config;
@@ -234,7 +238,7 @@
  
  	struct hns3_fdir_info fdir; /* flow director info */
 diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
-index 25ba3b820..4341c6d60 100644
+index dcaeab267..3251515fe 100644
 --- a/drivers/net/hns3/hns3_rxtx.c
 +++ b/drivers/net/hns3/hns3_rxtx.c
 @@ -1255,9 +1255,9 @@ rxd_pkt_info_to_pkt_type(uint32_t pkt_info, uint32_t ol_info)

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

* [dpdk-stable] patch 'net/i40e: enable NEON Rx/Tx in meson' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (18 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: fix VLAN tags reported in Rx' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'app/testpmd: fix stats error message' " luca.boccassi
                   ` (171 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Ruifeng Wang
  Cc: David Marchand, Honnappa Nagarahalli, Phil Yang,
	Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 2e222d5f27b08cc151bd449beae276cee5f42615 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Fri, 5 Jun 2020 13:20:55 +0800
Subject: [PATCH] net/i40e: enable NEON Rx/Tx in meson

[ upstream commit 83ea3b5fa09152da5033f64164f7487296f21f64 ]

The i40e neon vector implementation is not compiled with meson.
Add the file to meson for Arm platform.

Fixes: e940646b20fa ("drivers/net: build Intel NIC PMDs with meson")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/i40e/meson.build | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/i40e/meson.build b/drivers/net/i40e/meson.build
index b01babba1..3d5fc7111 100644
--- a/drivers/net/i40e/meson.build
+++ b/drivers/net/i40e/meson.build
@@ -45,6 +45,9 @@ if arch_subdir == 'x86'
 				c_args: [cflags, '-mavx2'])
 		objs += i40e_avx2_lib.extract_objects('i40e_rxtx_vec_avx2.c')
 	endif
+elif arch_subdir == 'arm'
+       dpdk_conf.set('RTE_LIBRTE_I40E_INC_VECTOR', 1)
+       sources += files('i40e_rxtx_vec_neon.c')
 endif
 
 install_headers('rte_pmd_i40e.h')
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.438038735 +0100
+++ 0021-net-i40e-enable-NEON-Rx-Tx-in-meson.patch	2020-07-24 12:53:48.207004969 +0100
@@ -1,13 +1,14 @@
-From 83ea3b5fa09152da5033f64164f7487296f21f64 Mon Sep 17 00:00:00 2001
+From 2e222d5f27b08cc151bd449beae276cee5f42615 Mon Sep 17 00:00:00 2001
 From: Ruifeng Wang <ruifeng.wang@arm.com>
 Date: Fri, 5 Jun 2020 13:20:55 +0800
 Subject: [PATCH] net/i40e: enable NEON Rx/Tx in meson
 
+[ upstream commit 83ea3b5fa09152da5033f64164f7487296f21f64 ]
+
 The i40e neon vector implementation is not compiled with meson.
 Add the file to meson for Arm platform.
 
 Fixes: e940646b20fa ("drivers/net: build Intel NIC PMDs with meson")
-Cc: stable@dpdk.org
 
 Reported-by: David Marchand <david.marchand@redhat.com>
 Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
@@ -19,13 +20,13 @@
  1 file changed, 3 insertions(+)
 
 diff --git a/drivers/net/i40e/meson.build b/drivers/net/i40e/meson.build
-index c452420ee..211d45d88 100644
+index b01babba1..3d5fc7111 100644
 --- a/drivers/net/i40e/meson.build
 +++ b/drivers/net/i40e/meson.build
-@@ -47,6 +47,9 @@ if arch_subdir == 'x86'
- elif arch_subdir == 'ppc'
-        dpdk_conf.set('RTE_LIBRTE_I40E_INC_VECTOR', 1)
-        sources += files('i40e_rxtx_vec_altivec.c')
+@@ -45,6 +45,9 @@ if arch_subdir == 'x86'
+ 				c_args: [cflags, '-mavx2'])
+ 		objs += i40e_avx2_lib.extract_objects('i40e_rxtx_vec_avx2.c')
+ 	endif
 +elif arch_subdir == 'arm'
 +       dpdk_conf.set('RTE_LIBRTE_I40E_INC_VECTOR', 1)
 +       sources += files('i40e_rxtx_vec_neon.c')

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

* [dpdk-stable] patch 'app/testpmd: fix stats error message' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (19 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/i40e: enable NEON Rx/Tx in meson' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'mbuf: remove unused next member in dynamic flag/field' " luca.boccassi
                   ` (170 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Wei Hu (Xavier); +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From f6b4eb4e8488c734aa2c3bba7078f305276caab0 Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Sat, 6 Jun 2020 11:46:37 +0800
Subject: [PATCH] app/testpmd: fix stats error message

[ upstream commit 5fd722308ef21819931d25e7a140ff5a292b19d9 ]

There are coverity defects related "Argument cannot be negative"

This patch fixes them by passing '-ret' to the function strerror() when
ret is negative.

Coverity issue: 349913, 358437, 358449, 358450
Fixes: da328f7f115a ("ethdev: change xstats reset function to return int")
Fixes: 9eb974221f44 ("app/testpmd: fix statistics after reset")

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/config.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 42eba68b3..d5d246617 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -233,12 +233,14 @@ nic_stats_clear(portid_t port_id)
 	ret = rte_eth_stats_reset(port_id);
 	if (ret != 0) {
 		printf("%s: Error: failed to reset stats (port %u): %s",
-		       __func__, port_id, strerror(ret));
+		       __func__, port_id, strerror(-ret));
 		return;
 	}
 
 	ret = rte_eth_stats_get(port_id, &ports[port_id].stats);
 	if (ret != 0) {
+		if (ret < 0)
+			ret = -ret;
 		printf("%s: Error: failed to get stats (port %u): %s",
 		       __func__, port_id, strerror(ret));
 		return;
@@ -322,12 +324,14 @@ nic_xstats_clear(portid_t port_id)
 	ret = rte_eth_xstats_reset(port_id);
 	if (ret != 0) {
 		printf("%s: Error: failed to reset xstats (port %u): %s",
-		       __func__, port_id, strerror(ret));
+		       __func__, port_id, strerror(-ret));
 		return;
 	}
 
 	ret = rte_eth_stats_get(port_id, &ports[port_id].stats);
 	if (ret != 0) {
+		if (ret < 0)
+			ret = -ret;
 		printf("%s: Error: failed to get stats (port %u): %s",
 		       __func__, port_id, strerror(ret));
 		return;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.469273842 +0100
+++ 0022-app-testpmd-fix-stats-error-message.patch	2020-07-24 12:53:48.207004969 +0100
@@ -1,8 +1,10 @@
-From 5fd722308ef21819931d25e7a140ff5a292b19d9 Mon Sep 17 00:00:00 2001
+From f6b4eb4e8488c734aa2c3bba7078f305276caab0 Mon Sep 17 00:00:00 2001
 From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
 Date: Sat, 6 Jun 2020 11:46:37 +0800
 Subject: [PATCH] app/testpmd: fix stats error message
 
+[ upstream commit 5fd722308ef21819931d25e7a140ff5a292b19d9 ]
+
 There are coverity defects related "Argument cannot be negative"
 
 This patch fixes them by passing '-ret' to the function strerror() when
@@ -11,7 +13,6 @@
 Coverity issue: 349913, 358437, 358449, 358450
 Fixes: da328f7f115a ("ethdev: change xstats reset function to return int")
 Fixes: 9eb974221f44 ("app/testpmd: fix statistics after reset")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -20,10 +21,10 @@
  1 file changed, 6 insertions(+), 2 deletions(-)
 
 diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
-index 5381207cc..016bcb09c 100644
+index 42eba68b3..d5d246617 100644
 --- a/app/test-pmd/config.c
 +++ b/app/test-pmd/config.c
-@@ -244,12 +244,14 @@ nic_stats_clear(portid_t port_id)
+@@ -233,12 +233,14 @@ nic_stats_clear(portid_t port_id)
  	ret = rte_eth_stats_reset(port_id);
  	if (ret != 0) {
  		printf("%s: Error: failed to reset stats (port %u): %s",
@@ -39,7 +40,7 @@
  		printf("%s: Error: failed to get stats (port %u): %s",
  		       __func__, port_id, strerror(ret));
  		return;
-@@ -333,12 +335,14 @@ nic_xstats_clear(portid_t port_id)
+@@ -322,12 +324,14 @@ nic_xstats_clear(portid_t port_id)
  	ret = rte_eth_xstats_reset(port_id);
  	if (ret != 0) {
  		printf("%s: Error: failed to reset xstats (port %u): %s",

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

* [dpdk-stable] patch 'mbuf: remove unused next member in dynamic flag/field' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (20 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'app/testpmd: fix stats error message' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'test/mbuf: fix a dynamic flag log' " luca.boccassi
                   ` (169 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Xiaolong Ye; +Cc: Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From d1243b7c1a4236ecc7adc54840db5cc4efd7b8e4 Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Tue, 9 Jun 2020 15:12:56 +0800
Subject: [PATCH] mbuf: remove unused next member in dynamic flag/field

[ upstream commit c67a423c53e9f891204fafcd9481ee1db0ec3b80 ]

TAILQ_ENTRY next is not needed in struct mbuf_dynfield_elt and
mbuf_dynflag_elt, since they are actually chained by rte_tailq_entry's
next field when calling TAILQ_INSERT_TAIL(mbuf_dynfield/dynflag_list, te,
next).

Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_mbuf/rte_mbuf_dyn.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/librte_mbuf/rte_mbuf_dyn.c b/lib/librte_mbuf/rte_mbuf_dyn.c
index d6931f847..953e3ec31 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.c
+++ b/lib/librte_mbuf/rte_mbuf_dyn.c
@@ -19,7 +19,6 @@
 #define RTE_MBUF_DYN_MZNAME "rte_mbuf_dyn"
 
 struct mbuf_dynfield_elt {
-	TAILQ_ENTRY(mbuf_dynfield_elt) next;
 	struct rte_mbuf_dynfield params;
 	size_t offset;
 };
@@ -31,7 +30,6 @@ static struct rte_tailq_elem mbuf_dynfield_tailq = {
 EAL_REGISTER_TAILQ(mbuf_dynfield_tailq);
 
 struct mbuf_dynflag_elt {
-	TAILQ_ENTRY(mbuf_dynflag_elt) next;
 	struct rte_mbuf_dynflag params;
 	unsigned int bitnum;
 };
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.513285924 +0100
+++ 0023-mbuf-remove-unused-next-member-in-dynamic-flag-field.patch	2020-07-24 12:53:48.211005044 +0100
@@ -1,15 +1,16 @@
-From c67a423c53e9f891204fafcd9481ee1db0ec3b80 Mon Sep 17 00:00:00 2001
+From d1243b7c1a4236ecc7adc54840db5cc4efd7b8e4 Mon Sep 17 00:00:00 2001
 From: Xiaolong Ye <xiaolong.ye@intel.com>
 Date: Tue, 9 Jun 2020 15:12:56 +0800
 Subject: [PATCH] mbuf: remove unused next member in dynamic flag/field
 
+[ upstream commit c67a423c53e9f891204fafcd9481ee1db0ec3b80 ]
+
 TAILQ_ENTRY next is not needed in struct mbuf_dynfield_elt and
 mbuf_dynflag_elt, since they are actually chained by rte_tailq_entry's
 next field when calling TAILQ_INSERT_TAIL(mbuf_dynfield/dynflag_list, te,
 next).
 
 Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
 Acked-by: Olivier Matz <olivier.matz@6wind.com>

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

* [dpdk-stable] patch 'test/mbuf: fix a dynamic flag log' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (21 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'mbuf: remove unused next member in dynamic flag/field' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'eal/windows: fix symbol export' " luca.boccassi
                   ` (168 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Xiaolong Ye; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 031482ddd203b0080e59a253cfccc01e58d530a3 Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Tue, 9 Jun 2020 16:24:29 +0800
Subject: [PATCH] test/mbuf: fix a dynamic flag log

[ upstream commit 72ea8d4050c12cf04bb4ac6ac16c3c084b811426 ]

Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 app/test/test_mbuf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index f2922e05e..bf04025a8 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -2519,7 +2519,7 @@ test_mbuf_dyn(struct rte_mempool *pktmbuf_pool)
 	flag3 = rte_mbuf_dynflag_register_bitnum(&dynflag3,
 						rte_bsf64(PKT_LAST_FREE));
 	if (flag3 != rte_bsf64(PKT_LAST_FREE))
-		GOTO_FAIL("failed to register dynamic flag 3, flag2=%d: %s",
+		GOTO_FAIL("failed to register dynamic flag 3, flag3=%d: %s",
 			flag3, strerror(errno));
 
 	printf("dynflag: flag=%d, flag2=%d, flag3=%d\n", flag, flag2, flag3);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.549571647 +0100
+++ 0024-test-mbuf-fix-a-dynamic-flag-log.patch	2020-07-24 12:53:48.211005044 +0100
@@ -1,10 +1,11 @@
-From 72ea8d4050c12cf04bb4ac6ac16c3c084b811426 Mon Sep 17 00:00:00 2001
+From 031482ddd203b0080e59a253cfccc01e58d530a3 Mon Sep 17 00:00:00 2001
 From: Xiaolong Ye <xiaolong.ye@intel.com>
 Date: Tue, 9 Jun 2020 16:24:29 +0800
 Subject: [PATCH] test/mbuf: fix a dynamic flag log
 
+[ upstream commit 72ea8d4050c12cf04bb4ac6ac16c3c084b811426 ]
+
 Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
 ---
@@ -12,10 +13,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
-index 71bdab691..06e44f0a7 100644
+index f2922e05e..bf04025a8 100644
 --- a/app/test/test_mbuf.c
 +++ b/app/test/test_mbuf.c
-@@ -2647,7 +2647,7 @@ test_mbuf_dyn(struct rte_mempool *pktmbuf_pool)
+@@ -2519,7 +2519,7 @@ test_mbuf_dyn(struct rte_mempool *pktmbuf_pool)
  	flag3 = rte_mbuf_dynflag_register_bitnum(&dynflag3,
  						rte_bsf64(PKT_LAST_FREE));
  	if (flag3 != rte_bsf64(PKT_LAST_FREE))

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

* [dpdk-stable] patch 'eal/windows: fix symbol export' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (22 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'test/mbuf: fix a dynamic flag log' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'app/testpmd: fix error detection in MTU command' " luca.boccassi
                   ` (167 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From afd842b48e9af1eded17f83e0f9f680d7d72697a Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 10 Jun 2020 16:30:49 +0200
Subject: [PATCH] eal/windows: fix symbol export

[ upstream commit b6f0621201be2cd02c72bc3f30b324aa8c2ca60e ]

rte_eal_get_configuration() has been made private in 19.11, remove
leftover in Windows export list.

Fixes: f58cef079b05 ("eal: make the global configuration private")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_eal/rte_eal_exports.def | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/librte_eal/rte_eal_exports.def b/lib/librte_eal/rte_eal_exports.def
index 12a6c79d6..c1bdee1c4 100644
--- a/lib/librte_eal/rte_eal_exports.def
+++ b/lib/librte_eal/rte_eal_exports.def
@@ -1,6 +1,5 @@
 EXPORTS
 	__rte_panic
-	rte_eal_get_configuration
 	rte_eal_init
 	rte_eal_mp_remote_launch
 	rte_eal_mp_wait_lcore
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.587539275 +0100
+++ 0025-eal-windows-fix-symbol-export.patch	2020-07-24 12:53:48.211005044 +0100
@@ -1,8 +1,10 @@
-From b6f0621201be2cd02c72bc3f30b324aa8c2ca60e Mon Sep 17 00:00:00 2001
+From afd842b48e9af1eded17f83e0f9f680d7d72697a Mon Sep 17 00:00:00 2001
 From: David Marchand <david.marchand@redhat.com>
 Date: Wed, 10 Jun 2020 16:30:49 +0200
 Subject: [PATCH] eal/windows: fix symbol export
 
+[ upstream commit b6f0621201be2cd02c72bc3f30b324aa8c2ca60e ]
+
 rte_eal_get_configuration() has been made private in 19.11, remove
 leftover in Windows export list.
 

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

* [dpdk-stable] patch 'app/testpmd: fix error detection in MTU command' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (23 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'eal/windows: fix symbol export' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: fix flow director error message' " luca.boccassi
                   ` (166 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Shy Shyman; +Cc: Ferruh Yigit, Phil Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 2333f80c8f65ad5dd876f8b03228867f0e5122de Mon Sep 17 00:00:00 2001
From: Shy Shyman <shys@mellanox.com>
Date: Mon, 8 Jun 2020 17:17:47 +0300
Subject: [PATCH] app/testpmd: fix error detection in MTU command

[ upstream commit 3b931ddb5e1fe8b29caafbad53738005ee9fef0c ]

MTU is used in testpmd to set the maximum payload size for packets.
According to testpmd, the setting influence RX only.
In rte_ethdev there's no relation between MTU setting and JUMBO offload
or rx_max_pkt_len.

The previous fix in patch referenced below was meant to update the
correlated variables of max_pkt_len and JUMBO offload, but by doing so
it assumes that MTU setting can only exist when JUMBO offload supported
in the device. For example fail-safe device does supports set MTU and
doesn't support JUMBO offload, and in this case, though set MTU
succeeds, an error message is still printed since the JUMBO packet
offload is disabled.

The fix separates the two conditions to make sure the error
triggers only in case the set_mtu action actually failed.

Fixes: 150c9ac2df13 ("app/testpmd: update Rx offload after setting MTU")

Signed-off-by: Shy Shyman <shys@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
---
 app/test-pmd/config.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index d5d246617..e345cea6d 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1262,8 +1262,9 @@ port_mtu_set(portid_t port_id, uint16_t mtu)
 		return;
 	}
 	diag = rte_eth_dev_set_mtu(port_id, mtu);
-	if (diag == 0 &&
-	    dev_info.rx_offload_capa & DEV_RX_OFFLOAD_JUMBO_FRAME) {
+	if (diag)
+		printf("Set MTU failed. diag=%d\n", diag);
+	else if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_JUMBO_FRAME) {
 		/*
 		 * Ether overhead in driver is equal to the difference of
 		 * max_rx_pktlen and max_mtu in rte_eth_dev_info when the
@@ -1278,10 +1279,7 @@ port_mtu_set(portid_t port_id, uint16_t mtu)
 		} else
 			rte_port->dev_conf.rxmode.offloads &=
 						~DEV_RX_OFFLOAD_JUMBO_FRAME;
-
-		return;
 	}
-	printf("Set MTU failed. diag=%d\n", diag);
 }
 
 /* Generic flow management functions. */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.620698065 +0100
+++ 0026-app-testpmd-fix-error-detection-in-MTU-command.patch	2020-07-24 12:53:48.215005118 +0100
@@ -1,8 +1,10 @@
-From 3b931ddb5e1fe8b29caafbad53738005ee9fef0c Mon Sep 17 00:00:00 2001
+From 2333f80c8f65ad5dd876f8b03228867f0e5122de Mon Sep 17 00:00:00 2001
 From: Shy Shyman <shys@mellanox.com>
 Date: Mon, 8 Jun 2020 17:17:47 +0300
 Subject: [PATCH] app/testpmd: fix error detection in MTU command
 
+[ upstream commit 3b931ddb5e1fe8b29caafbad53738005ee9fef0c ]
+
 MTU is used in testpmd to set the maximum payload size for packets.
 According to testpmd, the setting influence RX only.
 In rte_ethdev there's no relation between MTU setting and JUMBO offload
@@ -20,7 +22,6 @@
 triggers only in case the set_mtu action actually failed.
 
 Fixes: 150c9ac2df13 ("app/testpmd: update Rx offload after setting MTU")
-Cc: stable@dpdk.org
 
 Signed-off-by: Shy Shyman <shys@mellanox.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -30,10 +31,10 @@
  1 file changed, 3 insertions(+), 5 deletions(-)
 
 diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
-index 016bcb09c..a7112c998 100644
+index d5d246617..e345cea6d 100644
 --- a/app/test-pmd/config.c
 +++ b/app/test-pmd/config.c
-@@ -1281,8 +1281,9 @@ port_mtu_set(portid_t port_id, uint16_t mtu)
+@@ -1262,8 +1262,9 @@ port_mtu_set(portid_t port_id, uint16_t mtu)
  		return;
  	}
  	diag = rte_eth_dev_set_mtu(port_id, mtu);
@@ -45,7 +46,7 @@
  		/*
  		 * Ether overhead in driver is equal to the difference of
  		 * max_rx_pktlen and max_mtu in rte_eth_dev_info when the
-@@ -1297,10 +1298,7 @@ port_mtu_set(portid_t port_id, uint16_t mtu)
+@@ -1278,10 +1279,7 @@ port_mtu_set(portid_t port_id, uint16_t mtu)
  		} else
  			rte_port->dev_conf.rxmode.offloads &=
  						~DEV_RX_OFFLOAD_JUMBO_FRAME;

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

* [dpdk-stable] patch 'net/hns3: fix flow director error message' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (24 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'app/testpmd: fix error detection in MTU command' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: ignore function return on reset error path' " luca.boccassi
                   ` (165 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Wei Hu (Xavier); +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 2118606fd3f11cf4778b312e08faac0549db0401 Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Tue, 9 Jun 2020 16:44:14 +0800
Subject: [PATCH] net/hns3: fix flow director error message

[ upstream commit 41b966ffb4f70792d8cd851173eab15bca183a7c ]

There is a coverity defect related "Argument cannot be negative".

This patch fixes it by passing '-ret' to the function strerror() when
ret is negative.

Coverity issue: 349933
Fixes: fcba820d9b9e ("net/hns3: support flow director")

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_fdir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
index 53c6448cd..79f3f0d14 100644
--- a/drivers/net/hns3/hns3_fdir.c
+++ b/drivers/net/hns3/hns3_fdir.c
@@ -893,7 +893,7 @@ static int hns3_insert_fdir_filter(struct hns3_hw *hw,
 	if (ret < 0) {
 		rte_spinlock_unlock(&fdir_info->flows_lock);
 		hns3_err(hw, "Hash table full? err:%d(%s)!", ret,
-			 strerror(ret));
+			 strerror(-ret));
 		return ret;
 	}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.656840290 +0100
+++ 0027-net-hns3-fix-flow-director-error-message.patch	2020-07-24 12:53:48.215005118 +0100
@@ -1,8 +1,10 @@
-From 41b966ffb4f70792d8cd851173eab15bca183a7c Mon Sep 17 00:00:00 2001
+From 2118606fd3f11cf4778b312e08faac0549db0401 Mon Sep 17 00:00:00 2001
 From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
 Date: Tue, 9 Jun 2020 16:44:14 +0800
 Subject: [PATCH] net/hns3: fix flow director error message
 
+[ upstream commit 41b966ffb4f70792d8cd851173eab15bca183a7c ]
+
 There is a coverity defect related "Argument cannot be negative".
 
 This patch fixes it by passing '-ret' to the function strerror() when
@@ -10,7 +12,6 @@
 
 Coverity issue: 349933
 Fixes: fcba820d9b9e ("net/hns3: support flow director")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
 ---
@@ -18,7 +19,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
-index 4c5928ffc..7bc5bf831 100644
+index 53c6448cd..79f3f0d14 100644
 --- a/drivers/net/hns3/hns3_fdir.c
 +++ b/drivers/net/hns3/hns3_fdir.c
 @@ -893,7 +893,7 @@ static int hns3_insert_fdir_filter(struct hns3_hw *hw,

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

* [dpdk-stable] patch 'net/hns3: ignore function return on reset error path' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (25 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: fix flow director error message' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: fix unintended sign extension in fd operation' " luca.boccassi
                   ` (164 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Hongbo Zheng; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 0596f4a6e1872526253528ae825e9340b849cf77 Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3@huawei.com>
Date: Tue, 9 Jun 2020 16:44:15 +0800
Subject: [PATCH] net/hns3: ignore function return on reset error path

[ upstream commit 80cd38e1b530973926c007d65a84600e8c27740d ]

There is a coverity defect related "Unchecked return value".

The internal static hns3_reset_err_handle function is reset error
process of hns3 PMD driver. If failure in reset process, it does not
mean that the network port is completely unavailable, so the command
interface between driver and firmware still needs to be initialized.
Regardless of whether the execution of the function named hns3_cmd_init
is successful or not, the next process after execution must be
continued, so there is no need to check the return value. If
hns3_cmd_init fails to execute, there will be corresponding log
information inside hns3_cmd_init.

This patch adds '(void)' Type conversion to avoid coverity warning.

Coverity issue: 349934
Fixes: 2790c6464725 ("net/hns3: support device reset")

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_intr.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c
index 9953a1d98..46d617c68 100644
--- a/drivers/net/hns3/hns3_intr.c
+++ b/drivers/net/hns3/hns3_intr.c
@@ -882,8 +882,14 @@ hns3_reset_err_handle(struct hns3_adapter *hns)
 		return true;
 	}
 
+	/*
+	 * Failure to reset does not mean that the network port is
+	 * completely unavailable, so cmd still needs to be initialized.
+	 * Regardless of whether the execution is successful or not, the
+	 * flow after execution must be continued.
+	 */
 	if (rte_atomic16_read(&hw->reset.disable_cmd))
-		hns3_cmd_init(hw);
+		(void)hns3_cmd_init(hw);
 reset_fail:
 	hw->reset.attempts = 0;
 	hw->reset.stats.fail_cnt++;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.694877763 +0100
+++ 0028-net-hns3-ignore-function-return-on-reset-error-path.patch	2020-07-24 12:53:48.215005118 +0100
@@ -1,8 +1,10 @@
-From 80cd38e1b530973926c007d65a84600e8c27740d Mon Sep 17 00:00:00 2001
+From 0596f4a6e1872526253528ae825e9340b849cf77 Mon Sep 17 00:00:00 2001
 From: Hongbo Zheng <zhenghongbo3@huawei.com>
 Date: Tue, 9 Jun 2020 16:44:15 +0800
 Subject: [PATCH] net/hns3: ignore function return on reset error path
 
+[ upstream commit 80cd38e1b530973926c007d65a84600e8c27740d ]
+
 There is a coverity defect related "Unchecked return value".
 
 The internal static hns3_reset_err_handle function is reset error
@@ -19,7 +21,6 @@
 
 Coverity issue: 349934
 Fixes: 2790c6464725 ("net/hns3: support device reset")
-Cc: stable@dpdk.org
 
 Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>

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

* [dpdk-stable] patch 'net/hns3: fix unintended sign extension in fd operation' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (26 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: ignore function return on reset error path' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: fix unintended sign extension in dump " luca.boccassi
                   ` (163 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Wei Hu (Xavier); +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 9cd77fe6e7ea86eeac5dc7f8eff407e3c14ec8dd Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Tue, 9 Jun 2020 16:44:16 +0800
Subject: [PATCH] net/hns3: fix unintended sign extension in fd operation

[ upstream commit 5c471cb581ebd9a06918dbf5092f4228cc1e565e ]

Currently, there are coverity defects warning as below:

CID 349937 (#1 of 1): Unintended sign extension (SIGN_EXTENSION)
sign_extension: Suspicious implicit sign extension: port_number with
type uint16_t (16 bits, unsigned) is promoted in port_number << cur_pos
to type int (32 bits, signed), then sign-extended to type unsigned long
(64 bits, unsigned). If port_number << cur_pos is greater than
0x7FFFFFFF, the upper bits of the result will all be 1.

CID 349893 (#1 of 1): Unintended sign extension (SIGN_EXTENSION)
sign_extension: Suspicious implicit sign extension: vlan_tag with type
uint8_t (8 bits, unsigned) is promoted in vlan_tag << cur_pos to type
int (32 bits, signed), then sign-extended to type unsigned long (64
bits, unsigned). If vlan_tag << cur_pos is greater than 0x7FFFFFFF, the
upper bits of the result will all be 1.

This patch fixes them by replacing the data type of port_number and
vlan_tag with uint32_t in the inner static function named
hns3_fd_convert_meta_data of hns3 PMD driver.

Coverity issue: 349937, 349893
Fixes: fcba820d9b9e ("net/hns3: support flow director")

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_fdir.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
index 79f3f0d14..98a044f56 100644
--- a/drivers/net/hns3/hns3_fdir.c
+++ b/drivers/net/hns3/hns3_fdir.c
@@ -619,7 +619,7 @@ static void hns3_fd_convert_meta_data(struct hns3_fd_key_cfg *cfg,
 				      uint8_t *key_x, uint8_t *key_y)
 {
 	uint16_t meta_data = 0;
-	uint16_t port_number;
+	uint32_t port_number;
 	uint8_t cur_pos = 0;
 	uint8_t tuple_size;
 	uint8_t shift_bits;
@@ -637,7 +637,7 @@ static void hns3_fd_convert_meta_data(struct hns3_fd_key_cfg *cfg,
 				     rule->key_conf.spec.tunnel_type ? 1 : 0);
 			cur_pos += tuple_size;
 		} else if (i == VLAN_NUMBER) {
-			uint8_t vlan_tag;
+			uint32_t vlan_tag;
 			uint8_t vlan_num;
 			if (rule->key_conf.spec.tunnel_type == 0)
 				vlan_num = rule->key_conf.vlan_num;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.729579730 +0100
+++ 0029-net-hns3-fix-unintended-sign-extension-in-fd-operati.patch	2020-07-24 12:53:48.219005193 +0100
@@ -1,8 +1,10 @@
-From 5c471cb581ebd9a06918dbf5092f4228cc1e565e Mon Sep 17 00:00:00 2001
+From 9cd77fe6e7ea86eeac5dc7f8eff407e3c14ec8dd Mon Sep 17 00:00:00 2001
 From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
 Date: Tue, 9 Jun 2020 16:44:16 +0800
 Subject: [PATCH] net/hns3: fix unintended sign extension in fd operation
 
+[ upstream commit 5c471cb581ebd9a06918dbf5092f4228cc1e565e ]
+
 Currently, there are coverity defects warning as below:
 
 CID 349937 (#1 of 1): Unintended sign extension (SIGN_EXTENSION)
@@ -25,7 +27,6 @@
 
 Coverity issue: 349937, 349893
 Fixes: fcba820d9b9e ("net/hns3: support flow director")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
 ---
@@ -33,7 +34,7 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
-index 7bc5bf831..6ab439d06 100644
+index 79f3f0d14..98a044f56 100644
 --- a/drivers/net/hns3/hns3_fdir.c
 +++ b/drivers/net/hns3/hns3_fdir.c
 @@ -619,7 +619,7 @@ static void hns3_fd_convert_meta_data(struct hns3_fd_key_cfg *cfg,

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

* [dpdk-stable] patch 'net/hns3: fix unintended sign extension in dump operation' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (27 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: fix unintended sign extension in fd operation' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: fix typos in meter error messages' " luca.boccassi
                   ` (162 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Hongbo Zheng; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 54161c5e70e1a93e8abee37f0ddd5a8021954a70 Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3@huawei.com>
Date: Tue, 9 Jun 2020 16:44:17 +0800
Subject: [PATCH] net/hns3: fix unintended sign extension in dump operation

[ upstream commit 5045e2b25ab1ce9ded4023b60fda7489a2b06663 ]

There are coverity defects related "Unintended sign extension" in the
internal static function named hns3_get_regs_length used for dumping reg
operation.

This patch fixes them by replacing the data type of cmdq_lines,
common_lines, ring_lines and tqp_intr_lines with uint32_t in the inner
static function named hns3_get_regs_length of hns3 PMD driver.

Coverity issue: 349917, 349914
Fixes: 936eda25e8da ("net/hns3: support dump register")

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_regs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index a3f2a51f9..63c8602a8 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -116,7 +116,7 @@ static int
 hns3_get_regs_length(struct hns3_hw *hw, uint32_t *length)
 {
 	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
-	int cmdq_lines, common_lines, ring_lines, tqp_intr_lines;
+	uint32_t cmdq_lines, common_lines, ring_lines, tqp_intr_lines;
 	uint32_t regs_num_32_bit, regs_num_64_bit;
 	uint32_t len;
 	int ret;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.767769770 +0100
+++ 0030-net-hns3-fix-unintended-sign-extension-in-dump-opera.patch	2020-07-24 12:53:48.219005193 +0100
@@ -1,8 +1,10 @@
-From 5045e2b25ab1ce9ded4023b60fda7489a2b06663 Mon Sep 17 00:00:00 2001
+From 54161c5e70e1a93e8abee37f0ddd5a8021954a70 Mon Sep 17 00:00:00 2001
 From: Hongbo Zheng <zhenghongbo3@huawei.com>
 Date: Tue, 9 Jun 2020 16:44:17 +0800
 Subject: [PATCH] net/hns3: fix unintended sign extension in dump operation
 
+[ upstream commit 5045e2b25ab1ce9ded4023b60fda7489a2b06663 ]
+
 There are coverity defects related "Unintended sign extension" in the
 internal static function named hns3_get_regs_length used for dumping reg
 operation.
@@ -13,7 +15,6 @@
 
 Coverity issue: 349917, 349914
 Fixes: 936eda25e8da ("net/hns3: support dump register")
-Cc: stable@dpdk.org
 
 Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>

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

* [dpdk-stable] patch 'net/mlx5: fix typos in meter error messages' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (28 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: fix unintended sign extension in dump " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: do not select legacy MPW implicitly' " luca.boccassi
                   ` (161 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Ali Alnubani; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 4da73de47991612e4901a2a1c32578a38d267ad1 Mon Sep 17 00:00:00 2001
From: Ali Alnubani <alialnu@mellanox.com>
Date: Mon, 8 Jun 2020 17:02:57 +0300
Subject: [PATCH] net/mlx5: fix typos in meter error messages

[ upstream commit 3efac8085e2c596ce469b45349f85f2929b6aba4 ]

Fixes: 3bd26b23cefc ("net/mlx5: support meter profile operations")

Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_meter.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_meter.c b/drivers/net/mlx5/mlx5_flow_meter.c
index c4d28b282..62e3a3590 100644
--- a/drivers/net/mlx5/mlx5_flow_meter.c
+++ b/drivers/net/mlx5/mlx5_flow_meter.c
@@ -301,7 +301,7 @@ mlx5_flow_mtr_cap_get(struct rte_eth_dev *dev,
 	if (!priv->mtr_en)
 		return -rte_mtr_error_set(error, ENOTSUP,
 					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
-					  "Meter is not support");
+					  "Meter is not supported");
 	memset(cap, 0, sizeof(*cap));
 	cap->n_max = 1 << qattr->log_max_flow_meter;
 	cap->n_shared_max = cap->n_max;
@@ -347,7 +347,7 @@ mlx5_flow_meter_profile_add(struct rte_eth_dev *dev,
 	if (!priv->mtr_en)
 		return -rte_mtr_error_set(error, ENOTSUP,
 					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
-					  "Meter is not support");
+					  "Meter is not supported");
 	/* Check input params. */
 	ret = mlx5_flow_meter_profile_validate(dev, meter_profile_id,
 					       profile, error);
@@ -400,19 +400,19 @@ mlx5_flow_meter_profile_delete(struct rte_eth_dev *dev,
 	if (!priv->mtr_en)
 		return -rte_mtr_error_set(error, ENOTSUP,
 					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
-					  "Meter is not support");
+					  "Meter is not supported");
 	/* Meter profile must exist. */
 	fmp = mlx5_flow_meter_profile_find(priv, meter_profile_id);
 	if (fmp == NULL)
 		return -rte_mtr_error_set(error, ENOENT,
 					  RTE_MTR_ERROR_TYPE_METER_PROFILE_ID,
 					  &meter_profile_id,
-					  "Meter profile id invalid.");
+					  "Meter profile id is invalid.");
 	/* Check profile is unused. */
 	if (fmp->ref_cnt)
 		return -rte_mtr_error_set(error, EBUSY,
 					  RTE_MTR_ERROR_TYPE_METER_PROFILE_ID,
-					  NULL, "Meter profile in use.");
+					  NULL, "Meter profile is in use.");
 	/* Remove from list. */
 	TAILQ_REMOVE(&priv->flow_meter_profiles, fmp, next);
 	rte_free(fmp);
@@ -633,7 +633,7 @@ mlx5_flow_meter_create(struct rte_eth_dev *dev, uint32_t meter_id,
 	if (!priv->mtr_en)
 		return -rte_mtr_error_set(error, ENOTSUP,
 					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
-					  "Meter is not support");
+					  "Meter is not supported");
 	/* Validate the parameters. */
 	ret = mlx5_flow_meter_validate(priv, meter_id, params, error);
 	if (ret)
@@ -718,7 +718,7 @@ mlx5_flow_meter_destroy(struct rte_eth_dev *dev, uint32_t meter_id,
 	if (!priv->mtr_en)
 		return -rte_mtr_error_set(error, ENOTSUP,
 					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
-					  "Meter is not support");
+					  "Meter is not supported");
 	/* Meter object must exist. */
 	fm = mlx5_flow_meter_find(priv, meter_id);
 	if (fm == NULL)
@@ -823,7 +823,7 @@ mlx5_flow_meter_enable(struct rte_eth_dev *dev,
 	if (!priv->mtr_en)
 		return -rte_mtr_error_set(error, ENOTSUP,
 					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
-					  "Meter is not support");
+					  "Meter is not supported");
 	/* Meter object must exist. */
 	fm = mlx5_flow_meter_find(priv, meter_id);
 	if (fm == NULL)
@@ -864,7 +864,7 @@ mlx5_flow_meter_disable(struct rte_eth_dev *dev,
 	if (!priv->mtr_en)
 		return -rte_mtr_error_set(error, ENOTSUP,
 					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
-					  "Meter is not support");
+					  "Meter is not supported");
 	/* Meter object must exist. */
 	fm = mlx5_flow_meter_find(priv, meter_id);
 	if (fm == NULL)
@@ -912,7 +912,7 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev,
 	if (!priv->mtr_en)
 		return -rte_mtr_error_set(error, ENOTSUP,
 					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
-					  "Meter is not support");
+					  "Meter is not supported");
 	/* Meter profile must exist. */
 	fmp = mlx5_flow_meter_profile_find(priv, meter_profile_id);
 	if (fmp == NULL)
@@ -975,7 +975,7 @@ mlx5_flow_meter_stats_update(struct rte_eth_dev *dev,
 	if (!priv->mtr_en)
 		return -rte_mtr_error_set(error, ENOTSUP,
 					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
-					  "Meter is not support");
+					  "Meter is not supported");
 	/* Meter object must exist. */
 	fm = mlx5_flow_meter_find(priv, meter_id);
 	if (fm == NULL)
@@ -1032,7 +1032,7 @@ mlx5_flow_meter_stats_read(struct rte_eth_dev *dev,
 	if (!priv->mtr_en)
 		return -rte_mtr_error_set(error, ENOTSUP,
 					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
-					  "Meter is not support");
+					  "Meter is not supported");
 	/* Meter object must exist. */
 	fm = mlx5_flow_meter_find(priv, meter_id);
 	if (fm == NULL)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.801199843 +0100
+++ 0031-net-mlx5-fix-typos-in-meter-error-messages.patch	2020-07-24 12:53:48.219005193 +0100
@@ -1,10 +1,11 @@
-From 3efac8085e2c596ce469b45349f85f2929b6aba4 Mon Sep 17 00:00:00 2001
+From 4da73de47991612e4901a2a1c32578a38d267ad1 Mon Sep 17 00:00:00 2001
 From: Ali Alnubani <alialnu@mellanox.com>
 Date: Mon, 8 Jun 2020 17:02:57 +0300
 Subject: [PATCH] net/mlx5: fix typos in meter error messages
 
+[ upstream commit 3efac8085e2c596ce469b45349f85f2929b6aba4 ]
+
 Fixes: 3bd26b23cefc ("net/mlx5: support meter profile operations")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -13,10 +14,10 @@
  1 file changed, 12 insertions(+), 12 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_meter.c b/drivers/net/mlx5/mlx5_flow_meter.c
-index 08f7dc8d1..86c334b08 100644
+index c4d28b282..62e3a3590 100644
 --- a/drivers/net/mlx5/mlx5_flow_meter.c
 +++ b/drivers/net/mlx5/mlx5_flow_meter.c
-@@ -303,7 +303,7 @@ mlx5_flow_mtr_cap_get(struct rte_eth_dev *dev,
+@@ -301,7 +301,7 @@ mlx5_flow_mtr_cap_get(struct rte_eth_dev *dev,
  	if (!priv->mtr_en)
  		return -rte_mtr_error_set(error, ENOTSUP,
  					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
@@ -25,7 +26,7 @@
  	memset(cap, 0, sizeof(*cap));
  	cap->n_max = 1 << qattr->log_max_flow_meter;
  	cap->n_shared_max = cap->n_max;
-@@ -349,7 +349,7 @@ mlx5_flow_meter_profile_add(struct rte_eth_dev *dev,
+@@ -347,7 +347,7 @@ mlx5_flow_meter_profile_add(struct rte_eth_dev *dev,
  	if (!priv->mtr_en)
  		return -rte_mtr_error_set(error, ENOTSUP,
  					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
@@ -34,7 +35,7 @@
  	/* Check input params. */
  	ret = mlx5_flow_meter_profile_validate(dev, meter_profile_id,
  					       profile, error);
-@@ -402,19 +402,19 @@ mlx5_flow_meter_profile_delete(struct rte_eth_dev *dev,
+@@ -400,19 +400,19 @@ mlx5_flow_meter_profile_delete(struct rte_eth_dev *dev,
  	if (!priv->mtr_en)
  		return -rte_mtr_error_set(error, ENOTSUP,
  					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
@@ -57,7 +58,7 @@
  	/* Remove from list. */
  	TAILQ_REMOVE(&priv->flow_meter_profiles, fmp, next);
  	rte_free(fmp);
-@@ -636,7 +636,7 @@ mlx5_flow_meter_create(struct rte_eth_dev *dev, uint32_t meter_id,
+@@ -633,7 +633,7 @@ mlx5_flow_meter_create(struct rte_eth_dev *dev, uint32_t meter_id,
  	if (!priv->mtr_en)
  		return -rte_mtr_error_set(error, ENOTSUP,
  					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
@@ -66,7 +67,7 @@
  	/* Validate the parameters. */
  	ret = mlx5_flow_meter_validate(priv, meter_id, params, error);
  	if (ret)
-@@ -723,7 +723,7 @@ mlx5_flow_meter_destroy(struct rte_eth_dev *dev, uint32_t meter_id,
+@@ -718,7 +718,7 @@ mlx5_flow_meter_destroy(struct rte_eth_dev *dev, uint32_t meter_id,
  	if (!priv->mtr_en)
  		return -rte_mtr_error_set(error, ENOTSUP,
  					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
@@ -75,7 +76,7 @@
  	/* Meter object must exist. */
  	fm = mlx5_flow_meter_find(priv, meter_id);
  	if (fm == NULL)
-@@ -828,7 +828,7 @@ mlx5_flow_meter_enable(struct rte_eth_dev *dev,
+@@ -823,7 +823,7 @@ mlx5_flow_meter_enable(struct rte_eth_dev *dev,
  	if (!priv->mtr_en)
  		return -rte_mtr_error_set(error, ENOTSUP,
  					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
@@ -84,7 +85,7 @@
  	/* Meter object must exist. */
  	fm = mlx5_flow_meter_find(priv, meter_id);
  	if (fm == NULL)
-@@ -869,7 +869,7 @@ mlx5_flow_meter_disable(struct rte_eth_dev *dev,
+@@ -864,7 +864,7 @@ mlx5_flow_meter_disable(struct rte_eth_dev *dev,
  	if (!priv->mtr_en)
  		return -rte_mtr_error_set(error, ENOTSUP,
  					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
@@ -93,7 +94,7 @@
  	/* Meter object must exist. */
  	fm = mlx5_flow_meter_find(priv, meter_id);
  	if (fm == NULL)
-@@ -917,7 +917,7 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev,
+@@ -912,7 +912,7 @@ mlx5_flow_meter_profile_update(struct rte_eth_dev *dev,
  	if (!priv->mtr_en)
  		return -rte_mtr_error_set(error, ENOTSUP,
  					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
@@ -102,7 +103,7 @@
  	/* Meter profile must exist. */
  	fmp = mlx5_flow_meter_profile_find(priv, meter_profile_id);
  	if (fmp == NULL)
-@@ -980,7 +980,7 @@ mlx5_flow_meter_stats_update(struct rte_eth_dev *dev,
+@@ -975,7 +975,7 @@ mlx5_flow_meter_stats_update(struct rte_eth_dev *dev,
  	if (!priv->mtr_en)
  		return -rte_mtr_error_set(error, ENOTSUP,
  					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,
@@ -111,7 +112,7 @@
  	/* Meter object must exist. */
  	fm = mlx5_flow_meter_find(priv, meter_id);
  	if (fm == NULL)
-@@ -1037,7 +1037,7 @@ mlx5_flow_meter_stats_read(struct rte_eth_dev *dev,
+@@ -1032,7 +1032,7 @@ mlx5_flow_meter_stats_read(struct rte_eth_dev *dev,
  	if (!priv->mtr_en)
  		return -rte_mtr_error_set(error, ENOTSUP,
  					  RTE_MTR_ERROR_TYPE_UNSPECIFIED, NULL,

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

* [dpdk-stable] patch 'net/mlx5: do not select legacy MPW implicitly' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (29 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: fix typos in meter error messages' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: fix descriptors number adjustment' " luca.boccassi
                   ` (160 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From f0ba791d7bafa43caecac02748cb655529633c63 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@mellanox.com>
Date: Thu, 11 Jun 2020 17:42:00 +0000
Subject: [PATCH] net/mlx5: do not select legacy MPW implicitly

[ upstream commit a23d96ae59e21f7b0ada43d2757a726fc565005a ]

The Legacy MPW (multi-packet write) should not be engaged implicitly.
We should exclude this function from a Tx burst routine selection
process unless it is requested specifically by setting the txq_mpw_en
devarg.  Exclude this function from the selection process the same way
it is done for the Enhanced MPW in the mlx5_select_tx_function()
routine.

Fixes: eb8121ab9dac ("net/mlx5: introduce Tx burst routine template")

Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 488a87f59..90625e71f 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -5365,6 +5365,9 @@ mlx5_select_tx_function(struct rte_eth_dev *dev)
 			/* Does not meet requested offloads at all. */
 			continue;
 		}
+		if ((olx ^ tmp) & MLX5_TXOFF_CONFIG_MPW)
+			/* Do not enable legacy MPW if not configured. */
+			continue;
 		if ((olx ^ tmp) & MLX5_TXOFF_CONFIG_EMPW)
 			/* Do not enable eMPW if not configured. */
 			continue;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.835804063 +0100
+++ 0032-net-mlx5-do-not-select-legacy-MPW-implicitly.patch	2020-07-24 12:53:48.223005267 +0100
@@ -1,8 +1,10 @@
-From a23d96ae59e21f7b0ada43d2757a726fc565005a Mon Sep 17 00:00:00 2001
+From f0ba791d7bafa43caecac02748cb655529633c63 Mon Sep 17 00:00:00 2001
 From: Alexander Kozyrev <akozyrev@mellanox.com>
 Date: Thu, 11 Jun 2020 17:42:00 +0000
 Subject: [PATCH] net/mlx5: do not select legacy MPW implicitly
 
+[ upstream commit a23d96ae59e21f7b0ada43d2757a726fc565005a ]
+
 The Legacy MPW (multi-packet write) should not be engaged implicitly.
 We should exclude this function from a Tx burst routine selection
 process unless it is requested specifically by setting the txq_mpw_en
@@ -11,7 +13,6 @@
 routine.
 
 Fixes: eb8121ab9dac ("net/mlx5: introduce Tx burst routine template")
-Cc: stable@dpdk.org
 
 Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -20,10 +21,10 @@
  1 file changed, 3 insertions(+)
 
 diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
-index 22cdf1518..4d67925e5 100644
+index 488a87f59..90625e71f 100644
 --- a/drivers/net/mlx5/mlx5_rxtx.c
 +++ b/drivers/net/mlx5/mlx5_rxtx.c
-@@ -5542,6 +5542,9 @@ mlx5_select_tx_function(struct rte_eth_dev *dev)
+@@ -5365,6 +5365,9 @@ mlx5_select_tx_function(struct rte_eth_dev *dev)
  			/* Does not meet requested offloads at all. */
  			continue;
  		}

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

* [dpdk-stable] patch 'net/mlx5: fix descriptors number adjustment' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (30 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: do not select legacy MPW implicitly' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: fix LRO checksum' " luca.boccassi
                   ` (159 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 999f56858138a9766168e75b0f72f27f4925cb49 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@mellanox.com>
Date: Thu, 11 Jun 2020 17:43:27 +0000
Subject: [PATCH] net/mlx5: fix descriptors number adjustment

[ upstream commit e891b54a9ea4e52631def99314e9ea0f47cb7352 ]

The number of descriptors to configure in a Rx/Tx queue is passed to
the mlx5_tx/rx_queue_pre_setup() function by value. That means any
adjustments of this variable are local and cannot affect the actual
value that is used to allocate mbufs in the mlx5_txq/rxq_new()
functions. Pass the number as a reference to actually update it.

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

Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 14 +++++++-------
 drivers/net/mlx5/mlx5_txq.c | 22 +++++++++++-----------
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 2b6ab21b9..baa868360 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -446,19 +446,19 @@ mlx5_rxq_releasable(struct rte_eth_dev *dev, uint16_t idx)
  *   0 on success, a negative errno value otherwise and rte_errno is set.
  */
 static int
-mlx5_rx_queue_pre_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc)
+mlx5_rx_queue_pre_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t *desc)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
 
-	if (!rte_is_power_of_2(desc)) {
-		desc = 1 << log2above(desc);
+	if (!rte_is_power_of_2(*desc)) {
+		*desc = 1 << log2above(*desc);
 		DRV_LOG(WARNING,
 			"port %u increased number of descriptors in Rx queue %u"
 			" to the next power of two (%d)",
-			dev->data->port_id, idx, desc);
+			dev->data->port_id, idx, *desc);
 	}
 	DRV_LOG(DEBUG, "port %u configuring Rx queue %u for %u descriptors",
-		dev->data->port_id, idx, desc);
+		dev->data->port_id, idx, *desc);
 	if (idx >= priv->rxqs_n) {
 		DRV_LOG(ERR, "port %u Rx queue index out of range (%u >= %u)",
 			dev->data->port_id, idx, priv->rxqs_n);
@@ -504,7 +504,7 @@ mlx5_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 		container_of(rxq, struct mlx5_rxq_ctrl, rxq);
 	int res;
 
-	res = mlx5_rx_queue_pre_setup(dev, idx, desc);
+	res = mlx5_rx_queue_pre_setup(dev, idx, &desc);
 	if (res)
 		return res;
 	rxq_ctrl = mlx5_rxq_new(dev, idx, desc, socket, conf, mp);
@@ -545,7 +545,7 @@ mlx5_rx_hairpin_queue_setup(struct rte_eth_dev *dev, uint16_t idx,
 		container_of(rxq, struct mlx5_rxq_ctrl, rxq);
 	int res;
 
-	res = mlx5_rx_queue_pre_setup(dev, idx, desc);
+	res = mlx5_rx_queue_pre_setup(dev, idx, &desc);
 	if (res)
 		return res;
 	if (hairpin_conf->peer_count != 1 ||
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 1947e15f6..ff1e4fc85 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -147,27 +147,27 @@ mlx5_get_tx_port_offloads(struct rte_eth_dev *dev)
  *   0 on success, a negative errno value otherwise and rte_errno is set.
  */
 static int
-mlx5_tx_queue_pre_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc)
+mlx5_tx_queue_pre_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t *desc)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
 
-	if (desc <= MLX5_TX_COMP_THRESH) {
+	if (*desc <= MLX5_TX_COMP_THRESH) {
 		DRV_LOG(WARNING,
 			"port %u number of descriptors requested for Tx queue"
 			" %u must be higher than MLX5_TX_COMP_THRESH, using %u"
-			" instead of %u",
-			dev->data->port_id, idx, MLX5_TX_COMP_THRESH + 1, desc);
-		desc = MLX5_TX_COMP_THRESH + 1;
+			" instead of %u", dev->data->port_id, idx,
+			MLX5_TX_COMP_THRESH + 1, *desc);
+		*desc = MLX5_TX_COMP_THRESH + 1;
 	}
-	if (!rte_is_power_of_2(desc)) {
-		desc = 1 << log2above(desc);
+	if (!rte_is_power_of_2(*desc)) {
+		*desc = 1 << log2above(*desc);
 		DRV_LOG(WARNING,
 			"port %u increased number of descriptors in Tx queue"
 			" %u to the next power of two (%d)",
-			dev->data->port_id, idx, desc);
+			dev->data->port_id, idx, *desc);
 	}
 	DRV_LOG(DEBUG, "port %u configuring queue %u for %u descriptors",
-		dev->data->port_id, idx, desc);
+		dev->data->port_id, idx, *desc);
 	if (idx >= priv->txqs_n) {
 		DRV_LOG(ERR, "port %u Tx queue index out of range (%u >= %u)",
 			dev->data->port_id, idx, priv->txqs_n);
@@ -210,7 +210,7 @@ mlx5_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 		container_of(txq, struct mlx5_txq_ctrl, txq);
 	int res;
 
-	res = mlx5_tx_queue_pre_setup(dev, idx, desc);
+	res = mlx5_tx_queue_pre_setup(dev, idx, &desc);
 	if (res)
 		return res;
 	txq_ctrl = mlx5_txq_new(dev, idx, desc, socket, conf);
@@ -251,7 +251,7 @@ mlx5_tx_hairpin_queue_setup(struct rte_eth_dev *dev, uint16_t idx,
 		container_of(txq, struct mlx5_txq_ctrl, txq);
 	int res;
 
-	res = mlx5_tx_queue_pre_setup(dev, idx, desc);
+	res = mlx5_tx_queue_pre_setup(dev, idx, &desc);
 	if (res)
 		return res;
 	if (hairpin_conf->peer_count != 1 ||
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.871247065 +0100
+++ 0033-net-mlx5-fix-descriptors-number-adjustment.patch	2020-07-24 12:53:48.227005342 +0100
@@ -1,8 +1,10 @@
-From e891b54a9ea4e52631def99314e9ea0f47cb7352 Mon Sep 17 00:00:00 2001
+From 999f56858138a9766168e75b0f72f27f4925cb49 Mon Sep 17 00:00:00 2001
 From: Alexander Kozyrev <akozyrev@mellanox.com>
 Date: Thu, 11 Jun 2020 17:43:27 +0000
 Subject: [PATCH] net/mlx5: fix descriptors number adjustment
 
+[ upstream commit e891b54a9ea4e52631def99314e9ea0f47cb7352 ]
+
 The number of descriptors to configure in a Rx/Tx queue is passed to
 the mlx5_tx/rx_queue_pre_setup() function by value. That means any
 adjustments of this variable are local and cannot affect the actual
@@ -11,7 +13,6 @@
 
 Fixes: 6218063b39a6 ("net/mlx5: refactor Rx data path")
 Fixes: 1d88ba171942 ("net/mlx5: refactor Tx data path")
-Cc: stable@dpdk.org
 
 Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -21,10 +22,10 @@
  2 files changed, 18 insertions(+), 18 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
-index 78046fd86..dda0073c8 100644
+index 2b6ab21b9..baa868360 100644
 --- a/drivers/net/mlx5/mlx5_rxq.c
 +++ b/drivers/net/mlx5/mlx5_rxq.c
-@@ -453,19 +453,19 @@ mlx5_rxq_releasable(struct rte_eth_dev *dev, uint16_t idx)
+@@ -446,19 +446,19 @@ mlx5_rxq_releasable(struct rte_eth_dev *dev, uint16_t idx)
   *   0 on success, a negative errno value otherwise and rte_errno is set.
   */
  static int
@@ -49,7 +50,7 @@
  	if (idx >= priv->rxqs_n) {
  		DRV_LOG(ERR, "port %u Rx queue index out of range (%u >= %u)",
  			dev->data->port_id, idx, priv->rxqs_n);
-@@ -511,7 +511,7 @@ mlx5_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
+@@ -504,7 +504,7 @@ mlx5_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
  		container_of(rxq, struct mlx5_rxq_ctrl, rxq);
  	int res;
  
@@ -58,7 +59,7 @@
  	if (res)
  		return res;
  	rxq_ctrl = mlx5_rxq_new(dev, idx, desc, socket, conf, mp);
-@@ -552,7 +552,7 @@ mlx5_rx_hairpin_queue_setup(struct rte_eth_dev *dev, uint16_t idx,
+@@ -545,7 +545,7 @@ mlx5_rx_hairpin_queue_setup(struct rte_eth_dev *dev, uint16_t idx,
  		container_of(rxq, struct mlx5_rxq_ctrl, rxq);
  	int res;
  
@@ -68,10 +69,10 @@
  		return res;
  	if (hairpin_conf->peer_count != 1 ||
 diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
-index 507febffc..35b3ade86 100644
+index 1947e15f6..ff1e4fc85 100644
 --- a/drivers/net/mlx5/mlx5_txq.c
 +++ b/drivers/net/mlx5/mlx5_txq.c
-@@ -150,27 +150,27 @@ mlx5_get_tx_port_offloads(struct rte_eth_dev *dev)
+@@ -147,27 +147,27 @@ mlx5_get_tx_port_offloads(struct rte_eth_dev *dev)
   *   0 on success, a negative errno value otherwise and rte_errno is set.
   */
  static int
@@ -108,7 +109,7 @@
  	if (idx >= priv->txqs_n) {
  		DRV_LOG(ERR, "port %u Tx queue index out of range (%u >= %u)",
  			dev->data->port_id, idx, priv->txqs_n);
-@@ -213,7 +213,7 @@ mlx5_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
+@@ -210,7 +210,7 @@ mlx5_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
  		container_of(txq, struct mlx5_txq_ctrl, txq);
  	int res;
  
@@ -117,7 +118,7 @@
  	if (res)
  		return res;
  	txq_ctrl = mlx5_txq_new(dev, idx, desc, socket, conf);
-@@ -254,7 +254,7 @@ mlx5_tx_hairpin_queue_setup(struct rte_eth_dev *dev, uint16_t idx,
+@@ -251,7 +251,7 @@ mlx5_tx_hairpin_queue_setup(struct rte_eth_dev *dev, uint16_t idx,
  		container_of(txq, struct mlx5_txq_ctrl, txq);
  	int res;
  

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

* [dpdk-stable] patch 'net/mlx5: fix LRO checksum' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (31 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: fix descriptors number adjustment' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/ice/base: fix return value' " luca.boccassi
                   ` (158 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Dong Zhou; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From caedd7c3682922aeb7b3ba7747655da90cc8dac4 Mon Sep 17 00:00:00 2001
From: Dong Zhou <dongz@mellanox.com>
Date: Fri, 12 Jun 2020 11:57:46 +0300
Subject: [PATCH] net/mlx5: fix LRO checksum

[ upstream commit eb10fe7fb150d3a9c1ef01134403f85890d5e06e ]

The TCP checksum includes IPV4 pseudo-header checksum and L3
payload checksum which include TCP header and TCP payload.
When mlx5 LRO is enabled, HW will calculate the TCP payload
checksum, PMD need complete the IPV4 pseudo-header checksum
and the TCP header checksum.

The mlx5_lro_update_tcp_hdr function completes the TCP header
checksum, but this function using lower 4 bits of data-offset
field in TCP header to get the whole TCP header length, this
will cause TCP header checksum wrong calculation.

Update the code using higher 4 bits of data-offset field
instead of lower 4 bits.

Fixes: e4c2a16eb1de ("net/mlx5: handle LRO packets in Rx queue")

Signed-off-by: Dong Zhou <dongz@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 90625e71f..a9c618128 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1439,7 +1439,7 @@ mlx5_lro_update_tcp_hdr(struct rte_tcp_hdr *restrict tcp,
 	if (cqe->lro_tcppsh_abort_dupack & MLX5_CQE_LRO_PUSH_MASK)
 		tcp->tcp_flags |= RTE_TCP_PSH_FLAG;
 	tcp->cksum = 0;
-	csum += rte_raw_cksum(tcp, (tcp->data_off & 0xF) * 4);
+	csum += rte_raw_cksum(tcp, (tcp->data_off >> 4) * 4);
 	csum = ((csum & 0xffff0000) >> 16) + (csum & 0xffff);
 	csum = (~csum) & 0xffff;
 	if (csum == 0)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.914474559 +0100
+++ 0034-net-mlx5-fix-LRO-checksum.patch	2020-07-24 12:53:48.231005416 +0100
@@ -1,8 +1,10 @@
-From eb10fe7fb150d3a9c1ef01134403f85890d5e06e Mon Sep 17 00:00:00 2001
+From caedd7c3682922aeb7b3ba7747655da90cc8dac4 Mon Sep 17 00:00:00 2001
 From: Dong Zhou <dongz@mellanox.com>
 Date: Fri, 12 Jun 2020 11:57:46 +0300
 Subject: [PATCH] net/mlx5: fix LRO checksum
 
+[ upstream commit eb10fe7fb150d3a9c1ef01134403f85890d5e06e ]
+
 The TCP checksum includes IPV4 pseudo-header checksum and L3
 payload checksum which include TCP header and TCP payload.
 When mlx5 LRO is enabled, HW will calculate the TCP payload
@@ -18,7 +20,6 @@
 instead of lower 4 bits.
 
 Fixes: e4c2a16eb1de ("net/mlx5: handle LRO packets in Rx queue")
-Cc: stable@dpdk.org
 
 Signed-off-by: Dong Zhou <dongz@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -27,10 +28,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
-index 4d67925e5..e4106bf0a 100644
+index 90625e71f..a9c618128 100644
 --- a/drivers/net/mlx5/mlx5_rxtx.c
 +++ b/drivers/net/mlx5/mlx5_rxtx.c
-@@ -1529,7 +1529,7 @@ mlx5_lro_update_tcp_hdr(struct rte_tcp_hdr *restrict tcp,
+@@ -1439,7 +1439,7 @@ mlx5_lro_update_tcp_hdr(struct rte_tcp_hdr *restrict tcp,
  	if (cqe->lro_tcppsh_abort_dupack & MLX5_CQE_LRO_PUSH_MASK)
  		tcp->tcp_flags |= RTE_TCP_PSH_FLAG;
  	tcp->cksum = 0;

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

* [dpdk-stable] patch 'net/ice/base: fix return value' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (32 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: fix LRO checksum' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/ice/base: fix memory leak on error path' " luca.boccassi
                   ` (157 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Kiran Patil, Paul M Stillwell Jr, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 91525a17efb3b86a0c153bf9246f4e2a0214add3 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 15 Jun 2020 10:04:57 +0800
Subject: [PATCH] net/ice/base: fix return value

[ upstream commit 4f13a6735fd60587c9c6ae93414b6df01c833214 ]

Function ice_rem_adv_rule_id return incorrect error code (ICE_ERR_PARAM)
whereas it should have returned ICE_ERR_DOES_NOT_EXIST return code
if filter list is empty or unable to find "rule" in list

Fixes: f89aa3affa9e ("net/ice/base: support removing advanced rule")

Signed-off-by: Kiran Patil <kiran.patil@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_switch.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 34d0a164e..72b04f84f 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -6487,7 +6487,8 @@ ice_rem_adv_rule_by_id(struct ice_hw *hw,
 						list_itr->lkups_cnt, &rinfo);
 		}
 	}
-	return ICE_ERR_PARAM;
+	/* either list is empty or unable to find rule */
+	return ICE_ERR_DOES_NOT_EXIST;
 }
 
 /**
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.960154745 +0100
+++ 0035-net-ice-base-fix-return-value.patch	2020-07-24 12:53:48.239005565 +0100
@@ -1,14 +1,15 @@
-From 4f13a6735fd60587c9c6ae93414b6df01c833214 Mon Sep 17 00:00:00 2001
+From 91525a17efb3b86a0c153bf9246f4e2a0214add3 Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang@intel.com>
 Date: Mon, 15 Jun 2020 10:04:57 +0800
 Subject: [PATCH] net/ice/base: fix return value
 
+[ upstream commit 4f13a6735fd60587c9c6ae93414b6df01c833214 ]
+
 Function ice_rem_adv_rule_id return incorrect error code (ICE_ERR_PARAM)
 whereas it should have returned ICE_ERR_DOES_NOT_EXIST return code
 if filter list is empty or unable to find "rule" in list
 
 Fixes: f89aa3affa9e ("net/ice/base: support removing advanced rule")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kiran Patil <kiran.patil@intel.com>
 Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
@@ -19,10 +20,10 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
-index 01dcace55..5c53b9ec3 100644
+index 34d0a164e..72b04f84f 100644
 --- a/drivers/net/ice/base/ice_switch.c
 +++ b/drivers/net/ice/base/ice_switch.c
-@@ -7661,7 +7661,8 @@ ice_rem_adv_rule_by_id(struct ice_hw *hw,
+@@ -6487,7 +6487,8 @@ ice_rem_adv_rule_by_id(struct ice_hw *hw,
  						list_itr->lkups_cnt, &rinfo);
  		}
  	}

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

* [dpdk-stable] patch 'net/ice/base: fix memory leak on error path' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (33 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/ice/base: fix return value' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/ice/base: fix reference count on VSI list update' " luca.boccassi
                   ` (156 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Surabhi Boob, Paul M Stillwell Jr, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 26c98b7ec335eb0e3e1d0146e798e53f88f36b0d Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 15 Jun 2020 10:04:59 +0800
Subject: [PATCH] net/ice/base: fix memory leak on error path

[ upstream commit be45049b3c4340499dad5648f455f7b443975671 ]

Handles memory leaks during control queue initialization and
buffer allocation failures. The MACRO - ICE_FREE_CQ_BUFS is modified to
re-use for this fix.

Fixes: 6c1f26be50a2 ("net/ice/base: add control queue information")

Signed-off-by: Surabhi Boob <surabhi.boob@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_controlq.c | 39 ++++++++++++++++++-----------
 1 file changed, 24 insertions(+), 15 deletions(-)

diff --git a/drivers/net/ice/base/ice_controlq.c b/drivers/net/ice/base/ice_controlq.c
index feffb5198..0b651e7db 100644
--- a/drivers/net/ice/base/ice_controlq.c
+++ b/drivers/net/ice/base/ice_controlq.c
@@ -180,7 +180,9 @@ unwind_alloc_rq_bufs:
 	i--;
 	for (; i >= 0; i--)
 		ice_free_dma_mem(hw, &cq->rq.r.rq_bi[i]);
+	cq->rq.r.rq_bi = NULL;
 	ice_free(hw, cq->rq.dma_head);
+	cq->rq.dma_head = NULL;
 
 	return ICE_ERR_NO_MEMORY;
 }
@@ -218,7 +220,9 @@ unwind_alloc_sq_bufs:
 	i--;
 	for (; i >= 0; i--)
 		ice_free_dma_mem(hw, &cq->sq.r.sq_bi[i]);
+	cq->sq.r.sq_bi = NULL;
 	ice_free(hw, cq->sq.dma_head);
+	cq->sq.dma_head = NULL;
 
 	return ICE_ERR_NO_MEMORY;
 }
@@ -277,6 +281,24 @@ ice_cfg_rq_regs(struct ice_hw *hw, struct ice_ctl_q_info *cq)
 	return ICE_SUCCESS;
 }
 
+#define ICE_FREE_CQ_BUFS(hw, qi, ring)					\
+do {									\
+	/* free descriptors */						\
+	if ((qi)->ring.r.ring##_bi) {					\
+		int i;							\
+									\
+		for (i = 0; i < (qi)->num_##ring##_entries; i++)	\
+			if ((qi)->ring.r.ring##_bi[i].pa)		\
+				ice_free_dma_mem((hw),			\
+					&(qi)->ring.r.ring##_bi[i]);	\
+	}								\
+	/* free the buffer info list */					\
+	if ((qi)->ring.cmd_buf)						\
+		ice_free(hw, (qi)->ring.cmd_buf);			\
+	/* free DMA head */						\
+	ice_free(hw, (qi)->ring.dma_head);				\
+} while (0)
+
 /**
  * ice_init_sq - main initialization routine for Control ATQ
  * @hw: pointer to the hardware structure
@@ -332,6 +354,7 @@ static enum ice_status ice_init_sq(struct ice_hw *hw, struct ice_ctl_q_info *cq)
 	goto init_ctrlq_exit;
 
 init_ctrlq_free_rings:
+	ICE_FREE_CQ_BUFS(hw, cq, sq);
 	ice_free_cq_ring(hw, &cq->sq);
 
 init_ctrlq_exit:
@@ -393,27 +416,13 @@ static enum ice_status ice_init_rq(struct ice_hw *hw, struct ice_ctl_q_info *cq)
 	goto init_ctrlq_exit;
 
 init_ctrlq_free_rings:
+	ICE_FREE_CQ_BUFS(hw, cq, rq);
 	ice_free_cq_ring(hw, &cq->rq);
 
 init_ctrlq_exit:
 	return ret_code;
 }
 
-#define ICE_FREE_CQ_BUFS(hw, qi, ring)					\
-do {									\
-	int i;								\
-	/* free descriptors */						\
-	for (i = 0; i < (qi)->num_##ring##_entries; i++)		\
-		if ((qi)->ring.r.ring##_bi[i].pa)			\
-			ice_free_dma_mem((hw),				\
-					 &(qi)->ring.r.ring##_bi[i]);	\
-	/* free the buffer info list */					\
-	if ((qi)->ring.cmd_buf)						\
-		ice_free(hw, (qi)->ring.cmd_buf);			\
-	/* free DMA head */						\
-	ice_free(hw, (qi)->ring.dma_head);				\
-} while (0)
-
 /**
  * ice_shutdown_sq - shutdown the Control ATQ
  * @hw: pointer to the hardware structure
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.001747359 +0100
+++ 0036-net-ice-base-fix-memory-leak-on-error-path.patch	2020-07-24 12:53:48.239005565 +0100
@@ -1,14 +1,15 @@
-From be45049b3c4340499dad5648f455f7b443975671 Mon Sep 17 00:00:00 2001
+From 26c98b7ec335eb0e3e1d0146e798e53f88f36b0d Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang@intel.com>
 Date: Mon, 15 Jun 2020 10:04:59 +0800
 Subject: [PATCH] net/ice/base: fix memory leak on error path
 
+[ upstream commit be45049b3c4340499dad5648f455f7b443975671 ]
+
 Handles memory leaks during control queue initialization and
 buffer allocation failures. The MACRO - ICE_FREE_CQ_BUFS is modified to
 re-use for this fix.
 
 Fixes: 6c1f26be50a2 ("net/ice/base: add control queue information")
-Cc: stable@dpdk.org
 
 Signed-off-by: Surabhi Boob <surabhi.boob@intel.com>
 Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
@@ -19,10 +20,10 @@
  1 file changed, 24 insertions(+), 15 deletions(-)
 
 diff --git a/drivers/net/ice/base/ice_controlq.c b/drivers/net/ice/base/ice_controlq.c
-index 3ef86fa03..f278ef636 100644
+index feffb5198..0b651e7db 100644
 --- a/drivers/net/ice/base/ice_controlq.c
 +++ b/drivers/net/ice/base/ice_controlq.c
-@@ -182,7 +182,9 @@ unwind_alloc_rq_bufs:
+@@ -180,7 +180,9 @@ unwind_alloc_rq_bufs:
  	i--;
  	for (; i >= 0; i--)
  		ice_free_dma_mem(hw, &cq->rq.r.rq_bi[i]);
@@ -32,7 +33,7 @@
  
  	return ICE_ERR_NO_MEMORY;
  }
-@@ -220,7 +222,9 @@ unwind_alloc_sq_bufs:
+@@ -218,7 +220,9 @@ unwind_alloc_sq_bufs:
  	i--;
  	for (; i >= 0; i--)
  		ice_free_dma_mem(hw, &cq->sq.r.sq_bi[i]);
@@ -42,7 +43,7 @@
  
  	return ICE_ERR_NO_MEMORY;
  }
-@@ -279,6 +283,24 @@ ice_cfg_rq_regs(struct ice_hw *hw, struct ice_ctl_q_info *cq)
+@@ -277,6 +281,24 @@ ice_cfg_rq_regs(struct ice_hw *hw, struct ice_ctl_q_info *cq)
  	return ICE_SUCCESS;
  }
  
@@ -67,7 +68,7 @@
  /**
   * ice_init_sq - main initialization routine for Control ATQ
   * @hw: pointer to the hardware structure
-@@ -334,6 +356,7 @@ static enum ice_status ice_init_sq(struct ice_hw *hw, struct ice_ctl_q_info *cq)
+@@ -332,6 +354,7 @@ static enum ice_status ice_init_sq(struct ice_hw *hw, struct ice_ctl_q_info *cq)
  	goto init_ctrlq_exit;
  
  init_ctrlq_free_rings:
@@ -75,7 +76,7 @@
  	ice_free_cq_ring(hw, &cq->sq);
  
  init_ctrlq_exit:
-@@ -395,27 +418,13 @@ static enum ice_status ice_init_rq(struct ice_hw *hw, struct ice_ctl_q_info *cq)
+@@ -393,27 +416,13 @@ static enum ice_status ice_init_rq(struct ice_hw *hw, struct ice_ctl_q_info *cq)
  	goto init_ctrlq_exit;
  
  init_ctrlq_free_rings:

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

* [dpdk-stable] patch 'net/ice/base: fix reference count on VSI list update' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (34 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/ice/base: fix memory leak on error path' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/ice/base: fix initializing resource for field vector' " luca.boccassi
                   ` (155 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Wei Zhao, Paul M Stillwell Jr, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From c92e3b5e69b907b1739bde61184459e4e31301c6 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 15 Jun 2020 10:05:09 +0800
Subject: [PATCH] net/ice/base: fix reference count on VSI list update

[ upstream commit fda75f4c409917112b1a9694ce9969187bcfb779 ]

The parameter ref_cnt is used for tracking how many
rules are reusing this VSI list, so it can only be
updated when a rule which using this list be deleted.

Fixes: f89aa3affa9e ("net/ice/base: support removing advanced rule")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_switch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 72b04f84f..940e4ce40 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -6333,6 +6333,7 @@ ice_adv_rem_update_vsi_list(struct ice_hw *hw, u16 vsi_handle,
 				  tmp_fltr.fwd_id.hw_vsi_id, status);
 			return status;
 		}
+		fm_list->vsi_list_info->ref_cnt--;
 
 		/* Remove the VSI list since it is no longer used */
 		status = ice_remove_vsi_list_rule(hw, vsi_list_id, lkup_type);
@@ -6411,7 +6412,6 @@ ice_rem_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
 	if (list_elem->rule_info.sw_act.fltr_act != ICE_FWD_TO_VSI_LIST) {
 		remove_rule = true;
 	} else if (list_elem->vsi_count > 1) {
-		list_elem->vsi_list_info->ref_cnt--;
 		remove_rule = false;
 		vsi_handle = rinfo->sw_act.vsi_handle;
 		status = ice_adv_rem_update_vsi_list(hw, vsi_handle, list_elem);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.044016631 +0100
+++ 0037-net-ice-base-fix-reference-count-on-VSI-list-update.patch	2020-07-24 12:53:48.247005714 +0100
@@ -1,14 +1,15 @@
-From fda75f4c409917112b1a9694ce9969187bcfb779 Mon Sep 17 00:00:00 2001
+From c92e3b5e69b907b1739bde61184459e4e31301c6 Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang@intel.com>
 Date: Mon, 15 Jun 2020 10:05:09 +0800
 Subject: [PATCH] net/ice/base: fix reference count on VSI list update
 
+[ upstream commit fda75f4c409917112b1a9694ce9969187bcfb779 ]
+
 The parameter ref_cnt is used for tracking how many
 rules are reusing this VSI list, so it can only be
 updated when a rule which using this list be deleted.
 
 Fixes: f89aa3affa9e ("net/ice/base: support removing advanced rule")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
 Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
@@ -19,10 +20,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
-index 84102368b..9c7e55ff9 100644
+index 72b04f84f..940e4ce40 100644
 --- a/drivers/net/ice/base/ice_switch.c
 +++ b/drivers/net/ice/base/ice_switch.c
-@@ -7488,6 +7488,7 @@ ice_adv_rem_update_vsi_list(struct ice_hw *hw, u16 vsi_handle,
+@@ -6333,6 +6333,7 @@ ice_adv_rem_update_vsi_list(struct ice_hw *hw, u16 vsi_handle,
  				  tmp_fltr.fwd_id.hw_vsi_id, status);
  			return status;
  		}
@@ -30,7 +31,7 @@
  
  		/* Remove the VSI list since it is no longer used */
  		status = ice_remove_vsi_list_rule(hw, vsi_list_id, lkup_type);
-@@ -7566,7 +7567,6 @@ ice_rem_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
+@@ -6411,7 +6412,6 @@ ice_rem_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
  	if (list_elem->rule_info.sw_act.fltr_act != ICE_FWD_TO_VSI_LIST) {
  		remove_rule = true;
  	} else if (list_elem->vsi_count > 1) {

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

* [dpdk-stable] patch 'net/ice/base: fix initializing resource for field vector' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (35 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/ice/base: fix reference count on VSI list update' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/cxgbe: fix CLIP leak in filter error path' " luca.boccassi
                   ` (154 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Wei Zhao, Paul M Stillwell Jr, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From fa18d27bc8e0657504b0ec666a7201cd63175a8e Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 15 Jun 2020 10:05:11 +0800
Subject: [PATCH] net/ice/base: fix initializing resource for field vector

[ upstream commit 383cb0d49c10c102d7ff54560fa298be5306c807 ]

This patch add initialization for prof_res_bm_init flag
to zero in order that the possible resource for field vector
in the package file can be initialized.(in ice_init_prof_result_bm)

Fixes: 453d087ccaff ("net/ice/base: add common functions")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_common.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index 77f68561e..25e30b937 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -461,6 +461,7 @@ static enum ice_status ice_init_fltr_mgmt_struct(struct ice_hw *hw)
 		return ICE_ERR_NO_MEMORY;
 
 	INIT_LIST_HEAD(&sw->vsi_list_map_head);
+	sw->prof_res_bm_init = 0;
 
 	return ice_init_def_sw_recp(hw);
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.084763198 +0100
+++ 0038-net-ice-base-fix-initializing-resource-for-field-vec.patch	2020-07-24 12:53:48.251005789 +0100
@@ -1,14 +1,15 @@
-From 383cb0d49c10c102d7ff54560fa298be5306c807 Mon Sep 17 00:00:00 2001
+From fa18d27bc8e0657504b0ec666a7201cd63175a8e Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang@intel.com>
 Date: Mon, 15 Jun 2020 10:05:11 +0800
 Subject: [PATCH] net/ice/base: fix initializing resource for field vector
 
+[ upstream commit 383cb0d49c10c102d7ff54560fa298be5306c807 ]
+
 This patch add initialization for prof_res_bm_init flag
 to zero in order that the possible resource for field vector
 in the package file can be initialized.(in ice_init_prof_result_bm)
 
 Fixes: 453d087ccaff ("net/ice/base: add common functions")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
 Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
@@ -19,17 +20,17 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
-index 54112e8f2..baaeee321 100644
+index 77f68561e..25e30b937 100644
 --- a/drivers/net/ice/base/ice_common.c
 +++ b/drivers/net/ice/base/ice_common.c
-@@ -536,6 +536,7 @@ enum ice_status ice_init_fltr_mgmt_struct(struct ice_hw *hw)
+@@ -461,6 +461,7 @@ static enum ice_status ice_init_fltr_mgmt_struct(struct ice_hw *hw)
  		return ICE_ERR_NO_MEMORY;
  
  	INIT_LIST_HEAD(&sw->vsi_list_map_head);
 +	sw->prof_res_bm_init = 0;
  
- 	status = ice_init_def_sw_recp(hw, &hw->switch_info->recp_list);
- 	if (status) {
+ 	return ice_init_def_sw_recp(hw);
+ }
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/cxgbe: fix CLIP leak in filter error path' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (36 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/ice/base: fix initializing resource for field vector' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/cxgbe: fix double MPS alloc by flow validate and create' " luca.boccassi
                   ` (153 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 3c1368a539cc4353188cb73bdb1dbcba0d654b47 Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Sat, 13 Jun 2020 03:37:23 +0530
Subject: [PATCH] net/cxgbe: fix CLIP leak in filter error path

[ upstream commit 844b21299f1a10ac350528365dc761e2934512ee ]

Free up Compressed Local IP (CLIP) entry properly during filter
creation failure path. Also consolidate all various tables
cleanup to a common function and invoke it from both wild-card
and exact-match filter paths.

Fixes: af44a577988b ("net/cxgbe: support to offload flows to HASH region")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/cxgbe_filter.c | 68 +++++++++++++++-----------------
 1 file changed, 31 insertions(+), 37 deletions(-)

diff --git a/drivers/net/cxgbe/cxgbe_filter.c b/drivers/net/cxgbe/cxgbe_filter.c
index b9d9d5d39..8a8031cb9 100644
--- a/drivers/net/cxgbe/cxgbe_filter.c
+++ b/drivers/net/cxgbe/cxgbe_filter.c
@@ -269,6 +269,22 @@ int cxgbe_alloc_ftid(struct adapter *adap, u8 nentries)
 	return pos < size ? pos : -1;
 }
 
+/**
+ * Clear a filter and release any of its resources that we own.  This also
+ * clears the filter's "pending" status.
+ */
+static void clear_filter(struct filter_entry *f)
+{
+	if (f->clipt)
+		cxgbe_clip_release(f->dev, f->clipt);
+
+	/* The zeroing of the filter rule below clears the filter valid,
+	 * pending, locked flags etc. so it's all we need for
+	 * this operation.
+	 */
+	memset(f, 0, sizeof(*f));
+}
+
 /**
  * Construct hash filter ntuple.
  */
@@ -555,7 +571,7 @@ static int cxgbe_set_hash_filter(struct rte_eth_dev *dev,
 
 	f = t4_os_alloc(sizeof(*f));
 	if (!f)
-		goto out_err;
+		return -ENOMEM;
 
 	f->fs = *fs;
 	f->ctx = ctx;
@@ -592,7 +608,7 @@ static int cxgbe_set_hash_filter(struct rte_eth_dev *dev,
 		mbuf = rte_pktmbuf_alloc(ctrlq->mb_pool);
 		if (!mbuf) {
 			ret = -ENOMEM;
-			goto free_clip;
+			goto free_atid;
 		}
 
 		mbuf->data_len = size;
@@ -622,33 +638,15 @@ static int cxgbe_set_hash_filter(struct rte_eth_dev *dev,
 	t4_mgmt_tx(ctrlq, mbuf);
 	return 0;
 
-free_clip:
-	cxgbe_clip_release(f->dev, f->clipt);
 free_atid:
 	cxgbe_free_atid(t, atid);
 
 out_err:
+	clear_filter(f);
 	t4_os_free(f);
 	return ret;
 }
 
-/**
- * Clear a filter and release any of its resources that we own.  This also
- * clears the filter's "pending" status.
- */
-static void clear_filter(struct filter_entry *f)
-{
-	if (f->clipt)
-		cxgbe_clip_release(f->dev, f->clipt);
-
-	/*
-	 * The zeroing of the filter rule below clears the filter valid,
-	 * pending, locked flags etc. so it's all we need for
-	 * this operation.
-	 */
-	memset(f, 0, sizeof(*f));
-}
-
 /**
  * t4_mk_filtdelwr - create a delete filter WR
  * @adap: adapter context
@@ -1007,16 +1005,6 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
 		return ret;
 	}
 
-	/*
-	 * Allocate a clip table entry only if we have non-zero IPv6 address
-	 */
-	if (chip_ver > CHELSIO_T5 && fs->type &&
-	    memcmp(fs->val.lip, bitoff, sizeof(bitoff))) {
-		f->clipt = cxgbe_clip_alloc(dev, (u32 *)&fs->val.lip);
-		if (!f->clipt)
-			goto free_tid;
-	}
-
 	/*
 	 * Convert the filter specification into our internal format.
 	 * We copy the PF/VF specification into the Outer VLAN field
@@ -1027,6 +1015,16 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
 	f->fs.iq = iq;
 	f->dev = dev;
 
+	/* Allocate a clip table entry only if we have non-zero IPv6 address. */
+	if (chip_ver > CHELSIO_T5 && f->fs.type &&
+	    memcmp(f->fs.val.lip, bitoff, sizeof(bitoff))) {
+		f->clipt = cxgbe_clip_alloc(dev, (u32 *)&f->fs.val.lip);
+		if (!f->clipt) {
+			ret = -ENOMEM;
+			goto free_tid;
+		}
+	}
+
 	/*
 	 * Attempt to set the filter.  If we don't succeed, we clear
 	 * it and return the failure.
@@ -1107,6 +1105,7 @@ void cxgbe_hash_filter_rpl(struct adapter *adap,
 		}
 
 		cxgbe_free_atid(t, ftid);
+		clear_filter(f);
 		t4_os_free(f);
 	}
 
@@ -1331,13 +1330,8 @@ void cxgbe_hash_del_filter_rpl(struct adapter *adap,
 	}
 
 	ctx = f->ctx;
-	f->ctx = NULL;
-
-	f->valid = 0;
-
-	if (f->clipt)
-		cxgbe_clip_release(f->dev, f->clipt);
 
+	clear_filter(f);
 	cxgbe_remove_tid(t, 0, tid, 0);
 	t4_os_free(f);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.121429259 +0100
+++ 0039-net-cxgbe-fix-CLIP-leak-in-filter-error-path.patch	2020-07-24 12:53:48.251005789 +0100
@@ -1,15 +1,16 @@
-From 844b21299f1a10ac350528365dc761e2934512ee Mon Sep 17 00:00:00 2001
+From 3c1368a539cc4353188cb73bdb1dbcba0d654b47 Mon Sep 17 00:00:00 2001
 From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
 Date: Sat, 13 Jun 2020 03:37:23 +0530
 Subject: [PATCH] net/cxgbe: fix CLIP leak in filter error path
 
+[ upstream commit 844b21299f1a10ac350528365dc761e2934512ee ]
+
 Free up Compressed Local IP (CLIP) entry properly during filter
 creation failure path. Also consolidate all various tables
 cleanup to a common function and invoke it from both wild-card
 and exact-match filter paths.
 
 Fixes: af44a577988b ("net/cxgbe: support to offload flows to HASH region")
-Cc: stable@dpdk.org
 
 Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
 ---
@@ -17,10 +18,10 @@
  1 file changed, 31 insertions(+), 37 deletions(-)
 
 diff --git a/drivers/net/cxgbe/cxgbe_filter.c b/drivers/net/cxgbe/cxgbe_filter.c
-index 27e96c73e..45602d468 100644
+index b9d9d5d39..8a8031cb9 100644
 --- a/drivers/net/cxgbe/cxgbe_filter.c
 +++ b/drivers/net/cxgbe/cxgbe_filter.c
-@@ -284,6 +284,22 @@ int cxgbe_alloc_ftid(struct adapter *adap, u8 nentries)
+@@ -269,6 +269,22 @@ int cxgbe_alloc_ftid(struct adapter *adap, u8 nentries)
  	return pos < size ? pos : -1;
  }
  
@@ -43,7 +44,7 @@
  /**
   * Construct hash filter ntuple.
   */
-@@ -583,7 +599,7 @@ static int cxgbe_set_hash_filter(struct rte_eth_dev *dev,
+@@ -555,7 +571,7 @@ static int cxgbe_set_hash_filter(struct rte_eth_dev *dev,
  
  	f = t4_os_alloc(sizeof(*f));
  	if (!f)
@@ -52,7 +53,7 @@
  
  	f->fs = *fs;
  	f->ctx = ctx;
-@@ -631,7 +647,7 @@ static int cxgbe_set_hash_filter(struct rte_eth_dev *dev,
+@@ -592,7 +608,7 @@ static int cxgbe_set_hash_filter(struct rte_eth_dev *dev,
  		mbuf = rte_pktmbuf_alloc(ctrlq->mb_pool);
  		if (!mbuf) {
  			ret = -ENOMEM;
@@ -61,7 +62,7 @@
  		}
  
  		mbuf->data_len = size;
-@@ -661,33 +677,15 @@ static int cxgbe_set_hash_filter(struct rte_eth_dev *dev,
+@@ -622,33 +638,15 @@ static int cxgbe_set_hash_filter(struct rte_eth_dev *dev,
  	t4_mgmt_tx(ctrlq, mbuf);
  	return 0;
  
@@ -96,7 +97,7 @@
  /**
   * t4_mk_filtdelwr - create a delete filter WR
   * @adap: adapter context
-@@ -1070,16 +1068,6 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
+@@ -1007,16 +1005,6 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
  		return ret;
  	}
  
@@ -113,7 +114,7 @@
  	/*
  	 * Convert the filter specification into our internal format.
  	 * We copy the PF/VF specification into the Outer VLAN field
-@@ -1090,6 +1078,16 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
+@@ -1027,6 +1015,16 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
  	f->fs.iq = iq;
  	f->dev = dev;
  
@@ -127,10 +128,10 @@
 +		}
 +	}
 +
- 	iconf = adapter->params.tp.ingress_config;
- 
- 	/* Either PFVF or OVLAN can be active, but not both
-@@ -1192,6 +1190,7 @@ void cxgbe_hash_filter_rpl(struct adapter *adap,
+ 	/*
+ 	 * Attempt to set the filter.  If we don't succeed, we clear
+ 	 * it and return the failure.
+@@ -1107,6 +1105,7 @@ void cxgbe_hash_filter_rpl(struct adapter *adap,
  		}
  
  		cxgbe_free_atid(t, ftid);
@@ -138,7 +139,7 @@
  		t4_os_free(f);
  	}
  
-@@ -1416,13 +1415,8 @@ void cxgbe_hash_del_filter_rpl(struct adapter *adap,
+@@ -1331,13 +1330,8 @@ void cxgbe_hash_del_filter_rpl(struct adapter *adap,
  	}
  
  	ctx = f->ctx;

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

* [dpdk-stable] patch 'net/cxgbe: fix double MPS alloc by flow validate and create' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (37 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/cxgbe: fix CLIP leak in filter error path' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:57 ` [dpdk-stable] patch 'meter: remove inline functions from export list' " luca.boccassi
                   ` (152 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 9f61da6849dfdb2e17fa23dceb3001eacceaf6c0 Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Sat, 13 Jun 2020 03:37:25 +0530
Subject: [PATCH] net/cxgbe: fix double MPS alloc by flow validate and create

[ upstream commit be5f4d5ced10f9d7edc8ba4b3f1d98b9d476d367 ]

The Multi Port Switch (MPS) entry is allocated twice when both
flow validate and create are invoked, but only freed once during
flow destroy. Avoid double alloc by moving MPS entry allocation
closer to when the filter create request is sent to hardware and
will be ignored for filter validate request.

Fixes: fefee7a619a4 ("net/cxgbe: add flow ops to match based on dest MAC")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/cxgbe_filter.c | 32 ++++++++++++++++++++++++++++++++
 drivers/net/cxgbe/cxgbe_filter.h |  4 +++-
 drivers/net/cxgbe/cxgbe_flow.c   | 28 +++-------------------------
 3 files changed, 38 insertions(+), 26 deletions(-)

diff --git a/drivers/net/cxgbe/cxgbe_filter.c b/drivers/net/cxgbe/cxgbe_filter.c
index 8a8031cb9..07337bb4b 100644
--- a/drivers/net/cxgbe/cxgbe_filter.c
+++ b/drivers/net/cxgbe/cxgbe_filter.c
@@ -8,6 +8,7 @@
 #include "base/t4_tcb.h"
 #include "base/t4_regs.h"
 #include "cxgbe_filter.h"
+#include "mps_tcam.h"
 #include "clip_tbl.h"
 #include "l2t.h"
 
@@ -275,9 +276,14 @@ int cxgbe_alloc_ftid(struct adapter *adap, u8 nentries)
  */
 static void clear_filter(struct filter_entry *f)
 {
+	struct port_info *pi = ethdev2pinfo(f->dev);
+
 	if (f->clipt)
 		cxgbe_clip_release(f->dev, f->clipt);
 
+	if (f->fs.mask.macidx)
+		cxgbe_mpstcam_remove(pi, f->fs.val.macidx);
+
 	/* The zeroing of the filter rule below clears the filter valid,
 	 * pending, locked flags etc. so it's all we need for
 	 * this operation.
@@ -578,6 +584,19 @@ static int cxgbe_set_hash_filter(struct rte_eth_dev *dev,
 	f->dev = dev;
 	f->fs.iq = iq;
 
+	/* Allocate MPS TCAM entry to match Destination MAC. */
+	if (f->fs.mask.macidx) {
+		int idx;
+
+		idx = cxgbe_mpstcam_alloc(pi, f->fs.val.dmac, f->fs.mask.dmac);
+		if (idx <= 0) {
+			ret = -ENOMEM;
+			goto out_err;
+		}
+
+		f->fs.val.macidx = idx;
+	}
+
 	/*
 	 * If the new filter requires loopback Destination MAC and/or VLAN
 	 * rewriting then we need to allocate a Layer 2 Table (L2T) entry for
@@ -1015,6 +1034,19 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
 	f->fs.iq = iq;
 	f->dev = dev;
 
+	/* Allocate MPS TCAM entry to match Destination MAC. */
+	if (f->fs.mask.macidx) {
+		int idx;
+
+		idx = cxgbe_mpstcam_alloc(pi, f->fs.val.dmac, f->fs.mask.dmac);
+		if (idx <= 0) {
+			ret = -ENOMEM;
+			goto free_tid;
+		}
+
+		f->fs.val.macidx = idx;
+	}
+
 	/* Allocate a clip table entry only if we have non-zero IPv6 address. */
 	if (chip_ver > CHELSIO_T5 && f->fs.type &&
 	    memcmp(f->fs.val.lip, bitoff, sizeof(bitoff))) {
diff --git a/drivers/net/cxgbe/cxgbe_filter.h b/drivers/net/cxgbe/cxgbe_filter.h
index 06021c854..e69e9d3f5 100644
--- a/drivers/net/cxgbe/cxgbe_filter.h
+++ b/drivers/net/cxgbe/cxgbe_filter.h
@@ -69,8 +69,10 @@ struct ch_filter_tuple {
 	uint16_t lport;		/* local port */
 	uint16_t fport;		/* foreign port */
 
+	uint8_t dmac[6];        /* Destination MAC to match */
+
 	/* reservations for future additions */
-	uint8_t rsvd[12];
+	uint8_t rsvd[6];
 };
 
 /*
diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
index 2fb77b4ab..1298fb12a 100644
--- a/drivers/net/cxgbe/cxgbe_flow.c
+++ b/drivers/net/cxgbe/cxgbe_flow.c
@@ -190,20 +190,9 @@ ch_rte_parsetype_eth(const void *dmask, const struct rte_flow_item *item,
 					  "src mac filtering not supported");
 
 	if (!rte_is_zero_ether_addr(&mask->dst)) {
-		const u8 *addr = (const u8 *)&spec->dst.addr_bytes[0];
-		const u8 *m = (const u8 *)&mask->dst.addr_bytes[0];
-		struct rte_flow *flow = (struct rte_flow *)fs->private;
-		struct port_info *pi = (struct port_info *)
-					(flow->dev->data->dev_private);
-		int idx;
-
-		idx = cxgbe_mpstcam_alloc(pi, addr, m);
-		if (idx <= 0)
-			return rte_flow_error_set(e, idx,
-						  RTE_FLOW_ERROR_TYPE_ITEM,
-						  NULL, "unable to allocate mac"
-						  " entry in h/w");
-		CXGBE_FILL_FS(idx, 0x1ff, macidx);
+		CXGBE_FILL_FS(0, 0x1ff, macidx);
+		CXGBE_FILL_FS_MEMCPY(spec->dst.addr_bytes, mask->dst.addr_bytes,
+				     dmac);
 	}
 
 	/* Only set outer ethertype, if we didn't encounter VLAN item yet.
@@ -1085,17 +1074,6 @@ static int __cxgbe_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)
 		return ctx.result;
 	}
 
-	fs = &flow->fs;
-	if (fs->mask.macidx) {
-		struct port_info *pi = (struct port_info *)
-					(dev->data->dev_private);
-		int ret;
-
-		ret = cxgbe_mpstcam_remove(pi, fs->val.macidx);
-		if (!ret)
-			return ret;
-	}
-
 	return 0;
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.161782954 +0100
+++ 0040-net-cxgbe-fix-double-MPS-alloc-by-flow-validate-and-.patch	2020-07-24 12:53:48.255005863 +0100
@@ -1,8 +1,10 @@
-From be5f4d5ced10f9d7edc8ba4b3f1d98b9d476d367 Mon Sep 17 00:00:00 2001
+From 9f61da6849dfdb2e17fa23dceb3001eacceaf6c0 Mon Sep 17 00:00:00 2001
 From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
 Date: Sat, 13 Jun 2020 03:37:25 +0530
 Subject: [PATCH] net/cxgbe: fix double MPS alloc by flow validate and create
 
+[ upstream commit be5f4d5ced10f9d7edc8ba4b3f1d98b9d476d367 ]
+
 The Multi Port Switch (MPS) entry is allocated twice when both
 flow validate and create are invoked, but only freed once during
 flow destroy. Avoid double alloc by moving MPS entry allocation
@@ -10,7 +12,6 @@
 will be ignored for filter validate request.
 
 Fixes: fefee7a619a4 ("net/cxgbe: add flow ops to match based on dest MAC")
-Cc: stable@dpdk.org
 
 Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
 ---
@@ -20,7 +21,7 @@
  3 files changed, 38 insertions(+), 26 deletions(-)
 
 diff --git a/drivers/net/cxgbe/cxgbe_filter.c b/drivers/net/cxgbe/cxgbe_filter.c
-index 06233e41e..317830f58 100644
+index 8a8031cb9..07337bb4b 100644
 --- a/drivers/net/cxgbe/cxgbe_filter.c
 +++ b/drivers/net/cxgbe/cxgbe_filter.c
 @@ -8,6 +8,7 @@
@@ -30,8 +31,8 @@
 +#include "mps_tcam.h"
  #include "clip_tbl.h"
  #include "l2t.h"
- #include "smt.h"
-@@ -290,12 +291,17 @@ int cxgbe_alloc_ftid(struct adapter *adap, u8 nentries)
+ 
+@@ -275,9 +276,14 @@ int cxgbe_alloc_ftid(struct adapter *adap, u8 nentries)
   */
  static void clear_filter(struct filter_entry *f)
  {
@@ -40,16 +41,13 @@
  	if (f->clipt)
  		cxgbe_clip_release(f->dev, f->clipt);
  
- 	if (f->l2t)
- 		cxgbe_l2t_release(f->l2t);
- 
 +	if (f->fs.mask.macidx)
 +		cxgbe_mpstcam_remove(pi, f->fs.val.macidx);
 +
  	/* The zeroing of the filter rule below clears the filter valid,
  	 * pending, locked flags etc. so it's all we need for
  	 * this operation.
-@@ -609,6 +615,19 @@ static int cxgbe_set_hash_filter(struct rte_eth_dev *dev,
+@@ -578,6 +584,19 @@ static int cxgbe_set_hash_filter(struct rte_eth_dev *dev,
  	f->dev = dev;
  	f->fs.iq = iq;
  
@@ -69,7 +67,7 @@
  	/*
  	 * If the new filter requires loopback Destination MAC and/or VLAN
  	 * rewriting then we need to allocate a Layer 2 Table (L2T) entry for
-@@ -1067,6 +1086,19 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
+@@ -1015,6 +1034,19 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
  	f->fs.iq = iq;
  	f->dev = dev;
  
@@ -90,7 +88,7 @@
  	if (chip_ver > CHELSIO_T5 && f->fs.type &&
  	    memcmp(f->fs.val.lip, bitoff, sizeof(bitoff))) {
 diff --git a/drivers/net/cxgbe/cxgbe_filter.h b/drivers/net/cxgbe/cxgbe_filter.h
-index e79c052de..46ebf8333 100644
+index 06021c854..e69e9d3f5 100644
 --- a/drivers/net/cxgbe/cxgbe_filter.h
 +++ b/drivers/net/cxgbe/cxgbe_filter.h
 @@ -69,8 +69,10 @@ struct ch_filter_tuple {
@@ -106,10 +104,10 @@
  
  /*
 diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
-index 166c39ba5..dd8ee7bbd 100644
+index 2fb77b4ab..1298fb12a 100644
 --- a/drivers/net/cxgbe/cxgbe_flow.c
 +++ b/drivers/net/cxgbe/cxgbe_flow.c
-@@ -194,20 +194,9 @@ ch_rte_parsetype_eth(const void *dmask, const struct rte_flow_item *item,
+@@ -190,20 +190,9 @@ ch_rte_parsetype_eth(const void *dmask, const struct rte_flow_item *item,
  					  "src mac filtering not supported");
  
  	if (!rte_is_zero_ether_addr(&mask->dst)) {
@@ -132,8 +130,8 @@
 +				     dmac);
  	}
  
- 	CXGBE_FILL_FS(be16_to_cpu(spec->type),
-@@ -1212,17 +1201,6 @@ static int __cxgbe_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)
+ 	/* Only set outer ethertype, if we didn't encounter VLAN item yet.
+@@ -1085,17 +1074,6 @@ static int __cxgbe_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)
  		return ctx.result;
  	}
  

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

* [dpdk-stable] patch 'meter: remove inline functions from export list' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (38 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'net/cxgbe: fix double MPS alloc by flow validate and create' " luca.boccassi
@ 2020-07-24 11:57 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'eal/linux: fix epoll fd list rebuild for interrupts' " luca.boccassi
                   ` (151 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:57 UTC (permalink / raw)
  To: Fady Bader; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 451a93ce727a0adf151f8b4e808b4f16c55933bb Mon Sep 17 00:00:00 2001
From: Fady Bader <fady@mellanox.com>
Date: Wed, 17 Jun 2020 11:24:31 +0300
Subject: [PATCH] meter: remove inline functions from export list

[ upstream commit f6da77d92ddc76bb5bd0ea9bf4ff044c9fde1a9b ]

The code didn't compile when using exported meter functions under Windows.

error LNK2001: unresolved external symbol
rte_meter_srtcm_color_aware_check
error LNK2001: unresolved external symbol
rte_meter_srtcm_color_blind_check
error LNK2001: unresolved external symbol
rte_meter_trtcm_color_aware_check
error LNK2001: unresolved external symbol
rte_meter_trtcm_color_blind_check
error LNK2001: unresolved external symbol
rte_meter_trtcm_rfc4115_color_aware_check
error LNK2001: unresolved external symbol
rte_meter_trtcm_rfc4115_color_blind_check

The cause was that there were some inline functions that were included in
the export list.
To solve this the functions were removed from rte_meter_version.map export
list which are implemented in the header and shouldn't be exported.

Fixes: 655796d2b5fb ("meter: support RFC4115 trTCM")
Fixes: 9d41beed24b0 ("lib: provide initial versioning")

Signed-off-by: Fady Bader <fady@mellanox.com>
---
 lib/librte_meter/rte_meter_version.map | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/lib/librte_meter/rte_meter_version.map b/lib/librte_meter/rte_meter_version.map
index 46410b036..3fc7ddd19 100644
--- a/lib/librte_meter/rte_meter_version.map
+++ b/lib/librte_meter/rte_meter_version.map
@@ -1,12 +1,8 @@
 DPDK_20.0 {
 	global:
 
-	rte_meter_srtcm_color_aware_check;
-	rte_meter_srtcm_color_blind_check;
 	rte_meter_srtcm_config;
 	rte_meter_srtcm_profile_config;
-	rte_meter_trtcm_color_aware_check;
-	rte_meter_trtcm_color_blind_check;
 	rte_meter_trtcm_config;
 	rte_meter_trtcm_profile_config;
 
@@ -16,8 +12,6 @@ DPDK_20.0 {
 EXPERIMENTAL {
 	global:
 
-	rte_meter_trtcm_rfc4115_color_aware_check;
-	rte_meter_trtcm_rfc4115_color_blind_check;
 	rte_meter_trtcm_rfc4115_config;
 	rte_meter_trtcm_rfc4115_profile_config;
 };
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.199270985 +0100
+++ 0041-meter-remove-inline-functions-from-export-list.patch	2020-07-24 12:53:48.255005863 +0100
@@ -1,8 +1,10 @@
-From f6da77d92ddc76bb5bd0ea9bf4ff044c9fde1a9b Mon Sep 17 00:00:00 2001
+From 451a93ce727a0adf151f8b4e808b4f16c55933bb Mon Sep 17 00:00:00 2001
 From: Fady Bader <fady@mellanox.com>
 Date: Wed, 17 Jun 2020 11:24:31 +0300
 Subject: [PATCH] meter: remove inline functions from export list
 
+[ upstream commit f6da77d92ddc76bb5bd0ea9bf4ff044c9fde1a9b ]
+
 The code didn't compile when using exported meter functions under Windows.
 
 error LNK2001: unresolved external symbol
@@ -25,7 +27,6 @@
 
 Fixes: 655796d2b5fb ("meter: support RFC4115 trTCM")
 Fixes: 9d41beed24b0 ("lib: provide initial versioning")
-Cc: stable@dpdk.org
 
 Signed-off-by: Fady Bader <fady@mellanox.com>
 ---
@@ -33,7 +34,7 @@
  1 file changed, 6 deletions(-)
 
 diff --git a/lib/librte_meter/rte_meter_version.map b/lib/librte_meter/rte_meter_version.map
-index b493bcebe..58859d4d7 100644
+index 46410b036..3fc7ddd19 100644
 --- a/lib/librte_meter/rte_meter_version.map
 +++ b/lib/librte_meter/rte_meter_version.map
 @@ -1,12 +1,8 @@
@@ -50,14 +51,14 @@
  	rte_meter_trtcm_profile_config;
  
 @@ -16,8 +12,6 @@ DPDK_20.0 {
- DPDK_21 {
+ EXPERIMENTAL {
  	global:
  
 -	rte_meter_trtcm_rfc4115_color_aware_check;
 -	rte_meter_trtcm_rfc4115_color_blind_check;
  	rte_meter_trtcm_rfc4115_config;
  	rte_meter_trtcm_rfc4115_profile_config;
- 
+ };
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'eal/linux: fix epoll fd list rebuild for interrupts' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (39 preceding siblings ...)
  2020-07-24 11:57 ` [dpdk-stable] patch 'meter: remove inline functions from export list' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'test/bpf: fix few small issues' " luca.boccassi
                   ` (150 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Harman Kalra; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 318c4a44965c100702b95d58c18c6c1c22bd25a7 Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Fri, 19 Jun 2020 19:29:28 +0530
Subject: [PATCH] eal/linux: fix epoll fd list rebuild for interrupts

[ upstream commit 02b73b1e93a2e319e5751e0e662e6271f6f3367e ]

An issue has been observed where epoll file descriptor
list rebuilds every time an interrupt/alarm event is
received.

eal_intr_process_interrupts() should notify pipe fd only
if any source is removed from the source list i.e (rv > 0)

Fixes: 0c7ce182a760 ("eal: add pending interrupt callback unregister")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
---
 lib/librte_eal/linux/eal/eal_interrupts.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/linux/eal/eal_interrupts.c b/lib/librte_eal/linux/eal/eal_interrupts.c
index 14ebb108c..5a58f05fa 100644
--- a/lib/librte_eal/linux/eal/eal_interrupts.c
+++ b/lib/librte_eal/linux/eal/eal_interrupts.c
@@ -984,7 +984,7 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds)
 		}
 
 		/* notify the pipe fd waited by epoll_wait to rebuild the wait list */
-		if (rv >= 0 && write(intr_pipe.writefd, "1", 1) < 0) {
+		if (rv > 0 && write(intr_pipe.writefd, "1", 1) < 0) {
 			rte_spinlock_unlock(&intr_lock);
 			return -EPIPE;
 		}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.234272972 +0100
+++ 0042-eal-linux-fix-epoll-fd-list-rebuild-for-interrupts.patch	2020-07-24 12:53:48.255005863 +0100
@@ -1,8 +1,10 @@
-From 02b73b1e93a2e319e5751e0e662e6271f6f3367e Mon Sep 17 00:00:00 2001
+From 318c4a44965c100702b95d58c18c6c1c22bd25a7 Mon Sep 17 00:00:00 2001
 From: Harman Kalra <hkalra@marvell.com>
 Date: Fri, 19 Jun 2020 19:29:28 +0530
 Subject: [PATCH] eal/linux: fix epoll fd list rebuild for interrupts
 
+[ upstream commit 02b73b1e93a2e319e5751e0e662e6271f6f3367e ]
+
 An issue has been observed where epoll file descriptor
 list rebuilds every time an interrupt/alarm event is
 received.
@@ -11,18 +13,17 @@
 if any source is removed from the source list i.e (rv > 0)
 
 Fixes: 0c7ce182a760 ("eal: add pending interrupt callback unregister")
-Cc: stable@dpdk.org
 
 Signed-off-by: Harman Kalra <hkalra@marvell.com>
 ---
- lib/librte_eal/linux/eal_interrupts.c | 2 +-
+ lib/librte_eal/linux/eal/eal_interrupts.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/lib/librte_eal/linux/eal_interrupts.c b/lib/librte_eal/linux/eal_interrupts.c
-index 16e7a7d51..84eeaa1bc 100644
---- a/lib/librte_eal/linux/eal_interrupts.c
-+++ b/lib/librte_eal/linux/eal_interrupts.c
-@@ -1010,7 +1010,7 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds)
+diff --git a/lib/librte_eal/linux/eal/eal_interrupts.c b/lib/librte_eal/linux/eal/eal_interrupts.c
+index 14ebb108c..5a58f05fa 100644
+--- a/lib/librte_eal/linux/eal/eal_interrupts.c
++++ b/lib/librte_eal/linux/eal/eal_interrupts.c
+@@ -984,7 +984,7 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds)
  		}
  
  		/* notify the pipe fd waited by epoll_wait to rebuild the wait list */

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

* [dpdk-stable] patch 'test/bpf: fix few small issues' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (40 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'eal/linux: fix epoll fd list rebuild for interrupts' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'bpf: fix add/sub min/max estimations' " luca.boccassi
                   ` (149 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 3e457e69b6a0b0b4f7220481aac1766197916253 Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
Date: Wed, 27 May 2020 15:16:49 +0100
Subject: [PATCH] test/bpf: fix few small issues

[ upstream commit 83633ba230761647b5014301c1f98b670d03e375 ]

Address for few small issues:
 - unreachable return statement
 - failed test-case can finish with 'success' status

Also use unified cmp_res() function to check return value.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 app/test/test_bpf.c | 39 ++++++++++++++-------------------------
 1 file changed, 14 insertions(+), 25 deletions(-)

diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c
index ee534687a..4a61a7d7c 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -1797,13 +1797,6 @@ test_call1_check(uint64_t rc, const void *arg)
 	dummy_func1(arg, &v32, &v64);
 	v64 += v32;
 
-	if (v64 != rc) {
-		printf("%s@%d: invalid return value "
-			"expected=0x%" PRIx64 ", actual=0x%" PRIx64 "\n",
-			__func__, __LINE__, v64, rc);
-		return -1;
-	}
-	return 0;
 	return cmp_res(__func__, v64, rc, dv, dv, sizeof(*dv));
 }
 
@@ -1934,13 +1927,7 @@ test_call2_check(uint64_t rc, const void *arg)
 	dummy_func2(&a, &b);
 	v = a.u64 + a.u32 + b.u16 + b.u8;
 
-	if (v != rc) {
-		printf("%s@%d: invalid return value "
-			"expected=0x%" PRIx64 ", actual=0x%" PRIx64 "\n",
-			__func__, __LINE__, v, rc);
-		return -1;
-	}
-	return 0;
+	return cmp_res(__func__, v, rc, arg, arg, 0);
 }
 
 static const struct rte_bpf_xsym test_call2_xsym[] = {
@@ -2429,7 +2416,6 @@ test_call5_check(uint64_t rc, const void *arg)
 	v = 0;
 
 fail:
-
 	return cmp_res(__func__, v, rc, &v, &rc, sizeof(v));
 }
 
@@ -2458,6 +2444,7 @@ static const struct rte_bpf_xsym test_call5_xsym[] = {
 	},
 };
 
+/* all bpf test cases */
 static const struct bpf_test tests[] = {
 	{
 		.name = "test_store1",
@@ -2738,7 +2725,6 @@ run_test(const struct bpf_test *tst)
 	}
 
 	tst->prepare(tbuf);
-
 	rc = rte_bpf_exec(bpf, tbuf);
 	ret = tst->check_result(rc, tbuf);
 	if (ret != 0) {
@@ -2746,17 +2732,20 @@ run_test(const struct bpf_test *tst)
 			__func__, __LINE__, tst->name, ret, strerror(ret));
 	}
 
+	/* repeat the same test with jit, when possible */
 	rte_bpf_get_jit(bpf, &jit);
-	if (jit.func == NULL)
-		return 0;
+	if (jit.func != NULL) {
 
-	tst->prepare(tbuf);
-	rc = jit.func(tbuf);
-	rv = tst->check_result(rc, tbuf);
-	ret |= rv;
-	if (rv != 0) {
-		printf("%s@%d: check_result(%s) failed, error: %d(%s);\n",
-			__func__, __LINE__, tst->name, rv, strerror(ret));
+		tst->prepare(tbuf);
+		rc = jit.func(tbuf);
+		rv = tst->check_result(rc, tbuf);
+		ret |= rv;
+		if (rv != 0) {
+			printf("%s@%d: check_result(%s) failed, "
+				"error: %d(%s);\n",
+				__func__, __LINE__, tst->name,
+				rv, strerror(ret));
+		}
 	}
 
 	rte_bpf_destroy(bpf);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.270670479 +0100
+++ 0043-test-bpf-fix-few-small-issues.patch	2020-07-24 12:53:48.255005863 +0100
@@ -1,16 +1,16 @@
-From 83633ba230761647b5014301c1f98b670d03e375 Mon Sep 17 00:00:00 2001
+From 3e457e69b6a0b0b4f7220481aac1766197916253 Mon Sep 17 00:00:00 2001
 From: Konstantin Ananyev <konstantin.ananyev@intel.com>
 Date: Wed, 27 May 2020 15:16:49 +0100
 Subject: [PATCH] test/bpf: fix few small issues
 
+[ upstream commit 83633ba230761647b5014301c1f98b670d03e375 ]
+
 Address for few small issues:
  - unreachable return statement
  - failed test-case can finish with 'success' status
 
 Also use unified cmp_res() function to check return value.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
 ---
  app/test/test_bpf.c | 39 ++++++++++++++-------------------------

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

* [dpdk-stable] patch 'bpf: fix add/sub min/max estimations' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (41 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'test/bpf: fix few small issues' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'net: fix IPv4 checksum' " luca.boccassi
                   ` (148 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 66d977367bc4645400785fca42128318d3dd773b Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
Date: Wed, 27 May 2020 15:16:50 +0100
Subject: [PATCH] bpf: fix add/sub min/max estimations

[ upstream commit 20c19d9df5f08840d96204dcc65437223c434325 ]

eval_add()/eval_sub() not always correctly estimate
minimum and maximum possible values of add/sub operations.

Fixes: 8021917293d0 ("bpf: add extra validation for input BPF program")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_bpf/bpf_validate.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/librte_bpf/bpf_validate.c b/lib/librte_bpf/bpf_validate.c
index 6bd6f78e9..80d21fabb 100644
--- a/lib/librte_bpf/bpf_validate.c
+++ b/lib/librte_bpf/bpf_validate.c
@@ -226,7 +226,7 @@ eval_add(struct bpf_reg_val *rd, const struct bpf_reg_val *rs, uint64_t msk)
 	struct bpf_reg_val rv;
 
 	rv.u.min = (rd->u.min + rs->u.min) & msk;
-	rv.u.max = (rd->u.min + rs->u.max) & msk;
+	rv.u.max = (rd->u.max + rs->u.max) & msk;
 	rv.s.min = (rd->s.min + rs->s.min) & msk;
 	rv.s.max = (rd->s.max + rs->s.max) & msk;
 
@@ -254,10 +254,10 @@ eval_sub(struct bpf_reg_val *rd, const struct bpf_reg_val *rs, uint64_t msk)
 {
 	struct bpf_reg_val rv;
 
-	rv.u.min = (rd->u.min - rs->u.min) & msk;
-	rv.u.max = (rd->u.min - rs->u.max) & msk;
-	rv.s.min = (rd->s.min - rs->s.min) & msk;
-	rv.s.max = (rd->s.max - rs->s.max) & msk;
+	rv.u.min = (rd->u.min - rs->u.max) & msk;
+	rv.u.max = (rd->u.max - rs->u.min) & msk;
+	rv.s.min = (rd->s.min - rs->s.max) & msk;
+	rv.s.max = (rd->s.max - rs->s.min) & msk;
 
 	/*
 	 * if at least one of the operands is not constant,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.313085064 +0100
+++ 0044-bpf-fix-add-sub-min-max-estimations.patch	2020-07-24 12:53:48.259005938 +0100
@@ -1,13 +1,14 @@
-From 20c19d9df5f08840d96204dcc65437223c434325 Mon Sep 17 00:00:00 2001
+From 66d977367bc4645400785fca42128318d3dd773b Mon Sep 17 00:00:00 2001
 From: Konstantin Ananyev <konstantin.ananyev@intel.com>
 Date: Wed, 27 May 2020 15:16:50 +0100
 Subject: [PATCH] bpf: fix add/sub min/max estimations
 
+[ upstream commit 20c19d9df5f08840d96204dcc65437223c434325 ]
+
 eval_add()/eval_sub() not always correctly estimate
 minimum and maximum possible values of add/sub operations.
 
 Fixes: 8021917293d0 ("bpf: add extra validation for input BPF program")
-Cc: stable@dpdk.org
 
 Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
 ---

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

* [dpdk-stable] patch 'net: fix IPv4 checksum' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (42 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'bpf: fix add/sub min/max estimations' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'examples: add flush after stats printing' " luca.boccassi
                   ` (147 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Hongzhi Guo; +Cc: Morten Brørup, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 430b02f1a047df789916fe0bcd980a3048d2c364 Mon Sep 17 00:00:00 2001
From: Hongzhi Guo <guohongzhi1@huawei.com>
Date: Tue, 26 May 2020 18:08:05 +0800
Subject: [PATCH] net: fix IPv4 checksum
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 06602c671a5ee23f517456424b216b2427c4334c ]

0xffff is invalid for IPv4 checksum (RFC1624)

Fixes: 6006818cfb26 ("net: new checksum functions")

Signed-off-by: Hongzhi Guo <guohongzhi1@huawei.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_net/rte_ip.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
index 1ceb7b793..ece2e433c 100644
--- a/lib/librte_net/rte_ip.h
+++ b/lib/librte_net/rte_ip.h
@@ -267,7 +267,7 @@ rte_ipv4_cksum(const struct rte_ipv4_hdr *ipv4_hdr)
 {
 	uint16_t cksum;
 	cksum = rte_raw_cksum(ipv4_hdr, sizeof(struct rte_ipv4_hdr));
-	return (cksum == 0xffff) ? cksum : (uint16_t)~cksum;
+	return (uint16_t)~cksum;
 }
 
 /**
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.351818251 +0100
+++ 0045-net-fix-IPv4-checksum.patch	2020-07-24 12:53:48.259005938 +0100
@@ -1,4 +1,4 @@
-From 06602c671a5ee23f517456424b216b2427c4334c Mon Sep 17 00:00:00 2001
+From 430b02f1a047df789916fe0bcd980a3048d2c364 Mon Sep 17 00:00:00 2001
 From: Hongzhi Guo <guohongzhi1@huawei.com>
 Date: Tue, 26 May 2020 18:08:05 +0800
 Subject: [PATCH] net: fix IPv4 checksum
@@ -6,10 +6,11 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 06602c671a5ee23f517456424b216b2427c4334c ]
+
 0xffff is invalid for IPv4 checksum (RFC1624)
 
 Fixes: 6006818cfb26 ("net: new checksum functions")
-Cc: stable@dpdk.org
 
 Signed-off-by: Hongzhi Guo <guohongzhi1@huawei.com>
 Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
@@ -19,7 +20,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
-index 4c4437a54..292f63fd7 100644
+index 1ceb7b793..ece2e433c 100644
 --- a/lib/librte_net/rte_ip.h
 +++ b/lib/librte_net/rte_ip.h
 @@ -267,7 +267,7 @@ rte_ipv4_cksum(const struct rte_ipv4_hdr *ipv4_hdr)

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

* [dpdk-stable] patch 'examples: add flush after stats printing' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (43 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'net: fix IPv4 checksum' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'sched: fix subport freeing' " luca.boccassi
                   ` (146 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Georgiy Levashov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 0f7c8f75f2028230812f41473a702177dbd5aee2 Mon Sep 17 00:00:00 2001
From: Georgiy Levashov <georgiy.levashov@oktetlabs.ru>
Date: Tue, 28 Apr 2020 14:27:41 +0100
Subject: [PATCH] examples: add flush after stats printing

[ upstream commit 3ee6f706519c0a7456f3d8a79048150dfa6d2581 ]

When printf()'s stdout is line-buffered for terminal, it is fully
buffered for pipes. So, stdout listener can only get the output
when it is flushed (on program termination, when buffer is filled or
manual flush).

stdout buffer might fill slowly since every stats report could be small.

Also when it is fully filled it might contain a part of the last stats
report which makes it very inconvenient for any automation which reads
and parses the output.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Georgiy Levashov <georgiy.levashov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 examples/bbdev_app/main.c             | 2 ++
 examples/ioat/ioatfwd.c               | 2 ++
 examples/kni/main.c                   | 2 ++
 examples/l2fwd-crypto/main.c          | 2 ++
 examples/l2fwd-event/main.c           | 2 ++
 examples/l2fwd-jobstats/main.c        | 3 +++
 examples/l2fwd-keepalive/main.c       | 2 ++
 examples/l2fwd/main.c                 | 2 ++
 examples/link_status_interrupt/main.c | 2 ++
 examples/tep_termination/main.c       | 2 ++
 examples/vhost/main.c                 | 2 ++
 11 files changed, 23 insertions(+)

diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
index fb38dc3a7..68a46050c 100644
--- a/examples/bbdev_app/main.c
+++ b/examples/bbdev_app/main.c
@@ -659,6 +659,8 @@ print_stats(struct stats_lcore_params *stats_lcore)
 		print_lcore_stats(stats_lcore->lconf[l_id].lcore_stats, l_id);
 	}
 
+	fflush(stdout);
+
 	free(xstats);
 	free(xstats_names);
 }
diff --git a/examples/ioat/ioatfwd.c b/examples/ioat/ioatfwd.c
index 53de23179..b66ee73bc 100644
--- a/examples/ioat/ioatfwd.c
+++ b/examples/ioat/ioatfwd.c
@@ -294,6 +294,8 @@ print_stats(char *prgname)
 		printf("\n");
 		print_total_stats(&delta_ts);
 
+		fflush(stdout);
+
 		ts.total_packets_tx += delta_ts.total_packets_tx;
 		ts.total_packets_rx += delta_ts.total_packets_rx;
 		ts.total_packets_dropped += delta_ts.total_packets_dropped;
diff --git a/examples/kni/main.c b/examples/kni/main.c
index d48a59fcb..7edc73ab9 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -158,6 +158,8 @@ print_stats(void)
 						kni_stats[i].tx_dropped);
 	}
 	printf("======  ==============  ============  ============  ============  ============\n");
+
+	fflush(stdout);
 }
 
 /* Custom handling of signals to handle stats and kni processing */
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index fcb55c370..827da9b3e 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -334,6 +334,8 @@ print_stats(void)
 		   total_packets_dropped,
 		   total_packets_errors);
 	printf("\n====================================================\n");
+
+	fflush(stdout);
 }
 
 static int
diff --git a/examples/l2fwd-event/main.c b/examples/l2fwd-event/main.c
index 384b71238..7969a1c31 100644
--- a/examples/l2fwd-event/main.c
+++ b/examples/l2fwd-event/main.c
@@ -385,6 +385,8 @@ print_stats(struct l2fwd_resources *rsrc)
 		   total_packets_rx,
 		   total_packets_dropped);
 	printf("\n====================================================\n");
+
+	fflush(stdout);
 }
 
 static void
diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
index e0255080e..c2180c2d1 100644
--- a/examples/l2fwd-jobstats/main.c
+++ b/examples/l2fwd-jobstats/main.c
@@ -329,6 +329,9 @@ show_stats_cb(__rte_unused void *param)
 	}
 
 	printf("\n====================================================\n");
+
+	fflush(stdout);
+
 	rte_eal_alarm_set(timer_period * US_PER_S, show_stats_cb, NULL);
 }
 
diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
index 3d59e2ca9..ba2745c91 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -160,6 +160,8 @@ print_stats(__attribute__((unused)) struct rte_timer *ptr_timer,
 		   total_packets_rx,
 		   total_packets_dropped);
 	printf("\n====================================================\n");
+
+	fflush(stdout);
 }
 
 static void
diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index fcef23273..e3767a315 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -146,6 +146,8 @@ print_stats(void)
 		   total_packets_rx,
 		   total_packets_dropped);
 	printf("\n====================================================\n");
+
+	fflush(stdout);
 }
 
 static void
diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
index 72f86e502..6b8c153b5 100644
--- a/examples/link_status_interrupt/main.c
+++ b/examples/link_status_interrupt/main.c
@@ -162,6 +162,8 @@ print_stats(void)
 		   total_packets_rx,
 		   total_packets_dropped);
 	printf("\n====================================================\n");
+
+	fflush(stdout);
 }
 
 static void
diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c
index ab956ad7c..b9fffca02 100644
--- a/examples/tep_termination/main.c
+++ b/examples/tep_termination/main.c
@@ -1110,6 +1110,8 @@ print_stats(__rte_unused void *arg)
 			dev_ll = dev_ll->next;
 		}
 		printf("\n================================================\n");
+
+		fflush(stdout);
 	}
 
 	return NULL;
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index ab649bf14..312829e8b 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -1334,6 +1334,8 @@ print_stats(__rte_unused void *arg)
 		}
 
 		printf("===================================================\n");
+
+		fflush(stdout);
 	}
 
 	return NULL;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.386118180 +0100
+++ 0046-examples-add-flush-after-stats-printing.patch	2020-07-24 12:53:48.267006087 +0100
@@ -1,8 +1,10 @@
-From 3ee6f706519c0a7456f3d8a79048150dfa6d2581 Mon Sep 17 00:00:00 2001
+From 0f7c8f75f2028230812f41473a702177dbd5aee2 Mon Sep 17 00:00:00 2001
 From: Georgiy Levashov <georgiy.levashov@oktetlabs.ru>
 Date: Tue, 28 Apr 2020 14:27:41 +0100
 Subject: [PATCH] examples: add flush after stats printing
 
+[ upstream commit 3ee6f706519c0a7456f3d8a79048150dfa6d2581 ]
+
 When printf()'s stdout is line-buffered for terminal, it is fully
 buffered for pipes. So, stdout listener can only get the output
 when it is flushed (on program termination, when buffer is filled or
@@ -15,7 +17,6 @@
 and parses the output.
 
 Fixes: af75078fece3 ("first public release")
-Cc: stable@dpdk.org
 
 Signed-off-by: Georgiy Levashov <georgiy.levashov@oktetlabs.ru>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -60,7 +61,7 @@
  		ts.total_packets_rx += delta_ts.total_packets_rx;
  		ts.total_packets_dropped += delta_ts.total_packets_dropped;
 diff --git a/examples/kni/main.c b/examples/kni/main.c
-index 80dd0353e..f5d12a5b8 100644
+index d48a59fcb..7edc73ab9 100644
 --- a/examples/kni/main.c
 +++ b/examples/kni/main.c
 @@ -158,6 +158,8 @@ print_stats(void)
@@ -86,10 +87,10 @@
  
  static int
 diff --git a/examples/l2fwd-event/main.c b/examples/l2fwd-event/main.c
-index 9593ef11e..4fe500333 100644
+index 384b71238..7969a1c31 100644
 --- a/examples/l2fwd-event/main.c
 +++ b/examples/l2fwd-event/main.c
-@@ -516,6 +516,8 @@ print_stats(struct l2fwd_resources *rsrc)
+@@ -385,6 +385,8 @@ print_stats(struct l2fwd_resources *rsrc)
  		   total_packets_rx,
  		   total_packets_dropped);
  	printf("\n====================================================\n");
@@ -99,7 +100,7 @@
  
  static void
 diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
-index 396fd89db..47a3b0976 100644
+index e0255080e..c2180c2d1 100644
 --- a/examples/l2fwd-jobstats/main.c
 +++ b/examples/l2fwd-jobstats/main.c
 @@ -329,6 +329,9 @@ show_stats_cb(__rte_unused void *param)
@@ -113,10 +114,10 @@
  }
  
 diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
-index b7585d55e..b2742633b 100644
+index 3d59e2ca9..ba2745c91 100644
 --- a/examples/l2fwd-keepalive/main.c
 +++ b/examples/l2fwd-keepalive/main.c
-@@ -160,6 +160,8 @@ print_stats(__rte_unused struct rte_timer *ptr_timer,
+@@ -160,6 +160,8 @@ print_stats(__attribute__((unused)) struct rte_timer *ptr_timer,
  		   total_packets_rx,
  		   total_packets_dropped);
  	printf("\n====================================================\n");
@@ -126,7 +127,7 @@
  
  static void
 diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
-index f8d14b843..4a41aac63 100644
+index fcef23273..e3767a315 100644
 --- a/examples/l2fwd/main.c
 +++ b/examples/l2fwd/main.c
 @@ -146,6 +146,8 @@ print_stats(void)
@@ -139,7 +140,7 @@
  
  static void
 diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
-index 25efe2b09..9bbcadfcf 100644
+index 72f86e502..6b8c153b5 100644
 --- a/examples/link_status_interrupt/main.c
 +++ b/examples/link_status_interrupt/main.c
 @@ -162,6 +162,8 @@ print_stats(void)

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

* [dpdk-stable] patch 'sched: fix subport freeing' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (44 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'examples: add flush after stats printing' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'sched: fix 64-bit rate' " luca.boccassi
                   ` (145 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Hrvoje Habjanic; +Cc: Stephen Hemminger, Jasvinder Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 748d2e4c16a67f83ae67ffaa35c2b6ec7b17f286 Mon Sep 17 00:00:00 2001
From: Hrvoje Habjanic <hrvoje.habjanic@zg.ht.hr>
Date: Tue, 26 May 2020 19:24:55 +0200
Subject: [PATCH] sched: fix subport freeing

[ upstream commit fbd8981cddf9ea558d5480cc3b02d3334482210f ]

In function rte_sched_subport_free, there is code to free all allocated
stuff related to scheduler subport.
First there are some checks, and in the end, rte_bitmap_free is called.

Now, rte_bitmap_free is a dummy function, and it just checks if
provided pointer to bitmap is valid or not. So, actual memory for
subport is not freed.

This patch fixes this by removing call to rte_bitmap_free, and
instead calling rte_free.

Fixes: d9213b829a31 ("sched: remove pipe params config from port level")

Signed-off-by: Hrvoje Habjanic <hrvoje.habjanic@zg.ht.hr>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
 lib/librte_sched/rte_sched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c
index c0983ddda..f15a3b515 100644
--- a/lib/librte_sched/rte_sched.c
+++ b/lib/librte_sched/rte_sched.c
@@ -888,7 +888,7 @@ rte_sched_subport_free(struct rte_sched_port *port,
 		}
 	}
 
-	rte_bitmap_free(subport->bmp);
+	rte_free(subport);
 }
 
 void
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.429674275 +0100
+++ 0047-sched-fix-subport-freeing.patch	2020-07-24 12:53:48.267006087 +0100
@@ -1,8 +1,10 @@
-From fbd8981cddf9ea558d5480cc3b02d3334482210f Mon Sep 17 00:00:00 2001
+From 748d2e4c16a67f83ae67ffaa35c2b6ec7b17f286 Mon Sep 17 00:00:00 2001
 From: Hrvoje Habjanic <hrvoje.habjanic@zg.ht.hr>
 Date: Tue, 26 May 2020 19:24:55 +0200
 Subject: [PATCH] sched: fix subport freeing
 
+[ upstream commit fbd8981cddf9ea558d5480cc3b02d3334482210f ]
+
 In function rte_sched_subport_free, there is code to free all allocated
 stuff related to scheduler subport.
 First there are some checks, and in the end, rte_bitmap_free is called.
@@ -15,7 +17,6 @@
 instead calling rte_free.
 
 Fixes: d9213b829a31 ("sched: remove pipe params config from port level")
-Cc: stable@dpdk.org
 
 Signed-off-by: Hrvoje Habjanic <hrvoje.habjanic@zg.ht.hr>
 Acked-by: Stephen Hemminger <stephen@networkplumber.org>

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

* [dpdk-stable] patch 'sched: fix 64-bit rate' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (45 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'sched: fix subport freeing' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'bus/vmbus: fix ring buffer mapping' " luca.boccassi
                   ` (144 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Archit Pandey; +Cc: Jasvinder Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 02200584e02b86974f8fd126bf6d3b9c64d9225f Mon Sep 17 00:00:00 2001
From: Archit Pandey <architpandeynitk@gmail.com>
Date: Tue, 2 Jun 2020 14:25:28 +0530
Subject: [PATCH] sched: fix 64-bit rate

[ upstream commit 78621061f7f8d20544f81b391a62acb735275add ]

64-bit support was missing from the functions pipe_profile_check
and rte_sched_subport_config_pipe_profile_table.

Fixes: 68c1f26d4236 ("sched: support 64-bit values")

Signed-off-by: Archit Pandey <architpandeynitk@gmail.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
 lib/librte_sched/rte_sched.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c
index f15a3b515..68a171b50 100644
--- a/lib/librte_sched/rte_sched.c
+++ b/lib/librte_sched/rte_sched.c
@@ -304,7 +304,7 @@ rte_sched_port_tc_queue(struct rte_sched_port *port, uint32_t qindex)
 
 static int
 pipe_profile_check(struct rte_sched_pipe_params *params,
-	uint32_t rate, uint16_t *qsize)
+	uint64_t rate, uint16_t *qsize)
 {
 	uint32_t i;
 
@@ -624,7 +624,7 @@ rte_sched_pipe_profile_convert(struct rte_sched_subport *subport,
 
 static void
 rte_sched_subport_config_pipe_profile_table(struct rte_sched_subport *subport,
-	struct rte_sched_subport_params *params, uint32_t rate)
+	struct rte_sched_subport_params *params, uint64_t rate)
 {
 	uint32_t i;
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.463559270 +0100
+++ 0048-sched-fix-64-bit-rate.patch	2020-07-24 12:53:48.271006162 +0100
@@ -1,13 +1,14 @@
-From 78621061f7f8d20544f81b391a62acb735275add Mon Sep 17 00:00:00 2001
+From 02200584e02b86974f8fd126bf6d3b9c64d9225f Mon Sep 17 00:00:00 2001
 From: Archit Pandey <architpandeynitk@gmail.com>
 Date: Tue, 2 Jun 2020 14:25:28 +0530
 Subject: [PATCH] sched: fix 64-bit rate
 
+[ upstream commit 78621061f7f8d20544f81b391a62acb735275add ]
+
 64-bit support was missing from the functions pipe_profile_check
 and rte_sched_subport_config_pipe_profile_table.
 
 Fixes: 68c1f26d4236 ("sched: support 64-bit values")
-Cc: stable@dpdk.org
 
 Signed-off-by: Archit Pandey <architpandeynitk@gmail.com>
 Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>

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

* [dpdk-stable] patch 'bus/vmbus: fix ring buffer mapping' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (46 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'sched: fix 64-bit rate' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'eal: remove redundant newline in alert message' " luca.boccassi
                   ` (143 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Long Li; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 72dae964fdb23f613e384c4e0b811ab146b72fd1 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Thu, 11 Jun 2020 17:48:25 -0700
Subject: [PATCH] bus/vmbus: fix ring buffer mapping

[ upstream commit 1aef0aef3615d8b8d9d82cbb2d42afc2ae2bce7f ]

vmbus_map_addr is used as the next start virtual address for mapping ring
buffer. However it's updated based on ring_buf, which is a pointer to an
address on the stack. The next ring buffer may be mapped to an unexpected
address.

Fix this by calculating vmbus_map_addr based on returned virtual address.

Fixes: 3f9277031a2e ("bus/vmbus: fix check for mmap failure")

Signed-off-by: Long Li <longli@microsoft.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/bus/vmbus/linux/vmbus_uio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/vmbus/linux/vmbus_uio.c b/drivers/bus/vmbus/linux/vmbus_uio.c
index 5451bfd15..5dc0c47de 100644
--- a/drivers/bus/vmbus/linux/vmbus_uio.c
+++ b/drivers/bus/vmbus/linux/vmbus_uio.c
@@ -242,7 +242,7 @@ static int vmbus_uio_map_subchan(const struct rte_vmbus_device *dev,
 	*ring_size = file_size / 2;
 	*ring_buf = mapaddr;
 
-	vmbus_map_addr = RTE_PTR_ADD(ring_buf, file_size);
+	vmbus_map_addr = RTE_PTR_ADD(mapaddr, file_size);
 	return 0;
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.503055446 +0100
+++ 0049-bus-vmbus-fix-ring-buffer-mapping.patch	2020-07-24 12:53:48.271006162 +0100
@@ -1,8 +1,10 @@
-From 1aef0aef3615d8b8d9d82cbb2d42afc2ae2bce7f Mon Sep 17 00:00:00 2001
+From 72dae964fdb23f613e384c4e0b811ab146b72fd1 Mon Sep 17 00:00:00 2001
 From: Long Li <longli@microsoft.com>
 Date: Thu, 11 Jun 2020 17:48:25 -0700
 Subject: [PATCH] bus/vmbus: fix ring buffer mapping
 
+[ upstream commit 1aef0aef3615d8b8d9d82cbb2d42afc2ae2bce7f ]
+
 vmbus_map_addr is used as the next start virtual address for mapping ring
 buffer. However it's updated based on ring_buf, which is a pointer to an
 address on the stack. The next ring buffer may be mapped to an unexpected
@@ -11,7 +13,6 @@
 Fix this by calculating vmbus_map_addr based on returned virtual address.
 
 Fixes: 3f9277031a2e ("bus/vmbus: fix check for mmap failure")
-Cc: stable@dpdk.org
 
 Signed-off-by: Long Li <longli@microsoft.com>
 Acked-by: Stephen Hemminger <stephen@networkplumber.org>

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

* [dpdk-stable] patch 'eal: remove redundant newline in alert message' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (47 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'bus/vmbus: fix ring buffer mapping' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'bus/pci: fix VF memory access' " luca.boccassi
                   ` (142 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: David Marchand; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From d5daa8c70fe9976df76a5f7908dc7540b042791c Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 10 Jun 2020 16:30:24 +0200
Subject: [PATCH] eal: remove redundant newline in alert message

[ upstream commit d58314aa3ccb57776fbc6d27d024cce4097dd619 ]

rte_eal_init_alert() already appends a newline.

Fixes: 0a529578f162 ("eal: clean up unused files on initialization")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/freebsd/eal/eal.c | 2 +-
 lib/librte_eal/linux/eal/eal.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/freebsd/eal/eal.c b/lib/librte_eal/freebsd/eal/eal.c
index 6ae37e7e6..2a995ee3f 100644
--- a/lib/librte_eal/freebsd/eal/eal.c
+++ b/lib/librte_eal/freebsd/eal/eal.c
@@ -949,7 +949,7 @@ rte_eal_init(int argc, char **argv)
 	 * place, so no cleanup needed.
 	 */
 	if (!internal_config.no_shconf && eal_clean_runtime_dir() < 0) {
-		rte_eal_init_alert("Cannot clear runtime directory\n");
+		rte_eal_init_alert("Cannot clear runtime directory");
 		return -1;
 	}
 
diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c
index e6d4cc717..8f1bcab39 100644
--- a/lib/librte_eal/linux/eal/eal.c
+++ b/lib/librte_eal/linux/eal/eal.c
@@ -1288,7 +1288,7 @@ rte_eal_init(int argc, char **argv)
 	 * place, so no cleanup needed.
 	 */
 	if (!internal_config.no_shconf && eal_clean_runtime_dir() < 0) {
-		rte_eal_init_alert("Cannot clear runtime directory\n");
+		rte_eal_init_alert("Cannot clear runtime directory");
 		return -1;
 	}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.538024271 +0100
+++ 0050-eal-remove-redundant-newline-in-alert-message.patch	2020-07-24 12:53:48.271006162 +0100
@@ -1,25 +1,26 @@
-From d58314aa3ccb57776fbc6d27d024cce4097dd619 Mon Sep 17 00:00:00 2001
+From d5daa8c70fe9976df76a5f7908dc7540b042791c Mon Sep 17 00:00:00 2001
 From: David Marchand <david.marchand@redhat.com>
 Date: Wed, 10 Jun 2020 16:30:24 +0200
 Subject: [PATCH] eal: remove redundant newline in alert message
 
+[ upstream commit d58314aa3ccb57776fbc6d27d024cce4097dd619 ]
+
 rte_eal_init_alert() already appends a newline.
 
 Fixes: 0a529578f162 ("eal: clean up unused files on initialization")
-Cc: stable@dpdk.org
 
 Signed-off-by: David Marchand <david.marchand@redhat.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
 ---
- lib/librte_eal/freebsd/eal.c | 2 +-
- lib/librte_eal/linux/eal.c   | 2 +-
+ lib/librte_eal/freebsd/eal/eal.c | 2 +-
+ lib/librte_eal/linux/eal/eal.c   | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c
-index c41f265fa..00fc66bf7 100644
---- a/lib/librte_eal/freebsd/eal.c
-+++ b/lib/librte_eal/freebsd/eal.c
-@@ -952,7 +952,7 @@ rte_eal_init(int argc, char **argv)
+diff --git a/lib/librte_eal/freebsd/eal/eal.c b/lib/librte_eal/freebsd/eal/eal.c
+index 6ae37e7e6..2a995ee3f 100644
+--- a/lib/librte_eal/freebsd/eal/eal.c
++++ b/lib/librte_eal/freebsd/eal/eal.c
+@@ -949,7 +949,7 @@ rte_eal_init(int argc, char **argv)
  	 * place, so no cleanup needed.
  	 */
  	if (!internal_config.no_shconf && eal_clean_runtime_dir() < 0) {
@@ -27,12 +28,12 @@
 +		rte_eal_init_alert("Cannot clear runtime directory");
  		return -1;
  	}
- 	if (!internal_config.no_telemetry) {
-diff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c
-index f162124a3..28a8b7851 100644
---- a/lib/librte_eal/linux/eal.c
-+++ b/lib/librte_eal/linux/eal.c
-@@ -1290,7 +1290,7 @@ rte_eal_init(int argc, char **argv)
+ 
+diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c
+index e6d4cc717..8f1bcab39 100644
+--- a/lib/librte_eal/linux/eal/eal.c
++++ b/lib/librte_eal/linux/eal/eal.c
+@@ -1288,7 +1288,7 @@ rte_eal_init(int argc, char **argv)
  	 * place, so no cleanup needed.
  	 */
  	if (!internal_config.no_shconf && eal_clean_runtime_dir() < 0) {
@@ -40,7 +41,7 @@
 +		rte_eal_init_alert("Cannot clear runtime directory");
  		return -1;
  	}
- 	if (!internal_config.no_telemetry) {
+ 
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'bus/pci: fix VF memory access' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (48 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'eal: remove redundant newline in alert message' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'mbuf: fix boundary check at dynamic field registration' " luca.boccassi
                   ` (141 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Haiyue Wang
  Cc: Anatoly Burakov, Harman Kalra, David Marchand, Thierry Martin,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 2381dc9e10050265ee3c6abf178328eee4322804 Mon Sep 17 00:00:00 2001
From: Haiyue Wang <haiyue.wang@intel.com>
Date: Thu, 25 Jun 2020 11:50:46 +0800
Subject: [PATCH] bus/pci: fix VF memory access

[ upstream commit 54f3fb127d9c265a5724d193e5c7c6db29fb4150 ]

To fix CVE-2020-12888, the linux vfio-pci module will invalidate mmaps
and block MMIO access on disabled memory, it will send a SIGBUS to the
application:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=abafbc551fdd

When the application opens the vfio PCI device, the vfio-pci module will
enable the bus memory space through PCI read/write access. According to
the PCIe specification, the 'Memory Space Enable' is always zero for VF:

             Table 9-13 Command Register Changes

Bit Location | PF and VF Register Differences | PF         | VF
             | From Base                      | Attributes | Attributes
-------------+--------------------------------+------------+-----------
             | Memory Space Enable - Does not |            |
             | apply to VFs. Must be hardwired|  Base      |  0b
     1       | to 0b for VFs. VF Memory Space |            |
             | is controlled by the VF MSE bit|            |
             | in the VF Control register.    |            |
-------------+--------------------------------+------------+-----------

Afterwards the vfio-pci will initialize its own virtual PCI config space
data ('vconfig') by reading the VF's physical PCI config space, then the
'Memory Space Enable' bit in vconfig will always be 0b value. This will
make the vfio-pci treat the BAR memory space as disabled, and the SIGBUS
will be triggered if access these BARs.

By investigation, the VF PCI device *passthrough* into the Guest OS by
QEMU has the 'Memory Space Enable' with 1b value. That's because every
PCI driver will start to enable the memory space, and this action will
be hooked by vfio-pci virtual PCI read/write to set the 'Memory Space
Enable' in vconfig space to 1b. So VF runs in guest OS has 'Mem+', but
VF runs in host OS has 'Mem-'.

Align with PCI working mode in Guest/QEMU/Host, in DPDK, enable the PCI
bus memory space explicitly to avoid access on disabled memory.

Fixes: 33604c31354a ("vfio: refactor PCI BAR mapping")

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Harman Kalra <hkalra@marvell.com>
Tested-by: David Marchand <david.marchand@redhat.com>
Tested-by: Thierry Martin <thierry.martin.public@gmail.com>
---
 drivers/bus/pci/linux/pci_vfio.c | 37 ++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index 64cd84a68..ba60e7ce9 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -149,6 +149,38 @@ pci_vfio_get_msix_bar(int fd, struct pci_msix_table *msix_table)
 	return 0;
 }
 
+/* enable PCI bus memory space */
+static int
+pci_vfio_enable_bus_memory(int dev_fd)
+{
+	uint16_t cmd;
+	int ret;
+
+	ret = pread64(dev_fd, &cmd, sizeof(cmd),
+		      VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
+		      PCI_COMMAND);
+
+	if (ret != sizeof(cmd)) {
+		RTE_LOG(ERR, EAL, "Cannot read command from PCI config space!\n");
+		return -1;
+	}
+
+	if (cmd & PCI_COMMAND_MEMORY)
+		return 0;
+
+	cmd |= PCI_COMMAND_MEMORY;
+	ret = pwrite64(dev_fd, &cmd, sizeof(cmd),
+		       VFIO_GET_REGION_ADDR(VFIO_PCI_CONFIG_REGION_INDEX) +
+		       PCI_COMMAND);
+
+	if (ret != sizeof(cmd)) {
+		RTE_LOG(ERR, EAL, "Cannot write command to PCI config space!\n");
+		return -1;
+	}
+
+	return 0;
+}
+
 /* set PCI bus mastering */
 static int
 pci_vfio_set_bus_master(int dev_fd, bool op)
@@ -427,6 +459,11 @@ pci_rte_vfio_setup_device(struct rte_pci_device *dev, int vfio_dev_fd)
 		return -1;
 	}
 
+	if (pci_vfio_enable_bus_memory(vfio_dev_fd)) {
+		RTE_LOG(ERR, EAL, "Cannot enable bus memory!\n");
+		return -1;
+	}
+
 	/* set bus mastering for the device */
 	if (pci_vfio_set_bus_master(vfio_dev_fd, true)) {
 		RTE_LOG(ERR, EAL, "Cannot set up bus mastering!\n");
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.576143210 +0100
+++ 0051-bus-pci-fix-VF-memory-access.patch	2020-07-24 12:53:48.275006236 +0100
@@ -1,8 +1,10 @@
-From 54f3fb127d9c265a5724d193e5c7c6db29fb4150 Mon Sep 17 00:00:00 2001
+From 2381dc9e10050265ee3c6abf178328eee4322804 Mon Sep 17 00:00:00 2001
 From: Haiyue Wang <haiyue.wang@intel.com>
 Date: Thu, 25 Jun 2020 11:50:46 +0800
 Subject: [PATCH] bus/pci: fix VF memory access
 
+[ upstream commit 54f3fb127d9c265a5724d193e5c7c6db29fb4150 ]
+
 To fix CVE-2020-12888, the linux vfio-pci module will invalidate mmaps
 and block MMIO access on disabled memory, it will send a SIGBUS to the
 application:
@@ -41,7 +43,6 @@
 bus memory space explicitly to avoid access on disabled memory.
 
 Fixes: 33604c31354a ("vfio: refactor PCI BAR mapping")
-Cc: stable@dpdk.org
 
 Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
 Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

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

* [dpdk-stable] patch 'mbuf: fix boundary check at dynamic field registration' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (49 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'bus/pci: fix VF memory access' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'mbuf: fix error code in dynamic field/flag " luca.boccassi
                   ` (140 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Xiaolong Ye; +Cc: Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From f32952bfab8ea4160ce82e2c1b6262397fa635bd Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Sat, 13 Jun 2020 23:49:17 +0800
Subject: [PATCH] mbuf: fix boundary check at dynamic field registration

[ upstream commit f8eb26dda8bfc806ff71f65966dc17210686fc20 ]

We should make sure off + size < sizeof(struct rte_mbuf) to avoid
possible out-of-bounds access of free_space array, there is no issue
currently due to the low bits of free_flags (which is adjacent to
free_space) are always set to 0. But we shouldn't rely on it since it's
fragile and layout of struct mbuf_dyn_shm may be changed in the future.
This patch adds boundary check explicitly to avoid potential risk of
out-of-bounds access.

Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_mbuf/rte_mbuf_dyn.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/librte_mbuf/rte_mbuf_dyn.c b/lib/librte_mbuf/rte_mbuf_dyn.c
index 953e3ec31..13d6da6d1 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.c
+++ b/lib/librte_mbuf/rte_mbuf_dyn.c
@@ -69,7 +69,8 @@ process_score(void)
 
 	for (off = 0; off < sizeof(struct rte_mbuf); off++) {
 		/* get the size of the free zone */
-		for (size = 0; shm->free_space[off + size]; size++)
+		for (size = 0; (off + size) < sizeof(struct rte_mbuf) &&
+			     shm->free_space[off + size]; size++)
 			;
 		if (size == 0)
 			continue;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.613155067 +0100
+++ 0052-mbuf-fix-boundary-check-at-dynamic-field-registratio.patch	2020-07-24 12:53:48.275006236 +0100
@@ -1,8 +1,10 @@
-From f8eb26dda8bfc806ff71f65966dc17210686fc20 Mon Sep 17 00:00:00 2001
+From f32952bfab8ea4160ce82e2c1b6262397fa635bd Mon Sep 17 00:00:00 2001
 From: Xiaolong Ye <xiaolong.ye@intel.com>
 Date: Sat, 13 Jun 2020 23:49:17 +0800
 Subject: [PATCH] mbuf: fix boundary check at dynamic field registration
 
+[ upstream commit f8eb26dda8bfc806ff71f65966dc17210686fc20 ]
+
 We should make sure off + size < sizeof(struct rte_mbuf) to avoid
 possible out-of-bounds access of free_space array, there is no issue
 currently due to the low bits of free_flags (which is adjacent to
@@ -12,7 +14,6 @@
 out-of-bounds access.
 
 Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
 Acked-by: Olivier Matz <olivier.matz@6wind.com>

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

* [dpdk-stable] patch 'mbuf: fix error code in dynamic field/flag registration' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (50 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'mbuf: fix boundary check at dynamic field registration' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'mbuf: fix free space update for dynamic field' " luca.boccassi
                   ` (139 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Xiaolong Ye; +Cc: Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 862946d7be44ce2760558b274e90281363ab76dd Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Sat, 13 Jun 2020 23:49:18 +0800
Subject: [PATCH] mbuf: fix error code in dynamic field/flag registration

[ upstream commit 359386e15b4778e5924dcb90d5d686a1c865436f ]

Set rte_errno as ENOMEM when allocation failure.

Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_mbuf/rte_mbuf_dyn.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/librte_mbuf/rte_mbuf_dyn.c b/lib/librte_mbuf/rte_mbuf_dyn.c
index 13d6da6d1..de7d2eb9a 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.c
+++ b/lib/librte_mbuf/rte_mbuf_dyn.c
@@ -278,12 +278,15 @@ __rte_mbuf_dynfield_register_offset(const struct rte_mbuf_dynfield *params,
 		mbuf_dynfield_tailq.head, mbuf_dynfield_list);
 
 	te = rte_zmalloc("MBUF_DYNFIELD_TAILQ_ENTRY", sizeof(*te), 0);
-	if (te == NULL)
+	if (te == NULL) {
+		rte_errno = ENOMEM;
 		return -1;
+	}
 
 	mbuf_dynfield = rte_zmalloc("mbuf_dynfield", sizeof(*mbuf_dynfield), 0);
 	if (mbuf_dynfield == NULL) {
 		rte_free(te);
+		rte_errno = ENOMEM;
 		return -1;
 	}
 
@@ -456,12 +459,15 @@ __rte_mbuf_dynflag_register_bitnum(const struct rte_mbuf_dynflag *params,
 		mbuf_dynflag_tailq.head, mbuf_dynflag_list);
 
 	te = rte_zmalloc("MBUF_DYNFLAG_TAILQ_ENTRY", sizeof(*te), 0);
-	if (te == NULL)
+	if (te == NULL) {
+		rte_errno = ENOMEM;
 		return -1;
+	}
 
 	mbuf_dynflag = rte_zmalloc("mbuf_dynflag", sizeof(*mbuf_dynflag), 0);
 	if (mbuf_dynflag == NULL) {
 		rte_free(te);
+		rte_errno = ENOMEM;
 		return -1;
 	}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.649103082 +0100
+++ 0053-mbuf-fix-error-code-in-dynamic-field-flag-registrati.patch	2020-07-24 12:53:48.275006236 +0100
@@ -1,12 +1,13 @@
-From 359386e15b4778e5924dcb90d5d686a1c865436f Mon Sep 17 00:00:00 2001
+From 862946d7be44ce2760558b274e90281363ab76dd Mon Sep 17 00:00:00 2001
 From: Xiaolong Ye <xiaolong.ye@intel.com>
 Date: Sat, 13 Jun 2020 23:49:18 +0800
 Subject: [PATCH] mbuf: fix error code in dynamic field/flag registration
 
+[ upstream commit 359386e15b4778e5924dcb90d5d686a1c865436f ]
+
 Set rte_errno as ENOMEM when allocation failure.
 
 Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
 Acked-by: Olivier Matz <olivier.matz@6wind.com>

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

* [dpdk-stable] patch 'mbuf: fix free space update for dynamic field' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (51 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'mbuf: fix error code in dynamic field/flag " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'mbuf: fix dynamic field dump log' " luca.boccassi
                   ` (138 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Xiaolong Ye; +Cc: Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From a02840d607a77d63f35c918100145d17474263c5 Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Sat, 13 Jun 2020 23:49:19 +0800
Subject: [PATCH] mbuf: fix free space update for dynamic field

[ upstream commit 3a7fb882fdf32e1b50faac2331b2a48d89b4212e ]

The value free_space[i] is used to save the size of biggest aligned
element that can fit in the zone, current implementation has one flaw,
for example, if user registers dynfield1 (size = 4, align = 4, req = 124)
first, the free_space would be as below after registration:

  0070: 08 08 08 08 08 08 08 08
  0078: 08 08 08 08 00 00 00 00

Then if user continues to register dynfield2 (size = 4, align = 4),
free_space would become:

  0070: 00 00 00 00 04 04 04 04
  0078: 04 04 04 04 00 00 00 00

Further request dynfield3 (size = 8, align = 8) would fail to register
due to alignment requirement can't be satisfied, though there is enough
space remained in mbuf.

This patch fixes above issue by saving alignment only in aligned zone,
after the fix, above registrations order can be satisfied, free_space
would be like:

After dynfield1 registration:

  0070: 08 08 08 08 08 08 08 08
  0078: 04 04 04 04 00 00 00 00

After dynfield2 registration:

  0070: 08 08 08 08 08 08 08 08
  0078: 00 00 00 00 00 00 00 00

After dynfield3 registration:

  0070: 00 00 00 00 00 00 00 00
  0078: 00 00 00 00 00 00 00 00

This patch also reduces iterations in process_score() by jumping align
steps in each loop.

Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_mbuf/rte_mbuf_dyn.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/lib/librte_mbuf/rte_mbuf_dyn.c b/lib/librte_mbuf/rte_mbuf_dyn.c
index de7d2eb9a..fd51e1b68 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.c
+++ b/lib/librte_mbuf/rte_mbuf_dyn.c
@@ -67,13 +67,16 @@ process_score(void)
 			shm->free_space[i] = 1;
 	}
 
-	for (off = 0; off < sizeof(struct rte_mbuf); off++) {
+	off = 0;
+	while (off < sizeof(struct rte_mbuf)) {
 		/* get the size of the free zone */
 		for (size = 0; (off + size) < sizeof(struct rte_mbuf) &&
 			     shm->free_space[off + size]; size++)
 			;
-		if (size == 0)
+		if (size == 0) {
+			off++;
 			continue;
+		}
 
 		/* get the alignment of biggest object that can fit in
 		 * the zone at this offset.
@@ -84,8 +87,10 @@ process_score(void)
 			;
 
 		/* save it in free_space[] */
-		for (i = off; i < off + size; i++)
+		for (i = off; i < off + align; i++)
 			shm->free_space[i] = RTE_MAX(align, shm->free_space[i]);
+
+		off += align;
 	}
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.685126954 +0100
+++ 0054-mbuf-fix-free-space-update-for-dynamic-field.patch	2020-07-24 12:53:48.275006236 +0100
@@ -1,8 +1,10 @@
-From 3a7fb882fdf32e1b50faac2331b2a48d89b4212e Mon Sep 17 00:00:00 2001
+From a02840d607a77d63f35c918100145d17474263c5 Mon Sep 17 00:00:00 2001
 From: Xiaolong Ye <xiaolong.ye@intel.com>
 Date: Sat, 13 Jun 2020 23:49:19 +0800
 Subject: [PATCH] mbuf: fix free space update for dynamic field
 
+[ upstream commit 3a7fb882fdf32e1b50faac2331b2a48d89b4212e ]
+
 The value free_space[i] is used to save the size of biggest aligned
 element that can fit in the zone, current implementation has one flaw,
 for example, if user registers dynfield1 (size = 4, align = 4, req = 124)
@@ -44,7 +46,6 @@
 steps in each loop.
 
 Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
 Acked-by: Olivier Matz <olivier.matz@6wind.com>

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

* [dpdk-stable] patch 'mbuf: fix dynamic field dump log' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (52 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'mbuf: fix free space update for dynamic field' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'doc: update build instructions in the Linux guide' " luca.boccassi
                   ` (137 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Xiaolong Ye; +Cc: Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 6ee60749a3bd4966bcb6cff79bac86c416fdcace Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye@intel.com>
Date: Sat, 13 Jun 2020 23:49:20 +0800
Subject: [PATCH] mbuf: fix dynamic field dump log

[ upstream commit d27a4cb3efe64b5441edd4cd214299e1e4b08ec8 ]

For each mbuf byte, free_space[i] == 0 means the space is occupied,
free_space[i] != 0 means space is free.

Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_mbuf/rte_mbuf_dyn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_mbuf/rte_mbuf_dyn.c b/lib/librte_mbuf/rte_mbuf_dyn.c
index fd51e1b68..f071651ac 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.c
+++ b/lib/librte_mbuf/rte_mbuf_dyn.c
@@ -552,7 +552,7 @@ void rte_mbuf_dyn_dump(FILE *out)
 			dynflag->params.name, dynflag->bitnum,
 			dynflag->params.flags);
 	}
-	fprintf(out, "Free space in mbuf (0 = free, value = zone alignment):\n");
+	fprintf(out, "Free space in mbuf (0 = occupied, value = free zone alignment):\n");
 	for (i = 0; i < sizeof(struct rte_mbuf); i++) {
 		if ((i % 8) == 0)
 			fprintf(out, "  %4.4zx: ", i);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.726217502 +0100
+++ 0055-mbuf-fix-dynamic-field-dump-log.patch	2020-07-24 12:53:48.275006236 +0100
@@ -1,13 +1,14 @@
-From d27a4cb3efe64b5441edd4cd214299e1e4b08ec8 Mon Sep 17 00:00:00 2001
+From 6ee60749a3bd4966bcb6cff79bac86c416fdcace Mon Sep 17 00:00:00 2001
 From: Xiaolong Ye <xiaolong.ye@intel.com>
 Date: Sat, 13 Jun 2020 23:49:20 +0800
 Subject: [PATCH] mbuf: fix dynamic field dump log
 
+[ upstream commit d27a4cb3efe64b5441edd4cd214299e1e4b08ec8 ]
+
 For each mbuf byte, free_space[i] == 0 means the space is occupied,
 free_space[i] != 0 means space is free.
 
 Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
 Acked-by: Olivier Matz <olivier.matz@6wind.com>

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

* [dpdk-stable] patch 'doc: update build instructions in the Linux guide' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (53 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'mbuf: fix dynamic field dump log' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'build: fix drivers library path on Windows' " luca.boccassi
                   ` (136 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Bruce Richardson, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 15318529bd10ad8cc0c90aa152b369c23853d580 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 17 Jun 2020 23:41:25 +0200
Subject: [PATCH] doc: update build instructions in the Linux guide

[ upstream commit 520bbb9cd9215c7139244b06f5041722e91bf14a ]

Before removing the "make" build system completely,
the Linux guide instructions are made more concise and accurate.
Some detailed explanations are also available in
doc/guides/prog_guide/dev_kit_root_make_help.rst

This is the swan song for makefile system,
in order to have accurate information backported in LTS.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 doc/guides/linux_gsg/build_dpdk.rst | 66 ++++++++---------------------
 1 file changed, 18 insertions(+), 48 deletions(-)

diff --git a/doc/guides/linux_gsg/build_dpdk.rst b/doc/guides/linux_gsg/build_dpdk.rst
index 4aeb4697d..c536e354e 100644
--- a/doc/guides/linux_gsg/build_dpdk.rst
+++ b/doc/guides/linux_gsg/build_dpdk.rst
@@ -167,60 +167,32 @@ Installation of DPDK Target Environment using Make
    is therefore recommended that DPDK installation is done using meson and
    ninja as described above.
 
-The format of a DPDK target is::
+Get a native target environment automatically::
 
-    ARCH-MACHINE-EXECENV-TOOLCHAIN
-
-where:
-
-* ``ARCH`` can be:  ``i686``, ``x86_64``, ``ppc_64``, ``arm64``
-
-* ``MACHINE`` can be:  ``native``, ``power8``, ``armv8a``
-
-* ``EXECENV`` can be:  ``linux``,  ``freebsd``
-
-* ``TOOLCHAIN`` can be:  ``gcc``,  ``icc``
-
-The targets to be installed depend on the 32-bit and/or 64-bit packages and compilers installed on the host.
-Available targets can be found in the DPDK/config directory.
-The defconfig\_ prefix should not be used.
+   make defconfig O=mybuild
 
 .. note::
 
-    Configuration files are provided with the ``RTE_MACHINE`` optimization level set.
     Within the configuration files, the ``RTE_MACHINE`` configuration value is set to native,
     which means that the compiled software is tuned for the platform on which it is built.
-    For more information on this setting, and its possible values, see the *DPDK Programmers Guide*.
 
-When using the Intel® C++ Compiler (icc), one of the following commands should be invoked for 64-bit or 32-bit use respectively.
-Notice that the shell scripts update the ``$PATH`` variable and therefore should not be performed in the same session.
-Also, verify the compiler's installation directory since the path may be different:
+Or get a specific target environment::
 
-.. code-block:: console
+   make config T=x86_64-native-linux-gcc O=mybuild
 
-    source /opt/intel/bin/iccvars.sh intel64
-    source /opt/intel/bin/iccvars.sh ia32
+The format of a DPDK target is "ARCH-MACHINE-EXECENV-TOOLCHAIN".
+Available targets can be found with::
 
-To install and make targets, use the ``make install T=<target>`` command in the top-level DPDK directory.
+   make help
 
-For example, to compile a 64-bit target using icc, run:
+Customize the target configuration in the generated ``.config`` file.
+Example for enabling the pcap PMD::
 
-.. code-block:: console
+   sed -ri 's,(PMD_PCAP=).*,\1y,' mybuild/.config
 
-    make install T=x86_64-native-linux-icc
+Compile the target::
 
-To compile a 32-bit build using gcc, the make command should be:
-
-.. code-block:: console
-
-    make install T=i686-native-linux-gcc
-
-To prepare a target without building it, for example, if the configuration changes need to be made before compilation,
-use the ``make config T=<target>`` command:
-
-.. code-block:: console
-
-    make config T=x86_64-native-linux-gcc
+   make -j4 O=mybuild
 
 .. warning::
 
@@ -229,15 +201,13 @@ use the ``make config T=<target>`` command:
     If the DPDK is not being built on the target machine,
     the ``RTE_KERNELDIR`` environment variable should be used to point the compilation at a copy of the kernel version to be used on the target machine.
 
-Once the target environment is created, the user may move to the target environment directory and continue to make code changes and re-compile.
-The user may also make modifications to the compile-time DPDK configuration by editing the .config file in the build directory.
-(This is a build-local copy of the defconfig file from the top- level config directory).
+Install the target in a separate directory::
 
-.. code-block:: console
+   make install O=mybuild DESTDIR=myinstall prefix=
 
-    cd x86_64-native-linux-gcc
-    vi .config
-    make
+The environment is ready to build a DPDK application::
+
+   RTE_SDK=$(pwd)/myinstall/share/dpdk RTE_TARGET=x86_64-native-linux-gcc make -C myapp
 
 In addition, the make clean command can be used to remove any existing compiled files for a subsequent full, clean rebuild of the code.
 
@@ -245,5 +215,5 @@ Browsing the Installed DPDK Environment Target
 ----------------------------------------------
 
 Once a target is created it contains all libraries, including poll-mode drivers, and header files for the DPDK environment that are required to build customer applications.
-In addition, the test and testpmd applications are built under the build/app directory, which may be used for testing.
+In addition, the test applications are built under the app directory, which may be used for testing.
 A kmod  directory is also present that contains kernel modules which may be loaded if needed.
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.762877735 +0100
+++ 0056-doc-update-build-instructions-in-the-Linux-guide.patch	2020-07-24 12:53:48.275006236 +0100
@@ -1,8 +1,10 @@
-From 520bbb9cd9215c7139244b06f5041722e91bf14a Mon Sep 17 00:00:00 2001
+From 15318529bd10ad8cc0c90aa152b369c23853d580 Mon Sep 17 00:00:00 2001
 From: Thomas Monjalon <thomas@monjalon.net>
 Date: Wed, 17 Jun 2020 23:41:25 +0200
 Subject: [PATCH] doc: update build instructions in the Linux guide
 
+[ upstream commit 520bbb9cd9215c7139244b06f5041722e91bf14a ]
+
 Before removing the "make" build system completely,
 the Linux guide instructions are made more concise and accurate.
 Some detailed explanations are also available in
@@ -11,8 +13,6 @@
 This is the swan song for makefile system,
 in order to have accurate information backported in LTS.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
 Acked-by: Bruce Richardson <bruce.richardson@intel.com>
 Acked-by: David Marchand <david.marchand@redhat.com>

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

* [dpdk-stable] patch 'build: fix drivers library path on Windows' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (54 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'doc: update build instructions in the Linux guide' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'pci: fix address domain format size' " luca.boccassi
                   ` (135 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Tal Shnaiderman; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 621b21301cc0fcf240a6fc0622f58ec8ff798136 Mon Sep 17 00:00:00 2001
From: Tal Shnaiderman <talshn@mellanox.com>
Date: Mon, 29 Jun 2020 15:37:38 +0300
Subject: [PATCH] build: fix drivers library path on Windows

[ upstream commit 77cca7ccec13b617c64f21c573c9e6ac5b4aed64 ]

import library (/IMPLIB) in meson.build should use
the 'drivers' and not 'libs' folder.

The error is: fatal error LNK1149: output filename matches input filename.
The fix uses the correct folder.

Fixes: 5ed3766981 ("drivers: process shared link dependencies as for libs")

Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
---
 drivers/meson.build | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/meson.build b/drivers/meson.build
index 32d68aa1d..4246cc32a 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -151,7 +151,7 @@ foreach class:dpdk_driver_classes
 			version_map = '@0@/@1@/@2@_version.map'.format(
 					meson.current_source_dir(),
 					drv_path, lib_name)
-			implib = dir_name + '.dll.a'
+			implib = 'lib' + lib_name + '.dll.a'
 
 			def_file = custom_target(lib_name + '_def',
 				command: [map_to_def_cmd, '@INPUT@', '@OUTPUT@'],
@@ -159,8 +159,12 @@ foreach class:dpdk_driver_classes
 				output: '@0@_exports.def'.format(lib_name))
 			lk_deps = [version_map, def_file]
 			if is_windows
-				lk_args = ['-Wl,/def:' + def_file.full_path(),
-					'-Wl,/implib:lib\\' + implib]
+				if is_ms_linker
+					lk_args = ['-Wl,/def:' + def_file.full_path(),
+						'-Wl,/implib:drivers\\' + implib]
+				else
+					lk_args = []
+				endif
 			else
 				lk_args = ['-Wl,--version-script=' + version_map]
 				# on unix systems check the output of the
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.802101153 +0100
+++ 0057-build-fix-drivers-library-path-on-Windows.patch	2020-07-24 12:53:48.275006236 +0100
@@ -1,8 +1,10 @@
-From 77cca7ccec13b617c64f21c573c9e6ac5b4aed64 Mon Sep 17 00:00:00 2001
+From 621b21301cc0fcf240a6fc0622f58ec8ff798136 Mon Sep 17 00:00:00 2001
 From: Tal Shnaiderman <talshn@mellanox.com>
 Date: Mon, 29 Jun 2020 15:37:38 +0300
 Subject: [PATCH] build: fix drivers library path on Windows
 
+[ upstream commit 77cca7ccec13b617c64f21c573c9e6ac5b4aed64 ]
+
 import library (/IMPLIB) in meson.build should use
 the 'drivers' and not 'libs' folder.
 
@@ -10,7 +12,6 @@
 The fix uses the correct folder.
 
 Fixes: 5ed3766981 ("drivers: process shared link dependencies as for libs")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
 ---
@@ -18,10 +19,10 @@
  1 file changed, 7 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/meson.build b/drivers/meson.build
-index 6ce2d6b50..ccdc73868 100644
+index 32d68aa1d..4246cc32a 100644
 --- a/drivers/meson.build
 +++ b/drivers/meson.build
-@@ -153,7 +153,7 @@ foreach class:dpdk_driver_classes
+@@ -151,7 +151,7 @@ foreach class:dpdk_driver_classes
  			version_map = '@0@/@1@/@2@_version.map'.format(
  					meson.current_source_dir(),
  					drv_path, lib_name)
@@ -30,7 +31,7 @@
  
  			def_file = custom_target(lib_name + '_def',
  				command: [map_to_def_cmd, '@INPUT@', '@OUTPUT@'],
-@@ -161,8 +161,12 @@ foreach class:dpdk_driver_classes
+@@ -159,8 +159,12 @@ foreach class:dpdk_driver_classes
  				output: '@0@_exports.def'.format(lib_name))
  			lk_deps = [version_map, def_file]
  			if is_windows

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

* [dpdk-stable] patch 'pci: fix address domain format size' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (55 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'build: fix drivers library path on Windows' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'net/ice/base: fix VSI ID mask to 10 bits' " luca.boccassi
                   ` (134 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Tal Shnaiderman; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 9cd4c0f0a74ecd514e61c2ddf15ccb37bf58b3ee Mon Sep 17 00:00:00 2001
From: Tal Shnaiderman <talshn@mellanox.com>
Date: Mon, 29 Jun 2020 15:37:36 +0300
Subject: [PATCH] pci: fix address domain format size

[ upstream commit 8517072c8715556968b59e5872f580c7cad2e53c ]

the struct rte_pci_addr defines domain as uint32_t variable however
the PCI_PRI_FMT macro used for logging the struct sets the format
of domain to uint16_t.

The mismatch causes the following warning messages
in Windows clang build:

format specifies type 'unsigned short' but the argument
has type 'uint32_t' (aka 'unsigned int') [-Wformat]

Fixes: af75078fece3 ("first public release")

Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
---
 lib/librte_pci/rte_pci.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_pci/rte_pci.h b/lib/librte_pci/rte_pci.h
index 4087771c1..db8391965 100644
--- a/lib/librte_pci/rte_pci.h
+++ b/lib/librte_pci/rte_pci.h
@@ -22,7 +22,7 @@ extern "C" {
 #include <inttypes.h>
 
 /** Formatting string for PCI device identifier: Ex: 0000:00:01.0 */
-#define PCI_PRI_FMT "%.4" PRIx16 ":%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8
+#define PCI_PRI_FMT "%.4" PRIx32 ":%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8
 #define PCI_PRI_STR_SIZE sizeof("XXXXXXXX:XX:XX.X")
 
 /** Short formatting string, without domain, for PCI device: Ex: 00:01.0 */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.838662061 +0100
+++ 0058-pci-fix-address-domain-format-size.patch	2020-07-24 12:53:48.275006236 +0100
@@ -1,8 +1,10 @@
-From 8517072c8715556968b59e5872f580c7cad2e53c Mon Sep 17 00:00:00 2001
+From 9cd4c0f0a74ecd514e61c2ddf15ccb37bf58b3ee Mon Sep 17 00:00:00 2001
 From: Tal Shnaiderman <talshn@mellanox.com>
 Date: Mon, 29 Jun 2020 15:37:36 +0300
 Subject: [PATCH] pci: fix address domain format size
 
+[ upstream commit 8517072c8715556968b59e5872f580c7cad2e53c ]
+
 the struct rte_pci_addr defines domain as uint32_t variable however
 the PCI_PRI_FMT macro used for logging the struct sets the format
 of domain to uint16_t.
@@ -14,7 +16,6 @@
 has type 'uint32_t' (aka 'unsigned int') [-Wformat]
 
 Fixes: af75078fece3 ("first public release")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
 ---
@@ -22,11 +23,11 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/lib/librte_pci/rte_pci.h b/lib/librte_pci/rte_pci.h
-index 933707917..104b2bb85 100644
+index 4087771c1..db8391965 100644
 --- a/lib/librte_pci/rte_pci.h
 +++ b/lib/librte_pci/rte_pci.h
-@@ -23,7 +23,7 @@ extern "C" {
- #include <sys/types.h>
+@@ -22,7 +22,7 @@ extern "C" {
+ #include <inttypes.h>
  
  /** Formatting string for PCI device identifier: Ex: 0000:00:01.0 */
 -#define PCI_PRI_FMT "%.4" PRIx16 ":%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8

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

* [dpdk-stable] patch 'net/ice/base: fix VSI ID mask to 10 bits' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (56 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'pci: fix address domain format size' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'net/mlx5: remove redundant newline from logs' " luca.boccassi
                   ` (133 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Kiran Patil, Paul M Stillwell Jr, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From d4d6d0560a9fb1ce894bb37a389b912b35cb5743 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Thu, 11 Jun 2020 16:43:29 +0800
Subject: [PATCH] net/ice/base: fix VSI ID mask to 10 bits

[ upstream commit 072158c6527c02277ea2a03f844f9b2103c33d42 ]

set_rss_lut failed due to incorrect vsi_id mask. vsi_id is 10 bit
but mask was 0x1FF whereas it should be 0x3FF.

For vsi_num >= 512, FW set_rss_lut has been failing with return code
EACCESS (vsi ownership issue) because software was providing
incorrect vsi_num (dropping 10th bit due to incorrect mask) for
set_rss_lut admin command

Fixes: a90fae1d0755 ("net/ice/base: add admin queue structures and commands")

Signed-off-by: Kiran Patil <kiran.patil@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_adminq_cmd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_adminq_cmd.h b/drivers/net/ice/base/ice_adminq_cmd.h
index d196434f4..2118247a7 100644
--- a/drivers/net/ice/base/ice_adminq_cmd.h
+++ b/drivers/net/ice/base/ice_adminq_cmd.h
@@ -1935,7 +1935,7 @@ struct ice_aqc_get_set_rss_keys {
 struct ice_aqc_get_set_rss_lut {
 #define ICE_AQC_GSET_RSS_LUT_VSI_VALID	BIT(15)
 #define ICE_AQC_GSET_RSS_LUT_VSI_ID_S	0
-#define ICE_AQC_GSET_RSS_LUT_VSI_ID_M	(0x1FF << ICE_AQC_GSET_RSS_LUT_VSI_ID_S)
+#define ICE_AQC_GSET_RSS_LUT_VSI_ID_M	(0x3FF << ICE_AQC_GSET_RSS_LUT_VSI_ID_S)
 	__le16 vsi_id;
 #define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_S	0
 #define ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_M	\
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.874068911 +0100
+++ 0059-net-ice-base-fix-VSI-ID-mask-to-10-bits.patch	2020-07-24 12:53:48.279006311 +0100
@@ -1,8 +1,10 @@
-From 072158c6527c02277ea2a03f844f9b2103c33d42 Mon Sep 17 00:00:00 2001
+From d4d6d0560a9fb1ce894bb37a389b912b35cb5743 Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang@intel.com>
 Date: Thu, 11 Jun 2020 16:43:29 +0800
 Subject: [PATCH] net/ice/base: fix VSI ID mask to 10 bits
 
+[ upstream commit 072158c6527c02277ea2a03f844f9b2103c33d42 ]
+
 set_rss_lut failed due to incorrect vsi_id mask. vsi_id is 10 bit
 but mask was 0x1FF whereas it should be 0x3FF.
 
@@ -12,7 +14,6 @@
 set_rss_lut admin command
 
 Fixes: a90fae1d0755 ("net/ice/base: add admin queue structures and commands")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kiran Patil <kiran.patil@intel.com>
 Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
@@ -23,10 +24,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/ice/base/ice_adminq_cmd.h b/drivers/net/ice/base/ice_adminq_cmd.h
-index eaf6c3d0e..9ee5b4eb5 100644
+index d196434f4..2118247a7 100644
 --- a/drivers/net/ice/base/ice_adminq_cmd.h
 +++ b/drivers/net/ice/base/ice_adminq_cmd.h
-@@ -1992,7 +1992,7 @@ struct ice_aqc_get_set_rss_keys {
+@@ -1935,7 +1935,7 @@ struct ice_aqc_get_set_rss_keys {
  struct ice_aqc_get_set_rss_lut {
  #define ICE_AQC_GSET_RSS_LUT_VSI_VALID	BIT(15)
  #define ICE_AQC_GSET_RSS_LUT_VSI_ID_S	0

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

* [dpdk-stable] patch 'net/mlx5: remove redundant newline from logs' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (57 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'net/ice/base: fix VSI ID mask to 10 bits' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'net/qede: fix multicast drop in promiscuous mode' " luca.boccassi
                   ` (132 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: David Marchand; +Cc: Viacheslav Ovsiienko, Xiaoyu Min, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From c429d2d7431630334f28e9bcc009f4985eb0c780 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 17 Jun 2020 15:53:24 +0200
Subject: [PATCH] net/mlx5: remove redundant newline from logs

[ upstream commit 63783b0172476208d27999441880764d9ea1fedf ]

The DRV_LOG macro already appends a newline.

Fixes: 46287eacc1b1 ("net/mlx5: introduce hash list")
Fixes: 860897d2895a ("net/mlx5: reorganize flow tables with hash list")
Fixes: e484e4032332 ("net/mlx5: optimize tag traversal with hash list")
Fixes: 6801116688fe ("net/mlx5: fix multiple flow table hash list")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Xiaoyu Min <jackmin@mellanox.com>
---
 drivers/net/mlx5/mlx5.c       | 6 +++---
 drivers/net/mlx5/mlx5_utils.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index bb718f27f..ce76c96db 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -867,7 +867,7 @@ mlx5_alloc_table_hash_list(struct mlx5_priv *priv)
 	snprintf(s, sizeof(s), "%s_flow_table", priv->sh->ibdev_name);
 	sh->flow_tbls = mlx5_hlist_create(s, MLX5_FLOW_TABLE_HLIST_ARRAY_SIZE);
 	if (!sh->flow_tbls) {
-		DRV_LOG(ERR, "flow tables with hash creation failed.\n");
+		DRV_LOG(ERR, "flow tables with hash creation failed.");
 		err = ENOMEM;
 		return err;
 	}
@@ -951,7 +951,7 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
 	if (!sh->flow_tbls)
 		err = mlx5_alloc_table_hash_list(priv);
 	else
-		DRV_LOG(DEBUG, "sh->flow_tbls[%p] already created, reuse\n",
+		DRV_LOG(DEBUG, "sh->flow_tbls[%p] already created, reuse",
 			(void *)sh->flow_tbls);
 	if (err)
 		return err;
@@ -959,7 +959,7 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
 	snprintf(s, sizeof(s), "%s_tags", sh->ibdev_name);
 	sh->tag_table = mlx5_hlist_create(s, MLX5_TAGS_HLIST_ARRAY_SIZE);
 	if (!sh->tag_table) {
-		DRV_LOG(ERR, "tags with hash creation failed.\n");
+		DRV_LOG(ERR, "tags with hash creation failed.");
 		err = ENOMEM;
 		goto error;
 	}
diff --git a/drivers/net/mlx5/mlx5_utils.c b/drivers/net/mlx5/mlx5_utils.c
index 5d86615ea..c1c238941 100644
--- a/drivers/net/mlx5/mlx5_utils.c
+++ b/drivers/net/mlx5/mlx5_utils.c
@@ -20,7 +20,7 @@ mlx5_hlist_create(const char *name, uint32_t size)
 	if (!rte_is_power_of_2(size)) {
 		act_size = rte_align32pow2(size);
 		DRV_LOG(WARNING, "Size 0x%" PRIX32 " is not power of 2, will "
-			"be aligned to 0x%" PRIX32 ".\n", size, act_size);
+			"be aligned to 0x%" PRIX32 ".", size, act_size);
 	} else {
 		act_size = size;
 	}
@@ -29,7 +29,7 @@ mlx5_hlist_create(const char *name, uint32_t size)
 	/* Using zmalloc, then no need to initialize the heads. */
 	h = rte_zmalloc(name, alloc_size, RTE_CACHE_LINE_SIZE);
 	if (!h) {
-		DRV_LOG(ERR, "No memory for hash list %s creation\n",
+		DRV_LOG(ERR, "No memory for hash list %s creation",
 			name ? name : "None");
 		return NULL;
 	}
@@ -37,7 +37,7 @@ mlx5_hlist_create(const char *name, uint32_t size)
 		snprintf(h->name, MLX5_HLIST_NAMESIZE, "%s", name);
 	h->table_sz = act_size;
 	h->mask = act_size - 1;
-	DRV_LOG(DEBUG, "Hash list with %s size 0x%" PRIX32 " is created.\n",
+	DRV_LOG(DEBUG, "Hash list with %s size 0x%" PRIX32 " is created.",
 		h->name, act_size);
 	return h;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.913763643 +0100
+++ 0060-net-mlx5-remove-redundant-newline-from-logs.patch	2020-07-24 12:53:48.283006385 +0100
@@ -1,43 +1,30 @@
-From 63783b0172476208d27999441880764d9ea1fedf Mon Sep 17 00:00:00 2001
+From c429d2d7431630334f28e9bcc009f4985eb0c780 Mon Sep 17 00:00:00 2001
 From: David Marchand <david.marchand@redhat.com>
 Date: Wed, 17 Jun 2020 15:53:24 +0200
 Subject: [PATCH] net/mlx5: remove redundant newline from logs
 
+[ upstream commit 63783b0172476208d27999441880764d9ea1fedf ]
+
 The DRV_LOG macro already appends a newline.
 
 Fixes: 46287eacc1b1 ("net/mlx5: introduce hash list")
 Fixes: 860897d2895a ("net/mlx5: reorganize flow tables with hash list")
 Fixes: e484e4032332 ("net/mlx5: optimize tag traversal with hash list")
 Fixes: 6801116688fe ("net/mlx5: fix multiple flow table hash list")
-Cc: stable@dpdk.org
 
 Signed-off-by: David Marchand <david.marchand@redhat.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
 Acked-by: Xiaoyu Min <jackmin@mellanox.com>
 ---
- drivers/net/mlx5/linux/mlx5_os.c | 2 +-
- drivers/net/mlx5/mlx5.c          | 2 +-
- drivers/net/mlx5/mlx5_utils.c    | 6 +++---
- 3 files changed, 5 insertions(+), 5 deletions(-)
+ drivers/net/mlx5/mlx5.c       | 6 +++---
+ drivers/net/mlx5/mlx5_utils.c | 6 +++---
+ 2 files changed, 6 insertions(+), 6 deletions(-)
 
-diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
-index b330cd553..797887319 100644
---- a/drivers/net/mlx5/linux/mlx5_os.c
-+++ b/drivers/net/mlx5/linux/mlx5_os.c
-@@ -284,7 +284,7 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
- 	snprintf(s, sizeof(s), "%s_tags", sh->ibdev_name);
- 	sh->tag_table = mlx5_hlist_create(s, MLX5_TAGS_HLIST_ARRAY_SIZE);
- 	if (!sh->tag_table) {
--		DRV_LOG(ERR, "tags with hash creation failed.\n");
-+		DRV_LOG(ERR, "tags with hash creation failed.");
- 		err = ENOMEM;
- 		goto error;
- 	}
 diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
-index 5c86f6fb9..c13e71608 100644
+index bb718f27f..ce76c96db 100644
 --- a/drivers/net/mlx5/mlx5.c
 +++ b/drivers/net/mlx5/mlx5.c
-@@ -882,7 +882,7 @@ mlx5_alloc_table_hash_list(struct mlx5_priv *priv)
+@@ -867,7 +867,7 @@ mlx5_alloc_table_hash_list(struct mlx5_priv *priv)
  	snprintf(s, sizeof(s), "%s_flow_table", priv->sh->ibdev_name);
  	sh->flow_tbls = mlx5_hlist_create(s, MLX5_FLOW_TABLE_HLIST_ARRAY_SIZE);
  	if (!sh->flow_tbls) {
@@ -46,8 +33,26 @@
  		err = ENOMEM;
  		return err;
  	}
+@@ -951,7 +951,7 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
+ 	if (!sh->flow_tbls)
+ 		err = mlx5_alloc_table_hash_list(priv);
+ 	else
+-		DRV_LOG(DEBUG, "sh->flow_tbls[%p] already created, reuse\n",
++		DRV_LOG(DEBUG, "sh->flow_tbls[%p] already created, reuse",
+ 			(void *)sh->flow_tbls);
+ 	if (err)
+ 		return err;
+@@ -959,7 +959,7 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
+ 	snprintf(s, sizeof(s), "%s_tags", sh->ibdev_name);
+ 	sh->tag_table = mlx5_hlist_create(s, MLX5_TAGS_HLIST_ARRAY_SIZE);
+ 	if (!sh->tag_table) {
+-		DRV_LOG(ERR, "tags with hash creation failed.\n");
++		DRV_LOG(ERR, "tags with hash creation failed.");
+ 		err = ENOMEM;
+ 		goto error;
+ 	}
 diff --git a/drivers/net/mlx5/mlx5_utils.c b/drivers/net/mlx5/mlx5_utils.c
-index d29fbcbc8..6f3ba7ca4 100644
+index 5d86615ea..c1c238941 100644
 --- a/drivers/net/mlx5/mlx5_utils.c
 +++ b/drivers/net/mlx5/mlx5_utils.c
 @@ -20,7 +20,7 @@ mlx5_hlist_create(const char *name, uint32_t size)

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

* [dpdk-stable] patch 'net/qede: fix multicast drop in promiscuous mode' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (58 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'net/mlx5: remove redundant newline from logs' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'net/mvpp2: fix non-EAL thread support' " luca.boccassi
                   ` (131 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Devendra Singh Rawat; +Cc: Igor Russkikh, Rasesh Mody, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 889b24bdd1573d9839df7ffebae1e04592cdd090 Mon Sep 17 00:00:00 2001
From: Devendra Singh Rawat <dsinghrawat@marvell.com>
Date: Thu, 18 Jun 2020 13:45:55 +0530
Subject: [PATCH] net/qede: fix multicast drop in promiscuous mode

[ upstream commit b10231aed1edb9cdd74a0a021a38267255952f00 ]

After enabling promiscuous mode all packets whose destination MAC
address is a multicast address were being dropped. This fix configures
H/W to receive all traffic in promiscuous mode. Promiscuous mode also
overrides allmulticast mode on/off status.

Fixes: 40e9f6fc1558 ("net/qede: enable VF-VF traffic with unmatched dest address")

Signed-off-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
 drivers/net/qede/qede_ethdev.c | 25 +++++++++----------------
 1 file changed, 9 insertions(+), 16 deletions(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 2a1c82ac9..abb82d336 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -551,17 +551,16 @@ qed_configure_filter_rx_mode(struct rte_eth_dev *eth_dev,
 		ECORE_ACCEPT_BCAST;
 
 	if (type == QED_FILTER_RX_MODE_TYPE_PROMISC) {
-		flags.rx_accept_filter |= ECORE_ACCEPT_UCAST_UNMATCHED;
+		flags.rx_accept_filter |= (ECORE_ACCEPT_UCAST_UNMATCHED |
+					   ECORE_ACCEPT_MCAST_UNMATCHED);
 		if (IS_VF(edev)) {
-			flags.tx_accept_filter |= ECORE_ACCEPT_UCAST_UNMATCHED;
-			DP_INFO(edev, "Enabling Tx unmatched flag for VF\n");
+			flags.tx_accept_filter |=
+						(ECORE_ACCEPT_UCAST_UNMATCHED |
+						 ECORE_ACCEPT_MCAST_UNMATCHED);
+			DP_INFO(edev, "Enabling Tx unmatched flags for VF\n");
 		}
 	} else if (type == QED_FILTER_RX_MODE_TYPE_MULTI_PROMISC) {
 		flags.rx_accept_filter |= ECORE_ACCEPT_MCAST_UNMATCHED;
-	} else if (type == (QED_FILTER_RX_MODE_TYPE_MULTI_PROMISC |
-				QED_FILTER_RX_MODE_TYPE_PROMISC)) {
-		flags.rx_accept_filter |= ECORE_ACCEPT_UCAST_UNMATCHED |
-			ECORE_ACCEPT_MCAST_UNMATCHED;
 	}
 
 	return ecore_filter_accept_cmd(edev, 0, flags, false, false,
@@ -1420,16 +1419,13 @@ qede_link_update(struct rte_eth_dev *eth_dev, __rte_unused int wait_to_complete)
 
 static int qede_promiscuous_enable(struct rte_eth_dev *eth_dev)
 {
-	struct qede_dev *qdev = eth_dev->data->dev_private;
-	struct ecore_dev *edev = &qdev->edev;
+	enum _ecore_status_t ecore_status;
+	struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
+	struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
 	enum qed_filter_rx_mode_type type = QED_FILTER_RX_MODE_TYPE_PROMISC;
-	enum _ecore_status_t ecore_status;
 
 	PMD_INIT_FUNC_TRACE(edev);
 
-	if (rte_eth_allmulticast_get(eth_dev->data->port_id) == 1)
-		type |= QED_FILTER_RX_MODE_TYPE_MULTI_PROMISC;
-
 	ecore_status = qed_configure_filter_rx_mode(eth_dev, type);
 
 	return ecore_status >= ECORE_SUCCESS ? 0 : -EAGAIN;
@@ -1803,9 +1799,6 @@ static int qede_allmulticast_enable(struct rte_eth_dev *eth_dev)
 	    QED_FILTER_RX_MODE_TYPE_MULTI_PROMISC;
 	enum _ecore_status_t ecore_status;
 
-	if (rte_eth_promiscuous_get(eth_dev->data->port_id) == 1)
-		type |= QED_FILTER_RX_MODE_TYPE_PROMISC;
-
 	ecore_status = qed_configure_filter_rx_mode(eth_dev, type);
 
 	return ecore_status >= ECORE_SUCCESS ? 0 : -EAGAIN;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.954777550 +0100
+++ 0061-net-qede-fix-multicast-drop-in-promiscuous-mode.patch	2020-07-24 12:53:48.283006385 +0100
@@ -1,15 +1,16 @@
-From b10231aed1edb9cdd74a0a021a38267255952f00 Mon Sep 17 00:00:00 2001
+From 889b24bdd1573d9839df7ffebae1e04592cdd090 Mon Sep 17 00:00:00 2001
 From: Devendra Singh Rawat <dsinghrawat@marvell.com>
 Date: Thu, 18 Jun 2020 13:45:55 +0530
 Subject: [PATCH] net/qede: fix multicast drop in promiscuous mode
 
+[ upstream commit b10231aed1edb9cdd74a0a021a38267255952f00 ]
+
 After enabling promiscuous mode all packets whose destination MAC
 address is a multicast address were being dropped. This fix configures
 H/W to receive all traffic in promiscuous mode. Promiscuous mode also
 overrides allmulticast mode on/off status.
 
 Fixes: 40e9f6fc1558 ("net/qede: enable VF-VF traffic with unmatched dest address")
-Cc: stable@dpdk.org
 
 Signed-off-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
 Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
@@ -19,10 +20,10 @@
  1 file changed, 9 insertions(+), 16 deletions(-)
 
 diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
-index c4f8f1258..84d2d2c03 100644
+index 2a1c82ac9..abb82d336 100644
 --- a/drivers/net/qede/qede_ethdev.c
 +++ b/drivers/net/qede/qede_ethdev.c
-@@ -625,17 +625,16 @@ qed_configure_filter_rx_mode(struct rte_eth_dev *eth_dev,
+@@ -551,17 +551,16 @@ qed_configure_filter_rx_mode(struct rte_eth_dev *eth_dev,
  		ECORE_ACCEPT_BCAST;
  
  	if (type == QED_FILTER_RX_MODE_TYPE_PROMISC) {
@@ -46,7 +47,7 @@
  	}
  
  	return ecore_filter_accept_cmd(edev, 0, flags, false, false,
-@@ -1502,16 +1501,13 @@ qede_link_update(struct rte_eth_dev *eth_dev, __rte_unused int wait_to_complete)
+@@ -1420,16 +1419,13 @@ qede_link_update(struct rte_eth_dev *eth_dev, __rte_unused int wait_to_complete)
  
  static int qede_promiscuous_enable(struct rte_eth_dev *eth_dev)
  {
@@ -66,7 +67,7 @@
  	ecore_status = qed_configure_filter_rx_mode(eth_dev, type);
  
  	return ecore_status >= ECORE_SUCCESS ? 0 : -EAGAIN;
-@@ -1885,9 +1881,6 @@ static int qede_allmulticast_enable(struct rte_eth_dev *eth_dev)
+@@ -1803,9 +1799,6 @@ static int qede_allmulticast_enable(struct rte_eth_dev *eth_dev)
  	    QED_FILTER_RX_MODE_TYPE_MULTI_PROMISC;
  	enum _ecore_status_t ecore_status;
  

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

* [dpdk-stable] patch 'net/mvpp2: fix non-EAL thread support' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (59 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'net/qede: fix multicast drop in promiscuous mode' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'eal/arm: add vcopyq intrinsic for aarch32' " luca.boccassi
                   ` (130 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: David Marchand; +Cc: Liron Himi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From c5c7ff58b62688907ae1962d7713c080e4a642fe Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 16 Jun 2020 11:47:00 +0200
Subject: [PATCH] net/mvpp2: fix non-EAL thread support

[ upstream commit b52d25ae4b1bbe9adba0d9276b7771ec27e3d151 ]

Caught by code inspection, for a non-EAL thread identified with
rte_lcore_id() == LCORE_ID_ANY, the code currently arbitrarily uses
lcore 0 while there is no guarantee this lcore is used.

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

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Liron Himi <lironh@marvell.com>
---
 drivers/net/mvpp2/mrvl_ethdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index b98b1fd66..903727432 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -816,7 +816,7 @@ mrvl_flush_bpool(struct rte_eth_dev *dev)
 	unsigned int core_id = rte_lcore_id();
 
 	if (core_id == LCORE_ID_ANY)
-		core_id = 0;
+		core_id = rte_get_master_lcore();
 
 	hif = mrvl_get_hif(priv, core_id);
 
@@ -1620,7 +1620,7 @@ mrvl_fill_bpool(struct mrvl_rxq *rxq, int num)
 
 	core_id = rte_lcore_id();
 	if (core_id == LCORE_ID_ANY)
-		core_id = 0;
+		core_id = rte_get_master_lcore();
 
 	hif = mrvl_get_hif(rxq->priv, core_id);
 	if (!hif)
@@ -1770,7 +1770,7 @@ mrvl_rx_queue_release(void *rxq)
 	unsigned int core_id = rte_lcore_id();
 
 	if (core_id == LCORE_ID_ANY)
-		core_id = 0;
+		core_id = rte_get_master_lcore();
 
 	if (!q)
 		return;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:50.989532722 +0100
+++ 0062-net-mvpp2-fix-non-EAL-thread-support.patch	2020-07-24 12:53:48.287006460 +0100
@@ -1,14 +1,15 @@
-From b52d25ae4b1bbe9adba0d9276b7771ec27e3d151 Mon Sep 17 00:00:00 2001
+From c5c7ff58b62688907ae1962d7713c080e4a642fe Mon Sep 17 00:00:00 2001
 From: David Marchand <david.marchand@redhat.com>
 Date: Tue, 16 Jun 2020 11:47:00 +0200
 Subject: [PATCH] net/mvpp2: fix non-EAL thread support
 
+[ upstream commit b52d25ae4b1bbe9adba0d9276b7771ec27e3d151 ]
+
 Caught by code inspection, for a non-EAL thread identified with
 rte_lcore_id() == LCORE_ID_ANY, the code currently arbitrarily uses
 lcore 0 while there is no guarantee this lcore is used.
 
 Fixes: 3588aaa68eab ("net/mrvl: fix HIF objects allocation")
-Cc: stable@dpdk.org
 
 Signed-off-by: David Marchand <david.marchand@redhat.com>
 Acked-by: Liron Himi <lironh@marvell.com>

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

* [dpdk-stable] patch 'eal/arm: add vcopyq intrinsic for aarch32' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (60 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'net/mvpp2: fix non-EAL thread support' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'net/ixgbe: fix include of vector header file' " luca.boccassi
                   ` (129 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 586e03ddd6c45d15a3f49258ec8c5b67f39b6710 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Wed, 24 Jun 2020 15:10:12 +0800
Subject: [PATCH] eal/arm: add vcopyq intrinsic for aarch32

[ upstream commit 4eb25acdb773b30c94adb0080659c9280bca4ee1 ]

vcopyq_laneq_u32 should be implemented for aarch32 which doesn't have
the intrinsic.
This fixes build of examples/l3fwd for armv7.

Fixes: 3c4b4024c225 ("arch/arm: add vcopyq_laneq_u32 for old gcc")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/common/include/arch/arm/rte_vect.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/include/arch/arm/rte_vect.h b/lib/librte_eal/common/include/arch/arm/rte_vect.h
index 2a18a6854..71e56ec63 100644
--- a/lib/librte_eal/common/include/arch/arm/rte_vect.h
+++ b/lib/librte_eal/common/include/arch/arm/rte_vect.h
@@ -62,7 +62,11 @@ vaddvq_u16(uint16x8_t a)
 
 #endif
 
-#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION < 70000)
+#if defined(RTE_ARCH_ARM) || \
+(defined(RTE_ARCH_ARM64) && RTE_TOOLCHAIN_GCC && (GCC_VERSION < 70000))
+/* NEON intrinsic vcopyq_laneq_u32() is not supported in ARMv7-A(AArch32)
+ * On AArch64, this intrinsic is supported since GCC version 7.
+ */
 static inline uint32x4_t
 vcopyq_laneq_u32(uint32x4_t a, const int lane_a,
 		 uint32x4_t b, const int lane_b)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.032535390 +0100
+++ 0063-eal-arm-add-vcopyq-intrinsic-for-aarch32.patch	2020-07-24 12:53:48.287006460 +0100
@@ -1,32 +1,33 @@
-From 4eb25acdb773b30c94adb0080659c9280bca4ee1 Mon Sep 17 00:00:00 2001
+From 586e03ddd6c45d15a3f49258ec8c5b67f39b6710 Mon Sep 17 00:00:00 2001
 From: Ruifeng Wang <ruifeng.wang@arm.com>
 Date: Wed, 24 Jun 2020 15:10:12 +0800
 Subject: [PATCH] eal/arm: add vcopyq intrinsic for aarch32
 
+[ upstream commit 4eb25acdb773b30c94adb0080659c9280bca4ee1 ]
+
 vcopyq_laneq_u32 should be implemented for aarch32 which doesn't have
 the intrinsic.
 This fixes build of examples/l3fwd for armv7.
 
 Fixes: 3c4b4024c225 ("arch/arm: add vcopyq_laneq_u32 for old gcc")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
 ---
- lib/librte_eal/arm/include/rte_vect.h | 6 +++++-
+ lib/librte_eal/common/include/arch/arm/rte_vect.h | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
 
-diff --git a/lib/librte_eal/arm/include/rte_vect.h b/lib/librte_eal/arm/include/rte_vect.h
-index 9287a1117..01c51712a 100644
---- a/lib/librte_eal/arm/include/rte_vect.h
-+++ b/lib/librte_eal/arm/include/rte_vect.h
+diff --git a/lib/librte_eal/common/include/arch/arm/rte_vect.h b/lib/librte_eal/common/include/arch/arm/rte_vect.h
+index 2a18a6854..71e56ec63 100644
+--- a/lib/librte_eal/common/include/arch/arm/rte_vect.h
++++ b/lib/librte_eal/common/include/arch/arm/rte_vect.h
 @@ -62,7 +62,11 @@ vaddvq_u16(uint16x8_t a)
  
  #endif
  
--#if RTE_CC_IS_GNU && (GCC_VERSION < 70000)
+-#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION < 70000)
 +#if defined(RTE_ARCH_ARM) || \
-+(defined(RTE_ARCH_ARM64) && RTE_CC_IS_GNU && (GCC_VERSION < 70000))
++(defined(RTE_ARCH_ARM64) && RTE_TOOLCHAIN_GCC && (GCC_VERSION < 70000))
 +/* NEON intrinsic vcopyq_laneq_u32() is not supported in ARMv7-A(AArch32)
 + * On AArch64, this intrinsic is supported since GCC version 7.
 + */

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

* [dpdk-stable] patch 'net/ixgbe: fix include of vector header file' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (61 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'eal/arm: add vcopyq intrinsic for aarch32' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'bus/dpaa: fix iterating on a class type' " luca.boccassi
                   ` (128 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 8eb46d419c27e53d2112090b19e2c48decd11638 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Wed, 24 Jun 2020 15:10:14 +0800
Subject: [PATCH] net/ixgbe: fix include of vector header file

[ upstream commit 2b7a54f091f2049cc668278344d3f95325f54a9f ]

The include of 'arm_neon.h' causes issues to old gcc and aarch32.
Including 'rte_vect.h' instead fixes these issues.

Fixes: b20971b6cca0 ("net/ixgbe: implement vector driver for ARM")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
index feb86c61e..27ff53570 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
@@ -5,13 +5,12 @@
 #include <stdint.h>
 #include <rte_ethdev_driver.h>
 #include <rte_malloc.h>
+#include <rte_vect.h>
 
 #include "ixgbe_ethdev.h"
 #include "ixgbe_rxtx.h"
 #include "ixgbe_rxtx_vec_common.h"
 
-#include <arm_neon.h>
-
 #pragma GCC diagnostic ignored "-Wcast-qual"
 
 static inline void
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.070723299 +0100
+++ 0064-net-ixgbe-fix-include-of-vector-header-file.patch	2020-07-24 12:53:48.287006460 +0100
@@ -1,13 +1,14 @@
-From 2b7a54f091f2049cc668278344d3f95325f54a9f Mon Sep 17 00:00:00 2001
+From 8eb46d419c27e53d2112090b19e2c48decd11638 Mon Sep 17 00:00:00 2001
 From: Ruifeng Wang <ruifeng.wang@arm.com>
 Date: Wed, 24 Jun 2020 15:10:14 +0800
 Subject: [PATCH] net/ixgbe: fix include of vector header file
 
+[ upstream commit 2b7a54f091f2049cc668278344d3f95325f54a9f ]
+
 The include of 'arm_neon.h' causes issues to old gcc and aarch32.
 Including 'rte_vect.h' instead fixes these issues.
 
 Fixes: b20971b6cca0 ("net/ixgbe: implement vector driver for ARM")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -16,7 +17,7 @@
  1 file changed, 1 insertion(+), 2 deletions(-)
 
 diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
-index 293b7c8bd..aa27ee177 100644
+index feb86c61e..27ff53570 100644
 --- a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
 +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
 @@ -5,13 +5,12 @@

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

* [dpdk-stable] patch 'bus/dpaa: fix iterating on a class type' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (62 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'net/ixgbe: fix include of vector header file' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'bus/fslmc: " luca.boccassi
                   ` (127 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Adrián Moreno, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 3f26d928cf387a3d333a36ed8d92e0bd2c2bb95c Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Fri, 26 Jun 2020 16:04:28 +0200
Subject: [PATCH] bus/dpaa: fix iterating on a class type
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit be2ee360fe86cf041d1a07577919160e6557c679 ]

This patches fixes a null pointer dereferencing that happens
when the device string passed to the iterator is NULL. This
situation can happen when iterating on a class type.
For example:

RTE_DEV_FOREACH(dev, "class=eth", &dev_iter) {
    ...
}

Fixes: e79df833d3f6 ("bus/dpaa: support hotplug ops")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Adrián Moreno <amorenoz@redhat.com>
---
 drivers/bus/dpaa/dpaa_bus.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index f27820db3..327d9269f 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -700,6 +700,11 @@ dpaa_bus_dev_iterate(const void *start, const char *str,
 	struct rte_dpaa_device *dev;
 	char *dup, *dev_name = NULL;
 
+	if (str == NULL) {
+		DPAA_BUS_DEBUG("No device string");
+		return NULL;
+	}
+
 	/* Expectation is that device would be name=device_name */
 	if (strncmp(str, "name=", 5) != 0) {
 		DPAA_BUS_DEBUG("Invalid device string (%s)\n", str);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.106331209 +0100
+++ 0065-bus-dpaa-fix-iterating-on-a-class-type.patch	2020-07-24 12:53:48.287006460 +0100
@@ -1,4 +1,4 @@
-From be2ee360fe86cf041d1a07577919160e6557c679 Mon Sep 17 00:00:00 2001
+From 3f26d928cf387a3d333a36ed8d92e0bd2c2bb95c Mon Sep 17 00:00:00 2001
 From: Maxime Coquelin <maxime.coquelin@redhat.com>
 Date: Fri, 26 Jun 2020 16:04:28 +0200
 Subject: [PATCH] bus/dpaa: fix iterating on a class type
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit be2ee360fe86cf041d1a07577919160e6557c679 ]
+
 This patches fixes a null pointer dereferencing that happens
 when the device string passed to the iterator is NULL. This
 situation can happen when iterating on a class type.
@@ -16,7 +18,6 @@
 }
 
 Fixes: e79df833d3f6 ("bus/dpaa: support hotplug ops")
-Cc: stable@dpdk.org
 
 Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
 Acked-by: Adrián Moreno <amorenoz@redhat.com>
@@ -25,10 +26,10 @@
  1 file changed, 5 insertions(+)
 
 diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
-index d53fe6083..591e28c1e 100644
+index f27820db3..327d9269f 100644
 --- a/drivers/bus/dpaa/dpaa_bus.c
 +++ b/drivers/bus/dpaa/dpaa_bus.c
-@@ -703,6 +703,11 @@ dpaa_bus_dev_iterate(const void *start, const char *str,
+@@ -700,6 +700,11 @@ dpaa_bus_dev_iterate(const void *start, const char *str,
  	struct rte_dpaa_device *dev;
  	char *dup, *dev_name = NULL;
  

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

* [dpdk-stable] patch 'bus/fslmc: fix iterating on a class type' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (63 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'bus/dpaa: fix iterating on a class type' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'net/octeontx2: fix DMAC filtering' " luca.boccassi
                   ` (126 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Adrián Moreno, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From f232d2d9db3324a689ac6c5cfc9cadd6c165c1d3 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Fri, 26 Jun 2020 16:04:29 +0200
Subject: [PATCH] bus/fslmc: fix iterating on a class type
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 44255245433b3b4394474db100d478341aeb08fc ]

This patches fixes a null pointer dereferencing that happens
when the device string passed to the iterator is NULL. This
situation can happen when iterating on a class type.
For example:

RTE_DEV_FOREACH(dev, "class=eth", &dev_iter) {
    ...
}

Fixes: e67a61614d0b ("bus/fslmc: support device iteration")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Adrián Moreno <amorenoz@redhat.com>
---
 drivers/bus/fslmc/fslmc_bus.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index b3e964aa9..7431177f2 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -608,6 +608,11 @@ fslmc_bus_dev_iterate(const void *start, const char *str,
 	struct rte_dpaa2_device *dev;
 	char *dup, *dev_name = NULL;
 
+	if (str == NULL) {
+		DPAA2_BUS_DEBUG("No device string");
+		return NULL;
+	}
+
 	/* Expectation is that device would be name=device_name */
 	if (strncmp(str, "name=", 5) != 0) {
 		DPAA2_BUS_DEBUG("Invalid device string (%s)\n", str);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.141507409 +0100
+++ 0066-bus-fslmc-fix-iterating-on-a-class-type.patch	2020-07-24 12:53:48.287006460 +0100
@@ -1,4 +1,4 @@
-From 44255245433b3b4394474db100d478341aeb08fc Mon Sep 17 00:00:00 2001
+From f232d2d9db3324a689ac6c5cfc9cadd6c165c1d3 Mon Sep 17 00:00:00 2001
 From: Maxime Coquelin <maxime.coquelin@redhat.com>
 Date: Fri, 26 Jun 2020 16:04:29 +0200
 Subject: [PATCH] bus/fslmc: fix iterating on a class type
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 44255245433b3b4394474db100d478341aeb08fc ]
+
 This patches fixes a null pointer dereferencing that happens
 when the device string passed to the iterator is NULL. This
 situation can happen when iterating on a class type.
@@ -16,7 +18,6 @@
 }
 
 Fixes: e67a61614d0b ("bus/fslmc: support device iteration")
-Cc: stable@dpdk.org
 
 Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
 Acked-by: Adrián Moreno <amorenoz@redhat.com>
@@ -25,10 +26,10 @@
  1 file changed, 5 insertions(+)
 
 diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
-index afbd82e8d..ac46eb4fe 100644
+index b3e964aa9..7431177f2 100644
 --- a/drivers/bus/fslmc/fslmc_bus.c
 +++ b/drivers/bus/fslmc/fslmc_bus.c
-@@ -603,6 +603,11 @@ fslmc_bus_dev_iterate(const void *start, const char *str,
+@@ -608,6 +608,11 @@ fslmc_bus_dev_iterate(const void *start, const char *str,
  	struct rte_dpaa2_device *dev;
  	char *dup, *dev_name = NULL;
  

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

* [dpdk-stable] patch 'net/octeontx2: fix DMAC filtering' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (64 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'bus/fslmc: " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'common/mlx5: fix code arrangement in tag allocation' " luca.boccassi
                   ` (125 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Harman Kalra; +Cc: Sunil Kumar Kori, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 2789a4d75c75e811d05f59ef0152d1f7de8315e5 Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Wed, 3 Jun 2020 20:22:13 +0530
Subject: [PATCH] net/octeontx2: fix DMAC filtering

[ upstream commit 987984204bdc982e0f58393678dd50ba91c639c4 ]

Issue has been observed where packets are getting dropped
at DMAC filtering if a new dmac address is added before
starting of port.

Fixes: c43adf61682f ("net/octeontx2: add unicast MAC filter")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/net/octeontx2/otx2_ethdev.h     | 1 +
 drivers/net/octeontx2/otx2_ethdev_ops.c | 4 +++-
 drivers/net/octeontx2/otx2_mac.c        | 2 ++
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index 864356e36..0aadaecf7 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -267,6 +267,7 @@ struct otx2_eth_dev {
 	uint8_t mac_addr[RTE_ETHER_ADDR_LEN];
 	uint8_t mkex_pfl_name[MKEX_NAME_LEN];
 	uint8_t max_mac_entries;
+	bool dmac_filter_enable;
 	uint8_t lf_tx_stats;
 	uint8_t lf_rx_stats;
 	uint16_t flags;
diff --git a/drivers/net/octeontx2/otx2_ethdev_ops.c b/drivers/net/octeontx2/otx2_ethdev_ops.c
index 8f1635dba..93ef04803 100644
--- a/drivers/net/octeontx2/otx2_ethdev_ops.c
+++ b/drivers/net/octeontx2/otx2_ethdev_ops.c
@@ -148,8 +148,10 @@ otx2_nix_promisc_enable(struct rte_eth_dev *eth_dev)
 int
 otx2_nix_promisc_disable(struct rte_eth_dev *eth_dev)
 {
-	otx2_nix_promisc_config(eth_dev, 0);
+	struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
+	otx2_nix_promisc_config(eth_dev, dev->dmac_filter_enable);
 	nix_cgx_promisc_config(eth_dev, 0);
+	dev->dmac_filter_enable = false;
 
 	return 0;
 }
diff --git a/drivers/net/octeontx2/otx2_mac.c b/drivers/net/octeontx2/otx2_mac.c
index 262d185e5..49a700ca1 100644
--- a/drivers/net/octeontx2/otx2_mac.c
+++ b/drivers/net/octeontx2/otx2_mac.c
@@ -76,6 +76,8 @@ otx2_nix_mac_addr_add(struct rte_eth_dev *eth_dev, struct rte_ether_addr *addr,
 
 	/* Enable promiscuous mode at NIX level */
 	otx2_nix_promisc_config(eth_dev, 1);
+	dev->dmac_filter_enable = true;
+	eth_dev->data->promiscuous = 0;
 
 done:
 	return rc;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.173175258 +0100
+++ 0067-net-octeontx2-fix-DMAC-filtering.patch	2020-07-24 12:53:48.291006534 +0100
@@ -1,14 +1,15 @@
-From 987984204bdc982e0f58393678dd50ba91c639c4 Mon Sep 17 00:00:00 2001
+From 2789a4d75c75e811d05f59ef0152d1f7de8315e5 Mon Sep 17 00:00:00 2001
 From: Harman Kalra <hkalra@marvell.com>
 Date: Wed, 3 Jun 2020 20:22:13 +0530
 Subject: [PATCH] net/octeontx2: fix DMAC filtering
 
+[ upstream commit 987984204bdc982e0f58393678dd50ba91c639c4 ]
+
 Issue has been observed where packets are getting dropped
 at DMAC filtering if a new dmac address is added before
 starting of port.
 
 Fixes: c43adf61682f ("net/octeontx2: add unicast MAC filter")
-Cc: stable@dpdk.org
 
 Signed-off-by: Harman Kalra <hkalra@marvell.com>
 Acked-by: Sunil Kumar Kori <skori@marvell.com>
@@ -20,10 +21,10 @@
  3 files changed, 6 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
-index 0fbf68b8e..16b0d8163 100644
+index 864356e36..0aadaecf7 100644
 --- a/drivers/net/octeontx2/otx2_ethdev.h
 +++ b/drivers/net/octeontx2/otx2_ethdev.h
-@@ -271,6 +271,7 @@ struct otx2_eth_dev {
+@@ -267,6 +267,7 @@ struct otx2_eth_dev {
  	uint8_t mac_addr[RTE_ETHER_ADDR_LEN];
  	uint8_t mkex_pfl_name[MKEX_NAME_LEN];
  	uint8_t max_mac_entries;
@@ -32,7 +33,7 @@
  	uint8_t lf_rx_stats;
  	uint16_t flags;
 diff --git a/drivers/net/octeontx2/otx2_ethdev_ops.c b/drivers/net/octeontx2/otx2_ethdev_ops.c
-index 80ac2b96e..faecf216c 100644
+index 8f1635dba..93ef04803 100644
 --- a/drivers/net/octeontx2/otx2_ethdev_ops.c
 +++ b/drivers/net/octeontx2/otx2_ethdev_ops.c
 @@ -148,8 +148,10 @@ otx2_nix_promisc_enable(struct rte_eth_dev *eth_dev)

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

* [dpdk-stable] patch 'common/mlx5: fix code arrangement in tag allocation' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (65 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'net/octeontx2: fix DMAC filtering' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'net/mlx5: fix iterator type in Rx queue management' " luca.boccassi
                   ` (124 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From dac5398ff22718581c4b564325aa87fbca645ac3 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@mellanox.com>
Date: Wed, 24 Jun 2020 13:20:31 +0000
Subject: [PATCH] common/mlx5: fix code arrangement in tag allocation

[ upstream commit ed5d23656e925ea8b271d4a84eec8e4046f66fa9 ]

Flow tag action is supported only when the driver has DR or DV support.
The tag allocation is adjusted to the modes DV or DR.

In case both DR and DV are not supported in the system, the driver
handles static code for error report.
This error code, wrongly, was compiled when DV is supported while in
this case it cannot be accessed at all.

Ignore the aforementioned static error code in case of DV by
preprocessor commands rearrangement.

Fixes: cbb66daa3c85 ("net/mlx5: prepare Direct Verbs for Direct Rule")

Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_glue.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_glue.c b/drivers/net/mlx5/mlx5_glue.c
index 44f63116a..65b63bd60 100644
--- a/drivers/net/mlx5/mlx5_glue.c
+++ b/drivers/net/mlx5/mlx5_glue.c
@@ -754,7 +754,7 @@ mlx5_glue_dv_create_flow_action_tag(uint32_t tag)
 #ifdef HAVE_IBV_FLOW_DV_SUPPORT
 #ifdef HAVE_MLX5DV_DR
 	return mlx5dv_dr_action_create_tag(tag);
-#else
+#else /* HAVE_MLX5DV_DR */
 	struct mlx5dv_flow_action_attr *action;
 	action = malloc(sizeof(*action));
 	if (!action)
@@ -762,11 +762,12 @@ mlx5_glue_dv_create_flow_action_tag(uint32_t tag)
 	action->type = MLX5DV_FLOW_ACTION_TAG;
 	action->tag_value = tag;
 	return action;
-#endif
-#endif
+#endif /* HAVE_MLX5DV_DR */
+#else /* HAVE_IBV_FLOW_DV_SUPPORT */
 	(void)tag;
 	errno = ENOTSUP;
 	return NULL;
+#endif /* HAVE_IBV_FLOW_DV_SUPPORT */
 }
 
 static void *
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.213459854 +0100
+++ 0068-common-mlx5-fix-code-arrangement-in-tag-allocation.patch	2020-07-24 12:53:48.291006534 +0100
@@ -1,8 +1,10 @@
-From ed5d23656e925ea8b271d4a84eec8e4046f66fa9 Mon Sep 17 00:00:00 2001
+From dac5398ff22718581c4b564325aa87fbca645ac3 Mon Sep 17 00:00:00 2001
 From: Michael Baum <michaelba@mellanox.com>
 Date: Wed, 24 Jun 2020 13:20:31 +0000
 Subject: [PATCH] common/mlx5: fix code arrangement in tag allocation
 
+[ upstream commit ed5d23656e925ea8b271d4a84eec8e4046f66fa9 ]
+
 Flow tag action is supported only when the driver has DR or DV support.
 The tag allocation is adjusted to the modes DV or DR.
 
@@ -15,19 +17,18 @@
 preprocessor commands rearrangement.
 
 Fixes: cbb66daa3c85 ("net/mlx5: prepare Direct Verbs for Direct Rule")
-Cc: stable@dpdk.org
 
 Signed-off-by: Michael Baum <michaelba@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
 ---
- drivers/common/mlx5/linux/mlx5_glue.c | 7 ++++---
+ drivers/net/mlx5/mlx5_glue.c | 7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)
 
-diff --git a/drivers/common/mlx5/linux/mlx5_glue.c b/drivers/common/mlx5/linux/mlx5_glue.c
-index 62c4cc74b..048207eb7 100644
---- a/drivers/common/mlx5/linux/mlx5_glue.c
-+++ b/drivers/common/mlx5/linux/mlx5_glue.c
-@@ -752,7 +752,7 @@ mlx5_glue_dv_create_flow_action_tag(uint32_t tag)
+diff --git a/drivers/net/mlx5/mlx5_glue.c b/drivers/net/mlx5/mlx5_glue.c
+index 44f63116a..65b63bd60 100644
+--- a/drivers/net/mlx5/mlx5_glue.c
++++ b/drivers/net/mlx5/mlx5_glue.c
+@@ -754,7 +754,7 @@ mlx5_glue_dv_create_flow_action_tag(uint32_t tag)
  #ifdef HAVE_IBV_FLOW_DV_SUPPORT
  #ifdef HAVE_MLX5DV_DR
  	return mlx5dv_dr_action_create_tag(tag);
@@ -36,7 +37,7 @@
  	struct mlx5dv_flow_action_attr *action;
  	action = malloc(sizeof(*action));
  	if (!action)
-@@ -760,11 +760,12 @@ mlx5_glue_dv_create_flow_action_tag(uint32_t tag)
+@@ -762,11 +762,12 @@ mlx5_glue_dv_create_flow_action_tag(uint32_t tag)
  	action->type = MLX5DV_FLOW_ACTION_TAG;
  	action->tag_value = tag;
  	return action;

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

* [dpdk-stable] patch 'net/mlx5: fix iterator type in Rx queue management' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (66 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'common/mlx5: fix code arrangement in tag allocation' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'vhost: fix features definition location' " luca.boccassi
                   ` (123 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 245b44464f9d8a12ba5c0dadb9f1be13faf07226 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@mellanox.com>
Date: Wed, 24 Jun 2020 13:50:39 +0000
Subject: [PATCH] net/mlx5: fix iterator type in Rx queue management

[ upstream commit 0f006468c53c8151fa70ff41869c1a76316fe224 ]

The mlx5_check_vec_rx_support function in the mlx5_rxtx_vec.c file
passes the RX queues array in the loop. Similarly, the mlx5_mprq_enabled
function in the mlx5_rxq.c file passes the RX queues array in the loop.

In both cases, the iterator of the loop is called i and the variable
representing the array size is called rxqs_n.
The i variable is of UINT16_T type while the rxqs_n variable is of
unsigned int type. The size of the rxqs_n variable is much larger than
the number of iterations allowed by the i type, theoretically there may
be a situation where the value of the rxqs_n will be greater than can be
represented by 16 bits and the loop will never end.

Change the type of i to UINT32_T.

Fixes: 7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support")
Fixes: 6cb559d67b83 ("net/mlx5: add vectorized Rx/Tx burst for x86")

Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxq.c      | 2 +-
 drivers/net/mlx5/mlx5_rxtx_vec.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index baa868360..e9e8f1278 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -105,7 +105,7 @@ inline int
 mlx5_mprq_enabled(struct rte_eth_dev *dev)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
-	uint16_t i;
+	uint32_t i;
 	uint16_t n = 0;
 	uint16_t n_ibv = 0;
 
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.c b/drivers/net/mlx5/mlx5_rxtx_vec.c
index dbb4cfaeb..0c705d1f7 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec.c
+++ b/drivers/net/mlx5/mlx5_rxtx_vec.c
@@ -156,7 +156,7 @@ int __attribute__((cold))
 mlx5_check_vec_rx_support(struct rte_eth_dev *dev)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
-	uint16_t i;
+	uint32_t i;
 
 	if (!priv->config.rx_vec_en)
 		return -ENOTSUP;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.246695698 +0100
+++ 0069-net-mlx5-fix-iterator-type-in-Rx-queue-management.patch	2020-07-24 12:53:48.295006608 +0100
@@ -1,8 +1,10 @@
-From 0f006468c53c8151fa70ff41869c1a76316fe224 Mon Sep 17 00:00:00 2001
+From 245b44464f9d8a12ba5c0dadb9f1be13faf07226 Mon Sep 17 00:00:00 2001
 From: Michael Baum <michaelba@mellanox.com>
 Date: Wed, 24 Jun 2020 13:50:39 +0000
 Subject: [PATCH] net/mlx5: fix iterator type in Rx queue management
 
+[ upstream commit 0f006468c53c8151fa70ff41869c1a76316fe224 ]
+
 The mlx5_check_vec_rx_support function in the mlx5_rxtx_vec.c file
 passes the RX queues array in the loop. Similarly, the mlx5_mprq_enabled
 function in the mlx5_rxq.c file passes the RX queues array in the loop.
@@ -19,7 +21,6 @@
 
 Fixes: 7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support")
 Fixes: 6cb559d67b83 ("net/mlx5: add vectorized Rx/Tx burst for x86")
-Cc: stable@dpdk.org
 
 Signed-off-by: Michael Baum <michaelba@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -29,10 +30,10 @@
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
-index bd0037b82..b436f0610 100644
+index baa868360..e9e8f1278 100644
 --- a/drivers/net/mlx5/mlx5_rxq.c
 +++ b/drivers/net/mlx5/mlx5_rxq.c
-@@ -108,7 +108,7 @@ inline int
+@@ -105,7 +105,7 @@ inline int
  mlx5_mprq_enabled(struct rte_eth_dev *dev)
  {
  	struct mlx5_priv *priv = dev->data->dev_private;
@@ -42,10 +43,10 @@
  	uint16_t n_ibv = 0;
  
 diff --git a/drivers/net/mlx5/mlx5_rxtx_vec.c b/drivers/net/mlx5/mlx5_rxtx_vec.c
-index b38bd203c..7fae2010f 100644
+index dbb4cfaeb..0c705d1f7 100644
 --- a/drivers/net/mlx5/mlx5_rxtx_vec.c
 +++ b/drivers/net/mlx5/mlx5_rxtx_vec.c
-@@ -156,7 +156,7 @@ int __rte_cold
+@@ -156,7 +156,7 @@ int __attribute__((cold))
  mlx5_check_vec_rx_support(struct rte_eth_dev *dev)
  {
  	struct mlx5_priv *priv = dev->data->dev_private;

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

* [dpdk-stable] patch 'vhost: fix features definition location' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (67 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'net/mlx5: fix iterator type in Rx queue management' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'test/ring: fix statistics in bulk enq/dequeue' " luca.boccassi
                   ` (122 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Matan Azrad; +Cc: Chenbo Xia, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 4727f70f066486f5a749a73637216067f9c73dc1 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Thu, 18 Jun 2020 19:08:20 +0000
Subject: [PATCH] vhost: fix features definition location

[ upstream commit da2b788041d2becb6ffa44b16456bd2041119269 ]

The vhost library provide an infrastructure in order to help the DPDK
users to manage vhost devices.

One of the infrastructure parts is the features enablement APIs.

Some features bits may be defined only in the internal file vhost.h in
case the kernel version doesn't include them.

Hence, user running on old kernel may not be able to manage thus
features.

Move all the feature bits definitions to the API file rte_vhost.h.

Fixes: db69be54b6ff ("vhost: hide internal code")
Fixes: 8d286dbeb8d7 ("vhost: fix multiple queue not enabled for old kernels")
Fixes: 3d3c6590b58c ("vhost: enable virtio MTU feature")
Fixes: 704098fc478c ("vhost: fix build with old kernels")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/rte_vhost.h | 17 +++++++++++++++++
 lib/librte_vhost/vhost.h     | 17 -----------------
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
index 532ee0dec..53a30a062 100644
--- a/lib/librte_vhost/rte_vhost.h
+++ b/lib/librte_vhost/rte_vhost.h
@@ -35,6 +35,23 @@ extern "C" {
 /* support only linear buffers (no chained mbufs) */
 #define RTE_VHOST_USER_LINEARBUF_SUPPORT	(1ULL << 6)
 
+/* Features. */
+#ifndef VIRTIO_NET_F_GUEST_ANNOUNCE
+ #define VIRTIO_NET_F_GUEST_ANNOUNCE 21
+#endif
+
+#ifndef VIRTIO_NET_F_MQ
+ #define VIRTIO_NET_F_MQ		22
+#endif
+
+#ifndef VIRTIO_NET_F_MTU
+ #define VIRTIO_NET_F_MTU 3
+#endif
+
+#ifndef VIRTIO_F_ANY_LAYOUT
+ #define VIRTIO_F_ANY_LAYOUT		27
+#endif
+
 /** Protocol features. */
 #ifndef VHOST_USER_PROTOCOL_F_MQ
 #define VHOST_USER_PROTOCOL_F_MQ	0
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index 844904ca3..deeca18f8 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -202,26 +202,9 @@ struct vhost_virtqueue {
 	TAILQ_HEAD(, vhost_iotlb_entry) iotlb_pending_list;
 } __rte_cache_aligned;
 
-/* Old kernels have no such macros defined */
-#ifndef VIRTIO_NET_F_GUEST_ANNOUNCE
- #define VIRTIO_NET_F_GUEST_ANNOUNCE 21
-#endif
-
-#ifndef VIRTIO_NET_F_MQ
- #define VIRTIO_NET_F_MQ		22
-#endif
-
 #define VHOST_MAX_VRING			0x100
 #define VHOST_MAX_QUEUE_PAIRS		0x80
 
-#ifndef VIRTIO_NET_F_MTU
- #define VIRTIO_NET_F_MTU 3
-#endif
-
-#ifndef VIRTIO_F_ANY_LAYOUT
- #define VIRTIO_F_ANY_LAYOUT		27
-#endif
-
 /* Declare IOMMU related bits for older kernels */
 #ifndef VIRTIO_F_IOMMU_PLATFORM
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.283017658 +0100
+++ 0070-vhost-fix-features-definition-location.patch	2020-07-24 12:53:48.295006608 +0100
@@ -1,8 +1,10 @@
-From da2b788041d2becb6ffa44b16456bd2041119269 Mon Sep 17 00:00:00 2001
+From 4727f70f066486f5a749a73637216067f9c73dc1 Mon Sep 17 00:00:00 2001
 From: Matan Azrad <matan@mellanox.com>
 Date: Thu, 18 Jun 2020 19:08:20 +0000
 Subject: [PATCH] vhost: fix features definition location
 
+[ upstream commit da2b788041d2becb6ffa44b16456bd2041119269 ]
+
 The vhost library provide an infrastructure in order to help the DPDK
 users to manage vhost devices.
 
@@ -20,7 +22,6 @@
 Fixes: 8d286dbeb8d7 ("vhost: fix multiple queue not enabled for old kernels")
 Fixes: 3d3c6590b58c ("vhost: enable virtio MTU feature")
 Fixes: 704098fc478c ("vhost: fix build with old kernels")
-Cc: stable@dpdk.org
 
 Signed-off-by: Matan Azrad <matan@mellanox.com>
 Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
@@ -31,10 +32,10 @@
  2 files changed, 17 insertions(+), 17 deletions(-)
 
 diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
-index 2fbc36464..8a5c332c8 100644
+index 532ee0dec..53a30a062 100644
 --- a/lib/librte_vhost/rte_vhost.h
 +++ b/lib/librte_vhost/rte_vhost.h
-@@ -36,6 +36,23 @@ extern "C" {
+@@ -35,6 +35,23 @@ extern "C" {
  /* support only linear buffers (no chained mbufs) */
  #define RTE_VHOST_USER_LINEARBUF_SUPPORT	(1ULL << 6)
  
@@ -59,10 +60,10 @@
  #ifndef VHOST_USER_PROTOCOL_F_MQ
  #define VHOST_USER_PROTOCOL_F_MQ	0
 diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
-index a0fe703ee..034463699 100644
+index 844904ca3..deeca18f8 100644
 --- a/lib/librte_vhost/vhost.h
 +++ b/lib/librte_vhost/vhost.h
-@@ -204,26 +204,9 @@ struct vhost_virtqueue {
+@@ -202,26 +202,9 @@ struct vhost_virtqueue {
  	TAILQ_HEAD(, vhost_iotlb_entry) iotlb_pending_list;
  } __rte_cache_aligned;
  

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

* [dpdk-stable] patch 'test/ring: fix statistics in bulk enq/dequeue' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (68 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'vhost: fix features definition location' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'test: fix build with ring PMD but no bond PMD' " luca.boccassi
                   ` (121 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Feifei Wang; +Cc: Ruifeng Wang, Phil Yang, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 95ad1c1bad8db6b2ae58d5267b5e407bf7193ef7 Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Mon, 8 Jun 2020 13:58:46 +0800
Subject: [PATCH] test/ring: fix statistics in bulk enq/dequeue

[ upstream commit 50959a899374cec9852eea3cd7dd638ee2d560ec ]

In size 32 bulk ring enq/dequeue performance test, the "Total count"
statistics is incorrect. For example, running the test on lcore 25 and
lcore 26, the output is as follows:

The test command:
$sudo ./arm64-armv8a-linuxapp-gcc/app/test -l 25-26
RTE>>ring_perf_autotest

Bulk enq/dequeue count on size 32
Core [25] count = 288268
Core [26] count = 288281
Total count (size: 32): 1066323

Fixed it by reset the counter at the beginning of each loop. The
revised output is as follows:

Bulk enq/dequeue count on size 32
Core [25] count = 285643
Core [26] count = 285688
Total count (size: 32): 571331

Fixes: 759cf9b5632c ("test/ring: enhance mp/mc coverage")

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 app/test/test_ring_perf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test/test_ring_perf.c b/app/test/test_ring_perf.c
index 70ee46ffe..3cf27965d 100644
--- a/app/test/test_ring_perf.c
+++ b/app/test/test_ring_perf.c
@@ -296,12 +296,13 @@ load_loop_fn(void *p)
 static int
 run_on_all_cores(struct rte_ring *r)
 {
-	uint64_t total = 0;
+	uint64_t total;
 	struct thread_params param;
 	unsigned int i, c;
 
 	memset(&param, 0, sizeof(struct thread_params));
 	for (i = 0; i < RTE_DIM(bulk_sizes); i++) {
+		total = 0;
 		printf("\nBulk enq/dequeue count on size %u\n", bulk_sizes[i]);
 		param.size = bulk_sizes[i];
 		param.r = r;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.321140254 +0100
+++ 0071-test-ring-fix-statistics-in-bulk-enq-dequeue.patch	2020-07-24 12:53:48.295006608 +0100
@@ -1,8 +1,10 @@
-From 50959a899374cec9852eea3cd7dd638ee2d560ec Mon Sep 17 00:00:00 2001
+From 95ad1c1bad8db6b2ae58d5267b5e407bf7193ef7 Mon Sep 17 00:00:00 2001
 From: Feifei Wang <feifei.wang2@arm.com>
 Date: Mon, 8 Jun 2020 13:58:46 +0800
 Subject: [PATCH] test/ring: fix statistics in bulk enq/dequeue
 
+[ upstream commit 50959a899374cec9852eea3cd7dd638ee2d560ec ]
+
 In size 32 bulk ring enq/dequeue performance test, the "Total count"
 statistics is incorrect. For example, running the test on lcore 25 and
 lcore 26, the output is as follows:
@@ -25,7 +27,6 @@
 Total count (size: 32): 571331
 
 Fixes: 759cf9b5632c ("test/ring: enhance mp/mc coverage")
-Cc: stable@dpdk.org
 
 Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
 Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
@@ -36,19 +37,17 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/app/test/test_ring_perf.c b/app/test/test_ring_perf.c
-index ee21faf71..ac9bf5608 100644
+index 70ee46ffe..3cf27965d 100644
 --- a/app/test/test_ring_perf.c
 +++ b/app/test/test_ring_perf.c
-@@ -380,7 +380,7 @@ load_loop_fn_16B(void *p)
+@@ -296,12 +296,13 @@ load_loop_fn(void *p)
  static int
- run_on_all_cores(struct rte_ring *r, const int esize)
+ run_on_all_cores(struct rte_ring *r)
  {
 -	uint64_t total = 0;
 +	uint64_t total;
  	struct thread_params param;
- 	lcore_function_t *lcore_f;
  	unsigned int i, c;
-@@ -392,6 +392,7 @@ run_on_all_cores(struct rte_ring *r, const int esize)
  
  	memset(&param, 0, sizeof(struct thread_params));
  	for (i = 0; i < RTE_DIM(bulk_sizes); i++) {

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

* [dpdk-stable] patch 'test: fix build with ring PMD but no bond PMD' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (69 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'test/ring: fix statistics in bulk enq/dequeue' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'mem: fix 32-bit init config with meson' " luca.boccassi
                   ` (120 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From ff89fb4fe754c59fa09d32a5874367638b32ba20 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 27 May 2020 15:57:45 +0100
Subject: [PATCH] test: fix build with ring PMD but no bond PMD

[ upstream commit 949c97ae310af049075c8745208e8795b9071d9c ]

If the bonding pmd is disabled, all autotest associated with it should be
disabled. However, some of those tests also depended upon the ring PMD so
were placed in a block depending on that driver - and unfortunately that
driver alone. This caused build failures if the ring PMD was enabled but
the bonding PMD disabled, due to missing header files and driver libs.

This error can be reproduced by configuring DPDK using e.g.

  meson configure -Ddisable_drivers=net/[!r]* build

(which will disable all drivers not starting with "r"), and then building
using ninja.

Fix this by moving all link bonding autotests to the one block and putting
a second conditional check within that block for those also requiring the
ring PMD.

Fixes: 7f6ef1664027 ("test/bonding: allow disabling driver")
Fixes: 207b1c813f39 ("test: fix build without ring PMD")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 app/test/meson.build | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index 8524a986a..d7d0e7871 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -322,6 +322,10 @@ endif
 # they are used via a driver-specific API.
 if dpdk_conf.has('RTE_LIBRTE_BOND_PMD')
 	test_deps += 'pmd_bond'
+	if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
+		test_sources += 'test_link_bonding_mode4.c'
+		driver_test_names += 'link_bonding_mode4_autotest'
+	endif
 endif
 if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
 	test_deps += 'pmd_ring'
@@ -330,7 +334,6 @@ if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
 	test_sources += 'test_event_eth_tx_adapter.c'
 	test_sources += 'test_bitratestats.c'
 	test_sources += 'test_latencystats.c'
-	test_sources += 'test_link_bonding_mode4.c'
 	test_sources += 'sample_packet_forward.c'
 	test_sources += 'test_pdump.c'
 	fast_test_names += 'ring_pmd_autotest'
@@ -338,7 +341,6 @@ if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
 	fast_test_names += 'event_eth_tx_adapter_autotest'
 	fast_test_names += 'bitratestats_autotest'
 	fast_test_names += 'latencystats_autotest'
-	driver_test_names += 'link_bonding_mode4_autotest'
 	fast_test_names += 'pdump_autotest'
 endif
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.360596281 +0100
+++ 0072-test-fix-build-with-ring-PMD-but-no-bond-PMD.patch	2020-07-24 12:53:48.295006608 +0100
@@ -1,8 +1,10 @@
-From 949c97ae310af049075c8745208e8795b9071d9c Mon Sep 17 00:00:00 2001
+From ff89fb4fe754c59fa09d32a5874367638b32ba20 Mon Sep 17 00:00:00 2001
 From: Bruce Richardson <bruce.richardson@intel.com>
 Date: Wed, 27 May 2020 15:57:45 +0100
 Subject: [PATCH] test: fix build with ring PMD but no bond PMD
 
+[ upstream commit 949c97ae310af049075c8745208e8795b9071d9c ]
+
 If the bonding pmd is disabled, all autotest associated with it should be
 disabled. However, some of those tests also depended upon the ring PMD so
 were placed in a block depending on that driver - and unfortunately that
@@ -30,13 +32,13 @@
  1 file changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/app/test/meson.build b/app/test/meson.build
-index 5233ead46..10f23d53b 100644
+index 8524a986a..d7d0e7871 100644
 --- a/app/test/meson.build
 +++ b/app/test/meson.build
-@@ -352,6 +352,10 @@ if dpdk_conf.has('RTE_LIBRTE_BOND_PMD')
+@@ -322,6 +322,10 @@ endif
+ # they are used via a driver-specific API.
+ if dpdk_conf.has('RTE_LIBRTE_BOND_PMD')
  	test_deps += 'pmd_bond'
- 	test_sources += ['test_link_bonding.c', 'test_link_bonding_rssconf.c']
- 	driver_test_names += ['link_bonding_autotest', 'link_bonding_rssconf_autotest']
 +	if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
 +		test_sources += 'test_link_bonding_mode4.c'
 +		driver_test_names += 'link_bonding_mode4_autotest'
@@ -44,20 +46,20 @@
  endif
  if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
  	test_deps += 'pmd_ring'
-@@ -360,7 +364,6 @@ if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
+@@ -330,7 +334,6 @@ if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
  	test_sources += 'test_event_eth_tx_adapter.c'
  	test_sources += 'test_bitratestats.c'
  	test_sources += 'test_latencystats.c'
 -	test_sources += 'test_link_bonding_mode4.c'
  	test_sources += 'sample_packet_forward.c'
  	test_sources += 'test_pdump.c'
- 	fast_tests += [['ring_pmd_autotest', true]]
-@@ -368,7 +371,6 @@ if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
- 	fast_tests += [['event_eth_tx_adapter_autotest', false]]
- 	fast_tests += [['bitratestats_autotest', true]]
- 	fast_tests += [['latencystats_autotest', true]]
+ 	fast_test_names += 'ring_pmd_autotest'
+@@ -338,7 +341,6 @@ if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
+ 	fast_test_names += 'event_eth_tx_adapter_autotest'
+ 	fast_test_names += 'bitratestats_autotest'
+ 	fast_test_names += 'latencystats_autotest'
 -	driver_test_names += 'link_bonding_mode4_autotest'
- 	fast_tests += [['pdump_autotest', true]]
+ 	fast_test_names += 'pdump_autotest'
  endif
  
 -- 

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

* [dpdk-stable] patch 'mem: fix 32-bit init config with meson' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (70 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'test: fix build with ring PMD but no bond PMD' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'examples/eventdev: fix 32-bit coremask' " luca.boccassi
                   ` (119 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 63cfb8b938d405896b8026b8726bd24bfc9ded8d Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 2 Jul 2020 11:57:21 +0100
Subject: [PATCH] mem: fix 32-bit init config with meson

[ upstream commit b29ac33ffccf856825c42dc11185b112f569ba57 ]

When building with meson, the default size of virtual address space
reserved for mapping pages was globally set at 512GB, which is too big for
use in 32-bit processes. To match the behaviour with "make", we configure
this to be 512GB for 64-bit and 2GB for 32-bit builds.

Bugzilla ID: 498
Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 config/meson.build  | 5 +++++
 config/rte_config.h | 1 -
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/config/meson.build b/config/meson.build
index 78bfdf309..9f77802d0 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -214,6 +214,11 @@ dpdk_conf.set('RTE_LIBEAL_USE_HPET', get_option('use_hpet'))
 dpdk_conf.set('RTE_MAX_VFIO_GROUPS', 64)
 dpdk_conf.set('RTE_DRIVER_MEMPOOL_BUCKET_SIZE_KB', 64)
 dpdk_conf.set('RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', true)
+if dpdk_conf.get('RTE_ARCH_64')
+	dpdk_conf.set('RTE_MAX_MEM_MB', 524288)
+else # for 32-bit we need smaller reserved memory areas
+	dpdk_conf.set('RTE_MAX_MEM_MB', 2048)
+endif
 
 
 compile_time_cpuflags = []
diff --git a/config/rte_config.h b/config/rte_config.h
index d30786bc0..765251a25 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -38,7 +38,6 @@
 #define RTE_MAX_MEM_MB_PER_LIST 32768
 #define RTE_MAX_MEMSEG_PER_TYPE 32768
 #define RTE_MAX_MEM_MB_PER_TYPE 65536
-#define RTE_MAX_MEM_MB 524288
 #define RTE_MAX_MEMZONE 2560
 #define RTE_MAX_TAILQ 32
 #define RTE_LOG_DP_LEVEL RTE_LOG_INFO
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.392667367 +0100
+++ 0073-mem-fix-32-bit-init-config-with-meson.patch	2020-07-24 12:53:48.299006683 +0100
@@ -1,8 +1,10 @@
-From b29ac33ffccf856825c42dc11185b112f569ba57 Mon Sep 17 00:00:00 2001
+From 63cfb8b938d405896b8026b8726bd24bfc9ded8d Mon Sep 17 00:00:00 2001
 From: Bruce Richardson <bruce.richardson@intel.com>
 Date: Thu, 2 Jul 2020 11:57:21 +0100
 Subject: [PATCH] mem: fix 32-bit init config with meson
 
+[ upstream commit b29ac33ffccf856825c42dc11185b112f569ba57 ]
+
 When building with meson, the default size of virtual address space
 reserved for mapping pages was globally set at 512GB, which is too big for
 use in 32-bit processes. To match the behaviour with "make", we configure
@@ -10,7 +12,6 @@
 
 Bugzilla ID: 498
 Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists")
-Cc: stable@dpdk.org
 
 Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
 Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -20,10 +21,10 @@
  2 files changed, 5 insertions(+), 1 deletion(-)
 
 diff --git a/config/meson.build b/config/meson.build
-index 351e268c1..241d62acc 100644
+index 78bfdf309..9f77802d0 100644
 --- a/config/meson.build
 +++ b/config/meson.build
-@@ -238,6 +238,11 @@ dpdk_conf.set('RTE_ENABLE_TRACE_FP', get_option('enable_trace_fp'))
+@@ -214,6 +214,11 @@ dpdk_conf.set('RTE_LIBEAL_USE_HPET', get_option('use_hpet'))
  dpdk_conf.set('RTE_MAX_VFIO_GROUPS', 64)
  dpdk_conf.set('RTE_DRIVER_MEMPOOL_BUCKET_SIZE_KB', 64)
  dpdk_conf.set('RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', true)
@@ -36,7 +37,7 @@
  
  compile_time_cpuflags = []
 diff --git a/config/rte_config.h b/config/rte_config.h
-index e9201fd46..086acf74a 100644
+index d30786bc0..765251a25 100644
 --- a/config/rte_config.h
 +++ b/config/rte_config.h
 @@ -38,7 +38,6 @@

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

* [dpdk-stable] patch 'examples/eventdev: fix 32-bit coremask' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (71 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'mem: fix 32-bit init config with meson' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'event/octeontx2: fix device reconfigure' " luca.boccassi
                   ` (118 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Harry van Haaren; +Cc: Jun W Zhou, Mao Jiang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 11908b39262384c5a2cd96e6a27ef5b259e61e49 Mon Sep 17 00:00:00 2001
From: Harry van Haaren <harry.van.haaren@intel.com>
Date: Tue, 16 Jun 2020 17:56:03 +0100
Subject: [PATCH] examples/eventdev: fix 32-bit coremask

[ upstream commit ff0f1040b66edcbaf93fc217ea452e4a9ae424e2 ]

This commit fixes a bug in 32-bit environments when a core mask greater
than 32-bits is requested. The fix is to convert the bitmask logic to
64 bits, aligning 64 and 32 bit implementations.

Fixes: adb5d548 ("examples/eventdev_pipeline_sw_pmd: add sample app")

Reported-by: Jun W Zhou <junx.w.zhou@intel.com>
Suggested-by: Mao Jiang <maox.jiang@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 examples/eventdev_pipeline/main.c            | 10 +++++-----
 examples/eventdev_pipeline/pipeline_common.h |  8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index 21958269f..4ac582153 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -81,7 +81,7 @@ parse_coremask(const char *coremask)
 		val = xdigit2val(c);
 		for (j = 0; j < BITS_HEX && idx < MAX_NUM_CORE; j++, idx++) {
 			if ((1 << j) & val) {
-				mask |= (1UL << idx);
+				mask |= (1ULL << idx);
 				count++;
 			}
 		}
@@ -232,10 +232,10 @@ parse_app_args(int argc, char **argv)
 		usage();
 
 	for (i = 0; i < MAX_NUM_CORE; i++) {
-		fdata->rx_core[i] = !!(rx_lcore_mask & (1UL << i));
-		fdata->tx_core[i] = !!(tx_lcore_mask & (1UL << i));
-		fdata->sched_core[i] = !!(sched_lcore_mask & (1UL << i));
-		fdata->worker_core[i] = !!(worker_lcore_mask & (1UL << i));
+		fdata->rx_core[i] = !!(rx_lcore_mask & (1ULL << i));
+		fdata->tx_core[i] = !!(tx_lcore_mask & (1ULL << i));
+		fdata->sched_core[i] = !!(sched_lcore_mask & (1ULL << i));
+		fdata->worker_core[i] = !!(worker_lcore_mask & (1ULL << i));
 
 		if (fdata->worker_core[i])
 			cdata.num_workers++;
diff --git a/examples/eventdev_pipeline/pipeline_common.h b/examples/eventdev_pipeline/pipeline_common.h
index c7245f7f0..6a4287602 100644
--- a/examples/eventdev_pipeline/pipeline_common.h
+++ b/examples/eventdev_pipeline/pipeline_common.h
@@ -51,10 +51,10 @@ struct fastpath_data {
 	bool rx_single;
 	bool tx_single;
 	bool sched_single;
-	unsigned int rx_core[MAX_NUM_CORE];
-	unsigned int tx_core[MAX_NUM_CORE];
-	unsigned int sched_core[MAX_NUM_CORE];
-	unsigned int worker_core[MAX_NUM_CORE];
+	uint64_t rx_core[MAX_NUM_CORE];
+	uint64_t tx_core[MAX_NUM_CORE];
+	uint64_t sched_core[MAX_NUM_CORE];
+	uint64_t worker_core[MAX_NUM_CORE];
 	struct setup_data cap;
 } __rte_cache_aligned;
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.431352056 +0100
+++ 0074-examples-eventdev-fix-32-bit-coremask.patch	2020-07-24 12:53:48.299006683 +0100
@@ -1,14 +1,15 @@
-From ff0f1040b66edcbaf93fc217ea452e4a9ae424e2 Mon Sep 17 00:00:00 2001
+From 11908b39262384c5a2cd96e6a27ef5b259e61e49 Mon Sep 17 00:00:00 2001
 From: Harry van Haaren <harry.van.haaren@intel.com>
 Date: Tue, 16 Jun 2020 17:56:03 +0100
 Subject: [PATCH] examples/eventdev: fix 32-bit coremask
 
+[ upstream commit ff0f1040b66edcbaf93fc217ea452e4a9ae424e2 ]
+
 This commit fixes a bug in 32-bit environments when a core mask greater
 than 32-bits is requested. The fix is to convert the bitmask logic to
 64 bits, aligning 64 and 32 bit implementations.
 
 Fixes: adb5d548 ("examples/eventdev_pipeline_sw_pmd: add sample app")
-Cc: stable@dpdk.org
 
 Reported-by: Jun W Zhou <junx.w.zhou@intel.com>
 Suggested-by: Mao Jiang <maox.jiang@intel.com>

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

* [dpdk-stable] patch 'event/octeontx2: fix device reconfigure' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (72 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'examples/eventdev: fix 32-bit coremask' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'event/octeontx2: fix sub event type' " luca.boccassi
                   ` (117 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From c3b33b6d91e2e795d16cd90ddb2f5d316ecc052d Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Mon, 29 Jun 2020 07:03:26 +0530
Subject: [PATCH] event/octeontx2: fix device reconfigure

[ upstream commit 8b787cba705323ba79e35e0f19bfba51ab6d953a ]

When event device is re-configured maintain the event queue to event port
links and event port status instead of resetting them.

Fixes: cd24e70258bd ("event/octeontx2: add device configure function")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/event/octeontx2/otx2_evdev.c | 60 +++++++++++++++++++++++-----
 1 file changed, 50 insertions(+), 10 deletions(-)

diff --git a/drivers/event/octeontx2/otx2_evdev.c b/drivers/event/octeontx2/otx2_evdev.c
index 2daeba42c..f7766812b 100644
--- a/drivers/event/octeontx2/otx2_evdev.c
+++ b/drivers/event/octeontx2/otx2_evdev.c
@@ -685,6 +685,46 @@ sso_clr_links(const struct rte_eventdev *event_dev)
 	}
 }
 
+static void
+sso_restore_links(const struct rte_eventdev *event_dev)
+{
+	struct otx2_sso_evdev *dev = sso_pmd_priv(event_dev);
+	uint16_t *links_map;
+	int i, j;
+
+	for (i = 0; i < dev->nb_event_ports; i++) {
+		links_map = event_dev->data->links_map;
+		/* Point links_map to this port specific area */
+		links_map += (i * RTE_EVENT_MAX_QUEUES_PER_DEV);
+		if (dev->dual_ws) {
+			struct otx2_ssogws_dual *ws;
+
+			ws = event_dev->data->ports[i];
+			for (j = 0; j < dev->nb_event_queues; j++) {
+				if (links_map[j] == 0xdead)
+					continue;
+				sso_port_link_modify((struct otx2_ssogws *)
+						&ws->ws_state[0], j, true);
+				sso_port_link_modify((struct otx2_ssogws *)
+						&ws->ws_state[1], j, true);
+				sso_func_trace("Restoring port %d queue %d "
+						"link", i, j);
+			}
+		} else {
+			struct otx2_ssogws *ws;
+
+			ws = event_dev->data->ports[i];
+			for (j = 0; j < dev->nb_event_queues; j++) {
+				if (links_map[j] == 0xdead)
+					continue;
+				sso_port_link_modify(ws, j, true);
+				sso_func_trace("Restoring port %d queue %d "
+						"link", i, j);
+			}
+		}
+	}
+}
+
 static void
 sso_set_port_ops(struct otx2_ssogws *ws, uintptr_t base)
 {
@@ -725,18 +765,15 @@ sso_configure_dual_ports(const struct rte_eventdev *event_dev)
 		struct otx2_ssogws_dual *ws;
 		uintptr_t base;
 
-		/* Free memory prior to re-allocation if needed */
 		if (event_dev->data->ports[i] != NULL) {
 			ws = event_dev->data->ports[i];
-			rte_free(ws);
-			ws = NULL;
-		}
-
-		/* Allocate event port memory */
-		ws = rte_zmalloc_socket("otx2_sso_ws",
+		} else {
+			/* Allocate event port memory */
+			ws = rte_zmalloc_socket("otx2_sso_ws",
 					sizeof(struct otx2_ssogws_dual),
 					RTE_CACHE_LINE_SIZE,
 					event_dev->data->socket_id);
+		}
 		if (ws == NULL) {
 			otx2_err("Failed to alloc memory for port=%d", i);
 			rc = -ENOMEM;
@@ -1021,8 +1058,11 @@ otx2_sso_configure(const struct rte_eventdev *event_dev)
 		return -EINVAL;
 	}
 
-	if (dev->configured)
+	if (dev->configured) {
 		sso_unregister_irqs(event_dev);
+		/* Clear any prior port-queue mapping. */
+		sso_clr_links(event_dev);
+	}
 
 	if (dev->nb_event_queues) {
 		/* Finit any previous queues. */
@@ -1057,8 +1097,8 @@ otx2_sso_configure(const struct rte_eventdev *event_dev)
 		goto teardown_hwggrp;
 	}
 
-	/* Clear any prior port-queue mapping. */
-	sso_clr_links(event_dev);
+	/* Restore any prior port-queue mapping. */
+	sso_restore_links(event_dev);
 	rc = sso_ggrp_alloc_xaq(dev);
 	if (rc < 0) {
 		otx2_err("Failed to alloc xaq to ggrp %d", rc);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.465454456 +0100
+++ 0075-event-octeontx2-fix-device-reconfigure.patch	2020-07-24 12:53:48.299006683 +0100
@@ -1,13 +1,14 @@
-From 8b787cba705323ba79e35e0f19bfba51ab6d953a Mon Sep 17 00:00:00 2001
+From c3b33b6d91e2e795d16cd90ddb2f5d316ecc052d Mon Sep 17 00:00:00 2001
 From: Pavan Nikhilesh <pbhagavatula@marvell.com>
 Date: Mon, 29 Jun 2020 07:03:26 +0530
 Subject: [PATCH] event/octeontx2: fix device reconfigure
 
+[ upstream commit 8b787cba705323ba79e35e0f19bfba51ab6d953a ]
+
 When event device is re-configured maintain the event queue to event port
 links and event port status instead of resetting them.
 
 Fixes: cd24e70258bd ("event/octeontx2: add device configure function")
-Cc: stable@dpdk.org
 
 Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
 ---
@@ -15,10 +16,10 @@
  1 file changed, 50 insertions(+), 10 deletions(-)
 
 diff --git a/drivers/event/octeontx2/otx2_evdev.c b/drivers/event/octeontx2/otx2_evdev.c
-index 630073de5..b8b57c388 100644
+index 2daeba42c..f7766812b 100644
 --- a/drivers/event/octeontx2/otx2_evdev.c
 +++ b/drivers/event/octeontx2/otx2_evdev.c
-@@ -725,6 +725,46 @@ sso_clr_links(const struct rte_eventdev *event_dev)
+@@ -685,6 +685,46 @@ sso_clr_links(const struct rte_eventdev *event_dev)
  	}
  }
  
@@ -65,7 +66,7 @@
  static void
  sso_set_port_ops(struct otx2_ssogws *ws, uintptr_t base)
  {
-@@ -765,18 +805,15 @@ sso_configure_dual_ports(const struct rte_eventdev *event_dev)
+@@ -725,18 +765,15 @@ sso_configure_dual_ports(const struct rte_eventdev *event_dev)
  		struct otx2_ssogws_dual *ws;
  		uintptr_t base;
  
@@ -88,7 +89,7 @@
  		if (ws == NULL) {
  			otx2_err("Failed to alloc memory for port=%d", i);
  			rc = -ENOMEM;
-@@ -1061,8 +1098,11 @@ otx2_sso_configure(const struct rte_eventdev *event_dev)
+@@ -1021,8 +1058,11 @@ otx2_sso_configure(const struct rte_eventdev *event_dev)
  		return -EINVAL;
  	}
  
@@ -101,7 +102,7 @@
  
  	if (dev->nb_event_queues) {
  		/* Finit any previous queues. */
-@@ -1097,8 +1137,8 @@ otx2_sso_configure(const struct rte_eventdev *event_dev)
+@@ -1057,8 +1097,8 @@ otx2_sso_configure(const struct rte_eventdev *event_dev)
  		goto teardown_hwggrp;
  	}
  

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

* [dpdk-stable] patch 'event/octeontx2: fix sub event type' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (73 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'event/octeontx2: fix device reconfigure' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'devtools: fix path in forbidden token check' " luca.boccassi
                   ` (116 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From f2e1decce9f0d3fae23a206c587a3cba8485eaa0 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Mon, 29 Jun 2020 07:03:27 +0530
Subject: [PATCH] event/octeontx2: fix sub event type

[ upstream commit 3c1a1c43cd93fa7c73a460d6f88ca5de7ca1e9c0 ]

In OCTEONTX2 event device we use sub_event_type to store the ethernet
port identifier when we receive work from OCTEONTX2 ethernet device.
This violates the event device spec as sub_event_type should be 0 in
the initial receive stage.
Set sub_event_type to 0 after copying the port id.

Fixes: 0fe4accd8ec8 ("event/octeontx2: add Rx adapter fastpath ops")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/event/octeontx2/otx2_worker_dual.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/event/octeontx2/otx2_worker_dual.h b/drivers/event/octeontx2/otx2_worker_dual.h
index 5134e3d52..fb6a8cd0d 100644
--- a/drivers/event/octeontx2/otx2_worker_dual.h
+++ b/drivers/event/octeontx2/otx2_worker_dual.h
@@ -69,8 +69,11 @@ otx2_ssogws_dual_get_work(struct otx2_ssogws_state *ws,
 
 	if (event.sched_type != SSO_TT_EMPTY &&
 	    event.event_type == RTE_EVENT_TYPE_ETHDEV) {
-		otx2_wqe_to_mbuf(get_work1, mbuf, event.sub_event_type,
-				 (uint32_t) event.get_work0, flags, lookup_mem);
+		uint8_t port = event.sub_event_type;
+
+		event.sub_event_type = 0;
+		otx2_wqe_to_mbuf(get_work1, mbuf, port,
+				 event.flow_id, flags, lookup_mem);
 		/* Extracting tstamp, if PTP enabled. CGX will prepend the
 		 * timestamp at starting of packet data and it can be derieved
 		 * from WQE 9 dword which corresponds to SG iova.
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.501030484 +0100
+++ 0076-event-octeontx2-fix-sub-event-type.patch	2020-07-24 12:53:48.299006683 +0100
@@ -1,8 +1,10 @@
-From 3c1a1c43cd93fa7c73a460d6f88ca5de7ca1e9c0 Mon Sep 17 00:00:00 2001
+From f2e1decce9f0d3fae23a206c587a3cba8485eaa0 Mon Sep 17 00:00:00 2001
 From: Pavan Nikhilesh <pbhagavatula@marvell.com>
 Date: Mon, 29 Jun 2020 07:03:27 +0530
 Subject: [PATCH] event/octeontx2: fix sub event type
 
+[ upstream commit 3c1a1c43cd93fa7c73a460d6f88ca5de7ca1e9c0 ]
+
 In OCTEONTX2 event device we use sub_event_type to store the ethernet
 port identifier when we receive work from OCTEONTX2 ethernet device.
 This violates the event device spec as sub_event_type should be 0 in
@@ -10,7 +12,6 @@
 Set sub_event_type to 0 after copying the port id.
 
 Fixes: 0fe4accd8ec8 ("event/octeontx2: add Rx adapter fastpath ops")
-Cc: stable@dpdk.org
 
 Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
 ---
@@ -18,10 +19,10 @@
  1 file changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/event/octeontx2/otx2_worker_dual.h b/drivers/event/octeontx2/otx2_worker_dual.h
-index c88420eb4..60aa14cca 100644
+index 5134e3d52..fb6a8cd0d 100644
 --- a/drivers/event/octeontx2/otx2_worker_dual.h
 +++ b/drivers/event/octeontx2/otx2_worker_dual.h
-@@ -65,8 +65,11 @@ otx2_ssogws_dual_get_work(struct otx2_ssogws_state *ws,
+@@ -69,8 +69,11 @@ otx2_ssogws_dual_get_work(struct otx2_ssogws_state *ws,
  
  	if (event.sched_type != SSO_TT_EMPTY &&
  	    event.event_type == RTE_EVENT_TYPE_ETHDEV) {

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

* [dpdk-stable] patch 'devtools: fix path in forbidden token check' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (74 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'event/octeontx2: fix sub event type' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'sched: fix port time rounding' " luca.boccassi
                   ` (115 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From d1d309474c4b718655da73d6330cced02d4bd6bf Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 6 Jul 2020 10:00:21 +0200
Subject: [PATCH] devtools: fix path in forbidden token check

[ upstream commit 8d4a222e12f8ce99714fad5011d76bd6a38c36e3 ]

Fix displayed filename by adjusting the extraction from the patch.

Before:
Warning in /lib/librte_eal/linux/eal.c:

After:
Warning in lib/librte_eal/linux/eal.c:

Fixes: 7413e7f2aeb3 ("devtools: alert on new calls to exit from libs")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 devtools/check-forbidden-tokens.awk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/devtools/check-forbidden-tokens.awk b/devtools/check-forbidden-tokens.awk
index 8c89de3d4..f86cbe8dc 100755
--- a/devtools/check-forbidden-tokens.awk
+++ b/devtools/check-forbidden-tokens.awk
@@ -62,7 +62,7 @@ BEGIN {
 }
 END {
 	if (count > 0) {
-		print "Warning in " substr(last_file,6) ":"
+		print "Warning in " substr(last_file,7) ":"
 		print MESSAGE
 		exit RET_ON_FAIL
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.535683292 +0100
+++ 0077-devtools-fix-path-in-forbidden-token-check.patch	2020-07-24 12:53:48.299006683 +0100
@@ -1,8 +1,10 @@
-From 8d4a222e12f8ce99714fad5011d76bd6a38c36e3 Mon Sep 17 00:00:00 2001
+From d1d309474c4b718655da73d6330cced02d4bd6bf Mon Sep 17 00:00:00 2001
 From: David Marchand <david.marchand@redhat.com>
 Date: Mon, 6 Jul 2020 10:00:21 +0200
 Subject: [PATCH] devtools: fix path in forbidden token check
 
+[ upstream commit 8d4a222e12f8ce99714fad5011d76bd6a38c36e3 ]
+
 Fix displayed filename by adjusting the extraction from the patch.
 
 Before:
@@ -12,7 +14,6 @@
 Warning in lib/librte_eal/linux/eal.c:
 
 Fixes: 7413e7f2aeb3 ("devtools: alert on new calls to exit from libs")
-Cc: stable@dpdk.org
 
 Signed-off-by: David Marchand <david.marchand@redhat.com>
 ---

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

* [dpdk-stable] patch 'sched: fix port time rounding' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (75 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'devtools: fix path in forbidden token check' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'lib: remind experimental status in headers' " luca.boccassi
                   ` (114 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Alan Dewar; +Cc: Jasvinder Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 7dfa5c18513abc6734cd47c0ce4851456d09c255 Mon Sep 17 00:00:00 2001
From: Alan Dewar <alan.dewar@att.com>
Date: Thu, 25 Jun 2020 10:59:30 +0100
Subject: [PATCH] sched: fix port time rounding

[ upstream commit 83415d4fd88c925002655aa755601998a3cdef2c ]

The QoS scheduler works off port time that is computed from the number
of CPU cycles that have elapsed since the last time the port was
polled.   It divides the number of elapsed cycles to calculate how
many bytes can be sent, however this division can generate rounding
errors, where some fraction of a byte sent may be lost.

Lose enough of these fractional bytes and the QoS scheduler
underperforms.  The problem is worse with low bandwidths.

To compensate for this rounding error this fix doesn't advance the
port's time_cpu_cycles by the number of cycles that have elapsed,
but by multiplying the computed number of bytes that can be sent
(which has been rounded down) by number of cycles per byte.
This will mean that port's time_cpu_cycles will lag behind the CPU
cycles momentarily.  At the next poll, the lag will be taken into
account.

Fixes: de3cfa2c98 ("sched: initial import")

Signed-off-by: Alan Dewar <alan.dewar@att.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
 lib/librte_sched/rte_sched.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c
index 68a171b50..0fa074166 100644
--- a/lib/librte_sched/rte_sched.c
+++ b/lib/librte_sched/rte_sched.c
@@ -222,6 +222,7 @@ struct rte_sched_port {
 	uint64_t time_cpu_bytes;      /* Current CPU time measured in bytes */
 	uint64_t time;                /* Current NIC TX time measured in bytes */
 	struct rte_reciprocal inv_cycles_per_byte; /* CPU cycles per byte */
+	uint64_t cycles_per_byte;
 
 	/* Grinders */
 	struct rte_mbuf **pkts_out;
@@ -852,6 +853,7 @@ rte_sched_port_config(struct rte_sched_port_params *params)
 	cycles_per_byte = (rte_get_tsc_hz() << RTE_SCHED_TIME_SHIFT)
 		/ params->rate;
 	port->inv_cycles_per_byte = rte_reciprocal_value(cycles_per_byte);
+	port->cycles_per_byte = cycles_per_byte;
 
 	/* Grinders */
 	port->pkts_out = NULL;
@@ -2673,16 +2675,21 @@ static inline void
 rte_sched_port_time_resync(struct rte_sched_port *port)
 {
 	uint64_t cycles = rte_get_tsc_cycles();
-	uint64_t cycles_diff = cycles - port->time_cpu_cycles;
+	uint64_t cycles_diff;
 	uint64_t bytes_diff;
 	uint32_t i;
 
+	if (cycles < port->time_cpu_cycles)
+		port->time_cpu_cycles = 0;
+
+	cycles_diff = cycles - port->time_cpu_cycles;
 	/* Compute elapsed time in bytes */
 	bytes_diff = rte_reciprocal_divide(cycles_diff << RTE_SCHED_TIME_SHIFT,
 					   port->inv_cycles_per_byte);
 
 	/* Advance port time */
-	port->time_cpu_cycles = cycles;
+	port->time_cpu_cycles +=
+		(bytes_diff * port->cycles_per_byte) >> RTE_SCHED_TIME_SHIFT;
 	port->time_cpu_bytes += bytes_diff;
 	if (port->time < port->time_cpu_bytes)
 		port->time = port->time_cpu_bytes;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.570962574 +0100
+++ 0078-sched-fix-port-time-rounding.patch	2020-07-24 12:53:48.303006758 +0100
@@ -1,8 +1,10 @@
-From 83415d4fd88c925002655aa755601998a3cdef2c Mon Sep 17 00:00:00 2001
+From 7dfa5c18513abc6734cd47c0ce4851456d09c255 Mon Sep 17 00:00:00 2001
 From: Alan Dewar <alan.dewar@att.com>
 Date: Thu, 25 Jun 2020 10:59:30 +0100
 Subject: [PATCH] sched: fix port time rounding
 
+[ upstream commit 83415d4fd88c925002655aa755601998a3cdef2c ]
+
 The QoS scheduler works off port time that is computed from the number
 of CPU cycles that have elapsed since the last time the port was
 polled.   It divides the number of elapsed cycles to calculate how
@@ -21,7 +23,6 @@
 account.
 
 Fixes: de3cfa2c98 ("sched: initial import")
-Cc: stable@dpdk.org
 
 Signed-off-by: Alan Dewar <alan.dewar@att.com>
 Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>

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

* [dpdk-stable] patch 'lib: remind experimental status in headers' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (76 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'sched: fix port time rounding' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'rawdev: remove remaining experimental tags' " luca.boccassi
                   ` (113 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From e2acbb7f711e0080871bf935b36c28d481411c7d Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 26 Jun 2020 10:16:38 +0200
Subject: [PATCH] lib: remind experimental status in headers

[ upstream commit 74f4d6424da1297bd6e83dcb7bd84444ca8c59dd ]

The following libraries are experimental, all of their functions can
be changed or removed:

- librte_bbdev
- librte_bpf
- librte_compressdev
- librte_fib
- librte_flow_classify
- librte_graph
- librte_ipsec
- librte_node
- librte_rcu
- librte_rib
- librte_stack
- librte_telemetry

Their status is properly announced in MAINTAINERS.
Remind this status in their headers in a common fashion (aligned to ABI
docs).

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/contributing/abi_policy.rst       | 12 +++++-------
 lib/librte_bbdev/rte_bbdev.h                 |  3 ++-
 lib/librte_bpf/rte_bpf.h                     |  6 +++++-
 lib/librte_compressdev/rte_compressdev.h     |  6 +++++-
 lib/librte_fib/rte_fib.h                     |  7 +++++++
 lib/librte_fib/rte_fib6.h                    |  7 +++++++
 lib/librte_flow_classify/rte_flow_classify.h |  6 ++++--
 lib/librte_ipsec/rte_ipsec.h                 |  6 +++++-
 lib/librte_rcu/rte_rcu_qsbr.h                |  7 ++++++-
 lib/librte_rib/rte_rib.h                     |  7 +++++++
 lib/librte_rib/rte_rib6.h                    |  7 +++++++
 lib/librte_stack/rte_stack.h                 |  7 +++++--
 lib/librte_telemetry/rte_telemetry.h         |  7 ++++++-
 13 files changed, 71 insertions(+), 17 deletions(-)

diff --git a/doc/guides/contributing/abi_policy.rst b/doc/guides/contributing/abi_policy.rst
index 2198519d9..87942c8ac 100644
--- a/doc/guides/contributing/abi_policy.rst
+++ b/doc/guides/contributing/abi_policy.rst
@@ -27,8 +27,8 @@ General Guidelines
 #. The removal of symbols is considered an :ref:`ABI breakage <abi_breakages>`,
    once approved these will form part of the next ABI version.
 #. Libraries or APIs marked as :ref:`experimental <experimental_apis>` may
-   change without constraint, as they are not considered part of an ABI version.
-   Experimental libraries have the major ABI version ``0``.
+   be changed or removed without prior notice, as they are not considered part
+   of an ABI version.
 #. Updates to the :ref:`minimum hardware requirements <hw_rqmts>`, which drop
    support for hardware which was previously supported, should be treated as an
    ABI change.
@@ -289,7 +289,7 @@ APIs
 ~~~~
 
 APIs marked as ``experimental`` are not considered part of an ABI version and
-may change without warning at any time. Since changes to APIs are most likely
+may be changed or removed without prior notice. Since changes to APIs are most likely
 immediately after their introduction, as users begin to take advantage of those
 new APIs and start finding issues with them, new DPDK APIs will be automatically
 marked as ``experimental`` to allow for a period of stabilization before they
@@ -320,7 +320,5 @@ Libraries
 ~~~~~~~~~
 
 Libraries marked as ``experimental`` are entirely not considered part of an ABI
-version, and may change without warning at any time. Experimental libraries
-always have a major ABI version of ``0`` to indicate they exist outside of
-:ref:`abi_versioning` , with the minor version incremented with each ABI change
-to library.
+version.
+All functions in such libraries may be changed or removed without prior notice.
diff --git a/lib/librte_bbdev/rte_bbdev.h b/lib/librte_bbdev/rte_bbdev.h
index 1f58a0762..6fcf44826 100644
--- a/lib/librte_bbdev/rte_bbdev.h
+++ b/lib/librte_bbdev/rte_bbdev.h
@@ -11,7 +11,8 @@
  * Wireless base band device abstraction APIs.
  *
  * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
+ * @b EXPERIMENTAL:
+ * All functions in this file may be changed or removed without prior notice.
  *
  * This API allows an application to discover, configure and use a device to
  * process operations. An asynchronous API (enqueue, followed by later dequeue)
diff --git a/lib/librte_bpf/rte_bpf.h b/lib/librte_bpf/rte_bpf.h
index cbf1cddac..e2d419b4e 100644
--- a/lib/librte_bpf/rte_bpf.h
+++ b/lib/librte_bpf/rte_bpf.h
@@ -7,9 +7,13 @@
 
 /**
  * @file rte_bpf.h
- * @b EXPERIMENTAL: this API may change without prior notice
  *
  * RTE BPF support.
+ *
+ * @warning
+ * @b EXPERIMENTAL:
+ * All functions in this file may be changed or removed without prior notice.
+ *
  * librte_bpf provides a framework to load and execute eBPF bytecode
  * inside user-space dpdk based applications.
  * It supports basic set of features from eBPF spec
diff --git a/lib/librte_compressdev/rte_compressdev.h b/lib/librte_compressdev/rte_compressdev.h
index 8052efe67..2840c27c6 100644
--- a/lib/librte_compressdev/rte_compressdev.h
+++ b/lib/librte_compressdev/rte_compressdev.h
@@ -8,7 +8,11 @@
 /**
  * @file rte_compressdev.h
  *
- * RTE Compression Device APIs
+ * RTE Compression Device APIs.
+ *
+ * @warning
+ * @b EXPERIMENTAL:
+ * All functions in this file may be changed or removed without prior notice.
  *
  * Defines comp device APIs for the provisioning of compression operations.
  */
diff --git a/lib/librte_fib/rte_fib.h b/lib/librte_fib/rte_fib.h
index af3bbf07e..84ee774d2 100644
--- a/lib/librte_fib/rte_fib.h
+++ b/lib/librte_fib/rte_fib.h
@@ -8,6 +8,13 @@
 
 /**
  * @file
+ *
+ * RTE FIB library.
+ *
+ * @warning
+ * @b EXPERIMENTAL:
+ * All functions in this file may be changed or removed without prior notice.
+ *
  * FIB (Forwarding information base) implementation
  * for IPv4 Longest Prefix Match
  */
diff --git a/lib/librte_fib/rte_fib6.h b/lib/librte_fib/rte_fib6.h
index 66c71c84c..bbfcf23a8 100644
--- a/lib/librte_fib/rte_fib6.h
+++ b/lib/librte_fib/rte_fib6.h
@@ -8,6 +8,13 @@
 
 /**
  * @file
+ *
+ * RTE FIB6 library.
+ *
+ * @warning
+ * @b EXPERIMENTAL:
+ * All functions in this file may be changed or removed without prior notice.
+ *
  * FIB (Forwarding information base) implementation
  * for IPv6 Longest Prefix Match
  */
diff --git a/lib/librte_flow_classify/rte_flow_classify.h b/lib/librte_flow_classify/rte_flow_classify.h
index 74d1ecaf5..82ea92b6a 100644
--- a/lib/librte_flow_classify/rte_flow_classify.h
+++ b/lib/librte_flow_classify/rte_flow_classify.h
@@ -8,9 +8,11 @@
 /**
  * @file
  *
- * RTE Flow Classify Library
+ * RTE Flow Classify Library.
  *
- * @b EXPERIMENTAL: this API may change without prior notice
+ * @warning
+ * @b EXPERIMENTAL:
+ * All functions in this file may be changed or removed without prior notice.
  *
  * This library provides flow record information with some measured properties.
  *
diff --git a/lib/librte_ipsec/rte_ipsec.h b/lib/librte_ipsec/rte_ipsec.h
index f3b1f936b..f2da7ace9 100644
--- a/lib/librte_ipsec/rte_ipsec.h
+++ b/lib/librte_ipsec/rte_ipsec.h
@@ -7,9 +7,13 @@
 
 /**
  * @file rte_ipsec.h
- * @b EXPERIMENTAL: this API may change without prior notice
  *
  * RTE IPsec support.
+ *
+ * @warning
+ * @b EXPERIMENTAL:
+ * All functions in this file may be changed or removed without prior notice.
+ *
  * librte_ipsec provides a framework for data-path IPsec protocol
  * processing (ESP/AH).
  */
diff --git a/lib/librte_rcu/rte_rcu_qsbr.h b/lib/librte_rcu/rte_rcu_qsbr.h
index 0b5585925..078de261f 100644
--- a/lib/librte_rcu/rte_rcu_qsbr.h
+++ b/lib/librte_rcu/rte_rcu_qsbr.h
@@ -7,7 +7,12 @@
 
 /**
  * @file
- * RTE Quiescent State Based Reclamation (QSBR)
+ *
+ * RTE Quiescent State Based Reclamation (QSBR).
+ *
+ * @warning
+ * @b EXPERIMENTAL:
+ * All functions in this file may be changed or removed without prior notice.
  *
  * Quiescent State (QS) is any point in the thread execution
  * where the thread does not hold a reference to a data structure
diff --git a/lib/librte_rib/rte_rib.h b/lib/librte_rib/rte_rib.h
index 6b70de980..da558c417 100644
--- a/lib/librte_rib/rte_rib.h
+++ b/lib/librte_rib/rte_rib.h
@@ -8,6 +8,13 @@
 
 /**
  * @file
+ *
+ * RTE RIB library.
+ *
+ * @warning
+ * @b EXPERIMENTAL:
+ * All functions in this file may be changed or removed without prior notice.
+ *
  * Level compressed tree implementation for IPv4 Longest Prefix Match
  */
 
diff --git a/lib/librte_rib/rte_rib6.h b/lib/librte_rib/rte_rib6.h
index 871457138..4b284c913 100644
--- a/lib/librte_rib/rte_rib6.h
+++ b/lib/librte_rib/rte_rib6.h
@@ -8,6 +8,13 @@
 
 /**
  * @file
+ *
+ * RTE rib6 library.
+ *
+ * @warning
+ * @b EXPERIMENTAL:
+ * All functions in this file may be changed or removed without prior notice.
+ *
  * Level compressed tree implementation for IPv6 Longest Prefix Match
  */
 
diff --git a/lib/librte_stack/rte_stack.h b/lib/librte_stack/rte_stack.h
index 27ddb199e..abf642076 100644
--- a/lib/librte_stack/rte_stack.h
+++ b/lib/librte_stack/rte_stack.h
@@ -4,9 +4,12 @@
 
 /**
  * @file rte_stack.h
- * @b EXPERIMENTAL: this API may change without prior notice
  *
- * RTE Stack
+ * RTE Stack.
+ *
+ * @warning
+ * @b EXPERIMENTAL:
+ * All functions in this file may be changed or removed without prior notice.
  *
  * librte_stack provides an API for configuration and use of a bounded stack of
  * pointers. Push and pop operations are MT-safe, allowing concurrent access,
diff --git a/lib/librte_telemetry/rte_telemetry.h b/lib/librte_telemetry/rte_telemetry.h
index aedb31859..f1376ea35 100644
--- a/lib/librte_telemetry/rte_telemetry.h
+++ b/lib/librte_telemetry/rte_telemetry.h
@@ -9,7 +9,12 @@
 
 /**
  * @file
- * RTE Telemetry
+ *
+ * RTE Telemetry.
+ *
+ * @warning
+ * @b EXPERIMENTAL:
+ * All functions in this file may be changed or removed without prior notice.
  *
  * The telemetry library provides a method to retrieve statistics from
  * DPDK by sending a JSON encoded message over a socket. DPDK will send
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.608482723 +0100
+++ 0079-lib-remind-experimental-status-in-headers.patch	2020-07-24 12:53:48.307006832 +0100
@@ -1,8 +1,10 @@
-From 74f4d6424da1297bd6e83dcb7bd84444ca8c59dd Mon Sep 17 00:00:00 2001
+From e2acbb7f711e0080871bf935b36c28d481411c7d Mon Sep 17 00:00:00 2001
 From: David Marchand <david.marchand@redhat.com>
 Date: Fri, 26 Jun 2020 10:16:38 +0200
 Subject: [PATCH] lib: remind experimental status in headers
 
+[ upstream commit 74f4d6424da1297bd6e83dcb7bd84444ca8c59dd ]
+
 The following libraries are experimental, all of their functions can
 be changed or removed:
 
@@ -23,45 +25,40 @@
 Remind this status in their headers in a common fashion (aligned to ABI
 docs).
 
-Cc: stable@dpdk.org
-
 Signed-off-by: David Marchand <david.marchand@redhat.com>
 Acked-by: Bruce Richardson <bruce.richardson@intel.com>
 ---
- doc/guides/contributing/abi_policy.rst       |  8 +++++---
+ doc/guides/contributing/abi_policy.rst       | 12 +++++-------
  lib/librte_bbdev/rte_bbdev.h                 |  3 ++-
  lib/librte_bpf/rte_bpf.h                     |  6 +++++-
  lib/librte_compressdev/rte_compressdev.h     |  6 +++++-
  lib/librte_fib/rte_fib.h                     |  7 +++++++
  lib/librte_fib/rte_fib6.h                    |  7 +++++++
  lib/librte_flow_classify/rte_flow_classify.h |  6 ++++--
- lib/librte_graph/rte_graph.h                 |  3 ++-
- lib/librte_graph/rte_graph_worker.h          |  3 ++-
  lib/librte_ipsec/rte_ipsec.h                 |  6 +++++-
- lib/librte_node/rte_node_eth_api.h           |  3 ++-
- lib/librte_node/rte_node_ip4_api.h           |  3 ++-
  lib/librte_rcu/rte_rcu_qsbr.h                |  7 ++++++-
  lib/librte_rib/rte_rib.h                     |  7 +++++++
  lib/librte_rib/rte_rib6.h                    |  7 +++++++
  lib/librte_stack/rte_stack.h                 |  7 +++++--
- lib/librte_telemetry/rte_telemetry.h         | 10 ++++++----
- 17 files changed, 79 insertions(+), 20 deletions(-)
+ lib/librte_telemetry/rte_telemetry.h         |  7 ++++++-
+ 13 files changed, 71 insertions(+), 17 deletions(-)
 
 diff --git a/doc/guides/contributing/abi_policy.rst b/doc/guides/contributing/abi_policy.rst
-index 1b2fa2786..d0affa9e6 100644
+index 2198519d9..87942c8ac 100644
 --- a/doc/guides/contributing/abi_policy.rst
 +++ b/doc/guides/contributing/abi_policy.rst
-@@ -27,7 +27,8 @@ General Guidelines
+@@ -27,8 +27,8 @@ General Guidelines
  #. The removal of symbols is considered an :ref:`ABI breakage <abi_breakages>`,
     once approved these will form part of the next ABI version.
  #. Libraries or APIs marked as :ref:`experimental <experimental_apis>` may
 -   change without constraint, as they are not considered part of an ABI version.
+-   Experimental libraries have the major ABI version ``0``.
 +   be changed or removed without prior notice, as they are not considered part
 +   of an ABI version.
  #. Updates to the :ref:`minimum hardware requirements <hw_rqmts>`, which drop
     support for hardware which was previously supported, should be treated as an
     ABI change.
-@@ -294,7 +295,7 @@ APIs
+@@ -289,7 +289,7 @@ APIs
  ~~~~
  
  APIs marked as ``experimental`` are not considered part of an ABI version and
@@ -70,15 +67,18 @@
  immediately after their introduction, as users begin to take advantage of those
  new APIs and start finding issues with them, new DPDK APIs will be automatically
  marked as ``experimental`` to allow for a period of stabilization before they
-@@ -330,4 +331,5 @@ Libraries
+@@ -320,7 +320,5 @@ Libraries
  ~~~~~~~~~
  
  Libraries marked as ``experimental`` are entirely not considered part of an ABI
--version, and may change without warning at any time.
+-version, and may change without warning at any time. Experimental libraries
+-always have a major ABI version of ``0`` to indicate they exist outside of
+-:ref:`abi_versioning` , with the minor version incremented with each ABI change
+-to library.
 +version.
 +All functions in such libraries may be changed or removed without prior notice.
 diff --git a/lib/librte_bbdev/rte_bbdev.h b/lib/librte_bbdev/rte_bbdev.h
-index ecd95a823..57291373f 100644
+index 1f58a0762..6fcf44826 100644
 --- a/lib/librte_bbdev/rte_bbdev.h
 +++ b/lib/librte_bbdev/rte_bbdev.h
 @@ -11,7 +11,8 @@
@@ -181,36 +181,8 @@
   *
   * This library provides flow record information with some measured properties.
   *
-diff --git a/lib/librte_graph/rte_graph.h b/lib/librte_graph/rte_graph.h
-index 9a26ffc18..b32c4bc21 100644
---- a/lib/librte_graph/rte_graph.h
-+++ b/lib/librte_graph/rte_graph.h
-@@ -9,7 +9,8 @@
-  * @file rte_graph.h
-  *
-  * @warning
-- * @b EXPERIMENTAL: this API may change without prior notice
-+ * @b EXPERIMENTAL:
-+ * All functions in this file may be changed or removed without prior notice.
-  *
-  * Graph architecture abstracts the data processing functions as
-  * "node" and "link" them together to create a complex "graph" to enable
-diff --git a/lib/librte_graph/rte_graph_worker.h b/lib/librte_graph/rte_graph_worker.h
-index 4c3ddcbde..eef77f732 100644
---- a/lib/librte_graph/rte_graph_worker.h
-+++ b/lib/librte_graph/rte_graph_worker.h
-@@ -9,7 +9,8 @@
-  * @file rte_graph_worker.h
-  *
-  * @warning
-- * @b EXPERIMENTAL: this API may change without prior notice
-+ * @b EXPERIMENTAL:
-+ * All functions in this file may be changed or removed without prior notice.
-  *
-  * This API allows a worker thread to walk over a graph and nodes to create,
-  * process, enqueue and move streams of objects to the next nodes.
 diff --git a/lib/librte_ipsec/rte_ipsec.h b/lib/librte_ipsec/rte_ipsec.h
-index 6666cf761..de05f4e93 100644
+index f3b1f936b..f2da7ace9 100644
 --- a/lib/librte_ipsec/rte_ipsec.h
 +++ b/lib/librte_ipsec/rte_ipsec.h
 @@ -7,9 +7,13 @@
@@ -228,36 +200,8 @@
   * librte_ipsec provides a framework for data-path IPsec protocol
   * processing (ESP/AH).
   */
-diff --git a/lib/librte_node/rte_node_eth_api.h b/lib/librte_node/rte_node_eth_api.h
-index e9a53afe5..4e28f86d7 100644
---- a/lib/librte_node/rte_node_eth_api.h
-+++ b/lib/librte_node/rte_node_eth_api.h
-@@ -9,7 +9,8 @@
-  * @file rte_node_eth_api.h
-  *
-  * @warning
-- * @b EXPERIMENTAL: this API may change without prior notice
-+ * @b EXPERIMENTAL:
-+ * All functions in this file may be changed or removed without prior notice.
-  *
-  * This API allows to setup ethdev_rx and ethdev_tx nodes
-  * and its queue associations.
-diff --git a/lib/librte_node/rte_node_ip4_api.h b/lib/librte_node/rte_node_ip4_api.h
-index 31a752b00..eb9ebd5f8 100644
---- a/lib/librte_node/rte_node_ip4_api.h
-+++ b/lib/librte_node/rte_node_ip4_api.h
-@@ -9,7 +9,8 @@
-  * @file rte_node_ip4_api.h
-  *
-  * @warning
-- * @b EXPERIMENTAL: this API may change without prior notice
-+ * @b EXPERIMENTAL:
-+ * All functions in this file may be changed or removed without prior notice.
-  *
-  * This API allows to do control path functions of ip4_* nodes
-  * like ip4_lookup, ip4_rewrite.
 diff --git a/lib/librte_rcu/rte_rcu_qsbr.h b/lib/librte_rcu/rte_rcu_qsbr.h
-index fd4eb52b7..a98e8f0f8 100644
+index 0b5585925..078de261f 100644
 --- a/lib/librte_rcu/rte_rcu_qsbr.h
 +++ b/lib/librte_rcu/rte_rcu_qsbr.h
 @@ -7,7 +7,12 @@
@@ -330,16 +274,12 @@
   * librte_stack provides an API for configuration and use of a bounded stack of
   * pointers. Push and pop operations are MT-safe, allowing concurrent access,
 diff --git a/lib/librte_telemetry/rte_telemetry.h b/lib/librte_telemetry/rte_telemetry.h
-index eb7f2c917..d13010b8f 100644
+index aedb31859..f1376ea35 100644
 --- a/lib/librte_telemetry/rte_telemetry.h
 +++ b/lib/librte_telemetry/rte_telemetry.h
-@@ -20,11 +20,13 @@
- #define RTE_TEL_MAX_ARRAY_ENTRIES 512
+@@ -9,7 +9,12 @@
  
  /**
-- * @warning
-- * @b EXPERIMENTAL: all functions in this file may change without prior notice
-- *
   * @file
 - * RTE Telemetry
 + *
@@ -350,7 +290,7 @@
 + * All functions in this file may be changed or removed without prior notice.
   *
   * The telemetry library provides a method to retrieve statistics from
-  * DPDK by sending a request message over a socket. DPDK will send
+  * DPDK by sending a JSON encoded message over a socket. DPDK will send
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'rawdev: remove remaining experimental tags' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (77 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'lib: remind experimental status in headers' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'eal/armv8: fix timer frequency calibration with PMU' " luca.boccassi
                   ` (112 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Hemant Agrawal
  Cc: Thomas Monjalon, Ferruh Yigit, David Marchand, Shreyansh Jain,
	Nipun Gupta, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 9af164a1f46ec71e276e10abbb4d0b71c5ef1c00 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Tue, 7 Jul 2020 14:24:07 +0530
Subject: [PATCH] rawdev: remove remaining experimental tags

[ upstream commit c843fca96c849bd85204707e791accb57adb9e59 ]

The experimental tags were removed, but the comment
is still having API classification as EXPERIMENTAL

Fixes: 931cc531aad2 ("rawdev: remove experimental tag")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 MAINTAINERS                        | 4 ++--
 lib/librte_rawdev/rte_rawdev.h     | 3 ---
 lib/librte_rawdev/rte_rawdev_pmd.h | 3 ---
 3 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 10c4e1a61..98c0dd060 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -456,8 +456,8 @@ F: lib/librte_eventdev/*crypto_adapter*
 F: app/test/test_event_crypto_adapter.c
 F: doc/guides/prog_guide/event_crypto_adapter.rst
 
-Raw device API - EXPERIMENTAL
-M: Shreyansh Jain <shreyansh.jain@nxp.com>
+Raw device API
+M: Nipun Gupta <nipun.gupta@nxp.com>
 M: Hemant Agrawal <hemant.agrawal@nxp.com>
 F: lib/librte_rawdev/
 F: drivers/raw/skeleton/
diff --git a/lib/librte_rawdev/rte_rawdev.h b/lib/librte_rawdev/rte_rawdev.h
index ed011ca22..7a1f3213e 100644
--- a/lib/librte_rawdev/rte_rawdev.h
+++ b/lib/librte_rawdev/rte_rawdev.h
@@ -12,9 +12,6 @@
  *
  * This API allow applications to configure and use generic devices having
  * no specific type already available in DPDK.
- *
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
  */
 
 #ifdef __cplusplus
diff --git a/lib/librte_rawdev/rte_rawdev_pmd.h b/lib/librte_rawdev/rte_rawdev_pmd.h
index cb3555ab5..4395a2182 100644
--- a/lib/librte_rawdev/rte_rawdev_pmd.h
+++ b/lib/librte_rawdev/rte_rawdev_pmd.h
@@ -11,9 +11,6 @@
  * @note
  * Driver facing APIs for a raw device. These are not to be called directly by
  * any application.
- *
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
  */
 
 #ifdef __cplusplus
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.651928290 +0100
+++ 0080-rawdev-remove-remaining-experimental-tags.patch	2020-07-24 12:53:48.307006832 +0100
@@ -1,37 +1,40 @@
-From c843fca96c849bd85204707e791accb57adb9e59 Mon Sep 17 00:00:00 2001
+From 9af164a1f46ec71e276e10abbb4d0b71c5ef1c00 Mon Sep 17 00:00:00 2001
 From: Hemant Agrawal <hemant.agrawal@nxp.com>
 Date: Tue, 7 Jul 2020 14:24:07 +0530
 Subject: [PATCH] rawdev: remove remaining experimental tags
 
+[ upstream commit c843fca96c849bd85204707e791accb57adb9e59 ]
+
 The experimental tags were removed, but the comment
 is still having API classification as EXPERIMENTAL
 
 Fixes: 931cc531aad2 ("rawdev: remove experimental tag")
-Cc: stable@dpdk.org
 
 Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
 Acked-by: Thomas Monjalon <thomas@monjalon.net>
 Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
 Acked-by: David Marchand <david.marchand@redhat.com>
 ---
- MAINTAINERS                        | 2 +-
+ MAINTAINERS                        | 4 ++--
  lib/librte_rawdev/rte_rawdev.h     | 3 ---
  lib/librte_rawdev/rte_rawdev_pmd.h | 3 ---
- 3 files changed, 1 insertion(+), 7 deletions(-)
+ 3 files changed, 2 insertions(+), 8 deletions(-)
 
 diff --git a/MAINTAINERS b/MAINTAINERS
-index 27fcd6d64..6ba02d73a 100644
+index 10c4e1a61..98c0dd060 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -490,7 +490,7 @@ F: lib/librte_eventdev/*crypto_adapter*
+@@ -456,8 +456,8 @@ F: lib/librte_eventdev/*crypto_adapter*
  F: app/test/test_event_crypto_adapter.c
  F: doc/guides/prog_guide/event_crypto_adapter.rst
  
 -Raw device API - EXPERIMENTAL
+-M: Shreyansh Jain <shreyansh.jain@nxp.com>
 +Raw device API
- M: Nipun Gupta <nipun.gupta@nxp.com>
++M: Nipun Gupta <nipun.gupta@nxp.com>
  M: Hemant Agrawal <hemant.agrawal@nxp.com>
  F: lib/librte_rawdev/
+ F: drivers/raw/skeleton/
 diff --git a/lib/librte_rawdev/rte_rawdev.h b/lib/librte_rawdev/rte_rawdev.h
 index ed011ca22..7a1f3213e 100644
 --- a/lib/librte_rawdev/rte_rawdev.h

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

* [dpdk-stable] patch 'eal/armv8: fix timer frequency calibration with PMU' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (78 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'rawdev: remove remaining experimental tags' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'eal: fix lcore accessors for non-EAL threads' " luca.boccassi
                   ` (111 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Honnappa Nagarahalli
  Cc: Ruifeng Wang, Dharmik Thakkar, Phil Yang, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 9fd723070318d14eef5b7b5c535a29956e861e36 Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Fri, 26 Jun 2020 15:35:01 -0500
Subject: [PATCH] eal/armv8: fix timer frequency calibration with PMU

[ upstream commit 97c910139baf007b729388b0c3c24b894e4b6d3e ]

get_tsc_freq uses 'nanosleep' system call to calculate the CPU
frequency. However, 'nanosleep' results in the process getting
un-scheduled. The kernel saves and restores the PMU state. This
ensures that the PMU cycles are not counted towards a sleeping
process. When RTE_ARM_EAL_RDTSC_USE_PMU is defined, this results
in incorrect CPU frequency calculation. This logic is replaced
with generic counter based loop.

Bugzilla ID: 450
Fixes: f91bcbb2d9a6 ("eal/armv8: use high-resolution cycle counter")

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 lib/librte_eal/common/arch/arm/rte_cycles.c   | 27 +++++++++--
 .../common/include/arch/arm/rte_cycles_64.h   | 45 ++++++++++++++++---
 2 files changed, 63 insertions(+), 9 deletions(-)

diff --git a/lib/librte_eal/common/arch/arm/rte_cycles.c b/lib/librte_eal/common/arch/arm/rte_cycles.c
index 3500d523e..5bd29b24b 100644
--- a/lib/librte_eal/common/arch/arm/rte_cycles.c
+++ b/lib/librte_eal/common/arch/arm/rte_cycles.c
@@ -3,14 +3,35 @@
  */
 
 #include "eal_private.h"
+#include "rte_cycles.h"
 
 uint64_t
 get_tsc_freq_arch(void)
 {
 #if defined RTE_ARCH_ARM64 && !defined RTE_ARM_EAL_RDTSC_USE_PMU
-	uint64_t freq;
-	asm volatile("mrs %0, cntfrq_el0" : "=r" (freq));
-	return freq;
+	return __rte_arm64_cntfrq();
+#elif defined RTE_ARCH_ARM64 && defined RTE_ARM_EAL_RDTSC_USE_PMU
+#define CYC_PER_1MHZ 1E6
+	/* Use the generic counter ticks to calculate the PMU
+	 * cycle frequency.
+	 */
+	uint64_t ticks;
+	uint64_t start_ticks, cur_ticks;
+	uint64_t start_pmu_cycles, end_pmu_cycles;
+
+	/* Number of ticks for 1/10 second */
+	ticks = __rte_arm64_cntfrq() / 10;
+
+	start_ticks = __rte_arm64_cntvct_precise();
+	start_pmu_cycles = rte_rdtsc_precise();
+	do {
+		cur_ticks = __rte_arm64_cntvct();
+	} while ((cur_ticks - start_ticks) < ticks);
+	end_pmu_cycles = rte_rdtsc_precise();
+
+	/* Adjust the cycles to next 1Mhz */
+	return RTE_ALIGN_MUL_CEIL(end_pmu_cycles - start_pmu_cycles,
+			CYC_PER_1MHZ) * 10;
 #else
 	return 0;
 #endif
diff --git a/lib/librte_eal/common/include/arch/arm/rte_cycles_64.h b/lib/librte_eal/common/include/arch/arm/rte_cycles_64.h
index da557b6a1..e41f9dbd6 100644
--- a/lib/librte_eal/common/include/arch/arm/rte_cycles_64.h
+++ b/lib/librte_eal/common/include/arch/arm/rte_cycles_64.h
@@ -1,5 +1,6 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(c) 2015 Cavium, Inc
+ * Copyright(c) 2020 Arm Limited
  */
 
 #ifndef _RTE_CYCLES_ARM64_H_
@@ -11,6 +12,33 @@ extern "C" {
 
 #include "generic/rte_cycles.h"
 
+/** Read generic counter frequency */
+static __rte_always_inline uint64_t
+__rte_arm64_cntfrq(void)
+{
+	uint64_t freq;
+
+	asm volatile("mrs %0, cntfrq_el0" : "=r" (freq));
+	return freq;
+}
+
+/** Read generic counter */
+static __rte_always_inline uint64_t
+__rte_arm64_cntvct(void)
+{
+	uint64_t tsc;
+
+	asm volatile("mrs %0, cntvct_el0" : "=r" (tsc));
+	return tsc;
+}
+
+static __rte_always_inline uint64_t
+__rte_arm64_cntvct_precise(void)
+{
+	asm volatile("isb" : : : "memory");
+	return __rte_arm64_cntvct();
+}
+
 /**
  * Read the time base register.
  *
@@ -25,10 +53,7 @@ extern "C" {
 static inline uint64_t
 rte_rdtsc(void)
 {
-	uint64_t tsc;
-
-	asm volatile("mrs %0, cntvct_el0" : "=r" (tsc));
-	return tsc;
+	return __rte_arm64_cntvct();
 }
 #else
 /**
@@ -49,14 +74,22 @@ rte_rdtsc(void)
  * asm volatile("msr pmcr_el0, %0" : : "r" (val));
  *
  */
-static inline uint64_t
-rte_rdtsc(void)
+
+/** Read PMU cycle counter */
+static __rte_always_inline uint64_t
+__rte_arm64_pmccntr(void)
 {
 	uint64_t tsc;
 
 	asm volatile("mrs %0, pmccntr_el0" : "=r"(tsc));
 	return tsc;
 }
+
+static inline uint64_t
+rte_rdtsc(void)
+{
+	return __rte_arm64_pmccntr();
+}
 #endif
 
 static inline uint64_t
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.688834869 +0100
+++ 0081-eal-armv8-fix-timer-frequency-calibration-with-PMU.patch	2020-07-24 12:53:48.307006832 +0100
@@ -1,8 +1,10 @@
-From 97c910139baf007b729388b0c3c24b894e4b6d3e Mon Sep 17 00:00:00 2001
+From 9fd723070318d14eef5b7b5c535a29956e861e36 Mon Sep 17 00:00:00 2001
 From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Date: Fri, 26 Jun 2020 15:35:01 -0500
 Subject: [PATCH] eal/armv8: fix timer frequency calibration with PMU
 
+[ upstream commit 97c910139baf007b729388b0c3c24b894e4b6d3e ]
+
 get_tsc_freq uses 'nanosleep' system call to calculate the CPU
 frequency. However, 'nanosleep' results in the process getting
 un-scheduled. The kernel saves and restores the PMU state. This
@@ -13,7 +15,6 @@
 
 Bugzilla ID: 450
 Fixes: f91bcbb2d9a6 ("eal/armv8: use high-resolution cycle counter")
-Cc: stable@dpdk.org
 
 Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
@@ -21,14 +22,57 @@
 Reviewed-by: Phil Yang <phil.yang@arm.com>
 Acked-by: Jerin Jacob <jerinj@marvell.com>
 ---
- lib/librte_eal/arm/include/rte_cycles_64.h | 45 +++++++++++++++++++---
- lib/librte_eal/arm/rte_cycles.c            | 27 +++++++++++--
+ lib/librte_eal/common/arch/arm/rte_cycles.c   | 27 +++++++++--
+ .../common/include/arch/arm/rte_cycles_64.h   | 45 ++++++++++++++++---
  2 files changed, 63 insertions(+), 9 deletions(-)
 
-diff --git a/lib/librte_eal/arm/include/rte_cycles_64.h b/lib/librte_eal/arm/include/rte_cycles_64.h
+diff --git a/lib/librte_eal/common/arch/arm/rte_cycles.c b/lib/librte_eal/common/arch/arm/rte_cycles.c
+index 3500d523e..5bd29b24b 100644
+--- a/lib/librte_eal/common/arch/arm/rte_cycles.c
++++ b/lib/librte_eal/common/arch/arm/rte_cycles.c
+@@ -3,14 +3,35 @@
+  */
+ 
+ #include "eal_private.h"
++#include "rte_cycles.h"
+ 
+ uint64_t
+ get_tsc_freq_arch(void)
+ {
+ #if defined RTE_ARCH_ARM64 && !defined RTE_ARM_EAL_RDTSC_USE_PMU
+-	uint64_t freq;
+-	asm volatile("mrs %0, cntfrq_el0" : "=r" (freq));
+-	return freq;
++	return __rte_arm64_cntfrq();
++#elif defined RTE_ARCH_ARM64 && defined RTE_ARM_EAL_RDTSC_USE_PMU
++#define CYC_PER_1MHZ 1E6
++	/* Use the generic counter ticks to calculate the PMU
++	 * cycle frequency.
++	 */
++	uint64_t ticks;
++	uint64_t start_ticks, cur_ticks;
++	uint64_t start_pmu_cycles, end_pmu_cycles;
++
++	/* Number of ticks for 1/10 second */
++	ticks = __rte_arm64_cntfrq() / 10;
++
++	start_ticks = __rte_arm64_cntvct_precise();
++	start_pmu_cycles = rte_rdtsc_precise();
++	do {
++		cur_ticks = __rte_arm64_cntvct();
++	} while ((cur_ticks - start_ticks) < ticks);
++	end_pmu_cycles = rte_rdtsc_precise();
++
++	/* Adjust the cycles to next 1Mhz */
++	return RTE_ALIGN_MUL_CEIL(end_pmu_cycles - start_pmu_cycles,
++			CYC_PER_1MHZ) * 10;
+ #else
+ 	return 0;
+ #endif
+diff --git a/lib/librte_eal/common/include/arch/arm/rte_cycles_64.h b/lib/librte_eal/common/include/arch/arm/rte_cycles_64.h
 index da557b6a1..e41f9dbd6 100644
---- a/lib/librte_eal/arm/include/rte_cycles_64.h
-+++ b/lib/librte_eal/arm/include/rte_cycles_64.h
+--- a/lib/librte_eal/common/include/arch/arm/rte_cycles_64.h
++++ b/lib/librte_eal/common/include/arch/arm/rte_cycles_64.h
 @@ -1,5 +1,6 @@
  /* SPDX-License-Identifier: BSD-3-Clause
   * Copyright(c) 2015 Cavium, Inc
@@ -107,49 +151,6 @@
  #endif
  
  static inline uint64_t
-diff --git a/lib/librte_eal/arm/rte_cycles.c b/lib/librte_eal/arm/rte_cycles.c
-index 3500d523e..5bd29b24b 100644
---- a/lib/librte_eal/arm/rte_cycles.c
-+++ b/lib/librte_eal/arm/rte_cycles.c
-@@ -3,14 +3,35 @@
-  */
- 
- #include "eal_private.h"
-+#include "rte_cycles.h"
- 
- uint64_t
- get_tsc_freq_arch(void)
- {
- #if defined RTE_ARCH_ARM64 && !defined RTE_ARM_EAL_RDTSC_USE_PMU
--	uint64_t freq;
--	asm volatile("mrs %0, cntfrq_el0" : "=r" (freq));
--	return freq;
-+	return __rte_arm64_cntfrq();
-+#elif defined RTE_ARCH_ARM64 && defined RTE_ARM_EAL_RDTSC_USE_PMU
-+#define CYC_PER_1MHZ 1E6
-+	/* Use the generic counter ticks to calculate the PMU
-+	 * cycle frequency.
-+	 */
-+	uint64_t ticks;
-+	uint64_t start_ticks, cur_ticks;
-+	uint64_t start_pmu_cycles, end_pmu_cycles;
-+
-+	/* Number of ticks for 1/10 second */
-+	ticks = __rte_arm64_cntfrq() / 10;
-+
-+	start_ticks = __rte_arm64_cntvct_precise();
-+	start_pmu_cycles = rte_rdtsc_precise();
-+	do {
-+		cur_ticks = __rte_arm64_cntvct();
-+	} while ((cur_ticks - start_ticks) < ticks);
-+	end_pmu_cycles = rte_rdtsc_precise();
-+
-+	/* Adjust the cycles to next 1Mhz */
-+	return RTE_ALIGN_MUL_CEIL(end_pmu_cycles - start_pmu_cycles,
-+			CYC_PER_1MHZ) * 10;
- #else
- 	return 0;
- #endif
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'eal: fix lcore accessors for non-EAL threads' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (79 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'eal/armv8: fix timer frequency calibration with PMU' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'vfio: remove unused variable' " luca.boccassi
                   ` (110 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 9422d38844e14f7ba8b2ad329e5313e74c05d172 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 8 Apr 2020 13:24:19 -0700
Subject: [PATCH] eal: fix lcore accessors for non-EAL threads

[ upstream commit 67ae5936c4fc36863d146acbddfe107e1ad00a13 ]

If rte_lcore_index() is asked to give the index of the
current lcore (argument -1) and is called from a non-EAL thread
then it would invalid result. The result would come
lcore_config[-1].core_index which is some other data in the
per-thread area.

The resolution is to return -1 which is what rte_lcore_index()
returns if handed an invalid lcore.

Same issue existed with rte_lcore_to_cpu_id().

Bugzilla ID: 446
Fixes: 26cc3bbe4dc0 ("eal: add lcore accessors")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_eal/common/eal_common_lcore.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_lcore.c b/lib/librte_eal/common/eal_common_lcore.c
index 39efadef1..3ecca3869 100644
--- a/lib/librte_eal/common/eal_common_lcore.c
+++ b/lib/librte_eal/common/eal_common_lcore.c
@@ -31,8 +31,12 @@ int rte_lcore_index(int lcore_id)
 	if (unlikely(lcore_id >= RTE_MAX_LCORE))
 		return -1;
 
-	if (lcore_id < 0)
+	if (lcore_id < 0) {
+		if (rte_lcore_id() == LCORE_ID_ANY)
+			return -1;
+
 		lcore_id = (int)rte_lcore_id();
+	}
 
 	return lcore_config[lcore_id].core_index;
 }
@@ -42,8 +46,12 @@ int rte_lcore_to_cpu_id(int lcore_id)
 	if (unlikely(lcore_id >= RTE_MAX_LCORE))
 		return -1;
 
-	if (lcore_id < 0)
+	if (lcore_id < 0) {
+		if (rte_lcore_id() == LCORE_ID_ANY)
+			return -1;
+
 		lcore_id = (int)rte_lcore_id();
+	}
 
 	return lcore_config[lcore_id].core_id;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.724862485 +0100
+++ 0082-eal-fix-lcore-accessors-for-non-EAL-threads.patch	2020-07-24 12:53:48.307006832 +0100
@@ -1,8 +1,10 @@
-From 67ae5936c4fc36863d146acbddfe107e1ad00a13 Mon Sep 17 00:00:00 2001
+From 9422d38844e14f7ba8b2ad329e5313e74c05d172 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Wed, 8 Apr 2020 13:24:19 -0700
 Subject: [PATCH] eal: fix lcore accessors for non-EAL threads
 
+[ upstream commit 67ae5936c4fc36863d146acbddfe107e1ad00a13 ]
+
 If rte_lcore_index() is asked to give the index of the
 current lcore (argument -1) and is called from a non-EAL thread
 then it would invalid result. The result would come
@@ -24,7 +26,7 @@
  1 file changed, 10 insertions(+), 2 deletions(-)
 
 diff --git a/lib/librte_eal/common/eal_common_lcore.c b/lib/librte_eal/common/eal_common_lcore.c
-index 5404922a8..1d0523419 100644
+index 39efadef1..3ecca3869 100644
 --- a/lib/librte_eal/common/eal_common_lcore.c
 +++ b/lib/librte_eal/common/eal_common_lcore.c
 @@ -31,8 +31,12 @@ int rte_lcore_index(int lcore_id)

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

* [dpdk-stable] patch 'vfio: remove unused variable' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (80 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'eal: fix lcore accessors for non-EAL threads' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'eal: fix uuid header dependencies' " luca.boccassi
                   ` (109 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 3f7b84c931a0887ee1f65634a034c2efc2f3deef Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Sat, 16 May 2020 15:58:39 +0800
Subject: [PATCH] vfio: remove unused variable

[ upstream commit f4823a3982fd62993a1a128c2a0396cdbe01be8a ]

The 'group_status' has never been used and can be removed.

Fixes: 94c0776b1bad ("vfio: support hotplug")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_eal/linux/eal/eal_vfio.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/lib/librte_eal/linux/eal/eal_vfio.c b/lib/librte_eal/linux/eal/eal_vfio.c
index 62ffe13e0..1b703bf9e 100644
--- a/lib/librte_eal/linux/eal/eal_vfio.c
+++ b/lib/librte_eal/linux/eal/eal_vfio.c
@@ -886,9 +886,6 @@ int
 rte_vfio_release_device(const char *sysfs_base, const char *dev_addr,
 		    int vfio_dev_fd)
 {
-	struct vfio_group_status group_status = {
-			.argsz = sizeof(group_status)
-	};
 	struct vfio_config *vfio_cfg;
 	int vfio_group_fd;
 	int iommu_group_num;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.761136780 +0100
+++ 0083-vfio-remove-unused-variable.patch	2020-07-24 12:53:48.311006907 +0100
@@ -1,24 +1,25 @@
-From f4823a3982fd62993a1a128c2a0396cdbe01be8a Mon Sep 17 00:00:00 2001
+From 3f7b84c931a0887ee1f65634a034c2efc2f3deef Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Sat, 16 May 2020 15:58:39 +0800
 Subject: [PATCH] vfio: remove unused variable
 
+[ upstream commit f4823a3982fd62993a1a128c2a0396cdbe01be8a ]
+
 The 'group_status' has never been used and can be removed.
 
 Fixes: 94c0776b1bad ("vfio: support hotplug")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: David Marchand <david.marchand@redhat.com>
 ---
- lib/librte_eal/linux/eal_vfio.c | 3 ---
+ lib/librte_eal/linux/eal/eal_vfio.c | 3 ---
  1 file changed, 3 deletions(-)
 
-diff --git a/lib/librte_eal/linux/eal_vfio.c b/lib/librte_eal/linux/eal_vfio.c
-index abb12a354..14358949e 100644
---- a/lib/librte_eal/linux/eal_vfio.c
-+++ b/lib/librte_eal/linux/eal_vfio.c
-@@ -933,9 +933,6 @@ int
+diff --git a/lib/librte_eal/linux/eal/eal_vfio.c b/lib/librte_eal/linux/eal/eal_vfio.c
+index 62ffe13e0..1b703bf9e 100644
+--- a/lib/librte_eal/linux/eal/eal_vfio.c
++++ b/lib/librte_eal/linux/eal/eal_vfio.c
+@@ -886,9 +886,6 @@ int
  rte_vfio_release_device(const char *sysfs_base, const char *dev_addr,
  		    int vfio_dev_fd)
  {

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

* [dpdk-stable] patch 'eal: fix uuid header dependencies' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (81 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'vfio: remove unused variable' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'test: fix rpath for drivers with meson' " luca.boccassi
                   ` (108 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Haiyue Wang; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 67920a0346554ea2cdc2fcb2a318b0afc974d5c4 Mon Sep 17 00:00:00 2001
From: Haiyue Wang <haiyue.wang@intel.com>
Date: Fri, 3 Jul 2020 22:57:17 +0800
Subject: [PATCH] eal: fix uuid header dependencies
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit edca6d883eb0137bc3caf7f93651a67360ebdf96 ]

Add the dependent header files explicitly, so that the user just needs
to include the 'rte_uuid.h' header file directly to avoid compile error:
 (1). rte_uuid.h:97:55: error: unknown type name ‘size_t’
 (2). rte_uuid.h:58:2: error: implicit declaration of function ‘memcpy’

Fixes: 6bc67c497a51 ("eal: add uuid API")

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_eal/common/include/rte_uuid.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_eal/common/include/rte_uuid.h b/lib/librte_eal/common/include/rte_uuid.h
index 044afbdfa..8b42e070a 100644
--- a/lib/librte_eal/common/include/rte_uuid.h
+++ b/lib/librte_eal/common/include/rte_uuid.h
@@ -15,6 +15,8 @@ extern "C" {
 #endif
 
 #include <stdbool.h>
+#include <stddef.h>
+#include <string.h>
 
 /**
  * Struct describing a Universal Unique Identifier
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.801627231 +0100
+++ 0084-eal-fix-uuid-header-dependencies.patch	2020-07-24 12:53:48.311006907 +0100
@@ -1,4 +1,4 @@
-From edca6d883eb0137bc3caf7f93651a67360ebdf96 Mon Sep 17 00:00:00 2001
+From 67920a0346554ea2cdc2fcb2a318b0afc974d5c4 Mon Sep 17 00:00:00 2001
 From: Haiyue Wang <haiyue.wang@intel.com>
 Date: Fri, 3 Jul 2020 22:57:17 +0800
 Subject: [PATCH] eal: fix uuid header dependencies
@@ -6,24 +6,25 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit edca6d883eb0137bc3caf7f93651a67360ebdf96 ]
+
 Add the dependent header files explicitly, so that the user just needs
 to include the 'rte_uuid.h' header file directly to avoid compile error:
  (1). rte_uuid.h:97:55: error: unknown type name ‘size_t’
  (2). rte_uuid.h:58:2: error: implicit declaration of function ‘memcpy’
 
 Fixes: 6bc67c497a51 ("eal: add uuid API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
 Acked-by: David Marchand <david.marchand@redhat.com>
 ---
- lib/librte_eal/include/rte_uuid.h | 2 ++
+ lib/librte_eal/common/include/rte_uuid.h | 2 ++
  1 file changed, 2 insertions(+)
 
-diff --git a/lib/librte_eal/include/rte_uuid.h b/lib/librte_eal/include/rte_uuid.h
+diff --git a/lib/librte_eal/common/include/rte_uuid.h b/lib/librte_eal/common/include/rte_uuid.h
 index 044afbdfa..8b42e070a 100644
---- a/lib/librte_eal/include/rte_uuid.h
-+++ b/lib/librte_eal/include/rte_uuid.h
+--- a/lib/librte_eal/common/include/rte_uuid.h
++++ b/lib/librte_eal/common/include/rte_uuid.h
 @@ -15,6 +15,8 @@ extern "C" {
  #endif
  

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

* [dpdk-stable] patch 'test: fix rpath for drivers with meson' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (82 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'eal: fix uuid header dependencies' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'rawdev: allow getting info for unknown device' " luca.boccassi
                   ` (107 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Timothy Redaelli; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From e427f713e45fb6d153cc210ca0db43daf961ce85 Mon Sep 17 00:00:00 2001
From: Timothy Redaelli <tredaelli@redhat.com>
Date: Wed, 1 Jul 2020 19:16:38 +0200
Subject: [PATCH] test: fix rpath for drivers with meson

[ upstream commit f62093e7390d39c160205a4915ce0b4de116a0c3 ]

This commit fixes the setting of relative rpath on dpdk-test for
drivers ($libdir/dpdk/pmd-$abiver) to the correct absolute rpath
($prefix$libdir/dpdk/pmd-$abiver).

Fixes: b5dc795a8a55 ("test: build app with meson as dpdk-test")

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/test/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index d7d0e7871..3b2774b3e 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -393,7 +393,8 @@ dpdk_test = executable('dpdk-test',
 	link_whole: link_libs,
 	dependencies: test_dep_objs,
 	c_args: [cflags, '-DALLOW_EXPERIMENTAL_API'],
-	install_rpath: driver_install_path,
+	install_rpath: join_paths(get_option('prefix'),
+			 driver_install_path),
 	install: true)
 
 # some perf tests (eg: memcpy perf autotest)take very long
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.836608003 +0100
+++ 0085-test-fix-rpath-for-drivers-with-meson.patch	2020-07-24 12:53:48.311006907 +0100
@@ -1,14 +1,15 @@
-From f62093e7390d39c160205a4915ce0b4de116a0c3 Mon Sep 17 00:00:00 2001
+From e427f713e45fb6d153cc210ca0db43daf961ce85 Mon Sep 17 00:00:00 2001
 From: Timothy Redaelli <tredaelli@redhat.com>
 Date: Wed, 1 Jul 2020 19:16:38 +0200
 Subject: [PATCH] test: fix rpath for drivers with meson
 
+[ upstream commit f62093e7390d39c160205a4915ce0b4de116a0c3 ]
+
 This commit fixes the setting of relative rpath on dpdk-test for
 drivers ($libdir/dpdk/pmd-$abiver) to the correct absolute rpath
 ($prefix$libdir/dpdk/pmd-$abiver).
 
 Fixes: b5dc795a8a55 ("test: build app with meson as dpdk-test")
-Cc: stable@dpdk.org
 
 Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
 Acked-by: Bruce Richardson <bruce.richardson@intel.com>
@@ -17,19 +18,19 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/app/test/meson.build b/app/test/meson.build
-index 56591db4e..39f295d73 100644
+index d7d0e7871..3b2774b3e 100644
 --- a/app/test/meson.build
 +++ b/app/test/meson.build
-@@ -425,7 +425,8 @@ dpdk_test = executable('dpdk-test',
+@@ -393,7 +393,8 @@ dpdk_test = executable('dpdk-test',
  	link_whole: link_libs,
  	dependencies: test_dep_objs,
- 	c_args: cflags,
+ 	c_args: [cflags, '-DALLOW_EXPERIMENTAL_API'],
 -	install_rpath: driver_install_path,
 +	install_rpath: join_paths(get_option('prefix'),
 +			 driver_install_path),
  	install: true)
  
- has_hugepage = run_command('has-hugepage.sh').stdout().strip() != '0'
+ # some perf tests (eg: memcpy perf autotest)take very long
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'rawdev: allow getting info for unknown device' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (83 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'test: fix rpath for drivers with meson' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'rawdev: fill NUMA socket ID in info' " luca.boccassi
                   ` (106 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 2e4b38d8f9ad20fa84486315ae9e117cb037a8c1 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 6 Jul 2020 11:31:30 +0100
Subject: [PATCH] rawdev: allow getting info for unknown device

[ upstream commit 201a68c67839b879b39aa897b6bdb024a49ae436 ]

To call the rte_rawdev_info_get() function, the user currently has to know
the underlying type of the device in order to pass an appropriate structure
or buffer as the dev_private pointer in the info structure. By allowing a
NULL value for this field, we can skip getting the device-specific info and
just return the generic info - including the device name and driver, which
can be used to determine the device type - to the user.

This ensures that basic info can be get for all rawdevs, without knowing
the type, and even if the info driver API call has not been implemented for
the device.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 lib/librte_rawdev/rte_rawdev.c | 6 ++++--
 lib/librte_rawdev/rte_rawdev.h | 8 +++++++-
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/lib/librte_rawdev/rte_rawdev.c b/lib/librte_rawdev/rte_rawdev.c
index b6f1e1c77..f6efa6b67 100644
--- a/lib/librte_rawdev/rte_rawdev.c
+++ b/lib/librte_rawdev/rte_rawdev.c
@@ -89,8 +89,10 @@ rte_rawdev_info_get(uint16_t dev_id, struct rte_rawdev_info *dev_info)
 
 	rawdev = &rte_rawdevs[dev_id];
 
-	RTE_FUNC_PTR_OR_ERR_RET(*rawdev->dev_ops->dev_info_get, -ENOTSUP);
-	(*rawdev->dev_ops->dev_info_get)(rawdev, dev_info->dev_private);
+	if (dev_info->dev_private != NULL) {
+		RTE_FUNC_PTR_OR_ERR_RET(*rawdev->dev_ops->dev_info_get, -ENOTSUP);
+		(*rawdev->dev_ops->dev_info_get)(rawdev, dev_info->dev_private);
+	}
 
 	if (dev_info) {
 
diff --git a/lib/librte_rawdev/rte_rawdev.h b/lib/librte_rawdev/rte_rawdev.h
index 7a1f3213e..32f6b8bb0 100644
--- a/lib/librte_rawdev/rte_rawdev.h
+++ b/lib/librte_rawdev/rte_rawdev.h
@@ -74,7 +74,13 @@ struct rte_rawdev_info;
  *
  * @param[out] dev_info
  *   A pointer to a structure of type *rte_rawdev_info* to be filled with the
- *   contextual information of the device.
+ *   contextual information of the device. The dev_info->dev_private field
+ *   should point to an appropriate buffer space for holding the device-
+ *   specific info for that hardware.
+ *   If the dev_private field is set to NULL, then the device-specific info
+ *   function will not be called and only basic information about the device
+ *   will be returned. This can be used to safely query the type of a rawdev
+ *   instance without needing to know the size of the private data to return.
  *
  * @return
  *   - 0: Success, driver updates the contextual information of the raw device
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.872395908 +0100
+++ 0086-rawdev-allow-getting-info-for-unknown-device.patch	2020-07-24 12:53:48.311006907 +0100
@@ -1,8 +1,10 @@
-From 201a68c67839b879b39aa897b6bdb024a49ae436 Mon Sep 17 00:00:00 2001
+From 2e4b38d8f9ad20fa84486315ae9e117cb037a8c1 Mon Sep 17 00:00:00 2001
 From: Bruce Richardson <bruce.richardson@intel.com>
 Date: Mon, 6 Jul 2020 11:31:30 +0100
 Subject: [PATCH] rawdev: allow getting info for unknown device
 
+[ upstream commit 201a68c67839b879b39aa897b6bdb024a49ae436 ]
+
 To call the rte_rawdev_info_get() function, the user currently has to know
 the underlying type of the device in order to pass an appropriate structure
 or buffer as the dev_private pointer in the info structure. By allowing a
@@ -14,8 +16,6 @@
 the type, and even if the info driver API call has not been implemented for
 the device.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
 Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
 ---
@@ -24,10 +24,10 @@
  2 files changed, 11 insertions(+), 3 deletions(-)
 
 diff --git a/lib/librte_rawdev/rte_rawdev.c b/lib/librte_rawdev/rte_rawdev.c
-index 2eb7b3bc3..e634a567f 100644
+index b6f1e1c77..f6efa6b67 100644
 --- a/lib/librte_rawdev/rte_rawdev.c
 +++ b/lib/librte_rawdev/rte_rawdev.c
-@@ -87,8 +87,10 @@ rte_rawdev_info_get(uint16_t dev_id, struct rte_rawdev_info *dev_info)
+@@ -89,8 +89,10 @@ rte_rawdev_info_get(uint16_t dev_id, struct rte_rawdev_info *dev_info)
  
  	rawdev = &rte_rawdevs[dev_id];
  

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

* [dpdk-stable] patch 'rawdev: fill NUMA socket ID in info' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (84 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'rawdev: allow getting info for unknown device' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'rawdev: export dump function in map file' " luca.boccassi
                   ` (105 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From a5cb10a2284eb486f28902dea07bc7379bf4b2dd Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 6 Jul 2020 11:31:31 +0100
Subject: [PATCH] rawdev: fill NUMA socket ID in info

[ upstream commit 26892215922595e117f19e522bf05183213392ff ]

The rawdev info struct has a socket_id field which was not filled in.

We can also omit the checks for the parameter struct being null, since
that is previously checked in the function.

Fixes: c88b3f2558ed ("rawdev: introduce raw device library")

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

diff --git a/lib/librte_rawdev/rte_rawdev.c b/lib/librte_rawdev/rte_rawdev.c
index f6efa6b67..fe289cefd 100644
--- a/lib/librte_rawdev/rte_rawdev.c
+++ b/lib/librte_rawdev/rte_rawdev.c
@@ -94,11 +94,9 @@ rte_rawdev_info_get(uint16_t dev_id, struct rte_rawdev_info *dev_info)
 		(*rawdev->dev_ops->dev_info_get)(rawdev, dev_info->dev_private);
 	}
 
-	if (dev_info) {
-
-		dev_info->driver_name = rawdev->driver_name;
-		dev_info->device = rawdev->device;
-	}
+	dev_info->driver_name = rawdev->driver_name;
+	dev_info->device = rawdev->device;
+	dev_info->socket_id = rawdev->socket_id;
 
 	return 0;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.910614413 +0100
+++ 0087-rawdev-fill-NUMA-socket-ID-in-info.patch	2020-07-24 12:53:48.311006907 +0100
@@ -1,15 +1,16 @@
-From 26892215922595e117f19e522bf05183213392ff Mon Sep 17 00:00:00 2001
+From a5cb10a2284eb486f28902dea07bc7379bf4b2dd Mon Sep 17 00:00:00 2001
 From: Bruce Richardson <bruce.richardson@intel.com>
 Date: Mon, 6 Jul 2020 11:31:31 +0100
 Subject: [PATCH] rawdev: fill NUMA socket ID in info
 
+[ upstream commit 26892215922595e117f19e522bf05183213392ff ]
+
 The rawdev info struct has a socket_id field which was not filled in.
 
 We can also omit the checks for the parameter struct being null, since
 that is previously checked in the function.
 
 Fixes: c88b3f2558ed ("rawdev: introduce raw device library")
-Cc: stable@dpdk.org
 
 Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
 Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
@@ -18,10 +19,10 @@
  1 file changed, 3 insertions(+), 5 deletions(-)
 
 diff --git a/lib/librte_rawdev/rte_rawdev.c b/lib/librte_rawdev/rte_rawdev.c
-index e634a567f..8f84d0b22 100644
+index f6efa6b67..fe289cefd 100644
 --- a/lib/librte_rawdev/rte_rawdev.c
 +++ b/lib/librte_rawdev/rte_rawdev.c
-@@ -92,11 +92,9 @@ rte_rawdev_info_get(uint16_t dev_id, struct rte_rawdev_info *dev_info)
+@@ -94,11 +94,9 @@ rte_rawdev_info_get(uint16_t dev_id, struct rte_rawdev_info *dev_info)
  		(*rawdev->dev_ops->dev_info_get)(rawdev, dev_info->dev_private);
  	}
  

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

* [dpdk-stable] patch 'rawdev: export dump function in map file' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (85 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'rawdev: fill NUMA socket ID in info' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'cfgfile: fix stack buffer underflow' " luca.boccassi
                   ` (104 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 07e906580406ab5795f4d8630a6c27b4bd25a629 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 6 Jul 2020 11:31:32 +0100
Subject: [PATCH] rawdev: export dump function in map file

[ upstream commit a8550b773184c202cee408aee8621d682ccb21dc ]

The rte_rawdev_dump function was missing from the map file,
meaning it was unavailable for use when linking dynamically.

Fixes: c88b3f2558ed ("rawdev: introduce raw device library")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 lib/librte_rawdev/rte_rawdev_version.map | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_rawdev/rte_rawdev_version.map b/lib/librte_rawdev/rte_rawdev_version.map
index d847c9e0d..63b54f598 100644
--- a/lib/librte_rawdev/rte_rawdev_version.map
+++ b/lib/librte_rawdev/rte_rawdev_version.map
@@ -5,6 +5,7 @@ DPDK_20.0 {
 	rte_rawdev_configure;
 	rte_rawdev_count;
 	rte_rawdev_dequeue_buffers;
+	rte_rawdev_dump;
 	rte_rawdev_enqueue_buffers;
 	rte_rawdev_firmware_load;
 	rte_rawdev_firmware_status_get;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.946286150 +0100
+++ 0088-rawdev-export-dump-function-in-map-file.patch	2020-07-24 12:53:48.311006907 +0100
@@ -1,13 +1,14 @@
-From a8550b773184c202cee408aee8621d682ccb21dc Mon Sep 17 00:00:00 2001
+From 07e906580406ab5795f4d8630a6c27b4bd25a629 Mon Sep 17 00:00:00 2001
 From: Bruce Richardson <bruce.richardson@intel.com>
 Date: Mon, 6 Jul 2020 11:31:32 +0100
 Subject: [PATCH] rawdev: export dump function in map file
 
+[ upstream commit a8550b773184c202cee408aee8621d682ccb21dc ]
+
 The rte_rawdev_dump function was missing from the map file,
 meaning it was unavailable for use when linking dynamically.
 
 Fixes: c88b3f2558ed ("rawdev: introduce raw device library")
-Cc: stable@dpdk.org
 
 Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
 Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

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

* [dpdk-stable] patch 'cfgfile: fix stack buffer underflow' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (86 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'rawdev: export dump function in map file' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'rib: add C++ include guard' " luca.boccassi
                   ` (103 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 3b710031029e919462866fc7fb2692b3bfa7c78d Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 1 Jul 2020 20:05:58 -0700
Subject: [PATCH] cfgfile: fix stack buffer underflow

[ upstream commit 041a3971c8f47f7850586c601b7002652dc9327c ]

If cfgfile is give a line with comment character at the start
of the line, it will dereference outside of the buffer.

Detected with address sanitizer:

SUMMARY: AddressSanitizer: stack-buffer-underflow
lib/librte_cfgfile/rte_cfgfile.c:194 in rte_cfgfile_load_with_params
Shadow bytes around the buggy address:
  0x200fff79f6a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x200fff79f6b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x200fff79f6c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x200fff79f6d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x200fff79f6e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x200fff79f6f0: 00 00 00 00 f1 f1 f1[f1]00 00 00 00 00 00 00 00
  0x200fff79f700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x200fff79f710: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x200fff79f720: 04 f2 f2 f2 f3 f3 f3 f3 00 00 00 00 00 00 00 00
  0x200fff79f730: 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 f2
  0x200fff79f740: f2 f2 f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==2189==ABORTING

Fixes: a6a47ac9c2c9 ("cfgfile: rework load function")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_cfgfile/rte_cfgfile.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/librte_cfgfile/rte_cfgfile.c b/lib/librte_cfgfile/rte_cfgfile.c
index 9049fd9c2..0c419d6ad 100644
--- a/lib/librte_cfgfile/rte_cfgfile.c
+++ b/lib/librte_cfgfile/rte_cfgfile.c
@@ -191,7 +191,8 @@ rte_cfgfile_load_with_params(const char *filename, int flags,
 		}
 		/* skip parsing if comment character found */
 		pos = memchr(buffer, params->comment_character, len);
-		if (pos != NULL && (*(pos-1) != '\\')) {
+		if (pos != NULL &&
+		    (pos == buffer || *(pos-1) != '\\')) {
 			*pos = '\0';
 			len = pos -  buffer;
 		}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:51.984248021 +0100
+++ 0089-cfgfile-fix-stack-buffer-underflow.patch	2020-07-24 12:53:48.315006981 +0100
@@ -1,8 +1,10 @@
-From 041a3971c8f47f7850586c601b7002652dc9327c Mon Sep 17 00:00:00 2001
+From 3b710031029e919462866fc7fb2692b3bfa7c78d Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Wed, 1 Jul 2020 20:05:58 -0700
 Subject: [PATCH] cfgfile: fix stack buffer underflow
 
+[ upstream commit 041a3971c8f47f7850586c601b7002652dc9327c ]
+
 If cfgfile is give a line with comment character at the start
 of the line, it will dereference outside of the buffer.
 
@@ -44,7 +46,6 @@
 ==2189==ABORTING
 
 Fixes: a6a47ac9c2c9 ("cfgfile: rework load function")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
@@ -53,7 +54,7 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/lib/librte_cfgfile/rte_cfgfile.c b/lib/librte_cfgfile/rte_cfgfile.c
-index f132e4056..002022263 100644
+index 9049fd9c2..0c419d6ad 100644
 --- a/lib/librte_cfgfile/rte_cfgfile.c
 +++ b/lib/librte_cfgfile/rte_cfgfile.c
 @@ -191,7 +191,8 @@ rte_cfgfile_load_with_params(const char *filename, int flags,

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

* [dpdk-stable] patch 'rib: add C++ include guard' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (87 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'cfgfile: fix stack buffer underflow' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'service: fix lcore iteration' " luca.boccassi
                   ` (102 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Vladimir Medvedkin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 09cea03334ff8ee569fd49f1eb1ed13069bc24b9 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 25 Jun 2020 13:32:08 -0700
Subject: [PATCH] rib: add C++ include guard

[ upstream commit b2a0b9f0447a64dd03aa210c49d70572077555ea ]

All include files should be safe from C++

Fixes: 5a5793a5ffa2 ("rib: add RIB library")
Fixes: f7e861e21c46 ("rib: support IPv6")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 lib/librte_rib/rte_rib.h  |  8 ++++++++
 lib/librte_rib/rte_rib6.h | 10 +++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/lib/librte_rib/rte_rib.h b/lib/librte_rib/rte_rib.h
index da558c417..9369661dc 100644
--- a/lib/librte_rib/rte_rib.h
+++ b/lib/librte_rib/rte_rib.h
@@ -20,6 +20,10 @@
 
 #include <rte_compat.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * rte_rib_get_nxt() flags
  */
@@ -281,4 +285,8 @@ __rte_experimental
 void
 rte_rib_free(struct rte_rib *rib);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _RTE_RIB_H_ */
diff --git a/lib/librte_rib/rte_rib6.h b/lib/librte_rib/rte_rib6.h
index 4b284c913..e7560fa8a 100644
--- a/lib/librte_rib/rte_rib6.h
+++ b/lib/librte_rib/rte_rib6.h
@@ -21,6 +21,10 @@
 #include <rte_memcpy.h>
 #include <rte_compat.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define RTE_RIB6_IPV6_ADDR_SIZE	16
 
 /**
@@ -338,4 +342,8 @@ __rte_experimental
 void
 rte_rib6_free(struct rte_rib6 *rib);
 
-#endif /* _RTE_RIB_H_ */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RTE_RIB6_H_ */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.019269650 +0100
+++ 0090-rib-add-C-include-guard.patch	2020-07-24 12:53:48.315006981 +0100
@@ -1,13 +1,14 @@
-From b2a0b9f0447a64dd03aa210c49d70572077555ea Mon Sep 17 00:00:00 2001
+From 09cea03334ff8ee569fd49f1eb1ed13069bc24b9 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Thu, 25 Jun 2020 13:32:08 -0700
 Subject: [PATCH] rib: add C++ include guard
 
+[ upstream commit b2a0b9f0447a64dd03aa210c49d70572077555ea ]
+
 All include files should be safe from C++
 
 Fixes: 5a5793a5ffa2 ("rib: add RIB library")
 Fixes: f7e861e21c46 ("rib: support IPv6")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
@@ -17,7 +18,7 @@
  2 files changed, 17 insertions(+), 1 deletion(-)
 
 diff --git a/lib/librte_rib/rte_rib.h b/lib/librte_rib/rte_rib.h
-index a9bb42f6f..f80752e5b 100644
+index da558c417..9369661dc 100644
 --- a/lib/librte_rib/rte_rib.h
 +++ b/lib/librte_rib/rte_rib.h
 @@ -20,6 +20,10 @@
@@ -31,7 +32,7 @@
  /**
   * rte_rib_get_nxt() flags
   */
-@@ -282,4 +286,8 @@ __rte_experimental
+@@ -281,4 +285,8 @@ __rte_experimental
  void
  rte_rib_free(struct rte_rib *rib);
  
@@ -41,7 +42,7 @@
 +
  #endif /* _RTE_RIB_H_ */
 diff --git a/lib/librte_rib/rte_rib6.h b/lib/librte_rib/rte_rib6.h
-index 24faf4632..b5e10569b 100644
+index 4b284c913..e7560fa8a 100644
 --- a/lib/librte_rib/rte_rib6.h
 +++ b/lib/librte_rib/rte_rib6.h
 @@ -21,6 +21,10 @@
@@ -55,7 +56,7 @@
  #define RTE_RIB6_IPV6_ADDR_SIZE	16
  
  /**
-@@ -339,4 +343,8 @@ __rte_experimental
+@@ -338,4 +342,8 @@ __rte_experimental
  void
  rte_rib6_free(struct rte_rib6 *rib);
  

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

* [dpdk-stable] patch 'service: fix lcore iteration' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (88 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'rib: add C++ include guard' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'drivers/crypto: add missing OOP feature flag' " luca.boccassi
                   ` (101 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Igor Romanov
  Cc: Andrew Rybchenko, Harry van Haaren, Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From eceee0c93bfb15a0cf3480c9fd96ac01fafb8edc Mon Sep 17 00:00:00 2001
From: Igor Romanov <igor.romanov@oktetlabs.ru>
Date: Tue, 7 Jul 2020 11:45:24 +0100
Subject: [PATCH] service: fix lcore iteration

[ upstream commit f3c256b621262e581d3edcca383df83875ab7ebe ]

The service core list is populated, but not used. Incorrect
lcore states are examined for a service.

Use the populated list to iterate over service cores.

Fixes: e484ccddbe1b ("service: avoid false sharing on core state")

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 lib/librte_eal/common/rte_service.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
index d5dd32d8d..eca6ccc59 100644
--- a/lib/librte_eal/common/rte_service.c
+++ b/lib/librte_eal/common/rte_service.c
@@ -397,7 +397,7 @@ rte_service_may_be_active(uint32_t id)
 		return -EINVAL;
 
 	for (i = 0; i < lcore_count; i++) {
-		if (lcore_states[i].service_active_on_lcore[id])
+		if (lcore_states[ids[i]].service_active_on_lcore[id])
 			return 1;
 	}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.054228510 +0100
+++ 0091-service-fix-lcore-iteration.patch	2020-07-24 12:53:48.315006981 +0100
@@ -1,15 +1,16 @@
-From f3c256b621262e581d3edcca383df83875ab7ebe Mon Sep 17 00:00:00 2001
+From eceee0c93bfb15a0cf3480c9fd96ac01fafb8edc Mon Sep 17 00:00:00 2001
 From: Igor Romanov <igor.romanov@oktetlabs.ru>
 Date: Tue, 7 Jul 2020 11:45:24 +0100
 Subject: [PATCH] service: fix lcore iteration
 
+[ upstream commit f3c256b621262e581d3edcca383df83875ab7ebe ]
+
 The service core list is populated, but not used. Incorrect
 lcore states are examined for a service.
 
 Use the populated list to iterate over service cores.
 
 Fixes: e484ccddbe1b ("service: avoid false sharing on core state")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -20,10 +21,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
-index 6123a2124..e2795f857 100644
+index d5dd32d8d..eca6ccc59 100644
 --- a/lib/librte_eal/common/rte_service.c
 +++ b/lib/librte_eal/common/rte_service.c
-@@ -422,7 +422,7 @@ rte_service_may_be_active(uint32_t id)
+@@ -397,7 +397,7 @@ rte_service_may_be_active(uint32_t id)
  		return -EINVAL;
  
  	for (i = 0; i < lcore_count; i++) {

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

* [dpdk-stable] patch 'drivers/crypto: add missing OOP feature flag' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (89 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'service: fix lcore iteration' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'test/crypto: fix asymmetric session mempool creation' " luca.boccassi
                   ` (100 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From b4c9242d0552f5a8bbd88adb45e7d1ae548d5d5a Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Thu, 4 Jun 2020 08:51:12 +0000
Subject: [PATCH] drivers/crypto: add missing OOP feature flag

[ upstream commit cd346367f898d619edf53f13628d6e539dbcab40 ]

ZUC, SNOW3G and KASUMI PMDs support Out-of-place operations,
but their feature flags did not reflect this.

Fixes: 2717246ecd7d ("cryptodev: replace mbuf scatter gather flag")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/cryptodevs/features/kasumi.ini | 1 +
 doc/guides/cryptodevs/features/snow3g.ini | 1 +
 doc/guides/cryptodevs/features/zuc.ini    | 1 +
 drivers/crypto/kasumi/rte_kasumi_pmd.c    | 1 +
 drivers/crypto/snow3g/rte_snow3g_pmd.c    | 1 +
 drivers/crypto/zuc/rte_zuc_pmd.c          | 1 +
 6 files changed, 6 insertions(+)

diff --git a/doc/guides/cryptodevs/features/kasumi.ini b/doc/guides/cryptodevs/features/kasumi.ini
index f3d061009..7ee866e8f 100644
--- a/doc/guides/cryptodevs/features/kasumi.ini
+++ b/doc/guides/cryptodevs/features/kasumi.ini
@@ -6,6 +6,7 @@
 [Features]
 Symmetric crypto       = Y
 Sym operation chaining = Y
+OOP LB  In LB  Out     = Y
 
 ;
 ; Supported crypto algorithms of the 'kasumi' crypto driver.
diff --git a/doc/guides/cryptodevs/features/snow3g.ini b/doc/guides/cryptodevs/features/snow3g.ini
index ec2daf6c6..c4a1a8448 100644
--- a/doc/guides/cryptodevs/features/snow3g.ini
+++ b/doc/guides/cryptodevs/features/snow3g.ini
@@ -6,6 +6,7 @@
 [Features]
 Symmetric crypto       = Y
 Sym operation chaining = Y
+OOP LB  In LB  Out     = Y
 
 ;
 ; Supported crypto algorithms of the 'snow3g' crypto driver.
diff --git a/doc/guides/cryptodevs/features/zuc.ini b/doc/guides/cryptodevs/features/zuc.ini
index 9b6a4287e..29cc258aa 100644
--- a/doc/guides/cryptodevs/features/zuc.ini
+++ b/doc/guides/cryptodevs/features/zuc.ini
@@ -6,6 +6,7 @@
 [Features]
 Symmetric crypto       = Y
 Sym operation chaining = Y
+OOP LB  In LB  Out     = Y
 
 ;
 ; Supported crypto algorithms of the 'zuc' crypto driver.
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index c87dca5f4..dd85928c5 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -557,6 +557,7 @@ cryptodev_kasumi_create(const char *name,
 
 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
+			RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT |
 			cpu_flags;
 
 	internals = dev->data->dev_private;
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index 2b1b90b01..32d94c5ab 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -568,6 +568,7 @@ cryptodev_snow3g_create(const char *name,
 
 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
+			RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT |
 			cpu_flags;
 
 	internals = dev->data->dev_private;
diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index 265aabaeb..bc02d9d4a 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -476,6 +476,7 @@ cryptodev_zuc_create(const char *name,
 
 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
+			RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT |
 			cpu_flags;
 
 	internals = dev->data->dev_private;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.089927483 +0100
+++ 0092-drivers-crypto-add-missing-OOP-feature-flag.patch	2020-07-24 12:53:48.315006981 +0100
@@ -1,102 +1,97 @@
-From cd346367f898d619edf53f13628d6e539dbcab40 Mon Sep 17 00:00:00 2001
+From b4c9242d0552f5a8bbd88adb45e7d1ae548d5d5a Mon Sep 17 00:00:00 2001
 From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
 Date: Thu, 4 Jun 2020 08:51:12 +0000
 Subject: [PATCH] drivers/crypto: add missing OOP feature flag
 
+[ upstream commit cd346367f898d619edf53f13628d6e539dbcab40 ]
+
 ZUC, SNOW3G and KASUMI PMDs support Out-of-place operations,
 but their feature flags did not reflect this.
 
 Fixes: 2717246ecd7d ("cryptodev: replace mbuf scatter gather flag")
-Cc: stable@dpdk.org
 
 Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
 ---
  doc/guides/cryptodevs/features/kasumi.ini | 1 +
  doc/guides/cryptodevs/features/snow3g.ini | 1 +
  doc/guides/cryptodevs/features/zuc.ini    | 1 +
- drivers/crypto/kasumi/rte_kasumi_pmd.c    | 3 ++-
- drivers/crypto/snow3g/rte_snow3g_pmd.c    | 3 ++-
- drivers/crypto/zuc/rte_zuc_pmd.c          | 3 ++-
- 6 files changed, 9 insertions(+), 3 deletions(-)
+ drivers/crypto/kasumi/rte_kasumi_pmd.c    | 1 +
+ drivers/crypto/snow3g/rte_snow3g_pmd.c    | 1 +
+ drivers/crypto/zuc/rte_zuc_pmd.c          | 1 +
+ 6 files changed, 6 insertions(+)
 
 diff --git a/doc/guides/cryptodevs/features/kasumi.ini b/doc/guides/cryptodevs/features/kasumi.ini
-index 8380a5765..fbdb47e89 100644
+index f3d061009..7ee866e8f 100644
 --- a/doc/guides/cryptodevs/features/kasumi.ini
 +++ b/doc/guides/cryptodevs/features/kasumi.ini
-@@ -8,6 +8,7 @@ Symmetric crypto       = Y
+@@ -6,6 +6,7 @@
+ [Features]
+ Symmetric crypto       = Y
  Sym operation chaining = Y
- Symmetric sessionless  = Y
- Non-Byte aligned data  = Y
 +OOP LB  In LB  Out     = Y
  
  ;
  ; Supported crypto algorithms of the 'kasumi' crypto driver.
 diff --git a/doc/guides/cryptodevs/features/snow3g.ini b/doc/guides/cryptodevs/features/snow3g.ini
-index b2caefe3a..14ac7e4b6 100644
+index ec2daf6c6..c4a1a8448 100644
 --- a/doc/guides/cryptodevs/features/snow3g.ini
 +++ b/doc/guides/cryptodevs/features/snow3g.ini
-@@ -8,6 +8,7 @@ Symmetric crypto       = Y
+@@ -6,6 +6,7 @@
+ [Features]
+ Symmetric crypto       = Y
  Sym operation chaining = Y
- Symmetric sessionless  = Y
- Non-Byte aligned data  = Y
 +OOP LB  In LB  Out     = Y
  
  ;
  ; Supported crypto algorithms of the 'snow3g' crypto driver.
 diff --git a/doc/guides/cryptodevs/features/zuc.ini b/doc/guides/cryptodevs/features/zuc.ini
-index 21d074f9b..1c53454a6 100644
+index 9b6a4287e..29cc258aa 100644
 --- a/doc/guides/cryptodevs/features/zuc.ini
 +++ b/doc/guides/cryptodevs/features/zuc.ini
-@@ -8,6 +8,7 @@ Symmetric crypto       = Y
+@@ -6,6 +6,7 @@
+ [Features]
+ Symmetric crypto       = Y
  Sym operation chaining = Y
- Symmetric sessionless  = Y
- Non-Byte aligned data  = Y
 +OOP LB  In LB  Out     = Y
  
  ;
  ; Supported crypto algorithms of the 'zuc' crypto driver.
 diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
-index c3f0dfc2f..5ff1b5c56 100644
+index c87dca5f4..dd85928c5 100644
 --- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
 +++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
-@@ -551,7 +551,8 @@ cryptodev_kasumi_create(const char *name,
+@@ -557,6 +557,7 @@ cryptodev_kasumi_create(const char *name,
+ 
  	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
  			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
- 			RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA |
--			RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
-+			RTE_CRYPTODEV_FF_SYM_SESSIONLESS |
-+			RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT;
++			RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT |
+ 			cpu_flags;
  
- 	mgr = alloc_mb_mgr(0);
- 	if (mgr == NULL)
+ 	internals = dev->data->dev_private;
 diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
-index 558e01e70..962868e1f 100644
+index 2b1b90b01..32d94c5ab 100644
 --- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
 +++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
-@@ -563,7 +563,8 @@ cryptodev_snow3g_create(const char *name,
+@@ -568,6 +568,7 @@ cryptodev_snow3g_create(const char *name,
+ 
  	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
  			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
- 			RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA |
--			RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
-+			RTE_CRYPTODEV_FF_SYM_SESSIONLESS |
-+			RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT;
++			RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT |
+ 			cpu_flags;
  
- 	mgr = alloc_mb_mgr(0);
- 	if (mgr == NULL)
+ 	internals = dev->data->dev_private;
 diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
-index 20cb5a160..a9ff31828 100644
+index 265aabaeb..bc02d9d4a 100644
 --- a/drivers/crypto/zuc/rte_zuc_pmd.c
 +++ b/drivers/crypto/zuc/rte_zuc_pmd.c
-@@ -480,7 +480,8 @@ cryptodev_zuc_create(const char *name,
+@@ -476,6 +476,7 @@ cryptodev_zuc_create(const char *name,
+ 
  	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
  			RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
- 			RTE_CRYPTODEV_FF_NON_BYTE_ALIGNED_DATA |
--			RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
-+			RTE_CRYPTODEV_FF_SYM_SESSIONLESS |
-+			RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT;
++			RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT |
+ 			cpu_flags;
  
- 	mb_mgr = alloc_mb_mgr(0);
- 	if (mb_mgr == NULL)
+ 	internals = dev->data->dev_private;
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'test/crypto: fix asymmetric session mempool creation' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (90 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'drivers/crypto: add missing OOP feature flag' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'common/cpt: fix encryption offset' " luca.boccassi
                   ` (99 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Adam Dybkowski; +Cc: Fiona Trahe, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 656aac2d399dbcdd5ed0bbc4f2311324236d2550 Mon Sep 17 00:00:00 2001
From: Adam Dybkowski <adamx.dybkowski@intel.com>
Date: Mon, 8 Jun 2020 15:15:01 +0200
Subject: [PATCH] test/crypto: fix asymmetric session mempool creation

[ upstream commit 0ad83afdf3352e5e61e8c137131524ee6b2506ce ]

This patch fixes the element size of the mempool used
for allocating asym crypto sessions and their private data.

Fixes: 2c6dab9cd93d ("test/crypto: add RSA and Mod tests")

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 app/test/test_cryptodev_asym.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index 69df29304..a0802994f 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -933,8 +933,9 @@ testsuite_setup(void)
 	}
 
 	/* setup asym session pool */
-	unsigned int session_size =
-		rte_cryptodev_asym_get_private_session_size(dev_id);
+	unsigned int session_size = RTE_MAX(
+		rte_cryptodev_asym_get_private_session_size(dev_id),
+		rte_cryptodev_asym_get_header_session_size());
 	/*
 	 * Create mempool with TEST_NUM_SESSIONS * 2,
 	 * to include the session headers
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.127793508 +0100
+++ 0093-test-crypto-fix-asymmetric-session-mempool-creation.patch	2020-07-24 12:53:48.319007056 +0100
@@ -1,13 +1,14 @@
-From 0ad83afdf3352e5e61e8c137131524ee6b2506ce Mon Sep 17 00:00:00 2001
+From 656aac2d399dbcdd5ed0bbc4f2311324236d2550 Mon Sep 17 00:00:00 2001
 From: Adam Dybkowski <adamx.dybkowski@intel.com>
 Date: Mon, 8 Jun 2020 15:15:01 +0200
 Subject: [PATCH] test/crypto: fix asymmetric session mempool creation
 
+[ upstream commit 0ad83afdf3352e5e61e8c137131524ee6b2506ce ]
+
 This patch fixes the element size of the mempool used
 for allocating asym crypto sessions and their private data.
 
 Fixes: 2c6dab9cd93d ("test/crypto: add RSA and Mod tests")
-Cc: stable@dpdk.org
 
 Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
 Acked-by: Fiona Trahe <fiona.trahe@intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
-index b8e050048..dc62ed7bf 100644
+index 69df29304..a0802994f 100644
 --- a/app/test/test_cryptodev_asym.c
 +++ b/app/test/test_cryptodev_asym.c
-@@ -935,8 +935,9 @@ testsuite_setup(void)
+@@ -933,8 +933,9 @@ testsuite_setup(void)
  	}
  
  	/* setup asym session pool */

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

* [dpdk-stable] patch 'common/cpt: fix encryption offset' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (91 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'test/crypto: fix asymmetric session mempool creation' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'crypto/qat: fix AES-XTS capabilities' " luca.boccassi
                   ` (98 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Ankur Dwivedi; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 094550b236fd9acc5954a910b5c1ec8e953351d1 Mon Sep 17 00:00:00 2001
From: Ankur Dwivedi <adwivedi@marvell.com>
Date: Fri, 3 Jul 2020 11:11:37 +0530
Subject: [PATCH] common/cpt: fix encryption offset

[ upstream commit 0058f30514f13e5d5412e97973a9c9254e36edb1 ]

In case of gmac auth the encryption offset should be set to zero.

Fixes: b74652f3a91f ("common/cpt: add microcode interface for encryption")
Fixes: 177b41ceee61 ("common/cpt: add microcode interface for decryption")

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
---
 drivers/common/cpt/cpt_ucode.h | 24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
index 9dc0fc652..e92e3678c 100644
--- a/drivers/common/cpt/cpt_ucode.h
+++ b/drivers/common/cpt/cpt_ucode.h
@@ -718,9 +718,6 @@ cpt_enc_hmac_prep(uint32_t flags,
 	m_vaddr = (uint8_t *)m_vaddr + size;
 	m_dma += size;
 
-	if (hash_type == GMAC_TYPE)
-		encr_data_len = 0;
-
 	if (unlikely(!(flags & VALID_IV_BUF))) {
 		iv_len = 0;
 		iv_offset = ENCR_IV_OFFSET(d_offs);
@@ -752,6 +749,11 @@ cpt_enc_hmac_prep(uint32_t flags,
 	opcode.s.major = CPT_MAJOR_OP_FC;
 	opcode.s.minor = 0;
 
+	if (hash_type == GMAC_TYPE) {
+		encr_offset = 0;
+		encr_data_len = 0;
+	}
+
 	auth_dlen = auth_offset + auth_data_len;
 	enc_dlen = encr_data_len + encr_offset;
 	if (unlikely(encr_data_len & 0xf)) {
@@ -762,11 +764,6 @@ cpt_enc_hmac_prep(uint32_t flags,
 			enc_dlen = ROUNDUP16(encr_data_len) + encr_offset;
 	}
 
-	if (unlikely(hash_type == GMAC_TYPE)) {
-		encr_offset = auth_dlen;
-		enc_dlen = 0;
-	}
-
 	if (unlikely(auth_dlen > enc_dlen)) {
 		inputlen = auth_dlen;
 		outputlen = auth_dlen + mac_len;
@@ -1069,9 +1066,6 @@ cpt_dec_hmac_prep(uint32_t flags,
 	hash_type = cpt_ctx->hash_type;
 	mac_len = cpt_ctx->mac_len;
 
-	if (hash_type == GMAC_TYPE)
-		encr_data_len = 0;
-
 	if (unlikely(!(flags & VALID_IV_BUF))) {
 		iv_len = 0;
 		iv_offset = ENCR_IV_OFFSET(d_offs);
@@ -1128,6 +1122,11 @@ cpt_dec_hmac_prep(uint32_t flags,
 	opcode.s.major = CPT_MAJOR_OP_FC;
 	opcode.s.minor = 1;
 
+	if (hash_type == GMAC_TYPE) {
+		encr_offset = 0;
+		encr_data_len = 0;
+	}
+
 	enc_dlen = encr_offset + encr_data_len;
 	auth_dlen = auth_offset + auth_data_len;
 
@@ -1139,9 +1138,6 @@ cpt_dec_hmac_prep(uint32_t flags,
 		outputlen = enc_dlen;
 	}
 
-	if (hash_type == GMAC_TYPE)
-		encr_offset = inputlen;
-
 	vq_cmd_w0.u64 = 0;
 	vq_cmd_w0.s.param1 = encr_data_len;
 	vq_cmd_w0.s.param2 = auth_data_len;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.168539463 +0100
+++ 0094-common-cpt-fix-encryption-offset.patch	2020-07-24 12:53:48.323007130 +0100
@@ -1,13 +1,14 @@
-From 0058f30514f13e5d5412e97973a9c9254e36edb1 Mon Sep 17 00:00:00 2001
+From 094550b236fd9acc5954a910b5c1ec8e953351d1 Mon Sep 17 00:00:00 2001
 From: Ankur Dwivedi <adwivedi@marvell.com>
 Date: Fri, 3 Jul 2020 11:11:37 +0530
 Subject: [PATCH] common/cpt: fix encryption offset
 
+[ upstream commit 0058f30514f13e5d5412e97973a9c9254e36edb1 ]
+
 In case of gmac auth the encryption offset should be set to zero.
 
 Fixes: b74652f3a91f ("common/cpt: add microcode interface for encryption")
 Fixes: 177b41ceee61 ("common/cpt: add microcode interface for decryption")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
 ---
@@ -15,10 +16,10 @@
  1 file changed, 10 insertions(+), 14 deletions(-)
 
 diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
-index 34ccd08a4..ab595eb58 100644
+index 9dc0fc652..e92e3678c 100644
 --- a/drivers/common/cpt/cpt_ucode.h
 +++ b/drivers/common/cpt/cpt_ucode.h
-@@ -682,9 +682,6 @@ cpt_enc_hmac_prep(uint32_t flags,
+@@ -718,9 +718,6 @@ cpt_enc_hmac_prep(uint32_t flags,
  	m_vaddr = (uint8_t *)m_vaddr + size;
  	m_dma += size;
  
@@ -28,7 +29,7 @@
  	if (unlikely(!(flags & VALID_IV_BUF))) {
  		iv_len = 0;
  		iv_offset = ENCR_IV_OFFSET(d_offs);
-@@ -716,6 +713,11 @@ cpt_enc_hmac_prep(uint32_t flags,
+@@ -752,6 +749,11 @@ cpt_enc_hmac_prep(uint32_t flags,
  	opcode.s.major = CPT_MAJOR_OP_FC;
  	opcode.s.minor = 0;
  
@@ -40,7 +41,7 @@
  	auth_dlen = auth_offset + auth_data_len;
  	enc_dlen = encr_data_len + encr_offset;
  	if (unlikely(encr_data_len & 0xf)) {
-@@ -726,11 +728,6 @@ cpt_enc_hmac_prep(uint32_t flags,
+@@ -762,11 +764,6 @@ cpt_enc_hmac_prep(uint32_t flags,
  			enc_dlen = ROUNDUP16(encr_data_len) + encr_offset;
  	}
  
@@ -52,7 +53,7 @@
  	if (unlikely(auth_dlen > enc_dlen)) {
  		inputlen = auth_dlen;
  		outputlen = auth_dlen + mac_len;
-@@ -1033,9 +1030,6 @@ cpt_dec_hmac_prep(uint32_t flags,
+@@ -1069,9 +1066,6 @@ cpt_dec_hmac_prep(uint32_t flags,
  	hash_type = cpt_ctx->hash_type;
  	mac_len = cpt_ctx->mac_len;
  
@@ -62,7 +63,7 @@
  	if (unlikely(!(flags & VALID_IV_BUF))) {
  		iv_len = 0;
  		iv_offset = ENCR_IV_OFFSET(d_offs);
-@@ -1092,6 +1086,11 @@ cpt_dec_hmac_prep(uint32_t flags,
+@@ -1128,6 +1122,11 @@ cpt_dec_hmac_prep(uint32_t flags,
  	opcode.s.major = CPT_MAJOR_OP_FC;
  	opcode.s.minor = 1;
  
@@ -74,7 +75,7 @@
  	enc_dlen = encr_offset + encr_data_len;
  	auth_dlen = auth_offset + auth_data_len;
  
-@@ -1103,9 +1102,6 @@ cpt_dec_hmac_prep(uint32_t flags,
+@@ -1139,9 +1138,6 @@ cpt_dec_hmac_prep(uint32_t flags,
  		outputlen = enc_dlen;
  	}
  

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

* [dpdk-stable] patch 'crypto/qat: fix AES-XTS capabilities' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (92 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'common/cpt: fix encryption offset' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'crypto/dpaax_sec: fix 18-bit PDCP cases with HFN override' " luca.boccassi
                   ` (97 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Adam Dybkowski; +Cc: Fiona Trahe, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From ccfb5eed19ae1b382590818c17aa7550dcecc149 Mon Sep 17 00:00:00 2001
From: Adam Dybkowski <adamx.dybkowski@intel.com>
Date: Fri, 26 Jun 2020 13:23:42 +0200
Subject: [PATCH] crypto/qat: fix AES-XTS capabilities

[ upstream commit 12e4f2b7197d54fe358c98f633b9c4fdacfaa67e ]

This patch fixes the increment field of the AES-XTS cipher key size.

Fixes: 7d5ef3bb32cd ("crypto/qat: support XTS")

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
 drivers/crypto/qat/qat_sym_capabilities.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/qat/qat_sym_capabilities.h b/drivers/crypto/qat/qat_sym_capabilities.h
index dbeea4340..8591795aa 100644
--- a/drivers/crypto/qat/qat_sym_capabilities.h
+++ b/drivers/crypto/qat/qat_sym_capabilities.h
@@ -419,7 +419,7 @@
 				.key_size = {				\
 					.min = 32,			\
 					.max = 64,			\
-					.increment = 0			\
+					.increment = 32			\
 				},					\
 				.iv_size = {				\
 					.min = 16,			\
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.208046795 +0100
+++ 0095-crypto-qat-fix-AES-XTS-capabilities.patch	2020-07-24 12:53:48.323007130 +0100
@@ -1,12 +1,13 @@
-From 12e4f2b7197d54fe358c98f633b9c4fdacfaa67e Mon Sep 17 00:00:00 2001
+From ccfb5eed19ae1b382590818c17aa7550dcecc149 Mon Sep 17 00:00:00 2001
 From: Adam Dybkowski <adamx.dybkowski@intel.com>
 Date: Fri, 26 Jun 2020 13:23:42 +0200
 Subject: [PATCH] crypto/qat: fix AES-XTS capabilities
 
+[ upstream commit 12e4f2b7197d54fe358c98f633b9c4fdacfaa67e ]
+
 This patch fixes the increment field of the AES-XTS cipher key size.
 
 Fixes: 7d5ef3bb32cd ("crypto/qat: support XTS")
-Cc: stable@dpdk.org
 
 Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
 Acked-by: Fiona Trahe <fiona.trahe@intel.com>
@@ -15,7 +16,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/crypto/qat/qat_sym_capabilities.h b/drivers/crypto/qat/qat_sym_capabilities.h
-index 7b8b13b4f..b16581fff 100644
+index dbeea4340..8591795aa 100644
 --- a/drivers/crypto/qat/qat_sym_capabilities.h
 +++ b/drivers/crypto/qat/qat_sym_capabilities.h
 @@ -419,7 +419,7 @@

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

* [dpdk-stable] patch 'crypto/dpaax_sec: fix 18-bit PDCP cases with HFN override' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (93 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'crypto/qat: fix AES-XTS capabilities' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'crypto/dpaax_sec: fix inline query for descriptors' " luca.boccassi
                   ` (96 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Akhil Goyal; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From a0ba121fcbf194c0a17c8db2508b75677dc3f769 Mon Sep 17 00:00:00 2001
From: Akhil Goyal <akhil.goyal@nxp.com>
Date: Mon, 1 Jun 2020 22:47:45 +0530
Subject: [PATCH] crypto/dpaax_sec: fix 18-bit PDCP cases with HFN override

[ upstream commit f6ab96f13d7a23b39fb5135b64ed8e99c425c7a9 ]

In case of RTA_SEC_ERA = 8, where the length of shared desc
is large for some of PDCP cases, the descriptor buffer cannot
hold 2 extra words when HFN override is enabled. As a result,
the descriptor fails.

This patch converts one of the keys from immediate key to
reference key hence reducing the length of the descriptor.

Fixes: 2e4cbdb4b2c2 ("crypto/dpaax_sec: support PDCP U-Plane with integrity")

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/common/dpaax/caamflib/desc/pdcp.h   | 44 +++++++++++++++++++++
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c |  8 ++++
 drivers/crypto/dpaa_sec/dpaa_sec.c          | 33 +++-------------
 3 files changed, 58 insertions(+), 27 deletions(-)

diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h
index b5e2d24e4..99eb0f71a 100644
--- a/drivers/common/dpaax/caamflib/desc/pdcp.h
+++ b/drivers/common/dpaax/caamflib/desc/pdcp.h
@@ -262,6 +262,50 @@ enum pdb_type_e {
 	PDCP_PDB_TYPE_INVALID
 };
 
+/**
+ * rta_inline_pdcp_query() - Provide indications if a key can be passed as
+ *                           immediate data or shall be referenced in a
+ *                           shared descriptor.
+ * Return: 0 if data can be inlined or 1 if referenced.
+ */
+static inline int
+rta_inline_pdcp_query(enum auth_type_pdcp auth_alg,
+		      enum cipher_type_pdcp cipher_alg,
+		      enum pdcp_sn_size sn_size,
+		      int8_t hfn_ovd)
+{
+	/**
+	 * Shared Descriptors for some of the cases does not fit in the
+	 * MAX_DESC_SIZE of the descriptor especially when non-protocol
+	 * descriptors are formed as in 18bit cases and when HFN override
+	 * is enabled as 2 extra words are added in the job descriptor.
+	 * The cases which exceed are for RTA_SEC_ERA=8 and HFN override
+	 * enabled and 18bit uplane and either of following Algo combinations.
+	 * - SNOW-AES
+	 * - AES-SNOW
+	 * - SNOW-SNOW
+	 * - ZUC-SNOW
+	 *
+	 * We cannot make inline for all cases, as this will impact performance
+	 * due to extra memory accesses for the keys.
+	 */
+	if ((rta_sec_era == RTA_SEC_ERA_8) && hfn_ovd &&
+			(sn_size == PDCP_SN_SIZE_18) &&
+			((cipher_alg == PDCP_CIPHER_TYPE_SNOW &&
+				auth_alg == PDCP_AUTH_TYPE_AES) ||
+			(cipher_alg == PDCP_CIPHER_TYPE_AES &&
+				auth_alg == PDCP_AUTH_TYPE_SNOW) ||
+			(cipher_alg == PDCP_CIPHER_TYPE_SNOW &&
+				auth_alg == PDCP_AUTH_TYPE_SNOW) ||
+			(cipher_alg == PDCP_CIPHER_TYPE_ZUC &&
+				auth_alg == PDCP_AUTH_TYPE_SNOW))) {
+
+		return 1;
+	}
+
+	return 0;
+}
+
 /*
  * Function for appending the portion of a PDCP Control Plane shared descriptor
  * which performs NULL encryption and integrity (i.e. copies the input frame
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 6ed2701ab..434310cfd 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -3145,6 +3145,14 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,
 		goto out;
 	}
 
+	if (rta_inline_pdcp_query(authdata.algtype,
+				cipherdata.algtype,
+				session->pdcp.sn_size,
+				session->pdcp.hfn_ovd)) {
+		cipherdata.key = DPAA2_VADDR_TO_IOVA(cipherdata.key);
+		cipherdata.key_type = RTA_DATA_PTR;
+	}
+
 	if (pdcp_xform->domain == RTE_SECURITY_PDCP_MODE_CONTROL) {
 		if (session->dir == DIR_ENC)
 			bufsize = cnstr_shdsc_pdcp_c_plane_encap(
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index df684d265..4442469e2 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -237,7 +237,6 @@ dpaa_sec_prep_pdcp_cdb(dpaa_sec_session *ses)
 	struct sec_cdb *cdb = &ses->cdb;
 	struct alginfo *p_authdata = NULL;
 	int32_t shared_desc_len = 0;
-	int err;
 #if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
 	int swap = false;
 #else
@@ -251,10 +250,6 @@ dpaa_sec_prep_pdcp_cdb(dpaa_sec_session *ses)
 	cipherdata.algtype = ses->cipher_key.alg;
 	cipherdata.algmode = ses->cipher_key.algmode;
 
-	cdb->sh_desc[0] = cipherdata.keylen;
-	cdb->sh_desc[1] = 0;
-	cdb->sh_desc[2] = 0;
-
 	if (ses->auth_alg) {
 		authdata.key = (size_t)ses->auth_key.data;
 		authdata.keylen = ses->auth_key.length;
@@ -264,33 +259,17 @@ dpaa_sec_prep_pdcp_cdb(dpaa_sec_session *ses)
 		authdata.algmode = ses->auth_key.algmode;
 
 		p_authdata = &authdata;
-
-		cdb->sh_desc[1] = authdata.keylen;
-	}
-
-	err = rta_inline_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN,
-			       MIN_JOB_DESC_SIZE,
-			       (unsigned int *)cdb->sh_desc,
-			       &cdb->sh_desc[2], 2);
-	if (err < 0) {
-		DPAA_SEC_ERR("Crypto: Incorrect key lengths");
-		return err;
 	}
 
-	if (!(cdb->sh_desc[2] & 1) && cipherdata.keylen) {
+	if (rta_inline_pdcp_query(authdata.algtype,
+				cipherdata.algtype,
+				ses->pdcp.sn_size,
+				ses->pdcp.hfn_ovd)) {
 		cipherdata.key =
-			(size_t)rte_dpaa_mem_vtop((void *)(size_t)cipherdata.key);
+			(size_t)rte_dpaa_mem_vtop((void *)
+					(size_t)cipherdata.key);
 		cipherdata.key_type = RTA_DATA_PTR;
 	}
-	if (!(cdb->sh_desc[2] & (1 << 1)) &&  authdata.keylen) {
-		authdata.key =
-			(size_t)rte_dpaa_mem_vtop((void *)(size_t)authdata.key);
-		authdata.key_type = RTA_DATA_PTR;
-	}
-
-	cdb->sh_desc[0] = 0;
-	cdb->sh_desc[1] = 0;
-	cdb->sh_desc[2] = 0;
 
 	if (ses->pdcp.domain == RTE_SECURITY_PDCP_MODE_CONTROL) {
 		if (ses->dir == DIR_ENC)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.244900566 +0100
+++ 0096-crypto-dpaax_sec-fix-18-bit-PDCP-cases-with-HFN-over.patch	2020-07-24 12:53:48.331007279 +0100
@@ -1,8 +1,10 @@
-From f6ab96f13d7a23b39fb5135b64ed8e99c425c7a9 Mon Sep 17 00:00:00 2001
+From a0ba121fcbf194c0a17c8db2508b75677dc3f769 Mon Sep 17 00:00:00 2001
 From: Akhil Goyal <akhil.goyal@nxp.com>
 Date: Mon, 1 Jun 2020 22:47:45 +0530
 Subject: [PATCH] crypto/dpaax_sec: fix 18-bit PDCP cases with HFN override
 
+[ upstream commit f6ab96f13d7a23b39fb5135b64ed8e99c425c7a9 ]
+
 In case of RTA_SEC_ERA = 8, where the length of shared desc
 is large for some of PDCP cases, the descriptor buffer cannot
 hold 2 extra words when HFN override is enabled. As a result,
@@ -12,7 +14,6 @@
 reference key hence reducing the length of the descriptor.
 
 Fixes: 2e4cbdb4b2c2 ("crypto/dpaax_sec: support PDCP U-Plane with integrity")
-Cc: stable@dpdk.org
 
 Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
 Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
@@ -78,10 +79,10 @@
   * Function for appending the portion of a PDCP Control Plane shared descriptor
   * which performs NULL encryption and integrity (i.e. copies the input frame
 diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
-index 12f833136..60fdced78 100644
+index 6ed2701ab..434310cfd 100644
 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
 +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
-@@ -3154,6 +3154,14 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,
+@@ -3145,6 +3145,14 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev,
  		goto out;
  	}
  
@@ -97,10 +98,10 @@
  		if (session->dir == DIR_ENC)
  			bufsize = cnstr_shdsc_pdcp_c_plane_encap(
 diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
-index d9fa8bb36..01e79c8ea 100644
+index df684d265..4442469e2 100644
 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c
 +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
-@@ -240,7 +240,6 @@ dpaa_sec_prep_pdcp_cdb(dpaa_sec_session *ses)
+@@ -237,7 +237,6 @@ dpaa_sec_prep_pdcp_cdb(dpaa_sec_session *ses)
  	struct sec_cdb *cdb = &ses->cdb;
  	struct alginfo *p_authdata = NULL;
  	int32_t shared_desc_len = 0;
@@ -108,7 +109,7 @@
  #if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
  	int swap = false;
  #else
-@@ -254,10 +253,6 @@ dpaa_sec_prep_pdcp_cdb(dpaa_sec_session *ses)
+@@ -251,10 +250,6 @@ dpaa_sec_prep_pdcp_cdb(dpaa_sec_session *ses)
  	cipherdata.algtype = ses->cipher_key.alg;
  	cipherdata.algmode = ses->cipher_key.algmode;
  
@@ -119,7 +120,7 @@
  	if (ses->auth_alg) {
  		authdata.key = (size_t)ses->auth_key.data;
  		authdata.keylen = ses->auth_key.length;
-@@ -267,33 +262,17 @@ dpaa_sec_prep_pdcp_cdb(dpaa_sec_session *ses)
+@@ -264,33 +259,17 @@ dpaa_sec_prep_pdcp_cdb(dpaa_sec_session *ses)
  		authdata.algmode = ses->auth_key.algmode;
  
  		p_authdata = &authdata;

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

* [dpdk-stable] patch 'crypto/dpaax_sec: fix inline query for descriptors' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (94 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'crypto/dpaax_sec: fix 18-bit PDCP cases with HFN override' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix HFN override' " luca.boccassi
                   ` (95 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Akhil Goyal; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 9b5cf4fecdee61d25ba9cc32d880d117b6f66c89 Mon Sep 17 00:00:00 2001
From: Akhil Goyal <akhil.goyal@nxp.com>
Date: Fri, 5 Jun 2020 01:34:10 +0530
Subject: [PATCH] crypto/dpaax_sec: fix inline query for descriptors

[ upstream commit 453b9593a3cfe62ce1f64c65382090ec8adb3ec0 ]

The maximum length of job descriptor which is formed
is 13 words and hence rta_inline_query should take
care of the max descriptor(shared + job) lengths and
thus find out of the key can be referenced or immediate.

Fixes: 05b12700cd4c ("crypto/dpaa_sec: support null algos for protocol offload")
Fixes: 13273250eec5 ("crypto/dpaa2_sec: support AES-GCM and CTR")

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/common/dpaax/caamflib/desc.h        | 2 +-
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 4 ++--
 drivers/crypto/dpaa_sec/dpaa_sec.c          | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/common/dpaax/caamflib/desc.h b/drivers/common/dpaax/caamflib/desc.h
index e4139aaa9..635d6bad0 100644
--- a/drivers/common/dpaax/caamflib/desc.h
+++ b/drivers/common/dpaax/caamflib/desc.h
@@ -26,7 +26,7 @@ extern enum rta_sec_era rta_sec_era;
 #define CAAM_CMD_SZ sizeof(uint32_t)
 #define CAAM_PTR_SZ sizeof(dma_addr_t)
 #define CAAM_DESC_BYTES_MAX (CAAM_CMD_SZ * MAX_CAAM_DESCSIZE)
-#define DESC_JOB_IO_LEN (CAAM_CMD_SZ * 5 + CAAM_PTR_SZ * 3)
+#define DESC_JOB_IO_LEN (CAAM_CMD_SZ * 7 + CAAM_PTR_SZ * 3)
 
 /* Block size of any entity covered/uncovered with a KEK/TKEK */
 #define KEK_BLOCKSIZE		16
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 434310cfd..9f8399e2b 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2192,7 +2192,7 @@ dpaa2_sec_aead_init(struct rte_cryptodev *dev,
 
 	priv->flc_desc[0].desc[0] = aeaddata.keylen;
 	err = rta_inline_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN,
-			       MIN_JOB_DESC_SIZE,
+			       DESC_JOB_IO_LEN,
 			       (unsigned int *)priv->flc_desc[0].desc,
 			       &priv->flc_desc[0].desc[1], 1);
 
@@ -2410,7 +2410,7 @@ dpaa2_sec_aead_chain_init(struct rte_cryptodev *dev,
 	priv->flc_desc[0].desc[0] = cipherdata.keylen;
 	priv->flc_desc[0].desc[1] = authdata.keylen;
 	err = rta_inline_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN,
-			       MIN_JOB_DESC_SIZE,
+			       DESC_JOB_IO_LEN,
 			       (unsigned int *)priv->flc_desc[0].desc,
 			       &priv->flc_desc[0].desc[2], 2);
 
diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 4442469e2..35f1feac4 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -348,7 +348,7 @@ dpaa_sec_prep_ipsec_cdb(dpaa_sec_session *ses)
 	cdb->sh_desc[0] = cipherdata.keylen;
 	cdb->sh_desc[1] = authdata.keylen;
 	err = rta_inline_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN,
-			       MIN_JOB_DESC_SIZE,
+			       DESC_JOB_IO_LEN,
 			       (unsigned int *)cdb->sh_desc,
 			       &cdb->sh_desc[2], 2);
 
@@ -534,7 +534,7 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses)
 		cdb->sh_desc[0] = alginfo_c.keylen;
 		cdb->sh_desc[1] = alginfo_a.keylen;
 		err = rta_inline_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN,
-				       MIN_JOB_DESC_SIZE,
+				       DESC_JOB_IO_LEN,
 				       (unsigned int *)cdb->sh_desc,
 				       &cdb->sh_desc[2], 2);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.287828866 +0100
+++ 0097-crypto-dpaax_sec-fix-inline-query-for-descriptors.patch	2020-07-24 12:53:48.339007429 +0100
@@ -1,8 +1,10 @@
-From 453b9593a3cfe62ce1f64c65382090ec8adb3ec0 Mon Sep 17 00:00:00 2001
+From 9b5cf4fecdee61d25ba9cc32d880d117b6f66c89 Mon Sep 17 00:00:00 2001
 From: Akhil Goyal <akhil.goyal@nxp.com>
 Date: Fri, 5 Jun 2020 01:34:10 +0530
 Subject: [PATCH] crypto/dpaax_sec: fix inline query for descriptors
 
+[ upstream commit 453b9593a3cfe62ce1f64c65382090ec8adb3ec0 ]
+
 The maximum length of job descriptor which is formed
 is 13 words and hence rta_inline_query should take
 care of the max descriptor(shared + job) lengths and
@@ -10,7 +12,6 @@
 
 Fixes: 05b12700cd4c ("crypto/dpaa_sec: support null algos for protocol offload")
 Fixes: 13273250eec5 ("crypto/dpaa2_sec: support AES-GCM and CTR")
-Cc: stable@dpdk.org
 
 Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
 Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
@@ -34,7 +35,7 @@
  /* Block size of any entity covered/uncovered with a KEK/TKEK */
  #define KEK_BLOCKSIZE		16
 diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
-index 60fdced78..c56fb2152 100644
+index 434310cfd..9f8399e2b 100644
 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
 +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
 @@ -2192,7 +2192,7 @@ dpaa2_sec_aead_init(struct rte_cryptodev *dev,
@@ -46,7 +47,7 @@
  			       (unsigned int *)priv->flc_desc[0].desc,
  			       &priv->flc_desc[0].desc[1], 1);
  
-@@ -2416,7 +2416,7 @@ dpaa2_sec_aead_chain_init(struct rte_cryptodev *dev,
+@@ -2410,7 +2410,7 @@ dpaa2_sec_aead_chain_init(struct rte_cryptodev *dev,
  	priv->flc_desc[0].desc[0] = cipherdata.keylen;
  	priv->flc_desc[0].desc[1] = authdata.keylen;
  	err = rta_inline_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN,
@@ -56,10 +57,10 @@
  			       &priv->flc_desc[0].desc[2], 2);
  
 diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
-index 01e79c8ea..5ce7e3582 100644
+index 4442469e2..35f1feac4 100644
 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c
 +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
-@@ -351,7 +351,7 @@ dpaa_sec_prep_ipsec_cdb(dpaa_sec_session *ses)
+@@ -348,7 +348,7 @@ dpaa_sec_prep_ipsec_cdb(dpaa_sec_session *ses)
  	cdb->sh_desc[0] = cipherdata.keylen;
  	cdb->sh_desc[1] = authdata.keylen;
  	err = rta_inline_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN,
@@ -68,7 +69,7 @@
  			       (unsigned int *)cdb->sh_desc,
  			       &cdb->sh_desc[2], 2);
  
-@@ -537,7 +537,7 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses)
+@@ -534,7 +534,7 @@ dpaa_sec_prep_cdb(dpaa_sec_session *ses)
  		cdb->sh_desc[0] = alginfo_c.keylen;
  		cdb->sh_desc[1] = alginfo_a.keylen;
  		err = rta_inline_query(IPSEC_AUTH_VAR_AES_DEC_BASE_DESC_LEN,

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

* [dpdk-stable] patch 'crypto/dpaa2_sec: fix HFN override' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (95 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'crypto/dpaax_sec: fix inline query for descriptors' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'common/dpaax: fix 12-bit null auth case' " luca.boccassi
                   ` (94 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Akhil Goyal; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From a11062d5d3a0ead9c215621f5b78d7ca502cf8d8 Mon Sep 17 00:00:00 2001
From: Akhil Goyal <akhil.goyal@nxp.com>
Date: Fri, 14 Feb 2020 15:35:18 +0530
Subject: [PATCH] crypto/dpaa2_sec: fix HFN override

[ upstream commit 91d581dc1b6f5164c63cc7a3f857a1d72b231d47 ]

HFN is set as a uint32_t but the value retrieved is
uint8_t. Fixed the type casting to get the correct value.

Fixes: bef594ec5cc8 ("crypto/dpaa2_sec: support PDCP offload")
Fixes: af61f0750948 ("crypto/dpaa2_sec: support scatter gather for proto offloads")

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 9f8399e2b..0cc98b3c2 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  *
  *   Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved.
- *   Copyright 2016-2019 NXP
+ *   Copyright 2016-2020 NXP
  *
  */
 
@@ -168,7 +168,8 @@ build_proto_compound_sg_fd(dpaa2_sec_session *sess,
 	 * mbuf priv after sym_op.
 	 */
 	if (sess->ctxt_type == DPAA2_SEC_PDCP && sess->pdcp.hfn_ovd) {
-		uint32_t hfn_ovd = *((uint8_t *)op + sess->pdcp.hfn_ovd_offset);
+		uint32_t hfn_ovd = *(uint32_t *)((uint8_t *)op +
+					sess->pdcp.hfn_ovd_offset);
 		/*enable HFN override override */
 		DPAA2_SET_FLE_INTERNAL_JD(ip_fle, hfn_ovd);
 		DPAA2_SET_FLE_INTERNAL_JD(op_fle, hfn_ovd);
@@ -243,7 +244,8 @@ build_proto_compound_fd(dpaa2_sec_session *sess,
 	 * mbuf priv after sym_op.
 	 */
 	if (sess->ctxt_type == DPAA2_SEC_PDCP && sess->pdcp.hfn_ovd) {
-		uint32_t hfn_ovd = *((uint8_t *)op + sess->pdcp.hfn_ovd_offset);
+		uint32_t hfn_ovd = *(uint32_t *)((uint8_t *)op +
+					sess->pdcp.hfn_ovd_offset);
 		/*enable HFN override override */
 		DPAA2_SET_FLE_INTERNAL_JD(ip_fle, hfn_ovd);
 		DPAA2_SET_FLE_INTERNAL_JD(op_fle, hfn_ovd);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.332640773 +0100
+++ 0098-crypto-dpaa2_sec-fix-HFN-override.patch	2020-07-24 12:53:48.339007429 +0100
@@ -1,14 +1,15 @@
-From 91d581dc1b6f5164c63cc7a3f857a1d72b231d47 Mon Sep 17 00:00:00 2001
+From a11062d5d3a0ead9c215621f5b78d7ca502cf8d8 Mon Sep 17 00:00:00 2001
 From: Akhil Goyal <akhil.goyal@nxp.com>
 Date: Fri, 14 Feb 2020 15:35:18 +0530
 Subject: [PATCH] crypto/dpaa2_sec: fix HFN override
 
+[ upstream commit 91d581dc1b6f5164c63cc7a3f857a1d72b231d47 ]
+
 HFN is set as a uint32_t but the value retrieved is
 uint8_t. Fixed the type casting to get the correct value.
 
 Fixes: bef594ec5cc8 ("crypto/dpaa2_sec: support PDCP offload")
 Fixes: af61f0750948 ("crypto/dpaa2_sec: support scatter gather for proto offloads")
-Cc: stable@dpdk.org
 
 Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
 Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
@@ -17,7 +18,7 @@
  1 file changed, 5 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
-index c56fb2152..109e61ae1 100644
+index 9f8399e2b..0cc98b3c2 100644
 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
 +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
 @@ -1,7 +1,7 @@
@@ -29,7 +30,7 @@
   *
   */
  
-@@ -164,7 +164,8 @@ build_proto_compound_sg_fd(dpaa2_sec_session *sess,
+@@ -168,7 +168,8 @@ build_proto_compound_sg_fd(dpaa2_sec_session *sess,
  	 * mbuf priv after sym_op.
  	 */
  	if (sess->ctxt_type == DPAA2_SEC_PDCP && sess->pdcp.hfn_ovd) {
@@ -39,7 +40,7 @@
  		/*enable HFN override override */
  		DPAA2_SET_FLE_INTERNAL_JD(ip_fle, hfn_ovd);
  		DPAA2_SET_FLE_INTERNAL_JD(op_fle, hfn_ovd);
-@@ -239,7 +240,8 @@ build_proto_compound_fd(dpaa2_sec_session *sess,
+@@ -243,7 +244,8 @@ build_proto_compound_fd(dpaa2_sec_session *sess,
  	 * mbuf priv after sym_op.
  	 */
  	if (sess->ctxt_type == DPAA2_SEC_PDCP && sess->pdcp.hfn_ovd) {

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

* [dpdk-stable] patch 'common/dpaax: fix 12-bit null auth case' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (96 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix HFN override' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'eventdev: fix race condition on timer list counter' " luca.boccassi
                   ` (93 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Akhil Goyal; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 8d4e11926d3afc849a98ea2416c7c5d3ed570083 Mon Sep 17 00:00:00 2001
From: Akhil Goyal <akhil.goyal@nxp.com>
Date: Wed, 8 Jan 2020 18:22:31 +0530
Subject: [PATCH] common/dpaax: fix 12-bit null auth case

[ upstream commit b86a32234f67560068f8388077846ac35ca81f17 ]

In cases of NULL auth in PDCP, the descriptors
should be based on ALGORITHM command instead of
PROTOCOL command.
It was done in case of encap, but was missing in
decap.

Fixes: 526cdf60f1e5 ("crypto/dpaa2_sec: update desc for PDCP 18-bit enc-auth")

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/common/dpaax/caamflib/desc/pdcp.h | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h
index 99eb0f71a..476115323 100644
--- a/drivers/common/dpaax/caamflib/desc/pdcp.h
+++ b/drivers/common/dpaax/caamflib/desc/pdcp.h
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: BSD-3-Clause or GPL-2.0+
  * Copyright 2008-2013 Freescale Semiconductor, Inc.
- * Copyright 2019 NXP
+ * Copyright 2019-2020 NXP
  */
 
 #ifndef __DESC_PDCP_H__
@@ -3528,6 +3528,15 @@ cnstr_shdsc_pdcp_u_plane_decap(uint32_t *descbuf,
 				KEY(p, KEY2, authdata->key_enc_flags,
 				    (uint64_t)authdata->key, authdata->keylen,
 				    INLINE_KEY(authdata));
+			else if (authdata && authdata->algtype == 0) {
+				err = pdcp_insert_uplane_with_int_op(p, swap,
+						cipherdata, authdata,
+						sn_size, era_2_sw_hfn_ovrd,
+						OP_TYPE_DECAP_PROTOCOL);
+				if (err)
+					return err;
+				break;
+			}
 
 			/* Insert Cipher Key */
 			KEY(p, KEY1, cipherdata->key_enc_flags,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.369976559 +0100
+++ 0099-common-dpaax-fix-12-bit-null-auth-case.patch	2020-07-24 12:53:48.343007503 +0100
@@ -1,8 +1,10 @@
-From b86a32234f67560068f8388077846ac35ca81f17 Mon Sep 17 00:00:00 2001
+From 8d4e11926d3afc849a98ea2416c7c5d3ed570083 Mon Sep 17 00:00:00 2001
 From: Akhil Goyal <akhil.goyal@nxp.com>
 Date: Wed, 8 Jan 2020 18:22:31 +0530
 Subject: [PATCH] common/dpaax: fix 12-bit null auth case
 
+[ upstream commit b86a32234f67560068f8388077846ac35ca81f17 ]
+
 In cases of NULL auth in PDCP, the descriptors
 should be based on ALGORITHM command instead of
 PROTOCOL command.
@@ -10,7 +12,6 @@
 decap.
 
 Fixes: 526cdf60f1e5 ("crypto/dpaa2_sec: update desc for PDCP 18-bit enc-auth")
-Cc: stable@dpdk.org
 
 Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
 Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>

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

* [dpdk-stable] patch 'eventdev: fix race condition on timer list counter' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (97 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'common/dpaax: fix 12-bit null auth case' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:58 ` [dpdk-stable] patch 'eventdev: use C11 atomics for lcore timer armed flag' " luca.boccassi
                   ` (92 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Phil Yang
  Cc: Dharmik Thakkar, Ruifeng Wang, Erik Gabriel Carrillo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From b01bf3ceeeb3bfe4c1146cb58f92362f279f11f6 Mon Sep 17 00:00:00 2001
From: Phil Yang <phil.yang@arm.com>
Date: Tue, 7 Jul 2020 23:54:50 +0800
Subject: [PATCH] eventdev: fix race condition on timer list counter

[ upstream commit aceb737d6f3210556a139514d304bf8f315a043f ]

The n_poll_lcores counter and poll_lcore array are shared between lcores
and the update of these variables are out of the protection of spinlock
on each lcore timer list. The read-modify-write operations of the counter
are not atomic, so it has the potential of race condition between lcores.

Use c11 atomics with RELAXED ordering to prevent confliction.

Fixes: cc7b73ea9e3b ("eventdev: add new software timer adapter")

Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
---
 lib/librte_eventdev/rte_event_timer_adapter.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c
index 161e21a68..76885972e 100644
--- a/lib/librte_eventdev/rte_event_timer_adapter.c
+++ b/lib/librte_eventdev/rte_event_timer_adapter.c
@@ -579,6 +579,7 @@ swtim_callback(struct rte_timer *tim)
 	uint16_t nb_evs_invalid = 0;
 	uint64_t opaque;
 	int ret;
+	int n_lcores;
 
 	opaque = evtim->impl_opaque[1];
 	adapter = (struct rte_event_timer_adapter *)(uintptr_t)opaque;
@@ -601,8 +602,12 @@ swtim_callback(struct rte_timer *tim)
 				      "with immediate expiry value");
 		}
 
-		if (unlikely(rte_atomic16_test_and_set(&sw->in_use[lcore].v)))
-			sw->poll_lcores[sw->n_poll_lcores++] = lcore;
+		if (unlikely(rte_atomic16_test_and_set(&sw->in_use[lcore].v))) {
+			n_lcores = __atomic_fetch_add(&sw->n_poll_lcores, 1,
+						     __ATOMIC_RELAXED);
+			__atomic_store_n(&sw->poll_lcores[n_lcores], lcore,
+					__ATOMIC_RELAXED);
+		}
 	} else {
 		EVTIM_BUF_LOG_DBG("buffered an event timer expiry event");
 
@@ -1007,6 +1012,7 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
 	uint32_t lcore_id = rte_lcore_id();
 	struct rte_timer *tim, *tims[nb_evtims];
 	uint64_t cycles;
+	int n_lcores;
 
 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG
 	/* Check that the service is running. */
@@ -1029,8 +1035,10 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
 	if (unlikely(rte_atomic16_test_and_set(&sw->in_use[lcore_id].v))) {
 		EVTIM_LOG_DBG("Adding lcore id = %u to list of lcores to poll",
 			      lcore_id);
-		sw->poll_lcores[sw->n_poll_lcores] = lcore_id;
-		++sw->n_poll_lcores;
+		n_lcores = __atomic_fetch_add(&sw->n_poll_lcores, 1,
+					     __ATOMIC_RELAXED);
+		__atomic_store_n(&sw->poll_lcores[n_lcores], lcore_id,
+				__ATOMIC_RELAXED);
 	}
 
 	ret = rte_mempool_get_bulk(sw->tim_pool, (void **)tims,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.411591249 +0100
+++ 0100-eventdev-fix-race-condition-on-timer-list-counter.patch	2020-07-24 12:53:48.343007503 +0100
@@ -1,8 +1,10 @@
-From aceb737d6f3210556a139514d304bf8f315a043f Mon Sep 17 00:00:00 2001
+From b01bf3ceeeb3bfe4c1146cb58f92362f279f11f6 Mon Sep 17 00:00:00 2001
 From: Phil Yang <phil.yang@arm.com>
 Date: Tue, 7 Jul 2020 23:54:50 +0800
 Subject: [PATCH] eventdev: fix race condition on timer list counter
 
+[ upstream commit aceb737d6f3210556a139514d304bf8f315a043f ]
+
 The n_poll_lcores counter and poll_lcore array are shared between lcores
 and the update of these variables are out of the protection of spinlock
 on each lcore timer list. The read-modify-write operations of the counter
@@ -11,7 +13,6 @@
 Use c11 atomics with RELAXED ordering to prevent confliction.
 
 Fixes: cc7b73ea9e3b ("eventdev: add new software timer adapter")
-Cc: stable@dpdk.org
 
 Signed-off-by: Phil Yang <phil.yang@arm.com>
 Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
@@ -22,10 +23,10 @@
  1 file changed, 12 insertions(+), 4 deletions(-)
 
 diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c
-index 232180326..370ea40a7 100644
+index 161e21a68..76885972e 100644
 --- a/lib/librte_eventdev/rte_event_timer_adapter.c
 +++ b/lib/librte_eventdev/rte_event_timer_adapter.c
-@@ -583,6 +583,7 @@ swtim_callback(struct rte_timer *tim)
+@@ -579,6 +579,7 @@ swtim_callback(struct rte_timer *tim)
  	uint16_t nb_evs_invalid = 0;
  	uint64_t opaque;
  	int ret;
@@ -33,7 +34,7 @@
  
  	opaque = evtim->impl_opaque[1];
  	adapter = (struct rte_event_timer_adapter *)(uintptr_t)opaque;
-@@ -605,8 +606,12 @@ swtim_callback(struct rte_timer *tim)
+@@ -601,8 +602,12 @@ swtim_callback(struct rte_timer *tim)
  				      "with immediate expiry value");
  		}
  
@@ -48,7 +49,7 @@
  	} else {
  		EVTIM_BUF_LOG_DBG("buffered an event timer expiry event");
  
-@@ -1011,6 +1016,7 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
+@@ -1007,6 +1012,7 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
  	uint32_t lcore_id = rte_lcore_id();
  	struct rte_timer *tim, *tims[nb_evtims];
  	uint64_t cycles;
@@ -56,7 +57,7 @@
  
  #ifdef RTE_LIBRTE_EVENTDEV_DEBUG
  	/* Check that the service is running. */
-@@ -1033,8 +1039,10 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
+@@ -1029,8 +1035,10 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
  	if (unlikely(rte_atomic16_test_and_set(&sw->in_use[lcore_id].v))) {
  		EVTIM_LOG_DBG("Adding lcore id = %u to list of lcores to poll",
  			      lcore_id);

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

* [dpdk-stable] patch 'eventdev: use C11 atomics for lcore timer armed flag' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (98 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'eventdev: fix race condition on timer list counter' " luca.boccassi
@ 2020-07-24 11:58 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'eventdev: remove redundant reset on timer cancel' " luca.boccassi
                   ` (91 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:58 UTC (permalink / raw)
  To: Phil Yang
  Cc: Dharmik Thakkar, Ruifeng Wang, Erik Gabriel Carrillo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 3939291be17174407903296e4f47986515e3e9fc Mon Sep 17 00:00:00 2001
From: Phil Yang <phil.yang@arm.com>
Date: Tue, 7 Jul 2020 23:54:51 +0800
Subject: [PATCH] eventdev: use C11 atomics for lcore timer armed flag

[ upstream commit 1028d63eb214c5961b2df9d4b5662dab082b839e ]

The in_use flag is a per core variable which is not shared between
lcores in the normal case and the access of this variable should be
ordered on the same core. However, if non-EAL thread pick the highest
lcore to insert timers into, there is the possibility of conflicts
on this flag between threads. Then the atomic compare-and-swap
operation is needed.

Use the C11 atomics instead of the generic rte_atomic operations to
avoid the unnecessary barrier on aarch64.

Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
---
 lib/librte_eventdev/rte_event_timer_adapter.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c
index 76885972e..678be9f0a 100644
--- a/lib/librte_eventdev/rte_event_timer_adapter.c
+++ b/lib/librte_eventdev/rte_event_timer_adapter.c
@@ -550,7 +550,7 @@ struct swtim {
 	uint32_t timer_data_id;
 	/* Track which cores have actually armed a timer */
 	struct {
-		rte_atomic16_t v;
+		uint16_t v;
 	} __rte_cache_aligned in_use[RTE_MAX_LCORE];
 	/* Track which cores' timer lists should be polled */
 	unsigned int poll_lcores[RTE_MAX_LCORE];
@@ -602,7 +602,8 @@ swtim_callback(struct rte_timer *tim)
 				      "with immediate expiry value");
 		}
 
-		if (unlikely(rte_atomic16_test_and_set(&sw->in_use[lcore].v))) {
+		if (unlikely(sw->in_use[lcore].v == 0)) {
+			sw->in_use[lcore].v = 1;
 			n_lcores = __atomic_fetch_add(&sw->n_poll_lcores, 1,
 						     __ATOMIC_RELAXED);
 			__atomic_store_n(&sw->poll_lcores[n_lcores], lcore,
@@ -830,7 +831,7 @@ swtim_init(struct rte_event_timer_adapter *adapter)
 
 	/* Initialize the variables that track in-use timer lists */
 	for (i = 0; i < RTE_MAX_LCORE; i++)
-		rte_atomic16_init(&sw->in_use[i].v);
+		sw->in_use[i].v = 0;
 
 	/* Initialize the timer subsystem and allocate timer data instance */
 	ret = rte_timer_subsystem_init();
@@ -1013,6 +1014,8 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
 	struct rte_timer *tim, *tims[nb_evtims];
 	uint64_t cycles;
 	int n_lcores;
+	/* Timer list for this lcore is not in use. */
+	uint16_t exp_state = 0;
 
 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG
 	/* Check that the service is running. */
@@ -1031,8 +1034,12 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
 	/* If this is the first time we're arming an event timer on this lcore,
 	 * mark this lcore as "in use"; this will cause the service
 	 * function to process the timer list that corresponds to this lcore.
+	 * The atomic compare-and-swap operation can prevent the race condition
+	 * on in_use flag between multiple non-EAL threads.
 	 */
-	if (unlikely(rte_atomic16_test_and_set(&sw->in_use[lcore_id].v))) {
+	if (unlikely(__atomic_compare_exchange_n(&sw->in_use[lcore_id].v,
+			&exp_state, 1, 0,
+			__ATOMIC_RELAXED, __ATOMIC_RELAXED))) {
 		EVTIM_LOG_DBG("Adding lcore id = %u to list of lcores to poll",
 			      lcore_id);
 		n_lcores = __atomic_fetch_add(&sw->n_poll_lcores, 1,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.442169935 +0100
+++ 0101-eventdev-use-C11-atomics-for-lcore-timer-armed-flag.patch	2020-07-24 12:53:48.343007503 +0100
@@ -1,8 +1,10 @@
-From 1028d63eb214c5961b2df9d4b5662dab082b839e Mon Sep 17 00:00:00 2001
+From 3939291be17174407903296e4f47986515e3e9fc Mon Sep 17 00:00:00 2001
 From: Phil Yang <phil.yang@arm.com>
 Date: Tue, 7 Jul 2020 23:54:51 +0800
 Subject: [PATCH] eventdev: use C11 atomics for lcore timer armed flag
 
+[ upstream commit 1028d63eb214c5961b2df9d4b5662dab082b839e ]
+
 The in_use flag is a per core variable which is not shared between
 lcores in the normal case and the access of this variable should be
 ordered on the same core. However, if non-EAL thread pick the highest
@@ -13,8 +15,6 @@
 Use the C11 atomics instead of the generic rte_atomic operations to
 avoid the unnecessary barrier on aarch64.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Phil Yang <phil.yang@arm.com>
 Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
 Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
@@ -24,10 +24,10 @@
  1 file changed, 11 insertions(+), 4 deletions(-)
 
 diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c
-index 370ea40a7..4ed301382 100644
+index 76885972e..678be9f0a 100644
 --- a/lib/librte_eventdev/rte_event_timer_adapter.c
 +++ b/lib/librte_eventdev/rte_event_timer_adapter.c
-@@ -554,7 +554,7 @@ struct swtim {
+@@ -550,7 +550,7 @@ struct swtim {
  	uint32_t timer_data_id;
  	/* Track which cores have actually armed a timer */
  	struct {
@@ -36,7 +36,7 @@
  	} __rte_cache_aligned in_use[RTE_MAX_LCORE];
  	/* Track which cores' timer lists should be polled */
  	unsigned int poll_lcores[RTE_MAX_LCORE];
-@@ -606,7 +606,8 @@ swtim_callback(struct rte_timer *tim)
+@@ -602,7 +602,8 @@ swtim_callback(struct rte_timer *tim)
  				      "with immediate expiry value");
  		}
  
@@ -46,7 +46,7 @@
  			n_lcores = __atomic_fetch_add(&sw->n_poll_lcores, 1,
  						     __ATOMIC_RELAXED);
  			__atomic_store_n(&sw->poll_lcores[n_lcores], lcore,
-@@ -834,7 +835,7 @@ swtim_init(struct rte_event_timer_adapter *adapter)
+@@ -830,7 +831,7 @@ swtim_init(struct rte_event_timer_adapter *adapter)
  
  	/* Initialize the variables that track in-use timer lists */
  	for (i = 0; i < RTE_MAX_LCORE; i++)
@@ -55,7 +55,7 @@
  
  	/* Initialize the timer subsystem and allocate timer data instance */
  	ret = rte_timer_subsystem_init();
-@@ -1017,6 +1018,8 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
+@@ -1013,6 +1014,8 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
  	struct rte_timer *tim, *tims[nb_evtims];
  	uint64_t cycles;
  	int n_lcores;
@@ -64,7 +64,7 @@
  
  #ifdef RTE_LIBRTE_EVENTDEV_DEBUG
  	/* Check that the service is running. */
-@@ -1035,8 +1038,12 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
+@@ -1031,8 +1034,12 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
  	/* If this is the first time we're arming an event timer on this lcore,
  	 * mark this lcore as "in use"; this will cause the service
  	 * function to process the timer list that corresponds to this lcore.

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

* [dpdk-stable] patch 'eventdev: remove redundant reset on timer cancel' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (99 preceding siblings ...)
  2020-07-24 11:58 ` [dpdk-stable] patch 'eventdev: use C11 atomics for lcore timer armed flag' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'eventdev: relax SMP barriers with C11 atomics' " luca.boccassi
                   ` (90 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Phil Yang; +Cc: Dharmik Thakkar, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From d79a74d9bfe61030fbe46546f575d5028a839739 Mon Sep 17 00:00:00 2001
From: Phil Yang <phil.yang@arm.com>
Date: Tue, 7 Jul 2020 23:54:52 +0800
Subject: [PATCH] eventdev: remove redundant reset on timer cancel

[ upstream commit e84d9c62c671a502022a3a81358cac702d6f3a15 ]

There is no thread will access these impl_opaque data after timer
canceled. When new timer armed, it got refilled. So the cleanup
process is unnecessary.

Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
---
 lib/librte_eventdev/rte_event_timer_adapter.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c
index 678be9f0a..af5087132 100644
--- a/lib/librte_eventdev/rte_event_timer_adapter.c
+++ b/lib/librte_eventdev/rte_event_timer_adapter.c
@@ -1163,8 +1163,6 @@ swtim_cancel_burst(const struct rte_event_timer_adapter *adapter,
 		rte_mempool_put(sw->tim_pool, (void **)timp);
 
 		evtims[i]->state = RTE_EVENT_TIMER_CANCELED;
-		evtims[i]->impl_opaque[0] = 0;
-		evtims[i]->impl_opaque[1] = 0;
 
 		rte_smp_wmb();
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.480892713 +0100
+++ 0102-eventdev-remove-redundant-reset-on-timer-cancel.patch	2020-07-24 12:53:48.347007578 +0100
@@ -1,14 +1,14 @@
-From e84d9c62c671a502022a3a81358cac702d6f3a15 Mon Sep 17 00:00:00 2001
+From d79a74d9bfe61030fbe46546f575d5028a839739 Mon Sep 17 00:00:00 2001
 From: Phil Yang <phil.yang@arm.com>
 Date: Tue, 7 Jul 2020 23:54:52 +0800
 Subject: [PATCH] eventdev: remove redundant reset on timer cancel
 
+[ upstream commit e84d9c62c671a502022a3a81358cac702d6f3a15 ]
+
 There is no thread will access these impl_opaque data after timer
 canceled. When new timer armed, it got refilled. So the cleanup
 process is unnecessary.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Phil Yang <phil.yang@arm.com>
 Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
 ---
@@ -16,10 +16,10 @@
  1 file changed, 2 deletions(-)
 
 diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c
-index 4ed301382..aa01b4d9f 100644
+index 678be9f0a..af5087132 100644
 --- a/lib/librte_eventdev/rte_event_timer_adapter.c
 +++ b/lib/librte_eventdev/rte_event_timer_adapter.c
-@@ -1167,8 +1167,6 @@ swtim_cancel_burst(const struct rte_event_timer_adapter *adapter,
+@@ -1163,8 +1163,6 @@ swtim_cancel_burst(const struct rte_event_timer_adapter *adapter,
  		rte_mempool_put(sw->tim_pool, (void **)timp);
  
  		evtims[i]->state = RTE_EVENT_TIMER_CANCELED;

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

* [dpdk-stable] patch 'eventdev: relax SMP barriers with C11 atomics' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (100 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'eventdev: remove redundant reset on timer cancel' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'service: fix core mapping reset' " luca.boccassi
                   ` (89 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Phil Yang
  Cc: Dharmik Thakkar, Ruifeng Wang, Erik Gabriel Carrillo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 0a4303995ca42e53c942a6f79a4850f7e8df429b Mon Sep 17 00:00:00 2001
From: Phil Yang <phil.yang@arm.com>
Date: Tue, 7 Jul 2020 23:54:53 +0800
Subject: [PATCH] eventdev: relax SMP barriers with C11 atomics

[ upstream commit 030c2164117b87b7e81d06be9c228b555b00963e ]

The impl_opaque field is shared between the timer arm and cancel
operations. Meanwhile, the state flag acts as a guard variable to
make sure the update of impl_opaque is synchronized. The original
code uses rte_smp barriers to achieve that. This patch uses C11
atomics with an explicit one-way memory barrier instead of full
barriers rte_smp_w/rmb() to avoid the unnecessary barrier on aarch64.

Since compilers can generate the same instructions for volatile and
non-volatile variable in C11 __atomics built-ins, so remain the volatile
keyword in front of state enum to avoid the ABI break issue.

Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
---
 lib/librte_eventdev/rte_event_timer_adapter.c | 55 +++++++++++++------
 1 file changed, 37 insertions(+), 18 deletions(-)

diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c
index af5087132..36c13fe3b 100644
--- a/lib/librte_eventdev/rte_event_timer_adapter.c
+++ b/lib/librte_eventdev/rte_event_timer_adapter.c
@@ -625,7 +625,8 @@ swtim_callback(struct rte_timer *tim)
 		sw->expired_timers[sw->n_expired_timers++] = tim;
 		sw->stats.evtim_exp_count++;
 
-		evtim->state = RTE_EVENT_TIMER_NOT_ARMED;
+		__atomic_store_n(&evtim->state, RTE_EVENT_TIMER_NOT_ARMED,
+				__ATOMIC_RELEASE);
 	}
 
 	if (event_buffer_batch_ready(&sw->buffer)) {
@@ -1016,6 +1017,7 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
 	int n_lcores;
 	/* Timer list for this lcore is not in use. */
 	uint16_t exp_state = 0;
+	enum rte_event_timer_state n_state;
 
 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG
 	/* Check that the service is running. */
@@ -1056,30 +1058,36 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
 	}
 
 	for (i = 0; i < nb_evtims; i++) {
-		/* Don't modify the event timer state in these cases */
-		if (evtims[i]->state == RTE_EVENT_TIMER_ARMED) {
+		n_state = __atomic_load_n(&evtims[i]->state, __ATOMIC_ACQUIRE);
+		if (n_state == RTE_EVENT_TIMER_ARMED) {
 			rte_errno = EALREADY;
 			break;
-		} else if (!(evtims[i]->state == RTE_EVENT_TIMER_NOT_ARMED ||
-			     evtims[i]->state == RTE_EVENT_TIMER_CANCELED)) {
+		} else if (!(n_state == RTE_EVENT_TIMER_NOT_ARMED ||
+			     n_state == RTE_EVENT_TIMER_CANCELED)) {
 			rte_errno = EINVAL;
 			break;
 		}
 
 		ret = check_timeout(evtims[i], adapter);
 		if (unlikely(ret == -1)) {
-			evtims[i]->state = RTE_EVENT_TIMER_ERROR_TOOLATE;
+			__atomic_store_n(&evtims[i]->state,
+					RTE_EVENT_TIMER_ERROR_TOOLATE,
+					__ATOMIC_RELAXED);
 			rte_errno = EINVAL;
 			break;
 		} else if (unlikely(ret == -2)) {
-			evtims[i]->state = RTE_EVENT_TIMER_ERROR_TOOEARLY;
+			__atomic_store_n(&evtims[i]->state,
+					RTE_EVENT_TIMER_ERROR_TOOEARLY,
+					__ATOMIC_RELAXED);
 			rte_errno = EINVAL;
 			break;
 		}
 
 		if (unlikely(check_destination_event_queue(evtims[i],
 							   adapter) < 0)) {
-			evtims[i]->state = RTE_EVENT_TIMER_ERROR;
+			__atomic_store_n(&evtims[i]->state,
+					RTE_EVENT_TIMER_ERROR,
+					__ATOMIC_RELAXED);
 			rte_errno = EINVAL;
 			break;
 		}
@@ -1095,13 +1103,18 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
 					  SINGLE, lcore_id, NULL, evtims[i]);
 		if (ret < 0) {
 			/* tim was in RUNNING or CONFIG state */
-			evtims[i]->state = RTE_EVENT_TIMER_ERROR;
+			__atomic_store_n(&evtims[i]->state,
+					RTE_EVENT_TIMER_ERROR,
+					__ATOMIC_RELEASE);
 			break;
 		}
 
-		rte_smp_wmb();
 		EVTIM_LOG_DBG("armed an event timer");
-		evtims[i]->state = RTE_EVENT_TIMER_ARMED;
+		/* RELEASE ordering guarantees the adapter specific value
+		 * changes observed before the update of state.
+		 */
+		__atomic_store_n(&evtims[i]->state, RTE_EVENT_TIMER_ARMED,
+				__ATOMIC_RELEASE);
 	}
 
 	if (i < nb_evtims)
@@ -1128,6 +1141,7 @@ swtim_cancel_burst(const struct rte_event_timer_adapter *adapter,
 	struct rte_timer *timp;
 	uint64_t opaque;
 	struct swtim *sw = swtim_pmd_priv(adapter);
+	enum rte_event_timer_state n_state;
 
 #ifdef RTE_LIBRTE_EVENTDEV_DEBUG
 	/* Check that the service is running. */
@@ -1139,16 +1153,18 @@ swtim_cancel_burst(const struct rte_event_timer_adapter *adapter,
 
 	for (i = 0; i < nb_evtims; i++) {
 		/* Don't modify the event timer state in these cases */
-		if (evtims[i]->state == RTE_EVENT_TIMER_CANCELED) {
+		/* ACQUIRE ordering guarantees the access of implementation
+		 * specific opaque data under the correct state.
+		 */
+		n_state = __atomic_load_n(&evtims[i]->state, __ATOMIC_ACQUIRE);
+		if (n_state == RTE_EVENT_TIMER_CANCELED) {
 			rte_errno = EALREADY;
 			break;
-		} else if (evtims[i]->state != RTE_EVENT_TIMER_ARMED) {
+		} else if (n_state != RTE_EVENT_TIMER_ARMED) {
 			rte_errno = EINVAL;
 			break;
 		}
 
-		rte_smp_rmb();
-
 		opaque = evtims[i]->impl_opaque[0];
 		timp = (struct rte_timer *)(uintptr_t)opaque;
 		RTE_ASSERT(timp != NULL);
@@ -1162,9 +1178,12 @@ swtim_cancel_burst(const struct rte_event_timer_adapter *adapter,
 
 		rte_mempool_put(sw->tim_pool, (void **)timp);
 
-		evtims[i]->state = RTE_EVENT_TIMER_CANCELED;
-
-		rte_smp_wmb();
+		/* The RELEASE ordering here pairs with atomic ordering
+		 * to make sure the state update data observed between
+		 * threads.
+		 */
+		__atomic_store_n(&evtims[i]->state, RTE_EVENT_TIMER_CANCELED,
+				__ATOMIC_RELEASE);
 	}
 
 	return i;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.515148907 +0100
+++ 0103-eventdev-relax-SMP-barriers-with-C11-atomics.patch	2020-07-24 12:53:48.347007578 +0100
@@ -1,8 +1,10 @@
-From 030c2164117b87b7e81d06be9c228b555b00963e Mon Sep 17 00:00:00 2001
+From 0a4303995ca42e53c942a6f79a4850f7e8df429b Mon Sep 17 00:00:00 2001
 From: Phil Yang <phil.yang@arm.com>
 Date: Tue, 7 Jul 2020 23:54:53 +0800
 Subject: [PATCH] eventdev: relax SMP barriers with C11 atomics
 
+[ upstream commit 030c2164117b87b7e81d06be9c228b555b00963e ]
+
 The impl_opaque field is shared between the timer arm and cancel
 operations. Meanwhile, the state flag acts as a guard variable to
 make sure the update of impl_opaque is synchronized. The original
@@ -14,8 +16,6 @@
 non-volatile variable in C11 __atomics built-ins, so remain the volatile
 keyword in front of state enum to avoid the ABI break issue.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Phil Yang <phil.yang@arm.com>
 Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
 Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
@@ -25,10 +25,10 @@
  1 file changed, 37 insertions(+), 18 deletions(-)
 
 diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c
-index aa01b4d9f..4c5e49ea3 100644
+index af5087132..36c13fe3b 100644
 --- a/lib/librte_eventdev/rte_event_timer_adapter.c
 +++ b/lib/librte_eventdev/rte_event_timer_adapter.c
-@@ -629,7 +629,8 @@ swtim_callback(struct rte_timer *tim)
+@@ -625,7 +625,8 @@ swtim_callback(struct rte_timer *tim)
  		sw->expired_timers[sw->n_expired_timers++] = tim;
  		sw->stats.evtim_exp_count++;
  
@@ -38,7 +38,7 @@
  	}
  
  	if (event_buffer_batch_ready(&sw->buffer)) {
-@@ -1020,6 +1021,7 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
+@@ -1016,6 +1017,7 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
  	int n_lcores;
  	/* Timer list for this lcore is not in use. */
  	uint16_t exp_state = 0;
@@ -46,7 +46,7 @@
  
  #ifdef RTE_LIBRTE_EVENTDEV_DEBUG
  	/* Check that the service is running. */
-@@ -1060,30 +1062,36 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
+@@ -1056,30 +1058,36 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
  	}
  
  	for (i = 0; i < nb_evtims; i++) {
@@ -90,7 +90,7 @@
  			rte_errno = EINVAL;
  			break;
  		}
-@@ -1099,13 +1107,18 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
+@@ -1095,13 +1103,18 @@ __swtim_arm_burst(const struct rte_event_timer_adapter *adapter,
  					  SINGLE, lcore_id, NULL, evtims[i]);
  		if (ret < 0) {
  			/* tim was in RUNNING or CONFIG state */
@@ -112,7 +112,7 @@
  	}
  
  	if (i < nb_evtims)
-@@ -1132,6 +1145,7 @@ swtim_cancel_burst(const struct rte_event_timer_adapter *adapter,
+@@ -1128,6 +1141,7 @@ swtim_cancel_burst(const struct rte_event_timer_adapter *adapter,
  	struct rte_timer *timp;
  	uint64_t opaque;
  	struct swtim *sw = swtim_pmd_priv(adapter);
@@ -120,7 +120,7 @@
  
  #ifdef RTE_LIBRTE_EVENTDEV_DEBUG
  	/* Check that the service is running. */
-@@ -1143,16 +1157,18 @@ swtim_cancel_burst(const struct rte_event_timer_adapter *adapter,
+@@ -1139,16 +1153,18 @@ swtim_cancel_burst(const struct rte_event_timer_adapter *adapter,
  
  	for (i = 0; i < nb_evtims; i++) {
  		/* Don't modify the event timer state in these cases */
@@ -143,7 +143,7 @@
  		opaque = evtims[i]->impl_opaque[0];
  		timp = (struct rte_timer *)(uintptr_t)opaque;
  		RTE_ASSERT(timp != NULL);
-@@ -1166,9 +1182,12 @@ swtim_cancel_burst(const struct rte_event_timer_adapter *adapter,
+@@ -1162,9 +1178,12 @@ swtim_cancel_burst(const struct rte_event_timer_adapter *adapter,
  
  		rte_mempool_put(sw->tim_pool, (void **)timp);
  

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

* [dpdk-stable] patch 'service: fix core mapping reset' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (101 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'eventdev: relax SMP barriers with C11 atomics' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/ixgbe: report 10Mbps link speed for x553' " luca.boccassi
                   ` (88 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: Sarosh Arif, Harry van Haaren, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From cc8b7af31f74854edcb7124f56d976487bab7ed9 Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Wed, 8 Jul 2020 15:37:33 +0200
Subject: [PATCH] service: fix core mapping reset

[ upstream commit 048db4b6dcccaee9277ce5b4fbb2fe684b212e22 ]

The rte_service_lcore_reset_all function stops execution of services
on all lcores and switches them back from ROLE_SERVICE to ROLE_RTE.
However the thread loop for slave lcores (eal_thread_loop) distincts these
roles to set lcore state after processing delegated function.
It sets WAIT state for ROLE_SERVICE, but FINISHED for ROLE_RTE.
So changing the role to RTE before stopping work in slave lcores
causes lcores to end in FINISHED state. That is why the rte_eal_lcore_wait
must be run after rte_service_lcore_reset_all to bring back lcores to
launchable (WAIT) state.
This has been fixed in test app and clarified in API documentation.

Setting the state to WAIT in rte_service_runner_func is premature
as the rte_service_runner_func function is still a part of the lcore
function delegated to slave lcore. The state is overwritten anyway in
slave lcore thread loop. This premature setting state to WAIT might
however cause rte_eal_lcore_wait, that was called by the application,
to return before slave lcore thread set the FINISHED state. That's
why it is removed from librte_eal rte_service_runner_func function.

Bugzilla ID: 464
Fixes: 21698354c832 ("service: introduce service cores concept")
Fixes: f038a81e1c56 ("service: add unit tests")

Reported-by: Sarosh Arif <sarosh.arif@emumba.com>
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 app/test/test_service_cores.c               | 1 +
 lib/librte_eal/common/include/rte_service.h | 4 ++++
 lib/librte_eal/common/rte_service.c         | 2 --
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c
index a922c7ddc..2a4978e29 100644
--- a/app/test/test_service_cores.c
+++ b/app/test/test_service_cores.c
@@ -114,6 +114,7 @@ unregister_all(void)
 	}
 
 	rte_service_lcore_reset_all();
+	rte_eal_mp_wait_lcore();
 
 	return TEST_SUCCESS;
 }
diff --git a/lib/librte_eal/common/include/rte_service.h b/lib/librte_eal/common/include/rte_service.h
index 3a1c735c5..e2d0a6dd3 100644
--- a/lib/librte_eal/common/include/rte_service.h
+++ b/lib/librte_eal/common/include/rte_service.h
@@ -304,6 +304,10 @@ int32_t rte_service_lcore_count(void);
  * from duty, just unmaps all services / cores, and stops() the service cores.
  * The runstate of services is not modified.
  *
+ * The cores that are stopped with this call, are in FINISHED state and
+ * the application must take care of bringing them back to a launchable state:
+ * e.g. call *rte_eal_lcore_wait* on the lcore_id.
+ *
  * @retval 0 Success
  */
 int32_t rte_service_lcore_reset_all(void);
diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
index eca6ccc59..8fcccac85 100644
--- a/lib/librte_eal/common/rte_service.c
+++ b/lib/librte_eal/common/rte_service.c
@@ -447,8 +447,6 @@ service_runner_func(void *arg)
 		rte_smp_rmb();
 	}
 
-	lcore_config[lcore].state = WAIT;
-
 	return 0;
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.548982028 +0100
+++ 0104-service-fix-core-mapping-reset.patch	2020-07-24 12:53:48.347007578 +0100
@@ -1,8 +1,10 @@
-From 048db4b6dcccaee9277ce5b4fbb2fe684b212e22 Mon Sep 17 00:00:00 2001
+From cc8b7af31f74854edcb7124f56d976487bab7ed9 Mon Sep 17 00:00:00 2001
 From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Date: Wed, 8 Jul 2020 15:37:33 +0200
 Subject: [PATCH] service: fix core mapping reset
 
+[ upstream commit 048db4b6dcccaee9277ce5b4fbb2fe684b212e22 ]
+
 The rte_service_lcore_reset_all function stops execution of services
 on all lcores and switches them back from ROLE_SERVICE to ROLE_RTE.
 However the thread loop for slave lcores (eal_thread_loop) distincts these
@@ -25,19 +27,18 @@
 Bugzilla ID: 464
 Fixes: 21698354c832 ("service: introduce service cores concept")
 Fixes: f038a81e1c56 ("service: add unit tests")
-Cc: stable@dpdk.org
 
 Reported-by: Sarosh Arif <sarosh.arif@emumba.com>
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
 ---
- app/test/test_service_cores.c        | 1 +
- lib/librte_eal/common/rte_service.c  | 2 --
- lib/librte_eal/include/rte_service.h | 4 ++++
+ app/test/test_service_cores.c               | 1 +
+ lib/librte_eal/common/include/rte_service.h | 4 ++++
+ lib/librte_eal/common/rte_service.c         | 2 --
  3 files changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c
-index 4f003ed1a..ef1d8fcb9 100644
+index a922c7ddc..2a4978e29 100644
 --- a/app/test/test_service_cores.c
 +++ b/app/test/test_service_cores.c
 @@ -114,6 +114,7 @@ unregister_all(void)
@@ -48,23 +49,10 @@
  
  	return TEST_SUCCESS;
  }
-diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
-index e2795f857..6a0e0ff65 100644
---- a/lib/librte_eal/common/rte_service.c
-+++ b/lib/librte_eal/common/rte_service.c
-@@ -475,8 +475,6 @@ service_runner_func(void *arg)
- 		cs->loops++;
- 	}
- 
--	lcore_config[lcore].state = WAIT;
--
- 	return 0;
- }
- 
-diff --git a/lib/librte_eal/include/rte_service.h b/lib/librte_eal/include/rte_service.h
+diff --git a/lib/librte_eal/common/include/rte_service.h b/lib/librte_eal/common/include/rte_service.h
 index 3a1c735c5..e2d0a6dd3 100644
---- a/lib/librte_eal/include/rte_service.h
-+++ b/lib/librte_eal/include/rte_service.h
+--- a/lib/librte_eal/common/include/rte_service.h
++++ b/lib/librte_eal/common/include/rte_service.h
 @@ -304,6 +304,10 @@ int32_t rte_service_lcore_count(void);
   * from duty, just unmaps all services / cores, and stops() the service cores.
   * The runstate of services is not modified.
@@ -76,6 +64,19 @@
   * @retval 0 Success
   */
  int32_t rte_service_lcore_reset_all(void);
+diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
+index eca6ccc59..8fcccac85 100644
+--- a/lib/librte_eal/common/rte_service.c
++++ b/lib/librte_eal/common/rte_service.c
+@@ -447,8 +447,6 @@ service_runner_func(void *arg)
+ 		rte_smp_rmb();
+ 	}
+ 
+-	lcore_config[lcore].state = WAIT;
+-
+ 	return 0;
+ }
+ 
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/ixgbe: report 10Mbps link speed for x553' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (102 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'service: fix core mapping reset' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/iavf: fix uninitialized variable' " luca.boccassi
                   ` (87 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 50f47ceefb8766e3f9f39a73d333cdbfed371245 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Tue, 30 Jun 2020 09:16:51 +0800
Subject: [PATCH] net/ixgbe: report 10Mbps link speed for x553

[ upstream commit b23c52a451958a6140fc86fa72f51f5a8f4584da ]

For ixgbe x553(IXGBE_DEV_ID_X550EM_A_1G_T) it support 10M
link speed, so add the support link speed info for 10Mb/s.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 50edb69cb..9dcff9935 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4316,6 +4316,10 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
 			link.link_speed = ETH_SPEED_NUM_100M;
 		break;
 
+	case IXGBE_LINK_SPEED_10_FULL:
+		link.link_speed = ETH_SPEED_NUM_10M;
+		break;
+
 	case IXGBE_LINK_SPEED_100_FULL:
 		link.link_speed = ETH_SPEED_NUM_100M;
 		break;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.588627489 +0100
+++ 0105-net-ixgbe-report-10Mbps-link-speed-for-x553.patch	2020-07-24 12:53:48.355007727 +0100
@@ -1,13 +1,14 @@
-From b23c52a451958a6140fc86fa72f51f5a8f4584da Mon Sep 17 00:00:00 2001
+From 50f47ceefb8766e3f9f39a73d333cdbfed371245 Mon Sep 17 00:00:00 2001
 From: Wei Zhao <wei.zhao1@intel.com>
 Date: Tue, 30 Jun 2020 09:16:51 +0800
 Subject: [PATCH] net/ixgbe: report 10Mbps link speed for x553
 
+[ upstream commit b23c52a451958a6140fc86fa72f51f5a8f4584da ]
+
 For ixgbe x553(IXGBE_DEV_ID_X550EM_A_1G_T) it support 10M
 link speed, so add the support link speed info for 10Mb/s.
 
 Fixes: af75078fece3 ("first public release")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
 Acked-by: Jeff Guo <jia.guo@intel.com>
@@ -16,10 +17,10 @@
  1 file changed, 4 insertions(+)
 
 diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
-index 248f21d14..095f1bde5 100644
+index 50edb69cb..9dcff9935 100644
 --- a/drivers/net/ixgbe/ixgbe_ethdev.c
 +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
-@@ -4307,6 +4307,10 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
+@@ -4316,6 +4316,10 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
  			link.link_speed = ETH_SPEED_NUM_100M;
  		break;
  

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

* [dpdk-stable] patch 'net/iavf: fix uninitialized variable' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (103 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/ixgbe: report 10Mbps link speed for x553' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/ixgbe/base: remove dead code' " luca.boccassi
                   ` (86 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 8edaa43add38c967cd9b50b8e1cc16329596f445 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 23 Jun 2020 14:45:31 +0100
Subject: [PATCH] net/iavf: fix uninitialized variable
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit ca5e39f8535300b247d14865cd8c6b9b4acba38a ]

This is observed with experimental gcc 11, although the older gcc
versions don't complain about it, issue seems a valid one.
gcc version 11.0.0 20200621 (experimental) (GCC)

Build error
.../drivers/net/iavf/iavf_ethdev.c: In function ‘iavf_dev_link_update’:
.../drivers/net/iavf/iavf_ethdev.c:641:6:
    error: ‘new_link’ is used uninitialized [-Werror=uninitialized]
  641 |  if (rte_atomic64_cmpset((uint64_t *)&dev->data->dev_link,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  642 |     *(uint64_t *)&dev->data->dev_link,
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  643 |     *(uint64_t *)&new_link) == 0)
      |     ~~~~~~~~~~~~~~~~~~~~~~~
.../drivers/net/iavf/iavf_ethdev.c:596:22:
    note: ‘new_link’ declared here
  596 |  struct rte_eth_link new_link;
      |                      ^~~~~~~~
cc1: all warnings being treated as error

All fields of the 'new_link' struct is already set in function, so the
'uninitialized' warning is hard to get. This is because the combination
of aligning and bitfield usage of the struct

The definition of the struct is:
struct rte_eth_link {
        uint32_t link_speed;        /**< ETH_SPEED_NUM_ */
        uint16_t link_duplex  : 1;  /**< ETH_LINK_[HALF/FULL]_DUPLEX */
        uint16_t link_autoneg : 1;  /**< ETH_LINK_[AUTONEG/FIXED] */
        uint16_t link_status  : 1;  /**< ETH_LINK_[DOWN/UP] */
} __rte_aligned(8);      /**< aligned for atomic64 read/write */

Overall the size of the 'struct rte_eth_link' is 64 bits, but function
only sets the 35 bits of it, because only 3 bits of 16 bits variable are
used.
When the struct cast to 'uint64_t' because of the 'rte_atomic64_cmpset'
the upper 29 bits are used without initialization.

To fix the uninitialized usage, memset the variable 'new_link' before
using it.

Fixes: 48de41ca11f0 ("net/avf: enable link status update")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 266200dbe..3f41eefff 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -593,6 +593,8 @@ iavf_dev_link_update(struct rte_eth_dev *dev,
 	struct rte_eth_link new_link;
 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 
+	memset(&new_link, 0, sizeof(new_link));
+
 	/* Only read status info stored in VF, and the info is updated
 	 *  when receive LINK_CHANGE evnet from PF by Virtchnnl.
 	 */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.630171832 +0100
+++ 0106-net-iavf-fix-uninitialized-variable.patch	2020-07-24 12:53:48.359007801 +0100
@@ -1,4 +1,4 @@
-From ca5e39f8535300b247d14865cd8c6b9b4acba38a Mon Sep 17 00:00:00 2001
+From 8edaa43add38c967cd9b50b8e1cc16329596f445 Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Tue, 23 Jun 2020 14:45:31 +0100
 Subject: [PATCH] net/iavf: fix uninitialized variable
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit ca5e39f8535300b247d14865cd8c6b9b4acba38a ]
+
 This is observed with experimental gcc 11, although the older gcc
 versions don't complain about it, issue seems a valid one.
 gcc version 11.0.0 20200621 (experimental) (GCC)
@@ -48,7 +50,6 @@
 using it.
 
 Fixes: 48de41ca11f0 ("net/avf: enable link status update")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -57,10 +58,10 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
-index d69e5284e..b0dd49a8d 100644
+index 266200dbe..3f41eefff 100644
 --- a/drivers/net/iavf/iavf_ethdev.c
 +++ b/drivers/net/iavf/iavf_ethdev.c
-@@ -582,6 +582,8 @@ iavf_dev_link_update(struct rte_eth_dev *dev,
+@@ -593,6 +593,8 @@ iavf_dev_link_update(struct rte_eth_dev *dev,
  	struct rte_eth_link new_link;
  	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
  

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

* [dpdk-stable] patch 'net/ixgbe/base: remove dead code' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (104 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/iavf: fix uninitialized variable' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/iavf: fix RSS RETA after restart' " luca.boccassi
                   ` (85 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 829d08cc2c20aad0276eba50d286dd19904fd962 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 30 Jun 2020 15:45:54 +0100
Subject: [PATCH] net/ixgbe/base: remove dead code

[ upstream commit a6395d471e14e5a7432875dad8fb3533238c5167 ]

The question around getting rid of the assignments seems lived
long enough, if they are not needed until now, we can drop them.

Fixes: 39bca0ed994c ("ixgbe: DCB in base driver")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_dcb_82598.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_dcb_82598.c b/drivers/net/ixgbe/base/ixgbe_dcb_82598.c
index bb309e28f..dc7b905c5 100644
--- a/drivers/net/ixgbe/base/ixgbe_dcb_82598.c
+++ b/drivers/net/ixgbe/base/ixgbe_dcb_82598.c
@@ -36,14 +36,6 @@ s32 ixgbe_dcb_get_tc_stats_82598(struct ixgbe_hw *hw,
 		stats->qprc[tc] += IXGBE_READ_REG(hw, IXGBE_QPRC(tc));
 		/* Received Bytes */
 		stats->qbrc[tc] += IXGBE_READ_REG(hw, IXGBE_QBRC(tc));
-
-#if 0
-		/* Can we get rid of these??  Consequently, getting rid
-		 * of the tc_stats structure.
-		 */
-		tc_stats_array[up]->in_overflow_discards = 0;
-		tc_stats_array[up]->out_overflow_discards = 0;
-#endif
 	}
 
 	return IXGBE_SUCCESS;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.669450951 +0100
+++ 0107-net-ixgbe-base-remove-dead-code.patch	2020-07-24 12:53:48.359007801 +0100
@@ -1,13 +1,14 @@
-From a6395d471e14e5a7432875dad8fb3533238c5167 Mon Sep 17 00:00:00 2001
+From 829d08cc2c20aad0276eba50d286dd19904fd962 Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Tue, 30 Jun 2020 15:45:54 +0100
 Subject: [PATCH] net/ixgbe/base: remove dead code
 
+[ upstream commit a6395d471e14e5a7432875dad8fb3533238c5167 ]
+
 The question around getting rid of the assignments seems lived
 long enough, if they are not needed until now, we can drop them.
 
 Fixes: 39bca0ed994c ("ixgbe: DCB in base driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>

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

* [dpdk-stable] patch 'net/iavf: fix RSS RETA after restart' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (105 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/ixgbe/base: remove dead code' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'common/octeontx2: fix crash on running procinfo' " luca.boccassi
                   ` (84 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Junyu Jiang; +Cc: Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 80b3bfdd5adeb4a8f2f1dcfed8760d22e762ca7d Mon Sep 17 00:00:00 2001
From: Junyu Jiang <junyux.jiang@intel.com>
Date: Fri, 19 Jun 2020 07:44:02 +0000
Subject: [PATCH] net/iavf: fix RSS RETA after restart

[ upstream commit 1feb8e3f4e5c69071e5c461132a8b1bad05609af ]

This patch moved the RSS initialization from dev start to
dev configure, to fix the issue that RSS redirection table
can not be kept after restarting port.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")

Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 71 +++++++++++++++++-----------------
 1 file changed, 35 insertions(+), 36 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 3f41eefff..8ddd4aad9 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -132,34 +132,6 @@ static const struct eth_dev_ops iavf_eth_dev_ops = {
 	.rx_queue_intr_disable      = iavf_dev_rx_queue_intr_disable,
 };
 
-static int
-iavf_dev_configure(struct rte_eth_dev *dev)
-{
-	struct iavf_adapter *ad =
-		IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
-	struct iavf_info *vf =  IAVF_DEV_PRIVATE_TO_VF(ad);
-	struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
-
-	ad->rx_bulk_alloc_allowed = true;
-	/* Initialize to TRUE. If any of Rx queues doesn't meet the
-	 * vector Rx/Tx preconditions, it will be reset.
-	 */
-	ad->rx_vec_allowed = true;
-	ad->tx_vec_allowed = true;
-
-	if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)
-		dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
-
-	/* Vlan stripping setting */
-	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN) {
-		if (dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_VLAN_STRIP)
-			iavf_enable_vlan_strip(ad);
-		else
-			iavf_disable_vlan_strip(ad);
-	}
-	return 0;
-}
-
 static int
 iavf_init_rss(struct iavf_adapter *adapter)
 {
@@ -216,6 +188,41 @@ iavf_init_rss(struct iavf_adapter *adapter)
 	return 0;
 }
 
+static int
+iavf_dev_configure(struct rte_eth_dev *dev)
+{
+	struct iavf_adapter *ad =
+		IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
+	struct iavf_info *vf =  IAVF_DEV_PRIVATE_TO_VF(ad);
+	struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
+
+	ad->rx_bulk_alloc_allowed = true;
+	/* Initialize to TRUE. If any of Rx queues doesn't meet the
+	 * vector Rx/Tx preconditions, it will be reset.
+	 */
+	ad->rx_vec_allowed = true;
+	ad->tx_vec_allowed = true;
+
+	if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)
+		dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
+
+	/* Vlan stripping setting */
+	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN) {
+		if (dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_VLAN_STRIP)
+			iavf_enable_vlan_strip(ad);
+		else
+			iavf_disable_vlan_strip(ad);
+	}
+
+	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) {
+		if (iavf_init_rss(ad) != 0) {
+			PMD_DRV_LOG(ERR, "configure rss failed");
+			return -1;
+		}
+	}
+	return 0;
+}
+
 static int
 iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq)
 {
@@ -436,13 +443,6 @@ iavf_dev_start(struct rte_eth_dev *dev)
 		return -1;
 	}
 
-	if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) {
-		if (iavf_init_rss(adapter) != 0) {
-			PMD_DRV_LOG(ERR, "configure rss failed");
-			goto err_rss;
-		}
-	}
-
 	if (iavf_configure_queues(adapter) != 0) {
 		PMD_DRV_LOG(ERR, "configure queues failed");
 		goto err_queue;
@@ -471,7 +471,6 @@ iavf_dev_start(struct rte_eth_dev *dev)
 err_mac:
 	iavf_add_del_all_mac_addr(adapter, FALSE);
 err_queue:
-err_rss:
 	return -1;
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.704650483 +0100
+++ 0108-net-iavf-fix-RSS-RETA-after-restart.patch	2020-07-24 12:53:48.359007801 +0100
@@ -1,14 +1,15 @@
-From 1feb8e3f4e5c69071e5c461132a8b1bad05609af Mon Sep 17 00:00:00 2001
+From 80b3bfdd5adeb4a8f2f1dcfed8760d22e762ca7d Mon Sep 17 00:00:00 2001
 From: Junyu Jiang <junyux.jiang@intel.com>
 Date: Fri, 19 Jun 2020 07:44:02 +0000
 Subject: [PATCH] net/iavf: fix RSS RETA after restart
 
+[ upstream commit 1feb8e3f4e5c69071e5c461132a8b1bad05609af ]
+
 This patch moved the RSS initialization from dev start to
 dev configure, to fix the issue that RSS redirection table
 can not be kept after restarting port.
 
 Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
-Cc: stable@dpdk.org
 
 Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
 Acked-by: Qiming Yang <qiming.yang@intel.com>
@@ -17,11 +18,11 @@
  1 file changed, 35 insertions(+), 36 deletions(-)
 
 diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
-index b0dd49a8d..c3aa4cd72 100644
+index 3f41eefff..8ddd4aad9 100644
 --- a/drivers/net/iavf/iavf_ethdev.c
 +++ b/drivers/net/iavf/iavf_ethdev.c
-@@ -122,34 +122,6 @@ static const struct eth_dev_ops iavf_eth_dev_ops = {
- 	.filter_ctrl                = iavf_dev_filter_ctrl,
+@@ -132,34 +132,6 @@ static const struct eth_dev_ops iavf_eth_dev_ops = {
+ 	.rx_queue_intr_disable      = iavf_dev_rx_queue_intr_disable,
  };
  
 -static int
@@ -55,7 +56,7 @@
  static int
  iavf_init_rss(struct iavf_adapter *adapter)
  {
-@@ -206,6 +178,41 @@ iavf_init_rss(struct iavf_adapter *adapter)
+@@ -216,6 +188,41 @@ iavf_init_rss(struct iavf_adapter *adapter)
  	return 0;
  }
  
@@ -97,7 +98,7 @@
  static int
  iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq)
  {
-@@ -426,13 +433,6 @@ iavf_dev_start(struct rte_eth_dev *dev)
+@@ -436,13 +443,6 @@ iavf_dev_start(struct rte_eth_dev *dev)
  		return -1;
  	}
  
@@ -111,9 +112,9 @@
  	if (iavf_configure_queues(adapter) != 0) {
  		PMD_DRV_LOG(ERR, "configure queues failed");
  		goto err_queue;
-@@ -461,7 +461,6 @@ iavf_dev_start(struct rte_eth_dev *dev)
+@@ -471,7 +471,6 @@ iavf_dev_start(struct rte_eth_dev *dev)
  err_mac:
- 	iavf_add_del_all_mac_addr(adapter, false);
+ 	iavf_add_del_all_mac_addr(adapter, FALSE);
  err_queue:
 -err_rss:
  	return -1;

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

* [dpdk-stable] patch 'common/octeontx2: fix crash on running procinfo' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (106 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/iavf: fix RSS RETA after restart' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/ice/base: fix GTP-U inner RSS IPv4 IPv6 co-exist' " luca.boccassi
                   ` (83 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Harman Kalra; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From f04eb5e26450b178b411c9b4840ef2c7ad9174f2 Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Mon, 29 Jun 2020 18:56:05 +0530
Subject: [PATCH] common/octeontx2: fix crash on running procinfo

[ upstream commit 43330c4de3c768f6eedbc544f410ccff06b531a2 ]

Segmentation fault has been observed while running procinfo
with reset options i.e. --stats-reset and --xstats-reset.
Reason is procinfo runs as a secondary process and tries to
hold a lock which is part of struct mdev, which was not
allocated as part of shared memory.

Fixes: 5ca59711f771 ("common/octeontx2: add mailbox base support infra")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/common/octeontx2/otx2_mbox.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/common/octeontx2/otx2_mbox.c b/drivers/common/octeontx2/otx2_mbox.c
index c359bf42f..18bf5b88e 100644
--- a/drivers/common/octeontx2/otx2_mbox.c
+++ b/drivers/common/octeontx2/otx2_mbox.c
@@ -9,6 +9,7 @@
 
 #include <rte_atomic.h>
 #include <rte_cycles.h>
+#include <rte_malloc.h>
 
 #include "otx2_mbox.h"
 
@@ -35,7 +36,7 @@ otx2_mbox_fini(struct otx2_mbox *mbox)
 {
 	mbox->reg_base = 0;
 	mbox->hwbase = 0;
-	free(mbox->dev);
+	rte_free(mbox->dev);
 	mbox->dev = NULL;
 }
 
@@ -126,7 +127,9 @@ otx2_mbox_init(struct otx2_mbox *mbox, uintptr_t hwbase,
 		return -ENODEV;
 	}
 
-	mbox->dev = malloc(ndevs * sizeof(struct otx2_mbox_dev));
+	mbox->dev = rte_zmalloc("mbox dev",
+				ndevs * sizeof(struct otx2_mbox_dev),
+				OTX2_ALIGN);
 	if (!mbox->dev) {
 		otx2_mbox_fini(mbox);
 		return -ENOMEM;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.740891549 +0100
+++ 0109-common-octeontx2-fix-crash-on-running-procinfo.patch	2020-07-24 12:53:48.359007801 +0100
@@ -1,8 +1,10 @@
-From 43330c4de3c768f6eedbc544f410ccff06b531a2 Mon Sep 17 00:00:00 2001
+From f04eb5e26450b178b411c9b4840ef2c7ad9174f2 Mon Sep 17 00:00:00 2001
 From: Harman Kalra <hkalra@marvell.com>
 Date: Mon, 29 Jun 2020 18:56:05 +0530
 Subject: [PATCH] common/octeontx2: fix crash on running procinfo
 
+[ upstream commit 43330c4de3c768f6eedbc544f410ccff06b531a2 ]
+
 Segmentation fault has been observed while running procinfo
 with reset options i.e. --stats-reset and --xstats-reset.
 Reason is procinfo runs as a secondary process and tries to
@@ -10,7 +12,6 @@
 allocated as part of shared memory.
 
 Fixes: 5ca59711f771 ("common/octeontx2: add mailbox base support infra")
-Cc: stable@dpdk.org
 
 Signed-off-by: Harman Kalra <hkalra@marvell.com>
 Acked-by: Jerin Jacob <jerinj@marvell.com>
@@ -19,7 +20,7 @@
  1 file changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/common/octeontx2/otx2_mbox.c b/drivers/common/octeontx2/otx2_mbox.c
-index 2b7810929..6df1e8ea6 100644
+index c359bf42f..18bf5b88e 100644
 --- a/drivers/common/octeontx2/otx2_mbox.c
 +++ b/drivers/common/octeontx2/otx2_mbox.c
 @@ -9,6 +9,7 @@
@@ -29,8 +30,8 @@
 +#include <rte_malloc.h>
  
  #include "otx2_mbox.h"
- #include "otx2_dev.h"
-@@ -36,7 +37,7 @@ otx2_mbox_fini(struct otx2_mbox *mbox)
+ 
+@@ -35,7 +36,7 @@ otx2_mbox_fini(struct otx2_mbox *mbox)
  {
  	mbox->reg_base = 0;
  	mbox->hwbase = 0;
@@ -39,7 +40,7 @@
  	mbox->dev = NULL;
  }
  
-@@ -128,7 +129,9 @@ otx2_mbox_init(struct otx2_mbox *mbox, uintptr_t hwbase, uintptr_t reg_base,
+@@ -126,7 +127,9 @@ otx2_mbox_init(struct otx2_mbox *mbox, uintptr_t hwbase,
  		return -ENODEV;
  	}
  

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

* [dpdk-stable] patch 'net/ice/base: fix GTP-U inner RSS IPv4 IPv6 co-exist' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (107 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'common/octeontx2: fix crash on running procinfo' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/hns3: clear residual hardware configurations on init' " luca.boccassi
                   ` (82 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Junfeng Guo, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 85098a10e2037b80670e9f67507feb59d96c4019 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Wed, 1 Jul 2020 13:49:44 +0800
Subject: [PATCH] net/ice/base: fix GTP-U inner RSS IPv4 IPv6 co-exist

[ upstream commit bed9bb3139efd07817288dea85488435f79e0ab8 ]

An IP header combined with GTP-U header should be regarded as
inner layer for RSS, otherwise it mess the field vector between
an IPv4 rule and IPv6 rule e.g:

testpmd> flow create 0 ingress pattern eth / ipv4 / udp / gtpu / \
gtpu_psc  / ipv4 / udp / end actions rss types ipv4-udp end key_len \
0 queues end / end
testpmd> flow create 0 ingress pattern eth / ipv4 / udp / gtpu / \
gtpu_psc  / ipv6 / udp / end actions rss types ipv6-udp end key_len \
0 queues end / end

Fixes: b7d34ccc47b5 ("net/ice/base: packet encapsulation for RSS")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_flow.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index 9d58d284f..9d958b329 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -2124,6 +2124,13 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
 	if (status)
 		goto exit;
 
+	/* don't do RSS for GTPU outer */
+	if (segs_cnt == ICE_RSS_OUTER_HEADERS &&
+	    (segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU)) {
+		printf("ignore gtpu\n");
+		return ICE_SUCCESS;
+	}
+
 	/* Search for a flow profile that has matching headers, hash fields
 	 * and has the input VSI associated to it. If found, no further
 	 * operations required and exit.
@@ -2240,6 +2247,7 @@ ice_add_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
 	ice_acquire_lock(&hw->rss_locks);
 	status = ice_add_rss_cfg_sync(hw, vsi_handle, hashed_flds, addl_hdrs,
 				      ICE_RSS_OUTER_HEADERS, symm);
+
 	if (!status)
 		status = ice_add_rss_cfg_sync(hw, vsi_handle, hashed_flds,
 					      addl_hdrs, ICE_RSS_INNER_HEADERS,
@@ -2273,6 +2281,10 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
 	if (!segs)
 		return ICE_ERR_NO_MEMORY;
 
+	if (segs_cnt == ICE_RSS_OUTER_HEADERS &&
+	    segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU)
+		return ICE_SUCCESS;
+
 	/* Construct the packet segment info from the hashed fields */
 	status = ice_flow_set_rss_seg_info(&segs[segs_cnt - 1], hashed_flds,
 					   addl_hdrs);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.776424996 +0100
+++ 0110-net-ice-base-fix-GTP-U-inner-RSS-IPv4-IPv6-co-exist.patch	2020-07-24 12:53:48.363007876 +0100
@@ -1,8 +1,10 @@
-From bed9bb3139efd07817288dea85488435f79e0ab8 Mon Sep 17 00:00:00 2001
+From 85098a10e2037b80670e9f67507feb59d96c4019 Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang@intel.com>
 Date: Wed, 1 Jul 2020 13:49:44 +0800
 Subject: [PATCH] net/ice/base: fix GTP-U inner RSS IPv4 IPv6 co-exist
 
+[ upstream commit bed9bb3139efd07817288dea85488435f79e0ab8 ]
+
 An IP header combined with GTP-U header should be regarded as
 inner layer for RSS, otherwise it mess the field vector between
 an IPv4 rule and IPv6 rule e.g:
@@ -15,7 +17,6 @@
 0 queues end / end
 
 Fixes: b7d34ccc47b5 ("net/ice/base: packet encapsulation for RSS")
-Cc: stable@dpdk.org
 
 Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
 Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
@@ -25,10 +26,10 @@
  1 file changed, 12 insertions(+)
 
 diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
-index 6adcda844..180fe4466 100644
+index 9d58d284f..9d958b329 100644
 --- a/drivers/net/ice/base/ice_flow.c
 +++ b/drivers/net/ice/base/ice_flow.c
-@@ -3557,6 +3557,13 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
+@@ -2124,6 +2124,13 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
  	if (status)
  		goto exit;
  
@@ -42,7 +43,7 @@
  	/* Search for a flow profile that has matching headers, hash fields
  	 * and has the input VSI associated to it. If found, no further
  	 * operations required and exit.
-@@ -3673,6 +3680,7 @@ ice_add_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
+@@ -2240,6 +2247,7 @@ ice_add_rss_cfg(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
  	ice_acquire_lock(&hw->rss_locks);
  	status = ice_add_rss_cfg_sync(hw, vsi_handle, hashed_flds, addl_hdrs,
  				      ICE_RSS_OUTER_HEADERS, symm);
@@ -50,7 +51,7 @@
  	if (!status)
  		status = ice_add_rss_cfg_sync(hw, vsi_handle, hashed_flds,
  					      addl_hdrs, ICE_RSS_INNER_HEADERS,
-@@ -3706,6 +3714,10 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
+@@ -2273,6 +2281,10 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
  	if (!segs)
  		return ICE_ERR_NO_MEMORY;
  

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

* [dpdk-stable] patch 'net/hns3: clear residual hardware configurations on init' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (108 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/ice/base: fix GTP-U inner RSS IPv4 IPv6 co-exist' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/hns3: fix Rx buffer size' " luca.boccassi
                   ` (81 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Hongbo Zheng; +Cc: Wei Hu, Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From aaf0005929b0723a19ff3f49f8da325523d91d57 Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3@huawei.com>
Date: Wed, 1 Jul 2020 19:54:38 +0800
Subject: [PATCH] net/hns3: clear residual hardware configurations on init

[ upstream commit 223d9eceaeeeb4d5156d4c96eec1a34434d6ecab ]

When the last driver exits abnormally, for example, it is killed by
'kill -9', it may be too late to clear the configuration and cause the
configuration to remain. Therefore, to ensure that the hardware
environment is clean during initialization, the PF driver actively clear
the hardware environment during initialization, including PF and
corresponding VFs' vlan, mac, flow table configurations, etc.

Fixes: d51867db65c1 ("net/hns3: add initialization")

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 drivers/net/hns3/hns3_cmd.h    |  3 +++
 drivers/net/hns3/hns3_ethdev.c | 27 +++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h
index 26d410396..ab16b07a6 100644
--- a/drivers/net/hns3/hns3_cmd.h
+++ b/drivers/net/hns3/hns3_cmd.h
@@ -207,6 +207,9 @@ enum hns3_opcode_type {
 	HNS3_OPC_FD_AD_OP               = 0x1204,
 	HNS3_OPC_FD_COUNTER_OP          = 0x1205,
 
+	/* Clear hardware state command */
+	HNS3_OPC_CLEAR_HW_STATE         = 0x700A,
+
 	/* SFP command */
 	HNS3_OPC_SFP_GET_SPEED          = 0x7104,
 
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index f1066c079..4a1bb174c 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -4180,6 +4180,21 @@ err_mac_init:
 	return ret;
 }
 
+static int
+hns3_clear_hw(struct hns3_hw *hw)
+{
+	struct hns3_cmd_desc desc;
+	int ret;
+
+	hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_CLEAR_HW_STATE, false);
+
+	ret = hns3_cmd_send(hw, &desc, 1);
+	if (ret && ret != -EOPNOTSUPP)
+		return ret;
+
+	return 0;
+}
+
 static int
 hns3_init_pf(struct rte_eth_dev *eth_dev)
 {
@@ -4210,6 +4225,18 @@ hns3_init_pf(struct rte_eth_dev *eth_dev)
 		goto err_cmd_init;
 	}
 
+	/*
+	 * To ensure that the hardware environment is clean during
+	 * initialization, the driver actively clear the hardware environment
+	 * during initialization, including PF and corresponding VFs' vlan, mac,
+	 * flow table configurations, etc.
+	 */
+	ret = hns3_clear_hw(hw);
+	if (ret) {
+		PMD_INIT_LOG(ERR, "failed to clear hardware: %d", ret);
+		goto err_cmd_init;
+	}
+
 	ret = rte_intr_callback_register(&pci_dev->intr_handle,
 					 hns3_interrupt_handler,
 					 eth_dev);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.817439222 +0100
+++ 0111-net-hns3-clear-residual-hardware-configurations-on-i.patch	2020-07-24 12:53:48.367007950 +0100
@@ -1,8 +1,10 @@
-From 223d9eceaeeeb4d5156d4c96eec1a34434d6ecab Mon Sep 17 00:00:00 2001
+From aaf0005929b0723a19ff3f49f8da325523d91d57 Mon Sep 17 00:00:00 2001
 From: Hongbo Zheng <zhenghongbo3@huawei.com>
 Date: Wed, 1 Jul 2020 19:54:38 +0800
 Subject: [PATCH] net/hns3: clear residual hardware configurations on init
 
+[ upstream commit 223d9eceaeeeb4d5156d4c96eec1a34434d6ecab ]
+
 When the last driver exits abnormally, for example, it is killed by
 'kill -9', it may be too late to clear the configuration and cause the
 configuration to remain. Therefore, to ensure that the hardware
@@ -11,7 +13,6 @@
 corresponding VFs' vlan, mac, flow table configurations, etc.
 
 Fixes: d51867db65c1 ("net/hns3: add initialization")
-Cc: stable@dpdk.org
 
 Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -22,7 +23,7 @@
  2 files changed, 30 insertions(+)
 
 diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h
-index da770ac95..b203e663e 100644
+index 26d410396..ab16b07a6 100644
 --- a/drivers/net/hns3/hns3_cmd.h
 +++ b/drivers/net/hns3/hns3_cmd.h
 @@ -207,6 +207,9 @@ enum hns3_opcode_type {
@@ -36,10 +37,10 @@
  	HNS3_OPC_SFP_GET_SPEED          = 0x7104,
  
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index 4afee5d47..8b18b47d4 100644
+index f1066c079..4a1bb174c 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -4318,6 +4318,21 @@ err_mac_init:
+@@ -4180,6 +4180,21 @@ err_mac_init:
  	return ret;
  }
  
@@ -61,7 +62,7 @@
  static int
  hns3_init_pf(struct rte_eth_dev *eth_dev)
  {
-@@ -4348,6 +4363,18 @@ hns3_init_pf(struct rte_eth_dev *eth_dev)
+@@ -4210,6 +4225,18 @@ hns3_init_pf(struct rte_eth_dev *eth_dev)
  		goto err_cmd_init;
  	}
  

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

* [dpdk-stable] patch 'net/hns3: fix Rx buffer size' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (109 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/hns3: clear residual hardware configurations on init' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/hinic/base: check output of management sync channel' " luca.boccassi
                   ` (80 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Wei Hu (Xavier); +Cc: Chengchang Tang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 479064d41e9cbd7654abe1689043e4045e206bbd Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Wed, 1 Jul 2020 19:54:40 +0800
Subject: [PATCH] net/hns3: fix Rx buffer size

[ upstream commit dfac40d93edf7dbac8ef41f775daba4e54a39263 ]

Currently, rx_buf_size of hns3 PMD driver is fixed on, and it's value
depends on the firmware which will decrease the flexibility of PMD.

The receive side mbufs was allocated from the mempool given by upper
application calling rte_eth_rx_queue_setup API function. So the memory
chunk used for net device DMA is depend on the data room size of the
objects in this mempool. Hns3 PMD driver should set the rx_buf_len
smaller than the data room size of mempool and our hardware only support
the following four specifications: 512, 1024, 2148 and 4096.

Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    |  3 +-
 drivers/net/hns3/hns3_ethdev.h    |  1 -
 drivers/net/hns3/hns3_ethdev_vf.c |  5 +--
 drivers/net/hns3/hns3_rxtx.c      | 56 +++++++++++++++++++++++++++++--
 drivers/net/hns3/hns3_rxtx.h      |  8 +++++
 5 files changed, 64 insertions(+), 9 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 4a1bb174c..4922e1bde 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2362,7 +2362,7 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
 	info->max_rx_queues = queue_num;
 	info->max_tx_queues = hw->tqps_num;
 	info->max_rx_pktlen = HNS3_MAX_FRAME_LEN; /* CRC included */
-	info->min_rx_bufsize = hw->rx_buf_len;
+	info->min_rx_bufsize = HNS3_MIN_BD_BUF_SIZE;
 	info->max_mac_addrs = HNS3_UC_MACADDR_NUM;
 	info->max_mtu = info->max_rx_pktlen - HNS3_ETH_OVERHEAD;
 	info->rx_offload_capa = (DEV_RX_OFFLOAD_IPV4_CKSUM |
@@ -2709,7 +2709,6 @@ hns3_get_board_configuration(struct hns3_hw *hw)
 	hw->mac.media_type = cfg.media_type;
 	hw->rss_size_max = cfg.rss_size_max;
 	hw->rss_dis_flag = false;
-	hw->rx_buf_len = cfg.rx_buf_len;
 	memcpy(hw->mac.mac_addr, cfg.mac_addr, RTE_ETHER_ADDR_LEN);
 	hw->mac.phy_addr = cfg.phy_addr;
 	hw->mac.default_addr_setted = false;
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index e7d9fe0e0..155099e99 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -363,7 +363,6 @@ struct hns3_hw {
 	uint16_t tqps_num;          /* num task queue pairs of this function */
 	uint16_t intr_tqps_num;     /* num queue pairs mapping interrupt */
 	uint16_t rss_size_max;      /* HW defined max RSS task queue */
-	uint16_t rx_buf_len;
 	uint16_t num_tx_desc;       /* desc num of per tx queue */
 	uint16_t num_rx_desc;       /* desc num of per rx queue */
 
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 22cd9eb33..a2867f8ec 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -652,7 +652,7 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
 	info->max_rx_queues = q_num;
 	info->max_tx_queues = hw->tqps_num;
 	info->max_rx_pktlen = HNS3_MAX_FRAME_LEN; /* CRC included */
-	info->min_rx_bufsize = hw->rx_buf_len;
+	info->min_rx_bufsize = HNS3_MIN_BD_BUF_SIZE;
 	info->max_mac_addrs = HNS3_VF_UC_MACADDR_NUM;
 	info->max_mtu = info->max_rx_pktlen - HNS3_ETH_OVERHEAD;
 
@@ -816,8 +816,6 @@ hns3vf_check_tqp_info(struct hns3_hw *hw)
 		return -EINVAL;
 	}
 
-	if (hw->rx_buf_len == 0)
-		hw->rx_buf_len = HNS3_DEFAULT_RX_BUF_LEN;
 	hw->alloc_rss_size = RTE_MIN(hw->rss_size_max, hw->tqps_num);
 
 	return 0;
@@ -839,7 +837,6 @@ hns3vf_get_queue_info(struct hns3_hw *hw)
 
 	memcpy(&hw->tqps_num, &resp_msg[0], sizeof(uint16_t));
 	memcpy(&hw->rss_size_max, &resp_msg[2], sizeof(uint16_t));
-	memcpy(&hw->rx_buf_len, &resp_msg[4], sizeof(uint16_t));
 
 	return hns3vf_check_tqp_info(hw);
 }
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 3251515fe..c1ffa136b 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -884,7 +884,7 @@ hns3_fake_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx,
 	nb_rx_q = dev->data->nb_rx_queues;
 	rxq->io_base = (void *)((char *)hw->io_base + HNS3_TQP_REG_OFFSET +
 				(nb_rx_q + idx) * HNS3_TQP_REG_SIZE);
-	rxq->rx_buf_len = hw->rx_buf_len;
+	rxq->rx_buf_len = HNS3_MIN_BD_BUF_SIZE;
 
 	rte_spinlock_lock(&hw->lock);
 	hw->fkq_data.rx_queues[idx] = rxq;
@@ -1160,6 +1160,48 @@ hns3_dev_release_mbufs(struct hns3_adapter *hns)
 		}
 }
 
+static int
+hns3_rx_buf_len_calc(struct rte_mempool *mp, uint16_t *rx_buf_len)
+{
+	uint16_t vld_buf_size;
+	uint16_t num_hw_specs;
+	uint16_t i;
+
+	/*
+	 * hns3 network engine only support to set 4 typical specification, and
+	 * different buffer size will affect the max packet_len and the max
+	 * number of segmentation when hw gro is turned on in receive side. The
+	 * relationship between them is as follows:
+	 *      rx_buf_size     |  max_gro_pkt_len  |  max_gro_nb_seg
+	 * ---------------------|-------------------|----------------
+	 * HNS3_4K_BD_BUF_SIZE  |        60KB       |       15
+	 * HNS3_2K_BD_BUF_SIZE  |        62KB       |       31
+	 * HNS3_1K_BD_BUF_SIZE  |        63KB       |       63
+	 * HNS3_512_BD_BUF_SIZE |      31.5KB       |       63
+	 */
+	static const uint16_t hw_rx_buf_size[] = {
+		HNS3_4K_BD_BUF_SIZE,
+		HNS3_2K_BD_BUF_SIZE,
+		HNS3_1K_BD_BUF_SIZE,
+		HNS3_512_BD_BUF_SIZE
+	};
+
+	vld_buf_size = (uint16_t)(rte_pktmbuf_data_room_size(mp) -
+			RTE_PKTMBUF_HEADROOM);
+
+	if (vld_buf_size < HNS3_MIN_BD_BUF_SIZE)
+		return -EINVAL;
+
+	num_hw_specs = RTE_DIM(hw_rx_buf_size);
+	for (i = 0; i < num_hw_specs; i++) {
+		if (vld_buf_size >= hw_rx_buf_size[i]) {
+			*rx_buf_len = hw_rx_buf_size[i];
+			break;
+		}
+	}
+	return 0;
+}
+
 int
 hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
 		    unsigned int socket_id, const struct rte_eth_rxconf *conf,
@@ -1169,6 +1211,7 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
 	struct hns3_hw *hw = &hns->hw;
 	struct hns3_queue_info q_info;
 	struct hns3_rx_queue *rxq;
+	uint16_t rx_buf_size;
 	int rx_entry_len;
 
 	if (dev->data->dev_started) {
@@ -1193,6 +1236,15 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
 	q_info.nb_desc = nb_desc;
 	q_info.type = "hns3 RX queue";
 	q_info.ring_name = "rx_ring";
+
+	if (hns3_rx_buf_len_calc(mp, &rx_buf_size)) {
+		hns3_err(hw, "rxq mbufs' data room size:%u is not enough! "
+				"minimal data room size:%u.",
+				rte_pktmbuf_data_room_size(mp),
+				HNS3_MIN_BD_BUF_SIZE + RTE_PKTMBUF_HEADROOM);
+		return -EINVAL;
+	}
+
 	rxq = hns3_alloc_rxq_and_dma_zone(dev, &q_info);
 	if (rxq == NULL) {
 		hns3_err(hw,
@@ -1226,7 +1278,7 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
 	rxq->configured = true;
 	rxq->io_base = (void *)((char *)hw->io_base + HNS3_TQP_REG_OFFSET +
 				idx * HNS3_TQP_REG_SIZE);
-	rxq->rx_buf_len = hw->rx_buf_len;
+	rxq->rx_buf_len = rx_buf_size;
 	rxq->l2_errors = 0;
 	rxq->pkt_len_errors = 0;
 	rxq->l3_csum_erros = 0;
diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h
index 771f3c9be..1fd1afd1d 100644
--- a/drivers/net/hns3/hns3_rxtx.h
+++ b/drivers/net/hns3/hns3_rxtx.h
@@ -11,6 +11,14 @@
 #define	HNS3_ALIGN_RING_DESC	32
 #define HNS3_RING_BASE_ALIGN	128
 
+#define HNS3_512_BD_BUF_SIZE	512
+#define HNS3_1K_BD_BUF_SIZE	1024
+#define HNS3_2K_BD_BUF_SIZE	2048
+#define HNS3_4K_BD_BUF_SIZE	4096
+
+#define HNS3_MIN_BD_BUF_SIZE	HNS3_512_BD_BUF_SIZE
+#define HNS3_MAX_BD_BUF_SIZE	HNS3_4K_BD_BUF_SIZE
+
 #define HNS3_BD_SIZE_512_TYPE			0
 #define HNS3_BD_SIZE_1024_TYPE			1
 #define HNS3_BD_SIZE_2048_TYPE			2
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.860342031 +0100
+++ 0112-net-hns3-fix-Rx-buffer-size.patch	2020-07-24 12:53:48.375008099 +0100
@@ -1,8 +1,10 @@
-From dfac40d93edf7dbac8ef41f775daba4e54a39263 Mon Sep 17 00:00:00 2001
+From 479064d41e9cbd7654abe1689043e4045e206bbd Mon Sep 17 00:00:00 2001
 From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
 Date: Wed, 1 Jul 2020 19:54:40 +0800
 Subject: [PATCH] net/hns3: fix Rx buffer size
 
+[ upstream commit dfac40d93edf7dbac8ef41f775daba4e54a39263 ]
+
 Currently, rx_buf_size of hns3 PMD driver is fixed on, and it's value
 depends on the firmware which will decrease the flexibility of PMD.
 
@@ -14,7 +16,6 @@
 the following four specifications: 512, 1024, 2148 and 4096.
 
 Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -27,10 +28,10 @@
  5 files changed, 64 insertions(+), 9 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index b9868de54..13ce32432 100644
+index 4a1bb174c..4922e1bde 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -2450,7 +2450,7 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
+@@ -2362,7 +2362,7 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
  	info->max_rx_queues = queue_num;
  	info->max_tx_queues = hw->tqps_num;
  	info->max_rx_pktlen = HNS3_MAX_FRAME_LEN; /* CRC included */
@@ -38,8 +39,8 @@
 +	info->min_rx_bufsize = HNS3_MIN_BD_BUF_SIZE;
  	info->max_mac_addrs = HNS3_UC_MACADDR_NUM;
  	info->max_mtu = info->max_rx_pktlen - HNS3_ETH_OVERHEAD;
- 	info->max_lro_pkt_size = HNS3_MAX_LRO_SIZE;
-@@ -2848,7 +2848,6 @@ hns3_get_board_configuration(struct hns3_hw *hw)
+ 	info->rx_offload_capa = (DEV_RX_OFFLOAD_IPV4_CKSUM |
+@@ -2709,7 +2709,6 @@ hns3_get_board_configuration(struct hns3_hw *hw)
  	hw->mac.media_type = cfg.media_type;
  	hw->rss_size_max = cfg.rss_size_max;
  	hw->rss_dis_flag = false;
@@ -48,10 +49,10 @@
  	hw->mac.phy_addr = cfg.phy_addr;
  	hw->mac.default_addr_setted = false;
 diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
-index c390263bd..3c991f4ce 100644
+index e7d9fe0e0..155099e99 100644
 --- a/drivers/net/hns3/hns3_ethdev.h
 +++ b/drivers/net/hns3/hns3_ethdev.h
-@@ -375,7 +375,6 @@ struct hns3_hw {
+@@ -363,7 +363,6 @@ struct hns3_hw {
  	uint16_t tqps_num;          /* num task queue pairs of this function */
  	uint16_t intr_tqps_num;     /* num queue pairs mapping interrupt */
  	uint16_t rss_size_max;      /* HW defined max RSS task queue */
@@ -60,10 +61,10 @@
  	uint16_t num_rx_desc;       /* desc num of per rx queue */
  
 diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
-index 9c45ffae2..3c5998abe 100644
+index 22cd9eb33..a2867f8ec 100644
 --- a/drivers/net/hns3/hns3_ethdev_vf.c
 +++ b/drivers/net/hns3/hns3_ethdev_vf.c
-@@ -902,7 +902,7 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
+@@ -652,7 +652,7 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
  	info->max_rx_queues = q_num;
  	info->max_tx_queues = hw->tqps_num;
  	info->max_rx_pktlen = HNS3_MAX_FRAME_LEN; /* CRC included */
@@ -71,8 +72,8 @@
 +	info->min_rx_bufsize = HNS3_MIN_BD_BUF_SIZE;
  	info->max_mac_addrs = HNS3_VF_UC_MACADDR_NUM;
  	info->max_mtu = info->max_rx_pktlen - HNS3_ETH_OVERHEAD;
- 	info->max_lro_pkt_size = HNS3_MAX_LRO_SIZE;
-@@ -1096,8 +1096,6 @@ hns3vf_check_tqp_info(struct hns3_hw *hw)
+ 
+@@ -816,8 +816,6 @@ hns3vf_check_tqp_info(struct hns3_hw *hw)
  		return -EINVAL;
  	}
  
@@ -81,7 +82,7 @@
  	hw->alloc_rss_size = RTE_MIN(hw->rss_size_max, hw->tqps_num);
  
  	return 0;
-@@ -1162,7 +1160,6 @@ hns3vf_get_queue_info(struct hns3_hw *hw)
+@@ -839,7 +837,6 @@ hns3vf_get_queue_info(struct hns3_hw *hw)
  
  	memcpy(&hw->tqps_num, &resp_msg[0], sizeof(uint16_t));
  	memcpy(&hw->rss_size_max, &resp_msg[2], sizeof(uint16_t));
@@ -90,10 +91,10 @@
  	return hns3vf_check_tqp_info(hw);
  }
 diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
-index 0f9825f74..931d89a1a 100644
+index 3251515fe..c1ffa136b 100644
 --- a/drivers/net/hns3/hns3_rxtx.c
 +++ b/drivers/net/hns3/hns3_rxtx.c
-@@ -909,7 +909,7 @@ hns3_fake_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx,
+@@ -884,7 +884,7 @@ hns3_fake_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx,
  	nb_rx_q = dev->data->nb_rx_queues;
  	rxq->io_base = (void *)((char *)hw->io_base + HNS3_TQP_REG_OFFSET +
  				(nb_rx_q + idx) * HNS3_TQP_REG_SIZE);
@@ -102,7 +103,7 @@
  
  	rte_spinlock_lock(&hw->lock);
  	hw->fkq_data.rx_queues[idx] = rxq;
-@@ -1185,6 +1185,48 @@ hns3_dev_release_mbufs(struct hns3_adapter *hns)
+@@ -1160,6 +1160,48 @@ hns3_dev_release_mbufs(struct hns3_adapter *hns)
  		}
  }
  
@@ -151,7 +152,7 @@
  int
  hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
  		    unsigned int socket_id, const struct rte_eth_rxconf *conf,
-@@ -1194,6 +1236,7 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
+@@ -1169,6 +1211,7 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
  	struct hns3_hw *hw = &hns->hw;
  	struct hns3_queue_info q_info;
  	struct hns3_rx_queue *rxq;
@@ -159,7 +160,7 @@
  	int rx_entry_len;
  
  	if (dev->data->dev_started) {
-@@ -1218,6 +1261,15 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
+@@ -1193,6 +1236,15 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
  	q_info.nb_desc = nb_desc;
  	q_info.type = "hns3 RX queue";
  	q_info.ring_name = "rx_ring";
@@ -175,7 +176,7 @@
  	rxq = hns3_alloc_rxq_and_dma_zone(dev, &q_info);
  	if (rxq == NULL) {
  		hns3_err(hw,
-@@ -1252,7 +1304,7 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
+@@ -1226,7 +1278,7 @@ hns3_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
  	rxq->configured = true;
  	rxq->io_base = (void *)((char *)hw->io_base + HNS3_TQP_REG_OFFSET +
  				idx * HNS3_TQP_REG_SIZE);
@@ -185,7 +186,7 @@
  	rxq->pkt_len_errors = 0;
  	rxq->l3_csum_erros = 0;
 diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h
-index b85c64f65..ccd508b74 100644
+index 771f3c9be..1fd1afd1d 100644
 --- a/drivers/net/hns3/hns3_rxtx.h
 +++ b/drivers/net/hns3/hns3_rxtx.h
 @@ -11,6 +11,14 @@

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

* [dpdk-stable] patch 'net/hinic/base: check output of management sync channel' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (110 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/hns3: fix Rx buffer size' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/hinic/base: remove unused function parameters' " luca.boccassi
                   ` (79 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Xiaoyun Wang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 8c67f69848d837e25707254c876eb5f61f166df8 Mon Sep 17 00:00:00 2001
From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Date: Sat, 27 Jun 2020 11:55:44 +0800
Subject: [PATCH] net/hinic/base: check output of management sync channel

[ upstream commit d807dd7d4cd8e3ef4d42bd945cfb8318e4fef5b6 ]

Add output buffer and out size info for some cmds that use management
sync channel, which can improve dfx capability when sent msg failed.

Fixes: 7fcd6b05b923 ("net/hinic/base: support cmdq mechanism")

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
---
 drivers/net/hinic/base/hinic_pmd_cmdq.c   |  31 ++++--
 drivers/net/hinic/base/hinic_pmd_hwdev.c  | 129 +++++++++++++++-------
 drivers/net/hinic/base/hinic_pmd_niccfg.c |  28 ++---
 drivers/net/hinic/base/hinic_pmd_nicio.c  |  36 ++++--
 4 files changed, 151 insertions(+), 73 deletions(-)

diff --git a/drivers/net/hinic/base/hinic_pmd_cmdq.c b/drivers/net/hinic/base/hinic_pmd_cmdq.c
index 2e98b9c28..1816636c3 100644
--- a/drivers/net/hinic/base/hinic_pmd_cmdq.c
+++ b/drivers/net/hinic/base/hinic_pmd_cmdq.c
@@ -426,27 +426,31 @@ static int hinic_set_cmdq_ctxts(struct hinic_hwdev *hwdev)
 {
 	struct hinic_cmdqs *cmdqs = hwdev->cmdqs;
 	struct hinic_cmdq_ctxt *cmdq_ctxt;
+	struct hinic_cmdq_ctxt cmdq_ctxt_out;
 	enum hinic_cmdq_type cmdq_type;
+	u16 out_size = sizeof(cmdq_ctxt_out);
 	u16 in_size;
 	int err;
 
 	cmdq_type = HINIC_CMDQ_SYNC;
+	memset(&cmdq_ctxt_out, 0, out_size);
 	for (; cmdq_type < HINIC_MAX_CMDQ_TYPES; cmdq_type++) {
 		cmdq_ctxt = &cmdqs->cmdq[cmdq_type].cmdq_ctxt;
 		cmdq_ctxt->resp_aeq_num = HINIC_AEQ1;
 		in_size = sizeof(*cmdq_ctxt);
 		err = hinic_msg_to_mgmt_sync(hwdev, HINIC_MOD_COMM,
 					     HINIC_MGMT_CMD_CMDQ_CTXT_SET,
-					     cmdq_ctxt, in_size, NULL,
-					     NULL, 0);
-		if (err) {
+					     cmdq_ctxt, in_size, &cmdq_ctxt_out,
+					     &out_size, 0);
+		if (err || !out_size || cmdq_ctxt_out.status) {
 			if (err == HINIC_MBOX_PF_BUSY_ACTIVE_FW ||
 				err == HINIC_DEV_BUSY_ACTIVE_FW) {
 				cmdqs->status |= HINIC_CMDQ_SET_FAIL;
 				PMD_DRV_LOG(ERR, "PF or VF fw is hot active");
 			}
-			PMD_DRV_LOG(ERR, "Set cmdq ctxt failed, err: %d", err);
-			return -EFAULT;
+			PMD_DRV_LOG(ERR, "Set cmdq ctxt failed, err: %d, status: 0x%x, out_size: 0x%x",
+				err, cmdq_ctxt_out.status, out_size);
+			return -EIO;
 		}
 	}
 
@@ -631,6 +635,8 @@ static void hinic_cmdqs_free(struct hinic_hwdev *hwdev)
 static int hinic_set_cmdq_depth(struct hinic_hwdev *hwdev, u16 cmdq_depth)
 {
 	struct hinic_root_ctxt root_ctxt;
+	u16 out_size = sizeof(root_ctxt);
+	int err;
 
 	memset(&root_ctxt, 0, sizeof(root_ctxt));
 	root_ctxt.mgmt_msg_head.resp_aeq_num = HINIC_AEQ1;
@@ -638,10 +644,17 @@ static int hinic_set_cmdq_depth(struct hinic_hwdev *hwdev, u16 cmdq_depth)
 	root_ctxt.ppf_idx = hinic_ppf_idx(hwdev);
 	root_ctxt.set_cmdq_depth = 1;
 	root_ctxt.cmdq_depth = (u8)ilog2(cmdq_depth);
-	return hinic_msg_to_mgmt_sync(hwdev, HINIC_MOD_COMM,
-				      HINIC_MGMT_CMD_VAT_SET,
-				      &root_ctxt, sizeof(root_ctxt),
-				      NULL, NULL, 0);
+	err = hinic_msg_to_mgmt_sync(hwdev, HINIC_MOD_COMM,
+				     HINIC_MGMT_CMD_VAT_SET,
+				     &root_ctxt, sizeof(root_ctxt),
+				     &root_ctxt, &out_size, 0);
+	if (err || !out_size || root_ctxt.mgmt_msg_head.status) {
+		PMD_DRV_LOG(ERR, "Set cmdq depth failed, err: %d, status: 0x%x, out_size: 0x%x",
+			err, root_ctxt.mgmt_msg_head.status, out_size);
+		return -EIO;
+	}
+
+	return 0;
 }
 
 int hinic_comm_cmdqs_init(struct hinic_hwdev *hwdev)
diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c
index fc11ecd7a..45b976536 100644
--- a/drivers/net/hinic/base/hinic_pmd_hwdev.c
+++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c
@@ -390,6 +390,8 @@ void hinic_osdep_deinit(struct hinic_hwdev *hwdev)
 int hinic_set_ci_table(void *hwdev, u16 q_id, struct hinic_sq_attr *attr)
 {
 	struct hinic_cons_idx_attr cons_idx_attr;
+	u16 out_size = sizeof(cons_idx_attr);
+	int err;
 
 	memset(&cons_idx_attr, 0, sizeof(cons_idx_attr));
 	cons_idx_attr.mgmt_msg_head.resp_aeq_num = HINIC_AEQ1;
@@ -406,10 +408,17 @@ int hinic_set_ci_table(void *hwdev, u16 q_id, struct hinic_sq_attr *attr)
 	cons_idx_attr.sq_id = q_id;
 	cons_idx_attr.ci_addr = attr->ci_dma_base;
 
-	return hinic_msg_to_mgmt_sync(hwdev, HINIC_MOD_COMM,
+	err = hinic_msg_to_mgmt_sync(hwdev, HINIC_MOD_COMM,
 				      HINIC_MGMT_CMD_L2NIC_SQ_CI_ATTR_SET,
 				      &cons_idx_attr, sizeof(cons_idx_attr),
-				      NULL, NULL, 0);
+				      &cons_idx_attr, &out_size, 0);
+	if (err || !out_size || cons_idx_attr.mgmt_msg_head.status) {
+		PMD_DRV_LOG(ERR, "Set ci attribute table failed, err: %d, status: 0x%x, out_size: 0x%x",
+			err, cons_idx_attr.mgmt_msg_head.status, out_size);
+		return -EIO;
+	}
+
+	return 0;
 }
 
 /**
@@ -422,7 +431,9 @@ int hinic_set_ci_table(void *hwdev, u16 q_id, struct hinic_sq_attr *attr)
  */
 int hinic_set_pagesize(void *hwdev, u8 page_size)
 {
-	struct hinic_page_size cmd;
+	struct hinic_page_size page_size_info;
+	u16 out_size = sizeof(page_size_info);
+	int err;
 
 	if (page_size > HINIC_PAGE_SIZE_MAX) {
 		PMD_DRV_LOG(ERR, "Invalid page_size %u, bigger than %u",
@@ -430,16 +441,23 @@ int hinic_set_pagesize(void *hwdev, u8 page_size)
 		return -EINVAL;
 	}
 
-	memset(&cmd, 0, sizeof(cmd));
-	cmd.mgmt_msg_head.resp_aeq_num = HINIC_AEQ1;
-	cmd.func_idx = hinic_global_func_id(hwdev);
-	cmd.ppf_idx = hinic_ppf_idx(hwdev);
-	cmd.page_size = page_size;
+	memset(&page_size_info, 0, sizeof(page_size_info));
+	page_size_info.mgmt_msg_head.resp_aeq_num = HINIC_AEQ1;
+	page_size_info.func_idx = hinic_global_func_id(hwdev);
+	page_size_info.ppf_idx = hinic_ppf_idx(hwdev);
+	page_size_info.page_size = page_size;
 
-	return hinic_msg_to_mgmt_sync(hwdev, HINIC_MOD_COMM,
-					HINIC_MGMT_CMD_PAGESIZE_SET,
-					&cmd, sizeof(cmd),
-					NULL, NULL, 0);
+	err = hinic_msg_to_mgmt_sync(hwdev, HINIC_MOD_COMM,
+				     HINIC_MGMT_CMD_PAGESIZE_SET,
+				     &page_size_info, sizeof(page_size_info),
+				     &page_size_info, &out_size, 0);
+	if (err || !out_size || page_size_info.mgmt_msg_head.status) {
+		PMD_DRV_LOG(ERR, "Set wq page size failed, err: %d, status: 0x%x, out_size: 0x%0x",
+			err, page_size_info.mgmt_msg_head.status, out_size);
+		return -EIO;
+	}
+
+	return 0;
 }
 
 static int wait_for_flr_finish(struct hinic_hwif *hwif)
@@ -546,7 +564,9 @@ static int hinic_pf_rx_tx_flush(struct hinic_hwdev *hwdev)
 	struct hinic_hwif *hwif = hwdev->hwif;
 	struct hinic_clear_doorbell clear_db;
 	struct hinic_clear_resource clr_res;
+	u16 out_size;
 	int err;
+	int ret = 0;
 
 	rte_delay_ms(100);
 
@@ -557,15 +577,19 @@ static int hinic_pf_rx_tx_flush(struct hinic_hwdev *hwdev)
 	}
 
 	hinic_disable_doorbell(hwif);
+	out_size = sizeof(clear_db);
 	memset(&clear_db, 0, sizeof(clear_db));
 	clear_db.mgmt_msg_head.resp_aeq_num = HINIC_AEQ1;
 	clear_db.func_idx = HINIC_HWIF_GLOBAL_IDX(hwif);
 	clear_db.ppf_idx  = HINIC_HWIF_PPF_IDX(hwif);
 	err = hinic_msg_to_mgmt_sync(hwdev, HINIC_MOD_COMM,
 				     HINIC_MGMT_CMD_FLUSH_DOORBELL, &clear_db,
-				     sizeof(clear_db), NULL, NULL, 0);
-	if (err)
-		PMD_DRV_LOG(WARNING, "Flush doorbell failed");
+				     sizeof(clear_db), &clear_db, &out_size, 0);
+	if (err || !out_size || clear_db.mgmt_msg_head.status) {
+		PMD_DRV_LOG(WARNING, "Flush doorbell failed, err: %d, status: 0x%x, out_size: 0x%x",
+			 err, clear_db.mgmt_msg_head.status, out_size);
+		ret = err ? err : (-EIO);
+	}
 
 	hinic_set_pf_status(hwif, HINIC_PF_STATUS_FLR_START_FLAG);
 	memset(&clr_res, 0, sizeof(clr_res));
@@ -576,20 +600,27 @@ static int hinic_pf_rx_tx_flush(struct hinic_hwdev *hwdev)
 	err = hinic_msg_to_mgmt_no_ack(hwdev, HINIC_MOD_COMM,
 				       HINIC_MGMT_CMD_START_FLR, &clr_res,
 				       sizeof(clr_res), NULL, NULL);
-	if (err)
-		PMD_DRV_LOG(WARNING, "Notice flush message failed");
+	if (err) {
+		PMD_DRV_LOG(WARNING, "Notice flush msg failed, err: %d", err);
+		ret = err;
+	}
 
 	err = wait_for_flr_finish(hwif);
-	if (err)
-		PMD_DRV_LOG(WARNING, "Wait firmware FLR timeout");
+	if (err) {
+		PMD_DRV_LOG(WARNING, "Wait firmware FLR timeout, err: %d", err);
+		ret = err;
+	}
 
 	hinic_enable_doorbell(hwif);
 
 	err = hinic_reinit_cmdq_ctxts(hwdev);
-	if (err)
-		PMD_DRV_LOG(WARNING, "Reinit cmdq failed when pf flush");
+	if (err) {
+		PMD_DRV_LOG(WARNING,
+			    "Reinit cmdq failed when pf flush, err: %d", err);
+		ret = err;
+	}
 
-	return 0;
+	return ret;
 }
 
 int hinic_func_rx_tx_flush(struct hinic_hwdev *hwdev)
@@ -623,9 +654,9 @@ static int hinic_get_interrupt_cfg(struct hinic_hwdev *hwdev,
 				     &msix_cfg, sizeof(msix_cfg),
 				     &msix_cfg, &out_size, 0);
 	if (err || !out_size || msix_cfg.mgmt_msg_head.status) {
-		PMD_DRV_LOG(ERR, "Get interrupt config failed, ret: %d",
-			msix_cfg.mgmt_msg_head.status);
-		return -EINVAL;
+		PMD_DRV_LOG(ERR, "Get interrupt config failed, err: %d, status: 0x%x, out size: 0x%x",
+			err, msix_cfg.mgmt_msg_head.status, out_size);
+		return -EIO;
 	}
 
 	interrupt_info->lli_credit_limit = msix_cfg.lli_credit_cnt;
@@ -683,9 +714,9 @@ int hinic_set_interrupt_cfg(struct hinic_hwdev *hwdev,
 				     &msix_cfg, sizeof(msix_cfg),
 				     &msix_cfg, &out_size, 0);
 	if (err || !out_size || msix_cfg.mgmt_msg_head.status) {
-		PMD_DRV_LOG(ERR, "Set interrupt config failed, ret: %d",
-			msix_cfg.mgmt_msg_head.status);
-		return -EINVAL;
+		PMD_DRV_LOG(ERR, "Set interrupt config failed, err: %d, status: 0x%x, out size: 0x%x",
+			err, msix_cfg.mgmt_msg_head.status, out_size);
+		return -EIO;
 	}
 
 	return 0;
@@ -770,6 +801,8 @@ static int set_vf_dma_attr_entry(struct hinic_hwdev *hwdev, u8 entry_idx,
 				enum hinic_pcie_tph tph_en)
 {
 	struct hinic_vf_dma_attr_table attr;
+	u16 out_size = sizeof(attr);
+	int err;
 
 	memset(&attr, 0, sizeof(attr));
 	attr.func_idx = hinic_global_func_id(hwdev);
@@ -782,9 +815,16 @@ static int set_vf_dma_attr_entry(struct hinic_hwdev *hwdev, u8 entry_idx,
 	attr.no_snooping = no_snooping;
 	attr.tph_en = tph_en;
 
-	return hinic_msg_to_mgmt_sync(hwdev, HINIC_MOD_COMM,
-					HINIC_MGMT_CMD_DMA_ATTR_SET,
-					&attr, sizeof(attr), NULL, NULL, 0);
+	err = hinic_msg_to_mgmt_sync(hwdev, HINIC_MOD_COMM,
+				     HINIC_MGMT_CMD_DMA_ATTR_SET,
+				     &attr, sizeof(attr), &attr, &out_size, 0);
+	if (err || !out_size || attr.mgmt_msg_head.status) {
+		PMD_DRV_LOG(ERR, "Set dma attribute failed, err: %d, status: 0x%x, out_size: 0x%x",
+			err, attr.mgmt_msg_head.status, out_size);
+		return -EIO;
+	}
+
+	return 0;
 }
 
 /**
@@ -926,17 +966,26 @@ static void fault_report_show(struct hinic_hwdev *hwdev,
 static int resources_state_set(struct hinic_hwdev *hwdev,
 			       enum hinic_res_state state)
 {
-	struct hinic_hwif *hwif = hwdev->hwif;
 	struct hinic_cmd_set_res_state res_state;
+	u16 out_size = sizeof(res_state);
+	int err;
 
 	memset(&res_state, 0, sizeof(res_state));
 	res_state.mgmt_msg_head.resp_aeq_num = HINIC_AEQ1;
-	res_state.func_idx = HINIC_HWIF_GLOBAL_IDX(hwif);
+	res_state.func_idx = HINIC_HWIF_GLOBAL_IDX(hwdev->hwif);
 	res_state.state = state;
 
-	return hinic_msg_to_mgmt_sync(hwdev, HINIC_MOD_COMM,
+	err = hinic_msg_to_mgmt_sync(hwdev, HINIC_MOD_COMM,
 				 HINIC_MGMT_CMD_RES_STATE_SET,
-				 &res_state, sizeof(res_state), NULL, NULL, 0);
+				 &res_state, sizeof(res_state),
+				 &res_state, &out_size, 0);
+	if (err || !out_size || res_state.mgmt_msg_head.status) {
+		PMD_DRV_LOG(ERR, "Set resources state failed, err: %d, status: 0x%x, out_size: 0x%x",
+			err, res_state.mgmt_msg_head.status, out_size);
+		return -EIO;
+	}
+
+	return 0;
 }
 
 /**
@@ -1020,6 +1069,7 @@ int hinic_l2nic_reset(struct hinic_hwdev *hwdev)
 {
 	struct hinic_hwif *hwif = hwdev->hwif;
 	struct hinic_l2nic_reset l2nic_reset;
+	u16 out_size = sizeof(l2nic_reset);
 	int err = 0;
 
 	err = hinic_set_vport_enable(hwdev, false);
@@ -1036,10 +1086,11 @@ int hinic_l2nic_reset(struct hinic_hwdev *hwdev)
 	err = hinic_msg_to_mgmt_sync(hwdev, HINIC_MOD_COMM,
 				     HINIC_MGMT_CMD_L2NIC_RESET,
 				     &l2nic_reset, sizeof(l2nic_reset),
-				     NULL, NULL, 0);
-	if (err || l2nic_reset.mgmt_msg_head.status) {
-		PMD_DRV_LOG(ERR, "Reset L2NIC resources failed");
-		return -EFAULT;
+				     &l2nic_reset, &out_size, 0);
+	if (err || !out_size || l2nic_reset.mgmt_msg_head.status) {
+		PMD_DRV_LOG(ERR, "Reset L2NIC resources failed, err: %d, status: 0x%x, out_size: 0x%x",
+			err, l2nic_reset.mgmt_msg_head.status, out_size);
+		return -EIO;
 	}
 
 	return 0;
diff --git a/drivers/net/hinic/base/hinic_pmd_niccfg.c b/drivers/net/hinic/base/hinic_pmd_niccfg.c
index 2dc431e28..ad81fdde4 100644
--- a/drivers/net/hinic/base/hinic_pmd_niccfg.c
+++ b/drivers/net/hinic/base/hinic_pmd_niccfg.c
@@ -18,7 +18,6 @@
 			buf_in, in_size,			\
 			buf_out, out_size, 0)
 
-
 #define TCAM_SET	0x1
 #define TCAM_CLEAR	0x2
 
@@ -396,9 +395,8 @@ int hinic_add_remove_vlan(void *hwdev, u16 vlan_id, u16 func_id, bool add)
 	vlan_info.func_id = func_id;
 	vlan_info.vlan_id = vlan_id;
 
-	err = l2nic_msg_to_mgmt_sync(hwdev, cmd, &vlan_info,
-				     sizeof(vlan_info), &vlan_info,
-				     &out_size);
+	err = l2nic_msg_to_mgmt_sync(hwdev, cmd, &vlan_info, sizeof(vlan_info),
+				     &vlan_info, &out_size);
 	if (err || !out_size || vlan_info.mgmt_msg_head.status) {
 		PMD_DRV_LOG(ERR,
 			"Failed to %s vlan, err: %d, status: 0x%x, out size: 0x%x\n",
@@ -485,8 +483,8 @@ int hinic_set_rx_vlan_offload(void *hwdev, u8 en)
 	vlan_cfg.vlan_rx_offload = en;
 
 	err = l2nic_msg_to_mgmt_sync(hwdev, HINIC_PORT_CMD_SET_RX_VLAN_OFFLOAD,
-					&vlan_cfg, sizeof(vlan_cfg),
-					&vlan_cfg, &out_size);
+				     &vlan_cfg, sizeof(vlan_cfg),
+				     &vlan_cfg, &out_size);
 	if (err || !out_size || vlan_cfg.mgmt_msg_head.status) {
 		PMD_DRV_LOG(ERR,
 			"Failed to set rx vlan offload, err: %d, status: 0x%x, out size: 0x%x\n",
@@ -642,7 +640,7 @@ int hinic_get_port_info(void *hwdev, struct nic_port_info *port_info)
 		PMD_DRV_LOG(ERR,
 			"Failed to get port info, err: %d, status: 0x%x, out size: 0x%x",
 			err, port_msg.mgmt_msg_head.status, out_size);
-		return err;
+		return -EIO;
 	}
 
 	port_info->autoneg_cap = port_msg.autoneg_cap;
@@ -1258,7 +1256,6 @@ int hinic_set_rx_vhd_mode(void *hwdev, u16 vhd_mode, u16 rx_buf_sz)
 		PMD_DRV_LOG(ERR,
 			"Failed to set vhd mode, err: %d, status: 0x%x, out size: 0x%x",
 			err, vhd_mode_cfg.mgmt_msg_head.status, out_size);
-
 		return -EIO;
 	}
 
@@ -1413,8 +1410,7 @@ int hinic_set_anti_attack(void *hwdev, bool enable)
 	rate.xbs = ANTI_ATTACK_DEFAULT_XBS;
 
 	err = l2nic_msg_to_mgmt_sync(hwdev, HINIC_PORT_CMD_SET_ANTI_ATTACK_RATE,
-				     &rate, sizeof(rate), &rate,
-				     &out_size);
+				     &rate, sizeof(rate), &rate, &out_size);
 	if (err || !out_size || rate.mgmt_msg_head.status) {
 		PMD_DRV_LOG(ERR, "can't %s port Anti-Attack rate limit, err: %d, status: 0x%x, out size: 0x%x",
 			(enable ? "enable" : "disable"), err,
@@ -1518,10 +1514,9 @@ int hinic_set_fast_recycle_mode(void *hwdev, u8 mode)
 				     sizeof(fast_recycled_mode),
 				     &fast_recycled_mode, &out_size, 0);
 	if (err || fast_recycled_mode.mgmt_msg_head.status || !out_size) {
-		PMD_DRV_LOG(ERR,
-			"Failed to set recycle mode, ret = %d",
-			fast_recycled_mode.mgmt_msg_head.status);
-		return -EFAULT;
+		PMD_DRV_LOG(ERR, "Failed to set recycle mode, err: %d, status: 0x%x, out size: 0x%x",
+			err, fast_recycled_mode.mgmt_msg_head.status, out_size);
+		return -EIO;
 	}
 
 	return 0;
@@ -1746,12 +1741,11 @@ int hinic_vf_get_default_cos(struct hinic_hwdev *hwdev, u8 *cos_id)
 
 	err = hinic_msg_to_mgmt_sync(hwdev, HINIC_MOD_L2NIC,
 				     HINIC_PORT_CMD_GET_VF_COS, &vf_cos,
-				     sizeof(vf_cos), &vf_cos,
-				     &out_size, 0);
+				     sizeof(vf_cos), &vf_cos, &out_size, 0);
 	if (err || !out_size || vf_cos.mgmt_msg_head.status) {
 		PMD_DRV_LOG(ERR, "Get VF default cos failed, err: %d, status: 0x%x, out size: 0x%x",
 			err, vf_cos.mgmt_msg_head.status, out_size);
-		return -EFAULT;
+		return -EIO;
 	}
 	*cos_id = vf_cos.state.default_cos;
 
diff --git a/drivers/net/hinic/base/hinic_pmd_nicio.c b/drivers/net/hinic/base/hinic_pmd_nicio.c
index d3e8f2e74..1ce065c6f 100644
--- a/drivers/net/hinic/base/hinic_pmd_nicio.c
+++ b/drivers/net/hinic/base/hinic_pmd_nicio.c
@@ -471,6 +471,8 @@ static int
 hinic_set_root_ctxt(void *hwdev, u16 rq_depth, u16 sq_depth, int rx_buf_sz)
 {
 	struct hinic_root_ctxt root_ctxt;
+	u16 out_size = sizeof(root_ctxt);
+	int err;
 
 	memset(&root_ctxt, 0, sizeof(root_ctxt));
 	root_ctxt.mgmt_msg_head.resp_aeq_num = HINIC_AEQ1;
@@ -483,10 +485,18 @@ hinic_set_root_ctxt(void *hwdev, u16 rq_depth, u16 sq_depth, int rx_buf_sz)
 	root_ctxt.rx_buf_sz = get_hw_rx_buf_size(rx_buf_sz);
 	root_ctxt.sq_depth  = (u16)ilog2(sq_depth);
 
-	return hinic_msg_to_mgmt_sync(hwdev, HINIC_MOD_COMM,
-				      HINIC_MGMT_CMD_VAT_SET,
-				      &root_ctxt, sizeof(root_ctxt),
-				      NULL, NULL, 0);
+	err = hinic_msg_to_mgmt_sync(hwdev, HINIC_MOD_COMM,
+				     HINIC_MGMT_CMD_VAT_SET,
+				     &root_ctxt, sizeof(root_ctxt),
+				     &root_ctxt, &out_size, 0);
+	if (err || !out_size || root_ctxt.mgmt_msg_head.status) {
+		PMD_DRV_LOG(ERR,
+			"Set root context failed, err: %d, status: 0x%x, out_size: 0x%x",
+			err, root_ctxt.mgmt_msg_head.status, out_size);
+		return -EIO;
+	}
+
+	return 0;
 }
 
 /**
@@ -499,6 +509,8 @@ hinic_set_root_ctxt(void *hwdev, u16 rq_depth, u16 sq_depth, int rx_buf_sz)
 static int hinic_clean_root_ctxt(void *hwdev)
 {
 	struct hinic_root_ctxt root_ctxt;
+	u16 out_size = sizeof(root_ctxt);
+	int err;
 
 	memset(&root_ctxt, 0, sizeof(root_ctxt));
 	root_ctxt.mgmt_msg_head.resp_aeq_num = HINIC_AEQ1;
@@ -511,10 +523,18 @@ static int hinic_clean_root_ctxt(void *hwdev)
 	root_ctxt.rx_buf_sz = 0;
 	root_ctxt.sq_depth  = 0;
 
-	return hinic_msg_to_mgmt_sync(hwdev, HINIC_MOD_COMM,
-				      HINIC_MGMT_CMD_VAT_SET,
-				      &root_ctxt, sizeof(root_ctxt),
-				      NULL, NULL, 0);
+	err = hinic_msg_to_mgmt_sync(hwdev, HINIC_MOD_COMM,
+				     HINIC_MGMT_CMD_VAT_SET,
+				     &root_ctxt, sizeof(root_ctxt),
+				     &root_ctxt, &out_size, 0);
+	if (err || !out_size || root_ctxt.mgmt_msg_head.status) {
+		PMD_DRV_LOG(ERR,
+			"Clean root context failed, err: %d, status: 0x%x, out_size: 0x%x",
+			err, root_ctxt.mgmt_msg_head.status, out_size);
+		return -EIO;
+	}
+
+	return 0;
 }
 
 /* init qps ctxt and set sq ci attr and arm all sq and set vat page_size */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.898934974 +0100
+++ 0113-net-hinic-base-check-output-of-management-sync-chann.patch	2020-07-24 12:53:48.379008173 +0100
@@ -1,21 +1,22 @@
-From d807dd7d4cd8e3ef4d42bd945cfb8318e4fef5b6 Mon Sep 17 00:00:00 2001
+From 8c67f69848d837e25707254c876eb5f61f166df8 Mon Sep 17 00:00:00 2001
 From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 Date: Sat, 27 Jun 2020 11:55:44 +0800
 Subject: [PATCH] net/hinic/base: check output of management sync channel
 
+[ upstream commit d807dd7d4cd8e3ef4d42bd945cfb8318e4fef5b6 ]
+
 Add output buffer and out size info for some cmds that use management
 sync channel, which can improve dfx capability when sent msg failed.
 
 Fixes: 7fcd6b05b923 ("net/hinic/base: support cmdq mechanism")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 ---
  drivers/net/hinic/base/hinic_pmd_cmdq.c   |  31 ++++--
  drivers/net/hinic/base/hinic_pmd_hwdev.c  | 129 +++++++++++++++-------
- drivers/net/hinic/base/hinic_pmd_niccfg.c |  27 ++---
+ drivers/net/hinic/base/hinic_pmd_niccfg.c |  28 ++---
  drivers/net/hinic/base/hinic_pmd_nicio.c  |  36 ++++--
- 4 files changed, 151 insertions(+), 72 deletions(-)
+ 4 files changed, 151 insertions(+), 73 deletions(-)
 
 diff --git a/drivers/net/hinic/base/hinic_pmd_cmdq.c b/drivers/net/hinic/base/hinic_pmd_cmdq.c
 index 2e98b9c28..1816636c3 100644
@@ -90,7 +91,7 @@
  
  int hinic_comm_cmdqs_init(struct hinic_hwdev *hwdev)
 diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c
-index cc4207678..c132de09e 100644
+index fc11ecd7a..45b976536 100644
 --- a/drivers/net/hinic/base/hinic_pmd_hwdev.c
 +++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c
 @@ -390,6 +390,8 @@ void hinic_osdep_deinit(struct hinic_hwdev *hwdev)
@@ -345,7 +346,7 @@
  
  	return 0;
 diff --git a/drivers/net/hinic/base/hinic_pmd_niccfg.c b/drivers/net/hinic/base/hinic_pmd_niccfg.c
-index c5663dfab..e894503d7 100644
+index 2dc431e28..ad81fdde4 100644
 --- a/drivers/net/hinic/base/hinic_pmd_niccfg.c
 +++ b/drivers/net/hinic/base/hinic_pmd_niccfg.c
 @@ -18,7 +18,6 @@
@@ -353,10 +354,10 @@
  			buf_out, out_size, 0)
  
 -
- /**
-  * hinic_init_function_table - Initialize function table.
-  *
-@@ -380,9 +379,8 @@ int hinic_add_remove_vlan(void *hwdev, u16 vlan_id, u16 func_id, bool add)
+ #define TCAM_SET	0x1
+ #define TCAM_CLEAR	0x2
+ 
+@@ -396,9 +395,8 @@ int hinic_add_remove_vlan(void *hwdev, u16 vlan_id, u16 func_id, bool add)
  	vlan_info.func_id = func_id;
  	vlan_info.vlan_id = vlan_id;
  
@@ -367,8 +368,8 @@
 +				     &vlan_info, &out_size);
  	if (err || !out_size || vlan_info.mgmt_msg_head.status) {
  		PMD_DRV_LOG(ERR,
- 			"Failed to %s vlan, err: %d, status: 0x%x, out size: 0x%x",
-@@ -469,8 +467,8 @@ int hinic_set_rx_vlan_offload(void *hwdev, u8 en)
+ 			"Failed to %s vlan, err: %d, status: 0x%x, out size: 0x%x\n",
+@@ -485,8 +483,8 @@ int hinic_set_rx_vlan_offload(void *hwdev, u8 en)
  	vlan_cfg.vlan_rx_offload = en;
  
  	err = l2nic_msg_to_mgmt_sync(hwdev, HINIC_PORT_CMD_SET_RX_VLAN_OFFLOAD,
@@ -378,8 +379,8 @@
 +				     &vlan_cfg, &out_size);
  	if (err || !out_size || vlan_cfg.mgmt_msg_head.status) {
  		PMD_DRV_LOG(ERR,
- 			"Failed to set rx vlan offload, err: %d, status: 0x%x, out size: 0x%x",
-@@ -626,7 +624,7 @@ int hinic_get_port_info(void *hwdev, struct nic_port_info *port_info)
+ 			"Failed to set rx vlan offload, err: %d, status: 0x%x, out size: 0x%x\n",
+@@ -642,7 +640,7 @@ int hinic_get_port_info(void *hwdev, struct nic_port_info *port_info)
  		PMD_DRV_LOG(ERR,
  			"Failed to get port info, err: %d, status: 0x%x, out size: 0x%x",
  			err, port_msg.mgmt_msg_head.status, out_size);
@@ -388,7 +389,7 @@
  	}
  
  	port_info->autoneg_cap = port_msg.autoneg_cap;
-@@ -1270,7 +1268,6 @@ int hinic_set_rx_vhd_mode(void *hwdev, u16 vhd_mode, u16 rx_buf_sz)
+@@ -1258,7 +1256,6 @@ int hinic_set_rx_vhd_mode(void *hwdev, u16 vhd_mode, u16 rx_buf_sz)
  		PMD_DRV_LOG(ERR,
  			"Failed to set vhd mode, err: %d, status: 0x%x, out size: 0x%x",
  			err, vhd_mode_cfg.mgmt_msg_head.status, out_size);
@@ -396,7 +397,7 @@
  		return -EIO;
  	}
  
-@@ -1425,8 +1422,7 @@ int hinic_set_anti_attack(void *hwdev, bool enable)
+@@ -1413,8 +1410,7 @@ int hinic_set_anti_attack(void *hwdev, bool enable)
  	rate.xbs = ANTI_ATTACK_DEFAULT_XBS;
  
  	err = l2nic_msg_to_mgmt_sync(hwdev, HINIC_PORT_CMD_SET_ANTI_ATTACK_RATE,
@@ -404,13 +405,14 @@
 -				     &out_size);
 +				     &rate, sizeof(rate), &rate, &out_size);
  	if (err || !out_size || rate.mgmt_msg_head.status) {
- 		PMD_DRV_LOG(ERR, "Can't %s port Anti-Attack rate limit, err: %d, status: 0x%x, out size: 0x%x",
+ 		PMD_DRV_LOG(ERR, "can't %s port Anti-Attack rate limit, err: %d, status: 0x%x, out size: 0x%x",
  			(enable ? "enable" : "disable"), err,
-@@ -1530,9 +1526,9 @@ int hinic_set_fast_recycle_mode(void *hwdev, u8 mode)
+@@ -1518,10 +1514,9 @@ int hinic_set_fast_recycle_mode(void *hwdev, u8 mode)
  				     sizeof(fast_recycled_mode),
  				     &fast_recycled_mode, &out_size, 0);
  	if (err || fast_recycled_mode.mgmt_msg_head.status || !out_size) {
--		PMD_DRV_LOG(ERR, "Failed to set recycle mode, ret: %d",
+-		PMD_DRV_LOG(ERR,
+-			"Failed to set recycle mode, ret = %d",
 -			fast_recycled_mode.mgmt_msg_head.status);
 -		return -EFAULT;
 +		PMD_DRV_LOG(ERR, "Failed to set recycle mode, err: %d, status: 0x%x, out size: 0x%x",
@@ -419,7 +421,7 @@
  	}
  
  	return 0;
-@@ -1756,12 +1752,11 @@ int hinic_vf_get_default_cos(struct hinic_hwdev *hwdev, u8 *cos_id)
+@@ -1746,12 +1741,11 @@ int hinic_vf_get_default_cos(struct hinic_hwdev *hwdev, u8 *cos_id)
  
  	err = hinic_msg_to_mgmt_sync(hwdev, HINIC_MOD_L2NIC,
  				     HINIC_PORT_CMD_GET_VF_COS, &vf_cos,
@@ -435,7 +437,7 @@
  	*cos_id = vf_cos.state.default_cos;
  
 diff --git a/drivers/net/hinic/base/hinic_pmd_nicio.c b/drivers/net/hinic/base/hinic_pmd_nicio.c
-index 7f7e11dbd..7ec3e4ce7 100644
+index d3e8f2e74..1ce065c6f 100644
 --- a/drivers/net/hinic/base/hinic_pmd_nicio.c
 +++ b/drivers/net/hinic/base/hinic_pmd_nicio.c
 @@ -471,6 +471,8 @@ static int

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

* [dpdk-stable] patch 'net/hinic/base: remove unused function parameters' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (111 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/hinic/base: check output of management sync channel' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/hinic: fix setting promiscuous mode' " luca.boccassi
                   ` (78 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Xiaoyun Wang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 5cae30960b80367cc858c79fdd04a951db88699d Mon Sep 17 00:00:00 2001
From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Date: Sat, 27 Jun 2020 11:55:45 +0800
Subject: [PATCH] net/hinic/base: remove unused function parameters

[ upstream commit 214164a6bf7f840c3f111430c4e7d6373195afe1 ]

Remove unused parameters for mgmt channel with no ack.

Fixes: a4957d87e05a ("net/hinic/base: add mgmt module")

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
---
 drivers/net/hinic/base/hinic_pmd_hwdev.c | 2 +-
 drivers/net/hinic/base/hinic_pmd_mgmt.c  | 3 +--
 drivers/net/hinic/base/hinic_pmd_mgmt.h  | 3 +--
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c
index 45b976536..8a0faa697 100644
--- a/drivers/net/hinic/base/hinic_pmd_hwdev.c
+++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c
@@ -599,7 +599,7 @@ static int hinic_pf_rx_tx_flush(struct hinic_hwdev *hwdev)
 
 	err = hinic_msg_to_mgmt_no_ack(hwdev, HINIC_MOD_COMM,
 				       HINIC_MGMT_CMD_START_FLR, &clr_res,
-				       sizeof(clr_res), NULL, NULL);
+				       sizeof(clr_res));
 	if (err) {
 		PMD_DRV_LOG(WARNING, "Notice flush msg failed, err: %d", err);
 		ret = err;
diff --git a/drivers/net/hinic/base/hinic_pmd_mgmt.c b/drivers/net/hinic/base/hinic_pmd_mgmt.c
index ea79c300a..a57036d53 100644
--- a/drivers/net/hinic/base/hinic_pmd_mgmt.c
+++ b/drivers/net/hinic/base/hinic_pmd_mgmt.c
@@ -504,8 +504,7 @@ int hinic_msg_to_mgmt_sync(void *hwdev, enum hinic_mod_type mod, u8 cmd,
 }
 
 int hinic_msg_to_mgmt_no_ack(void *hwdev, enum hinic_mod_type mod, u8 cmd,
-		     void *buf_in, u16 in_size, __rte_unused void *buf_out,
-		     __rte_unused u16 *out_size)
+			     void *buf_in, u16 in_size)
 {
 	struct hinic_msg_pf_to_mgmt *pf_to_mgmt =
 				((struct hinic_hwdev *)hwdev)->pf_to_mgmt;
diff --git a/drivers/net/hinic/base/hinic_pmd_mgmt.h b/drivers/net/hinic/base/hinic_pmd_mgmt.h
index 52b319ead..0f3286510 100644
--- a/drivers/net/hinic/base/hinic_pmd_mgmt.h
+++ b/drivers/net/hinic/base/hinic_pmd_mgmt.h
@@ -101,8 +101,7 @@ struct hinic_msg_pf_to_mgmt {
 };
 
 int hinic_msg_to_mgmt_no_ack(void *hwdev, enum hinic_mod_type mod, u8 cmd,
-			     void *buf_in, u16 in_size, void *buf_out,
-			     u16 *out_size);
+			     void *buf_in, u16 in_size);
 
 int hinic_comm_pf_to_mgmt_init(struct hinic_hwdev *hwdev);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.940512142 +0100
+++ 0114-net-hinic-base-remove-unused-function-parameters.patch	2020-07-24 12:53:48.383008248 +0100
@@ -1,12 +1,13 @@
-From 214164a6bf7f840c3f111430c4e7d6373195afe1 Mon Sep 17 00:00:00 2001
+From 5cae30960b80367cc858c79fdd04a951db88699d Mon Sep 17 00:00:00 2001
 From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 Date: Sat, 27 Jun 2020 11:55:45 +0800
 Subject: [PATCH] net/hinic/base: remove unused function parameters
 
+[ upstream commit 214164a6bf7f840c3f111430c4e7d6373195afe1 ]
+
 Remove unused parameters for mgmt channel with no ack.
 
 Fixes: a4957d87e05a ("net/hinic/base: add mgmt module")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 ---
@@ -16,7 +17,7 @@
  3 files changed, 3 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c
-index c132de09e..a93f240e3 100644
+index 45b976536..8a0faa697 100644
 --- a/drivers/net/hinic/base/hinic_pmd_hwdev.c
 +++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c
 @@ -599,7 +599,7 @@ static int hinic_pf_rx_tx_flush(struct hinic_hwdev *hwdev)
@@ -29,7 +30,7 @@
  		PMD_DRV_LOG(WARNING, "Notice flush msg failed, err: %d", err);
  		ret = err;
 diff --git a/drivers/net/hinic/base/hinic_pmd_mgmt.c b/drivers/net/hinic/base/hinic_pmd_mgmt.c
-index 94bc45f83..babb93a20 100644
+index ea79c300a..a57036d53 100644
 --- a/drivers/net/hinic/base/hinic_pmd_mgmt.c
 +++ b/drivers/net/hinic/base/hinic_pmd_mgmt.c
 @@ -504,8 +504,7 @@ int hinic_msg_to_mgmt_sync(void *hwdev, enum hinic_mod_type mod, u8 cmd,

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

* [dpdk-stable] patch 'net/hinic: fix setting promiscuous mode' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (112 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/hinic/base: remove unused function parameters' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/ice: add input set byte number check' " luca.boccassi
                   ` (77 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Xiaoyun Wang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From d4b56ad36f7a3a5d4d74e9ac1dcc9714feb2ec4b Mon Sep 17 00:00:00 2001
From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Date: Sat, 27 Jun 2020 11:55:46 +0800
Subject: [PATCH] net/hinic: fix setting promiscuous mode

[ upstream commit 224cff4bbaa307c6b8e38478d9492af8463720dd ]

When setting promiscuous or allmulticast mode, increase
multi-thread resource protection, because the patch
"net/bonding: prefer allmulti to promiscuous for LACP"
adds trying to use allmulti when adding a slave, and
EVS bond driver also sets promisc with another thread,
which may lead to thread reentry and cause failure to
set promiscuous mode.

Fixes: cb7b6606ebff ("net/hinic: add RSS stats and promiscuous ops")

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
---
 drivers/net/hinic/hinic_pmd_ethdev.c | 34 ++++++++++++++++++++++++----
 drivers/net/hinic/hinic_pmd_ethdev.h |  1 +
 2 files changed, 31 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index b81ecd0b8..9aa3cf7aa 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -1269,14 +1269,25 @@ static void hinic_disable_interrupt(struct rte_eth_dev *dev)
 
 static int hinic_set_dev_promiscuous(struct hinic_nic_dev *nic_dev, bool enable)
 {
-	u32 rx_mode_ctrl = nic_dev->rx_mode_status;
+	u32 rx_mode_ctrl;
+	int err;
+
+	err = hinic_mutex_lock(&nic_dev->rx_mode_mutex);
+	if (err)
+		return err;
+
+	rx_mode_ctrl = nic_dev->rx_mode_status;
 
 	if (enable)
 		rx_mode_ctrl |= HINIC_RX_MODE_PROMISC;
 	else
 		rx_mode_ctrl &= (~HINIC_RX_MODE_PROMISC);
 
-	return hinic_config_rx_mode(nic_dev, rx_mode_ctrl);
+	err = hinic_config_rx_mode(nic_dev, rx_mode_ctrl);
+
+	(void)hinic_mutex_unlock(&nic_dev->rx_mode_mutex);
+
+	return err;
 }
 
 /**
@@ -1720,14 +1731,25 @@ static void hinic_remove_all_vlanid(struct rte_eth_dev *eth_dev)
 static int hinic_set_dev_allmulticast(struct hinic_nic_dev *nic_dev,
 				bool enable)
 {
-	u32 rx_mode_ctrl = nic_dev->rx_mode_status;
+	u32 rx_mode_ctrl;
+	int err;
+
+	err = hinic_mutex_lock(&nic_dev->rx_mode_mutex);
+	if (err)
+		return err;
+
+	rx_mode_ctrl = nic_dev->rx_mode_status;
 
 	if (enable)
 		rx_mode_ctrl |= HINIC_RX_MODE_MC_ALL;
 	else
 		rx_mode_ctrl &= (~HINIC_RX_MODE_MC_ALL);
 
-	return hinic_config_rx_mode(nic_dev, rx_mode_ctrl);
+	err = hinic_config_rx_mode(nic_dev, rx_mode_ctrl);
+
+	(void)hinic_mutex_unlock(&nic_dev->rx_mode_mutex);
+
+	return err;
 }
 
 /**
@@ -3034,6 +3056,8 @@ static int hinic_func_init(struct rte_eth_dev *eth_dev)
 	}
 	hinic_set_bit(HINIC_DEV_INTR_EN, &nic_dev->dev_status);
 
+	hinic_mutex_init(&nic_dev->rx_mode_mutex, NULL);
+
 	/* initialize filter info */
 	filter_info = &nic_dev->filter;
 	memset(filter_info, 0, sizeof(struct hinic_filter_info));
@@ -3105,6 +3129,8 @@ static int hinic_dev_uninit(struct rte_eth_dev *dev)
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return 0;
 
+	hinic_mutex_destroy(&nic_dev->rx_mode_mutex);
+
 	hinic_dev_close(dev);
 
 	dev->dev_ops = NULL;
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.h b/drivers/net/hinic/hinic_pmd_ethdev.h
index 3e3f3b360..b7dc9640f 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.h
+++ b/drivers/net/hinic/hinic_pmd_ethdev.h
@@ -171,6 +171,7 @@ struct hinic_nic_dev {
 	unsigned int flags;
 	struct nic_service_cap nic_cap;
 	u32 rx_mode_status;	/* promisc or allmulticast */
+	pthread_mutex_t rx_mode_mutex;
 	unsigned long dev_status;
 
 	char proc_dev_name[HINIC_DEV_NAME_LEN];
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:52.975119716 +0100
+++ 0115-net-hinic-fix-setting-promiscuous-mode.patch	2020-07-24 12:53:48.383008248 +0100
@@ -1,8 +1,10 @@
-From 224cff4bbaa307c6b8e38478d9492af8463720dd Mon Sep 17 00:00:00 2001
+From d4b56ad36f7a3a5d4d74e9ac1dcc9714feb2ec4b Mon Sep 17 00:00:00 2001
 From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 Date: Sat, 27 Jun 2020 11:55:46 +0800
 Subject: [PATCH] net/hinic: fix setting promiscuous mode
 
+[ upstream commit 224cff4bbaa307c6b8e38478d9492af8463720dd ]
+
 When setting promiscuous or allmulticast mode, increase
 multi-thread resource protection, because the patch
 "net/bonding: prefer allmulti to promiscuous for LACP"
@@ -12,7 +14,6 @@
 set promiscuous mode.
 
 Fixes: cb7b6606ebff ("net/hinic: add RSS stats and promiscuous ops")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 ---
@@ -21,10 +22,10 @@
  2 files changed, 31 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
-index 8f81e2230..0d3d62bd0 100644
+index b81ecd0b8..9aa3cf7aa 100644
 --- a/drivers/net/hinic/hinic_pmd_ethdev.c
 +++ b/drivers/net/hinic/hinic_pmd_ethdev.c
-@@ -1268,14 +1268,25 @@ static void hinic_disable_interrupt(struct rte_eth_dev *dev)
+@@ -1269,14 +1269,25 @@ static void hinic_disable_interrupt(struct rte_eth_dev *dev)
  
  static int hinic_set_dev_promiscuous(struct hinic_nic_dev *nic_dev, bool enable)
  {
@@ -52,7 +53,7 @@
  }
  
  /**
-@@ -1728,14 +1739,25 @@ static void hinic_remove_all_vlanid(struct rte_eth_dev *eth_dev)
+@@ -1720,14 +1731,25 @@ static void hinic_remove_all_vlanid(struct rte_eth_dev *eth_dev)
  static int hinic_set_dev_allmulticast(struct hinic_nic_dev *nic_dev,
  				bool enable)
  {
@@ -80,16 +81,16 @@
  }
  
  /**
-@@ -3127,6 +3149,8 @@ static int hinic_func_init(struct rte_eth_dev *eth_dev)
+@@ -3034,6 +3056,8 @@ static int hinic_func_init(struct rte_eth_dev *eth_dev)
  	}
- 	rte_bit_relaxed_set32(HINIC_DEV_INTR_EN, &nic_dev->dev_status);
+ 	hinic_set_bit(HINIC_DEV_INTR_EN, &nic_dev->dev_status);
  
 +	hinic_mutex_init(&nic_dev->rx_mode_mutex, NULL);
 +
  	/* initialize filter info */
  	filter_info = &nic_dev->filter;
- 	tcam_info = &nic_dev->tcam;
-@@ -3201,6 +3225,8 @@ static int hinic_dev_uninit(struct rte_eth_dev *dev)
+ 	memset(filter_info, 0, sizeof(struct hinic_filter_info));
+@@ -3105,6 +3129,8 @@ static int hinic_dev_uninit(struct rte_eth_dev *dev)
  	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
  		return 0;
  
@@ -99,15 +100,15 @@
  
  	dev->dev_ops = NULL;
 diff --git a/drivers/net/hinic/hinic_pmd_ethdev.h b/drivers/net/hinic/hinic_pmd_ethdev.h
-index 77b4b9109..3f2d51d75 100644
+index 3e3f3b360..b7dc9640f 100644
 --- a/drivers/net/hinic/hinic_pmd_ethdev.h
 +++ b/drivers/net/hinic/hinic_pmd_ethdev.h
-@@ -329,6 +329,7 @@ struct hinic_nic_dev {
+@@ -171,6 +171,7 @@ struct hinic_nic_dev {
  	unsigned int flags;
  	struct nic_service_cap nic_cap;
  	u32 rx_mode_status;	/* promisc or allmulticast */
 +	pthread_mutex_t rx_mode_mutex;
- 	u32 dev_status;
+ 	unsigned long dev_status;
  
  	char proc_dev_name[HINIC_DEV_NAME_LEN];
 -- 

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

* [dpdk-stable] patch 'net/ice: add input set byte number check' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (113 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/hinic: fix setting promiscuous mode' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/mlx5: fix flow META item validation' " luca.boccassi
                   ` (76 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 21637a6e327be94e6b741394ac5a50bc24a63341 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Fri, 3 Jul 2020 14:19:37 +0800
Subject: [PATCH] net/ice: add input set byte number check

[ upstream commit 8de93729837d265de5b34cd318c9249720badfc8 ]

This patch add the total input set byte number check,
as there is a hardware requirement for the total number
of 32 byte.

Fixes: 47d460d63233 ("net/ice: rework switch filter")

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

diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index b00ac2abe..c2f5aa78d 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -25,7 +25,8 @@
 #include "ice_generic_flow.h"
 
 
-#define MAX_QGRP_NUM_TYPE 7
+#define MAX_QGRP_NUM_TYPE	7
+#define MAX_INPUT_SET_BYTE	32
 
 #define ICE_SW_INSET_ETHER ( \
 	ICE_INSET_DMAC | ICE_INSET_SMAC | ICE_INSET_ETHERTYPE)
@@ -320,6 +321,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
 		0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
 		0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
 	uint64_t input_set = ICE_INSET_NONE;
+	uint16_t input_set_byte = 0;
 	uint16_t j, t = 0;
 	uint16_t tunnel_valid = 0;
 
@@ -369,6 +371,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
 						m->src_addr[j] =
 						eth_mask->src.addr_bytes[j];
 						i = 1;
+						input_set_byte++;
 					}
 					if (eth_mask->dst.addr_bytes[j] ==
 								UINT8_MAX) {
@@ -377,6 +380,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
 						m->dst_addr[j] =
 						eth_mask->dst.addr_bytes[j];
 						i = 1;
+						input_set_byte++;
 					}
 				}
 				if (i)
@@ -387,6 +391,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
 						eth_spec->type;
 					list[t].m_u.ethertype.ethtype_id =
 						UINT16_MAX;
+					input_set_byte += 2;
 					t++;
 				}
 			} else if (!eth_spec && !eth_mask) {
@@ -458,30 +463,35 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
 						ipv4_spec->hdr.src_addr;
 					list[t].m_u.ipv4_hdr.src_addr =
 						UINT32_MAX;
+					input_set_byte += 2;
 				}
 				if (ipv4_mask->hdr.dst_addr == UINT32_MAX) {
 					list[t].h_u.ipv4_hdr.dst_addr =
 						ipv4_spec->hdr.dst_addr;
 					list[t].m_u.ipv4_hdr.dst_addr =
 						UINT32_MAX;
+					input_set_byte += 2;
 				}
 				if (ipv4_mask->hdr.time_to_live == UINT8_MAX) {
 					list[t].h_u.ipv4_hdr.time_to_live =
 						ipv4_spec->hdr.time_to_live;
 					list[t].m_u.ipv4_hdr.time_to_live =
 						UINT8_MAX;
+					input_set_byte++;
 				}
 				if (ipv4_mask->hdr.next_proto_id == UINT8_MAX) {
 					list[t].h_u.ipv4_hdr.protocol =
 						ipv4_spec->hdr.next_proto_id;
 					list[t].m_u.ipv4_hdr.protocol =
 						UINT8_MAX;
+					input_set_byte++;
 				}
 				if (ipv4_mask->hdr.type_of_service ==
 						UINT8_MAX) {
 					list[t].h_u.ipv4_hdr.tos =
 						ipv4_spec->hdr.type_of_service;
 					list[t].m_u.ipv4_hdr.tos = UINT8_MAX;
+					input_set_byte++;
 				}
 				t++;
 			} else if (!ipv4_spec && !ipv4_mask) {
@@ -563,6 +573,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
 						ipv6_spec->hdr.src_addr[j];
 						s->src_addr[j] =
 						ipv6_mask->hdr.src_addr[j];
+						input_set_byte++;
 					}
 					if (ipv6_mask->hdr.dst_addr[j] ==
 								UINT8_MAX) {
@@ -570,17 +581,20 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
 						ipv6_spec->hdr.dst_addr[j];
 						s->dst_addr[j] =
 						ipv6_mask->hdr.dst_addr[j];
+						input_set_byte++;
 					}
 				}
 				if (ipv6_mask->hdr.proto == UINT8_MAX) {
 					f->next_hdr =
 						ipv6_spec->hdr.proto;
 					s->next_hdr = UINT8_MAX;
+					input_set_byte++;
 				}
 				if (ipv6_mask->hdr.hop_limits == UINT8_MAX) {
 					f->hop_limit =
 						ipv6_spec->hdr.hop_limits;
 					s->hop_limit = UINT8_MAX;
+					input_set_byte++;
 				}
 				if ((ipv6_mask->hdr.vtc_flow &
 						rte_cpu_to_be_32
@@ -597,6 +611,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
 					f->be_ver_tc_flow = CPU_TO_BE32(vtf.u.val);
 					vtf.u.fld.tc = UINT8_MAX;
 					s->be_ver_tc_flow = CPU_TO_BE32(vtf.u.val);
+					input_set_byte += 4;
 				}
 				t++;
 			} else if (!ipv6_spec && !ipv6_mask) {
@@ -648,14 +663,16 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
 						udp_spec->hdr.src_port;
 					list[t].m_u.l4_hdr.src_port =
 						udp_mask->hdr.src_port;
+					input_set_byte += 2;
 				}
 				if (udp_mask->hdr.dst_port == UINT16_MAX) {
 					list[t].h_u.l4_hdr.dst_port =
 						udp_spec->hdr.dst_port;
 					list[t].m_u.l4_hdr.dst_port =
 						udp_mask->hdr.dst_port;
+					input_set_byte += 2;
 				}
-						t++;
+				t++;
 			} else if (!udp_spec && !udp_mask) {
 				list[t].type = ICE_UDP_ILOS;
 			}
@@ -705,12 +722,14 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
 						tcp_spec->hdr.src_port;
 					list[t].m_u.l4_hdr.src_port =
 						tcp_mask->hdr.src_port;
+					input_set_byte += 2;
 				}
 				if (tcp_mask->hdr.dst_port == UINT16_MAX) {
 					list[t].h_u.l4_hdr.dst_port =
 						tcp_spec->hdr.dst_port;
 					list[t].m_u.l4_hdr.dst_port =
 						tcp_mask->hdr.dst_port;
+					input_set_byte += 2;
 				}
 				t++;
 			} else if (!tcp_spec && !tcp_mask) {
@@ -756,12 +775,14 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
 						sctp_spec->hdr.src_port;
 					list[t].m_u.sctp_hdr.src_port =
 						sctp_mask->hdr.src_port;
+					input_set_byte += 2;
 				}
 				if (sctp_mask->hdr.dst_port == UINT16_MAX) {
 					list[t].h_u.sctp_hdr.dst_port =
 						sctp_spec->hdr.dst_port;
 					list[t].m_u.sctp_hdr.dst_port =
 						sctp_mask->hdr.dst_port;
+					input_set_byte += 2;
 				}
 				t++;
 			} else if (!sctp_spec && !sctp_mask) {
@@ -799,6 +820,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
 						UINT32_MAX;
 					input_set |=
 						ICE_INSET_TUN_VXLAN_VNI;
+					input_set_byte += 2;
 				}
 				t++;
 			} else if (!vxlan_spec && !vxlan_mask) {
@@ -835,6 +857,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
 						UINT32_MAX;
 					input_set |=
 						ICE_INSET_TUN_NVGRE_TNI;
+					input_set_byte += 2;
 				}
 				t++;
 			} else if (!nvgre_spec && !nvgre_mask) {
@@ -865,6 +888,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
 					list[t].m_u.vlan_hdr.vlan =
 						UINT16_MAX;
 					input_set |= ICE_INSET_VLAN_OUTER;
+					input_set_byte += 2;
 				}
 				if (vlan_mask->inner_type == UINT16_MAX) {
 					list[t].h_u.vlan_hdr.type =
@@ -872,6 +896,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
 					list[t].m_u.vlan_hdr.type =
 						UINT16_MAX;
 					input_set |= ICE_INSET_ETHERTYPE;
+					input_set_byte += 2;
 				}
 				t++;
 			} else if (!vlan_spec && !vlan_mask) {
@@ -906,6 +931,14 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
 		}
 	}
 
+	if (input_set_byte > MAX_INPUT_SET_BYTE) {
+		rte_flow_error_set(error, EINVAL,
+			RTE_FLOW_ERROR_TYPE_ITEM,
+			item,
+			"too much input set");
+		return -ENOTSUP;
+	}
+
 	*lkups_num = t;
 
 	return input_set;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.012212079 +0100
+++ 0116-net-ice-add-input-set-byte-number-check.patch	2020-07-24 12:53:48.387008323 +0100
@@ -1,52 +1,53 @@
-From 8de93729837d265de5b34cd318c9249720badfc8 Mon Sep 17 00:00:00 2001
+From 21637a6e327be94e6b741394ac5a50bc24a63341 Mon Sep 17 00:00:00 2001
 From: Wei Zhao <wei.zhao1@intel.com>
 Date: Fri, 3 Jul 2020 14:19:37 +0800
 Subject: [PATCH] net/ice: add input set byte number check
 
+[ upstream commit 8de93729837d265de5b34cd318c9249720badfc8 ]
+
 This patch add the total input set byte number check,
 as there is a hardware requirement for the total number
 of 32 byte.
 
 Fixes: 47d460d63233 ("net/ice: rework switch filter")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
 ---
- drivers/net/ice/ice_switch_filter.c | 43 +++++++++++++++++++++++++++--
- 1 file changed, 40 insertions(+), 3 deletions(-)
+ drivers/net/ice/ice_switch_filter.c | 37 +++++++++++++++++++++++++++--
+ 1 file changed, 35 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
-index afdc116ee..9db89a307 100644
+index b00ac2abe..c2f5aa78d 100644
 --- a/drivers/net/ice/ice_switch_filter.c
 +++ b/drivers/net/ice/ice_switch_filter.c
-@@ -26,7 +26,8 @@
- #include "ice_dcf_ethdev.h"
+@@ -25,7 +25,8 @@
+ #include "ice_generic_flow.h"
  
  
 -#define MAX_QGRP_NUM_TYPE 7
 +#define MAX_QGRP_NUM_TYPE	7
 +#define MAX_INPUT_SET_BYTE	32
- #define ICE_PPP_IPV4_PROTO	0x0021
- #define ICE_PPP_IPV6_PROTO	0x0057
- #define ICE_IPV4_PROTO_NVGRE	0x002F
-@@ -472,6 +473,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
- 	const struct rte_flow_item_l2tpv3oip *l2tp_spec, *l2tp_mask;
- 	const struct rte_flow_item_pfcp *pfcp_spec, *pfcp_mask;
+ 
+ #define ICE_SW_INSET_ETHER ( \
+ 	ICE_INSET_DMAC | ICE_INSET_SMAC | ICE_INSET_ETHERTYPE)
+@@ -320,6 +321,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
+ 		0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 		0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
  	uint64_t input_set = ICE_INSET_NONE;
 +	uint16_t input_set_byte = 0;
- 	bool pppoe_elem_valid = 0;
- 	bool pppoe_patt_valid = 0;
- 	bool pppoe_prot_valid = 0;
-@@ -541,6 +543,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
+ 	uint16_t j, t = 0;
+ 	uint16_t tunnel_valid = 0;
+ 
+@@ -369,6 +371,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
  						m->src_addr[j] =
  						eth_mask->src.addr_bytes[j];
  						i = 1;
 +						input_set_byte++;
  					}
- 					if (eth_mask->dst.addr_bytes[j]) {
- 						h->dst_addr[j] =
-@@ -548,6 +551,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
+ 					if (eth_mask->dst.addr_bytes[j] ==
+ 								UINT8_MAX) {
+@@ -377,6 +380,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
  						m->dst_addr[j] =
  						eth_mask->dst.addr_bytes[j];
  						i = 1;
@@ -54,96 +55,94 @@
  					}
  				}
  				if (i)
-@@ -558,6 +562,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
+@@ -387,6 +391,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
  						eth_spec->type;
  					list[t].m_u.ethertype.ethtype_id =
- 						eth_mask->type;
+ 						UINT16_MAX;
 +					input_set_byte += 2;
  					t++;
  				}
- 			}
-@@ -617,24 +622,28 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
+ 			} else if (!eth_spec && !eth_mask) {
+@@ -458,30 +463,35 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
  						ipv4_spec->hdr.src_addr;
  					list[t].m_u.ipv4_hdr.src_addr =
- 						ipv4_mask->hdr.src_addr;
+ 						UINT32_MAX;
 +					input_set_byte += 2;
  				}
- 				if (ipv4_mask->hdr.dst_addr) {
+ 				if (ipv4_mask->hdr.dst_addr == UINT32_MAX) {
  					list[t].h_u.ipv4_hdr.dst_addr =
  						ipv4_spec->hdr.dst_addr;
  					list[t].m_u.ipv4_hdr.dst_addr =
- 						ipv4_mask->hdr.dst_addr;
+ 						UINT32_MAX;
 +					input_set_byte += 2;
  				}
- 				if (ipv4_mask->hdr.time_to_live) {
+ 				if (ipv4_mask->hdr.time_to_live == UINT8_MAX) {
  					list[t].h_u.ipv4_hdr.time_to_live =
  						ipv4_spec->hdr.time_to_live;
  					list[t].m_u.ipv4_hdr.time_to_live =
- 						ipv4_mask->hdr.time_to_live;
+ 						UINT8_MAX;
 +					input_set_byte++;
  				}
- 				if (ipv4_mask->hdr.next_proto_id) {
+ 				if (ipv4_mask->hdr.next_proto_id == UINT8_MAX) {
  					list[t].h_u.ipv4_hdr.protocol =
  						ipv4_spec->hdr.next_proto_id;
  					list[t].m_u.ipv4_hdr.protocol =
- 						ipv4_mask->hdr.next_proto_id;
+ 						UINT8_MAX;
 +					input_set_byte++;
  				}
- 				if ((ipv4_spec->hdr.next_proto_id &
- 					ipv4_mask->hdr.next_proto_id) ==
-@@ -645,6 +654,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
+ 				if (ipv4_mask->hdr.type_of_service ==
+ 						UINT8_MAX) {
+ 					list[t].h_u.ipv4_hdr.tos =
  						ipv4_spec->hdr.type_of_service;
- 					list[t].m_u.ipv4_hdr.tos =
- 						ipv4_mask->hdr.type_of_service;
+ 					list[t].m_u.ipv4_hdr.tos = UINT8_MAX;
 +					input_set_byte++;
  				}
  				t++;
- 			}
-@@ -722,12 +732,14 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
+ 			} else if (!ipv4_spec && !ipv4_mask) {
+@@ -563,6 +573,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
  						ipv6_spec->hdr.src_addr[j];
  						s->src_addr[j] =
  						ipv6_mask->hdr.src_addr[j];
 +						input_set_byte++;
  					}
- 					if (ipv6_mask->hdr.dst_addr[j]) {
- 						f->dst_addr[j] =
+ 					if (ipv6_mask->hdr.dst_addr[j] ==
+ 								UINT8_MAX) {
+@@ -570,17 +581,20 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
  						ipv6_spec->hdr.dst_addr[j];
  						s->dst_addr[j] =
  						ipv6_mask->hdr.dst_addr[j];
 +						input_set_byte++;
  					}
  				}
- 				if (ipv6_mask->hdr.proto) {
-@@ -735,12 +747,14 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
+ 				if (ipv6_mask->hdr.proto == UINT8_MAX) {
+ 					f->next_hdr =
  						ipv6_spec->hdr.proto;
- 					s->next_hdr =
- 						ipv6_mask->hdr.proto;
+ 					s->next_hdr = UINT8_MAX;
 +					input_set_byte++;
  				}
- 				if (ipv6_mask->hdr.hop_limits) {
+ 				if (ipv6_mask->hdr.hop_limits == UINT8_MAX) {
  					f->hop_limit =
  						ipv6_spec->hdr.hop_limits;
- 					s->hop_limit =
- 						ipv6_mask->hdr.hop_limits;
+ 					s->hop_limit = UINT8_MAX;
 +					input_set_byte++;
  				}
- 				if (ipv6_mask->hdr.vtc_flow &
+ 				if ((ipv6_mask->hdr.vtc_flow &
  						rte_cpu_to_be_32
-@@ -758,6 +772,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
- 							RTE_IPV6_HDR_TC_MASK) >>
- 							RTE_IPV6_HDR_TC_SHIFT;
+@@ -597,6 +611,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
+ 					f->be_ver_tc_flow = CPU_TO_BE32(vtf.u.val);
+ 					vtf.u.fld.tc = UINT8_MAX;
  					s->be_ver_tc_flow = CPU_TO_BE32(vtf.u.val);
 +					input_set_byte += 4;
  				}
  				t++;
- 			}
-@@ -803,14 +818,16 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
+ 			} else if (!ipv6_spec && !ipv6_mask) {
+@@ -648,14 +663,16 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
  						udp_spec->hdr.src_port;
  					list[t].m_u.l4_hdr.src_port =
  						udp_mask->hdr.src_port;
 +					input_set_byte += 2;
  				}
- 				if (udp_mask->hdr.dst_port) {
+ 				if (udp_mask->hdr.dst_port == UINT16_MAX) {
  					list[t].h_u.l4_hdr.dst_port =
  						udp_spec->hdr.dst_port;
  					list[t].m_u.l4_hdr.dst_port =
@@ -152,16 +151,16 @@
  				}
 -						t++;
 +				t++;
+ 			} else if (!udp_spec && !udp_mask) {
+ 				list[t].type = ICE_UDP_ILOS;
  			}
- 			break;
- 
-@@ -855,12 +872,14 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
+@@ -705,12 +722,14 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
  						tcp_spec->hdr.src_port;
  					list[t].m_u.l4_hdr.src_port =
  						tcp_mask->hdr.src_port;
 +					input_set_byte += 2;
  				}
- 				if (tcp_mask->hdr.dst_port) {
+ 				if (tcp_mask->hdr.dst_port == UINT16_MAX) {
  					list[t].h_u.l4_hdr.dst_port =
  						tcp_spec->hdr.dst_port;
  					list[t].m_u.l4_hdr.dst_port =
@@ -169,14 +168,14 @@
 +					input_set_byte += 2;
  				}
  				t++;
- 			}
-@@ -900,12 +919,14 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
+ 			} else if (!tcp_spec && !tcp_mask) {
+@@ -756,12 +775,14 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
  						sctp_spec->hdr.src_port;
  					list[t].m_u.sctp_hdr.src_port =
  						sctp_mask->hdr.src_port;
 +					input_set_byte += 2;
  				}
- 				if (sctp_mask->hdr.dst_port) {
+ 				if (sctp_mask->hdr.dst_port == UINT16_MAX) {
  					list[t].h_u.sctp_hdr.dst_port =
  						sctp_spec->hdr.dst_port;
  					list[t].m_u.sctp_hdr.dst_port =
@@ -184,82 +183,41 @@
 +					input_set_byte += 2;
  				}
  				t++;
- 			}
-@@ -943,6 +964,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
- 						vxlan_mask->vni[0];
+ 			} else if (!sctp_spec && !sctp_mask) {
+@@ -799,6 +820,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
+ 						UINT32_MAX;
  					input_set |=
  						ICE_INSET_TUN_VXLAN_VNI;
 +					input_set_byte += 2;
  				}
  				t++;
- 			}
-@@ -980,6 +1002,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
- 						nvgre_mask->tni[0];
+ 			} else if (!vxlan_spec && !vxlan_mask) {
+@@ -835,6 +857,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
+ 						UINT32_MAX;
  					input_set |=
  						ICE_INSET_TUN_NVGRE_TNI;
 +					input_set_byte += 2;
  				}
  				t++;
- 			}
-@@ -1008,6 +1031,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
+ 			} else if (!nvgre_spec && !nvgre_mask) {
+@@ -865,6 +888,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
  					list[t].m_u.vlan_hdr.vlan =
- 						vlan_mask->tci;
+ 						UINT16_MAX;
  					input_set |= ICE_INSET_VLAN_OUTER;
 +					input_set_byte += 2;
  				}
- 				if (vlan_mask->inner_type) {
+ 				if (vlan_mask->inner_type == UINT16_MAX) {
  					list[t].h_u.vlan_hdr.type =
-@@ -1015,6 +1039,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
+@@ -872,6 +896,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
  					list[t].m_u.vlan_hdr.type =
- 						vlan_mask->inner_type;
+ 						UINT16_MAX;
  					input_set |= ICE_INSET_ETHERTYPE;
 +					input_set_byte += 2;
  				}
  				t++;
- 			}
-@@ -1055,6 +1080,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
- 					list[t].m_u.pppoe_hdr.session_id =
- 						pppoe_mask->session_id;
- 					input_set |= ICE_INSET_PPPOE_SESSION;
-+					input_set_byte += 2;
- 				}
- 				t++;
- 				pppoe_elem_valid = 1;
-@@ -1087,7 +1113,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
- 					list[t].m_u.pppoe_hdr.ppp_prot_id =
- 						pppoe_proto_mask->proto_id;
- 					input_set |= ICE_INSET_PPPOE_PROTO;
--
-+					input_set_byte += 2;
- 					pppoe_prot_valid = 1;
- 				}
- 				if ((pppoe_proto_mask->proto_id &
-@@ -1144,6 +1170,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
- 				list[t].m_u.esp_hdr.spi =
- 					esp_mask->hdr.spi;
- 				input_set |= ICE_INSET_ESP_SPI;
-+				input_set_byte += 4;
- 				t++;
- 			}
- 
-@@ -1200,6 +1227,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
- 				list[t].m_u.ah_hdr.spi =
- 					ah_mask->spi;
- 				input_set |= ICE_INSET_AH_SPI;
-+				input_set_byte += 4;
- 				t++;
- 			}
- 
-@@ -1239,6 +1267,7 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
- 				list[t].m_u.l2tpv3_sess_hdr.session_id =
- 					l2tp_mask->session_id;
- 				input_set |= ICE_INSET_L2TPV3OIP_SESSION_ID;
-+				input_set_byte += 4;
- 				t++;
- 			}
- 
-@@ -1344,6 +1373,14 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
- 			*tun_type = ICE_SW_IPV6_UDP;
+ 			} else if (!vlan_spec && !vlan_mask) {
+@@ -906,6 +931,14 @@ ice_switch_inset_get(const struct rte_flow_item pattern[],
+ 		}
  	}
  
 +	if (input_set_byte > MAX_INPUT_SET_BYTE) {

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

* [dpdk-stable] patch 'net/mlx5: fix flow META item validation' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (114 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/ice: add input set byte number check' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/ice: fix error log in generic flow' " luca.boccassi
                   ` (75 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Shy Shyman; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 77e0f36bfed0efeec0bfcfc997b82af973d4ea8e Mon Sep 17 00:00:00 2001
From: Shy Shyman <shys@mellanox.com>
Date: Sun, 28 Jun 2020 12:36:31 +0300
Subject: [PATCH] net/mlx5: fix flow META item validation

[ upstream commit 5f3541724e0812e23532fa7e9e89254b3e0c87c6 ]

When flow is inserted with meta match item it requires a certain
register support.
As part of the flow validation of such flows, the validation
function is missing a check that the mlx5 driver is not in
legacy mode in terms of extended meta data support
(MLX5_XMETA_MODE_LEGACY flag).
If the driver is in legacy mode it will cause downstream
function that allocates needed register for meta data.

The fix checks explicitly the conditions for support of
meta data in FDB mode. If the conditions are not met
an error message will be issued.

Fixes: 9bf26e1318e3 ("ethdev: move egress metadata to dynamic field")

Signed-off-by: Shy Shyman <shys@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index d83e49f95..930e16026 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1395,6 +1395,13 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,
 					  "isn't supported");
 		if (reg != REG_A)
 			nic_mask.data = priv->sh->dv_meta_mask;
+	} else if (attr->transfer) {
+		return rte_flow_error_set(error, ENOTSUP,
+					RTE_FLOW_ERROR_TYPE_ITEM, item,
+					"extended metadata feature "
+					"should be enabled when "
+					"meta item is requested "
+					"with e-switch mode ");
 	}
 	if (!mask)
 		mask = &rte_flow_item_meta_mask;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.046477102 +0100
+++ 0117-net-mlx5-fix-flow-META-item-validation.patch	2020-07-24 12:53:48.391008397 +0100
@@ -1,8 +1,10 @@
-From 5f3541724e0812e23532fa7e9e89254b3e0c87c6 Mon Sep 17 00:00:00 2001
+From 77e0f36bfed0efeec0bfcfc997b82af973d4ea8e Mon Sep 17 00:00:00 2001
 From: Shy Shyman <shys@mellanox.com>
 Date: Sun, 28 Jun 2020 12:36:31 +0300
 Subject: [PATCH] net/mlx5: fix flow META item validation
 
+[ upstream commit 5f3541724e0812e23532fa7e9e89254b3e0c87c6 ]
+
 When flow is inserted with meta match item it requires a certain
 register support.
 As part of the flow validation of such flows, the validation
@@ -17,7 +19,6 @@
 an error message will be issued.
 
 Fixes: 9bf26e1318e3 ("ethdev: move egress metadata to dynamic field")
-Cc: stable@dpdk.org
 
 Signed-off-by: Shy Shyman <shys@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -26,10 +27,10 @@
  1 file changed, 7 insertions(+)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 0bd1c99e6..8b5b6838f 100644
+index d83e49f95..930e16026 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -1483,6 +1483,13 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,
+@@ -1395,6 +1395,13 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,
  					  "isn't supported");
  		if (reg != REG_A)
  			nic_mask.data = priv->sh->dv_meta_mask;

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

* [dpdk-stable] patch 'net/ice: fix error log in generic flow' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (115 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/mlx5: fix flow META item validation' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/i40e: fix getting EEPROM information' " luca.boccassi
                   ` (74 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Shougang Wang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 5d3bcbcebf981afc683e0138e78aaadefb11f38c Mon Sep 17 00:00:00 2001
From: Shougang Wang <shougangx.wang@intel.com>
Date: Mon, 6 Jul 2020 09:37:05 +0000
Subject: [PATCH] net/ice: fix error log in generic flow

[ upstream commit c04e7f5a7080e2fa91aa2cf9a01a40760edecbe7 ]

When create a RSS rule with void action, the error log is "Invalid
input set". This patch fix the issue by adding check for the type of
first actions item.

Fixes: 7615a6895009 ("net/ice: rework for generic flow enabling")

Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_generic_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
index a1648eeb5..1d2d60fda 100644
--- a/drivers/net/ice/ice_generic_flow.c
+++ b/drivers/net/ice/ice_generic_flow.c
@@ -1786,7 +1786,7 @@ ice_flow_process_filter(struct rte_eth_dev *dev,
 		return -rte_errno;
 	}
 
-	if (!actions) {
+	if (!actions || actions->type == RTE_FLOW_ACTION_TYPE_END) {
 		rte_flow_error_set(error, EINVAL,
 				   RTE_FLOW_ERROR_TYPE_ACTION_NUM,
 				   NULL, "NULL action.");
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.082275100 +0100
+++ 0118-net-ice-fix-error-log-in-generic-flow.patch	2020-07-24 12:53:48.395008472 +0100
@@ -1,14 +1,15 @@
-From c04e7f5a7080e2fa91aa2cf9a01a40760edecbe7 Mon Sep 17 00:00:00 2001
+From 5d3bcbcebf981afc683e0138e78aaadefb11f38c Mon Sep 17 00:00:00 2001
 From: Shougang Wang <shougangx.wang@intel.com>
 Date: Mon, 6 Jul 2020 09:37:05 +0000
 Subject: [PATCH] net/ice: fix error log in generic flow
 
+[ upstream commit c04e7f5a7080e2fa91aa2cf9a01a40760edecbe7 ]
+
 When create a RSS rule with void action, the error log is "Invalid
 input set". This patch fix the issue by adding check for the type of
 first actions item.
 
 Fixes: 7615a6895009 ("net/ice: rework for generic flow enabling")
-Cc: stable@dpdk.org
 
 Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c
-index ad103d0e8..80ef0e323 100644
+index a1648eeb5..1d2d60fda 100644
 --- a/drivers/net/ice/ice_generic_flow.c
 +++ b/drivers/net/ice/ice_generic_flow.c
-@@ -1873,7 +1873,7 @@ ice_flow_process_filter(struct rte_eth_dev *dev,
+@@ -1786,7 +1786,7 @@ ice_flow_process_filter(struct rte_eth_dev *dev,
  		return -rte_errno;
  	}
  

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

* [dpdk-stable] patch 'net/i40e: fix getting EEPROM information' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (116 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/ice: fix error log in generic flow' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'app/testpmd: use clock time in throughput calculation' " luca.boccassi
                   ` (73 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Pavel Ivashchenko; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 1ccf6600589bfbf66753b7b55f9ac3b85132a767 Mon Sep 17 00:00:00 2001
From: Pavel Ivashchenko <pivashchenko@nfware.com>
Date: Thu, 2 Jul 2020 12:37:17 +0000
Subject: [PATCH] net/i40e: fix getting EEPROM information

[ upstream commit 2fc1d6da882563ab80786d69b6d7c9d0e4ce860a ]

Fixes: 50130a0c4440 ("net/i40e/base: change AQ command for PHY access")

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

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 67a44e25f..083e23ccb 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -11980,7 +11980,7 @@ static int i40e_get_module_eeprom(struct rte_eth_dev *dev,
 		}
 		status = i40e_aq_get_phy_register(hw,
 				I40E_AQ_PHY_REG_ACCESS_EXTERNAL_MODULE,
-				addr, offset, 1, &value, NULL);
+				addr, 1, offset, &value, NULL);
 		if (status)
 			return -EIO;
 		data[i] = (uint8_t)value;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.119164948 +0100
+++ 0119-net-i40e-fix-getting-EEPROM-information.patch	2020-07-24 12:53:48.403008621 +0100
@@ -1,10 +1,11 @@
-From 2fc1d6da882563ab80786d69b6d7c9d0e4ce860a Mon Sep 17 00:00:00 2001
+From 1ccf6600589bfbf66753b7b55f9ac3b85132a767 Mon Sep 17 00:00:00 2001
 From: Pavel Ivashchenko <pivashchenko@nfware.com>
 Date: Thu, 2 Jul 2020 12:37:17 +0000
 Subject: [PATCH] net/i40e: fix getting EEPROM information
 
+[ upstream commit 2fc1d6da882563ab80786d69b6d7c9d0e4ce860a ]
+
 Fixes: 50130a0c4440 ("net/i40e/base: change AQ command for PHY access")
-Cc: stable@dpdk.org
 
 Signed-off-by: Pavel Ivashchenko <pivashchenko@nfware.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -13,10 +14,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
-index 472ce2a9e..777e14926 100644
+index 67a44e25f..083e23ccb 100644
 --- a/drivers/net/i40e/i40e_ethdev.c
 +++ b/drivers/net/i40e/i40e_ethdev.c
-@@ -12081,7 +12081,7 @@ static int i40e_get_module_eeprom(struct rte_eth_dev *dev,
+@@ -11980,7 +11980,7 @@ static int i40e_get_module_eeprom(struct rte_eth_dev *dev,
  		}
  		status = i40e_aq_get_phy_register(hw,
  				I40E_AQ_PHY_REG_ACCESS_EXTERNAL_MODULE,

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

* [dpdk-stable] patch 'app/testpmd: use clock time in throughput calculation' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (117 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/i40e: fix getting EEPROM information' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'app/testpmd: fix burst percentage " luca.boccassi
                   ` (72 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Honnappa Nagarahalli
  Cc: Phil Yang, Ruifeng Wang, Ferruh Yigit, Ali Alnubani, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From e3481fb27c70b9d5fb50f95c9545e99e31dcc40c Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Mon, 6 Jul 2020 18:32:29 -0500
Subject: [PATCH] app/testpmd: use clock time in throughput calculation

[ upstream commit aac2b6a78d7728ee39aed8822cba102b3a99a6bf ]

The throughput calculation requires a counter that measures
passing of time. However, the kernel saves and restores the PMU
state when a thread is unscheduled and scheduled. This ensures
that the PMU cycles are not counted towards a thread that is
not scheduled. Hence, when RTE_ARM_EAL_RDTSC_USE_PMU is enabled,
the PMU cycles do not represent the passing of time.
This results in incorrect calculation of throughput numbers.
Use clock_gettime system call to calculate the time passed since
last call.

Bugzilla ID: 450
Fixes: 0e106980301d ("app/testpmd: show throughput in port stats")

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Phil Yang <phil.yang@arm.com>
Tested-by: Ali Alnubani <alialnu@mellanox.com>
---
 app/test-pmd/config.c | 44 +++++++++++++++++++++++++++++--------------
 1 file changed, 30 insertions(+), 14 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index e345cea6d..726a26342 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -53,6 +53,14 @@
 
 #include "testpmd.h"
 
+#ifdef CLOCK_MONOTONIC_RAW /* Defined in glibc bits/time.h */
+#define CLOCK_TYPE_ID CLOCK_MONOTONIC_RAW
+#else
+#define CLOCK_TYPE_ID CLOCK_MONOTONIC
+#endif
+
+#define NS_PER_SEC 1E9
+
 static char *flowtype_to_str(uint16_t flow_type);
 
 static const struct {
@@ -125,9 +133,10 @@ nic_stats_display(portid_t port_id)
 	static uint64_t prev_pkts_tx[RTE_MAX_ETHPORTS];
 	static uint64_t prev_bytes_rx[RTE_MAX_ETHPORTS];
 	static uint64_t prev_bytes_tx[RTE_MAX_ETHPORTS];
-	static uint64_t prev_cycles[RTE_MAX_ETHPORTS];
+	static uint64_t prev_ns[RTE_MAX_ETHPORTS];
+	struct timespec cur_time;
 	uint64_t diff_pkts_rx, diff_pkts_tx, diff_bytes_rx, diff_bytes_tx,
-								diff_cycles;
+								diff_ns;
 	uint64_t mpps_rx, mpps_tx, mbps_rx, mbps_tx;
 	struct rte_eth_stats stats;
 	struct rte_port *port = &ports[port_id];
@@ -184,10 +193,17 @@ nic_stats_display(portid_t port_id)
 		}
 	}
 
-	diff_cycles = prev_cycles[port_id];
-	prev_cycles[port_id] = rte_rdtsc();
-	if (diff_cycles > 0)
-		diff_cycles = prev_cycles[port_id] - diff_cycles;
+	diff_ns = 0;
+	if (clock_gettime(CLOCK_TYPE_ID, &cur_time) == 0) {
+		uint64_t ns;
+
+		ns = cur_time.tv_sec * NS_PER_SEC;
+		ns += cur_time.tv_nsec;
+
+		if (prev_ns[port_id] != 0)
+			diff_ns = ns - prev_ns[port_id];
+		prev_ns[port_id] = ns;
+	}
 
 	diff_pkts_rx = (stats.ipackets > prev_pkts_rx[port_id]) ?
 		(stats.ipackets - prev_pkts_rx[port_id]) : 0;
@@ -195,10 +211,10 @@ nic_stats_display(portid_t port_id)
 		(stats.opackets - prev_pkts_tx[port_id]) : 0;
 	prev_pkts_rx[port_id] = stats.ipackets;
 	prev_pkts_tx[port_id] = stats.opackets;
-	mpps_rx = diff_cycles > 0 ?
-		diff_pkts_rx * rte_get_tsc_hz() / diff_cycles : 0;
-	mpps_tx = diff_cycles > 0 ?
-		diff_pkts_tx * rte_get_tsc_hz() / diff_cycles : 0;
+	mpps_rx = diff_ns > 0 ?
+		(double)diff_pkts_rx / diff_ns * NS_PER_SEC : 0;
+	mpps_tx = diff_ns > 0 ?
+		(double)diff_pkts_tx / diff_ns * NS_PER_SEC : 0;
 
 	diff_bytes_rx = (stats.ibytes > prev_bytes_rx[port_id]) ?
 		(stats.ibytes - prev_bytes_rx[port_id]) : 0;
@@ -206,10 +222,10 @@ nic_stats_display(portid_t port_id)
 		(stats.obytes - prev_bytes_tx[port_id]) : 0;
 	prev_bytes_rx[port_id] = stats.ibytes;
 	prev_bytes_tx[port_id] = stats.obytes;
-	mbps_rx = diff_cycles > 0 ?
-		diff_bytes_rx * rte_get_tsc_hz() / diff_cycles : 0;
-	mbps_tx = diff_cycles > 0 ?
-		diff_bytes_tx * rte_get_tsc_hz() / diff_cycles : 0;
+	mbps_rx = diff_ns > 0 ?
+		(double)diff_bytes_rx / diff_ns * NS_PER_SEC : 0;
+	mbps_tx = diff_ns > 0 ?
+		(double)diff_bytes_tx / diff_ns * NS_PER_SEC : 0;
 
 	printf("\n  Throughput (since last show)\n");
 	printf("  Rx-pps: %12"PRIu64"          Rx-bps: %12"PRIu64"\n  Tx-pps: %12"
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.167374596 +0100
+++ 0120-app-testpmd-use-clock-time-in-throughput-calculation.patch	2020-07-24 12:53:48.407008695 +0100
@@ -1,8 +1,10 @@
-From aac2b6a78d7728ee39aed8822cba102b3a99a6bf Mon Sep 17 00:00:00 2001
+From e3481fb27c70b9d5fb50f95c9545e99e31dcc40c Mon Sep 17 00:00:00 2001
 From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Date: Mon, 6 Jul 2020 18:32:29 -0500
 Subject: [PATCH] app/testpmd: use clock time in throughput calculation
 
+[ upstream commit aac2b6a78d7728ee39aed8822cba102b3a99a6bf ]
+
 The throughput calculation requires a counter that measures
 passing of time. However, the kernel saves and restores the PMU
 state when a thread is unscheduled and scheduled. This ensures
@@ -15,7 +17,6 @@
 
 Bugzilla ID: 450
 Fixes: 0e106980301d ("app/testpmd: show throughput in port stats")
-Cc: stable@dpdk.org
 
 Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Reviewed-by: Phil Yang <phil.yang@arm.com>
@@ -28,12 +29,12 @@
  1 file changed, 30 insertions(+), 14 deletions(-)
 
 diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
-index a79019f52..75013100f 100644
+index e345cea6d..726a26342 100644
 --- a/app/test-pmd/config.c
 +++ b/app/test-pmd/config.c
-@@ -54,6 +54,14 @@
+@@ -53,6 +53,14 @@
  
- #define ETHDEV_FWVERS_LEN 32
+ #include "testpmd.h"
  
 +#ifdef CLOCK_MONOTONIC_RAW /* Defined in glibc bits/time.h */
 +#define CLOCK_TYPE_ID CLOCK_MONOTONIC_RAW
@@ -46,7 +47,7 @@
  static char *flowtype_to_str(uint16_t flow_type);
  
  static const struct {
-@@ -139,9 +147,10 @@ nic_stats_display(portid_t port_id)
+@@ -125,9 +133,10 @@ nic_stats_display(portid_t port_id)
  	static uint64_t prev_pkts_tx[RTE_MAX_ETHPORTS];
  	static uint64_t prev_bytes_rx[RTE_MAX_ETHPORTS];
  	static uint64_t prev_bytes_tx[RTE_MAX_ETHPORTS];
@@ -59,7 +60,7 @@
  	uint64_t mpps_rx, mpps_tx, mbps_rx, mbps_tx;
  	struct rte_eth_stats stats;
  	struct rte_port *port = &ports[port_id];
-@@ -198,10 +207,17 @@ nic_stats_display(portid_t port_id)
+@@ -184,10 +193,17 @@ nic_stats_display(portid_t port_id)
  		}
  	}
  
@@ -81,7 +82,7 @@
  
  	diff_pkts_rx = (stats.ipackets > prev_pkts_rx[port_id]) ?
  		(stats.ipackets - prev_pkts_rx[port_id]) : 0;
-@@ -209,10 +225,10 @@ nic_stats_display(portid_t port_id)
+@@ -195,10 +211,10 @@ nic_stats_display(portid_t port_id)
  		(stats.opackets - prev_pkts_tx[port_id]) : 0;
  	prev_pkts_rx[port_id] = stats.ipackets;
  	prev_pkts_tx[port_id] = stats.opackets;
@@ -96,7 +97,7 @@
  
  	diff_bytes_rx = (stats.ibytes > prev_bytes_rx[port_id]) ?
  		(stats.ibytes - prev_bytes_rx[port_id]) : 0;
-@@ -220,10 +236,10 @@ nic_stats_display(portid_t port_id)
+@@ -206,10 +222,10 @@ nic_stats_display(portid_t port_id)
  		(stats.obytes - prev_bytes_tx[port_id]) : 0;
  	prev_bytes_rx[port_id] = stats.ibytes;
  	prev_bytes_tx[port_id] = stats.obytes;

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

* [dpdk-stable] patch 'app/testpmd: fix burst percentage calculation' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (118 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'app/testpmd: use clock time in throughput calculation' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/hns3: check multi-process action register result' " luca.boccassi
                   ` (71 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Honnappa Nagarahalli
  Cc: Phil Yang, Ruifeng Wang, Ferruh Yigit, Ali Alnubani, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From b3fea2ae5384e9fceea342583d1e9180856239f7 Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Mon, 6 Jul 2020 18:32:30 -0500
Subject: [PATCH] app/testpmd: fix burst percentage calculation

[ upstream commit 85de481a716a14a3eb89869928d96b539b1f0b62 ]

The burst % calculation can over flow due to multiplication.
Fix the multiplication and increase the size of variables to
64b.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Phil Yang <phil.yang@arm.com>
Tested-by: Ali Alnubani <alialnu@mellanox.com>
---
 app/test-pmd/testpmd.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 0b126594b..8ab6cfc6c 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1430,9 +1430,9 @@ init_fwd_streams(void)
 static void
 pkt_burst_stats_display(const char *rx_tx, struct pkt_burst_stats *pbs)
 {
-	unsigned int total_burst;
-	unsigned int nb_burst;
-	unsigned int burst_stats[3];
+	uint64_t total_burst;
+	uint64_t nb_burst;
+	uint64_t burst_stats[3];
 	uint16_t pktnb_stats[3];
 	uint16_t nb_pkt;
 	int burst_percent[3];
@@ -1461,8 +1461,8 @@ pkt_burst_stats_display(const char *rx_tx, struct pkt_burst_stats *pbs)
 	}
 	if (total_burst == 0)
 		return;
-	burst_percent[0] = (burst_stats[0] * 100) / total_burst;
-	printf("  %s-bursts : %u [%d%% of %d pkts", rx_tx, total_burst,
+	burst_percent[0] = (double)burst_stats[0] / total_burst * 100;
+	printf("  %s-bursts : %"PRIu64" [%d%% of %d pkts", rx_tx, total_burst,
 	       burst_percent[0], (int) pktnb_stats[0]);
 	if (burst_stats[0] == total_burst) {
 		printf("]\n");
@@ -1473,7 +1473,7 @@ pkt_burst_stats_display(const char *rx_tx, struct pkt_burst_stats *pbs)
 		       100 - burst_percent[0], pktnb_stats[1]);
 		return;
 	}
-	burst_percent[1] = (burst_stats[1] * 100) / total_burst;
+	burst_percent[1] = (double)burst_stats[1] / total_burst * 100;
 	burst_percent[2] = 100 - (burst_percent[0] + burst_percent[1]);
 	if ((burst_percent[1] == 0) || (burst_percent[2] == 0)) {
 		printf(" + %d%% of others]\n", 100 - burst_percent[0]);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.205836121 +0100
+++ 0121-app-testpmd-fix-burst-percentage-calculation.patch	2020-07-24 12:53:48.411008770 +0100
@@ -1,14 +1,15 @@
-From 85de481a716a14a3eb89869928d96b539b1f0b62 Mon Sep 17 00:00:00 2001
+From b3fea2ae5384e9fceea342583d1e9180856239f7 Mon Sep 17 00:00:00 2001
 From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Date: Mon, 6 Jul 2020 18:32:30 -0500
 Subject: [PATCH] app/testpmd: fix burst percentage calculation
 
+[ upstream commit 85de481a716a14a3eb89869928d96b539b1f0b62 ]
+
 The burst % calculation can over flow due to multiplication.
 Fix the multiplication and increase the size of variables to
 64b.
 
 Fixes: af75078fece3 ("first public release")
-Cc: stable@dpdk.org
 
 Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Reviewed-by: Phil Yang <phil.yang@arm.com>
@@ -21,10 +22,10 @@
  1 file changed, 6 insertions(+), 6 deletions(-)
 
 diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
-index 4989d22ca..2e1493da2 100644
+index 0b126594b..8ab6cfc6c 100644
 --- a/app/test-pmd/testpmd.c
 +++ b/app/test-pmd/testpmd.c
-@@ -1692,9 +1692,9 @@ init_fwd_streams(void)
+@@ -1430,9 +1430,9 @@ init_fwd_streams(void)
  static void
  pkt_burst_stats_display(const char *rx_tx, struct pkt_burst_stats *pbs)
  {
@@ -37,7 +38,7 @@
  	uint16_t pktnb_stats[3];
  	uint16_t nb_pkt;
  	int burst_percent[3];
-@@ -1723,8 +1723,8 @@ pkt_burst_stats_display(const char *rx_tx, struct pkt_burst_stats *pbs)
+@@ -1461,8 +1461,8 @@ pkt_burst_stats_display(const char *rx_tx, struct pkt_burst_stats *pbs)
  	}
  	if (total_burst == 0)
  		return;
@@ -48,7 +49,7 @@
  	       burst_percent[0], (int) pktnb_stats[0]);
  	if (burst_stats[0] == total_burst) {
  		printf("]\n");
-@@ -1735,7 +1735,7 @@ pkt_burst_stats_display(const char *rx_tx, struct pkt_burst_stats *pbs)
+@@ -1473,7 +1473,7 @@ pkt_burst_stats_display(const char *rx_tx, struct pkt_burst_stats *pbs)
  		       100 - burst_percent[0], pktnb_stats[1]);
  		return;
  	}

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

* [dpdk-stable] patch 'net/hns3: check multi-process action register result' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (119 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'app/testpmd: fix burst percentage " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'ethdev: fix log type for some error messages' " luca.boccassi
                   ` (70 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Wei Hu (Xavier); +Cc: Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 25e48df34bb106cfb94936ad145e4627dbc8c776 Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Sat, 4 Jul 2020 18:09:48 +0800
Subject: [PATCH] net/hns3: check multi-process action register result

[ upstream commit 9570b1fdbdad47cab28dff58a017b0447bf32ed1 ]

Currently, there is a coverity defect warning about hns3 PMD driver, the
detail information as blow:
CID 289969 (#1 of 1): Unchecked return value (CHECKED_RETURN)
1. check_return: Calling rte_mp_action_register without checking return
   value (as is done elsewhere 11 out of 13 times).

The problem is that missing checking the return value of calling the API
rte_mp_action_register during initialization. If registering an action
function for primary and secondary communication failed, the secondary
process can't work properly.

This patch fixes it by adding check return value of the API function
named rte_mp_action_register in the '.dev_init' implementation function
of hns3 PMD driver.

Coverity issue: 289969
Fixes: 23d4b61fee5d ("net/hns3: support multiple process")

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    | 22 ++++++++++++++++++--
 drivers/net/hns3/hns3_ethdev_vf.c | 20 ++++++++++++++++--
 drivers/net/hns3/hns3_mp.c        | 34 ++++++++++++++++++++++++++-----
 drivers/net/hns3/hns3_mp.h        |  4 ++--
 4 files changed, 69 insertions(+), 11 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 4922e1bde..971f2f900 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5306,12 +5306,25 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
 	hns3_set_rxtx_function(eth_dev);
 	eth_dev->dev_ops = &hns3_eth_dev_ops;
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
-		hns3_mp_init_secondary();
+		ret = hns3_mp_init_secondary();
+		if (ret) {
+			PMD_INIT_LOG(ERR, "Failed to init for secondary "
+				     "process, ret = %d", ret);
+			goto err_mp_init_secondary;
+		}
+
 		hw->secondary_cnt++;
 		return 0;
 	}
 
-	hns3_mp_init_primary();
+	ret = hns3_mp_init_primary();
+	if (ret) {
+		PMD_INIT_LOG(ERR,
+			     "Failed to init for primary process, ret = %d",
+			     ret);
+		goto err_mp_init_primary;
+	}
+
 	hw->adapter_state = HNS3_NIC_UNINITIALIZED;
 
 	if (device_id == HNS3_DEV_ID_25GE_RDMA ||
@@ -5378,7 +5391,12 @@ err_rte_zmalloc:
 
 err_init_pf:
 	rte_free(hw->reset.wait_data);
+
 err_init_reset:
+	hns3_mp_uninit_primary();
+
+err_mp_init_primary:
+err_mp_init_secondary:
 	eth_dev->dev_ops = NULL;
 	eth_dev->rx_pkt_burst = NULL;
 	eth_dev->tx_pkt_burst = NULL;
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index a2867f8ec..5e5da8685 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -2069,12 +2069,24 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
 	hns3_set_rxtx_function(eth_dev);
 	eth_dev->dev_ops = &hns3vf_eth_dev_ops;
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
-		hns3_mp_init_secondary();
+		ret = hns3_mp_init_secondary();
+		if (ret) {
+			PMD_INIT_LOG(ERR, "Failed to init for secondary "
+					  "process, ret = %d", ret);
+			goto err_mp_init_secondary;
+		}
+
 		hw->secondary_cnt++;
 		return 0;
 	}
 
-	hns3_mp_init_primary();
+	ret = hns3_mp_init_primary();
+	if (ret) {
+		PMD_INIT_LOG(ERR,
+			     "Failed to init for primary process, ret = %d",
+			     ret);
+		goto err_mp_init_primary;
+	}
 
 	hw->adapter_state = HNS3_NIC_UNINITIALIZED;
 	hns->is_vf = true;
@@ -2131,6 +2143,10 @@ err_init_vf:
 	rte_free(hw->reset.wait_data);
 
 err_init_reset:
+	hns3_mp_uninit_primary();
+
+err_mp_init_primary:
+err_mp_init_secondary:
 	eth_dev->dev_ops = NULL;
 	eth_dev->rx_pkt_burst = NULL;
 	eth_dev->tx_pkt_burst = NULL;
diff --git a/drivers/net/hns3/hns3_mp.c b/drivers/net/hns3/hns3_mp.c
index 596c31064..639f46ced 100644
--- a/drivers/net/hns3/hns3_mp.c
+++ b/drivers/net/hns3/hns3_mp.c
@@ -14,6 +14,8 @@
 #include "hns3_rxtx.h"
 #include "hns3_mp.h"
 
+static bool hns3_inited;
+
 /*
  * Initialize IPC message.
  *
@@ -192,9 +194,20 @@ void hns3_mp_req_stop_rxtx(struct rte_eth_dev *dev)
 /*
  * Initialize by primary process.
  */
-void hns3_mp_init_primary(void)
+int hns3_mp_init_primary(void)
 {
-	rte_mp_action_register(HNS3_MP_NAME, mp_primary_handle);
+	int ret;
+
+	if (!hns3_inited) {
+		/* primary is allowed to not support IPC */
+		ret = rte_mp_action_register(HNS3_MP_NAME, mp_primary_handle);
+		if (ret && rte_errno != ENOTSUP)
+			return ret;
+
+		hns3_inited = true;
+	}
+
+	return 0;
 }
 
 /*
@@ -202,13 +215,24 @@ void hns3_mp_init_primary(void)
  */
 void hns3_mp_uninit_primary(void)
 {
-	rte_mp_action_unregister(HNS3_MP_NAME);
+	if (hns3_inited)
+		rte_mp_action_unregister(HNS3_MP_NAME);
 }
 
 /*
  * Initialize by secondary process.
  */
-void hns3_mp_init_secondary(void)
+int hns3_mp_init_secondary(void)
 {
-	rte_mp_action_register(HNS3_MP_NAME, mp_secondary_handle);
+	int ret;
+
+	if (!hns3_inited) {
+		ret = rte_mp_action_register(HNS3_MP_NAME, mp_secondary_handle);
+		if (ret)
+			return ret;
+
+		hns3_inited = true;
+	}
+
+	return 0;
 }
diff --git a/drivers/net/hns3/hns3_mp.h b/drivers/net/hns3/hns3_mp.h
index aefbeb140..036546ae1 100644
--- a/drivers/net/hns3/hns3_mp.h
+++ b/drivers/net/hns3/hns3_mp.h
@@ -7,8 +7,8 @@
 
 void hns3_mp_req_start_rxtx(struct rte_eth_dev *dev);
 void hns3_mp_req_stop_rxtx(struct rte_eth_dev *dev);
-void hns3_mp_init_primary(void);
+int hns3_mp_init_primary(void);
 void hns3_mp_uninit_primary(void);
-void hns3_mp_init_secondary(void);
+int hns3_mp_init_secondary(void);
 
 #endif /* _HNS3_MP_H_ */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.240087251 +0100
+++ 0122-net-hns3-check-multi-process-action-register-result.patch	2020-07-24 12:53:48.415008844 +0100
@@ -1,8 +1,10 @@
-From 9570b1fdbdad47cab28dff58a017b0447bf32ed1 Mon Sep 17 00:00:00 2001
+From 25e48df34bb106cfb94936ad145e4627dbc8c776 Mon Sep 17 00:00:00 2001
 From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
 Date: Sat, 4 Jul 2020 18:09:48 +0800
 Subject: [PATCH] net/hns3: check multi-process action register result
 
+[ upstream commit 9570b1fdbdad47cab28dff58a017b0447bf32ed1 ]
+
 Currently, there is a coverity defect warning about hns3 PMD driver, the
 detail information as blow:
 CID 289969 (#1 of 1): Unchecked return value (CHECKED_RETURN)
@@ -20,7 +22,6 @@
 
 Coverity issue: 289969
 Fixes: 23d4b61fee5d ("net/hns3: support multiple process")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lijun Ou <oulijun@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -32,10 +33,10 @@
  4 files changed, 69 insertions(+), 11 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index 13ce32432..9575a05ae 100644
+index 4922e1bde..971f2f900 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -5448,12 +5448,25 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
+@@ -5306,12 +5306,25 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
  	hns3_set_rxtx_function(eth_dev);
  	eth_dev->dev_ops = &hns3_eth_dev_ops;
  	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
@@ -61,9 +62,9 @@
 +	}
 +
  	hw->adapter_state = HNS3_NIC_UNINITIALIZED;
- 	hns->is_vf = false;
- 	hw->data = eth_dev->data;
-@@ -5514,7 +5527,12 @@ err_rte_zmalloc:
+ 
+ 	if (device_id == HNS3_DEV_ID_25GE_RDMA ||
+@@ -5378,7 +5391,12 @@ err_rte_zmalloc:
  
  err_init_pf:
  	rte_free(hw->reset.wait_data);
@@ -77,10 +78,10 @@
  	eth_dev->rx_pkt_burst = NULL;
  	eth_dev->tx_pkt_burst = NULL;
 diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
-index 3c5998abe..54e5dac52 100644
+index a2867f8ec..5e5da8685 100644
 --- a/drivers/net/hns3/hns3_ethdev_vf.c
 +++ b/drivers/net/hns3/hns3_ethdev_vf.c
-@@ -2524,12 +2524,24 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -2069,12 +2069,24 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
  	hns3_set_rxtx_function(eth_dev);
  	eth_dev->dev_ops = &hns3vf_eth_dev_ops;
  	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
@@ -107,7 +108,7 @@
  
  	hw->adapter_state = HNS3_NIC_UNINITIALIZED;
  	hns->is_vf = true;
-@@ -2586,6 +2598,10 @@ err_init_vf:
+@@ -2131,6 +2143,10 @@ err_init_vf:
  	rte_free(hw->reset.wait_data);
  
  err_init_reset:

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

* [dpdk-stable] patch 'ethdev: fix log type for some error messages' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (120 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/hns3: check multi-process action register result' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'service: fix C++ linkage' " luca.boccassi
                   ` (69 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 9e38ba9f27d48c08b4f6276f1dcbad70ac67230c Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 2 Jul 2020 12:17:05 +0100
Subject: [PATCH] ethdev: fix log type for some error messages

[ upstream commit f6ac2b06ecffa62abbc2cd6009b593604c2f3447 ]

Some log macros was using 'EAL' logtype, convert them to 'ethdev'.
Also fix missing EOL and fix syntax for some logs.

Fixes: 214ed1acd125 ("ethdev: add iterator to match devargs input")
Fixes: e489007a411c ("ethdev: add generic create/destroy ethdev APIs")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 lib/librte_ethdev/rte_ethdev.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index c3657509c..d245cfcea 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -279,7 +279,7 @@ end:
 
 error:
 	if (ret == -ENOTSUP)
-		RTE_LOG(ERR, EAL, "Bus %s does not support iterating.\n",
+		RTE_ETHDEV_LOG(ERR, "Bus %s does not support iterating.\n",
 				iter->bus->name);
 	free(devargs.args);
 	free(bus_str);
@@ -4221,7 +4221,8 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
 				device->numa_node);
 
 			if (!ethdev->data->dev_private) {
-				RTE_LOG(ERR, EAL, "failed to allocate private data");
+				RTE_ETHDEV_LOG(ERR,
+					"failed to allocate private data\n");
 				retval = -ENOMEM;
 				goto probe_failed;
 			}
@@ -4229,8 +4230,8 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
 	} else {
 		ethdev = rte_eth_dev_attach_secondary(name);
 		if (!ethdev) {
-			RTE_LOG(ERR, EAL, "secondary process attach failed, "
-				"ethdev doesn't exist");
+			RTE_ETHDEV_LOG(ERR,
+				"secondary process attach failed, ethdev doesn't exist\n");
 			return  -ENODEV;
 		}
 	}
@@ -4240,15 +4241,15 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
 	if (ethdev_bus_specific_init) {
 		retval = ethdev_bus_specific_init(ethdev, bus_init_params);
 		if (retval) {
-			RTE_LOG(ERR, EAL,
-				"ethdev bus specific initialisation failed");
+			RTE_ETHDEV_LOG(ERR,
+				"ethdev bus specific initialisation failed\n");
 			goto probe_failed;
 		}
 	}
 
 	retval = ethdev_init(ethdev, init_params);
 	if (retval) {
-		RTE_LOG(ERR, EAL, "ethdev initialisation failed");
+		RTE_ETHDEV_LOG(ERR, "ethdev initialisation failed\n");
 		goto probe_failed;
 	}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.285679999 +0100
+++ 0123-ethdev-fix-log-type-for-some-error-messages.patch	2020-07-24 12:53:48.419008919 +0100
@@ -1,14 +1,15 @@
-From f6ac2b06ecffa62abbc2cd6009b593604c2f3447 Mon Sep 17 00:00:00 2001
+From 9e38ba9f27d48c08b4f6276f1dcbad70ac67230c Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Thu, 2 Jul 2020 12:17:05 +0100
 Subject: [PATCH] ethdev: fix log type for some error messages
 
+[ upstream commit f6ac2b06ecffa62abbc2cd6009b593604c2f3447 ]
+
 Some log macros was using 'EAL' logtype, convert them to 'ethdev'.
 Also fix missing EOL and fix syntax for some logs.
 
 Fixes: 214ed1acd125 ("ethdev: add iterator to match devargs input")
 Fixes: e489007a411c ("ethdev: add generic create/destroy ethdev APIs")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -17,10 +18,10 @@
  1 file changed, 8 insertions(+), 7 deletions(-)
 
 diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
-index d06b7f9b1..5f10f2d8d 100644
+index c3657509c..d245cfcea 100644
 --- a/lib/librte_ethdev/rte_ethdev.c
 +++ b/lib/librte_ethdev/rte_ethdev.c
-@@ -277,7 +277,7 @@ end:
+@@ -279,7 +279,7 @@ end:
  
  error:
  	if (ret == -ENOTSUP)
@@ -29,7 +30,7 @@
  				iter->bus->name);
  	free(devargs.args);
  	free(bus_str);
-@@ -4230,7 +4230,8 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
+@@ -4221,7 +4221,8 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
  				device->numa_node);
  
  			if (!ethdev->data->dev_private) {
@@ -39,7 +40,7 @@
  				retval = -ENOMEM;
  				goto probe_failed;
  			}
-@@ -4238,8 +4239,8 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
+@@ -4229,8 +4230,8 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
  	} else {
  		ethdev = rte_eth_dev_attach_secondary(name);
  		if (!ethdev) {
@@ -50,7 +51,7 @@
  			return  -ENODEV;
  		}
  	}
-@@ -4249,15 +4250,15 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
+@@ -4240,15 +4241,15 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
  	if (ethdev_bus_specific_init) {
  		retval = ethdev_bus_specific_init(ethdev, bus_init_params);
  		if (retval) {

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

* [dpdk-stable] patch 'service: fix C++ linkage' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (121 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'ethdev: fix log type for some error messages' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net: fix unneeded replacement of TCP checksum 0' " luca.boccassi
                   ` (68 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Levend Sayar; +Cc: Harry van Haaren, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 5a55e4f4297afdd781b129c6d90a34d0fc6a4c17 Mon Sep 17 00:00:00 2001
From: Levend Sayar <levendsayar@gmail.com>
Date: Thu, 9 Jul 2020 15:32:16 +0300
Subject: [PATCH] service: fix C++ linkage

[ upstream commit 604d426de35b445476fa1b9aeae4933ae647be3f ]

"extern C" define is added to rte_service_component.h file
to be able to use in C++ context

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

Signed-off-by: Levend Sayar <levendsayar@gmail.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 lib/librte_eal/common/include/rte_service_component.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lib/librte_eal/common/include/rte_service_component.h b/lib/librte_eal/common/include/rte_service_component.h
index b75aba11b..9e66ee7e2 100644
--- a/lib/librte_eal/common/include/rte_service_component.h
+++ b/lib/librte_eal/common/include/rte_service_component.h
@@ -9,6 +9,11 @@
  * Include this file if you are writing a component that requires CPU cycles to
  * operate, and you wish to run the component using service cores
  */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <rte_compat.h>
 #include <rte_service.h>
 
@@ -130,4 +135,8 @@ int32_t rte_service_init(void);
  */
 void rte_service_finalize(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _SERVICE_PRIVATE_H_ */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.324368428 +0100
+++ 0124-service-fix-C-linkage.patch	2020-07-24 12:53:48.419008919 +0100
@@ -1,24 +1,25 @@
-From 604d426de35b445476fa1b9aeae4933ae647be3f Mon Sep 17 00:00:00 2001
+From 5a55e4f4297afdd781b129c6d90a34d0fc6a4c17 Mon Sep 17 00:00:00 2001
 From: Levend Sayar <levendsayar@gmail.com>
 Date: Thu, 9 Jul 2020 15:32:16 +0300
 Subject: [PATCH] service: fix C++ linkage
 
+[ upstream commit 604d426de35b445476fa1b9aeae4933ae647be3f ]
+
 "extern C" define is added to rte_service_component.h file
 to be able to use in C++ context
 
 Fixes: 21698354c832 ("service: introduce service cores concept")
-Cc: stable@dpdk.org
 
 Signed-off-by: Levend Sayar <levendsayar@gmail.com>
 Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
 ---
- lib/librte_eal/include/rte_service_component.h | 9 +++++++++
+ lib/librte_eal/common/include/rte_service_component.h | 9 +++++++++
  1 file changed, 9 insertions(+)
 
-diff --git a/lib/librte_eal/include/rte_service_component.h b/lib/librte_eal/include/rte_service_component.h
+diff --git a/lib/librte_eal/common/include/rte_service_component.h b/lib/librte_eal/common/include/rte_service_component.h
 index b75aba11b..9e66ee7e2 100644
---- a/lib/librte_eal/include/rte_service_component.h
-+++ b/lib/librte_eal/include/rte_service_component.h
+--- a/lib/librte_eal/common/include/rte_service_component.h
++++ b/lib/librte_eal/common/include/rte_service_component.h
 @@ -9,6 +9,11 @@
   * Include this file if you are writing a component that requires CPU cycles to
   * operate, and you wish to run the component using service cores

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

* [dpdk-stable] patch 'net: fix unneeded replacement of TCP checksum 0' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (122 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'service: fix C++ linkage' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net: fix checksum on big endian CPUs' " luca.boccassi
                   ` (67 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Hongzhi Guo; +Cc: Olivier Matz, Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 5da4bb34fba48f2455382261d59b2c97283bcf6f Mon Sep 17 00:00:00 2001
From: Hongzhi Guo <guohongzhi1@huawei.com>
Date: Fri, 10 Jul 2020 14:55:51 +0800
Subject: [PATCH] net: fix unneeded replacement of TCP checksum 0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit d5df2ae0428a147b80bbb65d623f88f75d28b226 ]

Per RFC768:
If the computed checksum is zero, it is transmitted as all ones.
An all zero transmitted checksum value means that the transmitter
generated no checksum.

RFC793 for TCP has no such special treatment for the checksum of zero.

Fixes: 6006818cfb26 ("net: new checksum functions")

Signed-off-by: Hongzhi Guo <guohongzhi1@huawei.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
 lib/librte_net/rte_ip.h | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
index ece2e433c..6254c5cc6 100644
--- a/lib/librte_net/rte_ip.h
+++ b/lib/librte_net/rte_ip.h
@@ -324,8 +324,7 @@ rte_ipv4_phdr_cksum(const struct rte_ipv4_hdr *ipv4_hdr, uint64_t ol_flags)
  * @param l4_hdr
  *   The pointer to the beginning of the L4 header.
  * @return
- *   The complemented checksum to set in the IP packet
- *   or 0 on error
+ *   The complemented checksum to set in the IP packet.
  */
 static inline uint16_t
 rte_ipv4_udptcp_cksum(const struct rte_ipv4_hdr *ipv4_hdr, const void *l4_hdr)
@@ -344,7 +343,12 @@ rte_ipv4_udptcp_cksum(const struct rte_ipv4_hdr *ipv4_hdr, const void *l4_hdr)
 
 	cksum = ((cksum & 0xffff0000) >> 16) + (cksum & 0xffff);
 	cksum = (~cksum) & 0xffff;
-	if (cksum == 0)
+	/*
+	 * Per RFC 768:If the computed checksum is zero for UDP,
+	 * it is transmitted as all ones
+	 * (the equivalent in one's complement arithmetic).
+	 */
+	if (cksum == 0 && ipv4_hdr->next_proto_id == IPPROTO_UDP)
 		cksum = 0xffff;
 
 	return (uint16_t)cksum;
@@ -436,7 +440,12 @@ rte_ipv6_udptcp_cksum(const struct rte_ipv6_hdr *ipv6_hdr, const void *l4_hdr)
 
 	cksum = ((cksum & 0xffff0000) >> 16) + (cksum & 0xffff);
 	cksum = (~cksum) & 0xffff;
-	if (cksum == 0)
+	/*
+	 * Per RFC 768: If the computed checksum is zero for UDP,
+	 * it is transmitted as all ones
+	 * (the equivalent in one's complement arithmetic).
+	 */
+	if (cksum == 0 && ipv6_hdr->proto == IPPROTO_UDP)
 		cksum = 0xffff;
 
 	return (uint16_t)cksum;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.360013436 +0100
+++ 0125-net-fix-unneeded-replacement-of-TCP-checksum-0.patch	2020-07-24 12:53:48.419008919 +0100
@@ -1,4 +1,4 @@
-From d5df2ae0428a147b80bbb65d623f88f75d28b226 Mon Sep 17 00:00:00 2001
+From 5da4bb34fba48f2455382261d59b2c97283bcf6f Mon Sep 17 00:00:00 2001
 From: Hongzhi Guo <guohongzhi1@huawei.com>
 Date: Fri, 10 Jul 2020 14:55:51 +0800
 Subject: [PATCH] net: fix unneeded replacement of TCP checksum 0
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit d5df2ae0428a147b80bbb65d623f88f75d28b226 ]
+
 Per RFC768:
 If the computed checksum is zero, it is transmitted as all ones.
 An all zero transmitted checksum value means that the transmitter
@@ -14,7 +16,6 @@
 RFC793 for TCP has no such special treatment for the checksum of zero.
 
 Fixes: 6006818cfb26 ("net: new checksum functions")
-Cc: stable@dpdk.org
 
 Signed-off-by: Hongzhi Guo <guohongzhi1@huawei.com>
 Acked-by: Olivier Matz <olivier.matz@6wind.com>
@@ -24,7 +25,7 @@
  1 file changed, 13 insertions(+), 4 deletions(-)
 
 diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
-index 292f63fd7..a9ffc3357 100644
+index ece2e433c..6254c5cc6 100644
 --- a/lib/librte_net/rte_ip.h
 +++ b/lib/librte_net/rte_ip.h
 @@ -324,8 +324,7 @@ rte_ipv4_phdr_cksum(const struct rte_ipv4_hdr *ipv4_hdr, uint64_t ol_flags)
@@ -51,7 +52,7 @@
  		cksum = 0xffff;
  
  	return (uint16_t)cksum;
-@@ -438,7 +442,12 @@ rte_ipv6_udptcp_cksum(const struct rte_ipv6_hdr *ipv6_hdr, const void *l4_hdr)
+@@ -436,7 +440,12 @@ rte_ipv6_udptcp_cksum(const struct rte_ipv6_hdr *ipv6_hdr, const void *l4_hdr)
  
  	cksum = ((cksum & 0xffff0000) >> 16) + (cksum & 0xffff);
  	cksum = (~cksum) & 0xffff;

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

* [dpdk-stable] patch 'net: fix checksum on big endian CPUs' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (123 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net: fix unneeded replacement of TCP checksum 0' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'doc: add RIB and FIB into the API index' " luca.boccassi
                   ` (66 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Hongzhi Guo; +Cc: Morten Brørup, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 862bc496af14cd62856037a9a5c882ef47461e50 Mon Sep 17 00:00:00 2001
From: Hongzhi Guo <guohongzhi1@huawei.com>
Date: Fri, 10 Jul 2020 19:43:13 +0800
Subject: [PATCH] net: fix checksum on big endian CPUs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 982bb68cab2b93724f9625d53c309e73fa194e6e ]

With current code, the checksum of odd-length buffers is wrong on
big endian CPUs: the last byte is not properly summed to the
accumulator.

Fix this by left-shifting the remaining byte by 8. For instance,
if the last byte is 0x42, we should add 0x4200 to the accumulator
on big endian CPUs.

This change is similar to what is suggested in Errata 3133 of
RFC 1071.

Fixes: 6006818cfb26("net: new checksum functions")

Signed-off-by: Hongzhi Guo <guohongzhi1@huawei.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_net/rte_ip.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
index 6254c5cc6..0897da744 100644
--- a/lib/librte_net/rte_ip.h
+++ b/lib/librte_net/rte_ip.h
@@ -139,8 +139,11 @@ __rte_raw_cksum(const void *buf, size_t len, uint32_t sum)
 	}
 
 	/* if length is in odd bytes */
-	if (len == 1)
-		sum += *((const uint8_t *)u16_buf);
+	if (len == 1) {
+		uint16_t left = 0;
+		*(uint8_t *)&left = *(const uint8_t *)u16_buf;
+		sum += left;
+	}
 
 	return sum;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.396197351 +0100
+++ 0126-net-fix-checksum-on-big-endian-CPUs.patch	2020-07-24 12:53:48.423008994 +0100
@@ -1,4 +1,4 @@
-From 982bb68cab2b93724f9625d53c309e73fa194e6e Mon Sep 17 00:00:00 2001
+From 862bc496af14cd62856037a9a5c882ef47461e50 Mon Sep 17 00:00:00 2001
 From: Hongzhi Guo <guohongzhi1@huawei.com>
 Date: Fri, 10 Jul 2020 19:43:13 +0800
 Subject: [PATCH] net: fix checksum on big endian CPUs
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 982bb68cab2b93724f9625d53c309e73fa194e6e ]
+
 With current code, the checksum of odd-length buffers is wrong on
 big endian CPUs: the last byte is not properly summed to the
 accumulator.
@@ -18,7 +20,6 @@
 RFC 1071.
 
 Fixes: 6006818cfb26("net: new checksum functions")
-Cc: stable@dpdk.org
 
 Signed-off-by: Hongzhi Guo <guohongzhi1@huawei.com>
 Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
@@ -28,7 +29,7 @@
  1 file changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
-index a9ffc3357..fcd1eb342 100644
+index 6254c5cc6..0897da744 100644
 --- a/lib/librte_net/rte_ip.h
 +++ b/lib/librte_net/rte_ip.h
 @@ -139,8 +139,11 @@ __rte_raw_cksum(const void *buf, size_t len, uint32_t sum)

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

* [dpdk-stable] patch 'doc: add RIB and FIB into the API index' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (124 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net: fix checksum on big endian CPUs' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'eal: fix parentheses in alignment macros' " luca.boccassi
                   ` (65 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 3cefef90dddaeb04f776c4b5b580ca65a40dfc72 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Wed, 8 Jul 2020 19:31:27 +0100
Subject: [PATCH] doc: add RIB and FIB into the API index

[ upstream commit 0b459fa02a8d9e721ca6909f7183b9826b14bbda ]

Add RIB/FIB library into the API doxygen index.
Move LPM/LPM6 under separate section "routing".

Fixes: 5a5793a5ffa2 ("rib: add RIB library")
Fixes: f7e861e21c46 ("rib: support IPv6")
Fixes: 39e927248416 ("fib: add FIB library")
Fixes: 40d41a8a7b34 ("fib: support IPv6")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 doc/api/doxy-api-index.md | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md
index d7c8bd24d..5568dbc61 100644
--- a/doc/api/doxy-api-index.md
+++ b/doc/api/doxy-api-index.md
@@ -107,8 +107,6 @@ The public API headers are grouped by topics:
   [GRO]                (@ref rte_gro.h),
   [GSO]                (@ref rte_gso.h),
   [frag/reass]         (@ref rte_ip_frag.h),
-  [LPM IPv4 route]     (@ref rte_lpm.h),
-  [LPM IPv6 route]     (@ref rte_lpm6.h),
   [VXLAN]              (@ref rte_vxlan.h)
 
 - **QoS**:
@@ -116,6 +114,14 @@ The public API headers are grouped by topics:
   [scheduler]          (@ref rte_sched.h),
   [RED congestion]     (@ref rte_red.h)
 
+- **routing**:
+  [LPM IPv4 route]     (@ref rte_lpm.h),
+  [LPM IPv6 route]     (@ref rte_lpm6.h),
+  [RIB IPv4]           (@ref rte_rib.h),
+  [RIB IPv6]           (@ref rte_rib6.h),
+  [FIB IPv4]           (@ref rte_fib.h),
+  [FIB IPv6]           (@ref rte_fib6.h)
+
 - **hashes**:
   [hash]               (@ref rte_hash.h),
   [jhash]              (@ref rte_jhash.h),
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.433577385 +0100
+++ 0127-doc-add-RIB-and-FIB-into-the-API-index.patch	2020-07-24 12:53:48.423008994 +0100
@@ -1,8 +1,10 @@
-From 0b459fa02a8d9e721ca6909f7183b9826b14bbda Mon Sep 17 00:00:00 2001
+From 3cefef90dddaeb04f776c4b5b580ca65a40dfc72 Mon Sep 17 00:00:00 2001
 From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
 Date: Wed, 8 Jul 2020 19:31:27 +0100
 Subject: [PATCH] doc: add RIB and FIB into the API index
 
+[ upstream commit 0b459fa02a8d9e721ca6909f7183b9826b14bbda ]
+
 Add RIB/FIB library into the API doxygen index.
 Move LPM/LPM6 under separate section "routing".
 
@@ -10,7 +12,6 @@
 Fixes: f7e861e21c46 ("rib: support IPv6")
 Fixes: 39e927248416 ("fib: add FIB library")
 Fixes: 40d41a8a7b34 ("fib: support IPv6")
-Cc: stable@dpdk.org
 
 Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
 ---
@@ -18,10 +19,10 @@
  1 file changed, 8 insertions(+), 2 deletions(-)
 
 diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md
-index 766c79dbe..b855a8f3b 100644
+index d7c8bd24d..5568dbc61 100644
 --- a/doc/api/doxy-api-index.md
 +++ b/doc/api/doxy-api-index.md
-@@ -108,8 +108,6 @@ The public API headers are grouped by topics:
+@@ -107,8 +107,6 @@ The public API headers are grouped by topics:
    [GRO]                (@ref rte_gro.h),
    [GSO]                (@ref rte_gso.h),
    [frag/reass]         (@ref rte_ip_frag.h),
@@ -30,7 +31,7 @@
    [VXLAN]              (@ref rte_vxlan.h)
  
  - **QoS**:
-@@ -117,6 +115,14 @@ The public API headers are grouped by topics:
+@@ -116,6 +114,14 @@ The public API headers are grouped by topics:
    [scheduler]          (@ref rte_sched.h),
    [RED congestion]     (@ref rte_red.h)
  

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

* [dpdk-stable] patch 'eal: fix parentheses in alignment macros' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (125 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'doc: add RIB and FIB into the API index' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'vhost: fix virtio ready flag check' " luca.boccassi
                   ` (64 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Harman Kalra; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From f5f37e8889243b92cc325817c7f72849b37f818a Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Wed, 24 Jun 2020 15:50:47 +0530
Subject: [PATCH] eal: fix parentheses in alignment macros

[ upstream commit 3596a037ab44a1ad588fb388d5d4ee8f3d2a1ca7 ]

Found an issue while using RTE_ALIGN_MUL_NEAR with an
expression, like as passed in estimate_tsc_freq().
RTE_ALIGN_MUL_FLOOR resulted in unexpected value as
parathesis are required to evaluate an expression.

Fixes: 5120203d753f ("eal: add macros to align value to multiple")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
---
 lib/librte_eal/common/include/rte_common.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h
index 41e2778ec..fe7539af2 100644
--- a/lib/librte_eal/common/include/rte_common.h
+++ b/lib/librte_eal/common/include/rte_common.h
@@ -245,7 +245,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
  * than the first parameter.
  */
 #define RTE_ALIGN_MUL_CEIL(v, mul) \
-	(((v + (typeof(v))(mul) - 1) / ((typeof(v))(mul))) * (typeof(v))(mul))
+	((((v) + (typeof(v))(mul) - 1) / ((typeof(v))(mul))) * (typeof(v))(mul))
 
 /**
  * Macro to align a value to the multiple of given value. The resultant
@@ -253,7 +253,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
  * than the first parameter.
  */
 #define RTE_ALIGN_MUL_FLOOR(v, mul) \
-	((v / ((typeof(v))(mul))) * (typeof(v))(mul))
+	(((v) / ((typeof(v))(mul))) * (typeof(v))(mul))
 
 /**
  * Macro to align value to the nearest multiple of the given value.
@@ -264,7 +264,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
 	({							\
 		typeof(v) ceil = RTE_ALIGN_MUL_CEIL(v, mul);	\
 		typeof(v) floor = RTE_ALIGN_MUL_FLOOR(v, mul);	\
-		(ceil - v) > (v - floor) ? floor : ceil;	\
+		(ceil - (v)) > ((v) - floor) ? floor : ceil;	\
 	})
 
 /**
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.467756775 +0100
+++ 0128-eal-fix-parentheses-in-alignment-macros.patch	2020-07-24 12:53:48.423008994 +0100
@@ -1,26 +1,27 @@
-From 3596a037ab44a1ad588fb388d5d4ee8f3d2a1ca7 Mon Sep 17 00:00:00 2001
+From f5f37e8889243b92cc325817c7f72849b37f818a Mon Sep 17 00:00:00 2001
 From: Harman Kalra <hkalra@marvell.com>
 Date: Wed, 24 Jun 2020 15:50:47 +0530
 Subject: [PATCH] eal: fix parentheses in alignment macros
 
+[ upstream commit 3596a037ab44a1ad588fb388d5d4ee8f3d2a1ca7 ]
+
 Found an issue while using RTE_ALIGN_MUL_NEAR with an
 expression, like as passed in estimate_tsc_freq().
 RTE_ALIGN_MUL_FLOOR resulted in unexpected value as
 parathesis are required to evaluate an expression.
 
 Fixes: 5120203d753f ("eal: add macros to align value to multiple")
-Cc: stable@dpdk.org
 
 Signed-off-by: Harman Kalra <hkalra@marvell.com>
 ---
- lib/librte_eal/include/rte_common.h | 6 +++---
+ lib/librte_eal/common/include/rte_common.h | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
-diff --git a/lib/librte_eal/include/rte_common.h b/lib/librte_eal/include/rte_common.h
-index 586f815c5..8f487a563 100644
---- a/lib/librte_eal/include/rte_common.h
-+++ b/lib/librte_eal/include/rte_common.h
-@@ -304,7 +304,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
+diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h
+index 41e2778ec..fe7539af2 100644
+--- a/lib/librte_eal/common/include/rte_common.h
++++ b/lib/librte_eal/common/include/rte_common.h
+@@ -245,7 +245,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
   * than the first parameter.
   */
  #define RTE_ALIGN_MUL_CEIL(v, mul) \
@@ -29,7 +30,7 @@
  
  /**
   * Macro to align a value to the multiple of given value. The resultant
-@@ -312,7 +312,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
+@@ -253,7 +253,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
   * than the first parameter.
   */
  #define RTE_ALIGN_MUL_FLOOR(v, mul) \
@@ -38,7 +39,7 @@
  
  /**
   * Macro to align value to the nearest multiple of the given value.
-@@ -323,7 +323,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
+@@ -264,7 +264,7 @@ static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
  	({							\
  		typeof(v) ceil = RTE_ALIGN_MUL_CEIL(v, mul);	\
  		typeof(v) floor = RTE_ALIGN_MUL_FLOOR(v, mul);	\

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

* [dpdk-stable] patch 'vhost: fix virtio ready flag check' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (126 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'eal: fix parentheses in alignment macros' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'bus/fslmc: fix getting FD error' " luca.boccassi
                   ` (63 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 385684bc4e054f7119841a2503a79a393d5b5ea0 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Mon, 6 Jul 2020 13:24:45 +0200
Subject: [PATCH] vhost: fix virtio ready flag check

[ upstream commit 1c3df72bda9893784267d02d2c6a3fd0047c38cd ]

Before checking whether the device is ready is done
a check on whether the RUNNING flag is set. Then the
READY flag is set if virtio_is_ready() returns true.

While it seems to not cause any issue, it makes more
sense to check whether the READY flag is set and not
the RUNNING one.

Fixes: c0674b1bc898 ("vhost: move the device ready check at proper place")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 lib/librte_vhost/vhost_user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 31080be2b..82270c514 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -2792,7 +2792,7 @@ skip_to_post_handle:
 		return -1;
 	}
 
-	if (!(dev->flags & VIRTIO_DEV_RUNNING) && virtio_is_ready(dev)) {
+	if (!(dev->flags & VIRTIO_DEV_READY) && virtio_is_ready(dev)) {
 		dev->flags |= VIRTIO_DEV_READY;
 
 		if (!(dev->flags & VIRTIO_DEV_RUNNING)) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.502580306 +0100
+++ 0129-vhost-fix-virtio-ready-flag-check.patch	2020-07-24 12:53:48.423008994 +0100
@@ -1,8 +1,10 @@
-From 1c3df72bda9893784267d02d2c6a3fd0047c38cd Mon Sep 17 00:00:00 2001
+From 385684bc4e054f7119841a2503a79a393d5b5ea0 Mon Sep 17 00:00:00 2001
 From: Maxime Coquelin <maxime.coquelin@redhat.com>
 Date: Mon, 6 Jul 2020 13:24:45 +0200
 Subject: [PATCH] vhost: fix virtio ready flag check
 
+[ upstream commit 1c3df72bda9893784267d02d2c6a3fd0047c38cd ]
+
 Before checking whether the device is ready is done
 a check on whether the RUNNING flag is set. Then the
 READY flag is set if virtio_is_ready() returns true.
@@ -12,7 +14,6 @@
 the RUNNING one.
 
 Fixes: c0674b1bc898 ("vhost: move the device ready check at proper place")
-Cc: stable@dpdk.org
 
 Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
 Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
@@ -21,13 +22,13 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
-index aa8605523..bac3e8971 100644
+index 31080be2b..82270c514 100644
 --- a/lib/librte_vhost/vhost_user.c
 +++ b/lib/librte_vhost/vhost_user.c
-@@ -2842,7 +2842,7 @@ skip_to_post_handle:
+@@ -2792,7 +2792,7 @@ skip_to_post_handle:
+ 		return -1;
  	}
  
- 
 -	if (!(dev->flags & VIRTIO_DEV_RUNNING) && virtio_is_ready(dev)) {
 +	if (!(dev->flags & VIRTIO_DEV_READY) && virtio_is_ready(dev)) {
  		dev->flags |= VIRTIO_DEV_READY;

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

* [dpdk-stable] patch 'bus/fslmc: fix getting FD error' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (127 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'vhost: fix virtio ready flag check' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/dpaa: fix FD offset data type' " luca.boccassi
                   ` (62 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Nipun Gupta; +Cc: Akhil Goyal, Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 2f92210432eb5bf7613ffafbb32679aaafd291c1 Mon Sep 17 00:00:00 2001
From: Nipun Gupta <nipun.gupta@nxp.com>
Date: Tue, 7 Jul 2020 14:52:16 +0530
Subject: [PATCH] bus/fslmc: fix getting FD error

[ upstream commit 3827197dabf9ddd8ffb918aa15f64f8e9aa9502b ]

Fix the incorrect register for getting error

Fixes: 03e36408b9fb ("bus/fslmc: add macros required by QDMA for FLE and FD")

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
index ab2b213f8..00ef4ee53 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
@@ -289,7 +289,7 @@ enum qbman_fd_format {
 #define DPAA2_GET_FD_FRC(fd)   ((fd)->simple.frc)
 #define DPAA2_GET_FD_FLC(fd) \
 	(((uint64_t)((fd)->simple.flc_hi) << 32) + (fd)->simple.flc_lo)
-#define DPAA2_GET_FD_ERR(fd)   ((fd)->simple.bpid_offset & 0x000000FF)
+#define DPAA2_GET_FD_ERR(fd)   ((fd)->simple.ctrl & 0x000000FF)
 #define DPAA2_GET_FLE_OFFSET(fle) (((fle)->fin_bpid_offset & 0x0FFF0000) >> 16)
 #define DPAA2_SET_FLE_SG_EXT(fle) ((fle)->fin_bpid_offset |= (uint64_t)1 << 29)
 #define DPAA2_IS_SET_FLE_SG_EXT(fle)	\
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.540143424 +0100
+++ 0130-bus-fslmc-fix-getting-FD-error.patch	2020-07-24 12:53:48.427009068 +0100
@@ -1,12 +1,13 @@
-From 3827197dabf9ddd8ffb918aa15f64f8e9aa9502b Mon Sep 17 00:00:00 2001
+From 2f92210432eb5bf7613ffafbb32679aaafd291c1 Mon Sep 17 00:00:00 2001
 From: Nipun Gupta <nipun.gupta@nxp.com>
 Date: Tue, 7 Jul 2020 14:52:16 +0530
 Subject: [PATCH] bus/fslmc: fix getting FD error
 
+[ upstream commit 3827197dabf9ddd8ffb918aa15f64f8e9aa9502b ]
+
 Fix the incorrect register for getting error
 
 Fixes: 03e36408b9fb ("bus/fslmc: add macros required by QDMA for FLE and FD")
-Cc: stable@dpdk.org
 
 Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
 Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
@@ -16,10 +17,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
-index 4682a5299..f1c70251a 100644
+index ab2b213f8..00ef4ee53 100644
 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
 +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
-@@ -286,7 +286,7 @@ enum qbman_fd_format {
+@@ -289,7 +289,7 @@ enum qbman_fd_format {
  #define DPAA2_GET_FD_FRC(fd)   ((fd)->simple.frc)
  #define DPAA2_GET_FD_FLC(fd) \
  	(((uint64_t)((fd)->simple.flc_hi) << 32) + (fd)->simple.flc_lo)

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

* [dpdk-stable] patch 'net/dpaa: fix FD offset data type' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (128 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'bus/fslmc: fix getting FD error' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/bonding: fix socket ID check' " luca.boccassi
                   ` (61 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Nipun Gupta; +Cc: Akhil Goyal, Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From e240d2dd4f5f0038de94af18424bc4cce2eb1d3d Mon Sep 17 00:00:00 2001
From: Nipun Gupta <nipun.gupta@nxp.com>
Date: Tue, 7 Jul 2020 14:52:17 +0530
Subject: [PATCH] net/dpaa: fix FD offset data type

[ upstream commit 287f4256f9af9291abd1e1f129144cd47eb2d206 ]

On DPAA fd offset is 9 bits, but we are using uint8_t in the
SG case. This patch fixes the same.

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

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index 5dba1db8b..3aeecb7d2 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -305,7 +305,7 @@ dpaa_eth_sg_to_mbuf(const struct qm_fd *fd, uint32_t ifid)
 	struct qm_sg_entry *sgt, *sg_temp;
 	void *vaddr, *sg_vaddr;
 	int i = 0;
-	uint8_t fd_offset = fd->offset;
+	uint16_t fd_offset = fd->offset;
 
 	vaddr = DPAA_MEMPOOL_PTOV(bp_info, qm_fd_addr(fd));
 	if (!vaddr) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.578827580 +0100
+++ 0131-net-dpaa-fix-FD-offset-data-type.patch	2020-07-24 12:53:48.427009068 +0100
@@ -1,13 +1,14 @@
-From 287f4256f9af9291abd1e1f129144cd47eb2d206 Mon Sep 17 00:00:00 2001
+From e240d2dd4f5f0038de94af18424bc4cce2eb1d3d Mon Sep 17 00:00:00 2001
 From: Nipun Gupta <nipun.gupta@nxp.com>
 Date: Tue, 7 Jul 2020 14:52:17 +0530
 Subject: [PATCH] net/dpaa: fix FD offset data type
 
+[ upstream commit 287f4256f9af9291abd1e1f129144cd47eb2d206 ]
+
 On DPAA fd offset is 9 bits, but we are using uint8_t in the
 SG case. This patch fixes the same.
 
 Fixes: 8cffdcbe85aa ("net/dpaa: support scattered Rx")
-Cc: stable@dpdk.org
 
 Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
 Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

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

* [dpdk-stable] patch 'net/bonding: fix socket ID check' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (129 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/dpaa: fix FD offset data type' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/netvsc: fix underflow when Rx external mbuf' " luca.boccassi
                   ` (60 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: David Marchand; +Cc: Chas Williams, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 3e1f03cded0a2dc9a7fc14148c8295a08a822d2b Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 16 Jun 2020 11:46:37 +0200
Subject: [PATCH] net/bonding: fix socket ID check

[ upstream commit 46dac7d1115c66762aa78e308d5f1c401ee5e3a0 ]

Caught by code review, rte_eth_dev_socket_id() returns -1 on error.
The code should behave the same, but still, do not use LCORE_ID_ANY for
something that is not a lcore id.

Fixes: c15c5897340d ("net/bonding: avoid allocating mempool on unknown socket")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Chas Williams <chas3@att.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index b77a37ddb..b7ffa2f2c 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -1043,7 +1043,7 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev,
 	RTE_ASSERT(port->tx_ring == NULL);
 
 	socket_id = rte_eth_dev_socket_id(slave_id);
-	if (socket_id == (int)LCORE_ID_ANY)
+	if (socket_id == -1)
 		socket_id = rte_socket_id();
 
 	element_size = sizeof(struct slow_protocol_frame) +
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.612919377 +0100
+++ 0132-net-bonding-fix-socket-ID-check.patch	2020-07-24 12:53:48.427009068 +0100
@@ -1,14 +1,15 @@
-From 46dac7d1115c66762aa78e308d5f1c401ee5e3a0 Mon Sep 17 00:00:00 2001
+From 3e1f03cded0a2dc9a7fc14148c8295a08a822d2b Mon Sep 17 00:00:00 2001
 From: David Marchand <david.marchand@redhat.com>
 Date: Tue, 16 Jun 2020 11:46:37 +0200
 Subject: [PATCH] net/bonding: fix socket ID check
 
+[ upstream commit 46dac7d1115c66762aa78e308d5f1c401ee5e3a0 ]
+
 Caught by code review, rte_eth_dev_socket_id() returns -1 on error.
 The code should behave the same, but still, do not use LCORE_ID_ANY for
 something that is not a lcore id.
 
 Fixes: c15c5897340d ("net/bonding: avoid allocating mempool on unknown socket")
-Cc: stable@dpdk.org
 
 Signed-off-by: David Marchand <david.marchand@redhat.com>
 Acked-by: Chas Williams <chas3@att.com>

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

* [dpdk-stable] patch 'net/netvsc: fix underflow when Rx external mbuf' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (130 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/bonding: fix socket ID check' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/ixgbe/base: fix host interface shadow RAM read' " luca.boccassi
                   ` (59 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Long Li; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 1411ee42815cc1652c93172a1aec0d2adef3eb51 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Tue, 23 Jun 2020 18:11:45 -0700
Subject: [PATCH] net/netvsc: fix underflow when Rx external mbuf

[ upstream commit d43b8c710836db953fad1bb6449a827e19b5a87a ]

When rte_pktmbuf_attach_extbuf() is used, the driver should not decrease
the reference count in its callback function hn_rx_buf_free_cb, because
the reference count is already decreased by rte_pktmbuf. Doing it twice
may result in underflow and driver may never send an ack packet over
vmbus to host.

Also declares rxbuf_outstanding as atomic, because this value is shared
among all receive queues.

Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")

Signed-off-by: Long Li <longli@microsoft.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/netvsc/hn_nvs.c  |  1 -
 drivers/net/netvsc/hn_rxtx.c | 32 ++++++++++++--------------------
 drivers/net/netvsc/hn_var.h  |  2 +-
 3 files changed, 13 insertions(+), 22 deletions(-)

diff --git a/drivers/net/netvsc/hn_nvs.c b/drivers/net/netvsc/hn_nvs.c
index 477202b2a..f88854daf 100644
--- a/drivers/net/netvsc/hn_nvs.c
+++ b/drivers/net/netvsc/hn_nvs.c
@@ -99,7 +99,6 @@ __hn_nvs_execute(struct hn_data *hv,
 	/* Silently drop received packets while waiting for response */
 	if (hdr->type == NVS_TYPE_RNDIS) {
 		hn_nvs_ack_rxbuf(chan, xactid);
-		--hv->rxbuf_outstanding;
 		goto retry;
 	}
 
diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 19f00a052..53681721d 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -488,24 +488,13 @@ next:
 	return 0;
 }
 
-/*
- * Ack the consumed RXBUF associated w/ this channel packet,
- * so that this RXBUF can be recycled by the hypervisor.
- */
-static void hn_rx_buf_release(struct hn_rx_bufinfo *rxb)
-{
-	struct rte_mbuf_ext_shared_info *shinfo = &rxb->shinfo;
-	struct hn_data *hv = rxb->hv;
-
-	if (rte_mbuf_ext_refcnt_update(shinfo, -1) == 0) {
-		hn_nvs_ack_rxbuf(rxb->chan, rxb->xactid);
-		--hv->rxbuf_outstanding;
-	}
-}
-
 static void hn_rx_buf_free_cb(void *buf __rte_unused, void *opaque)
 {
-	hn_rx_buf_release(opaque);
+	struct hn_rx_bufinfo *rxb = opaque;
+	struct hn_data *hv = rxb->hv;
+
+	rte_atomic32_dec(&hv->rxbuf_outstanding);
+	hn_nvs_ack_rxbuf(rxb->chan, rxb->xactid);
 }
 
 static struct hn_rx_bufinfo *hn_rx_buf_init(const struct hn_rx_queue *rxq,
@@ -545,7 +534,8 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
 	 * some space available in receive area for later packets.
 	 */
 	if (dlen >= HN_RXCOPY_THRESHOLD &&
-	    hv->rxbuf_outstanding < hv->rxbuf_section_cnt / 2) {
+	    (uint32_t)rte_atomic32_read(&hv->rxbuf_outstanding) <
+			hv->rxbuf_section_cnt / 2) {
 		struct rte_mbuf_ext_shared_info *shinfo;
 		const void *rxbuf;
 		rte_iova_t iova;
@@ -559,8 +549,9 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
 		iova = rte_mem_virt2iova(rxbuf) + RTE_PTR_DIFF(data, rxbuf);
 		shinfo = &rxb->shinfo;
 
-		if (rte_mbuf_ext_refcnt_update(shinfo, 1) == 1)
-			++hv->rxbuf_outstanding;
+		/* shinfo is already set to 1 by the caller */
+		if (rte_mbuf_ext_refcnt_update(shinfo, 1) == 2)
+			rte_atomic32_inc(&hv->rxbuf_outstanding);
 
 		rte_pktmbuf_attach_extbuf(m, data, iova,
 					  dlen + headroom, shinfo);
@@ -800,7 +791,8 @@ hn_nvs_handle_rxbuf(struct rte_eth_dev *dev,
 	}
 
 	/* Send ACK now if external mbuf not used */
-	hn_rx_buf_release(rxb);
+	if (rte_mbuf_ext_refcnt_update(&rxb->shinfo, -1) == 0)
+		hn_nvs_ack_rxbuf(rxb->chan, rxb->xactid);
 }
 
 /*
diff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h
index 4c1e6b8c3..b8e351dee 100644
--- a/drivers/net/netvsc/hn_var.h
+++ b/drivers/net/netvsc/hn_var.h
@@ -112,7 +112,7 @@ struct hn_data {
 	struct rte_mem_resource *rxbuf_res;	/* UIO resource for Rx */
 	struct hn_rx_bufinfo *rxbuf_info;
 	uint32_t	rxbuf_section_cnt;	/* # of Rx sections */
-	volatile uint32_t rxbuf_outstanding;
+	rte_atomic32_t	rxbuf_outstanding;
 	uint16_t	max_queues;		/* Max available queues */
 	uint16_t	num_queues;
 	uint64_t	rss_offloads;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.653156710 +0100
+++ 0133-net-netvsc-fix-underflow-when-Rx-external-mbuf.patch	2020-07-24 12:53:48.427009068 +0100
@@ -1,8 +1,10 @@
-From d43b8c710836db953fad1bb6449a827e19b5a87a Mon Sep 17 00:00:00 2001
+From 1411ee42815cc1652c93172a1aec0d2adef3eb51 Mon Sep 17 00:00:00 2001
 From: Long Li <longli@microsoft.com>
 Date: Tue, 23 Jun 2020 18:11:45 -0700
 Subject: [PATCH] net/netvsc: fix underflow when Rx external mbuf
 
+[ upstream commit d43b8c710836db953fad1bb6449a827e19b5a87a ]
+
 When rte_pktmbuf_attach_extbuf() is used, the driver should not decrease
 the reference count in its callback function hn_rx_buf_free_cb, because
 the reference count is already decreased by rte_pktmbuf. Doing it twice
@@ -13,7 +15,6 @@
 among all receive queues.
 
 Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
-Cc: stable@dpdk.org
 
 Signed-off-by: Long Li <longli@microsoft.com>
 Acked-by: Stephen Hemminger <stephen@networkplumber.org>
@@ -36,10 +37,10 @@
  	}
  
 diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
-index 6a52885d5..cc4ced37a 100644
+index 19f00a052..53681721d 100644
 --- a/drivers/net/netvsc/hn_rxtx.c
 +++ b/drivers/net/netvsc/hn_rxtx.c
-@@ -519,24 +519,13 @@ next:
+@@ -488,24 +488,13 @@ next:
  	return 0;
  }
  
@@ -69,7 +70,7 @@
  }
  
  static struct hn_rx_bufinfo *hn_rx_buf_init(const struct hn_rx_queue *rxq,
-@@ -576,7 +565,8 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
+@@ -545,7 +534,8 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
  	 * some space available in receive area for later packets.
  	 */
  	if (dlen >= HN_RXCOPY_THRESHOLD &&
@@ -79,7 +80,7 @@
  		struct rte_mbuf_ext_shared_info *shinfo;
  		const void *rxbuf;
  		rte_iova_t iova;
-@@ -590,8 +580,9 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
+@@ -559,8 +549,9 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
  		iova = rte_mem_virt2iova(rxbuf) + RTE_PTR_DIFF(data, rxbuf);
  		shinfo = &rxb->shinfo;
  
@@ -91,7 +92,7 @@
  
  		rte_pktmbuf_attach_extbuf(m, data, iova,
  					  dlen + headroom, shinfo);
-@@ -832,7 +823,8 @@ hn_nvs_handle_rxbuf(struct rte_eth_dev *dev,
+@@ -800,7 +791,8 @@ hn_nvs_handle_rxbuf(struct rte_eth_dev *dev,
  	}
  
  	/* Send ACK now if external mbuf not used */
@@ -102,10 +103,10 @@
  
  /*
 diff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h
-index 881832d85..7cb7713e9 100644
+index 4c1e6b8c3..b8e351dee 100644
 --- a/drivers/net/netvsc/hn_var.h
 +++ b/drivers/net/netvsc/hn_var.h
-@@ -113,7 +113,7 @@ struct hn_data {
+@@ -112,7 +112,7 @@ struct hn_data {
  	struct rte_mem_resource *rxbuf_res;	/* UIO resource for Rx */
  	struct hn_rx_bufinfo *rxbuf_info;
  	uint32_t	rxbuf_section_cnt;	/* # of Rx sections */

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

* [dpdk-stable] patch 'net/ixgbe/base: fix host interface shadow RAM read' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (131 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/netvsc: fix underflow when Rx external mbuf' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/ixgbe/base: fix x550em 10G NIC link status' " luca.boccassi
                   ` (58 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Guinan Sun; +Cc: Mateusz Kowalski, Wei Zhao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From e15dd6bff3f8c0b6ce51cbe7062db5f00c20ff39 Mon Sep 17 00:00:00 2001
From: Guinan Sun <guinanx.sun@intel.com>
Date: Thu, 9 Jul 2020 08:00:28 +0000
Subject: [PATCH] net/ixgbe/base: fix host interface shadow RAM read

[ upstream commit 713fc4dd340e5eadd3bfa9a468446afaa5188624 ]

Host interface Shadow RAM Read (0x31) command response
buffer length should be stored in two bytes, instead of one byte.
This patch fixes it.

Fixes: e6102361b1d4 ("net/ixgbe/base: use 2 bytes for flash read command")

Signed-off-by: Mateusz Kowalski <mateusz.kowalski@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_common.c |  3 ++-
 drivers/net/ixgbe/base/ixgbe_type.h   | 12 ++++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c
index 4eb98dc19..5889410f9 100644
--- a/drivers/net/ixgbe/base/ixgbe_common.c
+++ b/drivers/net/ixgbe/base/ixgbe_common.c
@@ -4600,7 +4600,8 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
 	 * Read Flash command requires reading buffer length from
 	 * two byes instead of one byte
 	 */
-	if (resp->cmd == 0x30) {
+	if (resp->cmd == IXGBE_HOST_INTERFACE_FLASH_READ_CMD ||
+	    resp->cmd == IXGBE_HOST_INTERFACE_SHADOW_RAM_READ_CMD) {
 		for (; bi < dword_len + 2; bi++) {
 			buffer[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG,
 							  bi);
diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h
index 15e937010..bc927a34e 100644
--- a/drivers/net/ixgbe/base/ixgbe_type.h
+++ b/drivers/net/ixgbe/base/ixgbe_type.h
@@ -4364,4 +4364,16 @@ struct ixgbe_hw {
 #define IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD	\
 				(0x1F << IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD_SHIFT)
 
+/* Code Command (Flash I/F Interface) */
+#define IXGBE_HOST_INTERFACE_FLASH_READ_CMD			0x30
+#define IXGBE_HOST_INTERFACE_SHADOW_RAM_READ_CMD		0x31
+#define IXGBE_HOST_INTERFACE_FLASH_WRITE_CMD			0x32
+#define IXGBE_HOST_INTERFACE_SHADOW_RAM_WRITE_CMD		0x33
+#define IXGBE_HOST_INTERFACE_FLASH_MODULE_UPDATE_CMD		0x34
+#define IXGBE_HOST_INTERFACE_FLASH_BLOCK_EREASE_CMD		0x35
+#define IXGBE_HOST_INTERFACE_SHADOW_RAM_DUMP_CMD		0x36
+#define IXGBE_HOST_INTERFACE_FLASH_INFO_CMD			0x37
+#define IXGBE_HOST_INTERFACE_APPLY_UPDATE_CMD			0x38
+#define IXGBE_HOST_INTERFACE_MASK_CMD				0x000000FF
+
 #endif /* _IXGBE_TYPE_H_ */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.690520459 +0100
+++ 0134-net-ixgbe-base-fix-host-interface-shadow-RAM-read.patch	2020-07-24 12:53:48.435009217 +0100
@@ -1,14 +1,15 @@
-From 713fc4dd340e5eadd3bfa9a468446afaa5188624 Mon Sep 17 00:00:00 2001
+From e15dd6bff3f8c0b6ce51cbe7062db5f00c20ff39 Mon Sep 17 00:00:00 2001
 From: Guinan Sun <guinanx.sun@intel.com>
 Date: Thu, 9 Jul 2020 08:00:28 +0000
 Subject: [PATCH] net/ixgbe/base: fix host interface shadow RAM read
 
+[ upstream commit 713fc4dd340e5eadd3bfa9a468446afaa5188624 ]
+
 Host interface Shadow RAM Read (0x31) command response
 buffer length should be stored in two bytes, instead of one byte.
 This patch fixes it.
 
 Fixes: e6102361b1d4 ("net/ixgbe/base: use 2 bytes for flash read command")
-Cc: stable@dpdk.org
 
 Signed-off-by: Mateusz Kowalski <mateusz.kowalski@intel.com>
 Signed-off-by: Guinan Sun <guinanx.sun@intel.com>

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

* [dpdk-stable] patch 'net/ixgbe/base: fix x550em 10G NIC link status' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (132 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/ixgbe/base: fix host interface shadow RAM read' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/ixgbe/base: fix infinite recursion on PCIe link down' " luca.boccassi
                   ` (57 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Guinan Sun; +Cc: Piotr Skajewski, Wei Zhao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From e60d1157ced8462de2da5a8c38e0228fc0b210cf Mon Sep 17 00:00:00 2001
From: Guinan Sun <guinanx.sun@intel.com>
Date: Thu, 9 Jul 2020 08:00:30 +0000
Subject: [PATCH] net/ixgbe/base: fix x550em 10G NIC link status

[ upstream commit fb03b51da940f1d56d701776fd85a0dfc1ace098 ]

With the NVM image for x550em XFI will not report
the auto-negotiation feature correctly. The auto-negotiation
should be "No" for supports and advertised items.
At the same time update speed makes it support 1G and 10G.

Fixes: 833df43399e7 ("net/ixgbe/base: add SGMII link for X550")

Signed-off-by: Piotr Skajewski <piotrx.skajewski@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_x550.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c
index 3de406fd3..9fa999e01 100644
--- a/drivers/net/ixgbe/base/ixgbe_x550.c
+++ b/drivers/net/ixgbe/base/ixgbe_x550.c
@@ -1891,7 +1891,14 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,
 		else
 			*speed = IXGBE_LINK_SPEED_10GB_FULL;
 	} else {
+		*autoneg = true;
+
 		switch (hw->phy.type) {
+		case ixgbe_phy_x550em_xfi:
+			*speed = IXGBE_LINK_SPEED_1GB_FULL |
+				 IXGBE_LINK_SPEED_10GB_FULL;
+			*autoneg = false;
+			break;
 		case ixgbe_phy_ext_1g_t:
 #ifdef PREBOOT_SUPPORT
 			*speed = IXGBE_LINK_SPEED_1GB_FULL;
@@ -1925,7 +1932,6 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,
 				 IXGBE_LINK_SPEED_1GB_FULL;
 			break;
 		}
-		*autoneg = true;
 	}
 
 	return IXGBE_SUCCESS;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.734845671 +0100
+++ 0135-net-ixgbe-base-fix-x550em-10G-NIC-link-status.patch	2020-07-24 12:53:48.435009217 +0100
@@ -1,15 +1,16 @@
-From fb03b51da940f1d56d701776fd85a0dfc1ace098 Mon Sep 17 00:00:00 2001
+From e60d1157ced8462de2da5a8c38e0228fc0b210cf Mon Sep 17 00:00:00 2001
 From: Guinan Sun <guinanx.sun@intel.com>
 Date: Thu, 9 Jul 2020 08:00:30 +0000
 Subject: [PATCH] net/ixgbe/base: fix x550em 10G NIC link status
 
+[ upstream commit fb03b51da940f1d56d701776fd85a0dfc1ace098 ]
+
 With the NVM image for x550em XFI will not report
 the auto-negotiation feature correctly. The auto-negotiation
 should be "No" for supports and advertised items.
 At the same time update speed makes it support 1G and 10G.
 
 Fixes: 833df43399e7 ("net/ixgbe/base: add SGMII link for X550")
-Cc: stable@dpdk.org
 
 Signed-off-by: Piotr Skajewski <piotrx.skajewski@intel.com>
 Signed-off-by: Guinan Sun <guinanx.sun@intel.com>

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

* [dpdk-stable] patch 'net/ixgbe/base: fix infinite recursion on PCIe link down' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (133 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/ixgbe/base: fix x550em 10G NIC link status' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'doc: fix a typo in mlx5 guide' " luca.boccassi
                   ` (56 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Guinan Sun; +Cc: Robert Konklewski, Wei Zhao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From fc6dfa05e7df26dd246597fc8ab3a0f6c7d88f54 Mon Sep 17 00:00:00 2001
From: Guinan Sun <guinanx.sun@intel.com>
Date: Thu, 9 Jul 2020 08:00:31 +0000
Subject: [PATCH] net/ixgbe/base: fix infinite recursion on PCIe link down

[ upstream commit 2d04b9e856125197ec8e967471426d56ab7efcf0 ]

In some corner cases the functions ixgbe_clear_rar_generic and
ixgbe_clear_vmdq_generic may call one another leading to infinite
recursion.

When ixgbe_clear_vmdq_generic is called with IXGBE_CLEAR_VMDQ_ALL
flag, it's going to clear MPSAR registers, and proceed to call
ixgbe_clear_rar_generic, which in turn will clear the RAR registers,
and recursively call back ixgbe_clear_vmdq_generic. Normally, the
latter would detect that MPSAR registers have already been cleared
and terminate the recursion.

However, when PCIe link is down, and before the driver has had the
opportunity to shut itself down, all register reads return 0xFFFFFFFF,
and all register writes fail silently. In such case, because
ixgbe_clear_vmdq_generic blindly assumes that clearing MPSAR registers
succeeded, it's going to always call ixgbe_clear_rar_generic, which
in turn will always call back ixgbe_clear_vmdq_generic, creating
infinite recursion.

This patch re-reads MPSAR register values after they had been cleared.
In case of PCIe link failure, the values read will be non-zero, which
will terminate the recursion. On the other hand, under normal
circumstances the value read from MPSAR registers is going to be equal
to the value previously written, so this patch is expected not to cause
any regressions.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Robert Konklewski <robertx.konklewski@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c
index 5889410f9..9e7182eb3 100644
--- a/drivers/net/ixgbe/base/ixgbe_common.c
+++ b/drivers/net/ixgbe/base/ixgbe_common.c
@@ -3777,11 +3777,11 @@ s32 ixgbe_clear_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
 	if (vmdq == IXGBE_CLEAR_VMDQ_ALL) {
 		if (mpsar_lo) {
 			IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(rar), 0);
-			mpsar_lo = 0;
+			mpsar_lo = IXGBE_READ_REG(hw, IXGBE_MPSAR_LO(rar));
 		}
 		if (mpsar_hi) {
 			IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(rar), 0);
-			mpsar_hi = 0;
+			mpsar_hi = IXGBE_READ_REG(hw, IXGBE_MPSAR_HI(rar));
 		}
 	} else if (vmdq < 32) {
 		mpsar_lo &= ~(1 << vmdq);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.781962217 +0100
+++ 0136-net-ixgbe-base-fix-infinite-recursion-on-PCIe-link-d.patch	2020-07-24 12:53:48.439009292 +0100
@@ -1,8 +1,10 @@
-From 2d04b9e856125197ec8e967471426d56ab7efcf0 Mon Sep 17 00:00:00 2001
+From fc6dfa05e7df26dd246597fc8ab3a0f6c7d88f54 Mon Sep 17 00:00:00 2001
 From: Guinan Sun <guinanx.sun@intel.com>
 Date: Thu, 9 Jul 2020 08:00:31 +0000
 Subject: [PATCH] net/ixgbe/base: fix infinite recursion on PCIe link down
 
+[ upstream commit 2d04b9e856125197ec8e967471426d56ab7efcf0 ]
+
 In some corner cases the functions ixgbe_clear_rar_generic and
 ixgbe_clear_vmdq_generic may call one another leading to infinite
 recursion.
@@ -30,7 +32,6 @@
 any regressions.
 
 Fixes: af75078fece3 ("first public release")
-Cc: stable@dpdk.org
 
 Signed-off-by: Robert Konklewski <robertx.konklewski@intel.com>
 Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
@@ -40,7 +41,7 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c
-index fec6241f5..2d848a02b 100644
+index 5889410f9..9e7182eb3 100644
 --- a/drivers/net/ixgbe/base/ixgbe_common.c
 +++ b/drivers/net/ixgbe/base/ixgbe_common.c
 @@ -3777,11 +3777,11 @@ s32 ixgbe_clear_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq)

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

* [dpdk-stable] patch 'doc: fix a typo in mlx5 guide' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (134 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/ixgbe/base: fix infinite recursion on PCIe link down' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'ethdev: fix data room size verification in Rx queue setup' " luca.boccassi
                   ` (55 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Ali Alnubani; +Cc: Raslan Darawsheh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 414962de53889825a9c0e992c30cff8de60c9bbd Mon Sep 17 00:00:00 2001
From: Ali Alnubani <alialnu@mellanox.com>
Date: Wed, 8 Jul 2020 12:13:20 +0300
Subject: [PATCH] doc: fix a typo in mlx5 guide

[ upstream commit b7ff093e8c3b181cdbe7e86ed4e9fd3dca2094a1 ]

Fixes: ecb160456aed ("net/mlx5: add device parameter for MPRQ stride size")

Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
Acked-by: Raslan Darawsheh <rasland@mellanox.com>
---
 doc/guides/nics/mlx5.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 75f58e602..5543850be 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -411,7 +411,7 @@ Run-time configuration
   value is not in the range of device capability, the default value will be set
   with a warning message. The default value is 11 which is 2048 bytes per a
   stride, valid only if ``mprq_en`` is set. With ``mprq_log_stride_size`` set
-  it is possible for a pcaket to span across multiple strides. This mode allows
+  it is possible for a packet to span across multiple strides. This mode allows
   support of jumbo frames (9K) with MPRQ. The memcopy of some packets (or part
   of a packet if Rx scatter is configured) may be required in case there is no
   space left for a head room at the end of a stride which incurs some
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.822501514 +0100
+++ 0137-doc-fix-a-typo-in-mlx5-guide.patch	2020-07-24 12:53:48.443009366 +0100
@@ -1,10 +1,11 @@
-From b7ff093e8c3b181cdbe7e86ed4e9fd3dca2094a1 Mon Sep 17 00:00:00 2001
+From 414962de53889825a9c0e992c30cff8de60c9bbd Mon Sep 17 00:00:00 2001
 From: Ali Alnubani <alialnu@mellanox.com>
 Date: Wed, 8 Jul 2020 12:13:20 +0300
 Subject: [PATCH] doc: fix a typo in mlx5 guide
 
+[ upstream commit b7ff093e8c3b181cdbe7e86ed4e9fd3dca2094a1 ]
+
 Fixes: ecb160456aed ("net/mlx5: add device parameter for MPRQ stride size")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
 Acked-by: Raslan Darawsheh <rasland@mellanox.com>
@@ -13,10 +14,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
-index b51aa67a7..4b6d8fb4d 100644
+index 75f58e602..5543850be 100644
 --- a/doc/guides/nics/mlx5.rst
 +++ b/doc/guides/nics/mlx5.rst
-@@ -489,7 +489,7 @@ Driver options
+@@ -411,7 +411,7 @@ Run-time configuration
    value is not in the range of device capability, the default value will be set
    with a warning message. The default value is 11 which is 2048 bytes per a
    stride, valid only if ``mprq_en`` is set. With ``mprq_log_stride_size`` set

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

* [dpdk-stable] patch 'ethdev: fix data room size verification in Rx queue setup' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (135 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'doc: fix a typo in mlx5 guide' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'ethdev: fix VLAN offloads set if no relative capabilities' " luca.boccassi
                   ` (54 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Wei Hu (Xavier)
  Cc: Chengchang Tang, Andrew Rybchenko, Sachin Saxena,
	Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 7819e32c5b5c908d1bd5cabc530291a307a5c9b2 Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Thu, 9 Jul 2020 18:43:13 +0800
Subject: [PATCH] ethdev: fix data room size verification in Rx queue setup

[ upstream commit 36fbaaf30d6ae5b3734c9b31a2dcd33695b09ef2 ]

In the rte_eth_rx_queue_setup API function, the local variable named
mbp_buf_size, which is the data room size of the input parameter mp,
is checked to guarantee that each memory chunk used for net device
in the mbuf is bigger than the min_rx_bufsize. But if mbp_buf_size is
less than RTE_PKTMBUF_HEADROOM, the value of the following  statement
will be a large number since the mbp_buf_size is a unsigned value.
    mbp_buf_size - RTE_PKTMBUF_HEADROOM
As a result, it will cause a segment fault in this situation.

This patch fixes it by modify the check condition to guarantee that the
local variable named mbp_buf_size is bigger than RTE_PKTMBUF_HEADROOM.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Sachin Saxena <sachin.saxena@nxp.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 lib/librte_ethdev/rte_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index d245cfcea..5f1fc4842 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -1814,7 +1814,7 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
 	}
 	mbp_buf_size = rte_pktmbuf_data_room_size(mp);
 
-	if ((mbp_buf_size - RTE_PKTMBUF_HEADROOM) < dev_info.min_rx_bufsize) {
+	if (mbp_buf_size < dev_info.min_rx_bufsize + RTE_PKTMBUF_HEADROOM) {
 		RTE_ETHDEV_LOG(ERR,
 			"%s mbuf_data_room_size %d < %d (RTE_PKTMBUF_HEADROOM=%d + min_rx_bufsize(dev)=%d)\n",
 			mp->name, (int)mbp_buf_size,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.855689391 +0100
+++ 0138-ethdev-fix-data-room-size-verification-in-Rx-queue-s.patch	2020-07-24 12:53:48.447009441 +0100
@@ -1,8 +1,10 @@
-From 36fbaaf30d6ae5b3734c9b31a2dcd33695b09ef2 Mon Sep 17 00:00:00 2001
+From 7819e32c5b5c908d1bd5cabc530291a307a5c9b2 Mon Sep 17 00:00:00 2001
 From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
 Date: Thu, 9 Jul 2020 18:43:13 +0800
 Subject: [PATCH] ethdev: fix data room size verification in Rx queue setup
 
+[ upstream commit 36fbaaf30d6ae5b3734c9b31a2dcd33695b09ef2 ]
+
 In the rte_eth_rx_queue_setup API function, the local variable named
 mbp_buf_size, which is the data room size of the input parameter mp,
 is checked to guarantee that each memory chunk used for net device
@@ -16,7 +18,6 @@
 local variable named mbp_buf_size is bigger than RTE_PKTMBUF_HEADROOM.
 
 Fixes: af75078fece3 ("first public release")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -28,10 +29,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
-index 7022bd7f5..e3b2a0976 100644
+index d245cfcea..5f1fc4842 100644
 --- a/lib/librte_ethdev/rte_ethdev.c
 +++ b/lib/librte_ethdev/rte_ethdev.c
-@@ -1820,7 +1820,7 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
+@@ -1814,7 +1814,7 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,
  	}
  	mbp_buf_size = rte_pktmbuf_data_room_size(mp);
  

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

* [dpdk-stable] patch 'ethdev: fix VLAN offloads set if no relative capabilities' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (136 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'ethdev: fix data room size verification in Rx queue setup' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'app/testpmd: fix CPU cycles per packet stats on Tx modes' " luca.boccassi
                   ` (53 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Wei Hu (Xavier)
  Cc: Chengchang Tang, Andrew Rybchenko, Hyong Youb Kim, Sachin Saxena,
	Xiaoyun Wang, Harman Kalra, Jeff Guo, Viacheslav Ovsiienko,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 909eef9ed9b02c41789d3c41a834836fd708bf0b Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Thu, 9 Jul 2020 18:43:14 +0800
Subject: [PATCH] ethdev: fix VLAN offloads set if no relative capabilities

[ upstream commit 50ce3e7aec8f49b29a566688dff5829a3ffe1d98 ]

Currently, there is a potential problem that calling the API function
rte_eth_dev_set_vlan_offload to start VLAN hardware offloads which the
driver does not support. If the PMD driver does not support certain VLAN
hardware offloads and does not check for it, the hardware setting will
not change, but the VLAN offloads in dev->data->dev_conf.rxmode.offloads
will be turned on.

It is supposed to check the hardware capabilities to decide whether the
relative callback needs to be called just like the behavior in the API
function named rte_eth_dev_configure. And it is also needed to cleanup
duplicated checks which are done in some PMDs. Also, note that it is
behaviour change for some PMDs which simply ignore (with error/warning
log message) unsupported VLAN offloads, but now it will fail.

Fixes: a4996bd89c42 ("ethdev: new Rx/Tx offloads API")
Fixes: 0ebce6129bc6 ("net/dpaa2: support new ethdev offload APIs")
Fixes: f9416bbafd98 ("net/enic: remove VLAN filter handler")
Fixes: 4f7d9e383e5c ("fm10k: update vlan offload features")
Fixes: fdba3bf15c7b ("net/hinic: add VLAN filter and offload")
Fixes: b96fb2f0d22b ("net/i40e: handle QinQ strip")
Fixes: d4a27a3b092a ("nfp: add basic features")
Fixes: 56139e85abec ("net/octeontx: support VLAN filter offload")
Fixes: ba1b3b081edf ("net/octeontx2: support VLAN offloads")
Fixes: d87246a43759 ("net/qede: enable and disable VLAN filtering")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Hyong Youb Kim <hyonkim@cisco.com>
Acked-by: Sachin Saxena <sachin.saxena@nxp.com>
Acked-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Acked-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c     | 12 +++---------
 drivers/net/enic/enic_ethdev.c       | 12 ------------
 drivers/net/fm10k/fm10k_ethdev.c     | 23 ++---------------------
 drivers/net/hinic/hinic_pmd_ethdev.c |  6 ------
 drivers/net/i40e/i40e_ethdev.c       |  5 -----
 drivers/net/nfp/nfp_net.c            |  5 -----
 drivers/net/octeontx2/otx2_vlan.c    |  5 -----
 drivers/net/qede/qede_ethdev.c       |  3 ---
 lib/librte_ethdev/rte_ethdev.c       | 18 ++++++++++++++++++
 9 files changed, 23 insertions(+), 66 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 19196cbb6..d7c9922a5 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -147,7 +147,7 @@ dpaa2_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 {
 	struct dpaa2_dev_priv *priv = dev->data->dev_private;
 	struct fsl_mc_io *dpni = dev->process_private;
-	int ret;
+	int ret = 0;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -155,7 +155,7 @@ dpaa2_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 		/* VLAN Filter not avaialble */
 		if (!priv->max_vlan_filters) {
 			DPAA2_PMD_INFO("VLAN filter not available");
-			goto next_mask;
+			return -ENOTSUP;
 		}
 
 		if (dev->data->dev_conf.rxmode.offloads &
@@ -168,14 +168,8 @@ dpaa2_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 		if (ret < 0)
 			DPAA2_PMD_INFO("Unable to set vlan filter = %d", ret);
 	}
-next_mask:
-	if (mask & ETH_VLAN_EXTEND_MASK) {
-		if (dev->data->dev_conf.rxmode.offloads &
-			DEV_RX_OFFLOAD_VLAN_EXTEND)
-			DPAA2_PMD_INFO("VLAN extend offload not supported");
-	}
 
-	return 0;
+	return ret;
 }
 
 static int
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index a7a178e41..2733ac73a 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -374,18 +374,6 @@ static int enicpmd_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)
 			enic->ig_vlan_strip_en = 0;
 	}
 
-	if ((mask & ETH_VLAN_FILTER_MASK) &&
-	    (offloads & DEV_RX_OFFLOAD_VLAN_FILTER)) {
-		dev_warning(enic,
-			"Configuration of VLAN filter is not supported\n");
-	}
-
-	if ((mask & ETH_VLAN_EXTEND_MASK) &&
-	    (offloads & DEV_RX_OFFLOAD_VLAN_EXTEND)) {
-		dev_warning(enic,
-			"Configuration of extended VLAN is not supported\n");
-	}
-
 	return enic_set_vlan_strip(enic);
 }
 
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 407baa16c..a65865c68 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -1575,28 +1575,9 @@ fm10k_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
 }
 
 static int
-fm10k_vlan_offload_set(struct rte_eth_dev *dev, int mask)
+fm10k_vlan_offload_set(struct rte_eth_dev *dev __rte_unused,
+		       int mask __rte_unused)
 {
-	if (mask & ETH_VLAN_STRIP_MASK) {
-		if (!(dev->data->dev_conf.rxmode.offloads &
-			DEV_RX_OFFLOAD_VLAN_STRIP))
-			PMD_INIT_LOG(ERR, "VLAN stripping is "
-					"always on in fm10k");
-	}
-
-	if (mask & ETH_VLAN_EXTEND_MASK) {
-		if (dev->data->dev_conf.rxmode.offloads &
-			DEV_RX_OFFLOAD_VLAN_EXTEND)
-			PMD_INIT_LOG(ERR, "VLAN QinQ is not "
-					"supported in fm10k");
-	}
-
-	if (mask & ETH_VLAN_FILTER_MASK) {
-		if (!(dev->data->dev_conf.rxmode.offloads &
-			DEV_RX_OFFLOAD_VLAN_FILTER))
-			PMD_INIT_LOG(ERR, "VLAN filter is always on in fm10k");
-	}
-
 	return 0;
 }
 
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index 9aa3cf7aa..a26454c7c 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -1701,12 +1701,6 @@ static int hinic_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 			  nic_dev->proc_dev_name, dev->data->port_id);
 	}
 
-	if (mask & ETH_VLAN_EXTEND_MASK) {
-		PMD_DRV_LOG(ERR, "Don't support vlan qinq, device: %s, port_id: %d",
-			  nic_dev->proc_dev_name, dev->data->port_id);
-		return -ENOTSUP;
-	}
-
 	return 0;
 }
 
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 083e23ccb..225e6920f 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3869,11 +3869,6 @@ i40e_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 	struct i40e_vsi *vsi = pf->main_vsi;
 	struct rte_eth_rxmode *rxmode;
 
-	if (mask & ETH_QINQ_STRIP_MASK) {
-		PMD_DRV_LOG(ERR, "Strip qinq is not supported.");
-		return -ENOTSUP;
-	}
-
 	rxmode = &dev->data->dev_conf.rxmode;
 	if (mask & ETH_VLAN_FILTER_MASK) {
 		if (rxmode->offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index b6ff5ecd7..a670be949 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2353,11 +2353,6 @@ nfp_net_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 	hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	new_ctrl = 0;
 
-	if ((mask & ETH_VLAN_FILTER_OFFLOAD) ||
-	    (mask & ETH_VLAN_EXTEND_OFFLOAD))
-		PMD_DRV_LOG(INFO, "No support for ETH_VLAN_FILTER_OFFLOAD or"
-			" ETH_VLAN_EXTEND_OFFLOAD");
-
 	/* Enable vlan strip if it is not configured yet */
 	if ((mask & ETH_VLAN_STRIP_OFFLOAD) &&
 	    !(hw->ctrl & NFP_NET_CFG_CTRL_RXVLAN))
diff --git a/drivers/net/octeontx2/otx2_vlan.c b/drivers/net/octeontx2/otx2_vlan.c
index 322a565b3..7357b0669 100644
--- a/drivers/net/octeontx2/otx2_vlan.c
+++ b/drivers/net/octeontx2/otx2_vlan.c
@@ -717,11 +717,6 @@ otx2_nix_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)
 
 	rxmode = &eth_dev->data->dev_conf.rxmode;
 
-	if (mask & ETH_VLAN_EXTEND_MASK) {
-		otx2_err("Extend offload not supported");
-		return -ENOTSUP;
-	}
-
 	if (mask & ETH_VLAN_STRIP_MASK) {
 		if (rxmode->offloads & DEV_RX_OFFLOAD_VLAN_STRIP) {
 			offloads |= DEV_RX_OFFLOAD_VLAN_STRIP;
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index abb82d336..102451bbd 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -961,9 +961,6 @@ static int qede_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)
 		}
 	}
 
-	if (mask & ETH_VLAN_EXTEND_MASK)
-		DP_ERR(edev, "Extend VLAN not supported\n");
-
 	qdev->vlan_offload_mask = mask;
 
 	DP_INFO(edev, "VLAN offload mask %d\n", mask);
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 5f1fc4842..984b5caa9 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -3249,12 +3249,14 @@ rte_eth_dev_set_vlan_ether_type(uint16_t port_id,
 int
 rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask)
 {
+	struct rte_eth_dev_info dev_info;
 	struct rte_eth_dev *dev;
 	int ret = 0;
 	int mask = 0;
 	int cur, org = 0;
 	uint64_t orig_offloads;
 	uint64_t dev_offloads;
+	uint64_t new_offloads;
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
 	dev = &rte_eth_devices[port_id];
@@ -3308,6 +3310,22 @@ rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask)
 	if (mask == 0)
 		return ret;
 
+	ret = rte_eth_dev_info_get(port_id, &dev_info);
+	if (ret != 0)
+		return ret;
+
+	/* Rx VLAN offloading must be within its device capabilities */
+	if ((dev_offloads & dev_info.rx_offload_capa) != dev_offloads) {
+		new_offloads = dev_offloads & ~orig_offloads;
+		RTE_ETHDEV_LOG(ERR,
+			"Ethdev port_id=%u requested new added VLAN offloads "
+			"0x%" PRIx64 " must be within Rx offloads capabilities "
+			"0x%" PRIx64 " in %s()\n",
+			port_id, new_offloads, dev_info.rx_offload_capa,
+			__func__);
+		return -EINVAL;
+	}
+
 	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->vlan_offload_set, -ENOTSUP);
 	dev->data->dev_conf.rxmode.offloads = dev_offloads;
 	ret = (*dev->dev_ops->vlan_offload_set)(dev, mask);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.900206441 +0100
+++ 0139-ethdev-fix-VLAN-offloads-set-if-no-relative-capabili.patch	2020-07-24 12:53:48.471009888 +0100
@@ -1,8 +1,10 @@
-From 50ce3e7aec8f49b29a566688dff5829a3ffe1d98 Mon Sep 17 00:00:00 2001
+From 909eef9ed9b02c41789d3c41a834836fd708bf0b Mon Sep 17 00:00:00 2001
 From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
 Date: Thu, 9 Jul 2020 18:43:14 +0800
 Subject: [PATCH] ethdev: fix VLAN offloads set if no relative capabilities
 
+[ upstream commit 50ce3e7aec8f49b29a566688dff5829a3ffe1d98 ]
+
 Currently, there is a potential problem that calling the API function
 rte_eth_dev_set_vlan_offload to start VLAN hardware offloads which the
 driver does not support. If the PMD driver does not support certain VLAN
@@ -27,7 +29,6 @@
 Fixes: 56139e85abec ("net/octeontx: support VLAN filter offload")
 Fixes: ba1b3b081edf ("net/octeontx2: support VLAN offloads")
 Fixes: d87246a43759 ("net/qede: enable and disable VLAN filtering")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -39,23 +40,22 @@
 Acked-by: Jeff Guo <jia.guo@intel.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
 ---
- drivers/net/dpaa2/dpaa2_ethdev.c           | 12 +++--------
- drivers/net/enic/enic_ethdev.c             | 12 -----------
- drivers/net/fm10k/fm10k_ethdev.c           | 23 ++--------------------
- drivers/net/hinic/hinic_pmd_ethdev.c       |  6 ------
- drivers/net/i40e/i40e_ethdev.c             |  5 -----
- drivers/net/nfp/nfp_net.c                  |  5 -----
- drivers/net/octeontx/octeontx_ethdev_ops.c | 10 ----------
- drivers/net/octeontx2/otx2_vlan.c          |  5 -----
- drivers/net/qede/qede_ethdev.c             |  3 ---
- lib/librte_ethdev/rte_ethdev.c             | 18 +++++++++++++++++
- 10 files changed, 23 insertions(+), 76 deletions(-)
+ drivers/net/dpaa2/dpaa2_ethdev.c     | 12 +++---------
+ drivers/net/enic/enic_ethdev.c       | 12 ------------
+ drivers/net/fm10k/fm10k_ethdev.c     | 23 ++---------------------
+ drivers/net/hinic/hinic_pmd_ethdev.c |  6 ------
+ drivers/net/i40e/i40e_ethdev.c       |  5 -----
+ drivers/net/nfp/nfp_net.c            |  5 -----
+ drivers/net/octeontx2/otx2_vlan.c    |  5 -----
+ drivers/net/qede/qede_ethdev.c       |  3 ---
+ lib/librte_ethdev/rte_ethdev.c       | 18 ++++++++++++++++++
+ 9 files changed, 23 insertions(+), 66 deletions(-)
 
 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
-index 020af4b03..e0833b734 100644
+index 19196cbb6..d7c9922a5 100644
 --- a/drivers/net/dpaa2/dpaa2_ethdev.c
 +++ b/drivers/net/dpaa2/dpaa2_ethdev.c
-@@ -145,7 +145,7 @@ dpaa2_vlan_offload_set(struct rte_eth_dev *dev, int mask)
+@@ -147,7 +147,7 @@ dpaa2_vlan_offload_set(struct rte_eth_dev *dev, int mask)
  {
  	struct dpaa2_dev_priv *priv = dev->data->dev_private;
  	struct fsl_mc_io *dpni = dev->process_private;
@@ -64,7 +64,7 @@
  
  	PMD_INIT_FUNC_TRACE();
  
-@@ -153,7 +153,7 @@ dpaa2_vlan_offload_set(struct rte_eth_dev *dev, int mask)
+@@ -155,7 +155,7 @@ dpaa2_vlan_offload_set(struct rte_eth_dev *dev, int mask)
  		/* VLAN Filter not avaialble */
  		if (!priv->max_vlan_filters) {
  			DPAA2_PMD_INFO("VLAN filter not available");
@@ -73,7 +73,7 @@
  		}
  
  		if (dev->data->dev_conf.rxmode.offloads &
-@@ -166,14 +166,8 @@ dpaa2_vlan_offload_set(struct rte_eth_dev *dev, int mask)
+@@ -168,14 +168,8 @@ dpaa2_vlan_offload_set(struct rte_eth_dev *dev, int mask)
  		if (ret < 0)
  			DPAA2_PMD_INFO("Unable to set vlan filter = %d", ret);
  	}
@@ -90,10 +90,10 @@
  
  static int
 diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
-index 6a3580fef..30a599daf 100644
+index a7a178e41..2733ac73a 100644
 --- a/drivers/net/enic/enic_ethdev.c
 +++ b/drivers/net/enic/enic_ethdev.c
-@@ -367,18 +367,6 @@ static int enicpmd_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)
+@@ -374,18 +374,6 @@ static int enicpmd_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)
  			enic->ig_vlan_strip_en = 0;
  	}
  
@@ -113,10 +113,10 @@
  }
  
 diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
-index cb0dd3bae..b574693bc 100644
+index 407baa16c..a65865c68 100644
 --- a/drivers/net/fm10k/fm10k_ethdev.c
 +++ b/drivers/net/fm10k/fm10k_ethdev.c
-@@ -1562,28 +1562,9 @@ fm10k_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
+@@ -1575,28 +1575,9 @@ fm10k_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
  }
  
  static int
@@ -148,10 +148,10 @@
  }
  
 diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
-index 0d3d62bd0..67e6afcf7 100644
+index 9aa3cf7aa..a26454c7c 100644
 --- a/drivers/net/hinic/hinic_pmd_ethdev.c
 +++ b/drivers/net/hinic/hinic_pmd_ethdev.c
-@@ -1709,12 +1709,6 @@ static int hinic_vlan_offload_set(struct rte_eth_dev *dev, int mask)
+@@ -1701,12 +1701,6 @@ static int hinic_vlan_offload_set(struct rte_eth_dev *dev, int mask)
  			  nic_dev->proc_dev_name, dev->data->port_id);
  	}
  
@@ -165,10 +165,10 @@
  }
  
 diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
-index 3bc312c11..393b5320f 100644
+index 083e23ccb..225e6920f 100644
 --- a/drivers/net/i40e/i40e_ethdev.c
 +++ b/drivers/net/i40e/i40e_ethdev.c
-@@ -3865,11 +3865,6 @@ i40e_vlan_offload_set(struct rte_eth_dev *dev, int mask)
+@@ -3869,11 +3869,6 @@ i40e_vlan_offload_set(struct rte_eth_dev *dev, int mask)
  	struct i40e_vsi *vsi = pf->main_vsi;
  	struct rte_eth_rxmode *rxmode;
  
@@ -181,7 +181,7 @@
  	if (mask & ETH_VLAN_FILTER_MASK) {
  		if (rxmode->offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
 diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
-index 88e3f01d6..474719b79 100644
+index b6ff5ecd7..a670be949 100644
 --- a/drivers/net/nfp/nfp_net.c
 +++ b/drivers/net/nfp/nfp_net.c
 @@ -2353,11 +2353,6 @@ nfp_net_vlan_offload_set(struct rte_eth_dev *dev, int mask)
@@ -196,27 +196,6 @@
  	/* Enable vlan strip if it is not configured yet */
  	if ((mask & ETH_VLAN_STRIP_OFFLOAD) &&
  	    !(hw->ctrl & NFP_NET_CFG_CTRL_RXVLAN))
-diff --git a/drivers/net/octeontx/octeontx_ethdev_ops.c b/drivers/net/octeontx/octeontx_ethdev_ops.c
-index ff627a68e..dbe13ce38 100644
---- a/drivers/net/octeontx/octeontx_ethdev_ops.c
-+++ b/drivers/net/octeontx/octeontx_ethdev_ops.c
-@@ -43,16 +43,6 @@ octeontx_dev_vlan_offload_set(struct rte_eth_dev *dev, int mask)
- 
- 	rxmode = &dev->data->dev_conf.rxmode;
- 
--	if (mask & ETH_VLAN_EXTEND_MASK) {
--		octeontx_log_err("Extend offload not supported");
--		return -ENOTSUP;
--	}
--
--	if (mask & ETH_VLAN_STRIP_MASK) {
--		octeontx_log_err("VLAN strip offload not supported");
--		return -ENOTSUP;
--	}
--
- 	if (mask & ETH_VLAN_FILTER_MASK) {
- 		if (rxmode->offloads & DEV_RX_OFFLOAD_VLAN_FILTER) {
- 			rc = octeontx_vlan_hw_filter(nic, true);
 diff --git a/drivers/net/octeontx2/otx2_vlan.c b/drivers/net/octeontx2/otx2_vlan.c
 index 322a565b3..7357b0669 100644
 --- a/drivers/net/octeontx2/otx2_vlan.c
@@ -234,10 +213,10 @@
  		if (rxmode->offloads & DEV_RX_OFFLOAD_VLAN_STRIP) {
  			offloads |= DEV_RX_OFFLOAD_VLAN_STRIP;
 diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
-index e5a2581dd..70d48e48e 100644
+index abb82d336..102451bbd 100644
 --- a/drivers/net/qede/qede_ethdev.c
 +++ b/drivers/net/qede/qede_ethdev.c
-@@ -1030,9 +1030,6 @@ static int qede_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)
+@@ -961,9 +961,6 @@ static int qede_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask)
  		}
  	}
  
@@ -248,10 +227,10 @@
  
  	DP_INFO(edev, "VLAN offload mask %d\n", mask);
 diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
-index e3b2a0976..5ff52046d 100644
+index 5f1fc4842..984b5caa9 100644
 --- a/lib/librte_ethdev/rte_ethdev.c
 +++ b/lib/librte_ethdev/rte_ethdev.c
-@@ -3258,12 +3258,14 @@ rte_eth_dev_set_vlan_ether_type(uint16_t port_id,
+@@ -3249,12 +3249,14 @@ rte_eth_dev_set_vlan_ether_type(uint16_t port_id,
  int
  rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask)
  {
@@ -266,7 +245,7 @@
  
  	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
  	dev = &rte_eth_devices[port_id];
-@@ -3317,6 +3319,22 @@ rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask)
+@@ -3308,6 +3310,22 @@ rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask)
  	if (mask == 0)
  		return ret;
  

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

* [dpdk-stable] patch 'app/testpmd: fix CPU cycles per packet stats on Tx modes' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (137 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'ethdev: fix VLAN offloads set if no relative capabilities' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/nfp: fix RSS hash configuration reporting' " luca.boccassi
                   ` (52 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Phil Yang; +Cc: Ruifeng Wang, Honnappa Nagarahalli, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From ffe4a7b9ac0cb5fabe3e2a178c73e813eba04a5e Mon Sep 17 00:00:00 2001
From: Phil Yang <phil.yang@arm.com>
Date: Mon, 22 Jun 2020 17:04:42 +0800
Subject: [PATCH] app/testpmd: fix CPU cycles per packet stats on Tx modes

[ upstream commit 3a164e002af00a6c1f2f06f4d86a6d383d1d08f7 ]

In txonly and flowgen forwarding mode, calculating CPU per packets with
total received packets is not accurate. Use total transmitted packets
for these cases.

The error output under txonly mode:
testpmd> show fwd stats all

---------------------- Forward statistics for port 0  -------------------
RX-packets: 0              RX-dropped: 0             RX-total: 0
TX-packets: 3582891927     TX-dropped: 401965824     TX-total: 3984857751
TX-bursts : 86381636 [0% of 0 pkts + 85% of 64 pkts + 15% of 32 pkts]
-------------------------------------------------------------------------

---------------------- Forward statistics for port 1  -------------------
RX-packets: 1              RX-dropped: 394351696     RX-total: 394351697
TX-packets: 3582890632     TX-dropped: 401965568     TX-total: 3984856200
TX-bursts : 86381679 [0% of 0 pkts + 85% of 64 pkts + 15% of 32 pkts]
-------------------------------------------------------------------------

+++++++++++++++ Accumulated forward statistics for all ports+++++++++++++
RX-packets: 1              RX-dropped: 394351696     RX-total: 394351697
TX-packets: 7165782559     TX-dropped: 803931392     TX-total: 7969713951
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

CPU cycles/packet=54984156291.00 \
(total cycles=54984156291 / total RX packets=1) at 200 MHz Clock

Fixes: 53324971a14e ("app/testpmd: display/clear forwarding stats on demand")

Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/testpmd.c | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 8ab6cfc6c..0ef7ecfe8 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1698,11 +1698,22 @@ fwd_stats_display(void)
 	       "%s\n",
 	       acc_stats_border, acc_stats_border);
 #ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES
-	if (total_recv > 0)
-		printf("\n  CPU cycles/packet=%u (total cycles="
-		       "%"PRIu64" / total RX packets=%"PRIu64")\n",
-		       (unsigned int)(fwd_cycles / total_recv),
-		       fwd_cycles, total_recv);
+#define CYC_PER_MHZ 1E6
+	if (total_recv > 0 || total_xmit > 0) {
+		uint64_t total_pkts = 0;
+		if (strcmp(cur_fwd_eng->fwd_mode_name, "txonly") == 0 ||
+		    strcmp(cur_fwd_eng->fwd_mode_name, "flowgen") == 0)
+			total_pkts = total_xmit;
+		else
+			total_pkts = total_recv;
+
+		printf("\n  CPU cycles/packet=%.2F (total cycles="
+		       "%"PRIu64" / total %s packets=%"PRIu64") at %"PRIu64
+		       " MHz Clock\n",
+		       (double) fwd_cycles / total_pkts,
+		       fwd_cycles, cur_fwd_eng->fwd_mode_name, total_pkts,
+		       (uint64_t)(rte_get_tsc_hz() / CYC_PER_MHZ));
+	}
 #endif
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.957828946 +0100
+++ 0140-app-testpmd-fix-CPU-cycles-per-packet-stats-on-Tx-mo.patch	2020-07-24 12:53:48.475009962 +0100
@@ -1,8 +1,10 @@
-From 3a164e002af00a6c1f2f06f4d86a6d383d1d08f7 Mon Sep 17 00:00:00 2001
+From ffe4a7b9ac0cb5fabe3e2a178c73e813eba04a5e Mon Sep 17 00:00:00 2001
 From: Phil Yang <phil.yang@arm.com>
 Date: Mon, 22 Jun 2020 17:04:42 +0800
 Subject: [PATCH] app/testpmd: fix CPU cycles per packet stats on Tx modes
 
+[ upstream commit 3a164e002af00a6c1f2f06f4d86a6d383d1d08f7 ]
+
 In txonly and flowgen forwarding mode, calculating CPU per packets with
 total received packets is not accurate. Use total transmitted packets
 for these cases.
@@ -31,25 +33,29 @@
 (total cycles=54984156291 / total RX packets=1) at 200 MHz Clock
 
 Fixes: 53324971a14e ("app/testpmd: display/clear forwarding stats on demand")
-Cc: stable@dpdk.org
 
 Signed-off-by: Phil Yang <phil.yang@arm.com>
 Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
 Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
 ---
- app/test-pmd/testpmd.c | 16 ++++++++++++----
- 1 file changed, 12 insertions(+), 4 deletions(-)
+ app/test-pmd/testpmd.c | 21 ++++++++++++++++-----
+ 1 file changed, 16 insertions(+), 5 deletions(-)
 
 diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
-index e7516673b..92e00cf7a 100644
+index 8ab6cfc6c..0ef7ecfe8 100644
 --- a/app/test-pmd/testpmd.c
 +++ b/app/test-pmd/testpmd.c
-@@ -1956,13 +1956,21 @@ fwd_stats_display(void)
+@@ -1698,11 +1698,22 @@ fwd_stats_display(void)
+ 	       "%s\n",
  	       acc_stats_border, acc_stats_border);
  #ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES
- #define CYC_PER_MHZ 1E6
 -	if (total_recv > 0)
+-		printf("\n  CPU cycles/packet=%u (total cycles="
+-		       "%"PRIu64" / total RX packets=%"PRIu64")\n",
+-		       (unsigned int)(fwd_cycles / total_recv),
+-		       fwd_cycles, total_recv);
++#define CYC_PER_MHZ 1E6
 +	if (total_recv > 0 || total_xmit > 0) {
 +		uint64_t total_pkts = 0;
 +		if (strcmp(cur_fwd_eng->fwd_mode_name, "txonly") == 0 ||
@@ -58,15 +64,12 @@
 +		else
 +			total_pkts = total_recv;
 +
- 		printf("\n  CPU cycles/packet=%.2F (total cycles="
--		       "%"PRIu64" / total RX packets=%"PRIu64") at %"PRIu64
++		printf("\n  CPU cycles/packet=%.2F (total cycles="
 +		       "%"PRIu64" / total %s packets=%"PRIu64") at %"PRIu64
- 		       " MHz Clock\n",
--		       (double) fwd_cycles / total_recv,
--		       fwd_cycles, total_recv,
++		       " MHz Clock\n",
 +		       (double) fwd_cycles / total_pkts,
 +		       fwd_cycles, cur_fwd_eng->fwd_mode_name, total_pkts,
- 		       (uint64_t)(rte_get_tsc_hz() / CYC_PER_MHZ));
++		       (uint64_t)(rte_get_tsc_hz() / CYC_PER_MHZ));
 +	}
  #endif
  }

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

* [dpdk-stable] patch 'net/nfp: fix RSS hash configuration reporting' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (138 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'app/testpmd: fix CPU cycles per packet stats on Tx modes' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'drivers/net: fix exposing internal headers' " luca.boccassi
                   ` (51 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Heinrich Kuhn; +Cc: Simon Horman, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 74b620c90cb5b57e4b504a22f1f91c26f2c0eda2 Mon Sep 17 00:00:00 2001
From: Heinrich Kuhn <heinrich.kuhn@netronome.com>
Date: Fri, 10 Jul 2020 16:28:46 +0200
Subject: [PATCH] net/nfp: fix RSS hash configuration reporting

[ upstream commit 198e745083b960d167bd769e2f81818c835f68b8 ]

Prior to this fix the NFP PMD implementation of the .rss_hash_conf_get
callback did not propagate the current hardware state of rss_hf back up
to the caller. Users of the hash_conf_get callback would receive an
incorrect representation of what the RSS configuration currently is in
hardware.

Fixes: 934e4c60fbff ("nfp: add RSS")

Signed-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
---
 drivers/net/nfp/nfp_net.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index a670be949..082aa4682 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2621,6 +2621,9 @@ nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev,
 	if (cfg_rss_ctrl & NFP_NET_CFG_RSS_IPV6)
 		rss_hf |= ETH_RSS_NONFRAG_IPV4_UDP | ETH_RSS_NONFRAG_IPV6_UDP;
 
+	/* Propagate current RSS hash functions to caller */
+	rss_conf->rss_hf = rss_hf;
+
 	/* Reading the key size */
 	rss_conf->rss_key_len = nn_cfg_readl(hw, NFP_NET_CFG_RSS_KEY_SZ);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:53.998056889 +0100
+++ 0141-net-nfp-fix-RSS-hash-configuration-reporting.patch	2020-07-24 12:53:48.479010037 +0100
@@ -1,8 +1,10 @@
-From 198e745083b960d167bd769e2f81818c835f68b8 Mon Sep 17 00:00:00 2001
+From 74b620c90cb5b57e4b504a22f1f91c26f2c0eda2 Mon Sep 17 00:00:00 2001
 From: Heinrich Kuhn <heinrich.kuhn@netronome.com>
 Date: Fri, 10 Jul 2020 16:28:46 +0200
 Subject: [PATCH] net/nfp: fix RSS hash configuration reporting
 
+[ upstream commit 198e745083b960d167bd769e2f81818c835f68b8 ]
+
 Prior to this fix the NFP PMD implementation of the .rss_hash_conf_get
 callback did not propagate the current hardware state of rss_hf back up
 to the caller. Users of the hash_conf_get callback would receive an
@@ -10,7 +12,6 @@
 hardware.
 
 Fixes: 934e4c60fbff ("nfp: add RSS")
-Cc: stable@dpdk.org
 
 Signed-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
 Signed-off-by: Simon Horman <simon.horman@netronome.com>
@@ -19,7 +20,7 @@
  1 file changed, 3 insertions(+)
 
 diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
-index 474719b79..99946279d 100644
+index a670be949..082aa4682 100644
 --- a/drivers/net/nfp/nfp_net.c
 +++ b/drivers/net/nfp/nfp_net.c
 @@ -2621,6 +2621,9 @@ nfp_net_rss_hash_conf_get(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'drivers/net: fix exposing internal headers' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (139 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/nfp: fix RSS hash configuration reporting' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/bonding: fix LACP negotiation' " luca.boccassi
                   ` (50 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 828839afbd5bb8aebb4b949c3583ff3d5b7ecda1 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Fri, 10 Jul 2020 22:43:41 +0100
Subject: [PATCH] drivers/net: fix exposing internal headers

[ upstream commit 61ede39537f45e561dc80eaa23621ce3d2cf9e73 ]

Using '__rte_internal' tag in 'rte_ethdev_driver.h' causing build error
for applications and examples. Because they don't define
'ALLOW_INTERNAL_API' flag and '__rte_internal' causes the error.
This patch is preparation for future '__rte_internal' usage.

At first place, applications/examples should not include
'rte_ethdev_driver.h', this is happening because of PMD public header
files include 'rte_ethdev_driver.h' by mistake.

Updated PMD public header files to not include internal header files.

But for unit test application, 'app/test', enable accessing internal
APIs, since some unit tests need them.

Fixes: ffc905f3b856 ("ethdev: separate driver APIs")
Fixes: ec0dec44ecb9 ("net/atlantic: enable MACsec configuration")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 app/test/meson.build                    | 3 +++
 drivers/net/atlantic/rte_pmd_atlantic.h | 2 +-
 drivers/net/bnxt/rte_pmd_bnxt.h         | 3 ++-
 drivers/net/dpaa/rte_pmd_dpaa.h         | 2 --
 drivers/net/i40e/rte_pmd_i40e.h         | 4 +++-
 drivers/net/ixgbe/rte_pmd_ixgbe.h       | 4 +++-
 6 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index 3b2774b3e..d8650db46 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -362,6 +362,9 @@ endif
 # specify -D_GNU_SOURCE unconditionally
 cflags += '-D_GNU_SOURCE'
 
+# Enable using internal APIs in unit tests
+cflags += ['-DALLOW_INTERNAL_API']
+
 test_dep_objs = []
 if dpdk_conf.has('RTE_LIBRTE_COMPRESSDEV')
 	compress_test_dep = dependency('zlib', required: false)
diff --git a/drivers/net/atlantic/rte_pmd_atlantic.h b/drivers/net/atlantic/rte_pmd_atlantic.h
index c0208569b..0100fc16e 100644
--- a/drivers/net/atlantic/rte_pmd_atlantic.h
+++ b/drivers/net/atlantic/rte_pmd_atlantic.h
@@ -11,7 +11,7 @@
 #ifndef _PMD_ATLANTIC_H_
 #define _PMD_ATLANTIC_H_
 
-#include <rte_ethdev_driver.h>
+#include <rte_compat.h>
 
 /**
  * @warning
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.h b/drivers/net/bnxt/rte_pmd_bnxt.h
index 2e893cc7b..81d0d0e03 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.h
+++ b/drivers/net/bnxt/rte_pmd_bnxt.h
@@ -6,7 +6,8 @@
 #ifndef _PMD_BNXT_H_
 #define _PMD_BNXT_H_
 
-#include <rte_ethdev_driver.h>
+#include <rte_ethdev.h>
+#include <rte_ether.h>
 
 /*
  * Response sent back to the caller after callback
diff --git a/drivers/net/dpaa/rte_pmd_dpaa.h b/drivers/net/dpaa/rte_pmd_dpaa.h
index 37eea9b03..8d244bb49 100644
--- a/drivers/net/dpaa/rte_pmd_dpaa.h
+++ b/drivers/net/dpaa/rte_pmd_dpaa.h
@@ -15,8 +15,6 @@
  *
  */
 
-#include <rte_ethdev_driver.h>
-
 /**
  * Enable/Disable TX loopback
  *
diff --git a/drivers/net/i40e/rte_pmd_i40e.h b/drivers/net/i40e/rte_pmd_i40e.h
index 915cdf076..4920f701d 100644
--- a/drivers/net/i40e/rte_pmd_i40e.h
+++ b/drivers/net/i40e/rte_pmd_i40e.h
@@ -14,7 +14,9 @@
  *
  */
 
-#include <rte_ethdev_driver.h>
+#include <rte_compat.h>
+#include <rte_ethdev.h>
+#include <rte_ether.h>
 
 /**
  * Response sent back to i40e driver from user app after callback
diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.h b/drivers/net/ixgbe/rte_pmd_ixgbe.h
index f62fd761d..d1017c7b1 100644
--- a/drivers/net/ixgbe/rte_pmd_ixgbe.h
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h
@@ -11,7 +11,9 @@
 #ifndef _PMD_IXGBE_H_
 #define _PMD_IXGBE_H_
 
-#include <rte_ethdev_driver.h>
+#include <rte_compat.h>
+#include <rte_ethdev.h>
+#include <rte_ether.h>
 
 /**
  * Notify VF when PF link status changes.
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.035317749 +0100
+++ 0142-drivers-net-fix-exposing-internal-headers.patch	2020-07-24 12:53:48.479010037 +0100
@@ -1,8 +1,10 @@
-From 61ede39537f45e561dc80eaa23621ce3d2cf9e73 Mon Sep 17 00:00:00 2001
+From 828839afbd5bb8aebb4b949c3583ff3d5b7ecda1 Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Fri, 10 Jul 2020 22:43:41 +0100
 Subject: [PATCH] drivers/net: fix exposing internal headers
 
+[ upstream commit 61ede39537f45e561dc80eaa23621ce3d2cf9e73 ]
+
 Using '__rte_internal' tag in 'rte_ethdev_driver.h' causing build error
 for applications and examples. Because they don't define
 'ALLOW_INTERNAL_API' flag and '__rte_internal' causes the error.
@@ -19,7 +21,6 @@
 
 Fixes: ffc905f3b856 ("ethdev: separate driver APIs")
 Fixes: ec0dec44ecb9 ("net/atlantic: enable MACsec configuration")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 Acked-by: Thomas Monjalon <thomas@monjalon.net>
@@ -33,12 +34,12 @@
  6 files changed, 12 insertions(+), 6 deletions(-)
 
 diff --git a/app/test/meson.build b/app/test/meson.build
-index e0d33ea5e..786a21397 100644
+index 3b2774b3e..d8650db46 100644
 --- a/app/test/meson.build
 +++ b/app/test/meson.build
-@@ -396,6 +396,9 @@ cflags += '-D_GNU_SOURCE'
- # Strict-aliasing rules are violated by uint8_t[] to context size casts.
- cflags += '-fno-strict-aliasing'
+@@ -362,6 +362,9 @@ endif
+ # specify -D_GNU_SOURCE unconditionally
+ cflags += '-D_GNU_SOURCE'
  
 +# Enable using internal APIs in unit tests
 +cflags += ['-DALLOW_INTERNAL_API']
@@ -87,7 +88,7 @@
   * Enable/Disable TX loopback
   *
 diff --git a/drivers/net/i40e/rte_pmd_i40e.h b/drivers/net/i40e/rte_pmd_i40e.h
-index 0f6715efc..fc3560c28 100644
+index 915cdf076..4920f701d 100644
 --- a/drivers/net/i40e/rte_pmd_i40e.h
 +++ b/drivers/net/i40e/rte_pmd_i40e.h
 @@ -14,7 +14,9 @@
@@ -102,7 +103,7 @@
  /**
   * Response sent back to i40e driver from user app after callback
 diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.h b/drivers/net/ixgbe/rte_pmd_ixgbe.h
-index 8b6bb99a5..90fc8160b 100644
+index f62fd761d..d1017c7b1 100644
 --- a/drivers/net/ixgbe/rte_pmd_ixgbe.h
 +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h
 @@ -11,7 +11,9 @@

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

* [dpdk-stable] patch 'net/bonding: fix LACP negotiation' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (140 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'drivers/net: fix exposing internal headers' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/bnxt: remove unused enum declaration' " luca.boccassi
                   ` (49 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Yicai Lu; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 6c80d377ec382218298318e1a22a92e319710da6 Mon Sep 17 00:00:00 2001
From: Yicai Lu <luyicai@huawei.com>
Date: Fri, 10 Jul 2020 11:29:35 +0800
Subject: [PATCH] net/bonding: fix LACP negotiation

[ upstream commit a9cbca743083ace5232e9df90119b4defa7df6e5 ]

When two host is connected directly without any devices like switch,
rx_machine_update would receiving partner LACP negotiation packets,
and partner's port mac is filled with zeros in this packet, which is
different with internal's mode4 mac. So in this situation, it would
never go rx_machine branch and then execute mac swap for negotiation!
Thus bond mode 4 will negotiation failed.

Fixes: 56cbc0817399 ("net/bonding: fix LACP negotiation")

Signed-off-by: Yicai Lu <luyicai@huawei.com>
Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index b7ffa2f2c..3991825ad 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -798,7 +798,8 @@ rx_machine_update(struct bond_dev_private *internals, uint16_t slave_id,
 		RTE_ASSERT(lacp->lacpdu.subtype == SLOW_SUBTYPE_LACP);
 
 		partner = &lacp->lacpdu.partner;
-		if (rte_is_same_ether_addr(&partner->port_params.system,
+		if (rte_is_zero_ether_addr(&partner->port_params.system) ||
+			rte_is_same_ether_addr(&partner->port_params.system,
 			&internals->mode4.mac_addr)) {
 			/* This LACP frame is sending to the bonding port
 			 * so pass it to rx_machine.
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.073524306 +0100
+++ 0143-net-bonding-fix-LACP-negotiation.patch	2020-07-24 12:53:48.483010111 +0100
@@ -1,8 +1,10 @@
-From a9cbca743083ace5232e9df90119b4defa7df6e5 Mon Sep 17 00:00:00 2001
+From 6c80d377ec382218298318e1a22a92e319710da6 Mon Sep 17 00:00:00 2001
 From: Yicai Lu <luyicai@huawei.com>
 Date: Fri, 10 Jul 2020 11:29:35 +0800
 Subject: [PATCH] net/bonding: fix LACP negotiation
 
+[ upstream commit a9cbca743083ace5232e9df90119b4defa7df6e5 ]
+
 When two host is connected directly without any devices like switch,
 rx_machine_update would receiving partner LACP negotiation packets,
 and partner's port mac is filled with zeros in this packet, which is
@@ -11,7 +13,6 @@
 Thus bond mode 4 will negotiation failed.
 
 Fixes: 56cbc0817399 ("net/bonding: fix LACP negotiation")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yicai Lu <luyicai@huawei.com>
 Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>

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

* [dpdk-stable] patch 'net/bnxt: remove unused enum declaration' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (141 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/bonding: fix LACP negotiation' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/bnxt: fix unnecessary HWRM command' " luca.boccassi
                   ` (48 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From bfe54105c55a825330f3ada4243375b8972553eb Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 9 Jul 2020 15:08:29 +0530
Subject: [PATCH] net/bnxt: remove unused enum declaration

[ upstream commit df3a6666cbc3d27177359ae74066b35811dc0418 ]

"enum bnxt_hw_context" is defined in the header file, but is not
used anywhere.

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

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt.h | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 404d58a03..96e46868e 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -178,13 +178,6 @@ struct bnxt_led_cfg {
 #define BNXT_LED_DFLT_ENABLES(x)                        \
 	rte_cpu_to_le_32(BNXT_LED_DFLT_ENA << (BNXT_LED_DFLT_ENA_SHIFT * (x)))
 
-enum bnxt_hw_context {
-	HW_CONTEXT_NONE     = 0,
-	HW_CONTEXT_IS_RSS   = 1,
-	HW_CONTEXT_IS_COS   = 2,
-	HW_CONTEXT_IS_LB    = 3,
-};
-
 struct bnxt_vlan_table_entry {
 	uint16_t		tpid;
 	uint16_t		vid;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.111406935 +0100
+++ 0144-net-bnxt-remove-unused-enum-declaration.patch	2020-07-24 12:53:48.483010111 +0100
@@ -1,13 +1,14 @@
-From df3a6666cbc3d27177359ae74066b35811dc0418 Mon Sep 17 00:00:00 2001
+From bfe54105c55a825330f3ada4243375b8972553eb Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Date: Thu, 9 Jul 2020 15:08:29 +0530
 Subject: [PATCH] net/bnxt: remove unused enum declaration
 
+[ upstream commit df3a6666cbc3d27177359ae74066b35811dc0418 ]
+
 "enum bnxt_hw_context" is defined in the header file, but is not
 used anywhere.
 
 Fixes: 9738793f28ec ("net/bnxt: add VNIC functions and structs")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
@@ -16,10 +17,10 @@
  1 file changed, 7 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
-index f69ba2493..8325e8796 100644
+index 404d58a03..96e46868e 100644
 --- a/drivers/net/bnxt/bnxt.h
 +++ b/drivers/net/bnxt/bnxt.h
-@@ -183,13 +183,6 @@ struct bnxt_led_cfg {
+@@ -178,13 +178,6 @@ struct bnxt_led_cfg {
  #define BNXT_LED_DFLT_ENABLES(x)                        \
  	rte_cpu_to_le_32(BNXT_LED_DFLT_ENA << (BNXT_LED_DFLT_ENA_SHIFT * (x)))
  

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

* [dpdk-stable] patch 'net/bnxt: fix unnecessary HWRM command' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (142 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/bnxt: remove unused enum declaration' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/bnxt: fix flow error on filter creation' " luca.boccassi
                   ` (47 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 7806e74cd1dfd85ac31a1ba91ba53f5a6f62149e Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 9 Jul 2020 15:08:30 +0530
Subject: [PATCH] net/bnxt: fix unnecessary HWRM command

[ upstream commit f456684ac2afafc97106ab8d997c9aa477f6b15f ]

During probe, driver issues HWRM_CFA_ADV_FLOW_MGNT_QCAPS command.
But it is not using the command response anywhere which makes the
fw call redundant.

Remove the unnecessary HWRM_CFA_ADV_FLOW_MGNT_QCAPS call to fw.
Remove the redundant flow_flags in bnxt struct.

Fixes: afef822b2e1b ("net/bnxt: support creating SMAC and inner DMAC filters")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        |  2 --
 drivers/net/bnxt/bnxt_ethdev.c |  4 ----
 drivers/net/bnxt/bnxt_hwrm.c   | 32 --------------------------------
 drivers/net/bnxt/bnxt_hwrm.h   |  1 -
 4 files changed, 39 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 96e46868e..46cf41864 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -541,8 +541,6 @@ struct bnxt {
 #define BNXT_FW_CAP_ERROR_RECOVERY	BIT(2)
 #define BNXT_FW_CAP_ERR_RECOVER_RELOAD	BIT(3)
 
-	uint32_t		flow_flags;
-#define BNXT_FLOW_FLAG_L2_HDR_SRC_FILTER_EN	BIT(0)
 	pthread_mutex_t         flow_lock;
 
 	uint32_t		vnic_cap_flags;
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index f1bd57535..f6d2ed741 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4723,10 +4723,6 @@ static int bnxt_init_fw(struct bnxt *bp)
 	if (rc)
 		return rc;
 
-	rc = bnxt_hwrm_cfa_adv_flow_mgmt_qcaps(bp);
-	if (rc)
-		return rc;
-
 	/* Get the adapter error recovery support info */
 	rc = bnxt_hwrm_error_recovery_qcfg(bp);
 	if (rc)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 33f352fad..720099a32 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -5068,35 +5068,3 @@ int bnxt_hwrm_port_ts_query(struct bnxt *bp, uint8_t path, uint64_t *timestamp)
 
 	return rc;
 }
-
-int bnxt_hwrm_cfa_adv_flow_mgmt_qcaps(struct bnxt *bp)
-{
-	struct hwrm_cfa_adv_flow_mgnt_qcaps_output *resp =
-					bp->hwrm_cmd_resp_addr;
-	struct hwrm_cfa_adv_flow_mgnt_qcaps_input req = {0};
-	uint32_t flags = 0;
-	int rc = 0;
-
-	if (!(bp->flags & BNXT_FLAG_ADV_FLOW_MGMT))
-		return rc;
-
-	if (!(BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp))) {
-		PMD_DRV_LOG(DEBUG,
-			    "Not a PF or trusted VF. Command not supported\n");
-		return 0;
-	}
-
-	HWRM_PREP(req, CFA_ADV_FLOW_MGNT_QCAPS, BNXT_USE_KONG(bp));
-	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_KONG(bp));
-
-	HWRM_CHECK_RESULT();
-	flags = rte_le_to_cpu_32(resp->flags);
-	HWRM_UNLOCK();
-
-	if (flags & HWRM_CFA_ADV_FLOW_MGNT_QCAPS_L2_HDR_SRC_FILTER_EN) {
-		bp->flow_flags |= BNXT_FLOW_FLAG_L2_HDR_SRC_FILTER_EN;
-		PMD_DRV_LOG(INFO, "Source L2 header filtering enabled\n");
-	}
-
-	return rc;
-}
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index 2753720ae..ad5baf262 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -229,5 +229,4 @@ int bnxt_hwrm_error_recovery_qcfg(struct bnxt *bp);
 int bnxt_hwrm_fw_reset(struct bnxt *bp);
 int bnxt_hwrm_port_ts_query(struct bnxt *bp, uint8_t path,
 			    uint64_t *timestamp);
-int bnxt_hwrm_cfa_adv_flow_mgmt_qcaps(struct bnxt *bp);
 #endif
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.147834598 +0100
+++ 0145-net-bnxt-fix-unnecessary-HWRM-command.patch	2020-07-24 12:53:48.491010260 +0100
@@ -1,8 +1,10 @@
-From f456684ac2afafc97106ab8d997c9aa477f6b15f Mon Sep 17 00:00:00 2001
+From 7806e74cd1dfd85ac31a1ba91ba53f5a6f62149e Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Date: Thu, 9 Jul 2020 15:08:30 +0530
 Subject: [PATCH] net/bnxt: fix unnecessary HWRM command
 
+[ upstream commit f456684ac2afafc97106ab8d997c9aa477f6b15f ]
+
 During probe, driver issues HWRM_CFA_ADV_FLOW_MGNT_QCAPS command.
 But it is not using the command response anywhere which makes the
 fw call redundant.
@@ -11,7 +13,6 @@
 Remove the redundant flow_flags in bnxt struct.
 
 Fixes: afef822b2e1b ("net/bnxt: support creating SMAC and inner DMAC filters")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
@@ -24,12 +25,12 @@
  4 files changed, 39 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
-index 8325e8796..50f93ff5b 100644
+index 96e46868e..46cf41864 100644
 --- a/drivers/net/bnxt/bnxt.h
 +++ b/drivers/net/bnxt/bnxt.h
-@@ -638,8 +638,6 @@ struct bnxt {
- #define BNXT_FW_CAP_ADV_FLOW_COUNTERS	BIT(6)
- #define BNXT_FW_CAP_HCOMM_FW_STATUS	BIT(7)
+@@ -541,8 +541,6 @@ struct bnxt {
+ #define BNXT_FW_CAP_ERROR_RECOVERY	BIT(2)
+ #define BNXT_FW_CAP_ERR_RECOVER_RELOAD	BIT(3)
  
 -	uint32_t		flow_flags;
 -#define BNXT_FLOW_FLAG_L2_HDR_SRC_FILTER_EN	BIT(0)
@@ -37,28 +38,29 @@
  
  	uint32_t		vnic_cap_flags;
 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index 712de1869..318d6b33a 100644
+index f1bd57535..f6d2ed741 100644
 --- a/drivers/net/bnxt/bnxt_ethdev.c
 +++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -5472,10 +5472,6 @@ static int bnxt_init_fw(struct bnxt *bp)
- 
- 	bnxt_hwrm_port_phy_qcaps(bp);
+@@ -4723,10 +4723,6 @@ static int bnxt_init_fw(struct bnxt *bp)
+ 	if (rc)
+ 		return rc;
  
 -	rc = bnxt_hwrm_cfa_adv_flow_mgmt_qcaps(bp);
 -	if (rc)
 -		return rc;
 -
- 	bnxt_alloc_error_recovery_info(bp);
  	/* Get the adapter error recovery support info */
  	rc = bnxt_hwrm_error_recovery_qcfg(bp);
+ 	if (rc)
 diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
-index 6ade32d1b..f9c746109 100644
+index 33f352fad..720099a32 100644
 --- a/drivers/net/bnxt/bnxt_hwrm.c
 +++ b/drivers/net/bnxt/bnxt_hwrm.c
-@@ -5320,38 +5320,6 @@ int bnxt_hwrm_port_ts_query(struct bnxt *bp, uint8_t path, uint64_t *timestamp)
+@@ -5068,35 +5068,3 @@ int bnxt_hwrm_port_ts_query(struct bnxt *bp, uint8_t path, uint64_t *timestamp)
+ 
  	return rc;
  }
- 
+-
 -int bnxt_hwrm_cfa_adv_flow_mgmt_qcaps(struct bnxt *bp)
 -{
 -	struct hwrm_cfa_adv_flow_mgnt_qcaps_output *resp =
@@ -67,7 +69,7 @@
 -	uint32_t flags = 0;
 -	int rc = 0;
 -
--	if (!(bp->fw_cap & BNXT_FW_CAP_ADV_FLOW_MGMT))
+-	if (!(bp->flags & BNXT_FLAG_ADV_FLOW_MGMT))
 -		return rc;
 -
 -	if (!(BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp))) {
@@ -76,7 +78,7 @@
 -		return 0;
 -	}
 -
--	HWRM_PREP(&req, HWRM_CFA_ADV_FLOW_MGNT_QCAPS, BNXT_USE_KONG(bp));
+-	HWRM_PREP(req, CFA_ADV_FLOW_MGNT_QCAPS, BNXT_USE_KONG(bp));
 -	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_KONG(bp));
 -
 -	HWRM_CHECK_RESULT();
@@ -90,22 +92,16 @@
 -
 -	return rc;
 -}
--
- int bnxt_hwrm_cfa_counter_qcaps(struct bnxt *bp, uint16_t *max_fc)
- {
- 	int rc = 0;
 diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
-index 9e0b79904..1704eddba 100644
+index 2753720ae..ad5baf262 100644
 --- a/drivers/net/bnxt/bnxt_hwrm.h
 +++ b/drivers/net/bnxt/bnxt_hwrm.h
-@@ -259,7 +259,6 @@ int bnxt_hwrm_error_recovery_qcfg(struct bnxt *bp);
+@@ -229,5 +229,4 @@ int bnxt_hwrm_error_recovery_qcfg(struct bnxt *bp);
  int bnxt_hwrm_fw_reset(struct bnxt *bp);
  int bnxt_hwrm_port_ts_query(struct bnxt *bp, uint8_t path,
  			    uint64_t *timestamp);
 -int bnxt_hwrm_cfa_adv_flow_mgmt_qcaps(struct bnxt *bp);
- int bnxt_hwrm_cfa_counter_qcaps(struct bnxt *bp, uint16_t *max_fc);
- int bnxt_hwrm_ctx_rgtr(struct bnxt *bp, rte_iova_t dma_addr, uint16_t *ctx_id);
- int bnxt_hwrm_ctx_unrgtr(struct bnxt *bp, uint16_t ctx_id);
+ #endif
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/bnxt: fix flow error on filter creation' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (143 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/bnxt: fix unnecessary HWRM command' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/bnxt: fix freeing filters on flow creation failure' " luca.boccassi
                   ` (46 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 9e4213197fc9ad881ee5da16245464e3a0b84850 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 9 Jul 2020 15:08:31 +0530
Subject: [PATCH] net/bnxt: fix flow error on filter creation

[ upstream commit 87aefef133e3d670be365efdaa620f36d97ee4bd ]

If set_em_filter/set_ntuple_filter cmds fails for some reason,
driver is not filling the "rte_flow_error" string buffer.
Same is the case when flow create fails due to an already
existing mark id for the new flow id created.
This leads to a crash in testpmd while trying to print the
error message.

Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow")
Fixes: 9db66782bd06 ("net/bnxt: fix supporting zero mark ID with RSS action")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_flow.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index d901479ee..52d521d6e 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1715,12 +1715,24 @@ bnxt_flow_create(struct rte_eth_dev *dev,
 		filter->enables |=
 			HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_L2_FILTER_ID;
 		ret = bnxt_hwrm_set_em_filter(bp, filter->dst_id, filter);
+		if (ret != 0) {
+			rte_flow_error_set(error, -ret,
+					   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
+					   "Failed to create EM filter");
+			goto free_filter;
+		}
 	}
 
 	if (filter->filter_type == HWRM_CFA_NTUPLE_FILTER) {
 		filter->enables |=
 			HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_L2_FILTER_ID;
 		ret = bnxt_hwrm_set_ntuple_filter(bp, filter->dst_id, filter);
+		if (ret != 0) {
+			rte_flow_error_set(error, -ret,
+					   RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
+					   "Failed to create ntuple filter");
+			goto free_filter;
+		}
 	}
 
 	vnic = find_matching_vnic(bp, filter);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.196815269 +0100
+++ 0146-net-bnxt-fix-flow-error-on-filter-creation.patch	2020-07-24 12:53:48.495010335 +0100
@@ -1,8 +1,10 @@
-From 87aefef133e3d670be365efdaa620f36d97ee4bd Mon Sep 17 00:00:00 2001
+From 9e4213197fc9ad881ee5da16245464e3a0b84850 Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Date: Thu, 9 Jul 2020 15:08:31 +0530
 Subject: [PATCH] net/bnxt: fix flow error on filter creation
 
+[ upstream commit 87aefef133e3d670be365efdaa620f36d97ee4bd ]
+
 If set_em_filter/set_ntuple_filter cmds fails for some reason,
 driver is not filling the "rte_flow_error" string buffer.
 Same is the case when flow create fails due to an already
@@ -12,19 +14,18 @@
 
 Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow")
 Fixes: 9db66782bd06 ("net/bnxt: fix supporting zero mark ID with RSS action")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
 ---
- drivers/net/bnxt/bnxt_flow.c | 20 ++++++++++++++++----
- 1 file changed, 16 insertions(+), 4 deletions(-)
+ drivers/net/bnxt/bnxt_flow.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
 
 diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
-index 19bc66a5a..499dcdf6b 100644
+index d901479ee..52d521d6e 100644
 --- a/drivers/net/bnxt/bnxt_flow.c
 +++ b/drivers/net/bnxt/bnxt_flow.c
-@@ -1786,12 +1786,24 @@ bnxt_flow_create(struct rte_eth_dev *dev,
+@@ -1715,12 +1715,24 @@ bnxt_flow_create(struct rte_eth_dev *dev,
  		filter->enables |=
  			HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_L2_FILTER_ID;
  		ret = bnxt_hwrm_set_em_filter(bp, filter->dst_id, filter);
@@ -49,21 +50,6 @@
  	}
  
  	vnic = find_matching_vnic(bp, filter);
-@@ -1817,10 +1829,10 @@ done:
- 			 */
- 			flow_id = filter->flow_id & BNXT_FLOW_ID_MASK;
- 			if (bp->mark_table[flow_id].valid) {
--				PMD_DRV_LOG(ERR,
--					    "Entry for Mark id 0x%x occupied"
--					    " flow id 0x%x\n",
--					    filter->mark, filter->flow_id);
-+				rte_flow_error_set(error, EEXIST,
-+						   RTE_FLOW_ERROR_TYPE_HANDLE,
-+						   NULL,
-+						   "Flow with mark id exists");
- 				goto free_filter;
- 			}
- 			bp->mark_table[flow_id].valid = true;
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/bnxt: fix freeing filters on flow creation failure' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (144 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/bnxt: fix flow error on filter creation' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'test/crypto: change cipher offset for ESN vector' " luca.boccassi
                   ` (45 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From a7b4dbef9323280906399b5bd11338fe565b2caa Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 9 Jul 2020 15:08:32 +0530
Subject: [PATCH] net/bnxt: fix freeing filters on flow creation failure

[ upstream commit 87520e59fb84c3ba5dbeee10d57a534fa3a70ad2 ]

This patch does following things:
1. Added a wrapper function bnxt_clear_one_vnic_filter()
   for destroying the filters in hw. This will avoid duplicate
   code in many places.
2. When flow create fails due to an already existing mark id
   for the new flow id created, fixed to destroy the hw
   filter created.
3. Re-arranged code to move a log and list update to right place.

Fixes: 9db66782bd06 ("net/bnxt: fix supporting zero mark ID with RSS action")
Fixes: 5ef3b79fdfe6 ("net/bnxt: support flow filter ops")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_flow.c |  8 ++------
 drivers/net/bnxt/bnxt_hwrm.c | 31 +++++++++++++++++++++----------
 drivers/net/bnxt/bnxt_hwrm.h |  2 ++
 3 files changed, 25 insertions(+), 16 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 52d521d6e..f069e5f56 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1746,9 +1746,9 @@ done:
 		}
 
 		STAILQ_INSERT_TAIL(&vnic->filter, filter, next);
-		PMD_DRV_LOG(DEBUG, "Successfully created flow.\n");
 		STAILQ_INSERT_TAIL(&vnic->flow_list, flow, next);
 		bnxt_release_flow_lock(bp);
+		PMD_DRV_LOG(DEBUG, "Successfully created flow.\n");
 		return flow;
 	}
 
@@ -1839,11 +1839,7 @@ _bnxt_flow_destroy(struct bnxt *bp,
 	if (ret == 0)
 		PMD_DRV_LOG(ERR, "Could not find matching flow\n");
 
-	if (filter->filter_type == HWRM_CFA_EM_FILTER)
-		ret = bnxt_hwrm_clear_em_filter(bp, filter);
-	if (filter->filter_type == HWRM_CFA_NTUPLE_FILTER)
-		ret = bnxt_hwrm_clear_ntuple_filter(bp, filter);
-	ret = bnxt_hwrm_clear_l2_filter(bp, filter);
+	ret = bnxt_clear_one_vnic_filter(bp, filter);
 
 done:
 	if (!ret) {
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 720099a32..fed1aa329 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -2483,17 +2483,32 @@ int bnxt_alloc_hwrm_resources(struct bnxt *bp)
 	return 0;
 }
 
+int
+bnxt_clear_one_vnic_filter(struct bnxt *bp, struct bnxt_filter_info *filter)
+{
+	int rc = 0;
+
+	if (filter->filter_type == HWRM_CFA_EM_FILTER) {
+		rc = bnxt_hwrm_clear_em_filter(bp, filter);
+		if (rc)
+			return rc;
+	} else if (filter->filter_type == HWRM_CFA_NTUPLE_FILTER) {
+		rc = bnxt_hwrm_clear_ntuple_filter(bp, filter);
+		if (rc)
+			return rc;
+	}
+
+	rc = bnxt_hwrm_clear_l2_filter(bp, filter);
+	return rc;
+}
+
 int bnxt_clear_hwrm_vnic_filters(struct bnxt *bp, struct bnxt_vnic_info *vnic)
 {
 	struct bnxt_filter_info *filter;
 	int rc = 0;
 
 	STAILQ_FOREACH(filter, &vnic->filter, next) {
-		if (filter->filter_type == HWRM_CFA_EM_FILTER)
-			rc = bnxt_hwrm_clear_em_filter(bp, filter);
-		else if (filter->filter_type == HWRM_CFA_NTUPLE_FILTER)
-			rc = bnxt_hwrm_clear_ntuple_filter(bp, filter);
-		rc = bnxt_hwrm_clear_l2_filter(bp, filter);
+		rc = bnxt_clear_one_vnic_filter(bp, filter);
 		STAILQ_REMOVE(&vnic->filter, filter, bnxt_filter_info, next);
 		bnxt_free_filter(bp, filter);
 	}
@@ -2511,11 +2526,7 @@ bnxt_clear_hwrm_vnic_flows(struct bnxt *bp, struct bnxt_vnic_info *vnic)
 		flow = STAILQ_FIRST(&vnic->flow_list);
 		filter = flow->filter;
 		PMD_DRV_LOG(DEBUG, "filter type %d\n", filter->filter_type);
-		if (filter->filter_type == HWRM_CFA_EM_FILTER)
-			rc = bnxt_hwrm_clear_em_filter(bp, filter);
-		else if (filter->filter_type == HWRM_CFA_NTUPLE_FILTER)
-			rc = bnxt_hwrm_clear_ntuple_filter(bp, filter);
-		rc = bnxt_hwrm_clear_l2_filter(bp, filter);
+		rc = bnxt_clear_one_vnic_filter(bp, filter);
 
 		STAILQ_REMOVE(&vnic->flow_list, flow, rte_flow, next);
 		rte_free(flow);
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index ad5baf262..e647993af 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -229,4 +229,6 @@ int bnxt_hwrm_error_recovery_qcfg(struct bnxt *bp);
 int bnxt_hwrm_fw_reset(struct bnxt *bp);
 int bnxt_hwrm_port_ts_query(struct bnxt *bp, uint8_t path,
 			    uint64_t *timestamp);
+int bnxt_clear_one_vnic_filter(struct bnxt *bp,
+			       struct bnxt_filter_info *filter);
 #endif
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.234436778 +0100
+++ 0147-net-bnxt-fix-freeing-filters-on-flow-creation-failur.patch	2020-07-24 12:53:48.499010409 +0100
@@ -1,8 +1,10 @@
-From 87520e59fb84c3ba5dbeee10d57a534fa3a70ad2 Mon Sep 17 00:00:00 2001
+From a7b4dbef9323280906399b5bd11338fe565b2caa Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Date: Thu, 9 Jul 2020 15:08:32 +0530
 Subject: [PATCH] net/bnxt: fix freeing filters on flow creation failure
 
+[ upstream commit 87520e59fb84c3ba5dbeee10d57a534fa3a70ad2 ]
+
 This patch does following things:
 1. Added a wrapper function bnxt_clear_one_vnic_filter()
    for destroying the filters in hw. This will avoid duplicate
@@ -14,56 +16,34 @@
 
 Fixes: 9db66782bd06 ("net/bnxt: fix supporting zero mark ID with RSS action")
 Fixes: 5ef3b79fdfe6 ("net/bnxt: support flow filter ops")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
 Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
 ---
- drivers/net/bnxt/bnxt_flow.c | 15 +++++++--------
+ drivers/net/bnxt/bnxt_flow.c |  8 ++------
  drivers/net/bnxt/bnxt_hwrm.c | 31 +++++++++++++++++++++----------
  drivers/net/bnxt/bnxt_hwrm.h |  2 ++
- 3 files changed, 30 insertions(+), 18 deletions(-)
+ 3 files changed, 25 insertions(+), 16 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
-index 499dcdf6b..320b53d94 100644
+index 52d521d6e..f069e5f56 100644
 --- a/drivers/net/bnxt/bnxt_flow.c
 +++ b/drivers/net/bnxt/bnxt_flow.c
-@@ -1816,9 +1816,6 @@ done:
- 			goto free_flow;
+@@ -1746,9 +1746,9 @@ done:
  		}
  
--		STAILQ_INSERT_TAIL(&vnic->filter, filter, next);
+ 		STAILQ_INSERT_TAIL(&vnic->filter, filter, next);
 -		PMD_DRV_LOG(DEBUG, "Successfully created flow.\n");
--		STAILQ_INSERT_TAIL(&vnic->flow_list, flow, next);
- 		if (filter->valid_flags & BNXT_FLOW_MARK_FLAG) {
- 			PMD_DRV_LOG(DEBUG,
- 				    "Mark action: mark id 0x%x, flow id 0x%x\n",
-@@ -1833,15 +1830,21 @@ done:
- 						   RTE_FLOW_ERROR_TYPE_HANDLE,
- 						   NULL,
- 						   "Flow with mark id exists");
-+				bnxt_clear_one_vnic_filter(bp, filter);
- 				goto free_filter;
- 			}
- 			bp->mark_table[flow_id].valid = true;
- 			bp->mark_table[flow_id].mark_id = filter->mark;
- 		}
-+
-+		STAILQ_INSERT_TAIL(&vnic->filter, filter, next);
-+		STAILQ_INSERT_TAIL(&vnic->flow_list, flow, next);
-+
- 		if (BNXT_FLOW_XSTATS_EN(bp))
- 			bp->flow_stat->flow_count++;
+ 		STAILQ_INSERT_TAIL(&vnic->flow_list, flow, next);
  		bnxt_release_flow_lock(bp);
- 		bnxt_setup_flow_counter(bp);
 +		PMD_DRV_LOG(DEBUG, "Successfully created flow.\n");
  		return flow;
  	}
  
-@@ -1940,11 +1943,7 @@ _bnxt_flow_destroy(struct bnxt *bp,
- 		filter->flow_id = 0;
- 	}
+@@ -1839,11 +1839,7 @@ _bnxt_flow_destroy(struct bnxt *bp,
+ 	if (ret == 0)
+ 		PMD_DRV_LOG(ERR, "Could not find matching flow\n");
  
 -	if (filter->filter_type == HWRM_CFA_EM_FILTER)
 -		ret = bnxt_hwrm_clear_em_filter(bp, filter);
@@ -75,10 +55,10 @@
  done:
  	if (!ret) {
 diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
-index f9c746109..7ea13a8b2 100644
+index 720099a32..fed1aa329 100644
 --- a/drivers/net/bnxt/bnxt_hwrm.c
 +++ b/drivers/net/bnxt/bnxt_hwrm.c
-@@ -2613,6 +2613,25 @@ int bnxt_alloc_hwrm_resources(struct bnxt *bp)
+@@ -2483,17 +2483,32 @@ int bnxt_alloc_hwrm_resources(struct bnxt *bp)
  	return 0;
  }
  
@@ -101,10 +81,9 @@
 +	return rc;
 +}
 +
- static int
- bnxt_clear_hwrm_vnic_filters(struct bnxt *bp, struct bnxt_vnic_info *vnic)
+ int bnxt_clear_hwrm_vnic_filters(struct bnxt *bp, struct bnxt_vnic_info *vnic)
  {
-@@ -2620,11 +2639,7 @@ bnxt_clear_hwrm_vnic_filters(struct bnxt *bp, struct bnxt_vnic_info *vnic)
+ 	struct bnxt_filter_info *filter;
  	int rc = 0;
  
  	STAILQ_FOREACH(filter, &vnic->filter, next) {
@@ -117,7 +96,7 @@
  		STAILQ_REMOVE(&vnic->filter, filter, bnxt_filter_info, next);
  		bnxt_free_filter(bp, filter);
  	}
-@@ -2642,11 +2657,7 @@ bnxt_clear_hwrm_vnic_flows(struct bnxt *bp, struct bnxt_vnic_info *vnic)
+@@ -2511,11 +2526,7 @@ bnxt_clear_hwrm_vnic_flows(struct bnxt *bp, struct bnxt_vnic_info *vnic)
  		flow = STAILQ_FIRST(&vnic->flow_list);
  		filter = flow->filter;
  		PMD_DRV_LOG(DEBUG, "filter type %d\n", filter->filter_type);
@@ -131,13 +110,13 @@
  		STAILQ_REMOVE(&vnic->flow_list, flow, rte_flow, next);
  		rte_free(flow);
 diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
-index 1704eddba..01201a7a4 100644
+index ad5baf262..e647993af 100644
 --- a/drivers/net/bnxt/bnxt_hwrm.h
 +++ b/drivers/net/bnxt/bnxt_hwrm.h
-@@ -276,4 +276,6 @@ int bnxt_hwrm_get_dflt_vnic_svif(struct bnxt *bp, uint16_t fid,
- int bnxt_hwrm_parent_pf_qcfg(struct bnxt *bp);
- int bnxt_hwrm_port_phy_qcaps(struct bnxt *bp);
- int bnxt_hwrm_oem_cmd(struct bnxt *bp, uint32_t entry_num);
+@@ -229,4 +229,6 @@ int bnxt_hwrm_error_recovery_qcfg(struct bnxt *bp);
+ int bnxt_hwrm_fw_reset(struct bnxt *bp);
+ int bnxt_hwrm_port_ts_query(struct bnxt *bp, uint8_t path,
+ 			    uint64_t *timestamp);
 +int bnxt_clear_one_vnic_filter(struct bnxt *bp,
 +			       struct bnxt_filter_info *filter);
  #endif

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

* [dpdk-stable] patch 'test/crypto: change cipher offset for ESN vector' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (145 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/bnxt: fix freeing filters on flow creation failure' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'examples/fips_validation: fix TDES interim callback' " luca.boccassi
                   ` (44 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Ankur Dwivedi; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 02a7eb3b6d12fb2671bfce0fd09b6c7308eb9f9b Mon Sep 17 00:00:00 2001
From: Ankur Dwivedi <adwivedi@marvell.com>
Date: Fri, 5 Jun 2020 14:00:33 +0530
Subject: [PATCH] test/crypto: change cipher offset for ESN vector

[ upstream commit 27f30e288eb6aebf36c9e5a73ce71aa549630cc5 ]

In the IPSEC ESN test vector the cipher offset for encryption
should be 8 bytes which is the size of esp header.
This patch also changes the ciphertext and the digest reference
data against which the operation result is validated.

Fixes: 699741912d71 ("test/crypto: add case for auth only trailer")

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 app/test/test_cryptodev.c                  |   8 +-
 app/test/test_cryptodev_aes_test_vectors.h | 126 ++++++++++-----------
 2 files changed, 67 insertions(+), 67 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index db9dd3aec..e350e9d37 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -10464,7 +10464,7 @@ aes128cbc_hmac_sha1_test_vector = {
 static const struct test_crypto_vector
 aes128cbc_hmac_sha1_aad_test_vector = {
 	.crypto_algo = RTE_CRYPTO_CIPHER_AES_CBC,
-	.cipher_offset = 12,
+	.cipher_offset = 8,
 	.cipher_len = 496,
 	.cipher_key = {
 		.data = {
@@ -10500,9 +10500,9 @@ aes128cbc_hmac_sha1_aad_test_vector = {
 	},
 	.digest = {
 		.data = {
-			0x1F, 0x6A, 0xD2, 0x8B, 0x4B, 0xB3, 0xC0, 0x9E,
-			0x86, 0x9B, 0x3A, 0xF2, 0x00, 0x5B, 0x4F, 0x08,
-			0x62, 0x8D, 0x62, 0x65
+			0x6D, 0xF3, 0x50, 0x79, 0x7A, 0x2A, 0xAC, 0x7F,
+			0xA6, 0xF0, 0xC6, 0x38, 0x1F, 0xA4, 0xDD, 0x9B,
+			0x62, 0x0F, 0xFB, 0x10
 		},
 		.len = 20
 	}
diff --git a/app/test/test_cryptodev_aes_test_vectors.h b/app/test/test_cryptodev_aes_test_vectors.h
index 8307fcf9a..66994b659 100644
--- a/app/test/test_cryptodev_aes_test_vectors.h
+++ b/app/test/test_cryptodev_aes_test_vectors.h
@@ -358,69 +358,69 @@ static const struct blockcipher_test_data null_test_data_chain_x1_multiple = {
 
 static const uint8_t ciphertext512_aes128cbc_aad[] = {
 	0x57, 0x68, 0x61, 0x74, 0x20, 0x61, 0x20, 0x6C,
-	0x6F, 0x75, 0x73, 0x79, 0x6D, 0x70, 0xB4, 0xAD,
-	0x09, 0x7C, 0xD7, 0x52, 0xD6, 0xF2, 0xBF, 0xD1,
-	0x9D, 0x79, 0xC6, 0xB6, 0x8F, 0x94, 0xEB, 0xD8,
-	0xBA, 0x5E, 0x01, 0x49, 0x7D, 0xB3, 0xC5, 0xFE,
-	0x18, 0xF4, 0xE3, 0x60, 0x8C, 0x84, 0x68, 0x13,
-	0x33, 0x06, 0x85, 0x60, 0xD3, 0xE7, 0x8A, 0xB5,
-	0x23, 0xA2, 0xDE, 0x52, 0x5C, 0xB6, 0x26, 0x37,
-	0xBB, 0x23, 0x8A, 0x38, 0x07, 0x85, 0xB6, 0x2E,
-	0xC3, 0x69, 0x57, 0x79, 0x6B, 0xE4, 0xD7, 0x86,
-	0x23, 0x72, 0x4C, 0x65, 0x49, 0x08, 0x1E, 0xF3,
-	0xCC, 0x71, 0x4C, 0x45, 0x97, 0x03, 0xBC, 0xA0,
-	0x9D, 0xF0, 0x4F, 0x5D, 0xEC, 0x40, 0x6C, 0xC6,
-	0x52, 0xC0, 0x9D, 0x1C, 0xDC, 0x8B, 0xC2, 0xFA,
-	0x35, 0xA7, 0x3A, 0x00, 0x04, 0x1C, 0xA6, 0x91,
-	0x5D, 0xEB, 0x07, 0xA1, 0xB9, 0x3E, 0xD1, 0xB6,
-	0xCA, 0x96, 0xEC, 0x71, 0xF7, 0x7D, 0xB6, 0x09,
-	0x3D, 0x19, 0x6E, 0x75, 0x03, 0xC3, 0x1A, 0x4E,
-	0x5B, 0x4D, 0xEA, 0xD9, 0x92, 0x96, 0x01, 0xFB,
-	0xA3, 0xC2, 0x6D, 0xC4, 0x17, 0x6B, 0xB4, 0x3B,
-	0x1E, 0x87, 0x54, 0x26, 0x95, 0x63, 0x07, 0x73,
-	0xB6, 0xBA, 0x52, 0xD7, 0xA7, 0xD0, 0x9C, 0x75,
-	0x8A, 0xCF, 0xC4, 0x3C, 0x4A, 0x55, 0x0E, 0x53,
-	0xEC, 0xE0, 0x31, 0x51, 0xB7, 0xB7, 0xD2, 0xB4,
-	0xF3, 0x2B, 0x70, 0x6D, 0x15, 0x9E, 0x57, 0x30,
-	0x72, 0xE5, 0xA4, 0x71, 0x5F, 0xA4, 0xE8, 0x7C,
-	0x46, 0x58, 0x36, 0x71, 0x91, 0x55, 0xAA, 0x99,
-	0x3B, 0x3F, 0xF6, 0xA2, 0x9D, 0x27, 0xBF, 0xC2,
-	0x62, 0x2C, 0x85, 0xB7, 0x51, 0xDD, 0xFD, 0x7B,
-	0x8B, 0xB5, 0xDD, 0x2A, 0x73, 0xF8, 0x93, 0x9A,
-	0x3F, 0xAD, 0x1D, 0xF0, 0x46, 0xD1, 0x76, 0x83,
-	0x71, 0x4E, 0xD3, 0x0D, 0x64, 0x8C, 0xC3, 0xE6,
-	0x03, 0xED, 0xE8, 0x53, 0x23, 0x1A, 0xC7, 0x86,
-	0xEB, 0x87, 0xD6, 0x78, 0xF9, 0xFB, 0x9C, 0x1D,
-	0xE7, 0x4E, 0xC0, 0x70, 0x27, 0x7A, 0x43, 0xE2,
-	0x5D, 0xA4, 0x10, 0x40, 0xBE, 0x61, 0x0D, 0x2B,
-	0x25, 0x08, 0x75, 0x91, 0xB5, 0x5A, 0x26, 0xC8,
-	0x32, 0xA7, 0xC6, 0x88, 0xBF, 0x75, 0x94, 0xCC,
-	0x58, 0xA4, 0xFE, 0x2F, 0xF7, 0x5C, 0xD2, 0x36,
-	0x66, 0x55, 0xF0, 0xEA, 0xF5, 0x64, 0x43, 0xE7,
-	0x6D, 0xE0, 0xED, 0xA1, 0x10, 0x0A, 0x84, 0x07,
-	0x11, 0x88, 0xFA, 0xA1, 0xD3, 0xA0, 0x00, 0x5D,
-	0xEB, 0xB5, 0x62, 0x01, 0x72, 0xC1, 0x9B, 0x39,
-	0x0B, 0xD3, 0xAF, 0x04, 0x19, 0x42, 0xEC, 0xFF,
-	0x4B, 0xB3, 0x5E, 0x87, 0x27, 0xE4, 0x26, 0x57,
-	0x76, 0xCD, 0x36, 0x31, 0x5B, 0x94, 0x74, 0xFF,
-	0x33, 0x91, 0xAA, 0xD1, 0x45, 0x34, 0xC2, 0x11,
-	0xF0, 0x35, 0x44, 0xC9, 0xD5, 0xA2, 0x5A, 0xC2,
-	0xE9, 0x9E, 0xCA, 0xE2, 0x6F, 0xD2, 0x40, 0xB4,
-	0x93, 0x42, 0x78, 0x20, 0x92, 0x88, 0xC7, 0x16,
-	0xCF, 0x15, 0x54, 0x7B, 0xE1, 0x46, 0x38, 0x69,
-	0xB8, 0xE4, 0xF1, 0x81, 0xF0, 0x08, 0x6F, 0x92,
-	0x6D, 0x1A, 0xD9, 0x93, 0xFA, 0xD7, 0x35, 0xFE,
-	0x7F, 0x59, 0x43, 0x1D, 0x3A, 0x3B, 0xFC, 0xD0,
-	0x14, 0x95, 0x1E, 0xB2, 0x04, 0x08, 0x4F, 0xC6,
-	0xEA, 0xE8, 0x22, 0xF3, 0xD7, 0x66, 0x93, 0xAA,
-	0xFD, 0xA0, 0xFE, 0x03, 0x96, 0x54, 0x78, 0x35,
-	0x18, 0xED, 0xB7, 0x2F, 0x40, 0xE3, 0x8E, 0x22,
-	0xC6, 0xDA, 0xB0, 0x8E, 0xA0, 0xA1, 0x62, 0x03,
-	0x63, 0x34, 0x11, 0xF5, 0x9E, 0xAA, 0x6B, 0xC4,
-	0x14, 0x75, 0x4C, 0xF4, 0xD8, 0xD9, 0xF1, 0x76,
-	0xE3, 0xD3, 0x55, 0xCE, 0x22, 0x7D, 0x4A, 0xB7,
-	0xBB, 0x7F, 0x4F, 0x09, 0x88, 0x70, 0x6E, 0x09,
-	0x84, 0x6B, 0x24, 0x19, 0x2C, 0x20, 0x73, 0x75
+	0x1D, 0x7C, 0x76, 0xED, 0xC2, 0x10, 0x3C, 0xB5,
+	0x14, 0x07, 0x3C, 0x33, 0x7B, 0xBE, 0x9E, 0xA9,
+	0x01, 0xC5, 0xAA, 0xA6, 0xB6, 0x7A, 0xE1, 0xDB,
+	0x39, 0xAA, 0xAA, 0xF4, 0xEE, 0xA7, 0x71, 0x71,
+	0x78, 0x0D, 0x5A, 0xD4, 0xF9, 0xCD, 0x75, 0xD1,
+	0x9C, 0x7F, 0xC8, 0x58, 0x46, 0x7A, 0xD1, 0x81,
+	0xEA, 0xCC, 0x08, 0xDC, 0x82, 0x73, 0x22, 0x08,
+	0x11, 0x73, 0x7C, 0xB1, 0x84, 0x6A, 0x8E, 0x67,
+	0x3F, 0x5D, 0xDB, 0x0E, 0xE2, 0xC2, 0xCB, 0x6D,
+	0x88, 0xEC, 0x3F, 0x50, 0x44, 0xD3, 0x47, 0x6E,
+	0xDD, 0x42, 0xDC, 0x2A, 0x5E, 0x5C, 0x50, 0x24,
+	0x57, 0x8A, 0xE7, 0xC5, 0x53, 0x6D, 0x89, 0x33,
+	0x21, 0x65, 0x82, 0xD6, 0xE9, 0xE7, 0x77, 0x10,
+	0xC2, 0x09, 0x91, 0xC1, 0x42, 0x62, 0x36, 0xF4,
+	0x43, 0x37, 0x95, 0xB3, 0x7E, 0x21, 0xC5, 0x3E,
+	0x65, 0xCB, 0xB6, 0xAA, 0xEC, 0xA5, 0xC6, 0x5C,
+	0x4D, 0xBE, 0x14, 0xF1, 0x98, 0xBF, 0x6C, 0x8A,
+	0x9E, 0x9F, 0xD4, 0xB4, 0xF2, 0x22, 0x96, 0x99,
+	0x37, 0x32, 0xB6, 0xC1, 0x04, 0x66, 0x52, 0x37,
+	0x5D, 0x5F, 0x58, 0x92, 0xC9, 0x97, 0xEA, 0x60,
+	0x60, 0x27, 0x57, 0xF9, 0x47, 0x4F, 0xBC, 0xDF,
+	0x05, 0xBD, 0x37, 0x87, 0xBB, 0x09, 0xA5, 0xBE,
+	0xC1, 0xFC, 0x32, 0x86, 0x6A, 0xB7, 0x8B, 0x1E,
+	0x6B, 0xCE, 0x8D, 0x81, 0x63, 0x4C, 0xF2, 0x7F,
+	0xD1, 0x45, 0x82, 0xE8, 0x0D, 0x1C, 0x4D, 0xA8,
+	0xBF, 0x2D, 0x2B, 0x52, 0xE5, 0xDB, 0xAB, 0xFD,
+	0x04, 0xA2, 0xA1, 0x1E, 0x21, 0x1D, 0x06, 0x9A,
+	0xC2, 0x7D, 0x99, 0xFC, 0xB4, 0x72, 0x89, 0x41,
+	0x55, 0x69, 0xFA, 0x1F, 0x78, 0x2F, 0x35, 0x59,
+	0xD7, 0x59, 0x6D, 0xA6, 0x45, 0xC9, 0x2B, 0x06,
+	0x6C, 0xEC, 0x83, 0x34, 0xA5, 0x08, 0xDB, 0x6F,
+	0xDE, 0x75, 0x21, 0x9B, 0xB0, 0xCB, 0x0A, 0xAE,
+	0x22, 0x99, 0x74, 0x1C, 0x9D, 0x37, 0x0E, 0xC6,
+	0x3A, 0x45, 0x49, 0xE5, 0xE3, 0x21, 0x11, 0xEA,
+	0x34, 0x25, 0xD5, 0x76, 0xB0, 0x30, 0x19, 0x87,
+	0x14, 0x3A, 0x10, 0x6F, 0x6D, 0xDD, 0xE9, 0x60,
+	0x6A, 0x00, 0x6A, 0x4C, 0x5B, 0x85, 0x3E, 0x1A,
+	0x41, 0xFA, 0xDE, 0x2D, 0x2F, 0x2E, 0x5B, 0x79,
+	0x09, 0x66, 0x65, 0xD0, 0xDB, 0x32, 0x05, 0xB5,
+	0xEA, 0xFB, 0x6A, 0xD5, 0x43, 0xF8, 0xBD, 0x98,
+	0x7B, 0x8E, 0x3B, 0x85, 0x89, 0x5D, 0xC5, 0x59,
+	0x54, 0x22, 0x75, 0xA8, 0x60, 0xDC, 0x0A, 0x37,
+	0x8C, 0xD8, 0x05, 0xEA, 0x62, 0x62, 0x71, 0x98,
+	0x0C, 0xCB, 0xCE, 0x0A, 0xD9, 0xE6, 0xE8, 0xA7,
+	0xB3, 0x2D, 0x89, 0xA7, 0x60, 0xF0, 0x42, 0xA7,
+	0x3D, 0x80, 0x44, 0xE7, 0xC1, 0xA6, 0x88, 0xB1,
+	0x4F, 0xC0, 0xB1, 0xAF, 0x40, 0xF3, 0x54, 0x72,
+	0x8F, 0xAF, 0x47, 0x96, 0x19, 0xEB, 0xA5, 0x5C,
+	0x00, 0x3B, 0x36, 0xC8, 0x3F, 0x1E, 0x63, 0x54,
+	0xF3, 0x3D, 0x85, 0x44, 0x9B, 0x9B, 0x20, 0xE3,
+	0x9D, 0xEF, 0x62, 0x21, 0xA1, 0x0B, 0x78, 0xF4,
+	0x2B, 0x89, 0x66, 0x5E, 0x97, 0xC6, 0xC4, 0x55,
+	0x35, 0x32, 0xD7, 0x44, 0x95, 0x9A, 0xE7, 0xF2,
+	0x57, 0x52, 0x5B, 0x92, 0x86, 0x8F, 0x8B, 0xCF,
+	0x41, 0x89, 0xF6, 0x2A, 0xD3, 0x42, 0x87, 0x43,
+	0x56, 0x1F, 0x0E, 0x49, 0xF1, 0x32, 0x6D, 0xA8,
+	0x62, 0xDF, 0x47, 0xBB, 0xB6, 0x53, 0xF8, 0x5C,
+	0x36, 0xDA, 0x34, 0x34, 0x2D, 0x2E, 0x1D, 0x33,
+	0xAF, 0x6A, 0x1E, 0xF1, 0xC9, 0x72, 0xB5, 0x3C,
+	0x64, 0x4C, 0x96, 0x12, 0x78, 0x67, 0x6A, 0xE5,
+	0x8B, 0x05, 0x80, 0xAE, 0x7D, 0xE5, 0x9B, 0x24,
+	0xDB, 0xFF, 0x1E, 0xB8, 0x36, 0x6D, 0x3D, 0x5D,
+	0x73, 0x65, 0x72, 0x73, 0x2C, 0x20, 0x73, 0x75
 };
 
 /* AES128-CTR-SHA1 test vector */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.278433577 +0100
+++ 0148-test-crypto-change-cipher-offset-for-ESN-vector.patch	2020-07-24 12:53:48.511010633 +0100
@@ -1,15 +1,16 @@
-From 27f30e288eb6aebf36c9e5a73ce71aa549630cc5 Mon Sep 17 00:00:00 2001
+From 02a7eb3b6d12fb2671bfce0fd09b6c7308eb9f9b Mon Sep 17 00:00:00 2001
 From: Ankur Dwivedi <adwivedi@marvell.com>
 Date: Fri, 5 Jun 2020 14:00:33 +0530
 Subject: [PATCH] test/crypto: change cipher offset for ESN vector
 
+[ upstream commit 27f30e288eb6aebf36c9e5a73ce71aa549630cc5 ]
+
 In the IPSEC ESN test vector the cipher offset for encryption
 should be 8 bytes which is the size of esp header.
 This patch also changes the ciphertext and the digest reference
 data against which the operation result is validated.
 
 Fixes: 699741912d71 ("test/crypto: add case for auth only trailer")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
 Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
@@ -19,10 +20,10 @@
  2 files changed, 67 insertions(+), 67 deletions(-)
 
 diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
-index e71e73ae1..42e47059a 100644
+index db9dd3aec..e350e9d37 100644
 --- a/app/test/test_cryptodev.c
 +++ b/app/test/test_cryptodev.c
-@@ -10381,7 +10381,7 @@ aes128cbc_hmac_sha1_test_vector = {
+@@ -10464,7 +10464,7 @@ aes128cbc_hmac_sha1_test_vector = {
  static const struct test_crypto_vector
  aes128cbc_hmac_sha1_aad_test_vector = {
  	.crypto_algo = RTE_CRYPTO_CIPHER_AES_CBC,
@@ -31,7 +32,7 @@
  	.cipher_len = 496,
  	.cipher_key = {
  		.data = {
-@@ -10417,9 +10417,9 @@ aes128cbc_hmac_sha1_aad_test_vector = {
+@@ -10500,9 +10500,9 @@ aes128cbc_hmac_sha1_aad_test_vector = {
  	},
  	.digest = {
  		.data = {
@@ -45,10 +46,10 @@
  		.len = 20
  	}
 diff --git a/app/test/test_cryptodev_aes_test_vectors.h b/app/test/test_cryptodev_aes_test_vectors.h
-index 3c38eeeef..f56bbdd4a 100644
+index 8307fcf9a..66994b659 100644
 --- a/app/test/test_cryptodev_aes_test_vectors.h
 +++ b/app/test/test_cryptodev_aes_test_vectors.h
-@@ -368,69 +368,69 @@ static const struct blockcipher_test_data null_test_data_chain_x1_multiple = {
+@@ -358,69 +358,69 @@ static const struct blockcipher_test_data null_test_data_chain_x1_multiple = {
  
  static const uint8_t ciphertext512_aes128cbc_aad[] = {
  	0x57, 0x68, 0x61, 0x74, 0x20, 0x61, 0x20, 0x6C,

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

* [dpdk-stable] patch 'examples/fips_validation: fix TDES interim callback' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (146 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'test/crypto: change cipher offset for ESN vector' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'examples/fips_validation: fix parsing of TDES vectors' " luca.boccassi
                   ` (43 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Archana Muniganti; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From d270852ab71c8383474f5a7a62c7afa69845bd27 Mon Sep 17 00:00:00 2001
From: Archana Muniganti <marchana@marvell.com>
Date: Thu, 11 Jun 2020 19:14:15 +0530
Subject: [PATCH] examples/fips_validation: fix TDES interim callback

[ upstream commit a18622864c8e9e7f7eea463db69ec3d4df00efdc ]

Fix missing callback registration and the incorrect
callback definition for interim NK_STR. The callback
should compare input key against the interim.

Fixes: 527cbf3d5ee3 ("examples/fips_validation: support TDES parsing")

Signed-off-by: Archana Muniganti <marchana@marvell.com>
---
 .../fips_validation/fips_validation_tdes.c    | 25 ++++++++++---------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/examples/fips_validation/fips_validation_tdes.c b/examples/fips_validation/fips_validation_tdes.c
index 5b6737643..f4c738c78 100644
--- a/examples/fips_validation/fips_validation_tdes.c
+++ b/examples/fips_validation/fips_validation_tdes.c
@@ -59,9 +59,7 @@ static int
 parse_tdes_uint8_hex_str(const char *key, char *src, struct fips_val *val);
 
 static int
-parse_tdes_interim(const char *key,
-		__attribute__((__unused__)) char *text,
-		struct fips_val *val);
+parse_tdes_interim(const char *key, char *text, struct fips_val *val);
 
 struct fips_test_callback tdes_tests_vectors[] = {
 		{KEYS_STR, parse_tdes_uint8_hex_str, &vec.cipher_auth.key},
@@ -77,6 +75,7 @@ struct fips_test_callback tdes_tests_vectors[] = {
 struct fips_test_callback tdes_tests_interim_vectors[] = {
 		{ENC_STR, parse_tdes_interim, NULL},
 		{DEC_STR, parse_tdes_interim, NULL},
+		{NK_STR, parse_tdes_interim, NULL},
 		{NULL, NULL, NULL} /**< end pointer */
 };
 
@@ -94,21 +93,23 @@ struct fips_test_callback tdes_writeback_callbacks[] = {
 };
 
 static int
-parse_tdes_interim(const char *key,
-		__attribute__((__unused__)) char *text,
+parse_tdes_interim(const char *key, char *text,
 		__attribute__((__unused__)) struct fips_val *val)
 {
 	if (strstr(key, ENC_STR))
 		info.op = FIPS_TEST_ENC_AUTH_GEN;
 	else if (strstr(key, DEC_STR))
 		info.op = FIPS_TEST_DEC_AUTH_VERIF;
-	else if (strstr(NK_STR, "NumKeys = 1"))
-		info.interim_info.tdes_data.nb_keys = 1;
-	else if (strstr(NK_STR, "NumKeys = 2"))
-		info.interim_info.tdes_data.nb_keys = 2;
-	else if (strstr(NK_STR, "NumKeys = 3"))
-		info.interim_info.tdes_data.nb_keys = 3;
-	else
+	else if (strstr(key, NK_STR)) {
+		if (strcmp(text, "NumKeys = 1") == 0)
+			info.interim_info.tdes_data.nb_keys = 1;
+		else if (strcmp(text, "NumKeys = 2") == 0)
+			info.interim_info.tdes_data.nb_keys = 2;
+		else if (strcmp(text, "NumKeys = 3") == 0)
+			info.interim_info.tdes_data.nb_keys = 3;
+		else
+			return -EINVAL;
+	} else
 		return -EINVAL;
 
 	return 0;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.326981327 +0100
+++ 0149-examples-fips_validation-fix-TDES-interim-callback.patch	2020-07-24 12:53:48.511010633 +0100
@@ -1,14 +1,15 @@
-From a18622864c8e9e7f7eea463db69ec3d4df00efdc Mon Sep 17 00:00:00 2001
+From d270852ab71c8383474f5a7a62c7afa69845bd27 Mon Sep 17 00:00:00 2001
 From: Archana Muniganti <marchana@marvell.com>
 Date: Thu, 11 Jun 2020 19:14:15 +0530
 Subject: [PATCH] examples/fips_validation: fix TDES interim callback
 
+[ upstream commit a18622864c8e9e7f7eea463db69ec3d4df00efdc ]
+
 Fix missing callback registration and the incorrect
 callback definition for interim NK_STR. The callback
 should compare input key against the interim.
 
 Fixes: 527cbf3d5ee3 ("examples/fips_validation: support TDES parsing")
-Cc: stable@dpdk.org
 
 Signed-off-by: Archana Muniganti <marchana@marvell.com>
 ---
@@ -16,7 +17,7 @@
  1 file changed, 13 insertions(+), 12 deletions(-)
 
 diff --git a/examples/fips_validation/fips_validation_tdes.c b/examples/fips_validation/fips_validation_tdes.c
-index 84dd288e6..a1ddd57cf 100644
+index 5b6737643..f4c738c78 100644
 --- a/examples/fips_validation/fips_validation_tdes.c
 +++ b/examples/fips_validation/fips_validation_tdes.c
 @@ -59,9 +59,7 @@ static int
@@ -24,7 +25,7 @@
  
  static int
 -parse_tdes_interim(const char *key,
--		__rte_unused char *text,
+-		__attribute__((__unused__)) char *text,
 -		struct fips_val *val);
 +parse_tdes_interim(const char *key, char *text, struct fips_val *val);
  
@@ -43,9 +44,9 @@
  
  static int
 -parse_tdes_interim(const char *key,
--		__rte_unused char *text,
+-		__attribute__((__unused__)) char *text,
 +parse_tdes_interim(const char *key, char *text,
- 		__rte_unused struct fips_val *val)
+ 		__attribute__((__unused__)) struct fips_val *val)
  {
  	if (strstr(key, ENC_STR))
  		info.op = FIPS_TEST_ENC_AUTH_GEN;

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

* [dpdk-stable] patch 'examples/fips_validation: fix parsing of TDES vectors' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (147 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'examples/fips_validation: fix TDES interim callback' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'examples/fips_validation: fix count overwrite for TDES' " luca.boccassi
                   ` (42 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Ayuj Verma; +Cc: Archana Muniganti, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 215e6ceee6a33978b52b1a4d5cf1c4bd12d3389f Mon Sep 17 00:00:00 2001
From: Ayuj Verma <ayverma@marvell.com>
Date: Thu, 11 Jun 2020 19:14:16 +0530
Subject: [PATCH] examples/fips_validation: fix parsing of TDES vectors

[ upstream commit 32440cdf2af9ad38fd32a533f51a32da92345007 ]

Processing of test vector for COUNT = 0 is getting skipped, as
some of the NIST TDES files doesn't have an empty line after
[ENCRYPT]/[DECRYPT] and thus treated as an interim block.

Parse function now identifies such blocks, separates out interim
and test vector data, and then parses each with their respective
callbacks.

Fixes: 3d0fad56b74a ("examples/fips_validation: add crypto FIPS application")

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Ayuj Verma <ayverma@marvell.com>
---
 examples/fips_validation/fips_validation.c | 21 +++++++++++++++------
 examples/fips_validation/fips_validation.h |  1 +
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c
index b79a095ac..bffc682de 100644
--- a/examples/fips_validation/fips_validation.c
+++ b/examples/fips_validation/fips_validation.c
@@ -334,11 +334,13 @@ int
 fips_test_parse_one_case(void)
 {
 	uint32_t i, j = 0;
-	uint32_t is_interim = 0;
+	uint32_t is_interim;
+	uint32_t interim_cnt = 0;
 	int ret;
 
 	if (info.interim_callbacks) {
 		for (i = 0; i < info.nb_vec_lines; i++) {
+			is_interim = 0;
 			for (j = 0; info.interim_callbacks[j].key != NULL; j++)
 				if (strstr(info.vec[i],
 					info.interim_callbacks[j].key)) {
@@ -351,17 +353,24 @@ fips_test_parse_one_case(void)
 					if (ret < 0)
 						return ret;
 				}
+
+			if (is_interim)
+				interim_cnt += 1;
 		}
 	}
 
-	if (is_interim) {
-		for (i = 0; i < info.nb_vec_lines; i++)
+	info.vec_start_off = interim_cnt;
+
+	if (interim_cnt) {
+		for (i = 0; i < interim_cnt; i++)
 			fprintf(info.fp_wr, "%s\n", info.vec[i]);
 		fprintf(info.fp_wr, "\n");
-		return 1;
+
+		if (info.nb_vec_lines == interim_cnt)
+			return 1;
 	}
 
-	for (i = 0; i < info.nb_vec_lines; i++) {
+	for (i = info.vec_start_off; i < info.nb_vec_lines; i++) {
 		for (j = 0; info.callbacks[j].key != NULL; j++)
 			if (strstr(info.vec[i], info.callbacks[j].key)) {
 				ret = info.callbacks[j].cb(
@@ -381,7 +390,7 @@ fips_test_write_one_case(void)
 {
 	uint32_t i;
 
-	for (i = 0; i < info.nb_vec_lines; i++)
+	for (i = info.vec_start_off; i < info.nb_vec_lines; i++)
 		fprintf(info.fp_wr, "%s\n", info.vec[i]);
 }
 
diff --git a/examples/fips_validation/fips_validation.h b/examples/fips_validation/fips_validation.h
index d487fb005..d51736529 100644
--- a/examples/fips_validation/fips_validation.h
+++ b/examples/fips_validation/fips_validation.h
@@ -160,6 +160,7 @@ struct fips_test_interim_info {
 	enum fips_test_algorithms algo;
 	char *one_line_text;
 	char *vec[MAX_LINE_PER_VECTOR];
+	uint32_t vec_start_off;
 	uint32_t nb_vec_lines;
 	char device_name[MAX_STRING_SIZE];
 	char file_name[MAX_STRING_SIZE];
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.360281944 +0100
+++ 0150-examples-fips_validation-fix-parsing-of-TDES-vectors.patch	2020-07-24 12:53:48.511010633 +0100
@@ -1,8 +1,10 @@
-From 32440cdf2af9ad38fd32a533f51a32da92345007 Mon Sep 17 00:00:00 2001
+From 215e6ceee6a33978b52b1a4d5cf1c4bd12d3389f Mon Sep 17 00:00:00 2001
 From: Ayuj Verma <ayverma@marvell.com>
 Date: Thu, 11 Jun 2020 19:14:16 +0530
 Subject: [PATCH] examples/fips_validation: fix parsing of TDES vectors
 
+[ upstream commit 32440cdf2af9ad38fd32a533f51a32da92345007 ]
+
 Processing of test vector for COUNT = 0 is getting skipped, as
 some of the NIST TDES files doesn't have an empty line after
 [ENCRYPT]/[DECRYPT] and thus treated as an interim block.
@@ -12,7 +14,6 @@
 callbacks.
 
 Fixes: 3d0fad56b74a ("examples/fips_validation: add crypto FIPS application")
-Cc: stable@dpdk.org
 
 Signed-off-by: Archana Muniganti <marchana@marvell.com>
 Signed-off-by: Ayuj Verma <ayverma@marvell.com>
@@ -22,10 +23,10 @@
  2 files changed, 16 insertions(+), 6 deletions(-)
 
 diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c
-index a34e34d25..3aaec20fb 100644
+index b79a095ac..bffc682de 100644
 --- a/examples/fips_validation/fips_validation.c
 +++ b/examples/fips_validation/fips_validation.c
-@@ -340,11 +340,13 @@ int
+@@ -334,11 +334,13 @@ int
  fips_test_parse_one_case(void)
  {
  	uint32_t i, j = 0;
@@ -40,7 +41,7 @@
  			for (j = 0; info.interim_callbacks[j].key != NULL; j++)
  				if (strstr(info.vec[i],
  					info.interim_callbacks[j].key)) {
-@@ -357,17 +359,24 @@ fips_test_parse_one_case(void)
+@@ -351,17 +353,24 @@ fips_test_parse_one_case(void)
  					if (ret < 0)
  						return ret;
  				}
@@ -69,7 +70,7 @@
  		for (j = 0; info.callbacks[j].key != NULL; j++)
  			if (strstr(info.vec[i], info.callbacks[j].key)) {
  				ret = info.callbacks[j].cb(
-@@ -387,7 +396,7 @@ fips_test_write_one_case(void)
+@@ -381,7 +390,7 @@ fips_test_write_one_case(void)
  {
  	uint32_t i;
  
@@ -79,10 +80,10 @@
  }
  
 diff --git a/examples/fips_validation/fips_validation.h b/examples/fips_validation/fips_validation.h
-index 5aee955c1..75fa555fa 100644
+index d487fb005..d51736529 100644
 --- a/examples/fips_validation/fips_validation.h
 +++ b/examples/fips_validation/fips_validation.h
-@@ -161,6 +161,7 @@ struct fips_test_interim_info {
+@@ -160,6 +160,7 @@ struct fips_test_interim_info {
  	enum fips_test_algorithms algo;
  	char *one_line_text;
  	char *vec[MAX_LINE_PER_VECTOR];

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

* [dpdk-stable] patch 'examples/fips_validation: fix count overwrite for TDES' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (148 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'examples/fips_validation: fix parsing of TDES vectors' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/ice/base: fix RSS removal for GTP-U' " luca.boccassi
                   ` (41 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Archana Muniganti; +Cc: Kanaka Durga Kotamarthy, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From c60c846704d54c8456446f308b5065c08cde4772 Mon Sep 17 00:00:00 2001
From: Archana Muniganti <marchana@marvell.com>
Date: Thu, 11 Jun 2020 19:14:17 +0530
Subject: [PATCH] examples/fips_validation: fix count overwrite for TDES

[ upstream commit 2b84d2bd47df6545797ed9841636eb8023c4db7b ]

Application updates first line of each test vector with
COUNT = i(where i = 1,2,3..) assuming first line contains
COUNT string. But few of the TDES input test vectors don't
contain COUNT string and thus COUNT is getting overwritten on
other data.

Fixes: 527cbf3d5ee3 ("examples/fips_validation: support TDES parsing")

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Signed-off-by: Kanaka Durga Kotamarthy <kkotamarthy@marvell.com>
---
 examples/fips_validation/fips_validation.c | 8 ++++++++
 examples/fips_validation/main.c            | 5 ++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c
index bffc682de..303f03495 100644
--- a/examples/fips_validation/fips_validation.c
+++ b/examples/fips_validation/fips_validation.c
@@ -634,6 +634,14 @@ update_info_vec(uint32_t count)
 
 	cb = &info.writeback_callbacks[0];
 
+	if (!(strstr(info.vec[0], cb->key))) {
+		fprintf(info.fp_wr, "%s%u\n", cb->key, count);
+		i = 0;
+	} else {
+		snprintf(info.vec[0], strlen(info.vec[0]) + 4, "%s%u", cb->key,
+				count);
+		i = 1;
+	}
 	snprintf(info.vec[0], strlen(info.vec[0]) + 4, "%s%u", cb->key, count);
 
 	for (i = 1; i < info.nb_vec_lines; i++) {
diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index 9a2c8da61..693ad9b48 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -1030,7 +1030,10 @@ fips_mct_tdes_test(void)
 	int test_mode = info.interim_info.tdes_data.test_mode;
 
 	for (i = 0; i < TDES_EXTERN_ITER; i++) {
-		if (i != 0)
+		if (i == 0) {
+			if (!(strstr(info.vec[0], "COUNT")))
+				fprintf(info.fp_wr, "%s%u\n", "COUNT = ", 0);
+		} else
 			update_info_vec(i);
 
 		fips_test_write_one_case();
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.393053800 +0100
+++ 0151-examples-fips_validation-fix-count-overwrite-for-TDE.patch	2020-07-24 12:53:48.515010708 +0100
@@ -1,8 +1,10 @@
-From 2b84d2bd47df6545797ed9841636eb8023c4db7b Mon Sep 17 00:00:00 2001
+From c60c846704d54c8456446f308b5065c08cde4772 Mon Sep 17 00:00:00 2001
 From: Archana Muniganti <marchana@marvell.com>
 Date: Thu, 11 Jun 2020 19:14:17 +0530
 Subject: [PATCH] examples/fips_validation: fix count overwrite for TDES
 
+[ upstream commit 2b84d2bd47df6545797ed9841636eb8023c4db7b ]
+
 Application updates first line of each test vector with
 COUNT = i(where i = 1,2,3..) assuming first line contains
 COUNT string. But few of the TDES input test vectors don't
@@ -10,7 +12,6 @@
 other data.
 
 Fixes: 527cbf3d5ee3 ("examples/fips_validation: support TDES parsing")
-Cc: stable@dpdk.org
 
 Signed-off-by: Archana Muniganti <marchana@marvell.com>
 Signed-off-by: Kanaka Durga Kotamarthy <kkotamarthy@marvell.com>
@@ -20,10 +21,10 @@
  2 files changed, 12 insertions(+), 1 deletion(-)
 
 diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c
-index 3aaec20fb..9bdf257b8 100644
+index bffc682de..303f03495 100644
 --- a/examples/fips_validation/fips_validation.c
 +++ b/examples/fips_validation/fips_validation.c
-@@ -640,6 +640,14 @@ update_info_vec(uint32_t count)
+@@ -634,6 +634,14 @@ update_info_vec(uint32_t count)
  
  	cb = &info.writeback_callbacks[0];
  
@@ -39,10 +40,10 @@
  
  	for (i = 1; i < info.nb_vec_lines; i++) {
 diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
-index f9b2056bf..efd32a86a 100644
+index 9a2c8da61..693ad9b48 100644
 --- a/examples/fips_validation/main.c
 +++ b/examples/fips_validation/main.c
-@@ -1070,7 +1070,10 @@ fips_mct_tdes_test(void)
+@@ -1030,7 +1030,10 @@ fips_mct_tdes_test(void)
  	int test_mode = info.interim_info.tdes_data.test_mode;
  
  	for (i = 0; i < TDES_EXTERN_ITER; i++) {

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

* [dpdk-stable] patch 'net/ice/base: fix RSS removal for GTP-U' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (149 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'examples/fips_validation: fix count overwrite for TDES' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/hns3: fix RSS configuration on empty RSS type' " luca.boccassi
                   ` (40 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Junfeng Guo; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 8f9e2f8855833c56c41d2155440c3362467fb8da Mon Sep 17 00:00:00 2001
From: Junfeng Guo <junfeng.guo@intel.com>
Date: Mon, 13 Jul 2020 19:05:40 +0800
Subject: [PATCH] net/ice/base: fix RSS removal for GTP-U

[ upstream commit 27dc00646f54c5fd885ecbd7498d3158ed2fc458 ]

Previous logic in removing RSS for GTPU was added in incorrect lines.
The adjustment in this patch will correct the code order so that RSS
for GTPU can be removed successfully.

We also delete the redundant print statement and cleanup the coding
style in this patch.

Fixes: bed9bb3139ef ("net/ice/base: fix GTP-U inner RSS IPv4 IPv6 co-exist")

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/ice/base/ice_flow.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index 9d958b329..83432bd20 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -2126,10 +2126,8 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
 
 	/* don't do RSS for GTPU outer */
 	if (segs_cnt == ICE_RSS_OUTER_HEADERS &&
-	    (segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU)) {
-		printf("ignore gtpu\n");
+	    segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU)
 		return ICE_SUCCESS;
-	}
 
 	/* Search for a flow profile that has matching headers, hash fields
 	 * and has the input VSI associated to it. If found, no further
@@ -2281,16 +2279,16 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
 	if (!segs)
 		return ICE_ERR_NO_MEMORY;
 
-	if (segs_cnt == ICE_RSS_OUTER_HEADERS &&
-	    segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU)
-		return ICE_SUCCESS;
-
 	/* Construct the packet segment info from the hashed fields */
 	status = ice_flow_set_rss_seg_info(&segs[segs_cnt - 1], hashed_flds,
 					   addl_hdrs);
 	if (status)
 		goto out;
 
+	if (segs_cnt == ICE_RSS_OUTER_HEADERS &&
+	    segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU)
+		return ICE_SUCCESS;
+
 	prof = ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, segs_cnt,
 					vsi_handle,
 					ICE_FLOW_FIND_PROF_CHK_FLDS);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.427909564 +0100
+++ 0152-net-ice-base-fix-RSS-removal-for-GTP-U.patch	2020-07-24 12:53:48.515010708 +0100
@@ -1,8 +1,10 @@
-From 27dc00646f54c5fd885ecbd7498d3158ed2fc458 Mon Sep 17 00:00:00 2001
+From 8f9e2f8855833c56c41d2155440c3362467fb8da Mon Sep 17 00:00:00 2001
 From: Junfeng Guo <junfeng.guo@intel.com>
 Date: Mon, 13 Jul 2020 19:05:40 +0800
 Subject: [PATCH] net/ice/base: fix RSS removal for GTP-U
 
+[ upstream commit 27dc00646f54c5fd885ecbd7498d3158ed2fc458 ]
+
 Previous logic in removing RSS for GTPU was added in incorrect lines.
 The adjustment in this patch will correct the code order so that RSS
 for GTPU can be removed successfully.
@@ -11,7 +13,6 @@
 style in this patch.
 
 Fixes: bed9bb3139ef ("net/ice/base: fix GTP-U inner RSS IPv4 IPv6 co-exist")
-Cc: stable@dpdk.org
 
 Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -20,10 +21,10 @@
  1 file changed, 5 insertions(+), 7 deletions(-)
 
 diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
-index d1b8a0534..9a17d956b 100644
+index 9d958b329..83432bd20 100644
 --- a/drivers/net/ice/base/ice_flow.c
 +++ b/drivers/net/ice/base/ice_flow.c
-@@ -3559,10 +3559,8 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
+@@ -2126,10 +2126,8 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
  
  	/* don't do RSS for GTPU outer */
  	if (segs_cnt == ICE_RSS_OUTER_HEADERS &&
@@ -35,7 +36,7 @@
  
  	/* Search for a flow profile that has matching headers, hash fields
  	 * and has the input VSI associated to it. If found, no further
-@@ -3714,16 +3712,16 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
+@@ -2281,16 +2279,16 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
  	if (!segs)
  		return ICE_ERR_NO_MEMORY;
  

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

* [dpdk-stable] patch 'net/hns3: fix RSS configuration on empty RSS type' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (150 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/ice/base: fix RSS removal for GTP-U' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/bonding: fix error code on device creation' " luca.boccassi
                   ` (39 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Lijun Ou; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From ee3db912a5c774334e7992beb804e5e607715101 Mon Sep 17 00:00:00 2001
From: Lijun Ou <oulijun@huawei.com>
Date: Tue, 14 Jul 2020 14:16:09 +0800
Subject: [PATCH] net/hns3: fix RSS configuration on empty RSS type

[ upstream commit 2bc3b95deb4145d42bb4159b70d8a7a0451badde ]

According to the definition of RSS types of action attributes from
testpmd, the driver will not disable RSS but instead requests the
unspecified "best-effort" settings when upper application call
rte_flow_create API function to create flow using empty RSS types.

As a result, here use the default RSS types when RSS types is empty.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 7d5ba61c6..0301d6b16 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1484,7 +1484,9 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
 	}
 
 	/* Filter the unsupported flow types */
-	flow_types = rss_flow_conf.types & HNS3_ETH_RSS_SUPPORT;
+	flow_types = conf->conf.types ?
+		     rss_flow_conf.types & HNS3_ETH_RSS_SUPPORT :
+		     hw->rss_info.conf.types;
 	if (flow_types != rss_flow_conf.types)
 		hns3_warn(hw, "modified RSS types based on hardware support, "
 			      "requested:%" PRIx64 " configured:%" PRIx64,
@@ -1492,9 +1494,6 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
 	/* Update the useful flow types */
 	rss_flow_conf.types = flow_types;
 
-	if ((rss_flow_conf.types & ETH_RSS_PROTO_MASK) == 0)
-		return hns3_disable_rss(hw);
-
 	rss_info = &hw->rss_info;
 	if (!add) {
 		if (hns3_action_rss_same(&rss_info->conf, &rss_flow_conf)) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.467554297 +0100
+++ 0153-net-hns3-fix-RSS-configuration-on-empty-RSS-type.patch	2020-07-24 12:53:48.519010782 +0100
@@ -1,8 +1,10 @@
-From 2bc3b95deb4145d42bb4159b70d8a7a0451badde Mon Sep 17 00:00:00 2001
+From ee3db912a5c774334e7992beb804e5e607715101 Mon Sep 17 00:00:00 2001
 From: Lijun Ou <oulijun@huawei.com>
 Date: Tue, 14 Jul 2020 14:16:09 +0800
 Subject: [PATCH] net/hns3: fix RSS configuration on empty RSS type
 
+[ upstream commit 2bc3b95deb4145d42bb4159b70d8a7a0451badde ]
+
 According to the definition of RSS types of action attributes from
 testpmd, the driver will not disable RSS but instead requests the
 unspecified "best-effort" settings when upper application call
@@ -11,7 +13,6 @@
 As a result, here use the default RSS types when RSS types is empty.
 
 Fixes: c37ca66f2b27 ("net/hns3: support RSS")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lijun Ou <oulijun@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -20,10 +21,10 @@
  1 file changed, 3 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
-index 1e58ad70f..7ec46aef8 100644
+index 7d5ba61c6..0301d6b16 100644
 --- a/drivers/net/hns3/hns3_flow.c
 +++ b/drivers/net/hns3/hns3_flow.c
-@@ -1486,7 +1486,9 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
+@@ -1484,7 +1484,9 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
  	}
  
  	/* Filter the unsupported flow types */
@@ -34,7 +35,7 @@
  	if (flow_types != rss_flow_conf.types)
  		hns3_warn(hw, "modified RSS types based on hardware support, "
  			      "requested:%" PRIx64 " configured:%" PRIx64,
-@@ -1494,9 +1496,6 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
+@@ -1492,9 +1494,6 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
  	/* Update the useful flow types */
  	rss_flow_conf.types = flow_types;
  

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

* [dpdk-stable] patch 'net/bonding: fix error code on device creation' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (151 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/hns3: fix RSS configuration on empty RSS type' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/af_packet: fix check of file descriptors' " luca.boccassi
                   ` (38 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Wei Hu (Xavier); +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From cfc26947ca6bf20ff3b3ac1c62b5b55d27db0bb1 Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Tue, 14 Jul 2020 16:19:43 +0800
Subject: [PATCH] net/bonding: fix error code on device creation

[ upstream commit 2dd4f08540cc32cc1a62579d66d055327638ac92 ]

Because the return value of rte_vdev_init() has multiple non-zero
values, when rte_vdev_init() return non-zero in the
rte_eth_bond_create() function, it should return the actual error code
rather than -ENOMEM.

Fixes: 68451eb6698c ("net/bonding: call through EAL on create/free")

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_api.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index f38eb3b47..d77dc4096 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -167,7 +167,7 @@ rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id)
 
 	ret = rte_vdev_init(name, devargs);
 	if (ret)
-		return -ENOMEM;
+		return ret;
 
 	ret = rte_eth_dev_get_port_by_name(name, &port_id);
 	RTE_ASSERT(!ret);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.502992230 +0100
+++ 0154-net-bonding-fix-error-code-on-device-creation.patch	2020-07-24 12:53:48.519010782 +0100
@@ -1,15 +1,16 @@
-From 2dd4f08540cc32cc1a62579d66d055327638ac92 Mon Sep 17 00:00:00 2001
+From cfc26947ca6bf20ff3b3ac1c62b5b55d27db0bb1 Mon Sep 17 00:00:00 2001
 From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
 Date: Tue, 14 Jul 2020 16:19:43 +0800
 Subject: [PATCH] net/bonding: fix error code on device creation
 
+[ upstream commit 2dd4f08540cc32cc1a62579d66d055327638ac92 ]
+
 Because the return value of rte_vdev_init() has multiple non-zero
 values, when rte_vdev_init() return non-zero in the
 rte_eth_bond_create() function, it should return the actual error code
 rather than -ENOMEM.
 
 Fixes: 68451eb6698c ("net/bonding: call through EAL on create/free")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
 ---

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

* [dpdk-stable] patch 'net/af_packet: fix check of file descriptors' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (152 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/bonding: fix error code on device creation' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/af_packet: fix memory leak on init failure' " luca.boccassi
                   ` (37 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 4dece22a2bd4e3301faa6555e6bf291c011ce3b4 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Mon, 6 Jul 2020 20:27:32 +0800
Subject: [PATCH] net/af_packet: fix check of file descriptors

[ upstream commit c6d1a552a8798df02bf85627c5d47a28ccdc62f8 ]

Zero is a valid fd. It will fail to check the fd if the fd is zero.

Fixes: 527740ccfaec ("af_packet: fix some leaks")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/af_packet/rte_eth_af_packet.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index f5806bf42..6c6bbaccf 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -604,6 +604,8 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,
 	for (q = 0; q < nb_queues; q++) {
 		(*internals)->rx_queue[q].map = MAP_FAILED;
 		(*internals)->tx_queue[q].map = MAP_FAILED;
+		(*internals)->rx_queue[q].sockfd = -1;
+		(*internals)->tx_queue[q].sockfd = -1;
 	}
 
 	req = &((*internals)->req);
@@ -807,7 +809,7 @@ error:
 
 		rte_free((*internals)->rx_queue[q].rd);
 		rte_free((*internals)->tx_queue[q].rd);
-		if (((*internals)->rx_queue[q].sockfd != 0) &&
+		if (((*internals)->rx_queue[q].sockfd >= 0) &&
 			((*internals)->rx_queue[q].sockfd != qsockfd))
 			close((*internals)->rx_queue[q].sockfd);
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.537386172 +0100
+++ 0155-net-af_packet-fix-check-of-file-descriptors.patch	2020-07-24 12:53:48.519010782 +0100
@@ -1,12 +1,13 @@
-From c6d1a552a8798df02bf85627c5d47a28ccdc62f8 Mon Sep 17 00:00:00 2001
+From 4dece22a2bd4e3301faa6555e6bf291c011ce3b4 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Mon, 6 Jul 2020 20:27:32 +0800
 Subject: [PATCH] net/af_packet: fix check of file descriptors
 
+[ upstream commit c6d1a552a8798df02bf85627c5d47a28ccdc62f8 ]
+
 Zero is a valid fd. It will fail to check the fd if the fd is zero.
 
 Fixes: 527740ccfaec ("af_packet: fix some leaks")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -15,10 +16,10 @@
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
-index e1e7f3973..db5de8e45 100644
+index f5806bf42..6c6bbaccf 100644
 --- a/drivers/net/af_packet/rte_eth_af_packet.c
 +++ b/drivers/net/af_packet/rte_eth_af_packet.c
-@@ -645,6 +645,8 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,
+@@ -604,6 +604,8 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,
  	for (q = 0; q < nb_queues; q++) {
  		(*internals)->rx_queue[q].map = MAP_FAILED;
  		(*internals)->tx_queue[q].map = MAP_FAILED;
@@ -27,7 +28,7 @@
  	}
  
  	req = &((*internals)->req);
-@@ -848,7 +850,7 @@ error:
+@@ -807,7 +809,7 @@ error:
  
  		rte_free((*internals)->rx_queue[q].rd);
  		rte_free((*internals)->tx_queue[q].rd);

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

* [dpdk-stable] patch 'net/af_packet: fix memory leak on init failure' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (153 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/af_packet: fix check of file descriptors' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/af_packet: fix munmap " luca.boccassi
                   ` (36 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 8298ac40093e6b800d4715da73cf4d2d44090f0f Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Mon, 6 Jul 2020 20:27:51 +0800
Subject: [PATCH] net/af_packet: fix memory leak on init failure

[ upstream commit 3400148949ea4edecba0256f4ab97e80f1d98474 ]

Add missing code to free memory when the device initialization fails.

Fixes: ccd37d341e8d ("net/af_packet: remove queue number limitation")
Fixes: 5f19dee604ed ("drivers/net: do not use private ethdev data")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/af_packet/rte_eth_af_packet.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 6c6bbaccf..841a7009a 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -623,20 +623,20 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,
 		PMD_LOG(ERR,
 			"%s: I/F name too long (%s)",
 			name, pair->value);
-		return -1;
+		goto free_internals;
 	}
 	if (ioctl(sockfd, SIOCGIFINDEX, &ifr) == -1) {
 		PMD_LOG_ERRNO(ERR, "%s: ioctl failed (SIOCGIFINDEX)", name);
-		return -1;
+		goto free_internals;
 	}
 	(*internals)->if_name = strdup(pair->value);
 	if ((*internals)->if_name == NULL)
-		return -1;
+		goto free_internals;
 	(*internals)->if_index = ifr.ifr_ifindex;
 
 	if (ioctl(sockfd, SIOCGIFHWADDR, &ifr) == -1) {
 		PMD_LOG_ERRNO(ERR, "%s: ioctl failed (SIOCGIFHWADDR)", name);
-		return -1;
+		goto free_internals;
 	}
 	memcpy(&(*internals)->eth_addr, ifr.ifr_hwaddr.sa_data, ETH_ALEN);
 
@@ -660,7 +660,7 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,
 			PMD_LOG_ERRNO(ERR,
 				"%s: could not open AF_PACKET socket",
 				name);
-			return -1;
+			goto error;
 		}
 
 		tpver = TPACKET_V2;
@@ -813,6 +813,9 @@ error:
 			((*internals)->rx_queue[q].sockfd != qsockfd))
 			close((*internals)->rx_queue[q].sockfd);
 	}
+free_internals:
+	rte_free((*internals)->rx_queue);
+	rte_free((*internals)->tx_queue);
 	free((*internals)->if_name);
 	rte_free(*internals);
 	return -1;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.572131535 +0100
+++ 0156-net-af_packet-fix-memory-leak-on-init-failure.patch	2020-07-24 12:53:48.519010782 +0100
@@ -1,36 +1,26 @@
-From 3400148949ea4edecba0256f4ab97e80f1d98474 Mon Sep 17 00:00:00 2001
+From 8298ac40093e6b800d4715da73cf4d2d44090f0f Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Mon, 6 Jul 2020 20:27:51 +0800
 Subject: [PATCH] net/af_packet: fix memory leak on init failure
 
+[ upstream commit 3400148949ea4edecba0256f4ab97e80f1d98474 ]
+
 Add missing code to free memory when the device initialization fails.
 
 Fixes: ccd37d341e8d ("net/af_packet: remove queue number limitation")
 Fixes: 5f19dee604ed ("drivers/net: do not use private ethdev data")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
 ---
- drivers/net/af_packet/rte_eth_af_packet.c | 17 +++++++++--------
- 1 file changed, 9 insertions(+), 8 deletions(-)
+ drivers/net/af_packet/rte_eth_af_packet.c | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
-index db5de8e45..62945fee2 100644
+index 6c6bbaccf..841a7009a 100644
 --- a/drivers/net/af_packet/rte_eth_af_packet.c
 +++ b/drivers/net/af_packet/rte_eth_af_packet.c
-@@ -637,9 +637,7 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,
- 						sizeof(struct pkt_tx_queue),
- 						0, numa_node);
- 	if (!(*internals)->rx_queue || !(*internals)->tx_queue) {
--		rte_free((*internals)->rx_queue);
--		rte_free((*internals)->tx_queue);
--		return -1;
-+		goto free_internals;
- 	}
- 
- 	for (q = 0; q < nb_queues; q++) {
-@@ -664,20 +662,20 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,
+@@ -623,20 +623,20 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,
  		PMD_LOG(ERR,
  			"%s: I/F name too long (%s)",
  			name, pair->value);
@@ -55,7 +45,7 @@
  	}
  	memcpy(&(*internals)->eth_addr, ifr.ifr_hwaddr.sa_data, ETH_ALEN);
  
-@@ -701,7 +699,7 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,
+@@ -660,7 +660,7 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,
  			PMD_LOG_ERRNO(ERR,
  				"%s: could not open AF_PACKET socket",
  				name);
@@ -64,7 +54,7 @@
  		}
  
  		tpver = TPACKET_V2;
-@@ -854,6 +852,9 @@ error:
+@@ -813,6 +813,9 @@ error:
  			((*internals)->rx_queue[q].sockfd != qsockfd))
  			close((*internals)->rx_queue[q].sockfd);
  	}

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

* [dpdk-stable] patch 'net/af_packet: fix munmap on init failure' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (154 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/af_packet: fix memory leak on init failure' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/bonding: fix MAC address when switching active port' " luca.boccassi
                   ` (35 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From d96c627cf9e4121561524b20c11b682614a8669b Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Mon, 6 Jul 2020 20:28:02 +0800
Subject: [PATCH] net/af_packet: fix munmap on init failure

[ upstream commit b02e1742ebb5a6c23bea05c4d66b1d380bcd00eb ]

Add a missing available check and fix the wrong address passed
to munmap on init failure.

Fixes: dd6590fe2fd7 ("af_packet: fix possible memory leak")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/af_packet/rte_eth_af_packet.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 841a7009a..00387ed0a 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -804,8 +804,9 @@ error:
 	if (qsockfd != -1)
 		close(qsockfd);
 	for (q = 0; q < nb_queues; q++) {
-		munmap((*internals)->rx_queue[q].map,
-		       2 * req->tp_block_size * req->tp_block_nr);
+		if ((*internals)->rx_queue[q].map != MAP_FAILED)
+			munmap((*internals)->rx_queue[q].map,
+			       2 * req->tp_block_size * req->tp_block_nr);
 
 		rte_free((*internals)->rx_queue[q].rd);
 		rte_free((*internals)->tx_queue[q].rd);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.611171206 +0100
+++ 0157-net-af_packet-fix-munmap-on-init-failure.patch	2020-07-24 12:53:48.519010782 +0100
@@ -1,13 +1,14 @@
-From b02e1742ebb5a6c23bea05c4d66b1d380bcd00eb Mon Sep 17 00:00:00 2001
+From d96c627cf9e4121561524b20c11b682614a8669b Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Mon, 6 Jul 2020 20:28:02 +0800
 Subject: [PATCH] net/af_packet: fix munmap on init failure
 
+[ upstream commit b02e1742ebb5a6c23bea05c4d66b1d380bcd00eb ]
+
 Add a missing available check and fix the wrong address passed
 to munmap on init failure.
 
 Fixes: dd6590fe2fd7 ("af_packet: fix possible memory leak")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -16,10 +17,10 @@
  1 file changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
-index 62945fee2..b9723e961 100644
+index 841a7009a..00387ed0a 100644
 --- a/drivers/net/af_packet/rte_eth_af_packet.c
 +++ b/drivers/net/af_packet/rte_eth_af_packet.c
-@@ -843,8 +843,9 @@ error:
+@@ -804,8 +804,9 @@ error:
  	if (qsockfd != -1)
  		close(qsockfd);
  	for (q = 0; q < nb_queues; q++) {

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

* [dpdk-stable] patch 'net/bonding: fix MAC address when switching active port' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (155 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/af_packet: fix munmap " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/bonding: fix MAC address when one port resets' " luca.boccassi
                   ` (34 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Wei Hu (Xavier); +Cc: Chunsong Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 87753bad04b0047b6321d59a0a422c48ae8de715 Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Fri, 17 Apr 2020 16:19:17 +0800
Subject: [PATCH] net/bonding: fix MAC address when switching active port

[ upstream commit edf6489ea43ec9c27d54dbe9e94adcdc43b70e04 ]

Currently, based on a active-backup bond device, when the link status of
the primary port changes from up to down, one slave port changes to the
primary port, but the new primary port's MAC address cannot change to
the bond device's MAC address. And we can't continue receive packets
whose destination MAC addresses are the same as the bond devices's MAC
address.

The current bonding PMD driver call mac_address_slaves_update function
to modify the MAC address of all slaves devices: the primary port using
bond device's MAC address, and other slaves devices using the respective
MAC address. We found that one error using primary_port instead of
current_primary_port in mac_address_slaves_update function.

On the other hand, The current bonding PMD driver sets slave devices's
MAC address according to the variable named current_primary_port. The
variable named current_primary_port changes in the following scenario:
1. Add the slave devices to bond, the first slave port will be regarded
   as the current_primary_port. If changing the order of adding the
   slave devices, the value of the variable named current_primary_port
   will be different.
2. The upper application specifies primary_port via calling the
   rte_eth_bond_primary_set API function.
3. Delete the primary slave device.
4. The link status of the primary port changes from up to down.

We have tested the above 4 cases and found that there are problems that
the new primary port's MAC address didn't change to the bond device's
MAC address when running case 3 and 4. When current_primary_port
changes, the new primary port's MAC address should change at the same
time. We also need to call mac_address_slaves_update function to update
MAC addresses in case
3 and 4.

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

Signed-off-by: Chunsong Feng <fengchunsong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_api.c | 1 +
 drivers/net/bonding/rte_eth_bond_pmd.c | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index d77dc4096..97c667e00 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -698,6 +698,7 @@ __eth_bond_slave_remove_lock_free(uint16_t bonded_port_id,
 			internals->current_primary_port = internals->slaves[0].port_id;
 		else
 			internals->primary_port = 0;
+		mac_address_slaves_update(bonded_eth_dev);
 	}
 
 	if (internals->active_slave_count < 1) {
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 707a0f3cd..ddae3518c 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1533,7 +1533,7 @@ mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev)
 			if (internals->slaves[i].port_id ==
 					internals->current_primary_port) {
 				if (rte_eth_dev_default_mac_addr_set(
-						internals->primary_port,
+						internals->current_primary_port,
 						bonded_eth_dev->data->mac_addrs)) {
 					RTE_BOND_LOG(ERR, "Failed to update port Id %d MAC address",
 							internals->current_primary_port);
@@ -2873,6 +2873,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 						internals->active_slaves[0]);
 			else
 				internals->current_primary_port = internals->primary_port;
+			mac_address_slaves_update(bonded_eth_dev);
 		}
 	}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.642905218 +0100
+++ 0158-net-bonding-fix-MAC-address-when-switching-active-po.patch	2020-07-24 12:53:48.523010857 +0100
@@ -1,8 +1,10 @@
-From edf6489ea43ec9c27d54dbe9e94adcdc43b70e04 Mon Sep 17 00:00:00 2001
+From 87753bad04b0047b6321d59a0a422c48ae8de715 Mon Sep 17 00:00:00 2001
 From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
 Date: Fri, 17 Apr 2020 16:19:17 +0800
 Subject: [PATCH] net/bonding: fix MAC address when switching active port
 
+[ upstream commit edf6489ea43ec9c27d54dbe9e94adcdc43b70e04 ]
+
 Currently, based on a active-backup bond device, when the link status of
 the primary port changes from up to down, one slave port changes to the
 primary port, but the new primary port's MAC address cannot change to
@@ -38,7 +40,6 @@
 
 Bugzilla ID: 256
 Fixes: 2efb58cbab6e ("bond: new link bonding library")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chunsong Feng <fengchunsong@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -60,7 +61,7 @@
  
  	if (internals->active_slave_count < 1) {
 diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
-index 044a1cfbc..6f361c7b2 100644
+index 707a0f3cd..ddae3518c 100644
 --- a/drivers/net/bonding/rte_eth_bond_pmd.c
 +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
 @@ -1533,7 +1533,7 @@ mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev)

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

* [dpdk-stable] patch 'net/bonding: fix MAC address when one port resets' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (156 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/bonding: fix MAC address when switching active port' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/i40e: fix queue pairs configuration in VF' " luca.boccassi
                   ` (33 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Wei Hu (Xavier); +Cc: Hongbo Zheng, Chunsong Feng, Xuan Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From d65301e19f3b8b157652668c1b0c90b9c2de50a7 Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Fri, 17 Apr 2020 16:19:18 +0800
Subject: [PATCH] net/bonding: fix MAC address when one port resets

[ upstream commit 2d944002762e85e351be7cea432919f159d2ecae ]

The current bonding PMD driver call mac_address_slaves_update function
to modify the MAC address of all slaves devices. In
mac_address_slaves_update function, the rte_eth_dev_default_mac_addr_set
API function is called to set the MAC address of the slave devices in
turn in the for loop statement.

When one port reset, calling rte_eth_dev_default_mac_addr_set API fails
because the firmware will not respond to the commands from the driver,
and exit the loop, so other slave devices cannot continue to update the
MAC address.

This patch fixes the issue by avoid exiting the loop when calling
rte_eth_dev_default_mac_addr_set fails.

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

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Chunsong Feng <fengchunsong@huawei.com>
Signed-off-by: Xuan Li <lixuan47@hisilicon.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index ddae3518c..419e03c00 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1502,6 +1502,7 @@ int
 mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev)
 {
 	struct bond_dev_private *internals = bonded_eth_dev->data->dev_private;
+	bool set;
 	int i;
 
 	/* Update slave devices MAC addresses */
@@ -1529,6 +1530,7 @@ mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev)
 	case BONDING_MODE_TLB:
 	case BONDING_MODE_ALB:
 	default:
+		set = true;
 		for (i = 0; i < internals->slave_count; i++) {
 			if (internals->slaves[i].port_id ==
 					internals->current_primary_port) {
@@ -1537,7 +1539,7 @@ mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev)
 						bonded_eth_dev->data->mac_addrs)) {
 					RTE_BOND_LOG(ERR, "Failed to update port Id %d MAC address",
 							internals->current_primary_port);
-					return -1;
+					set = false;
 				}
 			} else {
 				if (rte_eth_dev_default_mac_addr_set(
@@ -1545,10 +1547,11 @@ mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev)
 						&internals->slaves[i].persisted_mac_addr)) {
 					RTE_BOND_LOG(ERR, "Failed to update port Id %d MAC address",
 							internals->slaves[i].port_id);
-					return -1;
 				}
 			}
 		}
+		if (!set)
+			return -1;
 	}
 
 	return 0;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.686183990 +0100
+++ 0159-net-bonding-fix-MAC-address-when-one-port-resets.patch	2020-07-24 12:53:48.527010931 +0100
@@ -1,8 +1,10 @@
-From 2d944002762e85e351be7cea432919f159d2ecae Mon Sep 17 00:00:00 2001
+From d65301e19f3b8b157652668c1b0c90b9c2de50a7 Mon Sep 17 00:00:00 2001
 From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
 Date: Fri, 17 Apr 2020 16:19:18 +0800
 Subject: [PATCH] net/bonding: fix MAC address when one port resets
 
+[ upstream commit 2d944002762e85e351be7cea432919f159d2ecae ]
+
 The current bonding PMD driver call mac_address_slaves_update function
 to modify the MAC address of all slaves devices. In
 mac_address_slaves_update function, the rte_eth_dev_default_mac_addr_set
@@ -18,7 +20,6 @@
 rte_eth_dev_default_mac_addr_set fails.
 
 Fixes: 2efb58cbab6e ("bond: new link bonding library")
-Cc: stable@dpdk.org
 
 Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -29,7 +30,7 @@
  1 file changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
-index 6f361c7b2..116e2f29d 100644
+index ddae3518c..419e03c00 100644
 --- a/drivers/net/bonding/rte_eth_bond_pmd.c
 +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
 @@ -1502,6 +1502,7 @@ int

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

* [dpdk-stable] patch 'net/i40e: fix queue pairs configuration in VF' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (157 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/bonding: fix MAC address when one port resets' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 11:59 ` [dpdk-stable] patch 'bus/fslmc: fix memory leak in secondary process' " luca.boccassi
                   ` (32 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 71e127b7febe0c9ce6456e4b7f2580679e63e4e2 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Thu, 16 Jul 2020 14:33:36 +0800
Subject: [PATCH] net/i40e: fix queue pairs configuration in VF

[ upstream commit e230514582c8734424c6804d22d21427e9c3a088 ]

If a VF request PF to allocate more number of queue pairs, the PF will
free the queue pairs which have been allocated and reset the VF. So,
VF should stop to work until all the process is done. This patch modify
the process of the request queue pairs. To improve efficiency and
eliminate code redundancy, the promiscuous ops were also updated.

Fixes: c48eb308ed13 ("net/i40e: support VF request more queues")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 112 ++++++++++++++----------------
 1 file changed, 54 insertions(+), 58 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 1f1764908..0381ba64e 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -91,7 +91,8 @@ static int i40evf_vlan_filter_set(struct rte_eth_dev *dev,
 				  uint16_t vlan_id, int on);
 static int i40evf_vlan_offload_set(struct rte_eth_dev *dev, int mask);
 static void i40evf_dev_close(struct rte_eth_dev *dev);
-static int  i40evf_dev_reset(struct rte_eth_dev *dev);
+static int i40evf_dev_reset(struct rte_eth_dev *dev);
+static int i40evf_check_vf_reset_done(struct rte_eth_dev *dev);
 static int i40evf_dev_promiscuous_enable(struct rte_eth_dev *dev);
 static int i40evf_dev_promiscuous_disable(struct rte_eth_dev *dev);
 static int i40evf_dev_allmulticast_enable(struct rte_eth_dev *dev);
@@ -518,10 +519,19 @@ i40evf_config_promisc(struct rte_eth_dev *dev,
 
 	err = i40evf_execute_vf_cmd(dev, &args);
 
-	if (err)
+	if (err) {
 		PMD_DRV_LOG(ERR, "fail to execute command "
 			    "CONFIG_PROMISCUOUS_MODE");
-	return err;
+
+		if (err == I40E_NOT_SUPPORTED)
+			return -ENOTSUP;
+
+		return -EAGAIN;
+	}
+
+	vf->promisc_unicast_enabled = enable_unicast;
+	vf->promisc_multicast_enabled = enable_multicast;
+	return 0;
 }
 
 static int
@@ -1055,12 +1065,28 @@ i40evf_request_queues(struct rte_eth_dev *dev, uint16_t num)
 	args.out_size = I40E_AQ_BUF_SZ;
 
 	rte_eal_alarm_cancel(i40evf_dev_alarm_handler, dev);
+
 	err = i40evf_execute_vf_cmd(dev, &args);
-	if (err)
+
+	rte_eal_alarm_set(I40EVF_ALARM_INTERVAL, i40evf_dev_alarm_handler, dev);
+
+	if (err != I40E_SUCCESS) {
 		PMD_DRV_LOG(ERR, "fail to execute command OP_REQUEST_QUEUES");
+		return err;
+	}
+
+	/* The PF will issue a reset to the VF when change the number of
+	 * queues. The PF will set I40E_VFGEN_RSTAT to COMPLETE first, then
+	 * wait 10ms and set it to ACTIVE. In this duration, vf may not catch
+	 * the moment that COMPLETE is set. So, for vf, we'll try to wait a
+	 * long time.
+	 */
+	rte_delay_ms(100);
+
+	err = i40evf_check_vf_reset_done(dev);
+	if (err)
+		PMD_DRV_LOG(ERR, "VF is still resetting");
 
-	rte_eal_alarm_set(I40EVF_ALARM_INTERVAL,
-			  i40evf_dev_alarm_handler, dev);
 	return err;
 }
 
@@ -1490,7 +1516,7 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
 	hw->bus.device = pci_dev->addr.devid;
 	hw->bus.func = pci_dev->addr.function;
 	hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
-	hw->adapter_stopped = 0;
+	hw->adapter_stopped = 1;
 	hw->adapter_closed = 0;
 
 	/* Pass the information to the rte_eth_dev_close() that it should also
@@ -1586,7 +1612,20 @@ i40evf_dev_configure(struct rte_eth_dev *dev)
 	ad->tx_vec_allowed = true;
 
 	if (num_queue_pairs > vf->vsi_res->num_queue_pairs) {
-		int ret = 0;
+		struct i40e_hw *hw;
+		int ret;
+
+		if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+			PMD_DRV_LOG(ERR,
+				    "For secondary processes, change queue pairs is not supported!");
+			return -ENOTSUP;
+		}
+
+		hw  = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+		if (!hw->adapter_stopped) {
+			PMD_DRV_LOG(ERR, "Device must be stopped first!");
+			return -EBUSY;
+		}
 
 		PMD_DRV_LOG(INFO, "change queue pairs from %u to %u",
 			    vf->vsi_res->num_queue_pairs, num_queue_pairs);
@@ -2158,76 +2197,32 @@ static int
 i40evf_dev_promiscuous_enable(struct rte_eth_dev *dev)
 {
 	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
-	int ret;
 
-	/* If enabled, just return */
-	if (vf->promisc_unicast_enabled)
-		return 0;
-
-	ret = i40evf_config_promisc(dev, 1, vf->promisc_multicast_enabled);
-	if (ret == 0)
-		vf->promisc_unicast_enabled = TRUE;
-	else
-		ret = -EAGAIN;
-
-	return ret;
+	return i40evf_config_promisc(dev, true, vf->promisc_multicast_enabled);
 }
 
 static int
 i40evf_dev_promiscuous_disable(struct rte_eth_dev *dev)
 {
 	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
-	int ret;
 
-	/* If disabled, just return */
-	if (!vf->promisc_unicast_enabled)
-		return 0;
-
-	ret = i40evf_config_promisc(dev, 0, vf->promisc_multicast_enabled);
-	if (ret == 0)
-		vf->promisc_unicast_enabled = FALSE;
-	else
-		ret = -EAGAIN;
-
-	return ret;
+	return i40evf_config_promisc(dev, false, vf->promisc_multicast_enabled);
 }
 
 static int
 i40evf_dev_allmulticast_enable(struct rte_eth_dev *dev)
 {
 	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
-	int ret;
 
-	/* If enabled, just return */
-	if (vf->promisc_multicast_enabled)
-		return 0;
-
-	ret = i40evf_config_promisc(dev, vf->promisc_unicast_enabled, 1);
-	if (ret == 0)
-		vf->promisc_multicast_enabled = TRUE;
-	else
-		ret = -EAGAIN;
-
-	return ret;
+	return i40evf_config_promisc(dev, vf->promisc_unicast_enabled, true);
 }
 
 static int
 i40evf_dev_allmulticast_disable(struct rte_eth_dev *dev)
 {
 	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
-	int ret;
 
-	/* If enabled, just return */
-	if (!vf->promisc_multicast_enabled)
-		return 0;
-
-	ret = i40evf_config_promisc(dev, vf->promisc_unicast_enabled, 0);
-	if (ret == 0)
-		vf->promisc_multicast_enabled = FALSE;
-	else
-		ret = -EAGAIN;
-
-	return ret;
+	return i40evf_config_promisc(dev, vf->promisc_unicast_enabled, false);
 }
 
 static int
@@ -2349,8 +2344,9 @@ i40evf_dev_close(struct rte_eth_dev *dev)
 	 * it is a workaround solution when work with kernel driver
 	 * and it is not the normal way
 	 */
-	i40evf_dev_promiscuous_disable(dev);
-	i40evf_dev_allmulticast_disable(dev);
+	if (vf->promisc_unicast_enabled || vf->promisc_multicast_enabled)
+		i40evf_config_promisc(dev, false, false);
+
 	rte_eal_alarm_cancel(i40evf_dev_alarm_handler, dev);
 
 	i40evf_reset_vf(dev);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.724871645 +0100
+++ 0160-net-i40e-fix-queue-pairs-configuration-in-VF.patch	2020-07-24 12:53:48.527010931 +0100
@@ -1,8 +1,10 @@
-From e230514582c8734424c6804d22d21427e9c3a088 Mon Sep 17 00:00:00 2001
+From 71e127b7febe0c9ce6456e4b7f2580679e63e4e2 Mon Sep 17 00:00:00 2001
 From: Alvin Zhang <alvinx.zhang@intel.com>
 Date: Thu, 16 Jul 2020 14:33:36 +0800
 Subject: [PATCH] net/i40e: fix queue pairs configuration in VF
 
+[ upstream commit e230514582c8734424c6804d22d21427e9c3a088 ]
+
 If a VF request PF to allocate more number of queue pairs, the PF will
 free the queue pairs which have been allocated and reset the VF. So,
 VF should stop to work until all the process is done. This patch modify
@@ -10,16 +12,15 @@
 eliminate code redundancy, the promiscuous ops were also updated.
 
 Fixes: c48eb308ed13 ("net/i40e: support VF request more queues")
-Cc: stable@dpdk.org
 
 Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
 Acked-by: Jeff Guo <jia.guo@intel.com>
 ---
- drivers/net/i40e/i40e_ethdev_vf.c | 104 ++++++++++++++++--------------
- 1 file changed, 54 insertions(+), 50 deletions(-)
+ drivers/net/i40e/i40e_ethdev_vf.c | 112 ++++++++++++++----------------
+ 1 file changed, 54 insertions(+), 58 deletions(-)
 
 diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
-index eca716a6a..69cab8e73 100644
+index 1f1764908..0381ba64e 100644
 --- a/drivers/net/i40e/i40e_ethdev_vf.c
 +++ b/drivers/net/i40e/i40e_ethdev_vf.c
 @@ -91,7 +91,8 @@ static int i40evf_vlan_filter_set(struct rte_eth_dev *dev,
@@ -32,7 +33,7 @@
  static int i40evf_dev_promiscuous_enable(struct rte_eth_dev *dev);
  static int i40evf_dev_promiscuous_disable(struct rte_eth_dev *dev);
  static int i40evf_dev_allmulticast_enable(struct rte_eth_dev *dev);
-@@ -519,10 +520,19 @@ i40evf_config_promisc(struct rte_eth_dev *dev,
+@@ -518,10 +519,19 @@ i40evf_config_promisc(struct rte_eth_dev *dev,
  
  	err = i40evf_execute_vf_cmd(dev, &args);
  
@@ -54,7 +55,7 @@
  }
  
  static int
-@@ -1081,12 +1091,28 @@ i40evf_request_queues(struct rte_eth_dev *dev, uint16_t num)
+@@ -1055,12 +1065,28 @@ i40evf_request_queues(struct rte_eth_dev *dev, uint16_t num)
  	args.out_size = I40E_AQ_BUF_SZ;
  
  	rte_eal_alarm_cancel(i40evf_dev_alarm_handler, dev);
@@ -86,7 +87,7 @@
  	return err;
  }
  
-@@ -1514,7 +1540,7 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -1490,7 +1516,7 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
  	hw->bus.device = pci_dev->addr.devid;
  	hw->bus.func = pci_dev->addr.function;
  	hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
@@ -95,7 +96,7 @@
  	hw->adapter_closed = 0;
  
  	/* Pass the information to the rte_eth_dev_close() that it should also
-@@ -1610,7 +1636,20 @@ i40evf_dev_configure(struct rte_eth_dev *dev)
+@@ -1586,7 +1612,20 @@ i40evf_dev_configure(struct rte_eth_dev *dev)
  	ad->tx_vec_allowed = true;
  
  	if (num_queue_pairs > vf->vsi_res->num_queue_pairs) {
@@ -117,17 +118,19 @@
  
  		PMD_DRV_LOG(INFO, "change queue pairs from %u to %u",
  			    vf->vsi_res->num_queue_pairs, num_queue_pairs);
-@@ -2182,68 +2221,32 @@ static int
+@@ -2158,76 +2197,32 @@ static int
  i40evf_dev_promiscuous_enable(struct rte_eth_dev *dev)
  {
  	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 -	int ret;
  
+-	/* If enabled, just return */
+-	if (vf->promisc_unicast_enabled)
+-		return 0;
+-
 -	ret = i40evf_config_promisc(dev, 1, vf->promisc_multicast_enabled);
 -	if (ret == 0)
 -		vf->promisc_unicast_enabled = TRUE;
--	else if (ret == I40E_NOT_SUPPORTED)
--		ret = -ENOTSUP;
 -	else
 -		ret = -EAGAIN;
 -
@@ -141,11 +144,13 @@
  	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 -	int ret;
  
+-	/* If disabled, just return */
+-	if (!vf->promisc_unicast_enabled)
+-		return 0;
+-
 -	ret = i40evf_config_promisc(dev, 0, vf->promisc_multicast_enabled);
 -	if (ret == 0)
 -		vf->promisc_unicast_enabled = FALSE;
--	else if (ret == I40E_NOT_SUPPORTED)
--		ret = -ENOTSUP;
 -	else
 -		ret = -EAGAIN;
 -
@@ -159,11 +164,13 @@
  	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 -	int ret;
  
+-	/* If enabled, just return */
+-	if (vf->promisc_multicast_enabled)
+-		return 0;
+-
 -	ret = i40evf_config_promisc(dev, vf->promisc_unicast_enabled, 1);
 -	if (ret == 0)
 -		vf->promisc_multicast_enabled = TRUE;
--	else if (ret == I40E_NOT_SUPPORTED)
--		ret = -ENOTSUP;
 -	else
 -		ret = -EAGAIN;
 -
@@ -177,11 +184,13 @@
  	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 -	int ret;
  
+-	/* If enabled, just return */
+-	if (!vf->promisc_multicast_enabled)
+-		return 0;
+-
 -	ret = i40evf_config_promisc(dev, vf->promisc_unicast_enabled, 0);
 -	if (ret == 0)
 -		vf->promisc_multicast_enabled = FALSE;
--	else if (ret == I40E_NOT_SUPPORTED)
--		ret = -ENOTSUP;
 -	else
 -		ret = -EAGAIN;
 -
@@ -190,7 +199,7 @@
  }
  
  static int
-@@ -2365,8 +2368,9 @@ i40evf_dev_close(struct rte_eth_dev *dev)
+@@ -2349,8 +2344,9 @@ i40evf_dev_close(struct rte_eth_dev *dev)
  	 * it is a workaround solution when work with kernel driver
  	 * and it is not the normal way
  	 */

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

* [dpdk-stable] patch 'bus/fslmc: fix memory leak in secondary process' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (158 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'net/i40e: fix queue pairs configuration in VF' " luca.boccassi
@ 2020-07-24 11:59 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/i40e: fix flow director Rx writeback packet' " luca.boccassi
                   ` (31 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 11:59 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 9373ca5d89f429cc52bb955b16fb022296254f39 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Fri, 17 Jul 2020 18:50:17 +0800
Subject: [PATCH] bus/fslmc: fix memory leak in secondary process

[ upstream commit 5ce366525a4cafafd965dd1dfd58c35de1c9ffd7 ]

In fslmc_process_mcp(), we allocate memory for 'dev_name' but not
released before return in secondary process. And it is not used
since commit a69f79300262 ("bus/fslmc: support multi VFIO group"),
so it can be removed.

Fixes: e55d0494ab98 ("bus/fslmc: support secondary process")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/fslmc_vfio.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index 970969d2b..abf233844 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -730,7 +730,6 @@ fslmc_process_mcp(struct rte_dpaa2_device *dev)
 {
 	int ret;
 	intptr_t v_addr;
-	char *dev_name = NULL;
 	struct fsl_mc_io dpmng  = {0};
 	struct mc_version mc_ver_info = {0};
 
@@ -741,13 +740,6 @@ fslmc_process_mcp(struct rte_dpaa2_device *dev)
 		goto cleanup;
 	}
 
-	dev_name = strdup(dev->device.name);
-	if (!dev_name) {
-		DPAA2_BUS_ERR("Unable to allocate MC device name memory");
-		ret = -ENOMEM;
-		goto cleanup;
-	}
-
 	v_addr = vfio_map_mcp_obj(dev->device.name);
 	if (v_addr == (intptr_t)MAP_FAILED) {
 		DPAA2_BUS_ERR("Error mapping region (errno = %d)", errno);
@@ -784,13 +776,9 @@ fslmc_process_mcp(struct rte_dpaa2_device *dev)
 	}
 	rte_mcp_ptr_list[0] = (void *)v_addr;
 
-	free(dev_name);
 	return 0;
 
 cleanup:
-	if (dev_name)
-		free(dev_name);
-
 	if (rte_mcp_ptr_list) {
 		free(rte_mcp_ptr_list);
 		rte_mcp_ptr_list = NULL;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.762675691 +0100
+++ 0161-bus-fslmc-fix-memory-leak-in-secondary-process.patch	2020-07-24 12:53:48.531011006 +0100
@@ -1,15 +1,16 @@
-From 5ce366525a4cafafd965dd1dfd58c35de1c9ffd7 Mon Sep 17 00:00:00 2001
+From 9373ca5d89f429cc52bb955b16fb022296254f39 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Fri, 17 Jul 2020 18:50:17 +0800
 Subject: [PATCH] bus/fslmc: fix memory leak in secondary process
 
+[ upstream commit 5ce366525a4cafafd965dd1dfd58c35de1c9ffd7 ]
+
 In fslmc_process_mcp(), we allocate memory for 'dev_name' but not
 released before return in secondary process. And it is not used
 since commit a69f79300262 ("bus/fslmc: support multi VFIO group"),
 so it can be removed.
 
 Fixes: e55d0494ab98 ("bus/fslmc: support secondary process")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
@@ -18,10 +19,10 @@
  1 file changed, 12 deletions(-)
 
 diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
-index efe2c43d3..9134ec552 100644
+index 970969d2b..abf233844 100644
 --- a/drivers/bus/fslmc/fslmc_vfio.c
 +++ b/drivers/bus/fslmc/fslmc_vfio.c
-@@ -739,7 +739,6 @@ fslmc_process_mcp(struct rte_dpaa2_device *dev)
+@@ -730,7 +730,6 @@ fslmc_process_mcp(struct rte_dpaa2_device *dev)
  {
  	int ret;
  	intptr_t v_addr;
@@ -29,7 +30,7 @@
  	struct fsl_mc_io dpmng  = {0};
  	struct mc_version mc_ver_info = {0};
  
-@@ -750,13 +749,6 @@ fslmc_process_mcp(struct rte_dpaa2_device *dev)
+@@ -741,13 +740,6 @@ fslmc_process_mcp(struct rte_dpaa2_device *dev)
  		goto cleanup;
  	}
  
@@ -43,9 +44,9 @@
  	v_addr = vfio_map_mcp_obj(dev->device.name);
  	if (v_addr == (intptr_t)MAP_FAILED) {
  		DPAA2_BUS_ERR("Error mapping region (errno = %d)", errno);
-@@ -793,13 +785,9 @@ fslmc_process_mcp(struct rte_dpaa2_device *dev)
+@@ -784,13 +776,9 @@ fslmc_process_mcp(struct rte_dpaa2_device *dev)
  	}
- 	rte_mcp_ptr_list[MC_PORTAL_INDEX] = (void *)v_addr;
+ 	rte_mcp_ptr_list[0] = (void *)v_addr;
  
 -	free(dev_name);
  	return 0;

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

* [dpdk-stable] patch 'net/i40e: fix flow director Rx writeback packet' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (159 preceding siblings ...)
  2020-07-24 11:59 ` [dpdk-stable] patch 'bus/fslmc: fix memory leak in secondary process' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/ice/base: fix memory leak on GTPU RSS' " luca.boccassi
                   ` (30 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Chenmin Sun; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 058c965e7b9afe7bc6de305faba1c69c1c8fab52 Mon Sep 17 00:00:00 2001
From: Chenmin Sun <chenmin.sun@intel.com>
Date: Fri, 17 Jul 2020 22:57:58 +0800
Subject: [PATCH] net/i40e: fix flow director Rx writeback packet

[ upstream commit ae6575409ff5609e44d53e1c3014ae77105e8610 ]

This patch fixes the fdir cannot receive rx writeback packet issue.
The root cause is FDIR interrupt is not correctly enabled.

Beside this, to make sure fdir programming works fine when the port
is stopped, move the fdir interrupt configure from start/stop to
setup/teardown.

Fixes: cfd662d22e7b ("net/i40e: fix interrupt throttling setting in PF")

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 15 ++-------------
 drivers/net/i40e/i40e_ethdev.h |  2 ++
 drivers/net/i40e/i40e_fdir.c   | 11 +++++++++++
 3 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 225e6920f..c23581123 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2072,7 +2072,7 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
 	}
 }
 
-static void
+void
 i40e_vsi_enable_queues_intr(struct i40e_vsi *vsi)
 {
 	struct rte_eth_dev *dev = vsi->adapter->eth_dev;
@@ -2099,7 +2099,7 @@ i40e_vsi_enable_queues_intr(struct i40e_vsi *vsi)
 	I40E_WRITE_FLUSH(hw);
 }
 
-static void
+void
 i40e_vsi_disable_queues_intr(struct i40e_vsi *vsi)
 {
 	struct rte_eth_dev *dev = vsi->adapter->eth_dev;
@@ -2321,13 +2321,6 @@ i40e_dev_start(struct rte_eth_dev *dev)
 		i40e_vsi_enable_queues_intr(pf->vmdq[i].vsi);
 	}
 
-	/* enable FDIR MSIX interrupt */
-	if (pf->fdir.fdir_vsi) {
-		i40e_vsi_queues_bind_intr(pf->fdir.fdir_vsi,
-					  I40E_ITR_INDEX_NONE);
-		i40e_vsi_enable_queues_intr(pf->fdir.fdir_vsi);
-	}
-
 	/* Enable all queues which have been configured */
 	for (nb_rxq = 0; nb_rxq < dev->data->nb_rx_queues; nb_rxq++) {
 		ret = i40e_dev_rx_queue_start(dev, nb_rxq);
@@ -2463,10 +2456,6 @@ i40e_dev_stop(struct rte_eth_dev *dev)
 		i40e_vsi_queues_unbind_intr(pf->vmdq[i].vsi);
 	}
 
-	if (pf->fdir.fdir_vsi) {
-		i40e_vsi_queues_unbind_intr(pf->fdir.fdir_vsi);
-		i40e_vsi_disable_queues_intr(pf->fdir.fdir_vsi);
-	}
 	/* Clear all queues and release memory */
 	i40e_dev_clear_queues(dev);
 
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index 295ad593b..1e01b312d 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -1172,6 +1172,7 @@ void i40e_pf_enable_irq0(struct i40e_hw *hw);
 int i40e_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete);
 void i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx);
 void i40e_vsi_queues_unbind_intr(struct i40e_vsi *vsi);
+void i40e_vsi_disable_queues_intr(struct i40e_vsi *vsi);
 int i40e_vsi_vlan_pvid_set(struct i40e_vsi *vsi,
 			   struct i40e_vsi_vlan_pvid_info *info);
 int i40e_vsi_config_vlan_stripping(struct i40e_vsi *vsi, bool on);
@@ -1181,6 +1182,7 @@ uint64_t i40e_parse_hena(const struct i40e_adapter *adapter, uint64_t flags);
 enum i40e_status_code i40e_fdir_setup_tx_resources(struct i40e_pf *pf);
 enum i40e_status_code i40e_fdir_setup_rx_resources(struct i40e_pf *pf);
 int i40e_fdir_setup(struct i40e_pf *pf);
+void i40e_vsi_enable_queues_intr(struct i40e_vsi *vsi);
 const struct rte_memzone *i40e_memzone_reserve(const char *name,
 					uint32_t len,
 					int socket_id);
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 239cdbf52..9a2b40b8a 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -222,6 +222,11 @@ i40e_fdir_setup(struct i40e_pf *pf)
 		goto fail_mem;
 	}
 
+	/* enable FDIR MSIX interrupt */
+	vsi->nb_used_qps = 1;
+	i40e_vsi_queues_bind_intr(vsi, I40E_ITR_INDEX_NONE);
+	i40e_vsi_enable_queues_intr(vsi);
+
 	/* reserve memory for the fdir programming packet */
 	snprintf(z_name, sizeof(z_name), "%s_%s_%d",
 			eth_dev->device->driver->name,
@@ -267,12 +272,18 @@ i40e_fdir_teardown(struct i40e_pf *pf)
 	vsi = pf->fdir.fdir_vsi;
 	if (!vsi)
 		return;
+
+	/* disable FDIR MSIX interrupt */
+	i40e_vsi_queues_unbind_intr(vsi);
+	i40e_vsi_disable_queues_intr(vsi);
+
 	int err = i40e_switch_tx_queue(hw, vsi->base_queue, FALSE);
 	if (err)
 		PMD_DRV_LOG(DEBUG, "Failed to do FDIR TX switch off");
 	err = i40e_switch_rx_queue(hw, vsi->base_queue, FALSE);
 	if (err)
 		PMD_DRV_LOG(DEBUG, "Failed to do FDIR RX switch off");
+
 	i40e_dev_rx_queue_release(pf->fdir.rxq);
 	pf->fdir.rxq = NULL;
 	i40e_dev_tx_queue_release(pf->fdir.txq);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.797442918 +0100
+++ 0162-net-i40e-fix-flow-director-Rx-writeback-packet.patch	2020-07-24 12:53:48.543011229 +0100
@@ -1,8 +1,10 @@
-From ae6575409ff5609e44d53e1c3014ae77105e8610 Mon Sep 17 00:00:00 2001
+From 058c965e7b9afe7bc6de305faba1c69c1c8fab52 Mon Sep 17 00:00:00 2001
 From: Chenmin Sun <chenmin.sun@intel.com>
 Date: Fri, 17 Jul 2020 22:57:58 +0800
 Subject: [PATCH] net/i40e: fix flow director Rx writeback packet
 
+[ upstream commit ae6575409ff5609e44d53e1c3014ae77105e8610 ]
+
 This patch fixes the fdir cannot receive rx writeback packet issue.
 The root cause is FDIR interrupt is not correctly enabled.
 
@@ -11,7 +13,6 @@
 setup/teardown.
 
 Fixes: cfd662d22e7b ("net/i40e: fix interrupt throttling setting in PF")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
 Acked-by: Beilei Xing <beilei.xing@intel.com>
@@ -22,10 +23,10 @@
  3 files changed, 15 insertions(+), 13 deletions(-)
 
 diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
-index 690164320..05d5f2861 100644
+index 225e6920f..c23581123 100644
 --- a/drivers/net/i40e/i40e_ethdev.c
 +++ b/drivers/net/i40e/i40e_ethdev.c
-@@ -2184,7 +2184,7 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
+@@ -2072,7 +2072,7 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
  	}
  }
  
@@ -34,7 +35,7 @@
  i40e_vsi_enable_queues_intr(struct i40e_vsi *vsi)
  {
  	struct rte_eth_dev *dev = vsi->adapter->eth_dev;
-@@ -2211,7 +2211,7 @@ i40e_vsi_enable_queues_intr(struct i40e_vsi *vsi)
+@@ -2099,7 +2099,7 @@ i40e_vsi_enable_queues_intr(struct i40e_vsi *vsi)
  	I40E_WRITE_FLUSH(hw);
  }
  
@@ -43,7 +44,7 @@
  i40e_vsi_disable_queues_intr(struct i40e_vsi *vsi)
  {
  	struct rte_eth_dev *dev = vsi->adapter->eth_dev;
-@@ -2433,13 +2433,6 @@ i40e_dev_start(struct rte_eth_dev *dev)
+@@ -2321,13 +2321,6 @@ i40e_dev_start(struct rte_eth_dev *dev)
  		i40e_vsi_enable_queues_intr(pf->vmdq[i].vsi);
  	}
  
@@ -57,7 +58,7 @@
  	/* Enable all queues which have been configured */
  	for (nb_rxq = 0; nb_rxq < dev->data->nb_rx_queues; nb_rxq++) {
  		ret = i40e_dev_rx_queue_start(dev, nb_rxq);
-@@ -2575,10 +2568,6 @@ i40e_dev_stop(struct rte_eth_dev *dev)
+@@ -2463,10 +2456,6 @@ i40e_dev_stop(struct rte_eth_dev *dev)
  		i40e_vsi_queues_unbind_intr(pf->vmdq[i].vsi);
  	}
  
@@ -69,10 +70,10 @@
  	i40e_dev_clear_queues(dev);
  
 diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
-index d3bda0272..aef88abed 100644
+index 295ad593b..1e01b312d 100644
 --- a/drivers/net/i40e/i40e_ethdev.h
 +++ b/drivers/net/i40e/i40e_ethdev.h
-@@ -1321,6 +1321,7 @@ void i40e_pf_enable_irq0(struct i40e_hw *hw);
+@@ -1172,6 +1172,7 @@ void i40e_pf_enable_irq0(struct i40e_hw *hw);
  int i40e_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete);
  void i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx);
  void i40e_vsi_queues_unbind_intr(struct i40e_vsi *vsi);
@@ -80,7 +81,7 @@
  int i40e_vsi_vlan_pvid_set(struct i40e_vsi *vsi,
  			   struct i40e_vsi_vlan_pvid_info *info);
  int i40e_vsi_config_vlan_stripping(struct i40e_vsi *vsi, bool on);
-@@ -1330,6 +1331,7 @@ uint64_t i40e_parse_hena(const struct i40e_adapter *adapter, uint64_t flags);
+@@ -1181,6 +1182,7 @@ uint64_t i40e_parse_hena(const struct i40e_adapter *adapter, uint64_t flags);
  enum i40e_status_code i40e_fdir_setup_tx_resources(struct i40e_pf *pf);
  enum i40e_status_code i40e_fdir_setup_rx_resources(struct i40e_pf *pf);
  int i40e_fdir_setup(struct i40e_pf *pf);
@@ -89,10 +90,10 @@
  					uint32_t len,
  					int socket_id);
 diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
-index 9998e5d4f..8e87b4a00 100644
+index 239cdbf52..9a2b40b8a 100644
 --- a/drivers/net/i40e/i40e_fdir.c
 +++ b/drivers/net/i40e/i40e_fdir.c
-@@ -231,6 +231,11 @@ i40e_fdir_setup(struct i40e_pf *pf)
+@@ -222,6 +222,11 @@ i40e_fdir_setup(struct i40e_pf *pf)
  		goto fail_mem;
  	}
  
@@ -104,7 +105,7 @@
  	/* reserve memory for the fdir programming packet */
  	snprintf(z_name, sizeof(z_name), "%s_%s_%d",
  			eth_dev->device->driver->name,
-@@ -287,12 +292,18 @@ i40e_fdir_teardown(struct i40e_pf *pf)
+@@ -267,12 +272,18 @@ i40e_fdir_teardown(struct i40e_pf *pf)
  	vsi = pf->fdir.fdir_vsi;
  	if (!vsi)
  		return;
@@ -121,8 +122,8 @@
  		PMD_DRV_LOG(DEBUG, "Failed to do FDIR RX switch off");
 +
  	i40e_dev_rx_queue_release(pf->fdir.rxq);
- 	rte_eth_dma_zone_free(dev, "fdir_rx_ring", pf->fdir.rxq->queue_id);
  	pf->fdir.rxq = NULL;
+ 	i40e_dev_tx_queue_release(pf->fdir.txq);
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/ice/base: fix memory leak on GTPU RSS' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (160 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/i40e: fix flow director Rx writeback packet' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/i40e: fix filter pctype' " luca.boccassi
                   ` (29 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Junfeng Guo; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From e9d4b11347fe6f5e875bc3b0e0c7974721dbc597 Mon Sep 17 00:00:00 2001
From: Junfeng Guo <junfeng.guo@intel.com>
Date: Mon, 20 Jul 2020 15:09:55 +0800
Subject: [PATCH] net/ice/base: fix memory leak on GTPU RSS

[ upstream commit c7b545fc91137803a2c42bff512e9a6b7254c936 ]

Add memory space free logic for adding and removing GTP-U before return
success status, to avoid memory leak issue.

Fixes: bed9bb3139ef ("net/ice/base: fix GTP-U inner RSS IPv4 IPv6 co-exist")

Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_flow.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index 83432bd20..277bb4a27 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -2126,8 +2126,10 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
 
 	/* don't do RSS for GTPU outer */
 	if (segs_cnt == ICE_RSS_OUTER_HEADERS &&
-	    segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU)
-		return ICE_SUCCESS;
+	    segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU) {
+		status = ICE_SUCCESS;
+		goto exit;
+	}
 
 	/* Search for a flow profile that has matching headers, hash fields
 	 * and has the input VSI associated to it. If found, no further
@@ -2286,8 +2288,10 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
 		goto out;
 
 	if (segs_cnt == ICE_RSS_OUTER_HEADERS &&
-	    segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU)
-		return ICE_SUCCESS;
+	    segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU) {
+		status = ICE_SUCCESS;
+		goto out;
+	}
 
 	prof = ice_flow_find_prof_conds(hw, blk, ICE_FLOW_RX, segs, segs_cnt,
 					vsi_handle,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.853066544 +0100
+++ 0163-net-ice-base-fix-memory-leak-on-GTPU-RSS.patch	2020-07-24 12:53:48.543011229 +0100
@@ -1,13 +1,14 @@
-From c7b545fc91137803a2c42bff512e9a6b7254c936 Mon Sep 17 00:00:00 2001
+From e9d4b11347fe6f5e875bc3b0e0c7974721dbc597 Mon Sep 17 00:00:00 2001
 From: Junfeng Guo <junfeng.guo@intel.com>
 Date: Mon, 20 Jul 2020 15:09:55 +0800
 Subject: [PATCH] net/ice/base: fix memory leak on GTPU RSS
 
+[ upstream commit c7b545fc91137803a2c42bff512e9a6b7254c936 ]
+
 Add memory space free logic for adding and removing GTP-U before return
 success status, to avoid memory leak issue.
 
 Fixes: bed9bb3139ef ("net/ice/base: fix GTP-U inner RSS IPv4 IPv6 co-exist")
-Cc: stable@dpdk.org
 
 Signed-off-by: Junfeng Guo <junfeng.guo@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -16,10 +17,10 @@
  1 file changed, 8 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
-index 094f5370a..6035bdfcf 100644
+index 83432bd20..277bb4a27 100644
 --- a/drivers/net/ice/base/ice_flow.c
 +++ b/drivers/net/ice/base/ice_flow.c
-@@ -3586,8 +3586,10 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
+@@ -2126,8 +2126,10 @@ ice_add_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
  
  	/* don't do RSS for GTPU outer */
  	if (segs_cnt == ICE_RSS_OUTER_HEADERS &&
@@ -32,7 +33,7 @@
  
  	/* Search for a flow profile that has matching headers, hash fields
  	 * and has the input VSI associated to it. If found, no further
-@@ -3746,8 +3748,10 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
+@@ -2286,8 +2288,10 @@ ice_rem_rss_cfg_sync(struct ice_hw *hw, u16 vsi_handle, u64 hashed_flds,
  		goto out;
  
  	if (segs_cnt == ICE_RSS_OUTER_HEADERS &&

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

* [dpdk-stable] patch 'net/i40e: fix filter pctype' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (161 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/ice/base: fix memory leak on GTPU RSS' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/ixgbe: fix MAC control frame forward' " luca.boccassi
                   ` (28 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Shougang Wang; +Cc: Wei Zhao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 2f6583d4cc1a38117c0e386b4a3e3ec675346022 Mon Sep 17 00:00:00 2001
From: Shougang Wang <shougangx.wang@intel.com>
Date: Wed, 15 Jul 2020 08:08:10 +0000
Subject: [PATCH] net/i40e: fix filter pctype

[ upstream commit 11b58ac709690cb4086a0a01f979b3d3f8ea7d21 ]

The i40e_filter_pctype TCP_SYN_NO_ACK, UNICAST_IPV4_UDP and
MULTICAST_IPV4_UDP for x722 were missing when translating RSS type to
i40e_filter_pctype. This patch fixes it.

Fixes: da7018ec29d4 ("net/i40e: fix queue region in RSS flow")

Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/i40e/i40e_flow.c | 45 ++++++++++++++++++++++++++++++------
 1 file changed, 38 insertions(+), 7 deletions(-)

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index a83543c26..ae2fb4593 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -4325,11 +4325,12 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
 	const struct rte_flow_action *act;
 	const struct rte_flow_action_rss *rss;
 	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
+	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct i40e_queue_regions *info = &pf->queue_region;
 	struct i40e_rte_flow_rss_conf *rss_config =
 			&filter->rss_conf;
 	struct i40e_rte_flow_rss_conf *rss_info = &pf->rss_info;
-	uint16_t i, j, n, tmp;
+	uint16_t i, j, n, m, tmp;
 	uint32_t index = 0;
 
 	static const struct {
@@ -4360,6 +4361,24 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
 			I40E_FILTER_PCTYPE_L2_PAYLOAD},
 	};
 
+	static const struct {
+		uint64_t rss_type;
+		enum i40e_filter_pctype pctype;
+	} pctype_match_table_x722[] = {
+		{ETH_RSS_NONFRAG_IPV4_TCP,
+			I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK},
+		{ETH_RSS_NONFRAG_IPV4_UDP,
+			I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP},
+		{ETH_RSS_NONFRAG_IPV4_UDP,
+			I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP},
+		{ETH_RSS_NONFRAG_IPV6_TCP,
+			I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK},
+		{ETH_RSS_NONFRAG_IPV6_UDP,
+			I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP},
+		{ETH_RSS_NONFRAG_IPV6_UDP,
+			I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP},
+	};
+
 	NEXT_ITEM_OF_ACTION(act, actions, index);
 	rss = act->conf;
 
@@ -4385,6 +4404,18 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
 				break;
 			}
 		}
+
+		if (hw->mac.type == I40E_MAC_X722)
+			for (j = 0; j < RTE_DIM(pctype_match_table_x722); j++) {
+				if (rss->types &
+				    pctype_match_table_x722[j].rss_type) {
+					m = conf_info->region[0].flowtype_num;
+					conf_info->region[0].hw_flowtype[m] =
+						pctype_match_table_x722[j].pctype;
+					conf_info->region[0].flowtype_num++;
+					conf_info->queue_region_number = 1;
+				}
+			}
 	}
 
 	/**
@@ -4482,9 +4513,9 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
 					info->region[i].user_priority_num++;
 				}
 
-				j = info->region[i].flowtype_num;
-				tmp = conf_info->region[n].hw_flowtype[0];
-				if (conf_info->region[n].flowtype_num) {
+				for (m = 0; m < conf_info->region[n].flowtype_num; m++) {
+					j = info->region[i].flowtype_num;
+					tmp = conf_info->region[n].hw_flowtype[m];
 					info->region[i].hw_flowtype[j] = tmp;
 					info->region[i].flowtype_num++;
 				}
@@ -4497,9 +4528,9 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
 					info->region[i].user_priority_num++;
 				}
 
-				j = info->region[i].flowtype_num;
-				tmp = conf_info->region[n].hw_flowtype[0];
-				if (conf_info->region[n].flowtype_num) {
+				for (m = 0; m < conf_info->region[n].flowtype_num; m++) {
+					j = info->region[i].flowtype_num;
+					tmp = conf_info->region[n].hw_flowtype[m];
 					info->region[i].hw_flowtype[j] = tmp;
 					info->region[i].flowtype_num++;
 				}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.891279246 +0100
+++ 0164-net-i40e-fix-filter-pctype.patch	2020-07-24 12:53:48.547011304 +0100
@@ -1,14 +1,15 @@
-From 11b58ac709690cb4086a0a01f979b3d3f8ea7d21 Mon Sep 17 00:00:00 2001
+From 2f6583d4cc1a38117c0e386b4a3e3ec675346022 Mon Sep 17 00:00:00 2001
 From: Shougang Wang <shougangx.wang@intel.com>
 Date: Wed, 15 Jul 2020 08:08:10 +0000
 Subject: [PATCH] net/i40e: fix filter pctype
 
+[ upstream commit 11b58ac709690cb4086a0a01f979b3d3f8ea7d21 ]
+
 The i40e_filter_pctype TCP_SYN_NO_ACK, UNICAST_IPV4_UDP and
 MULTICAST_IPV4_UDP for x722 were missing when translating RSS type to
 i40e_filter_pctype. This patch fixes it.
 
 Fixes: da7018ec29d4 ("net/i40e: fix queue region in RSS flow")
-Cc: stable@dpdk.org
 
 Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
 Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 38 insertions(+), 7 deletions(-)
 
 diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
-index 9a8bca46f..51d8fdd79 100644
+index a83543c26..ae2fb4593 100644
 --- a/drivers/net/i40e/i40e_flow.c
 +++ b/drivers/net/i40e/i40e_flow.c
-@@ -4851,11 +4851,12 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
+@@ -4325,11 +4325,12 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
  	const struct rte_flow_action *act;
  	const struct rte_flow_action_rss *rss;
  	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
@@ -29,12 +30,12 @@
  	struct i40e_rte_flow_rss_conf *rss_config =
  			&filter->rss_conf;
  	struct i40e_rte_flow_rss_conf *rss_info = &pf->rss_info;
--	uint16_t i, j, n, tmp, nb_types;
-+	uint16_t i, j, n, m, tmp, nb_types;
+-	uint16_t i, j, n, tmp;
++	uint16_t i, j, n, m, tmp;
  	uint32_t index = 0;
- 	uint64_t hf_bit = 1;
  
-@@ -4887,6 +4888,24 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
+ 	static const struct {
+@@ -4360,6 +4361,24 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
  			I40E_FILTER_PCTYPE_L2_PAYLOAD},
  	};
  
@@ -59,7 +60,7 @@
  	NEXT_ITEM_OF_ACTION(act, actions, index);
  	rss = act->conf;
  
-@@ -4912,6 +4931,18 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
+@@ -4385,6 +4404,18 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
  				break;
  			}
  		}
@@ -78,7 +79,7 @@
  	}
  
  	/**
-@@ -5009,9 +5040,9 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
+@@ -4482,9 +4513,9 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
  					info->region[i].user_priority_num++;
  				}
  
@@ -91,7 +92,7 @@
  					info->region[i].hw_flowtype[j] = tmp;
  					info->region[i].flowtype_num++;
  				}
-@@ -5024,9 +5055,9 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
+@@ -4497,9 +4528,9 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev,
  					info->region[i].user_priority_num++;
  				}
  

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

* [dpdk-stable] patch 'net/ixgbe: fix MAC control frame forward' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (162 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/i40e: fix filter pctype' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/ixgbe: fix flow control status' " luca.boccassi
                   ` (27 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Guinan Sun; +Cc: Wei Zhao, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 9fa2cc447cbf0120b0df99fabd52a7980c1cb9cf Mon Sep 17 00:00:00 2001
From: Guinan Sun <guinanx.sun@intel.com>
Date: Sat, 23 May 2020 05:22:38 +0000
Subject: [PATCH] net/ixgbe: fix MAC control frame forward

[ upstream commit 7b053b86d889acd7c3a02909774da08d3d90a4b0 ]

mac_ctrl_frame_fwd shouldn't be cleared when port stop,
otherwise it will be inconsistent with the actual status.
This patch fixes the issue.

Fixes: a524f550da6e ("net/ixgbe: fix flow control mode setting")

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 9dcff9935..ecbac8f18 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2936,8 +2936,6 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
 
 	adapter->rss_reta_updated = 0;
 
-	adapter->mac_ctrl_frame_fwd = 0;
-
 	hw->adapter_stopped = true;
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.927855698 +0100
+++ 0165-net-ixgbe-fix-MAC-control-frame-forward.patch	2020-07-24 12:53:48.555011453 +0100
@@ -1,14 +1,15 @@
-From 7b053b86d889acd7c3a02909774da08d3d90a4b0 Mon Sep 17 00:00:00 2001
+From 9fa2cc447cbf0120b0df99fabd52a7980c1cb9cf Mon Sep 17 00:00:00 2001
 From: Guinan Sun <guinanx.sun@intel.com>
 Date: Sat, 23 May 2020 05:22:38 +0000
 Subject: [PATCH] net/ixgbe: fix MAC control frame forward
 
+[ upstream commit 7b053b86d889acd7c3a02909774da08d3d90a4b0 ]
+
 mac_ctrl_frame_fwd shouldn't be cleared when port stop,
 otherwise it will be inconsistent with the actual status.
 This patch fixes the issue.
 
 Fixes: a524f550da6e ("net/ixgbe: fix flow control mode setting")
-Cc: stable@dpdk.org
 
 Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
 Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
@@ -18,10 +19,10 @@
  1 file changed, 2 deletions(-)
 
 diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
-index 095f1bde5..74c3c6b5d 100644
+index 9dcff9935..ecbac8f18 100644
 --- a/drivers/net/ixgbe/ixgbe_ethdev.c
 +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
-@@ -2926,8 +2926,6 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
+@@ -2936,8 +2936,6 @@ ixgbe_dev_stop(struct rte_eth_dev *dev)
  
  	adapter->rss_reta_updated = 0;
  

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

* [dpdk-stable] patch 'net/ixgbe: fix flow control status' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (163 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/ixgbe: fix MAC control frame forward' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/bonding: delete redundant code' " luca.boccassi
                   ` (26 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Guinan Sun; +Cc: Wei Zhao, Qi Zhang, Bo Chen, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From c1d088135a4268c025c9ff95fc769f36c976f11e Mon Sep 17 00:00:00 2001
From: Guinan Sun <guinanx.sun@intel.com>
Date: Sat, 23 May 2020 05:22:39 +0000
Subject: [PATCH] net/ixgbe: fix flow control status

[ upstream commit c778b7a39f30ffbb8326f81389668dc5f6f30888 ]

mac_ctrl_frame_fwd assignment is missing, so
setting mac_ctrl_frame_fwd should be added in
ixgbe_flow_ctrl_get().
The patch fixes the issue.

Fixes: 56ea46a997b7 ("ethdev: retrieve flow control configuration")

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Bo Chen <box.c.chen@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index ecbac8f18..875d4ee3d 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -4752,6 +4752,11 @@ ixgbe_flow_ctrl_get(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 	 * MFLCN register.
 	 */
 	mflcn_reg = IXGBE_READ_REG(hw, IXGBE_MFLCN);
+	if (mflcn_reg & IXGBE_MFLCN_PMCF)
+		fc_conf->mac_ctrl_frame_fwd = 1;
+	else
+		fc_conf->mac_ctrl_frame_fwd = 0;
+
 	if (mflcn_reg & (IXGBE_MFLCN_RPFCE | IXGBE_MFLCN_RFCE))
 		rx_pause = 1;
 	else
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.966896367 +0100
+++ 0166-net-ixgbe-fix-flow-control-status.patch	2020-07-24 12:53:48.563011602 +0100
@@ -1,15 +1,16 @@
-From c778b7a39f30ffbb8326f81389668dc5f6f30888 Mon Sep 17 00:00:00 2001
+From c1d088135a4268c025c9ff95fc769f36c976f11e Mon Sep 17 00:00:00 2001
 From: Guinan Sun <guinanx.sun@intel.com>
 Date: Sat, 23 May 2020 05:22:39 +0000
 Subject: [PATCH] net/ixgbe: fix flow control status
 
+[ upstream commit c778b7a39f30ffbb8326f81389668dc5f6f30888 ]
+
 mac_ctrl_frame_fwd assignment is missing, so
 setting mac_ctrl_frame_fwd should be added in
 ixgbe_flow_ctrl_get().
 The patch fixes the issue.
 
 Fixes: 56ea46a997b7 ("ethdev: retrieve flow control configuration")
-Cc: stable@dpdk.org
 
 Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
 Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
@@ -20,10 +21,10 @@
  1 file changed, 5 insertions(+)
 
 diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
-index 74c3c6b5d..fd0cb9b0e 100644
+index ecbac8f18..875d4ee3d 100644
 --- a/drivers/net/ixgbe/ixgbe_ethdev.c
 +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
-@@ -4743,6 +4743,11 @@ ixgbe_flow_ctrl_get(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -4752,6 +4752,11 @@ ixgbe_flow_ctrl_get(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
  	 * MFLCN register.
  	 */
  	mflcn_reg = IXGBE_READ_REG(hw, IXGBE_MFLCN);

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

* [dpdk-stable] patch 'net/bonding: delete redundant code' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (164 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/ixgbe: fix flow control status' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/i40e: report VLAN filter capability' " luca.boccassi
                   ` (25 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Dongyang Pan; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 2ac0580bcb2c757bd54cf0e2c3252781660368a4 Mon Sep 17 00:00:00 2001
From: Dongyang Pan <197020236@qq.com>
Date: Sat, 4 Jul 2020 09:15:26 +0800
Subject: [PATCH] net/bonding: delete redundant code

[ upstream commit 2db4cf9d01c5920be0397e5c7aba61779c997753 ]

The function valid_bonded_port_id() has already contains function
rte_eth_dev_is_valid_port(), so delete redundant check.

Fixes: 588ae95e7983 ("net/bonding: fix port ID check")

Signed-off-by: Dongyang Pan <197020236@qq.com>
Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 3991825ad..b24a44686 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -1676,9 +1676,6 @@ rte_eth_bond_8023ad_dedicated_queues_enable(uint16_t port)
 	dev = &rte_eth_devices[port];
 	internals = dev->data->dev_private;
 
-	if (check_for_bonded_ethdev(dev) != 0)
-		return -1;
-
 	if (bond_8023ad_slow_pkt_hw_filter_supported(port) != 0)
 		return -1;
 
@@ -1705,9 +1702,6 @@ rte_eth_bond_8023ad_dedicated_queues_disable(uint16_t port)
 	dev = &rte_eth_devices[port];
 	internals = dev->data->dev_private;
 
-	if (check_for_bonded_ethdev(dev) != 0)
-		return -1;
-
 	/* Device must be stopped to set up slow queue */
 	if (dev->data->dev_started)
 		return -1;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:55.007550473 +0100
+++ 0167-net-bonding-delete-redundant-code.patch	2020-07-24 12:53:48.563011602 +0100
@@ -1,13 +1,14 @@
-From 2db4cf9d01c5920be0397e5c7aba61779c997753 Mon Sep 17 00:00:00 2001
+From 2ac0580bcb2c757bd54cf0e2c3252781660368a4 Mon Sep 17 00:00:00 2001
 From: Dongyang Pan <197020236@qq.com>
 Date: Sat, 4 Jul 2020 09:15:26 +0800
 Subject: [PATCH] net/bonding: delete redundant code
 
+[ upstream commit 2db4cf9d01c5920be0397e5c7aba61779c997753 ]
+
 The function valid_bonded_port_id() has already contains function
 rte_eth_dev_is_valid_port(), so delete redundant check.
 
 Fixes: 588ae95e7983 ("net/bonding: fix port ID check")
-Cc: stable@dpdk.org
 
 Signed-off-by: Dongyang Pan <197020236@qq.com>
 Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>

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

* [dpdk-stable] patch 'net/i40e: report VLAN filter capability' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (165 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/bonding: delete redundant code' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/e1000: report VLAN extend " luca.boccassi
                   ` (24 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Zhihong Peng; +Cc: Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 036e35ca9c3cd8bd34d5157f9b26cd96b51cf612 Mon Sep 17 00:00:00 2001
From: Zhihong Peng <zhihongx.peng@intel.com>
Date: Mon, 20 Jul 2020 22:45:28 -0400
Subject: [PATCH] net/i40e: report VLAN filter capability

[ upstream commit 664c253e7f9d4eab460fa61458e1640a1c1caea7 ]

The rte_eth_dev_set_vlan_offload function will check vlan rx offload
capability, the i40e vf has vlan filter feature but
DEV_RX_OFFLOAD_VLAN_FILTER is not set into the capability, that will
cause setting fail. So need to add this capability in
i40e_vf_representor_dev_infos_get function.

Fixes: e0cb96204b71 ("net/i40e: add support for representor ports")

Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/i40e/i40e_vf_representor.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_vf_representor.c b/drivers/net/i40e/i40e_vf_representor.c
index b07b35c03..083bc1a5f 100644
--- a/drivers/net/i40e/i40e_vf_representor.c
+++ b/drivers/net/i40e/i40e_vf_representor.c
@@ -46,7 +46,8 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev,
 		DEV_RX_OFFLOAD_QINQ_STRIP |
 		DEV_RX_OFFLOAD_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_UDP_CKSUM |
-		DEV_RX_OFFLOAD_TCP_CKSUM;
+		DEV_RX_OFFLOAD_TCP_CKSUM |
+		DEV_RX_OFFLOAD_VLAN_FILTER;
 	dev_info->tx_offload_capa =
 		DEV_TX_OFFLOAD_MULTI_SEGS  |
 		DEV_TX_OFFLOAD_VLAN_INSERT |
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:55.043532119 +0100
+++ 0168-net-i40e-report-VLAN-filter-capability.patch	2020-07-24 12:53:48.563011602 +0100
@@ -1,8 +1,10 @@
-From 664c253e7f9d4eab460fa61458e1640a1c1caea7 Mon Sep 17 00:00:00 2001
+From 036e35ca9c3cd8bd34d5157f9b26cd96b51cf612 Mon Sep 17 00:00:00 2001
 From: Zhihong Peng <zhihongx.peng@intel.com>
 Date: Mon, 20 Jul 2020 22:45:28 -0400
 Subject: [PATCH] net/i40e: report VLAN filter capability
 
+[ upstream commit 664c253e7f9d4eab460fa61458e1640a1c1caea7 ]
+
 The rte_eth_dev_set_vlan_offload function will check vlan rx offload
 capability, the i40e vf has vlan filter feature but
 DEV_RX_OFFLOAD_VLAN_FILTER is not set into the capability, that will
@@ -10,7 +12,6 @@
 i40e_vf_representor_dev_infos_get function.
 
 Fixes: e0cb96204b71 ("net/i40e: add support for representor ports")
-Cc: stable@dpdk.org
 
 Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
 Acked-by: Jeff Guo <jia.guo@intel.com>

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

* [dpdk-stable] patch 'net/e1000: report VLAN extend capability' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (166 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/i40e: report VLAN filter capability' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/e1000: fix crash on Tx done clean up' " luca.boccassi
                   ` (23 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Zhihong Peng; +Cc: Wei Zhao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 116e6fde4f5fdb541d6a1d30b311587fb086e22f Mon Sep 17 00:00:00 2001
From: Zhihong Peng <zhihongx.peng@intel.com>
Date: Mon, 20 Jul 2020 23:05:14 -0400
Subject: [PATCH] net/e1000: report VLAN extend capability

[ upstream commit 21f4a1fb30ffd566769f9a4be8775433c00c44d0 ]

The rte_eth_dev_set_vlan_offload function will check vlan rx offload
capability, the i350/i210/i211 nics have vlan extend feature but
DEV_RX_OFFLOAD_VLAN_EXTEND is not set into the capability, that will
cause setting fail. So need to add this capability in
igb_get_rx_port_offloads_capa function.

Fixes: ef990fb56e55 ("net/e1000: convert to new Rx offloads API")

Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/e1000/igb_rxtx.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 684fa4ad8..92576b0af 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -1637,8 +1637,10 @@ uint64_t
 igb_get_rx_port_offloads_capa(struct rte_eth_dev *dev)
 {
 	uint64_t rx_offload_capa;
+	struct e1000_hw *hw;
+
+	hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
-	RTE_SET_USED(dev);
 	rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP  |
 			  DEV_RX_OFFLOAD_VLAN_FILTER |
 			  DEV_RX_OFFLOAD_IPV4_CKSUM  |
@@ -1649,6 +1651,11 @@ igb_get_rx_port_offloads_capa(struct rte_eth_dev *dev)
 			  DEV_RX_OFFLOAD_SCATTER     |
 			  DEV_RX_OFFLOAD_RSS_HASH;
 
+	if (hw->mac.type == e1000_i350 ||
+	    hw->mac.type == e1000_i210 ||
+	    hw->mac.type == e1000_i211)
+		rx_offload_capa |= DEV_RX_OFFLOAD_VLAN_EXTEND;
+
 	return rx_offload_capa;
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:55.076772718 +0100
+++ 0169-net-e1000-report-VLAN-extend-capability.patch	2020-07-24 12:53:48.567011676 +0100
@@ -1,8 +1,10 @@
-From 21f4a1fb30ffd566769f9a4be8775433c00c44d0 Mon Sep 17 00:00:00 2001
+From 116e6fde4f5fdb541d6a1d30b311587fb086e22f Mon Sep 17 00:00:00 2001
 From: Zhihong Peng <zhihongx.peng@intel.com>
 Date: Mon, 20 Jul 2020 23:05:14 -0400
 Subject: [PATCH] net/e1000: report VLAN extend capability
 
+[ upstream commit 21f4a1fb30ffd566769f9a4be8775433c00c44d0 ]
+
 The rte_eth_dev_set_vlan_offload function will check vlan rx offload
 capability, the i350/i210/i211 nics have vlan extend feature but
 DEV_RX_OFFLOAD_VLAN_EXTEND is not set into the capability, that will
@@ -10,7 +12,6 @@
 igb_get_rx_port_offloads_capa function.
 
 Fixes: ef990fb56e55 ("net/e1000: convert to new Rx offloads API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
 Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
@@ -19,7 +20,7 @@
  1 file changed, 8 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
-index 5717cdb70..6411924e0 100644
+index 684fa4ad8..92576b0af 100644
 --- a/drivers/net/e1000/igb_rxtx.c
 +++ b/drivers/net/e1000/igb_rxtx.c
 @@ -1637,8 +1637,10 @@ uint64_t

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

* [dpdk-stable] patch 'net/e1000: fix crash on Tx done clean up' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (167 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/e1000: report VLAN extend " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/mlx5: fix UAR lock sharing for multiport devices' " luca.boccassi
                   ` (22 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Jeff Guo; +Cc: Wei Zhao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 560396caddb52bd6ea7996a95ab3523d68e8f1dd Mon Sep 17 00:00:00 2001
From: Jeff Guo <jia.guo@intel.com>
Date: Thu, 16 Jul 2020 17:24:38 +0800
Subject: [PATCH] net/e1000: fix crash on Tx done clean up

[ upstream commit 4237be2b9e250d431d465b81a0abbe5fb559d2c8 ]

As tx mbuf is not set for some advanced descriptors, if there is no
mbuf checking before rte_pktmbuf_free_seg() function be called on
the process of tx done clean up, that will cause a segfault. So add
a NULL pointer check to fix it.

Bugzilla ID: 501
Fixes: 8d907d2b79f7 ("net/igb: free consumed Tx buffers on demand")

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/e1000/igb_rxtx.c | 188 +++++++++++++++++------------------
 1 file changed, 91 insertions(+), 97 deletions(-)

diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 92576b0af..5260bbe34 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -1295,113 +1295,107 @@ igb_tx_done_cleanup(struct igb_tx_queue *txq, uint32_t free_cnt)
 	uint16_t tx_id;    /* Current segment being processed. */
 	uint16_t tx_last;  /* Last segment in the current packet. */
 	uint16_t tx_next;  /* First segment of the next packet. */
-	int count;
-
-	if (txq != NULL) {
-		count = 0;
-		sw_ring = txq->sw_ring;
-		txr = txq->tx_ring;
-
-		/*
-		 * tx_tail is the last sent packet on the sw_ring. Goto the end
-		 * of that packet (the last segment in the packet chain) and
-		 * then the next segment will be the start of the oldest segment
-		 * in the sw_ring. This is the first packet that will be
-		 * attempted to be freed.
-		 */
-
-		/* Get last segment in most recently added packet. */
-		tx_first = sw_ring[txq->tx_tail].last_id;
-
-		/* Get the next segment, which is the oldest segment in ring. */
-		tx_first = sw_ring[tx_first].next_id;
-
-		/* Set the current index to the first. */
-		tx_id = tx_first;
-
-		/*
-		 * Loop through each packet. For each packet, verify that an
-		 * mbuf exists and that the last segment is free. If so, free
-		 * it and move on.
-		 */
-		while (1) {
-			tx_last = sw_ring[tx_id].last_id;
-
-			if (sw_ring[tx_last].mbuf) {
-				if (txr[tx_last].wb.status &
-						E1000_TXD_STAT_DD) {
-					/*
-					 * Increment the number of packets
-					 * freed.
-					 */
-					count++;
-
-					/* Get the start of the next packet. */
-					tx_next = sw_ring[tx_last].next_id;
-
-					/*
-					 * Loop through all segments in a
-					 * packet.
-					 */
-					do {
-						rte_pktmbuf_free_seg(sw_ring[tx_id].mbuf);
+	int count = 0;
+
+	if (!txq)
+		return -ENODEV;
+
+	sw_ring = txq->sw_ring;
+	txr = txq->tx_ring;
+
+	/* tx_tail is the last sent packet on the sw_ring. Goto the end
+	 * of that packet (the last segment in the packet chain) and
+	 * then the next segment will be the start of the oldest segment
+	 * in the sw_ring. This is the first packet that will be
+	 * attempted to be freed.
+	 */
+
+	/* Get last segment in most recently added packet. */
+	tx_first = sw_ring[txq->tx_tail].last_id;
+
+	/* Get the next segment, which is the oldest segment in ring. */
+	tx_first = sw_ring[tx_first].next_id;
+
+	/* Set the current index to the first. */
+	tx_id = tx_first;
+
+	/* Loop through each packet. For each packet, verify that an
+	 * mbuf exists and that the last segment is free. If so, free
+	 * it and move on.
+	 */
+	while (1) {
+		tx_last = sw_ring[tx_id].last_id;
+
+		if (sw_ring[tx_last].mbuf) {
+			if (txr[tx_last].wb.status &
+			    E1000_TXD_STAT_DD) {
+				/* Increment the number of packets
+				 * freed.
+				 */
+				count++;
+
+				/* Get the start of the next packet. */
+				tx_next = sw_ring[tx_last].next_id;
+
+				/* Loop through all segments in a
+				 * packet.
+				 */
+				do {
+					if (sw_ring[tx_id].mbuf) {
+						rte_pktmbuf_free_seg(
+							sw_ring[tx_id].mbuf);
 						sw_ring[tx_id].mbuf = NULL;
 						sw_ring[tx_id].last_id = tx_id;
+					}
 
-						/* Move to next segemnt. */
-						tx_id = sw_ring[tx_id].next_id;
-
-					} while (tx_id != tx_next);
-
-					if (unlikely(count == (int)free_cnt))
-						break;
-				} else
-					/*
-					 * mbuf still in use, nothing left to
-					 * free.
-					 */
-					break;
-			} else {
-				/*
-				 * There are multiple reasons to be here:
-				 * 1) All the packets on the ring have been
-				 *    freed - tx_id is equal to tx_first
-				 *    and some packets have been freed.
-				 *    - Done, exit
-				 * 2) Interfaces has not sent a rings worth of
-				 *    packets yet, so the segment after tail is
-				 *    still empty. Or a previous call to this
-				 *    function freed some of the segments but
-				 *    not all so there is a hole in the list.
-				 *    Hopefully this is a rare case.
-				 *    - Walk the list and find the next mbuf. If
-				 *      there isn't one, then done.
-				 */
-				if (likely((tx_id == tx_first) && (count != 0)))
-					break;
-
-				/*
-				 * Walk the list and find the next mbuf, if any.
-				 */
-				do {
 					/* Move to next segemnt. */
 					tx_id = sw_ring[tx_id].next_id;
 
-					if (sw_ring[tx_id].mbuf)
-						break;
+				} while (tx_id != tx_next);
 
-				} while (tx_id != tx_first);
-
-				/*
-				 * Determine why previous loop bailed. If there
-				 * is not an mbuf, done.
+				if (unlikely(count == (int)free_cnt))
+					break;
+			} else {
+				/* mbuf still in use, nothing left to
+				 * free.
 				 */
-				if (sw_ring[tx_id].mbuf == NULL)
-					break;
+				break;
 			}
+		} else {
+			/* There are multiple reasons to be here:
+			 * 1) All the packets on the ring have been
+			 *    freed - tx_id is equal to tx_first
+			 *    and some packets have been freed.
+			 *    - Done, exit
+			 * 2) Interfaces has not sent a rings worth of
+			 *    packets yet, so the segment after tail is
+			 *    still empty. Or a previous call to this
+			 *    function freed some of the segments but
+			 *    not all so there is a hole in the list.
+			 *    Hopefully this is a rare case.
+			 *    - Walk the list and find the next mbuf. If
+			 *      there isn't one, then done.
+			 */
+			if (likely(tx_id == tx_first && count != 0))
+				break;
+
+			/* Walk the list and find the next mbuf, if any. */
+			do {
+				/* Move to next segemnt. */
+				tx_id = sw_ring[tx_id].next_id;
+
+				if (sw_ring[tx_id].mbuf)
+					break;
+
+			} while (tx_id != tx_first);
+
+			/* Determine why previous loop bailed. If there
+			 * is not an mbuf, done.
+			 */
+			if (!sw_ring[tx_id].mbuf)
+				break;
 		}
-	} else
-		count = -ENODEV;
+	}
 
 	return count;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:55.111535714 +0100
+++ 0170-net-e1000-fix-crash-on-Tx-done-clean-up.patch	2020-07-24 12:53:48.571011751 +0100
@@ -1,8 +1,10 @@
-From 4237be2b9e250d431d465b81a0abbe5fb559d2c8 Mon Sep 17 00:00:00 2001
+From 560396caddb52bd6ea7996a95ab3523d68e8f1dd Mon Sep 17 00:00:00 2001
 From: Jeff Guo <jia.guo@intel.com>
 Date: Thu, 16 Jul 2020 17:24:38 +0800
 Subject: [PATCH] net/e1000: fix crash on Tx done clean up
 
+[ upstream commit 4237be2b9e250d431d465b81a0abbe5fb559d2c8 ]
+
 As tx mbuf is not set for some advanced descriptors, if there is no
 mbuf checking before rte_pktmbuf_free_seg() function be called on
 the process of tx done clean up, that will cause a segfault. So add
@@ -10,7 +12,6 @@
 
 Bugzilla ID: 501
 Fixes: 8d907d2b79f7 ("net/igb: free consumed Tx buffers on demand")
-Cc: stable@dpdk.org
 
 Signed-off-by: Jeff Guo <jia.guo@intel.com>
 Reviewed-by: Wei Zhao <wei.zhao1@intel.com>
@@ -19,7 +20,7 @@
  1 file changed, 91 insertions(+), 97 deletions(-)
 
 diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
-index 6411924e0..dd520cd82 100644
+index 92576b0af..5260bbe34 100644
 --- a/drivers/net/e1000/igb_rxtx.c
 +++ b/drivers/net/e1000/igb_rxtx.c
 @@ -1295,113 +1295,107 @@ igb_tx_done_cleanup(struct igb_tx_queue *txq, uint32_t free_cnt)

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

* [dpdk-stable] patch 'net/mlx5: fix UAR lock sharing for multiport devices' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (168 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/e1000: fix crash on Tx done clean up' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/mlx5: fix HW counters path in switchdev mode' " luca.boccassi
                   ` (21 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From cb42557252097729c0631a76c99343c752ebfb93 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 16 Jul 2020 08:23:06 +0000
Subject: [PATCH] net/mlx5: fix UAR lock sharing for multiport devices

[ upstream commit 24feb04596af9ca1893fb589d6a0404ebe088771 ]

The master and representors might be created over the multiport
Infiniband devices and the UAR resource allocated for sibling
ports might belong to the same underlying Infiniband device.
Hardware requires the write access to the UAR must be performed
as atomic 64-bit write, on 32-bit systems this is two sequential
writes, protected by lock. Due to possibility to share the same
UAR between sibling devices the locks must be moved to shared
context.

Fixes: f048f3d479a6 ("net/mlx5: switch to the shared IB device context")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5.c     | 12 ++++++------
 drivers/net/mlx5/mlx5.h     | 10 +++++-----
 drivers/net/mlx5/mlx5_rxq.c |  2 +-
 drivers/net/mlx5/mlx5_txq.c |  2 +-
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index ce76c96db..c97e54251 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -687,6 +687,12 @@ mlx5_alloc_shared_ibctx(const struct mlx5_dev_spawn_data *spawn,
 		goto error;
 	}
 #endif /* HAVE_IBV_FLOW_DV_SUPPORT */
+#ifndef RTE_ARCH_64
+	/* Initialize UAR access locks for 32bit implementations. */
+	rte_spinlock_init(&sh->uar_lock_cq);
+	for (i = 0; i < MLX5_UAR_PAGE_NUM_MAX; i++)
+		rte_spinlock_init(&sh->uar_lock[i]);
+#endif
 	/*
 	 * Once the device is added to the list of memory event
 	 * callback, its global MR cache table cannot be expanded
@@ -2399,12 +2405,6 @@ err_secondary:
 	priv->ibv_port = spawn->ibv_port;
 	priv->pci_dev = spawn->pci_dev;
 	priv->mtu = RTE_ETHER_MTU;
-#ifndef RTE_ARCH_64
-	/* Initialize UAR access locks for 32bit implementations. */
-	rte_spinlock_init(&priv->uar_lock_cq);
-	for (i = 0; i < MLX5_UAR_PAGE_NUM_MAX; i++)
-		rte_spinlock_init(&priv->uar_lock[i]);
-#endif
 	/* Some internal functions rely on Netlink sockets, open them now. */
 	priv->nl_socket_rdma = mlx5_nl_init(NETLINK_RDMA);
 	priv->nl_socket_route =	mlx5_nl_init(NETLINK_ROUTE);
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index e53934d45..130aed0e5 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -669,6 +669,11 @@ struct mlx5_ibv_shared {
 	void *fdb_domain; /* FDB Direct Rules name space handle. */
 	void *rx_domain; /* RX Direct Rules name space handle. */
 	void *tx_domain; /* TX Direct Rules name space handle. */
+#ifndef RTE_ARCH_64
+	rte_spinlock_t uar_lock_cq; /* CQs share a common distinct UAR */
+	rte_spinlock_t uar_lock[MLX5_UAR_PAGE_NUM_MAX];
+	/* UAR same-page access control required in 32bit implementations. */
+#endif
 	struct mlx5_hlist *flow_tbls;
 	/* Direct Rules tables for FDB, NIC TX+RX */
 	void *esw_drop_action; /* Pointer to DR E-Switch drop action. */
@@ -777,11 +782,6 @@ struct mlx5_priv {
 	uint8_t mtr_color_reg; /* Meter color match REG_C. */
 	struct mlx5_mtr_profiles flow_meter_profiles; /* MTR profile list. */
 	struct mlx5_flow_meters flow_meters; /* MTR list. */
-#ifndef RTE_ARCH_64
-	rte_spinlock_t uar_lock_cq; /* CQs share a common distinct UAR */
-	rte_spinlock_t uar_lock[MLX5_UAR_PAGE_NUM_MAX];
-	/* UAR same-page access control required in 32bit implementations. */
-#endif
 	uint8_t skip_default_rss_reta; /* Skip configuration of default reta. */
 	uint8_t fdb_def_rule; /* Whether fdb jump to table 1 is configured. */
 };
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index e9e8f1278..970ce5cd0 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1975,7 +1975,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 	tmpl->rxq.elts =
 		(struct rte_mbuf *(*)[1 << tmpl->rxq.elts_n])(tmpl + 1);
 #ifndef RTE_ARCH_64
-	tmpl->rxq.uar_lock_cq = &priv->uar_lock_cq;
+	tmpl->rxq.uar_lock_cq = &priv->sh->uar_lock_cq;
 #endif
 	tmpl->rxq.idx = idx;
 	rte_atomic32_inc(&tmpl->refcnt);
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index ff1e4fc85..0b092c4a9 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -352,7 +352,7 @@ txq_uar_init(struct mlx5_txq_ctrl *txq_ctrl)
 	/* Assign an UAR lock according to UAR page number */
 	lock_idx = (txq_ctrl->uar_mmap_offset / page_size) &
 		   MLX5_UAR_PAGE_NUM_MASK;
-	txq_ctrl->txq.uar_lock = &priv->uar_lock[lock_idx];
+	txq_ctrl->txq.uar_lock = &priv->sh->uar_lock[lock_idx];
 #endif
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:55.146347382 +0100
+++ 0171-net-mlx5-fix-UAR-lock-sharing-for-multiport-devices.patch	2020-07-24 12:53:48.575011825 +0100
@@ -1,8 +1,10 @@
-From 24feb04596af9ca1893fb589d6a0404ebe088771 Mon Sep 17 00:00:00 2001
+From cb42557252097729c0631a76c99343c752ebfb93 Mon Sep 17 00:00:00 2001
 From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
 Date: Thu, 16 Jul 2020 08:23:06 +0000
 Subject: [PATCH] net/mlx5: fix UAR lock sharing for multiport devices
 
+[ upstream commit 24feb04596af9ca1893fb589d6a0404ebe088771 ]
+
 The master and representors might be created over the multiport
 Infiniband devices and the UAR resource allocated for sibling
 ports might belong to the same underlying Infiniband device.
@@ -13,43 +15,24 @@
 context.
 
 Fixes: f048f3d479a6 ("net/mlx5: switch to the shared IB device context")
-Cc: stable@dpdk.org
 
 Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
 ---
- drivers/net/mlx5/linux/mlx5_os.c |  6 ------
- drivers/net/mlx5/mlx5.c          |  6 ++++++
- drivers/net/mlx5/mlx5.h          | 10 +++++-----
- drivers/net/mlx5/mlx5_rxq.c      |  2 +-
- drivers/net/mlx5/mlx5_txq.c      |  2 +-
- 5 files changed, 13 insertions(+), 13 deletions(-)
+ drivers/net/mlx5/mlx5.c     | 12 ++++++------
+ drivers/net/mlx5/mlx5.h     | 10 +++++-----
+ drivers/net/mlx5/mlx5_rxq.c |  2 +-
+ drivers/net/mlx5/mlx5_txq.c |  2 +-
+ 4 files changed, 13 insertions(+), 13 deletions(-)
 
-diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
-index 14af468d6..63e9350a0 100644
---- a/drivers/net/mlx5/linux/mlx5_os.c
-+++ b/drivers/net/mlx5/linux/mlx5_os.c
-@@ -630,12 +630,6 @@ err_secondary:
- 	priv->mtu = RTE_ETHER_MTU;
- 	priv->mp_id.port_id = port_id;
- 	strlcpy(priv->mp_id.name, MLX5_MP_NAME, RTE_MP_MAX_NAME_LEN);
--#ifndef RTE_ARCH_64
--	/* Initialize UAR access locks for 32bit implementations. */
--	rte_spinlock_init(&priv->uar_lock_cq);
--	for (i = 0; i < MLX5_UAR_PAGE_NUM_MAX; i++)
--		rte_spinlock_init(&priv->uar_lock[i]);
--#endif
- 	/* Some internal functions rely on Netlink sockets, open them now. */
- 	priv->nl_socket_rdma = mlx5_nl_init(NETLINK_RDMA);
- 	priv->nl_socket_route =	mlx5_nl_init(NETLINK_ROUTE);
 diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
-index 72e0870eb..0786945ce 100644
+index ce76c96db..c97e54251 100644
 --- a/drivers/net/mlx5/mlx5.c
 +++ b/drivers/net/mlx5/mlx5.c
-@@ -717,6 +717,12 @@ mlx5_alloc_shared_dev_ctx(const struct mlx5_dev_spawn_data *spawn,
- 		err = ENOMEM;
+@@ -687,6 +687,12 @@ mlx5_alloc_shared_ibctx(const struct mlx5_dev_spawn_data *spawn,
  		goto error;
  	}
+ #endif /* HAVE_IBV_FLOW_DV_SUPPORT */
 +#ifndef RTE_ARCH_64
 +	/* Initialize UAR access locks for 32bit implementations. */
 +	rte_spinlock_init(&sh->uar_lock_cq);
@@ -59,11 +42,24 @@
  	/*
  	 * Once the device is added to the list of memory event
  	 * callback, its global MR cache table cannot be expanded
+@@ -2399,12 +2405,6 @@ err_secondary:
+ 	priv->ibv_port = spawn->ibv_port;
+ 	priv->pci_dev = spawn->pci_dev;
+ 	priv->mtu = RTE_ETHER_MTU;
+-#ifndef RTE_ARCH_64
+-	/* Initialize UAR access locks for 32bit implementations. */
+-	rte_spinlock_init(&priv->uar_lock_cq);
+-	for (i = 0; i < MLX5_UAR_PAGE_NUM_MAX; i++)
+-		rte_spinlock_init(&priv->uar_lock[i]);
+-#endif
+ 	/* Some internal functions rely on Netlink sockets, open them now. */
+ 	priv->nl_socket_rdma = mlx5_nl_init(NETLINK_RDMA);
+ 	priv->nl_socket_route =	mlx5_nl_init(NETLINK_ROUTE);
 diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
-index 84cd3e125..d01d7f3c5 100644
+index e53934d45..130aed0e5 100644
 --- a/drivers/net/mlx5/mlx5.h
 +++ b/drivers/net/mlx5/mlx5.h
-@@ -559,6 +559,11 @@ struct mlx5_dev_ctx_shared {
+@@ -669,6 +669,11 @@ struct mlx5_ibv_shared {
  	void *fdb_domain; /* FDB Direct Rules name space handle. */
  	void *rx_domain; /* RX Direct Rules name space handle. */
  	void *tx_domain; /* TX Direct Rules name space handle. */
@@ -75,7 +71,7 @@
  	struct mlx5_hlist *flow_tbls;
  	/* Direct Rules tables for FDB, NIC TX+RX */
  	void *esw_drop_action; /* Pointer to DR E-Switch drop action. */
-@@ -673,11 +678,6 @@ struct mlx5_priv {
+@@ -777,11 +782,6 @@ struct mlx5_priv {
  	uint8_t mtr_color_reg; /* Meter color match REG_C. */
  	struct mlx5_mtr_profiles flow_meter_profiles; /* MTR profile list. */
  	struct mlx5_flow_meters flow_meters; /* MTR list. */
@@ -86,12 +82,12 @@
 -#endif
  	uint8_t skip_default_rss_reta; /* Skip configuration of default reta. */
  	uint8_t fdb_def_rule; /* Whether fdb jump to table 1 is configured. */
- 	struct mlx5_mp_id mp_id; /* ID of a multi-process process */
+ };
 diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
-index b436f0610..26813225b 100644
+index e9e8f1278..970ce5cd0 100644
 --- a/drivers/net/mlx5/mlx5_rxq.c
 +++ b/drivers/net/mlx5/mlx5_rxq.c
-@@ -1997,7 +1997,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
+@@ -1975,7 +1975,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
  	tmpl->rxq.elts =
  		(struct rte_mbuf *(*)[1 << tmpl->rxq.elts_n])(tmpl + 1);
  #ifndef RTE_ARCH_64
@@ -101,10 +97,10 @@
  	tmpl->rxq.idx = idx;
  	rte_atomic32_inc(&tmpl->refcnt);
 diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
-index 35b3ade86..e1fa24e40 100644
+index ff1e4fc85..0b092c4a9 100644
 --- a/drivers/net/mlx5/mlx5_txq.c
 +++ b/drivers/net/mlx5/mlx5_txq.c
-@@ -355,7 +355,7 @@ txq_uar_init(struct mlx5_txq_ctrl *txq_ctrl)
+@@ -352,7 +352,7 @@ txq_uar_init(struct mlx5_txq_ctrl *txq_ctrl)
  	/* Assign an UAR lock according to UAR page number */
  	lock_idx = (txq_ctrl->uar_mmap_offset / page_size) &
  		   MLX5_UAR_PAGE_NUM_MASK;

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

* [dpdk-stable] patch 'net/mlx5: fix HW counters path in switchdev mode' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (169 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/mlx5: fix UAR lock sharing for multiport devices' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/mlx5: fix VLAN pop with decap action validation' " luca.boccassi
                   ` (20 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Shy Shyman; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 9b7e7f229e94d30d6de0bd0782b778c379dba898 Mon Sep 17 00:00:00 2001
From: Shy Shyman <shys@mellanox.com>
Date: Wed, 15 Jul 2020 13:50:55 +0300
Subject: [PATCH] net/mlx5: fix HW counters path in switchdev mode

[ upstream commit 038e7fc085746167f8a50c1612acada5a78fc7da ]

When debugging performance of a DPDK application the user may
need to view the different statistics of DPDK (for example out_of_buffer)
This can be enabled by using testpmd command 'show port xstats
<port_id>' for example.

The current implementation assumes legacy mode in which the counters
are at <ibdev_path>/<port_id>/hw_counters/<file_name>.
In switchdev mode the counters file is located right after the device
name, hence resides at <ibdev_path>/hw_counters.

The fix tries to open the path in the second location after a failure
to open the file from the first location.

Fixes: 9c0a9eed37f1 ("net/mlx5: switch to the names in the shared IB context")

Signed-off-by: Shy Shyman <shys@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_stats.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c
index 636fc80c7..f3ec9543f 100644
--- a/drivers/net/mlx5/mlx5_stats.c
+++ b/drivers/net/mlx5/mlx5_stats.c
@@ -145,10 +145,20 @@ mlx5_read_ib_stat(struct mlx5_priv *priv, const char *ctr_name, uint64_t *stat)
 
 	if (priv->sh) {
 		MKSTR(path, "%s/ports/%d/hw_counters/%s",
-			  priv->sh->ibdev_path,
-			  priv->ibv_port,
-			  ctr_name);
+		      priv->sh->ibdev_path,
+		      priv->ibv_port,
+		      ctr_name);
 		fd = open(path, O_RDONLY);
+		/*
+		 * in switchdev the file location is not per port
+		 * but rather in <ibdev_path>/hw_counters/<file_name>.
+		 */
+		if (fd == -1) {
+			MKSTR(path1, "%s/hw_counters/%s",
+			      priv->sh->ibdev_path,
+			      ctr_name);
+			fd = open(path1, O_RDONLY);
+		}
 		if (fd != -1) {
 			char buf[21] = {'\0'};
 			ssize_t n = read(fd, buf, sizeof(buf));
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:55.187825621 +0100
+++ 0172-net-mlx5-fix-HW-counters-path-in-switchdev-mode.patch	2020-07-24 12:53:48.579011900 +0100
@@ -1,8 +1,10 @@
-From 038e7fc085746167f8a50c1612acada5a78fc7da Mon Sep 17 00:00:00 2001
+From 9b7e7f229e94d30d6de0bd0782b778c379dba898 Mon Sep 17 00:00:00 2001
 From: Shy Shyman <shys@mellanox.com>
 Date: Wed, 15 Jul 2020 13:50:55 +0300
 Subject: [PATCH] net/mlx5: fix HW counters path in switchdev mode
 
+[ upstream commit 038e7fc085746167f8a50c1612acada5a78fc7da ]
+
 When debugging performance of a DPDK application the user may
 need to view the different statistics of DPDK (for example out_of_buffer)
 This can be enabled by using testpmd command 'show port xstats
@@ -17,27 +19,26 @@
 to open the file from the first location.
 
 Fixes: 9c0a9eed37f1 ("net/mlx5: switch to the names in the shared IB context")
-Cc: stable@dpdk.org
 
 Signed-off-by: Shy Shyman <shys@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
 ---
- drivers/net/mlx5/linux/mlx5_os.c | 16 +++++++++++++---
+ drivers/net/mlx5/mlx5_stats.c | 16 +++++++++++++---
  1 file changed, 13 insertions(+), 3 deletions(-)
 
-diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
-index 9622eb31e..c4e6c6f6f 100644
---- a/drivers/net/mlx5/linux/mlx5_os.c
-+++ b/drivers/net/mlx5/linux/mlx5_os.c
-@@ -2166,10 +2166,20 @@ mlx5_os_read_dev_stat(struct mlx5_priv *priv, const char *ctr_name,
+diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c
+index 636fc80c7..f3ec9543f 100644
+--- a/drivers/net/mlx5/mlx5_stats.c
++++ b/drivers/net/mlx5/mlx5_stats.c
+@@ -145,10 +145,20 @@ mlx5_read_ib_stat(struct mlx5_priv *priv, const char *ctr_name, uint64_t *stat)
  
  	if (priv->sh) {
  		MKSTR(path, "%s/ports/%d/hw_counters/%s",
 -			  priv->sh->ibdev_path,
--			  priv->dev_port,
+-			  priv->ibv_port,
 -			  ctr_name);
 +		      priv->sh->ibdev_path,
-+		      priv->dev_port,
++		      priv->ibv_port,
 +		      ctr_name);
  		fd = open(path, O_RDONLY);
 +		/*

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

* [dpdk-stable] patch 'net/mlx5: fix VLAN pop with decap action validation' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (170 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/mlx5: fix HW counters path in switchdev mode' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/mlx5: fix VLAN push action on hairpin queue' " luca.boccassi
                   ` (19 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Dekel Peled; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 2e5ccbf2ee47f0a9771e7572e76f0f1cbbebdcea Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 15 Jul 2020 10:30:33 +0300
Subject: [PATCH] net/mlx5: fix VLAN pop with decap action validation

[ upstream commit dd6745da6dea7c3e954ed4e93ba161416ccd3a80 ]

The combination of decap action followed by pop VLAN action is not
fully validated in existing code.

This patch updates the validation function of pop vlan action.
Pop VLAN with preceding Decap requires inner header with VLAN.
Pop VLAN without preceding Decap requires outer header with VLAN.

Fixes: b41e47da2592 ("net/mlx5: support pop flow action on VLAN header")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 930e16026..2407f8723 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1682,7 +1682,17 @@ flow_dv_validate_action_pop_vlan(struct rte_eth_dev *dev,
 					  RTE_FLOW_ERROR_TYPE_ACTION, action,
 					  "no support for multiple VLAN "
 					  "actions");
-	if (!(item_flags & MLX5_FLOW_LAYER_OUTER_VLAN))
+	/* Pop VLAN with preceding Decap requires inner header with VLAN. */
+	if ((action_flags & MLX5_FLOW_ACTION_DECAP) &&
+	    !(item_flags & MLX5_FLOW_LAYER_INNER_VLAN))
+		return rte_flow_error_set(error, ENOTSUP,
+					  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+					  NULL,
+					  "cannot pop vlan after decap without "
+					  "match on inner vlan in the flow");
+	/* Pop VLAN without preceding Decap requires outer header with VLAN. */
+	if (!(action_flags & MLX5_FLOW_ACTION_DECAP) &&
+	    !(item_flags & MLX5_FLOW_LAYER_OUTER_VLAN))
 		return rte_flow_error_set(error, ENOTSUP,
 					  RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 					  NULL,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:55.222927542 +0100
+++ 0173-net-mlx5-fix-VLAN-pop-with-decap-action-validation.patch	2020-07-24 12:53:48.583011974 +0100
@@ -1,8 +1,10 @@
-From dd6745da6dea7c3e954ed4e93ba161416ccd3a80 Mon Sep 17 00:00:00 2001
+From 2e5ccbf2ee47f0a9771e7572e76f0f1cbbebdcea Mon Sep 17 00:00:00 2001
 From: Dekel Peled <dekelp@mellanox.com>
 Date: Wed, 15 Jul 2020 10:30:33 +0300
 Subject: [PATCH] net/mlx5: fix VLAN pop with decap action validation
 
+[ upstream commit dd6745da6dea7c3e954ed4e93ba161416ccd3a80 ]
+
 The combination of decap action followed by pop VLAN action is not
 fully validated in existing code.
 
@@ -11,7 +13,6 @@
 Pop VLAN without preceding Decap requires outer header with VLAN.
 
 Fixes: b41e47da2592 ("net/mlx5: support pop flow action on VLAN header")
-Cc: stable@dpdk.org
 
 Signed-off-by: Dekel Peled <dekelp@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -20,10 +21,10 @@
  1 file changed, 11 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 778a766cd..5ba788a33 100644
+index 930e16026..2407f8723 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -1832,7 +1832,17 @@ flow_dv_validate_action_pop_vlan(struct rte_eth_dev *dev,
+@@ -1682,7 +1682,17 @@ flow_dv_validate_action_pop_vlan(struct rte_eth_dev *dev,
  					  RTE_FLOW_ERROR_TYPE_ACTION, action,
  					  "no support for multiple VLAN "
  					  "actions");

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

* [dpdk-stable] patch 'net/mlx5: fix VLAN push action on hairpin queue' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (171 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/mlx5: fix VLAN pop with decap action validation' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'vhost: fix double-free with zero-copy' " luca.boccassi
                   ` (18 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Dekel Peled; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 6e3b631758528c2125e78c4c03e028d6966d6456 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Wed, 15 Jul 2020 10:31:01 +0300
Subject: [PATCH] net/mlx5: fix VLAN push action on hairpin queue

[ upstream commit 210008309b45316288869377be574c22f670b825 ]

Push VLAN action is allowed on Tx only, same as encap action.
Flow rules for hairpin queue are created on Rx, and split
by PMD to Rx and Tx rules, according to the above limitation.
In current implementation the encap action is split to Tx rule.
This patch adds the same handling for push-vlan action, as well as
its complementing actions set-vlan-vid and set-vlan-pcp.

Fixes: d85c7b5ea59f ("net/mlx5: split hairpin flows")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c    | 23 +++++++++++------
 drivers/net/mlx5/mlx5_flow_dv.c | 46 +++++++++++++++++++--------------
 2 files changed, 41 insertions(+), 28 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 400273f25..be45091f4 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2799,10 +2799,10 @@ flow_check_meter_action(const struct rte_flow_action actions[], uint32_t *mtr)
 }
 
 /**
- * Check if the flow should be splited due to hairpin.
+ * Check if the flow should be split due to hairpin.
  * The reason for the split is that in current HW we can't
- * support encap on Rx, so if a flow have encap we move it
- * to Tx.
+ * support encap and push-vlan on Rx, so if a flow contains
+ * these actions we move it to Tx.
  *
  * @param dev
  *   Pointer to Ethernet device.
@@ -2822,7 +2822,7 @@ flow_check_hairpin_split(struct rte_eth_dev *dev,
 {
 	int queue_action = 0;
 	int action_n = 0;
-	int encap = 0;
+	int split = 0;
 	const struct rte_flow_action_queue *queue;
 	const struct rte_flow_action_rss *rss;
 	const struct rte_flow_action_raw_encap *raw_encap;
@@ -2853,7 +2853,10 @@ flow_check_hairpin_split(struct rte_eth_dev *dev,
 			break;
 		case RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP:
 		case RTE_FLOW_ACTION_TYPE_NVGRE_ENCAP:
-			encap = 1;
+		case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN:
+		case RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID:
+		case RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_PCP:
+			split++;
 			action_n++;
 			break;
 		case RTE_FLOW_ACTION_TYPE_RAW_ENCAP:
@@ -2861,7 +2864,7 @@ flow_check_hairpin_split(struct rte_eth_dev *dev,
 			if (raw_encap->size >
 			    (sizeof(struct rte_flow_item_eth) +
 			     sizeof(struct rte_flow_item_ipv4)))
-				encap = 1;
+				split++;
 			action_n++;
 			break;
 		default:
@@ -2869,7 +2872,7 @@ flow_check_hairpin_split(struct rte_eth_dev *dev,
 			break;
 		}
 	}
-	if (encap == 1 && queue_action)
+	if (split && queue_action)
 		return action_n;
 	return 0;
 }
@@ -3276,7 +3279,8 @@ flow_mreg_update_copy_table(struct rte_eth_dev *dev,
 
 /**
  * Split the hairpin flow.
- * Since HW can't support encap on Rx we move the encap to Tx.
+ * Since HW can't support encap and push-vlan on Rx, we move these
+ * actions to Tx.
  * If the count action is after the encap then we also
  * move the count action. in this case the count will also measure
  * the outer bytes.
@@ -3320,6 +3324,9 @@ flow_hairpin_split(struct rte_eth_dev *dev,
 		switch (actions->type) {
 		case RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP:
 		case RTE_FLOW_ACTION_TYPE_NVGRE_ENCAP:
+		case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN:
+		case RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID:
+		case RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_PCP:
 			rte_memcpy(actions_tx, actions,
 			       sizeof(struct rte_flow_action));
 			actions_tx++;
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 2407f8723..bfb27a602 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1801,22 +1801,11 @@ flow_dv_validate_action_push_vlan(struct rte_eth_dev *dev,
 	const struct rte_flow_action_of_push_vlan *push_vlan = action->conf;
 	const struct mlx5_priv *priv = dev->data->dev_private;
 
-	if (!attr->transfer && attr->ingress)
-		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_ATTR_INGRESS,
-					  NULL,
-					  "push VLAN action not supported for "
-					  "ingress");
 	if (push_vlan->ethertype != RTE_BE16(RTE_ETHER_TYPE_VLAN) &&
 	    push_vlan->ethertype != RTE_BE16(RTE_ETHER_TYPE_QINQ))
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, action,
 					  "invalid vlan ethertype");
-	if (action_flags & MLX5_FLOW_VLAN_ACTIONS)
-		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_ACTION, action,
-					  "no support for multiple VLAN "
-					  "actions");
 	if (action_flags & MLX5_FLOW_ACTION_PORT_ID)
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION, action,
@@ -5148,21 +5137,38 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 						  actions,
 						  "no fate action is found");
 	}
-	/* Continue validation for Xcap actions.*/
-	if ((action_flags & MLX5_FLOW_XCAP_ACTIONS) && (queue_index == 0xFFFF ||
-	    mlx5_rxq_get_type(dev, queue_index) != MLX5_RXQ_TYPE_HAIRPIN)) {
+	/* Continue validation for Xcap and VLAN actions.*/
+	if ((action_flags & (MLX5_FLOW_XCAP_ACTIONS |
+			     MLX5_FLOW_VLAN_ACTIONS)) &&
+	    (queue_index == 0xFFFF ||
+	     mlx5_rxq_get_type(dev, queue_index) != MLX5_RXQ_TYPE_HAIRPIN)) {
 		if ((action_flags & MLX5_FLOW_XCAP_ACTIONS) ==
 		    MLX5_FLOW_XCAP_ACTIONS)
 			return rte_flow_error_set(error, ENOTSUP,
 						  RTE_FLOW_ERROR_TYPE_ACTION,
 						  NULL, "encap and decap "
 						  "combination aren't supported");
-		if (!attr->transfer && attr->ingress && (action_flags &
-							MLX5_FLOW_ACTION_ENCAP))
-			return rte_flow_error_set(error, ENOTSUP,
-						  RTE_FLOW_ERROR_TYPE_ACTION,
-						  NULL, "encap is not supported"
-						  " for ingress traffic");
+		if (!attr->transfer && attr->ingress) {
+			if (action_flags & MLX5_FLOW_ACTION_ENCAP)
+				return rte_flow_error_set
+						(error, ENOTSUP,
+						 RTE_FLOW_ERROR_TYPE_ACTION,
+						 NULL, "encap is not supported"
+						 " for ingress traffic");
+			else if (action_flags & MLX5_FLOW_ACTION_OF_PUSH_VLAN)
+				return rte_flow_error_set
+						(error, ENOTSUP,
+						 RTE_FLOW_ERROR_TYPE_ACTION,
+						 NULL, "push VLAN action not "
+						 "supported for ingress");
+			else if ((action_flags & MLX5_FLOW_VLAN_ACTIONS) ==
+					MLX5_FLOW_VLAN_ACTIONS)
+				return rte_flow_error_set
+						(error, ENOTSUP,
+						 RTE_FLOW_ERROR_TYPE_ACTION,
+						 NULL, "no support for "
+						 "multiple VLAN actions");
+		}
 	}
 	/* Hairpin flow will add one more TAG action. */
 	if (hairpin > 0)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:55.265961237 +0100
+++ 0174-net-mlx5-fix-VLAN-push-action-on-hairpin-queue.patch	2020-07-24 12:53:48.595012198 +0100
@@ -1,8 +1,10 @@
-From 210008309b45316288869377be574c22f670b825 Mon Sep 17 00:00:00 2001
+From 6e3b631758528c2125e78c4c03e028d6966d6456 Mon Sep 17 00:00:00 2001
 From: Dekel Peled <dekelp@mellanox.com>
 Date: Wed, 15 Jul 2020 10:31:01 +0300
 Subject: [PATCH] net/mlx5: fix VLAN push action on hairpin queue
 
+[ upstream commit 210008309b45316288869377be574c22f670b825 ]
+
 Push VLAN action is allowed on Tx only, same as encap action.
 Flow rules for hairpin queue are created on Rx, and split
 by PMD to Rx and Tx rules, according to the above limitation.
@@ -11,7 +13,6 @@
 its complementing actions set-vlan-vid and set-vlan-pcp.
 
 Fixes: d85c7b5ea59f ("net/mlx5: split hairpin flows")
-Cc: stable@dpdk.org
 
 Signed-off-by: Dekel Peled <dekelp@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -21,10 +22,10 @@
  2 files changed, 41 insertions(+), 28 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
-index e83cf8311..b56bee43b 100644
+index 400273f25..be45091f4 100644
 --- a/drivers/net/mlx5/mlx5_flow.c
 +++ b/drivers/net/mlx5/mlx5_flow.c
-@@ -2876,10 +2876,10 @@ flow_check_meter_action(const struct rte_flow_action actions[], uint32_t *mtr)
+@@ -2799,10 +2799,10 @@ flow_check_meter_action(const struct rte_flow_action actions[], uint32_t *mtr)
  }
  
  /**
@@ -38,7 +39,7 @@
   *
   * @param dev
   *   Pointer to Ethernet device.
-@@ -2899,7 +2899,7 @@ flow_check_hairpin_split(struct rte_eth_dev *dev,
+@@ -2822,7 +2822,7 @@ flow_check_hairpin_split(struct rte_eth_dev *dev,
  {
  	int queue_action = 0;
  	int action_n = 0;
@@ -47,7 +48,7 @@
  	const struct rte_flow_action_queue *queue;
  	const struct rte_flow_action_rss *rss;
  	const struct rte_flow_action_raw_encap *raw_encap;
-@@ -2930,7 +2930,10 @@ flow_check_hairpin_split(struct rte_eth_dev *dev,
+@@ -2853,7 +2853,10 @@ flow_check_hairpin_split(struct rte_eth_dev *dev,
  			break;
  		case RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP:
  		case RTE_FLOW_ACTION_TYPE_NVGRE_ENCAP:
@@ -59,7 +60,7 @@
  			action_n++;
  			break;
  		case RTE_FLOW_ACTION_TYPE_RAW_ENCAP:
-@@ -2938,7 +2941,7 @@ flow_check_hairpin_split(struct rte_eth_dev *dev,
+@@ -2861,7 +2864,7 @@ flow_check_hairpin_split(struct rte_eth_dev *dev,
  			if (raw_encap->size >
  			    (sizeof(struct rte_flow_item_eth) +
  			     sizeof(struct rte_flow_item_ipv4)))
@@ -68,7 +69,7 @@
  			action_n++;
  			break;
  		default:
-@@ -2946,7 +2949,7 @@ flow_check_hairpin_split(struct rte_eth_dev *dev,
+@@ -2869,7 +2872,7 @@ flow_check_hairpin_split(struct rte_eth_dev *dev,
  			break;
  		}
  	}
@@ -77,7 +78,7 @@
  		return action_n;
  	return 0;
  }
-@@ -3388,7 +3391,8 @@ flow_mreg_update_copy_table(struct rte_eth_dev *dev,
+@@ -3276,7 +3279,8 @@ flow_mreg_update_copy_table(struct rte_eth_dev *dev,
  
  /**
   * Split the hairpin flow.
@@ -87,7 +88,7 @@
   * If the count action is after the encap then we also
   * move the count action. in this case the count will also measure
   * the outer bytes.
-@@ -3432,6 +3436,9 @@ flow_hairpin_split(struct rte_eth_dev *dev,
+@@ -3320,6 +3324,9 @@ flow_hairpin_split(struct rte_eth_dev *dev,
  		switch (actions->type) {
  		case RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP:
  		case RTE_FLOW_ACTION_TYPE_NVGRE_ENCAP:
@@ -98,10 +99,10 @@
  			       sizeof(struct rte_flow_action));
  			actions_tx++;
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 5ba788a33..12c7db79d 100644
+index 2407f8723..bfb27a602 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -1951,22 +1951,11 @@ flow_dv_validate_action_push_vlan(struct rte_eth_dev *dev,
+@@ -1801,22 +1801,11 @@ flow_dv_validate_action_push_vlan(struct rte_eth_dev *dev,
  	const struct rte_flow_action_of_push_vlan *push_vlan = action->conf;
  	const struct mlx5_priv *priv = dev->data->dev_private;
  
@@ -124,7 +125,7 @@
  	if (action_flags & MLX5_FLOW_ACTION_PORT_ID)
  		return rte_flow_error_set(error, EINVAL,
  					  RTE_FLOW_ERROR_TYPE_ACTION, action,
-@@ -5691,21 +5680,38 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -5148,21 +5137,38 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  						  actions,
  						  "no fate action is found");
  	}

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

* [dpdk-stable] patch 'vhost: fix double-free with zero-copy' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (172 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/mlx5: fix VLAN push action on hairpin queue' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'net: fix pedantic build' " luca.boccassi
                   ` (17 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Patrick Fu; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 4b85b20128a39c5c3b763bbd509f83eba5b0af1d Mon Sep 17 00:00:00 2001
From: Patrick Fu <patrick.fu@intel.com>
Date: Tue, 21 Jul 2020 12:10:57 +0000
Subject: [PATCH] vhost: fix double-free with zero-copy

[ upstream commit a608436b635460c1be0d0d561838aa197cf32c87 ]

zmbufs should be set to NULL when getting freed to avoid double free on
the same buffer pointer

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

Signed-off-by: Patrick Fu <patrick.fu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost_user.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 82270c514..4cc0ce21e 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1872,6 +1872,7 @@ free_zmbufs(struct vhost_virtqueue *vq)
 	drain_zmbuf_list(vq);
 
 	rte_free(vq->zmbufs);
+	vq->zmbufs = NULL;
 }
 
 /*
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:55.317593757 +0100
+++ 0175-vhost-fix-double-free-with-zero-copy.patch	2020-07-24 12:53:48.599012273 +0100
@@ -1,13 +1,14 @@
-From a608436b635460c1be0d0d561838aa197cf32c87 Mon Sep 17 00:00:00 2001
+From 4b85b20128a39c5c3b763bbd509f83eba5b0af1d Mon Sep 17 00:00:00 2001
 From: Patrick Fu <patrick.fu@intel.com>
 Date: Tue, 21 Jul 2020 12:10:57 +0000
 Subject: [PATCH] vhost: fix double-free with zero-copy
 
+[ upstream commit a608436b635460c1be0d0d561838aa197cf32c87 ]
+
 zmbufs should be set to NULL when getting freed to avoid double free on
 the same buffer pointer
 
 Fixes: b0a985d1f340 ("vhost: add dequeue zero copy")
-Cc: stable@dpdk.org
 
 Signed-off-by: Patrick Fu <patrick.fu@intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -16,10 +17,10 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
-index df0db8a07..9ddeae362 100644
+index 82270c514..4cc0ce21e 100644
 --- a/lib/librte_vhost/vhost_user.c
 +++ b/lib/librte_vhost/vhost_user.c
-@@ -1934,6 +1934,7 @@ free_zmbufs(struct vhost_virtqueue *vq)
+@@ -1872,6 +1872,7 @@ free_zmbufs(struct vhost_virtqueue *vq)
  	drain_zmbuf_list(vq);
  
  	rte_free(vq->zmbufs);

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

* [dpdk-stable] patch 'net: fix pedantic build' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (173 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'vhost: fix double-free with zero-copy' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/sfc: do not enforce hash offload in RSS multi-queue' " luca.boccassi
                   ` (16 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From ba90ba0ca2285ab0a2af461eb2c3c3e10d0c5795 Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@mellanox.com>
Date: Tue, 21 Jul 2020 11:31:55 +0300
Subject: [PATCH] net: fix pedantic build

[ upstream commit e4f9eab7d948b952cc65e9e360576de3ff1f7a9e ]

when trying to compile rte_mpls with pedantic enabled,
on old compilers like 4.8 it will complain about bit field definition.

error: type of bit-field 'bs' is a GCC extension [-Werror=pedantic]
error: type of bit-field 'tc' is a GCC extension [-Werror=pedantic]
error: type of bit-field 'tag_lsb' is a GCC extension [-Werror=pedantic]

This fixes the compilation error by adding extension to the header
definition.

Fixes: e480cf487a0d ("net: add MPLS header structure")

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_net/rte_mpls.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_net/rte_mpls.h b/lib/librte_net/rte_mpls.h
index 32b643121..14663f51b 100644
--- a/lib/librte_net/rte_mpls.h
+++ b/lib/librte_net/rte_mpls.h
@@ -21,6 +21,7 @@ extern "C" {
 /**
  * MPLS header.
  */
+__extension__
 struct rte_mpls_hdr {
 	uint16_t tag_msb;   /**< Label(msb). */
 #if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:55.352782735 +0100
+++ 0176-net-fix-pedantic-build.patch	2020-07-24 12:53:48.599012273 +0100
@@ -1,8 +1,10 @@
-From e4f9eab7d948b952cc65e9e360576de3ff1f7a9e Mon Sep 17 00:00:00 2001
+From ba90ba0ca2285ab0a2af461eb2c3c3e10d0c5795 Mon Sep 17 00:00:00 2001
 From: Raslan Darawsheh <rasland@mellanox.com>
 Date: Tue, 21 Jul 2020 11:31:55 +0300
 Subject: [PATCH] net: fix pedantic build
 
+[ upstream commit e4f9eab7d948b952cc65e9e360576de3ff1f7a9e ]
+
 when trying to compile rte_mpls with pedantic enabled,
 on old compilers like 4.8 it will complain about bit field definition.
 
@@ -14,7 +16,6 @@
 definition.
 
 Fixes: e480cf487a0d ("net: add MPLS header structure")
-Cc: stable@dpdk.org
 
 Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -23,7 +24,7 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/lib/librte_net/rte_mpls.h b/lib/librte_net/rte_mpls.h
-index db91707e6..3e8cb90ec 100644
+index 32b643121..14663f51b 100644
 --- a/lib/librte_net/rte_mpls.h
 +++ b/lib/librte_net/rte_mpls.h
 @@ -21,6 +21,7 @@ extern "C" {

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

* [dpdk-stable] patch 'net/sfc: do not enforce hash offload in RSS multi-queue' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (174 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'net: fix pedantic build' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'raw/ifpga/base: fix SPI transaction' " luca.boccassi
                   ` (15 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 77c1a9f4453c2633f64e319432f65f15b0cda03c Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Tue, 21 Jul 2020 15:54:49 +0100
Subject: [PATCH] net/sfc: do not enforce hash offload in RSS multi-queue

[ upstream commit 6fd44a47a73e8de649ed8636e4972ef18e81aeae ]

Rx RSS hash offload should be controlled by the user and should
not be enforced by RSS multi-queue Rx mode.

Fixes: 8b945a7f7dcb ("drivers/net: update Rx RSS hash offload capabilities")

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

diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index 891709fd0..61736196c 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -1561,10 +1561,6 @@ sfc_rx_check_mode(struct sfc_adapter *sa, struct rte_eth_rxmode *rxmode)
 		rxmode->offloads |= DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM;
 	}
 
-	if ((offloads_supported & DEV_RX_OFFLOAD_RSS_HASH) &&
-	    (rxmode->mq_mode & ETH_MQ_RX_RSS_FLAG))
-		rxmode->offloads |= DEV_RX_OFFLOAD_RSS_HASH;
-
 	return rc;
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:55.386048913 +0100
+++ 0177-net-sfc-do-not-enforce-hash-offload-in-RSS-multi-que.patch	2020-07-24 12:53:48.599012273 +0100
@@ -1,13 +1,14 @@
-From 6fd44a47a73e8de649ed8636e4972ef18e81aeae Mon Sep 17 00:00:00 2001
+From 77c1a9f4453c2633f64e319432f65f15b0cda03c Mon Sep 17 00:00:00 2001
 From: Andrew Rybchenko <arybchenko@solarflare.com>
 Date: Tue, 21 Jul 2020 15:54:49 +0100
 Subject: [PATCH] net/sfc: do not enforce hash offload in RSS multi-queue
 
+[ upstream commit 6fd44a47a73e8de649ed8636e4972ef18e81aeae ]
+
 Rx RSS hash offload should be controlled by the user and should
 not be enforced by RSS multi-queue Rx mode.
 
 Fixes: 8b945a7f7dcb ("drivers/net: update Rx RSS hash offload capabilities")
-Cc: stable@dpdk.org
 
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
 ---
@@ -15,7 +16,7 @@
  1 file changed, 4 deletions(-)
 
 diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
-index 7d22e2f8e..a62ce4a17 100644
+index 891709fd0..61736196c 100644
 --- a/drivers/net/sfc/sfc_rx.c
 +++ b/drivers/net/sfc/sfc_rx.c
 @@ -1561,10 +1561,6 @@ sfc_rx_check_mode(struct sfc_adapter *sa, struct rte_eth_rxmode *rxmode)

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

* [dpdk-stable] patch 'raw/ifpga/base: fix SPI transaction' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (175 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'net/sfc: do not enforce hash offload in RSS multi-queue' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'raw/ifpga/base: fix NIOS SPI init' " luca.boccassi
                   ` (14 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Tianfei Zhang; +Cc: Rosen Xu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 6c071742a95c7ee2ca97b7ed7e6b13e8fc4efced Mon Sep 17 00:00:00 2001
From: Tianfei Zhang <tianfei.zhang@intel.com>
Date: Wed, 15 Jul 2020 05:35:08 +0800
Subject: [PATCH] raw/ifpga/base: fix SPI transaction

[ upstream commit 6f583cd8b01b5b6568668ce8efb78d3eaaa55b61 ]

0x4a means idle status on physical layer. when encounter
0x4a on raw data, it need insert a ESCAPE character for
indication.

Fixes: 96ebfcf8 ("raw/ifpga/base: add SPI and MAX10 device driver")

Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
---
 drivers/raw/ifpga/base/opae_spi_transaction.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/raw/ifpga/base/opae_spi_transaction.c b/drivers/raw/ifpga/base/opae_spi_transaction.c
index 013efee3e..d13d2fbc8 100644
--- a/drivers/raw/ifpga/base/opae_spi_transaction.c
+++ b/drivers/raw/ifpga/base/opae_spi_transaction.c
@@ -166,7 +166,7 @@ static int byte_to_core_convert(struct spi_transaction_dev *dev,
 		current_byte = send_data[i];
 		switch (current_byte) {
 		case SPI_BYTE_IDLE:
-			*p++ = SPI_BYTE_IDLE;
+			*p++ = SPI_BYTE_ESC;
 			*p++ = xor_20(current_byte);
 			break;
 		case SPI_BYTE_ESC:
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:55.421991594 +0100
+++ 0178-raw-ifpga-base-fix-SPI-transaction.patch	2020-07-24 12:53:48.599012273 +0100
@@ -1,14 +1,15 @@
-From 6f583cd8b01b5b6568668ce8efb78d3eaaa55b61 Mon Sep 17 00:00:00 2001
+From 6c071742a95c7ee2ca97b7ed7e6b13e8fc4efced Mon Sep 17 00:00:00 2001
 From: Tianfei Zhang <tianfei.zhang@intel.com>
 Date: Wed, 15 Jul 2020 05:35:08 +0800
 Subject: [PATCH] raw/ifpga/base: fix SPI transaction
 
+[ upstream commit 6f583cd8b01b5b6568668ce8efb78d3eaaa55b61 ]
+
 0x4a means idle status on physical layer. when encounter
 0x4a on raw data, it need insert a ESCAPE character for
 indication.
 
 Fixes: 96ebfcf8 ("raw/ifpga/base: add SPI and MAX10 device driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
 Acked-by: Rosen Xu <rosen.xu@intel.com>

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

* [dpdk-stable] patch 'raw/ifpga/base: fix NIOS SPI init' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (176 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'raw/ifpga/base: fix SPI transaction' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'mempool: fix allocation in memzone during retry' " luca.boccassi
                   ` (13 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Tianfei Zhang; +Cc: Rosen Xu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 818b78832cba50d054bbb608123ef7fb24a4895b Mon Sep 17 00:00:00 2001
From: Tianfei Zhang <tianfei.zhang@intel.com>
Date: Wed, 15 Jul 2020 05:35:09 +0800
Subject: [PATCH] raw/ifpga/base: fix NIOS SPI init

[ upstream commit cbcf2263fb9514dfc207906f95b02bc4e32dcca5 ]

Add fecmode setting on NIOS SPI primary initialization.
this SPI is shared by NIOS core inside FPGA, NIOS will
use this SPI primary to do some one-time initialization
after power up, and then release the control to DPDK.

Fix the timeout initialization for polling the
NIOS_INIT_DONE.

Fixes: bc44402f ("raw/ifpga/base: configure FEC mode")

Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
---
 drivers/raw/ifpga/base/ifpga_fme.c | 27 ++++++++++++++++++++-------
 drivers/raw/ifpga/base/opae_spi.h  |  1 +
 2 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/drivers/raw/ifpga/base/ifpga_fme.c b/drivers/raw/ifpga/base/ifpga_fme.c
index c31a94cf8..9057087b5 100644
--- a/drivers/raw/ifpga/base/ifpga_fme.c
+++ b/drivers/raw/ifpga/base/ifpga_fme.c
@@ -979,28 +979,32 @@ struct ifpga_feature_ops fme_spi_master_ops = {
 static int nios_spi_wait_init_done(struct altera_spi_device *dev)
 {
 	u32 val = 0;
-	unsigned long timeout = msecs_to_timer_cycles(10000);
+	unsigned long timeout = rte_get_timer_cycles() +
+			msecs_to_timer_cycles(10000);
 	unsigned long ticks;
 	int major_version;
+	int fecmode = FEC_MODE_NO;
 
 	if (spi_reg_read(dev, NIOS_VERSION, &val))
 		return -EIO;
 
-	major_version = (val >> NIOS_VERSION_MAJOR_SHIFT) &
-		NIOS_VERSION_MAJOR;
-	dev_debug(dev, "A10 NIOS FW version %d\n", major_version);
+	major_version =
+		(val & NIOS_VERSION_MAJOR) >> NIOS_VERSION_MAJOR_SHIFT;
+	dev_info(dev, "A10 NIOS FW version %d\n", major_version);
 
 	if (major_version >= 3) {
 		/* read NIOS_INIT to check if PKVL INIT done or not */
 		if (spi_reg_read(dev, NIOS_INIT, &val))
 			return -EIO;
 
+		dev_debug(dev, "read NIOS_INIT: 0x%x\n", val);
+
 		/* check if PKVLs are initialized already */
 		if (val & NIOS_INIT_DONE || val & NIOS_INIT_START)
 			goto nios_init_done;
 
 		/* start to config the default FEC mode */
-		val = NIOS_INIT_START;
+		val = fecmode | NIOS_INIT_START;
 
 		if (spi_reg_write(dev, NIOS_INIT, val))
 			return -EIO;
@@ -1010,14 +1014,23 @@ nios_init_done:
 	do {
 		if (spi_reg_read(dev, NIOS_INIT, &val))
 			return -EIO;
-		if (val)
+		if (val & NIOS_INIT_DONE)
 			break;
 
 		ticks = rte_get_timer_cycles();
 		if (time_after(ticks, timeout))
 			return -ETIMEDOUT;
 		msleep(100);
-	} while (!val);
+	} while (1);
+
+	/* get the fecmode */
+	if (spi_reg_read(dev, NIOS_INIT, &val))
+		return -EIO;
+	dev_debug(dev, "read NIOS_INIT: 0x%x\n", val);
+	fecmode = (val & REQ_FEC_MODE) >> REQ_FEC_MODE_SHIFT;
+	dev_info(dev, "fecmode: 0x%x, %s\n", fecmode,
+			(fecmode == FEC_MODE_KR) ? "kr" :
+			((fecmode == FEC_MODE_RS) ? "rs" : "no"));
 
 	return 0;
 }
diff --git a/drivers/raw/ifpga/base/opae_spi.h b/drivers/raw/ifpga/base/opae_spi.h
index d20a4c3ed..73a227673 100644
--- a/drivers/raw/ifpga/base/opae_spi.h
+++ b/drivers/raw/ifpga/base/opae_spi.h
@@ -153,6 +153,7 @@ int spi_reg_read(struct altera_spi_device *dev, u32 reg, u32 *val);
 
 #define NIOS_INIT		0x1000
 #define REQ_FEC_MODE		GENMASK(23, 8)
+#define REQ_FEC_MODE_SHIFT      8
 #define FEC_MODE_NO		0x0
 #define FEC_MODE_KR		0x5555
 #define FEC_MODE_RS		0xaaaa
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:55.457193841 +0100
+++ 0179-raw-ifpga-base-fix-NIOS-SPI-init.patch	2020-07-24 12:53:48.599012273 +0100
@@ -1,8 +1,10 @@
-From cbcf2263fb9514dfc207906f95b02bc4e32dcca5 Mon Sep 17 00:00:00 2001
+From 818b78832cba50d054bbb608123ef7fb24a4895b Mon Sep 17 00:00:00 2001
 From: Tianfei Zhang <tianfei.zhang@intel.com>
 Date: Wed, 15 Jul 2020 05:35:09 +0800
 Subject: [PATCH] raw/ifpga/base: fix NIOS SPI init
 
+[ upstream commit cbcf2263fb9514dfc207906f95b02bc4e32dcca5 ]
+
 Add fecmode setting on NIOS SPI primary initialization.
 this SPI is shared by NIOS core inside FPGA, NIOS will
 use this SPI primary to do some one-time initialization
@@ -12,7 +14,6 @@
 NIOS_INIT_DONE.
 
 Fixes: bc44402f ("raw/ifpga/base: configure FEC mode")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
 Acked-by: Rosen Xu <rosen.xu@intel.com>

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

* [dpdk-stable] patch 'mempool: fix allocation in memzone during retry' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (177 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'raw/ifpga/base: fix NIOS SPI init' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'doc: fix some typos in Linux guide' " luca.boccassi
                   ` (12 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Zhike Wang; +Cc: Andrew Rybchenko, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From fe11e4ef38d6a932881ad0424853736159eeb890 Mon Sep 17 00:00:00 2001
From: Zhike Wang <wangzhike@jd.com>
Date: Tue, 14 Jul 2020 15:26:05 +0800
Subject: [PATCH] mempool: fix allocation in memzone during retry

[ upstream commit 9dbe628a7ba2420d00bf8c15d066f9667092db2b ]

If allocation is successful on the first attempt, typically
there is no problem since we allocated everything required and
we'll terminate the loop (if memory chunk is really sufficient
to populate required number of mempool elements).

If the first attempt fails, we try to allocate half
of mem_size and it succeed, we'll have one more iteration of
the for-loop to allocate memory for remaining elements and
should not try the next time with quarter of the mem_size.

It is wrong that max_alloc_size is divided by 2 in the
case of successful allocation as well, or invalid memory
can be allocated, and leads to population failure, then errno
other than ENOMEM may be returned.

Fixes: 3a3d0c75b43e ("mempool: fix slow allocation of large pools")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Signed-off-by: Zhike Wang <wangzhike@jd.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_mempool/rte_mempool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index 08906df9e..e39135d47 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -569,7 +569,7 @@ rte_mempool_populate_default(struct rte_mempool *mp)
 				RTE_MIN((size_t)mem_size, max_alloc_size),
 				mp->socket_id, mz_flags, align);
 
-			if (mz == NULL && rte_errno != ENOMEM)
+			if (mz != NULL || rte_errno != ENOMEM)
 				break;
 
 			max_alloc_size = RTE_MIN(max_alloc_size,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:55.494319622 +0100
+++ 0180-mempool-fix-allocation-in-memzone-during-retry.patch	2020-07-24 12:53:48.603012347 +0100
@@ -1,8 +1,10 @@
-From 9dbe628a7ba2420d00bf8c15d066f9667092db2b Mon Sep 17 00:00:00 2001
+From fe11e4ef38d6a932881ad0424853736159eeb890 Mon Sep 17 00:00:00 2001
 From: Zhike Wang <wangzhike@jd.com>
 Date: Tue, 14 Jul 2020 15:26:05 +0800
 Subject: [PATCH] mempool: fix allocation in memzone during retry
 
+[ upstream commit 9dbe628a7ba2420d00bf8c15d066f9667092db2b ]
+
 If allocation is successful on the first attempt, typically
 there is no problem since we allocated everything required and
 we'll terminate the loop (if memory chunk is really sufficient
@@ -19,7 +21,6 @@
 other than ENOMEM may be returned.
 
 Fixes: 3a3d0c75b43e ("mempool: fix slow allocation of large pools")
-Cc: stable@dpdk.org
 
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
 Signed-off-by: Zhike Wang <wangzhike@jd.com>
@@ -29,10 +30,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
-index a2bd24984..7774f0c8d 100644
+index 08906df9e..e39135d47 100644
 --- a/lib/librte_mempool/rte_mempool.c
 +++ b/lib/librte_mempool/rte_mempool.c
-@@ -635,7 +635,7 @@ rte_mempool_populate_default(struct rte_mempool *mp)
+@@ -569,7 +569,7 @@ rte_mempool_populate_default(struct rte_mempool *mp)
  				RTE_MIN((size_t)mem_size, max_alloc_size),
  				mp->socket_id, mz_flags, align);
  

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

* [dpdk-stable] patch 'doc: fix some typos in Linux guide' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (178 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'mempool: fix allocation in memzone during retry' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'doc: fix typo in bbdev test " luca.boccassi
                   ` (11 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Honnappa Nagarahalli; +Cc: Ruifeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 423ef2ad5c69a0bbe8039b807e6f597aa5597e19 Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Mon, 8 Jun 2020 16:52:07 -0500
Subject: [PATCH] doc: fix some typos in Linux guide

[ upstream commit 5b2b0bd084c4a7096c512465116c471018e4e42f ]

The display was not proper due to the missing space. Changed
arm64 to aarch64.

Fixes: 2eb7c526b929 ("doc: clarify IOMMU disabling for uio_pci_generic")

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 doc/guides/linux_gsg/linux_drivers.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/guides/linux_gsg/linux_drivers.rst b/doc/guides/linux_gsg/linux_drivers.rst
index 238f3e900..e0816f996 100644
--- a/doc/guides/linux_gsg/linux_drivers.rst
+++ b/doc/guides/linux_gsg/linux_drivers.rst
@@ -52,8 +52,8 @@ be loaded as shown below:
 
    If the devices used for DPDK are bound to the ``uio_pci_generic`` kernel module,
    please make sure that the IOMMU is disabled or passthrough. One can add
-   ``intel_iommu=off`` or ``amd_iommu=off`` or ``intel_iommu=on iommu=pt``in GRUB
-   command line on x86_64 systems, or add ``iommu.passthrough=1`` on arm64 system.
+   ``intel_iommu=off`` or ``amd_iommu=off`` or ``intel_iommu=on iommu=pt`` in GRUB
+   command line on x86_64 systems, or add ``iommu.passthrough=1`` on aarch64 system.
 
 Since DPDK release 1.7 onward provides VFIO support, use of UIO is optional
 for platforms that support using VFIO.
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:55.531260261 +0100
+++ 0181-doc-fix-some-typos-in-Linux-guide.patch	2020-07-24 12:53:48.603012347 +0100
@@ -1,13 +1,14 @@
-From 5b2b0bd084c4a7096c512465116c471018e4e42f Mon Sep 17 00:00:00 2001
+From 423ef2ad5c69a0bbe8039b807e6f597aa5597e19 Mon Sep 17 00:00:00 2001
 From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Date: Mon, 8 Jun 2020 16:52:07 -0500
 Subject: [PATCH] doc: fix some typos in Linux guide
 
+[ upstream commit 5b2b0bd084c4a7096c512465116c471018e4e42f ]
+
 The display was not proper due to the missing space. Changed
 arm64 to aarch64.
 
 Fixes: 2eb7c526b929 ("doc: clarify IOMMU disabling for uio_pci_generic")
-Cc: stable@dpdk.org
 
 Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
@@ -16,10 +17,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/doc/guides/linux_gsg/linux_drivers.rst b/doc/guides/linux_gsg/linux_drivers.rst
-index 4eda3d5bf..185074013 100644
+index 238f3e900..e0816f996 100644
 --- a/doc/guides/linux_gsg/linux_drivers.rst
 +++ b/doc/guides/linux_gsg/linux_drivers.rst
-@@ -58,8 +58,8 @@ be loaded as shown below:
+@@ -52,8 +52,8 @@ be loaded as shown below:
  
     If the devices used for DPDK are bound to the ``uio_pci_generic`` kernel module,
     please make sure that the IOMMU is disabled or passthrough. One can add

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

* [dpdk-stable] patch 'doc: fix typo in bbdev test guide' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (179 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'doc: fix some typos in Linux guide' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'bus/vdev: fix a typo in doxygen comment' " luca.boccassi
                   ` (10 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Sarosh Arif; +Cc: Nicolas Chautru, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 41db1838ca74a532ddd9389db0ba931bdd1170a6 Mon Sep 17 00:00:00 2001
From: Sarosh Arif <sarosh.arif@emumba.com>
Date: Tue, 16 Jun 2020 13:22:01 +0500
Subject: [PATCH] doc: fix typo in bbdev test guide

[ upstream commit d9f94a929572c0e965d2b9c169bb421e6f34e56a ]

fixed typing error in doc/guides/tools/testbbdev.rst

Fixes: f714a18885a6 ("app/testbbdev: add test application for bbdev")

Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>
Acked-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
 doc/guides/tools/testbbdev.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/tools/testbbdev.rst b/doc/guides/tools/testbbdev.rst
index 7e9569660..bddfd8ae8 100644
--- a/doc/guides/tools/testbbdev.rst
+++ b/doc/guides/tools/testbbdev.rst
@@ -6,7 +6,7 @@ dpdk-test-bbdev Application
 
 The ``dpdk-test-bbdev`` tool is a Data Plane Development Kit (DPDK) utility that
 allows measuring performance parameters of PMDs available in the bbdev framework.
-Available tests available for execution are: latency, throughput, validation and
+Tests available for execution are: latency, throughput, validation and
 sanity tests. Execution of tests can be customized using various parameters
 passed to a python running script.
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:55.569375389 +0100
+++ 0182-doc-fix-typo-in-bbdev-test-guide.patch	2020-07-24 12:53:48.603012347 +0100
@@ -1,12 +1,13 @@
-From d9f94a929572c0e965d2b9c169bb421e6f34e56a Mon Sep 17 00:00:00 2001
+From 41db1838ca74a532ddd9389db0ba931bdd1170a6 Mon Sep 17 00:00:00 2001
 From: Sarosh Arif <sarosh.arif@emumba.com>
 Date: Tue, 16 Jun 2020 13:22:01 +0500
 Subject: [PATCH] doc: fix typo in bbdev test guide
 
+[ upstream commit d9f94a929572c0e965d2b9c169bb421e6f34e56a ]
+
 fixed typing error in doc/guides/tools/testbbdev.rst
 
 Fixes: f714a18885a6 ("app/testbbdev: add test application for bbdev")
-Cc: stable@dpdk.org
 
 Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>
 Acked-by: Nicolas Chautru <nicolas.chautru@intel.com>
@@ -15,17 +16,17 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/doc/guides/tools/testbbdev.rst b/doc/guides/tools/testbbdev.rst
-index 279872139..393c3e9d0 100644
+index 7e9569660..bddfd8ae8 100644
 --- a/doc/guides/tools/testbbdev.rst
 +++ b/doc/guides/tools/testbbdev.rst
 @@ -6,7 +6,7 @@ dpdk-test-bbdev Application
  
  The ``dpdk-test-bbdev`` tool is a Data Plane Development Kit (DPDK) utility that
  allows measuring performance parameters of PMDs available in the bbdev framework.
--Available tests available for execution are: latency, throughput, validation,
-+Tests available for execution are: latency, throughput, validation,
- bler and sanity tests. Execution of tests can be customized using various
- parameters passed to a python running script.
+-Available tests available for execution are: latency, throughput, validation and
++Tests available for execution are: latency, throughput, validation and
+ sanity tests. Execution of tests can be customized using various parameters
+ passed to a python running script.
  
 -- 
 2.20.1

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

* [dpdk-stable] patch 'bus/vdev: fix a typo in doxygen comment' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (180 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'doc: fix typo in bbdev test " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'test/hash: move lock-free tests to perf tests' " luca.boccassi
                   ` (9 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Muhammad Bilal; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 0d3e57510c33c266677af1cc474f37ccceee7816 Mon Sep 17 00:00:00 2001
From: Muhammad Bilal <m.bilal@emumba.com>
Date: Tue, 23 Jun 2020 18:26:02 +0500
Subject: [PATCH] bus/vdev: fix a typo in doxygen comment

[ upstream commit 71ee0b90289a90218fa510908362392a393531b0 ]

While uninitalizing the driver, the comment was mentioning
initialized instead of uninitalized in description of parameter.

Fixes: 0fe11ec592b2 ("eal: add vdev init and uninit")

Signed-off-by: Muhammad Bilal <m.bilal@emumba.com>
---
 drivers/bus/vdev/rte_bus_vdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/vdev/rte_bus_vdev.h b/drivers/bus/vdev/rte_bus_vdev.h
index 2bc46530c..78a032cea 100644
--- a/drivers/bus/vdev/rte_bus_vdev.h
+++ b/drivers/bus/vdev/rte_bus_vdev.h
@@ -155,7 +155,7 @@ int rte_vdev_init(const char *name, const char *args);
  * Uninitalize a driver specified by name.
  *
  * @param name
- *   The pointer to a driver name to be initialized.
+ *   The pointer to a driver name to be uninitialized.
  * @return
  *  0 on success, negative on error
  */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:55.608430362 +0100
+++ 0183-bus-vdev-fix-a-typo-in-doxygen-comment.patch	2020-07-24 12:53:48.603012347 +0100
@@ -1,13 +1,14 @@
-From 71ee0b90289a90218fa510908362392a393531b0 Mon Sep 17 00:00:00 2001
+From 0d3e57510c33c266677af1cc474f37ccceee7816 Mon Sep 17 00:00:00 2001
 From: Muhammad Bilal <m.bilal@emumba.com>
 Date: Tue, 23 Jun 2020 18:26:02 +0500
 Subject: [PATCH] bus/vdev: fix a typo in doxygen comment
 
+[ upstream commit 71ee0b90289a90218fa510908362392a393531b0 ]
+
 While uninitalizing the driver, the comment was mentioning
 initialized instead of uninitalized in description of parameter.
 
 Fixes: 0fe11ec592b2 ("eal: add vdev init and uninit")
-Cc: stable@dpdk.org
 
 Signed-off-by: Muhammad Bilal <m.bilal@emumba.com>
 ---

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

* [dpdk-stable] patch 'test/hash: move lock-free tests to perf tests' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (181 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'bus/vdev: fix a typo in doxygen comment' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'test: allow no-huge mode for fast-tests' " luca.boccassi
                   ` (8 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Honnappa Nagarahalli; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From fd4535580ad432e0f742737ca002e20d189bab40 Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Mon, 3 Feb 2020 13:49:11 -0600
Subject: [PATCH] test/hash: move lock-free tests to perf tests

[ backported from upstream commit 2cc1d7b40f40768b0aca71450f4b011eff27c919 ]

Move reader writer lock free tests to performance tests.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 app/test/Makefile                                          | 2 +-
 app/test/autotest_data.py                                  | 4 ++--
 app/test/meson.build                                       | 4 ++--
 ...t_hash_readwrite_lf.c => test_hash_readwrite_lf_perf.c} | 7 ++++---
 4 files changed, 9 insertions(+), 8 deletions(-)
 rename app/test/{test_hash_readwrite_lf.c => test_hash_readwrite_lf_perf.c} (99%)

diff --git a/app/test/Makefile b/app/test/Makefile
index 1ee155009..30eff3320 100644
--- a/app/test/Makefile
+++ b/app/test/Makefile
@@ -122,7 +122,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_perf.c
 SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_functions.c
 SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_multiwriter.c
 SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_readwrite.c
-SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_readwrite_lf.c
+SRCS-$(CONFIG_RTE_LIBRTE_HASH) += test_hash_readwrite_lf_perf.c
 
 SRCS-$(CONFIG_RTE_LIBRTE_RIB) += test_rib.c
 SRCS-$(CONFIG_RTE_LIBRTE_RIB) += test_rib6.c
diff --git a/app/test/autotest_data.py b/app/test/autotest_data.py
index 6deb97bcc..ca29b09f3 100644
--- a/app/test/autotest_data.py
+++ b/app/test/autotest_data.py
@@ -670,8 +670,8 @@ non_parallel_test_list = [
         "Report":  None,
     },
     {
-        "Name":    "Hash read-write lock-free concurrency autotest",
-        "Command": "hash_readwrite_lf_autotest",
+        "Name":    "Hash read-write lock-free concurrency perf autotest",
+        "Command": "hash_readwrite_lf_perf_autotest",
         "Func":    default_autotest,
         "Report":  None,
     },
diff --git a/app/test/meson.build b/app/test/meson.build
index d8650db46..d8af67dbf 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -56,7 +56,7 @@ test_sources = files('commands.c',
 	'test_hash_multiwriter.c',
 	'test_hash_readwrite.c',
 	'test_hash_perf.c',
-	'test_hash_readwrite_lf.c',
+	'test_hash_readwrite_lf_perf.c',
 	'test_interrupts.c',
 	'test_ipsec.c',
 	'test_ipsec_sad.c',
@@ -224,7 +224,6 @@ fast_test_names = [
         'eventdev_common_autotest',
         'fbarray_autotest',
         'hash_readwrite_autotest',
-        'hash_readwrite_lf_autotest',
         'ipsec_autotest',
         'kni_autotest',
         'kvargs_autotest',
@@ -269,6 +268,7 @@ perf_test_names = [
         'stack_perf_autotest',
         'stack_lf_perf_autotest',
         'rand_perf_autotest',
+        'hash_readwrite_lf_perf_autotest',
 ]
 
 driver_test_names = [
diff --git a/app/test/test_hash_readwrite_lf.c b/app/test/test_hash_readwrite_lf_perf.c
similarity index 99%
rename from app/test/test_hash_readwrite_lf.c
rename to app/test/test_hash_readwrite_lf_perf.c
index 97c304054..7bfc067f4 100644
--- a/app/test/test_hash_readwrite_lf.c
+++ b/app/test/test_hash_readwrite_lf_perf.c
@@ -1241,7 +1241,7 @@ err:
 }
 
 static int
-test_hash_readwrite_lf_main(void)
+test_hash_readwrite_lf_perf_main(void)
 {
 	/*
 	 * Variables used to choose different tests.
@@ -1254,7 +1254,7 @@ test_hash_readwrite_lf_main(void)
 	int ext_bkt = 0;
 
 	if (rte_lcore_count() < 2) {
-		printf("Not enough cores for hash_readwrite_lf_autotest, expecting at least 2\n");
+		printf("Not enough cores for hash_readwrite_lf_perf_autotest, expecting at least 2\n");
 		return TEST_SKIPPED;
 	}
 
@@ -1431,4 +1431,5 @@ results:
 	return 0;
 }
 
-REGISTER_TEST_COMMAND(hash_readwrite_lf_autotest, test_hash_readwrite_lf_main);
+REGISTER_TEST_COMMAND(hash_readwrite_lf_perf_autotest,
+	test_hash_readwrite_lf_perf_main);
-- 
2.20.1


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

* [dpdk-stable] patch 'test: allow no-huge mode for fast-tests' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (182 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'test/hash: move lock-free tests to perf tests' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'doc: rebuild with meson whenever a file changes' " luca.boccassi
                   ` (7 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Aaron Conole, Gavin Hu, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From ce06c50ea1e8a2942927c864dc1cd83d8db8b2b1 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Mon, 23 Mar 2020 20:59:24 +0100
Subject: [PATCH] test: allow no-huge mode for fast-tests

[ backported from upstream commit 77784ef0fba80c899437000271a31710001ea63e ]

In environments where hugepage are not available, such as
containers, many cases in fast-tests suite should also run
if no-huge EAL option is used.

Flag is appended to each case in fast-tests suite to indicate
whether it lives with no-huge mode.
With the flag, fast-tests suite can be generated based on
detected hugepage availability of building environment.
All cases will be valid if hugepage is available, whereas
only applicable cases will be added if environment has no
hugepage support.

Suggested-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/meson.build | 215 ++++++++++++++++++++++++-------------------
 1 file changed, 119 insertions(+), 96 deletions(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index d8af67dbf..6d4039bbd 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -154,87 +154,89 @@ test_deps = ['acl',
 	'timer'
 ]
 
-fast_test_names = [
-        'acl_autotest',
-        'alarm_autotest',
-        'atomic_autotest',
-        'byteorder_autotest',
-        'cmdline_autotest',
-        'common_autotest',
-        'cpuflags_autotest',
-        'cycles_autotest',
-        'debug_autotest',
-        'eal_flags_c_opt_autotest',
-        'eal_flags_master_opt_autotest',
-        'eal_flags_n_opt_autotest',
-        'eal_flags_hpet_autotest',
-        'eal_flags_no_huge_autotest',
-        'eal_flags_w_opt_autotest',
-        'eal_flags_b_opt_autotest',
-        'eal_flags_vdev_opt_autotest',
-        'eal_flags_r_opt_autotest',
-        'eal_flags_mem_autotest',
-        'eal_flags_file_prefix_autotest',
-        'eal_flags_misc_autotest',
-        'eal_fs_autotest',
-        'errno_autotest',
-        'event_ring_autotest',
-        'fib_autotest',
-        'fib6_autotest',
-        'func_reentrancy_autotest',
-        'flow_classify_autotest',
-        'hash_autotest',
-        'interrupt_autotest',
-        'logs_autotest',
-        'lpm_autotest',
-        'lpm6_autotest',
-        'malloc_autotest',
-        'mbuf_autotest',
-        'mcslock_autotest',
-        'memcpy_autotest',
-        'memory_autotest',
-        'mempool_autotest',
-        'memzone_autotest',
-        'meter_autotest',
-        'multiprocess_autotest',
-        'per_lcore_autotest',
-        'prefetch_autotest',
-        'rcu_qsbr_autotest',
-        'red_autotest',
-        'rib_autotest',
-        'rib6_autotest',
-        'ring_autotest',
-        'rwlock_test1_autotest',
-        'rwlock_rda_autotest',
-        'rwlock_rds_wrm_autotest',
-        'rwlock_rde_wro_autotest',
-        'sched_autotest',
-        'spinlock_autotest',
-        'stack_autotest',
-        'stack_lf_autotest',
-        'string_autotest',
-        'table_autotest',
-        'tailq_autotest',
-        'timer_autotest',
-        'user_delay_us',
-        'version_autotest',
-        'crc_autotest',
-        'delay_us_sleep_autotest',
-        'distributor_autotest',
-        'eventdev_common_autotest',
-        'fbarray_autotest',
-        'hash_readwrite_autotest',
-        'ipsec_autotest',
-        'kni_autotest',
-        'kvargs_autotest',
-        'member_autotest',
-        'metrics_autotest',
-        'power_cpufreq_autotest',
-        'power_autotest',
-        'power_kvm_vm_autotest',
-        'reorder_autotest',
-        'service_autotest',
-        'thash_autotest',
+# Each test is marked with flag true/false
+# to indicate whether it can run in no-huge mode.
+fast_tests = [
+        ['acl_autotest', true],
+        ['alarm_autotest', false],
+        ['atomic_autotest', false],
+        ['byteorder_autotest', true],
+        ['cmdline_autotest', true],
+        ['common_autotest', true],
+        ['cpuflags_autotest', true],
+        ['cycles_autotest', true],
+        ['debug_autotest', true],
+        ['eal_flags_c_opt_autotest', false],
+        ['eal_flags_master_opt_autotest', false],
+        ['eal_flags_n_opt_autotest', false],
+        ['eal_flags_hpet_autotest', false],
+        ['eal_flags_no_huge_autotest', false],
+        ['eal_flags_w_opt_autotest', false],
+        ['eal_flags_b_opt_autotest', false],
+        ['eal_flags_vdev_opt_autotest', false],
+        ['eal_flags_r_opt_autotest', false],
+        ['eal_flags_mem_autotest', false],
+        ['eal_flags_file_prefix_autotest', false],
+        ['eal_flags_misc_autotest', false],
+        ['eal_fs_autotest', true],
+        ['errno_autotest', true],
+        ['event_ring_autotest', true],
+        ['fib_autotest', true],
+        ['fib6_autotest', true],
+        ['func_reentrancy_autotest', false],
+        ['flow_classify_autotest', false],
+        ['hash_autotest', true],
+        ['interrupt_autotest', true],
+        ['logs_autotest', true],
+        ['lpm_autotest', true],
+        ['lpm6_autotest', true],
+        ['malloc_autotest', false],
+        ['mbuf_autotest', false],
+        ['mcslock_autotest', false],
+        ['memcpy_autotest', true],
+        ['memory_autotest', false],
+        ['mempool_autotest', false],
+        ['memzone_autotest', false],
+        ['meter_autotest', true],
+        ['multiprocess_autotest', false],
+        ['per_lcore_autotest', true],
+        ['prefetch_autotest', true],
+        ['rcu_qsbr_autotest', true],
+        ['red_autotest', true],
+        ['rib_autotest', true],
+        ['rib6_autotest', true],
+        ['ring_autotest', true],
+        ['rwlock_test1_autotest', true],
+        ['rwlock_rda_autotest', true],
+        ['rwlock_rds_wrm_autotest', true],
+        ['rwlock_rde_wro_autotest', true],
+        ['sched_autotest', true],
+        ['spinlock_autotest', true],
+        ['stack_autotest', false],
+        ['stack_lf_autotest', false],
+        ['string_autotest', true],
+        ['table_autotest', true],
+        ['tailq_autotest', true],
+        ['timer_autotest', false],
+        ['user_delay_us', true],
+        ['version_autotest', true],
+        ['crc_autotest', true],
+        ['delay_us_sleep_autotest', true],
+        ['distributor_autotest', false],
+        ['eventdev_common_autotest', true],
+        ['fbarray_autotest', true],
+        ['hash_readwrite_autotest', false],
+        ['ipsec_autotest', true],
+        ['kni_autotest', false],
+        ['kvargs_autotest', true],
+        ['member_autotest', true],
+        ['metrics_autotest', true],
+        ['power_cpufreq_autotest', false],
+        ['power_autotest', true],
+        ['power_kvm_vm_autotest', false],
+        ['reorder_autotest', true],
+        ['service_autotest', true],
+        ['thash_autotest', true],
 ]
 
 perf_test_names = [
@@ -336,12 +338,12 @@ if dpdk_conf.has('RTE_LIBRTE_RING_PMD')
 	test_sources += 'test_latencystats.c'
 	test_sources += 'sample_packet_forward.c'
 	test_sources += 'test_pdump.c'
-	fast_test_names += 'ring_pmd_autotest'
+	fast_tests += [['ring_pmd_autotest', true]]
 	perf_test_names += 'ring_pmd_perf_autotest'
-	fast_test_names += 'event_eth_tx_adapter_autotest'
-	fast_test_names += 'bitratestats_autotest'
-	fast_test_names += 'latencystats_autotest'
-	fast_test_names += 'pdump_autotest'
+	fast_tests += [['event_eth_tx_adapter_autotest', false]]
+	fast_tests += [['bitratestats_autotest', true]]
+	fast_tests += [['latencystats_autotest', true]]
+	fast_tests += [['pdump_autotest', true]]
 endif
 
 if dpdk_conf.has('RTE_LIBRTE_POWER')
@@ -372,7 +374,7 @@ if dpdk_conf.has('RTE_LIBRTE_COMPRESSDEV')
 		test_dep_objs += compress_test_dep
 		test_sources += 'test_compressdev.c'
 		test_deps += 'compressdev'
-		fast_test_names += 'compressdev_autotest'
+		fast_tests += [['compressdev_autotest', false]]
 	endif
 endif
 
@@ -400,6 +402,17 @@ dpdk_test = executable('dpdk-test',
 			 driver_install_path),
 	install: true)
 
+has_hugepage = true
+if is_linux
+	check_hugepage = run_command('cat',
+				     '/proc/sys/vm/nr_hugepages')
+	if (check_hugepage.returncode() != 0 or
+	    check_hugepage.stdout().strip() == '0')
+		has_hugepage = false
+	endif
+endif
+message('hugepage availability: @0@'.format(has_hugepage))
+
 # some perf tests (eg: memcpy perf autotest)take very long
 # to complete, so timeout to 10 minutes
 timeout_seconds = 600
@@ -410,25 +423,35 @@ num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip()
 
 default_test_args = [num_cores_arg]
 
-foreach arg : fast_test_names
+foreach arg : fast_tests
 	test_args = default_test_args
+	run_test = true
+	if not has_hugepage
+		if arg[1]
+			test_args += ['--no-huge', '-m', '2048']
+		else
+			run_test = false
+		endif
+	endif
 
 	if (get_option('default_library') == 'shared' and
-		arg == 'event_eth_tx_adapter_autotest')
+		arg[0] == 'event_eth_tx_adapter_autotest')
 		foreach drv:dpdk_drivers
 			test_args += ['-d', drv.full_path().split('.a')[0] + '.so']
 		endforeach
 	endif
 	if is_linux
-		test_args += ['--file-prefix=@0@'.format(arg)]
+		test_args += ['--file-prefix=@0@'.format(arg[0])]
 	endif
 
-	test(arg, dpdk_test,
-		env : ['DPDK_TEST=' + arg],
-		args : test_args,
-		timeout : timeout_seconds_fast,
-		is_parallel : false,
-		suite : 'fast-tests')
+	if run_test
+		test(arg[0], dpdk_test,
+			env : ['DPDK_TEST=' + arg[0]],
+			args : test_args,
+			timeout : timeout_seconds_fast,
+			is_parallel : false,
+			suite : 'fast-tests')
+	endif
 endforeach
 
 foreach arg : perf_test_names
-- 
2.20.1


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

* [dpdk-stable] patch 'doc: rebuild with meson whenever a file changes' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (183 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'test: allow no-huge mode for fast-tests' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'build: always link whole DPDK static libraries' " luca.boccassi
                   ` (6 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Aaron Conole, Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From d5a143fbcbb7fd84ee5269f5789c54cc952541a6 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 10 Jan 2020 21:52:04 +0000
Subject: [PATCH] doc: rebuild with meson whenever a file changes

[ backported from upstream commit f5ab2074cfba1fa9287269aec08358c29799bc13 ]

Add proper support for calling sphinx whenever a file in the doc
directory changes. This is accomplished by using a wrapper script
for sphinx, which runs sphinx but also emits a gcc-format dependency
file listing all the doc files. This is used by ninja so that any
change to the doc files triggers a rebuild of the docs.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 MAINTAINERS                     |  1 +
 buildtools/call-sphinx-build.py | 31 +++++++++++++++++++++++++++++++
 buildtools/meson.build          |  6 ++++--
 doc/guides/meson.build          | 22 ++++++++--------------
 4 files changed, 44 insertions(+), 16 deletions(-)
 create mode 100755 buildtools/call-sphinx-build.py

diff --git a/MAINTAINERS b/MAINTAINERS
index 98c0dd060..c9b7dfaca 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -128,6 +128,7 @@ F: meson.build
 F: lib/librte_eal/freebsd/BSDmakefile.meson
 F: meson_options.txt
 F: config/rte_config.h
+F: buildtools/call-sphinx-build.py
 F: buildtools/gen-pmdinfo-cfile.sh
 F: buildtools/map_to_def.py
 F: buildtools/symlink-drivers-solibs.sh
diff --git a/buildtools/call-sphinx-build.py b/buildtools/call-sphinx-build.py
new file mode 100755
index 000000000..b9a3994e1
--- /dev/null
+++ b/buildtools/call-sphinx-build.py
@@ -0,0 +1,31 @@
+#! /usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2019 Intel Corporation
+#
+
+import sys
+import os
+from os.path import join
+from subprocess import run, PIPE
+from distutils.version import StrictVersion
+
+(sphinx, src, dst) = sys.argv[1:]  # assign parameters to variables
+
+# for sphinx version >= 1.7 add parallelism using "-j auto"
+ver = run([sphinx, '--version'], stdout=PIPE).stdout.decode().split()[-1]
+sphinx_cmd = [sphinx]
+if StrictVersion(ver) >= StrictVersion('1.7'):
+    sphinx_cmd += ['-j', 'auto']
+
+# find all the files sphinx will process so we can write them as dependencies
+srcfiles = []
+for root, dirs, files in os.walk(src):
+    srcfiles.extend([join(root, f) for f in files])
+
+# run sphinx, putting the html output in a "html" directory
+process = run(sphinx_cmd + ['-b', 'html', src, join(dst, 'html')], check=True)
+print(str(process.args) + ' Done OK')
+
+# create a gcc format .d file giving all the dependencies of this doc build
+with open(join(dst, '.html.d'), 'w') as d:
+    d.write('html: ' + ' '.join(srcfiles) + '\n')
diff --git a/buildtools/meson.build b/buildtools/meson.build
index cd6f4c1af..ea13d9fc3 100644
--- a/buildtools/meson.build
+++ b/buildtools/meson.build
@@ -12,10 +12,12 @@ ldflags_ibverbs_static = find_program('options-ibverbs-static.sh')
 # set up map-to-def script using python, either built-in or external
 python3 = import('python').find_installation(required: false)
 if python3.found()
-	map_to_def_cmd = [python3, files('map_to_def.py')]
+	py3 = [python3]
 else
-	map_to_def_cmd = ['meson', 'runpython', files('map_to_def.py')]
+	py3 = ['meson', 'runpython']
 endif
+map_to_def_cmd = py3 + files('map_to_def.py')
+sphinx_wrapper = py3 + files('call-sphinx-build.py')
 
 # stable ABI always starts with "DPDK_"
 is_experimental_cmd = [find_program('grep', 'findstr'), '^DPDK_']
diff --git a/doc/guides/meson.build b/doc/guides/meson.build
index 80c21d168..732e7ad3a 100644
--- a/doc/guides/meson.build
+++ b/doc/guides/meson.build
@@ -7,24 +7,18 @@ if not sphinx.found()
 	subdir_done()
 endif
 
-htmldir = join_paths('share', 'doc', 'dpdk')
+htmldir = join_paths(get_option('datadir'), 'doc', 'dpdk')
 html_guides = custom_target('html_guides',
-	input: meson.current_source_dir(),
-	output: 'guides',
-	command: [sphinx, '-b', 'html',
-		'-d', meson.current_build_dir() + '/.doctrees',
-		'@INPUT@', meson.current_build_dir() + '/guides'],
+	input: files('index.rst'),
+	output: 'html',
+	command: [sphinx_wrapper, sphinx, meson.current_source_dir(), meson.current_build_dir()],
+	depfile: '.html.d',
 	build_by_default: get_option('enable_docs'),
 	install: get_option('enable_docs'),
 	install_dir: htmldir)
 
+install_data(files('custom.css'),
+			install_dir: join_paths(htmldir,'_static', 'css'))
+
 doc_targets += html_guides
 doc_target_names += 'HTML_Guides'
-
-# sphinx leaves a .buildinfo in the target directory, which we don't
-# want to install. Note that sh -c has to be used, otherwise the
-# env var does not get expanded if calling rm/install directly.
-meson.add_install_script('sh', '-c',
-	'rm -f $MESON_INSTALL_DESTDIR_PREFIX/share/doc/dpdk/guides/.buildinfo')
-meson.add_install_script('sh', '-c',
-	'install -D -m0644 $MESON_SOURCE_ROOT/doc/guides/custom.css $MESON_INSTALL_DESTDIR_PREFIX/share/doc/dpdk/guides/_static/css/custom.css')
-- 
2.20.1


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

* [dpdk-stable] patch 'build: always link whole DPDK static libraries' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (184 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'doc: rebuild with meson whenever a file changes' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'devtools: test static linkage with pkg-config' " luca.boccassi
                   ` (5 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Bruce Richardson
  Cc: Andrzej Ostruszka, Luca Boccassi, Sunil Pai G, Thomas Monjalon,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 683b922608454879abb09b6d0020013c1cf3e7f1 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 30 Jun 2020 15:14:27 +0100
Subject: [PATCH] build: always link whole DPDK static libraries

[ backported from upstream commit e2db26f76673762532c0b830502bf37aee20d1a8 ]

To ensure all constructors are included in static build, we need to pass
the --whole-archive flag when linking, which is used with the
"link_whole" meson option. Since we use link_whole for all libs, we no
longer need to track the lib as part of the static dependency, just the
path to the headers for compiling.

After this patch is applied, all DPDK .a files are inside
--whole-archive/--no-whole-archive flags, but external dependencies and
shared libs being linked against remain outside.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Andrzej Ostruszka <aostruszka@marvell.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Sunil Pai G <sunil.pai.g@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 app/test/meson.build | 2 +-
 drivers/meson.build  | 2 +-
 examples/meson.build | 6 +++---
 lib/meson.build      | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index 6d4039bbd..12668fa45 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -390,7 +390,7 @@ test_dep_objs += cc.find_library('execinfo', required: false)
 
 link_libs = []
 if get_option('default_library') == 'static'
-	link_libs = dpdk_drivers
+	link_libs = dpdk_static_libraries + dpdk_drivers
 endif
 
 dpdk_test = executable('dpdk-test',
diff --git a/drivers/meson.build b/drivers/meson.build
index 4246cc32a..330b14636 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -196,7 +196,7 @@ foreach class:dpdk_driver_classes
 			shared_dep = declare_dependency(link_with: shared_lib,
 					include_directories: includes,
 					dependencies: shared_deps)
-			static_dep = declare_dependency(link_with: static_lib,
+			static_dep = declare_dependency(
 					include_directories: includes,
 					dependencies: static_deps)
 
diff --git a/examples/meson.build b/examples/meson.build
index 1f2b6f516..ec6bd5a08 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -1,9 +1,9 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-driver_libs = []
+link_whole_libs = []
 if get_option('default_library') == 'static'
-	driver_libs = dpdk_drivers
+	link_whole_libs = dpdk_static_libraries + dpdk_drivers
 endif
 
 execinfo = cc.find_library('execinfo', required: false)
@@ -99,7 +99,7 @@ foreach example: examples
 		endif
 		executable('dpdk-' + name, sources,
 			include_directories: includes,
-			link_whole: driver_libs,
+			link_whole: link_whole_libs,
 			link_args: dpdk_extra_ldflags,
 			c_args: cflags,
 			dependencies: dep_objs)
diff --git a/lib/meson.build b/lib/meson.build
index d5a507fb4..bf938a392 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -127,7 +127,7 @@ foreach l:libraries
 					dependencies: static_deps,
 					include_directories: includes,
 					install: true)
-			static_dep = declare_dependency(link_with: static_lib,
+			static_dep = declare_dependency(
 					include_directories: includes,
 					dependencies: static_deps)
 
-- 
2.20.1


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

* [dpdk-stable] patch 'devtools: test static linkage with pkg-config' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (185 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'build: always link whole DPDK static libraries' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'build/pkg-config: move pkg-config file creation' " luca.boccassi
                   ` (4 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Luca Boccassi, Sunil Pai G, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From aea915e944c34f8b743586bee1523786a5b96cb8 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 30 Jun 2020 15:14:29 +0100
Subject: [PATCH] devtools: test static linkage with pkg-config

[ backported from upstream commit ca39d3a801471860a24d1663083779aae4ddbd75 ]

The pkg-config file was tested by building some of the examples using make,
pulling the cflags and ldflags from the pkg-config file for DPDK. However,
this only tested the shared library linkage, and not the static, so this
patch updates it to test both.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Sunil Pai G <sunil.pai.g@intel.com>
---
 devtools/test-meson-builds.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 688567714..a76811e79 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -147,6 +147,6 @@ if pkg-config --define-prefix libdpdk >/dev/null 2>&1; then
 	export PKGCONF="pkg-config --define-prefix"
 	for example in cmdline helloworld l2fwd l3fwd skeleton timer; do
 		echo "## Building $example"
-		$MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example clean all
+		$MAKE -C $DESTDIR/usr/local/share/dpdk/examples/$example clean shared static
 	done
 fi
-- 
2.20.1


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

* [dpdk-stable] patch 'build/pkg-config: move pkg-config file creation' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (186 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'devtools: test static linkage with pkg-config' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'build/pkg-config: output drivers first for static build' " luca.boccassi
                   ` (3 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Luca Boccassi, Sunil Pai G, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 59b108d824c3ef94bfd0f6f5b36d9887024d1830 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 30 Jun 2020 15:14:30 +0100
Subject: [PATCH] build/pkg-config: move pkg-config file creation

[ backported from upstream commit 11a47f9f1cee9ddc99e6ed4d74b8657f4a951c4e ]

Ahead of changes to rework the file, move the pkg-config file generation to
a new directory under buildtools. This allows the meson code to be
separated out from the main meson.build for simplicity, and also allows any
additional scripts for working with the pkg-config files to be placed there
too.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Sunil Pai G <sunil.pai.g@intel.com>
---
 MAINTAINERS                       |  2 ++
 buildtools/pkg-config/meson.build | 26 ++++++++++++++++++++++++++
 meson.build                       | 25 ++-----------------------
 3 files changed, 30 insertions(+), 23 deletions(-)
 create mode 100644 buildtools/pkg-config/meson.build

diff --git a/MAINTAINERS b/MAINTAINERS
index c9b7dfaca..418f0f41f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -131,6 +131,8 @@ F: config/rte_config.h
 F: buildtools/call-sphinx-build.py
 F: buildtools/gen-pmdinfo-cfile.sh
 F: buildtools/map_to_def.py
+F: buildtools/list-dir-globs.py
+F: buildtools/pkg-config/
 F: buildtools/symlink-drivers-solibs.sh
 
 Public CI
diff --git a/buildtools/pkg-config/meson.build b/buildtools/pkg-config/meson.build
new file mode 100644
index 000000000..85d59972d
--- /dev/null
+++ b/buildtools/pkg-config/meson.build
@@ -0,0 +1,26 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2020 Intel Corporation
+
+# for static builds, include the drivers as libs and we need to "whole-archive"
+# them.
+dpdk_drivers = ['-Wl,--whole-archive'] + dpdk_drivers + ['-Wl,--no-whole-archive']
+
+pkg = import('pkgconfig')
+pkg_extra_cflags = ['-include', 'rte_config.h'] + machine_args
+if is_freebsd
+	pkg_extra_cflags += ['-D__BSD_VISIBLE']
+endif
+pkg.generate(name: meson.project_name(),
+	filebase: 'lib' + meson.project_name().to_lower(),
+	version: meson.project_version(),
+	libraries: dpdk_libraries,
+	libraries_private: dpdk_drivers + dpdk_static_libraries +
+			['-Wl,-Bdynamic'] + dpdk_extra_ldflags,
+	requires: libbsd, # apps using rte_string_fns.h may need this if enabled
+	                  # if libbsd is not enabled, then this is blank
+	description: '''The Data Plane Development Kit (DPDK).
+Note that CFLAGS might contain an -march flag higher than typical baseline.
+This is required for a number of static inline functions in the public headers.''',
+	subdirs: [get_option('include_subdir_arch'), '.'],
+	extra_cflags: pkg_extra_cflags
+)
diff --git a/meson.build b/meson.build
index b7ae9c8d9..41b1beb98 100644
--- a/meson.build
+++ b/meson.build
@@ -61,29 +61,8 @@ configure_file(output: build_cfg,
 		install_dir: join_paths(get_option('includedir'),
 				get_option('include_subdir_arch')))
 
-# for static builds, include the drivers as libs and we need to "whole-archive"
-# them.
-dpdk_drivers = ['-Wl,--whole-archive'] + dpdk_drivers + ['-Wl,--no-whole-archive']
-
-pkg = import('pkgconfig')
-pkg_extra_cflags = ['-include', 'rte_config.h'] + machine_args
-if is_freebsd
-	pkg_extra_cflags += ['-D__BSD_VISIBLE']
-endif
-pkg.generate(name: meson.project_name(),
-	filebase: 'lib' + meson.project_name().to_lower(),
-	version: meson.project_version(),
-	libraries: dpdk_libraries,
-	libraries_private: dpdk_drivers + dpdk_static_libraries +
-			['-Wl,-Bdynamic'] + dpdk_extra_ldflags,
-	requires: libbsd, # apps using rte_string_fns.h may need this if enabled
-	                  # if libbsd is not enabled, then this is blank
-	description: '''The Data Plane Development Kit (DPDK).
-Note that CFLAGS might contain an -march flag higher than typical baseline.
-This is required for a number of static inline functions in the public headers.''',
-	subdirs: [get_option('include_subdir_arch'), '.'],
-	extra_cflags: pkg_extra_cflags
-)
+# build pkg-config files for dpdk
+subdir('buildtools/pkg-config')
 
 # final output, list all the libs and drivers to be built
 # this does not affect any part of the build, for information only.
-- 
2.20.1


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

* [dpdk-stable] patch 'build/pkg-config: output drivers first for static build' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (187 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'build/pkg-config: move pkg-config file creation' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'build/pkg-config: improve static linking flags' " luca.boccassi
                   ` (2 subsequent siblings)
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Luca Boccassi, Sunil Pai G, Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 9fb13a12c122b638a838ba9571aed8cde13ef094 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 30 Jun 2020 15:14:31 +0100
Subject: [PATCH] build/pkg-config: output drivers first for static build

[ backported from upstream commit f9c0b1f4319ea4f40ee2ceb8097c9a5a34a56171 ]

When calling pkg-config --static --libs, pkg-config will always output the
regular libs first, and then the extra libs from Libs.private field,
since the assumption is that those are additional dependencies for building
statically that the .a files depend upon.

However, for DPDK, we only link the driver files for static builds, and
those need to come *before* the regular libraries. To get this result, we
need two pkgconfig files for DPDK, one for the shared libs, and a second
for the static libs and drivers, which depends upon the first. Using a
dependency means that the shared libs are printed only after the
Libs.private field rather than before.

Without this patch, the linking works in DPDK because in all cases we
specify the libraries after the drivers in the Libs.private line, ensuring
that the references to the libs from the drivers can be resolved. The
current output is therefore of the form, "(shared)libs, drivers,
(static)libs", while after this patch the output is, "drivers,
(static)libs, (shared)libs". The former case will not work if we use the
--whole-archive flag on the static libs as it will lead to duplicate
definitions due to some references having been previously resolved from the
shared libraries. By ensuring the shared libraries come last in the link
link, this issue does not occur, as duplicate references when linking the
shared libs will be ignored.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Sunil Pai G <sunil.pai.g@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 buildtools/pkg-config/meson.build | 36 ++++++++++++++++++++++++-------
 1 file changed, 28 insertions(+), 8 deletions(-)

diff --git a/buildtools/pkg-config/meson.build b/buildtools/pkg-config/meson.build
index 85d59972d..f663b1c66 100644
--- a/buildtools/pkg-config/meson.build
+++ b/buildtools/pkg-config/meson.build
@@ -10,17 +10,37 @@ pkg_extra_cflags = ['-include', 'rte_config.h'] + machine_args
 if is_freebsd
 	pkg_extra_cflags += ['-D__BSD_VISIBLE']
 endif
-pkg.generate(name: meson.project_name(),
-	filebase: 'lib' + meson.project_name().to_lower(),
+
+# When calling pkg-config --static --libs, pkg-config will always output the
+# regular libs first, and then the extra libs from Libs.private field,
+# since the assumption is that those are additional dependencies for building
+# statically that the .a files depend upon. The output order of .pc fields is:
+#   Libs   Libs.private   Requires   Requires.private
+# The fields Requires* are for package names.
+# The flags of the DPDK libraries must be defined in Libs* fields.
+# However, the DPDK drivers are linked only in static builds (Libs.private),
+# and those need to come *before* the regular libraries (Libs field).
+# This requirement is satisfied by moving the regular libs in a separate file
+# included in the field Requires (after Libs.private).
+
+pkg.generate(name: 'dpdk-libs',
+	filebase: 'libdpdk-libs',
+	description: '''Internal-only DPDK pkgconfig file. Not for direct use.
+Use libdpdk.pc instead of this file to query DPDK compile/link arguments''',
 	version: meson.project_version(),
+	subdirs: [get_option('include_subdir_arch'), '.'],
+	extra_cflags: pkg_extra_cflags,
 	libraries: dpdk_libraries,
-	libraries_private: dpdk_drivers + dpdk_static_libraries +
-			['-Wl,-Bdynamic'] + dpdk_extra_ldflags,
-	requires: libbsd, # apps using rte_string_fns.h may need this if enabled
-	                  # if libbsd is not enabled, then this is blank
+	libraries_private: dpdk_extra_ldflags)
+
+pkg.generate(name: 'DPDK', # main DPDK pkgconfig file
+	filebase: 'libdpdk',
+	version: meson.project_version(),
 	description: '''The Data Plane Development Kit (DPDK).
 Note that CFLAGS might contain an -march flag higher than typical baseline.
 This is required for a number of static inline functions in the public headers.''',
-	subdirs: [get_option('include_subdir_arch'), '.'],
-	extra_cflags: pkg_extra_cflags
+	requires: ['libdpdk-libs', libbsd], # may need libbsd for string funcs
+	                  # if libbsd is not enabled, then this is blank
+	libraries_private: dpdk_drivers + dpdk_static_libraries +
+			['-Wl,-Bdynamic']
 )
-- 
2.20.1


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

* [dpdk-stable] patch 'build/pkg-config: improve static linking flags' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (188 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'build/pkg-config: output drivers first for static build' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-07-24 12:00 ` [dpdk-stable] patch 'build/pkg-config: prevent overlinking' " luca.boccassi
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Luca Boccassi, Sunil Pai G, Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 2d1535d5921d9fbd6afbee1e5b42f8b3187fec63 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 30 Jun 2020 15:14:32 +0100
Subject: [PATCH] build/pkg-config: improve static linking flags

[ backported from upstream commit 8549295db07b1f5777a314ee0b75f768e7ec4913 ]

Rather than setting -Bstatic in the linker flags when doing a static link,
and then having to explicitly set -Bdynamic again afterwards, we can update
the pkg-config file to use -l:libfoo.a syntax to explicitly refer to the
static library in question. Since this syntax is not supported by meson's
pkg-config module directly, we can post-process the .pc files instead to
adjust them.

Once done, we can simplify the examples' makefiles and the docs by removing
the explicit static flag.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Sunil Pai G <sunil.pai.g@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 buildtools/pkg-config/meson.build             | 16 +++++---
 .../pkg-config/set-static-linker-flags.py     | 38 +++++++++++++++++++
 doc/build-sdk-meson.txt                       |  2 +-
 examples/bbdev_app/Makefile                   |  2 +-
 examples/bond/Makefile                        |  2 +-
 examples/cmdline/Makefile                     |  2 +-
 examples/distributor/Makefile                 |  2 +-
 examples/eventdev_pipeline/Makefile           |  2 +-
 examples/fips_validation/Makefile             |  2 +-
 examples/flow_classify/Makefile               |  2 +-
 examples/flow_filtering/Makefile              |  2 +-
 examples/helloworld/Makefile                  |  2 +-
 examples/ioat/Makefile                        |  2 +-
 examples/ip_fragmentation/Makefile            |  2 +-
 examples/ip_pipeline/Makefile                 |  2 +-
 examples/ip_reassembly/Makefile               |  2 +-
 examples/ipsec-secgw/Makefile                 |  2 +-
 examples/ipv4_multicast/Makefile              |  2 +-
 examples/kni/Makefile                         |  2 +-
 examples/l2fwd-cat/Makefile                   |  2 +-
 examples/l2fwd-crypto/Makefile                |  2 +-
 examples/l2fwd-event/Makefile                 |  2 +-
 examples/l2fwd-jobstats/Makefile              |  2 +-
 examples/l2fwd-keepalive/Makefile             |  2 +-
 examples/l2fwd/Makefile                       |  2 +-
 examples/l3fwd-acl/Makefile                   |  2 +-
 examples/l3fwd-power/Makefile                 |  2 +-
 examples/l3fwd/Makefile                       |  2 +-
 examples/link_status_interrupt/Makefile       |  2 +-
 examples/ntb/Makefile                         |  2 +-
 examples/packet_ordering/Makefile             |  2 +-
 examples/ptpclient/Makefile                   |  2 +-
 examples/qos_meter/Makefile                   |  2 +-
 examples/qos_sched/Makefile                   |  2 +-
 examples/rxtx_callbacks/Makefile              |  2 +-
 examples/service_cores/Makefile               |  2 +-
 examples/skeleton/Makefile                    |  2 +-
 examples/tep_termination/Makefile             |  2 +-
 examples/timer/Makefile                       |  2 +-
 examples/vdpa/Makefile                        |  2 +-
 examples/vhost/Makefile                       |  2 +-
 examples/vhost_blk/Makefile                   |  2 +-
 examples/vhost_crypto/Makefile                |  2 +-
 examples/vmdq/Makefile                        |  2 +-
 examples/vmdq_dcb/Makefile                    |  2 +-
 45 files changed, 91 insertions(+), 49 deletions(-)
 create mode 100644 buildtools/pkg-config/set-static-linker-flags.py

diff --git a/buildtools/pkg-config/meson.build b/buildtools/pkg-config/meson.build
index f663b1c66..dacc5dbfb 100644
--- a/buildtools/pkg-config/meson.build
+++ b/buildtools/pkg-config/meson.build
@@ -1,10 +1,6 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2020 Intel Corporation
 
-# for static builds, include the drivers as libs and we need to "whole-archive"
-# them.
-dpdk_drivers = ['-Wl,--whole-archive'] + dpdk_drivers + ['-Wl,--no-whole-archive']
-
 pkg = import('pkgconfig')
 pkg_extra_cflags = ['-include', 'rte_config.h'] + machine_args
 if is_freebsd
@@ -22,6 +18,9 @@ endif
 # and those need to come *before* the regular libraries (Libs field).
 # This requirement is satisfied by moving the regular libs in a separate file
 # included in the field Requires (after Libs.private).
+# Another requirement is to allow linking dependencies as shared libraries,
+# while linking static DPDK libraries and drivers. It is satisfied by
+# listing the static files in Libs.private with the explicit syntax -l:libfoo.a.
 
 pkg.generate(name: 'dpdk-libs',
 	filebase: 'libdpdk-libs',
@@ -41,6 +40,11 @@ Note that CFLAGS might contain an -march flag higher than typical baseline.
 This is required for a number of static inline functions in the public headers.''',
 	requires: ['libdpdk-libs', libbsd], # may need libbsd for string funcs
 	                  # if libbsd is not enabled, then this is blank
-	libraries_private: dpdk_drivers + dpdk_static_libraries +
-			['-Wl,-Bdynamic']
+	libraries_private: ['-Wl,--whole-archive'] +
+			dpdk_drivers + dpdk_static_libraries +
+			['-Wl,--no-whole-archive']
 )
+
+# For static linking with dependencies as shared libraries,
+# the internal static libraries must be flagged explicitly.
+run_command(py3, 'set-static-linker-flags.py', check: true)
diff --git a/buildtools/pkg-config/set-static-linker-flags.py b/buildtools/pkg-config/set-static-linker-flags.py
new file mode 100644
index 000000000..2745db34c
--- /dev/null
+++ b/buildtools/pkg-config/set-static-linker-flags.py
@@ -0,0 +1,38 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2020 Intel Corporation
+
+# Script to fix flags for static linking in pkgconfig files from meson
+# Should be called from meson build itself
+import os
+import sys
+
+
+def fix_ldflag(f):
+    if not f.startswith('-lrte_'):
+        return f
+    return '-l:lib' + f[2:] + '.a'
+
+
+def fix_libs_private(line):
+    if not line.startswith('Libs.private'):
+        return line
+    ldflags = [fix_ldflag(flag) for flag in line.split()]
+    return ' '.join(ldflags) + '\n'
+
+
+def process_pc_file(filepath):
+    print('Processing', filepath)
+    with open(filepath) as src:
+        lines = src.readlines()
+    with open(filepath, 'w') as dst:
+        dst.writelines([fix_libs_private(line) for line in lines])
+
+
+if 'MESON_BUILD_ROOT' not in os.environ:
+    print('This script must be called from a meson build environment')
+    sys.exit(1)
+for root, dirs, files in os.walk(os.environ['MESON_BUILD_ROOT']):
+    pc_files = [f for f in files if f.endswith('.pc')]
+    for f in pc_files:
+        process_pc_file(os.path.join(root, f))
diff --git a/doc/build-sdk-meson.txt b/doc/build-sdk-meson.txt
index fc7fe37b5..3a3682cd4 100644
--- a/doc/build-sdk-meson.txt
+++ b/doc/build-sdk-meson.txt
@@ -182,7 +182,7 @@ From examples/helloworld/Makefile::
 	PC_FILE := $(shell pkg-config --path libdpdk)
 	CFLAGS += -O3 $(shell pkg-config --cflags libdpdk)
 	LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk)
-	LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk)
+	LDFLAGS_STATIC = $(shell pkg-config --static --libs libdpdk)
 
 	build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 		$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/bbdev_app/Makefile b/examples/bbdev_app/Makefile
index ead3f016b..3c8eb75a4 100644
--- a/examples/bbdev_app/Makefile
+++ b/examples/bbdev_app/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 
diff --git a/examples/bond/Makefile b/examples/bond/Makefile
index 2030ca410..4e4289e15 100644
--- a/examples/bond/Makefile
+++ b/examples/bond/Makefile
@@ -24,7 +24,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 
diff --git a/examples/cmdline/Makefile b/examples/cmdline/Makefile
index 0b6b54540..9418b50b8 100644
--- a/examples/cmdline/Makefile
+++ b/examples/cmdline/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile
index 4192d8a4a..5253780793a 100644
--- a/examples/distributor/Makefile
+++ b/examples/distributor/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/eventdev_pipeline/Makefile b/examples/eventdev_pipeline/Makefile
index 96cd24437..95a8d0884 100644
--- a/examples/eventdev_pipeline/Makefile
+++ b/examples/eventdev_pipeline/Makefile
@@ -24,7 +24,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/fips_validation/Makefile b/examples/fips_validation/Makefile
index 1385e8cc8..8aac600d5 100644
--- a/examples/fips_validation/Makefile
+++ b/examples/fips_validation/Makefile
@@ -31,7 +31,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/flow_classify/Makefile b/examples/flow_classify/Makefile
index 6864941b3..161d576b6 100644
--- a/examples/flow_classify/Makefile
+++ b/examples/flow_classify/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 
diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile
index 6c51c0b7a..0ce20d348 100644
--- a/examples/flow_filtering/Makefile
+++ b/examples/flow_filtering/Makefile
@@ -20,7 +20,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/helloworld/Makefile b/examples/helloworld/Makefile
index 16d82b02f..9a07f89ef 100644
--- a/examples/helloworld/Makefile
+++ b/examples/helloworld/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/ioat/Makefile b/examples/ioat/Makefile
index ef63f5d68..dd4930136 100644
--- a/examples/ioat/Makefile
+++ b/examples/ioat/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/ip_fragmentation/Makefile b/examples/ip_fragmentation/Makefile
index ede0c4f02..d200cc627 100644
--- a/examples/ip_fragmentation/Makefile
+++ b/examples/ip_fragmentation/Makefile
@@ -23,7 +23,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/ip_pipeline/Makefile b/examples/ip_pipeline/Makefile
index 3a0193818..1116bb6c1 100644
--- a/examples/ip_pipeline/Makefile
+++ b/examples/ip_pipeline/Makefile
@@ -35,7 +35,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 CFLAGS += -I.
 
diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile
index 3f2888b33..c7424da2b 100644
--- a/examples/ip_reassembly/Makefile
+++ b/examples/ip_reassembly/Makefile
@@ -23,7 +23,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/ipsec-secgw/Makefile b/examples/ipsec-secgw/Makefile
index a4977f61f..38c456daa 100644
--- a/examples/ipsec-secgw/Makefile
+++ b/examples/ipsec-secgw/Makefile
@@ -33,7 +33,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 
diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile
index 92d3db0f4..5e34bbba0 100644
--- a/examples/ipv4_multicast/Makefile
+++ b/examples/ipv4_multicast/Makefile
@@ -23,7 +23,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/kni/Makefile b/examples/kni/Makefile
index c7ca96d8a..8fcb67c61 100644
--- a/examples/kni/Makefile
+++ b/examples/kni/Makefile
@@ -23,7 +23,7 @@ PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile
index b0e53c37e..e8fdc46d7 100644
--- a/examples/l2fwd-cat/Makefile
+++ b/examples/l2fwd-cat/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 LDFLAGS += -lpqos
 
diff --git a/examples/l2fwd-crypto/Makefile b/examples/l2fwd-crypto/Makefile
index 2f1405a72..cdbb91a1e 100644
--- a/examples/l2fwd-crypto/Makefile
+++ b/examples/l2fwd-crypto/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/l2fwd-event/Makefile b/examples/l2fwd-event/Makefile
index 4cdae36f1..bf0ee890d 100644
--- a/examples/l2fwd-event/Makefile
+++ b/examples/l2fwd-event/Makefile
@@ -28,7 +28,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile
index 73c91faa8..c26803909 100644
--- a/examples/l2fwd-jobstats/Makefile
+++ b/examples/l2fwd-jobstats/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile
index 94d1e58bb..ea3a9cbbf 100644
--- a/examples/l2fwd-keepalive/Makefile
+++ b/examples/l2fwd-keepalive/Makefile
@@ -24,7 +24,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile
index 8b7b26cb9..15105ac57 100644
--- a/examples/l2fwd/Makefile
+++ b/examples/l2fwd/Makefile
@@ -24,7 +24,7 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 # Add flag to allow experimental API as l2fwd uses rte_ethdev_set_ptype API
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile
index d9909584b..156dc1960 100644
--- a/examples/l3fwd-acl/Makefile
+++ b/examples/l3fwd-acl/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/l3fwd-power/Makefile b/examples/l3fwd-power/Makefile
index 729d49639..74441f98c 100644
--- a/examples/l3fwd-power/Makefile
+++ b/examples/l3fwd-power/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 
diff --git a/examples/l3fwd/Makefile b/examples/l3fwd/Makefile
index b2dbf2607..38a370c2c 100644
--- a/examples/l3fwd/Makefile
+++ b/examples/l3fwd/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile
index 4f02a8901..879ee7384 100644
--- a/examples/link_status_interrupt/Makefile
+++ b/examples/link_status_interrupt/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/ntb/Makefile b/examples/ntb/Makefile
index baeba11e8..e36a4f9bf 100644
--- a/examples/ntb/Makefile
+++ b/examples/ntb/Makefile
@@ -26,7 +26,7 @@ LDFLAGS += -pthread
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile
index 261b7f06a..1e5038942 100644
--- a/examples/packet_ordering/Makefile
+++ b/examples/packet_ordering/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile
index 82d72b3e3..9e47a6011 100644
--- a/examples/ptpclient/Makefile
+++ b/examples/ptpclient/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/qos_meter/Makefile b/examples/qos_meter/Makefile
index 7c2bf88a9..f733facae 100644
--- a/examples/qos_meter/Makefile
+++ b/examples/qos_meter/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 
diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile
index 525061ca0..736ac00a3 100644
--- a/examples/qos_sched/Makefile
+++ b/examples/qos_sched/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/rxtx_callbacks/Makefile b/examples/rxtx_callbacks/Makefile
index 584b9fafb..10e5f14d5 100644
--- a/examples/rxtx_callbacks/Makefile
+++ b/examples/rxtx_callbacks/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/service_cores/Makefile b/examples/service_cores/Makefile
index c47055813..b8669fdf7 100644
--- a/examples/service_cores/Makefile
+++ b/examples/service_cores/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile
index 2c29004d7..5059f3123 100644
--- a/examples/skeleton/Makefile
+++ b/examples/skeleton/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/tep_termination/Makefile b/examples/tep_termination/Makefile
index 645112498..548ca3cee 100644
--- a/examples/tep_termination/Makefile
+++ b/examples/tep_termination/Makefile
@@ -24,7 +24,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 CFLAGS += -Wno-deprecated-declarations
 
diff --git a/examples/timer/Makefile b/examples/timer/Makefile
index bf86339ab..b34c8baa6 100644
--- a/examples/timer/Makefile
+++ b/examples/timer/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/vdpa/Makefile b/examples/vdpa/Makefile
index 6a25497cd..bc0b6793e 100644
--- a/examples/vdpa/Makefile
+++ b/examples/vdpa/Makefile
@@ -23,7 +23,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile
index f2b161541..ef6f3550f 100644
--- a/examples/vhost/Makefile
+++ b/examples/vhost/Makefile
@@ -24,7 +24,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 
diff --git a/examples/vhost_blk/Makefile b/examples/vhost_blk/Makefile
index 39244320d..395279178 100644
--- a/examples/vhost_blk/Makefile
+++ b/examples/vhost_blk/Makefile
@@ -25,7 +25,7 @@ LDFLAGS += -pthread
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 
diff --git a/examples/vhost_crypto/Makefile b/examples/vhost_crypto/Makefile
index ae8cb81f8..28e3e4de7 100644
--- a/examples/vhost_crypto/Makefile
+++ b/examples/vhost_crypto/Makefile
@@ -23,7 +23,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile
index 0767c715a..7e59e4d65 100644
--- a/examples/vmdq/Makefile
+++ b/examples/vmdq/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile
index 2a9b04143..2302577d0 100644
--- a/examples/vmdq_dcb/Makefile
+++ b/examples/vmdq_dcb/Makefile
@@ -22,7 +22,7 @@ PKGCONF ?= pkg-config
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-LDFLAGS_STATIC = -Wl,-Bstatic $(shell $(PKGCONF) --static --libs libdpdk)
+LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
-- 
2.20.1


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

* [dpdk-stable] patch 'build/pkg-config: prevent overlinking' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (189 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'build/pkg-config: improve static linking flags' " luca.boccassi
@ 2020-07-24 12:00 ` luca.boccassi
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
  191 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-07-24 12:00 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Luca Boccassi, Sunil Pai G, Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 48f7fd27f6350603613ad94286535755ed82b4f9 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 30 Jun 2020 15:14:33 +0100
Subject: [PATCH] build/pkg-config: prevent overlinking

[ backported from upstream commit b98447077b0609750c10b84b7b2e7be0c8504fad ]

Add the --as-needed linker flag to the DPDK library list in the pkg-config
file so as to prevent overlinking. Without this flag, when linking
statically using flags from $(pkg-config --static --libs libdpdk), all DPDK
drivers and libs were statically linked in, but the binary was also
requiring all the shared versions be present to run.

The real root-cause of this issue is that the DPDK libraries need to be
duplicated in the linker command when doing static linking, due to the
behaviour of pkg-config, but since that behaviour cannot be easily changed,
this is a simple workaround to avoid problems.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Sunil Pai G <sunil.pai.g@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 buildtools/pkg-config/meson.build | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/buildtools/pkg-config/meson.build b/buildtools/pkg-config/meson.build
index dacc5dbfb..5f1930428 100644
--- a/buildtools/pkg-config/meson.build
+++ b/buildtools/pkg-config/meson.build
@@ -21,6 +21,11 @@ endif
 # Another requirement is to allow linking dependencies as shared libraries,
 # while linking static DPDK libraries and drivers. It is satisfied by
 # listing the static files in Libs.private with the explicit syntax -l:libfoo.a.
+# As a consequence, the regular DPDK libraries are already listed as static
+# in the field Libs.private. The second occurences of DPDK libraries,
+# included from Requires and used for shared library linkage case,
+# are skipped in the case of static linkage thanks to the flag --as-needed.
+
 
 pkg.generate(name: 'dpdk-libs',
 	filebase: 'libdpdk-libs',
@@ -29,7 +34,7 @@ Use libdpdk.pc instead of this file to query DPDK compile/link arguments''',
 	version: meson.project_version(),
 	subdirs: [get_option('include_subdir_arch'), '.'],
 	extra_cflags: pkg_extra_cflags,
-	libraries: dpdk_libraries,
+	libraries: ['-Wl,--as-needed'] + dpdk_libraries,
 	libraries_private: dpdk_extra_ldflags)
 
 pkg.generate(name: 'DPDK', # main DPDK pkgconfig file
-- 
2.20.1


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

* [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' has been queued to stable release 19.11.4
  2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
                   ` (190 preceding siblings ...)
  2020-07-24 12:00 ` [dpdk-stable] patch 'build/pkg-config: prevent overlinking' " luca.boccassi
@ 2020-08-06  9:53 ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'test/cycles: restore default delay callback' " luca.boccassi
                     ` (41 more replies)
  191 siblings, 42 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Bin Huang, Honnappa Nagarahalli, Yipeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 8825b47499d932fea98f7b0c9602ad034610e8d1 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Wed, 22 Jul 2020 11:58:58 +0800
Subject: [PATCH] hash: fix out-of-memory handling in hash creation

[ upstream commit a5f803c804c4f75ce7c736a143170c49bb7e72c9 ]

The function rte_zmalloc_socket() could return NULL, the return
value need to be checked.

Fixes: 5915699153d7 ("hash: fix scaling by reducing contention")

Reported-by: Bin Huang <brian.huangbin@huawei.com>
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
---
 lib/librte_hash/rte_cuckoo_hash.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c
index 87a4c01f2..51ebae9cd 100644
--- a/lib/librte_hash/rte_cuckoo_hash.c
+++ b/lib/librte_hash/rte_cuckoo_hash.c
@@ -144,6 +144,7 @@ rte_hash_create(const struct rte_hash_parameters *params)
 	unsigned int no_free_on_del = 0;
 	uint32_t *ext_bkt_to_free = NULL;
 	uint32_t *tbl_chng_cnt = NULL;
+	struct lcore_cache *local_free_slots = NULL;
 	unsigned int readwrite_concur_lf_support = 0;
 
 	rte_hash_function default_hash_func = (rte_hash_function)rte_jhash;
@@ -369,9 +370,13 @@ rte_hash_create(const struct rte_hash_parameters *params)
 #endif
 
 	if (use_local_cache) {
-		h->local_free_slots = rte_zmalloc_socket(NULL,
+		local_free_slots = rte_zmalloc_socket(NULL,
 				sizeof(struct lcore_cache) * RTE_MAX_LCORE,
 				RTE_CACHE_LINE_SIZE, params->socket_id);
+		if (local_free_slots == NULL) {
+			RTE_LOG(ERR, HASH, "local free slots memory allocation failed\n");
+			goto err_unlock;
+		}
 	}
 
 	/* Default hash function */
@@ -402,6 +407,7 @@ rte_hash_create(const struct rte_hash_parameters *params)
 	*h->tbl_chng_cnt = 0;
 	h->hw_trans_mem_support = hw_trans_mem_support;
 	h->use_local_cache = use_local_cache;
+	h->local_free_slots = local_free_slots;
 	h->readwrite_concur_support = readwrite_concur_support;
 	h->ext_table_support = ext_table_support;
 	h->writer_takes_lock = writer_takes_lock;
@@ -447,6 +453,7 @@ err:
 	rte_ring_free(r);
 	rte_ring_free(r_ext);
 	rte_free(te);
+	rte_free(local_free_slots);
 	rte_free(h);
 	rte_free(buckets);
 	rte_free(buckets_ext);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:15.870047970 +0100
+++ 0001-hash-fix-out-of-memory-handling-in-hash-creation.patch	2020-08-06 10:53:15.696595342 +0100
@@ -1,13 +1,14 @@
-From a5f803c804c4f75ce7c736a143170c49bb7e72c9 Mon Sep 17 00:00:00 2001
+From 8825b47499d932fea98f7b0c9602ad034610e8d1 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Wed, 22 Jul 2020 11:58:58 +0800
 Subject: [PATCH] hash: fix out-of-memory handling in hash creation
 
+[ upstream commit a5f803c804c4f75ce7c736a143170c49bb7e72c9 ]
+
 The function rte_zmalloc_socket() could return NULL, the return
 value need to be checked.
 
 Fixes: 5915699153d7 ("hash: fix scaling by reducing contention")
-Cc: stable@dpdk.org
 
 Reported-by: Bin Huang <brian.huangbin@huawei.com>
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
@@ -18,18 +19,18 @@
  1 file changed, 8 insertions(+), 1 deletion(-)
 
 diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c
-index 5f701d579..0a6d47471 100644
+index 87a4c01f2..51ebae9cd 100644
 --- a/lib/librte_hash/rte_cuckoo_hash.c
 +++ b/lib/librte_hash/rte_cuckoo_hash.c
-@@ -151,6 +151,7 @@ rte_hash_create(const struct rte_hash_parameters *params)
+@@ -144,6 +144,7 @@ rte_hash_create(const struct rte_hash_parameters *params)
  	unsigned int no_free_on_del = 0;
  	uint32_t *ext_bkt_to_free = NULL;
  	uint32_t *tbl_chng_cnt = NULL;
 +	struct lcore_cache *local_free_slots = NULL;
  	unsigned int readwrite_concur_lf_support = 0;
- 	uint32_t i;
  
-@@ -383,9 +384,13 @@ rte_hash_create(const struct rte_hash_parameters *params)
+ 	rte_hash_function default_hash_func = (rte_hash_function)rte_jhash;
+@@ -369,9 +370,13 @@ rte_hash_create(const struct rte_hash_parameters *params)
  #endif
  
  	if (use_local_cache) {
@@ -44,7 +45,7 @@
  	}
  
  	/* Default hash function */
-@@ -416,6 +421,7 @@ rte_hash_create(const struct rte_hash_parameters *params)
+@@ -402,6 +407,7 @@ rte_hash_create(const struct rte_hash_parameters *params)
  	*h->tbl_chng_cnt = 0;
  	h->hw_trans_mem_support = hw_trans_mem_support;
  	h->use_local_cache = use_local_cache;
@@ -52,7 +53,7 @@
  	h->readwrite_concur_support = readwrite_concur_support;
  	h->ext_table_support = ext_table_support;
  	h->writer_takes_lock = writer_takes_lock;
-@@ -461,6 +467,7 @@ err:
+@@ -447,6 +453,7 @@ err:
  	rte_ring_free(r);
  	rte_ring_free(r_ext);
  	rte_free(te);

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

* [dpdk-stable] patch 'test/cycles: restore default delay callback' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'common/mlx5: fix void parameters in glue wrappers' " luca.boccassi
                     ` (40 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Gavin Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 1f1c4cff4cef1b647fabcf91aed4341340d8caa4 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Mon, 27 Jul 2020 18:21:50 +0800
Subject: [PATCH] test/cycles: restore default delay callback

[ upstream commit ec0b862d5e52db12932c3125d06081307aea6af4 ]

test_delay_us_sleep registers sleep based delay for testing.
This changes the default delay function of testing environment.
It is not expected.

Restore default delay function after the test to fix the issue.

Fixes: a51639cc720a ("eal: add nanosleep based delay function")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
---
 app/test/test_cycles.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/app/test/test_cycles.c b/app/test/test_cycles.c
index c78e6a5b1..97d42f303 100644
--- a/app/test/test_cycles.c
+++ b/app/test/test_cycles.c
@@ -79,8 +79,14 @@ REGISTER_TEST_COMMAND(cycles_autotest, test_cycles);
 static int
 test_delay_us_sleep(void)
 {
+	int rv;
+
 	rte_delay_us_callback_register(rte_delay_us_sleep);
-	return check_wait_one_second();
+	rv = check_wait_one_second();
+	/* restore original delay function */
+	rte_delay_us_callback_register(rte_delay_us_block);
+
+	return rv;
 }
 
 REGISTER_TEST_COMMAND(delay_us_sleep_autotest, test_delay_us_sleep);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:15.898561098 +0100
+++ 0002-test-cycles-restore-default-delay-callback.patch	2020-08-06 10:53:15.696595342 +0100
@@ -1,8 +1,10 @@
-From ec0b862d5e52db12932c3125d06081307aea6af4 Mon Sep 17 00:00:00 2001
+From 1f1c4cff4cef1b647fabcf91aed4341340d8caa4 Mon Sep 17 00:00:00 2001
 From: Ruifeng Wang <ruifeng.wang@arm.com>
 Date: Mon, 27 Jul 2020 18:21:50 +0800
 Subject: [PATCH] test/cycles: restore default delay callback
 
+[ upstream commit ec0b862d5e52db12932c3125d06081307aea6af4 ]
+
 test_delay_us_sleep registers sleep based delay for testing.
 This changes the default delay function of testing environment.
 It is not expected.
@@ -10,7 +12,6 @@
 Restore default delay function after the test to fix the issue.
 
 Fixes: a51639cc720a ("eal: add nanosleep based delay function")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
 Reviewed-by: Gavin Hu <gavin.hu@arm.com>

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

* [dpdk-stable] patch 'common/mlx5: fix void parameters in glue wrappers' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'test/cycles: restore default delay callback' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'event/dpaa: remove dead code' " luca.boccassi
                     ` (39 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Parav Pandit; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 5a68d9a798279cbe9a763deedb9ac575ca967ac1 Mon Sep 17 00:00:00 2001
From: Parav Pandit <parav@mellanox.com>
Date: Mon, 27 Jul 2020 20:47:09 +0300
Subject: [PATCH] common/mlx5: fix void parameters in glue wrappers

[ upstream commit 4c093ffa5b9bdebad9ef14ef4136624a7f44b0f6 ]

Following two errors are reported when compiled with
gcc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5).

drivers/common/mlx5/linux/mlx5_glue.h:188:2:
error: function declaration isn't a prototype [-Werror=strict-prototypes]

drivers/common/mlx5/linux/mlx5_glue.h:188:2:
error: function declaration isn't a prototype [-Werror=strict-prototypes]

Fix them by adding void data type in empty argument list.

Fixes: 34fa7c0268e7 ("net/mlx5: add drop action to Direct Verbs E-Switch")
Fixes: 400d985eb586 ("net/mlx5: add VLAN push/pop DR commands to glue")

Signed-off-by: Parav Pandit <parav@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_glue.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_glue.h b/drivers/net/mlx5/mlx5_glue.h
index 4e6465523..9895e5597 100644
--- a/drivers/net/mlx5/mlx5_glue.h
+++ b/drivers/net/mlx5/mlx5_glue.h
@@ -167,11 +167,11 @@ struct mlx5_glue {
 	void *(*dr_create_flow_action_dest_flow_tbl)(void *tbl);
 	void *(*dr_create_flow_action_dest_port)(void *domain,
 						 uint32_t port);
-	void *(*dr_create_flow_action_drop)();
+	void *(*dr_create_flow_action_drop)(void);
 	void *(*dr_create_flow_action_push_vlan)
 					(struct mlx5dv_dr_domain *domain,
 					 rte_be32_t vlan_tag);
-	void *(*dr_create_flow_action_pop_vlan)();
+	void *(*dr_create_flow_action_pop_vlan)(void);
 	void *(*dr_create_flow_tbl)(void *domain, uint32_t level);
 	int (*dr_destroy_flow_tbl)(void *tbl);
 	void *(*dr_create_domain)(struct ibv_context *ctx,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:15.931989125 +0100
+++ 0003-common-mlx5-fix-void-parameters-in-glue-wrappers.patch	2020-08-06 10:53:15.700595422 +0100
@@ -1,8 +1,10 @@
-From 4c093ffa5b9bdebad9ef14ef4136624a7f44b0f6 Mon Sep 17 00:00:00 2001
+From 5a68d9a798279cbe9a763deedb9ac575ca967ac1 Mon Sep 17 00:00:00 2001
 From: Parav Pandit <parav@mellanox.com>
 Date: Mon, 27 Jul 2020 20:47:09 +0300
 Subject: [PATCH] common/mlx5: fix void parameters in glue wrappers
 
+[ upstream commit 4c093ffa5b9bdebad9ef14ef4136624a7f44b0f6 ]
+
 Following two errors are reported when compiled with
 gcc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5).
 
@@ -16,19 +18,18 @@
 
 Fixes: 34fa7c0268e7 ("net/mlx5: add drop action to Direct Verbs E-Switch")
 Fixes: 400d985eb586 ("net/mlx5: add VLAN push/pop DR commands to glue")
-Cc: stable@dpdk.org
 
 Signed-off-by: Parav Pandit <parav@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
 ---
- drivers/common/mlx5/linux/mlx5_glue.h | 4 ++--
+ drivers/net/mlx5/mlx5_glue.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/drivers/common/mlx5/linux/mlx5_glue.h b/drivers/common/mlx5/linux/mlx5_glue.h
-index c4f9b006a..734ace2a3 100644
---- a/drivers/common/mlx5/linux/mlx5_glue.h
-+++ b/drivers/common/mlx5/linux/mlx5_glue.h
-@@ -185,11 +185,11 @@ struct mlx5_glue {
+diff --git a/drivers/net/mlx5/mlx5_glue.h b/drivers/net/mlx5/mlx5_glue.h
+index 4e6465523..9895e5597 100644
+--- a/drivers/net/mlx5/mlx5_glue.h
++++ b/drivers/net/mlx5/mlx5_glue.h
+@@ -167,11 +167,11 @@ struct mlx5_glue {
  	void *(*dr_create_flow_action_dest_flow_tbl)(void *tbl);
  	void *(*dr_create_flow_action_dest_port)(void *domain,
  						 uint32_t port);

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

* [dpdk-stable] patch 'event/dpaa: remove dead code' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'test/cycles: restore default delay callback' " luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'common/mlx5: fix void parameters in glue wrappers' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'app/eventdev: fix capability check in pipeline ATQ test' " luca.boccassi
                     ` (38 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 31a7eed72c28508aac5f7fbf2ca9b2f3ca2b765d Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Fri, 17 Jul 2020 19:31:52 +0800
Subject: [PATCH] event/dpaa: remove dead code

[ upstream commit fea678742606d794240bca2c15811c357bf0c298 ]

Fix logical dead code.

Coverity issue: 323495
Fixes: 77b5311d0ece ("event/dpaa: support select based event")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/event/dpaa/dpaa_eventdev.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c
index a7d57edce..29b18fe62 100644
--- a/drivers/event/dpaa/dpaa_eventdev.c
+++ b/drivers/event/dpaa/dpaa_eventdev.c
@@ -173,7 +173,7 @@ dpaa_event_dequeue_burst(void *port, struct rte_event ev[],
 	int ret;
 	u16 ch_id;
 	void *buffers[8];
-	u32 num_frames, i, irq = 0;
+	u32 num_frames, i;
 	uint64_t cur_ticks = 0, wait_time_ticks = 0;
 	struct dpaa_port *portal = (struct dpaa_port *)port;
 	struct rte_mbuf *mbuf;
@@ -222,8 +222,6 @@ dpaa_event_dequeue_burst(void *port, struct rte_event ev[],
 	do {
 		/* Lets dequeue the frames */
 		num_frames = qman_portal_dequeue(ev, nb_events, buffers);
-		if (irq)
-			irq = 0;
 		if (num_frames)
 			break;
 		cur_ticks = rte_get_timer_cycles();
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:15.966028334 +0100
+++ 0004-event-dpaa-remove-dead-code.patch	2020-08-06 10:53:15.700595422 +0100
@@ -1,13 +1,14 @@
-From fea678742606d794240bca2c15811c357bf0c298 Mon Sep 17 00:00:00 2001
+From 31a7eed72c28508aac5f7fbf2ca9b2f3ca2b765d Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Fri, 17 Jul 2020 19:31:52 +0800
 Subject: [PATCH] event/dpaa: remove dead code
 
+[ upstream commit fea678742606d794240bca2c15811c357bf0c298 ]
+
 Fix logical dead code.
 
 Coverity issue: 323495
 Fixes: 77b5311d0ece ("event/dpaa: support select based event")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
@@ -16,10 +17,10 @@
  1 file changed, 1 insertion(+), 3 deletions(-)
 
 diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c
-index a3c138b7a..b5ae87a4e 100644
+index a7d57edce..29b18fe62 100644
 --- a/drivers/event/dpaa/dpaa_eventdev.c
 +++ b/drivers/event/dpaa/dpaa_eventdev.c
-@@ -174,7 +174,7 @@ dpaa_event_dequeue_burst(void *port, struct rte_event ev[],
+@@ -173,7 +173,7 @@ dpaa_event_dequeue_burst(void *port, struct rte_event ev[],
  	int ret;
  	u16 ch_id;
  	void *buffers[8];
@@ -28,7 +29,7 @@
  	uint64_t cur_ticks = 0, wait_time_ticks = 0;
  	struct dpaa_port *portal = (struct dpaa_port *)port;
  	struct rte_mbuf *mbuf;
-@@ -223,8 +223,6 @@ dpaa_event_dequeue_burst(void *port, struct rte_event ev[],
+@@ -222,8 +222,6 @@ dpaa_event_dequeue_burst(void *port, struct rte_event ev[],
  	do {
  		/* Lets dequeue the frames */
  		num_frames = qman_portal_dequeue(ev, nb_events, buffers);

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

* [dpdk-stable] patch 'app/eventdev: fix capability check in pipeline ATQ test' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (2 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'event/dpaa: remove dead code' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'event/dpaa2: add all-types queue capability flag' " luca.boccassi
                     ` (37 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Apeksha Gupta; +Cc: Pavan Nikhilesh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 87be7d2eaa2f3be0e12187cf546be461df83c68e Mon Sep 17 00:00:00 2001
From: Apeksha Gupta <apeksha.gupta@nxp.com>
Date: Thu, 23 Jul 2020 22:32:32 +0530
Subject: [PATCH] app/eventdev: fix capability check in pipeline ATQ test

[ upstream commit 179237727e91d8eb5ab2ce6fb78a1d380ae84401 ]

Add all type queue capability check before configuring event device
for pipeline atq test.

Fixes: 6bf570a9911 ("app/eventdev: add pipeline atq test")

Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 app/test-eventdev/test_pipeline_atq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/test-eventdev/test_pipeline_atq.c b/app/test-eventdev/test_pipeline_atq.c
index 8e8686c14..0872b25b5 100644
--- a/app/test-eventdev/test_pipeline_atq.c
+++ b/app/test-eventdev/test_pipeline_atq.c
@@ -495,6 +495,8 @@ pipeline_atq_capability_check(struct evt_options *opt)
 			evt_nr_active_lcores(opt->wlcores),
 			dev_info.max_event_ports);
 	}
+	if (!evt_has_all_types_queue(opt->dev_id))
+		return false;
 
 	return true;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.000533876 +0100
+++ 0005-app-eventdev-fix-capability-check-in-pipeline-ATQ-te.patch	2020-08-06 10:53:15.700595422 +0100
@@ -1,13 +1,14 @@
-From 179237727e91d8eb5ab2ce6fb78a1d380ae84401 Mon Sep 17 00:00:00 2001
+From 87be7d2eaa2f3be0e12187cf546be461df83c68e Mon Sep 17 00:00:00 2001
 From: Apeksha Gupta <apeksha.gupta@nxp.com>
 Date: Thu, 23 Jul 2020 22:32:32 +0530
 Subject: [PATCH] app/eventdev: fix capability check in pipeline ATQ test
 
+[ upstream commit 179237727e91d8eb5ab2ce6fb78a1d380ae84401 ]
+
 Add all type queue capability check before configuring event device
 for pipeline atq test.
 
 Fixes: 6bf570a9911 ("app/eventdev: add pipeline atq test")
-Cc: stable@dpdk.org
 
 Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
 Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

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

* [dpdk-stable] patch 'event/dpaa2: add all-types queue capability flag' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (3 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'app/eventdev: fix capability check in pipeline ATQ test' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'common/qat: fix uninitialized variable' " luca.boccassi
                     ` (36 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Apeksha Gupta; +Cc: Nipun Gupta, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 4ff6deeefae4db55d92e818a1a655d585b67736c Mon Sep 17 00:00:00 2001
From: Apeksha Gupta <apeksha.gupta@nxp.com>
Date: Thu, 23 Jul 2020 22:34:25 +0530
Subject: [PATCH] event/dpaa2: add all-types queue capability flag

[ upstream commit b8d81e9cbf5e411133800da8fddc80a636e3555d ]

DPAA2 eventdev device is capable of all type queue feature.
Fix the capability flag to reflect the same.

Fixes: 8f4a294c23 ("event/dpaa2: apply new capability flags")

Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
---
 drivers/event/dpaa2/dpaa2_eventdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index 2be6e12f6..ede7b0161 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -403,7 +403,8 @@ dpaa2_eventdev_info_get(struct rte_eventdev *dev,
 		RTE_EVENT_DEV_CAP_BURST_MODE|
 		RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK |
 		RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT |
-		RTE_EVENT_DEV_CAP_NONSEQ_MODE;
+		RTE_EVENT_DEV_CAP_NONSEQ_MODE |
+		RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES;
 
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.034571422 +0100
+++ 0006-event-dpaa2-add-all-types-queue-capability-flag.patch	2020-08-06 10:53:15.704595501 +0100
@@ -1,13 +1,14 @@
-From b8d81e9cbf5e411133800da8fddc80a636e3555d Mon Sep 17 00:00:00 2001
+From 4ff6deeefae4db55d92e818a1a655d585b67736c Mon Sep 17 00:00:00 2001
 From: Apeksha Gupta <apeksha.gupta@nxp.com>
 Date: Thu, 23 Jul 2020 22:34:25 +0530
 Subject: [PATCH] event/dpaa2: add all-types queue capability flag
 
+[ upstream commit b8d81e9cbf5e411133800da8fddc80a636e3555d ]
+
 DPAA2 eventdev device is capable of all type queue feature.
 Fix the capability flag to reflect the same.
 
 Fixes: 8f4a294c23 ("event/dpaa2: apply new capability flags")
-Cc: stable@dpdk.org
 
 Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
 Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
@@ -16,10 +17,10 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
-index a545baf34..3ae4441ee 100644
+index 2be6e12f6..ede7b0161 100644
 --- a/drivers/event/dpaa2/dpaa2_eventdev.c
 +++ b/drivers/event/dpaa2/dpaa2_eventdev.c
-@@ -405,7 +405,8 @@ dpaa2_eventdev_info_get(struct rte_eventdev *dev,
+@@ -403,7 +403,8 @@ dpaa2_eventdev_info_get(struct rte_eventdev *dev,
  		RTE_EVENT_DEV_CAP_BURST_MODE|
  		RTE_EVENT_DEV_CAP_RUNTIME_PORT_LINK |
  		RTE_EVENT_DEV_CAP_MULTIPLE_QUEUE_PORT |

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

* [dpdk-stable] patch 'common/qat: fix uninitialized variable' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (4 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'event/dpaa2: add all-types queue capability flag' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'crypto/armv8: remove debug option' " luca.boccassi
                     ` (35 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Adam Dybkowski; +Cc: Fiona Trahe, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From ab8c73287e4677cb05359f2ede608c69059a8c4c Mon Sep 17 00:00:00 2001
From: Adam Dybkowski <adamx.dybkowski@intel.com>
Date: Fri, 24 Jul 2020 11:40:10 +0200
Subject: [PATCH] common/qat: fix uninitialized variable

[ upstream commit c800c2e07f9644ee5473fffe30f2a07d97bb399b ]

This patch fixes the uninitialized variable bug in QAT PMD.

Fixes: 9f27a860dc16 ("crypto/qat: move generic qp function to qp file")

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
 drivers/common/qat/qat_qp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c
index 26ec854da..fa7ab8080 100644
--- a/drivers/common/qat/qat_qp.c
+++ b/drivers/common/qat/qat_qp.c
@@ -577,7 +577,7 @@ qat_enqueue_op_burst(void *qp, void **ops, uint16_t nb_ops)
 	register struct qat_queue *queue;
 	struct qat_qp *tmp_qp = (struct qat_qp *)qp;
 	register uint32_t nb_ops_sent = 0;
-	register int ret;
+	register int ret = -1;
 	uint16_t nb_ops_possible = nb_ops;
 	register uint8_t *base_addr;
 	register uint32_t tail;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.068562143 +0100
+++ 0007-common-qat-fix-uninitialized-variable.patch	2020-08-06 10:53:15.704595501 +0100
@@ -1,12 +1,13 @@
-From c800c2e07f9644ee5473fffe30f2a07d97bb399b Mon Sep 17 00:00:00 2001
+From ab8c73287e4677cb05359f2ede608c69059a8c4c Mon Sep 17 00:00:00 2001
 From: Adam Dybkowski <adamx.dybkowski@intel.com>
 Date: Fri, 24 Jul 2020 11:40:10 +0200
 Subject: [PATCH] common/qat: fix uninitialized variable
 
+[ upstream commit c800c2e07f9644ee5473fffe30f2a07d97bb399b ]
+
 This patch fixes the uninitialized variable bug in QAT PMD.
 
 Fixes: 9f27a860dc16 ("crypto/qat: move generic qp function to qp file")
-Cc: stable@dpdk.org
 
 Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
 Acked-by: Fiona Trahe <fiona.trahe@intel.com>
@@ -15,10 +16,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c
-index 567d55fd9..32d740105 100644
+index 26ec854da..fa7ab8080 100644
 --- a/drivers/common/qat/qat_qp.c
 +++ b/drivers/common/qat/qat_qp.c
-@@ -581,7 +581,7 @@ qat_enqueue_op_burst(void *qp, void **ops, uint16_t nb_ops)
+@@ -577,7 +577,7 @@ qat_enqueue_op_burst(void *qp, void **ops, uint16_t nb_ops)
  	register struct qat_queue *queue;
  	struct qat_qp *tmp_qp = (struct qat_qp *)qp;
  	register uint32_t nb_ops_sent = 0;

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

* [dpdk-stable] patch 'crypto/armv8: remove debug option' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (5 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'common/qat: fix uninitialized variable' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'crypto/armv8: use dedicated log type' " luca.boccassi
                     ` (34 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: David Marchand, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 6255874ccec385cdf7f258b9a05623dcb7fc6f5a Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Tue, 28 Jul 2020 17:24:04 +0800
Subject: [PATCH] crypto/armv8: remove debug option
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit cc9035ffbb8a050780e202047500b1580abed0c9 ]

Typo in debug log switch macro caused debug log cannot be enabled.
Since no log used in data path, remove the debug option entirely
and have logs always enabled.

Resolved compilation error when debug log is enabled:
rte_armv8_pmd.c: In function ‘process_armv8_chained_op’:
rte_armv8_pmd.c:633:22: error: expected ‘)’ before ‘crypto_func’
  ARMV8_CRYPTO_ASSERT(crypto_func != NULL);
                      ^

Fixes: 169ca3db550c ("crypto/armv8: add PMD optimized for ARMv8 processors")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 config/common_base                       |  1 -
 drivers/crypto/armv8/armv8_pmd_private.h | 11 ++---------
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/config/common_base b/config/common_base
index 861f7d1a0..340614637 100644
--- a/config/common_base
+++ b/config/common_base
@@ -572,7 +572,6 @@ CONFIG_RTE_CRYPTO_MAX_DEVS=64
 # Compile PMD for ARMv8 Crypto device
 #
 CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO=n
-CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO_DEBUG=n
 
 #
 # Compile NXP CAAM JR crypto Driver
diff --git a/drivers/crypto/armv8/armv8_pmd_private.h b/drivers/crypto/armv8/armv8_pmd_private.h
index 24040dda2..30be0f594 100644
--- a/drivers/crypto/armv8/armv8_pmd_private.h
+++ b/drivers/crypto/armv8/armv8_pmd_private.h
@@ -13,7 +13,6 @@
 			RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
 			__func__, __LINE__, ## args)
 
-#ifdef RTE_LIBRTE_ARMV8_CRYPTO_DEBUG
 #define ARMV8_CRYPTO_LOG_INFO(fmt, args...) \
 	RTE_LOG(INFO, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
 			RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
@@ -27,17 +26,11 @@
 #define ARMV8_CRYPTO_ASSERT(con)				\
 do {								\
 	if (!(con)) {						\
-		rte_panic("%s(): "				\
-		    con "condition failed, line %u", __func__);	\
+		rte_panic("condition failed, line %u",		\
+			__LINE__);				\
 	}							\
 } while (0)
 
-#else
-#define ARMV8_CRYPTO_LOG_INFO(fmt, args...)
-#define ARMV8_CRYPTO_LOG_DBG(fmt, args...)
-#define ARMV8_CRYPTO_ASSERT(con)
-#endif
-
 #define NBBY		8		/* Number of bits in a byte */
 #define BYTE_LENGTH(x)	((x) / NBBY)	/* Number of bytes in x (round down) */
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.102677978 +0100
+++ 0008-crypto-armv8-remove-debug-option.patch	2020-08-06 10:53:15.708595580 +0100
@@ -1,4 +1,4 @@
-From cc9035ffbb8a050780e202047500b1580abed0c9 Mon Sep 17 00:00:00 2001
+From 6255874ccec385cdf7f258b9a05623dcb7fc6f5a Mon Sep 17 00:00:00 2001
 From: Ruifeng Wang <ruifeng.wang@arm.com>
 Date: Tue, 28 Jul 2020 17:24:04 +0800
 Subject: [PATCH] crypto/armv8: remove debug option
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit cc9035ffbb8a050780e202047500b1580abed0c9 ]
+
 Typo in debug log switch macro caused debug log cannot be enabled.
 Since no log used in data path, remove the debug option entirely
 and have logs always enabled.
@@ -17,7 +19,6 @@
                       ^
 
 Fixes: 169ca3db550c ("crypto/armv8: add PMD optimized for ARMv8 processors")
-Cc: stable@dpdk.org
 
 Reported-by: David Marchand <david.marchand@redhat.com>
 Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
@@ -28,10 +29,10 @@
  2 files changed, 2 insertions(+), 10 deletions(-)
 
 diff --git a/config/common_base b/config/common_base
-index f76585f16..c70b8f68b 100644
+index 861f7d1a0..340614637 100644
 --- a/config/common_base
 +++ b/config/common_base
-@@ -605,7 +605,6 @@ CONFIG_RTE_CRYPTO_MAX_DEVS=64
+@@ -572,7 +572,6 @@ CONFIG_RTE_CRYPTO_MAX_DEVS=64
  # Compile PMD for ARMv8 Crypto device
  #
  CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO=n
@@ -40,10 +41,10 @@
  #
  # Compile NXP CAAM JR crypto Driver
 diff --git a/drivers/crypto/armv8/armv8_pmd_private.h b/drivers/crypto/armv8/armv8_pmd_private.h
-index e08d0df78..19940809b 100644
+index 24040dda2..30be0f594 100644
 --- a/drivers/crypto/armv8/armv8_pmd_private.h
 +++ b/drivers/crypto/armv8/armv8_pmd_private.h
-@@ -15,7 +15,6 @@
+@@ -13,7 +13,6 @@
  			RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
  			__func__, __LINE__, ## args)
  
@@ -51,7 +52,7 @@
  #define ARMV8_CRYPTO_LOG_INFO(fmt, args...) \
  	RTE_LOG(INFO, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
  			RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
-@@ -29,17 +28,11 @@
+@@ -27,17 +26,11 @@
  #define ARMV8_CRYPTO_ASSERT(con)				\
  do {								\
  	if (!(con)) {						\

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

* [dpdk-stable] patch 'crypto/armv8: use dedicated log type' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (6 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'crypto/armv8: remove debug option' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/ice: fix bytes statistics' " luca.boccassi
                     ` (33 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: David Marchand, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 641a749ab6e4e0579b3eff8dcbccbca09f659d77 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Tue, 28 Jul 2020 17:24:05 +0800
Subject: [PATCH] crypto/armv8: use dedicated log type

[ upstream commit 28b0514504cf0f71f822f0aed5aacc83eb8ada12 ]

armv8 crypto PMD used CRYPTODEV general log type.
Create a dedicated log type for the PMD to not pollute CRYPTODEV log type.

Typo in crypto dev name macro caused unexpected device name in log.
Fixed the typo to log with correct device name.

Fixes: 169ca3db550c ("crypto/armv8: add PMD optimized for ARMv8 processors")

Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/armv8/armv8_pmd_private.h | 23 ++++++++++++++---------
 drivers/crypto/armv8/rte_armv8_pmd.c     |  2 ++
 2 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/drivers/crypto/armv8/armv8_pmd_private.h b/drivers/crypto/armv8/armv8_pmd_private.h
index 30be0f594..aeda47b1b 100644
--- a/drivers/crypto/armv8/armv8_pmd_private.h
+++ b/drivers/crypto/armv8/armv8_pmd_private.h
@@ -8,19 +8,24 @@
 #define CRYPTODEV_NAME_ARMV8_PMD	crypto_armv8
 /**< ARMv8 Crypto PMD device name */
 
-#define ARMV8_CRYPTO_LOG_ERR(fmt, args...) \
-	RTE_LOG(ERR, CRYPTODEV, "[%s] %s() line %u: " fmt "\n",  \
-			RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
+extern int crypto_armv8_log_type;
+
+#define ARMV8_CRYPTO_LOG_ERR(fmt, args...)			\
+	rte_log(RTE_LOG_ERR, crypto_armv8_log_type,		\
+			"[%s] %s() line %u: " fmt "\n",		\
+			RTE_STR(CRYPTODEV_NAME_ARMV8_PMD),	\
 			__func__, __LINE__, ## args)
 
-#define ARMV8_CRYPTO_LOG_INFO(fmt, args...) \
-	RTE_LOG(INFO, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
-			RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
+#define ARMV8_CRYPTO_LOG_INFO(fmt, args...)			\
+	rte_log(RTE_LOG_INFO, crypto_armv8_log_type,		\
+			"[%s] %s() line %u: " fmt "\n",		\
+			RTE_STR(CRYPTODEV_NAME_ARMV8_PMD),	\
 			__func__, __LINE__, ## args)
 
-#define ARMV8_CRYPTO_LOG_DBG(fmt, args...) \
-	RTE_LOG(DEBUG, CRYPTODEV, "[%s] %s() line %u: " fmt "\n", \
-			RTE_STR(CRYPTODEV_NAME_ARMV8_CRYPTO_PMD), \
+#define ARMV8_CRYPTO_LOG_DBG(fmt, args...)			\
+	rte_log(RTE_LOG_DEBUG, crypto_armv8_log_type,		\
+			"[%s] %s() line %u: " fmt "\n",		\
+			RTE_STR(CRYPTODEV_NAME_ARMV8_PMD),	\
 			__func__, __LINE__, ## args)
 
 #define ARMV8_CRYPTO_ASSERT(con)				\
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index fd3093315..bc897ac71 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -852,6 +852,8 @@ static struct rte_vdev_driver armv8_crypto_pmd_drv = {
 
 static struct cryptodev_driver armv8_crypto_drv;
 
+RTE_LOG_REGISTER(crypto_armv8_log_type, pmd.crypto.armv8, ERR);
+
 RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ARMV8_PMD, armv8_crypto_pmd_drv);
 RTE_PMD_REGISTER_ALIAS(CRYPTODEV_NAME_ARMV8_PMD, cryptodev_armv8_pmd);
 RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ARMV8_PMD,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.137759582 +0100
+++ 0009-crypto-armv8-use-dedicated-log-type.patch	2020-08-06 10:53:15.708595580 +0100
@@ -1,8 +1,10 @@
-From 28b0514504cf0f71f822f0aed5aacc83eb8ada12 Mon Sep 17 00:00:00 2001
+From 641a749ab6e4e0579b3eff8dcbccbca09f659d77 Mon Sep 17 00:00:00 2001
 From: Ruifeng Wang <ruifeng.wang@arm.com>
 Date: Tue, 28 Jul 2020 17:24:05 +0800
 Subject: [PATCH] crypto/armv8: use dedicated log type
 
+[ upstream commit 28b0514504cf0f71f822f0aed5aacc83eb8ada12 ]
+
 armv8 crypto PMD used CRYPTODEV general log type.
 Create a dedicated log type for the PMD to not pollute CRYPTODEV log type.
 
@@ -10,7 +12,6 @@
 Fixed the typo to log with correct device name.
 
 Fixes: 169ca3db550c ("crypto/armv8: add PMD optimized for ARMv8 processors")
-Cc: stable@dpdk.org
 
 Suggested-by: David Marchand <david.marchand@redhat.com>
 Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
@@ -21,10 +22,10 @@
  2 files changed, 16 insertions(+), 9 deletions(-)
 
 diff --git a/drivers/crypto/armv8/armv8_pmd_private.h b/drivers/crypto/armv8/armv8_pmd_private.h
-index 19940809b..709b3d536 100644
+index 30be0f594..aeda47b1b 100644
 --- a/drivers/crypto/armv8/armv8_pmd_private.h
 +++ b/drivers/crypto/armv8/armv8_pmd_private.h
-@@ -10,19 +10,24 @@
+@@ -8,19 +8,24 @@
  #define CRYPTODEV_NAME_ARMV8_PMD	crypto_armv8
  /**< ARMv8 Crypto PMD device name */
  
@@ -59,10 +60,10 @@
  
  #define ARMV8_CRYPTO_ASSERT(con)				\
 diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
-index 8b212772f..a2b08d818 100644
+index fd3093315..bc897ac71 100644
 --- a/drivers/crypto/armv8/rte_armv8_pmd.c
 +++ b/drivers/crypto/armv8/rte_armv8_pmd.c
-@@ -861,6 +861,8 @@ static struct rte_vdev_driver armv8_crypto_pmd_drv = {
+@@ -852,6 +852,8 @@ static struct rte_vdev_driver armv8_crypto_pmd_drv = {
  
  static struct cryptodev_driver armv8_crypto_drv;
  

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

* [dpdk-stable] patch 'net/ice: fix bytes statistics' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (7 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'crypto/armv8: use dedicated log type' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx5: fix flow items size calculation' " luca.boccassi
                     ` (32 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Junyu Jiang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From f1e4f235374364075f7e26a1a1895ca297d9635f Mon Sep 17 00:00:00 2001
From: Junyu Jiang <junyux.jiang@intel.com>
Date: Tue, 21 Jul 2020 07:20:21 +0000
Subject: [PATCH] net/ice: fix bytes statistics

[ upstream commit f0585e8559616399a655f5e129e98c90609a8c5d ]

This patch fixed the issue that rx/tx bytes overflowed
on 40 bit limitation by enlarging the limitation.

Fixes: a37bde56314d ("net/ice: support statistics")

Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 28 ++++++++++++++++++++++++++++
 drivers/net/ice/ice_ethdev.h |  7 +++++++
 2 files changed, 35 insertions(+)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index ca4371ae3..5166dafd0 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -4061,6 +4061,13 @@ ice_update_vsi_stats(struct ice_vsi *vsi)
 	ice_stat_update_40(hw, GLV_BPRCH(idx), GLV_BPRCL(idx),
 			   vsi->offset_loaded, &oes->rx_broadcast,
 			   &nes->rx_broadcast);
+	/* enlarge the limitation when rx_bytes overflowed */
+	if (vsi->offset_loaded) {
+		if (ICE_RXTX_BYTES_LOW(vsi->old_rx_bytes) > nes->rx_bytes)
+			nes->rx_bytes += (uint64_t)1 << ICE_40_BIT_WIDTH;
+		nes->rx_bytes += ICE_RXTX_BYTES_HIGH(vsi->old_rx_bytes);
+	}
+	vsi->old_rx_bytes = nes->rx_bytes;
 	/* exclude CRC bytes */
 	nes->rx_bytes -= (nes->rx_unicast + nes->rx_multicast +
 			  nes->rx_broadcast) * RTE_ETHER_CRC_LEN;
@@ -4087,6 +4094,13 @@ ice_update_vsi_stats(struct ice_vsi *vsi)
 	/* GLV_TDPC not supported */
 	ice_stat_update_32(hw, GLV_TEPC(idx), vsi->offset_loaded,
 			   &oes->tx_errors, &nes->tx_errors);
+	/* enlarge the limitation when tx_bytes overflowed */
+	if (vsi->offset_loaded) {
+		if (ICE_RXTX_BYTES_LOW(vsi->old_tx_bytes) > nes->tx_bytes)
+			nes->tx_bytes += (uint64_t)1 << ICE_40_BIT_WIDTH;
+		nes->tx_bytes += ICE_RXTX_BYTES_HIGH(vsi->old_tx_bytes);
+	}
+	vsi->old_tx_bytes = nes->tx_bytes;
 	vsi->offset_loaded = true;
 
 	PMD_DRV_LOG(DEBUG, "************** VSI[%u] stats start **************",
@@ -4134,6 +4148,13 @@ ice_read_stats_registers(struct ice_pf *pf, struct ice_hw *hw)
 	ice_stat_update_32(hw, PRTRPB_RDPC,
 			   pf->offset_loaded, &os->eth.rx_discards,
 			   &ns->eth.rx_discards);
+	/* enlarge the limitation when rx_bytes overflowed */
+	if (pf->offset_loaded) {
+		if (ICE_RXTX_BYTES_LOW(pf->old_rx_bytes) > ns->eth.rx_bytes)
+			ns->eth.rx_bytes += (uint64_t)1 << ICE_40_BIT_WIDTH;
+		ns->eth.rx_bytes += ICE_RXTX_BYTES_HIGH(pf->old_rx_bytes);
+	}
+	pf->old_rx_bytes = ns->eth.rx_bytes;
 
 	/* Workaround: CRC size should not be included in byte statistics,
 	 * so subtract RTE_ETHER_CRC_LEN from the byte counter for each rx
@@ -4164,6 +4185,13 @@ ice_read_stats_registers(struct ice_pf *pf, struct ice_hw *hw)
 			   GLPRT_BPTCL(hw->port_info->lport),
 			   pf->offset_loaded, &os->eth.tx_broadcast,
 			   &ns->eth.tx_broadcast);
+	/* enlarge the limitation when tx_bytes overflowed */
+	if (pf->offset_loaded) {
+		if (ICE_RXTX_BYTES_LOW(pf->old_tx_bytes) > ns->eth.tx_bytes)
+			ns->eth.tx_bytes += (uint64_t)1 << ICE_40_BIT_WIDTH;
+		ns->eth.tx_bytes += ICE_RXTX_BYTES_HIGH(pf->old_tx_bytes);
+	}
+	pf->old_tx_bytes = ns->eth.tx_bytes;
 	ns->eth.tx_bytes -= (ns->eth.tx_unicast + ns->eth.tx_multicast +
 			     ns->eth.tx_broadcast) * RTE_ETHER_CRC_LEN;
 
diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index da557a254..070c3ae30 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -124,6 +124,9 @@
 #define ICE_ETH_OVERHEAD \
 	(RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + ICE_VLAN_TAG_SIZE * 2)
 
+#define ICE_RXTX_BYTES_HIGH(bytes) ((bytes) & ~ICE_40_BIT_MASK)
+#define ICE_RXTX_BYTES_LOW(bytes) ((bytes) & ICE_40_BIT_MASK)
+
 /* DDP package type */
 enum ice_pkg_type {
 	ICE_PKG_TYPE_UNKNOWN,
@@ -239,6 +242,8 @@ struct ice_vsi {
 	struct ice_eth_stats eth_stats_offset;
 	struct ice_eth_stats eth_stats;
 	bool offset_loaded;
+	uint64_t old_rx_bytes;
+	uint64_t old_tx_bytes;
 };
 
 enum proto_xtr_type {
@@ -381,6 +386,8 @@ struct ice_pf {
 	struct ice_parser_list perm_parser_list;
 	struct ice_parser_list dist_parser_list;
 	bool init_link_up;
+	uint64_t old_rx_bytes;
+	uint64_t old_tx_bytes;
 };
 
 #define ICE_MAX_QUEUE_NUM  2048
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.171972518 +0100
+++ 0010-net-ice-fix-bytes-statistics.patch	2020-08-06 10:53:15.716595738 +0100
@@ -1,13 +1,14 @@
-From f0585e8559616399a655f5e129e98c90609a8c5d Mon Sep 17 00:00:00 2001
+From f1e4f235374364075f7e26a1a1895ca297d9635f Mon Sep 17 00:00:00 2001
 From: Junyu Jiang <junyux.jiang@intel.com>
 Date: Tue, 21 Jul 2020 07:20:21 +0000
 Subject: [PATCH] net/ice: fix bytes statistics
 
+[ upstream commit f0585e8559616399a655f5e129e98c90609a8c5d ]
+
 This patch fixed the issue that rx/tx bytes overflowed
 on 40 bit limitation by enlarging the limitation.
 
 Fixes: a37bde56314d ("net/ice: support statistics")
-Cc: stable@dpdk.org
 
 Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -17,10 +18,10 @@
  2 files changed, 35 insertions(+)
 
 diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
-index 7dd3fcd27..a4a0390f8 100644
+index ca4371ae3..5166dafd0 100644
 --- a/drivers/net/ice/ice_ethdev.c
 +++ b/drivers/net/ice/ice_ethdev.c
-@@ -4252,6 +4252,13 @@ ice_update_vsi_stats(struct ice_vsi *vsi)
+@@ -4061,6 +4061,13 @@ ice_update_vsi_stats(struct ice_vsi *vsi)
  	ice_stat_update_40(hw, GLV_BPRCH(idx), GLV_BPRCL(idx),
  			   vsi->offset_loaded, &oes->rx_broadcast,
  			   &nes->rx_broadcast);
@@ -34,7 +35,7 @@
  	/* exclude CRC bytes */
  	nes->rx_bytes -= (nes->rx_unicast + nes->rx_multicast +
  			  nes->rx_broadcast) * RTE_ETHER_CRC_LEN;
-@@ -4278,6 +4285,13 @@ ice_update_vsi_stats(struct ice_vsi *vsi)
+@@ -4087,6 +4094,13 @@ ice_update_vsi_stats(struct ice_vsi *vsi)
  	/* GLV_TDPC not supported */
  	ice_stat_update_32(hw, GLV_TEPC(idx), vsi->offset_loaded,
  			   &oes->tx_errors, &nes->tx_errors);
@@ -48,7 +49,7 @@
  	vsi->offset_loaded = true;
  
  	PMD_DRV_LOG(DEBUG, "************** VSI[%u] stats start **************",
-@@ -4325,6 +4339,13 @@ ice_read_stats_registers(struct ice_pf *pf, struct ice_hw *hw)
+@@ -4134,6 +4148,13 @@ ice_read_stats_registers(struct ice_pf *pf, struct ice_hw *hw)
  	ice_stat_update_32(hw, PRTRPB_RDPC,
  			   pf->offset_loaded, &os->eth.rx_discards,
  			   &ns->eth.rx_discards);
@@ -62,7 +63,7 @@
  
  	/* Workaround: CRC size should not be included in byte statistics,
  	 * so subtract RTE_ETHER_CRC_LEN from the byte counter for each rx
-@@ -4355,6 +4376,13 @@ ice_read_stats_registers(struct ice_pf *pf, struct ice_hw *hw)
+@@ -4164,6 +4185,13 @@ ice_read_stats_registers(struct ice_pf *pf, struct ice_hw *hw)
  			   GLPRT_BPTCL(hw->port_info->lport),
  			   pf->offset_loaded, &os->eth.tx_broadcast,
  			   &ns->eth.tx_broadcast);
@@ -77,10 +78,10 @@
  			     ns->eth.tx_broadcast) * RTE_ETHER_CRC_LEN;
  
 diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
-index 2bff735ca..87984ef9e 100644
+index da557a254..070c3ae30 100644
 --- a/drivers/net/ice/ice_ethdev.h
 +++ b/drivers/net/ice/ice_ethdev.h
-@@ -133,6 +133,9 @@
+@@ -124,6 +124,9 @@
  #define ICE_ETH_OVERHEAD \
  	(RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + ICE_VLAN_TAG_SIZE * 2)
  
@@ -90,7 +91,7 @@
  /* DDP package type */
  enum ice_pkg_type {
  	ICE_PKG_TYPE_UNKNOWN,
-@@ -248,6 +251,8 @@ struct ice_vsi {
+@@ -239,6 +242,8 @@ struct ice_vsi {
  	struct ice_eth_stats eth_stats_offset;
  	struct ice_eth_stats eth_stats;
  	bool offset_loaded;
@@ -99,7 +100,7 @@
  };
  
  enum proto_xtr_type {
-@@ -391,6 +396,8 @@ struct ice_pf {
+@@ -381,6 +386,8 @@ struct ice_pf {
  	struct ice_parser_list perm_parser_list;
  	struct ice_parser_list dist_parser_list;
  	bool init_link_up;

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

* [dpdk-stable] patch 'net/mlx5: fix flow items size calculation' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (8 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/ice: fix bytes statistics' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-10  7:27     ` Raslan Darawsheh
  2020-08-06  9:53   ` [dpdk-stable] patch 'common/mlx5: fix queue doorbell record size' " luca.boccassi
                     ` (31 subsequent siblings)
  41 siblings, 1 reply; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From e8df8d9adc133f10e896bd7d7ca62ca237222bbb Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@mellanox.com>
Date: Thu, 16 Jul 2020 15:14:55 +0300
Subject: [PATCH] net/mlx5: fix flow items size calculation

[ upstream commit d13f9760866884d81563624fbf160f3054b70f19 ]

flow_dv_get_item_len returns the actual header size of
an rte_flow item.

Changing any of the structs for rte_flow items by adding
or removing some extra fields will break this function.

This fixes the behavior by returning the actual header size
of each item.

Fixes: 34d41b7aa3bf ("net/mlx5: add VXLAN encap action to Direct Verbs")

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 31 ++++++++++++++-----------------
 1 file changed, 14 insertions(+), 17 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index bfb27a602..e40cf3c2a 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -27,6 +27,7 @@
 #include <rte_ip.h>
 #include <rte_gre.h>
 #include <rte_vxlan.h>
+#include <rte_mpls.h>
 
 #include "mlx5.h"
 #include "mlx5_defs.h"
@@ -2661,7 +2662,7 @@ flow_dv_push_vlan_action_resource_register
 	return 0;
 }
 /**
- * Get the size of specific rte_flow_item_type
+ * Get the size of specific rte_flow_item_type hdr size
  *
  * @param[in] item_type
  *   Tested rte_flow_item_type.
@@ -2670,43 +2671,39 @@ flow_dv_push_vlan_action_resource_register
  *   sizeof struct item_type, 0 if void or irrelevant.
  */
 static size_t
-flow_dv_get_item_len(const enum rte_flow_item_type item_type)
+flow_dv_get_item_hdr_len(const enum rte_flow_item_type item_type)
 {
 	size_t retval;
 
 	switch (item_type) {
 	case RTE_FLOW_ITEM_TYPE_ETH:
-		retval = sizeof(struct rte_flow_item_eth);
+		retval = sizeof(struct rte_ether_hdr);
 		break;
 	case RTE_FLOW_ITEM_TYPE_VLAN:
-		retval = sizeof(struct rte_flow_item_vlan);
+		retval = sizeof(struct rte_vlan_hdr);
 		break;
 	case RTE_FLOW_ITEM_TYPE_IPV4:
-		retval = sizeof(struct rte_flow_item_ipv4);
+		retval = sizeof(struct rte_ipv4_hdr);
 		break;
 	case RTE_FLOW_ITEM_TYPE_IPV6:
-		retval = sizeof(struct rte_flow_item_ipv6);
+		retval = sizeof(struct rte_ipv6_hdr);
 		break;
 	case RTE_FLOW_ITEM_TYPE_UDP:
-		retval = sizeof(struct rte_flow_item_udp);
+		retval = sizeof(struct rte_udp_hdr);
 		break;
 	case RTE_FLOW_ITEM_TYPE_TCP:
-		retval = sizeof(struct rte_flow_item_tcp);
+		retval = sizeof(struct rte_tcp_hdr);
 		break;
 	case RTE_FLOW_ITEM_TYPE_VXLAN:
-		retval = sizeof(struct rte_flow_item_vxlan);
+	case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
+		retval = sizeof(struct rte_vxlan_hdr);
 		break;
 	case RTE_FLOW_ITEM_TYPE_GRE:
-		retval = sizeof(struct rte_flow_item_gre);
-		break;
 	case RTE_FLOW_ITEM_TYPE_NVGRE:
-		retval = sizeof(struct rte_flow_item_nvgre);
-		break;
-	case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
-		retval = sizeof(struct rte_flow_item_vxlan_gpe);
+		retval = sizeof(struct rte_gre_hdr);
 		break;
 	case RTE_FLOW_ITEM_TYPE_MPLS:
-		retval = sizeof(struct rte_flow_item_mpls);
+		retval = sizeof(struct rte_mpls_hdr);
 		break;
 	case RTE_FLOW_ITEM_TYPE_VOID: /* Fall through. */
 	default:
@@ -2759,7 +2756,7 @@ flow_dv_convert_encap_data(const struct rte_flow_item *items, uint8_t *buf,
 					  RTE_FLOW_ERROR_TYPE_ACTION,
 					  NULL, "invalid empty data");
 	for (; items->type != RTE_FLOW_ITEM_TYPE_END; items++) {
-		len = flow_dv_get_item_len(items->type);
+		len = flow_dv_get_item_hdr_len(items->type);
 		if (len + temp_size > MLX5_ENCAP_MAX_LEN)
 			return rte_flow_error_set(error, EINVAL,
 						  RTE_FLOW_ERROR_TYPE_ACTION,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.212439477 +0100
+++ 0011-net-mlx5-fix-flow-items-size-calculation.patch	2020-08-06 10:53:15.728595976 +0100
@@ -1,8 +1,10 @@
-From d13f9760866884d81563624fbf160f3054b70f19 Mon Sep 17 00:00:00 2001
+From e8df8d9adc133f10e896bd7d7ca62ca237222bbb Mon Sep 17 00:00:00 2001
 From: Raslan Darawsheh <rasland@mellanox.com>
 Date: Thu, 16 Jul 2020 15:14:55 +0300
 Subject: [PATCH] net/mlx5: fix flow items size calculation
 
+[ upstream commit d13f9760866884d81563624fbf160f3054b70f19 ]
+
 flow_dv_get_item_len returns the actual header size of
 an rte_flow item.
 
@@ -13,7 +15,6 @@
 of each item.
 
 Fixes: 34d41b7aa3bf ("net/mlx5: add VXLAN encap action to Direct Verbs")
-Cc: stable@dpdk.org
 
 Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -22,18 +23,18 @@
  1 file changed, 14 insertions(+), 17 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index f0cc7ad1a..e7f0a12ac 100644
+index bfb27a602..e40cf3c2a 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -20,6 +20,7 @@
+@@ -27,6 +27,7 @@
+ #include <rte_ip.h>
+ #include <rte_gre.h>
  #include <rte_vxlan.h>
- #include <rte_gtp.h>
- #include <rte_eal_paging.h>
 +#include <rte_mpls.h>
  
- #include <mlx5_glue.h>
- #include <mlx5_devx_cmds.h>
-@@ -2866,7 +2867,7 @@ flow_dv_push_vlan_action_resource_register
+ #include "mlx5.h"
+ #include "mlx5_defs.h"
+@@ -2661,7 +2662,7 @@ flow_dv_push_vlan_action_resource_register
  	return 0;
  }
  /**
@@ -42,7 +43,7 @@
   *
   * @param[in] item_type
   *   Tested rte_flow_item_type.
-@@ -2875,43 +2876,39 @@ flow_dv_push_vlan_action_resource_register
+@@ -2670,43 +2671,39 @@ flow_dv_push_vlan_action_resource_register
   *   sizeof struct item_type, 0 if void or irrelevant.
   */
  static size_t
@@ -97,7 +98,7 @@
  		break;
  	case RTE_FLOW_ITEM_TYPE_VOID: /* Fall through. */
  	default:
-@@ -2964,7 +2961,7 @@ flow_dv_convert_encap_data(const struct rte_flow_item *items, uint8_t *buf,
+@@ -2759,7 +2756,7 @@ flow_dv_convert_encap_data(const struct rte_flow_item *items, uint8_t *buf,
  					  RTE_FLOW_ERROR_TYPE_ACTION,
  					  NULL, "invalid empty data");
  	for (; items->type != RTE_FLOW_ITEM_TYPE_END; items++) {

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

* [dpdk-stable] patch 'common/mlx5: fix queue doorbell record size' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (9 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx5: fix flow items size calculation' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx5: fix initialization of steering registers' " luca.boccassi
                     ` (30 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 313e372f7d6892795cb3ee6db9d114f76c3e8ddd Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Tue, 21 Jul 2020 11:11:29 +0000
Subject: [PATCH] common/mlx5: fix queue doorbell record size

[ upstream commit 44c1b52bc6a659e01e8038e1f5c42d9fa98b728f ]

When Rx/Tx queue was being created with DevX the allocated
doorbell record size was only uint64_t. That was definitely
less than size of CPU cacheline and it might have happened the
doorbell records attached to different queues handled by
different cores were allocated within same cacheline. It might
have caused the contention on doorbell record writing.

This patch extends the allocated memory size for doorbell
record to cacheline size.

Fixes: 21cae8580fd0 ("net/mlx5: allocate door-bells via DevX")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5.c |  2 +-
 drivers/net/mlx5/mlx5.h | 10 ++++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index c97e54251..ad1ff8dba 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -2033,7 +2033,7 @@ mlx5_get_dbr(struct rte_eth_dev *dev, struct mlx5_devx_dbr_page **dbr_page)
 	page->dbr_bitmap[i] |= (UINT64_C(1) << j);
 	page->dbr_count++;
 	*dbr_page = page;
-	return (((i * 64) + j) * sizeof(uint64_t));
+	return (i * CHAR_BIT * sizeof(uint64_t) + j) * MLX5_DBR_SIZE;
 }
 
 /**
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 130aed0e5..51f067b4b 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -610,10 +610,12 @@ struct mlx5_flow_tbl_resource {
 #define MLX5_MAX_TABLES_EXTERNAL (MLX5_MAX_TABLES - 3)
 #define MLX5_MAX_TABLES_FDB UINT16_MAX
 
-#define MLX5_DBR_PAGE_SIZE 4096 /* Must be >= 512. */
-#define MLX5_DBR_SIZE 8
-#define MLX5_DBR_PER_PAGE (MLX5_DBR_PAGE_SIZE / MLX5_DBR_SIZE)
-#define MLX5_DBR_BITMAP_SIZE (MLX5_DBR_PER_PAGE / 64)
+#define MLX5_DBR_SIZE RTE_CACHE_LINE_SIZE
+#define MLX5_DBR_PER_PAGE 64
+/* Must be >= CHAR_BIT * sizeof(uint64_t) */
+#define MLX5_DBR_PAGE_SIZE (MLX5_DBR_PER_PAGE * MLX5_DBR_SIZE)
+/* Page size must be >= 512. */
+#define MLX5_DBR_BITMAP_SIZE (MLX5_DBR_PER_PAGE / (CHAR_BIT * sizeof(uint64_t)))
 
 struct mlx5_devx_dbr_page {
 	/* Door-bell records, must be first member in structure. */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.258847393 +0100
+++ 0012-common-mlx5-fix-queue-doorbell-record-size.patch	2020-08-06 10:53:15.732596055 +0100
@@ -1,8 +1,10 @@
-From 44c1b52bc6a659e01e8038e1f5c42d9fa98b728f Mon Sep 17 00:00:00 2001
+From 313e372f7d6892795cb3ee6db9d114f76c3e8ddd Mon Sep 17 00:00:00 2001
 From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
 Date: Tue, 21 Jul 2020 11:11:29 +0000
 Subject: [PATCH] common/mlx5: fix queue doorbell record size
 
+[ upstream commit 44c1b52bc6a659e01e8038e1f5c42d9fa98b728f ]
+
 When Rx/Tx queue was being created with DevX the allocated
 doorbell record size was only uint64_t. That was definitely
 less than size of CPU cacheline and it might have happened the
@@ -14,20 +16,19 @@
 record to cacheline size.
 
 Fixes: 21cae8580fd0 ("net/mlx5: allocate door-bells via DevX")
-Cc: stable@dpdk.org
 
 Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
 ---
- drivers/common/mlx5/mlx5_common.c |  2 +-
- drivers/common/mlx5/mlx5_common.h | 10 ++++++----
+ drivers/net/mlx5/mlx5.c |  2 +-
+ drivers/net/mlx5/mlx5.h | 10 ++++++----
  2 files changed, 7 insertions(+), 5 deletions(-)
 
-diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c
-index 79357e2e2..06f0a6400 100644
---- a/drivers/common/mlx5/mlx5_common.c
-+++ b/drivers/common/mlx5/mlx5_common.c
-@@ -198,7 +198,7 @@ mlx5_get_dbr(void *ctx,  struct mlx5_dbr_page_list *head,
+diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
+index c97e54251..ad1ff8dba 100644
+--- a/drivers/net/mlx5/mlx5.c
++++ b/drivers/net/mlx5/mlx5.c
+@@ -2033,7 +2033,7 @@ mlx5_get_dbr(struct rte_eth_dev *dev, struct mlx5_devx_dbr_page **dbr_page)
  	page->dbr_bitmap[i] |= (UINT64_C(1) << j);
  	page->dbr_count++;
  	*dbr_page = page;
@@ -36,13 +37,13 @@
  }
  
  /**
-diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h
-index 9154cbc6b..2cdb226f3 100644
---- a/drivers/common/mlx5/mlx5_common.h
-+++ b/drivers/common/mlx5/mlx5_common.h
-@@ -215,10 +215,12 @@ enum mlx5_class {
- 	MLX5_CLASS_REGEX = RTE_BIT64(2),
- };
+diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
+index 130aed0e5..51f067b4b 100644
+--- a/drivers/net/mlx5/mlx5.h
++++ b/drivers/net/mlx5/mlx5.h
+@@ -610,10 +610,12 @@ struct mlx5_flow_tbl_resource {
+ #define MLX5_MAX_TABLES_EXTERNAL (MLX5_MAX_TABLES - 3)
+ #define MLX5_MAX_TABLES_FDB UINT16_MAX
  
 -#define MLX5_DBR_PAGE_SIZE 4096 /* Must be >= 512. */
 -#define MLX5_DBR_SIZE 8

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

* [dpdk-stable] patch 'net/mlx5: fix initialization of steering registers' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (10 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'common/mlx5: fix queue doorbell record size' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx5: fix crash in NVGRE item translation' " luca.boccassi
                     ` (29 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From ed3c247e81869b88ce068b4551bfe0b3d7dba538 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@mellanox.com>
Date: Tue, 21 Jul 2020 11:57:21 +0000
Subject: [PATCH] net/mlx5: fix initialization of steering registers

[ upstream commit 4868ae8322892ca916d71d5f8cf74cb2e5e0b5c4 ]

The mlx5_flow_action_copy_mreg structure contains a field called src
type enum modify_reg, similarly the mlx5_rte_flow_item_tag field
contains a field called id type enum modify_reg.
The enum modify_reg variable represents different registers in the
system and it also has a field called REG_NONE whose value is 0 which
means that the register does not exist.

The flow_mreg_add_copy_action function sets a variable of struct
mlx5_flow_action_copy_mreg type, and initializes the src field to be 0.
Similarly the flow_create_split_metadata function sets a variable of
struct mlx5_rte_flow_item_tag type and initializes the id field to be 0.
In both functions, they initialize a enum modify_reg type variable with
an int type value while modify_reg has an appropriate field for that
value (REG_NONE).

Replace assigning 0 with REG_NONE in both functions.

Fixes: dd3c774f6ffb ("net/mlx5: add metadata register copy table")
Fixes: 71e254bc0294 ("net/mlx5: split Rx flows to provide metadata copy")

Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index be45091f4..d2e4e9aa4 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2934,7 +2934,7 @@ flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id,
 	};
 	struct mlx5_flow_action_copy_mreg cp_mreg = {
 		.dst = REG_B,
-		.src = 0,
+		.src = REG_NONE,
 	};
 	struct rte_flow_action_jump jump = {
 		.group = MLX5_FLOW_MREG_ACT_TABLE_GROUP,
@@ -3945,7 +3945,7 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
 		/* Internal PMD action to set register. */
 		struct mlx5_rte_flow_item_tag q_tag_spec = {
 			.data = qrss_id,
-			.id = 0,
+			.id = REG_NONE,
 		};
 		struct rte_flow_item q_items[] = {
 			{
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.293523751 +0100
+++ 0013-net-mlx5-fix-initialization-of-steering-registers.patch	2020-08-06 10:53:15.740596213 +0100
@@ -1,8 +1,10 @@
-From 4868ae8322892ca916d71d5f8cf74cb2e5e0b5c4 Mon Sep 17 00:00:00 2001
+From ed3c247e81869b88ce068b4551bfe0b3d7dba538 Mon Sep 17 00:00:00 2001
 From: Michael Baum <michaelba@mellanox.com>
 Date: Tue, 21 Jul 2020 11:57:21 +0000
 Subject: [PATCH] net/mlx5: fix initialization of steering registers
 
+[ upstream commit 4868ae8322892ca916d71d5f8cf74cb2e5e0b5c4 ]
+
 The mlx5_flow_action_copy_mreg structure contains a field called src
 type enum modify_reg, similarly the mlx5_rte_flow_item_tag field
 contains a field called id type enum modify_reg.
@@ -22,7 +24,6 @@
 
 Fixes: dd3c774f6ffb ("net/mlx5: add metadata register copy table")
 Fixes: 71e254bc0294 ("net/mlx5: split Rx flows to provide metadata copy")
-Cc: stable@dpdk.org
 
 Signed-off-by: Michael Baum <michaelba@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -31,10 +32,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
-index 40a8575b8..742f9dd8a 100644
+index be45091f4..d2e4e9aa4 100644
 --- a/drivers/net/mlx5/mlx5_flow.c
 +++ b/drivers/net/mlx5/mlx5_flow.c
-@@ -3011,7 +3011,7 @@ flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id,
+@@ -2934,7 +2934,7 @@ flow_mreg_add_copy_action(struct rte_eth_dev *dev, uint32_t mark_id,
  	};
  	struct mlx5_flow_action_copy_mreg cp_mreg = {
  		.dst = REG_B,
@@ -43,7 +44,7 @@
  	};
  	struct rte_flow_action_jump jump = {
  		.group = MLX5_FLOW_MREG_ACT_TABLE_GROUP,
-@@ -4067,7 +4067,7 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
+@@ -3945,7 +3945,7 @@ flow_create_split_metadata(struct rte_eth_dev *dev,
  		/* Internal PMD action to set register. */
  		struct mlx5_rte_flow_item_tag q_tag_spec = {
  			.data = qrss_id,

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

* [dpdk-stable] patch 'net/mlx5: fix crash in NVGRE item translation' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (11 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx5: fix initialization of steering registers' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx5: remove ineffective increment in hairpin split' " luca.boccassi
                     ` (28 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 82d236c020b0e875a39d06cc79c16dcafbb4774e Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@mellanox.com>
Date: Tue, 21 Jul 2020 11:59:04 +0000
Subject: [PATCH] net/mlx5: fix crash in NVGRE item translation

[ upstream commit e71e90938bef6012dea460d3d94fbd0ee643e132 ]

The flow_dv_translate_item_nvgre function add NVGRE item to matcher and
to the value.
It defines a pointer named nvrge_m that receives the item's mask into
it, and then copies some of it to the matcher.

Before copying, it checks for mask validation, and in case the mask is
NULL the function gives it a pointer to rte_flow_item_nvgre_mask.
However, the function calls from the vni mask's field before the check,
and if there is no mask, it actually does dereference to the NULL
pointer and indeed the program crashes with segfault.

Move the call from the vni field to post-validation.

Fixes: cd18e1b72f73 ("net/mlx5: fix build on Arm")

Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index e40cf3c2a..9cf38be7e 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -5836,8 +5836,8 @@ flow_dv_translate_item_nvgre(void *matcher, void *key,
 	const struct rte_flow_item_nvgre *nvgre_v = item->spec;
 	void *misc_m = MLX5_ADDR_OF(fte_match_param, matcher, misc_parameters);
 	void *misc_v = MLX5_ADDR_OF(fte_match_param, key, misc_parameters);
-	const char *tni_flow_id_m = (const char *)nvgre_m->tni;
-	const char *tni_flow_id_v = (const char *)nvgre_v->tni;
+	const char *tni_flow_id_m;
+	const char *tni_flow_id_v;
 	char *gre_key_m;
 	char *gre_key_v;
 	int size;
@@ -5862,6 +5862,8 @@ flow_dv_translate_item_nvgre(void *matcher, void *key,
 		return;
 	if (!nvgre_m)
 		nvgre_m = &rte_flow_item_nvgre_mask;
+	tni_flow_id_m = (const char *)nvgre_m->tni;
+	tni_flow_id_v = (const char *)nvgre_v->tni;
 	size = sizeof(nvgre_m->tni) + sizeof(nvgre_m->flow_id);
 	gre_key_m = MLX5_ADDR_OF(fte_match_set_misc, misc_m, gre_key_h);
 	gre_key_v = MLX5_ADDR_OF(fte_match_set_misc, misc_v, gre_key_h);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.336080321 +0100
+++ 0014-net-mlx5-fix-crash-in-NVGRE-item-translation.patch	2020-08-06 10:53:15.748596372 +0100
@@ -1,8 +1,10 @@
-From e71e90938bef6012dea460d3d94fbd0ee643e132 Mon Sep 17 00:00:00 2001
+From 82d236c020b0e875a39d06cc79c16dcafbb4774e Mon Sep 17 00:00:00 2001
 From: Michael Baum <michaelba@mellanox.com>
 Date: Tue, 21 Jul 2020 11:59:04 +0000
 Subject: [PATCH] net/mlx5: fix crash in NVGRE item translation
 
+[ upstream commit e71e90938bef6012dea460d3d94fbd0ee643e132 ]
+
 The flow_dv_translate_item_nvgre function add NVGRE item to matcher and
 to the value.
 It defines a pointer named nvrge_m that receives the item's mask into
@@ -17,7 +19,6 @@
 Move the call from the vni field to post-validation.
 
 Fixes: cd18e1b72f73 ("net/mlx5: fix build on Arm")
-Cc: stable@dpdk.org
 
 Signed-off-by: Michael Baum <michaelba@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -26,10 +27,10 @@
  1 file changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 0909cb661..2ba320d2d 100644
+index e40cf3c2a..9cf38be7e 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -6544,8 +6544,8 @@ flow_dv_translate_item_nvgre(void *matcher, void *key,
+@@ -5836,8 +5836,8 @@ flow_dv_translate_item_nvgre(void *matcher, void *key,
  	const struct rte_flow_item_nvgre *nvgre_v = item->spec;
  	void *misc_m = MLX5_ADDR_OF(fte_match_param, matcher, misc_parameters);
  	void *misc_v = MLX5_ADDR_OF(fte_match_param, key, misc_parameters);
@@ -40,7 +41,7 @@
  	char *gre_key_m;
  	char *gre_key_v;
  	int size;
-@@ -6570,6 +6570,8 @@ flow_dv_translate_item_nvgre(void *matcher, void *key,
+@@ -5862,6 +5862,8 @@ flow_dv_translate_item_nvgre(void *matcher, void *key,
  		return;
  	if (!nvgre_m)
  		nvgre_m = &rte_flow_item_nvgre_mask;

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

* [dpdk-stable] patch 'net/mlx5: remove ineffective increment in hairpin split' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (12 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx5: fix crash in NVGRE item translation' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx4: optimize stack memory size in probe' " luca.boccassi
                     ` (27 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 6c277381a5949461ec7a426c0d816b091d0fad47 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@mellanox.com>
Date: Tue, 21 Jul 2020 12:00:04 +0000
Subject: [PATCH] net/mlx5: remove ineffective increment in hairpin split

[ upstream commit 8da2a608d0d727d224ff5c8eb7747083907b0beb ]

The flow_hairpin_split function defines a pointer called addr that
points to the list of items.
When the function wants to progress in the list, it adds the size of an
item to the pointer.

At the end of the function, it precedes the pointer one more time even
though it is not used afterwards. In fact, this line is unaffected and
the operation of the function would have been no different without it.

Remove the line where the pointer is preceded unnecessarily.

Fixes: d85c7b5ea59f ("net/mlx5: split hairpin flows")

Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index d2e4e9aa4..a4bbb74fc 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -3406,7 +3406,6 @@ flow_hairpin_split(struct rte_eth_dev *dev,
 	tag_item->data = UINT32_MAX;
 	tag_item->id = UINT16_MAX;
 	item->mask = tag_item;
-	addr += sizeof(struct mlx5_rte_flow_item_tag);
 	item->last = NULL;
 	item++;
 	item->type = RTE_FLOW_ITEM_TYPE_END;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.380459159 +0100
+++ 0015-net-mlx5-remove-ineffective-increment-in-hairpin-spl.patch	2020-08-06 10:53:15.752596451 +0100
@@ -1,8 +1,10 @@
-From 8da2a608d0d727d224ff5c8eb7747083907b0beb Mon Sep 17 00:00:00 2001
+From 6c277381a5949461ec7a426c0d816b091d0fad47 Mon Sep 17 00:00:00 2001
 From: Michael Baum <michaelba@mellanox.com>
 Date: Tue, 21 Jul 2020 12:00:04 +0000
 Subject: [PATCH] net/mlx5: remove ineffective increment in hairpin split
 
+[ upstream commit 8da2a608d0d727d224ff5c8eb7747083907b0beb ]
+
 The flow_hairpin_split function defines a pointer called addr that
 points to the list of items.
 When the function wants to progress in the list, it adds the size of an
@@ -15,7 +17,6 @@
 Remove the line where the pointer is preceded unnecessarily.
 
 Fixes: d85c7b5ea59f ("net/mlx5: split hairpin flows")
-Cc: stable@dpdk.org
 
 Signed-off-by: Michael Baum <michaelba@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -24,10 +25,10 @@
  1 file changed, 1 deletion(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
-index 742f9dd8a..71501730b 100644
+index d2e4e9aa4..a4bbb74fc 100644
 --- a/drivers/net/mlx5/mlx5_flow.c
 +++ b/drivers/net/mlx5/mlx5_flow.c
-@@ -3518,7 +3518,6 @@ flow_hairpin_split(struct rte_eth_dev *dev,
+@@ -3406,7 +3406,6 @@ flow_hairpin_split(struct rte_eth_dev *dev,
  	tag_item->data = UINT32_MAX;
  	tag_item->id = UINT16_MAX;
  	item->mask = tag_item;

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

* [dpdk-stable] patch 'net/mlx4: optimize stack memory size in probe' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (13 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx5: remove ineffective increment in hairpin split' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx5: fix unnecessary init in mark conversion' " luca.boccassi
                     ` (26 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From c0e08db4c95be8eb8cd40139f2e594e7507bf39d Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@mellanox.com>
Date: Tue, 21 Jul 2020 12:01:09 +0000
Subject: [PATCH] net/mlx4: optimize stack memory size in probe

[ upstream commit 4a28e831c97cd02e1646337ea6391288f7e8db05 ]

The mlx4_pci_probe function sets a pointer to the mlx4_priv structure,
and during that function fills its fields one by one with relevant
values.

It wants to put a value in the intr_handle field that has all its fields
zero except 2. To do so, it initializes a local struct rte_intr_handle
type variable and updates it only 2 fields and assigns it into the
appropriate field. However, it initializes a very large structure on the
stack while not at all certain that this place exists and in any case it
is very wasteful.

Reset all fields directly to the pointer by memset, then format the 2
fields to the relevant values.

Fixes: 63c2f23c852a ("net/mlx4: use a single interrupt handle")

Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx4/mlx4.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 7771417eb..55398e4d0 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -1033,10 +1033,9 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
 		eth_dev->device = &pci_dev->device;
 		rte_eth_copy_pci_info(eth_dev, pci_dev);
 		/* Initialize local interrupt handle for current port. */
-		priv->intr_handle = (struct rte_intr_handle){
-			.fd = -1,
-			.type = RTE_INTR_HANDLE_EXT,
-		};
+		memset(&priv->intr_handle, 0, sizeof(struct rte_intr_handle));
+		priv->intr_handle.fd = -1;
+		priv->intr_handle.type = RTE_INTR_HANDLE_EXT;
 		/*
 		 * Override ethdev interrupt handle pointer with private
 		 * handle instead of that of the parent PCI device used by
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.420080948 +0100
+++ 0016-net-mlx4-optimize-stack-memory-size-in-probe.patch	2020-08-06 10:53:15.756596531 +0100
@@ -1,8 +1,10 @@
-From 4a28e831c97cd02e1646337ea6391288f7e8db05 Mon Sep 17 00:00:00 2001
+From c0e08db4c95be8eb8cd40139f2e594e7507bf39d Mon Sep 17 00:00:00 2001
 From: Michael Baum <michaelba@mellanox.com>
 Date: Tue, 21 Jul 2020 12:01:09 +0000
 Subject: [PATCH] net/mlx4: optimize stack memory size in probe
 
+[ upstream commit 4a28e831c97cd02e1646337ea6391288f7e8db05 ]
+
 The mlx4_pci_probe function sets a pointer to the mlx4_priv structure,
 and during that function fills its fields one by one with relevant
 values.
@@ -18,7 +20,6 @@
 fields to the relevant values.
 
 Fixes: 63c2f23c852a ("net/mlx4: use a single interrupt handle")
-Cc: stable@dpdk.org
 
 Signed-off-by: Michael Baum <michaelba@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -27,10 +28,10 @@
  1 file changed, 3 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
-index e619a749d..71061a720 100644
+index 7771417eb..55398e4d0 100644
 --- a/drivers/net/mlx4/mlx4.c
 +++ b/drivers/net/mlx4/mlx4.c
-@@ -1029,10 +1029,9 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
+@@ -1033,10 +1033,9 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
  		eth_dev->device = &pci_dev->device;
  		rte_eth_copy_pci_info(eth_dev, pci_dev);
  		/* Initialize local interrupt handle for current port. */

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

* [dpdk-stable] patch 'net/mlx5: fix unnecessary init in mark conversion' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (14 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx4: optimize stack memory size in probe' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx5: fix VF MAC address set over BlueField' " luca.boccassi
                     ` (25 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 20f72df8bd3f34822de495d6021943f66e31c703 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@mellanox.com>
Date: Tue, 21 Jul 2020 12:04:37 +0000
Subject: [PATCH] net/mlx5: fix unnecessary init in mark conversion

[ upstream commit 7301d1923a7103974077577520511d15420c7407 ]

The flow_dv_convert_action_mark function defines an array of
field_modify_info structures and initializes the first entity.

In the first entity id field, it initializes to 0, even though its type
is an enum that has no value of 0.
In fact, the function does not use this id field before assigning the
appropriate register id into it, so the initialization is unnecessary.
Moreover, this initialization is int into enum, and it would be better
not to create a type conflict for no reason.

Wait for the first entity initialization until the appropriate register
id is already known.

Fixes: 55deee1715f0 ("net/mlx5: extend flow mark support")

Signed-off-by: Michael Baum <michaelba@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 9cf38be7e..387036d0b 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1147,8 +1147,7 @@ flow_dv_convert_action_mark(struct rte_eth_dev *dev,
 		.mask = &mask,
 	};
 	struct field_modify_info reg_c_x[] = {
-		{4, 0, 0}, /* dynamic instead of MLX5_MODI_META_REG_C_1. */
-		{0, 0, 0},
+		[1] = {0, 0, 0},
 	};
 	int reg;
 
@@ -1168,7 +1167,7 @@ flow_dv_convert_action_mark(struct rte_eth_dev *dev,
 		mask = rte_cpu_to_be_32(mask) & msk_c0;
 		mask = rte_cpu_to_be_32(mask << shl_c0);
 	}
-	reg_c_x[0].id = reg_to_field[reg];
+	reg_c_x[0] = (struct field_modify_info){4, 0, reg_to_field[reg]};
 	return flow_dv_convert_modify_action(&item, reg_c_x, NULL, resource,
 					     MLX5_MODIFICATION_TYPE_SET, error);
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.454251004 +0100
+++ 0017-net-mlx5-fix-unnecessary-init-in-mark-conversion.patch	2020-08-06 10:53:15.764596689 +0100
@@ -1,8 +1,10 @@
-From 7301d1923a7103974077577520511d15420c7407 Mon Sep 17 00:00:00 2001
+From 20f72df8bd3f34822de495d6021943f66e31c703 Mon Sep 17 00:00:00 2001
 From: Michael Baum <michaelba@mellanox.com>
 Date: Tue, 21 Jul 2020 12:04:37 +0000
 Subject: [PATCH] net/mlx5: fix unnecessary init in mark conversion
 
+[ upstream commit 7301d1923a7103974077577520511d15420c7407 ]
+
 The flow_dv_convert_action_mark function defines an array of
 field_modify_info structures and initializes the first entity.
 
@@ -17,7 +19,6 @@
 id is already known.
 
 Fixes: 55deee1715f0 ("net/mlx5: extend flow mark support")
-Cc: stable@dpdk.org
 
 Signed-off-by: Michael Baum <michaelba@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -26,10 +27,10 @@
  1 file changed, 2 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index 2ba320d2d..53399800f 100644
+index 9cf38be7e..387036d0b 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -1152,8 +1152,7 @@ flow_dv_convert_action_mark(struct rte_eth_dev *dev,
+@@ -1147,8 +1147,7 @@ flow_dv_convert_action_mark(struct rte_eth_dev *dev,
  		.mask = &mask,
  	};
  	struct field_modify_info reg_c_x[] = {
@@ -39,7 +40,7 @@
  	};
  	int reg;
  
-@@ -1173,7 +1172,7 @@ flow_dv_convert_action_mark(struct rte_eth_dev *dev,
+@@ -1168,7 +1167,7 @@ flow_dv_convert_action_mark(struct rte_eth_dev *dev,
  		mask = rte_cpu_to_be_32(mask) & msk_c0;
  		mask = rte_cpu_to_be_32(mask << shl_c0);
  	}

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

* [dpdk-stable] patch 'net/mlx5: fix VF MAC address set over BlueField' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (15 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx5: fix unnecessary init in mark conversion' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/i40e: fix binding interrupt without MSI-X vector' " luca.boccassi
                     ` (24 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 95eb85e2f49bfd05feff56ff9ab18bfbbe48ff49 Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@mellanox.com>
Date: Wed, 22 Jul 2020 12:07:55 +0300
Subject: [PATCH] net/mlx5: fix VF MAC address set over BlueField

[ upstream commit 753dd70283c772ddcaf20c6f0ccb0ce5de5a5228 ]

When trying to set MAC address of an ethernet device and if it was
a representor, PMD sets the MAC over the corresponding VF instead.

For the case of HPF (Host PF representor on BlueField), PMD shouldn't
attempt to set it, since it doesn't have any corresponding VF and fails.

This will fix the issue by setting the MAC on the dev directly.

Fixes: 0d1d73170820 ("net/mlx5: set VF MAC address from host")

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_mac.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_mac.c b/drivers/net/mlx5/mlx5_mac.c
index 7bdaa2a39..94f102d8a 100644
--- a/drivers/net/mlx5/mlx5_mac.c
+++ b/drivers/net/mlx5/mlx5_mac.c
@@ -200,8 +200,11 @@ mlx5_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
 	uint16_t port_id;
 	struct mlx5_priv *priv = dev->data->dev_private;
 
-	/* Configuring the VF instead of its representor. */
-	if (priv->representor) {
+	/*
+	 * Configuring the VF instead of its representor,
+	 * need to skip the special case of HPF on Bluefield.
+	 */
+	if (priv->representor && priv->representor_id >= 0) {
 		DRV_LOG(DEBUG, "VF represented by port %u setting primary MAC address",
 			dev->data->port_id);
 		RTE_ETH_FOREACH_DEV_SIBLING(port_id, dev->data->port_id) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.500060756 +0100
+++ 0018-net-mlx5-fix-VF-MAC-address-set-over-BlueField.patch	2020-08-06 10:53:15.764596689 +0100
@@ -1,8 +1,10 @@
-From 753dd70283c772ddcaf20c6f0ccb0ce5de5a5228 Mon Sep 17 00:00:00 2001
+From 95eb85e2f49bfd05feff56ff9ab18bfbbe48ff49 Mon Sep 17 00:00:00 2001
 From: Raslan Darawsheh <rasland@mellanox.com>
 Date: Wed, 22 Jul 2020 12:07:55 +0300
 Subject: [PATCH] net/mlx5: fix VF MAC address set over BlueField
 
+[ upstream commit 753dd70283c772ddcaf20c6f0ccb0ce5de5a5228 ]
+
 When trying to set MAC address of an ethernet device and if it was
 a representor, PMD sets the MAC over the corresponding VF instead.
 
@@ -12,7 +14,6 @@
 This will fix the issue by setting the MAC on the dev directly.
 
 Fixes: 0d1d73170820 ("net/mlx5: set VF MAC address from host")
-Cc: stable@dpdk.org
 
 Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -21,10 +22,10 @@
  1 file changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_mac.c b/drivers/net/mlx5/mlx5_mac.c
-index 2d808d629..88c52b29f 100644
+index 7bdaa2a39..94f102d8a 100644
 --- a/drivers/net/mlx5/mlx5_mac.c
 +++ b/drivers/net/mlx5/mlx5_mac.c
-@@ -157,8 +157,11 @@ mlx5_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
+@@ -200,8 +200,11 @@ mlx5_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
  	uint16_t port_id;
  	struct mlx5_priv *priv = dev->data->dev_private;
  

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

* [dpdk-stable] patch 'net/i40e: fix binding interrupt without MSI-X vector' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (16 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx5: fix VF MAC address set over BlueField' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/i40e: fix flow director MSI-X resource allocation' " luca.boccassi
                     ` (23 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Mao Jiang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 7e08e79f888c5075c8adbc13c509f362676236c2 Mon Sep 17 00:00:00 2001
From: Mao Jiang <maox.jiang@intel.com>
Date: Thu, 23 Jul 2020 23:27:10 +0800
Subject: [PATCH] net/i40e: fix binding interrupt without MSI-X vector

[ upstream commit 6f1998a4f0411ea3b2bed7c05faa81243917a76e ]

The value of vsi->nb_msix shouldn't`t be zero, otherwise, all of
interrupts will be bind to vector 0.

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

Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 25 +++++++++++++++++++------
 drivers/net/i40e/i40e_ethdev.h |  2 +-
 2 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index c23581123..39c8b847c 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2005,7 +2005,7 @@ __vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t msix_vect,
 	I40E_WRITE_FLUSH(hw);
 }
 
-void
+int
 i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
 {
 	struct rte_eth_dev *dev = vsi->adapter->eth_dev;
@@ -2025,10 +2025,14 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
 
 	/* VF bind interrupt */
 	if (vsi->type == I40E_VSI_SRIOV) {
+		if (vsi->nb_msix == 0) {
+			PMD_DRV_LOG(ERR, "No msix resource");
+			return -EINVAL;
+		}
 		__vsi_queues_bind_intr(vsi, msix_vect,
 				       vsi->base_queue, vsi->nb_qps,
 				       itr_idx);
-		return;
+		return 0;
 	}
 
 	/* PF & VMDq bind interrupt */
@@ -2045,7 +2049,10 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
 	}
 
 	for (i = 0; i < vsi->nb_used_qps; i++) {
-		if (nb_msix <= 1) {
+		if (vsi->nb_msix == 0) {
+			PMD_DRV_LOG(ERR, "No msix resource");
+			return -EINVAL;
+		} else if (nb_msix <= 1) {
 			if (!rte_intr_allow_others(intr_handle))
 				/* allow to share MISC_VEC_ID */
 				msix_vect = I40E_MISC_VEC_ID;
@@ -2070,6 +2077,8 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
 		msix_vect++;
 		nb_msix--;
 	}
+
+	return 0;
 }
 
 void
@@ -2310,14 +2319,18 @@ i40e_dev_start(struct rte_eth_dev *dev)
 	/* Map queues with MSIX interrupt */
 	main_vsi->nb_used_qps = dev->data->nb_rx_queues -
 		pf->nb_cfg_vmdq_vsi * RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM;
-	i40e_vsi_queues_bind_intr(main_vsi, I40E_ITR_INDEX_DEFAULT);
+	ret = i40e_vsi_queues_bind_intr(main_vsi, I40E_ITR_INDEX_DEFAULT);
+	if (ret < 0)
+		return ret;
 	i40e_vsi_enable_queues_intr(main_vsi);
 
 	/* Map VMDQ VSI queues with MSIX interrupt */
 	for (i = 0; i < pf->nb_cfg_vmdq_vsi; i++) {
 		pf->vmdq[i].vsi->nb_used_qps = RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM;
-		i40e_vsi_queues_bind_intr(pf->vmdq[i].vsi,
-					  I40E_ITR_INDEX_DEFAULT);
+		ret = i40e_vsi_queues_bind_intr(pf->vmdq[i].vsi,
+						I40E_ITR_INDEX_DEFAULT);
+		if (ret < 0)
+			return ret;
 		i40e_vsi_enable_queues_intr(pf->vmdq[i].vsi);
 	}
 
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index 1e01b312d..e9621d67a 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -1170,7 +1170,7 @@ void i40e_update_vsi_stats(struct i40e_vsi *vsi);
 void i40e_pf_disable_irq0(struct i40e_hw *hw);
 void i40e_pf_enable_irq0(struct i40e_hw *hw);
 int i40e_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete);
-void i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx);
+int i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx);
 void i40e_vsi_queues_unbind_intr(struct i40e_vsi *vsi);
 void i40e_vsi_disable_queues_intr(struct i40e_vsi *vsi);
 int i40e_vsi_vlan_pvid_set(struct i40e_vsi *vsi,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.535354038 +0100
+++ 0019-net-i40e-fix-binding-interrupt-without-MSI-X-vector.patch	2020-08-06 10:53:15.780597005 +0100
@@ -1,13 +1,14 @@
-From 6f1998a4f0411ea3b2bed7c05faa81243917a76e Mon Sep 17 00:00:00 2001
+From 7e08e79f888c5075c8adbc13c509f362676236c2 Mon Sep 17 00:00:00 2001
 From: Mao Jiang <maox.jiang@intel.com>
 Date: Thu, 23 Jul 2020 23:27:10 +0800
 Subject: [PATCH] net/i40e: fix binding interrupt without MSI-X vector
 
+[ upstream commit 6f1998a4f0411ea3b2bed7c05faa81243917a76e ]
+
 The value of vsi->nb_msix shouldn't`t be zero, otherwise, all of
 interrupts will be bind to vector 0.
 
 Fixes: 4861cde46116 ("i40e: new poll mode driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Mao Jiang <maox.jiang@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -17,10 +18,10 @@
  2 files changed, 20 insertions(+), 7 deletions(-)
 
 diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
-index 05d5f2861..0c32e451c 100644
+index c23581123..39c8b847c 100644
 --- a/drivers/net/i40e/i40e_ethdev.c
 +++ b/drivers/net/i40e/i40e_ethdev.c
-@@ -2117,7 +2117,7 @@ __vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t msix_vect,
+@@ -2005,7 +2005,7 @@ __vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t msix_vect,
  	I40E_WRITE_FLUSH(hw);
  }
  
@@ -29,7 +30,7 @@
  i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
  {
  	struct rte_eth_dev *dev = vsi->adapter->eth_dev;
-@@ -2137,10 +2137,14 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
+@@ -2025,10 +2025,14 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
  
  	/* VF bind interrupt */
  	if (vsi->type == I40E_VSI_SRIOV) {
@@ -45,7 +46,7 @@
  	}
  
  	/* PF & VMDq bind interrupt */
-@@ -2157,7 +2161,10 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
+@@ -2045,7 +2049,10 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
  	}
  
  	for (i = 0; i < vsi->nb_used_qps; i++) {
@@ -57,7 +58,7 @@
  			if (!rte_intr_allow_others(intr_handle))
  				/* allow to share MISC_VEC_ID */
  				msix_vect = I40E_MISC_VEC_ID;
-@@ -2182,6 +2189,8 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
+@@ -2070,6 +2077,8 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx)
  		msix_vect++;
  		nb_msix--;
  	}
@@ -66,7 +67,7 @@
  }
  
  void
-@@ -2422,14 +2431,18 @@ i40e_dev_start(struct rte_eth_dev *dev)
+@@ -2310,14 +2319,18 @@ i40e_dev_start(struct rte_eth_dev *dev)
  	/* Map queues with MSIX interrupt */
  	main_vsi->nb_used_qps = dev->data->nb_rx_queues -
  		pf->nb_cfg_vmdq_vsi * RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM;
@@ -89,10 +90,10 @@
  	}
  
 diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
-index aef88abed..19f821829 100644
+index 1e01b312d..e9621d67a 100644
 --- a/drivers/net/i40e/i40e_ethdev.h
 +++ b/drivers/net/i40e/i40e_ethdev.h
-@@ -1319,7 +1319,7 @@ void i40e_update_vsi_stats(struct i40e_vsi *vsi);
+@@ -1170,7 +1170,7 @@ void i40e_update_vsi_stats(struct i40e_vsi *vsi);
  void i40e_pf_disable_irq0(struct i40e_hw *hw);
  void i40e_pf_enable_irq0(struct i40e_hw *hw);
  int i40e_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete);

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

* [dpdk-stable] patch 'net/i40e: fix flow director MSI-X resource allocation' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (17 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/i40e: fix binding interrupt without MSI-X vector' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/qede: remove dead code' " luca.boccassi
                     ` (22 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Mao Jiang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 8d03e02240191a8fe2330c561a2106d096b20598 Mon Sep 17 00:00:00 2001
From: Mao Jiang <maox.jiang@intel.com>
Date: Fri, 24 Jul 2020 00:11:52 +0800
Subject: [PATCH] net/i40e: fix flow director MSI-X resource allocation

[ upstream commit 8ed3b9e6e4991932ddf0a10dee4ef8ac8f46f741 ]

FDIR allocating msix resource is not strictly necessary, if no
resource left, jump the error.

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

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

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 39c8b847c..5081cab4f 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -5722,10 +5722,14 @@ i40e_vsi_setup(struct i40e_pf *pf,
 		ret = i40e_res_pool_alloc(&pf->msix_pool, 1);
 		if (ret < 0) {
 			PMD_DRV_LOG(ERR, "VSI %d get heap failed %d", vsi->seid, ret);
-			goto fail_queue_alloc;
+			if (type != I40E_VSI_FDIR)
+				goto fail_queue_alloc;
+			vsi->msix_intr = 0;
+			vsi->nb_msix = 0;
+		} else {
+			vsi->msix_intr = ret;
+			vsi->nb_msix = 1;
 		}
-		vsi->msix_intr = ret;
-		vsi->nb_msix = 1;
 	} else {
 		vsi->msix_intr = 0;
 		vsi->nb_msix = 0;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.578789098 +0100
+++ 0020-net-i40e-fix-flow-director-MSI-X-resource-allocation.patch	2020-08-06 10:53:15.788597164 +0100
@@ -1,13 +1,14 @@
-From 8ed3b9e6e4991932ddf0a10dee4ef8ac8f46f741 Mon Sep 17 00:00:00 2001
+From 8d03e02240191a8fe2330c561a2106d096b20598 Mon Sep 17 00:00:00 2001
 From: Mao Jiang <maox.jiang@intel.com>
 Date: Fri, 24 Jul 2020 00:11:52 +0800
 Subject: [PATCH] net/i40e: fix flow director MSI-X resource allocation
 
+[ upstream commit 8ed3b9e6e4991932ddf0a10dee4ef8ac8f46f741 ]
+
 FDIR allocating msix resource is not strictly necessary, if no
 resource left, jump the error.
 
 Fixes: 4861cde46116 ("i40e: new poll mode driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Mao Jiang <maox.jiang@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -16,10 +17,10 @@
  1 file changed, 7 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
-index 0c32e451c..f9a8e7132 100644
+index 39c8b847c..5081cab4f 100644
 --- a/drivers/net/i40e/i40e_ethdev.c
 +++ b/drivers/net/i40e/i40e_ethdev.c
-@@ -5839,10 +5839,14 @@ i40e_vsi_setup(struct i40e_pf *pf,
+@@ -5722,10 +5722,14 @@ i40e_vsi_setup(struct i40e_pf *pf,
  		ret = i40e_res_pool_alloc(&pf->msix_pool, 1);
  		if (ret < 0) {
  			PMD_DRV_LOG(ERR, "VSI %d get heap failed %d", vsi->seid, ret);

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

* [dpdk-stable] patch 'net/qede: remove dead code' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (18 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/i40e: fix flow director MSI-X resource allocation' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx5: fix metadata storing for NEON Rx' " luca.boccassi
                     ` (21 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Rasesh Mody, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 491fd352e1351f40b7255e916b0ecac9d148105b Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Fri, 17 Jul 2020 19:16:23 +0800
Subject: [PATCH] net/qede: remove dead code

[ upstream commit d123f83c43085d03e0c2e37f8174577189711fdb ]

This patch removes logically dead code reported by coverity.

Coverity issue: 261777, 261778
Fixes: dd28bc8c6ef4 ("net/qede: fix VF port creation sequence")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
---
 drivers/net/qede/qede_rxtx.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index 3c55c0efd..ab69cba17 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -647,8 +647,6 @@ int qede_alloc_fp_resc(struct qede_dev *qdev)
 
 	for (sb_idx = 0; sb_idx < QEDE_RXTX_MAX(qdev); sb_idx++) {
 		fp = &qdev->fp_array[sb_idx];
-		if (!fp)
-			continue;
 		fp->sb_info = rte_calloc("sb", 1, sizeof(struct ecore_sb_info),
 				RTE_CACHE_LINE_SIZE);
 		if (!fp->sb_info) {
@@ -678,8 +676,6 @@ void qede_dealloc_fp_resc(struct rte_eth_dev *eth_dev)
 
 	for (sb_idx = 0; sb_idx < QEDE_RXTX_MAX(qdev); sb_idx++) {
 		fp = &qdev->fp_array[sb_idx];
-		if (!fp)
-			continue;
 		DP_INFO(edev, "Free sb_info index 0x%x\n",
 				fp->sb_info->igu_sb_id);
 		if (fp->sb_info) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.630642463 +0100
+++ 0021-net-qede-remove-dead-code.patch	2020-08-06 10:53:15.792597243 +0100
@@ -1,13 +1,14 @@
-From d123f83c43085d03e0c2e37f8174577189711fdb Mon Sep 17 00:00:00 2001
+From 491fd352e1351f40b7255e916b0ecac9d148105b Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Fri, 17 Jul 2020 19:16:23 +0800
 Subject: [PATCH] net/qede: remove dead code
 
+[ upstream commit d123f83c43085d03e0c2e37f8174577189711fdb ]
+
 This patch removes logically dead code reported by coverity.
 
 Coverity issue: 261777, 261778
 Fixes: dd28bc8c6ef4 ("net/qede: fix VF port creation sequence")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Acked-by: Rasesh Mody <rmody@marvell.com>
@@ -16,7 +17,7 @@
  1 file changed, 4 deletions(-)
 
 diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
-index 9878ba50e..ea264f59d 100644
+index 3c55c0efd..ab69cba17 100644
 --- a/drivers/net/qede/qede_rxtx.c
 +++ b/drivers/net/qede/qede_rxtx.c
 @@ -647,8 +647,6 @@ int qede_alloc_fp_resc(struct qede_dev *qdev)

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

* [dpdk-stable] patch 'net/mlx5: fix metadata storing for NEON Rx' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (19 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/qede: remove dead code' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/af_xdp: remove mempool freeing on umem destruction' " luca.boccassi
                     ` (20 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 0fb94e1cf48787f268615e519fa2640183bc4d29 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Thu, 23 Jul 2020 10:53:32 +0000
Subject: [PATCH] net/mlx5: fix metadata storing for NEON Rx

[ upstream commit 4ffab7b9e199d6253e0b7fdcf4bef137930d0914 ]

There was the typo introducing the bug, affected the mlx5 vectorized
rx_burst on ARM architectures in case if CQE compression was enabled.

Fixes: 6c55b622a956 ("net/mlx5: set dynamic flow metadata in Rx queues")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
index b2cf857fd..607659a62 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
@@ -710,20 +710,20 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
 					container_of(p3, struct mlx5_cqe,
 						     pkt_info)->timestamp);
 		}
-		if (!!rxq->flow_meta_mask) {
+		if (rxq->dynf_meta) {
 			/* This code is subject for futher optimization. */
 			int32_t offs = rxq->flow_meta_offset;
 
 			*RTE_MBUF_DYNFIELD(pkts[pos], offs, uint32_t *) =
 				container_of(p0, struct mlx5_cqe,
 					     pkt_info)->flow_table_metadata;
-			*RTE_MBUF_DYNFIELD(pkts[pos], offs, uint32_t *) =
+			*RTE_MBUF_DYNFIELD(pkts[pos + 1], offs, uint32_t *) =
 				container_of(p1, struct mlx5_cqe,
 					     pkt_info)->flow_table_metadata;
-			*RTE_MBUF_DYNFIELD(pkts[pos], offs, uint32_t *) =
+			*RTE_MBUF_DYNFIELD(pkts[pos + 2], offs, uint32_t *) =
 				container_of(p2, struct mlx5_cqe,
 					     pkt_info)->flow_table_metadata;
-			*RTE_MBUF_DYNFIELD(pkts[pos], offs, uint32_t *) =
+			*RTE_MBUF_DYNFIELD(pkts[pos + 3], offs, uint32_t *) =
 				container_of(p3, struct mlx5_cqe,
 					     pkt_info)->flow_table_metadata;
 			if (*RTE_MBUF_DYNFIELD(pkts[pos], offs, uint32_t *))
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.668130493 +0100
+++ 0022-net-mlx5-fix-metadata-storing-for-NEON-Rx.patch	2020-08-06 10:53:15.792597243 +0100
@@ -1,13 +1,14 @@
-From 4ffab7b9e199d6253e0b7fdcf4bef137930d0914 Mon Sep 17 00:00:00 2001
+From 0fb94e1cf48787f268615e519fa2640183bc4d29 Mon Sep 17 00:00:00 2001
 From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
 Date: Thu, 23 Jul 2020 10:53:32 +0000
 Subject: [PATCH] net/mlx5: fix metadata storing for NEON Rx
 
+[ upstream commit 4ffab7b9e199d6253e0b7fdcf4bef137930d0914 ]
+
 There was the typo introducing the bug, affected the mlx5 vectorized
 rx_burst on ARM architectures in case if CQE compression was enabled.
 
 Fixes: 6c55b622a956 ("net/mlx5: set dynamic flow metadata in Rx queues")
-Cc: stable@dpdk.org
 
 Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
 ---
@@ -15,12 +16,12 @@
  1 file changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
-index 6c3149523..af924b709 100644
+index b2cf857fd..607659a62 100644
 --- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
 +++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
-@@ -736,20 +736,20 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
- 						      pkt_info)->timestamp);
- 			}
+@@ -710,20 +710,20 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
+ 					container_of(p3, struct mlx5_cqe,
+ 						     pkt_info)->timestamp);
  		}
 -		if (!!rxq->flow_meta_mask) {
 +		if (rxq->dynf_meta) {

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

* [dpdk-stable] patch 'net/af_xdp: remove mempool freeing on umem destruction' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (20 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx5: fix metadata storing for NEON Rx' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/i40e: enable QinQ stripping' " luca.boccassi
                     ` (19 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Ciara Loftus; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 6bac1007f5e8fdaa3e53eea7c894ba9ea847bcac Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Fri, 24 Jul 2020 13:20:32 +0000
Subject: [PATCH] net/af_xdp: remove mempool freeing on umem destruction

[ upstream commit a5a42cb46d38d22c16249e00173458847911e9b0 ]

Other PMDs may be using the mempool, so don't free it when destroying the
UMEM.

Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index d75281c10..f5fca63eb 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -685,7 +685,6 @@ static void
 xdp_umem_destroy(struct xsk_umem_info *umem)
 {
 #if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG)
-	rte_mempool_free(umem->mb_pool);
 	umem->mb_pool = NULL;
 #else
 	rte_memzone_free(umem->mz);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.703063589 +0100
+++ 0023-net-af_xdp-remove-mempool-freeing-on-umem-destructio.patch	2020-08-06 10:53:15.796597323 +0100
@@ -1,13 +1,14 @@
-From a5a42cb46d38d22c16249e00173458847911e9b0 Mon Sep 17 00:00:00 2001
+From 6bac1007f5e8fdaa3e53eea7c894ba9ea847bcac Mon Sep 17 00:00:00 2001
 From: Ciara Loftus <ciara.loftus@intel.com>
 Date: Fri, 24 Jul 2020 13:20:32 +0000
 Subject: [PATCH] net/af_xdp: remove mempool freeing on umem destruction
 
+[ upstream commit a5a42cb46d38d22c16249e00173458847911e9b0 ]
+
 Other PMDs may be using the mempool, so don't free it when destroying the
 UMEM.
 
 Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
 ---
@@ -15,10 +16,10 @@
  1 file changed, 1 deletion(-)
 
 diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
-index d62144fa8..936d4a7d5 100644
+index d75281c10..f5fca63eb 100644
 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c
 +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
-@@ -688,7 +688,6 @@ static void
+@@ -685,7 +685,6 @@ static void
  xdp_umem_destroy(struct xsk_umem_info *umem)
  {
  #if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG)

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

* [dpdk-stable] patch 'net/i40e: enable QinQ stripping' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (21 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/af_xdp: remove mempool freeing on umem destruction' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/ice/base: fix RSS interference' " luca.boccassi
                     ` (18 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 628f34b05e58aa1a9e1fe24e4fac5a7f470d2ed7 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Fri, 24 Jul 2020 15:01:37 +0800
Subject: [PATCH] net/i40e: enable QinQ stripping

[ upstream commit c52ff36686a408fd5196452380e359120c2d1ed5 ]

This patch enable i40e outer vlan strip on and off in QinQ
mode with mask bit of DEV_RX_OFFLOAD_QINQ_STRIP, users can
use "vlan set qinq_strip on 0" to enable or "vlan set
qinq_strip off 0" to disable i40e outer vlan strip when
try with testpmd app.

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

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 45 +++++++++++++++++++++++++++++++++-
 1 file changed, 44 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 5081cab4f..144758ef8 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -47,6 +47,8 @@
 #define ETH_I40E_VF_MSG_CFG		"vf_msg_cfg"
 
 #define I40E_CLEAR_PXE_WAIT_MS     200
+#define I40E_VSI_TSR_QINQ_STRIP		0x4010
+#define I40E_VSI_TSR(_i)	(0x00050800 + ((_i) * 4))
 
 /* Maximun number of capability elements */
 #define I40E_MAX_CAP_ELE_NUM       128
@@ -3864,6 +3866,39 @@ i40e_vlan_tpid_set(struct rte_eth_dev *dev,
 	return ret;
 }
 
+/* Configure outer vlan stripping on or off in QinQ mode */
+static int
+i40e_vsi_config_outer_vlan_stripping(struct i40e_vsi *vsi, bool on)
+{
+	struct i40e_hw *hw = I40E_VSI_TO_HW(vsi);
+	int ret = I40E_SUCCESS;
+	uint32_t reg;
+
+	if (vsi->vsi_id >= I40E_MAX_NUM_VSIS) {
+		PMD_DRV_LOG(ERR, "VSI ID exceeds the maximum");
+		return -EINVAL;
+	}
+
+	/* Configure for outer VLAN RX stripping */
+	reg = I40E_READ_REG(hw, I40E_VSI_TSR(vsi->vsi_id));
+
+	if (on)
+		reg |= I40E_VSI_TSR_QINQ_STRIP;
+	else
+		reg &= ~I40E_VSI_TSR_QINQ_STRIP;
+
+	ret = i40e_aq_debug_write_register(hw,
+						   I40E_VSI_TSR(vsi->vsi_id),
+						   reg, NULL);
+	if (ret < 0) {
+		PMD_DRV_LOG(ERR, "Failed to update VSI_TSR[%d]",
+				    vsi->vsi_id);
+		return I40E_ERR_CONFIG;
+	}
+
+	return ret;
+}
+
 static int
 i40e_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 {
@@ -3900,6 +3935,14 @@ i40e_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 			i40e_vsi_config_double_vlan(vsi, FALSE);
 	}
 
+	if (mask & ETH_QINQ_STRIP_MASK) {
+		/* Enable or disable outer VLAN stripping */
+		if (rxmode->offloads & DEV_RX_OFFLOAD_QINQ_STRIP)
+			i40e_vsi_config_outer_vlan_stripping(vsi, TRUE);
+		else
+			i40e_vsi_config_outer_vlan_stripping(vsi, FALSE);
+	}
+
 	return 0;
 }
 
@@ -6078,6 +6121,7 @@ i40e_dev_init_vlan(struct rte_eth_dev *dev)
 
 	/* Apply vlan offload setting */
 	mask = ETH_VLAN_STRIP_MASK |
+	       ETH_QINQ_STRIP_MASK |
 	       ETH_VLAN_FILTER_MASK |
 	       ETH_VLAN_EXTEND_MASK;
 	ret = i40e_vlan_offload_set(dev, mask);
@@ -10479,7 +10523,6 @@ i40e_configure_registers(struct i40e_hw *hw)
 	}
 }
 
-#define I40E_VSI_TSR(_i)            (0x00050800 + ((_i) * 4))
 #define I40E_VSI_TSR_QINQ_CONFIG    0xc030
 #define I40E_VSI_L2TAGSTXVALID(_i)  (0x00042800 + ((_i) * 4))
 #define I40E_VSI_L2TAGSTXVALID_QINQ 0xab
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.739049155 +0100
+++ 0024-net-i40e-enable-QinQ-stripping.patch	2020-08-06 10:53:15.808597560 +0100
@@ -1,8 +1,10 @@
-From c52ff36686a408fd5196452380e359120c2d1ed5 Mon Sep 17 00:00:00 2001
+From 628f34b05e58aa1a9e1fe24e4fac5a7f470d2ed7 Mon Sep 17 00:00:00 2001
 From: Wei Zhao <wei.zhao1@intel.com>
 Date: Fri, 24 Jul 2020 15:01:37 +0800
 Subject: [PATCH] net/i40e: enable QinQ stripping
 
+[ upstream commit c52ff36686a408fd5196452380e359120c2d1ed5 ]
+
 This patch enable i40e outer vlan strip on and off in QinQ
 mode with mask bit of DEV_RX_OFFLOAD_QINQ_STRIP, users can
 use "vlan set qinq_strip on 0" to enable or "vlan set
@@ -10,7 +12,6 @@
 try with testpmd app.
 
 Fixes: 4861cde46116 ("i40e: new poll mode driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
 Reviewed-by: Qiming Yang <qiming.yang@intel.com>
@@ -19,10 +20,10 @@
  1 file changed, 44 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
-index 6bcce3386..88f4fe353 100644
+index 5081cab4f..144758ef8 100644
 --- a/drivers/net/i40e/i40e_ethdev.c
 +++ b/drivers/net/i40e/i40e_ethdev.c
-@@ -48,6 +48,8 @@
+@@ -47,6 +47,8 @@
  #define ETH_I40E_VF_MSG_CFG		"vf_msg_cfg"
  
  #define I40E_CLEAR_PXE_WAIT_MS     200
@@ -31,7 +32,7 @@
  
  /* Maximun number of capability elements */
  #define I40E_MAX_CAP_ELE_NUM       128
-@@ -3979,6 +3981,39 @@ i40e_vlan_tpid_set(struct rte_eth_dev *dev,
+@@ -3864,6 +3866,39 @@ i40e_vlan_tpid_set(struct rte_eth_dev *dev,
  	return ret;
  }
  
@@ -71,7 +72,7 @@
  static int
  i40e_vlan_offload_set(struct rte_eth_dev *dev, int mask)
  {
-@@ -4015,6 +4050,14 @@ i40e_vlan_offload_set(struct rte_eth_dev *dev, int mask)
+@@ -3900,6 +3935,14 @@ i40e_vlan_offload_set(struct rte_eth_dev *dev, int mask)
  			i40e_vsi_config_double_vlan(vsi, FALSE);
  	}
  
@@ -86,7 +87,7 @@
  	return 0;
  }
  
-@@ -6193,6 +6236,7 @@ i40e_dev_init_vlan(struct rte_eth_dev *dev)
+@@ -6078,6 +6121,7 @@ i40e_dev_init_vlan(struct rte_eth_dev *dev)
  
  	/* Apply vlan offload setting */
  	mask = ETH_VLAN_STRIP_MASK |
@@ -94,7 +95,7 @@
  	       ETH_VLAN_FILTER_MASK |
  	       ETH_VLAN_EXTEND_MASK;
  	ret = i40e_vlan_offload_set(dev, mask);
-@@ -10874,7 +10918,6 @@ i40e_configure_registers(struct i40e_hw *hw)
+@@ -10479,7 +10523,6 @@ i40e_configure_registers(struct i40e_hw *hw)
  	}
  }
  

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

* [dpdk-stable] patch 'net/ice/base: fix RSS interference' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (22 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/i40e: enable QinQ stripping' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/hinic: optimize Rx performance for x86' " luca.boccassi
                     ` (17 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Nannan Lu, Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 3e9a631e2fbb65ff274e26e3c50acd4fad49003b Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Sat, 25 Jul 2020 20:14:24 +0800
Subject: [PATCH] net/ice/base: fix RSS interference

[ upstream commit 58f58cfe709cf167f9684e814cdbc8ab7535a798 ]

A new symmetric RSS rule may force another asymmetric rule to be
symmetric, vice versa. The reason is due to the flow engine will
try to reuse the existing profile if the input set matches with the
new rule. The fix is to disable this optimization for RSS since we
are not at the situation as profile shortage.

Fixes: ddae0440353f ("net/ice/base: enable symmetric hash for RSS")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Nannan Lu <nannan.lu@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/ice/base/ice_flex_pipe.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
index 47adfd07a..bf5a25d15 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -2683,6 +2683,12 @@ ice_find_prof_id_with_mask(struct ice_hw *hw, enum ice_block blk,
 	struct ice_es *es = &hw->blk[blk].es;
 	u16 i;
 
+	/* For FD and RSS, we don't want to re-use an existed profile with the
+	 * same field vector and mask. This will cause rule interference.
+	 */
+	if (blk == ICE_BLK_FD || blk == ICE_BLK_RSS)
+		return ICE_ERR_DOES_NOT_EXIST;
+
 	for (i = 0; i < es->count; i++) {
 		u16 off = i * es->fvw;
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.787685188 +0100
+++ 0025-net-ice-base-fix-RSS-interference.patch	2020-08-06 10:53:15.812597639 +0100
@@ -1,8 +1,10 @@
-From 58f58cfe709cf167f9684e814cdbc8ab7535a798 Mon Sep 17 00:00:00 2001
+From 3e9a631e2fbb65ff274e26e3c50acd4fad49003b Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang@intel.com>
 Date: Sat, 25 Jul 2020 20:14:24 +0800
 Subject: [PATCH] net/ice/base: fix RSS interference
 
+[ upstream commit 58f58cfe709cf167f9684e814cdbc8ab7535a798 ]
+
 A new symmetric RSS rule may force another asymmetric rule to be
 symmetric, vice versa. The reason is due to the flow engine will
 try to reuse the existing profile if the input set matches with the
@@ -10,33 +12,31 @@
 are not at the situation as profile shortage.
 
 Fixes: ddae0440353f ("net/ice/base: enable symmetric hash for RSS")
-Cc: stable@dpdk.org
 
 Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
 Tested-by: Nannan Lu <nannan.lu@intel.com>
 Acked-by: Jeff Guo <jia.guo@intel.com>
 ---
- drivers/net/ice/base/ice_flex_pipe.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
+ drivers/net/ice/base/ice_flex_pipe.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
 
 diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
-index 284569464..999ad6be3 100644
+index 47adfd07a..bf5a25d15 100644
 --- a/drivers/net/ice/base/ice_flex_pipe.c
 +++ b/drivers/net/ice/base/ice_flex_pipe.c
-@@ -2808,10 +2808,10 @@ ice_find_prof_id_with_mask(struct ice_hw *hw, enum ice_block blk,
+@@ -2683,6 +2683,12 @@ ice_find_prof_id_with_mask(struct ice_hw *hw, enum ice_block blk,
  	struct ice_es *es = &hw->blk[blk].es;
- 	u8 i;
+ 	u16 i;
  
--	/* For FD, we don't want to re-use an existed profile with the same
--	 * field vector and mask. This will cause rule interference.
 +	/* For FD and RSS, we don't want to re-use an existed profile with the
 +	 * same field vector and mask. This will cause rule interference.
- 	 */
--	if (blk == ICE_BLK_FD)
++	 */
 +	if (blk == ICE_BLK_FD || blk == ICE_BLK_RSS)
- 		return ICE_ERR_DOES_NOT_EXIST;
++		return ICE_ERR_DOES_NOT_EXIST;
++
+ 	for (i = 0; i < es->count; i++) {
+ 		u16 off = i * es->fvw;
  
- 	for (i = 0; i < (u8)es->count; i++) {
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/hinic: optimize Rx performance for x86' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (23 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/ice/base: fix RSS interference' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/hinic/base: avoid system time jump' " luca.boccassi
                     ` (16 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Xiaoyun Wang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 989c8ed8803aee11de856ad8c5a27e5ea164e6df Mon Sep 17 00:00:00 2001
From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Date: Sat, 25 Jul 2020 16:15:34 +0800
Subject: [PATCH] net/hinic: optimize Rx performance for x86

[ upstream commit fae4b8c47c25286e5d87cde55ff16d1bed298e15 ]

For x86 platform, the rq cqe without cache aligned, which can
improve performance for some gateway scenarios.

Fixes: 361a9ccf81d6 ("net/hinic: optimize Rx performance")

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
---
 drivers/net/hinic/hinic_pmd_rx.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/hinic/hinic_pmd_rx.h b/drivers/net/hinic/hinic_pmd_rx.h
index 49fa56517..8a45f2d9f 100644
--- a/drivers/net/hinic/hinic_pmd_rx.h
+++ b/drivers/net/hinic/hinic_pmd_rx.h
@@ -35,7 +35,11 @@ struct hinic_rq_cqe {
 	u32 rss_hash;
 
 	u32 rsvd[4];
+#if defined(RTE_ARCH_ARM64)
 } __rte_cache_aligned;
+#else
+};
+#endif
 
 struct hinic_rq_cqe_sect {
 	struct hinic_sge	sge;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.823253686 +0100
+++ 0026-net-hinic-optimize-Rx-performance-for-x86.patch	2020-08-06 10:53:15.812597639 +0100
@@ -1,13 +1,14 @@
-From fae4b8c47c25286e5d87cde55ff16d1bed298e15 Mon Sep 17 00:00:00 2001
+From 989c8ed8803aee11de856ad8c5a27e5ea164e6df Mon Sep 17 00:00:00 2001
 From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 Date: Sat, 25 Jul 2020 16:15:34 +0800
 Subject: [PATCH] net/hinic: optimize Rx performance for x86
 
+[ upstream commit fae4b8c47c25286e5d87cde55ff16d1bed298e15 ]
+
 For x86 platform, the rq cqe without cache aligned, which can
 improve performance for some gateway scenarios.
 
 Fixes: 361a9ccf81d6 ("net/hinic: optimize Rx performance")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 ---

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

* [dpdk-stable] patch 'net/hinic/base: avoid system time jump' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (24 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/hinic: optimize Rx performance for x86' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/hinic: check memory allocations in flow creation' " luca.boccassi
                     ` (15 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Xiaoyun Wang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From cb5b7fbeeac69d0feb2381db02d7bb1f09972e6b Mon Sep 17 00:00:00 2001
From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Date: Sat, 25 Jul 2020 16:15:36 +0800
Subject: [PATCH] net/hinic/base: avoid system time jump

[ upstream commit efeed0894e9c1aaa6f804a6d130677379ca99378 ]

Replace gettimeofday() with clock_gettime(CLOCK_MONOTONIC_RAW, &now),
the reason is same with
commit d08d304508a8 ("eal/linux: make alarm not affected by system time
jump")

Fixes: 81d53291a466 ("net/hinic/base: add various headers")

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
---
 drivers/net/hinic/base/hinic_compat.h | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h
index 7bec03b9c..341aa056b 100644
--- a/drivers/net/hinic/base/hinic_compat.h
+++ b/drivers/net/hinic/base/hinic_compat.h
@@ -198,16 +198,17 @@ static inline u32 readl(const volatile void *addr)
 #define spin_lock(spinlock_prt)		rte_spinlock_lock(spinlock_prt)
 #define spin_unlock(spinlock_prt)	rte_spinlock_unlock(spinlock_prt)
 
-static inline unsigned long get_timeofday_ms(void)
+static inline unsigned long clock_gettime_ms(void)
 {
-	struct timeval tv;
+	struct timespec tv;
 
-	(void)gettimeofday(&tv, NULL);
+	(void)clock_gettime(CLOCK_MONOTONIC, &tv);
 
-	return (unsigned long)tv.tv_sec * 1000 + tv.tv_usec / 1000;
+	return (unsigned long)tv.tv_sec * 1000 +
+	       (unsigned long)tv.tv_nsec / 1000000;
 }
 
-#define jiffies	get_timeofday_ms()
+#define jiffies	clock_gettime_ms()
 #define msecs_to_jiffies(ms)	(ms)
 #define time_before(now, end)	((now) < (end))
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.860003229 +0100
+++ 0027-net-hinic-base-avoid-system-time-jump.patch	2020-08-06 10:53:15.812597639 +0100
@@ -1,15 +1,16 @@
-From efeed0894e9c1aaa6f804a6d130677379ca99378 Mon Sep 17 00:00:00 2001
+From cb5b7fbeeac69d0feb2381db02d7bb1f09972e6b Mon Sep 17 00:00:00 2001
 From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 Date: Sat, 25 Jul 2020 16:15:36 +0800
 Subject: [PATCH] net/hinic/base: avoid system time jump
 
+[ upstream commit efeed0894e9c1aaa6f804a6d130677379ca99378 ]
+
 Replace gettimeofday() with clock_gettime(CLOCK_MONOTONIC_RAW, &now),
 the reason is same with
 commit d08d304508a8 ("eal/linux: make alarm not affected by system time
 jump")
 
 Fixes: 81d53291a466 ("net/hinic/base: add various headers")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 ---
@@ -17,10 +18,10 @@
  1 file changed, 6 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h
-index 2d21b7b67..7036b031c 100644
+index 7bec03b9c..341aa056b 100644
 --- a/drivers/net/hinic/base/hinic_compat.h
 +++ b/drivers/net/hinic/base/hinic_compat.h
-@@ -166,16 +166,17 @@ static inline u32 readl(const volatile void *addr)
+@@ -198,16 +198,17 @@ static inline u32 readl(const volatile void *addr)
  #define spin_lock(spinlock_prt)		rte_spinlock_lock(spinlock_prt)
  #define spin_unlock(spinlock_prt)	rte_spinlock_unlock(spinlock_prt)
  

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

* [dpdk-stable] patch 'net/hinic: check memory allocations in flow creation' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (25 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/hinic/base: avoid system time jump' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/virtio-user: fix status management' " luca.boccassi
                     ` (14 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 2c6c6d45a3d7926db96f7d19a086375ee9653ccc Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 28 Jul 2020 20:34:46 +0800
Subject: [PATCH] net/hinic: check memory allocations in flow creation

[ upstream commit d7964ce192e79507d3b32b4a02e6293a40eb4708 ]

The function rte_zmalloc() could return NULL, the return
value need to be checked.

Fixes: f4ca3fd54c4d ("net/hinic: create and destroy flow director filter")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/hinic/hinic_pmd_flow.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/net/hinic/hinic_pmd_flow.c b/drivers/net/hinic/hinic_pmd_flow.c
index 49c9d8768..6752a8f15 100644
--- a/drivers/net/hinic/hinic_pmd_flow.c
+++ b/drivers/net/hinic/hinic_pmd_flow.c
@@ -2112,6 +2112,10 @@ static struct rte_flow *hinic_flow_create(struct rte_eth_dev *dev,
 		if (!ret) {
 			ntuple_filter_ptr = rte_zmalloc("hinic_ntuple_filter",
 				sizeof(struct hinic_ntuple_filter_ele), 0);
+			if (ntuple_filter_ptr == NULL) {
+				PMD_DRV_LOG(ERR, "Failed to allocate ntuple_filter_ptr");
+				goto out;
+			}
 			rte_memcpy(&ntuple_filter_ptr->filter_info,
 				   &ntuple_filter,
 				   sizeof(struct rte_eth_ntuple_filter));
@@ -2138,6 +2142,10 @@ static struct rte_flow *hinic_flow_create(struct rte_eth_dev *dev,
 			ethertype_filter_ptr =
 				rte_zmalloc("hinic_ethertype_filter",
 				sizeof(struct hinic_ethertype_filter_ele), 0);
+			if (ethertype_filter_ptr == NULL) {
+				PMD_DRV_LOG(ERR, "Failed to allocate ethertype_filter_ptr");
+				goto out;
+			}
 			rte_memcpy(&ethertype_filter_ptr->filter_info,
 				&ethertype_filter,
 				sizeof(struct rte_eth_ethertype_filter));
@@ -2162,6 +2170,10 @@ static struct rte_flow *hinic_flow_create(struct rte_eth_dev *dev,
 		if (!ret) {
 			fdir_rule_ptr = rte_zmalloc("hinic_fdir_rule",
 				sizeof(struct hinic_fdir_rule_ele), 0);
+			if (fdir_rule_ptr == NULL) {
+				PMD_DRV_LOG(ERR, "Failed to allocate fdir_rule_ptr");
+				goto out;
+			}
 			rte_memcpy(&fdir_rule_ptr->filter_info, &fdir_rule,
 				sizeof(struct hinic_fdir_rule));
 			TAILQ_INSERT_TAIL(&nic_dev->filter_fdir_rule_list,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.893092228 +0100
+++ 0028-net-hinic-check-memory-allocations-in-flow-creation.patch	2020-08-06 10:53:15.812597639 +0100
@@ -1,13 +1,14 @@
-From d7964ce192e79507d3b32b4a02e6293a40eb4708 Mon Sep 17 00:00:00 2001
+From 2c6c6d45a3d7926db96f7d19a086375ee9653ccc Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Tue, 28 Jul 2020 20:34:46 +0800
 Subject: [PATCH] net/hinic: check memory allocations in flow creation
 
+[ upstream commit d7964ce192e79507d3b32b4a02e6293a40eb4708 ]
+
 The function rte_zmalloc() could return NULL, the return
 value need to be checked.
 
 Fixes: f4ca3fd54c4d ("net/hinic: create and destroy flow director filter")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -16,10 +17,10 @@
  1 file changed, 12 insertions(+)
 
 diff --git a/drivers/net/hinic/hinic_pmd_flow.c b/drivers/net/hinic/hinic_pmd_flow.c
-index a7bad570b..503a32fff 100644
+index 49c9d8768..6752a8f15 100644
 --- a/drivers/net/hinic/hinic_pmd_flow.c
 +++ b/drivers/net/hinic/hinic_pmd_flow.c
-@@ -2977,6 +2977,10 @@ static struct rte_flow *hinic_flow_create(struct rte_eth_dev *dev,
+@@ -2112,6 +2112,10 @@ static struct rte_flow *hinic_flow_create(struct rte_eth_dev *dev,
  		if (!ret) {
  			ntuple_filter_ptr = rte_zmalloc("hinic_ntuple_filter",
  				sizeof(struct hinic_ntuple_filter_ele), 0);
@@ -30,7 +31,7 @@
  			rte_memcpy(&ntuple_filter_ptr->filter_info,
  				   &ntuple_filter,
  				   sizeof(struct rte_eth_ntuple_filter));
-@@ -3003,6 +3007,10 @@ static struct rte_flow *hinic_flow_create(struct rte_eth_dev *dev,
+@@ -2138,6 +2142,10 @@ static struct rte_flow *hinic_flow_create(struct rte_eth_dev *dev,
  			ethertype_filter_ptr =
  				rte_zmalloc("hinic_ethertype_filter",
  				sizeof(struct hinic_ethertype_filter_ele), 0);
@@ -41,7 +42,7 @@
  			rte_memcpy(&ethertype_filter_ptr->filter_info,
  				&ethertype_filter,
  				sizeof(struct rte_eth_ethertype_filter));
-@@ -3036,6 +3044,10 @@ static struct rte_flow *hinic_flow_create(struct rte_eth_dev *dev,
+@@ -2162,6 +2170,10 @@ static struct rte_flow *hinic_flow_create(struct rte_eth_dev *dev,
  		if (!ret) {
  			fdir_rule_ptr = rte_zmalloc("hinic_fdir_rule",
  				sizeof(struct hinic_fdir_rule_ele), 0);

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

* [dpdk-stable] patch 'net/virtio-user: fix status management' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (26 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/hinic: check memory allocations in flow creation' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/ice: fix TCP checksum offload' " luca.boccassi
                     ` (13 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Xiao Wang; +Cc: Adrian Moreno, Chenbo Xia, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 17e196bd4b4b8296a85c5c8ab4c5d9ba5ad2658d Mon Sep 17 00:00:00 2001
From: Xiao Wang <xiao.w.wang@intel.com>
Date: Tue, 28 Jul 2020 14:52:12 +0800
Subject: [PATCH] net/virtio-user: fix status management

[ upstream commit d0131e49c7fca45f4111eedab71f6dbd73bacd61 ]

Apart from the virtio status, there should be also a network related
status for link status management, current implementation mixes up these
two statuses.

One issue caused by this mixup is when virtio-user running in server mode
and vhost as a client connects to it, a RARP packet will be generated by
virtio-user due to VIRTIO_NET_S_ANNOUNCE bit is detected in the "status"
in interrupt handler.

VIRTIO_NET_S_LINK_UP and VIRTIO_NET_S_ANNOUNCE should be managed by a
separated field. This patch adds a "net_status" field for this purpose.

Fixes: e9efa4d93821 ("net/virtio-user: add new virtual PCI driver")

Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_user/virtio_user_dev.h |  1 +
 drivers/net/virtio/virtio_user_ethdev.c          | 10 +++++-----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.h b/drivers/net/virtio/virtio_user/virtio_user_dev.h
index 3b6b6065a..8937124d9 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.h
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.h
@@ -41,6 +41,7 @@ struct virtio_user_dev {
 	uint64_t	frontend_features; /* enabled frontend features */
 	uint64_t	unsupported_features; /* unsupported features mask */
 	uint8_t		status;
+	uint16_t	net_status;
 	uint16_t	port_id;
 	uint8_t		mac_addr[RTE_ETHER_ADDR_LEN];
 	char		path[PATH_MAX];
diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index e2cbd2478..4a35fa1c9 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -185,7 +185,7 @@ virtio_user_read_dev_config(struct virtio_hw *hw, size_t offset,
 			}
 			r = recv(dev->vhostfd, buf, 128, MSG_PEEK);
 			if (r == 0 || (r < 0 && errno != EAGAIN)) {
-				dev->status &= (~VIRTIO_NET_S_LINK_UP);
+				dev->net_status &= (~VIRTIO_NET_S_LINK_UP);
 				PMD_DRV_LOG(ERR, "virtio-user port %u is down",
 					    hw->port_id);
 
@@ -197,7 +197,7 @@ virtio_user_read_dev_config(struct virtio_hw *hw, size_t offset,
 						  virtio_user_delayed_handler,
 						  (void *)hw);
 			} else {
-				dev->status |= VIRTIO_NET_S_LINK_UP;
+				dev->net_status |= VIRTIO_NET_S_LINK_UP;
 			}
 			if (fcntl(dev->vhostfd, F_SETFL,
 					flags & ~O_NONBLOCK) == -1) {
@@ -205,12 +205,12 @@ virtio_user_read_dev_config(struct virtio_hw *hw, size_t offset,
 				return;
 			}
 		} else if (dev->is_server) {
-			dev->status &= (~VIRTIO_NET_S_LINK_UP);
+			dev->net_status &= (~VIRTIO_NET_S_LINK_UP);
 			if (virtio_user_server_reconnect(dev) >= 0)
-				dev->status |= VIRTIO_NET_S_LINK_UP;
+				dev->net_status |= VIRTIO_NET_S_LINK_UP;
 		}
 
-		*(uint16_t *)dst = dev->status;
+		*(uint16_t *)dst = dev->net_status;
 	}
 
 	if (offset == offsetof(struct virtio_net_config, max_virtqueue_pairs))
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.928258847 +0100
+++ 0029-net-virtio-user-fix-status-management.patch	2020-08-06 10:53:15.816597718 +0100
@@ -1,8 +1,10 @@
-From d0131e49c7fca45f4111eedab71f6dbd73bacd61 Mon Sep 17 00:00:00 2001
+From 17e196bd4b4b8296a85c5c8ab4c5d9ba5ad2658d Mon Sep 17 00:00:00 2001
 From: Xiao Wang <xiao.w.wang@intel.com>
 Date: Tue, 28 Jul 2020 14:52:12 +0800
 Subject: [PATCH] net/virtio-user: fix status management
 
+[ upstream commit d0131e49c7fca45f4111eedab71f6dbd73bacd61 ]
+
 Apart from the virtio status, there should be also a network related
 status for link status management, current implementation mixes up these
 two statuses.
@@ -16,7 +18,6 @@
 separated field. This patch adds a "net_status" field for this purpose.
 
 Fixes: e9efa4d93821 ("net/virtio-user: add new virtual PCI driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
 Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
@@ -28,22 +29,22 @@
  2 files changed, 6 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.h b/drivers/net/virtio/virtio_user/virtio_user_dev.h
-index 56e638f8a..554174e81 100644
+index 3b6b6065a..8937124d9 100644
 --- a/drivers/net/virtio/virtio_user/virtio_user_dev.h
 +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.h
-@@ -44,6 +44,7 @@ struct virtio_user_dev {
- 					    * (Vhost-user only)
- 					    */
+@@ -41,6 +41,7 @@ struct virtio_user_dev {
+ 	uint64_t	frontend_features; /* enabled frontend features */
+ 	uint64_t	unsupported_features; /* unsupported features mask */
  	uint8_t		status;
 +	uint16_t	net_status;
  	uint16_t	port_id;
  	uint8_t		mac_addr[RTE_ETHER_ADDR_LEN];
  	char		path[PATH_MAX];
 diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
-index e51425c4f..6003f6d50 100644
+index e2cbd2478..4a35fa1c9 100644
 --- a/drivers/net/virtio/virtio_user_ethdev.c
 +++ b/drivers/net/virtio/virtio_user_ethdev.c
-@@ -205,7 +205,7 @@ virtio_user_read_dev_config(struct virtio_hw *hw, size_t offset,
+@@ -185,7 +185,7 @@ virtio_user_read_dev_config(struct virtio_hw *hw, size_t offset,
  			}
  			r = recv(dev->vhostfd, buf, 128, MSG_PEEK);
  			if (r == 0 || (r < 0 && errno != EAGAIN)) {
@@ -52,7 +53,7 @@
  				PMD_DRV_LOG(ERR, "virtio-user port %u is down",
  					    hw->port_id);
  
-@@ -217,7 +217,7 @@ virtio_user_read_dev_config(struct virtio_hw *hw, size_t offset,
+@@ -197,7 +197,7 @@ virtio_user_read_dev_config(struct virtio_hw *hw, size_t offset,
  						  virtio_user_delayed_handler,
  						  (void *)hw);
  			} else {
@@ -61,7 +62,7 @@
  			}
  			if (fcntl(dev->vhostfd, F_SETFL,
  					flags & ~O_NONBLOCK) == -1) {
-@@ -225,12 +225,12 @@ virtio_user_read_dev_config(struct virtio_hw *hw, size_t offset,
+@@ -205,12 +205,12 @@ virtio_user_read_dev_config(struct virtio_hw *hw, size_t offset,
  				return;
  			}
  		} else if (dev->is_server) {

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

* [dpdk-stable] patch 'net/ice: fix TCP checksum offload' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (27 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/virtio-user: fix status management' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/ice: fix memory leak when releasing VSI' " luca.boccassi
                     ` (12 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Haiyue Wang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 5d4e7bd58bed63d8c3d13c1e0958ad9515cba0c5 Mon Sep 17 00:00:00 2001
From: Haiyue Wang <haiyue.wang@intel.com>
Date: Tue, 28 Jul 2020 21:42:03 +0800
Subject: [PATCH] net/ice: fix TCP checksum offload

[ upstream commit 2a0c9ae4f646d8325eaaa0cd44b5def34f5a23b3 ]

The L4LEN field of the Descriptor Header Offset for TCP should be the
real length including the TCP options.

Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx")

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 110b38646..bd4a50ab9 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2261,7 +2261,7 @@ ice_txd_enable_checksum(uint64_t ol_flags,
 	switch (ol_flags & PKT_TX_L4_MASK) {
 	case PKT_TX_TCP_CKSUM:
 		*td_cmd |= ICE_TX_DESC_CMD_L4T_EOFT_TCP;
-		*td_offset |= (sizeof(struct rte_tcp_hdr) >> 2) <<
+		*td_offset |= (tx_offload.l4_len >> 2) <<
 			      ICE_TX_DESC_LEN_L4_LEN_S;
 		break;
 	case PKT_TX_SCTP_CKSUM:
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.961148877 +0100
+++ 0030-net-ice-fix-TCP-checksum-offload.patch	2020-08-06 10:53:15.816597718 +0100
@@ -1,13 +1,14 @@
-From 2a0c9ae4f646d8325eaaa0cd44b5def34f5a23b3 Mon Sep 17 00:00:00 2001
+From 5d4e7bd58bed63d8c3d13c1e0958ad9515cba0c5 Mon Sep 17 00:00:00 2001
 From: Haiyue Wang <haiyue.wang@intel.com>
 Date: Tue, 28 Jul 2020 21:42:03 +0800
 Subject: [PATCH] net/ice: fix TCP checksum offload
 
+[ upstream commit 2a0c9ae4f646d8325eaaa0cd44b5def34f5a23b3 ]
+
 The L4LEN field of the Descriptor Header Offset for TCP should be the
 real length including the TCP options.
 
 Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx")
-Cc: stable@dpdk.org
 
 Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -16,10 +17,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
-index cc3139042..ddf6a93fb 100644
+index 110b38646..bd4a50ab9 100644
 --- a/drivers/net/ice/ice_rxtx.c
 +++ b/drivers/net/ice/ice_rxtx.c
-@@ -2234,7 +2234,7 @@ ice_txd_enable_checksum(uint64_t ol_flags,
+@@ -2261,7 +2261,7 @@ ice_txd_enable_checksum(uint64_t ol_flags,
  	switch (ol_flags & PKT_TX_L4_MASK) {
  	case PKT_TX_TCP_CKSUM:
  		*td_cmd |= ICE_TX_DESC_CMD_L4T_EOFT_TCP;

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

* [dpdk-stable] patch 'net/ice: fix memory leak when releasing VSI' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (28 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/ice: fix TCP checksum offload' " luca.boccassi
@ 2020-08-06  9:53   ` luca.boccassi
  2020-08-06  9:54   ` [dpdk-stable] patch 'net/ice: add memory allocation check in RSS init' " luca.boccassi
                     ` (11 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:53 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 3e0872f373407e8fed3faf060296850e5ae79f5a Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 28 Jul 2020 21:11:12 +0800
Subject: [PATCH] net/ice: fix memory leak when releasing VSI

[ upstream commit 5d4a54fd1646585adfedb1675e78a513cf194b25 ]

At the end of the vsi release, we should free the 'rss_lut'
and 'rss_key' for the vsi.

Fixes: 50370662b727 ("net/ice: support device and queue ops")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 5166dafd0..34ca161e5 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2288,9 +2288,10 @@ ice_release_vsi(struct ice_vsi *vsi)
 	struct ice_hw *hw;
 	struct ice_vsi_ctx vsi_ctx;
 	enum ice_status ret;
+	int error = 0;
 
 	if (!vsi)
-		return 0;
+		return error;
 
 	hw = ICE_VSI_TO_HW(vsi);
 
@@ -2303,12 +2304,13 @@ ice_release_vsi(struct ice_vsi *vsi)
 	ret = ice_free_vsi(hw, vsi->idx, &vsi_ctx, false, NULL);
 	if (ret != ICE_SUCCESS) {
 		PMD_INIT_LOG(ERR, "Failed to free vsi by aq, %u", vsi->vsi_id);
-		rte_free(vsi);
-		return -1;
+		error = -1;
 	}
 
+	rte_free(vsi->rss_lut);
+	rte_free(vsi->rss_key);
 	rte_free(vsi);
-	return 0;
+	return error;
 }
 
 void
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:16.996273736 +0100
+++ 0031-net-ice-fix-memory-leak-when-releasing-VSI.patch	2020-08-06 10:53:15.820597797 +0100
@@ -1,13 +1,14 @@
-From 5d4a54fd1646585adfedb1675e78a513cf194b25 Mon Sep 17 00:00:00 2001
+From 3e0872f373407e8fed3faf060296850e5ae79f5a Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Tue, 28 Jul 2020 21:11:12 +0800
 Subject: [PATCH] net/ice: fix memory leak when releasing VSI
 
+[ upstream commit 5d4a54fd1646585adfedb1675e78a513cf194b25 ]
+
 At the end of the vsi release, we should free the 'rss_lut'
 and 'rss_key' for the vsi.
 
 Fixes: 50370662b727 ("net/ice: support device and queue ops")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -16,10 +17,10 @@
  1 file changed, 6 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
-index c4c0e638f..a29c9addc 100644
+index 5166dafd0..34ca161e5 100644
 --- a/drivers/net/ice/ice_ethdev.c
 +++ b/drivers/net/ice/ice_ethdev.c
-@@ -2280,9 +2280,10 @@ ice_release_vsi(struct ice_vsi *vsi)
+@@ -2288,9 +2288,10 @@ ice_release_vsi(struct ice_vsi *vsi)
  	struct ice_hw *hw;
  	struct ice_vsi_ctx vsi_ctx;
  	enum ice_status ret;
@@ -31,7 +32,7 @@
  
  	hw = ICE_VSI_TO_HW(vsi);
  
-@@ -2295,12 +2296,13 @@ ice_release_vsi(struct ice_vsi *vsi)
+@@ -2303,12 +2304,13 @@ ice_release_vsi(struct ice_vsi *vsi)
  	ret = ice_free_vsi(hw, vsi->idx, &vsi_ctx, false, NULL);
  	if (ret != ICE_SUCCESS) {
  		PMD_INIT_LOG(ERR, "Failed to free vsi by aq, %u", vsi->vsi_id);

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

* [dpdk-stable] patch 'net/ice: add memory allocation check in RSS init' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (29 preceding siblings ...)
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/ice: fix memory leak when releasing VSI' " luca.boccassi
@ 2020-08-06  9:54   ` luca.boccassi
  2020-08-06  9:54   ` [dpdk-stable] patch 'net/ice: calculate TCP header size for offload' " luca.boccassi
                     ` (10 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:54 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 4180d0e9e07078f0d9f3c03e128ee4fda1e2658e Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 28 Jul 2020 21:11:27 +0800
Subject: [PATCH] net/ice: add memory allocation check in RSS init

[ upstream commit e40a84ebedf3d8f6ea00f6c10d0fc885a8163d43 ]

The function rte_zmalloc() could return NULL, the return
value need to be checked.

Fixes: 50370662b727 ("net/ice: support device and queue ops")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 27 ++++++++++++++++++++++-----
 1 file changed, 22 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 34ca161e5..cb71d7bfd 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2464,13 +2464,24 @@ static int ice_init_rss(struct ice_pf *pf)
 		return 0;
 	}
 
-	if (!vsi->rss_key)
+	if (!vsi->rss_key) {
 		vsi->rss_key = rte_zmalloc(NULL,
 					   vsi->rss_key_size, 0);
-	if (!vsi->rss_lut)
+		if (vsi->rss_key == NULL) {
+			PMD_DRV_LOG(ERR, "Failed to allocate memory for rss_key");
+			return -ENOMEM;
+		}
+	}
+	if (!vsi->rss_lut) {
 		vsi->rss_lut = rte_zmalloc(NULL,
 					   vsi->rss_lut_size, 0);
-
+		if (vsi->rss_lut == NULL) {
+			PMD_DRV_LOG(ERR, "Failed to allocate memory for rss_key");
+			rte_free(vsi->rss_key);
+			vsi->rss_key = NULL;
+			return -ENOMEM;
+		}
+	}
 	/* configure RSS key */
 	if (!rss_conf->rss_key) {
 		/* Calculate the default hash key */
@@ -2484,7 +2495,7 @@ static int ice_init_rss(struct ice_pf *pf)
 	rte_memcpy(key.standard_rss_key, vsi->rss_key, vsi->rss_key_size);
 	ret = ice_aq_set_rss_key(hw, vsi->idx, &key);
 	if (ret)
-		return -EINVAL;
+		goto out;
 
 	/* init RSS LUT table */
 	for (i = 0; i < vsi->rss_lut_size; i++)
@@ -2494,7 +2505,7 @@ static int ice_init_rss(struct ice_pf *pf)
 				 ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_PF,
 				 vsi->rss_lut, vsi->rss_lut_size);
 	if (ret)
-		return -EINVAL;
+		goto out;
 
 	/* Enable registers for symmetric_toeplitz function. */
 	reg = ICE_READ_REG(hw, VSIQF_HASH_CTL(vsi->vsi_id));
@@ -2570,6 +2581,12 @@ static int ice_init_rss(struct ice_pf *pf)
 				__func__, ret);
 
 	return 0;
+out:
+	rte_free(vsi->rss_key);
+	vsi->rss_key = NULL;
+	rte_free(vsi->rss_lut);
+	vsi->rss_lut = NULL;
+	return -EINVAL;
 }
 
 static int
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:17.033766142 +0100
+++ 0032-net-ice-add-memory-allocation-check-in-RSS-init.patch	2020-08-06 10:53:15.824597876 +0100
@@ -1,13 +1,14 @@
-From e40a84ebedf3d8f6ea00f6c10d0fc885a8163d43 Mon Sep 17 00:00:00 2001
+From 4180d0e9e07078f0d9f3c03e128ee4fda1e2658e Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Tue, 28 Jul 2020 21:11:27 +0800
 Subject: [PATCH] net/ice: add memory allocation check in RSS init
 
+[ upstream commit e40a84ebedf3d8f6ea00f6c10d0fc885a8163d43 ]
+
 The function rte_zmalloc() could return NULL, the return
 value need to be checked.
 
 Fixes: 50370662b727 ("net/ice: support device and queue ops")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -16,10 +17,10 @@
  1 file changed, 22 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
-index a29c9addc..84a0d8e0b 100644
+index 34ca161e5..cb71d7bfd 100644
 --- a/drivers/net/ice/ice_ethdev.c
 +++ b/drivers/net/ice/ice_ethdev.c
-@@ -2707,13 +2707,24 @@ static int ice_init_rss(struct ice_pf *pf)
+@@ -2464,13 +2464,24 @@ static int ice_init_rss(struct ice_pf *pf)
  		return 0;
  	}
  
@@ -47,7 +48,7 @@
  	/* configure RSS key */
  	if (!rss_conf->rss_key) {
  		/* Calculate the default hash key */
-@@ -2727,7 +2738,7 @@ static int ice_init_rss(struct ice_pf *pf)
+@@ -2484,7 +2495,7 @@ static int ice_init_rss(struct ice_pf *pf)
  	rte_memcpy(key.standard_rss_key, vsi->rss_key, vsi->rss_key_size);
  	ret = ice_aq_set_rss_key(hw, vsi->idx, &key);
  	if (ret)
@@ -56,7 +57,7 @@
  
  	/* init RSS LUT table */
  	for (i = 0; i < vsi->rss_lut_size; i++)
-@@ -2737,7 +2748,7 @@ static int ice_init_rss(struct ice_pf *pf)
+@@ -2494,7 +2505,7 @@ static int ice_init_rss(struct ice_pf *pf)
  				 ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_PF,
  				 vsi->rss_lut, vsi->rss_lut_size);
  	if (ret)
@@ -65,8 +66,8 @@
  
  	/* Enable registers for symmetric_toeplitz function. */
  	reg = ICE_READ_REG(hw, VSIQF_HASH_CTL(vsi->vsi_id));
-@@ -2749,6 +2760,12 @@ static int ice_init_rss(struct ice_pf *pf)
- 	ice_rss_hash_set(pf, rss_conf->rss_hf);
+@@ -2570,6 +2581,12 @@ static int ice_init_rss(struct ice_pf *pf)
+ 				__func__, ret);
  
  	return 0;
 +out:

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

* [dpdk-stable] patch 'net/ice: calculate TCP header size for offload' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (30 preceding siblings ...)
  2020-08-06  9:54   ` [dpdk-stable] patch 'net/ice: add memory allocation check in RSS init' " luca.boccassi
@ 2020-08-06  9:54   ` luca.boccassi
  2020-08-06  9:54   ` [dpdk-stable] patch 'net/virtio-user: check tap system call setting' " luca.boccassi
                     ` (9 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:54 UTC (permalink / raw)
  To: Haiyue Wang; +Cc: Qi Zhang, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From f411d19ebaee03020fbcdc9bbb6cbb99eb049932 Mon Sep 17 00:00:00 2001
From: Haiyue Wang <haiyue.wang@intel.com>
Date: Wed, 29 Jul 2020 15:50:39 +0800
Subject: [PATCH] net/ice: calculate TCP header size for offload

[ upstream commit 7365a3cee51fb0a0535336f5a5da1c3d41ee256a ]

The ice needs the exact TCP header size including options for TCP
checksum offload, but according to PKT_TX_TCP_CKSUM note, l4_len
is not required to be set, so it needs to calculate the TCP header
size if not set.

Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx")

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/ice_rxtx.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index bd4a50ab9..eb27a66cd 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2398,6 +2398,28 @@ ice_calc_pkt_desc(struct rte_mbuf *tx_pkt)
 	return count;
 }
 
+/* Calculate TCP header length for PKT_TX_TCP_CKSUM if not provided */
+static inline uint16_t
+ice_calc_pkt_tcp_hdr(struct rte_mbuf *tx_pkt, union ice_tx_offload tx_offload)
+{
+	uint16_t tcpoff = tx_offload.l2_len + tx_offload.l3_len;
+	const struct rte_tcp_hdr *tcp_hdr;
+	struct rte_tcp_hdr _tcp_hdr;
+
+	if (tcpoff + sizeof(struct rte_tcp_hdr) < tx_pkt->data_len) {
+		tcp_hdr = rte_pktmbuf_mtod_offset(tx_pkt, struct rte_tcp_hdr *,
+						  tcpoff);
+
+		return (tcp_hdr->data_off & 0xf0) >> 2;
+	}
+
+	tcp_hdr = rte_pktmbuf_read(tx_pkt, tcpoff, sizeof(_tcp_hdr), &_tcp_hdr);
+	if (tcp_hdr)
+		return (tcp_hdr->data_off & 0xf0) >> 2;
+	else
+		return 0;
+}
+
 uint16_t
 ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 {
@@ -2495,6 +2517,11 @@ ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 
 		/* Enable checksum offloading */
 		if (ol_flags & ICE_TX_CKSUM_OFFLOAD_MASK) {
+			if ((ol_flags & PKT_TX_L4_MASK) == PKT_TX_TCP_CKSUM &&
+			    !tx_offload.l4_len)
+				tx_offload.l4_len =
+				     ice_calc_pkt_tcp_hdr(tx_pkt, tx_offload);
+
 			ice_txd_enable_checksum(ol_flags, &td_cmd,
 						&td_offset, tx_offload);
 		}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:17.073970729 +0100
+++ 0033-net-ice-calculate-TCP-header-size-for-offload.patch	2020-08-06 10:53:15.828597956 +0100
@@ -1,15 +1,16 @@
-From 7365a3cee51fb0a0535336f5a5da1c3d41ee256a Mon Sep 17 00:00:00 2001
+From f411d19ebaee03020fbcdc9bbb6cbb99eb049932 Mon Sep 17 00:00:00 2001
 From: Haiyue Wang <haiyue.wang@intel.com>
 Date: Wed, 29 Jul 2020 15:50:39 +0800
 Subject: [PATCH] net/ice: calculate TCP header size for offload
 
+[ upstream commit 7365a3cee51fb0a0535336f5a5da1c3d41ee256a ]
+
 The ice needs the exact TCP header size including options for TCP
 checksum offload, but according to PKT_TX_TCP_CKSUM note, l4_len
 is not required to be set, so it needs to calculate the TCP header
 size if not set.
 
 Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx")
-Cc: stable@dpdk.org
 
 Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -19,10 +20,10 @@
  1 file changed, 27 insertions(+)
 
 diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
-index ddf6a93fb..bcb67ec25 100644
+index bd4a50ab9..eb27a66cd 100644
 --- a/drivers/net/ice/ice_rxtx.c
 +++ b/drivers/net/ice/ice_rxtx.c
-@@ -2371,6 +2371,28 @@ ice_calc_pkt_desc(struct rte_mbuf *tx_pkt)
+@@ -2398,6 +2398,28 @@ ice_calc_pkt_desc(struct rte_mbuf *tx_pkt)
  	return count;
  }
  
@@ -51,7 +52,7 @@
  uint16_t
  ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
  {
-@@ -2468,6 +2490,11 @@ ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -2495,6 +2517,11 @@ ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
  
  		/* Enable checksum offloading */
  		if (ol_flags & ICE_TX_CKSUM_OFFLOAD_MASK) {

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

* [dpdk-stable] patch 'net/virtio-user: check tap system call setting' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (31 preceding siblings ...)
  2020-08-06  9:54   ` [dpdk-stable] patch 'net/ice: calculate TCP header size for offload' " luca.boccassi
@ 2020-08-06  9:54   ` luca.boccassi
  2020-08-06  9:54   ` [dpdk-stable] patch 'net/kni: set packet input port in Rx' " luca.boccassi
                     ` (8 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:54 UTC (permalink / raw)
  To: Chenbo Xia; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From e769b739306fd5f8c69e205d0145bc6cd0e200a3 Mon Sep 17 00:00:00 2001
From: Chenbo Xia <chenbo.xia@intel.com>
Date: Wed, 29 Jul 2020 13:12:30 +0000
Subject: [PATCH] net/virtio-user: check tap system call setting

[ upstream commit 570ee25677d8634e99d2120b363f2dd4948d5bac ]

Setting the flags of tapfd may fail and the return value
should be checked.

Coverity issue: 140739
Fixes: e3b434818bbb ("net/virtio-user: support kernel vhost")

Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_user/vhost_kernel_tap.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
index 2fa4f0d66..acddefa33 100644
--- a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
+++ b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
@@ -128,7 +128,10 @@ vhost_kernel_open_tap(char **p_ifname, int hdr_size, int req_mq,
 		goto error;
 	}
 
-	fcntl(tapfd, F_SETFL, O_NONBLOCK);
+	if (fcntl(tapfd, F_SETFL, O_NONBLOCK) < 0) {
+		PMD_DRV_LOG(ERR, "fcntl tapfd failed: %s", strerror(errno));
+		goto error;
+	}
 
 	if (ioctl(tapfd, TUNSETVNETHDRSZ, &hdr_size) < 0) {
 		PMD_DRV_LOG(ERR, "TUNSETVNETHDRSZ failed: %s", strerror(errno));
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:17.109640479 +0100
+++ 0034-net-virtio-user-check-tap-system-call-setting.patch	2020-08-06 10:53:15.828597956 +0100
@@ -1,14 +1,15 @@
-From 570ee25677d8634e99d2120b363f2dd4948d5bac Mon Sep 17 00:00:00 2001
+From e769b739306fd5f8c69e205d0145bc6cd0e200a3 Mon Sep 17 00:00:00 2001
 From: Chenbo Xia <chenbo.xia@intel.com>
 Date: Wed, 29 Jul 2020 13:12:30 +0000
 Subject: [PATCH] net/virtio-user: check tap system call setting
 
+[ upstream commit 570ee25677d8634e99d2120b363f2dd4948d5bac ]
+
 Setting the flags of tapfd may fail and the return value
 should be checked.
 
 Coverity issue: 140739
 Fixes: e3b434818bbb ("net/virtio-user: support kernel vhost")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

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

* [dpdk-stable] patch 'net/kni: set packet input port in Rx' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (32 preceding siblings ...)
  2020-08-06  9:54   ` [dpdk-stable] patch 'net/virtio-user: check tap system call setting' " luca.boccassi
@ 2020-08-06  9:54   ` luca.boccassi
  2020-08-06  9:54   ` [dpdk-stable] patch 'examples/packet_ordering: use proper exit method' " luca.boccassi
                     ` (7 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:54 UTC (permalink / raw)
  To: Jecky Pei; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 3aacf8cfaff13d8a65b684951056b68750c27dd8 Mon Sep 17 00:00:00 2001
From: Jecky Pei <jpei@sonicwall.com>
Date: Fri, 24 Jul 2020 16:10:28 +0100
Subject: [PATCH] net/kni: set packet input port in Rx

[ upstream commit cb4a65de31eabcedaca09ba53f06944b87e281fc ]

Store port_id in pmd_internals when eth kni device is created.
Then set packet port of rte_mbuf in function eth_kni_rx.

Signed-off-by: Jecky Pei <jpei@sonicwall.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/kni/rte_eth_kni.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index d88cb1778..c3345f5cb 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -47,6 +47,7 @@ struct pmd_queue {
 
 struct pmd_internals {
 	struct rte_kni *kni;
+	uint16_t port_id;
 	int is_kni_started;
 
 	pthread_t thread;
@@ -78,8 +79,11 @@ eth_kni_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
 	struct pmd_queue *kni_q = q;
 	struct rte_kni *kni = kni_q->internals->kni;
 	uint16_t nb_pkts;
+	int i;
 
 	nb_pkts = rte_kni_rx_burst(kni, bufs, nb_bufs);
+	for (i = 0; i < nb_pkts; i++)
+		bufs[i]->port = kni_q->internals->port_id;
 
 	kni_q->rx.pkts += nb_pkts;
 
@@ -372,6 +376,7 @@ eth_kni_create(struct rte_vdev_device *vdev,
 		return NULL;
 
 	internals = eth_dev->data->dev_private;
+	internals->port_id = eth_dev->data->port_id;
 	data = eth_dev->data;
 	data->nb_rx_queues = 1;
 	data->nb_tx_queues = 1;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:17.161701555 +0100
+++ 0035-net-kni-set-packet-input-port-in-Rx.patch	2020-08-06 10:53:15.828597956 +0100
@@ -1,13 +1,13 @@
-From cb4a65de31eabcedaca09ba53f06944b87e281fc Mon Sep 17 00:00:00 2001
+From 3aacf8cfaff13d8a65b684951056b68750c27dd8 Mon Sep 17 00:00:00 2001
 From: Jecky Pei <jpei@sonicwall.com>
 Date: Fri, 24 Jul 2020 16:10:28 +0100
 Subject: [PATCH] net/kni: set packet input port in Rx
 
+[ upstream commit cb4a65de31eabcedaca09ba53f06944b87e281fc ]
+
 Store port_id in pmd_internals when eth kni device is created.
 Then set packet port of rte_mbuf in function eth_kni_rx.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Jecky Pei <jpei@sonicwall.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
 ---
@@ -15,7 +15,7 @@
  1 file changed, 5 insertions(+)
 
 diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
-index cde98f0bb..831fe96c9 100644
+index d88cb1778..c3345f5cb 100644
 --- a/drivers/net/kni/rte_eth_kni.c
 +++ b/drivers/net/kni/rte_eth_kni.c
 @@ -47,6 +47,7 @@ struct pmd_queue {

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

* [dpdk-stable] patch 'examples/packet_ordering: use proper exit method' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (33 preceding siblings ...)
  2020-08-06  9:54   ` [dpdk-stable] patch 'net/kni: set packet input port in Rx' " luca.boccassi
@ 2020-08-06  9:54   ` luca.boccassi
  2020-08-06  9:54   ` [dpdk-stable] patch 'net/netvsc: fix crash during Tx' " luca.boccassi
                     ` (6 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:54 UTC (permalink / raw)
  To: Sarosh Arif; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 4ad16494bbb89beeac58ab1a02923e3e7bb87e8e Mon Sep 17 00:00:00 2001
From: Sarosh Arif <sarosh.arif@emumba.com>
Date: Fri, 5 Jun 2020 16:48:28 +0500
Subject: [PATCH] examples/packet_ordering: use proper exit method

[ upstream commit d74fab8e7cc36acaf2abf83888809fd1e40c932a ]

rte_exit should be called when the application exits due to
invalid EAL or application arguments.

Fixes: 850f3733f840 ("examples/packet_ordering: new sample app")

Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>
---
 examples/packet_ordering/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c
index b397b318e..edaf810d9 100644
--- a/examples/packet_ordering/main.c
+++ b/examples/packet_ordering/main.c
@@ -675,7 +675,7 @@ main(int argc, char **argv)
 	/* Initialize EAL */
 	ret = rte_eal_init(argc, argv);
 	if (ret < 0)
-		return -1;
+		rte_exit(EXIT_FAILURE, "Invalid EAL arguments\n");
 
 	argc -= ret;
 	argv += ret;
@@ -683,7 +683,7 @@ main(int argc, char **argv)
 	/* Parse the application specific arguments */
 	ret = parse_args(argc, argv);
 	if (ret < 0)
-		return -1;
+		rte_exit(EXIT_FAILURE, "Invalid packet_ordering arguments\n");
 
 	/* Check if we have enought cores */
 	if (rte_lcore_count() < 3)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:17.190200716 +0100
+++ 0036-examples-packet_ordering-use-proper-exit-method.patch	2020-08-06 10:53:15.828597956 +0100
@@ -1,8 +1,10 @@
-From d74fab8e7cc36acaf2abf83888809fd1e40c932a Mon Sep 17 00:00:00 2001
+From 4ad16494bbb89beeac58ab1a02923e3e7bb87e8e Mon Sep 17 00:00:00 2001
 From: Sarosh Arif <sarosh.arif@emumba.com>
 Date: Fri, 5 Jun 2020 16:48:28 +0500
 Subject: [PATCH] examples/packet_ordering: use proper exit method
 
+[ upstream commit d74fab8e7cc36acaf2abf83888809fd1e40c932a ]
+
 rte_exit should be called when the application exits due to
 invalid EAL or application arguments.
 
@@ -14,10 +16,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c
-index 5c654c11c..b5fc6c54b 100644
+index b397b318e..edaf810d9 100644
 --- a/examples/packet_ordering/main.c
 +++ b/examples/packet_ordering/main.c
-@@ -672,7 +672,7 @@ main(int argc, char **argv)
+@@ -675,7 +675,7 @@ main(int argc, char **argv)
  	/* Initialize EAL */
  	ret = rte_eal_init(argc, argv);
  	if (ret < 0)
@@ -26,7 +28,7 @@
  
  	argc -= ret;
  	argv += ret;
-@@ -680,7 +680,7 @@ main(int argc, char **argv)
+@@ -683,7 +683,7 @@ main(int argc, char **argv)
  	/* Parse the application specific arguments */
  	ret = parse_args(argc, argv);
  	if (ret < 0)

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

* [dpdk-stable] patch 'net/netvsc: fix crash during Tx' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (34 preceding siblings ...)
  2020-08-06  9:54   ` [dpdk-stable] patch 'examples/packet_ordering: use proper exit method' " luca.boccassi
@ 2020-08-06  9:54   ` luca.boccassi
  2020-08-06  9:54   ` [dpdk-stable] patch 'doc: fix ethtool app path' " luca.boccassi
                     ` (5 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:54 UTC (permalink / raw)
  To: Chas Williams; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From fceb65eb9572514b4734ab079ab488a6e5f82918 Mon Sep 17 00:00:00 2001
From: Chas Williams <3chas3@gmail.com>
Date: Wed, 29 Jul 2020 09:58:44 -0400
Subject: [PATCH] net/netvsc: fix crash during Tx

[ upstream commit aee76bb79b91e2f8bce0e9356bee23f6e52d0513 ]

Commit cc0251813277 ("net/netvsc: split send buffers from Tx
descriptors") changed the way that transmit descriptors are
allocated. They come from a single pool instead of being
individually attached to each mbuf. To find the IOVA, you need
to calculate the offset from the base of the pool.

Fixes: cc0251813277 ("net/netvsc: split send buffers from Tx descriptors")

Signed-off-by: Chas Williams <3chas3@gmail.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/netvsc/hn_rxtx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 53681721d..d1f8dfa50 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -1332,11 +1332,12 @@ static int hn_xmit_sg(struct hn_tx_queue *txq,
 	hn_rndis_dump(txd->rndis_pkt);
 
 	/* pass IOVA of rndis header in first segment */
-	addr = rte_malloc_virt2iova(txd->rndis_pkt);
+	addr = rte_malloc_virt2iova(txq->tx_rndis);
 	if (unlikely(addr == RTE_BAD_IOVA)) {
 		PMD_DRV_LOG(ERR, "RNDIS transmit can not get iova");
 		return -EINVAL;
 	}
+	addr = addr + ((char *)txd->rndis_pkt - (char *)txq->tx_rndis);
 
 	sg[0].page = addr / PAGE_SIZE;
 	sg[0].ofs = addr & PAGE_MASK;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:17.226695750 +0100
+++ 0037-net-netvsc-fix-crash-during-Tx.patch	2020-08-06 10:53:15.832598035 +0100
@@ -1,8 +1,10 @@
-From aee76bb79b91e2f8bce0e9356bee23f6e52d0513 Mon Sep 17 00:00:00 2001
+From fceb65eb9572514b4734ab079ab488a6e5f82918 Mon Sep 17 00:00:00 2001
 From: Chas Williams <3chas3@gmail.com>
 Date: Wed, 29 Jul 2020 09:58:44 -0400
 Subject: [PATCH] net/netvsc: fix crash during Tx
 
+[ upstream commit aee76bb79b91e2f8bce0e9356bee23f6e52d0513 ]
+
 Commit cc0251813277 ("net/netvsc: split send buffers from Tx
 descriptors") changed the way that transmit descriptors are
 allocated. They come from a single pool instead of being
@@ -10,7 +12,6 @@
 to calculate the offset from the base of the pool.
 
 Fixes: cc0251813277 ("net/netvsc: split send buffers from Tx descriptors")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chas Williams <3chas3@gmail.com>
 Acked-by: Stephen Hemminger <stephen@networkplumber.org>
@@ -19,10 +20,10 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
-index 86a4c0d74..0428c586a 100644
+index 53681721d..d1f8dfa50 100644
 --- a/drivers/net/netvsc/hn_rxtx.c
 +++ b/drivers/net/netvsc/hn_rxtx.c
-@@ -1421,11 +1421,12 @@ static int hn_xmit_sg(struct hn_tx_queue *txq,
+@@ -1332,11 +1332,12 @@ static int hn_xmit_sg(struct hn_tx_queue *txq,
  	hn_rndis_dump(txd->rndis_pkt);
  
  	/* pass IOVA of rndis header in first segment */

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

* [dpdk-stable] patch 'doc: fix ethtool app path' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (35 preceding siblings ...)
  2020-08-06  9:54   ` [dpdk-stable] patch 'net/netvsc: fix crash during Tx' " luca.boccassi
@ 2020-08-06  9:54   ` luca.boccassi
  2020-08-06  9:54   ` [dpdk-stable] patch 'net/bonding: fix dead loop on RSS RETA update' " luca.boccassi
                     ` (4 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:54 UTC (permalink / raw)
  To: Sarosh Arif; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 22c1dba2617bae8281590c6acc2f18ee4e5e8000 Mon Sep 17 00:00:00 2001
From: Sarosh Arif <sarosh.arif@emumba.com>
Date: Thu, 4 Jun 2020 14:59:31 +0500
Subject: [PATCH] doc: fix ethtool app path

[ upstream commit 4a560572e9a8cbb1c9e9610113619a5c2b76e12f ]

The path to the ethtool application was slightly incorrect in the
documentation. This patch corrects that path.

Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")

Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>
---
 doc/guides/sample_app_ug/ethtool.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/sample_app_ug/ethtool.rst b/doc/guides/sample_app_ug/ethtool.rst
index 8f7fc6ca6..253004dd0 100644
--- a/doc/guides/sample_app_ug/ethtool.rst
+++ b/doc/guides/sample_app_ug/ethtool.rst
@@ -24,7 +24,7 @@ The only available options are the standard ones for the EAL:
 
 .. code-block:: console
 
-    ./ethtool-app/ethtool-app/${RTE_TARGET}/ethtool [EAL options]
+    ./ethtool-app/${RTE_TARGET}/ethtool [EAL options]
 
 Refer to the *DPDK Getting Started Guide* for general information on
 running applications and the Environment Abstraction Layer (EAL)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:17.260468854 +0100
+++ 0038-doc-fix-ethtool-app-path.patch	2020-08-06 10:53:15.832598035 +0100
@@ -1,13 +1,14 @@
-From 4a560572e9a8cbb1c9e9610113619a5c2b76e12f Mon Sep 17 00:00:00 2001
+From 22c1dba2617bae8281590c6acc2f18ee4e5e8000 Mon Sep 17 00:00:00 2001
 From: Sarosh Arif <sarosh.arif@emumba.com>
 Date: Thu, 4 Jun 2020 14:59:31 +0500
 Subject: [PATCH] doc: fix ethtool app path
 
+[ upstream commit 4a560572e9a8cbb1c9e9610113619a5c2b76e12f ]
+
 The path to the ethtool application was slightly incorrect in the
 documentation. This patch corrects that path.
 
 Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")
-Cc: stable@dpdk.org
 
 Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>
 ---

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

* [dpdk-stable] patch 'net/bonding: fix dead loop on RSS RETA update' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (36 preceding siblings ...)
  2020-08-06  9:54   ` [dpdk-stable] patch 'doc: fix ethtool app path' " luca.boccassi
@ 2020-08-06  9:54   ` luca.boccassi
  2020-08-06  9:54   ` [dpdk-stable] patch 'net/netvsc: fix chimney index' " luca.boccassi
                     ` (3 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:54 UTC (permalink / raw)
  To: Zhiguang He; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From d41943482e2d1d4372b3d6aa69e71f40d2ea9fc2 Mon Sep 17 00:00:00 2001
From: Zhiguang He <hezhiguang3@huawei.com>
Date: Sun, 2 Aug 2020 20:27:27 +0800
Subject: [PATCH] net/bonding: fix dead loop on RSS RETA update

[ upstream commit eb8939538fddced05b906c34ba9f545bf6717ad2 ]

When parameter reta_size < RTE_RETA_GROUP_SIZE, reta_count will be 0.
Then this function will be deadloop.

Fixes: 734ce47f71e0 ("bonding: support RSS dynamic configuration")

Signed-off-by: Zhiguang He <hezhiguang3@huawei.com>
Acked-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 419e03c00..fccfcb2c8 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2935,7 +2935,8 @@ bond_ethdev_rss_reta_update(struct rte_eth_dev *dev,
 		return -EINVAL;
 
 	 /* Copy RETA table */
-	reta_count = reta_size / RTE_RETA_GROUP_SIZE;
+	reta_count = (reta_size + RTE_RETA_GROUP_SIZE - 1) /
+			RTE_RETA_GROUP_SIZE;
 
 	for (i = 0; i < reta_count; i++) {
 		internals->reta_conf[i].mask = reta_conf[i].mask;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:17.295130569 +0100
+++ 0039-net-bonding-fix-dead-loop-on-RSS-RETA-update.patch	2020-08-06 10:53:15.836598114 +0100
@@ -1,13 +1,14 @@
-From eb8939538fddced05b906c34ba9f545bf6717ad2 Mon Sep 17 00:00:00 2001
+From d41943482e2d1d4372b3d6aa69e71f40d2ea9fc2 Mon Sep 17 00:00:00 2001
 From: Zhiguang He <hezhiguang3@huawei.com>
 Date: Sun, 2 Aug 2020 20:27:27 +0800
 Subject: [PATCH] net/bonding: fix dead loop on RSS RETA update
 
+[ upstream commit eb8939538fddced05b906c34ba9f545bf6717ad2 ]
+
 When parameter reta_size < RTE_RETA_GROUP_SIZE, reta_count will be 0.
 Then this function will be deadloop.
 
 Fixes: 734ce47f71e0 ("bonding: support RSS dynamic configuration")
-Cc: stable@dpdk.org
 
 Signed-off-by: Zhiguang He <hezhiguang3@huawei.com>
 Acked-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -16,7 +17,7 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
-index 116e2f29d..cdbd8151e 100644
+index 419e03c00..fccfcb2c8 100644
 --- a/drivers/net/bonding/rte_eth_bond_pmd.c
 +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
 @@ -2935,7 +2935,8 @@ bond_ethdev_rss_reta_update(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/netvsc: fix chimney index' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (37 preceding siblings ...)
  2020-08-06  9:54   ` [dpdk-stable] patch 'net/bonding: fix dead loop on RSS RETA update' " luca.boccassi
@ 2020-08-06  9:54   ` luca.boccassi
  2020-08-06  9:54   ` [dpdk-stable] patch 'net/i40e: remove duplicate tunnel type check' " luca.boccassi
                     ` (2 subsequent siblings)
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:54 UTC (permalink / raw)
  To: Long Li; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 77ff9d98b4eca9958655699dc016aa53bb746f52 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Sat, 1 Aug 2020 23:04:28 -0700
Subject: [PATCH] net/netvsc: fix chimney index

[ upstream commit 3eee636809e449b8b4c0cdfaf841f2d0e4a558e8 ]

The code should look into "slab" to figure out the index returned from
rte_bitmap_scan().

Fixes: cc02518132 ("net/netvsc: split send buffers from Tx descriptors")

Signed-off-by: Long Li <longli@microsoft.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/netvsc/hn_rxtx.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index d1f8dfa50..d6e518c88 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -206,11 +206,13 @@ hn_chim_uninit(struct rte_eth_dev *dev)
 static uint32_t hn_chim_alloc(struct hn_data *hv)
 {
 	uint32_t index = NVS_CHIM_IDX_INVALID;
-	uint64_t slab;
+	uint64_t slab = 0;
 
 	rte_spinlock_lock(&hv->chim_lock);
-	if (rte_bitmap_scan(hv->chim_bmap, &index, &slab))
+	if (rte_bitmap_scan(hv->chim_bmap, &index, &slab)) {
+		index += rte_bsf64(slab);
 		rte_bitmap_clear(hv->chim_bmap, index);
+	}
 	rte_spinlock_unlock(&hv->chim_lock);
 
 	return index;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:17.334167632 +0100
+++ 0040-net-netvsc-fix-chimney-index.patch	2020-08-06 10:53:15.836598114 +0100
@@ -1,13 +1,14 @@
-From 3eee636809e449b8b4c0cdfaf841f2d0e4a558e8 Mon Sep 17 00:00:00 2001
+From 77ff9d98b4eca9958655699dc016aa53bb746f52 Mon Sep 17 00:00:00 2001
 From: Long Li <longli@microsoft.com>
 Date: Sat, 1 Aug 2020 23:04:28 -0700
 Subject: [PATCH] net/netvsc: fix chimney index
 
+[ upstream commit 3eee636809e449b8b4c0cdfaf841f2d0e4a558e8 ]
+
 The code should look into "slab" to figure out the index returned from
 rte_bitmap_scan().
 
 Fixes: cc02518132 ("net/netvsc: split send buffers from Tx descriptors")
-Cc: stable@dpdk.org
 
 Signed-off-by: Long Li <longli@microsoft.com>
 Acked-by: Stephen Hemminger <stephen@networkplumber.org>
@@ -16,7 +17,7 @@
  1 file changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
-index 0428c586a..87b1184bc 100644
+index d1f8dfa50..d6e518c88 100644
 --- a/drivers/net/netvsc/hn_rxtx.c
 +++ b/drivers/net/netvsc/hn_rxtx.c
 @@ -206,11 +206,13 @@ hn_chim_uninit(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/i40e: remove duplicate tunnel type check' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (38 preceding siblings ...)
  2020-08-06  9:54   ` [dpdk-stable] patch 'net/netvsc: fix chimney index' " luca.boccassi
@ 2020-08-06  9:54   ` luca.boccassi
  2020-08-06  9:54   ` [dpdk-stable] patch 'net/ice: fix Tx hang with TSO' " luca.boccassi
  2020-08-06  9:54   ` [dpdk-stable] patch 'net/ice: revert fake TSO fixes' " luca.boccassi
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:54 UTC (permalink / raw)
  To: Gaurav Singh; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 70b07433d86e926422e1f1c24e3925c4ddb3f01d Mon Sep 17 00:00:00 2001
From: Gaurav Singh <gaurav1086@gmail.com>
Date: Fri, 31 Jul 2020 21:57:52 -0400
Subject: [PATCH] net/i40e: remove duplicate tunnel type check

[ upstream commit 8716f9942a408a79a114ac0496e4e7d55bc9944c ]

remove duplicate check

Fixes: 62e94f7f66fb ("net/i40e: configure packet type mapping")

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/i40e/rte_pmd_i40e.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index fdcb1a43e..759c370d7 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -2169,7 +2169,6 @@ static int check_invalid_pkt_type(uint32_t pkt_type)
 	    tnl != RTE_PTYPE_TUNNEL_VXLAN &&
 	    tnl != RTE_PTYPE_TUNNEL_NVGRE &&
 	    tnl != RTE_PTYPE_TUNNEL_GENEVE &&
-	    tnl != RTE_PTYPE_TUNNEL_GRENAT &&
 	    tnl != RTE_PTYPE_TUNNEL_GTPC &&
 	    tnl != RTE_PTYPE_TUNNEL_GTPU &&
 	    tnl != RTE_PTYPE_TUNNEL_L2TP)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:17.369734033 +0100
+++ 0041-net-i40e-remove-duplicate-tunnel-type-check.patch	2020-08-06 10:53:15.836598114 +0100
@@ -1,12 +1,13 @@
-From 8716f9942a408a79a114ac0496e4e7d55bc9944c Mon Sep 17 00:00:00 2001
+From 70b07433d86e926422e1f1c24e3925c4ddb3f01d Mon Sep 17 00:00:00 2001
 From: Gaurav Singh <gaurav1086@gmail.com>
 Date: Fri, 31 Jul 2020 21:57:52 -0400
 Subject: [PATCH] net/i40e: remove duplicate tunnel type check
 
+[ upstream commit 8716f9942a408a79a114ac0496e4e7d55bc9944c ]
+
 remove duplicate check
 
 Fixes: 62e94f7f66fb ("net/i40e: configure packet type mapping")
-Cc: stable@dpdk.org
 
 Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
 Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -15,7 +16,7 @@
  1 file changed, 1 deletion(-)
 
 diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
-index e216e6783..17938e7d3 100644
+index fdcb1a43e..759c370d7 100644
 --- a/drivers/net/i40e/rte_pmd_i40e.c
 +++ b/drivers/net/i40e/rte_pmd_i40e.c
 @@ -2169,7 +2169,6 @@ static int check_invalid_pkt_type(uint32_t pkt_type)
@@ -25,7 +26,7 @@
 -	    tnl != RTE_PTYPE_TUNNEL_GRENAT &&
  	    tnl != RTE_PTYPE_TUNNEL_GTPC &&
  	    tnl != RTE_PTYPE_TUNNEL_GTPU &&
- 	    tnl != RTE_PTYPE_TUNNEL_L2TP &&
+ 	    tnl != RTE_PTYPE_TUNNEL_L2TP)
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/ice: fix Tx hang with TSO' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (39 preceding siblings ...)
  2020-08-06  9:54   ` [dpdk-stable] patch 'net/i40e: remove duplicate tunnel type check' " luca.boccassi
@ 2020-08-06  9:54   ` luca.boccassi
  2020-08-06  9:54   ` [dpdk-stable] patch 'net/ice: revert fake TSO fixes' " luca.boccassi
  41 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:54 UTC (permalink / raw)
  To: Haiyue Wang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 9a3ce8a48c35adbf7046bac466b012bf719541ce Mon Sep 17 00:00:00 2001
From: Haiyue Wang <haiyue.wang@intel.com>
Date: Fri, 31 Jul 2020 12:27:13 +0800
Subject: [PATCH] net/ice: fix Tx hang with TSO

[ upstream commit 8a72edd9cb232b868c38373e041b03db1220e779 ]

The variables 'td_offset' and 'td_tag' should be reset to 0 for every
burst packet, otherwise the fields of Tx Descriptor will be set wrong,
this will cause the MDD event error, and Tx will hang.

Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx")

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index eb27a66cd..3d8280bb3 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2458,6 +2458,8 @@ ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		tx_pkt = *tx_pkts++;
 
 		td_cmd = 0;
+		td_tag = 0;
+		td_offset = 0;
 		ol_flags = tx_pkt->ol_flags;
 		tx_offload.l2_len = tx_pkt->l2_len;
 		tx_offload.l3_len = tx_pkt->l3_len;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:17.406844946 +0100
+++ 0042-net-ice-fix-Tx-hang-with-TSO.patch	2020-08-06 10:53:15.840598193 +0100
@@ -1,14 +1,15 @@
-From 8a72edd9cb232b868c38373e041b03db1220e779 Mon Sep 17 00:00:00 2001
+From 9a3ce8a48c35adbf7046bac466b012bf719541ce Mon Sep 17 00:00:00 2001
 From: Haiyue Wang <haiyue.wang@intel.com>
 Date: Fri, 31 Jul 2020 12:27:13 +0800
 Subject: [PATCH] net/ice: fix Tx hang with TSO
 
+[ upstream commit 8a72edd9cb232b868c38373e041b03db1220e779 ]
+
 The variables 'td_offset' and 'td_tag' should be reset to 0 for every
 burst packet, otherwise the fields of Tx Descriptor will be set wrong,
 this will cause the MDD event error, and Tx will hang.
 
 Fixes: 17c7d0f9d6a4 ("net/ice: support basic Rx/Tx")
-Cc: stable@dpdk.org
 
 Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
-index bcb67ec25..b83c5c862 100644
+index eb27a66cd..3d8280bb3 100644
 --- a/drivers/net/ice/ice_rxtx.c
 +++ b/drivers/net/ice/ice_rxtx.c
-@@ -2431,6 +2431,8 @@ ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -2458,6 +2458,8 @@ ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
  		tx_pkt = *tx_pkts++;
  
  		td_cmd = 0;

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

* [dpdk-stable] patch 'net/ice: revert fake TSO fixes' has been queued to stable release 19.11.4
  2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
                     ` (40 preceding siblings ...)
  2020-08-06  9:54   ` [dpdk-stable] patch 'net/ice: fix Tx hang with TSO' " luca.boccassi
@ 2020-08-06  9:54   ` luca.boccassi
  2020-08-07 18:16     ` [dpdk-stable] patch 'net/i40e: support aarch32' " luca.boccassi
  41 siblings, 1 reply; 241+ messages in thread
From: luca.boccassi @ 2020-08-06  9:54 UTC (permalink / raw)
  To: Haiyue Wang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 5fceb3d600294cf2ceb153d3cbd3277e07dfe0ba Mon Sep 17 00:00:00 2001
From: Haiyue Wang <haiyue.wang@intel.com>
Date: Fri, 31 Jul 2020 13:59:40 +0800
Subject: [PATCH] net/ice: revert fake TSO fixes

[ upstream commit 4339ea2979b06ad6e1ce2582a7b15faedebbd838 ]

The two fixes are not the real root cause for MDD event, it mitigates
the failure rate when different test mode, so revert them.

Fixes: 2a0c9ae4f646 ("net/ice: fix TCP checksum offload")
Fixes: 7365a3cee51f ("net/ice: calculate TCP header size for offload")

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx.c | 32 ++------------------------------
 1 file changed, 2 insertions(+), 30 deletions(-)

diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
index 3d8280bb3..3030550bd 100644
--- a/drivers/net/ice/ice_rxtx.c
+++ b/drivers/net/ice/ice_rxtx.c
@@ -2261,7 +2261,7 @@ ice_txd_enable_checksum(uint64_t ol_flags,
 	switch (ol_flags & PKT_TX_L4_MASK) {
 	case PKT_TX_TCP_CKSUM:
 		*td_cmd |= ICE_TX_DESC_CMD_L4T_EOFT_TCP;
-		*td_offset |= (tx_offload.l4_len >> 2) <<
+		*td_offset |= (sizeof(struct rte_tcp_hdr) >> 2) <<
 			      ICE_TX_DESC_LEN_L4_LEN_S;
 		break;
 	case PKT_TX_SCTP_CKSUM:
@@ -2398,28 +2398,6 @@ ice_calc_pkt_desc(struct rte_mbuf *tx_pkt)
 	return count;
 }
 
-/* Calculate TCP header length for PKT_TX_TCP_CKSUM if not provided */
-static inline uint16_t
-ice_calc_pkt_tcp_hdr(struct rte_mbuf *tx_pkt, union ice_tx_offload tx_offload)
-{
-	uint16_t tcpoff = tx_offload.l2_len + tx_offload.l3_len;
-	const struct rte_tcp_hdr *tcp_hdr;
-	struct rte_tcp_hdr _tcp_hdr;
-
-	if (tcpoff + sizeof(struct rte_tcp_hdr) < tx_pkt->data_len) {
-		tcp_hdr = rte_pktmbuf_mtod_offset(tx_pkt, struct rte_tcp_hdr *,
-						  tcpoff);
-
-		return (tcp_hdr->data_off & 0xf0) >> 2;
-	}
-
-	tcp_hdr = rte_pktmbuf_read(tx_pkt, tcpoff, sizeof(_tcp_hdr), &_tcp_hdr);
-	if (tcp_hdr)
-		return (tcp_hdr->data_off & 0xf0) >> 2;
-	else
-		return 0;
-}
-
 uint16_t
 ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 {
@@ -2518,15 +2496,9 @@ ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 						   &cd_tunneling_params);
 
 		/* Enable checksum offloading */
-		if (ol_flags & ICE_TX_CKSUM_OFFLOAD_MASK) {
-			if ((ol_flags & PKT_TX_L4_MASK) == PKT_TX_TCP_CKSUM &&
-			    !tx_offload.l4_len)
-				tx_offload.l4_len =
-				     ice_calc_pkt_tcp_hdr(tx_pkt, tx_offload);
-
+		if (ol_flags & ICE_TX_CKSUM_OFFLOAD_MASK)
 			ice_txd_enable_checksum(ol_flags, &td_cmd,
 						&td_offset, tx_offload);
-		}
 
 		if (nb_ctx) {
 			/* Setup TX context descriptor if required */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-06 10:53:17.442114402 +0100
+++ 0043-net-ice-revert-fake-TSO-fixes.patch	2020-08-06 10:53:15.844598272 +0100
@@ -1,14 +1,15 @@
-From 4339ea2979b06ad6e1ce2582a7b15faedebbd838 Mon Sep 17 00:00:00 2001
+From 5fceb3d600294cf2ceb153d3cbd3277e07dfe0ba Mon Sep 17 00:00:00 2001
 From: Haiyue Wang <haiyue.wang@intel.com>
 Date: Fri, 31 Jul 2020 13:59:40 +0800
 Subject: [PATCH] net/ice: revert fake TSO fixes
 
+[ upstream commit 4339ea2979b06ad6e1ce2582a7b15faedebbd838 ]
+
 The two fixes are not the real root cause for MDD event, it mitigates
 the failure rate when different test mode, so revert them.
 
 Fixes: 2a0c9ae4f646 ("net/ice: fix TCP checksum offload")
 Fixes: 7365a3cee51f ("net/ice: calculate TCP header size for offload")
-Cc: stable@dpdk.org
 
 Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 2 insertions(+), 30 deletions(-)
 
 diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c
-index b83c5c862..2e1f06d2c 100644
+index 3d8280bb3..3030550bd 100644
 --- a/drivers/net/ice/ice_rxtx.c
 +++ b/drivers/net/ice/ice_rxtx.c
-@@ -2234,7 +2234,7 @@ ice_txd_enable_checksum(uint64_t ol_flags,
+@@ -2261,7 +2261,7 @@ ice_txd_enable_checksum(uint64_t ol_flags,
  	switch (ol_flags & PKT_TX_L4_MASK) {
  	case PKT_TX_TCP_CKSUM:
  		*td_cmd |= ICE_TX_DESC_CMD_L4T_EOFT_TCP;
@@ -29,7 +30,7 @@
  			      ICE_TX_DESC_LEN_L4_LEN_S;
  		break;
  	case PKT_TX_SCTP_CKSUM:
-@@ -2371,28 +2371,6 @@ ice_calc_pkt_desc(struct rte_mbuf *tx_pkt)
+@@ -2398,28 +2398,6 @@ ice_calc_pkt_desc(struct rte_mbuf *tx_pkt)
  	return count;
  }
  
@@ -58,7 +59,7 @@
  uint16_t
  ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
  {
-@@ -2491,15 +2469,9 @@ ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -2518,15 +2496,9 @@ ice_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
  						   &cd_tunneling_params);
  
  		/* Enable checksum offloading */

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

* [dpdk-stable] patch 'net/i40e: support aarch32' has been queued to stable release 19.11.4
  2020-08-06  9:54   ` [dpdk-stable] patch 'net/ice: revert fake TSO fixes' " luca.boccassi
@ 2020-08-07 18:16     ` luca.boccassi
  2020-08-10 11:04       ` [dpdk-stable] patch 'kni: fix reference to master/slave process' " luca.boccassi
  0 siblings, 1 reply; 241+ messages in thread
From: luca.boccassi @ 2020-08-07 18:16 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From bb582fa76942db216d7714bc7e9553927072b06a Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Wed, 24 Jun 2020 15:10:15 +0800
Subject: [PATCH] net/i40e: support aarch32

[ upstream commit 78bfe1666b2063e3fc3fa51e757159f53e1fc779 ]

Expand vector PMD support to aarch32.
Enable i40e PMD by default for armv7 make build.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 config/defconfig_arm-armv7a-linuxapp-gcc | 1 -
 drivers/net/i40e/Makefile                | 2 +-
 drivers/net/i40e/i40e_rxtx_vec_neon.c    | 2 +-
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/config/defconfig_arm-armv7a-linuxapp-gcc b/config/defconfig_arm-armv7a-linuxapp-gcc
index c91423f0e..749f9924d 100644
--- a/config/defconfig_arm-armv7a-linuxapp-gcc
+++ b/config/defconfig_arm-armv7a-linuxapp-gcc
@@ -45,7 +45,6 @@ CONFIG_RTE_LIBRTE_CXGBE_PMD=n
 CONFIG_RTE_LIBRTE_E1000_PMD=n
 CONFIG_RTE_LIBRTE_ENIC_PMD=n
 CONFIG_RTE_LIBRTE_FM10K_PMD=n
-CONFIG_RTE_LIBRTE_I40E_PMD=n
 CONFIG_RTE_LIBRTE_IXGBE_PMD=n
 CONFIG_RTE_LIBRTE_MLX4_PMD=n
 CONFIG_RTE_LIBRTE_VMXNET3_PMD=n
diff --git a/drivers/net/i40e/Makefile b/drivers/net/i40e/Makefile
index 435eb511a..4ea58bd9e 100644
--- a/drivers/net/i40e/Makefile
+++ b/drivers/net/i40e/Makefile
@@ -72,7 +72,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_dcb.c
 
 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_ethdev.c
 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_rxtx.c
-ifeq ($(CONFIG_RTE_ARCH_ARM64),y)
+ifneq ($(filter y,$(CONFIG_RTE_ARCH_ARM) $(CONFIG_RTE_ARCH_ARM64)),)
 SRCS-$(CONFIG_RTE_LIBRTE_I40E_INC_VECTOR) += i40e_rxtx_vec_neon.c
 else ifeq ($(CONFIG_RTE_ARCH_PPC_64),y)
 SRCS-$(CONFIG_RTE_LIBRTE_I40E_INC_VECTOR) += i40e_rxtx_vec_altivec.c
diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c
index 4376d8911..56fc355ee 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_neon.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c
@@ -6,6 +6,7 @@
 #include <stdint.h>
 #include <rte_ethdev_driver.h>
 #include <rte_malloc.h>
+#include <rte_vect.h>
 
 #include "base/i40e_prototype.h"
 #include "base/i40e_type.h"
@@ -13,7 +14,6 @@
 #include "i40e_rxtx.h"
 #include "i40e_rxtx_vec_common.h"
 
-#include <arm_neon.h>
 
 #pragma GCC diagnostic ignored "-Wcast-qual"
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-07 19:15:05.686623742 +0100
+++ 0001-net-i40e-support-aarch32.patch	2020-08-07 19:15:05.654257188 +0100
@@ -1,8 +1,10 @@
-From 78bfe1666b2063e3fc3fa51e757159f53e1fc779 Mon Sep 17 00:00:00 2001
+From bb582fa76942db216d7714bc7e9553927072b06a Mon Sep 17 00:00:00 2001
 From: Ruifeng Wang <ruifeng.wang@arm.com>
 Date: Wed, 24 Jun 2020 15:10:15 +0800
 Subject: [PATCH] net/i40e: support aarch32
 
+[ upstream commit 78bfe1666b2063e3fc3fa51e757159f53e1fc779 ]
+
 Expand vector PMD support to aarch32.
 Enable i40e PMD by default for armv7 make build.
 
@@ -15,22 +17,22 @@
  3 files changed, 2 insertions(+), 3 deletions(-)
 
 diff --git a/config/defconfig_arm-armv7a-linuxapp-gcc b/config/defconfig_arm-armv7a-linuxapp-gcc
-index e5d6b6a0c..ac9112086 100644
+index c91423f0e..749f9924d 100644
 --- a/config/defconfig_arm-armv7a-linuxapp-gcc
 +++ b/config/defconfig_arm-armv7a-linuxapp-gcc
-@@ -38,7 +38,6 @@ CONFIG_RTE_LIBRTE_CXGBE_PMD=n
+@@ -45,7 +45,6 @@ CONFIG_RTE_LIBRTE_CXGBE_PMD=n
  CONFIG_RTE_LIBRTE_E1000_PMD=n
  CONFIG_RTE_LIBRTE_ENIC_PMD=n
  CONFIG_RTE_LIBRTE_FM10K_PMD=n
 -CONFIG_RTE_LIBRTE_I40E_PMD=n
+ CONFIG_RTE_LIBRTE_IXGBE_PMD=n
+ CONFIG_RTE_LIBRTE_MLX4_PMD=n
  CONFIG_RTE_LIBRTE_VMXNET3_PMD=n
- CONFIG_RTE_LIBRTE_QEDE_PMD=n
- CONFIG_RTE_LIBRTE_SFC_EFX_PMD=n
 diff --git a/drivers/net/i40e/Makefile b/drivers/net/i40e/Makefile
-index 7ec8d9533..43f10941b 100644
+index 435eb511a..4ea58bd9e 100644
 --- a/drivers/net/i40e/Makefile
 +++ b/drivers/net/i40e/Makefile
-@@ -69,7 +69,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_dcb.c
+@@ -72,7 +72,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_dcb.c
  
  SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_ethdev.c
  SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_rxtx.c
@@ -40,7 +42,7 @@
  else ifeq ($(CONFIG_RTE_ARCH_PPC_64),y)
  SRCS-$(CONFIG_RTE_LIBRTE_I40E_INC_VECTOR) += i40e_rxtx_vec_altivec.c
 diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c
-index 1dfd0478b..67158f108 100644
+index 4376d8911..56fc355ee 100644
 --- a/drivers/net/i40e/i40e_rxtx_vec_neon.c
 +++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c
 @@ -6,6 +6,7 @@

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

* Re: [dpdk-stable] patch 'net/mlx5: fix flow items size calculation' has been queued to stable release 19.11.4
  2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx5: fix flow items size calculation' " luca.boccassi
@ 2020-08-10  7:27     ` Raslan Darawsheh
  2020-08-10 11:00       ` Luca Boccassi
  0 siblings, 1 reply; 241+ messages in thread
From: Raslan Darawsheh @ 2020-08-10  7:27 UTC (permalink / raw)
  To: luca.boccassi; +Cc: Slava Ovsiienko, dpdk stable

Hi Luca,

please be noted that with this change you'll get a compilation failure when debug is enabled for MLX5,
if we don't have this patch backported before it
http://patches.dpdk.org/patch/74534/



Kindest regards

Raslan Darawsheh

________________________________
From: luca.boccassi@gmail.com <luca.boccassi@gmail.com>
Sent: Thursday, August 6, 2020 12:53 PM
To: Raslan Darawsheh <rasland@mellanox.com>
Cc: Slava Ovsiienko <viacheslavo@mellanox.com>; dpdk stable <stable@dpdk.org>
Subject: patch 'net/mlx5: fix flow items size calculation' has been queued to stable release 19.11.4

Hi,

FYI, your patch has been queued to stable release 19.11.4

Note it hasn't been pushed to https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdpdk.org%2Fbrowse%2Fdpdk-stable&amp;data=02%7C01%7Crasland%40mellanox.com%7C1c9c6e447cb242871ce408d839ef3c65%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C637323046965820421&amp;sdata=%2Fxuhw7GFWJK3JMQ5aLmI6Ml%2BXzpVNoJatg89ECB5XeM%3D&amp;reserved=0 yet.
It will be pushed if I get no objections before 08/08/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From e8df8d9adc133f10e896bd7d7ca62ca237222bbb Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@mellanox.com>
Date: Thu, 16 Jul 2020 15:14:55 +0300
Subject: [PATCH] net/mlx5: fix flow items size calculation

[ upstream commit d13f9760866884d81563624fbf160f3054b70f19 ]

flow_dv_get_item_len returns the actual header size of
an rte_flow item.

Changing any of the structs for rte_flow items by adding
or removing some extra fields will break this function.

This fixes the behavior by returning the actual header size
of each item.

Fixes: 34d41b7aa3bf ("net/mlx5: add VXLAN encap action to Direct Verbs")

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 31 ++++++++++++++-----------------
 1 file changed, 14 insertions(+), 17 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index bfb27a602..e40cf3c2a 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -27,6 +27,7 @@
 #include <rte_ip.h>
 #include <rte_gre.h>
 #include <rte_vxlan.h>
+#include <rte_mpls.h>

 #include "mlx5.h"
 #include "mlx5_defs.h"
@@ -2661,7 +2662,7 @@ flow_dv_push_vlan_action_resource_register
         return 0;
 }
 /**
- * Get the size of specific rte_flow_item_type
+ * Get the size of specific rte_flow_item_type hdr size
  *
  * @param[in] item_type
  *   Tested rte_flow_item_type.
@@ -2670,43 +2671,39 @@ flow_dv_push_vlan_action_resource_register
  *   sizeof struct item_type, 0 if void or irrelevant.
  */
 static size_t
-flow_dv_get_item_len(const enum rte_flow_item_type item_type)
+flow_dv_get_item_hdr_len(const enum rte_flow_item_type item_type)
 {
         size_t retval;

         switch (item_type) {
         case RTE_FLOW_ITEM_TYPE_ETH:
-               retval = sizeof(struct rte_flow_item_eth);
+               retval = sizeof(struct rte_ether_hdr);
                 break;
         case RTE_FLOW_ITEM_TYPE_VLAN:
-               retval = sizeof(struct rte_flow_item_vlan);
+               retval = sizeof(struct rte_vlan_hdr);
                 break;
         case RTE_FLOW_ITEM_TYPE_IPV4:
-               retval = sizeof(struct rte_flow_item_ipv4);
+               retval = sizeof(struct rte_ipv4_hdr);
                 break;
         case RTE_FLOW_ITEM_TYPE_IPV6:
-               retval = sizeof(struct rte_flow_item_ipv6);
+               retval = sizeof(struct rte_ipv6_hdr);
                 break;
         case RTE_FLOW_ITEM_TYPE_UDP:
-               retval = sizeof(struct rte_flow_item_udp);
+               retval = sizeof(struct rte_udp_hdr);
                 break;
         case RTE_FLOW_ITEM_TYPE_TCP:
-               retval = sizeof(struct rte_flow_item_tcp);
+               retval = sizeof(struct rte_tcp_hdr);
                 break;
         case RTE_FLOW_ITEM_TYPE_VXLAN:
-               retval = sizeof(struct rte_flow_item_vxlan);
+       case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
+               retval = sizeof(struct rte_vxlan_hdr);
                 break;
         case RTE_FLOW_ITEM_TYPE_GRE:
-               retval = sizeof(struct rte_flow_item_gre);
-               break;
         case RTE_FLOW_ITEM_TYPE_NVGRE:
-               retval = sizeof(struct rte_flow_item_nvgre);
-               break;
-       case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
-               retval = sizeof(struct rte_flow_item_vxlan_gpe);
+               retval = sizeof(struct rte_gre_hdr);
                 break;
         case RTE_FLOW_ITEM_TYPE_MPLS:
-               retval = sizeof(struct rte_flow_item_mpls);
+               retval = sizeof(struct rte_mpls_hdr);
                 break;
         case RTE_FLOW_ITEM_TYPE_VOID: /* Fall through. */
         default:
@@ -2759,7 +2756,7 @@ flow_dv_convert_encap_data(const struct rte_flow_item *items, uint8_t *buf,
                                           RTE_FLOW_ERROR_TYPE_ACTION,
                                           NULL, "invalid empty data");
         for (; items->type != RTE_FLOW_ITEM_TYPE_END; items++) {
-               len = flow_dv_get_item_len(items->type);
+               len = flow_dv_get_item_hdr_len(items->type);
                 if (len + temp_size > MLX5_ENCAP_MAX_LEN)
                         return rte_flow_error_set(error, EINVAL,
                                                   RTE_FLOW_ERROR_TYPE_ACTION,
--
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -   2020-08-06 10:53:16.212439477 +0100
+++ 0011-net-mlx5-fix-flow-items-size-calculation.patch 2020-08-06 10:53:15.728595976 +0100
@@ -1,8 +1,10 @@
-From d13f9760866884d81563624fbf160f3054b70f19 Mon Sep 17 00:00:00 2001
+From e8df8d9adc133f10e896bd7d7ca62ca237222bbb Mon Sep 17 00:00:00 2001
 From: Raslan Darawsheh <rasland@mellanox.com>
 Date: Thu, 16 Jul 2020 15:14:55 +0300
 Subject: [PATCH] net/mlx5: fix flow items size calculation

+[ upstream commit d13f9760866884d81563624fbf160f3054b70f19 ]
+
 flow_dv_get_item_len returns the actual header size of
 an rte_flow item.

@@ -13,7 +15,6 @@
 of each item.

 Fixes: 34d41b7aa3bf ("net/mlx5: add VXLAN encap action to Direct Verbs")
-Cc: stable@dpdk.org

 Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
@@ -22,18 +23,18 @@
  1 file changed, 14 insertions(+), 17 deletions(-)

 diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
-index f0cc7ad1a..e7f0a12ac 100644
+index bfb27a602..e40cf3c2a 100644
 --- a/drivers/net/mlx5/mlx5_flow_dv.c
 +++ b/drivers/net/mlx5/mlx5_flow_dv.c
-@@ -20,6 +20,7 @@
+@@ -27,6 +27,7 @@
+ #include <rte_ip.h>
+ #include <rte_gre.h>
  #include <rte_vxlan.h>
- #include <rte_gtp.h>
- #include <rte_eal_paging.h>
 +#include <rte_mpls.h>

- #include <mlx5_glue.h>
- #include <mlx5_devx_cmds.h>
-@@ -2866,7 +2867,7 @@ flow_dv_push_vlan_action_resource_register
+ #include "mlx5.h"
+ #include "mlx5_defs.h"
+@@ -2661,7 +2662,7 @@ flow_dv_push_vlan_action_resource_register
         return 0;
  }
  /**
@@ -42,7 +43,7 @@
   *
   * @param[in] item_type
   *   Tested rte_flow_item_type.
-@@ -2875,43 +2876,39 @@ flow_dv_push_vlan_action_resource_register
+@@ -2670,43 +2671,39 @@ flow_dv_push_vlan_action_resource_register
   *   sizeof struct item_type, 0 if void or irrelevant.
   */
  static size_t
@@ -97,7 +98,7 @@
                 break;
         case RTE_FLOW_ITEM_TYPE_VOID: /* Fall through. */
         default:
-@@ -2964,7 +2961,7 @@ flow_dv_convert_encap_data(const struct rte_flow_item *items, uint8_t *buf,
+@@ -2759,7 +2756,7 @@ flow_dv_convert_encap_data(const struct rte_flow_item *items, uint8_t *buf,
                                           RTE_FLOW_ERROR_TYPE_ACTION,
                                           NULL, "invalid empty data");
         for (; items->type != RTE_FLOW_ITEM_TYPE_END; items++) {

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

* Re: [dpdk-stable] patch 'net/mlx5: fix flow items size calculation' has been queued to stable release 19.11.4
  2020-08-10  7:27     ` Raslan Darawsheh
@ 2020-08-10 11:00       ` Luca Boccassi
  2020-08-10 11:05         ` Raslan Darawsheh
  0 siblings, 1 reply; 241+ messages in thread
From: Luca Boccassi @ 2020-08-10 11:00 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: Slava Ovsiienko, dpdk stable

On Mon, 2020-08-10 at 07:27 +0000, Raslan Darawsheh wrote:
> Hi Luca,
> 
> please be noted that with this change you'll get a compilation failure when debug is enabled for MLX5,
> if we don't have this patch backported before it
> http://patches.dpdk.org/patch/74534/
> 
> 
> Kindest regards
> Raslan Darawsheh

Thanks, that patch is included already as well, so everything should be
good

> From: luca.boccassi@gmail.com <luca.boccassi@gmail.com>
> Sent: Thursday, August 6, 2020 12:53 PM
> To: Raslan Darawsheh <rasland@mellanox.com>
> Cc: Slava Ovsiienko <viacheslavo@mellanox.com>; dpdk stable <stable@dpdk.org>
> Subject: patch 'net/mlx5: fix flow items size calculation' has been queued to stable release 19.11.4
>  
> Hi,
> 
> FYI, your patch has been queued to stable release 19.11.4
> 
> Note it hasn't been pushed to https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdpdk.org%2Fbrowse%2Fdpdk-stable&amp;data=02%7C01%7Crasland%40mellanox.com%7C1c9c6e447cb242871ce408d839ef3c65%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C637323046965820421&amp;sdata=%2Fxuhw7GFWJK3JMQ5aLmI6Ml%2BXzpVNoJatg89ECB5XeM%3D&amp;reserved=0 yet.
> It will be pushed if I get no objections before 08/08/20. So please
> shout if anyone has objections.
> 
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
> 
> Thanks.
> 
> Luca Boccassi
> 
> ---
> From e8df8d9adc133f10e896bd7d7ca62ca237222bbb Mon Sep 17 00:00:00 2001
> From: Raslan Darawsheh <rasland@mellanox.com>
> Date: Thu, 16 Jul 2020 15:14:55 +0300
> Subject: [PATCH] net/mlx5: fix flow items size calculation
> 
> [ upstream commit d13f9760866884d81563624fbf160f3054b70f19 ]
> 
> flow_dv_get_item_len returns the actual header size of
> an rte_flow item.
> 
> Changing any of the structs for rte_flow items by adding
> or removing some extra fields will break this function.
> 
> This fixes the behavior by returning the actual header size
> of each item.
> 
> Fixes: 34d41b7aa3bf ("net/mlx5: add VXLAN encap action to Direct Verbs")
> 
> Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_flow_dv.c | 31 ++++++++++++++-----------------
>  1 file changed, 14 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
> index bfb27a602..e40cf3c2a 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -27,6 +27,7 @@
>  #include <rte_ip.h>
>  #include <rte_gre.h>
>  #include <rte_vxlan.h>
> +#include <rte_mpls.h>
>  
>  #include "mlx5.h"
>  #include "mlx5_defs.h"
> @@ -2661,7 +2662,7 @@ flow_dv_push_vlan_action_resource_register
>          return 0;
>  }
>  /**
> - * Get the size of specific rte_flow_item_type
> + * Get the size of specific rte_flow_item_type hdr size
>   *
>   * @param[in] item_type
>   *   Tested rte_flow_item_type.
> @@ -2670,43 +2671,39 @@ flow_dv_push_vlan_action_resource_register
>   *   sizeof struct item_type, 0 if void or irrelevant.
>   */
>  static size_t
> -flow_dv_get_item_len(const enum rte_flow_item_type item_type)
> +flow_dv_get_item_hdr_len(const enum rte_flow_item_type item_type)
>  {
>          size_t retval;
>  
>          switch (item_type) {
>          case RTE_FLOW_ITEM_TYPE_ETH:
> -               retval = sizeof(struct rte_flow_item_eth);
> +               retval = sizeof(struct rte_ether_hdr);
>                  break;
>          case RTE_FLOW_ITEM_TYPE_VLAN:
> -               retval = sizeof(struct rte_flow_item_vlan);
> +               retval = sizeof(struct rte_vlan_hdr);
>                  break;
>          case RTE_FLOW_ITEM_TYPE_IPV4:
> -               retval = sizeof(struct rte_flow_item_ipv4);
> +               retval = sizeof(struct rte_ipv4_hdr);
>                  break;
>          case RTE_FLOW_ITEM_TYPE_IPV6:
> -               retval = sizeof(struct rte_flow_item_ipv6);
> +               retval = sizeof(struct rte_ipv6_hdr);
>                  break;
>          case RTE_FLOW_ITEM_TYPE_UDP:
> -               retval = sizeof(struct rte_flow_item_udp);
> +               retval = sizeof(struct rte_udp_hdr);
>                  break;
>          case RTE_FLOW_ITEM_TYPE_TCP:
> -               retval = sizeof(struct rte_flow_item_tcp);
> +               retval = sizeof(struct rte_tcp_hdr);
>                  break;
>          case RTE_FLOW_ITEM_TYPE_VXLAN:
> -               retval = sizeof(struct rte_flow_item_vxlan);
> +       case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
> +               retval = sizeof(struct rte_vxlan_hdr);
>                  break;
>          case RTE_FLOW_ITEM_TYPE_GRE:
> -               retval = sizeof(struct rte_flow_item_gre);
> -               break;
>          case RTE_FLOW_ITEM_TYPE_NVGRE:
> -               retval = sizeof(struct rte_flow_item_nvgre);
> -               break;
> -       case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
> -               retval = sizeof(struct rte_flow_item_vxlan_gpe);
> +               retval = sizeof(struct rte_gre_hdr);
>                  break;
>          case RTE_FLOW_ITEM_TYPE_MPLS:
> -               retval = sizeof(struct rte_flow_item_mpls);
> +               retval = sizeof(struct rte_mpls_hdr);
>                  break;
>          case RTE_FLOW_ITEM_TYPE_VOID: /* Fall through. */
>          default:
> @@ -2759,7 +2756,7 @@ flow_dv_convert_encap_data(const struct rte_flow_item *items, uint8_t *buf,
>                                            RTE_FLOW_ERROR_TYPE_ACTION,
>                                            NULL, "invalid empty data");
>          for (; items->type != RTE_FLOW_ITEM_TYPE_END; items++) {
> -               len = flow_dv_get_item_len(items->type);
> +               len = flow_dv_get_item_hdr_len(items->type);
>                  if (len + temp_size > MLX5_ENCAP_MAX_LEN)
>                          return rte_flow_error_set(error, EINVAL,
>                                                    RTE_FLOW_ERROR_TYPE_ACTION,


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

* [dpdk-stable] patch 'kni: fix reference to master/slave process' has been queued to stable release 19.11.4
  2020-08-07 18:16     ` [dpdk-stable] patch 'net/i40e: support aarch32' " luca.boccassi
@ 2020-08-10 11:04       ` luca.boccassi
  2020-08-10 11:04         ` [dpdk-stable] patch 'doc: fix reference to master " luca.boccassi
  0 siblings, 1 reply; 241+ messages in thread
From: luca.boccassi @ 2020-08-10 11:04 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Bruce Richardson, John McNamara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From 984aa9cc565aadaf36439bbb4d6f9f8bb2d4dff8 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 6 Aug 2020 10:19:43 -0700
Subject: [PATCH] kni: fix reference to master/slave process

[ upstream commit 95a2e18dfbd3468a0614d3ca207e086c0b0f822b ]

In DPDK, the correct terms for process are primary/secondary.
This is bugfix, not a change in terms for new release.

Fixes: f2e7592c474c ("kni: fix multi-process support")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 lib/librte_kni/rte_kni.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_kni/rte_kni.h b/lib/librte_kni/rte_kni.h
index f1bb782c6..855facd1a 100644
--- a/lib/librte_kni/rte_kni.h
+++ b/lib/librte_kni/rte_kni.h
@@ -212,7 +212,7 @@ const char *rte_kni_get_name(const struct rte_kni *kni);
 
 /**
  * Register KNI request handling for a specified port,and it can
- * be called by master process or slave process.
+ * be called by primary process or secondary process.
  *
  * @param kni
  *  pointer to struct rte_kni.
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-10 12:04:18.390310640 +0100
+++ 0001-kni-fix-reference-to-master-slave-process.patch	2020-08-10 12:04:18.347555497 +0100
@@ -1,13 +1,14 @@
-From 95a2e18dfbd3468a0614d3ca207e086c0b0f822b Mon Sep 17 00:00:00 2001
+From 984aa9cc565aadaf36439bbb4d6f9f8bb2d4dff8 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Thu, 6 Aug 2020 10:19:43 -0700
 Subject: [PATCH] kni: fix reference to master/slave process
 
+[ upstream commit 95a2e18dfbd3468a0614d3ca207e086c0b0f822b ]
+
 In DPDK, the correct terms for process are primary/secondary.
 This is bugfix, not a change in terms for new release.
 
 Fixes: f2e7592c474c ("kni: fix multi-process support")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 Acked-by: Bruce Richardson <bruce.richardson@intel.com>

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

* [dpdk-stable] patch 'doc: fix reference to master process' has been queued to stable release 19.11.4
  2020-08-10 11:04       ` [dpdk-stable] patch 'kni: fix reference to master/slave process' " luca.boccassi
@ 2020-08-10 11:04         ` luca.boccassi
  0 siblings, 0 replies; 241+ messages in thread
From: luca.boccassi @ 2020-08-10 11:04 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Anatoly Burakov, John McNamara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.4

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
From c24a4d83a35e4498173f8fd2c798eb845b9b6417 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 6 Aug 2020 10:19:44 -0700
Subject: [PATCH] doc: fix reference to master process

[ upstream commit ad18592bc0e064873265952805aaaf60af91cbe6 ]

Correct terminolgy here is primary process.
This is a bug in original doc.

Fixes: fc1f2750a3ec ("doc: programmers guide")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/prog_guide/thread_safety_dpdk_functions.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/guides/prog_guide/thread_safety_dpdk_functions.rst b/doc/guides/prog_guide/thread_safety_dpdk_functions.rst
index 0f539db2b..5618e25e4 100644
--- a/doc/guides/prog_guide/thread_safety_dpdk_functions.rst
+++ b/doc/guides/prog_guide/thread_safety_dpdk_functions.rst
@@ -61,8 +61,8 @@ rather than subsequently in the forwarding threads.
 However, the DPDK performs checks to ensure that libraries are only initialized once.
 If initialization is attempted more than once, an error is returned.
 
-In the multi-process case, the configuration information of shared memory will only be initialized by the master process.
-Thereafter, both master and secondary processes can allocate/release any objects of memory that finally rely on rte_malloc or memzones.
+In the multi-process case, the configuration information of shared memory will only be initialized by the primary process.
+Thereafter, both primary and secondary processes can allocate/release any objects of memory that finally rely on rte_malloc or memzones.
 
 Interrupt Thread
 ----------------
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-10 12:04:18.430260438 +0100
+++ 0002-doc-fix-reference-to-master-process.patch	2020-08-10 12:04:18.347555497 +0100
@@ -1,13 +1,14 @@
-From ad18592bc0e064873265952805aaaf60af91cbe6 Mon Sep 17 00:00:00 2001
+From c24a4d83a35e4498173f8fd2c798eb845b9b6417 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Thu, 6 Aug 2020 10:19:44 -0700
 Subject: [PATCH] doc: fix reference to master process
 
+[ upstream commit ad18592bc0e064873265952805aaaf60af91cbe6 ]
+
 Correct terminolgy here is primary process.
 This is a bug in original doc.
 
 Fixes: fc1f2750a3ec ("doc: programmers guide")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

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

* Re: [dpdk-stable] patch 'net/mlx5: fix flow items size calculation' has been queued to stable release 19.11.4
  2020-08-10 11:00       ` Luca Boccassi
@ 2020-08-10 11:05         ` Raslan Darawsheh
  0 siblings, 0 replies; 241+ messages in thread
From: Raslan Darawsheh @ 2020-08-10 11:05 UTC (permalink / raw)
  To: Luca Boccassi, Raslan Darawsheh; +Cc: Slava Ovsiienko, dpdk stable


-----Original Message-----
From: Luca Boccassi <bluca@debian.org> 
Sent: Monday, August 10, 2020 2:01 PM
To: Raslan Darawsheh <rasland@mellanox.com>
Cc: Slava Ovsiienko <viacheslavo@mellanox.com>; dpdk stable <stable@dpdk.org>
Subject: Re: patch 'net/mlx5: fix flow items size calculation' has been queued to stable release 19.11.4

On Mon, 2020-08-10 at 07:27 +0000, Raslan Darawsheh wrote:
> Hi Luca,
> 
> please be noted that with this change you'll get a compilation failure 
> when debug is enabled for MLX5, if we don't have this patch backported 
> before it http://patches.dpdk.org/patch/74534/
> 
> 
> Kindest regards
> Raslan Darawsheh

Thanks, that patch is included already as well, so everything should be good


Great!
Thanks for the update seems that I missed it from the tree.

Kindest regards,
Raslan Darawsheh

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

end of thread, other threads:[~2020-08-10 11:05 UTC | newest]

Thread overview: 241+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-24 11:57 [dpdk-stable] patch 'vhost: remove zero-copy and client mode restriction' has been queued to stable release 19.11.4 luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/ice: fix switch action number check' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: clear promiscuous on PF uninit' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: fix Tx less than 60 bytes' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: add RSS hash offload to Rx configuration' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: fix key length when configuring RSS' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/bnxt: fix performance for Arm' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/netvsc: fix warning when VF is removed' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/netvsc: do not query VF link state' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/netvsc: do not spin forever waiting for reply' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'app/testpmd: fix memory leak on error path' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: remove needless Tx queue initialization check' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: fix unreachable MPLS error path' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: fix secondary process resources release' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: fix interrupt installation timing' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/failsafe: fix RSS RETA size info' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: fix vectorized Rx burst termination' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: remove unsupported VLAN capabilities' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: fix VLAN strip configuration when setting PVID' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: fix VLAN tags reported in Rx' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/i40e: enable NEON Rx/Tx in meson' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'app/testpmd: fix stats error message' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'mbuf: remove unused next member in dynamic flag/field' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'test/mbuf: fix a dynamic flag log' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'eal/windows: fix symbol export' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'app/testpmd: fix error detection in MTU command' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: fix flow director error message' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: ignore function return on reset error path' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: fix unintended sign extension in fd operation' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/hns3: fix unintended sign extension in dump " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: fix typos in meter error messages' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: do not select legacy MPW implicitly' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: fix descriptors number adjustment' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/mlx5: fix LRO checksum' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/ice/base: fix return value' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/ice/base: fix memory leak on error path' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/ice/base: fix reference count on VSI list update' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/ice/base: fix initializing resource for field vector' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/cxgbe: fix CLIP leak in filter error path' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'net/cxgbe: fix double MPS alloc by flow validate and create' " luca.boccassi
2020-07-24 11:57 ` [dpdk-stable] patch 'meter: remove inline functions from export list' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'eal/linux: fix epoll fd list rebuild for interrupts' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'test/bpf: fix few small issues' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'bpf: fix add/sub min/max estimations' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'net: fix IPv4 checksum' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'examples: add flush after stats printing' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'sched: fix subport freeing' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'sched: fix 64-bit rate' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'bus/vmbus: fix ring buffer mapping' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'eal: remove redundant newline in alert message' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'bus/pci: fix VF memory access' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'mbuf: fix boundary check at dynamic field registration' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'mbuf: fix error code in dynamic field/flag " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'mbuf: fix free space update for dynamic field' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'mbuf: fix dynamic field dump log' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'doc: update build instructions in the Linux guide' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'build: fix drivers library path on Windows' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'pci: fix address domain format size' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'net/ice/base: fix VSI ID mask to 10 bits' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'net/mlx5: remove redundant newline from logs' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'net/qede: fix multicast drop in promiscuous mode' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'net/mvpp2: fix non-EAL thread support' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'eal/arm: add vcopyq intrinsic for aarch32' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'net/ixgbe: fix include of vector header file' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'bus/dpaa: fix iterating on a class type' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'bus/fslmc: " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'net/octeontx2: fix DMAC filtering' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'common/mlx5: fix code arrangement in tag allocation' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'net/mlx5: fix iterator type in Rx queue management' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'vhost: fix features definition location' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'test/ring: fix statistics in bulk enq/dequeue' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'test: fix build with ring PMD but no bond PMD' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'mem: fix 32-bit init config with meson' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'examples/eventdev: fix 32-bit coremask' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'event/octeontx2: fix device reconfigure' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'event/octeontx2: fix sub event type' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'devtools: fix path in forbidden token check' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'sched: fix port time rounding' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'lib: remind experimental status in headers' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'rawdev: remove remaining experimental tags' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'eal/armv8: fix timer frequency calibration with PMU' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'eal: fix lcore accessors for non-EAL threads' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'vfio: remove unused variable' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'eal: fix uuid header dependencies' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'test: fix rpath for drivers with meson' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'rawdev: allow getting info for unknown device' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'rawdev: fill NUMA socket ID in info' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'rawdev: export dump function in map file' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'cfgfile: fix stack buffer underflow' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'rib: add C++ include guard' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'service: fix lcore iteration' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'drivers/crypto: add missing OOP feature flag' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'test/crypto: fix asymmetric session mempool creation' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'common/cpt: fix encryption offset' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'crypto/qat: fix AES-XTS capabilities' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'crypto/dpaax_sec: fix 18-bit PDCP cases with HFN override' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'crypto/dpaax_sec: fix inline query for descriptors' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix HFN override' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'common/dpaax: fix 12-bit null auth case' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'eventdev: fix race condition on timer list counter' " luca.boccassi
2020-07-24 11:58 ` [dpdk-stable] patch 'eventdev: use C11 atomics for lcore timer armed flag' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'eventdev: remove redundant reset on timer cancel' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'eventdev: relax SMP barriers with C11 atomics' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'service: fix core mapping reset' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/ixgbe: report 10Mbps link speed for x553' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/iavf: fix uninitialized variable' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/ixgbe/base: remove dead code' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/iavf: fix RSS RETA after restart' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'common/octeontx2: fix crash on running procinfo' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/ice/base: fix GTP-U inner RSS IPv4 IPv6 co-exist' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/hns3: clear residual hardware configurations on init' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/hns3: fix Rx buffer size' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/hinic/base: check output of management sync channel' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/hinic/base: remove unused function parameters' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/hinic: fix setting promiscuous mode' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/ice: add input set byte number check' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/mlx5: fix flow META item validation' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/ice: fix error log in generic flow' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/i40e: fix getting EEPROM information' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'app/testpmd: use clock time in throughput calculation' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'app/testpmd: fix burst percentage " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/hns3: check multi-process action register result' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'ethdev: fix log type for some error messages' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'service: fix C++ linkage' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net: fix unneeded replacement of TCP checksum 0' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net: fix checksum on big endian CPUs' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'doc: add RIB and FIB into the API index' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'eal: fix parentheses in alignment macros' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'vhost: fix virtio ready flag check' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'bus/fslmc: fix getting FD error' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/dpaa: fix FD offset data type' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/bonding: fix socket ID check' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/netvsc: fix underflow when Rx external mbuf' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/ixgbe/base: fix host interface shadow RAM read' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/ixgbe/base: fix x550em 10G NIC link status' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/ixgbe/base: fix infinite recursion on PCIe link down' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'doc: fix a typo in mlx5 guide' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'ethdev: fix data room size verification in Rx queue setup' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'ethdev: fix VLAN offloads set if no relative capabilities' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'app/testpmd: fix CPU cycles per packet stats on Tx modes' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/nfp: fix RSS hash configuration reporting' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'drivers/net: fix exposing internal headers' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/bonding: fix LACP negotiation' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/bnxt: remove unused enum declaration' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/bnxt: fix unnecessary HWRM command' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/bnxt: fix flow error on filter creation' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/bnxt: fix freeing filters on flow creation failure' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'test/crypto: change cipher offset for ESN vector' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'examples/fips_validation: fix TDES interim callback' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'examples/fips_validation: fix parsing of TDES vectors' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'examples/fips_validation: fix count overwrite for TDES' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/ice/base: fix RSS removal for GTP-U' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/hns3: fix RSS configuration on empty RSS type' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/bonding: fix error code on device creation' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/af_packet: fix check of file descriptors' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/af_packet: fix memory leak on init failure' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/af_packet: fix munmap " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/bonding: fix MAC address when switching active port' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/bonding: fix MAC address when one port resets' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'net/i40e: fix queue pairs configuration in VF' " luca.boccassi
2020-07-24 11:59 ` [dpdk-stable] patch 'bus/fslmc: fix memory leak in secondary process' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'net/i40e: fix flow director Rx writeback packet' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'net/ice/base: fix memory leak on GTPU RSS' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'net/i40e: fix filter pctype' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'net/ixgbe: fix MAC control frame forward' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'net/ixgbe: fix flow control status' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'net/bonding: delete redundant code' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'net/i40e: report VLAN filter capability' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'net/e1000: report VLAN extend " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'net/e1000: fix crash on Tx done clean up' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'net/mlx5: fix UAR lock sharing for multiport devices' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'net/mlx5: fix HW counters path in switchdev mode' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'net/mlx5: fix VLAN pop with decap action validation' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'net/mlx5: fix VLAN push action on hairpin queue' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'vhost: fix double-free with zero-copy' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'net: fix pedantic build' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'net/sfc: do not enforce hash offload in RSS multi-queue' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'raw/ifpga/base: fix SPI transaction' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'raw/ifpga/base: fix NIOS SPI init' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'mempool: fix allocation in memzone during retry' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'doc: fix some typos in Linux guide' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'doc: fix typo in bbdev test " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'bus/vdev: fix a typo in doxygen comment' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'test/hash: move lock-free tests to perf tests' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'test: allow no-huge mode for fast-tests' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'doc: rebuild with meson whenever a file changes' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'build: always link whole DPDK static libraries' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'devtools: test static linkage with pkg-config' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'build/pkg-config: move pkg-config file creation' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'build/pkg-config: output drivers first for static build' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'build/pkg-config: improve static linking flags' " luca.boccassi
2020-07-24 12:00 ` [dpdk-stable] patch 'build/pkg-config: prevent overlinking' " luca.boccassi
2020-08-06  9:53 ` [dpdk-stable] patch 'hash: fix out-of-memory handling in hash creation' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'test/cycles: restore default delay callback' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'common/mlx5: fix void parameters in glue wrappers' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'event/dpaa: remove dead code' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'app/eventdev: fix capability check in pipeline ATQ test' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'event/dpaa2: add all-types queue capability flag' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'common/qat: fix uninitialized variable' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'crypto/armv8: remove debug option' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'crypto/armv8: use dedicated log type' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'net/ice: fix bytes statistics' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx5: fix flow items size calculation' " luca.boccassi
2020-08-10  7:27     ` Raslan Darawsheh
2020-08-10 11:00       ` Luca Boccassi
2020-08-10 11:05         ` Raslan Darawsheh
2020-08-06  9:53   ` [dpdk-stable] patch 'common/mlx5: fix queue doorbell record size' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx5: fix initialization of steering registers' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx5: fix crash in NVGRE item translation' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx5: remove ineffective increment in hairpin split' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx4: optimize stack memory size in probe' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx5: fix unnecessary init in mark conversion' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx5: fix VF MAC address set over BlueField' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'net/i40e: fix binding interrupt without MSI-X vector' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'net/i40e: fix flow director MSI-X resource allocation' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'net/qede: remove dead code' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'net/mlx5: fix metadata storing for NEON Rx' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'net/af_xdp: remove mempool freeing on umem destruction' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'net/i40e: enable QinQ stripping' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'net/ice/base: fix RSS interference' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'net/hinic: optimize Rx performance for x86' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'net/hinic/base: avoid system time jump' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'net/hinic: check memory allocations in flow creation' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'net/virtio-user: fix status management' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'net/ice: fix TCP checksum offload' " luca.boccassi
2020-08-06  9:53   ` [dpdk-stable] patch 'net/ice: fix memory leak when releasing VSI' " luca.boccassi
2020-08-06  9:54   ` [dpdk-stable] patch 'net/ice: add memory allocation check in RSS init' " luca.boccassi
2020-08-06  9:54   ` [dpdk-stable] patch 'net/ice: calculate TCP header size for offload' " luca.boccassi
2020-08-06  9:54   ` [dpdk-stable] patch 'net/virtio-user: check tap system call setting' " luca.boccassi
2020-08-06  9:54   ` [dpdk-stable] patch 'net/kni: set packet input port in Rx' " luca.boccassi
2020-08-06  9:54   ` [dpdk-stable] patch 'examples/packet_ordering: use proper exit method' " luca.boccassi
2020-08-06  9:54   ` [dpdk-stable] patch 'net/netvsc: fix crash during Tx' " luca.boccassi
2020-08-06  9:54   ` [dpdk-stable] patch 'doc: fix ethtool app path' " luca.boccassi
2020-08-06  9:54   ` [dpdk-stable] patch 'net/bonding: fix dead loop on RSS RETA update' " luca.boccassi
2020-08-06  9:54   ` [dpdk-stable] patch 'net/netvsc: fix chimney index' " luca.boccassi
2020-08-06  9:54   ` [dpdk-stable] patch 'net/i40e: remove duplicate tunnel type check' " luca.boccassi
2020-08-06  9:54   ` [dpdk-stable] patch 'net/ice: fix Tx hang with TSO' " luca.boccassi
2020-08-06  9:54   ` [dpdk-stable] patch 'net/ice: revert fake TSO fixes' " luca.boccassi
2020-08-07 18:16     ` [dpdk-stable] patch 'net/i40e: support aarch32' " luca.boccassi
2020-08-10 11:04       ` [dpdk-stable] patch 'kni: fix reference to master/slave process' " luca.boccassi
2020-08-10 11:04         ` [dpdk-stable] patch 'doc: fix reference to master " luca.boccassi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).