patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6
@ 2019-12-03 18:26 Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/sfc: fix missing notification on link status change' " Kevin Traynor
                   ` (63 more replies)
  0 siblings, 64 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/7c955e08169b43ff6afca1b254f29b3231bba601

Thanks.

Kevin.

---
From 7c955e08169b43ff6afca1b254f29b3231bba601 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Thu, 12 Sep 2019 17:42:12 +0100
Subject: [PATCH] ethdev: remove redundant device info cleanup before get

[ upstream commit 78402e16ec08db79a2e380466ff41dd939541265 ]

rte_eth_dev_info_get() always fills in device information memory
with zeros on entry.

Fixes: b6719879855d ("ethdev: avoid getting uninitialized info for bad port")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/cmdline.c             | 4 ----
 app/test-pmd/config.c              | 2 --
 examples/ethtool/lib/rte_ethtool.c | 2 --
 examples/kni/main.c                | 1 -
 4 files changed, 9 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index fe9792643..f7f590b92 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -2252,5 +2252,4 @@ cmd_config_rss_hash_key_parsed(void *parsed_result,
 	uint32_t key_len;
 
-	memset(&dev_info, 0, sizeof(dev_info));
 	rte_eth_dev_info_get(res->port_id, &dev_info);
 	if (dev_info.hash_key_size > 0 &&
@@ -2785,5 +2784,4 @@ cmd_set_rss_reta_parsed(void *parsed_result,
 	struct cmd_config_rss_reta *res = parsed_result;
 
-	memset(&dev_info, 0, sizeof(dev_info));
 	rte_eth_dev_info_get(res->port_id, &dev_info);
 	if (dev_info.reta_size == 0) {
@@ -2905,5 +2903,4 @@ cmd_showport_reta_parsed(void *parsed_result,
 	uint16_t max_reta_size;
 
-	memset(&dev_info, 0, sizeof(dev_info));
 	rte_eth_dev_info_get(res->port_id, &dev_info);
 	max_reta_size = RTE_MIN(dev_info.reta_size, ETH_RSS_RETA_SIZE_512);
@@ -10932,5 +10929,4 @@ cmd_flow_director_filter_parsed(void *parsed_result,
 			struct rte_eth_dev_info dev_info;
 
-			memset(&dev_info, 0, sizeof(dev_info));
 			rte_eth_dev_info_get(res->port_id, &dev_info);
 			errno = 0;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 4870b9004..1f61e4c2d 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -407,5 +407,4 @@ port_infos_display(portid_t port_id)
 	port = &ports[port_id];
 	rte_eth_link_get_nowait(port_id, &link);
-	memset(&dev_info, 0, sizeof(dev_info));
 	rte_eth_dev_info_get(port_id, &dev_info);
 	printf("\n%s Infos for port %-2d %s\n",
@@ -1545,5 +1544,4 @@ ring_rx_descriptor_display(const struct rte_memzone *ring_mz,
 	struct rte_eth_dev_info dev_info;
 
-	memset(&dev_info, 0, sizeof(dev_info));
 	rte_eth_dev_info_get(port_id, &dev_info);
 	if (strstr(dev_info.driver_name, "i40e") != NULL) {
diff --git a/examples/ethtool/lib/rte_ethtool.c b/examples/ethtool/lib/rte_ethtool.c
index e6a2e88c7..63344376c 100644
--- a/examples/ethtool/lib/rte_ethtool.c
+++ b/examples/ethtool/lib/rte_ethtool.c
@@ -41,5 +41,4 @@ rte_ethtool_get_drvinfo(uint16_t port_id, struct ethtool_drvinfo *drvinfo)
 		       "the minimum size should be %d\n", ret);
 
-	memset(&dev_info, 0, sizeof(dev_info));
 	rte_eth_dev_info_get(port_id, &dev_info);
 
@@ -373,5 +372,4 @@ rte_ethtool_net_set_rx_mode(uint16_t port_id)
 	uint16_t vf;
 
-	memset(&dev_info, 0, sizeof(dev_info));
 	rte_eth_dev_info_get(port_id, &dev_info);
 	num_vfs = dev_info.max_vfs;
diff --git a/examples/kni/main.c b/examples/kni/main.c
index a58774a33..5dff7d3b5 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -901,5 +901,4 @@ kni_alloc(uint16_t port_id)
 			const struct rte_bus *bus = NULL;
 
-			memset(&dev_info, 0, sizeof(dev_info));
 			rte_eth_dev_info_get(port_id, &dev_info);
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:51.848811423 +0000
+++ 0001-ethdev-remove-redundant-device-info-cleanup-before-g.patch	2019-12-03 17:29:51.673751557 +0000
@@ -1 +1 @@
-From 78402e16ec08db79a2e380466ff41dd939541265 Mon Sep 17 00:00:00 2001
+From 7c955e08169b43ff6afca1b254f29b3231bba601 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 78402e16ec08db79a2e380466ff41dd939541265 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index b6bc34b4d..e4dda93a4 100644
+index fe9792643..f7f590b92 100644
@@ -25 +26 @@
-@@ -2320,5 +2320,4 @@ cmd_config_rss_hash_key_parsed(void *parsed_result,
+@@ -2252,5 +2252,4 @@ cmd_config_rss_hash_key_parsed(void *parsed_result,
@@ -31 +32 @@
-@@ -2853,5 +2852,4 @@ cmd_set_rss_reta_parsed(void *parsed_result,
+@@ -2785,5 +2784,4 @@ cmd_set_rss_reta_parsed(void *parsed_result,
@@ -37 +38 @@
-@@ -2973,5 +2971,4 @@ cmd_showport_reta_parsed(void *parsed_result,
+@@ -2905,5 +2903,4 @@ cmd_showport_reta_parsed(void *parsed_result,
@@ -43 +44 @@
-@@ -11092,5 +11089,4 @@ cmd_flow_director_filter_parsed(void *parsed_result,
+@@ -10932,5 +10929,4 @@ cmd_flow_director_filter_parsed(void *parsed_result,
@@ -50 +51 @@
-index 1a5a5c13c..523b3d376 100644
+index 4870b9004..1f61e4c2d 100644
@@ -53 +54 @@
-@@ -479,5 +479,4 @@ port_infos_display(portid_t port_id)
+@@ -407,5 +407,4 @@ port_infos_display(portid_t port_id)
@@ -59 +60 @@
-@@ -1624,5 +1623,4 @@ ring_rx_descriptor_display(const struct rte_memzone *ring_mz,
+@@ -1545,5 +1544,4 @@ ring_rx_descriptor_display(const struct rte_memzone *ring_mz,
@@ -66 +67 @@
-index 571c4e5aa..fd1692daa 100644
+index e6a2e88c7..63344376c 100644
@@ -69 +70 @@
-@@ -42,5 +42,4 @@ rte_ethtool_get_drvinfo(uint16_t port_id, struct ethtool_drvinfo *drvinfo)
+@@ -41,5 +41,4 @@ rte_ethtool_get_drvinfo(uint16_t port_id, struct ethtool_drvinfo *drvinfo)
@@ -82 +83 @@
-index 4710d7176..17f695ea9 100644
+index a58774a33..5dff7d3b5 100644
@@ -85,2 +86,2 @@
-@@ -899,5 +899,4 @@ kni_alloc(uint16_t port_id)
- 			struct rte_eth_dev_info dev_info;
+@@ -901,5 +901,4 @@ kni_alloc(uint16_t port_id)
+ 			const struct rte_bus *bus = NULL;


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

* [dpdk-stable] patch 'net/sfc: fix missing notification on link status change' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'vhost: fix slave request fd leak' " Kevin Traynor
                   ` (62 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Shuki Katzenelson, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/c0b4d8dac51ffd3d65d987fb2186a06dbcedb30b

Thanks.

Kevin.

---
From c0b4d8dac51ffd3d65d987fb2186a06dbcedb30b Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Fri, 6 Sep 2019 11:49:49 +0100
Subject: [PATCH] net/sfc: fix missing notification on link status change

[ upstream commit 282b72cd725ac6f5a32558253ad80e905c3b4028 ]

rte_eth_linkstatus_set() returns 0 when link up status changes.

Fixes: 4abe903e5078 ("net/sfc: use link status helper functions")

Reported-by: Shuki Katzenelson <shuki@lightbitslabs.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_ev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_ev.c b/drivers/net/sfc/sfc_ev.c
index f93d30e5c..bb98cba58 100644
--- a/drivers/net/sfc/sfc_ev.c
+++ b/drivers/net/sfc/sfc_ev.c
@@ -415,5 +415,5 @@ sfc_ev_link_change(void *arg, efx_link_mode_t link_mode)
 
 	sfc_port_link_mode_to_info(link_mode, &new_link);
-	if (rte_eth_linkstatus_set(sa->eth_dev, &new_link))
+	if (rte_eth_linkstatus_set(sa->eth_dev, &new_link) == 0)
 		evq->sa->port.lsc_seq++;
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:51.921039318 +0000
+++ 0002-net-sfc-fix-missing-notification-on-link-status-chan.patch	2019-12-03 17:29:51.674751536 +0000
@@ -1 +1 @@
-From 282b72cd725ac6f5a32558253ad80e905c3b4028 Mon Sep 17 00:00:00 2001
+From c0b4d8dac51ffd3d65d987fb2186a06dbcedb30b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 282b72cd725ac6f5a32558253ad80e905c3b4028 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 0f216da5d..6a58a2d97 100644
+index f93d30e5c..bb98cba58 100644
@@ -21 +22 @@
-@@ -421,5 +421,5 @@ sfc_ev_link_change(void *arg, efx_link_mode_t link_mode)
+@@ -415,5 +415,5 @@ sfc_ev_link_change(void *arg, efx_link_mode_t link_mode)


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

* [dpdk-stable] patch 'vhost: fix slave request fd leak' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/sfc: fix missing notification on link status change' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/bonding: fix link speed update in broadcast mode' " Kevin Traynor
                   ` (61 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/314b42e9b9099064025962aa6f5f66b1ca0bef5c

Thanks.

Kevin.

---
From 314b42e9b9099064025962aa6f5f66b1ca0bef5c Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Thu, 5 Sep 2019 19:01:25 +0800
Subject: [PATCH] vhost: fix slave request fd leak

[ upstream commit 761d57651c51365354cefb624883fccf62aee67d ]

We need to close the old slave request fd if any first
before taking the new one.

Fixes: 275c3f944730 ("vhost: support slave requests channel")

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost_user.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 530823ecd..f0ad550c6 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1673,4 +1673,7 @@ vhost_user_set_req_fd(struct virtio_net **pdev, struct VhostUserMsg *msg,
 	}
 
+	if (dev->slave_req_fd >= 0)
+		close(dev->slave_req_fd);
+
 	dev->slave_req_fd = fd;
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:51.969461151 +0000
+++ 0003-vhost-fix-slave-request-fd-leak.patch	2019-12-03 17:29:51.676751494 +0000
@@ -1 +1 @@
-From 761d57651c51365354cefb624883fccf62aee67d Mon Sep 17 00:00:00 2001
+From 314b42e9b9099064025962aa6f5f66b1ca0bef5c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 761d57651c51365354cefb624883fccf62aee67d ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 0b72648a5..f46843610 100644
+index 530823ecd..f0ad550c6 100644
@@ -22 +23 @@
-@@ -1565,4 +1565,7 @@ vhost_user_set_req_fd(struct virtio_net **pdev, struct VhostUserMsg *msg,
+@@ -1673,4 +1673,7 @@ vhost_user_set_req_fd(struct virtio_net **pdev, struct VhostUserMsg *msg,


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

* [dpdk-stable] patch 'net/bonding: fix link speed update in broadcast mode' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/sfc: fix missing notification on link status change' " Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'vhost: fix slave request fd leak' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'app/testpmd: fix crash on port reset' " Kevin Traynor
                   ` (60 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Igor Romanov; +Cc: Andrew Rybchenko, Chas Williams, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/fa811f63aaaeab567528bb334eef503f8ef06f5a

Thanks.

Kevin.

---
From fa811f63aaaeab567528bb334eef503f8ef06f5a Mon Sep 17 00:00:00 2001
From: Igor Romanov <igor.romanov@oktetlabs.ru>
Date: Tue, 10 Sep 2019 09:25:41 +0100
Subject: [PATCH] net/bonding: fix link speed update in broadcast mode

[ upstream commit db3216e76609647ce8dc256d478c8cc7095a23d4 ]

Fix the issue that the link speed of the bond device was set to the
link speed of the first active slave in broadcast mode.

Set the link speed of the bond device to the minimum value across
all of the slaves in that case.

Fixes: deba8a2f8b0b ("net/bonding: fix link properties management")

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Chas Williams <chas3@att.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 2fc19fbb1..c1cbf6258 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2347,6 +2347,6 @@ bond_ethdev_link_update(struct rte_eth_dev *ethdev, int wait_to_complete)
 		 * greater than this are attempted
 		 */
-		for (idx = 1; idx < bond_ctx->active_slave_count; idx++) {
-			link_update(bond_ctx->active_slaves[0],	&slave_link);
+		for (idx = 0; idx < bond_ctx->active_slave_count; idx++) {
+			link_update(bond_ctx->active_slaves[idx], &slave_link);
 
 			if (slave_link.link_speed <
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:52.026314301 +0000
+++ 0004-net-bonding-fix-link-speed-update-in-broadcast-mode.patch	2019-12-03 17:29:51.678751452 +0000
@@ -1 +1 @@
-From db3216e76609647ce8dc256d478c8cc7095a23d4 Mon Sep 17 00:00:00 2001
+From fa811f63aaaeab567528bb334eef503f8ef06f5a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit db3216e76609647ce8dc256d478c8cc7095a23d4 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 5ff9fcbaf..4c517e676 100644
+index 2fc19fbb1..c1cbf6258 100644
@@ -26 +27 @@
-@@ -2396,6 +2396,6 @@ bond_ethdev_link_update(struct rte_eth_dev *ethdev, int wait_to_complete)
+@@ -2347,6 +2347,6 @@ bond_ethdev_link_update(struct rte_eth_dev *ethdev, int wait_to_complete)


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

* [dpdk-stable] patch 'app/testpmd: fix crash on port reset' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (2 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/bonding: fix link speed update in broadcast mode' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'vhost: forbid reallocation when running' " Kevin Traynor
                   ` (59 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Shougang Wang; +Cc: Bernard Iremonger, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/e128cc23aa7348b4ab03a7a449259703f91d2130

Thanks.

Kevin.

---
From e128cc23aa7348b4ab03a7a449259703f91d2130 Mon Sep 17 00:00:00 2001
From: Shougang Wang <shougangx.wang@intel.com>
Date: Tue, 24 Sep 2019 04:49:03 +0000
Subject: [PATCH] app/testpmd: fix crash on port reset

[ upstream commit 1cde1b9a9b4dbf31cb5e5ccdfc5da3cb079f43a2 ]

port reset cause crash when ports are not stopped. Fixed by refusing the
reset when port is not stopped.

Fixes: 97f1e196799f ("app/testpmd: add port reset command")

Signed-off-by: Shougang Wang <shougangx.wang@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test-pmd/cmdline.c                      | 3 +++
 app/test-pmd/testpmd.c                      | 6 ++++++
 doc/guides/testpmd_app_ug/testpmd_funcs.rst | 9 +++++++++
 3 files changed, 18 insertions(+)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index f7f590b92..7f13309ad 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -777,4 +777,7 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"    Close all ports or port_id.\n\n"
 
+			"port reset (port_id|all)\n"
+			"    Reset all ports or port_id.\n\n"
+
 			"port attach (ident)\n"
 			"    Attach physical or virtual dev by pci address or virtual device name\n\n"
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 83b5e42a3..81f6d4f96 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2247,4 +2247,10 @@ reset_port(portid_t pid)
 		return;
 
+	if ((pid == (portid_t)RTE_PORT_ALL && !all_ports_stopped()) ||
+		(pid != (portid_t)RTE_PORT_ALL && !port_is_stopped(pid))) {
+		printf("Can not reset port(s), please stop port(s) first.\n");
+		return;
+	}
+
 	printf("Resetting ports...\n");
 
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 787355bae..3db8c4882 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -1952,4 +1952,13 @@ Close all ports or a specific port::
    testpmd> port close (port_id|all)
 
+port reset
+~~~~~~~~~~
+
+Reset all ports or a specific port::
+
+   testpmd> port reset (port_id|all)
+
+User should stop port(s) before resetting and (re-)start after reset.
+
 port config - queue ring size
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:52.093565250 +0000
+++ 0005-app-testpmd-fix-crash-on-port-reset.patch	2019-12-03 17:29:51.698751036 +0000
@@ -1 +1 @@
-From 1cde1b9a9b4dbf31cb5e5ccdfc5da3cb079f43a2 Mon Sep 17 00:00:00 2001
+From e128cc23aa7348b4ab03a7a449259703f91d2130 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1cde1b9a9b4dbf31cb5e5ccdfc5da3cb079f43a2 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index dd4e6e602..def471d97 100644
+index f7f590b92..7f13309ad 100644
@@ -24 +25 @@
-@@ -759,4 +759,7 @@ static void cmd_help_long_parsed(void *parsed_result,
+@@ -777,4 +777,7 @@ static void cmd_help_long_parsed(void *parsed_result,
@@ -33 +34 @@
-index 1e3dc44a1..5701f3141 100644
+index 83b5e42a3..81f6d4f96 100644
@@ -36 +37 @@
-@@ -2362,4 +2362,10 @@ reset_port(portid_t pid)
+@@ -2247,4 +2247,10 @@ reset_port(portid_t pid)
@@ -48 +49 @@
-index 67f4339ca..cba5ba1b8 100644
+index 787355bae..3db8c4882 100644
@@ -51 +52 @@
-@@ -2042,4 +2042,13 @@ Close all ports or a specific port::
+@@ -1952,4 +1952,13 @@ Close all ports or a specific port::


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

* [dpdk-stable] patch 'vhost: forbid reallocation when running' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (3 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'app/testpmd: fix crash on port reset' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'vhost: fix vring address handling during live migration' " Kevin Traynor
                   ` (58 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Yinan Wang, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/e6d285e10987bedbd43f7a2e663448ca159b1f45

Thanks.

Kevin.

---
From e6d285e10987bedbd43f7a2e663448ca159b1f45 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Mon, 19 Aug 2019 19:34:55 +0800
Subject: [PATCH] vhost: forbid reallocation when running

[ upstream commit 37f7c1b609b67d26cbdd4c16a3ebc85e8d63e6dd ]

When the device has been started, don't do the reallocation anymore.
Otherwise the pointers used in application threads can be invalidated
without proper protection. Instead of introducing a global lock to
protect the change of device pointers which will hurt the performance,
let's just do the reallocation during setup.

Fixes: af295ad4698c ("vhost: realloc device and queues to same numa node as vring desc")

Reported-by: Yinan Wang <yinan.wang@intel.com>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost_user.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index f0ad550c6..15688ded5 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -466,4 +466,7 @@ numa_realloc(struct virtio_net *dev, int index)
 	int ret;
 
+	if (dev->flags & VIRTIO_DEV_RUNNING)
+		return dev;
+
 	old_dev = dev;
 	vq = old_vq = dev->virtqueue[index];
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:52.170042822 +0000
+++ 0006-vhost-forbid-reallocation-when-running.patch	2019-12-03 17:29:51.699751015 +0000
@@ -1 +1 @@
-From 37f7c1b609b67d26cbdd4c16a3ebc85e8d63e6dd Mon Sep 17 00:00:00 2001
+From e6d285e10987bedbd43f7a2e663448ca159b1f45 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 37f7c1b609b67d26cbdd4c16a3ebc85e8d63e6dd ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index f46843610..e4ae027a0 100644
+index f0ad550c6..15688ded5 100644
@@ -26 +27 @@
-@@ -411,4 +411,7 @@ numa_realloc(struct virtio_net *dev, int index)
+@@ -466,4 +466,7 @@ numa_realloc(struct virtio_net *dev, int index)


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

* [dpdk-stable] patch 'vhost: fix vring address handling during live migration' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (4 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'vhost: forbid reallocation when running' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'vhost: protect vring access done by application' " Kevin Traynor
                   ` (57 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Yilong Lv, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/9e564f00737fd16e042c1a68a8ddd5b3d4eb88fa

Thanks.

Kevin.

---
From 9e564f00737fd16e042c1a68a8ddd5b3d4eb88fa Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Mon, 19 Aug 2019 19:34:56 +0800
Subject: [PATCH] vhost: fix vring address handling during live migration

[ upstream commit 72d002b3ebda4686306cc5124b7a8bdf627dba0a ]

When live migration starts, QEMU will set ring addrs again for
each virtqueue. In this case, we should try to translate ring
addrs after we invalidating the ring, otherwise virtqueues can
be enabled with the addrs untranslated. Besides, also leverage
the access_ok flag in non-IOMMU case to prevent the data path
accessing invalidated virtqueues.

Fixes: 5a4933e56be4 ("vhost: postpone ring address translations at kick time only")

Reported-by: Yilong Lv <lvyilong.lyl@alibaba-inc.com>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost.c      |  3 +--
 lib/librte_vhost/vhost_user.c | 12 ++++++++++--
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index 488cf1694..0b5ee0307 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -195,5 +195,5 @@ vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq)
 
 	if (!(dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)))
-		goto out;
+		return -1;
 
 	if (vq_is_packed(dev)) {
@@ -204,5 +204,4 @@ vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq)
 			return -1;
 	}
-out:
 	vq->access_ok = 1;
 
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 15688ded5..bb74d0b93 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -678,4 +678,5 @@ translate_ring_addresses(struct virtio_net *dev, int vq_index)
 		}
 
+		vq->access_ok = 1;
 		return dev;
 	}
@@ -736,4 +737,5 @@ translate_ring_addresses(struct virtio_net *dev, int vq_index)
 
 	vq->log_guest_addr = addr->log_guest_addr;
+	vq->access_ok = 1;
 
 	VHOST_LOG_DEBUG(VHOST_CONFIG, "(%d) mapped address desc: %p\n",
@@ -760,4 +762,5 @@ vhost_user_set_vring_addr(struct virtio_net **pdev, struct VhostUserMsg *msg,
 	struct vhost_virtqueue *vq;
 	struct vhost_vring_addr *addr = &msg->payload.addr;
+	bool access_ok;
 
 	if (validate_msg_fds(msg, 0) != 0)
@@ -770,4 +773,6 @@ vhost_user_set_vring_addr(struct virtio_net **pdev, struct VhostUserMsg *msg,
 	vq = dev->virtqueue[msg->payload.addr.index];
 
+	access_ok = vq->access_ok;
+
 	/*
 	 * Rings addresses should not be interpreted as long as the ring is not
@@ -778,6 +783,7 @@ vhost_user_set_vring_addr(struct virtio_net **pdev, struct VhostUserMsg *msg,
 	vring_invalidate(dev, vq);
 
-	if (vq->enabled && (dev->features &
-				(1ULL << VHOST_USER_F_PROTOCOL_FEATURES))) {
+	if ((vq->enabled && (dev->features &
+				(1ULL << VHOST_USER_F_PROTOCOL_FEATURES))) ||
+			access_ok) {
 		dev = translate_ring_addresses(dev, msg->payload.addr.index);
 		if (!dev)
@@ -1412,4 +1418,6 @@ vhost_user_get_vring_base(struct virtio_net **pdev,
 	msg->fd_num = 0;
 
+	vring_invalidate(dev, vq);
+
 	return VH_RESULT_REPLY;
 }
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:52.229861657 +0000
+++ 0007-vhost-fix-vring-address-handling-during-live-migrati.patch	2019-12-03 17:29:51.701750973 +0000
@@ -1 +1 @@
-From 72d002b3ebda4686306cc5124b7a8bdf627dba0a Mon Sep 17 00:00:00 2001
+From 9e564f00737fd16e042c1a68a8ddd5b3d4eb88fa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 72d002b3ebda4686306cc5124b7a8bdf627dba0a ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 981837b5d..77be16069 100644
+index 488cf1694..0b5ee0307 100644
@@ -28 +29 @@
-@@ -359,5 +359,5 @@ vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq)
+@@ -195,5 +195,5 @@ vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq)
@@ -35 +36 @@
-@@ -368,5 +368,4 @@ vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq)
+@@ -204,5 +204,4 @@ vring_translate(struct virtio_net *dev, struct vhost_virtqueue *vq)
@@ -42 +43 @@
-index e4ae027a0..3d2db6edf 100644
+index 15688ded5..bb74d0b93 100644
@@ -45 +46 @@
-@@ -623,4 +623,5 @@ translate_ring_addresses(struct virtio_net *dev, int vq_index)
+@@ -678,4 +678,5 @@ translate_ring_addresses(struct virtio_net *dev, int vq_index)
@@ -51 +52 @@
-@@ -681,4 +682,5 @@ translate_ring_addresses(struct virtio_net *dev, int vq_index)
+@@ -736,4 +737,5 @@ translate_ring_addresses(struct virtio_net *dev, int vq_index)
@@ -57 +58 @@
-@@ -705,4 +707,5 @@ vhost_user_set_vring_addr(struct virtio_net **pdev, struct VhostUserMsg *msg,
+@@ -760,4 +762,5 @@ vhost_user_set_vring_addr(struct virtio_net **pdev, struct VhostUserMsg *msg,
@@ -62,2 +63,2 @@
- 	if (dev->mem == NULL)
-@@ -712,4 +715,6 @@ vhost_user_set_vring_addr(struct virtio_net **pdev, struct VhostUserMsg *msg,
+ 	if (validate_msg_fds(msg, 0) != 0)
+@@ -770,4 +773,6 @@ vhost_user_set_vring_addr(struct virtio_net **pdev, struct VhostUserMsg *msg,
@@ -70 +71 @@
-@@ -720,6 +725,7 @@ vhost_user_set_vring_addr(struct virtio_net **pdev, struct VhostUserMsg *msg,
+@@ -778,6 +783,7 @@ vhost_user_set_vring_addr(struct virtio_net **pdev, struct VhostUserMsg *msg,
@@ -80 +81 @@
-@@ -1326,4 +1332,6 @@ vhost_user_get_vring_base(struct virtio_net **pdev,
+@@ -1412,4 +1418,6 @@ vhost_user_get_vring_base(struct virtio_net **pdev,
@@ -85 +86 @@
- 	return RTE_VHOST_MSG_RESULT_REPLY;
+ 	return VH_RESULT_REPLY;


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

* [dpdk-stable] patch 'vhost: protect vring access done by application' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (5 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'vhost: fix vring address handling during live migration' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/vhost: fix redundant queue state event' " Kevin Traynor
                   ` (56 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Peng He, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/b0818bac8e25cf4bd024673956b52609dae1b8ba

Thanks.

Kevin.

---
From b0818bac8e25cf4bd024673956b52609dae1b8ba Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Mon, 19 Aug 2019 19:34:57 +0800
Subject: [PATCH] vhost: protect vring access done by application

[ upstream commit 4e0de8dac8531b82d4c328791a67f49eadfed5f0 ]

Besides the enqueue/dequeue API, other APIs of the builtin net
backend should also be protected.

Fixes: a3688046995f ("vhost: protect active rings from async ring changes")

Reported-by: Peng He <xnhp0320@icloud.com>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost.c | 50 +++++++++++++++++++++++++++++++---------
 1 file changed, 39 insertions(+), 11 deletions(-)

diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index 0b5ee0307..f7d132cd4 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -635,4 +635,5 @@ rte_vhost_avail_entries(int vid, uint16_t queue_id)
 	struct virtio_net *dev;
 	struct vhost_virtqueue *vq;
+	uint16_t ret = 0;
 
 	dev = get_device(vid);
@@ -641,14 +642,24 @@ rte_vhost_avail_entries(int vid, uint16_t queue_id)
 
 	vq = dev->virtqueue[queue_id];
-	if (!vq->enabled)
-		return 0;
 
-	return *(volatile uint16_t *)&vq->avail->idx - vq->last_used_idx;
+	rte_spinlock_lock(&vq->access_lock);
+
+	if (unlikely(!vq->enabled || vq->avail == NULL))
+		goto out;
+
+	ret = *(volatile uint16_t *)&vq->avail->idx - vq->last_used_idx;
+
+out:
+	rte_spinlock_unlock(&vq->access_lock);
+	return ret;
 }
 
-static inline void
+static inline int
 vhost_enable_notify_split(struct virtio_net *dev,
 		struct vhost_virtqueue *vq, int enable)
 {
+	if (vq->used == NULL)
+		return -1;
+
 	if (!(dev->features & (1ULL << VIRTIO_RING_F_EVENT_IDX))) {
 		if (enable)
@@ -660,7 +671,8 @@ vhost_enable_notify_split(struct virtio_net *dev,
 			vhost_avail_event(vq) = vq->last_avail_idx;
 	}
+	return 0;
 }
 
-static inline void
+static inline int
 vhost_enable_notify_packed(struct virtio_net *dev,
 		struct vhost_virtqueue *vq, int enable)
@@ -668,7 +680,10 @@ vhost_enable_notify_packed(struct virtio_net *dev,
 	uint16_t flags;
 
+	if (vq->device_event == NULL)
+		return -1;
+
 	if (!enable) {
 		vq->device_event->flags = VRING_EVENT_F_DISABLE;
-		return;
+		return 0;
 	}
 
@@ -683,4 +698,5 @@ vhost_enable_notify_packed(struct virtio_net *dev,
 
 	vq->device_event->flags = flags;
+	return 0;
 }
 
@@ -690,4 +706,5 @@ rte_vhost_enable_guest_notification(int vid, uint16_t queue_id, int enable)
 	struct virtio_net *dev = get_device(vid);
 	struct vhost_virtqueue *vq;
+	int ret;
 
 	if (!dev)
@@ -696,10 +713,14 @@ rte_vhost_enable_guest_notification(int vid, uint16_t queue_id, int enable)
 	vq = dev->virtqueue[queue_id];
 
+	rte_spinlock_lock(&vq->access_lock);
+
 	if (vq_is_packed(dev))
-		vhost_enable_notify_packed(dev, vq, enable);
+		ret = vhost_enable_notify_packed(dev, vq, enable);
 	else
-		vhost_enable_notify_split(dev, vq, enable);
+		ret = vhost_enable_notify_split(dev, vq, enable);
 
-	return 0;
+	rte_spinlock_unlock(&vq->access_lock);
+
+	return ret;
 }
 
@@ -740,4 +761,5 @@ rte_vhost_rx_queue_count(int vid, uint16_t qid)
 	struct virtio_net *dev;
 	struct vhost_virtqueue *vq;
+	uint16_t ret = 0;
 
 	dev = get_device(vid);
@@ -755,8 +777,14 @@ rte_vhost_rx_queue_count(int vid, uint16_t qid)
 		return 0;
 
+	rte_spinlock_lock(&vq->access_lock);
+
 	if (unlikely(vq->enabled == 0 || vq->avail == NULL))
-		return 0;
+		goto out;
 
-	return *((volatile uint16_t *)&vq->avail->idx) - vq->last_avail_idx;
+	ret = *((volatile uint16_t *)&vq->avail->idx) - vq->last_avail_idx;
+
+out:
+	rte_spinlock_unlock(&vq->access_lock);
+	return ret;
 }
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:52.286908156 +0000
+++ 0008-vhost-protect-vring-access-done-by-application.patch	2019-12-03 17:29:51.702750953 +0000
@@ -1 +1 @@
-From 4e0de8dac8531b82d4c328791a67f49eadfed5f0 Mon Sep 17 00:00:00 2001
+From b0818bac8e25cf4bd024673956b52609dae1b8ba Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4e0de8dac8531b82d4c328791a67f49eadfed5f0 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 77be16069..cea44df8c 100644
+index 0b5ee0307..f7d132cd4 100644
@@ -23 +24 @@
-@@ -786,4 +786,5 @@ rte_vhost_avail_entries(int vid, uint16_t queue_id)
+@@ -635,4 +635,5 @@ rte_vhost_avail_entries(int vid, uint16_t queue_id)
@@ -29 +30 @@
-@@ -792,14 +793,24 @@ rte_vhost_avail_entries(int vid, uint16_t queue_id)
+@@ -641,14 +642,24 @@ rte_vhost_avail_entries(int vid, uint16_t queue_id)
@@ -58 +59 @@
-@@ -811,7 +822,8 @@ vhost_enable_notify_split(struct virtio_net *dev,
+@@ -660,7 +671,8 @@ vhost_enable_notify_split(struct virtio_net *dev,
@@ -68 +69 @@
-@@ -819,7 +831,10 @@ vhost_enable_notify_packed(struct virtio_net *dev,
+@@ -668,7 +680,10 @@ vhost_enable_notify_packed(struct virtio_net *dev,
@@ -80 +81 @@
-@@ -834,4 +849,5 @@ vhost_enable_notify_packed(struct virtio_net *dev,
+@@ -683,4 +698,5 @@ vhost_enable_notify_packed(struct virtio_net *dev,
@@ -86 +87 @@
-@@ -841,4 +857,5 @@ rte_vhost_enable_guest_notification(int vid, uint16_t queue_id, int enable)
+@@ -690,4 +706,5 @@ rte_vhost_enable_guest_notification(int vid, uint16_t queue_id, int enable)
@@ -92 +93 @@
-@@ -847,10 +864,14 @@ rte_vhost_enable_guest_notification(int vid, uint16_t queue_id, int enable)
+@@ -696,10 +713,14 @@ rte_vhost_enable_guest_notification(int vid, uint16_t queue_id, int enable)
@@ -110 +111 @@
-@@ -891,4 +912,5 @@ rte_vhost_rx_queue_count(int vid, uint16_t qid)
+@@ -740,4 +761,5 @@ rte_vhost_rx_queue_count(int vid, uint16_t qid)
@@ -113 +114 @@
-+	uint32_t ret = 0;
++	uint16_t ret = 0;
@@ -116 +117 @@
-@@ -906,8 +928,14 @@ rte_vhost_rx_queue_count(int vid, uint16_t qid)
+@@ -755,8 +777,14 @@ rte_vhost_rx_queue_count(int vid, uint16_t qid)


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

* [dpdk-stable] patch 'net/vhost: fix redundant queue state event' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (6 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'vhost: protect vring access done by application' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'vhost: fix vring memory partially mapped' " Kevin Traynor
                   ` (55 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Noa Ezra; +Cc: Matan Azrad, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/7cc59d5a0c085e4e4d2556525615f0b3084441d2

Thanks.

Kevin.

---
From 7cc59d5a0c085e4e4d2556525615f0b3084441d2 Mon Sep 17 00:00:00 2001
From: Noa Ezra <noae@mellanox.com>
Date: Thu, 20 Jun 2019 06:33:03 +0000
Subject: [PATCH] net/vhost: fix redundant queue state event

[ upstream commit f2f0577eff3d13e761996c7390a244963b433bdc ]

In some situations, when a virtual machine is starting,
vring_state_changed can be called while there was no change in the
queue state. This fix makes sure that there was really a change in the
queue state before calling the callback for EVENT_QUEUE_STATE.

Fixes: ee584e9710b9 ("vhost: add driver on top of the library")

Signed-off-by: Noa Ezra <noae@mellanox.com>
Reviewed-by: Matan Azrad <matan@mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index ad18b1bd5..b70b9152f 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -852,4 +852,8 @@ vring_state_changed(int vid, uint16_t vring, int enable)
 	state = vring_states[eth_dev->data->port_id];
 	rte_spinlock_lock(&state->lock);
+	if (state->cur[vring] == enable) {
+		rte_spinlock_unlock(&state->lock);
+		return 0;
+	}
 	state->cur[vring] = enable;
 	state->max_vring = RTE_MAX(vring, state->max_vring);
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:52.343802104 +0000
+++ 0009-net-vhost-fix-redundant-queue-state-event.patch	2019-12-03 17:29:51.703750932 +0000
@@ -1 +1 @@
-From f2f0577eff3d13e761996c7390a244963b433bdc Mon Sep 17 00:00:00 2001
+From 7cc59d5a0c085e4e4d2556525615f0b3084441d2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f2f0577eff3d13e761996c7390a244963b433bdc ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index c3ba60276..5de21f143 100644
+index ad18b1bd5..b70b9152f 100644
@@ -25 +26 @@
-@@ -854,4 +854,8 @@ vring_state_changed(int vid, uint16_t vring, int enable)
+@@ -852,4 +852,8 @@ vring_state_changed(int vid, uint16_t vring, int enable)


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

* [dpdk-stable] patch 'vhost: fix vring memory partially mapped' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (7 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/vhost: fix redundant queue state event' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/virtio: fix Rx stats with vectorized functions' " Kevin Traynor
                   ` (54 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Adrian Moreno; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/45b95bb27f259e814dd4f1f6e4ecd5dd78441e8e

Thanks.

Kevin.

---
From 45b95bb27f259e814dd4f1f6e4ecd5dd78441e8e Mon Sep 17 00:00:00 2001
From: Adrian Moreno <amorenoz@redhat.com>
Date: Fri, 6 Sep 2019 14:50:20 +0200
Subject: [PATCH] vhost: fix vring memory partially mapped

[ upstream commit 5d9dc18e1bccfe74c6fc962042d01147b49a5bed ]

Only the mapping of the vring addresses is being ensured. This causes
errors when the vring size is larger than the IOTLB page size. E.g:
queue sizes > 256 for 4K IOTLB pages

Ensure the entire vring memory range gets mapped. Refactor duplicated
code for for IOTLB UPDATE and IOTLB INVALIDATE and add packed virtqueue
support.

Fixes: 09927b524969 ("vhost: translate ring addresses when IOMMU enabled")

Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost_user.c | 64 +++++++++++++++++++++--------------
 1 file changed, 39 insertions(+), 25 deletions(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index bb74d0b93..0d318cd93 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -617,9 +617,11 @@ ring_addr_to_vva(struct virtio_net *dev, struct vhost_virtqueue *vq,
 	if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)) {
 		uint64_t vva;
+		uint64_t req_size = *size;
 
 		vva = vhost_user_iotlb_cache_find(vq, ra,
 					size, VHOST_ACCESS_RW);
-		if (!vva)
-			vhost_user_iotlb_miss(dev, ra, VHOST_ACCESS_RW);
+		if (req_size != *size)
+			vhost_user_iotlb_miss(dev, (ra + *size),
+					      VHOST_ACCESS_RW);
 
 		return vva;
@@ -1693,8 +1695,8 @@ vhost_user_set_req_fd(struct virtio_net **pdev, struct VhostUserMsg *msg,
 
 static int
-is_vring_iotlb_update(struct vhost_virtqueue *vq, struct vhost_iotlb_msg *imsg)
+is_vring_iotlb_split(struct vhost_virtqueue *vq, struct vhost_iotlb_msg *imsg)
 {
 	struct vhost_vring_addr *ra;
-	uint64_t start, end;
+	uint64_t start, end, len;
 
 	start = imsg->iova;
@@ -1702,9 +1704,15 @@ is_vring_iotlb_update(struct vhost_virtqueue *vq, struct vhost_iotlb_msg *imsg)
 
 	ra = &vq->ring_addrs;
-	if (ra->desc_user_addr >= start && ra->desc_user_addr < end)
+	len = sizeof(struct vring_desc) * vq->size;
+	if (ra->desc_user_addr < end && (ra->desc_user_addr + len) > start)
 		return 1;
-	if (ra->avail_user_addr >= start && ra->avail_user_addr < end)
+
+	len = sizeof(struct vring_avail) + sizeof(uint16_t) * vq->size;
+	if (ra->avail_user_addr < end && (ra->avail_user_addr + len) > start)
 		return 1;
-	if (ra->used_user_addr >= start && ra->used_user_addr < end)
+
+	len = sizeof(struct vring_used) +
+	       sizeof(struct vring_used_elem) * vq->size;
+	if (ra->used_user_addr < end && (ra->used_user_addr + len) > start)
 		return 1;
 
@@ -1713,27 +1721,23 @@ is_vring_iotlb_update(struct vhost_virtqueue *vq, struct vhost_iotlb_msg *imsg)
 
 static int
-is_vring_iotlb_invalidate(struct vhost_virtqueue *vq,
-				struct vhost_iotlb_msg *imsg)
+is_vring_iotlb_packed(struct vhost_virtqueue *vq, struct vhost_iotlb_msg *imsg)
 {
-	uint64_t istart, iend, vstart, vend;
+	struct vhost_vring_addr *ra;
+	uint64_t start, end, len;
 
-	istart = imsg->iova;
-	iend = istart + imsg->size - 1;
+	start = imsg->iova;
+	end = start + imsg->size;
 
-	vstart = (uintptr_t)vq->desc;
-	vend = vstart + sizeof(struct vring_desc) * vq->size - 1;
-	if (vstart <= iend && istart <= vend)
+	ra = &vq->ring_addrs;
+	len = sizeof(struct vring_packed_desc) * vq->size;
+	if (ra->desc_user_addr < end && (ra->desc_user_addr + len) > start)
 		return 1;
 
-	vstart = (uintptr_t)vq->avail;
-	vend = vstart + sizeof(struct vring_avail);
-	vend += sizeof(uint16_t) * vq->size - 1;
-	if (vstart <= iend && istart <= vend)
+	len = sizeof(struct vring_packed_desc_event);
+	if (ra->avail_user_addr < end && (ra->avail_user_addr + len) > start)
 		return 1;
 
-	vstart = (uintptr_t)vq->used;
-	vend = vstart + sizeof(struct vring_used);
-	vend += sizeof(struct vring_used_elem) * vq->size - 1;
-	if (vstart <= iend && istart <= vend)
+	len = sizeof(struct vring_packed_desc_event);
+	if (ra->used_user_addr < end && (ra->used_user_addr + len) > start)
 		return 1;
 
@@ -1741,4 +1745,14 @@ is_vring_iotlb_invalidate(struct vhost_virtqueue *vq,
 }
 
+static int is_vring_iotlb(struct virtio_net *dev,
+			  struct vhost_virtqueue *vq,
+			  struct vhost_iotlb_msg *imsg)
+{
+	if (vq_is_packed(dev))
+		return is_vring_iotlb_packed(vq, imsg);
+	else
+		return is_vring_iotlb_split(vq, imsg);
+}
+
 static int
 vhost_user_iotlb_msg(struct virtio_net **pdev, struct VhostUserMsg *msg,
@@ -1766,5 +1780,5 @@ vhost_user_iotlb_msg(struct virtio_net **pdev, struct VhostUserMsg *msg,
 					len, imsg->perm);
 
-			if (is_vring_iotlb_update(vq, imsg))
+			if (is_vring_iotlb(dev, vq, imsg))
 				*pdev = dev = translate_ring_addresses(dev, i);
 		}
@@ -1777,5 +1791,5 @@ vhost_user_iotlb_msg(struct virtio_net **pdev, struct VhostUserMsg *msg,
 					imsg->size);
 
-			if (is_vring_iotlb_invalidate(vq, imsg))
+			if (is_vring_iotlb(dev, vq, imsg))
 				vring_invalidate(dev, vq);
 		}
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:52.397185300 +0000
+++ 0010-vhost-fix-vring-memory-partially-mapped.patch	2019-12-03 17:29:51.704750911 +0000
@@ -1 +1 @@
-From 5d9dc18e1bccfe74c6fc962042d01147b49a5bed Mon Sep 17 00:00:00 2001
+From 45b95bb27f259e814dd4f1f6e4ecd5dd78441e8e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5d9dc18e1bccfe74c6fc962042d01147b49a5bed ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 3d2db6edf..ce4e9fb32 100644
+index bb74d0b93..0d318cd93 100644
@@ -27 +28 @@
-@@ -562,9 +562,11 @@ ring_addr_to_vva(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -617,9 +617,11 @@ ring_addr_to_vva(struct virtio_net *dev, struct vhost_virtqueue *vq,
@@ -41 +42 @@
-@@ -1585,8 +1587,8 @@ vhost_user_set_req_fd(struct virtio_net **pdev, struct VhostUserMsg *msg,
+@@ -1693,8 +1695,8 @@ vhost_user_set_req_fd(struct virtio_net **pdev, struct VhostUserMsg *msg,
@@ -52 +53 @@
-@@ -1594,9 +1596,15 @@ is_vring_iotlb_update(struct vhost_virtqueue *vq, struct vhost_iotlb_msg *imsg)
+@@ -1702,9 +1704,15 @@ is_vring_iotlb_update(struct vhost_virtqueue *vq, struct vhost_iotlb_msg *imsg)
@@ -71 +72 @@
-@@ -1605,27 +1613,23 @@ is_vring_iotlb_update(struct vhost_virtqueue *vq, struct vhost_iotlb_msg *imsg)
+@@ -1713,27 +1721,23 @@ is_vring_iotlb_update(struct vhost_virtqueue *vq, struct vhost_iotlb_msg *imsg)
@@ -111 +112 @@
-@@ -1633,4 +1637,14 @@ is_vring_iotlb_invalidate(struct vhost_virtqueue *vq,
+@@ -1741,4 +1745,14 @@ is_vring_iotlb_invalidate(struct vhost_virtqueue *vq,
@@ -126 +127 @@
-@@ -1655,5 +1669,5 @@ vhost_user_iotlb_msg(struct virtio_net **pdev, struct VhostUserMsg *msg,
+@@ -1766,5 +1780,5 @@ vhost_user_iotlb_msg(struct virtio_net **pdev, struct VhostUserMsg *msg,
@@ -133 +134 @@
-@@ -1666,5 +1680,5 @@ vhost_user_iotlb_msg(struct virtio_net **pdev, struct VhostUserMsg *msg,
+@@ -1777,5 +1791,5 @@ vhost_user_iotlb_msg(struct virtio_net **pdev, struct VhostUserMsg *msg,


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

* [dpdk-stable] patch 'net/virtio: fix Rx stats with vectorized functions' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (8 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'vhost: fix vring memory partially mapped' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/virtio: get all pending Rx packets in vectorized paths' " Kevin Traynor
                   ` (53 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Thibaut Collet; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/413c5a7ef116d842dc122a4d7595a73ec3d6377c

Thanks.

Kevin.

---
From 413c5a7ef116d842dc122a4d7595a73ec3d6377c Mon Sep 17 00:00:00 2001
From: Thibaut Collet <thibaut.collet@6wind.com>
Date: Wed, 11 Sep 2019 18:04:08 +0200
Subject: [PATCH] net/virtio: fix Rx stats with vectorized functions

[ upstream commit 6958e40dbc189ccd287983ea91e257d5ccf26810 ]

With vectorized functions, only the rx stats for number of packets is
incremented.
Update also the other statistics.
Performance impact is about 2%

Fixes: fc3d66212fed ("virtio: add vector Rx")

Signed-off-by: Thibaut Collet <thibaut.collet@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_rxtx.c             | 2 +-
 drivers/net/virtio/virtio_rxtx.h             | 2 ++
 drivers/net/virtio/virtio_rxtx_simple_neon.c | 5 +++++
 drivers/net/virtio/virtio_rxtx_simple_sse.c  | 5 +++++
 4 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index a02e1207f..0fface207 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -756,5 +756,5 @@ virtio_discard_rxbuf_inorder(struct virtqueue *vq, struct rte_mbuf *m)
 }
 
-static void
+void
 virtio_update_packet_stats(struct virtnet_stats *stats, struct rte_mbuf *mbuf)
 {
diff --git a/drivers/net/virtio/virtio_rxtx.h b/drivers/net/virtio/virtio_rxtx.h
index 685cc4f81..1eb8dae22 100644
--- a/drivers/net/virtio/virtio_rxtx.h
+++ b/drivers/net/virtio/virtio_rxtx.h
@@ -60,4 +60,6 @@ struct virtnet_ctl {
 
 int virtio_rxq_vec_setup(struct virtnet_rx *rxvq);
+void virtio_update_packet_stats(struct virtnet_stats *stats,
+				struct rte_mbuf *mbuf);
 
 #endif /* _VIRTIO_RXTX_H_ */
diff --git a/drivers/net/virtio/virtio_rxtx_simple_neon.c b/drivers/net/virtio/virtio_rxtx_simple_neon.c
index d6207d7bb..9200db7ff 100644
--- a/drivers/net/virtio/virtio_rxtx_simple_neon.c
+++ b/drivers/net/virtio/virtio_rxtx_simple_neon.c
@@ -48,4 +48,5 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	struct rte_mbuf **sw_ring;
 	struct rte_mbuf **sw_ring_end;
+	struct rte_mbuf **ref_rx_pkts;
 	uint16_t nb_pkts_received = 0;
 
@@ -106,4 +107,5 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	}
 
+	ref_rx_pkts = rx_pkts;
 	for (nb_pkts_received = 0;
 		nb_pkts_received < nb_used;) {
@@ -205,4 +207,7 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	vq->vq_free_cnt += nb_pkts_received;
 	rxvq->stats.packets += nb_pkts_received;
+	for (nb_used = 0; nb_used < nb_pkts_received; nb_used++)
+		virtio_update_packet_stats(&rxvq->stats, ref_rx_pkts[nb_used]);
+
 	return nb_pkts_received;
 }
diff --git a/drivers/net/virtio/virtio_rxtx_simple_sse.c b/drivers/net/virtio/virtio_rxtx_simple_sse.c
index d768d0757..d6194a33f 100644
--- a/drivers/net/virtio/virtio_rxtx_simple_sse.c
+++ b/drivers/net/virtio/virtio_rxtx_simple_sse.c
@@ -49,4 +49,5 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	struct rte_mbuf **sw_ring;
 	struct rte_mbuf **sw_ring_end;
+	struct rte_mbuf **ref_rx_pkts;
 	uint16_t nb_pkts_received = 0;
 	__m128i shuf_msk1, shuf_msk2, len_adjust;
@@ -108,4 +109,5 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	}
 
+	ref_rx_pkts = rx_pkts;
 	for (nb_pkts_received = 0;
 		nb_pkts_received < nb_used;) {
@@ -191,4 +193,7 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	vq->vq_free_cnt += nb_pkts_received;
 	rxvq->stats.packets += nb_pkts_received;
+	for (nb_used = 0; nb_used < nb_pkts_received; nb_used++)
+		virtio_update_packet_stats(&rxvq->stats, ref_rx_pkts[nb_used]);
+
 	return nb_pkts_received;
 }
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:52.453267982 +0000
+++ 0011-net-virtio-fix-Rx-stats-with-vectorized-functions.patch	2019-12-03 17:29:51.707750848 +0000
@@ -1 +1 @@
-From 6958e40dbc189ccd287983ea91e257d5ccf26810 Mon Sep 17 00:00:00 2001
+From 413c5a7ef116d842dc122a4d7595a73ec3d6377c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6958e40dbc189ccd287983ea91e257d5ccf26810 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index e1c0e28b8..42f2beb40 100644
+index a02e1207f..0fface207 100644
@@ -27 +28 @@
-@@ -107,5 +107,5 @@ vq_ring_free_id_packed(struct virtqueue *vq, uint16_t id)
+@@ -756,5 +756,5 @@ virtio_discard_rxbuf_inorder(struct virtqueue *vq, struct rte_mbuf *m)
@@ -30 +31 @@
--static inline void
+-static void
@@ -46 +47 @@
-index cdc2a4d28..70e89fc42 100644
+index d6207d7bb..9200db7ff 100644
@@ -70 +71 @@
-index af76708d6..cb1610e71 100644
+index d768d0757..d6194a33f 100644


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

* [dpdk-stable] patch 'net/virtio: get all pending Rx packets in vectorized paths' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (9 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/virtio: fix Rx stats with vectorized functions' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/mlx5: fix BlueField VF type recognition' " Kevin Traynor
                   ` (52 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Thibaut Collet; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/840622c7e1f4fda5dc737468082df085e29ace33

Thanks.

Kevin.

---
From 840622c7e1f4fda5dc737468082df085e29ace33 Mon Sep 17 00:00:00 2001
From: Thibaut Collet <thibaut.collet@6wind.com>
Date: Wed, 11 Sep 2019 18:04:09 +0200
Subject: [PATCH] net/virtio: get all pending Rx packets in vectorized paths

[ upstream commit 016f56b5bc503be2f2286d2c7f5e5eb4200ffb6d ]

The loop to read packets does not take all packets as the number of
available packets (nb_used) is decremented in the loop.
Take all available packets provides a performance improvement of 3%.

Fixes: fc3d66212fed ("virtio: add vector Rx")

Signed-off-by: Thibaut Collet <thibaut.collet@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_rxtx_simple_neon.c | 5 +++--
 drivers/net/virtio/virtio_rxtx_simple_sse.c  | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/virtio/virtio_rxtx_simple_neon.c b/drivers/net/virtio/virtio_rxtx_simple_neon.c
index 9200db7ff..6bcacb047 100644
--- a/drivers/net/virtio/virtio_rxtx_simple_neon.c
+++ b/drivers/net/virtio/virtio_rxtx_simple_neon.c
@@ -43,5 +43,5 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	struct virtqueue *vq = rxvq->vq;
 	struct virtio_hw *hw = vq->hw;
-	uint16_t nb_used;
+	uint16_t nb_used, nb_total;
 	uint16_t desc_idx;
 	struct vring_used_elem *rused;
@@ -107,7 +107,8 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	}
 
+	nb_total = nb_used;
 	ref_rx_pkts = rx_pkts;
 	for (nb_pkts_received = 0;
-		nb_pkts_received < nb_used;) {
+		nb_pkts_received < nb_total;) {
 		uint64x2_t desc[RTE_VIRTIO_DESC_PER_LOOP / 2];
 		uint64x2_t mbp[RTE_VIRTIO_DESC_PER_LOOP / 2];
diff --git a/drivers/net/virtio/virtio_rxtx_simple_sse.c b/drivers/net/virtio/virtio_rxtx_simple_sse.c
index d6194a33f..7a25ac7e4 100644
--- a/drivers/net/virtio/virtio_rxtx_simple_sse.c
+++ b/drivers/net/virtio/virtio_rxtx_simple_sse.c
@@ -44,5 +44,5 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	struct virtqueue *vq = rxvq->vq;
 	struct virtio_hw *hw = vq->hw;
-	uint16_t nb_used;
+	uint16_t nb_used, nb_total;
 	uint16_t desc_idx;
 	struct vring_used_elem *rused;
@@ -109,7 +109,8 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	}
 
+	nb_total = nb_used;
 	ref_rx_pkts = rx_pkts;
 	for (nb_pkts_received = 0;
-		nb_pkts_received < nb_used;) {
+		nb_pkts_received < nb_total;) {
 		__m128i desc[RTE_VIRTIO_DESC_PER_LOOP / 2];
 		__m128i mbp[RTE_VIRTIO_DESC_PER_LOOP / 2];
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:52.514958341 +0000
+++ 0012-net-virtio-get-all-pending-Rx-packets-in-vectorized-.patch	2019-12-03 17:29:51.707750848 +0000
@@ -1 +1 @@
-From 016f56b5bc503be2f2286d2c7f5e5eb4200ffb6d Mon Sep 17 00:00:00 2001
+From 840622c7e1f4fda5dc737468082df085e29ace33 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 016f56b5bc503be2f2286d2c7f5e5eb4200ffb6d ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 70e89fc42..992e71f01 100644
+index 9200db7ff..6bcacb047 100644
@@ -42 +43 @@
-index cb1610e71..f9ec4ae69 100644
+index d6194a33f..7a25ac7e4 100644


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

* [dpdk-stable] patch 'net/mlx5: fix BlueField VF type recognition' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (10 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/virtio: get all pending Rx packets in vectorized paths' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/cxgbe: add prefix to global functions' " Kevin Traynor
                   ` (51 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/f0d1c3ee32921305c7c69bda2ee3ddf26dfc75d1

Thanks.

Kevin.

---
From f0d1c3ee32921305c7c69bda2ee3ddf26dfc75d1 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Date: Wed, 25 Sep 2019 07:31:18 +0000
Subject: [PATCH] net/mlx5: fix BlueField VF type recognition

[ upstream commit a40b734b5efb106f832940a12ea43116a290cb42 ]

The PCI virtual function type was not recognized correctly
for BlueField VF.

Fixes: f38c54571d62 ("net/mlx5: split PCI from generic probing")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 27db15620..d7833d0b1 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1479,4 +1479,5 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	case PCI_DEVICE_ID_MELLANOX_CONNECTX5VF:
 	case PCI_DEVICE_ID_MELLANOX_CONNECTX5EXVF:
+	case PCI_DEVICE_ID_MELLANOX_CONNECTX5BFVF:
 		dev_config.vf = 1;
 		break;
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:52.569934577 +0000
+++ 0013-net-mlx5-fix-BlueField-VF-type-recognition.patch	2019-12-03 17:29:51.709750807 +0000
@@ -1 +1 @@
-From a40b734b5efb106f832940a12ea43116a290cb42 Mon Sep 17 00:00:00 2001
+From f0d1c3ee32921305c7c69bda2ee3ddf26dfc75d1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a40b734b5efb106f832940a12ea43116a290cb42 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 0528ed35e..0545ebc9c 100644
+index 27db15620..d7833d0b1 100644
@@ -22 +23 @@
-@@ -2425,4 +2425,5 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+@@ -1479,4 +1479,5 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,


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

* [dpdk-stable] patch 'net/cxgbe: add prefix to global functions' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (11 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/mlx5: fix BlueField VF type recognition' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/cxgbe: fix null access when allocating CLIP entry' " Kevin Traynor
                   ` (50 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/193ed3b78aafed5b261da2d7aacc3062cda3a547

Thanks.

Kevin.

---
From 193ed3b78aafed5b261da2d7aacc3062cda3a547 Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Sat, 28 Sep 2019 02:00:01 +0530
Subject: [PATCH] net/cxgbe: add prefix to global functions

[ upstream commit 71e9b334a23764a5baa55cbacbdd99aeb9733631 ]

To avoid name collisions, add cxgbe_ prefix to some global functions.
Also, make some local functions static in cxgbe_filter.c.

Fixes: ee61f5113b17 ("net/cxgbe: parse and validate flows")
Fixes: 9eb2c9a48072 ("net/cxgbe: implement flow create operation")
Fixes: 3a381a4116ed ("net/cxgbe: query firmware for HASH filter resources")
Fixes: af44a577988b ("net/cxgbe: support to offload flows to HASH region")
Fixes: 41dc98b0827a ("net/cxgbe: support to delete flows in HASH region")
Fixes: 23af667f1507 ("net/cxgbe: add API to program hardware layer 2 table")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/cxgbe_filter.c | 30 ++++++++++++++++--------------
 drivers/net/cxgbe/cxgbe_filter.h | 19 +++++++++----------
 drivers/net/cxgbe/cxgbe_flow.c   |  6 +++---
 drivers/net/cxgbe/cxgbe_main.c   | 10 +++++-----
 drivers/net/cxgbe/l2t.c          |  3 ++-
 drivers/net/cxgbe/l2t.h          |  3 ++-
 6 files changed, 37 insertions(+), 34 deletions(-)

diff --git a/drivers/net/cxgbe/cxgbe_filter.c b/drivers/net/cxgbe/cxgbe_filter.c
index 932127018..2eee7166c 100644
--- a/drivers/net/cxgbe/cxgbe_filter.c
+++ b/drivers/net/cxgbe/cxgbe_filter.c
@@ -14,5 +14,5 @@
  * Initialize Hash Filters
  */
-int init_hash_filter(struct adapter *adap)
+int cxgbe_init_hash_filter(struct adapter *adap)
 {
 	unsigned int n_user_filters;
@@ -53,5 +53,6 @@ int init_hash_filter(struct adapter *adap)
  * if the requested features have been enabled
  */
-int validate_filter(struct adapter *adapter, struct ch_filter_specification *fs)
+int cxgbe_validate_filter(struct adapter *adapter,
+			  struct ch_filter_specification *fs)
 {
 	u32 fconf;
@@ -133,5 +134,5 @@ static unsigned int get_filter_steerq(struct rte_eth_dev *dev,
 
 /* Return an error number if the indicated filter isn't writable ... */
-int writable_filter(struct filter_entry *f)
+static int writable_filter(struct filter_entry *f)
 {
 	if (f->locked)
@@ -214,5 +215,5 @@ static inline void mk_set_tcb_field_ulp(struct filter_entry *f,
  * Check if entry already filled.
  */
-bool is_filter_set(struct tid_info *t, int fidx, int family)
+bool cxgbe_is_filter_set(struct tid_info *t, int fidx, int family)
 {
 	bool result = FALSE;
@@ -527,5 +528,5 @@ static int cxgbe_set_hash_filter(struct rte_eth_dev *dev,
 	int ret = 0;
 
-	ret = validate_filter(adapter, fs);
+	ret = cxgbe_validate_filter(adapter, fs);
 	if (ret)
 		return ret;
@@ -618,5 +619,5 @@ out_err:
  * clears the filter's "pending" status.
  */
-void clear_filter(struct filter_entry *f)
+static void clear_filter(struct filter_entry *f)
 {
 	if (f->clipt)
@@ -690,5 +691,5 @@ static int del_filter_wr(struct rte_eth_dev *dev, unsigned int fidx)
 }
 
-int set_filter_wr(struct rte_eth_dev *dev, unsigned int fidx)
+static int set_filter_wr(struct rte_eth_dev *dev, unsigned int fidx)
 {
 	struct adapter *adapter = ethdev2adap(dev);
@@ -868,5 +869,5 @@ int cxgbe_del_filter(struct rte_eth_dev *dev, unsigned int filter_id,
 	chip_ver = CHELSIO_CHIP_VERSION(adapter->params.chip);
 
-	ret = is_filter_set(&adapter->tids, filter_id, fs->type);
+	ret = cxgbe_is_filter_set(&adapter->tids, filter_id, fs->type);
 	if (!ret) {
 		dev_warn(adap, "%s: could not find filter entry: %u\n",
@@ -940,5 +941,5 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
 	chip_ver = CHELSIO_CHIP_VERSION(adapter->params.chip);
 
-	ret = validate_filter(adapter, fs);
+	ret = cxgbe_validate_filter(adapter, fs);
 	if (ret)
 		return ret;
@@ -951,5 +952,5 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
 		filter_id &= ~(0x3);
 
-	ret = is_filter_set(&adapter->tids, filter_id, fs->type);
+	ret = cxgbe_is_filter_set(&adapter->tids, filter_id, fs->type);
 	if (ret)
 		return -EBUSY;
@@ -1091,5 +1092,6 @@ free_tid:
  * Handle a Hash filter write reply.
  */
-void hash_filter_rpl(struct adapter *adap, const struct cpl_act_open_rpl *rpl)
+void cxgbe_hash_filter_rpl(struct adapter *adap,
+			   const struct cpl_act_open_rpl *rpl)
 {
 	struct tid_info *t = &adap->tids;
@@ -1159,5 +1161,5 @@ void hash_filter_rpl(struct adapter *adap, const struct cpl_act_open_rpl *rpl)
  * Handle a LE-TCAM filter write/deletion reply.
  */
-void filter_rpl(struct adapter *adap, const struct cpl_set_tcb_rpl *rpl)
+void cxgbe_filter_rpl(struct adapter *adap, const struct cpl_set_tcb_rpl *rpl)
 {
 	struct filter_entry *f = NULL;
@@ -1308,6 +1310,6 @@ get_count:
  * Handle a Hash filter delete reply.
  */
-void hash_del_filter_rpl(struct adapter *adap,
-			 const struct cpl_abort_rpl_rss *rpl)
+void cxgbe_hash_del_filter_rpl(struct adapter *adap,
+			       const struct cpl_abort_rpl_rss *rpl)
 {
 	struct tid_info *t = &adap->tids;
diff --git a/drivers/net/cxgbe/cxgbe_filter.h b/drivers/net/cxgbe/cxgbe_filter.h
index b7bcbf56a..6738ae4f1 100644
--- a/drivers/net/cxgbe/cxgbe_filter.h
+++ b/drivers/net/cxgbe/cxgbe_filter.h
@@ -249,9 +249,6 @@ cxgbe_bitmap_find_free_region(struct rte_bitmap *bmap, unsigned int size,
 }
 
-bool is_filter_set(struct tid_info *, int fidx, int family);
-void filter_rpl(struct adapter *adap, const struct cpl_set_tcb_rpl *rpl);
-void clear_filter(struct filter_entry *f);
-int set_filter_wr(struct rte_eth_dev *dev, unsigned int fidx);
-int writable_filter(struct filter_entry *f);
+bool cxgbe_is_filter_set(struct tid_info *, int fidx, int family);
+void cxgbe_filter_rpl(struct adapter *adap, const struct cpl_set_tcb_rpl *rpl);
 int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
 		     struct ch_filter_specification *fs,
@@ -261,9 +258,11 @@ int cxgbe_del_filter(struct rte_eth_dev *dev, unsigned int filter_id,
 		     struct filter_ctx *ctx);
 int cxgbe_alloc_ftid(struct adapter *adap, unsigned int family);
-int init_hash_filter(struct adapter *adap);
-void hash_filter_rpl(struct adapter *adap, const struct cpl_act_open_rpl *rpl);
-void hash_del_filter_rpl(struct adapter *adap,
-			 const struct cpl_abort_rpl_rss *rpl);
-int validate_filter(struct adapter *adap, struct ch_filter_specification *fs);
+int cxgbe_init_hash_filter(struct adapter *adap);
+void cxgbe_hash_filter_rpl(struct adapter *adap,
+			   const struct cpl_act_open_rpl *rpl);
+void cxgbe_hash_del_filter_rpl(struct adapter *adap,
+			       const struct cpl_abort_rpl_rss *rpl);
+int cxgbe_validate_filter(struct adapter *adap,
+			  struct ch_filter_specification *fs);
 int cxgbe_get_filter_count(struct adapter *adapter, unsigned int fidx,
 			   u64 *c, int hash, bool get_byte);
diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
index 7b87bdf58..17d5608fa 100644
--- a/drivers/net/cxgbe/cxgbe_flow.c
+++ b/drivers/net/cxgbe/cxgbe_flow.c
@@ -310,5 +310,5 @@ static int cxgbe_validate_fidxondel(struct filter_entry *f, unsigned int fidx)
 		return -EINVAL;
 	}
-	if (!is_filter_set(&adap->tids, fidx, fs.type)) {
+	if (!cxgbe_is_filter_set(&adap->tids, fidx, fs.type)) {
 		dev_err(adap, "Already free fidx:%d f:%p\n", fidx, f);
 		return -EINVAL;
@@ -322,5 +322,5 @@ cxgbe_validate_fidxonadd(struct ch_filter_specification *fs,
 			 struct adapter *adap, unsigned int fidx)
 {
-	if (is_filter_set(&adap->tids, fidx, fs->type)) {
+	if (cxgbe_is_filter_set(&adap->tids, fidx, fs->type)) {
 		dev_err(adap, "filter index: %d is busy.\n", fidx);
 		return -EBUSY;
@@ -1017,5 +1017,5 @@ cxgbe_flow_validate(struct rte_eth_dev *dev,
 	}
 
-	if (validate_filter(adap, &flow->fs)) {
+	if (cxgbe_validate_filter(adap, &flow->fs)) {
 		t4_os_free(flow);
 		return rte_flow_error_set(e, EINVAL, RTE_FLOW_ERROR_TYPE_HANDLE,
diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c
index 38938ecc0..2cc4b6d91 100644
--- a/drivers/net/cxgbe/cxgbe_main.c
+++ b/drivers/net/cxgbe/cxgbe_main.c
@@ -93,17 +93,17 @@ static int fwevtq_handler(struct sge_rspq *q, const __be64 *rsp,
 		const struct cpl_abort_rpl_rss *p = (const void *)rsp;
 
-		hash_del_filter_rpl(q->adapter, p);
+		cxgbe_hash_del_filter_rpl(q->adapter, p);
 	} else if (opcode == CPL_SET_TCB_RPL) {
 		const struct cpl_set_tcb_rpl *p = (const void *)rsp;
 
-		filter_rpl(q->adapter, p);
+		cxgbe_filter_rpl(q->adapter, p);
 	} else if (opcode == CPL_ACT_OPEN_RPL) {
 		const struct cpl_act_open_rpl *p = (const void *)rsp;
 
-		hash_filter_rpl(q->adapter, p);
+		cxgbe_hash_filter_rpl(q->adapter, p);
 	} else if (opcode == CPL_L2T_WRITE_RPL) {
 		const struct cpl_l2t_write_rpl *p = (const void *)rsp;
 
-		do_l2t_write_rpl(q->adapter, p);
+		cxgbe_do_l2t_write_rpl(q->adapter, p);
 	} else {
 		dev_err(adapter, "unexpected CPL %#x on FW event queue\n",
@@ -1180,5 +1180,5 @@ static int adap_init0(struct adapter *adap)
 	if ((caps_cmd.niccaps & cpu_to_be16(FW_CAPS_CONFIG_NIC_HASHFILTER)) &&
 	    is_t6(adap->params.chip)) {
-		if (init_hash_filter(adap) < 0)
+		if (cxgbe_init_hash_filter(adap) < 0)
 			goto bye;
 	}
diff --git a/drivers/net/cxgbe/l2t.c b/drivers/net/cxgbe/l2t.c
index 814188fea..deee261c6 100644
--- a/drivers/net/cxgbe/l2t.c
+++ b/drivers/net/cxgbe/l2t.c
@@ -22,5 +22,6 @@ void cxgbe_l2t_release(struct l2t_entry *e)
  * the L2T index it refers to.
  */
-void do_l2t_write_rpl(struct adapter *adap, const struct cpl_l2t_write_rpl *rpl)
+void cxgbe_do_l2t_write_rpl(struct adapter *adap,
+			    const struct cpl_l2t_write_rpl *rpl)
 {
 	struct l2t_data *d = adap->l2t;
diff --git a/drivers/net/cxgbe/l2t.h b/drivers/net/cxgbe/l2t.h
index 22a34e388..d2cecf411 100644
--- a/drivers/net/cxgbe/l2t.h
+++ b/drivers/net/cxgbe/l2t.h
@@ -54,4 +54,5 @@ struct l2t_entry *cxgbe_l2t_alloc_switching(struct rte_eth_dev *dev, u16 vlan,
 					    u8 port, u8 *dmac);
 void cxgbe_l2t_release(struct l2t_entry *e);
-void do_l2t_write_rpl(struct adapter *p, const struct cpl_l2t_write_rpl *rpl);
+void cxgbe_do_l2t_write_rpl(struct adapter *p,
+			    const struct cpl_l2t_write_rpl *rpl);
 #endif /* _CXGBE_L2T_H_ */
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:52.631290349 +0000
+++ 0014-net-cxgbe-add-prefix-to-global-functions.patch	2019-12-03 17:29:51.713750723 +0000
@@ -1 +1 @@
-From 71e9b334a23764a5baa55cbacbdd99aeb9733631 Mon Sep 17 00:00:00 2001
+From 193ed3b78aafed5b261da2d7aacc3062cda3a547 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 71e9b334a23764a5baa55cbacbdd99aeb9733631 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 7fcee5c0a..cc8774c1d 100644
+index 932127018..2eee7166c 100644
@@ -31 +32 @@
-@@ -15,5 +15,5 @@
+@@ -14,5 +14,5 @@
@@ -38 +39 @@
-@@ -54,5 +54,6 @@ int init_hash_filter(struct adapter *adap)
+@@ -53,5 +53,6 @@ int init_hash_filter(struct adapter *adap)
@@ -46 +47 @@
-@@ -134,5 +135,5 @@ static unsigned int get_filter_steerq(struct rte_eth_dev *dev,
+@@ -133,5 +134,5 @@ static unsigned int get_filter_steerq(struct rte_eth_dev *dev,
@@ -53 +54 @@
-@@ -215,5 +216,5 @@ static inline void mk_set_tcb_field_ulp(struct filter_entry *f,
+@@ -214,5 +215,5 @@ static inline void mk_set_tcb_field_ulp(struct filter_entry *f,
@@ -60 +61 @@
-@@ -528,5 +529,5 @@ static int cxgbe_set_hash_filter(struct rte_eth_dev *dev,
+@@ -527,5 +528,5 @@ static int cxgbe_set_hash_filter(struct rte_eth_dev *dev,
@@ -67 +68 @@
-@@ -619,5 +620,5 @@ out_err:
+@@ -618,5 +619,5 @@ out_err:
@@ -74 +75 @@
-@@ -691,5 +692,5 @@ static int del_filter_wr(struct rte_eth_dev *dev, unsigned int fidx)
+@@ -690,5 +691,5 @@ static int del_filter_wr(struct rte_eth_dev *dev, unsigned int fidx)
@@ -81 +82 @@
-@@ -869,5 +870,5 @@ int cxgbe_del_filter(struct rte_eth_dev *dev, unsigned int filter_id,
+@@ -868,5 +869,5 @@ int cxgbe_del_filter(struct rte_eth_dev *dev, unsigned int filter_id,
@@ -88 +89 @@
-@@ -941,5 +942,5 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
+@@ -940,5 +941,5 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
@@ -95 +96 @@
-@@ -952,5 +953,5 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
+@@ -951,5 +952,5 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
@@ -102 +103 @@
-@@ -1092,5 +1093,6 @@ free_tid:
+@@ -1091,5 +1092,6 @@ free_tid:
@@ -110 +111 @@
-@@ -1160,5 +1162,5 @@ void hash_filter_rpl(struct adapter *adap, const struct cpl_act_open_rpl *rpl)
+@@ -1159,5 +1161,5 @@ void hash_filter_rpl(struct adapter *adap, const struct cpl_act_open_rpl *rpl)
@@ -117 +118 @@
-@@ -1358,6 +1360,6 @@ int cxgbe_clear_filter_count(struct adapter *adapter, unsigned int fidx,
+@@ -1308,6 +1310,6 @@ get_count:
@@ -127 +128 @@
-index 0c67d2d15..1964730ba 100644
+index b7bcbf56a..6738ae4f1 100644
@@ -160 +161 @@
-index d3de689c3..848c61f02 100644
+index 7b87bdf58..17d5608fa 100644
@@ -177 +178 @@
-@@ -1020,5 +1020,5 @@ cxgbe_flow_validate(struct rte_eth_dev *dev,
+@@ -1017,5 +1017,5 @@ cxgbe_flow_validate(struct rte_eth_dev *dev,
@@ -185 +186 @@
-index 620f60b4d..c3e6b9557 100644
+index 38938ecc0..2cc4b6d91 100644
@@ -218 +219 @@
-index 6faf624f7..f9d651fe0 100644
+index 814188fea..deee261c6 100644
@@ -221 +222 @@
-@@ -23,5 +23,6 @@ void cxgbe_l2t_release(struct l2t_entry *e)
+@@ -22,5 +22,6 @@ void cxgbe_l2t_release(struct l2t_entry *e)
@@ -230 +231 @@
-index 326abfde4..2c489e4aa 100644
+index 22a34e388..d2cecf411 100644


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

* [dpdk-stable] patch 'net/cxgbe: fix null access when allocating CLIP entry' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (12 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/cxgbe: add prefix to global functions' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/cxgbe: fix slot allocation for IPv6 flows' " Kevin Traynor
                   ` (49 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/86a24c5b7f3f7c12116ab95b6aa67fe6c3463805

Thanks.

Kevin.

---
From 86a24c5b7f3f7c12116ab95b6aa67fe6c3463805 Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Sat, 28 Sep 2019 02:00:02 +0530
Subject: [PATCH] net/cxgbe: fix null access when allocating CLIP entry

[ upstream commit 41b5a4a655b07680b355f3e518380a73b4c03f65 ]

Pass correct arguments to CLIP allocation code to avoid NULL pointer
dereference.

Fixes: 3f2c1e209cfc ("net/cxgbe: add Compressed Local IP region")

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

diff --git a/drivers/net/cxgbe/cxgbe_filter.c b/drivers/net/cxgbe/cxgbe_filter.c
index 2eee7166c..461b71ebe 100644
--- a/drivers/net/cxgbe/cxgbe_filter.c
+++ b/drivers/net/cxgbe/cxgbe_filter.c
@@ -1052,5 +1052,5 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
 	if (chip_ver > CHELSIO_T5 && fs->type &&
 	    memcmp(fs->val.lip, bitoff, sizeof(bitoff))) {
-		f->clipt = cxgbe_clip_alloc(f->dev, (u32 *)&f->fs.val.lip);
+		f->clipt = cxgbe_clip_alloc(dev, (u32 *)&fs->val.lip);
 		if (!f->clipt)
 			goto free_tid;
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:52.696450260 +0000
+++ 0015-net-cxgbe-fix-null-access-when-allocating-CLIP-entry.patch	2019-12-03 17:29:51.714750703 +0000
@@ -1 +1 @@
-From 41b5a4a655b07680b355f3e518380a73b4c03f65 Mon Sep 17 00:00:00 2001
+From 86a24c5b7f3f7c12116ab95b6aa67fe6c3463805 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 41b5a4a655b07680b355f3e518380a73b4c03f65 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index cc8774c1d..3b7966d04 100644
+index 2eee7166c..461b71ebe 100644
@@ -21 +22 @@
-@@ -1053,5 +1053,5 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
+@@ -1052,5 +1052,5 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,


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

* [dpdk-stable] patch 'net/cxgbe: fix slot allocation for IPv6 flows' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (13 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/cxgbe: fix null access when allocating CLIP entry' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/cxgbe: fix parsing VLAN ID rewrite action' " Kevin Traynor
                   ` (48 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/16c88049ae286623e8fb0b6cd5997b3081add248

Thanks.

Kevin.

---
From 16c88049ae286623e8fb0b6cd5997b3081add248 Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Sat, 28 Sep 2019 02:00:03 +0530
Subject: [PATCH] net/cxgbe: fix slot allocation for IPv6 flows

[ upstream commit 31d4d2334672fe9d96a0d23cdf914c1f219f932f ]

IPv6 flows occupy only 2 slots on Chelsio T6 NICs. Fix the slot
calculation logic to return correct number of slots.

Fixes: ee61f5113b17 ("net/cxgbe: parse and validate flows")
Fixes: 9eb2c9a48072 ("net/cxgbe: implement flow create operation")
Fixes: 3f2c1e209cfc ("net/cxgbe: add Compressed Local IP region")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/cxgbe_filter.c | 197 +++++++++++--------------------
 drivers/net/cxgbe/cxgbe_filter.h |   5 +-
 drivers/net/cxgbe/cxgbe_flow.c   |  15 ++-
 3 files changed, 87 insertions(+), 130 deletions(-)

diff --git a/drivers/net/cxgbe/cxgbe_filter.c b/drivers/net/cxgbe/cxgbe_filter.c
index 461b71ebe..8cd26212f 100644
--- a/drivers/net/cxgbe/cxgbe_filter.c
+++ b/drivers/net/cxgbe/cxgbe_filter.c
@@ -213,18 +213,30 @@ static inline void mk_set_tcb_field_ulp(struct filter_entry *f,
 
 /**
- * Check if entry already filled.
+ * IPv6 requires 2 slots on T6 and 4 slots for cards below T6.
+ * IPv4 requires only 1 slot on all cards.
  */
-bool cxgbe_is_filter_set(struct tid_info *t, int fidx, int family)
+u8 cxgbe_filter_slots(struct adapter *adap, u8 family)
+{
+	if (family == FILTER_TYPE_IPV6) {
+		if (CHELSIO_CHIP_VERSION(adap->params.chip) < CHELSIO_T6)
+			return 4;
+
+		return 2;
+	}
+
+	return 1;
+}
+
+/**
+ * Check if entries are already filled.
+ */
+bool cxgbe_is_filter_set(struct tid_info *t, u32 fidx, u8 nentries)
 {
 	bool result = FALSE;
-	int i, max;
-
-	/* IPv6 requires four slots and IPv4 requires only 1 slot.
-	 * Ensure, there's enough slots available.
-	 */
-	max = family == FILTER_TYPE_IPV6 ? fidx + 3 : fidx;
+	u32 i;
 
+	/* Ensure there's enough slots available. */
 	t4_os_lock(&t->ftid_lock);
-	for (i = fidx; i <= max; i++) {
+	for (i = fidx; i < fidx + nentries; i++) {
 		if (rte_bitmap_get(t->ftid_bmap, i)) {
 			result = TRUE;
@@ -237,7 +249,7 @@ bool cxgbe_is_filter_set(struct tid_info *t, int fidx, int family)
 
 /**
- * Allocate a available free entry
+ * Allocate available free entries.
  */
-int cxgbe_alloc_ftid(struct adapter *adap, unsigned int family)
+int cxgbe_alloc_ftid(struct adapter *adap, u8 nentries)
 {
 	struct tid_info *t = &adap->tids;
@@ -246,6 +258,7 @@ int cxgbe_alloc_ftid(struct adapter *adap, unsigned int family)
 
 	t4_os_lock(&t->ftid_lock);
-	if (family == FILTER_TYPE_IPV6)
-		pos = cxgbe_bitmap_find_free_region(t->ftid_bmap, size, 4);
+	if (nentries > 1)
+		pos = cxgbe_bitmap_find_free_region(t->ftid_bmap, size,
+						    nentries);
 	else
 		pos = cxgbe_find_first_zero_bit(t->ftid_bmap, size);
@@ -565,5 +578,5 @@ static int cxgbe_set_hash_filter(struct rte_eth_dev *dev,
 		goto out_err;
 
-	if (f->fs.type) {
+	if (f->fs.type == FILTER_TYPE_IPV6) {
 		/* IPv6 hash filter */
 		f->clipt = cxgbe_clip_alloc(f->dev, (u32 *)&f->fs.val.lip);
@@ -804,9 +817,10 @@ out:
 
 /**
- * Set the corresponding entry in the bitmap. 4 slots are
- * marked for IPv6, whereas only 1 slot is marked for IPv4.
+ * Set the corresponding entries in the bitmap.
  */
-static int cxgbe_set_ftid(struct tid_info *t, int fidx, int family)
+static int cxgbe_set_ftid(struct tid_info *t, u32 fidx, u8 nentries)
 {
+	u32 i;
+
 	t4_os_lock(&t->ftid_lock);
 	if (rte_bitmap_get(t->ftid_bmap, fidx)) {
@@ -815,12 +829,6 @@ static int cxgbe_set_ftid(struct tid_info *t, int fidx, int family)
 	}
 
-	if (family == FILTER_TYPE_IPV4) {
-		rte_bitmap_set(t->ftid_bmap, fidx);
-	} else {
-		rte_bitmap_set(t->ftid_bmap, fidx);
-		rte_bitmap_set(t->ftid_bmap, fidx + 1);
-		rte_bitmap_set(t->ftid_bmap, fidx + 2);
-		rte_bitmap_set(t->ftid_bmap, fidx + 3);
-	}
+	for (i = fidx; i < fidx + nentries; i++)
+		rte_bitmap_set(t->ftid_bmap, i);
 	t4_os_unlock(&t->ftid_lock);
 	return 0;
@@ -828,18 +836,13 @@ static int cxgbe_set_ftid(struct tid_info *t, int fidx, int family)
 
 /**
- * Clear the corresponding entry in the bitmap. 4 slots are
- * cleared for IPv6, whereas only 1 slot is cleared for IPv4.
+ * Clear the corresponding entries in the bitmap.
  */
-static void cxgbe_clear_ftid(struct tid_info *t, int fidx, int family)
+static void cxgbe_clear_ftid(struct tid_info *t, u32 fidx, u8 nentries)
 {
+	u32 i;
+
 	t4_os_lock(&t->ftid_lock);
-	if (family == FILTER_TYPE_IPV4) {
-		rte_bitmap_clear(t->ftid_bmap, fidx);
-	} else {
-		rte_bitmap_clear(t->ftid_bmap, fidx);
-		rte_bitmap_clear(t->ftid_bmap, fidx + 1);
-		rte_bitmap_clear(t->ftid_bmap, fidx + 2);
-		rte_bitmap_clear(t->ftid_bmap, fidx + 3);
-	}
+	for (i = fidx; i < fidx + nentries; i++)
+		rte_bitmap_clear(t->ftid_bmap, i);
 	t4_os_unlock(&t->ftid_lock);
 }
@@ -859,4 +862,5 @@ int cxgbe_del_filter(struct rte_eth_dev *dev, unsigned int filter_id,
 	struct filter_entry *f;
 	unsigned int chip_ver;
+	u8 nentries;
 	int ret;
 
@@ -869,16 +873,9 @@ int cxgbe_del_filter(struct rte_eth_dev *dev, unsigned int filter_id,
 	chip_ver = CHELSIO_CHIP_VERSION(adapter->params.chip);
 
-	ret = cxgbe_is_filter_set(&adapter->tids, filter_id, fs->type);
-	if (!ret) {
-		dev_warn(adap, "%s: could not find filter entry: %u\n",
-			 __func__, filter_id);
-		return -EINVAL;
-	}
-
 	/*
-	 * Ensure filter id is aligned on the 2 slot boundary for T6,
+	 * Ensure IPv6 filter id is aligned on the 2 slot boundary for T6,
 	 * and 4 slot boundary for cards below T6.
 	 */
-	if (fs->type) {
+	if (fs->type == FILTER_TYPE_IPV6) {
 		if (chip_ver < CHELSIO_T6)
 			filter_id &= ~(0x3);
@@ -887,4 +884,12 @@ int cxgbe_del_filter(struct rte_eth_dev *dev, unsigned int filter_id,
 	}
 
+	nentries = cxgbe_filter_slots(adapter, fs->type);
+	ret = cxgbe_is_filter_set(&adapter->tids, filter_id, nentries);
+	if (!ret) {
+		dev_warn(adap, "%s: could not find filter entry: %u\n",
+			 __func__, filter_id);
+		return -EINVAL;
+	}
+
 	f = &adapter->tids.ftid_tab[filter_id];
 	ret = writable_filter(f);
@@ -896,6 +901,5 @@ int cxgbe_del_filter(struct rte_eth_dev *dev, unsigned int filter_id,
 		cxgbe_clear_ftid(&adapter->tids,
 				 f->tid - adapter->tids.ftid_base,
-				 f->fs.type ? FILTER_TYPE_IPV6 :
-					      FILTER_TYPE_IPV4);
+				 nentries);
 		return del_filter_wr(dev, filter_id);
 	}
@@ -927,8 +931,8 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
 	struct port_info *pi = ethdev2pinfo(dev);
 	struct adapter *adapter = pi->adapter;
-	unsigned int fidx, iq, fid_bit = 0;
+	unsigned int fidx, iq;
 	struct filter_entry *f;
 	unsigned int chip_ver;
-	uint8_t bitoff[16] = {0};
+	u8 nentries, bitoff[16] = {0};
 	int ret;
 
@@ -945,17 +949,4 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
 		return ret;
 
-	/*
-	 * Ensure filter id is aligned on the 4 slot boundary for IPv6
-	 * maskfull filters.
-	 */
-	if (fs->type)
-		filter_id &= ~(0x3);
-
-	ret = cxgbe_is_filter_set(&adapter->tids, filter_id, fs->type);
-	if (ret)
-		return -EBUSY;
-
-	iq = get_filter_steerq(dev, fs);
-
 	/*
 	 * IPv6 filters occupy four slots and must be aligned on four-slot
@@ -964,60 +955,24 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
 	 *
 	 * IPv4 filters only occupy a single slot and have no alignment
-	 * requirements but writing a new IPv4 filter into the middle
-	 * of an existing IPv6 filter requires clearing the old IPv6
-	 * filter.
+	 * requirements.
 	 */
-	if (fs->type == FILTER_TYPE_IPV4) { /* IPv4 */
-		/*
-		 * For T6, If our IPv4 filter isn't being written to a
-		 * multiple of two filter index and there's an IPv6
-		 * filter at the multiple of 2 base slot, then we need
-		 * to delete that IPv6 filter ...
-		 * For adapters below T6, IPv6 filter occupies 4 entries.
-		 */
+	fidx = filter_id;
+	if (fs->type == FILTER_TYPE_IPV6) {
 		if (chip_ver < CHELSIO_T6)
-			fidx = filter_id & ~0x3;
+			fidx &= ~(0x3);
 		else
-			fidx = filter_id & ~0x1;
-
-		if (fidx != filter_id && adapter->tids.ftid_tab[fidx].fs.type) {
-			f = &adapter->tids.ftid_tab[fidx];
-			if (f->valid)
-				return -EBUSY;
-		}
-	} else { /* IPv6 */
-		unsigned int max_filter_id;
-
-		if (chip_ver < CHELSIO_T6) {
-			/*
-			 * Ensure that the IPv6 filter is aligned on a
-			 * multiple of 4 boundary.
-			 */
-			if (filter_id & 0x3)
-				return -EINVAL;
-
-			max_filter_id = filter_id + 4;
-		} else {
-			/*
-			 * For T6, CLIP being enabled, IPv6 filter would occupy
-			 * 2 entries.
-			 */
-			if (filter_id & 0x1)
-				return -EINVAL;
-
-			max_filter_id = filter_id + 2;
-		}
-
-		/*
-		 * Check all except the base overlapping IPv4 filter
-		 * slots.
-		 */
-		for (fidx = filter_id + 1; fidx < max_filter_id; fidx++) {
-			f = &adapter->tids.ftid_tab[fidx];
-			if (f->valid)
-				return -EBUSY;
-		}
+			fidx &= ~(0x1);
 	}
 
+	if (fidx != filter_id)
+		return -EINVAL;
+
+	nentries = cxgbe_filter_slots(adapter, fs->type);
+	ret = cxgbe_is_filter_set(&adapter->tids, filter_id, nentries);
+	if (ret)
+		return -EBUSY;
+
+	iq = get_filter_steerq(dev, fs);
+
 	/*
 	 * Check to make sure that provided filter index is not
@@ -1029,7 +984,5 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
 
 	fidx = adapter->tids.ftid_base + filter_id;
-	fid_bit = filter_id;
-	ret = cxgbe_set_ftid(&adapter->tids, fid_bit,
-			     fs->type ? FILTER_TYPE_IPV6 : FILTER_TYPE_IPV4);
+	ret = cxgbe_set_ftid(&adapter->tids, filter_id, nentries);
 	if (ret)
 		return ret;
@@ -1041,7 +994,5 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
 	if (ret) {
 		/* Clear the bits we have set above */
-		cxgbe_clear_ftid(&adapter->tids, fid_bit,
-				 fs->type ? FILTER_TYPE_IPV6 :
-					    FILTER_TYPE_IPV4);
+		cxgbe_clear_ftid(&adapter->tids, filter_id, nentries);
 		return ret;
 	}
@@ -1074,15 +1025,11 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
 	f->tid = fidx; /* Save the actual tid */
 	ret = set_filter_wr(dev, filter_id);
-	if (ret) {
-		fid_bit = f->tid - adapter->tids.ftid_base;
+	if (ret)
 		goto free_tid;
-	}
 
 	return ret;
 
 free_tid:
-	cxgbe_clear_ftid(&adapter->tids, fid_bit,
-			 fs->type ? FILTER_TYPE_IPV6 :
-				    FILTER_TYPE_IPV4);
+	cxgbe_clear_ftid(&adapter->tids, filter_id, nentries);
 	clear_filter(f);
 	return ret;
diff --git a/drivers/net/cxgbe/cxgbe_filter.h b/drivers/net/cxgbe/cxgbe_filter.h
index 6738ae4f1..06bac8ef0 100644
--- a/drivers/net/cxgbe/cxgbe_filter.h
+++ b/drivers/net/cxgbe/cxgbe_filter.h
@@ -249,5 +249,6 @@ cxgbe_bitmap_find_free_region(struct rte_bitmap *bmap, unsigned int size,
 }
 
-bool cxgbe_is_filter_set(struct tid_info *, int fidx, int family);
+u8 cxgbe_filter_slots(struct adapter *adap, u8 family);
+bool cxgbe_is_filter_set(struct tid_info *t, u32 fidx, u8 nentries);
 void cxgbe_filter_rpl(struct adapter *adap, const struct cpl_set_tcb_rpl *rpl);
 int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
@@ -257,5 +258,5 @@ int cxgbe_del_filter(struct rte_eth_dev *dev, unsigned int filter_id,
 		     struct ch_filter_specification *fs,
 		     struct filter_ctx *ctx);
-int cxgbe_alloc_ftid(struct adapter *adap, unsigned int family);
+int cxgbe_alloc_ftid(struct adapter *adap, u8 nentries);
 int cxgbe_init_hash_filter(struct adapter *adap);
 void cxgbe_hash_filter_rpl(struct adapter *adap,
diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
index 17d5608fa..f8f3d0a22 100644
--- a/drivers/net/cxgbe/cxgbe_flow.c
+++ b/drivers/net/cxgbe/cxgbe_flow.c
@@ -305,4 +305,5 @@ static int cxgbe_validate_fidxondel(struct filter_entry *f, unsigned int fidx)
 	struct adapter *adap = ethdev2adap(f->dev);
 	struct ch_filter_specification fs = f->fs;
+	u8 nentries;
 
 	if (fidx >= adap->tids.nftids) {
@@ -310,5 +311,7 @@ static int cxgbe_validate_fidxondel(struct filter_entry *f, unsigned int fidx)
 		return -EINVAL;
 	}
-	if (!cxgbe_is_filter_set(&adap->tids, fidx, fs.type)) {
+
+	nentries = cxgbe_filter_slots(adap, fs.type);
+	if (!cxgbe_is_filter_set(&adap->tids, fidx, nentries)) {
 		dev_err(adap, "Already free fidx:%d f:%p\n", fidx, f);
 		return -EINVAL;
@@ -322,8 +325,12 @@ cxgbe_validate_fidxonadd(struct ch_filter_specification *fs,
 			 struct adapter *adap, unsigned int fidx)
 {
-	if (cxgbe_is_filter_set(&adap->tids, fidx, fs->type)) {
+	u8 nentries;
+
+	nentries = cxgbe_filter_slots(adap, fs->type);
+	if (cxgbe_is_filter_set(&adap->tids, fidx, nentries)) {
 		dev_err(adap, "filter index: %d is busy.\n", fidx);
 		return -EBUSY;
 	}
+
 	if (fidx >= adap->tids.nftids) {
 		dev_err(adap, "filter index (%u) >= max(%u)\n",
@@ -352,7 +359,9 @@ static int cxgbe_get_fidx(struct rte_flow *flow, unsigned int *fidx)
 	/* For tcam get the next available slot, if default value specified */
 	if (flow->fidx == FILTER_ID_MAX) {
+		u8 nentries;
 		int idx;
 
-		idx = cxgbe_alloc_ftid(adap, fs->type);
+		nentries = cxgbe_filter_slots(adap, fs->type);
+		idx = cxgbe_alloc_ftid(adap, nentries);
 		if (idx < 0) {
 			dev_err(adap, "unable to get a filter index in tcam\n");
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:52.751531199 +0000
+++ 0016-net-cxgbe-fix-slot-allocation-for-IPv6-flows.patch	2019-12-03 17:29:51.716750661 +0000
@@ -1 +1 @@
-From 31d4d2334672fe9d96a0d23cdf914c1f219f932f Mon Sep 17 00:00:00 2001
+From 16c88049ae286623e8fb0b6cd5997b3081add248 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 31d4d2334672fe9d96a0d23cdf914c1f219f932f ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 3b7966d04..33b95a69a 100644
+index 461b71ebe..8cd26212f 100644
@@ -25 +26 @@
-@@ -214,18 +214,30 @@ static inline void mk_set_tcb_field_ulp(struct filter_entry *f,
+@@ -213,18 +213,30 @@ static inline void mk_set_tcb_field_ulp(struct filter_entry *f,
@@ -65 +66 @@
-@@ -238,7 +250,7 @@ bool cxgbe_is_filter_set(struct tid_info *t, int fidx, int family)
+@@ -237,7 +249,7 @@ bool cxgbe_is_filter_set(struct tid_info *t, int fidx, int family)
@@ -75 +76 @@
-@@ -247,6 +259,7 @@ int cxgbe_alloc_ftid(struct adapter *adap, unsigned int family)
+@@ -246,6 +258,7 @@ int cxgbe_alloc_ftid(struct adapter *adap, unsigned int family)
@@ -85 +86 @@
-@@ -566,5 +579,5 @@ static int cxgbe_set_hash_filter(struct rte_eth_dev *dev,
+@@ -565,5 +578,5 @@ static int cxgbe_set_hash_filter(struct rte_eth_dev *dev,
@@ -92 +93 @@
-@@ -805,9 +818,10 @@ out:
+@@ -804,9 +817,10 @@ out:
@@ -106 +107 @@
-@@ -816,12 +830,6 @@ static int cxgbe_set_ftid(struct tid_info *t, int fidx, int family)
+@@ -815,12 +829,6 @@ static int cxgbe_set_ftid(struct tid_info *t, int fidx, int family)
@@ -121 +122 @@
-@@ -829,18 +837,13 @@ static int cxgbe_set_ftid(struct tid_info *t, int fidx, int family)
+@@ -828,18 +836,13 @@ static int cxgbe_set_ftid(struct tid_info *t, int fidx, int family)
@@ -146 +147 @@
-@@ -860,4 +863,5 @@ int cxgbe_del_filter(struct rte_eth_dev *dev, unsigned int filter_id,
+@@ -859,4 +862,5 @@ int cxgbe_del_filter(struct rte_eth_dev *dev, unsigned int filter_id,
@@ -152 +153 @@
-@@ -870,16 +874,9 @@ int cxgbe_del_filter(struct rte_eth_dev *dev, unsigned int filter_id,
+@@ -869,16 +873,9 @@ int cxgbe_del_filter(struct rte_eth_dev *dev, unsigned int filter_id,
@@ -171 +172 @@
-@@ -888,4 +885,12 @@ int cxgbe_del_filter(struct rte_eth_dev *dev, unsigned int filter_id,
+@@ -887,4 +884,12 @@ int cxgbe_del_filter(struct rte_eth_dev *dev, unsigned int filter_id,
@@ -184 +185 @@
-@@ -897,6 +902,5 @@ int cxgbe_del_filter(struct rte_eth_dev *dev, unsigned int filter_id,
+@@ -896,6 +901,5 @@ int cxgbe_del_filter(struct rte_eth_dev *dev, unsigned int filter_id,
@@ -192 +193 @@
-@@ -928,8 +932,8 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
+@@ -927,8 +931,8 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
@@ -203 +204 @@
-@@ -946,17 +950,4 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
+@@ -945,17 +949,4 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
@@ -221 +222 @@
-@@ -965,60 +956,24 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
+@@ -964,60 +955,24 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
@@ -297 +298 @@
-@@ -1030,7 +985,5 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
+@@ -1029,7 +984,5 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
@@ -306 +307 @@
-@@ -1042,7 +995,5 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
+@@ -1041,7 +994,5 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
@@ -315 +316 @@
-@@ -1075,15 +1026,11 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
+@@ -1074,15 +1025,11 @@ int cxgbe_set_filter(struct rte_eth_dev *dev, unsigned int filter_id,
@@ -334 +335 @@
-index 1964730ba..06021c854 100644
+index 6738ae4f1..06bac8ef0 100644
@@ -353 +354 @@
-index 848c61f02..8a5d06ff3 100644
+index 17d5608fa..f8f3d0a22 100644


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

* [dpdk-stable] patch 'net/cxgbe: fix parsing VLAN ID rewrite action' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (14 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/cxgbe: fix slot allocation for IPv6 flows' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/cxgbe: fix prefetch for non-coalesced Tx packets' " Kevin Traynor
                   ` (47 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/0367aa0d7b11a240c92a0cb4fcd3184a63d57533

Thanks.

Kevin.

---
From 0367aa0d7b11a240c92a0cb4fcd3184a63d57533 Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Sat, 28 Sep 2019 02:00:04 +0530
Subject: [PATCH] net/cxgbe: fix parsing VLAN ID rewrite action

[ upstream commit 46a687dbfa4d51e31515e08cae045a691144c8b5 ]

Set VLAN action mode to VLAN_REWRITE only if VLAN_INSERT has not been
set yet. Otherwise, the resulting VLAN packets will have their VLAN
header rewritten, instead of pushing a new outer VLAN header.

Also fix the VLAN ID extraction logic and endianness issues.

Fixes: 1decc62b1cbe ("net/cxgbe: add flow operations to offload VLAN actions")

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

diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
index f8f3d0a22..f130c7eb4 100644
--- a/drivers/net/cxgbe/cxgbe_flow.c
+++ b/drivers/net/cxgbe/cxgbe_flow.c
@@ -447,4 +447,5 @@ ch_rte_parse_atype_switch(const struct rte_flow_action *a,
 	const struct rte_flow_action_phy_port *port;
 	int item_index;
+	u16 tmp_vlan;
 
 	switch (a->type) {
@@ -452,11 +453,19 @@ ch_rte_parse_atype_switch(const struct rte_flow_action *a,
 		vlanid = (const struct rte_flow_action_of_set_vlan_vid *)
 			  a->conf;
-		fs->newvlan = VLAN_REWRITE;
-		fs->vlan = vlanid->vlan_vid;
+		/* If explicitly asked to push a new VLAN header,
+		 * then don't set rewrite mode. Otherwise, the
+		 * incoming VLAN packets will get their VLAN fields
+		 * rewritten, instead of adding an additional outer
+		 * VLAN header.
+		 */
+		if (fs->newvlan != VLAN_INSERT)
+			fs->newvlan = VLAN_REWRITE;
+		tmp_vlan = fs->vlan & 0xe000;
+		fs->vlan = (be16_to_cpu(vlanid->vlan_vid) & 0xfff) | tmp_vlan;
 		break;
 	case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN:
 		pushvlan = (const struct rte_flow_action_of_push_vlan *)
 			    a->conf;
-		if (pushvlan->ethertype != ETHER_TYPE_VLAN)
+		if (be16_to_cpu(pushvlan->ethertype) != ETHER_TYPE_VLAN)
 			return rte_flow_error_set(e, EINVAL,
 						  RTE_FLOW_ERROR_TYPE_ACTION, a,
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:52.813236008 +0000
+++ 0017-net-cxgbe-fix-parsing-VLAN-ID-rewrite-action.patch	2019-12-03 17:29:51.716750661 +0000
@@ -1 +1 @@
-From 46a687dbfa4d51e31515e08cae045a691144c8b5 Mon Sep 17 00:00:00 2001
+From 0367aa0d7b11a240c92a0cb4fcd3184a63d57533 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 46a687dbfa4d51e31515e08cae045a691144c8b5 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 8a5d06ff3..4c8553039 100644
+index f8f3d0a22..f130c7eb4 100644
@@ -49,2 +50,2 @@
--		if (pushvlan->ethertype != RTE_ETHER_TYPE_VLAN)
-+		if (be16_to_cpu(pushvlan->ethertype) != RTE_ETHER_TYPE_VLAN)
+-		if (pushvlan->ethertype != ETHER_TYPE_VLAN)
++		if (be16_to_cpu(pushvlan->ethertype) != ETHER_TYPE_VLAN)


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

* [dpdk-stable] patch 'net/cxgbe: fix prefetch for non-coalesced Tx packets' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (15 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/cxgbe: fix parsing VLAN ID rewrite action' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/cxgbe: avoid polling link status before device start' " Kevin Traynor
                   ` (46 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/6072887060f9efeec9fed1546220ca2a7f2597d0

Thanks.

Kevin.

---
From 6072887060f9efeec9fed1546220ca2a7f2597d0 Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Sat, 28 Sep 2019 02:00:05 +0530
Subject: [PATCH] net/cxgbe: fix prefetch for non-coalesced Tx packets

[ upstream commit b1df19e43e1d1415ab7fae119e672a2f3b8f39f0 ]

Move prefetch code out of Tx coalesce path to allow prefetching for
non-coalesced Tx packets, as well.

Fixes: bf89cbedd2d9 ("cxgbe: optimize forwarding performance for 40G")

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

diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index 8926f8a29..5839a7bef 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -66,4 +66,5 @@ uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 	uint16_t pkts_sent, pkts_remain;
 	uint16_t total_sent = 0;
+	uint16_t idx = 0;
 	int ret = 0;
 
@@ -74,10 +75,14 @@ uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 	/* free up desc from already completed tx */
 	reclaim_completed_tx(&txq->q);
+	rte_prefetch0(rte_pktmbuf_mtod(tx_pkts[0], volatile void *));
 	while (total_sent < nb_pkts) {
 		pkts_remain = nb_pkts - total_sent;
 
 		for (pkts_sent = 0; pkts_sent < pkts_remain; pkts_sent++) {
-			ret = t4_eth_xmit(txq, tx_pkts[total_sent + pkts_sent],
-					  nb_pkts);
+			idx = total_sent + pkts_sent;
+			if ((idx + 1) < nb_pkts)
+				rte_prefetch0(rte_pktmbuf_mtod(tx_pkts[idx + 1],
+							volatile void *));
+			ret = t4_eth_xmit(txq, tx_pkts[idx], nb_pkts);
 			if (ret < 0)
 				break;
diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c
index ea28ea06c..172109c26 100644
--- a/drivers/net/cxgbe/sge.c
+++ b/drivers/net/cxgbe/sge.c
@@ -1153,5 +1153,4 @@ out_free:
 				goto out_free;
 			}
-			rte_prefetch0((volatile void *)addr);
 			return tx_do_packet_coalesce(txq, mbuf, cflits, adap,
 						     pi, addr, nb_pkts);
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:52.869695723 +0000
+++ 0018-net-cxgbe-fix-prefetch-for-non-coalesced-Tx-packets.patch	2019-12-03 17:29:51.719750599 +0000
@@ -1 +1 @@
-From b1df19e43e1d1415ab7fae119e672a2f3b8f39f0 Mon Sep 17 00:00:00 2001
+From 6072887060f9efeec9fed1546220ca2a7f2597d0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b1df19e43e1d1415ab7fae119e672a2f3b8f39f0 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 7d7be69ed..5d74f8ba3 100644
+index 8926f8a29..5839a7bef 100644
@@ -22 +23 @@
-@@ -68,4 +68,5 @@ uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -66,4 +66,5 @@ uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -28 +29 @@
-@@ -76,10 +77,14 @@ uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -74,10 +75,14 @@ uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -46 +47 @@
-index 641be9657..bf3190211 100644
+index ea28ea06c..172109c26 100644
@@ -49 +50 @@
-@@ -1155,5 +1155,4 @@ out_free:
+@@ -1153,5 +1153,4 @@ out_free:


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

* [dpdk-stable] patch 'net/cxgbe: avoid polling link status before device start' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (16 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/cxgbe: fix prefetch for non-coalesced Tx packets' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/ixgbe: fix X553 speed capability' " Kevin Traynor
                   ` (45 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/5ba12b7d0ce10864aa8e160d403882261ff62b29

Thanks.

Kevin.

---
From 5ba12b7d0ce10864aa8e160d403882261ff62b29 Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Sat, 28 Sep 2019 02:00:06 +0530
Subject: [PATCH] net/cxgbe: avoid polling link status before device start

[ upstream commit 10fb9e47f6ec0093397b62f2c74f221719f967f4 ]

Link updates come in firmware event queue, which is only created
when device starts. So, don't poll for link status if firmware
event queue is not yet created.

This fixes NULL dereference when accessing non existent firmware
event queue.

Fixes: 265af08e75ba ("net/cxgbe: add link up and down ops")

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

diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index 5839a7bef..07063fa7d 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -203,4 +203,7 @@ int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev,
 
 	for (i = 0; i < CXGBE_LINK_STATUS_POLL_CNT; i++) {
+		if (!s->fw_evtq.desc)
+			break;
+
 		cxgbe_poll(&s->fw_evtq, NULL, budget, &work_done);
 
@@ -236,4 +239,7 @@ int cxgbe_dev_set_link_up(struct rte_eth_dev *dev)
 	int ret;
 
+	if (!s->fw_evtq.desc)
+		return -ENOMEM;
+
 	/* Flush all link events */
 	cxgbe_poll(&s->fw_evtq, NULL, budget, &work_done);
@@ -262,4 +268,7 @@ int cxgbe_dev_set_link_down(struct rte_eth_dev *dev)
 	int ret;
 
+	if (!s->fw_evtq.desc)
+		return -ENOMEM;
+
 	/* Flush all link events */
 	cxgbe_poll(&s->fw_evtq, NULL, budget, &work_done);
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:52.931870396 +0000
+++ 0019-net-cxgbe-avoid-polling-link-status-before-device-st.patch	2019-12-03 17:29:51.720750578 +0000
@@ -1 +1 @@
-From 10fb9e47f6ec0093397b62f2c74f221719f967f4 Mon Sep 17 00:00:00 2001
+From 5ba12b7d0ce10864aa8e160d403882261ff62b29 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 10fb9e47f6ec0093397b62f2c74f221719f967f4 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 5d74f8ba3..5df8d746c 100644
+index 5839a7bef..07063fa7d 100644
@@ -25 +26 @@
-@@ -207,4 +207,7 @@ int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev,
+@@ -203,4 +203,7 @@ int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev,
@@ -33 +34 @@
-@@ -240,4 +243,7 @@ int cxgbe_dev_set_link_up(struct rte_eth_dev *dev)
+@@ -236,4 +239,7 @@ int cxgbe_dev_set_link_up(struct rte_eth_dev *dev)
@@ -41 +42 @@
-@@ -266,4 +272,7 @@ int cxgbe_dev_set_link_down(struct rte_eth_dev *dev)
+@@ -262,4 +268,7 @@ int cxgbe_dev_set_link_down(struct rte_eth_dev *dev)


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

* [dpdk-stable] patch 'net/ixgbe: fix X553 speed capability' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (17 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/cxgbe: avoid polling link status before device start' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/i40e: set speed to undefined for default case' " Kevin Traynor
                   ` (44 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Xiao Zhang; +Cc: Xiaolong Ye, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/89158c23ca84c76726076dce3f07a13bbeaa0e3d

Thanks.

Kevin.

---
From 89158c23ca84c76726076dce3f07a13bbeaa0e3d Mon Sep 17 00:00:00 2001
From: Xiao Zhang <xiao.zhang@intel.com>
Date: Wed, 25 Sep 2019 10:49:54 +0800
Subject: [PATCH] net/ixgbe: fix X553 speed capability

[ upstream commit a02ef30e05f249df417e436c0c924091c2955a2c ]

The speed capability of X553 1GbE should be ETH_LINK_SPEED_1G |
ETH_LINK_SPEED_100M | ETH_LINK_SPEED_10M rather than ETH_LINK_SPEED_1G |
ETH_LINK_SPEED_10G. Correct it to fix the issue.

Fixes: e274f5732225 ("ethdev: add speed capabilities")

Signed-off-by: Xiao Zhang <xiao.zhang@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@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 16d68fb2a..5492f5f5f 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -3826,4 +3826,9 @@ ixgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 
 	dev_info->speed_capa = ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G;
+	if (hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T ||
+			hw->device_id == IXGBE_DEV_ID_X550EM_A_1G_T_L)
+		dev_info->speed_capa = ETH_LINK_SPEED_10M |
+			ETH_LINK_SPEED_100M | ETH_LINK_SPEED_1G;
+
 	if (hw->mac.type == ixgbe_mac_X540 ||
 	    hw->mac.type == ixgbe_mac_X540_vf ||
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:52.986330436 +0000
+++ 0020-net-ixgbe-fix-X553-speed-capability.patch	2019-12-03 17:29:51.726750453 +0000
@@ -1 +1 @@
-From a02ef30e05f249df417e436c0c924091c2955a2c Mon Sep 17 00:00:00 2001
+From 89158c23ca84c76726076dce3f07a13bbeaa0e3d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a02ef30e05f249df417e436c0c924091c2955a2c ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 7bec95fe5..77c6d387f 100644
+index 16d68fb2a..5492f5f5f 100644
@@ -23 +24 @@
-@@ -3841,4 +3841,9 @@ ixgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -3826,4 +3826,9 @@ ixgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)


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

* [dpdk-stable] patch 'net/i40e: set speed to undefined for default case' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (18 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/ixgbe: fix X553 speed capability' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/bonding: fix slave id types' " Kevin Traynor
                   ` (43 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Laurent Hardy; +Cc: Xiaolong Ye, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/dfcebf5c28b8b71ee5d7f393a6cbe27acbeebc9d

Thanks.

Kevin.

---
From dfcebf5c28b8b71ee5d7f393a6cbe27acbeebc9d Mon Sep 17 00:00:00 2001
From: Laurent Hardy <laurent.hardy@6wind.com>
Date: Wed, 11 Sep 2019 18:02:51 +0200
Subject: [PATCH] net/i40e: set speed to undefined for default case

[ upstream commit 3c8c0b68b590fe8cd7e4a4d18b997eddd5b8b286 ]

During PF/VF link update, a default speed value of 100M will be set
if get_link_info has failed or speed is unknown.

Consequently if PF is put in no-carrier state, VFs will switch to
"in carrier" state due to a link up + a link speed set to 100M
(default value if no speed detected).

To be consistent with linux drivers on which PF and VFs are in
same carrier state, sets default speed to undefined (instead of 100M)
and updates a link status of VF only if link is up and speed is
different from undefined.

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

Signed-off-by: Laurent Hardy <laurent.hardy@6wind.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c    | 4 ++--
 drivers/net/i40e/i40e_ethdev_vf.c | 8 +++++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index b1b145f32..040bedfad 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2743,5 +2743,5 @@ update_link_aq(struct i40e_hw *hw, struct rte_eth_link *link,
 						&link_status, NULL);
 		if (unlikely(status != I40E_SUCCESS)) {
-			link->link_speed = ETH_SPEED_NUM_100M;
+			link->link_speed = ETH_SPEED_NUM_NONE;
 			link->link_duplex = ETH_LINK_FULL_DUPLEX;
 			PMD_DRV_LOG(ERR, "Failed to get link info");
@@ -2777,5 +2777,5 @@ update_link_aq(struct i40e_hw *hw, struct rte_eth_link *link,
 		break;
 	default:
-		link->link_speed = ETH_SPEED_NUM_100M;
+		link->link_speed = ETH_SPEED_NUM_NONE;
 		break;
 	}
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 4f6a1975f..16d67b593 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2074,11 +2074,13 @@ i40evf_dev_link_update(struct rte_eth_dev *dev,
 		break;
 	default:
-		new_link.link_speed = ETH_SPEED_NUM_100M;
+		new_link.link_speed = ETH_SPEED_NUM_NONE;
 		break;
 	}
 	/* full duplex only */
 	new_link.link_duplex = ETH_LINK_FULL_DUPLEX;
-	new_link.link_status = vf->link_up ? ETH_LINK_UP :
-					     ETH_LINK_DOWN;
+	new_link.link_status = vf->link_up &&
+				new_link.link_speed != ETH_SPEED_NUM_NONE
+				? ETH_LINK_UP
+				: ETH_LINK_DOWN;
 	new_link.link_autoneg =
 		!(dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED);
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:53.050651247 +0000
+++ 0021-net-i40e-set-speed-to-undefined-for-default-case.patch	2019-12-03 17:29:51.738750203 +0000
@@ -1 +1 @@
-From 3c8c0b68b590fe8cd7e4a4d18b997eddd5b8b286 Mon Sep 17 00:00:00 2001
+From dfcebf5c28b8b71ee5d7f393a6cbe27acbeebc9d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3c8c0b68b590fe8cd7e4a4d18b997eddd5b8b286 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index c145e6407..32d6dc117 100644
+index b1b145f32..040bedfad 100644
@@ -33 +34 @@
-@@ -2833,5 +2833,5 @@ update_link_aq(struct i40e_hw *hw, struct rte_eth_link *link,
+@@ -2743,5 +2743,5 @@ update_link_aq(struct i40e_hw *hw, struct rte_eth_link *link,
@@ -40 +41 @@
-@@ -2867,5 +2867,5 @@ update_link_aq(struct i40e_hw *hw, struct rte_eth_link *link,
+@@ -2777,5 +2777,5 @@ update_link_aq(struct i40e_hw *hw, struct rte_eth_link *link,
@@ -48 +49 @@
-index 7ffb111b8..5dba0928b 100644
+index 4f6a1975f..16d67b593 100644
@@ -51 +52 @@
-@@ -2142,11 +2142,13 @@ i40evf_dev_link_update(struct rte_eth_dev *dev,
+@@ -2074,11 +2074,13 @@ i40evf_dev_link_update(struct rte_eth_dev *dev,


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

* [dpdk-stable] patch 'net/bonding: fix slave id types' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (19 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/i40e: set speed to undefined for default case' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/bonding: fix OOB access in other aggregator modes' " Kevin Traynor
                   ` (42 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Hui Zhao; +Cc: David Marchand, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/ca538e25f0c02f47a39949f7dc41c8411483b914

Thanks.

Kevin.

---
From ca538e25f0c02f47a39949f7dc41c8411483b914 Mon Sep 17 00:00:00 2001
From: Hui Zhao <zhaohui8@huawei.com>
Date: Thu, 21 Mar 2019 21:28:13 +0100
Subject: [PATCH] net/bonding: fix slave id types

[ upstream commit c28aff1e41eedd9d44c480264efbd7f4dd5cf31e ]

mode_bond_id and mode_band_id are slave ids, stored on 16bits.

Fixes: f8244c6399d9 ("ethdev: increase port id range")

Signed-off-by: Hui Zhao <zhaohui8@huawei.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 1e6a3fc7c..3943ec139 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -639,5 +639,5 @@ tx_machine(struct bond_dev_private *internals, uint16_t slave_id)
 }
 
-static uint8_t
+static uint16_t
 max_index(uint64_t *a, int n)
 {
@@ -673,5 +673,6 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
 	uint64_t agg_count[8] = {0};
 	uint16_t default_slave = 0;
-	uint8_t mode_count_id, mode_band_id;
+	uint16_t mode_count_id;
+	uint16_t mode_band_id;
 	struct rte_eth_link link_info;
 
@@ -709,11 +710,9 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
 	switch (internals->mode4.agg_selection) {
 	case AGG_COUNT:
-		mode_count_id = max_index(
-				(uint64_t *)agg_count, slaves_count);
+		mode_count_id = max_index(agg_count, slaves_count);
 		new_agg_id = mode_count_id;
 		break;
 	case AGG_BANDWIDTH:
-		mode_band_id = max_index(
-				(uint64_t *)agg_bandwidth, slaves_count);
+		mode_band_id = max_index(agg_bandwidth, slaves_count);
 		new_agg_id = mode_band_id;
 		break;
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:53.118919055 +0000
+++ 0022-net-bonding-fix-slave-id-types.patch	2019-12-03 17:29:51.739750182 +0000
@@ -1 +1 @@
-From c28aff1e41eedd9d44c480264efbd7f4dd5cf31e Mon Sep 17 00:00:00 2001
+From ca538e25f0c02f47a39949f7dc41c8411483b914 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c28aff1e41eedd9d44c480264efbd7f4dd5cf31e ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index e50d946eb..c6a645a65 100644
+index 1e6a3fc7c..3943ec139 100644
@@ -22 +23 @@
-@@ -640,5 +640,5 @@ tx_machine(struct bond_dev_private *internals, uint16_t slave_id)
+@@ -639,5 +639,5 @@ tx_machine(struct bond_dev_private *internals, uint16_t slave_id)
@@ -29 +30 @@
-@@ -674,5 +674,6 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
+@@ -673,5 +673,6 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
@@ -36,2 +37,2 @@
- 	int ret;
-@@ -718,11 +719,9 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
+ 
+@@ -709,11 +710,9 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)


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

* [dpdk-stable] patch 'net/bonding: fix OOB access in other aggregator modes' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (20 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/bonding: fix slave id types' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/null: fix multi-process Rx and Tx' " Kevin Traynor
                   ` (41 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Hui Zhao; +Cc: David Marchand, Maxime Coquelin, Chas Williams, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/47233bb7f2eb73cb82d08ede312469951a06dcb8

Thanks.

Kevin.

---
From 47233bb7f2eb73cb82d08ede312469951a06dcb8 Mon Sep 17 00:00:00 2001
From: Hui Zhao <zhaohui8@huawei.com>
Date: Thu, 21 Mar 2019 21:28:14 +0100
Subject: [PATCH] net/bonding: fix OOB access in other aggregator modes

[ upstream commit dfbc596c2e1418780f77954e1859ffec9aebfe4f ]

slave aggregator_port_id is in [0, RTE_MAX_ETHPORTS-1] range.
If RTE_MAX_ETHPORTS is > 8, we can hit out of bound accesses on
agg_bandwidth[] and agg_count[] arrays.

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

Signed-off-by: Hui Zhao <zhaohui8@huawei.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Chas Williams <chas3@att.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 3943ec139..5004898e7 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -670,6 +670,6 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
 	uint16_t slaves_count, new_agg_id, i, j = 0;
 	uint16_t *slaves;
-	uint64_t agg_bandwidth[8] = {0};
-	uint64_t agg_count[8] = {0};
+	uint64_t agg_bandwidth[RTE_MAX_ETHPORTS] = {0};
+	uint64_t agg_count[RTE_MAX_ETHPORTS] = {0};
 	uint16_t default_slave = 0;
 	uint16_t mode_count_id;
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:53.179221724 +0000
+++ 0023-net-bonding-fix-OOB-access-in-other-aggregator-modes.patch	2019-12-03 17:29:51.740750161 +0000
@@ -1 +1 @@
-From dfbc596c2e1418780f77954e1859ffec9aebfe4f Mon Sep 17 00:00:00 2001
+From 47233bb7f2eb73cb82d08ede312469951a06dcb8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dfbc596c2e1418780f77954e1859ffec9aebfe4f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index c6a645a65..7d8da2b31 100644
+index 3943ec139..5004898e7 100644
@@ -25 +26 @@
-@@ -671,6 +671,6 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
+@@ -670,6 +670,6 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)


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

* [dpdk-stable] patch 'net/null: fix multi-process Rx and Tx' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (21 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/bonding: fix OOB access in other aggregator modes' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/bnxt: remove duplicate barrier' " Kevin Traynor
                   ` (40 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Yasufumi Ogawa; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/74677ac9c49816a7fbd81f8f0aad753dee504216

Thanks.

Kevin.

---
From 74677ac9c49816a7fbd81f8f0aad753dee504216 Mon Sep 17 00:00:00 2001
From: Yasufumi Ogawa <yasufum.o@gmail.com>
Date: Sun, 29 Sep 2019 11:41:41 +0900
Subject: [PATCH] net/null: fix multi-process Rx and Tx

[ upstream commit bccc77a6a74a6c30e68f88b2ef0d0099c45898c8 ]

Packet processing in secondary process cannot work because rx_pkt_burst
and tx_pkt_burst in eth_dev are not initialized while probing device.
This patch is to the initialization.

Fixes: ee27edbe0c10 ("drivers/net: share vdev data to secondary process")

Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/null/rte_eth_null.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index da081362c..1067e6e4e 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -622,4 +622,11 @@ rte_pmd_null_probe(struct rte_vdev_device *dev)
 		eth_dev->dev_ops = &ops;
 		eth_dev->device = &dev->device;
+		if (packet_copy) {
+			eth_dev->rx_pkt_burst = eth_null_copy_rx;
+			eth_dev->tx_pkt_burst = eth_null_copy_tx;
+		} else {
+			eth_dev->rx_pkt_burst = eth_null_rx;
+			eth_dev->tx_pkt_burst = eth_null_tx;
+		}
 		rte_eth_dev_probing_finish(eth_dev);
 		return 0;
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:53.235848274 +0000
+++ 0024-net-null-fix-multi-process-Rx-and-Tx.patch	2019-12-03 17:29:51.741750141 +0000
@@ -1 +1 @@
-From bccc77a6a74a6c30e68f88b2ef0d0099c45898c8 Mon Sep 17 00:00:00 2001
+From 74677ac9c49816a7fbd81f8f0aad753dee504216 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bccc77a6a74a6c30e68f88b2ef0d0099c45898c8 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index e2ff41a22..3a8904729 100644
+index da081362c..1067e6e4e 100644
@@ -23 +24 @@
-@@ -591,4 +591,11 @@ rte_pmd_null_probe(struct rte_vdev_device *dev)
+@@ -622,4 +622,11 @@ rte_pmd_null_probe(struct rte_vdev_device *dev)


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

* [dpdk-stable] patch 'net/bnxt: remove duplicate barrier' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (22 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/null: fix multi-process Rx and Tx' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/bnxt: replace memory barrier for doorbell response' " Kevin Traynor
                   ` (39 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Gavin Hu
  Cc: Steve Capper, Ruifeng Wang, Phil Yang, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/5855cfa39e5d58e880790dbd07e651882dc2458a

Thanks.

Kevin.

---
From 5855cfa39e5d58e880790dbd07e651882dc2458a Mon Sep 17 00:00:00 2001
From: Gavin Hu <gavin.hu@arm.com>
Date: Mon, 16 Sep 2019 19:27:16 +0800
Subject: [PATCH] net/bnxt: remove duplicate barrier

[ upstream commit 4a1721107c30603e078a611e99a4183de178fd7d ]

As there is an inclusive rte_io_wmb within the following rte_write32()
API who rings the doorbell, this makes the above rte_wmb unnecessary and
remove it.

Fixes: 1cd45aeb3270 ("net/bnxt: support Stratus VF device")

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 69b45283d..cecf8abdc 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -102,7 +102,4 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
 		msg_len = sizeof(short_input);
 
-		/* Sync memory write before updating doorbell */
-		rte_wmb();
-
 		max_req_len = BNXT_HWRM_SHORT_REQ_LEN;
 	}
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:53.285979484 +0000
+++ 0025-net-bnxt-remove-duplicate-barrier.patch	2019-12-03 17:29:51.743750099 +0000
@@ -1 +1 @@
-From 4a1721107c30603e078a611e99a4183de178fd7d Mon Sep 17 00:00:00 2001
+From 5855cfa39e5d58e880790dbd07e651882dc2458a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4a1721107c30603e078a611e99a4183de178fd7d ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 174dc75d5..e73d8ed76 100644
+index 69b45283d..cecf8abdc 100644
@@ -26 +27 @@
-@@ -128,7 +128,4 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
+@@ -102,7 +102,4 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,


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

* [dpdk-stable] patch 'net/bnxt: replace memory barrier for doorbell response' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (23 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/bnxt: remove duplicate barrier' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/bnxt: enforce IO barrier for doorbell command' " Kevin Traynor
                   ` (38 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Gavin Hu; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/b2bfe186b0770637d2fdff4f5357bce8950b816c

Thanks.

Kevin.

---
From b2bfe186b0770637d2fdff4f5357bce8950b816c Mon Sep 17 00:00:00 2001
From: Gavin Hu <gavin.hu@arm.com>
Date: Mon, 16 Sep 2019 19:27:17 +0800
Subject: [PATCH] net/bnxt: replace memory barrier for doorbell response

[ upstream commit 21ecbde99b2f0772d36eef8276a686f3135e5de9 ]

To read the doorbell response, which is held in the host CIO memory,
rte_cio_rmb is sufficient.

Fixes: 804e746c7b73 ("net/bnxt: add hardware resource manager init code")

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index cecf8abdc..7e6209a55 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -125,5 +125,5 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
 	for (i = 0; i < HWRM_CMD_TIMEOUT; i++) {
 		/* Sanity check on the resp->resp_len */
-		rte_rmb();
+		rte_cio_rmb();
 		if (resp->resp_len && resp->resp_len <=
 				bp->max_resp_len) {
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:53.346198806 +0000
+++ 0026-net-bnxt-replace-memory-barrier-for-doorbell-respons.patch	2019-12-03 17:29:51.745750057 +0000
@@ -1 +1 @@
-From 21ecbde99b2f0772d36eef8276a686f3135e5de9 Mon Sep 17 00:00:00 2001
+From b2bfe186b0770637d2fdff4f5357bce8950b816c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 21ecbde99b2f0772d36eef8276a686f3135e5de9 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index e73d8ed76..d7c33d21e 100644
+index cecf8abdc..7e6209a55 100644
@@ -22,2 +23,2 @@
-@@ -151,5 +151,5 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
- 	for (i = 0; i < timeout; i++) {
+@@ -125,5 +125,5 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
+ 	for (i = 0; i < HWRM_CMD_TIMEOUT; i++) {
@@ -27,2 +28,2 @@
- 		if (resp->resp_len && resp->resp_len <= bp->max_resp_len) {
- 			/* Last byte of resp contains the valid key */
+ 		if (resp->resp_len && resp->resp_len <=
+ 				bp->max_resp_len) {


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

* [dpdk-stable] patch 'net/bnxt: enforce IO barrier for doorbell command' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (24 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/bnxt: replace memory barrier for doorbell response' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/bnxt: fix flow steering' " Kevin Traynor
                   ` (37 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Gavin Hu; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/a60ed73cd01caeaec580bedf3197e7a7b27f3bb2

Thanks.

Kevin.

---
From a60ed73cd01caeaec580bedf3197e7a7b27f3bb2 Mon Sep 17 00:00:00 2001
From: Gavin Hu <gavin.hu@arm.com>
Date: Mon, 16 Sep 2019 19:27:18 +0800
Subject: [PATCH] net/bnxt: enforce IO barrier for doorbell command

[ upstream commit dda8e0e48723fc90e6222fcc1b04b94f240ae9b2 ]

The doorbell ringing operation requires a rte_io_mb immediately to make
the command complete and visible to the device before reading the
response, otherwise it may read stale or invalid responses.

Fixes: ca241d9a0952 ("net/bnxt: use I/O device memory read/write API")

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 7e6209a55..a57e5cf36 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -121,4 +121,10 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
 	bar = (uint8_t *)bp->bar0 + mb_trigger_offset;
 	rte_write32(1, bar);
+	/*
+	 * Make sure the channel doorbell ring command complete before
+	 * reading the response to avoid getting stale or invalid
+	 * responses.
+	 */
+	rte_io_mb();
 
 	/* Poll for the valid bit */
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:53.405272464 +0000
+++ 0027-net-bnxt-enforce-IO-barrier-for-doorbell-command.patch	2019-12-03 17:29:51.747750016 +0000
@@ -1 +1 @@
-From dda8e0e48723fc90e6222fcc1b04b94f240ae9b2 Mon Sep 17 00:00:00 2001
+From a60ed73cd01caeaec580bedf3197e7a7b27f3bb2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dda8e0e48723fc90e6222fcc1b04b94f240ae9b2 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index d7c33d21e..cdb6fa4f7 100644
+index 7e6209a55..a57e5cf36 100644
@@ -23 +24 @@
-@@ -147,4 +147,10 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
+@@ -121,4 +121,10 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,


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

* [dpdk-stable] patch 'net/bnxt: fix flow steering' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (25 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/bnxt: enforce IO barrier for doorbell command' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/bnxt: fix accessing variable before null check' " Kevin Traynor
                   ` (36 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Santoshkumar Karanappa Rastapur
  Cc: Lance Richardson, Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/c8b5fcd7003f0993980937700193b22e727e0b0f

Thanks.

Kevin.

---
From c8b5fcd7003f0993980937700193b22e727e0b0f Mon Sep 17 00:00:00 2001
From: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Date: Wed, 2 Oct 2019 10:17:30 -0700
Subject: [PATCH] net/bnxt: fix flow steering

[ upstream commit d43fe8ea0c40c5534d83950bff08aa89457a3fd7 ]

When user creates a flow similar to an existing flow with just the
destination queue change, we delete the old filter and allocate a new
one with this destination queue change. We were also allocating a new L2
filter matching the same destination mac resulting in 2 L2 filters for the
same destination mac.
This was causing any flow matching the destination mac to be steered to
this queue instead of the default queue.

Fixed it by deleting this stale L2 filter.

Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow")

Signed-off-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_flow.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 6a5995389..e4fd0d935 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -969,4 +969,8 @@ bnxt_match_filter(struct bnxt *bp, struct bnxt_filter_info *nf)
 				if (mf->dst_id == nf->dst_id)
 					return -EEXIST;
+				/* Clear the new L2 filter that was created
+				 * earlier in bnxt_validate_and_parse_flow.
+				 */
+				bnxt_hwrm_clear_l2_filter(bp, nf);
 				/*
 				 * Same Flow, Different queue
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:53.461902215 +0000
+++ 0028-net-bnxt-fix-flow-steering.patch	2019-12-03 17:29:51.748749995 +0000
@@ -1 +1 @@
-From d43fe8ea0c40c5534d83950bff08aa89457a3fd7 Mon Sep 17 00:00:00 2001
+From c8b5fcd7003f0993980937700193b22e727e0b0f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d43fe8ea0c40c5534d83950bff08aa89457a3fd7 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index deb9733e9..be9b6fad3 100644
+index 6a5995389..e4fd0d935 100644
@@ -31 +32 @@
-@@ -1029,4 +1029,8 @@ bnxt_match_filter(struct bnxt *bp, struct bnxt_filter_info *nf)
+@@ -969,4 +969,8 @@ bnxt_match_filter(struct bnxt *bp, struct bnxt_filter_info *nf)


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

* [dpdk-stable] patch 'net/bnxt: fix accessing variable before null check' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (26 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/bnxt: fix flow steering' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/szedata2: fix dependency " Kevin Traynor
                   ` (35 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Santoshkumar Karanappa Rastapur, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/1b219a2784c22e40023d7f9a5b749bf74c46a8d1

Thanks.

Kevin.

---
From 1b219a2784c22e40023d7f9a5b749bf74c46a8d1 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 2 Oct 2019 10:17:41 -0700
Subject: [PATCH] net/bnxt: fix accessing variable before null check

[ upstream commit f0f7b157c179bcccc199adb15eae8bea49649933 ]

Check input argument "rxq" in bnxt_rx_queue_release_mbufs(), to be sure
variable is not NULL before accessing it.

Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxq.c | 53 +++++++++++++++++++------------------
 1 file changed, 27 insertions(+), 26 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 1fbc66271..df80ce22f 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -208,37 +208,38 @@ void bnxt_rx_queue_release_mbufs(struct bnxt_rx_queue *rxq)
 	uint16_t i;
 
+	if (!rxq)
+		return;
+
 	rte_spinlock_lock(&rxq->lock);
 
-	if (rxq) {
-		sw_ring = rxq->rx_ring->rx_buf_ring;
-		if (sw_ring) {
-			for (i = 0;
-			     i < rxq->rx_ring->rx_ring_struct->ring_size; i++) {
-				if (sw_ring[i].mbuf) {
-					rte_pktmbuf_free_seg(sw_ring[i].mbuf);
-					sw_ring[i].mbuf = NULL;
-				}
+	sw_ring = rxq->rx_ring->rx_buf_ring;
+	if (sw_ring) {
+		for (i = 0;
+		     i < rxq->rx_ring->rx_ring_struct->ring_size; i++) {
+			if (sw_ring[i].mbuf) {
+				rte_pktmbuf_free_seg(sw_ring[i].mbuf);
+				sw_ring[i].mbuf = NULL;
 			}
 		}
-		/* Free up mbufs in Agg ring */
-		sw_ring = rxq->rx_ring->ag_buf_ring;
-		if (sw_ring) {
-			for (i = 0;
-			     i < rxq->rx_ring->ag_ring_struct->ring_size; i++) {
-				if (sw_ring[i].mbuf) {
-					rte_pktmbuf_free_seg(sw_ring[i].mbuf);
-					sw_ring[i].mbuf = NULL;
-				}
+	}
+	/* Free up mbufs in Agg ring */
+	sw_ring = rxq->rx_ring->ag_buf_ring;
+	if (sw_ring) {
+		for (i = 0;
+		     i < rxq->rx_ring->ag_ring_struct->ring_size; i++) {
+			if (sw_ring[i].mbuf) {
+				rte_pktmbuf_free_seg(sw_ring[i].mbuf);
+				sw_ring[i].mbuf = NULL;
 			}
 		}
+	}
 
-		/* Free up mbufs in TPA */
-		tpa_info = rxq->rx_ring->tpa_info;
-		if (tpa_info) {
-			for (i = 0; i < BNXT_TPA_MAX; i++) {
-				if (tpa_info[i].mbuf) {
-					rte_pktmbuf_free_seg(tpa_info[i].mbuf);
-					tpa_info[i].mbuf = NULL;
-				}
+	/* Free up mbufs in TPA */
+	tpa_info = rxq->rx_ring->tpa_info;
+	if (tpa_info) {
+		for (i = 0; i < BNXT_TPA_MAX; i++) {
+			if (tpa_info[i].mbuf) {
+				rte_pktmbuf_free_seg(tpa_info[i].mbuf);
+				tpa_info[i].mbuf = NULL;
 			}
 		}
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:53.517143233 +0000
+++ 0029-net-bnxt-fix-accessing-variable-before-null-check.patch	2019-12-03 17:29:51.748749995 +0000
@@ -1 +1 @@
-From f0f7b157c179bcccc199adb15eae8bea49649933 Mon Sep 17 00:00:00 2001
+From 1b219a2784c22e40023d7f9a5b749bf74c46a8d1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f0f7b157c179bcccc199adb15eae8bea49649933 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 4b506f865..dac8ccb16 100644
+index 1fbc66271..df80ce22f 100644


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

* [dpdk-stable] patch 'net/szedata2: fix dependency check' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (27 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/bnxt: fix accessing variable before null check' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/bnxt: fix multicast filter programming' " Kevin Traynor
                   ` (34 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Jan Remes, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/ad84f96f137acdbcba0383a0b5ffecc804502732

Thanks.

Kevin.

---
From ad84f96f137acdbcba0383a0b5ffecc804502732 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Sat, 14 Sep 2019 11:37:00 +0200
Subject: [PATCH] net/szedata2: fix dependency check

[ upstream commit 07737474ece260fc4adbc46a0b2e7352887fa0c2 ]

The library libsze2 provides a pkg-config file: libsze2.pc.
Looking for this .pc file - with dependency() - is preferred
than looking for the library - with cc.find_library().

If the library is not installed in a standard path,
it can be found thanks to PKG_CONFIG_PATH variable.
The previous solution required to use CFLAGS and LDFLAGS
environment variables.

Fixes: 508cfe6be9f1 ("net/szedata2: add to meson build")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Jan Remes <remes@netcope.com>
---
 drivers/net/szedata2/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/szedata2/meson.build b/drivers/net/szedata2/meson.build
index da3733743..a64d38fa0 100644
--- a/drivers/net/szedata2/meson.build
+++ b/drivers/net/szedata2/meson.build
@@ -2,5 +2,5 @@
 # Copyright(c) 2018 Intel Corporation
 
-dep = cc.find_library('sze2', required: false)
+dep = dependency('libsze2', required: false)
 build = dep.found()
 ext_deps += dep
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:53.566254345 +0000
+++ 0030-net-szedata2-fix-dependency-check.patch	2019-12-03 17:29:51.749749974 +0000
@@ -1 +1 @@
-From 07737474ece260fc4adbc46a0b2e7352887fa0c2 Mon Sep 17 00:00:00 2001
+From ad84f96f137acdbcba0383a0b5ffecc804502732 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 07737474ece260fc4adbc46a0b2e7352887fa0c2 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 032b42518..b53fcbc59 100644
+index da3733743..a64d38fa0 100644
@@ -34 +35 @@
- reason = 'missing dependency, "libsze2"'
+ ext_deps += dep


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

* [dpdk-stable] patch 'net/bnxt: fix multicast filter programming' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (28 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/szedata2: fix dependency " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/qede: limit Rx ring index read for debug' " Kevin Traynor
                   ` (33 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/48ff9349952ec92529454ea85130af5e1354b872

Thanks.

Kevin.

---
From 48ff9349952ec92529454ea85130af5e1354b872 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 2 Oct 2019 16:26:00 -0700
Subject: [PATCH] net/bnxt: fix multicast filter programming

[ upstream commit 9f9e759bb682595fa796e516afff157a0ba93301 ]

Fixed multicast filter programming and allmulti programming.
Fixed to skip programming multicast macs if the user requests
allmulti mode.

Also removed a comment in bnxt_hwrm_cfa_l2_set_rx_mask() which is
no longer valid now.

Fixes: d69851df12b2 ("net/bnxt: support multicast filter and set MAC addr")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c |  4 ++++
 drivers/net/bnxt/bnxt_hwrm.c   | 11 ++++-------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 2f3e067ed..76228ae8d 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1592,4 +1592,8 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev,
 
 	vnic->mc_addr_cnt = i;
+	if (vnic->mc_addr_cnt)
+		vnic->flags |= BNXT_VNIC_INFO_MCAST;
+	else
+		vnic->flags &= ~BNXT_VNIC_INFO_MCAST;
 
 allmulti:
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index a57e5cf36..1bd8d3d9f 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -254,18 +254,15 @@ int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp,
 	req.vnic_id = rte_cpu_to_le_16(vnic->fw_vnic_id);
 
-	/* FIXME add multicast flag, when multicast adding options is supported
-	 * by ethtool.
-	 */
 	if (vnic->flags & BNXT_VNIC_INFO_BCAST)
 		mask |= HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_BCAST;
 	if (vnic->flags & BNXT_VNIC_INFO_UNTAGGED)
 		mask |= HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLAN_NONVLAN;
+
 	if (vnic->flags & BNXT_VNIC_INFO_PROMISC)
 		mask |= HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_PROMISCUOUS;
-	if (vnic->flags & BNXT_VNIC_INFO_ALLMULTI)
+
+	if (vnic->flags & BNXT_VNIC_INFO_ALLMULTI) {
 		mask |= HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ALL_MCAST;
-	if (vnic->flags & BNXT_VNIC_INFO_MCAST)
-		mask |= HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_MCAST;
-	if (vnic->mc_addr_cnt) {
+	} else if (vnic->flags & BNXT_VNIC_INFO_MCAST) {
 		mask |= HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_MCAST;
 		req.num_mc_entries = rte_cpu_to_le_32(vnic->mc_addr_cnt);
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:53.619247346 +0000
+++ 0031-net-bnxt-fix-multicast-filter-programming.patch	2019-12-03 17:29:51.754749870 +0000
@@ -1 +1 @@
-From 9f9e759bb682595fa796e516afff157a0ba93301 Mon Sep 17 00:00:00 2001
+From 48ff9349952ec92529454ea85130af5e1354b872 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9f9e759bb682595fa796e516afff157a0ba93301 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index e305ad416..02eacf796 100644
+index 2f3e067ed..76228ae8d 100644
@@ -27 +28 @@
-@@ -2054,4 +2054,8 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev,
+@@ -1592,4 +1592,8 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev,
@@ -37 +38 @@
-index 2a7e0d6d1..011cd05ae 100644
+index a57e5cf36..1bd8d3d9f 100644
@@ -40 +41 @@
-@@ -296,18 +296,15 @@ int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp,
+@@ -254,18 +254,15 @@ int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp,


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

* [dpdk-stable] patch 'net/qede: limit Rx ring index read for debug' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (29 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/bnxt: fix multicast filter programming' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/atlantic: add FW mailbox guard mutex' " Kevin Traynor
                   ` (32 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: David Marchand; +Cc: Rasesh Mody, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/c0384d31df0a725fc2df7e8cfaf2ba32dc3082ec

Thanks.

Kevin.

---
From c0384d31df0a725fc2df7e8cfaf2ba32dc3082ec Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 27 Sep 2019 13:28:49 +0200
Subject: [PATCH] net/qede: limit Rx ring index read for debug

[ upstream commit ff3555d6849748f84056ba2f517dc50ac5718974 ]

Caught by clang, this idx value is only used for a debug message when
the mbufs allocation fails.
No need to use idx as a temporary storage.

Fixes: 8f2312474529 ("net/qede: fix performance bottleneck in Rx path")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
---
 drivers/net/qede/qede_rxtx.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index ca1305f1b..52ebc8b8b 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -47,6 +47,4 @@ static inline int qede_alloc_rx_bulk_mbufs(struct qede_rx_queue *rxq, int count)
 	uint16_t idx;
 
-	idx = rxq->sw_rx_prod & NUM_RX_BDS(rxq);
-
 	if (count > QEDE_MAX_BULK_ALLOC_COUNT)
 		count = QEDE_MAX_BULK_ALLOC_COUNT;
@@ -57,5 +55,7 @@ static inline int qede_alloc_rx_bulk_mbufs(struct qede_rx_queue *rxq, int count)
 			   "Failed to allocate %d rx buffers "
 			    "sw_rx_prod %u sw_rx_cons %u mp entries %u free %u",
-			    count, idx, rxq->sw_rx_cons & NUM_RX_BDS(rxq),
+			    count,
+			    rxq->sw_rx_prod & NUM_RX_BDS(rxq),
+			    rxq->sw_rx_cons & NUM_RX_BDS(rxq),
 			    rte_mempool_avail_count(rxq->mb_pool),
 			    rte_mempool_in_use_count(rxq->mb_pool));
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:53.681625068 +0000
+++ 0032-net-qede-limit-Rx-ring-index-read-for-debug.patch	2019-12-03 17:29:51.755749849 +0000
@@ -1 +1 @@
-From ff3555d6849748f84056ba2f517dc50ac5718974 Mon Sep 17 00:00:00 2001
+From c0384d31df0a725fc2df7e8cfaf2ba32dc3082ec Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ff3555d6849748f84056ba2f517dc50ac5718974 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index dbb74fc64..fffccf070 100644
+index ca1305f1b..52ebc8b8b 100644


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

* [dpdk-stable] patch 'net/atlantic: add FW mailbox guard mutex' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (30 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/qede: limit Rx ring index read for debug' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/cxgbe: fix races on flow API operations' " Kevin Traynor
                   ` (31 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Pavel Belous; +Cc: Igor Russkikh, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/b3f030c219d633fcdc73824a8958e3ab1b2e8a95

Thanks.

Kevin.

---
From b3f030c219d633fcdc73824a8958e3ab1b2e8a95 Mon Sep 17 00:00:00 2001
From: Pavel Belous <pavel.belous@aquantia.com>
Date: Fri, 20 Sep 2019 16:22:07 +0000
Subject: [PATCH] net/atlantic: add FW mailbox guard mutex

[ upstream commit e9924638f5c967e119983f871959bc632d37d83d ]

Driver uses the Firmware mailbox to read statistics and configure
some features.
This patch introduces a mutex to provide consistent access to the
FW mailbox to prevent potential data corruption.

Fixes: 86d36773bd42 ("net/atlantic: implement firmware operations")

Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
---
 drivers/net/atlantic/atl_ethdev.c             |  4 +
 drivers/net/atlantic/atl_types.h              |  3 +
 .../net/atlantic/hw_atl/hw_atl_utils_fw2x.c   | 73 ++++++++++++++-----
 3 files changed, 61 insertions(+), 19 deletions(-)

diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index 623c7166e..761347fb5 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -360,4 +360,6 @@ eth_atl_dev_init(struct rte_eth_dev *eth_dev)
 	hw->aq_nic_cfg = &adapter->hw_cfg;
 
+	pthread_mutex_init(&hw->mbox_mutex, NULL);
+
 	/* disable interrupt */
 	atl_disable_intr(hw);
@@ -423,4 +425,6 @@ eth_atl_dev_uninit(struct rte_eth_dev *eth_dev)
 	eth_dev->data->mac_addrs = NULL;
 
+	pthread_mutex_destroy(&hw->mbox_mutex);
+
 	return 0;
 }
diff --git a/drivers/net/atlantic/atl_types.h b/drivers/net/atlantic/atl_types.h
index c53d58969..1a7965c2f 100644
--- a/drivers/net/atlantic/atl_types.h
+++ b/drivers/net/atlantic/atl_types.h
@@ -11,4 +11,5 @@
 #include <stdbool.h>
 #include <netinet/in.h>
+#include <pthread.h>
 
 typedef uint8_t		u8;
@@ -104,4 +105,6 @@ struct aq_hw_s {
 	u32 rpc_tid;
 	struct hw_aq_atl_utils_fw_rpc rpc;
+
+	pthread_mutex_t mbox_mutex;
 };
 
diff --git a/drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c b/drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c
index 11f14d1a2..a6c686833 100644
--- a/drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c
+++ b/drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c
@@ -7,4 +7,5 @@
 
 #include <rte_ether.h>
+#include <pthread.h>
 #include "../atl_hw_regs.h"
 
@@ -214,4 +215,6 @@ int aq_fw2x_get_mac_permanent(struct aq_hw_s *self, u8 *mac)
 	u32 efuse_addr = aq_hw_read_reg(self, HW_ATL_FW2X_MPI_EFUSE_ADDR);
 
+	pthread_mutex_lock(&self->mbox_mutex);
+
 	if (efuse_addr != 0) {
 		err = hw_atl_utils_fw_downld_dwords(self,
@@ -220,5 +223,5 @@ int aq_fw2x_get_mac_permanent(struct aq_hw_s *self, u8 *mac)
 						    ARRAY_SIZE(mac_addr));
 		if (err)
-			return err;
+			goto exit;
 		mac_addr[0] = rte_constant_bswap32(mac_addr[0]);
 		mac_addr[1] = rte_constant_bswap32(mac_addr[1]);
@@ -249,4 +252,8 @@ int aq_fw2x_get_mac_permanent(struct aq_hw_s *self, u8 *mac)
 		mac[0] = (u8)(0xFFU & h);
 	}
+
+exit:
+	pthread_mutex_unlock(&self->mbox_mutex);
+
 	return err;
 }
@@ -258,4 +265,7 @@ static int aq_fw2x_update_stats(struct aq_hw_s *self)
 	u32 orig_stats_val = mpi_opts & BIT(CAPS_HI_STATISTICS);
 
+
+	pthread_mutex_lock(&self->mbox_mutex);
+
 	/* Toggle statistics bit for FW to update */
 	mpi_opts = mpi_opts ^ BIT(CAPS_HI_STATISTICS);
@@ -268,7 +278,13 @@ static int aq_fw2x_update_stats(struct aq_hw_s *self)
 		       1U, 10000U);
 	if (err)
-		return err;
+		goto exit;
+
+	err = hw_atl_utils_update_stats(self);
+
+exit:
+	pthread_mutex_unlock(&self->mbox_mutex);
+
+	return err;
 
-	return hw_atl_utils_update_stats(self);
 }
 
@@ -280,4 +296,6 @@ static int aq_fw2x_get_temp(struct aq_hw_s *self, int *temp)
 	u32 temp_res;
 
+	pthread_mutex_lock(&self->mbox_mutex);
+
 	/* Toggle statistics bit for FW to 0x36C.18 (CAPS_HI_TEMPERATURE) */
 	mpi_opts = mpi_opts ^ BIT(CAPS_HI_TEMPERATURE);
@@ -295,4 +313,7 @@ static int aq_fw2x_get_temp(struct aq_hw_s *self, int *temp)
 				sizeof(temp_res) / sizeof(u32));
 
+
+	pthread_mutex_unlock(&self->mbox_mutex);
+
 	if (err)
 		return err;
@@ -512,4 +533,6 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, int dev_addr,
 		return -EOPNOTSUPP;
 
+	pthread_mutex_lock(&self->mbox_mutex);
+
 	request.msg_id = 0;
 	request.device_id = dev_addr;
@@ -523,5 +546,5 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, int dev_addr,
 
 	if (err < 0)
-		return err;
+		goto exit;
 
 	/* Toggle 0x368.CAPS_LO_SMBUS_READ bit */
@@ -538,5 +561,5 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, int dev_addr,
 
 	if (err < 0)
-		return err;
+		goto exit;
 
 	err = hw_atl_utils_fw_downld_dwords(self, self->rpc_addr + sizeof(u32),
@@ -545,8 +568,10 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, int dev_addr,
 
 	if (err < 0)
-		return err;
+		goto exit;
 
-	if (result)
-		return -EIO;
+	if (result) {
+		err = -EIO;
+		goto exit;
+	}
 
 	if (num_dwords) {
@@ -557,5 +582,5 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, int dev_addr,
 
 		if (err < 0)
-			return err;
+			goto exit;
 	}
 
@@ -570,5 +595,5 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, int dev_addr,
 
 		if (err < 0)
-			return err;
+			goto exit;
 
 		rte_memcpy((u8 *)data + len - bytes_remains,
@@ -576,5 +601,8 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, int dev_addr,
 	}
 
-	return 0;
+exit:
+	pthread_mutex_unlock(&self->mbox_mutex);
+
+	return err;
 }
 
@@ -595,4 +623,6 @@ static int aq_fw2x_set_eeprom(struct aq_hw_s *self, int dev_addr,
 	request.length = len;
 
+	pthread_mutex_lock(&self->mbox_mutex);
+
 	/* Write SMBUS request to cfg memory */
 	err = hw_atl_utils_fw_upload_dwords(self, self->rpc_addr,
@@ -601,5 +631,5 @@ static int aq_fw2x_set_eeprom(struct aq_hw_s *self, int dev_addr,
 
 	if (err < 0)
-		return err;
+		goto exit;
 
 	/* Write SMBUS data to cfg memory */
@@ -614,5 +644,5 @@ static int aq_fw2x_set_eeprom(struct aq_hw_s *self, int dev_addr,
 
 		if (err < 0)
-			return err;
+			goto exit;
 	}
 
@@ -630,5 +660,5 @@ static int aq_fw2x_set_eeprom(struct aq_hw_s *self, int dev_addr,
 
 		if (err < 0)
-			return err;
+			goto exit;
 	}
 
@@ -645,5 +675,5 @@ static int aq_fw2x_set_eeprom(struct aq_hw_s *self, int dev_addr,
 
 	if (err < 0)
-		return err;
+		goto exit;
 
 	/* Read status of write operation */
@@ -653,10 +683,15 @@ static int aq_fw2x_set_eeprom(struct aq_hw_s *self, int dev_addr,
 
 	if (err < 0)
-		return err;
+		goto exit;
 
-	if (result)
-		return -EIO;
+	if (result) {
+		err = -EIO;
+		goto exit;
+	}
 
-	return 0;
+exit:
+	pthread_mutex_unlock(&self->mbox_mutex);
+
+	return err;
 }
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:53.733776541 +0000
+++ 0033-net-atlantic-add-FW-mailbox-guard-mutex.patch	2019-12-03 17:29:51.757749807 +0000
@@ -1 +1 @@
-From e9924638f5c967e119983f871959bc632d37d83d Mon Sep 17 00:00:00 2001
+From b3f030c219d633fcdc73824a8958e3ab1b2e8a95 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e9924638f5c967e119983f871959bc632d37d83d ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -19,2 +20,2 @@
- .../net/atlantic/hw_atl/hw_atl_utils_fw2x.c   | 82 ++++++++++++++-----
- 3 files changed, 68 insertions(+), 21 deletions(-)
+ .../net/atlantic/hw_atl/hw_atl_utils_fw2x.c   | 73 ++++++++++++++-----
+ 3 files changed, 61 insertions(+), 19 deletions(-)
@@ -23 +24 @@
-index d5c2ec594..b2b3bd36c 100644
+index 623c7166e..761347fb5 100644
@@ -26 +27 @@
-@@ -408,4 +408,6 @@ eth_atl_dev_init(struct rte_eth_dev *eth_dev)
+@@ -360,4 +360,6 @@ eth_atl_dev_init(struct rte_eth_dev *eth_dev)
@@ -33 +34 @@
-@@ -472,4 +474,6 @@ eth_atl_dev_uninit(struct rte_eth_dev *eth_dev)
+@@ -423,4 +425,6 @@ eth_atl_dev_uninit(struct rte_eth_dev *eth_dev)
@@ -41 +42 @@
-index 19aaf3767..c200a1fad 100644
+index c53d58969..1a7965c2f 100644
@@ -50 +51 @@
-@@ -138,4 +139,6 @@ struct aq_hw_s {
+@@ -104,4 +105,6 @@ struct aq_hw_s {
@@ -58 +59 @@
-index 70d6e14bb..55dc728d3 100644
+index 11f14d1a2..a6c686833 100644
@@ -67 +68 @@
-@@ -218,4 +219,6 @@ int aq_fw2x_get_mac_permanent(struct aq_hw_s *self, u8 *mac)
+@@ -214,4 +215,6 @@ int aq_fw2x_get_mac_permanent(struct aq_hw_s *self, u8 *mac)
@@ -74 +75 @@
-@@ -224,5 +227,5 @@ int aq_fw2x_get_mac_permanent(struct aq_hw_s *self, u8 *mac)
+@@ -220,5 +223,5 @@ int aq_fw2x_get_mac_permanent(struct aq_hw_s *self, u8 *mac)
@@ -81 +82 @@
-@@ -253,4 +256,8 @@ int aq_fw2x_get_mac_permanent(struct aq_hw_s *self, u8 *mac)
+@@ -249,4 +252,8 @@ int aq_fw2x_get_mac_permanent(struct aq_hw_s *self, u8 *mac)
@@ -90 +91 @@
-@@ -262,4 +269,7 @@ static int aq_fw2x_update_stats(struct aq_hw_s *self)
+@@ -258,4 +265,7 @@ static int aq_fw2x_update_stats(struct aq_hw_s *self)
@@ -98 +99 @@
-@@ -272,7 +282,13 @@ static int aq_fw2x_update_stats(struct aq_hw_s *self)
+@@ -268,7 +278,13 @@ static int aq_fw2x_update_stats(struct aq_hw_s *self)
@@ -114 +115 @@
-@@ -284,4 +300,6 @@ static int aq_fw2x_get_temp(struct aq_hw_s *self, int *temp)
+@@ -280,4 +296,6 @@ static int aq_fw2x_get_temp(struct aq_hw_s *self, int *temp)
@@ -121 +122 @@
-@@ -299,4 +317,7 @@ static int aq_fw2x_get_temp(struct aq_hw_s *self, int *temp)
+@@ -295,4 +313,7 @@ static int aq_fw2x_get_temp(struct aq_hw_s *self, int *temp)
@@ -129 +130 @@
-@@ -516,4 +537,6 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, int dev_addr,
+@@ -512,4 +533,6 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, int dev_addr,
@@ -136 +137 @@
-@@ -527,5 +550,5 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, int dev_addr,
+@@ -523,5 +546,5 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, int dev_addr,
@@ -143 +144 @@
-@@ -542,5 +565,5 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, int dev_addr,
+@@ -538,5 +561,5 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, int dev_addr,
@@ -150 +151 @@
-@@ -549,8 +572,10 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, int dev_addr,
+@@ -545,8 +568,10 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, int dev_addr,
@@ -164 +165 @@
-@@ -561,5 +586,5 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, int dev_addr,
+@@ -557,5 +582,5 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, int dev_addr,
@@ -171 +172 @@
-@@ -574,5 +599,5 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, int dev_addr,
+@@ -570,5 +595,5 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, int dev_addr,
@@ -178 +179 @@
-@@ -580,5 +605,8 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, int dev_addr,
+@@ -576,5 +601,8 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, int dev_addr,
@@ -188 +189 @@
-@@ -599,4 +627,6 @@ static int aq_fw2x_set_eeprom(struct aq_hw_s *self, int dev_addr,
+@@ -595,4 +623,6 @@ static int aq_fw2x_set_eeprom(struct aq_hw_s *self, int dev_addr,
@@ -195 +196 @@
-@@ -605,5 +635,5 @@ static int aq_fw2x_set_eeprom(struct aq_hw_s *self, int dev_addr,
+@@ -601,5 +631,5 @@ static int aq_fw2x_set_eeprom(struct aq_hw_s *self, int dev_addr,
@@ -202 +203 @@
-@@ -618,5 +648,5 @@ static int aq_fw2x_set_eeprom(struct aq_hw_s *self, int dev_addr,
+@@ -614,5 +644,5 @@ static int aq_fw2x_set_eeprom(struct aq_hw_s *self, int dev_addr,
@@ -209 +210 @@
-@@ -634,5 +664,5 @@ static int aq_fw2x_set_eeprom(struct aq_hw_s *self, int dev_addr,
+@@ -630,5 +660,5 @@ static int aq_fw2x_set_eeprom(struct aq_hw_s *self, int dev_addr,
@@ -216 +217 @@
-@@ -649,5 +679,5 @@ static int aq_fw2x_set_eeprom(struct aq_hw_s *self, int dev_addr,
+@@ -645,5 +675,5 @@ static int aq_fw2x_set_eeprom(struct aq_hw_s *self, int dev_addr,
@@ -223 +224 @@
-@@ -657,10 +687,15 @@ static int aq_fw2x_set_eeprom(struct aq_hw_s *self, int dev_addr,
+@@ -653,10 +683,15 @@ static int aq_fw2x_set_eeprom(struct aq_hw_s *self, int dev_addr,
@@ -243,29 +243,0 @@
-@@ -678,4 +713,6 @@ static int aq_fw2x_send_macsec_request(struct aq_hw_s *self,
- 		return -EOPNOTSUPP;
- 
-+	pthread_mutex_lock(&self->mbox_mutex);
-+
- 	/* Write macsec request to cfg memory */
- 	err = hw_atl_utils_fw_upload_dwords(self, self->rpc_addr,
-@@ -684,5 +721,5 @@ static int aq_fw2x_send_macsec_request(struct aq_hw_s *self,
- 
- 	if (err < 0)
--		return err;
-+		goto exit;
- 
- 	/* Toggle 0x368.CAPS_LO_MACSEC bit */
-@@ -698,5 +735,5 @@ static int aq_fw2x_send_macsec_request(struct aq_hw_s *self,
- 
- 	if (err < 0)
--		return err;
-+		goto exit;
- 
- 	/* Read status of write operation */
-@@ -705,4 +742,7 @@ static int aq_fw2x_send_macsec_request(struct aq_hw_s *self,
- 		RTE_ALIGN(sizeof(*response) / sizeof(u32), sizeof(u32)));
- 
-+exit:
-+	pthread_mutex_unlock(&self->mbox_mutex);
-+
- 	return err;
- }


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

* [dpdk-stable] patch 'net/cxgbe: fix races on flow API operations' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (31 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/atlantic: add FW mailbox guard mutex' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'event/sw: fix xstats reset value' " Kevin Traynor
                   ` (30 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/ed82f120ab3c82028b65b78e51b01cf02e210631

Thanks.

Kevin.

---
From ed82f120ab3c82028b65b78e51b01cf02e210631 Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Fri, 4 Oct 2019 19:54:17 +0530
Subject: [PATCH] net/cxgbe: fix races on flow API operations

[ upstream commit 97e02581a15bade3f3f943cd16a965a577746006 ]

When rules are being inserted from multiple cores, there are several
race conditions during rte_flow operations.

For example, when inserting rules from 2 cores simultaneously, both
the cores try to fetch a free available filter entry and they both
end up fetching the same entry. Both of them start overwriting the
same filter entry before sending to firmware, which results in wrong
rule being inserted to hardware.

Fix the races by adding spinlock to serialize the rte_flow operations.

Fixes: ee61f5113b17 ("net/cxgbe: parse and validate flows")
Fixes: 9eb2c9a48072 ("net/cxgbe: implement flow create operation")
Fixes: da23bc9d33f4 ("net/cxgbe: implement flow destroy operation")
Fixes: 8d3c12e19368 ("net/cxgbe: implement flow query operation")
Fixes: 86910379d335 ("net/cxgbe: implement flow flush operation")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/base/adapter.h |  2 +
 drivers/net/cxgbe/cxgbe_flow.c   | 69 ++++++++++++++++++++++----------
 drivers/net/cxgbe/cxgbe_main.c   |  2 +
 3 files changed, 52 insertions(+), 21 deletions(-)

diff --git a/drivers/net/cxgbe/base/adapter.h b/drivers/net/cxgbe/base/adapter.h
index 063e5bd7c..a232b7cd3 100644
--- a/drivers/net/cxgbe/base/adapter.h
+++ b/drivers/net/cxgbe/base/adapter.h
@@ -323,4 +323,6 @@ struct adapter {
 	rte_spinlock_t win0_lock;
 
+	rte_spinlock_t flow_lock; /* Serialize access for rte_flow ops */
+
 	unsigned int clipt_start; /* CLIP table start */
 	unsigned int clipt_end;   /* CLIP table end */
diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
index f130c7eb4..b6250a2a9 100644
--- a/drivers/net/cxgbe/cxgbe_flow.c
+++ b/drivers/net/cxgbe/cxgbe_flow.c
@@ -851,4 +851,5 @@ cxgbe_flow_create(struct rte_eth_dev *dev,
 		  struct rte_flow_error *e)
 {
+	struct adapter *adap = ethdev2adap(dev);
 	struct rte_flow *flow;
 	int ret;
@@ -871,6 +872,8 @@ cxgbe_flow_create(struct rte_eth_dev *dev,
 	}
 
+	t4_os_lock(&adap->flow_lock);
 	/* go, interact with cxgbe_filter */
 	ret = __cxgbe_flow_create(dev, flow);
+	t4_os_unlock(&adap->flow_lock);
 	if (ret) {
 		rte_flow_error_set(e, ret, RTE_FLOW_ERROR_TYPE_HANDLE,
@@ -937,7 +940,10 @@ cxgbe_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
 		   struct rte_flow_error *e)
 {
+	struct adapter *adap = ethdev2adap(dev);
 	int ret;
 
+	t4_os_lock(&adap->flow_lock);
 	ret = __cxgbe_flow_destroy(dev, flow);
+	t4_os_unlock(&adap->flow_lock);
 	if (ret)
 		return rte_flow_error_set(e, ret, RTE_FLOW_ERROR_TYPE_HANDLE,
@@ -966,4 +972,5 @@ cxgbe_flow_query(struct rte_eth_dev *dev, struct rte_flow *flow,
 		 struct rte_flow_error *e)
 {
+	struct adapter *adap = ethdev2adap(flow->dev);
 	struct ch_filter_specification fs;
 	struct rte_flow_query_count *c;
@@ -995,9 +1002,12 @@ cxgbe_flow_query(struct rte_eth_dev *dev, struct rte_flow *flow,
 
 	c = (struct rte_flow_query_count *)data;
+
+	t4_os_lock(&adap->flow_lock);
 	ret = __cxgbe_flow_query(flow, &c->hits, &c->bytes);
-	if (ret)
-		return rte_flow_error_set(e, -ret, RTE_FLOW_ERROR_TYPE_ACTION,
-					  f, "cxgbe pmd failed to"
-					  " perform query");
+	if (ret) {
+		rte_flow_error_set(e, -ret, RTE_FLOW_ERROR_TYPE_ACTION,
+				   f, "cxgbe pmd failed to perform query");
+		goto out;
+	}
 
 	/* Query was successful */
@@ -1005,5 +1015,7 @@ cxgbe_flow_query(struct rte_eth_dev *dev, struct rte_flow *flow,
 	c->hits_set = 1;
 
-	return 0; /* success / partial_success */
+out:
+	t4_os_unlock(&adap->flow_lock);
+	return ret;
 }
 
@@ -1018,5 +1030,5 @@ cxgbe_flow_validate(struct rte_eth_dev *dev,
 	struct rte_flow *flow;
 	unsigned int fidx;
-	int ret;
+	int ret = 0;
 
 	flow = t4_os_alloc(sizeof(struct rte_flow));
@@ -1042,18 +1054,21 @@ cxgbe_flow_validate(struct rte_eth_dev *dev,
 	}
 
+	t4_os_lock(&adap->flow_lock);
 	if (cxgbe_get_fidx(flow, &fidx)) {
-		t4_os_free(flow);
-		return rte_flow_error_set(e, ENOMEM, RTE_FLOW_ERROR_TYPE_HANDLE,
-					  NULL, "no memory in tcam.");
+		ret = rte_flow_error_set(e, ENOMEM, RTE_FLOW_ERROR_TYPE_HANDLE,
+					 NULL, "no memory in tcam.");
+		goto out;
 	}
 
 	if (cxgbe_verify_fidx(flow, fidx, 0)) {
-		t4_os_free(flow);
-		return rte_flow_error_set(e, EINVAL, RTE_FLOW_ERROR_TYPE_HANDLE,
-					  NULL, "validation failed");
+		ret = rte_flow_error_set(e, EINVAL, RTE_FLOW_ERROR_TYPE_HANDLE,
+					 NULL, "validation failed");
+		goto out;
 	}
 
+out:
+	t4_os_unlock(&adap->flow_lock);
 	t4_os_free(flow);
-	return 0;
+	return ret;
 }
 
@@ -1064,12 +1079,10 @@ cxgbe_flow_validate(struct rte_eth_dev *dev,
  */
 static int
-cxgbe_check_n_destroy(struct filter_entry *f, struct rte_eth_dev *dev,
-		      struct rte_flow_error *e)
+cxgbe_check_n_destroy(struct filter_entry *f, struct rte_eth_dev *dev)
 {
 	if (f && (f->valid || f->pending) &&
 	    f->dev == dev && /* Only if user has asked for this port */
 	     f->private) /* We (rte_flow) created this filter */
-		return cxgbe_flow_destroy(dev, (struct rte_flow *)f->private,
-					  e);
+		return __cxgbe_flow_destroy(dev, (struct rte_flow *)f->private);
 	return 1;
 }
@@ -1081,11 +1094,18 @@ static int cxgbe_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *e)
 	int ret = 0;
 
+	t4_os_lock(&adap->flow_lock);
 	if (adap->tids.ftid_tab) {
 		struct filter_entry *f = &adap->tids.ftid_tab[0];
 
 		for (i = 0; i < adap->tids.nftids; i++, f++) {
-			ret = cxgbe_check_n_destroy(f, dev, e);
-			if (ret < 0)
+			ret = cxgbe_check_n_destroy(f, dev);
+			if (ret < 0) {
+				rte_flow_error_set(e, ret,
+						   RTE_FLOW_ERROR_TYPE_HANDLE,
+						   f->private,
+						   "error destroying TCAM "
+						   "filter.");
 				goto out;
+			}
 		}
 	}
@@ -1097,11 +1117,18 @@ static int cxgbe_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *e)
 			f = (struct filter_entry *)adap->tids.tid_tab[i];
 
-			ret = cxgbe_check_n_destroy(f, dev, e);
-			if (ret < 0)
+			ret = cxgbe_check_n_destroy(f, dev);
+			if (ret < 0) {
+				rte_flow_error_set(e, ret,
+						   RTE_FLOW_ERROR_TYPE_HANDLE,
+						   f->private,
+						   "error destroying HASH "
+						   "filter.");
 				goto out;
+			}
 		}
 	}
 
 out:
+	t4_os_unlock(&adap->flow_lock);
 	return ret >= 0 ? 0 : ret;
 }
diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c
index 2cc4b6d91..76997e71f 100644
--- a/drivers/net/cxgbe/cxgbe_main.c
+++ b/drivers/net/cxgbe/cxgbe_main.c
@@ -1890,4 +1890,6 @@ allocate_mac:
 	}
 
+	t4_os_lock_init(&adapter->flow_lock);
+
 	adapter->mpstcam = t4_init_mpstcam(adapter);
 	if (!adapter->mpstcam)
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:53.798696617 +0000
+++ 0034-net-cxgbe-fix-races-on-flow-API-operations.patch	2019-12-03 17:29:51.760749745 +0000
@@ -1 +1 @@
-From 97e02581a15bade3f3f943cd16a965a577746006 Mon Sep 17 00:00:00 2001
+From ed82f120ab3c82028b65b78e51b01cf02e210631 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 97e02581a15bade3f3f943cd16a965a577746006 ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
- drivers/net/cxgbe/cxgbe_flow.c   | 68 ++++++++++++++++++++++----------
+ drivers/net/cxgbe/cxgbe_flow.c   | 69 ++++++++++++++++++++++----------
@@ -29 +30 @@
- 3 files changed, 51 insertions(+), 21 deletions(-)
+ 3 files changed, 52 insertions(+), 21 deletions(-)
@@ -32 +33 @@
-index 6758364c7..db654ad9c 100644
+index 063e5bd7c..a232b7cd3 100644
@@ -35 +36 @@
-@@ -329,4 +329,6 @@ struct adapter {
+@@ -323,4 +323,6 @@ struct adapter {
@@ -43 +44 @@
-index 9ee8353ae..9070f4960 100644
+index f130c7eb4..b6250a2a9 100644
@@ -46 +47 @@
-@@ -1015,4 +1015,5 @@ cxgbe_flow_create(struct rte_eth_dev *dev,
+@@ -851,4 +851,5 @@ cxgbe_flow_create(struct rte_eth_dev *dev,
@@ -52 +53 @@
-@@ -1035,6 +1036,8 @@ cxgbe_flow_create(struct rte_eth_dev *dev,
+@@ -871,6 +872,8 @@ cxgbe_flow_create(struct rte_eth_dev *dev,
@@ -61 +62 @@
-@@ -1101,7 +1104,10 @@ cxgbe_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
+@@ -937,7 +940,10 @@ cxgbe_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
@@ -72 +73,7 @@
-@@ -1160,9 +1166,12 @@ cxgbe_flow_query(struct rte_eth_dev *dev, struct rte_flow *flow,
+@@ -966,4 +972,5 @@ cxgbe_flow_query(struct rte_eth_dev *dev, struct rte_flow *flow,
+ 		 struct rte_flow_error *e)
+ {
++	struct adapter *adap = ethdev2adap(flow->dev);
+ 	struct ch_filter_specification fs;
+ 	struct rte_flow_query_count *c;
+@@ -995,9 +1002,12 @@ cxgbe_flow_query(struct rte_eth_dev *dev, struct rte_flow *flow,
@@ -89,2 +96,2 @@
-@@ -1172,5 +1181,7 @@ cxgbe_flow_query(struct rte_eth_dev *dev, struct rte_flow *flow,
- 		cxgbe_clear_filter_count(adap, flow->fidx, f->fs.cap, true);
+@@ -1005,5 +1015,7 @@ cxgbe_flow_query(struct rte_eth_dev *dev, struct rte_flow *flow,
+ 	c->hits_set = 1;
@@ -98 +105 @@
-@@ -1185,5 +1196,5 @@ cxgbe_flow_validate(struct rte_eth_dev *dev,
+@@ -1018,5 +1030,5 @@ cxgbe_flow_validate(struct rte_eth_dev *dev,
@@ -105 +112 @@
-@@ -1209,18 +1220,21 @@ cxgbe_flow_validate(struct rte_eth_dev *dev,
+@@ -1042,18 +1054,21 @@ cxgbe_flow_validate(struct rte_eth_dev *dev,
@@ -134 +141 @@
-@@ -1231,12 +1245,10 @@ cxgbe_flow_validate(struct rte_eth_dev *dev,
+@@ -1064,12 +1079,10 @@ cxgbe_flow_validate(struct rte_eth_dev *dev,
@@ -149 +156 @@
-@@ -1248,11 +1260,18 @@ static int cxgbe_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *e)
+@@ -1081,11 +1094,18 @@ static int cxgbe_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *e)
@@ -170 +177 @@
-@@ -1264,11 +1283,18 @@ static int cxgbe_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *e)
+@@ -1097,11 +1117,18 @@ static int cxgbe_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *e)
@@ -192 +199 @@
-index f6967a3e4..cc5f4df3a 100644
+index 2cc4b6d91..76997e71f 100644
@@ -195 +202 @@
-@@ -1907,4 +1907,6 @@ allocate_mac:
+@@ -1890,4 +1890,6 @@ allocate_mac:


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

* [dpdk-stable] patch 'event/sw: fix xstats reset value' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (32 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'net/cxgbe: fix races on flow API operations' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'event/dpaa2: fix default queue configuration' " Kevin Traynor
                   ` (29 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Gage Eads; +Cc: Harry van Haaren, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/8d9963a6ff32f8bca6f87ecb2b82655b96b7c0ce

Thanks.

Kevin.

---
From 8d9963a6ff32f8bca6f87ecb2b82655b96b7c0ce Mon Sep 17 00:00:00 2001
From: Gage Eads <gage.eads@intel.com>
Date: Tue, 27 Aug 2019 16:34:59 -0500
Subject: [PATCH] event/sw: fix xstats reset value

[ upstream commit d02c470c87976def34bae0307736ecb9c8cac9d8 ]

The sw PMD implements xstats reset by having the xstat get operations
return a value to the statistic's value at the last reset. The value at the
last reset is maintained in the per-xstat reset_value field, but the PMD
was setting reset_value = current - reset_value instead of reset_value =
current.

Fixes: c1ad03df7ad5 ("event/sw: support xstats")

Signed-off-by: Gage Eads <gage.eads@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 drivers/event/sw/sw_evdev_xstats.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/event/sw/sw_evdev_xstats.c b/drivers/event/sw/sw_evdev_xstats.c
index 7a6caa64d..90664903b 100644
--- a/drivers/event/sw/sw_evdev_xstats.c
+++ b/drivers/event/sw/sw_evdev_xstats.c
@@ -492,5 +492,5 @@ sw_xstats_update(struct sw_evdev *sw, enum rte_event_dev_xstats_mode mode,
 
 		if (xs->reset_allowed && reset)
-			xs->reset_value = val;
+			xs->reset_value += val;
 
 		xidx++;
@@ -545,6 +545,5 @@ sw_xstats_reset_range(struct sw_evdev *sw, uint32_t start, uint32_t num)
 			continue;
 
-		uint64_t val = xs->fn(sw, xs->obj_idx, xs->stat, xs->extra_arg)
-					- xs->reset_value;
+		uint64_t val = xs->fn(sw, xs->obj_idx, xs->stat, xs->extra_arg);
 		xs->reset_value = val;
 	}
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:53.858161828 +0000
+++ 0035-event-sw-fix-xstats-reset-value.patch	2019-12-03 17:29:51.760749745 +0000
@@ -1 +1 @@
-From d02c470c87976def34bae0307736ecb9c8cac9d8 Mon Sep 17 00:00:00 2001
+From 8d9963a6ff32f8bca6f87ecb2b82655b96b7c0ce Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d02c470c87976def34bae0307736ecb9c8cac9d8 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org


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

* [dpdk-stable] patch 'event/dpaa2: fix default queue configuration' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (33 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'event/sw: fix xstats reset value' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'build: avoid overlinking' " Kevin Traynor
                   ` (28 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/635a8d0137c6f22b3cb98a862bb2cb8e2916db9a

Thanks.

Kevin.

---
From 635a8d0137c6f22b3cb98a862bb2cb8e2916db9a Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Mon, 30 Sep 2019 14:02:10 +0530
Subject: [PATCH] event/dpaa2: fix default queue configuration

[ upstream commit 6f213fe94002cd446e919ecc79715656a2657a50 ]

Test vector expect only one type of scheduling as default.
The old code is provide support scheduling types instead of default.

Fixes: 13370a3877a5 ("eventdev: fix inconsistency in queue config")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/event/dpaa2/dpaa2_eventdev.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index 926b7edd8..b8cb437a0 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -1,6 +1,4 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- *
- *   Copyright 2017 NXP
- *
+ * Copyright 2017,2019 NXP
  */
 
@@ -471,6 +469,5 @@ dpaa2_eventdev_queue_def_conf(struct rte_eventdev *dev, uint8_t queue_id,
 
 	queue_conf->nb_atomic_flows = DPAA2_EVENT_QUEUE_ATOMIC_FLOWS;
-	queue_conf->schedule_type = RTE_SCHED_TYPE_ATOMIC |
-				      RTE_SCHED_TYPE_PARALLEL;
+	queue_conf->schedule_type = RTE_SCHED_TYPE_PARALLEL;
 	queue_conf->priority = RTE_EVENT_DEV_PRIORITY_NORMAL;
 }
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:53.909196261 +0000
+++ 0036-event-dpaa2-fix-default-queue-configuration.patch	2019-12-03 17:29:51.761749724 +0000
@@ -1 +1 @@
-From 6f213fe94002cd446e919ecc79715656a2657a50 Mon Sep 17 00:00:00 2001
+From 635a8d0137c6f22b3cb98a862bb2cb8e2916db9a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6f213fe94002cd446e919ecc79715656a2657a50 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org


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

* [dpdk-stable] patch 'build: avoid overlinking' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (34 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'event/dpaa2: fix default queue configuration' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'vfio: fix leak with multiprocess' " Kevin Traynor
                   ` (27 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Christian Ehrhardt; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/a6a3a60b99f665ca2d0cdac911c98d7f0a9e2a5d

Thanks.

Kevin.

---
From a6a3a60b99f665ca2d0cdac911c98d7f0a9e2a5d Mon Sep 17 00:00:00 2001
From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Date: Thu, 29 Aug 2019 17:30:03 +0200
Subject: [PATCH] build: avoid overlinking

[ upstream commit 31b798a6f08e9b333b94b8bb26910209aa810b73 ]

A while ago telemetry was added in 57ae0ec6 and it also added as-needed
to config/meson.build. This seems no more needed these days as due to other
build changes the ordering in buildlogs is:
  [...] -lrte_telemetry [...] -Wl,--no-as-needed [...]
Which means telemetry no more benefits from --no-as-needed anyway.

Overlinking problems get triggered by the meson generated pkgconfig which
will have:
   [...] -Wl,--no-as-needed <somelibsusedbydpdk>
This will overlink <somelibs> and in addition anything that follows
as it also doesn't wrap back to --as-needed. So if a projects includes
dpdk libs + <other> it will also consider <other> with --no-as-needed.

Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1841759
Fixes: 57ae0ec62620 ("build: add dependency on telemetry to apps with meson")

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 config/meson.build | 1 -
 1 file changed, 1 deletion(-)

diff --git a/config/meson.build b/config/meson.build
index d4d450829..e92be6c47 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -54,5 +54,4 @@ dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8)
 
 add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
-dpdk_extra_ldflags += '-Wl,--no-as-needed'
 
 # use pthreads
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:53.969262045 +0000
+++ 0037-build-avoid-overlinking.patch	2019-12-03 17:29:51.762749703 +0000
@@ -1 +1 @@
-From 31b798a6f08e9b333b94b8bb26910209aa810b73 Mon Sep 17 00:00:00 2001
+From a6a3a60b99f665ca2d0cdac911c98d7f0a9e2a5d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 31b798a6f08e9b333b94b8bb26910209aa810b73 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 2bafea530..a27f731f8 100644
+index d4d450829..e92be6c47 100644
@@ -33 +34 @@
-@@ -95,5 +95,4 @@ dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8)
+@@ -54,5 +54,4 @@ dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8)


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

* [dpdk-stable] patch 'vfio: fix leak with multiprocess' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (35 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'build: avoid overlinking' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'service: use log for error messages' " Kevin Traynor
                   ` (26 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Jim Harris; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/f41e4005bc87dd55595a457e6ccd4667ea31caed

Thanks.

Kevin.

---
From f41e4005bc87dd55595a457e6ccd4667ea31caed Mon Sep 17 00:00:00 2001
From: Jim Harris <james.r.harris@intel.com>
Date: Fri, 16 Aug 2019 05:13:42 -0700
Subject: [PATCH] vfio: fix leak with multiprocess

[ upstream commit 773a860aef951727ea0c5af0f83e15fb0e24e03d ]

The code checks both rte_mp_request_sync() return code and that the number
of messages in the reply equals 1.  If rte_mp_request_sync() succeeds but
there was more than one message, those messages would get leaked.

Found via code review by Anatoly Burakov of patches that used the vhost
code as a template for using rte_mp_request_sync().

Fixes: 83a73c5fef66 ("vfio: use generic multi-process channel")

Reported-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/linuxapp/eal/eal_vfio.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c
index 830b320d7..48d2abafa 100644
--- a/lib/librte_eal/linuxapp/eal/eal_vfio.c
+++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c
@@ -264,5 +264,5 @@ vfio_open_group_fd(int iommu_group_num)
 	char filename[PATH_MAX];
 	struct rte_mp_msg mp_req, *mp_rep;
-	struct rte_mp_reply mp_reply;
+	struct rte_mp_reply mp_reply = {0};
 	struct timespec ts = {.tv_sec = 5, .tv_nsec = 0};
 	struct vfio_mp_param *p = (struct vfio_mp_param *)mp_req.param;
@@ -320,7 +320,7 @@ vfio_open_group_fd(int iommu_group_num)
 			vfio_group_fd = 0;
 		}
-		free(mp_reply.msgs);
 	}
 
+	free(mp_reply.msgs);
 	if (vfio_group_fd < 0)
 		RTE_LOG(ERR, EAL, "  cannot request group fd\n");
@@ -554,5 +554,5 @@ vfio_sync_default_container(void)
 {
 	struct rte_mp_msg mp_req, *mp_rep;
-	struct rte_mp_reply mp_reply;
+	struct rte_mp_reply mp_reply = {0};
 	struct timespec ts = {.tv_sec = 5, .tv_nsec = 0};
 	struct vfio_mp_param *p = (struct vfio_mp_param *)mp_req.param;
@@ -584,6 +584,6 @@ vfio_sync_default_container(void)
 		if (p->result == SOCKET_OK)
 			iommu_type_id = p->iommu_type_id;
-		free(mp_reply.msgs);
 	}
+	free(mp_reply.msgs);
 	if (iommu_type_id < 0) {
 		RTE_LOG(ERR, EAL, "Could not get IOMMU type for default container\n");
@@ -1023,5 +1023,5 @@ vfio_get_default_container_fd(void)
 {
 	struct rte_mp_msg mp_req, *mp_rep;
-	struct rte_mp_reply mp_reply;
+	struct rte_mp_reply mp_reply = {0};
 	struct timespec ts = {.tv_sec = 5, .tv_nsec = 0};
 	struct vfio_mp_param *p = (struct vfio_mp_param *)mp_req.param;
@@ -1051,7 +1051,7 @@ vfio_get_default_container_fd(void)
 			return mp_rep->fds[0];
 		}
-		free(mp_reply.msgs);
 	}
 
+	free(mp_reply.msgs);
 	RTE_LOG(ERR, EAL, "  cannot request default container fd\n");
 	return -1;
@@ -1129,5 +1129,5 @@ rte_vfio_get_container_fd(void)
 	int ret, vfio_container_fd;
 	struct rte_mp_msg mp_req, *mp_rep;
-	struct rte_mp_reply mp_reply;
+	struct rte_mp_reply mp_reply = {0};
 	struct timespec ts = {.tv_sec = 5, .tv_nsec = 0};
 	struct vfio_mp_param *p = (struct vfio_mp_param *)mp_req.param;
@@ -1183,7 +1183,7 @@ rte_vfio_get_container_fd(void)
 			return vfio_container_fd;
 		}
-		free(mp_reply.msgs);
 	}
 
+	free(mp_reply.msgs);
 	RTE_LOG(ERR, EAL, "  cannot request container fd\n");
 	return -1;
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:54.023200810 +0000
+++ 0038-vfio-fix-leak-with-multiprocess.patch	2019-12-03 17:29:51.763749682 +0000
@@ -1 +1 @@
-From 773a860aef951727ea0c5af0f83e15fb0e24e03d Mon Sep 17 00:00:00 2001
+From f41e4005bc87dd55595a457e6ccd4667ea31caed Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 773a860aef951727ea0c5af0f83e15fb0e24e03d ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
- lib/librte_eal/linux/eal/eal_vfio.c | 16 ++++++++--------
+ lib/librte_eal/linuxapp/eal/eal_vfio.c | 16 ++++++++--------
@@ -23,5 +24,5 @@
-diff --git a/lib/librte_eal/linux/eal/eal_vfio.c b/lib/librte_eal/linux/eal/eal_vfio.c
-index 501c74f23..d9541b122 100644
---- a/lib/librte_eal/linux/eal/eal_vfio.c
-+++ b/lib/librte_eal/linux/eal/eal_vfio.c
-@@ -265,5 +265,5 @@ vfio_open_group_fd(int iommu_group_num)
+diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c
+index 830b320d7..48d2abafa 100644
+--- a/lib/librte_eal/linuxapp/eal/eal_vfio.c
++++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c
+@@ -264,5 +264,5 @@ vfio_open_group_fd(int iommu_group_num)
@@ -34 +35 @@
-@@ -321,7 +321,7 @@ vfio_open_group_fd(int iommu_group_num)
+@@ -320,7 +320,7 @@ vfio_open_group_fd(int iommu_group_num)
@@ -43 +44 @@
-@@ -555,5 +555,5 @@ vfio_sync_default_container(void)
+@@ -554,5 +554,5 @@ vfio_sync_default_container(void)
@@ -50 +51 @@
-@@ -585,6 +585,6 @@ vfio_sync_default_container(void)
+@@ -584,6 +584,6 @@ vfio_sync_default_container(void)
@@ -58 +59 @@
-@@ -1022,5 +1022,5 @@ vfio_get_default_container_fd(void)
+@@ -1023,5 +1023,5 @@ vfio_get_default_container_fd(void)
@@ -65 +66 @@
-@@ -1050,7 +1050,7 @@ vfio_get_default_container_fd(void)
+@@ -1051,7 +1051,7 @@ vfio_get_default_container_fd(void)
@@ -74 +75 @@
-@@ -1128,5 +1128,5 @@ rte_vfio_get_container_fd(void)
+@@ -1129,5 +1129,5 @@ rte_vfio_get_container_fd(void)
@@ -81 +82 @@
-@@ -1182,7 +1182,7 @@ rte_vfio_get_container_fd(void)
+@@ -1183,7 +1183,7 @@ rte_vfio_get_container_fd(void)


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

* [dpdk-stable] patch 'service: use log for error messages' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (36 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'vfio: fix leak with multiprocess' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'test/mbuf: fix forged mbuf in clone test' " Kevin Traynor
                   ` (25 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Harry van Haaren, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/e2c0ff84083d12c4bbd60ea4c27535e20d9a0bfd

Thanks.

Kevin.

---
From e2c0ff84083d12c4bbd60ea4c27535e20d9a0bfd Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 21 Aug 2019 10:12:52 +0100
Subject: [PATCH] service: use log for error messages

[ upstream commit a8f8ae1cf9b68f6398b49019ca07a215a57bba41 ]

EAL should always use rte_log instead of putting errors to
stderr (which maybe redirected to /dev/null in a daemon).

Also checks for null before rte_free are unnecessary.
Minor code consistency improvements.

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

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 lib/librte_eal/common/rte_service.c | 27 ++++++++++++---------------
 1 file changed, 12 insertions(+), 15 deletions(-)

diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
index 0f3695c4b..e7d3e5144 100644
--- a/lib/librte_eal/common/rte_service.c
+++ b/lib/librte_eal/common/rte_service.c
@@ -72,8 +72,10 @@ static struct core_state *lcore_states;
 static uint32_t rte_service_library_initialized;
 
-int32_t rte_service_init(void)
+int32_t
+rte_service_init(void)
 {
 	if (rte_service_library_initialized) {
-		printf("service library init() called, init flag %d\n",
+		RTE_LOG(NOTICE, EAL,
+			"service library init() called, init flag %d\n",
 			rte_service_library_initialized);
 		return -EALREADY;
@@ -84,5 +86,5 @@ int32_t rte_service_init(void)
 			RTE_CACHE_LINE_SIZE);
 	if (!rte_services) {
-		printf("error allocating rte services array\n");
+		RTE_LOG(ERR, EAL, "error allocating rte services array\n");
 		goto fail_mem;
 	}
@@ -91,5 +93,5 @@ int32_t rte_service_init(void)
 			sizeof(struct core_state), RTE_CACHE_LINE_SIZE);
 	if (!lcore_states) {
-		printf("error allocating core states array\n");
+		RTE_LOG(ERR, EAL, "error allocating core states array\n");
 		goto fail_mem;
 	}
@@ -110,8 +112,6 @@ int32_t rte_service_init(void)
 	return 0;
 fail_mem:
-	if (rte_services)
-		rte_free(rte_services);
-	if (lcore_states)
-		rte_free(lcore_states);
+	rte_free(rte_services);
+	rte_free(lcore_states);
 	return -ENOMEM;
 }
@@ -123,9 +123,6 @@ rte_service_finalize(void)
 		return;
 
-	if (rte_services)
-		rte_free(rte_services);
-
-	if (lcore_states)
-		rte_free(lcore_states);
+	rte_free(rte_services);
+	rte_free(lcore_states);
 
 	rte_service_library_initialized = 0;
@@ -399,6 +396,6 @@ rte_service_may_be_active(uint32_t id)
 }
 
-int32_t rte_service_run_iter_on_app_lcore(uint32_t id,
-		uint32_t serialize_mt_unsafe)
+int32_t
+rte_service_run_iter_on_app_lcore(uint32_t id, uint32_t serialize_mt_unsafe)
 {
 	/* run service on calling core, using all-ones as the service mask */
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:54.075964287 +0000
+++ 0039-service-use-log-for-error-messages.patch	2019-12-03 17:29:51.764749662 +0000
@@ -1 +1 @@
-From a8f8ae1cf9b68f6398b49019ca07a215a57bba41 Mon Sep 17 00:00:00 2001
+From e2c0ff84083d12c4bbd60ea4c27535e20d9a0bfd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a8f8ae1cf9b68f6398b49019ca07a215a57bba41 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index c3653ebae..fe0907720 100644
+index 0f3695c4b..e7d3e5144 100644
@@ -26 +27 @@
-@@ -71,8 +71,10 @@ static struct core_state *lcore_states;
+@@ -72,8 +72,10 @@ static struct core_state *lcore_states;
@@ -39 +40 @@
-@@ -83,5 +85,5 @@ int32_t rte_service_init(void)
+@@ -84,5 +86,5 @@ int32_t rte_service_init(void)
@@ -46 +47 @@
-@@ -90,5 +92,5 @@ int32_t rte_service_init(void)
+@@ -91,5 +93,5 @@ int32_t rte_service_init(void)
@@ -53 +54 @@
-@@ -109,8 +111,6 @@ int32_t rte_service_init(void)
+@@ -110,8 +112,6 @@ int32_t rte_service_init(void)
@@ -64 +65 @@
-@@ -122,9 +122,6 @@ rte_service_finalize(void)
+@@ -123,9 +123,6 @@ rte_service_finalize(void)
@@ -76 +77 @@
-@@ -398,6 +395,6 @@ rte_service_may_be_active(uint32_t id)
+@@ -399,6 +396,6 @@ rte_service_may_be_active(uint32_t id)


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

* [dpdk-stable] patch 'test/mbuf: fix forged mbuf in clone test' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (37 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'service: use log for error messages' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'eal/ppc: fix 64-bit atomic exchange operation' " Kevin Traynor
                   ` (24 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/b8308a0ca12c8c921d4685eadae32bbbd5daf935

Thanks.

Kevin.

---
From b8308a0ca12c8c921d4685eadae32bbbd5daf935 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 8 Oct 2019 09:33:46 -0700
Subject: [PATCH] test/mbuf: fix forged mbuf in clone test

[ upstream commit 1636775425456d021b4ab0dd0b312edc8fbd78b8 ]

The test for cloning changed mbuf would generate an mbuf whose length
and segments count were invalid.
This would cause a crash if test was run with mbuf debugging enabled.

Fixes: 4ccd2bb3a9e2 ("app/test: enhance mbuf refcnt check")
Fixes: af75078fece3 ("first public release")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 test/test/test_mbuf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/test/test/test_mbuf.c b/test/test/test_mbuf.c
index 9e82a20be..49e7f9082 100644
--- a/test/test/test_mbuf.c
+++ b/test/test/test_mbuf.c
@@ -332,6 +332,9 @@ testclone_testupdate_testdetach(struct rte_mempool *pktmbuf_pool)
 	if (m->next == NULL)
 		GOTO_FAIL("Next Pkt Null\n");
+	m->nb_segs = 2;
 
 	rte_pktmbuf_append(m->next, sizeof(uint32_t));
+	m->pkt_len = 2 * sizeof(uint32_t);
+
 	data = rte_pktmbuf_mtod(m->next, unaligned_uint32_t *);
 	*data = MAGIC_DATA;
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:54.125432419 +0000
+++ 0040-test-mbuf-fix-forged-mbuf-in-clone-test.patch	2019-12-03 17:29:51.765749641 +0000
@@ -1 +1 @@
-From 1636775425456d021b4ab0dd0b312edc8fbd78b8 Mon Sep 17 00:00:00 2001
+From b8308a0ca12c8c921d4685eadae32bbbd5daf935 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1636775425456d021b4ab0dd0b312edc8fbd78b8 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
- app/test/test_mbuf.c | 3 +++
+ test/test/test_mbuf.c | 3 +++
@@ -20,5 +21,5 @@
-diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
-index 2a97afe20..aafad0cf6 100644
---- a/app/test/test_mbuf.c
-+++ b/app/test/test_mbuf.c
-@@ -333,6 +333,9 @@ testclone_testupdate_testdetach(struct rte_mempool *pktmbuf_pool)
+diff --git a/test/test/test_mbuf.c b/test/test/test_mbuf.c
+index 9e82a20be..49e7f9082 100644
+--- a/test/test/test_mbuf.c
++++ b/test/test/test_mbuf.c
+@@ -332,6 +332,9 @@ testclone_testupdate_testdetach(struct rte_mempool *pktmbuf_pool)


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

* [dpdk-stable] patch 'eal/ppc: fix 64-bit atomic exchange operation' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (38 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'test/mbuf: fix forged mbuf in clone test' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'devtools: fix cleanup of checkpatch temporary file' " Kevin Traynor
                   ` (23 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: David Christensen; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/0d9b7efa224a3d5d8d4338ee8cb479f2225091e1

Thanks.

Kevin.

---
From 0d9b7efa224a3d5d8d4338ee8cb479f2225091e1 Mon Sep 17 00:00:00 2001
From: David Christensen <drc@linux.vnet.ibm.com>
Date: Tue, 15 Oct 2019 14:16:14 -0700
Subject: [PATCH] eal/ppc: fix 64-bit atomic exchange operation

[ upstream commit 72e69d801b235f40b6c71a7d4f6087e2fa5b02dc ]

The rte_atomic64_exchange operation for ppc_64 incorrectly linked
back to a 32 bit generic operation (__atomic_exchange_4) rather than
the 64 bit generic operation (__atomic_exchange_8).  As a result,
applications that used rte_eth_link_get_nowait() would only receive
the link speed, they would not receive the link state, link duplex,
or link autoneg properties.

Fixes: ff2863570fcc ("eal: introduce atomic exchange operation")

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h b/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h
index 797381c0f..afcb8ee3a 100644
--- a/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h
+++ b/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h
@@ -451,5 +451,5 @@ static inline uint64_t
 rte_atomic64_exchange(volatile uint64_t *dst, uint64_t val)
 {
-	return __atomic_exchange_4(dst, val, __ATOMIC_SEQ_CST);
+	return __atomic_exchange_8(dst, val, __ATOMIC_SEQ_CST);
 }
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:54.181276072 +0000
+++ 0041-eal-ppc-fix-64-bit-atomic-exchange-operation.patch	2019-12-03 17:29:51.765749641 +0000
@@ -1 +1 @@
-From 72e69d801b235f40b6c71a7d4f6087e2fa5b02dc Mon Sep 17 00:00:00 2001
+From 0d9b7efa224a3d5d8d4338ee8cb479f2225091e1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 72e69d801b235f40b6c71a7d4f6087e2fa5b02dc ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index b13a80de4..7e3e13118 100644
+index 797381c0f..afcb8ee3a 100644
@@ -26 +27 @@
-@@ -402,5 +402,5 @@ static inline uint64_t
+@@ -451,5 +451,5 @@ static inline uint64_t


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

* [dpdk-stable] patch 'devtools: fix cleanup of checkpatch temporary file' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (39 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'eal/ppc: fix 64-bit atomic exchange operation' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'event/dpaa: fix number of supported atomic flows' " Kevin Traynor
                   ` (22 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/4b01f16ae0c477d647edb180b3aadc79a08a6a57

Thanks.

Kevin.

---
From 4b01f16ae0c477d647edb180b3aadc79a08a6a57 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 13 Aug 2019 08:38:22 +0200
Subject: [PATCH] devtools: fix cleanup of checkpatch temporary file

[ upstream commit 2c7845a70e708039c3f129de86ffcf1fccfa76d9 ]

The regexp part of the cleanup routine was not updated accordingly when
a common prefix for temp files was introduced.
Set the trap handler only when required.

Fixes: ff37ca5d3773 ("devtools: use a common prefix for temporary files")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 devtools/checkpatches.sh | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 02d1c303e..c471731d4 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -24,12 +24,4 @@ LINE_SPACING,PARENTHESIS_ALIGNMENT,NETWORKING_BLOCK_COMMENT_STYLE,\
 NEW_TYPEDEFS,COMPARISON_TO_NULL"
 
-clean_tmp_files() {
-	if echo $tmpinput | grep -q '^checkpatches\.' ; then
-		rm -f "$tmpinput"
-	fi
-}
-
-trap "clean_tmp_files" INT
-
 print_usage () {
 	cat <<- END_OF_HELP
@@ -105,11 +97,14 @@ check () { # <patch> <commit> <title>
 	if [ -n "$1" ] ; then
 		tmpinput=$1
-	elif [ -n "$2" ] ; then
-		tmpinput=$(mktemp -t dpdk.checkpatches.XXXXXX)
-		git format-patch --find-renames \
-		--no-stat --stdout -1 $commit > "$tmpinput"
 	else
 		tmpinput=$(mktemp -t dpdk.checkpatches.XXXXXX)
-		cat > "$tmpinput"
+		trap "rm -f '$tmpinput'" INT
+
+		if [ -n "$2" ] ; then
+			git format-patch --find-renames \
+			--no-stat --stdout -1 $commit > "$tmpinput"
+		else
+			cat > "$tmpinput"
+		fi
 	fi
 
@@ -138,5 +133,8 @@ check () { # <patch> <commit> <title>
 	fi
 
-	clean_tmp_files
+	if [ "$tmpinput" != "$1" ]; then
+		rm -f "$tmpinput"
+		trap - INT
+	fi
 	[ $ret -eq 0 ] && return 0
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:54.230534165 +0000
+++ 0042-devtools-fix-cleanup-of-checkpatch-temporary-file.patch	2019-12-03 17:29:51.766749620 +0000
@@ -1 +1 @@
-From 2c7845a70e708039c3f129de86ffcf1fccfa76d9 Mon Sep 17 00:00:00 2001
+From 4b01f16ae0c477d647edb180b3aadc79a08a6a57 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2c7845a70e708039c3f129de86ffcf1fccfa76d9 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 8e2beee16..b16bace92 100755
+index 02d1c303e..c471731d4 100755
@@ -22,2 +23,2 @@
-@@ -37,12 +37,4 @@ NEW_TYPEDEFS,COMPARISON_TO_NULL"
- options="$options $DPDK_CHECKPATCH_OPTIONS"
+@@ -24,12 +24,4 @@ LINE_SPACING,PARENTHESIS_ALIGNMENT,NETWORKING_BLOCK_COMMENT_STYLE,\
+ NEW_TYPEDEFS,COMPARISON_TO_NULL"
@@ -35 +36 @@
-@@ -151,11 +143,14 @@ check () { # <patch> <commit> <title>
+@@ -105,11 +97,14 @@ check () { # <patch> <commit> <title>
@@ -55 +56 @@
-@@ -192,5 +187,8 @@ check () { # <patch> <commit> <title>
+@@ -138,5 +133,8 @@ check () { # <patch> <commit> <title>


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

* [dpdk-stable] patch 'event/dpaa: fix number of supported atomic flows' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (40 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'devtools: fix cleanup of checkpatch temporary file' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'test/lpm: fix measured cycles for delete' " Kevin Traynor
                   ` (21 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Nipun Gupta; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/6a6190580029023b94ebc9838e408b3bf4f24103

Thanks.

Kevin.

---
From 6a6190580029023b94ebc9838e408b3bf4f24103 Mon Sep 17 00:00:00 2001
From: Nipun Gupta <nipun.gupta@nxp.com>
Date: Fri, 11 Oct 2019 19:17:56 +0530
Subject: [PATCH] event/dpaa: fix number of supported atomic flows

[ upstream commit c37421a2d6b5e8e6b5253e82b8e0c57c0e2879c2 ]

The number of atomic flows supported was not returned correctly for
DPAA driver. This patch fixes the same.

Fixes: b08dc6430abd ("event/dpaa: add queue config get/set")

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/event/dpaa/dpaa_eventdev.c | 1 +
 drivers/event/dpaa/dpaa_eventdev.h | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c
index 1e247e4f4..15707e22e 100644
--- a/drivers/event/dpaa/dpaa_eventdev.c
+++ b/drivers/event/dpaa/dpaa_eventdev.c
@@ -470,4 +470,5 @@ dpaa_event_queue_def_conf(struct rte_eventdev *dev, uint8_t queue_id,
 
 	memset(queue_conf, 0, sizeof(struct rte_event_queue_conf));
+	queue_conf->nb_atomic_flows = DPAA_EVENT_QUEUE_ATOMIC_FLOWS;
 	queue_conf->schedule_type = RTE_SCHED_TYPE_PARALLEL;
 	queue_conf->priority = RTE_EVENT_DEV_PRIORITY_HIGHEST;
diff --git a/drivers/event/dpaa/dpaa_eventdev.h b/drivers/event/dpaa/dpaa_eventdev.h
index 8134e6ba9..c9ab56b33 100644
--- a/drivers/event/dpaa/dpaa_eventdev.h
+++ b/drivers/event/dpaa/dpaa_eventdev.h
@@ -33,5 +33,5 @@ do {						\
 } while (0)
 
-#define DPAA_EVENT_QUEUE_ATOMIC_FLOWS	0
+#define DPAA_EVENT_QUEUE_ATOMIC_FLOWS		2048
 #define DPAA_EVENT_QUEUE_ORDER_SEQUENCES	2048
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:54.283071663 +0000
+++ 0043-event-dpaa-fix-number-of-supported-atomic-flows.patch	2019-12-03 17:29:51.767749599 +0000
@@ -1 +1 @@
-From c37421a2d6b5e8e6b5253e82b8e0c57c0e2879c2 Mon Sep 17 00:00:00 2001
+From 6a6190580029023b94ebc9838e408b3bf4f24103 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c37421a2d6b5e8e6b5253e82b8e0c57c0e2879c2 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index d02b8694e..570983251 100644
+index 1e247e4f4..15707e22e 100644
@@ -23 +24 @@
-@@ -472,4 +472,5 @@ dpaa_event_queue_def_conf(struct rte_eventdev *dev, uint8_t queue_id,
+@@ -470,4 +470,5 @@ dpaa_event_queue_def_conf(struct rte_eventdev *dev, uint8_t queue_id,
@@ -30 +31 @@
-index b8f247c61..5ce15a3db 100644
+index 8134e6ba9..c9ab56b33 100644


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

* [dpdk-stable] patch 'test/lpm: fix measured cycles for delete' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (41 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'event/dpaa: fix number of supported atomic flows' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'eal/linux: restore specific hugepage ordering for ppc' " Kevin Traynor
                   ` (20 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Honnappa Nagarahalli; +Cc: Ruifeng Wang, Vladimir Medvedkin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/6664c40c4db87875b7d903b313998ca7defde69b

Thanks.

Kevin.

---
From 6664c40c4db87875b7d903b313998ca7defde69b Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Tue, 1 Oct 2019 00:32:53 -0500
Subject: [PATCH] test/lpm: fix measured cycles for delete

[ upstream commit c425fb6b9b3264dfe5d212fe80151cfd800b907c ]

total_time needs to be reset to measure the cycles for delete API.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Tested-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 test/test/test_lpm_perf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/test/test_lpm_perf.c b/test/test/test_lpm_perf.c
index 3b98ce0c8..e4d29a725 100644
--- a/test/test/test_lpm_perf.c
+++ b/test/test/test_lpm_perf.c
@@ -461,5 +461,5 @@ test_lpm_perf(void)
 			(count * 100.0) / (double)(ITERATIONS * BATCH_SIZE));
 
-	/* Delete */
+	/* Measure Delete */
 	status = 0;
 	begin = rte_rdtsc();
@@ -471,5 +471,5 @@ test_lpm_perf(void)
 	}
 
-	total_time += rte_rdtsc() - begin;
+	total_time = rte_rdtsc() - begin;
 
 	printf("Average LPM Delete: %g cycles\n",
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:54.336331971 +0000
+++ 0044-test-lpm-fix-measured-cycles-for-delete.patch	2019-12-03 17:29:51.767749599 +0000
@@ -1 +1 @@
-From c425fb6b9b3264dfe5d212fe80151cfd800b907c Mon Sep 17 00:00:00 2001
+From 6664c40c4db87875b7d903b313998ca7defde69b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c425fb6b9b3264dfe5d212fe80151cfd800b907c ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
- app/test/test_lpm_perf.c | 4 ++--
+ test/test/test_lpm_perf.c | 4 ++--
@@ -19,4 +20,4 @@
-diff --git a/app/test/test_lpm_perf.c b/app/test/test_lpm_perf.c
-index 77eea66ad..a2578fe90 100644
---- a/app/test/test_lpm_perf.c
-+++ b/app/test/test_lpm_perf.c
+diff --git a/test/test/test_lpm_perf.c b/test/test/test_lpm_perf.c
+index 3b98ce0c8..e4d29a725 100644
+--- a/test/test/test_lpm_perf.c
++++ b/test/test/test_lpm_perf.c


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

* [dpdk-stable] patch 'eal/linux: restore specific hugepage ordering for ppc' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (42 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'test/lpm: fix measured cycles for delete' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'eal: remove dead code on NUMA node detection' " Kevin Traynor
                   ` (19 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: David Christensen; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/c75284148867891fd2356376ab159afbaef3227b

Thanks.

Kevin.

---
From c75284148867891fd2356376ab159afbaef3227b Mon Sep 17 00:00:00 2001
From: David Christensen <drc@linux.vnet.ibm.com>
Date: Wed, 25 Sep 2019 14:42:23 -0700
Subject: [PATCH] eal/linux: restore specific hugepage ordering for ppc

[ upstream commit ed5d3d5cdb4d19262e9c5face0a11129f090a485 ]

An ifdef present in eal_memory.c references "RTE_ARCH_PPC64" when
it should actually use "RTE_ARCH_PPC_64".  Simple testing revealed
that both the PPC_64 and non-PPC_64 versions of the code involved
work, but the PPC_64 version of the code is retained to be
consistent with other instances in the same file where mmapped
memory is accessed in reverse order on Power platforms.

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

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/linuxapp/eal/eal_memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c
index 60cf41b6d..de91c6afb 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
@@ -709,5 +709,5 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
 	}
 
-#ifdef RTE_ARCH_PPC64
+#ifdef RTE_ARCH_PPC_64
 	/* for PPC64 we go through the list backwards */
 	for (cur_page = seg_end - 1; cur_page >= seg_start;
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:54.385405617 +0000
+++ 0045-eal-linux-restore-specific-hugepage-ordering-for-ppc.patch	2019-12-03 17:29:51.769749557 +0000
@@ -1 +1 @@
-From ed5d3d5cdb4d19262e9c5face0a11129f090a485 Mon Sep 17 00:00:00 2001
+From c75284148867891fd2356376ab159afbaef3227b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ed5d3d5cdb4d19262e9c5face0a11129f090a485 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
- lib/librte_eal/linux/eal/eal_memory.c | 2 +-
+ lib/librte_eal/linuxapp/eal/eal_memory.c | 2 +-
@@ -22,5 +23,5 @@
-diff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c
-index 8f62c343d..28a78a5d4 100644
---- a/lib/librte_eal/linux/eal/eal_memory.c
-+++ b/lib/librte_eal/linux/eal/eal_memory.c
-@@ -688,5 +688,5 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
+diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c
+index 60cf41b6d..de91c6afb 100644
+--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
++++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
+@@ -709,5 +709,5 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)


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

* [dpdk-stable] patch 'eal: remove dead code on NUMA node detection' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (43 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'eal/linux: restore specific hugepage ordering for ppc' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'crypto/dpaa_sec: fix auth-cipher check for AEAD' " Kevin Traynor
                   ` (18 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: David Marchand; +Cc: Stephen Hemminger, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/883ce8ee6b55e4452313dc32bbc1fe6bb120e99d

Thanks.

Kevin.

---
From 883ce8ee6b55e4452313dc32bbc1fe6bb120e99d Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 22 Oct 2019 21:34:17 +0200
Subject: [PATCH] eal: remove dead code on NUMA node detection

[ upstream commit 8e35792c5325f9fd2cb7cfab507aa23fc956ced7 ]

RTE_EAL_ALLOW_INV_SOCKET_ID had been introduced and documented as used
with xen dom0 support (dropped for some time now).

Closely looking at this, the code was changed later and ensures that the
socket id is in the [0..RTE_MAX_NUMA_NODES] range anyway.

Let's drop this dead code and the build option with it.

Fixes: 94ef2964148a ("eal/linux: fix numa node detection")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 config/common_base                       | 1 -
 config/meson.build                       | 1 -
 lib/librte_eal/common/eal_common_lcore.c | 9 ---------
 3 files changed, 11 deletions(-)

diff --git a/config/common_base b/config/common_base
index d12ae98bc..6bce2c97f 100644
--- a/config/common_base
+++ b/config/common_base
@@ -89,5 +89,4 @@ CONFIG_RTE_LOG_HISTORY=256
 CONFIG_RTE_BACKTRACE=y
 CONFIG_RTE_LIBEAL_USE_HPET=n
-CONFIG_RTE_EAL_ALLOW_INV_SOCKET_ID=n
 CONFIG_RTE_EAL_ALWAYS_PANIC_ON_ERROR=n
 CONFIG_RTE_EAL_IGB_UIO=n
diff --git a/config/meson.build b/config/meson.build
index e92be6c47..d76776137 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -113,5 +113,4 @@ dpdk_conf.set('RTE_MAX_LCORE', get_option('max_lcores'))
 dpdk_conf.set('RTE_MAX_NUMA_NODES', get_option('max_numa_nodes'))
 dpdk_conf.set('RTE_LIBEAL_USE_HPET', get_option('use_hpet'))
-dpdk_conf.set('RTE_EAL_ALLOW_INV_SOCKET_ID', get_option('allow_invalid_socket_id'))
 # values which have defaults which may be overridden
 dpdk_conf.set('RTE_MAX_VFIO_GROUPS', 64)
diff --git a/lib/librte_eal/common/eal_common_lcore.c b/lib/librte_eal/common/eal_common_lcore.c
index 3167e9d79..7f4a4ee8d 100644
--- a/lib/librte_eal/common/eal_common_lcore.c
+++ b/lib/librte_eal/common/eal_common_lcore.c
@@ -58,13 +58,4 @@ rte_eal_cpu_init(void)
 		/* find socket first */
 		socket_id = eal_cpu_socket_id(lcore_id);
-		if (socket_id >= RTE_MAX_NUMA_NODES) {
-#ifdef RTE_EAL_ALLOW_INV_SOCKET_ID
-			socket_id = 0;
-#else
-			RTE_LOG(ERR, EAL, "Socket ID (%u) is greater than RTE_MAX_NUMA_NODES (%d)\n",
-					socket_id, RTE_MAX_NUMA_NODES);
-			return -1;
-#endif
-		}
 		lcore_to_socket_id[lcore_id] = socket_id;
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:54.441938652 +0000
+++ 0046-eal-remove-dead-code-on-NUMA-node-detection.patch	2019-12-03 17:29:51.770749537 +0000
@@ -1 +1 @@
-From 8e35792c5325f9fd2cb7cfab507aa23fc956ced7 Mon Sep 17 00:00:00 2001
+From 883ce8ee6b55e4452313dc32bbc1fe6bb120e99d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8e35792c5325f9fd2cb7cfab507aa23fc956ced7 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 232315920..ef4c1c4aa 100644
+index d12ae98bc..6bce2c97f 100644
@@ -30 +31 @@
-@@ -103,5 +103,4 @@ CONFIG_RTE_LOG_HISTORY=256
+@@ -89,5 +89,4 @@ CONFIG_RTE_LOG_HISTORY=256
@@ -37 +38 @@
-index acacba704..6a6ab503e 100644
+index e92be6c47..d76776137 100644
@@ -40,2 +41,2 @@
-@@ -181,5 +181,4 @@ dpdk_conf.set('RTE_MAX_NUMA_NODES', get_option('max_numa_nodes'))
- dpdk_conf.set('RTE_MAX_ETHPORTS', get_option('max_ethports'))
+@@ -113,5 +113,4 @@ dpdk_conf.set('RTE_MAX_LCORE', get_option('max_lcores'))
+ dpdk_conf.set('RTE_MAX_NUMA_NODES', get_option('max_numa_nodes'))
@@ -47 +48 @@
-index 38af2605e..59a2fd14d 100644
+index 3167e9d79..7f4a4ee8d 100644
@@ -50 +51 @@
-@@ -90,13 +90,4 @@ rte_eal_cpu_init(void)
+@@ -58,13 +58,4 @@ rte_eal_cpu_init(void)


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

* [dpdk-stable] patch 'crypto/dpaa_sec: fix auth-cipher check for AEAD' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (44 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'eal: remove dead code on NUMA node detection' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'cryptodev: fix checks related to device id' " Kevin Traynor
                   ` (17 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Vakul Garg; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/1c2a3f592eea26b4ae046169936c98eda70ec5a2

Thanks.

Kevin.

---
From 1c2a3f592eea26b4ae046169936c98eda70ec5a2 Mon Sep 17 00:00:00 2001
From: Vakul Garg <vakul.garg@nxp.com>
Date: Mon, 14 Oct 2019 12:23:23 +0530
Subject: [PATCH] crypto/dpaa_sec: fix auth-cipher check for AEAD

[ upstream commit 98e84273902045640b2c6ecc438412c4f1202e15 ]

The code shall also check aead as non auth-cipher case

Fixes: 1f14d500bce1 ("crypto/dpaa_sec: support IPsec protocol offload")

Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/dpaa_sec/dpaa_sec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index c0602ce39..90c3b8efa 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -262,5 +262,6 @@ static inline int is_auth_cipher(dpaa_sec_session *ses)
 	return ((ses->cipher_alg != RTE_CRYPTO_CIPHER_NULL) &&
 		(ses->auth_alg != RTE_CRYPTO_AUTH_NULL) &&
-		(ses->proto_alg != RTE_SECURITY_PROTOCOL_IPSEC));
+		(ses->proto_alg != RTE_SECURITY_PROTOCOL_IPSEC) &&
+		(ses->aead_alg == 0));
 }
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:54.496043911 +0000
+++ 0047-crypto-dpaa_sec-fix-auth-cipher-check-for-AEAD.patch	2019-12-03 17:29:51.771749516 +0000
@@ -1 +1 @@
-From 98e84273902045640b2c6ecc438412c4f1202e15 Mon Sep 17 00:00:00 2001
+From 1c2a3f592eea26b4ae046169936c98eda70ec5a2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 98e84273902045640b2c6ecc438412c4f1202e15 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 17c175604..27a922676 100644
+index c0602ce39..90c3b8efa 100644
@@ -21 +22,2 @@
-@@ -267,5 +267,6 @@ static inline int is_auth_cipher(dpaa_sec_session *ses)
+@@ -262,5 +262,6 @@ static inline int is_auth_cipher(dpaa_sec_session *ses)
+ 	return ((ses->cipher_alg != RTE_CRYPTO_CIPHER_NULL) &&
@@ -23 +24,0 @@
- 		(ses->proto_alg != RTE_SECURITY_PROTOCOL_PDCP) &&


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

* [dpdk-stable] patch 'cryptodev: fix checks related to device id' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (45 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'crypto/dpaa_sec: fix auth-cipher check for AEAD' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'doc: fix typo in l2fwd-crypto guide' " Kevin Traynor
                   ` (16 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Julien Meunier; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/8db57afd7ab9a3c12d73f1f5461415690b8c173c

Thanks.

Kevin.

---
From 8db57afd7ab9a3c12d73f1f5461415690b8c173c Mon Sep 17 00:00:00 2001
From: Julien Meunier <julien.meunier@nokia.com>
Date: Wed, 16 Oct 2019 13:21:11 +0300
Subject: [PATCH] cryptodev: fix checks related to device id

[ upstream commit 3dd4435cf473f5d10b99282098821fb40b72380f ]

Each cryptodev are indexed with dev_id in the global rte_crypto_devices
variable. nb_devs is incremented / decremented each time a cryptodev is
created / deleted. The goal of nb_devs was to prevent the user to get an
invalid dev_id.

Let's imagine DPDK has configured N cryptodevs. If the cryptodev=1 is
removed at runtime, the latest cryptodev N cannot be accessible, because
nb_devs=N-1 with the current implementaion.

In order to prevent this kind of behavior, let's remove the check with
nb_devs and iterate in all the rte_crypto_devices elements: if data is
not NULL, that means a valid cryptodev is available.

Also, remove max_devs field and use RTE_CRYPTO_MAX_DEVS in order to
unify the code.

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

Signed-off-by: Julien Meunier <julien.meunier@nokia.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 lib/librte_cryptodev/rte_cryptodev.c     | 30 +++++++++++++++++-------
 lib/librte_cryptodev/rte_cryptodev_pmd.h |  1 -
 2 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index 9c35e6d9c..f7566fc30 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -51,6 +51,5 @@ static struct rte_cryptodev_global cryptodev_globals = {
 		.devs			= rte_crypto_devices,
 		.data			= { NULL },
-		.nb_devs		= 0,
-		.max_devs		= RTE_CRYPTO_MAX_DEVS
+		.nb_devs		= 0
 };
 
@@ -497,5 +496,5 @@ rte_cryptodev_pmd_get_named_dev(const char *name)
 		return NULL;
 
-	for (i = 0; i < cryptodev_globals.max_devs; i++) {
+	for (i = 0; i < RTE_CRYPTO_MAX_DEVS; i++) {
 		dev = &cryptodev_globals.devs[i];
 
@@ -508,4 +507,13 @@ rte_cryptodev_pmd_get_named_dev(const char *name)
 }
 
+static inline uint8_t
+rte_cryptodev_is_valid_device_data(uint8_t dev_id)
+{
+	if (rte_crypto_devices[dev_id].data == NULL)
+		return 0;
+
+	return 1;
+}
+
 unsigned int
 rte_cryptodev_pmd_is_valid_dev(uint8_t dev_id)
@@ -513,5 +521,5 @@ rte_cryptodev_pmd_is_valid_dev(uint8_t dev_id)
 	struct rte_cryptodev *dev = NULL;
 
-	if (dev_id >= cryptodev_globals.nb_devs)
+	if (!rte_cryptodev_is_valid_device_data(dev_id))
 		return 0;
 
@@ -532,5 +540,7 @@ rte_cryptodev_get_dev_id(const char *name)
 		return -1;
 
-	for (i = 0; i < cryptodev_globals.nb_devs; i++)
+	for (i = 0; i < RTE_CRYPTO_MAX_DEVS; i++) {
+		if (!rte_cryptodev_is_valid_device_data(i))
+			continue;
 		if ((strcmp(cryptodev_globals.devs[i].data->name, name)
 				== 0) &&
@@ -538,4 +548,5 @@ rte_cryptodev_get_dev_id(const char *name)
 						RTE_CRYPTODEV_ATTACHED))
 			return i;
+	}
 
 	return -1;
@@ -553,5 +564,5 @@ rte_cryptodev_device_count_by_driver(uint8_t driver_id)
 	uint8_t i, dev_count = 0;
 
-	for (i = 0; i < cryptodev_globals.max_devs; i++)
+	for (i = 0; i < RTE_CRYPTO_MAX_DEVS; i++)
 		if (cryptodev_globals.devs[i].driver_id == driver_id &&
 			cryptodev_globals.devs[i].attached ==
@@ -568,7 +579,8 @@ rte_cryptodev_devices_get(const char *driver_name, uint8_t *devices,
 	uint8_t i, count = 0;
 	struct rte_cryptodev *devs = cryptodev_globals.devs;
-	uint8_t max_devs = cryptodev_globals.max_devs;
 
-	for (i = 0; i < max_devs && count < nb_devices;	i++) {
+	for (i = 0; i < RTE_CRYPTO_MAX_DEVS && count < nb_devices; i++) {
+		if (!rte_cryptodev_is_valid_device_data(i))
+			continue;
 
 		if (devs[i].attached == RTE_CRYPTODEV_ATTACHED) {
@@ -1019,5 +1031,5 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
 	struct rte_cryptodev *dev;
 
-	if (dev_id >= cryptodev_globals.nb_devs) {
+	if (!rte_cryptodev_pmd_is_valid_dev(dev_id)) {
 		CDEV_LOG_ERR("Invalid dev_id=%d", dev_id);
 		return;
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 1b6cafd17..529791226 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -62,5 +62,4 @@ struct rte_cryptodev_global {
 	/**< Device private data */
 	uint8_t nb_devs;		/**< Number of devices found */
-	uint8_t max_devs;		/**< Max number of devices */
 };
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:54.548620095 +0000
+++ 0048-cryptodev-fix-checks-related-to-device-id.patch	2019-12-03 17:29:51.773749474 +0000
@@ -1 +1 @@
-From 3dd4435cf473f5d10b99282098821fb40b72380f Mon Sep 17 00:00:00 2001
+From 8db57afd7ab9a3c12d73f1f5461415690b8c173c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3dd4435cf473f5d10b99282098821fb40b72380f ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
-index b16ef7b2c..89aa2ed3e 100644
+index 9c35e6d9c..f7566fc30 100644
@@ -44 +45 @@
-@@ -513,5 +512,5 @@ rte_cryptodev_pmd_get_named_dev(const char *name)
+@@ -497,5 +496,5 @@ rte_cryptodev_pmd_get_named_dev(const char *name)
@@ -51 +52 @@
-@@ -524,4 +523,13 @@ rte_cryptodev_pmd_get_named_dev(const char *name)
+@@ -508,4 +507,13 @@ rte_cryptodev_pmd_get_named_dev(const char *name)
@@ -65 +66 @@
-@@ -529,5 +537,5 @@ rte_cryptodev_pmd_is_valid_dev(uint8_t dev_id)
+@@ -513,5 +521,5 @@ rte_cryptodev_pmd_is_valid_dev(uint8_t dev_id)
@@ -72 +73 @@
-@@ -548,5 +556,7 @@ rte_cryptodev_get_dev_id(const char *name)
+@@ -532,5 +540,7 @@ rte_cryptodev_get_dev_id(const char *name)
@@ -81 +82 @@
-@@ -554,4 +564,5 @@ rte_cryptodev_get_dev_id(const char *name)
+@@ -538,4 +548,5 @@ rte_cryptodev_get_dev_id(const char *name)
@@ -87 +88 @@
-@@ -569,5 +580,5 @@ rte_cryptodev_device_count_by_driver(uint8_t driver_id)
+@@ -553,5 +564,5 @@ rte_cryptodev_device_count_by_driver(uint8_t driver_id)
@@ -94 +95 @@
-@@ -584,7 +595,8 @@ rte_cryptodev_devices_get(const char *driver_name, uint8_t *devices,
+@@ -568,7 +579,8 @@ rte_cryptodev_devices_get(const char *driver_name, uint8_t *devices,
@@ -105 +106 @@
-@@ -1102,5 +1114,5 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
+@@ -1019,5 +1031,5 @@ rte_cryptodev_info_get(uint8_t dev_id, struct rte_cryptodev_info *dev_info)
@@ -113 +114 @@
-index defe05ea0..fba14f2fa 100644
+index 1b6cafd17..529791226 100644


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

* [dpdk-stable] patch 'doc: fix typo in l2fwd-crypto guide' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (46 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'cryptodev: fix checks related to device id' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:26 ` [dpdk-stable] patch 'crypto/qat: fix null auth when using VFIO' " Kevin Traynor
                   ` (15 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Xiao Wang; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/b7e13c704d4d1974cdc83b9bdd66f3111b9a2b69

Thanks.

Kevin.

---
From b7e13c704d4d1974cdc83b9bdd66f3111b9a2b69 Mon Sep 17 00:00:00 2001
From: Xiao Wang <xiao.w.wang@intel.com>
Date: Wed, 16 Oct 2019 04:06:45 -0400
Subject: [PATCH] doc: fix typo in l2fwd-crypto guide

[ upstream commit 3cc28001a3307411f3b427d6ec928fb5479cb7de ]

Unmatched double quotation mark is fixed.

Fixes: ba7b86b1419b ("doc: add l2fwd-crypto sample app guide")

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 doc/guides/sample_app_ug/l2_forward_crypto.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/sample_app_ug/l2_forward_crypto.rst b/doc/guides/sample_app_ug/l2_forward_crypto.rst
index 855afd8fc..1a7f135c0 100644
--- a/doc/guides/sample_app_ug/l2_forward_crypto.rst
+++ b/doc/guides/sample_app_ug/l2_forward_crypto.rst
@@ -205,5 +205,5 @@ All the packets received in all the ports get transformed by the crypto device/s
 (ciphering and/or authentication).
 The crypto operation to be performed on the packet is parsed from the command line
-(go to "Running the Application section for all the options).
+(go to "Running the Application" section for all the options).
 
 If no parameter is passed, the default crypto operation is:
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:54.604450315 +0000
+++ 0049-doc-fix-typo-in-l2fwd-crypto-guide.patch	2019-12-03 17:29:51.773749474 +0000
@@ -1 +1 @@
-From 3cc28001a3307411f3b427d6ec928fb5479cb7de Mon Sep 17 00:00:00 2001
+From b7e13c704d4d1974cdc83b9bdd66f3111b9a2b69 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3cc28001a3307411f3b427d6ec928fb5479cb7de ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index e8d52dad2..962752f21 100644
+index 855afd8fc..1a7f135c0 100644


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

* [dpdk-stable] patch 'crypto/qat: fix null auth when using VFIO' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (47 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'doc: fix typo in l2fwd-crypto guide' " Kevin Traynor
@ 2019-12-03 18:26 ` Kevin Traynor
  2019-12-03 18:27 ` [dpdk-stable] patch 'crypto/qat: fix AES CMAC mininum digest size' " Kevin Traynor
                   ` (14 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:26 UTC (permalink / raw)
  To: Damian Nowak; +Cc: Fiona Trahe, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/ac0a49ed92588f961b1f5e659d27c70f078eea13

Thanks.

Kevin.

---
From ac0a49ed92588f961b1f5e659d27c70f078eea13 Mon Sep 17 00:00:00 2001
From: Damian Nowak <damianx.nowak@intel.com>
Date: Fri, 9 Aug 2019 11:29:01 +0200
Subject: [PATCH] crypto/qat: fix null auth when using VFIO

[ upstream commit 65beb9abca6dbb2167a53ab31d79e03f0857357b ]

When running auth NULL cases while using
vfio_pci, DMAR read/write faults appear. It
happens even if digest_length is set to 0.
This is caused by auth_res_addr initialized
as 0x0.

Fixes: 4e0955bddb08 ("crypto/qat: fix null auth algo overwrite")

Signed-off-by: Damian Nowak <damianx.nowak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
 drivers/crypto/qat/qat_sym.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index 7515a55d0..f7ea1a5dd 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -307,7 +307,6 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
 		min_ofs = auth_ofs;
 
-		if (likely(ctx->qat_hash_alg != ICP_QAT_HW_AUTH_ALGO_NULL))
-			auth_param->auth_res_addr =
-					op->sym->auth.digest.phys_addr;
+		auth_param->auth_res_addr =
+			op->sym->auth.digest.phys_addr;
 
 	}
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:54.654819123 +0000
+++ 0050-crypto-qat-fix-null-auth-when-using-VFIO.patch	2019-12-03 17:29:51.774749453 +0000
@@ -1 +1 @@
-From 65beb9abca6dbb2167a53ab31d79e03f0857357b Mon Sep 17 00:00:00 2001
+From ac0a49ed92588f961b1f5e659d27c70f078eea13 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 65beb9abca6dbb2167a53ab31d79e03f0857357b ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 5ff4aa1e5..5c9904cbf 100644
+index 7515a55d0..f7ea1a5dd 100644
@@ -25 +26 @@
-@@ -310,7 +310,6 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
+@@ -307,7 +307,6 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,


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

* [dpdk-stable] patch 'crypto/qat: fix AES CMAC mininum digest size' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (48 preceding siblings ...)
  2019-12-03 18:26 ` [dpdk-stable] patch 'crypto/qat: fix null auth when using VFIO' " Kevin Traynor
@ 2019-12-03 18:27 ` Kevin Traynor
  2019-12-03 18:27 ` [dpdk-stable] patch 'lib/distributor: fix deadlock on aarch64' " Kevin Traynor
                   ` (13 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:27 UTC (permalink / raw)
  To: Arek Kusztal; +Cc: Fiona Trahe, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/2674667aac56448c8bd151bc082e64ef4c88b649

Thanks.

Kevin.

---
From 2674667aac56448c8bd151bc082e64ef4c88b649 Mon Sep 17 00:00:00 2001
From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Date: Tue, 22 Oct 2019 16:22:25 +0200
Subject: [PATCH] crypto/qat: fix AES CMAC mininum digest size

[ upstream commit a7f8087bbdbe9a69fdd0bbc77237dd3a2014ce71 ]

AES-CMAC is used in 3gpp specifications hence it is needed
to support 4 byte digest.

Fixes: 91c1daa4e1f0 ("crypto/qat: support AES-CMAC")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@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 d1f82c073..5ce0d82b9 100644
--- a/drivers/crypto/qat/qat_sym_capabilities.h
+++ b/drivers/crypto/qat/qat_sym_capabilities.h
@@ -168,5 +168,5 @@
 				},					\
 				.digest_size = {			\
-					.min = 12,			\
+					.min = 4,			\
 					.max = 16,			\
 					.increment = 4			\
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:54.705122478 +0000
+++ 0051-crypto-qat-fix-AES-CMAC-mininum-digest-size.patch	2019-12-03 17:29:51.774749453 +0000
@@ -1 +1 @@
-From a7f8087bbdbe9a69fdd0bbc77237dd3a2014ce71 Mon Sep 17 00:00:00 2001
+From 2674667aac56448c8bd151bc082e64ef4c88b649 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a7f8087bbdbe9a69fdd0bbc77237dd3a2014ce71 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index a7fb6a0da..028a56c56 100644
+index d1f82c073..5ce0d82b9 100644


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

* [dpdk-stable] patch 'lib/distributor: fix deadlock on aarch64' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (49 preceding siblings ...)
  2019-12-03 18:27 ` [dpdk-stable] patch 'crypto/qat: fix AES CMAC mininum digest size' " Kevin Traynor
@ 2019-12-03 18:27 ` Kevin Traynor
  2019-12-03 18:27 ` [dpdk-stable] patch 'test/distributor: fix spurious failure' " Kevin Traynor
                   ` (12 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:27 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Gavin Hu, David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/01b5ea180ab7e79a3a5524f2b4bef3a3cd0c25f3

Thanks.

Kevin.

---
From 01b5ea180ab7e79a3a5524f2b4bef3a3cd0c25f3 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Tue, 15 Oct 2019 17:28:25 +0800
Subject: [PATCH] lib/distributor: fix deadlock on aarch64

[ upstream commit 52833924822490391df3dce3eec3a2ee7777acc5 ]

Distributor and worker threads rely on data structs in cache line
for synchronization. The shared data structs were not protected.
This caused deadlock issue on weaker memory ordering platforms as
aarch64.
Fix this issue by adding memory barriers to ensure synchronization
among cores.

Bugzilla ID: 342
Fixes: 775003ad2f96 ("distributor: add new burst-capable library")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
 lib/librte_distributor/meson.build           |  5 ++
 lib/librte_distributor/rte_distributor.c     | 68 ++++++++++++++------
 lib/librte_distributor/rte_distributor_v20.c | 59 ++++++++++++-----
 3 files changed, 97 insertions(+), 35 deletions(-)

diff --git a/lib/librte_distributor/meson.build b/lib/librte_distributor/meson.build
index dba7e3b2a..26577dbc1 100644
--- a/lib/librte_distributor/meson.build
+++ b/lib/librte_distributor/meson.build
@@ -10,2 +10,7 @@ endif
 headers = files('rte_distributor.h')
 deps += ['mbuf']
+
+# for clang 32-bit compiles we need libatomic for 64-bit atomic ops
+if cc.get_id() == 'clang' and dpdk_conf.get('RTE_ARCH_64') == false
+	ext_deps += cc.find_library('atomic')
+endif
diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
index b60acdeed..62a763404 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -49,6 +49,9 @@ rte_distributor_request_pkt_v1705(struct rte_distributor *d,
 
 	retptr64 = &(buf->retptr64[0]);
-	/* Spin while handshake bits are set (scheduler clears it) */
-	while (unlikely(*retptr64 & RTE_DISTRIB_GET_BUF)) {
+	/* Spin while handshake bits are set (scheduler clears it).
+	 * Sync with worker on GET_BUF flag.
+	 */
+	while (unlikely(__atomic_load_n(retptr64, __ATOMIC_ACQUIRE)
+			& RTE_DISTRIB_GET_BUF)) {
 		rte_pause();
 		uint64_t t = rte_rdtsc()+100;
@@ -75,6 +78,8 @@ rte_distributor_request_pkt_v1705(struct rte_distributor *d,
 	 * Finally, set the GET_BUF  to signal to distributor that cache
 	 * line is ready for processing
+	 * Sync with distributor to release retptrs
 	 */
-	*retptr64 |= RTE_DISTRIB_GET_BUF;
+	__atomic_store_n(retptr64, *retptr64 | RTE_DISTRIB_GET_BUF,
+			__ATOMIC_RELEASE);
 }
 BIND_DEFAULT_SYMBOL(rte_distributor_request_pkt, _v1705, 17.05);
@@ -98,6 +103,9 @@ rte_distributor_poll_pkt_v1705(struct rte_distributor *d,
 	}
 
-	/* If bit is set, return */
-	if (buf->bufptr64[0] & RTE_DISTRIB_GET_BUF)
+	/* If bit is set, return
+	 * Sync with distributor to acquire bufptrs
+	 */
+	if (__atomic_load_n(&(buf->bufptr64[0]), __ATOMIC_ACQUIRE)
+		& RTE_DISTRIB_GET_BUF)
 		return -1;
 
@@ -114,6 +122,8 @@ rte_distributor_poll_pkt_v1705(struct rte_distributor *d,
 	 * mbuf pointers, so toggle the bit so scheduler can start working
 	 * on the next cacheline while we're working.
+	 * Sync with distributor on GET_BUF flag. Release bufptrs.
 	 */
-	buf->bufptr64[0] |= RTE_DISTRIB_GET_BUF;
+	__atomic_store_n(&(buf->bufptr64[0]),
+		buf->bufptr64[0] | RTE_DISTRIB_GET_BUF, __ATOMIC_RELEASE);
 
 	return count;
@@ -174,4 +184,6 @@ rte_distributor_return_pkt_v1705(struct rte_distributor *d,
 	}
 
+	/* Sync with distributor to acquire retptrs */
+	__atomic_thread_fence(__ATOMIC_ACQUIRE);
 	for (i = 0; i < RTE_DIST_BURST_SIZE; i++)
 		/* Switch off the return bit first */
@@ -182,6 +194,9 @@ rte_distributor_return_pkt_v1705(struct rte_distributor *d,
 			RTE_DISTRIB_FLAG_BITS) | RTE_DISTRIB_RETURN_BUF;
 
-	/* set the GET_BUF but even if we got no returns */
-	buf->retptr64[0] |= RTE_DISTRIB_GET_BUF;
+	/* set the GET_BUF but even if we got no returns.
+	 * Sync with distributor on GET_BUF flag. Release retptrs.
+	 */
+	__atomic_store_n(&(buf->retptr64[0]),
+		buf->retptr64[0] | RTE_DISTRIB_GET_BUF, __ATOMIC_RELEASE);
 
 	return 0;
@@ -273,5 +288,7 @@ handle_returns(struct rte_distributor *d, unsigned int wkr)
 	unsigned int i;
 
-	if (buf->retptr64[0] & RTE_DISTRIB_GET_BUF) {
+	/* Sync on GET_BUF flag. Acquire retptrs. */
+	if (__atomic_load_n(&(buf->retptr64[0]), __ATOMIC_ACQUIRE)
+		& RTE_DISTRIB_GET_BUF) {
 		for (i = 0; i < RTE_DIST_BURST_SIZE; i++) {
 			if (buf->retptr64[i] & RTE_DISTRIB_RETURN_BUF) {
@@ -286,6 +303,8 @@ handle_returns(struct rte_distributor *d, unsigned int wkr)
 		d->returns.start = ret_start;
 		d->returns.count = ret_count;
-		/* Clear for the worker to populate with more returns */
-		buf->retptr64[0] = 0;
+		/* Clear for the worker to populate with more returns.
+		 * Sync with distributor on GET_BUF flag. Release retptrs.
+		 */
+		__atomic_store_n(&(buf->retptr64[0]), 0, __ATOMIC_RELEASE);
 	}
 	return count;
@@ -307,5 +326,7 @@ release(struct rte_distributor *d, unsigned int wkr)
 	unsigned int i;
 
-	while (!(d->bufs[wkr].bufptr64[0] & RTE_DISTRIB_GET_BUF))
+	/* Sync with worker on GET_BUF flag */
+	while (!(__atomic_load_n(&(d->bufs[wkr].bufptr64[0]), __ATOMIC_ACQUIRE)
+		& RTE_DISTRIB_GET_BUF))
 		rte_pause();
 
@@ -327,6 +348,9 @@ release(struct rte_distributor *d, unsigned int wkr)
 	d->backlog[wkr].count = 0;
 
-	/* Clear the GET bit */
-	buf->bufptr64[0] &= ~RTE_DISTRIB_GET_BUF;
+	/* Clear the GET bit.
+	 * Sync with worker on GET_BUF flag. Release bufptrs.
+	 */
+	__atomic_store_n(&(buf->bufptr64[0]),
+		buf->bufptr64[0] & ~RTE_DISTRIB_GET_BUF, __ATOMIC_RELEASE);
 	return  buf->count;
 
@@ -355,5 +379,7 @@ rte_distributor_process_v1705(struct rte_distributor *d,
 		/* Flush out all non-full cache-lines to workers. */
 		for (wid = 0 ; wid < d->num_workers; wid++) {
-			if (d->bufs[wid].bufptr64[0] & RTE_DISTRIB_GET_BUF) {
+			/* Sync with worker on GET_BUF flag. */
+			if (__atomic_load_n(&(d->bufs[wid].bufptr64[0]),
+				__ATOMIC_ACQUIRE) & RTE_DISTRIB_GET_BUF) {
 				release(d, wid);
 				handle_returns(d, wid);
@@ -367,5 +393,7 @@ rte_distributor_process_v1705(struct rte_distributor *d,
 		unsigned int pkts;
 
-		if (d->bufs[wkr].bufptr64[0] & RTE_DISTRIB_GET_BUF)
+		/* Sync with worker on GET_BUF flag. */
+		if (__atomic_load_n(&(d->bufs[wkr].bufptr64[0]),
+			__ATOMIC_ACQUIRE) & RTE_DISTRIB_GET_BUF)
 			d->bufs[wkr].count = 0;
 
@@ -465,5 +493,7 @@ rte_distributor_process_v1705(struct rte_distributor *d,
 	/* Flush out all non-full cache-lines to workers. */
 	for (wid = 0 ; wid < d->num_workers; wid++)
-		if ((d->bufs[wid].bufptr64[0] & RTE_DISTRIB_GET_BUF))
+		/* Sync with worker on GET_BUF flag. */
+		if ((__atomic_load_n(&(d->bufs[wid].bufptr64[0]),
+			__ATOMIC_ACQUIRE) & RTE_DISTRIB_GET_BUF))
 			release(d, wid);
 
@@ -574,5 +604,7 @@ rte_distributor_clear_returns_v1705(struct rte_distributor *d)
 	/* throw away returns, so workers can exit */
 	for (wkr = 0; wkr < d->num_workers; wkr++)
-		d->bufs[wkr].retptr64[0] = 0;
+		/* Sync with worker. Release retptrs. */
+		__atomic_store_n(&(d->bufs[wkr].retptr64[0]), 0,
+				__ATOMIC_RELEASE);
 }
 BIND_DEFAULT_SYMBOL(rte_distributor_clear_returns, _v1705, 17.05);
diff --git a/lib/librte_distributor/rte_distributor_v20.c b/lib/librte_distributor/rte_distributor_v20.c
index 9566b53f2..35adc8ea8 100644
--- a/lib/librte_distributor/rte_distributor_v20.c
+++ b/lib/librte_distributor/rte_distributor_v20.c
@@ -34,7 +34,10 @@ rte_distributor_request_pkt_v20(struct rte_distributor_v20 *d,
 	int64_t req = (((int64_t)(uintptr_t)oldpkt) << RTE_DISTRIB_FLAG_BITS)
 			| RTE_DISTRIB_GET_BUF;
-	while (unlikely(buf->bufptr64 & RTE_DISTRIB_FLAGS_MASK))
+	while (unlikely(__atomic_load_n(&buf->bufptr64, __ATOMIC_RELAXED)
+			& RTE_DISTRIB_FLAGS_MASK))
 		rte_pause();
-	buf->bufptr64 = req;
+
+	/* Sync with distributor on GET_BUF flag. */
+	__atomic_store_n(&(buf->bufptr64), req, __ATOMIC_RELEASE);
 }
 VERSION_SYMBOL(rte_distributor_request_pkt, _v20, 2.0);
@@ -45,5 +48,7 @@ rte_distributor_poll_pkt_v20(struct rte_distributor_v20 *d,
 {
 	union rte_distributor_buffer_v20 *buf = &d->bufs[worker_id];
-	if (buf->bufptr64 & RTE_DISTRIB_GET_BUF)
+	/* Sync with distributor. Acquire bufptr64. */
+	if (__atomic_load_n(&buf->bufptr64, __ATOMIC_ACQUIRE)
+		& RTE_DISTRIB_GET_BUF)
 		return NULL;
 
@@ -73,5 +78,6 @@ rte_distributor_return_pkt_v20(struct rte_distributor_v20 *d,
 	uint64_t req = (((int64_t)(uintptr_t)oldpkt) << RTE_DISTRIB_FLAG_BITS)
 			| RTE_DISTRIB_RETURN_BUF;
-	buf->bufptr64 = req;
+	/* Sync with distributor on RETURN_BUF flag. */
+	__atomic_store_n(&(buf->bufptr64), req, __ATOMIC_RELEASE);
 	return 0;
 }
@@ -117,5 +123,6 @@ handle_worker_shutdown(struct rte_distributor_v20 *d, unsigned int wkr)
 	d->in_flight_tags[wkr] = 0;
 	d->in_flight_bitmask &= ~(1UL << wkr);
-	d->bufs[wkr].bufptr64 = 0;
+	/* Sync with worker. Release bufptr64. */
+	__atomic_store_n(&(d->bufs[wkr].bufptr64), 0, __ATOMIC_RELEASE);
 	if (unlikely(d->backlog[wkr].count != 0)) {
 		/* On return of a packet, we need to move the
@@ -161,15 +168,21 @@ process_returns(struct rte_distributor_v20 *d)
 
 	for (wkr = 0; wkr < d->num_workers; wkr++) {
-
-		const int64_t data = d->bufs[wkr].bufptr64;
 		uintptr_t oldbuf = 0;
+		/* Sync with worker. Acquire bufptr64. */
+		const int64_t data = __atomic_load_n(&(d->bufs[wkr].bufptr64),
+							__ATOMIC_ACQUIRE);
 
 		if (data & RTE_DISTRIB_GET_BUF) {
 			flushed++;
 			if (d->backlog[wkr].count)
-				d->bufs[wkr].bufptr64 =
-						backlog_pop(&d->backlog[wkr]);
+				/* Sync with worker. Release bufptr64. */
+				__atomic_store_n(&(d->bufs[wkr].bufptr64),
+					backlog_pop(&d->backlog[wkr]),
+					__ATOMIC_RELEASE);
 			else {
-				d->bufs[wkr].bufptr64 = RTE_DISTRIB_GET_BUF;
+				/* Sync with worker on GET_BUF flag. */
+				__atomic_store_n(&(d->bufs[wkr].bufptr64),
+					RTE_DISTRIB_GET_BUF,
+					__ATOMIC_RELEASE);
 				d->in_flight_tags[wkr] = 0;
 				d->in_flight_bitmask &= ~(1UL << wkr);
@@ -207,7 +220,8 @@ rte_distributor_process_v20(struct rte_distributor_v20 *d,
 
 	while (next_idx < num_mbufs || next_mb != NULL) {
-
-		int64_t data = d->bufs[wkr].bufptr64;
 		uintptr_t oldbuf = 0;
+		/* Sync with worker. Acquire bufptr64. */
+		int64_t data = __atomic_load_n(&(d->bufs[wkr].bufptr64),
+						__ATOMIC_ACQUIRE);
 
 		if (!next_mb) {
@@ -255,9 +269,14 @@ rte_distributor_process_v20(struct rte_distributor_v20 *d,
 
 			if (d->backlog[wkr].count)
-				d->bufs[wkr].bufptr64 =
-						backlog_pop(&d->backlog[wkr]);
+				/* Sync with worker. Release bufptr64. */
+				__atomic_store_n(&(d->bufs[wkr].bufptr64),
+						backlog_pop(&d->backlog[wkr]),
+						__ATOMIC_RELEASE);
 
 			else {
-				d->bufs[wkr].bufptr64 = next_value;
+				/* Sync with worker. Release bufptr64.  */
+				__atomic_store_n(&(d->bufs[wkr].bufptr64),
+						next_value,
+						__ATOMIC_RELEASE);
 				d->in_flight_tags[wkr] = new_tag;
 				d->in_flight_bitmask |= (1UL << wkr);
@@ -280,11 +299,17 @@ rte_distributor_process_v20(struct rte_distributor_v20 *d,
 	for (wkr = 0; wkr < d->num_workers; wkr++)
 		if (d->backlog[wkr].count &&
-				(d->bufs[wkr].bufptr64 & RTE_DISTRIB_GET_BUF)) {
+				/* Sync with worker. Acquire bufptr64. */
+				(__atomic_load_n(&(d->bufs[wkr].bufptr64),
+				__ATOMIC_ACQUIRE) & RTE_DISTRIB_GET_BUF)) {
 
 			int64_t oldbuf = d->bufs[wkr].bufptr64 >>
 					RTE_DISTRIB_FLAG_BITS;
+
 			store_return(oldbuf, d, &ret_start, &ret_count);
 
-			d->bufs[wkr].bufptr64 = backlog_pop(&d->backlog[wkr]);
+			/* Sync with worker. Release bufptr64. */
+			__atomic_store_n(&(d->bufs[wkr].bufptr64),
+				backlog_pop(&d->backlog[wkr]),
+				__ATOMIC_RELEASE);
 		}
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:54.758306253 +0000
+++ 0052-lib-distributor-fix-deadlock-on-aarch64.patch	2019-12-03 17:29:51.776749412 +0000
@@ -1 +1 @@
-From 52833924822490391df3dce3eec3a2ee7777acc5 Mon Sep 17 00:00:00 2001
+From 01b5ea180ab7e79a3a5524f2b4bef3a3cd0c25f3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 52833924822490391df3dce3eec3a2ee7777acc5 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -39 +40 @@
-index 21eb1fb0a..0a03625c9 100644
+index b60acdeed..62a763404 100644
@@ -42 +43 @@
-@@ -50,6 +50,9 @@ rte_distributor_request_pkt_v1705(struct rte_distributor *d,
+@@ -49,6 +49,9 @@ rte_distributor_request_pkt_v1705(struct rte_distributor *d,
@@ -54 +55 @@
-@@ -76,6 +79,8 @@ rte_distributor_request_pkt_v1705(struct rte_distributor *d,
+@@ -75,6 +78,8 @@ rte_distributor_request_pkt_v1705(struct rte_distributor *d,
@@ -64 +65 @@
-@@ -99,6 +104,9 @@ rte_distributor_poll_pkt_v1705(struct rte_distributor *d,
+@@ -98,6 +103,9 @@ rte_distributor_poll_pkt_v1705(struct rte_distributor *d,
@@ -76 +77 @@
-@@ -115,6 +123,8 @@ rte_distributor_poll_pkt_v1705(struct rte_distributor *d,
+@@ -114,6 +122,8 @@ rte_distributor_poll_pkt_v1705(struct rte_distributor *d,
@@ -86 +87 @@
-@@ -175,4 +185,6 @@ rte_distributor_return_pkt_v1705(struct rte_distributor *d,
+@@ -174,4 +184,6 @@ rte_distributor_return_pkt_v1705(struct rte_distributor *d,
@@ -93 +94 @@
-@@ -183,6 +195,9 @@ rte_distributor_return_pkt_v1705(struct rte_distributor *d,
+@@ -182,6 +194,9 @@ rte_distributor_return_pkt_v1705(struct rte_distributor *d,
@@ -105 +106 @@
-@@ -274,5 +289,7 @@ handle_returns(struct rte_distributor *d, unsigned int wkr)
+@@ -273,5 +288,7 @@ handle_returns(struct rte_distributor *d, unsigned int wkr)
@@ -114 +115 @@
-@@ -287,6 +304,8 @@ handle_returns(struct rte_distributor *d, unsigned int wkr)
+@@ -286,6 +303,8 @@ handle_returns(struct rte_distributor *d, unsigned int wkr)
@@ -125 +126 @@
-@@ -308,5 +327,7 @@ release(struct rte_distributor *d, unsigned int wkr)
+@@ -307,5 +326,7 @@ release(struct rte_distributor *d, unsigned int wkr)
@@ -134 +135 @@
-@@ -328,6 +349,9 @@ release(struct rte_distributor *d, unsigned int wkr)
+@@ -327,6 +348,9 @@ release(struct rte_distributor *d, unsigned int wkr)
@@ -146 +147 @@
-@@ -356,5 +380,7 @@ rte_distributor_process_v1705(struct rte_distributor *d,
+@@ -355,5 +379,7 @@ rte_distributor_process_v1705(struct rte_distributor *d,
@@ -155 +156 @@
-@@ -368,5 +394,7 @@ rte_distributor_process_v1705(struct rte_distributor *d,
+@@ -367,5 +393,7 @@ rte_distributor_process_v1705(struct rte_distributor *d,
@@ -164 +165 @@
-@@ -466,5 +494,7 @@ rte_distributor_process_v1705(struct rte_distributor *d,
+@@ -465,5 +493,7 @@ rte_distributor_process_v1705(struct rte_distributor *d,
@@ -173 +174 @@
-@@ -575,5 +605,7 @@ rte_distributor_clear_returns_v1705(struct rte_distributor *d)
+@@ -574,5 +604,7 @@ rte_distributor_clear_returns_v1705(struct rte_distributor *d)
@@ -183 +184 @@
-index cdc0969a8..ef6d5cb4b 100644
+index 9566b53f2..35adc8ea8 100644
@@ -186 +187 @@
-@@ -35,7 +35,10 @@ rte_distributor_request_pkt_v20(struct rte_distributor_v20 *d,
+@@ -34,7 +34,10 @@ rte_distributor_request_pkt_v20(struct rte_distributor_v20 *d,
@@ -199 +200 @@
-@@ -46,5 +49,7 @@ rte_distributor_poll_pkt_v20(struct rte_distributor_v20 *d,
+@@ -45,5 +48,7 @@ rte_distributor_poll_pkt_v20(struct rte_distributor_v20 *d,
@@ -208 +209 @@
-@@ -74,5 +79,6 @@ rte_distributor_return_pkt_v20(struct rte_distributor_v20 *d,
+@@ -73,5 +78,6 @@ rte_distributor_return_pkt_v20(struct rte_distributor_v20 *d,
@@ -216 +217 @@
-@@ -118,5 +124,6 @@ handle_worker_shutdown(struct rte_distributor_v20 *d, unsigned int wkr)
+@@ -117,5 +123,6 @@ handle_worker_shutdown(struct rte_distributor_v20 *d, unsigned int wkr)
@@ -224 +225 @@
-@@ -162,15 +169,21 @@ process_returns(struct rte_distributor_v20 *d)
+@@ -161,15 +168,21 @@ process_returns(struct rte_distributor_v20 *d)
@@ -251 +252 @@
-@@ -208,7 +221,8 @@ rte_distributor_process_v20(struct rte_distributor_v20 *d,
+@@ -207,7 +220,8 @@ rte_distributor_process_v20(struct rte_distributor_v20 *d,
@@ -262 +263 @@
-@@ -256,9 +270,14 @@ rte_distributor_process_v20(struct rte_distributor_v20 *d,
+@@ -255,9 +269,14 @@ rte_distributor_process_v20(struct rte_distributor_v20 *d,
@@ -280 +281 @@
-@@ -281,11 +300,17 @@ rte_distributor_process_v20(struct rte_distributor_v20 *d,
+@@ -280,11 +299,17 @@ rte_distributor_process_v20(struct rte_distributor_v20 *d,


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

* [dpdk-stable] patch 'test/distributor: fix spurious failure' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (50 preceding siblings ...)
  2019-12-03 18:27 ` [dpdk-stable] patch 'lib/distributor: fix deadlock on aarch64' " Kevin Traynor
@ 2019-12-03 18:27 ` Kevin Traynor
  2019-12-03 18:27 ` [dpdk-stable] patch 'bus/pci: remove useless link dependency on ethdev' " Kevin Traynor
                   ` (11 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:27 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Gavin Hu, David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/aebd97adab85938aaf026639ffd1385294c94c22

Thanks.

Kevin.

---
From aebd97adab85938aaf026639ffd1385294c94c22 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Tue, 15 Oct 2019 17:28:26 +0800
Subject: [PATCH] test/distributor: fix spurious failure

[ upstream commit 0a82b96e36746608eee9f1f71e2258d9c0099575 ]

Sanity test could spuriously fail with reporting flush count error.
It was caused by worker stat coherent issue between distributor and
worker thread.
Fix this issue by using atomic operations to update worker stat.

Fixes: c3eabff124e6 ("distributor: add unit tests")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
 test/test/test_distributor.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/test/test/test_distributor.c b/test/test/test_distributor.c
index d4996798d..6aa4e49e6 100644
--- a/test/test/test_distributor.c
+++ b/test/test/test_distributor.c
@@ -71,10 +71,12 @@ handle_work(void *arg)
 	num = rte_distributor_get_pkt(db, id, buf, buf, num);
 	while (!quit) {
-		worker_stats[id].handled_packets += num;
+		__atomic_fetch_add(&worker_stats[id].handled_packets, num,
+				__ATOMIC_RELAXED);
 		count += num;
 		num = rte_distributor_get_pkt(db, id,
 				buf, buf, num);
 	}
-	worker_stats[id].handled_packets += num;
+	__atomic_fetch_add(&worker_stats[id].handled_packets, num,
+			__ATOMIC_RELAXED);
 	count += num;
 	rte_distributor_return_pkt(db, id, buf, num);
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:54.808326390 +0000
+++ 0053-test-distributor-fix-spurious-failure.patch	2019-12-03 17:29:51.776749412 +0000
@@ -1 +1 @@
-From 0a82b96e36746608eee9f1f71e2258d9c0099575 Mon Sep 17 00:00:00 2001
+From aebd97adab85938aaf026639ffd1385294c94c22 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0a82b96e36746608eee9f1f71e2258d9c0099575 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
- app/test/test_distributor.c | 6 ++++--
+ test/test/test_distributor.c | 6 ++++--
@@ -21,4 +22,4 @@
-diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
-index 7090b55f8..ba1f81cf8 100644
---- a/app/test/test_distributor.c
-+++ b/app/test/test_distributor.c
+diff --git a/test/test/test_distributor.c b/test/test/test_distributor.c
+index d4996798d..6aa4e49e6 100644
+--- a/test/test/test_distributor.c
++++ b/test/test/test_distributor.c


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

* [dpdk-stable] patch 'bus/pci: remove useless link dependency on ethdev' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (51 preceding siblings ...)
  2019-12-03 18:27 ` [dpdk-stable] patch 'test/distributor: fix spurious failure' " Kevin Traynor
@ 2019-12-03 18:27 ` Kevin Traynor
  2019-12-03 18:27 ` [dpdk-stable] patch 'net/mlx5: validate flow rule item order' " Kevin Traynor
                   ` (10 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:27 UTC (permalink / raw)
  To: Seth Howell; +Cc: Gaetan Rivet, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/65d6da1c84cdd75c5d0a2c94d40606d0e7459e96

Thanks.

Kevin.

---
From 65d6da1c84cdd75c5d0a2c94d40606d0e7459e96 Mon Sep 17 00:00:00 2001
From: Seth Howell <seth.howell@intel.com>
Date: Fri, 11 Oct 2019 13:56:07 -0700
Subject: [PATCH] bus/pci: remove useless link dependency on ethdev

[ upstream commit c345c7d1acf43b4d30e1ecdd5a8cd3402234a6aa ]

The makefile in drivers/bus/pci specified rte_ethdev as a dependency for
the library. However there are no actual symbols from librte_ethdev used
in librte_bus_pci.

Including librte_ethdev as a dependency only becomes a problem in some
niche cases like when attempting to build the rte_bus_pci library as a
shared object without building the rte_ethdev library.

I specifically ran into this when trying to build the DPDK included as
an SPDK submodule on a FreeBSD machine. I figure that since there are no
real dependencies between the two, we should enable building
librte_bus_pci without librte_ethdev.

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

Signed-off-by: Seth Howell <seth.howell@intel.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
 drivers/bus/pci/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/pci/Makefile b/drivers/bus/pci/Makefile
index f33e0120f..b69609156 100644
--- a/drivers/bus/pci/Makefile
+++ b/drivers/bus/pci/Makefile
@@ -27,5 +27,5 @@ CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
-LDLIBS += -lrte_ethdev -lrte_pci -lrte_kvargs
+LDLIBS += -lrte_pci -lrte_kvargs
 
 include $(RTE_SDK)/drivers/bus/pci/$(SYSTEM)/Makefile
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:54.862992262 +0000
+++ 0054-bus-pci-remove-useless-link-dependency-on-ethdev.patch	2019-12-03 17:29:51.776749412 +0000
@@ -1 +1 @@
-From c345c7d1acf43b4d30e1ecdd5a8cd3402234a6aa Mon Sep 17 00:00:00 2001
+From 65d6da1c84cdd75c5d0a2c94d40606d0e7459e96 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c345c7d1acf43b4d30e1ecdd5a8cd3402234a6aa ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 68c1f3fde..45d12427a 100644
+index f33e0120f..b69609156 100644
@@ -32 +33 @@
-@@ -26,5 +26,5 @@ CFLAGS += -DALLOW_EXPERIMENTAL_API
+@@ -27,5 +27,5 @@ CFLAGS += -DALLOW_EXPERIMENTAL_API


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

* [dpdk-stable] patch 'net/mlx5: validate flow rule item order' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (52 preceding siblings ...)
  2019-12-03 18:27 ` [dpdk-stable] patch 'bus/pci: remove useless link dependency on ethdev' " Kevin Traynor
@ 2019-12-03 18:27 ` Kevin Traynor
  2019-12-03 18:27 ` [dpdk-stable] patch 'test/bonding: fix LSC related cases' " Kevin Traynor
                   ` (9 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:27 UTC (permalink / raw)
  To: Xiaoyu Min; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/16dfdb13c1e86e2643b2181f6b7dc1a966e6e460

Thanks.

Kevin.

---
From 16dfdb13c1e86e2643b2181f6b7dc1a966e6e460 Mon Sep 17 00:00:00 2001
From: Xiaoyu Min <jackmin@mellanox.com>
Date: Wed, 11 Sep 2019 16:46:15 +0800
Subject: [PATCH] net/mlx5: validate flow rule item order

[ upstream commit 906a2efae8da8507bab2d089c544d4fa4150a5fd ]

The Item order validation between L2 and L3 is missing, which leading to
the following flow rule is accepted:

  testpmd> flow create 0 ingress pattern ipv4 / eth / end actions drop /
           end

Only the outer L3 layer should check whether the L2 layer is present,
because the L3 layer could directly follow the tunnel layer
without L2 layer.

Meanwhile inner L2 layer should check whether there is inner L3 layer
before it.

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

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index f19b27ede..cf9cdcfe3 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1069,4 +1069,9 @@ mlx5_flow_validate_item_eth(const struct rte_flow_item *item,
 					  RTE_FLOW_ERROR_TYPE_ITEM, item,
 					  "multiple L2 layers not supported");
+	if (tunnel && (item_flags & MLX5_FLOW_LAYER_INNER_L3))
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ITEM, item,
+					  "inner L2 layer should not "
+					  "follow inner L3 layers");
 	if (!mask)
 		mask = &rte_flow_item_eth_mask;
@@ -1112,4 +1117,6 @@ mlx5_flow_validate_item_vlan(const struct rte_flow_item *item,
 					MLX5_FLOW_LAYER_OUTER_VLAN;
 
+	const uint64_t l2m = tunnel ? MLX5_FLOW_LAYER_INNER_L2 :
+				      MLX5_FLOW_LAYER_OUTER_L2;
 	if (item_flags & vlanm)
 		return rte_flow_error_set(error, EINVAL,
@@ -1120,4 +1127,8 @@ mlx5_flow_validate_item_vlan(const struct rte_flow_item *item,
 					  RTE_FLOW_ERROR_TYPE_ITEM, item,
 					  "L2 layer cannot follow L3/L4 layer");
+	else if ((item_flags & l2m) == 0)
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ITEM, item,
+					  "no L2 layer before VLAN");
 	if (!mask)
 		mask = &rte_flow_item_vlan_mask;
@@ -1186,4 +1197,8 @@ mlx5_flow_validate_item_ipv4(const struct rte_flow_item *item,
 					  RTE_FLOW_ERROR_TYPE_ITEM, item,
 					  "L3 cannot follow an L4 layer.");
+	else if (!tunnel && !(item_flags & MLX5_FLOW_LAYER_OUTER_L2))
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ITEM, item,
+					  "no L2 layer before IPV4");
 	if (!mask)
 		mask = &rte_flow_item_ipv4_mask;
@@ -1250,4 +1265,8 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item,
 					  RTE_FLOW_ERROR_TYPE_ITEM, item,
 					  "L3 cannot follow an L4 layer.");
+	else if (!tunnel && !(item_flags & MLX5_FLOW_LAYER_OUTER_L2))
+		return rte_flow_error_set(error, EINVAL,
+					  RTE_FLOW_ERROR_TYPE_ITEM, item,
+					  "no L2 layer before IPV6");
 	if (!mask)
 		mask = &rte_flow_item_ipv6_mask;
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:54.913024875 +0000
+++ 0055-net-mlx5-validate-flow-rule-item-order.patch	2019-12-03 17:29:51.778749370 +0000
@@ -1 +1 @@
-From 906a2efae8da8507bab2d089c544d4fa4150a5fd Mon Sep 17 00:00:00 2001
+From 16dfdb13c1e86e2643b2181f6b7dc1a966e6e460 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 906a2efae8da8507bab2d089c544d4fa4150a5fd ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 482f65b5d..578d00338 100644
+index f19b27ede..cf9cdcfe3 100644
@@ -32 +33 @@
-@@ -1225,4 +1225,9 @@ mlx5_flow_validate_item_eth(const struct rte_flow_item *item,
+@@ -1069,4 +1069,9 @@ mlx5_flow_validate_item_eth(const struct rte_flow_item *item,
@@ -42 +43 @@
-@@ -1271,4 +1276,6 @@ mlx5_flow_validate_item_vlan(const struct rte_flow_item *item,
+@@ -1112,4 +1117,6 @@ mlx5_flow_validate_item_vlan(const struct rte_flow_item *item,
@@ -49 +50 @@
-@@ -1279,4 +1286,8 @@ mlx5_flow_validate_item_vlan(const struct rte_flow_item *item,
+@@ -1120,4 +1127,8 @@ mlx5_flow_validate_item_vlan(const struct rte_flow_item *item,
@@ -58 +59 @@
-@@ -1391,4 +1402,8 @@ mlx5_flow_validate_item_ipv4(const struct rte_flow_item *item,
+@@ -1186,4 +1197,8 @@ mlx5_flow_validate_item_ipv4(const struct rte_flow_item *item,
@@ -60 +61 @@
- 					  "L3 cannot follow an NVGRE layer.");
+ 					  "L3 cannot follow an L4 layer.");
@@ -67 +68 @@
-@@ -1482,4 +1497,8 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item,
+@@ -1250,4 +1265,8 @@ mlx5_flow_validate_item_ipv6(const struct rte_flow_item *item,
@@ -69 +70 @@
- 					  "L3 cannot follow an NVGRE layer.");
+ 					  "L3 cannot follow an L4 layer.");


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

* [dpdk-stable] patch 'test/bonding: fix LSC related cases' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (53 preceding siblings ...)
  2019-12-03 18:27 ` [dpdk-stable] patch 'net/mlx5: validate flow rule item order' " Kevin Traynor
@ 2019-12-03 18:27 ` Kevin Traynor
  2019-12-03 18:27 ` [dpdk-stable] patch 'test/bonding: fix LSC timeout unit' " Kevin Traynor
                   ` (8 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:27 UTC (permalink / raw)
  To: Krzysztof Kanas; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/3cab7a4f6a9c0996cd51a9d22150aabfe350f5c5

Thanks.

Kevin.

---
From 3cab7a4f6a9c0996cd51a9d22150aabfe350f5c5 Mon Sep 17 00:00:00 2001
From: Krzysztof Kanas <kkanas@marvell.com>
Date: Fri, 23 Aug 2019 10:16:58 +0200
Subject: [PATCH] test/bonding: fix LSC related cases

[ upstream commit 88524d6b8b339278c95df3a0a894054c365daf13 ]

On rare situation test_link_bonding test case fail due to timespec
tv_nsec overflow, which causes pthread_cond_timedwait to return EINVAL
and test to fail.

Fixes: 76d29903f5f5 ("bond: support link status interrupt")

Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 test/test/test_link_bonding.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/test/test_link_bonding.c b/test/test/test_link_bonding.c
index 0438e76cc..11cc2c9b2 100644
--- a/test/test/test_link_bonding.c
+++ b/test/test/test_link_bonding.c
@@ -1160,4 +1160,9 @@ lsc_timeout(int wait_us)
 	ts.tv_nsec = tp.tv_usec * 1000;
 	ts.tv_nsec += wait_us * 1000;
+	/* Normalize tv_nsec to [0,999999999L] */
+	while (ts.tv_nsec > 1000000000L) {
+		ts.tv_nsec -= 1000000000L;
+		ts.tv_sec += 1;
+	}
 
 	pthread_mutex_lock(&mutex);
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:54.972297608 +0000
+++ 0056-test-bonding-fix-LSC-related-cases.patch	2019-12-03 17:29:51.782749287 +0000
@@ -1 +1 @@
-From 88524d6b8b339278c95df3a0a894054c365daf13 Mon Sep 17 00:00:00 2001
+From 3cab7a4f6a9c0996cd51a9d22150aabfe350f5c5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 88524d6b8b339278c95df3a0a894054c365daf13 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
- app/test/test_link_bonding.c | 5 +++++
+ test/test/test_link_bonding.c | 5 +++++
@@ -19,5 +20,5 @@
-diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c
-index a9b9d0c42..b5ce9dbb4 100644
---- a/app/test/test_link_bonding.c
-+++ b/app/test/test_link_bonding.c
-@@ -1203,4 +1203,9 @@ lsc_timeout(int wait_us)
+diff --git a/test/test/test_link_bonding.c b/test/test/test_link_bonding.c
+index 0438e76cc..11cc2c9b2 100644
+--- a/test/test/test_link_bonding.c
++++ b/test/test/test_link_bonding.c
+@@ -1160,4 +1160,9 @@ lsc_timeout(int wait_us)


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

* [dpdk-stable] patch 'test/bonding: fix LSC timeout unit' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (54 preceding siblings ...)
  2019-12-03 18:27 ` [dpdk-stable] patch 'test/bonding: fix LSC related cases' " Kevin Traynor
@ 2019-12-03 18:27 ` Kevin Traynor
  2019-12-03 18:27 ` [dpdk-stable] patch 'net/enic: fix probe for secondary process' " Kevin Traynor
                   ` (7 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:27 UTC (permalink / raw)
  To: Krzysztof Kanas; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/92322df07531db01847eb6fad9510d99e46bdcba

Thanks.

Kevin.

---
From 92322df07531db01847eb6fad9510d99e46bdcba Mon Sep 17 00:00:00 2001
From: Krzysztof Kanas <kkanas@marvell.com>
Date: Fri, 23 Aug 2019 10:16:59 +0200
Subject: [PATCH] test/bonding: fix LSC timeout unit

[ upstream commit 7de47c3c2377115ba5d37d3432c0b348a40572a9 ]

Fixes: 76d29903f5f5 ("bond: support link status interrupt")

Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 test/test/test_link_bonding.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/test/test_link_bonding.c b/test/test/test_link_bonding.c
index 11cc2c9b2..7a44de168 100644
--- a/test/test/test_link_bonding.c
+++ b/test/test/test_link_bonding.c
@@ -1126,5 +1126,5 @@ test_adding_slave_after_bonded_device_started(void)
 
 #define TEST_STATUS_INTERRUPT_SLAVE_COUNT	4
-#define TEST_LSC_WAIT_TIMEOUT_MS	500
+#define TEST_LSC_WAIT_TIMEOUT_US	500000
 
 int test_lsc_interrupt_count;
@@ -1219,5 +1219,5 @@ test_status_interrupt(void)
 			test_params->slave_port_ids[3], 0);
 
-	TEST_ASSERT(lsc_timeout(TEST_LSC_WAIT_TIMEOUT_MS) == 0,
+	TEST_ASSERT(lsc_timeout(TEST_LSC_WAIT_TIMEOUT_US) == 0,
 			"timed out waiting for interrupt");
 
@@ -1238,5 +1238,5 @@ test_status_interrupt(void)
 			test_params->slave_port_ids[0], 1);
 
-	TEST_ASSERT(lsc_timeout(TEST_LSC_WAIT_TIMEOUT_MS) == 0,
+	TEST_ASSERT(lsc_timeout(TEST_LSC_WAIT_TIMEOUT_US) == 0,
 			"timed out waiting for interrupt");
 
@@ -1252,5 +1252,5 @@ test_status_interrupt(void)
 			test_params->slave_port_ids[0], 1);
 
-	TEST_ASSERT(lsc_timeout(TEST_LSC_WAIT_TIMEOUT_MS) != 0,
+	TEST_ASSERT(lsc_timeout(TEST_LSC_WAIT_TIMEOUT_US) != 0,
 			"received unexpected interrupt");
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:55.037198356 +0000
+++ 0057-test-bonding-fix-LSC-timeout-unit.patch	2019-12-03 17:29:51.784749245 +0000
@@ -1 +1 @@
-From 7de47c3c2377115ba5d37d3432c0b348a40572a9 Mon Sep 17 00:00:00 2001
+From 92322df07531db01847eb6fad9510d99e46bdcba Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7de47c3c2377115ba5d37d3432c0b348a40572a9 ]
+
@@ -7 +8,0 @@
-Cc: stable@dpdk.org
@@ -12 +13 @@
- app/test/test_link_bonding.c | 8 ++++----
+ test/test/test_link_bonding.c | 8 ++++----
@@ -15,5 +16,5 @@
-diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c
-index b5ce9dbb4..3a46f943f 100644
---- a/app/test/test_link_bonding.c
-+++ b/app/test/test_link_bonding.c
-@@ -1169,5 +1169,5 @@ test_adding_slave_after_bonded_device_started(void)
+diff --git a/test/test/test_link_bonding.c b/test/test/test_link_bonding.c
+index 11cc2c9b2..7a44de168 100644
+--- a/test/test/test_link_bonding.c
++++ b/test/test/test_link_bonding.c
+@@ -1126,5 +1126,5 @@ test_adding_slave_after_bonded_device_started(void)
@@ -26 +27 @@
-@@ -1262,5 +1262,5 @@ test_status_interrupt(void)
+@@ -1219,5 +1219,5 @@ test_status_interrupt(void)
@@ -33 +34 @@
-@@ -1281,5 +1281,5 @@ test_status_interrupt(void)
+@@ -1238,5 +1238,5 @@ test_status_interrupt(void)
@@ -40 +41 @@
-@@ -1295,5 +1295,5 @@ test_status_interrupt(void)
+@@ -1252,5 +1252,5 @@ test_status_interrupt(void)


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

* [dpdk-stable] patch 'net/enic: fix probe for secondary process' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (55 preceding siblings ...)
  2019-12-03 18:27 ` [dpdk-stable] patch 'test/bonding: fix LSC timeout unit' " Kevin Traynor
@ 2019-12-03 18:27 ` Kevin Traynor
  2019-12-03 18:27 ` [dpdk-stable] patch 'net/enic: fix crash in " Kevin Traynor
                   ` (6 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:27 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: Dirk-Holger Lenz, John Daley, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/3ab013d34bafe780a9b31af9278b1dd72e53e67a

Thanks.

Kevin.

---
From 3ab013d34bafe780a9b31af9278b1dd72e53e67a Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim@cisco.com>
Date: Thu, 5 Sep 2019 23:50:19 -0700
Subject: [PATCH] net/enic: fix probe for secondary process

[ upstream commit e92a4b4148d3caadb5d3a8351fdf0fa3a2a709c2 ]

Only the primary process initializes the adapter private data and
rte_eth_dev_data. For secondary processes, do not touch them.

Secondary processes need to select the right Tx and Rx handlers. Pick
the same handlers that the primary process uses.

Fixes: fefed3d1e62c ("enic: new driver")

Reported-by: Dirk-Holger Lenz <dirk.lenz@ng4t.com>
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Tested-by: Dirk-Holger Lenz <dirk.lenz@ng4t.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic.h               |  5 ++++-
 drivers/net/enic/enic_ethdev.c        | 10 ++++++++--
 drivers/net/enic/enic_main.c          | 28 ++++++++++++++++++++-------
 drivers/net/enic/enic_rxtx_vec_avx2.c |  5 ++---
 4 files changed, 35 insertions(+), 13 deletions(-)

diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h
index 49831b00a..00a208728 100644
--- a/drivers/net/enic/enic.h
+++ b/drivers/net/enic/enic.h
@@ -137,4 +137,5 @@ struct enic {
 	uint8_t ig_vlan_rewrite_mode; /* devargs ig-vlan-rewrite */
 	uint16_t vxlan_port;  /* current vxlan port pushed to NIC */
+	int use_simple_tx_handler;
 
 	unsigned int flags;
@@ -332,5 +333,7 @@ uint16_t enic_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 int enic_set_mtu(struct enic *enic, uint16_t new_mtu);
 int enic_link_update(struct enic *enic);
-bool enic_use_vector_rx_handler(struct enic *enic);
+bool enic_use_vector_rx_handler(struct rte_eth_dev *eth_dev);
+void enic_pick_rx_handler(struct rte_eth_dev *eth_dev);
+void enic_pick_tx_handler(struct rte_eth_dev *eth_dev);
 void enic_fdir_info(struct enic *enic);
 void enic_fdir_info_get(struct enic *enic, struct rte_eth_fdir_info *stats);
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 996bb5542..67a96a483 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -1043,10 +1043,16 @@ static int eth_enicpmd_dev_init(struct rte_eth_dev *eth_dev)
 	ENICPMD_FUNC_TRACE();
 
-	enic->port_id = eth_dev->data->port_id;
-	enic->rte_dev = eth_dev;
 	eth_dev->dev_ops = &enicpmd_eth_dev_ops;
 	eth_dev->rx_pkt_burst = &enic_recv_pkts;
 	eth_dev->tx_pkt_burst = &enic_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &enic_prep_pkts;
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+		enic_pick_tx_handler(eth_dev);
+		enic_pick_rx_handler(eth_dev);
+		return 0;
+	}
+	/* Only the primary sets up adapter and other data in shared memory */
+	enic->port_id = eth_dev->data->port_id;
+	enic->rte_dev = eth_dev;
 
 	pdev = RTE_ETH_DEV_TO_PCI(eth_dev);
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 5fb5122da..a6c838bc2 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -519,12 +519,12 @@ static void enic_prep_wq_for_simple_tx(struct enic *enic, uint16_t queue_idx)
  */
 __rte_weak bool
-enic_use_vector_rx_handler(__rte_unused struct enic *enic)
+enic_use_vector_rx_handler(__rte_unused struct rte_eth_dev *eth_dev)
 {
 	return false;
 }
 
-static void pick_rx_handler(struct enic *enic)
+void enic_pick_rx_handler(struct rte_eth_dev *eth_dev)
 {
-	struct rte_eth_dev *eth_dev;
+	struct enic *enic = pmd_priv(eth_dev);
 
 	/*
@@ -534,6 +534,5 @@ static void pick_rx_handler(struct enic *enic)
 	 * 3. The default handler as a fallback.
 	 */
-	eth_dev = enic->rte_dev;
-	if (enic_use_vector_rx_handler(enic))
+	if (enic_use_vector_rx_handler(eth_dev))
 		return;
 	if (enic->rq_count > 0 && enic->rq[0].data_queue_enable == 0) {
@@ -546,4 +545,18 @@ static void pick_rx_handler(struct enic *enic)
 }
 
+/* Secondary process uses this to set the Tx handler */
+void enic_pick_tx_handler(struct rte_eth_dev *eth_dev)
+{
+	struct enic *enic = pmd_priv(eth_dev);
+
+	if (enic->use_simple_tx_handler) {
+		PMD_INIT_LOG(DEBUG, " use the simple tx handler");
+		eth_dev->tx_pkt_burst = &enic_simple_xmit_pkts;
+	} else {
+		PMD_INIT_LOG(DEBUG, " use the default tx handler");
+		eth_dev->tx_pkt_burst = &enic_xmit_pkts;
+	}
+}
+
 int enic_enable(struct enic *enic)
 {
@@ -623,4 +636,5 @@ int enic_enable(struct enic *enic)
 		for (index = 0; index < enic->wq_count; index++)
 			enic_prep_wq_for_simple_tx(enic, index);
+		enic->use_simple_tx_handler = 1;
 	} else {
 		PMD_INIT_LOG(DEBUG, " use the default tx handler");
@@ -628,5 +642,5 @@ int enic_enable(struct enic *enic)
 	}
 
-	pick_rx_handler(enic);
+	enic_pick_rx_handler(eth_dev);
 
 	for (index = 0; index < enic->wq_count; index++)
@@ -1601,5 +1615,5 @@ int enic_set_mtu(struct enic *enic, uint16_t new_mtu)
 	/* put back the real receive function */
 	rte_mb();
-	pick_rx_handler(enic);
+	enic_pick_rx_handler(eth_dev);
 	rte_mb();
 
diff --git a/drivers/net/enic/enic_rxtx_vec_avx2.c b/drivers/net/enic/enic_rxtx_vec_avx2.c
index d21854901..e4d4581cc 100644
--- a/drivers/net/enic/enic_rxtx_vec_avx2.c
+++ b/drivers/net/enic/enic_rxtx_vec_avx2.c
@@ -807,10 +807,9 @@ enic_noscatter_vec_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 
 bool
-enic_use_vector_rx_handler(struct enic *enic)
+enic_use_vector_rx_handler(struct rte_eth_dev *eth_dev)
 {
-	struct rte_eth_dev *eth_dev;
+	struct enic *enic = pmd_priv(eth_dev);
 	struct rte_fdir_conf *fconf;
 
-	eth_dev = enic->rte_dev;
 	/* User needs to request for the avx2 handler */
 	if (!enic->enable_avx2_rx)
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:55.109379272 +0000
+++ 0058-net-enic-fix-probe-for-secondary-process.patch	2019-12-03 17:29:51.788749162 +0000
@@ -1 +1 @@
-From e92a4b4148d3caadb5d3a8351fdf0fa3a2a709c2 Mon Sep 17 00:00:00 2001
+From 3ab013d34bafe780a9b31af9278b1dd72e53e67a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e92a4b4148d3caadb5d3a8351fdf0fa3a2a709c2 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 93d3cfcf6..681109ba9 100644
+index 49831b00a..00a208728 100644
@@ -36 +37 @@
-@@ -336,5 +337,7 @@ uint16_t enic_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -332,5 +333,7 @@ uint16_t enic_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -46 +47 @@
-index 5fa711852..fe18cf3a9 100644
+index 996bb5542..67a96a483 100644
@@ -49 +50 @@
-@@ -1228,10 +1228,16 @@ static int eth_enicpmd_dev_init(struct rte_eth_dev *eth_dev)
+@@ -1043,10 +1043,16 @@ static int eth_enicpmd_dev_init(struct rte_eth_dev *eth_dev)
@@ -66,2 +67,2 @@
- 	/* Let rte_eth_dev_close() release the port resources */
- 	eth_dev->data->dev_flags |= RTE_ETH_DEV_CLOSE_REMOVE;
+ 
+ 	pdev = RTE_ETH_DEV_TO_PCI(eth_dev);
@@ -69 +70 @@
-index e507df1f6..30c7b1c86 100644
+index 5fb5122da..a6c838bc2 100644
@@ -72 +73 @@
-@@ -526,12 +526,12 @@ static void enic_prep_wq_for_simple_tx(struct enic *enic, uint16_t queue_idx)
+@@ -519,12 +519,12 @@ static void enic_prep_wq_for_simple_tx(struct enic *enic, uint16_t queue_idx)
@@ -88 +89 @@
-@@ -541,6 +541,5 @@ static void pick_rx_handler(struct enic *enic)
+@@ -534,6 +534,5 @@ static void pick_rx_handler(struct enic *enic)
@@ -96 +97 @@
-@@ -553,4 +552,18 @@ static void pick_rx_handler(struct enic *enic)
+@@ -546,4 +545,18 @@ static void pick_rx_handler(struct enic *enic)
@@ -105 +106 @@
-+		ENICPMD_LOG(DEBUG, " use the simple tx handler");
++		PMD_INIT_LOG(DEBUG, " use the simple tx handler");
@@ -108 +109 @@
-+		ENICPMD_LOG(DEBUG, " use the default tx handler");
++		PMD_INIT_LOG(DEBUG, " use the default tx handler");
@@ -115 +116 @@
-@@ -630,4 +643,5 @@ int enic_enable(struct enic *enic)
+@@ -623,4 +636,5 @@ int enic_enable(struct enic *enic)
@@ -120,2 +121,2 @@
- 		ENICPMD_LOG(DEBUG, " use the default tx handler");
-@@ -635,5 +649,5 @@ int enic_enable(struct enic *enic)
+ 		PMD_INIT_LOG(DEBUG, " use the default tx handler");
+@@ -628,5 +642,5 @@ int enic_enable(struct enic *enic)
@@ -128 +129 @@
-@@ -1606,5 +1620,5 @@ int enic_set_mtu(struct enic *enic, uint16_t new_mtu)
+@@ -1601,5 +1615,5 @@ int enic_set_mtu(struct enic *enic, uint16_t new_mtu)
@@ -136 +137 @@
-index 517d4092f..36d4d0dea 100644
+index d21854901..e4d4581cc 100644


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

* [dpdk-stable] patch 'net/enic: fix crash in secondary process' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (56 preceding siblings ...)
  2019-12-03 18:27 ` [dpdk-stable] patch 'net/enic: fix probe for secondary process' " Kevin Traynor
@ 2019-12-03 18:27 ` Kevin Traynor
  2019-12-03 18:27 ` [dpdk-stable] patch 'net/tap: fix blocked Rx packets' " Kevin Traynor
                   ` (5 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:27 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: Dirk-Holger Lenz, John Daley, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/180bbf4a7e74d5fcc53787aefa0fbee6d1ecc324

Thanks.

Kevin.

---
From 180bbf4a7e74d5fcc53787aefa0fbee6d1ecc324 Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim@cisco.com>
Date: Thu, 5 Sep 2019 23:50:20 -0700
Subject: [PATCH] net/enic: fix crash in secondary process

[ upstream commit c655c547f92d1cf4bfd525a690660f5b399bdceb ]

Both primary and secondary processes may call the queue start/stop,
link update handlers. These functions use the rte_eth_dev pointer
cached in the adapter private data (struct enic). But, this pointer is
valid only in the primary process, as rte_eth_dev addresses may differ
in different processes. Using that cached pointer in secondary
processes leads to a crash.

For the link update handler (enic_link_update), use the rte_eth_dev
pointer passed down from the rte layer as it is valid in the current
process. For the queue start/stop handlers (enic_start_wq and
friends), cache the rte_eth_dev_data pointer in the adapter private
data, and use that. rte_eth_dev_data is in shared memory and its
address is same across processes.

Fixes: 837e68ae94a2 ("net/enic: fix queue stop and start")
Fixes: cf8d9826b7be ("net/enic: extract code for checking link status")

Reported-by: Dirk-Holger Lenz <dirk.lenz@ng4t.com>
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Tested-by: Dirk-Holger Lenz <dirk.lenz@ng4t.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic.h        |  3 ++-
 drivers/net/enic/enic_ethdev.c |  5 ++---
 drivers/net/enic/enic_main.c   | 22 +++++++++++-----------
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h
index 00a208728..fc34d1012 100644
--- a/drivers/net/enic/enic.h
+++ b/drivers/net/enic/enic.h
@@ -113,4 +113,5 @@ struct enic {
 	bool overlay_offload;
 	struct rte_eth_dev *rte_dev;
+	struct rte_eth_dev_data *dev_data;
 	struct enic_fdir fdir;
 	char bdf_name[ENICPMD_BDF_LENGTH];
@@ -332,5 +333,5 @@ uint16_t enic_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			uint16_t nb_pkts);
 int enic_set_mtu(struct enic *enic, uint16_t new_mtu);
-int enic_link_update(struct enic *enic);
+int enic_link_update(struct rte_eth_dev *eth_dev);
 bool enic_use_vector_rx_handler(struct rte_eth_dev *eth_dev);
 void enic_pick_rx_handler(struct rte_eth_dev *eth_dev);
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 67a96a483..ed6dd70c8 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -433,8 +433,6 @@ static int enicpmd_dev_link_update(struct rte_eth_dev *eth_dev,
 	__rte_unused int wait_to_complete)
 {
-	struct enic *enic = pmd_priv(eth_dev);
-
 	ENICPMD_FUNC_TRACE();
-	return enic_link_update(enic);
+	return enic_link_update(eth_dev);
 }
 
@@ -1055,4 +1053,5 @@ static int eth_enicpmd_dev_init(struct rte_eth_dev *eth_dev)
 	enic->port_id = eth_dev->data->port_id;
 	enic->rte_dev = eth_dev;
+	enic->dev_data = eth_dev->data;
 
 	pdev = RTE_ETH_DEV_TO_PCI(eth_dev);
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index a6c838bc2..c3dc3dee1 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -418,7 +418,7 @@ enic_free_consistent(void *priv,
 }
 
-int enic_link_update(struct enic *enic)
+int enic_link_update(struct rte_eth_dev *eth_dev)
 {
-	struct rte_eth_dev *eth_dev = enic->rte_dev;
+	struct enic *enic = pmd_priv(eth_dev);
 	struct rte_eth_link link;
 
@@ -439,5 +439,5 @@ enic_intr_handler(void *arg)
 	vnic_intr_return_all_credits(&enic->intr[ENICPMD_LSC_INTR_OFFSET]);
 
-	enic_link_update(enic);
+	enic_link_update(dev);
 	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	enic_log_q_error(enic);
@@ -732,12 +732,12 @@ void enic_free_rq(void *rxq)
 void enic_start_wq(struct enic *enic, uint16_t queue_idx)
 {
-	struct rte_eth_dev *eth_dev = enic->rte_dev;
+	struct rte_eth_dev_data *data = enic->dev_data;
 	vnic_wq_enable(&enic->wq[queue_idx]);
-	eth_dev->data->tx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STARTED;
+	data->tx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STARTED;
 }
 
 int enic_stop_wq(struct enic *enic, uint16_t queue_idx)
 {
-	struct rte_eth_dev *eth_dev = enic->rte_dev;
+	struct rte_eth_dev_data *data = enic->dev_data;
 	int ret;
 
@@ -746,5 +746,5 @@ int enic_stop_wq(struct enic *enic, uint16_t queue_idx)
 		return ret;
 
-	eth_dev->data->tx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STOPPED;
+	data->tx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STOPPED;
 	return 0;
 }
@@ -752,9 +752,9 @@ int enic_stop_wq(struct enic *enic, uint16_t queue_idx)
 void enic_start_rq(struct enic *enic, uint16_t queue_idx)
 {
+	struct rte_eth_dev_data *data = enic->dev_data;
 	struct vnic_rq *rq_sop;
 	struct vnic_rq *rq_data;
 	rq_sop = &enic->rq[enic_rte_rq_idx_to_sop_idx(queue_idx)];
 	rq_data = &enic->rq[rq_sop->data_queue_idx];
-	struct rte_eth_dev *eth_dev = enic->rte_dev;
 
 	if (rq_data->in_use) {
@@ -765,11 +765,11 @@ void enic_start_rq(struct enic *enic, uint16_t queue_idx)
 	vnic_rq_enable(rq_sop);
 	enic_initial_post_rx(enic, rq_sop);
-	eth_dev->data->rx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STARTED;
+	data->rx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STARTED;
 }
 
 int enic_stop_rq(struct enic *enic, uint16_t queue_idx)
 {
+	struct rte_eth_dev_data *data = enic->dev_data;
 	int ret1 = 0, ret2 = 0;
-	struct rte_eth_dev *eth_dev = enic->rte_dev;
 	struct vnic_rq *rq_sop;
 	struct vnic_rq *rq_data;
@@ -787,5 +787,5 @@ int enic_stop_rq(struct enic *enic, uint16_t queue_idx)
 		return ret1;
 
-	eth_dev->data->rx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STOPPED;
+	data->rx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STOPPED;
 	return 0;
 }
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:55.166482602 +0000
+++ 0059-net-enic-fix-crash-in-secondary-process.patch	2019-12-03 17:29:51.791749099 +0000
@@ -1 +1 @@
-From c655c547f92d1cf4bfd525a690660f5b399bdceb Mon Sep 17 00:00:00 2001
+From 180bbf4a7e74d5fcc53787aefa0fbee6d1ecc324 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c655c547f92d1cf4bfd525a690660f5b399bdceb ]
+
@@ -22 +23,0 @@
-Cc: stable@dpdk.org
@@ -35 +36 @@
-index 681109ba9..fac8d57fa 100644
+index 00a208728..fc34d1012 100644
@@ -44 +45 @@
-@@ -336,5 +337,5 @@ uint16_t enic_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -332,5 +333,5 @@ uint16_t enic_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
@@ -52 +53 @@
-index fe18cf3a9..562401ae7 100644
+index 67a96a483..ed6dd70c8 100644
@@ -55 +56 @@
-@@ -461,8 +461,6 @@ static int enicpmd_dev_link_update(struct rte_eth_dev *eth_dev,
+@@ -433,8 +433,6 @@ static int enicpmd_dev_link_update(struct rte_eth_dev *eth_dev,
@@ -65 +66 @@
-@@ -1240,4 +1238,5 @@ static int eth_enicpmd_dev_init(struct rte_eth_dev *eth_dev)
+@@ -1055,4 +1053,5 @@ static int eth_enicpmd_dev_init(struct rte_eth_dev *eth_dev)
@@ -69,2 +70,2 @@
- 	/* Let rte_eth_dev_close() release the port resources */
- 	eth_dev->data->dev_flags |= RTE_ETH_DEV_CLOSE_REMOVE;
+ 
+ 	pdev = RTE_ETH_DEV_TO_PCI(eth_dev);
@@ -72 +73 @@
-index 30c7b1c86..ce89b8154 100644
+index a6c838bc2..c3dc3dee1 100644
@@ -75 +76 @@
-@@ -425,7 +425,7 @@ enic_free_consistent(void *priv,
+@@ -418,7 +418,7 @@ enic_free_consistent(void *priv,
@@ -85 +86 @@
-@@ -446,5 +446,5 @@ enic_intr_handler(void *arg)
+@@ -439,5 +439,5 @@ enic_intr_handler(void *arg)
@@ -92 +93 @@
-@@ -739,12 +739,12 @@ void enic_free_rq(void *rxq)
+@@ -732,12 +732,12 @@ void enic_free_rq(void *rxq)
@@ -108 +109 @@
-@@ -753,5 +753,5 @@ int enic_stop_wq(struct enic *enic, uint16_t queue_idx)
+@@ -746,5 +746,5 @@ int enic_stop_wq(struct enic *enic, uint16_t queue_idx)
@@ -115 +116 @@
-@@ -759,9 +759,9 @@ int enic_stop_wq(struct enic *enic, uint16_t queue_idx)
+@@ -752,9 +752,9 @@ int enic_stop_wq(struct enic *enic, uint16_t queue_idx)
@@ -126 +127 @@
-@@ -772,11 +772,11 @@ void enic_start_rq(struct enic *enic, uint16_t queue_idx)
+@@ -765,11 +765,11 @@ void enic_start_rq(struct enic *enic, uint16_t queue_idx)
@@ -140 +141 @@
-@@ -794,5 +794,5 @@ int enic_stop_rq(struct enic *enic, uint16_t queue_idx)
+@@ -787,5 +787,5 @@ int enic_stop_rq(struct enic *enic, uint16_t queue_idx)


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

* [dpdk-stable] patch 'net/tap: fix blocked Rx packets' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (57 preceding siblings ...)
  2019-12-03 18:27 ` [dpdk-stable] patch 'net/enic: fix crash in " Kevin Traynor
@ 2019-12-03 18:27 ` Kevin Traynor
  2019-12-03 18:27 ` [dpdk-stable] patch 'net/bnxt: return error if setting link up fails' " Kevin Traynor
                   ` (4 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:27 UTC (permalink / raw)
  To: Marcin Smoczynski
  Cc: Mariusz Drost, Konstantin Ananyev, Keith Wiles, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/c67950b05fa9104ae2855cd1a7531a76dbdde508

Thanks.

Kevin.

---
From c67950b05fa9104ae2855cd1a7531a76dbdde508 Mon Sep 17 00:00:00 2001
From: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Date: Mon, 23 Sep 2019 15:22:47 +0200
Subject: [PATCH] net/tap: fix blocked Rx packets

[ upstream commit d070c3413164e3f8f7fa4c4325d7df50a8275f39 ]

When OS sends more packets than are being read with a single
'rte_eth_rx_burst' call, rx packets are getting stucked in the tap pmd
and are unable to receive, because trigger_seen is getting updated
and consecutive calls are not getting any packets.

Do not update trigger_seen unless less than a max number of packets were
received allowing next call to receive the rest.

Remove unnecessary compiler barrier.

Fixes: a0d8e807d9de ("net/tap: add Rx trigger")

Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
Tested-by: Mariusz Drost <mariuszx.drost@intel.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Reviewed-by: Keith Wiles <keith.wiles@intel.com>
---
 drivers/net/tap/rte_eth_tap.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 37bd25011..775619331 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -356,8 +356,6 @@ pmd_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	if (trigger == rxq->trigger_seen)
 		return 0;
-	if (trigger)
-		rxq->trigger_seen = trigger;
+
 	process_private = rte_eth_devices[rxq->in_port].process_private;
-	rte_compiler_barrier();
 	for (num_rx = 0; num_rx < nb_pkts; ) {
 		struct rte_mbuf *mbuf = rxq->pool;
@@ -436,4 +434,7 @@ end:
 	rxq->stats.ibytes += num_rx_bytes;
 
+	if (trigger && num_rx < nb_pkts)
+		rxq->trigger_seen = trigger;
+
 	return num_rx;
 }
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:55.219294926 +0000
+++ 0060-net-tap-fix-blocked-Rx-packets.patch	2019-12-03 17:29:51.793749058 +0000
@@ -1 +1 @@
-From d070c3413164e3f8f7fa4c4325d7df50a8275f39 Mon Sep 17 00:00:00 2001
+From c67950b05fa9104ae2855cd1a7531a76dbdde508 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d070c3413164e3f8f7fa4c4325d7df50a8275f39 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 922371c29..a13d8d50d 100644
+index 37bd25011..775619331 100644
@@ -31 +32 @@
-@@ -354,8 +354,6 @@ pmd_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -356,8 +356,6 @@ pmd_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -41 +42 @@
-@@ -434,4 +432,7 @@ end:
+@@ -436,4 +434,7 @@ end:


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

* [dpdk-stable] patch 'net/bnxt: return error if setting link up fails' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (58 preceding siblings ...)
  2019-12-03 18:27 ` [dpdk-stable] patch 'net/tap: fix blocked Rx packets' " Kevin Traynor
@ 2019-12-03 18:27 ` Kevin Traynor
  2019-12-03 18:27 ` [dpdk-stable] patch 'net/bnxt: remove unnecessary variable assignment' " Kevin Traynor
                   ` (3 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:27 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/36941cb94f64702683b03d96173b50406807445a

Thanks.

Kevin.

---
From 36941cb94f64702683b03d96173b50406807445a Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 9 Oct 2019 18:41:44 -0700
Subject: [PATCH] net/bnxt: return error if setting link up fails

[ upstream commit acf2f2a451c0328e175f8d53ad19f3c160773697 ]

Currently bnxt driver does not return error in case setting link up fails.

Fixes: 5c206086feaa ("net/bnxt: add link state operations")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 76228ae8d..4c02df4ac 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -672,5 +672,5 @@ static int bnxt_dev_set_link_up_op(struct rte_eth_dev *eth_dev)
 
 	bnxt_print_link_info(eth_dev);
-	return 0;
+	return rc;
 }
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:55.277991646 +0000
+++ 0061-net-bnxt-return-error-if-setting-link-up-fails.patch	2019-12-03 17:29:51.795749016 +0000
@@ -1 +1 @@
-From acf2f2a451c0328e175f8d53ad19f3c160773697 Mon Sep 17 00:00:00 2001
+From 36941cb94f64702683b03d96173b50406807445a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit acf2f2a451c0328e175f8d53ad19f3c160773697 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 294a9505f..4b3958647 100644
+index 76228ae8d..4c02df4ac 100644
@@ -21 +22 @@
-@@ -931,5 +931,5 @@ static int bnxt_dev_set_link_up_op(struct rte_eth_dev *eth_dev)
+@@ -672,5 +672,5 @@ static int bnxt_dev_set_link_up_op(struct rte_eth_dev *eth_dev)


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

* [dpdk-stable] patch 'net/bnxt: remove unnecessary variable assignment' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (59 preceding siblings ...)
  2019-12-03 18:27 ` [dpdk-stable] patch 'net/bnxt: return error if setting link up fails' " Kevin Traynor
@ 2019-12-03 18:27 ` Kevin Traynor
  2019-12-03 18:27 ` [dpdk-stable] patch 'net/qede/base: fix page index for PBL chains' " Kevin Traynor
                   ` (2 subsequent siblings)
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:27 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Santoshkumar Karanappa Rastapur, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/ae66d17b2e4bc379f8c291a39e62f10d9c391251

Thanks.

Kevin.

---
From ae66d17b2e4bc379f8c291a39e62f10d9c391251 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 9 Oct 2019 18:41:53 -0700
Subject: [PATCH] net/bnxt: remove unnecessary variable assignment

[ upstream commit cd30e6a7239ce48c8b618c87b10ee5db094d9853 ]

There is no need to assign return value to a temporary variable.
Instead return error directly in case of failure.

Fixes: 1fe427fd08ee ("net/bnxt: support enable/disable interrupt")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Santoshkumar Karanappa Rastapur <santosh.rastapur@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxq.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index df80ce22f..fb5328adc 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -370,8 +370,7 @@ bnxt_rx_queue_intr_enable_op(struct rte_eth_dev *eth_dev, uint16_t queue_id)
 	if (eth_dev->data->rx_queues) {
 		rxq = eth_dev->data->rx_queues[queue_id];
-		if (!rxq) {
-			rc = -EINVAL;
-			return rc;
-		}
+		if (!rxq)
+			return -EINVAL;
+
 		cpr = rxq->cp_ring;
 		B_CP_DB_REARM(cpr, cpr->cp_raw_cons);
@@ -389,8 +388,7 @@ bnxt_rx_queue_intr_disable_op(struct rte_eth_dev *eth_dev, uint16_t queue_id)
 	if (eth_dev->data->rx_queues) {
 		rxq = eth_dev->data->rx_queues[queue_id];
-		if (!rxq) {
-			rc = -EINVAL;
-			return rc;
-		}
+		if (!rxq)
+			return -EINVAL;
+
 		cpr = rxq->cp_ring;
 		B_CP_DB_DISARM(cpr);
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:55.336349037 +0000
+++ 0062-net-bnxt-remove-unnecessary-variable-assignment.patch	2019-12-03 17:29:51.796748995 +0000
@@ -1 +1 @@
-From cd30e6a7239ce48c8b618c87b10ee5db094d9853 Mon Sep 17 00:00:00 2001
+From ae66d17b2e4bc379f8c291a39e62f10d9c391251 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cd30e6a7239ce48c8b618c87b10ee5db094d9853 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index a46f96827..e1ed360ef 100644
+index df80ce22f..fb5328adc 100644
@@ -23 +24 @@
-@@ -385,8 +385,7 @@ bnxt_rx_queue_intr_enable_op(struct rte_eth_dev *eth_dev, uint16_t queue_id)
+@@ -370,8 +370,7 @@ bnxt_rx_queue_intr_enable_op(struct rte_eth_dev *eth_dev, uint16_t queue_id)
@@ -35 +36 @@
-@@ -409,8 +408,7 @@ bnxt_rx_queue_intr_disable_op(struct rte_eth_dev *eth_dev, uint16_t queue_id)
+@@ -389,8 +388,7 @@ bnxt_rx_queue_intr_disable_op(struct rte_eth_dev *eth_dev, uint16_t queue_id)


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

* [dpdk-stable] patch 'net/qede/base: fix page index for PBL chains' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (60 preceding siblings ...)
  2019-12-03 18:27 ` [dpdk-stable] patch 'net/bnxt: remove unnecessary variable assignment' " Kevin Traynor
@ 2019-12-03 18:27 ` Kevin Traynor
  2019-12-03 18:27 ` [dpdk-stable] patch 'net/bnxt: fix dereference before null check' " Kevin Traynor
  2019-12-03 18:27 ` [dpdk-stable] patch 'net/bnxt: cleanup comments' " Kevin Traynor
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:27 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/ca9e7fab8cbd768a945ea6993c4551f63fe7f6c8

Thanks.

Kevin.

---
From ca9e7fab8cbd768a945ea6993c4551f63fe7f6c8 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rmody@marvell.com>
Date: Sun, 6 Oct 2019 13:14:01 -0700
Subject: [PATCH] net/qede/base: fix page index for PBL chains

[ upstream commit 766d68ac2d116f5a08de0b8667939408ce362c44 ]

ecore_chain_set_prod/cons() sets the wrong page index in chains with
non-power of 2 page count. Fix ecore_chain_set_prod/cons() for PBL
chains with non power of 2 page count.
Calculate the right page index according to current indexes.

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

Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
 drivers/net/qede/base/ecore_chain.h | 84 ++++++++++++++++++++---------
 1 file changed, 58 insertions(+), 26 deletions(-)

diff --git a/drivers/net/qede/base/ecore_chain.h b/drivers/net/qede/base/ecore_chain.h
index 6d0382d3a..c69920be5 100644
--- a/drivers/net/qede/base/ecore_chain.h
+++ b/drivers/net/qede/base/ecore_chain.h
@@ -87,6 +87,6 @@ struct ecore_chain {
 
 		union {
-			struct ecore_chain_pbl_u16	u16;
-			struct ecore_chain_pbl_u32	u32;
+			struct ecore_chain_pbl_u16	pbl_u16;
+			struct ecore_chain_pbl_u32	pbl_u32;
 		} c;
 	} pbl;
@@ -406,5 +406,5 @@ static OSAL_INLINE void *ecore_chain_produce(struct ecore_chain *p_chain)
 		     p_chain->elem_per_page_mask) == p_chain->next_page_mask) {
 			p_prod_idx = &p_chain->u.chain16.prod_idx;
-			p_prod_page_idx = &p_chain->pbl.c.u16.prod_page_idx;
+			p_prod_page_idx = &p_chain->pbl.c.pbl_u16.prod_page_idx;
 			ecore_chain_advance_page(p_chain, &p_chain->p_prod_elem,
 						 p_prod_idx, p_prod_page_idx);
@@ -415,5 +415,5 @@ static OSAL_INLINE void *ecore_chain_produce(struct ecore_chain *p_chain)
 		     p_chain->elem_per_page_mask) == p_chain->next_page_mask) {
 			p_prod_idx = &p_chain->u.chain32.prod_idx;
-			p_prod_page_idx = &p_chain->pbl.c.u32.prod_page_idx;
+			p_prod_page_idx = &p_chain->pbl.c.pbl_u32.prod_page_idx;
 			ecore_chain_advance_page(p_chain, &p_chain->p_prod_elem,
 						 p_prod_idx, p_prod_page_idx);
@@ -480,5 +480,5 @@ static OSAL_INLINE void *ecore_chain_consume(struct ecore_chain *p_chain)
 		     p_chain->elem_per_page_mask) == p_chain->next_page_mask) {
 			p_cons_idx = &p_chain->u.chain16.cons_idx;
-			p_cons_page_idx = &p_chain->pbl.c.u16.cons_page_idx;
+			p_cons_page_idx = &p_chain->pbl.c.pbl_u16.cons_page_idx;
 			ecore_chain_advance_page(p_chain, &p_chain->p_cons_elem,
 						 p_cons_idx, p_cons_page_idx);
@@ -489,5 +489,5 @@ static OSAL_INLINE void *ecore_chain_consume(struct ecore_chain *p_chain)
 		     p_chain->elem_per_page_mask) == p_chain->next_page_mask) {
 			p_cons_idx = &p_chain->u.chain32.cons_idx;
-			p_cons_page_idx = &p_chain->pbl.c.u32.cons_page_idx;
+			p_cons_page_idx = &p_chain->pbl.c.pbl_u32.cons_page_idx;
 			ecore_chain_advance_page(p_chain, &p_chain->p_cons_elem,
 						 p_cons_idx, p_cons_page_idx);
@@ -533,9 +533,9 @@ static OSAL_INLINE void ecore_chain_reset(struct ecore_chain *p_chain)
 
 		if (is_chain_u16(p_chain)) {
-			p_chain->pbl.c.u16.prod_page_idx = (u16)reset_val;
-			p_chain->pbl.c.u16.cons_page_idx = (u16)reset_val;
+			p_chain->pbl.c.pbl_u16.prod_page_idx = (u16)reset_val;
+			p_chain->pbl.c.pbl_u16.cons_page_idx = (u16)reset_val;
 		} else {
-			p_chain->pbl.c.u32.prod_page_idx = reset_val;
-			p_chain->pbl.c.u32.cons_page_idx = reset_val;
+			p_chain->pbl.c.pbl_u32.prod_page_idx = reset_val;
+			p_chain->pbl.c.pbl_u32.cons_page_idx = reset_val;
 		}
 	}
@@ -726,16 +726,32 @@ static OSAL_INLINE void ecore_chain_set_prod(struct ecore_chain *p_chain,
 {
 	if (p_chain->mode == ECORE_CHAIN_MODE_PBL) {
-		/* Use "prod_idx-1" since ecore_chain_produce() advances the
-		 * page index before the producer index when getting to
-		 * "next_page_mask".
+		u32 cur_prod, page_mask, page_cnt, page_diff;
+
+		cur_prod = is_chain_u16(p_chain) ? p_chain->u.chain16.prod_idx
+						 : p_chain->u.chain32.prod_idx;
+
+		/* Assume that number of elements in a page is power of 2 */
+		page_mask = ~p_chain->elem_per_page_mask;
+
+		/* Use "cur_prod - 1" and "prod_idx - 1" since producer index
+		 * reaches the first element of next page before the page index
+		 * is incremented. See ecore_chain_produce().
+		 * Index wrap around is not a problem because the difference
+		 * between current and given producer indexes is always
+		 * positive and lower than the chain's capacity.
 		 */
-		u32 elem_idx =
-			(prod_idx - 1 + p_chain->capacity) % p_chain->capacity;
-		u32 page_idx = elem_idx / p_chain->elem_per_page;
+		page_diff = (((cur_prod - 1) & page_mask) -
+			     ((prod_idx - 1) & page_mask)) /
+			    p_chain->elem_per_page;
 
+		page_cnt = ecore_chain_get_page_cnt(p_chain);
 		if (is_chain_u16(p_chain))
-			p_chain->pbl.c.u16.prod_page_idx = (u16)page_idx;
+			p_chain->pbl.c.pbl_u16.prod_page_idx =
+				(p_chain->pbl.c.pbl_u16.prod_page_idx -
+				 page_diff + page_cnt) % page_cnt;
 		else
-			p_chain->pbl.c.u32.prod_page_idx = page_idx;
+			p_chain->pbl.c.pbl_u32.prod_page_idx =
+				(p_chain->pbl.c.pbl_u32.prod_page_idx -
+				 page_diff + page_cnt) % page_cnt;
 	}
 
@@ -757,16 +773,32 @@ static OSAL_INLINE void ecore_chain_set_cons(struct ecore_chain *p_chain,
 {
 	if (p_chain->mode == ECORE_CHAIN_MODE_PBL) {
-		/* Use "cons_idx-1" since ecore_chain_consume() advances the
-		 * page index before the consumer index when getting to
-		 * "next_page_mask".
+		u32 cur_cons, page_mask, page_cnt, page_diff;
+
+		cur_cons = is_chain_u16(p_chain) ? p_chain->u.chain16.cons_idx
+						 : p_chain->u.chain32.cons_idx;
+
+		/* Assume that number of elements in a page is power of 2 */
+		page_mask = ~p_chain->elem_per_page_mask;
+
+		/* Use "cur_cons - 1" and "cons_idx - 1" since consumer index
+		 * reaches the first element of next page before the page index
+		 * is incremented. See ecore_chain_consume().
+		 * Index wrap around is not a problem because the difference
+		 * between current and given consumer indexes is always
+		 * positive and lower than the chain's capacity.
 		 */
-		u32 elem_idx =
-			(cons_idx - 1 + p_chain->capacity) % p_chain->capacity;
-		u32 page_idx = elem_idx / p_chain->elem_per_page;
+		page_diff = (((cur_cons - 1) & page_mask) -
+			     ((cons_idx - 1) & page_mask)) /
+			    p_chain->elem_per_page;
 
+		page_cnt = ecore_chain_get_page_cnt(p_chain);
 		if (is_chain_u16(p_chain))
-			p_chain->pbl.c.u16.cons_page_idx = (u16)page_idx;
+			p_chain->pbl.c.pbl_u16.cons_page_idx =
+				(p_chain->pbl.c.pbl_u16.cons_page_idx -
+				 page_diff + page_cnt) % page_cnt;
 		else
-			p_chain->pbl.c.u32.cons_page_idx = page_idx;
+			p_chain->pbl.c.pbl_u32.cons_page_idx =
+				(p_chain->pbl.c.pbl_u32.cons_page_idx -
+				 page_diff + page_cnt) % page_cnt;
 	}
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:55.387004259 +0000
+++ 0063-net-qede-base-fix-page-index-for-PBL-chains.patch	2019-12-03 17:29:51.797748974 +0000
@@ -1 +1 @@
-From 766d68ac2d116f5a08de0b8667939408ce362c44 Mon Sep 17 00:00:00 2001
+From ca9e7fab8cbd768a945ea6993c4551f63fe7f6c8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 766d68ac2d116f5a08de0b8667939408ce362c44 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org


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

* [dpdk-stable] patch 'net/bnxt: fix dereference before null check' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (61 preceding siblings ...)
  2019-12-03 18:27 ` [dpdk-stable] patch 'net/qede/base: fix page index for PBL chains' " Kevin Traynor
@ 2019-12-03 18:27 ` Kevin Traynor
  2019-12-03 18:27 ` [dpdk-stable] patch 'net/bnxt: cleanup comments' " Kevin Traynor
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:27 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/b661bfd5a01e3f28e60faa825e6ea5b599a3c980

Thanks.

Kevin.

---
From b661bfd5a01e3f28e60faa825e6ea5b599a3c980 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 9 Oct 2019 14:16:17 +0530
Subject: [PATCH] net/bnxt: fix dereference before null check

[ upstream commit 5e592e8d4091da4ad1faadd9c3719bd4c245cca4 ]

This patch fixes potential null pointer access in bnxt_alloc_ag_data().
Fix to return an error if null check is true.

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

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_rxr.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 88ea94214..918a7ae87 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -62,15 +62,19 @@ static inline int bnxt_alloc_ag_data(struct bnxt_rx_queue *rxq,
 	struct rte_mbuf *mbuf;
 
-	mbuf = __bnxt_alloc_rx_data(rxq->mb_pool);
-	if (!mbuf) {
-		rte_atomic64_inc(&rxq->rx_mbuf_alloc_fail);
-		return -ENOMEM;
-	}
-
-	if (rxbd == NULL)
+	if (rxbd == NULL) {
 		PMD_DRV_LOG(ERR, "Jumbo Frame. rxbd is NULL\n");
-	if (rx_buf == NULL)
+		return -EINVAL;
+	}
+
+	if (rx_buf == NULL) {
 		PMD_DRV_LOG(ERR, "Jumbo Frame. rx_buf is NULL\n");
+		return -EINVAL;
+	}
 
+	mbuf = __bnxt_alloc_rx_data(rxq->mb_pool);
+	if (!mbuf) {
+		rte_atomic64_inc(&rxq->rx_mbuf_alloc_fail);
+		return -ENOMEM;
+	}
 
 	rx_buf->mbuf = mbuf;
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:55.445418677 +0000
+++ 0064-net-bnxt-fix-dereference-before-null-check.patch	2019-12-03 17:29:51.798748954 +0000
@@ -1 +1 @@
-From 5e592e8d4091da4ad1faadd9c3719bd4c245cca4 Mon Sep 17 00:00:00 2001
+From b661bfd5a01e3f28e60faa825e6ea5b599a3c980 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5e592e8d4091da4ad1faadd9c3719bd4c245cca4 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index f0f9b020b..03dae571b 100644
+index 88ea94214..918a7ae87 100644
@@ -23 +24 @@
-@@ -64,15 +64,19 @@ static inline int bnxt_alloc_ag_data(struct bnxt_rx_queue *rxq,
+@@ -62,15 +62,19 @@ static inline int bnxt_alloc_ag_data(struct bnxt_rx_queue *rxq,


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

* [dpdk-stable] patch 'net/bnxt: cleanup comments' has been queued to LTS release 18.11.6
  2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
                   ` (62 preceding siblings ...)
  2019-12-03 18:27 ` [dpdk-stable] patch 'net/bnxt: fix dereference before null check' " Kevin Traynor
@ 2019-12-03 18:27 ` Kevin Traynor
  63 siblings, 0 replies; 65+ messages in thread
From: Kevin Traynor @ 2019-12-03 18:27 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. 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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/ff20bd33b868212daf014c66a37d275e12ac5189

Thanks.

Kevin.

---
From ff20bd33b868212daf014c66a37d275e12ac5189 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 10 Oct 2019 14:14:23 +0530
Subject: [PATCH] net/bnxt: cleanup comments

[ upstream commit aa1fbf6bf74f26c2946909a0ab453d7de28a8e41 ]

- updated one comment for more readability and understanding
- fixed typo in comments
- moved a comment to right place
- removed one out-of-date comment
- removed few commented code

Fixes: f2a768d4d186 ("net/bnxt: add completion ring")

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_cpr.c    |  2 --
 drivers/net/bnxt/bnxt_filter.c |  1 -
 drivers/net/bnxt/bnxt_hwrm.c   | 27 +++++++++------------------
 3 files changed, 9 insertions(+), 21 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index 0fd6e51e5..ff8fa04b4 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -22,6 +22,4 @@ void bnxt_handle_async_event(struct bnxt *bp,
 	uint16_t event_id = rte_le_to_cpu_16(async_cmp->event_id);
 
-	/* TODO: HWRM async events are not defined yet */
-	/* Needs to handle: link events, error events, etc. */
 	switch (event_id) {
 	case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE:
diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c
index f43fe0db0..ca0070852 100644
--- a/drivers/net/bnxt/bnxt_filter.c
+++ b/drivers/net/bnxt/bnxt_filter.c
@@ -83,5 +83,4 @@ void bnxt_free_all_filters(struct bnxt *bp)
 	unsigned int i;
 
-//	for (i = 0; i < MAX_FF_POOLS; i++) {
 	for (i = 0; i < bp->nr_vnics; i++) {
 		vnic = &bp->vnic_info[i];
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 1bd8d3d9f..74f046c29 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -65,7 +65,7 @@ static int page_roundup(size_t size)
 /*
  * HWRM Functions (sent to HWRM)
- * These are named bnxt_hwrm_*() and return -1 if bnxt_hwrm_send_message()
- * fails (ie: a timeout), and a positive non-zero HWRM error code if the HWRM
- * command was failed by the ChiMP.
+ * These are named bnxt_hwrm_*() and return 0 on success or -110 if the
+ * HWRM command times out, or a negative error code if the HWRM
+ * command was failed by the FW.
  */
 
@@ -151,9 +151,9 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
 
 /*
- * HWRM_PREP() should be used to prepare *ALL* HWRM commands.  It grabs the
+ * HWRM_PREP() should be used to prepare *ALL* HWRM commands. It grabs the
  * spinlock, and does initial processing.
  *
  * HWRM_CHECK_RESULT() returns errors on failure and may not be used.  It
- * releases the spinlock only if it returns.  If the regular int return codes
+ * releases the spinlock only if it returns. If the regular int return codes
  * are not used by the function, HWRM_CHECK_RESULT() should not be used
  * directly, rather it should be copied and modified to suit the function.
@@ -465,5 +465,4 @@ static int bnxt_hwrm_ptp_qcfg(struct bnxt *bp)
 	struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
 
-/*	if (bp->hwrm_spec_code < 0x10801 || ptp)  TBD  */
 	if (ptp)
 		return 0;
@@ -1800,8 +1799,4 @@ int bnxt_hwrm_func_clr_stats(struct bnxt *bp, uint16_t fid)
 }
 
-/*
- * HWRM utility functions
- */
-
 int bnxt_clear_all_hwrm_stat_ctxs(struct bnxt *bp)
 {
@@ -1995,4 +1990,8 @@ int bnxt_alloc_all_hwrm_ring_grps(struct bnxt *bp)
 }
 
+/*
+ * HWRM utility functions
+ */
+
 void bnxt_free_hwrm_resources(struct bnxt *bp)
 {
@@ -2043,6 +2042,4 @@ int bnxt_clear_hwrm_vnic_filters(struct bnxt *bp, struct bnxt_vnic_info *vnic)
 			rc = bnxt_hwrm_clear_l2_filter(bp, filter);
 		STAILQ_REMOVE(&vnic->filter, filter, bnxt_filter_info, next);
-		//if (rc)
-			//break;
 	}
 	return rc;
@@ -2068,6 +2065,4 @@ bnxt_clear_hwrm_vnic_flows(struct bnxt *bp, struct bnxt_vnic_info *vnic)
 		STAILQ_REMOVE(&vnic->flow_list, flow, rte_flow, next);
 		rte_free(flow);
-		//if (rc)
-			//break;
 	}
 	return rc;
@@ -3809,8 +3804,4 @@ int bnxt_hwrm_set_ntuple_filter(struct bnxt *bp,
 		memcpy(req.src_macaddr, filter->src_macaddr,
 		       ETHER_ADDR_LEN);
-	//if (enables &
-	    //HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_MACADDR)
-		//memcpy(req.dst_macaddr, filter->dst_macaddr,
-		       //ETHER_ADDR_LEN);
 	if (enables &
 	    HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_ETHERTYPE)
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:55.499988921 +0000
+++ 0065-net-bnxt-cleanup-comments.patch	2019-12-03 17:29:51.803748849 +0000
@@ -1 +1 @@
-From aa1fbf6bf74f26c2946909a0ab453d7de28a8e41 Mon Sep 17 00:00:00 2001
+From ff20bd33b868212daf014c66a37d275e12ac5189 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit aa1fbf6bf74f26c2946909a0ab453d7de28a8e41 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21,3 +22,2 @@
- drivers/net/bnxt/bnxt_flow.c   |  7 -------
- drivers/net/bnxt/bnxt_hwrm.c   | 28 +++++++++-------------------
- 4 files changed, 9 insertions(+), 29 deletions(-)
+ drivers/net/bnxt/bnxt_hwrm.c   | 27 +++++++++------------------
+ 3 files changed, 9 insertions(+), 21 deletions(-)
@@ -26 +26 @@
-index 118cf034d..e6f30fecb 100644
+index 0fd6e51e5..ff8fa04b4 100644
@@ -29,2 +29,2 @@
-@@ -59,6 +59,4 @@ void bnxt_handle_async_event(struct bnxt *bp,
- 	uint32_t event_data;
+@@ -22,6 +22,4 @@ void bnxt_handle_async_event(struct bnxt *bp,
+ 	uint16_t event_id = rte_le_to_cpu_16(async_cmp->event_id);
@@ -37 +37 @@
-index e95d47d29..8120b3916 100644
+index f43fe0db0..ca0070852 100644
@@ -46,21 +45,0 @@
-diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
-index 5aeb00140..85d23540f 100644
---- a/drivers/net/bnxt/bnxt_flow.c
-+++ b/drivers/net/bnxt/bnxt_flow.c
-@@ -1088,8 +1088,4 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev,
- 			goto use_vnic;
- 
--		//if (!rxq ||
--		    //bp->vnic_info[0].fw_grp_ids[act_q->index] !=
--		    //INVALID_HW_RING_ID ||
--		    //!rxq->rx_deferred_start) {
- 		if (!rxq ||
- 		    bp->vnic_info[0].fw_grp_ids[act_q->index] !=
-@@ -1321,7 +1317,4 @@ use_vnic:
- 			rxq = bp->rx_queues[rss->queue[i]];
- 
--			//if (bp->vnic_info[0].fw_grp_ids[rss->queue[i]] !=
--			    //INVALID_HW_RING_ID ||
--			    //!rxq->rx_deferred_start) {
- 			if (bp->vnic_info[0].fw_grp_ids[rss->queue[i]] !=
- 			    INVALID_HW_RING_ID) {
@@ -68 +47 @@
-index 5b430b941..1a1ea1bde 100644
+index 1bd8d3d9f..74f046c29 100644
@@ -71 +50 @@
-@@ -75,7 +75,7 @@ static void bnxt_hwrm_set_pg_attr(struct bnxt_ring_mem_info *rmem,
+@@ -65,7 +65,7 @@ static int page_roundup(size_t size)
@@ -82 +61 @@
-@@ -177,9 +177,9 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
+@@ -151,9 +151,9 @@ static int bnxt_hwrm_send_message(struct bnxt *bp, void *msg,
@@ -94 +73 @@
-@@ -519,5 +519,4 @@ static int bnxt_hwrm_ptp_qcfg(struct bnxt *bp)
+@@ -465,5 +465,4 @@ static int bnxt_hwrm_ptp_qcfg(struct bnxt *bp)
@@ -100 +79 @@
-@@ -2162,8 +2161,4 @@ int bnxt_hwrm_func_clr_stats(struct bnxt *bp, uint16_t fid)
+@@ -1800,8 +1799,4 @@ int bnxt_hwrm_func_clr_stats(struct bnxt *bp, uint16_t fid)
@@ -109 +88 @@
-@@ -2384,4 +2379,8 @@ int bnxt_alloc_all_hwrm_ring_grps(struct bnxt *bp)
+@@ -1995,4 +1990,8 @@ int bnxt_alloc_all_hwrm_ring_grps(struct bnxt *bp)
@@ -118 +97,2 @@
-@@ -2433,6 +2432,4 @@ int bnxt_clear_hwrm_vnic_filters(struct bnxt *bp, struct bnxt_vnic_info *vnic)
+@@ -2043,6 +2042,4 @@ int bnxt_clear_hwrm_vnic_filters(struct bnxt *bp, struct bnxt_vnic_info *vnic)
+ 			rc = bnxt_hwrm_clear_l2_filter(bp, filter);
@@ -120 +99,0 @@
- 		bnxt_free_filter(bp, filter);
@@ -125 +104 @@
-@@ -2459,6 +2456,4 @@ bnxt_clear_hwrm_vnic_flows(struct bnxt *bp, struct bnxt_vnic_info *vnic)
+@@ -2068,6 +2065,4 @@ bnxt_clear_hwrm_vnic_flows(struct bnxt *bp, struct bnxt_vnic_info *vnic)
@@ -132,7 +111 @@
-@@ -2515,5 +2510,4 @@ void bnxt_free_all_hwrm_resources(struct bnxt *bp)
- 		struct bnxt_vnic_info *vnic = &bp->vnic_info[i];
- 
--		// If the VNIC ID is invalid we are not currently using the VNIC
- 		if (vnic->fw_vnic_id == INVALID_HW_RING_ID)
- 			continue;
-@@ -4227,8 +4221,4 @@ int bnxt_hwrm_set_ntuple_filter(struct bnxt *bp,
+@@ -3809,8 +3804,4 @@ int bnxt_hwrm_set_ntuple_filter(struct bnxt *bp,
@@ -140 +113 @@
- 		       RTE_ETHER_ADDR_LEN);
+ 		       ETHER_ADDR_LEN);
@@ -144 +117 @@
--		       //RTE_ETHER_ADDR_LEN);
+-		       //ETHER_ADDR_LEN);


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

end of thread, other threads:[~2019-12-03 18:29 UTC | newest]

Thread overview: 65+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-03 18:26 [dpdk-stable] patch 'ethdev: remove redundant device info cleanup before get' has been queued to LTS release 18.11.6 Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/sfc: fix missing notification on link status change' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'vhost: fix slave request fd leak' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/bonding: fix link speed update in broadcast mode' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'app/testpmd: fix crash on port reset' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'vhost: forbid reallocation when running' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'vhost: fix vring address handling during live migration' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'vhost: protect vring access done by application' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/vhost: fix redundant queue state event' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'vhost: fix vring memory partially mapped' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/virtio: fix Rx stats with vectorized functions' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/virtio: get all pending Rx packets in vectorized paths' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/mlx5: fix BlueField VF type recognition' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/cxgbe: add prefix to global functions' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/cxgbe: fix null access when allocating CLIP entry' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/cxgbe: fix slot allocation for IPv6 flows' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/cxgbe: fix parsing VLAN ID rewrite action' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/cxgbe: fix prefetch for non-coalesced Tx packets' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/cxgbe: avoid polling link status before device start' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/ixgbe: fix X553 speed capability' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/i40e: set speed to undefined for default case' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/bonding: fix slave id types' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/bonding: fix OOB access in other aggregator modes' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/null: fix multi-process Rx and Tx' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/bnxt: remove duplicate barrier' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/bnxt: replace memory barrier for doorbell response' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/bnxt: enforce IO barrier for doorbell command' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/bnxt: fix flow steering' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/bnxt: fix accessing variable before null check' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/szedata2: fix dependency " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/bnxt: fix multicast filter programming' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/qede: limit Rx ring index read for debug' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/atlantic: add FW mailbox guard mutex' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'net/cxgbe: fix races on flow API operations' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'event/sw: fix xstats reset value' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'event/dpaa2: fix default queue configuration' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'build: avoid overlinking' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'vfio: fix leak with multiprocess' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'service: use log for error messages' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'test/mbuf: fix forged mbuf in clone test' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'eal/ppc: fix 64-bit atomic exchange operation' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'devtools: fix cleanup of checkpatch temporary file' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'event/dpaa: fix number of supported atomic flows' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'test/lpm: fix measured cycles for delete' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'eal/linux: restore specific hugepage ordering for ppc' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'eal: remove dead code on NUMA node detection' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'crypto/dpaa_sec: fix auth-cipher check for AEAD' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'cryptodev: fix checks related to device id' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'doc: fix typo in l2fwd-crypto guide' " Kevin Traynor
2019-12-03 18:26 ` [dpdk-stable] patch 'crypto/qat: fix null auth when using VFIO' " Kevin Traynor
2019-12-03 18:27 ` [dpdk-stable] patch 'crypto/qat: fix AES CMAC mininum digest size' " Kevin Traynor
2019-12-03 18:27 ` [dpdk-stable] patch 'lib/distributor: fix deadlock on aarch64' " Kevin Traynor
2019-12-03 18:27 ` [dpdk-stable] patch 'test/distributor: fix spurious failure' " Kevin Traynor
2019-12-03 18:27 ` [dpdk-stable] patch 'bus/pci: remove useless link dependency on ethdev' " Kevin Traynor
2019-12-03 18:27 ` [dpdk-stable] patch 'net/mlx5: validate flow rule item order' " Kevin Traynor
2019-12-03 18:27 ` [dpdk-stable] patch 'test/bonding: fix LSC related cases' " Kevin Traynor
2019-12-03 18:27 ` [dpdk-stable] patch 'test/bonding: fix LSC timeout unit' " Kevin Traynor
2019-12-03 18:27 ` [dpdk-stable] patch 'net/enic: fix probe for secondary process' " Kevin Traynor
2019-12-03 18:27 ` [dpdk-stable] patch 'net/enic: fix crash in " Kevin Traynor
2019-12-03 18:27 ` [dpdk-stable] patch 'net/tap: fix blocked Rx packets' " Kevin Traynor
2019-12-03 18:27 ` [dpdk-stable] patch 'net/bnxt: return error if setting link up fails' " Kevin Traynor
2019-12-03 18:27 ` [dpdk-stable] patch 'net/bnxt: remove unnecessary variable assignment' " Kevin Traynor
2019-12-03 18:27 ` [dpdk-stable] patch 'net/qede/base: fix page index for PBL chains' " Kevin Traynor
2019-12-03 18:27 ` [dpdk-stable] patch 'net/bnxt: fix dereference before null check' " Kevin Traynor
2019-12-03 18:27 ` [dpdk-stable] patch 'net/bnxt: cleanup comments' " Kevin Traynor

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).