patches for DPDK stable branches
 help / color / Atom feed
* [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11
@ 2020-11-18 16:34 Kevin Traynor
  2020-11-18 16:34 ` [dpdk-stable] patch 'net/netvsc: replace compiler builtin overflow check' " Kevin Traynor
                   ` (70 more replies)
  0 siblings, 71 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:34 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Nan Chen, Long Li, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/1f6666d4fc36792e4cf1892a9fa6bcb95d720dd9

Thanks.

Kevin.

---
From 1f6666d4fc36792e4cf1892a9fa6bcb95d720dd9 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 10 Aug 2020 19:33:14 -0700
Subject: [PATCH] net/netvsc: check for overflow on packet info from host

The data from the host is trusted but checked by the driver.
One check that is missing is that the packet offset and length
might cause wraparound.

Cc: stable@dpdk.org

Reported-by: Nan Chen <whutchennan@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Long Li <longli@microsoft.com>
(cherry picked from commit 7838d3a6ae7a4ae8b3e994efe0d7d9f814941841)
---
 drivers/net/netvsc/hn_rxtx.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index cc8bb7ed95..fba08b166b 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -621,5 +621,6 @@ static void hn_rndis_rx_data(struct hn_rx_queue *rxq,
 			     void *data, uint32_t dlen)
 {
-	unsigned int data_off, data_len, pktinfo_off, pktinfo_len;
+	unsigned int data_off, data_len, total_len;
+	unsigned int pktinfo_off, pktinfo_len;
 	const struct rndis_packet_msg *pkt = data;
 	struct hn_rxinfo info = {
@@ -666,5 +667,6 @@ static void hn_rndis_rx_data(struct hn_rx_queue *rxq,
 	}
 
-	if (unlikely(data_off + data_len > pkt->len))
+	if (__builtin_add_overflow(data_off, data_len, &total_len) ||
+	    total_len > pkt->len)
 		goto error;
 
-- 
2.26.2


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

* [dpdk-stable] patch 'net/netvsc: replace compiler builtin overflow check' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
@ 2020-11-18 16:34 ` " Kevin Traynor
  2020-11-18 16:34 ` [dpdk-stable] patch 'eventdev: check allocation in Tx adapter' " Kevin Traynor
                   ` (69 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:34 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Raslan Darawsheh, Stephen Hemminger, Raslan Darawsheh,
	Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/2acc31435034fb83e02a99109ed367857ca5aff1

Thanks.

Kevin.

---
From 2acc31435034fb83e02a99109ed367857ca5aff1 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 8 Sep 2020 11:06:42 +0100
Subject: [PATCH] net/netvsc: replace compiler builtin overflow check

'__builtin_add_overflow' added to gcc in version 5, earlier versions
causing build error, like gcc 4.8.5 in RHEL7.

Replaced compiler builtin check with arithmetic check.

Fixes: 7838d3a6ae7a ("net/netvsc: check for overflow on packet info from host")

Reported-by: Raslan Darawsheh <rasland@mellanox.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Raslan Darawsheh <rasland@nvidia.com>
Tested-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
(cherry picked from commit d73543b5f46db489c7b6fd2dfc8f905ec7304310)
---
 drivers/net/netvsc/hn_rxtx.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index fba08b166b..a70bac53d3 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -621,5 +621,5 @@ static void hn_rndis_rx_data(struct hn_rx_queue *rxq,
 			     void *data, uint32_t dlen)
 {
-	unsigned int data_off, data_len, total_len;
+	unsigned int data_off, data_len;
 	unsigned int pktinfo_off, pktinfo_len;
 	const struct rndis_packet_msg *pkt = data;
@@ -667,6 +667,6 @@ static void hn_rndis_rx_data(struct hn_rx_queue *rxq,
 	}
 
-	if (__builtin_add_overflow(data_off, data_len, &total_len) ||
-	    total_len > pkt->len)
+	/* overflow check */
+	if (data_len > data_len + data_off || data_len + data_off > pkt->len)
 		goto error;
 
-- 
2.26.2


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

* [dpdk-stable] patch 'eventdev: check allocation in Tx adapter' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
  2020-11-18 16:34 ` [dpdk-stable] patch 'net/netvsc: replace compiler builtin overflow check' " Kevin Traynor
@ 2020-11-18 16:34 ` " Kevin Traynor
  2020-11-18 16:34 ` [dpdk-stable] patch 'event/dpaa2: fix dereference before null check' " Kevin Traynor
                   ` (68 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:34 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Nikhil Rao, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/e7e94ae2f890618a9b9260fa1e7ccfa6ae8aaa26

Thanks.

Kevin.

---
From e7e94ae2f890618a9b9260fa1e7ccfa6ae8aaa26 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Mon, 27 Jul 2020 22:03:14 +0800
Subject: [PATCH] eventdev: check allocation in Tx adapter

[ upstream commit e3eebdced05c471327353a773640fec929cb298b ]

The function rte_zmalloc() could return NULL, the return value
need to be checked.

Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
---
 lib/librte_eventdev/rte_event_eth_tx_adapter.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
index 67216a3058..c30fe1b025 100644
--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
@@ -734,4 +734,6 @@ txa_service_queue_add(uint8_t id,
 		qdone = rte_zmalloc(txa->mem_name,
 				nb_queues * sizeof(*qdone), 0);
+		if (qdone == NULL)
+			return -ENOMEM;
 		j = 0;
 		for (i = 0; i < nb_queues; i++) {
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.053559975 +0000
+++ 0003-eventdev-check-allocation-in-Tx-adapter.patch	2020-11-18 16:33:37.896215041 +0000
@@ -1 +1 @@
-From e3eebdced05c471327353a773640fec929cb298b Mon Sep 17 00:00:00 2001
+From e7e94ae2f890618a9b9260fa1e7ccfa6ae8aaa26 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e3eebdced05c471327353a773640fec929cb298b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index bb21dc4075..86287b4e66 100644
+index 67216a3058..c30fe1b025 100644
@@ -22 +23 @@
-@@ -735,4 +735,6 @@ txa_service_queue_add(uint8_t id,
+@@ -734,4 +734,6 @@ txa_service_queue_add(uint8_t id,


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

* [dpdk-stable] patch 'event/dpaa2: fix dereference before null check' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
  2020-11-18 16:34 ` [dpdk-stable] patch 'net/netvsc: replace compiler builtin overflow check' " Kevin Traynor
  2020-11-18 16:34 ` [dpdk-stable] patch 'eventdev: check allocation in Tx adapter' " Kevin Traynor
@ 2020-11-18 16:34 ` " Kevin Traynor
  2020-11-18 16:34 ` [dpdk-stable] patch 'eventdev: fix adapter leak in error path' " Kevin Traynor
                   ` (67 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:34 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Nipun Gupta, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/09979638d692146300b1626c39142506c56cc2a0

Thanks.

Kevin.

---
From 09979638d692146300b1626c39142506c56cc2a0 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Wed, 26 Aug 2020 21:07:40 +0800
Subject: [PATCH] event/dpaa2: fix dereference before null check

[ upstream commit db5e0e7aea5e256c43489a3b272a4318b6ddca9f ]

Coverity flags that 'portal' variable is used before
it's checked for NULL. This patch fixes this issue.

Coverity issue: 323516
Fixes: 4ab57b042e7c ("event/dpaa2: affine portal at runtime during I/O")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
---
 drivers/event/dpaa2/dpaa2_eventdev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index f647430b26..1cf9e659e3 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -554,12 +554,12 @@ dpaa2_eventdev_port_release(void *port)
 	EVENTDEV_INIT_FUNC_TRACE();
 
+	if (portal == NULL)
+		return;
+
 	/* TODO: Cleanup is required when ports are in linked state. */
 	if (portal->is_port_linked)
 		DPAA2_EVENTDEV_WARN("Event port must be unlinked before release");
 
-	if (portal)
-		rte_free(portal);
-
-	portal = NULL;
+	rte_free(portal);
 }
 
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.071515697 +0000
+++ 0004-event-dpaa2-fix-dereference-before-null-check.patch	2020-11-18 16:33:37.898215042 +0000
@@ -1 +1 @@
-From db5e0e7aea5e256c43489a3b272a4318b6ddca9f Mon Sep 17 00:00:00 2001
+From 09979638d692146300b1626c39142506c56cc2a0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit db5e0e7aea5e256c43489a3b272a4318b6ddca9f ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 3ae4441ee3..f7383ca738 100644
+index f647430b26..1cf9e659e3 100644
@@ -23 +24 @@
-@@ -570,12 +570,12 @@ dpaa2_eventdev_port_release(void *port)
+@@ -554,12 +554,12 @@ dpaa2_eventdev_port_release(void *port)


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

* [dpdk-stable] patch 'eventdev: fix adapter leak in error path' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (2 preceding siblings ...)
  2020-11-18 16:34 ` [dpdk-stable] patch 'event/dpaa2: fix dereference before null check' " Kevin Traynor
@ 2020-11-18 16:34 ` " Kevin Traynor
  2020-11-18 16:34 ` [dpdk-stable] patch 'test/event: fix function arguments for crypto adapter' " Kevin Traynor
                   ` (66 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:34 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/f7e487f1bc95b74acf81cc4ccdfcc58acf73c38e

Thanks.

Kevin.

---
From f7e487f1bc95b74acf81cc4ccdfcc58acf73c38e Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 29 Sep 2020 21:46:33 +0800
Subject: [PATCH] eventdev: fix adapter leak in error path

[ upstream commit b7b09dab5e9507541222d1d2ce86f55e9eb32b9e ]

In rte_event_crypto_adapter_create_ext() allocated memory for
adapter, we should free it when error happens, otherwise it
will lead to memory leak.

Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 lib/librte_eventdev/rte_event_crypto_adapter.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_eventdev/rte_event_crypto_adapter.c b/lib/librte_eventdev/rte_event_crypto_adapter.c
index 5faf3c900c..7e48bc619f 100644
--- a/lib/librte_eventdev/rte_event_crypto_adapter.c
+++ b/lib/librte_eventdev/rte_event_crypto_adapter.c
@@ -241,4 +241,5 @@ rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id,
 		RTE_EDEV_LOG_ERR("Failed to get info for eventdev %d: %s!",
 				 dev_id, dev_info.driver_name);
+		rte_free(adapter);
 		return ret;
 	}
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.087948812 +0000
+++ 0005-eventdev-fix-adapter-leak-in-error-path.patch	2020-11-18 16:33:37.899215043 +0000
@@ -1 +1 @@
-From b7b09dab5e9507541222d1d2ce86f55e9eb32b9e Mon Sep 17 00:00:00 2001
+From f7e487f1bc95b74acf81cc4ccdfcc58acf73c38e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b7b09dab5e9507541222d1d2ce86f55e9eb32b9e ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 8f25933163..b04312128a 100644
+index 5faf3c900c..7e48bc619f 100644
@@ -23 +24 @@
-@@ -242,4 +242,5 @@ rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id,
+@@ -241,4 +241,5 @@ rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id,


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

* [dpdk-stable] patch 'test/event: fix function arguments for crypto adapter' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (3 preceding siblings ...)
  2020-11-18 16:34 ` [dpdk-stable] patch 'eventdev: fix adapter leak in error path' " Kevin Traynor
@ 2020-11-18 16:34 ` " Kevin Traynor
  2020-11-18 16:34 ` [dpdk-stable] patch 'eal/x86: fix memcpy AVX-512 enablement' " Kevin Traynor
                   ` (65 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:34 UTC (permalink / raw)
  To: Ankur Dwivedi; +Cc: Abhinandan Gujjar, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/e79d221ec489178780db9559f87996f9175df768

Thanks.

Kevin.

---
From e79d221ec489178780db9559f87996f9175df768 Mon Sep 17 00:00:00 2001
From: Ankur Dwivedi <adwivedi@marvell.com>
Date: Thu, 8 Oct 2020 18:22:33 +0530
Subject: [PATCH] test/event: fix function arguments for crypto adapter

[ upstream commit 45eb85e9bff1c03cf72fb2ff9722757b64d47735 ]

The arguments passed to rte_event_crypto_adapter_caps_get() and
rte_event_crypto_adapter_create() are incorrect.

In the rte_event_crypto_adapter_caps_get(), event device id should
be the first argument and cryptodev id should be the second argument.
In the rte_event_crypto_adapter_create(), the event device id should
be the second argument.

Fixes: 3c2c535ecfc0 ("test: add event crypto adapter auto-test")

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
 test/test/test_event_crypto_adapter.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/test/test/test_event_crypto_adapter.c b/test/test/test_event_crypto_adapter.c
index de258c3462..24894fedf0 100644
--- a/test/test/test_event_crypto_adapter.c
+++ b/test/test/test_event_crypto_adapter.c
@@ -201,6 +201,6 @@ test_op_forward_mode(uint8_t session_less)
 				&cipher_xform, params.session_mpool);
 
-		ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID,
-							evdev, &cap);
+		ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID,
+							&cap);
 		TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n");
 
@@ -288,5 +288,5 @@ test_sessionless_with_op_forward_mode(void)
 	int ret;
 
-	ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, evdev, &cap);
+	ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, &cap);
 	TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n");
 
@@ -308,5 +308,5 @@ test_session_with_op_forward_mode(void)
 	int ret;
 
-	ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, evdev, &cap);
+	ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, &cap);
 	TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n");
 
@@ -385,6 +385,6 @@ test_op_new_mode(uint8_t session_less)
 		TEST_ASSERT_NOT_NULL(sess, "Session creation failed\n");
 
-		ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID,
-							evdev, &cap);
+		ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID,
+							&cap);
 		TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n");
 
@@ -433,5 +433,5 @@ test_sessionless_with_op_new_mode(void)
 	int ret;
 
-	ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, evdev, &cap);
+	ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, &cap);
 	TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n");
 
@@ -455,5 +455,5 @@ test_session_with_op_new_mode(void)
 	int ret;
 
-	ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, evdev, &cap);
+	ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, &cap);
 	TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n");
 
@@ -664,5 +664,5 @@ test_crypto_adapter_create(void)
 	/* Create adapter with default port creation callback */
 	ret = rte_event_crypto_adapter_create(TEST_ADAPTER_ID,
-					      TEST_CDEV_ID,
+					      evdev,
 					      &conf, 0);
 	TEST_ASSERT_SUCCESS(ret, "Failed to create event crypto adapter\n");
@@ -677,5 +677,5 @@ test_crypto_adapter_qp_add_del(void)
 	int ret;
 
-	ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, evdev, &cap);
+	ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, &cap);
 	TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n");
 
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.104484615 +0000
+++ 0006-test-event-fix-function-arguments-for-crypto-adapter.patch	2020-11-18 16:33:37.901215044 +0000
@@ -1 +1 @@
-From 45eb85e9bff1c03cf72fb2ff9722757b64d47735 Mon Sep 17 00:00:00 2001
+From e79d221ec489178780db9559f87996f9175df768 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 45eb85e9bff1c03cf72fb2ff9722757b64d47735 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
- app/test/test_event_crypto_adapter.c | 20 ++++++++++----------
+ test/test/test_event_crypto_adapter.c | 20 ++++++++++----------
@@ -23,6 +24,6 @@
-diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
-index db9d75d3ff..37bcbecd47 100644
---- a/app/test/test_event_crypto_adapter.c
-+++ b/app/test/test_event_crypto_adapter.c
-@@ -202,6 +202,6 @@ test_op_forward_mode(uint8_t session_less)
- 		TEST_ASSERT_SUCCESS(ret, "Failed to init session\n");
+diff --git a/test/test/test_event_crypto_adapter.c b/test/test/test_event_crypto_adapter.c
+index de258c3462..24894fedf0 100644
+--- a/test/test/test_event_crypto_adapter.c
++++ b/test/test/test_event_crypto_adapter.c
+@@ -201,6 +201,6 @@ test_op_forward_mode(uint8_t session_less)
+ 				&cipher_xform, params.session_mpool);
@@ -36 +37 @@
-@@ -289,5 +289,5 @@ test_sessionless_with_op_forward_mode(void)
+@@ -288,5 +288,5 @@ test_sessionless_with_op_forward_mode(void)
@@ -43 +44 @@
-@@ -314,5 +314,5 @@ test_session_with_op_forward_mode(void)
+@@ -308,5 +308,5 @@ test_session_with_op_forward_mode(void)
@@ -50 +51 @@
-@@ -395,6 +395,6 @@ test_op_new_mode(uint8_t session_less)
+@@ -385,6 +385,6 @@ test_op_new_mode(uint8_t session_less)
@@ -59 +60 @@
-@@ -445,5 +445,5 @@ test_sessionless_with_op_new_mode(void)
+@@ -433,5 +433,5 @@ test_sessionless_with_op_new_mode(void)
@@ -66 +67 @@
-@@ -471,5 +471,5 @@ test_session_with_op_new_mode(void)
+@@ -455,5 +455,5 @@ test_session_with_op_new_mode(void)
@@ -73 +74 @@
-@@ -693,5 +693,5 @@ test_crypto_adapter_create(void)
+@@ -664,5 +664,5 @@ test_crypto_adapter_create(void)
@@ -80 +81 @@
-@@ -706,5 +706,5 @@ test_crypto_adapter_qp_add_del(void)
+@@ -677,5 +677,5 @@ test_crypto_adapter_qp_add_del(void)


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

* [dpdk-stable] patch 'eal/x86: fix memcpy AVX-512 enablement' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (4 preceding siblings ...)
  2020-11-18 16:34 ` [dpdk-stable] patch 'test/event: fix function arguments for crypto adapter' " Kevin Traynor
@ 2020-11-18 16:34 ` " Kevin Traynor
  2020-11-18 16:34 ` [dpdk-stable] patch 'vhost: fix virtio-net header length with packed ring' " Kevin Traynor
                   ` (64 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:34 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Yingya Han, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/e4a8858adfb35ebaa9b31242a88a7ce0dd6635ea

Thanks.

Kevin.

---
From e4a8858adfb35ebaa9b31242a88a7ce0dd6635ea Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 12 Oct 2020 15:51:48 +0100
Subject: [PATCH] eal/x86: fix memcpy AVX-512 enablement

[ upstream commit e8a83681f458d95d197bd37208fed3c3900def03 ]

When testing on some x86 platforms, code compiled with meson was observed
running at a different power-license level to that compiled with make. This
is due to the fact that meson auto-detects the instruction sets available
on the system and enabled AVX512 rte_memcpy when AVX512 was available,
while on make, a build time AVX-512 flag needed to be explicitly set to
enable that AVX512 rte_memcpy code path.

In the absence of runtime path selection for rte_memcpy - which is
complicated by it being a static inline function in a header file - we can
fix this behaviour regression by similarly having a build-time option which
must be set to enable the AVX-512 memcpy path.

Fixes: a25a650be5f0 ("build: add infrastructure for meson and ninja builds")
Fixes: 3e1bb55fd6ef ("build/x86: add SSE flags")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Yingya Han <yingyax.han@intel.com>
---
 lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 2 +-
 lib/librte_eal/common/include/generic/rte_memcpy.h  | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
index 9c67232df9..d01832fa15 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
@@ -46,5 +46,5 @@ static __rte_always_inline void *
 rte_memcpy(void *dst, const void *src, size_t n);
 
-#ifdef RTE_MACHINE_CPUFLAG_AVX512F
+#if defined RTE_MACHINE_CPUFLAG_AVX512F && defined RTE_MEMCPY_AVX512
 
 #define ALIGNMENT_MASK 0x3F
diff --git a/lib/librte_eal/common/include/generic/rte_memcpy.h b/lib/librte_eal/common/include/generic/rte_memcpy.h
index 701e550c31..e7f0f8eaa9 100644
--- a/lib/librte_eal/common/include/generic/rte_memcpy.h
+++ b/lib/librte_eal/common/include/generic/rte_memcpy.h
@@ -96,4 +96,8 @@ rte_mov256(uint8_t *dst, const uint8_t *src);
  * and care is needed as parameter expressions may be evaluated multiple times.
  *
+ * @note For x86 platforms to enable the AVX-512 memcpy implementation, set
+ * -DRTE_MEMCPY_AVX512 macro in CFLAGS, or define the RTE_MEMCPY_AVX512 macro
+ * explicitly in the source file before including the rte_memcpy header file.
+ *
  * @param dst
  *   Pointer to the destination of the data.
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.122554681 +0000
+++ 0007-eal-x86-fix-memcpy-AVX-512-enablement.patch	2020-11-18 16:33:37.903215045 +0000
@@ -1 +1 @@
-From e8a83681f458d95d197bd37208fed3c3900def03 Mon Sep 17 00:00:00 2001
+From e4a8858adfb35ebaa9b31242a88a7ce0dd6635ea Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e8a83681f458d95d197bd37208fed3c3900def03 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -25,2 +26,2 @@
- lib/librte_eal/include/generic/rte_memcpy.h | 4 ++++
- lib/librte_eal/x86/include/rte_memcpy.h     | 2 +-
+ lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 2 +-
+ lib/librte_eal/common/include/generic/rte_memcpy.h  | 4 ++++
@@ -29 +30,12 @@
-diff --git a/lib/librte_eal/include/generic/rte_memcpy.h b/lib/librte_eal/include/generic/rte_memcpy.h
+diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
+index 9c67232df9..d01832fa15 100644
+--- a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
++++ b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
+@@ -46,5 +46,5 @@ static __rte_always_inline void *
+ rte_memcpy(void *dst, const void *src, size_t n);
+ 
+-#ifdef RTE_MACHINE_CPUFLAG_AVX512F
++#if defined RTE_MACHINE_CPUFLAG_AVX512F && defined RTE_MEMCPY_AVX512
+ 
+ #define ALIGNMENT_MASK 0x3F
+diff --git a/lib/librte_eal/common/include/generic/rte_memcpy.h b/lib/librte_eal/common/include/generic/rte_memcpy.h
@@ -31,2 +43,2 @@
---- a/lib/librte_eal/include/generic/rte_memcpy.h
-+++ b/lib/librte_eal/include/generic/rte_memcpy.h
+--- a/lib/librte_eal/common/include/generic/rte_memcpy.h
++++ b/lib/librte_eal/common/include/generic/rte_memcpy.h
@@ -42,11 +53,0 @@
-diff --git a/lib/librte_eal/x86/include/rte_memcpy.h b/lib/librte_eal/x86/include/rte_memcpy.h
-index 008a3de67f..79f381dd9b 100644
---- a/lib/librte_eal/x86/include/rte_memcpy.h
-+++ b/lib/librte_eal/x86/include/rte_memcpy.h
-@@ -46,5 +46,5 @@ static __rte_always_inline void *
- rte_memcpy(void *dst, const void *src, size_t n);
- 
--#ifdef __AVX512F__
-+#if defined __AVX512F__ && defined RTE_MEMCPY_AVX512
- 
- #define ALIGNMENT_MASK 0x3F


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

* [dpdk-stable] patch 'vhost: fix virtio-net header length with packed ring' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (5 preceding siblings ...)
  2020-11-18 16:34 ` [dpdk-stable] patch 'eal/x86: fix memcpy AVX-512 enablement' " Kevin Traynor
@ 2020-11-18 16:34 ` " Kevin Traynor
  2020-11-18 16:34 ` [dpdk-stable] patch 'net/netvsc: fix Tx queue leak in error path' " Kevin Traynor
                   ` (63 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:34 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Marvin Liu, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/e79b80970ffe8bf1d08252b9508304794eb83932

Thanks.

Kevin.

---
From e79b80970ffe8bf1d08252b9508304794eb83932 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Thu, 1 Oct 2020 12:11:54 +0200
Subject: [PATCH] vhost: fix virtio-net header length with packed ring

[ upstream commit 22eaf2613537ba6b0e79f656195eeeaa3dd14666 ]

In case packed ring layout has been negotiated, but neither
Version 1 nor mergeable buffers, the Virtio-net header len
is assigned to the legacy devices value, which is wrong.

This patch fixes this with using the proper len as devices
using packed ring are not legacy devices.

Fixes: a922401f35cc ("vhost: add Rx support for packed ring")
Fixes: ae999ce49dcb ("vhost: add Tx support for packed ring")

Reported-by: Marvin Liu <yong.liu@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 lib/librte_vhost/vhost_user.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 2a6a23c4b2..754759f6e0 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -326,5 +326,7 @@ vhost_user_set_features(struct virtio_net **pdev, struct VhostUserMsg *msg,
 	dev->features = features;
 	if (dev->features &
-		((1 << VIRTIO_NET_F_MRG_RXBUF) | (1ULL << VIRTIO_F_VERSION_1))) {
+		((1ULL << VIRTIO_NET_F_MRG_RXBUF) |
+		 (1ULL << VIRTIO_F_VERSION_1) |
+		 (1ULL << VIRTIO_F_RING_PACKED))) {
 		dev->vhost_hlen = sizeof(struct virtio_net_hdr_mrg_rxbuf);
 	} else {
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.139298198 +0000
+++ 0008-vhost-fix-virtio-net-header-length-with-packed-ring.patch	2020-11-18 16:33:37.906215047 +0000
@@ -1 +1 @@
-From 22eaf2613537ba6b0e79f656195eeeaa3dd14666 Mon Sep 17 00:00:00 2001
+From e79b80970ffe8bf1d08252b9508304794eb83932 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 22eaf2613537ba6b0e79f656195eeeaa3dd14666 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 4deceb3e00..5d1fb9e863 100644
+index 2a6a23c4b2..754759f6e0 100644
@@ -28 +29 @@
-@@ -342,5 +342,7 @@ vhost_user_set_features(struct virtio_net **pdev, struct VhostUserMsg *msg,
+@@ -326,5 +326,7 @@ vhost_user_set_features(struct virtio_net **pdev, struct VhostUserMsg *msg,


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

* [dpdk-stable] patch 'net/netvsc: fix Tx queue leak in error path' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (6 preceding siblings ...)
  2020-11-18 16:34 ` [dpdk-stable] patch 'vhost: fix virtio-net header length with packed ring' " Kevin Traynor
@ 2020-11-18 16:34 ` " Kevin Traynor
  2020-11-18 16:34 ` [dpdk-stable] patch 'net/bonding: fix possible unbalanced packet receiving' " Kevin Traynor
                   ` (62 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:34 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Long Li, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/3e74baf061d8f906e13295c0f7c11dc6133c3ef2

Thanks.

Kevin.

---
From 3e74baf061d8f906e13295c0f7c11dc6133c3ef2 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Wed, 7 Oct 2020 10:06:25 +0800
Subject: [PATCH] net/netvsc: fix Tx queue leak in error path

[ upstream commit f3013acfc17b8920b97223421976f3b3bb32489a ]

In hn_dev_tx_queue_setup() allocated memory for txq, we don't free it
when error happens and it will lead to memory leak.

We can check for tx_free_thresh at the beginning of the function to
fix it, before calling txq = rte_zmalloc_socket().

Fixes: cc0251813277 ("net/netvsc: split send buffers from Tx descriptors")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Long Li <longli@microsoft.com>
---
 drivers/net/netvsc/hn_rxtx.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index a70bac53d3..63b0f83f3a 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -253,14 +253,4 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev,
 	PMD_INIT_FUNC_TRACE();
 
-	txq = rte_zmalloc_socket("HN_TXQ", sizeof(*txq), RTE_CACHE_LINE_SIZE,
-				 socket_id);
-	if (!txq)
-		return -ENOMEM;
-
-	txq->hv = hv;
-	txq->chan = hv->channels[queue_idx];
-	txq->port_id = dev->data->port_id;
-	txq->queue_id = queue_idx;
-
 	tx_free_thresh = tx_conf->tx_free_thresh;
 	if (tx_free_thresh == 0)
@@ -277,4 +267,13 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev,
 	}
 
+	txq = rte_zmalloc_socket("HN_TXQ", sizeof(*txq), RTE_CACHE_LINE_SIZE,
+				 socket_id);
+	if (!txq)
+		return -ENOMEM;
+
+	txq->hv = hv;
+	txq->chan = hv->channels[queue_idx];
+	txq->port_id = dev->data->port_id;
+	txq->queue_id = queue_idx;
 	txq->free_thresh = tx_free_thresh;
 
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.158466889 +0000
+++ 0009-net-netvsc-fix-Tx-queue-leak-in-error-path.patch	2020-11-18 16:33:37.907215048 +0000
@@ -1 +1 @@
-From f3013acfc17b8920b97223421976f3b3bb32489a Mon Sep 17 00:00:00 2001
+From 3e74baf061d8f906e13295c0f7c11dc6133c3ef2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f3013acfc17b8920b97223421976f3b3bb32489a ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 65f1abae51..5d59db513c 100644
+index a70bac53d3..63b0f83f3a 100644


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

* [dpdk-stable] patch 'net/bonding: fix possible unbalanced packet receiving' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (7 preceding siblings ...)
  2020-11-18 16:34 ` [dpdk-stable] patch 'net/netvsc: fix Tx queue leak in error path' " Kevin Traynor
@ 2020-11-18 16:34 ` " Kevin Traynor
  2020-11-18 16:34 ` [dpdk-stable] patch 'net/bonding: fix Rx queue conversion' " Kevin Traynor
                   ` (61 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:34 UTC (permalink / raw)
  To: RongQing Li; +Cc: Dongsheng Rong, Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/4a4dfbc01d277e32d83f99d8ddcedb057755084e

Thanks.

Kevin.

---
From 4a4dfbc01d277e32d83f99d8ddcedb057755084e Mon Sep 17 00:00:00 2001
From: RongQing Li <lirongqing@baidu.com>
Date: Tue, 22 Sep 2020 18:29:31 +0800
Subject: [PATCH] net/bonding: fix possible unbalanced packet receiving

[ upstream commit 97602faa9e03c91465fc55f5464762796ce641c7 ]

Current Rx round robin policy for the slaves has two issue:

1. active_slave in bond_dev_private is shared by multiple PMDS which
   maybe cause some slave Rx hungry, for example, there is two PMD and
   two slave port, both PMDs start to receive, and see that active_slave
   is 0, and receive from slave 0, after complete, they increase
   active_slave by one, totally active_slave are increased by two, next
   time, they will start to receive from slave 0 again, at last, slave 1
   maybe drop packets during to not be polled by PMD

2. active_slave is shared and written by multiple PMD in RX path for
   every time RX, this is a kind of cache false share, low performance.

So move active_slave from bond_dev_private to bond_rx_queue make it as
per queue variable

Fixes: ae2a04864a9a ("net/bonding: reduce slave starvation on Rx poll")

Signed-off-by: RongQing Li <lirongqing@baidu.com>
Signed-off-by: Dongsheng Rong <rongdongsheng@baidu.com>
Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_api.c     |  6 ------
 drivers/net/bonding/rte_eth_bond_pmd.c     | 14 +++++++-------
 drivers/net/bonding/rte_eth_bond_private.h |  3 ++-
 3 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index 7bbe9724a0..27b099205b 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -130,10 +130,4 @@ deactivate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id)
 	internals->active_slave_count = active_count;
 
-	/* Resetting active_slave when reaches to max
-	 * no of slaves in active list
-	 */
-	if (internals->active_slave >= active_count)
-		internals->active_slave = 0;
-
 	if (eth_dev->data->dev_started) {
 		if (internals->mode == BONDING_MODE_8023AD) {
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 0189a3d446..340bee3bb9 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -69,5 +69,5 @@ bond_ethdev_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	internals = bd_rx_q->dev_private;
 	slave_count = internals->active_slave_count;
-	active_slave = internals->active_slave;
+	active_slave = bd_rx_q->active_slave;
 
 	for (i = 0; i < slave_count && nb_pkts; i++) {
@@ -86,6 +86,6 @@ bond_ethdev_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	}
 
-	if (++internals->active_slave >= slave_count)
-		internals->active_slave = 0;
+	if (++bd_rx_q->active_slave >= slave_count)
+		bd_rx_q->active_slave = 0;
 	return num_rx_total;
 }
@@ -283,7 +283,7 @@ rx_burst_8023ad(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts,
 			sizeof(internals->active_slaves[0]) * slave_count);
 
-	idx = internals->active_slave;
+	idx = bd_rx_q->active_slave;
 	if (idx >= slave_count) {
-		internals->active_slave = 0;
+		bd_rx_q->active_slave = 0;
 		idx = 0;
 	}
@@ -343,6 +343,6 @@ rx_burst_8023ad(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts,
 	}
 
-	if (++internals->active_slave >= slave_count)
-		internals->active_slave = 0;
+	if (++bd_rx_q->active_slave >= slave_count)
+		bd_rx_q->active_slave = 0;
 
 	return num_rx_total;
diff --git a/drivers/net/bonding/rte_eth_bond_private.h b/drivers/net/bonding/rte_eth_bond_private.h
index 8afef39baa..854ba8cd4a 100644
--- a/drivers/net/bonding/rte_eth_bond_private.h
+++ b/drivers/net/bonding/rte_eth_bond_private.h
@@ -51,4 +51,6 @@ extern const struct rte_flow_ops bond_flow_ops;
 struct bond_rx_queue {
 	uint16_t queue_id;
+	/**< Next active_slave to poll */
+	uint16_t active_slave;
 	/**< Queue Id */
 	struct bond_dev_private *dev_private;
@@ -136,5 +138,4 @@ struct bond_dev_private {
 	uint16_t nb_tx_queues;			/**< Total number of tx queues*/
 
-	uint16_t active_slave;		/**< Next active_slave to poll */
 	uint16_t active_slave_count;		/**< Number of active slaves */
 	uint16_t active_slaves[RTE_MAX_ETHPORTS];    /**< Active slave list */
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.175272335 +0000
+++ 0010-net-bonding-fix-possible-unbalanced-packet-receiving.patch	2020-11-18 16:33:37.911215050 +0000
@@ -1 +1 @@
-From 97602faa9e03c91465fc55f5464762796ce641c7 Mon Sep 17 00:00:00 2001
+From 4a4dfbc01d277e32d83f99d8ddcedb057755084e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 97602faa9e03c91465fc55f5464762796ce641c7 ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org
@@ -29,3 +30,3 @@
- drivers/net/bonding/eth_bond_private.h |  3 ++-
- drivers/net/bonding/rte_eth_bond_api.c |  6 ------
- drivers/net/bonding/rte_eth_bond_pmd.c | 14 +++++++-------
+ drivers/net/bonding/rte_eth_bond_api.c     |  6 ------
+ drivers/net/bonding/rte_eth_bond_pmd.c     | 14 +++++++-------
+ drivers/net/bonding/rte_eth_bond_private.h |  3 ++-
@@ -34,17 +34,0 @@
-diff --git a/drivers/net/bonding/eth_bond_private.h b/drivers/net/bonding/eth_bond_private.h
-index 0a0034705d..62e3a9dbf3 100644
---- a/drivers/net/bonding/eth_bond_private.h
-+++ b/drivers/net/bonding/eth_bond_private.h
-@@ -51,4 +51,6 @@ extern const struct rte_flow_ops bond_flow_ops;
- struct bond_rx_queue {
- 	uint16_t queue_id;
-+	/**< Next active_slave to poll */
-+	uint16_t active_slave;
- 	/**< Queue Id */
- 	struct bond_dev_private *dev_private;
-@@ -133,5 +135,4 @@ struct bond_dev_private {
- 	uint16_t nb_tx_queues;			/**< Total number of tx queues*/
- 
--	uint16_t active_slave;		/**< Next active_slave to poll */
- 	uint16_t active_slave_count;		/**< Number of active slaves */
- 	uint16_t active_slaves[RTE_MAX_ETHPORTS];    /**< Active slave list */
@@ -52 +36 @@
-index 97c667e007..a4007fe07c 100644
+index 7bbe9724a0..27b099205b 100644
@@ -67 +51 @@
-index 1f761c7c9e..05ac25fcad 100644
+index 0189a3d446..340bee3bb9 100644
@@ -70 +54 @@
-@@ -70,5 +70,5 @@ bond_ethdev_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -69,5 +69,5 @@ bond_ethdev_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -77 +61 @@
-@@ -87,6 +87,6 @@ bond_ethdev_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -86,6 +86,6 @@ bond_ethdev_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
@@ -86 +70 @@
-@@ -304,7 +304,7 @@ rx_burst_8023ad(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts,
+@@ -283,7 +283,7 @@ rx_burst_8023ad(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts,
@@ -96 +80 @@
-@@ -368,6 +368,6 @@ rx_burst_8023ad(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts,
+@@ -343,6 +343,6 @@ rx_burst_8023ad(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts,
@@ -104,0 +89,17 @@
+diff --git a/drivers/net/bonding/rte_eth_bond_private.h b/drivers/net/bonding/rte_eth_bond_private.h
+index 8afef39baa..854ba8cd4a 100644
+--- a/drivers/net/bonding/rte_eth_bond_private.h
++++ b/drivers/net/bonding/rte_eth_bond_private.h
+@@ -51,4 +51,6 @@ extern const struct rte_flow_ops bond_flow_ops;
+ struct bond_rx_queue {
+ 	uint16_t queue_id;
++	/**< Next active_slave to poll */
++	uint16_t active_slave;
+ 	/**< Queue Id */
+ 	struct bond_dev_private *dev_private;
+@@ -136,5 +138,4 @@ struct bond_dev_private {
+ 	uint16_t nb_tx_queues;			/**< Total number of tx queues*/
+ 
+-	uint16_t active_slave;		/**< Next active_slave to poll */
+ 	uint16_t active_slave_count;		/**< Number of active slaves */
+ 	uint16_t active_slaves[RTE_MAX_ETHPORTS];    /**< Active slave list */


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

* [dpdk-stable] patch 'net/bonding: fix Rx queue conversion' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (8 preceding siblings ...)
  2020-11-18 16:34 ` [dpdk-stable] patch 'net/bonding: fix possible unbalanced packet receiving' " Kevin Traynor
@ 2020-11-18 16:34 ` " Kevin Traynor
  2020-11-18 16:34 ` [dpdk-stable] patch 'net/failsafe: fix state synchro cleanup' " Kevin Traynor
                   ` (60 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:34 UTC (permalink / raw)
  To: Dongsheng Rong; +Cc: RongQing Li, Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/9b2c6132a35ff1126f4b852e17e852f33cd6c835

Thanks.

Kevin.

---
From 9b2c6132a35ff1126f4b852e17e852f33cd6c835 Mon Sep 17 00:00:00 2001
From: Dongsheng Rong <rongdongsheng@baidu.com>
Date: Tue, 22 Sep 2020 18:29:32 +0800
Subject: [PATCH] net/bonding: fix Rx queue conversion

[ upstream commit 99fb0a03fd1e4ce2ea839014a5d0df87a1282405 ]

In 'bond_ethdev_rx_burst_alb()' in Rx path, 'bond_rx_queue' should be
used, not 'bond_tx_queue'.

Fixes: 06fe78b98ccd ("bond: add mode 6")

Signed-off-by: Dongsheng Rong <rongdongsheng@baidu.com>
Signed-off-by: RongQing Li <lirongqing@baidu.com>
Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.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 340bee3bb9..65da4b39a8 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -509,6 +509,6 @@ static uint16_t
 bond_ethdev_rx_burst_alb(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 {
-	struct bond_tx_queue *bd_tx_q = (struct bond_tx_queue *)queue;
-	struct bond_dev_private *internals = bd_tx_q->dev_private;
+	struct bond_rx_queue *bd_rx_q = (struct bond_rx_queue *)queue;
+	struct bond_dev_private *internals = bd_rx_q->dev_private;
 	struct ether_hdr *eth_h;
 	uint16_t ether_type, offset;
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.195630573 +0000
+++ 0011-net-bonding-fix-Rx-queue-conversion.patch	2020-11-18 16:33:37.914215052 +0000
@@ -1 +1 @@
-From 99fb0a03fd1e4ce2ea839014a5d0df87a1282405 Mon Sep 17 00:00:00 2001
+From 9b2c6132a35ff1126f4b852e17e852f33cd6c835 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 99fb0a03fd1e4ce2ea839014a5d0df87a1282405 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 05ac25fcad..1c404b2edd 100644
+index 340bee3bb9..65da4b39a8 100644
@@ -23 +24 @@
-@@ -535,6 +535,6 @@ static uint16_t
+@@ -509,6 +509,6 @@ static uint16_t
@@ -30 +31 @@
- 	struct rte_ether_hdr *eth_h;
+ 	struct ether_hdr *eth_h;


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

* [dpdk-stable] patch 'net/failsafe: fix state synchro cleanup' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (9 preceding siblings ...)
  2020-11-18 16:34 ` [dpdk-stable] patch 'net/bonding: fix Rx queue conversion' " Kevin Traynor
@ 2020-11-18 16:34 ` " Kevin Traynor
  2020-11-18 16:34 ` [dpdk-stable] patch 'net/ring: check internal arguments' " Kevin Traynor
                   ` (59 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:34 UTC (permalink / raw)
  To: Gaetan Rivet; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/c577654d95801e9bbe910952e18ba49a9711101c

Thanks.

Kevin.

---
From c577654d95801e9bbe910952e18ba49a9711101c Mon Sep 17 00:00:00 2001
From: Gaetan Rivet <grive@u256.net>
Date: Mon, 12 Oct 2020 16:19:04 +0200
Subject: [PATCH] net/failsafe: fix state synchro cleanup

[ upstream commit 352074b3a4b1518f3c1ec70865c407f135d8fa4d ]

During a hotplug attempt, failsafe will try to bring a subdevice that
just appeared to its internal state. On error, the subdevice is marked
for removal and will be cleaned up.

However failsafe_dev_remove() only remove active devices. Devices that
failed during probe will be stuck in DEV_PARSED state repeatedly.

Consider all devices when doing a removal round, but limit burst control
and stats saving to active devices.

Fixes: 598fb8aec6f6 ("net/failsafe: support device removal")

Signed-off-by: Gaetan Rivet <grive@u256.net>
---
 drivers/net/failsafe/failsafe_ether.c | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c
index 3e1f65f09a..9c8bf01224 100644
--- a/drivers/net/failsafe/failsafe_ether.c
+++ b/drivers/net/failsafe/failsafe_ether.c
@@ -373,12 +373,21 @@ failsafe_dev_remove(struct rte_eth_dev *dev)
 	uint8_t i;
 
-	FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_ACTIVE)
-		if (sdev->remove && fs_rxtx_clean(sdev)) {
-			if (fs_lock(dev, 1) != 0)
-				return;
+	FOREACH_SUBDEV(sdev, i, dev) {
+		if (!sdev->remove)
+			continue;
+
+		/* Active devices must have finished their burst and
+		 * their stats must be saved.
+		 */
+		if (sdev->state >= DEV_ACTIVE &&
+		    fs_rxtx_clean(sdev) == 0)
+			continue;
+		if (fs_lock(dev, 1) != 0)
+			return;
+		if (sdev->state >= DEV_ACTIVE)
 			fs_dev_stats_save(sdev);
-			fs_dev_remove(sdev);
-			fs_unlock(dev, 1);
-		}
+		fs_dev_remove(sdev);
+		fs_unlock(dev, 1);
+	}
 }
 
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.213465289 +0000
+++ 0012-net-failsafe-fix-state-synchro-cleanup.patch	2020-11-18 16:33:37.914215052 +0000
@@ -1 +1 @@
-From 352074b3a4b1518f3c1ec70865c407f135d8fa4d Mon Sep 17 00:00:00 2001
+From c577654d95801e9bbe910952e18ba49a9711101c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 352074b3a4b1518f3c1ec70865c407f135d8fa4d ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 7c68bbdec0..f18935a7e2 100644
+index 3e1f65f09a..9c8bf01224 100644
@@ -28 +29 @@
-@@ -384,12 +384,21 @@ failsafe_dev_remove(struct rte_eth_dev *dev)
+@@ -373,12 +373,21 @@ failsafe_dev_remove(struct rte_eth_dev *dev)


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

* [dpdk-stable] patch 'net/ring: check internal arguments' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (10 preceding siblings ...)
  2020-11-18 16:34 ` [dpdk-stable] patch 'net/failsafe: fix state synchro cleanup' " Kevin Traynor
@ 2020-11-18 16:34 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'doc: fix EF10 Rx mode name in sfc guide' " Kevin Traynor
                   ` (58 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:34 UTC (permalink / raw)
  To: Kevin Laatz; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/cb44dd60e03785d22d3b08a6af740d3888d6f404

Thanks.

Kevin.

---
From cb44dd60e03785d22d3b08a6af740d3888d6f404 Mon Sep 17 00:00:00 2001
From: Kevin Laatz <kevin.laatz@intel.com>
Date: Tue, 13 Oct 2020 14:07:04 +0100
Subject: [PATCH] net/ring: check internal arguments

[ upstream commit e37bbe212d48a7375a6239478a114829d05692b5 ]

Add a check for the return value of the sscanf call in
parse_internal_args(), returning an error if we don't get the expected
result.

Coverity issue: 362049
Fixes: 96cb19521147 ("net/ring: use EAL APIs in PMD specific API")

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/ring/rte_eth_ring.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index 7298ee93e2..245029c107 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -17,4 +17,5 @@
 #define ETH_RING_ACTION_ATTACH		"ATTACH"
 #define ETH_RING_INTERNAL_ARG		"internal"
+#define ETH_RING_INTERNAL_ARG_MAX_LEN	19 /* "0x..16chars..\0" */
 
 static const char *valid_arguments[] = {
@@ -542,6 +543,19 @@ parse_internal_args(const char *key __rte_unused, const char *value,
 	struct ring_internal_args **internal_args = data;
 	void *args;
+	int ret, n;
 
-	sscanf(value, "%p", &args);
+	/* make sure 'value' is valid pointer length */
+	if (strnlen(value, ETH_RING_INTERNAL_ARG_MAX_LEN) >=
+			ETH_RING_INTERNAL_ARG_MAX_LEN) {
+		PMD_LOG(ERR, "Error parsing internal args, argument is too long");
+		return -1;
+	}
+
+	ret = sscanf(value, "%p%n", &args, &n);
+	if (ret == 0 || (size_t)n != strlen(value)) {
+		PMD_LOG(ERR, "Error parsing internal args");
+
+		return -1;
+	}
 
 	*internal_args = args;
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.229371101 +0000
+++ 0013-net-ring-check-internal-arguments.patch	2020-11-18 16:33:37.915215053 +0000
@@ -1 +1 @@
-From e37bbe212d48a7375a6239478a114829d05692b5 Mon Sep 17 00:00:00 2001
+From cb44dd60e03785d22d3b08a6af740d3888d6f404 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e37bbe212d48a7375a6239478a114829d05692b5 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 83c5502123..22c0802688 100644
+index 7298ee93e2..245029c107 100644
@@ -30 +31 @@
-@@ -572,6 +573,19 @@ parse_internal_args(const char *key __rte_unused, const char *value,
+@@ -542,6 +543,19 @@ parse_internal_args(const char *key __rte_unused, const char *value,


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

* [dpdk-stable] patch 'doc: fix EF10 Rx mode name in sfc guide' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (11 preceding siblings ...)
  2020-11-18 16:34 ` [dpdk-stable] patch 'net/ring: check internal arguments' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'doc: fix typo in pcap " Kevin Traynor
                   ` (57 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/9fbb1d4d591cd6f0b9ad0c5214ae1bc98cc47109

Thanks.

Kevin.

---
From 9fbb1d4d591cd6f0b9ad0c5214ae1bc98cc47109 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Tue, 13 Oct 2020 14:45:18 +0100
Subject: [PATCH] doc: fix EF10 Rx mode name in sfc guide

[ upstream commit e1ecb6c775c81553750853f894a8655781a91cef ]

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

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 doc/guides/nics/sfc_efx.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/guides/nics/sfc_efx.rst b/doc/guides/nics/sfc_efx.rst
index f449b19d6a..cca3d5283f 100644
--- a/doc/guides/nics/sfc_efx.rst
+++ b/doc/guides/nics/sfc_efx.rst
@@ -315,5 +315,5 @@ Case-insensitive 1/y/yes/on or 0/n/no/off may be used to specify
 boolean parameters value.
 
-- ``rx_datapath`` [auto|efx|ef10|ef10_esps] (default **auto**)
+- ``rx_datapath`` [auto|efx|ef10|ef10_essb] (default **auto**)
 
   Choose receive datapath implementation.
@@ -324,5 +324,5 @@ boolean parameters value.
   more efficient than libefx-based and provides richer packet type
   classification.
-  **ef10_esps** chooses SFNX2xxx equal stride packed stream datapath
+  **ef10_essb** chooses SFNX2xxx equal stride super-buffer datapath
   which may be used on DPDK firmware variant only
   (see notes about its limitations above).
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.247021266 +0000
+++ 0014-doc-fix-EF10-Rx-mode-name-in-sfc-guide.patch	2020-11-18 16:33:37.916215054 +0000
@@ -1 +1 @@
-From e1ecb6c775c81553750853f894a8655781a91cef Mon Sep 17 00:00:00 2001
+From 9fbb1d4d591cd6f0b9ad0c5214ae1bc98cc47109 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e1ecb6c775c81553750853f894a8655781a91cef ]
+
@@ -7 +8,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
-index ab44ce66c8..812c1e7951 100644
+index f449b19d6a..cca3d5283f 100644
@@ -18 +19 @@
-@@ -298,5 +298,5 @@ Case-insensitive 1/y/yes/on or 0/n/no/off may be used to specify
+@@ -315,5 +315,5 @@ Case-insensitive 1/y/yes/on or 0/n/no/off may be used to specify
@@ -25 +26 @@
-@@ -307,5 +307,5 @@ boolean parameters value.
+@@ -324,5 +324,5 @@ boolean parameters value.


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

* [dpdk-stable] patch 'doc: fix typo in pcap guide' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (12 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'doc: fix EF10 Rx mode name in sfc guide' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/bnx2x: add QLogic vendor id for BCM57840' " Kevin Traynor
                   ` (56 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Sarosh Arif; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/f46a8b96235e311d086d1c3d485104cfda8b76ad

Thanks.

Kevin.

---
From f46a8b96235e311d086d1c3d485104cfda8b76ad Mon Sep 17 00:00:00 2001
From: Sarosh Arif <sarosh.arif@emumba.com>
Date: Wed, 14 Oct 2020 17:23:41 +0500
Subject: [PATCH] doc: fix typo in pcap guide

[ upstream commit a09272436e5a60d9dedd901ecf261daade69fb90 ]

Changed "net_pcap1;" to "net_pcap1," in order to make the command
correct.

Fixes: 53bf48403409 ("net/pcap: capture only ingress packets from Rx iface")

Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 doc/guides/nics/pcap_ring.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/nics/pcap_ring.rst b/doc/guides/nics/pcap_ring.rst
index c1ef9196bf..f3364106c1 100644
--- a/doc/guides/nics/pcap_ring.rst
+++ b/doc/guides/nics/pcap_ring.rst
@@ -139,5 +139,5 @@ Forward packets through two network interfaces:
 
     $RTE_TARGET/app/testpmd -l 0-3 -n 4 \
-        --vdev 'net_pcap0,iface=eth0' --vdev='net_pcap1;iface=eth1'
+        --vdev 'net_pcap0,iface=eth0' --vdev='net_pcap1,iface=eth1'
 
 Enable 2 tx queues on a network interface:
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.263290014 +0000
+++ 0015-doc-fix-typo-in-pcap-guide.patch	2020-11-18 16:33:37.916215054 +0000
@@ -1 +1 @@
-From a09272436e5a60d9dedd901ecf261daade69fb90 Mon Sep 17 00:00:00 2001
+From f46a8b96235e311d086d1c3d485104cfda8b76ad Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a09272436e5a60d9dedd901ecf261daade69fb90 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index cf230ae40a..8fdb49179a 100644
+index c1ef9196bf..f3364106c1 100644
@@ -22 +23 @@
-@@ -167,5 +167,5 @@ Forward packets through two network interfaces:
+@@ -139,5 +139,5 @@ Forward packets through two network interfaces:


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

* [dpdk-stable] patch 'net/bnx2x: add QLogic vendor id for BCM57840' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (13 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'doc: fix typo in pcap " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'ethdev: fix memory ordering for callback functions' " Kevin Traynor
                   ` (55 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: Souvik Dey, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/681f5a65b32aa22da09989a8cb3598ea4cca7a0c

Thanks.

Kevin.

---
From 681f5a65b32aa22da09989a8cb3598ea4cca7a0c Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rmody@marvell.com>
Date: Mon, 12 Oct 2020 15:48:14 -0700
Subject: [PATCH] net/bnx2x: add QLogic vendor id for BCM57840

[ upstream commit 9bb607af360e4572e0b64bc2a3edc8c8c6e9e14b ]

Add QLogic vendor id support for BCM57840 device ids.

Fixes: 9fb557035d90 ("bnx2x: enable PMD build")

Reported-by: Souvik Dey <sodey@rbbn.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
 drivers/net/bnx2x/bnx2x_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 5cff77337a..369ab8135b 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -20,4 +20,5 @@ int bnx2x_logtype_driver;
  */
 #define BROADCOM_PCI_VENDOR_ID 0x14E4
+#define QLOGIC_PCI_VENDOR_ID 0x1077
 static const struct rte_pci_id pci_id_bnx2x_map[] = {
 	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57800) },
@@ -27,4 +28,5 @@ static const struct rte_pci_id pci_id_bnx2x_map[] = {
 	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57840_OBS) },
 	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57840_4_10) },
+	{ RTE_PCI_DEVICE(QLOGIC_PCI_VENDOR_ID, CHIP_NUM_57840_4_10) },
 	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57840_2_20) },
 #ifdef RTE_LIBRTE_BNX2X_MF_SUPPORT
@@ -32,4 +34,5 @@ static const struct rte_pci_id pci_id_bnx2x_map[] = {
 	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57811_MF) },
 	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57840_MF) },
+	{ RTE_PCI_DEVICE(QLOGIC_PCI_VENDOR_ID, CHIP_NUM_57840_MF) },
 #endif
 	{ .vendor_id = 0, }
@@ -41,4 +44,5 @@ static const struct rte_pci_id pci_id_bnx2xvf_map[] = {
 	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57811_VF) },
 	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57840_VF) },
+	{ RTE_PCI_DEVICE(QLOGIC_PCI_VENDOR_ID, CHIP_NUM_57840_VF) },
 	{ .vendor_id = 0, }
 };
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.280334567 +0000
+++ 0016-net-bnx2x-add-QLogic-vendor-id-for-BCM57840.patch	2020-11-18 16:33:37.917215054 +0000
@@ -1 +1 @@
-From 9bb607af360e4572e0b64bc2a3edc8c8c6e9e14b Mon Sep 17 00:00:00 2001
+From 681f5a65b32aa22da09989a8cb3598ea4cca7a0c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9bb607af360e4572e0b64bc2a3edc8c8c6e9e14b ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 40225b2f44..ce9df87489 100644
+index 5cff77337a..369ab8135b 100644
@@ -21 +22 @@
-@@ -18,4 +18,5 @@
+@@ -20,4 +20,5 @@ int bnx2x_logtype_driver;
@@ -27 +28 @@
-@@ -25,4 +26,5 @@ static const struct rte_pci_id pci_id_bnx2x_map[] = {
+@@ -27,4 +28,5 @@ static const struct rte_pci_id pci_id_bnx2x_map[] = {
@@ -33 +34 @@
-@@ -30,4 +32,5 @@ static const struct rte_pci_id pci_id_bnx2x_map[] = {
+@@ -32,4 +34,5 @@ static const struct rte_pci_id pci_id_bnx2x_map[] = {
@@ -39 +40 @@
-@@ -39,4 +42,5 @@ static const struct rte_pci_id pci_id_bnx2xvf_map[] = {
+@@ -41,4 +44,5 @@ static const struct rte_pci_id pci_id_bnx2xvf_map[] = {


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

* [dpdk-stable] patch 'ethdev: fix memory ordering for callback functions' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (14 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/bnx2x: add QLogic vendor id for BCM57840' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix handshake synchronization' " Kevin Traynor
                   ` (54 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Honnappa Nagarahalli
  Cc: Ola Liljedahl, Phil Yang, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/79711c90de1314b9b012da0815db2e8ac57f14ed

Thanks.

Kevin.

---
From 79711c90de1314b9b012da0815db2e8ac57f14ed Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Tue, 13 Oct 2020 11:25:37 -0500
Subject: [PATCH] ethdev: fix memory ordering for callback functions

[ upstream commit 2b69bd1179162f69c0a90d5b09309498d362b3d7 ]

Call back functions are registered on the control plane. They
are accessed from the data plane. Hence, correct memory orderings
should be used to avoid race conditions.

Fixes: 4dc294158cac ("ethdev: support optional Rx and Tx callbacks")
Fixes: c8231c63ddcb ("ethdev: insert Rx callback as head of list")

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_ethdev/rte_ethdev.c | 28 ++++++++++++++++++-----
 lib/librte_ethdev/rte_ethdev.h | 42 ++++++++++++++++++++++++++--------
 2 files changed, 55 insertions(+), 15 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 336ad1b83a..3f3f9505b2 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -3825,10 +3825,18 @@ rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
 
 	if (!tail) {
-		rte_eth_devices[port_id].post_rx_burst_cbs[queue_id] = cb;
+		/* Stores to cb->fn and cb->param should complete before
+		 * cb is visible to data plane.
+		 */
+		__atomic_store_n(
+			&rte_eth_devices[port_id].post_rx_burst_cbs[queue_id],
+			cb, __ATOMIC_RELEASE);
 
 	} else {
 		while (tail->next)
 			tail = tail->next;
-		tail->next = cb;
+		/* Stores to cb->fn and cb->param should complete before
+		 * cb is visible to data plane.
+		 */
+		__atomic_store_n(&tail->next, cb, __ATOMIC_RELEASE);
 	}
 	rte_spinlock_unlock(&rte_eth_rx_cb_lock);
@@ -3903,10 +3911,18 @@ rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
 
 	if (!tail) {
-		rte_eth_devices[port_id].pre_tx_burst_cbs[queue_id] = cb;
+		/* Stores to cb->fn and cb->param should complete before
+		 * cb is visible to data plane.
+		 */
+		__atomic_store_n(
+			&rte_eth_devices[port_id].pre_tx_burst_cbs[queue_id],
+			cb, __ATOMIC_RELEASE);
 
 	} else {
 		while (tail->next)
 			tail = tail->next;
-		tail->next = cb;
+		/* Stores to cb->fn and cb->param should complete before
+		 * cb is visible to data plane.
+		 */
+		__atomic_store_n(&tail->next, cb, __ATOMIC_RELEASE);
 	}
 	rte_spinlock_unlock(&rte_eth_tx_cb_lock);
@@ -3939,5 +3955,5 @@ rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
 		if (cb == user_cb) {
 			/* Remove the user cb from the callback list. */
-			*prev_cb = cb->next;
+			__atomic_store_n(prev_cb, cb->next, __ATOMIC_RELAXED);
 			ret = 0;
 			break;
@@ -3973,5 +3989,5 @@ rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id,
 		if (cb == user_cb) {
 			/* Remove the user cb from the callback list. */
-			*prev_cb = cb->next;
+			__atomic_store_n(prev_cb, cb->next, __ATOMIC_RELAXED);
 			ret = 0;
 			break;
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 7b4221d7b4..e1f299c993 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -3216,5 +3216,6 @@ struct rte_eth_rxtx_callback;
  * @param user_param
  *   A generic pointer parameter which will be passed to each invocation of the
- *   callback function on this port and queue.
+ *   callback function on this port and queue. Inter-thread synchronization
+ *   of any user data changes is the responsibility of the user.
  *
  * @return
@@ -3245,5 +3246,6 @@ rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
  * @param user_param
  *   A generic pointer parameter which will be passed to each invocation of the
- *   callback function on this port and queue.
+ *   callback function on this port and queue. Inter-thread synchronization
+ *   of any user data changes is the responsibility of the user.
  *
  * @return
@@ -3273,5 +3275,6 @@ rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id,
  * @param user_param
  *   A generic pointer parameter which will be passed to each invocation of the
- *   callback function on this port and queue.
+ *   callback function on this port and queue. Inter-thread synchronization
+ *   of any user data changes is the responsibility of the user.
  *
  * @return
@@ -3298,5 +3301,7 @@ rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
  *
  * - After a short delay - where the delay is sufficient to allow any
- *   in-flight callbacks to complete.
+ *   in-flight callbacks to complete. Alternately, the RCU mechanism can be
+ *   used to detect when data plane threads have ceased referencing the
+ *   callback memory.
  *
  * @param port_id
@@ -3331,5 +3336,7 @@ int rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
  *
  * - After a short delay - where the delay is sufficient to allow any
- *   in-flight callbacks to complete.
+ *   in-flight callbacks to complete. Alternately, the RCU mechanism can be
+ *   used to detect when data plane threads have ceased referencing the
+ *   callback memory.
  *
  * @param port_id
@@ -3881,8 +3888,16 @@ rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,
 
 #ifdef RTE_ETHDEV_RXTX_CALLBACKS
-	if (unlikely(dev->post_rx_burst_cbs[queue_id] != NULL)) {
-		struct rte_eth_rxtx_callback *cb =
-				dev->post_rx_burst_cbs[queue_id];
+	struct rte_eth_rxtx_callback *cb;
 
+	/* __ATOMIC_RELEASE memory order was used when the
+	 * call back was inserted into the list.
+	 * Since there is a clear dependency between loading
+	 * cb and cb->fn/cb->next, __ATOMIC_ACQUIRE memory order is
+	 * not required.
+	 */
+	cb = __atomic_load_n(&dev->post_rx_burst_cbs[queue_id],
+				__ATOMIC_RELAXED);
+
+	if (unlikely(cb != NULL)) {
 		do {
 			nb_rx = cb->fn.rx(port_id, queue_id, rx_pkts, nb_rx,
@@ -4145,5 +4160,14 @@ rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,
 
 #ifdef RTE_ETHDEV_RXTX_CALLBACKS
-	struct rte_eth_rxtx_callback *cb = dev->pre_tx_burst_cbs[queue_id];
+	struct rte_eth_rxtx_callback *cb;
+
+	/* __ATOMIC_RELEASE memory order was used when the
+	 * call back was inserted into the list.
+	 * Since there is a clear dependency between loading
+	 * cb and cb->fn/cb->next, __ATOMIC_ACQUIRE memory order is
+	 * not required.
+	 */
+	cb = __atomic_load_n(&dev->pre_tx_burst_cbs[queue_id],
+				__ATOMIC_RELAXED);
 
 	if (unlikely(cb != NULL)) {
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.296348094 +0000
+++ 0017-ethdev-fix-memory-ordering-for-callback-functions.patch	2020-11-18 16:33:37.924215059 +0000
@@ -1 +1 @@
-From 2b69bd1179162f69c0a90d5b09309498d362b3d7 Mon Sep 17 00:00:00 2001
+From 79711c90de1314b9b012da0815db2e8ac57f14ed Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2b69bd1179162f69c0a90d5b09309498d362b3d7 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 2198548663..7eaeccc19d 100644
+index 336ad1b83a..3f3f9505b2 100644
@@ -27 +28 @@
-@@ -4611,10 +4611,18 @@ rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
+@@ -3825,10 +3825,18 @@ rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
@@ -48 +49 @@
-@@ -4701,10 +4709,18 @@ rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
+@@ -3903,10 +3911,18 @@ rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
@@ -69 +70 @@
-@@ -4737,5 +4753,5 @@ rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
+@@ -3939,5 +3955,5 @@ rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
@@ -76 +77 @@
-@@ -4771,5 +4787,5 @@ rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id,
+@@ -3973,5 +3989,5 @@ rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id,
@@ -84 +85 @@
-index f07dbc4d26..c37b3a1a81 100644
+index 7b4221d7b4..e1f299c993 100644
@@ -87 +88 @@
-@@ -3912,5 +3912,6 @@ struct rte_eth_rxtx_callback;
+@@ -3216,5 +3216,6 @@ struct rte_eth_rxtx_callback;
@@ -95 +96 @@
-@@ -3941,5 +3942,6 @@ rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
+@@ -3245,5 +3246,6 @@ rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
@@ -103 +104 @@
-@@ -3969,5 +3971,6 @@ rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id,
+@@ -3273,5 +3275,6 @@ rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id,
@@ -111 +112 @@
-@@ -3994,5 +3997,7 @@ rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
+@@ -3298,5 +3301,7 @@ rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
@@ -120 +121 @@
-@@ -4027,5 +4032,7 @@ int rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
+@@ -3331,5 +3336,7 @@ int rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
@@ -129 +130 @@
-@@ -4688,8 +4695,16 @@ rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,
+@@ -3881,8 +3888,16 @@ rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,
@@ -149 +150 @@
-@@ -4954,5 +4969,14 @@ rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,
+@@ -4145,5 +4160,14 @@ rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,


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

* [dpdk-stable] patch 'distributor: fix handshake synchronization' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (15 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'ethdev: fix memory ordering for callback functions' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix handshake deadlock' " Kevin Traynor
                   ` (53 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/7f43d9a52f6c913ae693f61c8f9d67aefd23282a

Thanks.

Kevin.

---
From 7f43d9a52f6c913ae693f61c8f9d67aefd23282a Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Sat, 17 Oct 2020 05:06:45 +0200
Subject: [PATCH] distributor: fix handshake synchronization

[ upstream commit bea84d5592eb2658cf8c36214a9db75d398efa1c ]

rte_distributor_return_pkt function which is run on worker cores
must wait for distributor core to clear handshake on retptr64
before using those buffers. While the handshake is set distributor
core controls buffers and any operations on worker side might overwrite
buffers which are unread yet.
Same situation appears in the legacy single distributor. Function
rte_distributor_return_pkt_single shouldn't modify the bufptr64 until
handshake on it is cleared by distributor lcore.

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

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 lib/librte_distributor/rte_distributor.c     | 12 ++++++++++++
 lib/librte_distributor/rte_distributor_v20.c |  4 ++++
 2 files changed, 16 insertions(+)

diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
index 62a7634049..a686d06f81 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -184,4 +184,16 @@ rte_distributor_return_pkt_v1705(struct rte_distributor *d,
 	}
 
+	/* Spin while handshake bits are set (scheduler clears it).
+	 * Sync with worker on GET_BUF flag.
+	 */
+	while (unlikely(__atomic_load_n(&(buf->retptr64[0]), __ATOMIC_RELAXED)
+			& RTE_DISTRIB_GET_BUF)) {
+		rte_pause();
+		uint64_t t = rte_rdtsc()+100;
+
+		while (rte_rdtsc() < t)
+			rte_pause();
+	}
+
 	/* Sync with distributor to acquire retptrs */
 	__atomic_thread_fence(__ATOMIC_ACQUIRE);
diff --git a/lib/librte_distributor/rte_distributor_v20.c b/lib/librte_distributor/rte_distributor_v20.c
index 35adc8ea84..5459ccb3f9 100644
--- a/lib/librte_distributor/rte_distributor_v20.c
+++ b/lib/librte_distributor/rte_distributor_v20.c
@@ -78,4 +78,8 @@ 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;
+	while (unlikely(__atomic_load_n(&buf->bufptr64, __ATOMIC_RELAXED)
+			& RTE_DISTRIB_FLAGS_MASK))
+		rte_pause();
+
 	/* Sync with distributor on RETURN_BUF flag. */
 	__atomic_store_n(&(buf->bufptr64), req, __ATOMIC_RELEASE);
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.319552303 +0000
+++ 0018-distributor-fix-handshake-synchronization.patch	2020-11-18 16:33:37.925215059 +0000
@@ -1 +1 @@
-From bea84d5592eb2658cf8c36214a9db75d398efa1c Mon Sep 17 00:00:00 2001
+From 7f43d9a52f6c913ae693f61c8f9d67aefd23282a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bea84d5592eb2658cf8c36214a9db75d398efa1c ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -22,2 +23,2 @@
- lib/librte_distributor/rte_distributor.c        | 12 ++++++++++++
- lib/librte_distributor/rte_distributor_single.c |  4 ++++
+ lib/librte_distributor/rte_distributor.c     | 12 ++++++++++++
+ lib/librte_distributor/rte_distributor_v20.c |  4 ++++
@@ -27 +28 @@
-index 1c047f065a..c6b19a3886 100644
+index 62a7634049..a686d06f81 100644
@@ -30 +31 @@
-@@ -170,4 +170,16 @@ rte_distributor_return_pkt(struct rte_distributor *d,
+@@ -184,4 +184,16 @@ rte_distributor_return_pkt_v1705(struct rte_distributor *d,
@@ -47,5 +48,5 @@
-diff --git a/lib/librte_distributor/rte_distributor_single.c b/lib/librte_distributor/rte_distributor_single.c
-index abaf7730c3..f4725b1d0b 100644
---- a/lib/librte_distributor/rte_distributor_single.c
-+++ b/lib/librte_distributor/rte_distributor_single.c
-@@ -75,4 +75,8 @@ rte_distributor_return_pkt_single(struct rte_distributor_single *d,
+diff --git a/lib/librte_distributor/rte_distributor_v20.c b/lib/librte_distributor/rte_distributor_v20.c
+index 35adc8ea84..5459ccb3f9 100644
+--- a/lib/librte_distributor/rte_distributor_v20.c
++++ b/lib/librte_distributor/rte_distributor_v20.c
+@@ -78,4 +78,8 @@ rte_distributor_return_pkt_v20(struct rte_distributor_v20 *d,


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

* [dpdk-stable] patch 'distributor: fix handshake deadlock' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (16 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix handshake synchronization' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix buffer use after free' " Kevin Traynor
                   ` (52 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/d5ef205206cc208e8ceae2533c0d71dec5b92a19

Thanks.

Kevin.

---
From d5ef205206cc208e8ceae2533c0d71dec5b92a19 Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Sat, 17 Oct 2020 05:06:46 +0200
Subject: [PATCH] distributor: fix handshake deadlock

[ upstream commit 5acce079e7dc773c17bf2043fc18106392b4a863 ]

Synchronization of data exchange between distributor and worker cores
is based on 2 handshakes: retptr64 for returning mbufs from workers
to distributor and bufptr64 for passing mbufs to workers.

Without proper order of verifying those 2 handshakes a deadlock may
occur. This can happen when worker core wants to return back mbufs
and waits for retptr handshake to be cleared while distributor core
waits for bufptr to send mbufs to worker.

This can happen as worker core first returns mbufs to distributor
and later gets new mbufs, while distributor first releases mbufs
to worker and later handle returning packets.

This patch fixes possibility of the deadlock by always taking care
of returning packets first on the distributor side and handling
packets while waiting to release new.

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

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
 lib/librte_distributor/rte_distributor.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
index a686d06f81..d1f8b14d2e 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -338,10 +338,12 @@ release(struct rte_distributor *d, unsigned int wkr)
 	unsigned int i;
 
+	handle_returns(d, wkr);
+
 	/* Sync with worker on GET_BUF flag */
 	while (!(__atomic_load_n(&(d->bufs[wkr].bufptr64[0]), __ATOMIC_ACQUIRE)
-		& RTE_DISTRIB_GET_BUF))
+		& RTE_DISTRIB_GET_BUF)) {
+		handle_returns(d, wkr);
 		rte_pause();
-
-	handle_returns(d, wkr);
+	}
 
 	buf->count = 0;
@@ -392,4 +394,5 @@ rte_distributor_process_v1705(struct rte_distributor *d,
 		for (wid = 0 ; wid < d->num_workers; wid++) {
 			/* Sync with worker on GET_BUF flag. */
+			handle_returns(d, wid);
 			if (__atomic_load_n(&(d->bufs[wid].bufptr64[0]),
 				__ATOMIC_ACQUIRE) & RTE_DISTRIB_GET_BUF) {
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.335940327 +0000
+++ 0019-distributor-fix-handshake-deadlock.patch	2020-11-18 16:33:37.925215059 +0000
@@ -1 +1 @@
-From 5acce079e7dc773c17bf2043fc18106392b4a863 Mon Sep 17 00:00:00 2001
+From d5ef205206cc208e8ceae2533c0d71dec5b92a19 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5acce079e7dc773c17bf2043fc18106392b4a863 ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -33 +34 @@
-index c6b19a3886..d6d4350a28 100644
+index a686d06f81..d1f8b14d2e 100644
@@ -36 +37 @@
-@@ -320,10 +320,12 @@ release(struct rte_distributor *d, unsigned int wkr)
+@@ -338,10 +338,12 @@ release(struct rte_distributor *d, unsigned int wkr)
@@ -52 +53 @@
-@@ -375,4 +377,5 @@ rte_distributor_process(struct rte_distributor *d,
+@@ -392,4 +394,5 @@ rte_distributor_process_v1705(struct rte_distributor *d,


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

* [dpdk-stable] patch 'distributor: fix buffer use after free' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (17 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix handshake deadlock' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: handle worker shutdown in burst mode' " Kevin Traynor
                   ` (51 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/de6e48d0b37ccb04376af977abc27c2833f7364e

Thanks.

Kevin.

---
From de6e48d0b37ccb04376af977abc27c2833f7364e Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Sat, 17 Oct 2020 05:06:47 +0200
Subject: [PATCH] distributor: fix buffer use after free

[ upstream commit 6bd951b48222caaa10a796057f617cab04f928b0 ]

rte_distributor_request_pkt and rte_distributor_get_pkt dereferenced
oldpkt parameter when in RTE_DIST_ALG_SINGLE even if number
of returned buffers from worker to distributor was 0.

This patch passes NULL to the legacy API when number of returned
buffers is 0. This allows passing NULL as oldpkt parameter.

Distributor tests are also updated passing NULL as oldpkt and
0 as number of returned packets, where packets are not returned.

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

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
 lib/librte_distributor/rte_distributor.c |  4 ++--
 test/test/test_distributor.c             | 28 +++++++++---------------
 2 files changed, 12 insertions(+), 20 deletions(-)

diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
index d1f8b14d2e..5f9dde8494 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -44,5 +44,5 @@ rte_distributor_request_pkt_v1705(struct rte_distributor *d,
 	if (unlikely(d->alg_type == RTE_DIST_ALG_SINGLE)) {
 		rte_distributor_request_pkt_v20(d->d_v20,
-			worker_id, oldpkt[0]);
+			worker_id, count ? oldpkt[0] : NULL);
 		return;
 	}
@@ -144,5 +144,5 @@ rte_distributor_get_pkt_v1705(struct rte_distributor *d,
 		if (return_count <= 1) {
 			pkts[0] = rte_distributor_get_pkt_v20(d->d_v20,
-				worker_id, oldpkt[0]);
+				worker_id, return_count ? oldpkt[0] : NULL);
 			return (pkts[0]) ? 1 : 0;
 		} else
diff --git a/test/test/test_distributor.c b/test/test/test_distributor.c
index 6aa4e49e69..ae7eff5a91 100644
--- a/test/test/test_distributor.c
+++ b/test/test/test_distributor.c
@@ -63,11 +63,8 @@ handle_work(void *arg)
 	struct worker_params *wp = arg;
 	struct rte_distributor *db = wp->dist;
-	unsigned int count = 0, num = 0;
+	unsigned int count = 0, num;
 	unsigned int id = __sync_fetch_and_add(&worker_idx, 1);
-	int i;
 
-	for (i = 0; i < 8; i++)
-		buf[i] = NULL;
-	num = rte_distributor_get_pkt(db, id, buf, buf, num);
+	num = rte_distributor_get_pkt(db, id, buf, NULL, 0);
 	while (!quit) {
 		__atomic_fetch_add(&worker_stats[id].handled_packets, num,
@@ -273,10 +270,8 @@ handle_work_with_free_mbufs(void *arg)
 	unsigned int count = 0;
 	unsigned int i;
-	unsigned int num = 0;
+	unsigned int num;
 	unsigned int id = __sync_fetch_and_add(&worker_idx, 1);
 
-	for (i = 0; i < 8; i++)
-		buf[i] = NULL;
-	num = rte_distributor_get_pkt(d, id, buf, buf, num);
+	num = rte_distributor_get_pkt(d, id, buf, NULL, 0);
 	while (!quit) {
 		worker_stats[id].handled_packets += num;
@@ -284,6 +279,5 @@ handle_work_with_free_mbufs(void *arg)
 		for (i = 0; i < num; i++)
 			rte_pktmbuf_free(buf[i]);
-		num = rte_distributor_get_pkt(d,
-				id, buf, buf, num);
+		num = rte_distributor_get_pkt(d, id, buf, NULL, 0);
 	}
 	worker_stats[id].handled_packets += num;
@@ -343,5 +337,5 @@ handle_work_for_shutdown_test(void *arg)
 	struct rte_distributor *d = wp->dist;
 	unsigned int count = 0;
-	unsigned int num = 0;
+	unsigned int num;
 	unsigned int total = 0;
 	unsigned int i;
@@ -349,5 +343,5 @@ handle_work_for_shutdown_test(void *arg)
 	const unsigned int id = __sync_fetch_and_add(&worker_idx, 1);
 
-	num = rte_distributor_get_pkt(d, id, buf, buf, num);
+	num = rte_distributor_get_pkt(d, id, buf, NULL, 0);
 
 	/* wait for quit single globally, or for worker zero, wait
@@ -358,6 +352,5 @@ handle_work_for_shutdown_test(void *arg)
 		for (i = 0; i < num; i++)
 			rte_pktmbuf_free(buf[i]);
-		num = rte_distributor_get_pkt(d,
-				id, buf, buf, num);
+		num = rte_distributor_get_pkt(d, id, buf, NULL, 0);
 		total += num;
 	}
@@ -373,6 +366,5 @@ handle_work_for_shutdown_test(void *arg)
 			usleep(100);
 
-		num = rte_distributor_get_pkt(d,
-				id, buf, buf, num);
+		num = rte_distributor_get_pkt(d, id, buf, NULL, 0);
 
 		while (!quit) {
@@ -380,5 +372,5 @@ handle_work_for_shutdown_test(void *arg)
 			count += num;
 			rte_pktmbuf_free(pkt);
-			num = rte_distributor_get_pkt(d, id, buf, buf, num);
+			num = rte_distributor_get_pkt(d, id, buf, NULL, 0);
 		}
 		returned = rte_distributor_return_pkt(d,
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.352188647 +0000
+++ 0020-distributor-fix-buffer-use-after-free.patch	2020-11-18 16:33:37.926215060 +0000
@@ -1 +1 @@
-From 6bd951b48222caaa10a796057f617cab04f928b0 Mon Sep 17 00:00:00 2001
+From de6e48d0b37ccb04376af977abc27c2833f7364e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6bd951b48222caaa10a796057f617cab04f928b0 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -22 +22,0 @@
- app/test/test_distributor.c              | 28 +++++++++---------------
@@ -23,0 +24 @@
+ test/test/test_distributor.c             | 28 +++++++++---------------
@@ -26,4 +27,22 @@
-diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
-index ba1f81cf8d..52230d2504 100644
---- a/app/test/test_distributor.c
-+++ b/app/test/test_distributor.c
+diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
+index d1f8b14d2e..5f9dde8494 100644
+--- a/lib/librte_distributor/rte_distributor.c
++++ b/lib/librte_distributor/rte_distributor.c
+@@ -44,5 +44,5 @@ rte_distributor_request_pkt_v1705(struct rte_distributor *d,
+ 	if (unlikely(d->alg_type == RTE_DIST_ALG_SINGLE)) {
+ 		rte_distributor_request_pkt_v20(d->d_v20,
+-			worker_id, oldpkt[0]);
++			worker_id, count ? oldpkt[0] : NULL);
+ 		return;
+ 	}
+@@ -144,5 +144,5 @@ rte_distributor_get_pkt_v1705(struct rte_distributor *d,
+ 		if (return_count <= 1) {
+ 			pkts[0] = rte_distributor_get_pkt_v20(d->d_v20,
+-				worker_id, oldpkt[0]);
++				worker_id, return_count ? oldpkt[0] : NULL);
+ 			return (pkts[0]) ? 1 : 0;
+ 		} else
+diff --git a/test/test/test_distributor.c b/test/test/test_distributor.c
+index 6aa4e49e69..ae7eff5a91 100644
+--- a/test/test/test_distributor.c
++++ b/test/test/test_distributor.c
@@ -35 +54 @@
- 	unsigned int id = __atomic_fetch_add(&worker_idx, 1, __ATOMIC_RELAXED);
+ 	unsigned int id = __sync_fetch_and_add(&worker_idx, 1);
@@ -49 +68 @@
- 	unsigned int id = __atomic_fetch_add(&worker_idx, 1, __ATOMIC_RELAXED);
+ 	unsigned int id = __sync_fetch_and_add(&worker_idx, 1);
@@ -72,2 +91,2 @@
-@@ -350,5 +344,5 @@ handle_work_for_shutdown_test(void *arg)
- 			__ATOMIC_RELAXED);
+@@ -349,5 +343,5 @@ handle_work_for_shutdown_test(void *arg)
+ 	const unsigned int id = __sync_fetch_and_add(&worker_idx, 1);
@@ -79 +98 @@
-@@ -359,6 +353,5 @@ handle_work_for_shutdown_test(void *arg)
+@@ -358,6 +352,5 @@ handle_work_for_shutdown_test(void *arg)
@@ -87 +106 @@
-@@ -374,6 +367,5 @@ handle_work_for_shutdown_test(void *arg)
+@@ -373,6 +366,5 @@ handle_work_for_shutdown_test(void *arg)
@@ -95 +114 @@
-@@ -381,5 +373,5 @@ handle_work_for_shutdown_test(void *arg)
+@@ -380,5 +372,5 @@ handle_work_for_shutdown_test(void *arg)
@@ -102,18 +120,0 @@
-diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
-index d6d4350a28..93c90cf543 100644
---- a/lib/librte_distributor/rte_distributor.c
-+++ b/lib/librte_distributor/rte_distributor.c
-@@ -43,5 +43,5 @@ rte_distributor_request_pkt(struct rte_distributor *d,
- 	if (unlikely(d->alg_type == RTE_DIST_ALG_SINGLE)) {
- 		rte_distributor_request_pkt_single(d->d_single,
--			worker_id, oldpkt[0]);
-+			worker_id, count ? oldpkt[0] : NULL);
- 		return;
- 	}
-@@ -135,5 +135,5 @@ rte_distributor_get_pkt(struct rte_distributor *d,
- 		if (return_count <= 1) {
- 			pkts[0] = rte_distributor_get_pkt_single(d->d_single,
--				worker_id, oldpkt[0]);
-+				worker_id, return_count ? oldpkt[0] : NULL);
- 			return (pkts[0]) ? 1 : 0;
- 		} else


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

* [dpdk-stable] patch 'distributor: handle worker shutdown in burst mode' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (18 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix buffer use after free' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'test/distributor: fix shutdown of busy worker' " Kevin Traynor
                   ` (50 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/141297a40a2b246b1db303e610a5add938a53ac3

Thanks.

Kevin.

---
From 141297a40a2b246b1db303e610a5add938a53ac3 Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Sat, 17 Oct 2020 05:06:48 +0200
Subject: [PATCH] distributor: handle worker shutdown in burst mode

[ upstream commit 480d5a7c812eedad973dd7143e5fec8e092ff619 ]

The burst version of distributor implementation was missing proper
handling of worker shutdown. A worker processing packets received
from distributor can call rte_distributor_return_pkt() function
informing distributor that it want no more packets. Further calls to
rte_distributor_request_pkt() or rte_distributor_get_pkt() however
should inform distributor that new packets are requested again.

Lack of the proper implementation has caused that even after worker
informed about returning last packets, new packets were still sent
from distributor causing deadlocks as no one could get them on worker
side.

This patch adds handling shutdown of the worker in following way:
1) It fixes usage of RTE_DISTRIB_VALID_BUF handshake flag. This flag
was formerly unused in burst implementation and now it is used
for marking valid packets in retptr64 replacing invalid use
of RTE_DISTRIB_RETURN_BUF flag.
2) Uses RTE_DISTRIB_RETURN_BUF as a worker to distributor handshake
in retptr64 to indicate that worker has shutdown.
3) Worker that shuts down blocks also bufptr for itself with
RTE_DISTRIB_RETURN_BUF flag allowing distributor to retrieve any
in flight packets.
4) When distributor receives information about shutdown of a worker,
it: marks worker as not active; retrieves any in flight and backlog
packets and process them to different workers; unlocks bufptr64
by clearing RTE_DISTRIB_RETURN_BUF flag and allowing use in
the future if worker requests any new packets.
5) Do not allow to: send or add to backlog any packets for not
active workers. Such workers are also ignored if matched.
6) Adjust calls to handle_returns() and tags matching procedure
to react for possible activation deactivation of workers.

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

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
 lib/librte_distributor/rte_distributor.c      | 175 ++++++++++++++----
 .../rte_distributor_private.h                 |   3 +
 2 files changed, 146 insertions(+), 32 deletions(-)

diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
index 5f9dde8494..2673aa2649 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -53,5 +53,5 @@ rte_distributor_request_pkt_v1705(struct rte_distributor *d,
 	 */
 	while (unlikely(__atomic_load_n(retptr64, __ATOMIC_ACQUIRE)
-			& RTE_DISTRIB_GET_BUF)) {
+			& (RTE_DISTRIB_GET_BUF | RTE_DISTRIB_RETURN_BUF))) {
 		rte_pause();
 		uint64_t t = rte_rdtsc()+100;
@@ -69,9 +69,9 @@ rte_distributor_request_pkt_v1705(struct rte_distributor *d,
 		buf->retptr64[i] = 0;
 
-	/* Set Return bit for each packet returned */
+	/* Set VALID_BUF bit for each packet returned */
 	for (i = count; i-- > 0; )
 		buf->retptr64[i] =
 			(((int64_t)(uintptr_t)(oldpkt[i])) <<
-			RTE_DISTRIB_FLAG_BITS) | RTE_DISTRIB_RETURN_BUF;
+			RTE_DISTRIB_FLAG_BITS) | RTE_DISTRIB_VALID_BUF;
 
 	/*
@@ -103,9 +103,11 @@ rte_distributor_poll_pkt_v1705(struct rte_distributor *d,
 	}
 
-	/* If bit is set, return
+	/* If any of below bits is set, return.
+	 * GET_BUF is set when distributor hasn't sent any packets yet
+	 * RETURN_BUF is set when distributor must retrieve in-flight packets
 	 * Sync with distributor to acquire bufptrs
 	 */
 	if (__atomic_load_n(&(buf->bufptr64[0]), __ATOMIC_ACQUIRE)
-		& RTE_DISTRIB_GET_BUF)
+		& (RTE_DISTRIB_GET_BUF | RTE_DISTRIB_RETURN_BUF))
 		return -1;
 
@@ -119,5 +121,5 @@ rte_distributor_poll_pkt_v1705(struct rte_distributor *d,
 
 	/*
-	 * so now we've got the contents of the cacheline into an  array of
+	 * so now we've got the contents of the cacheline into an array of
 	 * mbuf pointers, so toggle the bit so scheduler can start working
 	 * on the next cacheline while we're working.
@@ -188,5 +190,5 @@ rte_distributor_return_pkt_v1705(struct rte_distributor *d,
 	 */
 	while (unlikely(__atomic_load_n(&(buf->retptr64[0]), __ATOMIC_RELAXED)
-			& RTE_DISTRIB_GET_BUF)) {
+			& (RTE_DISTRIB_GET_BUF | RTE_DISTRIB_RETURN_BUF))) {
 		rte_pause();
 		uint64_t t = rte_rdtsc()+100;
@@ -200,15 +202,23 @@ rte_distributor_return_pkt_v1705(struct rte_distributor *d,
 	for (i = 0; i < RTE_DIST_BURST_SIZE; i++)
 		/* Switch off the return bit first */
-		buf->retptr64[i] &= ~RTE_DISTRIB_RETURN_BUF;
+		buf->retptr64[i] = 0;
 
 	for (i = num; i-- > 0; )
 		buf->retptr64[i] = (((int64_t)(uintptr_t)oldpkt[i]) <<
-			RTE_DISTRIB_FLAG_BITS) | RTE_DISTRIB_RETURN_BUF;
+			RTE_DISTRIB_FLAG_BITS) | RTE_DISTRIB_VALID_BUF;
 
-	/* set the GET_BUF but even if we got no returns.
-	 * Sync with distributor on GET_BUF flag. Release retptrs.
+	/* Use RETURN_BUF on bufptr64 to notify distributor that
+	 * we won't read any mbufs from there even if GET_BUF is set.
+	 * This allows distributor to retrieve in-flight already sent packets.
+	 */
+	__atomic_or_fetch(&(buf->bufptr64[0]), RTE_DISTRIB_RETURN_BUF,
+		__ATOMIC_ACQ_REL);
+
+	/* set the RETURN_BUF on retptr64 even if we got no returns.
+	 * Sync with distributor on RETURN_BUF flag. Release retptrs.
+	 * Notify distributor that we don't request more packets any more.
 	 */
 	__atomic_store_n(&(buf->retptr64[0]),
-		buf->retptr64[0] | RTE_DISTRIB_GET_BUF, __ATOMIC_RELEASE);
+		buf->retptr64[0] | RTE_DISTRIB_RETURN_BUF, __ATOMIC_RELEASE);
 
 	return 0;
@@ -284,4 +294,57 @@ find_match_scalar(struct rte_distributor *d,
 }
 
+/*
+ * When worker called rte_distributor_return_pkt()
+ * and passed RTE_DISTRIB_RETURN_BUF handshake through retptr64,
+ * distributor must retrieve both inflight and backlog packets assigned
+ * to the worker and reprocess them to another worker.
+ */
+static void
+handle_worker_shutdown(struct rte_distributor *d, unsigned int wkr)
+{
+	struct rte_distributor_buffer *buf = &(d->bufs[wkr]);
+	/* double BURST size for storing both inflights and backlog */
+	struct rte_mbuf *pkts[RTE_DIST_BURST_SIZE * 2];
+	unsigned int pkts_count = 0;
+	unsigned int i;
+
+	/* If GET_BUF is cleared there are in-flight packets sent
+	 * to worker which does not require new packets.
+	 * They must be retrieved and assigned to another worker.
+	 */
+	if (!(__atomic_load_n(&(buf->bufptr64[0]), __ATOMIC_ACQUIRE)
+		& RTE_DISTRIB_GET_BUF))
+		for (i = 0; i < RTE_DIST_BURST_SIZE; i++)
+			if (buf->bufptr64[i] & RTE_DISTRIB_VALID_BUF)
+				pkts[pkts_count++] = (void *)((uintptr_t)
+					(buf->bufptr64[i]
+						>> RTE_DISTRIB_FLAG_BITS));
+
+	/* Make following operations on handshake flags on bufptr64:
+	 * - set GET_BUF to indicate that distributor can overwrite buffer
+	 *     with new packets if worker will make a new request.
+	 * - clear RETURN_BUF to unlock reads on worker side.
+	 */
+	__atomic_store_n(&(buf->bufptr64[0]), RTE_DISTRIB_GET_BUF,
+		__ATOMIC_RELEASE);
+
+	/* Collect backlog packets from worker */
+	for (i = 0; i < d->backlog[wkr].count; i++)
+		pkts[pkts_count++] = (void *)((uintptr_t)
+			(d->backlog[wkr].pkts[i] >> RTE_DISTRIB_FLAG_BITS));
+
+	d->backlog[wkr].count = 0;
+
+	/* Clear both inflight and backlog tags */
+	for (i = 0; i < RTE_DIST_BURST_SIZE; i++) {
+		d->in_flight_tags[wkr][i] = 0;
+		d->backlog[wkr].tags[i] = 0;
+	}
+
+	/* Recursive call */
+	if (pkts_count > 0)
+		rte_distributor_process(d, pkts, pkts_count);
+}
+
 
 /*
@@ -302,7 +365,7 @@ handle_returns(struct rte_distributor *d, unsigned int wkr)
 	/* Sync on GET_BUF flag. Acquire retptrs. */
 	if (__atomic_load_n(&(buf->retptr64[0]), __ATOMIC_ACQUIRE)
-		& RTE_DISTRIB_GET_BUF) {
+		& (RTE_DISTRIB_GET_BUF | RTE_DISTRIB_RETURN_BUF)) {
 		for (i = 0; i < RTE_DIST_BURST_SIZE; i++) {
-			if (buf->retptr64[i] & RTE_DISTRIB_RETURN_BUF) {
+			if (buf->retptr64[i] & RTE_DISTRIB_VALID_BUF) {
 				oldbuf = ((uintptr_t)(buf->retptr64[i] >>
 					RTE_DISTRIB_FLAG_BITS));
@@ -310,9 +373,23 @@ handle_returns(struct rte_distributor *d, unsigned int wkr)
 				store_return(oldbuf, d, &ret_start, &ret_count);
 				count++;
-				buf->retptr64[i] &= ~RTE_DISTRIB_RETURN_BUF;
+				buf->retptr64[i] &= ~RTE_DISTRIB_VALID_BUF;
 			}
 		}
 		d->returns.start = ret_start;
 		d->returns.count = ret_count;
+
+		/* If worker requested packets with GET_BUF, set it to active
+		 * otherwise (RETURN_BUF), set it to not active.
+		 */
+		d->activesum -= d->active[wkr];
+		d->active[wkr] = !!(buf->retptr64[0] & RTE_DISTRIB_GET_BUF);
+		d->activesum += d->active[wkr];
+
+		/* If worker returned packets without requesting new ones,
+		 * handle all in-flights and backlog packets assigned to it.
+		 */
+		if (unlikely(buf->retptr64[0] & RTE_DISTRIB_RETURN_BUF))
+			handle_worker_shutdown(d, wkr);
+
 		/* Clear for the worker to populate with more returns.
 		 * Sync with distributor on GET_BUF flag. Release retptrs.
@@ -339,4 +416,6 @@ release(struct rte_distributor *d, unsigned int wkr)
 
 	handle_returns(d, wkr);
+	if (unlikely(!d->active[wkr]))
+		return 0;
 
 	/* Sync with worker on GET_BUF flag */
@@ -344,4 +423,6 @@ release(struct rte_distributor *d, unsigned int wkr)
 		& RTE_DISTRIB_GET_BUF)) {
 		handle_returns(d, wkr);
+		if (unlikely(!d->active[wkr]))
+			return 0;
 		rte_pause();
 	}
@@ -383,5 +464,5 @@ rte_distributor_process_v1705(struct rte_distributor *d,
 	uint16_t new_tag = 0;
 	uint16_t flows[RTE_DIST_BURST_SIZE] __rte_cache_aligned;
-	unsigned int i, j, w, wid;
+	unsigned int i, j, w, wid, matching_required;
 
 	if (d->alg_type == RTE_DIST_ALG_SINGLE) {
@@ -390,9 +471,11 @@ rte_distributor_process_v1705(struct rte_distributor *d,
 	}
 
+	for (wid = 0 ; wid < d->num_workers; wid++)
+		handle_returns(d, wid);
+
 	if (unlikely(num_mbufs == 0)) {
 		/* Flush out all non-full cache-lines to workers. */
 		for (wid = 0 ; wid < d->num_workers; wid++) {
 			/* Sync with worker on GET_BUF flag. */
-			handle_returns(d, wid);
 			if (__atomic_load_n(&(d->bufs[wid].bufptr64[0]),
 				__ATOMIC_ACQUIRE) & RTE_DISTRIB_GET_BUF) {
@@ -404,4 +487,7 @@ rte_distributor_process_v1705(struct rte_distributor *d,
 	}
 
+	if (unlikely(!d->activesum))
+		return 0;
+
 	while (next_idx < num_mbufs) {
 		uint16_t matches[RTE_DIST_BURST_SIZE];
@@ -428,12 +514,22 @@ rte_distributor_process_v1705(struct rte_distributor *d,
 			flows[i] = 0;
 
-		switch (d->dist_match_fn) {
-		case RTE_DIST_MATCH_VECTOR:
-			find_match_vec(d, &flows[0], &matches[0]);
-			break;
-		default:
-			find_match_scalar(d, &flows[0], &matches[0]);
-		}
+		matching_required = 1;
 
+		for (j = 0; j < pkts; j++) {
+			if (unlikely(!d->activesum))
+				return next_idx;
+
+			if (unlikely(matching_required)) {
+				switch (d->dist_match_fn) {
+				case RTE_DIST_MATCH_VECTOR:
+					find_match_vec(d, &flows[0],
+						&matches[0]);
+					break;
+				default:
+					find_match_scalar(d, &flows[0],
+						&matches[0]);
+				}
+				matching_required = 0;
+			}
 		/*
 		 * Matches array now contain the intended worker ID (+1) of
@@ -442,6 +538,4 @@ rte_distributor_process_v1705(struct rte_distributor *d,
 		 */
 
-		for (j = 0; j < pkts; j++) {
-
 			next_mb = mbufs[next_idx++];
 			next_value = (((int64_t)(uintptr_t)next_mb) <<
@@ -463,5 +557,5 @@ rte_distributor_process_v1705(struct rte_distributor *d,
 			/* matches[j] = 0; */
 
-			if (matches[j]) {
+			if (matches[j] && d->active[matches[j]-1]) {
 				struct rte_distributor_backlog *bl =
 						&d->backlog[matches[j]-1];
@@ -469,4 +563,10 @@ rte_distributor_process_v1705(struct rte_distributor *d,
 						RTE_DIST_BURST_SIZE)) {
 					release(d, matches[j]-1);
+					if (!d->active[matches[j]-1]) {
+						j--;
+						next_idx--;
+						matching_required = 1;
+						continue;
+					}
 				}
 
@@ -478,9 +578,19 @@ rte_distributor_process_v1705(struct rte_distributor *d,
 
 			} else {
-				struct rte_distributor_backlog *bl =
-						&d->backlog[wkr];
+				struct rte_distributor_backlog *bl;
+
+				while (unlikely(!d->active[wkr]))
+					wkr = (wkr + 1) % d->num_workers;
+				bl = &d->backlog[wkr];
+
 				if (unlikely(bl->count ==
 						RTE_DIST_BURST_SIZE)) {
 					release(d, wkr);
+					if (!d->active[wkr]) {
+						j--;
+						next_idx--;
+						matching_required = 1;
+						continue;
+					}
 				}
 
@@ -501,7 +611,5 @@ rte_distributor_process_v1705(struct rte_distributor *d,
 			}
 		}
-		wkr++;
-		if (wkr >= d->num_workers)
-			wkr = 0;
+		wkr = (wkr + 1) % d->num_workers;
 	}
 
@@ -693,4 +801,7 @@ rte_distributor_create_v1705(const char *name,
 		d->backlog[i].tags = &d->in_flight_tags[i][RTE_DIST_BURST_SIZE];
 
+	memset(d->active, 0, sizeof(d->active));
+	d->activesum = 0;
+
 	dist_burst_list = RTE_TAILQ_CAST(rte_dist_burst_tailq.head,
 					  rte_dist_burst_list);
diff --git a/lib/librte_distributor/rte_distributor_private.h b/lib/librte_distributor/rte_distributor_private.h
index 33cd89410c..74f967b257 100644
--- a/lib/librte_distributor/rte_distributor_private.h
+++ b/lib/librte_distributor/rte_distributor_private.h
@@ -156,4 +156,7 @@ struct rte_distributor {
 
 	struct rte_distributor_v20 *d_v20;
+
+	uint8_t active[RTE_DISTRIB_MAX_WORKERS];
+	uint8_t activesum;
 };
 
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.370366899 +0000
+++ 0021-distributor-handle-worker-shutdown-in-burst-mode.patch	2020-11-18 16:33:37.927215061 +0000
@@ -1 +1 @@
-From 480d5a7c812eedad973dd7143e5fec8e092ff619 Mon Sep 17 00:00:00 2001
+From 141297a40a2b246b1db303e610a5add938a53ac3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 480d5a7c812eedad973dd7143e5fec8e092ff619 ]
+
@@ -39 +40,0 @@
-Cc: stable@dpdk.org
@@ -44,2 +45,2 @@
- lib/librte_distributor/distributor_private.h |   3 +
- lib/librte_distributor/rte_distributor.c     | 175 +++++++++++++++----
+ lib/librte_distributor/rte_distributor.c      | 175 ++++++++++++++----
+ .../rte_distributor_private.h                 |   3 +
@@ -48,12 +48,0 @@
-diff --git a/lib/librte_distributor/distributor_private.h b/lib/librte_distributor/distributor_private.h
-index 489aef2acb..689fe3e183 100644
---- a/lib/librte_distributor/distributor_private.h
-+++ b/lib/librte_distributor/distributor_private.h
-@@ -156,4 +156,7 @@ struct rte_distributor {
- 
- 	struct rte_distributor_single *d_single;
-+
-+	uint8_t active[RTE_DISTRIB_MAX_WORKERS];
-+	uint8_t activesum;
- };
- 
@@ -61 +50 @@
-index 93c90cf543..7aa079d53c 100644
+index 5f9dde8494..2673aa2649 100644
@@ -64 +53 @@
-@@ -52,5 +52,5 @@ rte_distributor_request_pkt(struct rte_distributor *d,
+@@ -53,5 +53,5 @@ rte_distributor_request_pkt_v1705(struct rte_distributor *d,
@@ -71 +60 @@
-@@ -68,9 +68,9 @@ rte_distributor_request_pkt(struct rte_distributor *d,
+@@ -69,9 +69,9 @@ rte_distributor_request_pkt_v1705(struct rte_distributor *d,
@@ -83 +72 @@
-@@ -98,9 +98,11 @@ rte_distributor_poll_pkt(struct rte_distributor *d,
+@@ -103,9 +103,11 @@ rte_distributor_poll_pkt_v1705(struct rte_distributor *d,
@@ -97 +86 @@
-@@ -114,5 +116,5 @@ rte_distributor_poll_pkt(struct rte_distributor *d,
+@@ -119,5 +121,5 @@ rte_distributor_poll_pkt_v1705(struct rte_distributor *d,
@@ -104 +93 @@
-@@ -174,5 +176,5 @@ rte_distributor_return_pkt(struct rte_distributor *d,
+@@ -188,5 +190,5 @@ rte_distributor_return_pkt_v1705(struct rte_distributor *d,
@@ -111 +100 @@
-@@ -186,15 +188,23 @@ rte_distributor_return_pkt(struct rte_distributor *d,
+@@ -200,15 +202,23 @@ rte_distributor_return_pkt_v1705(struct rte_distributor *d,
@@ -140 +129 @@
-@@ -266,4 +276,57 @@ find_match_scalar(struct rte_distributor *d,
+@@ -284,4 +294,57 @@ find_match_scalar(struct rte_distributor *d,
@@ -198 +187 @@
-@@ -284,7 +347,7 @@ handle_returns(struct rte_distributor *d, unsigned int wkr)
+@@ -302,7 +365,7 @@ handle_returns(struct rte_distributor *d, unsigned int wkr)
@@ -208 +197 @@
-@@ -292,9 +355,23 @@ handle_returns(struct rte_distributor *d, unsigned int wkr)
+@@ -310,9 +373,23 @@ handle_returns(struct rte_distributor *d, unsigned int wkr)
@@ -233 +222 @@
-@@ -321,4 +398,6 @@ release(struct rte_distributor *d, unsigned int wkr)
+@@ -339,4 +416,6 @@ release(struct rte_distributor *d, unsigned int wkr)
@@ -240 +229 @@
-@@ -326,4 +405,6 @@ release(struct rte_distributor *d, unsigned int wkr)
+@@ -344,4 +423,6 @@ release(struct rte_distributor *d, unsigned int wkr)
@@ -247 +236 @@
-@@ -365,5 +446,5 @@ rte_distributor_process(struct rte_distributor *d,
+@@ -383,5 +464,5 @@ rte_distributor_process_v1705(struct rte_distributor *d,
@@ -254 +243 @@
-@@ -373,9 +454,11 @@ rte_distributor_process(struct rte_distributor *d,
+@@ -390,9 +471,11 @@ rte_distributor_process_v1705(struct rte_distributor *d,
@@ -267 +256 @@
-@@ -387,4 +470,7 @@ rte_distributor_process(struct rte_distributor *d,
+@@ -404,4 +487,7 @@ rte_distributor_process_v1705(struct rte_distributor *d,
@@ -275 +264 @@
-@@ -411,12 +497,22 @@ rte_distributor_process(struct rte_distributor *d,
+@@ -428,12 +514,22 @@ rte_distributor_process_v1705(struct rte_distributor *d,
@@ -305 +294 @@
-@@ -425,6 +521,4 @@ rte_distributor_process(struct rte_distributor *d,
+@@ -442,6 +538,4 @@ rte_distributor_process_v1705(struct rte_distributor *d,
@@ -312 +301 @@
-@@ -446,5 +540,5 @@ rte_distributor_process(struct rte_distributor *d,
+@@ -463,5 +557,5 @@ rte_distributor_process_v1705(struct rte_distributor *d,
@@ -319 +308 @@
-@@ -452,4 +546,10 @@ rte_distributor_process(struct rte_distributor *d,
+@@ -469,4 +563,10 @@ rte_distributor_process_v1705(struct rte_distributor *d,
@@ -330 +319 @@
-@@ -461,9 +561,19 @@ rte_distributor_process(struct rte_distributor *d,
+@@ -478,9 +578,19 @@ rte_distributor_process_v1705(struct rte_distributor *d,
@@ -352 +341 @@
-@@ -484,7 +594,5 @@ rte_distributor_process(struct rte_distributor *d,
+@@ -501,7 +611,5 @@ rte_distributor_process_v1705(struct rte_distributor *d,
@@ -361 +350 @@
-@@ -662,4 +770,7 @@ rte_distributor_create(const char *name,
+@@ -693,4 +801,7 @@ rte_distributor_create_v1705(const char *name,
@@ -368,0 +358,12 @@
+diff --git a/lib/librte_distributor/rte_distributor_private.h b/lib/librte_distributor/rte_distributor_private.h
+index 33cd89410c..74f967b257 100644
+--- a/lib/librte_distributor/rte_distributor_private.h
++++ b/lib/librte_distributor/rte_distributor_private.h
+@@ -156,4 +156,7 @@ struct rte_distributor {
+ 
+ 	struct rte_distributor_v20 *d_v20;
++
++	uint8_t active[RTE_DISTRIB_MAX_WORKERS];
++	uint8_t activesum;
+ };
+ 


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

* [dpdk-stable] patch 'test/distributor: fix shutdown of busy worker' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (19 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: handle worker shutdown in burst mode' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix return pkt calls in single mode' " Kevin Traynor
                   ` (49 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/9759e36e4f000ff9b16a3681b3806b6c3efaf507

Thanks.

Kevin.

---
From 9759e36e4f000ff9b16a3681b3806b6c3efaf507 Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Sat, 17 Oct 2020 05:06:49 +0200
Subject: [PATCH] test/distributor: fix shutdown of busy worker

[ upstream commit cf669d6930116b80493d67cdc5d7a1a568eed8e9 ]

The sanity test with worker shutdown delegates all bufs
to be processed by a single lcore worker, then it freezes
one of the lcore workers and continues to send more bufs.
The freezed core shuts down first by calling
rte_distributor_return_pkt().

The test intention is to verify if packets assigned to
the shut down lcore will be reassigned to another worker.

However the shutdown core was not always the one, that was
processing packets. The lcore processing mbufs might be different
every time test is launched. This is caused by keeping the value
of wkr static variable in rte_distributor_process() function
between running test cases.

Test freezed always lcore with 0 id. The patch stores the id
of worker that is processing the data in zero_idx global atomic
variable. This way the freezed lcore is always the proper one.

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

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Tested-by: David Hunt <david.hunt@intel.com>
---
 test/test/test_distributor.c | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/test/test/test_distributor.c b/test/test/test_distributor.c
index ae7eff5a91..45b4b22b43 100644
--- a/test/test/test_distributor.c
+++ b/test/test/test_distributor.c
@@ -29,4 +29,5 @@ static volatile int quit;      /**< general quit variable for all threads */
 static volatile int zero_quit; /**< var for when we just want thr0 to quit*/
 static volatile unsigned worker_idx;
+static volatile unsigned zero_idx;
 
 struct worker_stats {
@@ -341,11 +342,20 @@ handle_work_for_shutdown_test(void *arg)
 	unsigned int i;
 	unsigned int returned = 0;
+	unsigned int zero_id = 0;
+	unsigned int zero_unset;
 	const unsigned int id = __sync_fetch_and_add(&worker_idx, 1);
 
 	num = rte_distributor_get_pkt(d, id, buf, NULL, 0);
 
+	if (num > 0) {
+		zero_unset = RTE_MAX_LCORE;
+		__atomic_compare_exchange_n(&zero_idx, &zero_unset, id,
+			0, __ATOMIC_ACQ_REL, __ATOMIC_ACQUIRE);
+	}
+	zero_id = __atomic_load_n(&zero_idx, __ATOMIC_ACQUIRE);
+
 	/* wait for quit single globally, or for worker zero, wait
 	 * for zero_quit */
-	while (!quit && !(id == 0 && zero_quit)) {
+	while (!quit && !(id == zero_id && zero_quit)) {
 		worker_stats[id].handled_packets += num;
 		count += num;
@@ -353,4 +363,12 @@ handle_work_for_shutdown_test(void *arg)
 			rte_pktmbuf_free(buf[i]);
 		num = rte_distributor_get_pkt(d, id, buf, NULL, 0);
+
+		if (num > 0) {
+			zero_unset = RTE_MAX_LCORE;
+			__atomic_compare_exchange_n(&zero_idx, &zero_unset, id,
+				0, __ATOMIC_ACQ_REL, __ATOMIC_ACQUIRE);
+		}
+		zero_id = __atomic_load_n(&zero_idx, __ATOMIC_ACQUIRE);
+
 		total += num;
 	}
@@ -359,5 +377,5 @@ handle_work_for_shutdown_test(void *arg)
 	returned = rte_distributor_return_pkt(d, id, buf, num);
 
-	if (id == 0) {
+	if (id == zero_id) {
 		/* for worker zero, allow it to restart to pick up last packet
 		 * when all workers are shutting down.
@@ -578,4 +596,5 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
 	quit = 0;
 	worker_idx = 0;
+	zero_idx = RTE_MAX_LCORE;
 }
 
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.387612492 +0000
+++ 0022-test-distributor-fix-shutdown-of-busy-worker.patch	2020-11-18 16:33:37.927215061 +0000
@@ -1 +1 @@
-From cf669d6930116b80493d67cdc5d7a1a568eed8e9 Mon Sep 17 00:00:00 2001
+From 9759e36e4f000ff9b16a3681b3806b6c3efaf507 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cf669d6930116b80493d67cdc5d7a1a568eed8e9 ]
+
@@ -26 +27,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
- app/test/test_distributor.c | 23 +++++++++++++++++++++--
+ test/test/test_distributor.c | 23 +++++++++++++++++++++--
@@ -34,4 +35,4 @@
-diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
-index 52230d2504..6cd7a2edda 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 ae7eff5a91..45b4b22b43 100644
+--- a/test/test/test_distributor.c
++++ b/test/test/test_distributor.c
@@ -44 +45 @@
-@@ -341,4 +342,6 @@ handle_work_for_shutdown_test(void *arg)
+@@ -341,11 +342,20 @@ handle_work_for_shutdown_test(void *arg)
@@ -49,3 +50,2 @@
- 	const unsigned int id = __atomic_fetch_add(&worker_idx, 1,
- 			__ATOMIC_RELAXED);
-@@ -346,7 +349,14 @@ handle_work_for_shutdown_test(void *arg)
+ 	const unsigned int id = __sync_fetch_and_add(&worker_idx, 1);
+ 
@@ -57 +57 @@
-+			false, __ATOMIC_ACQ_REL, __ATOMIC_ACQUIRE);
++			0, __ATOMIC_ACQ_REL, __ATOMIC_ACQUIRE);
@@ -67 +67 @@
-@@ -354,4 +364,12 @@ handle_work_for_shutdown_test(void *arg)
+@@ -353,4 +363,12 @@ handle_work_for_shutdown_test(void *arg)
@@ -74 +74 @@
-+				false, __ATOMIC_ACQ_REL, __ATOMIC_ACQUIRE);
++				0, __ATOMIC_ACQ_REL, __ATOMIC_ACQUIRE);
@@ -80 +80 @@
-@@ -360,5 +378,5 @@ handle_work_for_shutdown_test(void *arg)
+@@ -359,5 +377,5 @@ handle_work_for_shutdown_test(void *arg)
@@ -87 +87 @@
-@@ -579,4 +597,5 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
+@@ -578,4 +596,5 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)


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

* [dpdk-stable] patch 'distributor: fix return pkt calls in single mode' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (20 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'test/distributor: fix shutdown of busy worker' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'test/distributor: fix freeing mbufs' " Kevin Traynor
                   ` (48 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/5cf7042b21b9c2be3a839431ceb3856d4013217c

Thanks.

Kevin.

---
From 5cf7042b21b9c2be3a839431ceb3856d4013217c Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Sat, 17 Oct 2020 05:06:50 +0200
Subject: [PATCH] distributor: fix return pkt calls in single mode

[ upstream commit f25fe0d5e3e0dd1650845eca928f2263898f5a19 ]

In the single legacy version of the distributor synchronization
requires continues exchange of buffers between distributor
and workers. Empty buffers are sent if only handshake
synchronization is required.
However calls to the rte_distributor_return_pkt()
with 0 buffers in single mode were ignored and not passed to the
legacy algorithm implementation causing lack of synchronization.

This patch fixes this issue by passing NULL as buffer which is
a valid way of sending just synchronization handshakes
in single mode.

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

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
 lib/librte_distributor/rte_distributor.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
index 2673aa2649..873ca290dd 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -182,4 +182,7 @@ rte_distributor_return_pkt_v1705(struct rte_distributor *d,
 			return rte_distributor_return_pkt_v20(d->d_v20,
 				worker_id, oldpkt[0]);
+		else if (num == 0)
+			return rte_distributor_return_pkt_v20(d->d_v20,
+				worker_id, NULL);
 		else
 			return -EINVAL;
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.405291720 +0000
+++ 0023-distributor-fix-return-pkt-calls-in-single-mode.patch	2020-11-18 16:33:37.928215061 +0000
@@ -1 +1 @@
-From f25fe0d5e3e0dd1650845eca928f2263898f5a19 Mon Sep 17 00:00:00 2001
+From 5cf7042b21b9c2be3a839431ceb3856d4013217c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f25fe0d5e3e0dd1650845eca928f2263898f5a19 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 7aa079d53c..6e3eae58f8 100644
+index 2673aa2649..873ca290dd 100644
@@ -31,2 +32,2 @@
-@@ -168,4 +168,7 @@ rte_distributor_return_pkt(struct rte_distributor *d,
- 			return rte_distributor_return_pkt_single(d->d_single,
+@@ -182,4 +182,7 @@ rte_distributor_return_pkt_v1705(struct rte_distributor *d,
+ 			return rte_distributor_return_pkt_v20(d->d_v20,
@@ -35 +36 @@
-+			return rte_distributor_return_pkt_single(d->d_single,
++			return rte_distributor_return_pkt_v20(d->d_v20,


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

* [dpdk-stable] patch 'test/distributor: fix freeing mbufs' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (21 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix return pkt calls in single mode' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'test/distributor: fix lcores statistics' " Kevin Traynor
                   ` (47 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/2a9389bb63bba97f79d389dd806581388b2524f5

Thanks.

Kevin.

---
From 2a9389bb63bba97f79d389dd806581388b2524f5 Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Sat, 17 Oct 2020 05:06:51 +0200
Subject: [PATCH] test/distributor: fix freeing mbufs

[ upstream commit 13b13100eaf6de02e2be428dc4ff5099ba796ab5 ]

Sanity tests with mbuf alloc and shutdown tests assume that
mbufs passed to worker cores are freed in handlers.
Such packets should not be returned to the distributor's main
core. The only packets that should be returned are the packets
send after completion of the tests in quit_workers function.

This patch stops returning mbufs to distributor's core.
In case of shutdown tests it is impossible to determine
how worker and distributor threads would synchronize.
Packets used by tests should be freed and packets used during
quit_workers() shouldn't. That's why returning mbufs to mempool
is moved to test procedure run on distributor thread
from worker threads.

Additionally this patch cleans up unused variables.

Fixes: c0de0eb82e40 ("distributor: switch over to new API")

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
 test/test/test_distributor.c | 67 ++++++++++++++++++------------------
 1 file changed, 33 insertions(+), 34 deletions(-)

diff --git a/test/test/test_distributor.c b/test/test/test_distributor.c
index 45b4b22b43..d13e38f062 100644
--- a/test/test/test_distributor.c
+++ b/test/test/test_distributor.c
@@ -64,5 +64,5 @@ handle_work(void *arg)
 	struct worker_params *wp = arg;
 	struct rte_distributor *db = wp->dist;
-	unsigned int count = 0, num;
+	unsigned int num;
 	unsigned int id = __sync_fetch_and_add(&worker_idx, 1);
 
@@ -71,5 +71,4 @@ handle_work(void *arg)
 		__atomic_fetch_add(&worker_stats[id].handled_packets, num,
 				__ATOMIC_RELAXED);
-		count += num;
 		num = rte_distributor_get_pkt(db, id,
 				buf, buf, num);
@@ -77,5 +76,4 @@ handle_work(void *arg)
 	__atomic_fetch_add(&worker_stats[id].handled_packets, num,
 			__ATOMIC_RELAXED);
-	count += num;
 	rte_distributor_return_pkt(db, id, buf, num);
 	return 0;
@@ -269,5 +267,4 @@ handle_work_with_free_mbufs(void *arg)
 	struct worker_params *wp = arg;
 	struct rte_distributor *d = wp->dist;
-	unsigned int count = 0;
 	unsigned int i;
 	unsigned int num;
@@ -277,5 +274,4 @@ handle_work_with_free_mbufs(void *arg)
 	while (!quit) {
 		worker_stats[id].handled_packets += num;
-		count += num;
 		for (i = 0; i < num; i++)
 			rte_pktmbuf_free(buf[i]);
@@ -283,5 +279,4 @@ handle_work_with_free_mbufs(void *arg)
 	}
 	worker_stats[id].handled_packets += num;
-	count += num;
 	rte_distributor_return_pkt(d, id, buf, num);
 	return 0;
@@ -309,5 +304,4 @@ sanity_test_with_mbuf_alloc(struct worker_params *wp, struct rte_mempool *p)
 		for (j = 0; j < BURST; j++) {
 			bufs[j]->hash.usr = (i+j) << 1;
-			rte_mbuf_refcnt_set(bufs[j], 1);
 		}
 
@@ -333,13 +327,8 @@ static int
 handle_work_for_shutdown_test(void *arg)
 {
-	struct rte_mbuf *pkt = NULL;
 	struct rte_mbuf *buf[8] __rte_cache_aligned;
 	struct worker_params *wp = arg;
 	struct rte_distributor *d = wp->dist;
-	unsigned int count = 0;
 	unsigned int num;
-	unsigned int total = 0;
-	unsigned int i;
-	unsigned int returned = 0;
 	unsigned int zero_id = 0;
 	unsigned int zero_unset;
@@ -359,7 +348,4 @@ handle_work_for_shutdown_test(void *arg)
 	while (!quit && !(id == zero_id && zero_quit)) {
 		worker_stats[id].handled_packets += num;
-		count += num;
-		for (i = 0; i < num; i++)
-			rte_pktmbuf_free(buf[i]);
 		num = rte_distributor_get_pkt(d, id, buf, NULL, 0);
 
@@ -370,12 +356,10 @@ handle_work_for_shutdown_test(void *arg)
 		}
 		zero_id = __atomic_load_n(&zero_idx, __ATOMIC_ACQUIRE);
-
-		total += num;
 	}
 	worker_stats[id].handled_packets += num;
-	count += num;
-	returned = rte_distributor_return_pkt(d, id, buf, num);
 
 	if (id == zero_id) {
+		rte_distributor_return_pkt(d, id, NULL, 0);
+
 		/* for worker zero, allow it to restart to pick up last packet
 		 * when all workers are shutting down.
@@ -388,12 +372,8 @@ handle_work_for_shutdown_test(void *arg)
 		while (!quit) {
 			worker_stats[id].handled_packets += num;
-			count += num;
-			rte_pktmbuf_free(pkt);
 			num = rte_distributor_get_pkt(d, id, buf, NULL, 0);
 		}
-		returned = rte_distributor_return_pkt(d,
-				id, buf, num);
-		printf("Num returned = %d\n", returned);
 	}
+	rte_distributor_return_pkt(d, id, buf, num);
 	return 0;
 }
@@ -411,5 +391,7 @@ sanity_test_with_worker_shutdown(struct worker_params *wp,
 	struct rte_distributor *d = wp->dist;
 	struct rte_mbuf *bufs[BURST];
-	unsigned i;
+	struct rte_mbuf *bufs2[BURST];
+	unsigned int i;
+	unsigned int failed = 0;
 
 	printf("=== Sanity test of worker shutdown ===\n");
@@ -437,14 +419,15 @@ sanity_test_with_worker_shutdown(struct worker_params *wp,
 
 	/* get more buffers to queue up, again setting them to the same flow */
-	if (rte_mempool_get_bulk(p, (void *)bufs, BURST) != 0) {
+	if (rte_mempool_get_bulk(p, (void *)bufs2, BURST) != 0) {
 		printf("line %d: Error getting mbufs from pool\n", __LINE__);
+		rte_mempool_put_bulk(p, (void *)bufs, BURST);
 		return -1;
 	}
 	for (i = 0; i < BURST; i++)
-		bufs[i]->hash.usr = 1;
+		bufs2[i]->hash.usr = 1;
 
 	/* get worker zero to quit */
 	zero_quit = 1;
-	rte_distributor_process(d, bufs, BURST);
+	rte_distributor_process(d, bufs2, BURST);
 
 	/* flush the distributor */
@@ -460,7 +443,13 @@ sanity_test_with_worker_shutdown(struct worker_params *wp,
 				"Expected %u, got %u\n",
 				__LINE__, BURST * 2, total_packet_count());
-		return -1;
+		failed = 1;
 	}
 
+	rte_mempool_put_bulk(p, (void *)bufs, BURST);
+	rte_mempool_put_bulk(p, (void *)bufs2, BURST);
+
+	if (failed)
+		return -1;
+
 	printf("Sanity test with worker shutdown passed\n\n");
 	return 0;
@@ -476,5 +465,6 @@ test_flush_with_worker_shutdown(struct worker_params *wp,
 	struct rte_distributor *d = wp->dist;
 	struct rte_mbuf *bufs[BURST];
-	unsigned i;
+	unsigned int i;
+	unsigned int failed = 0;
 
 	printf("=== Test flush fn with worker shutdown (%s) ===\n", wp->name);
@@ -513,7 +503,12 @@ test_flush_with_worker_shutdown(struct worker_params *wp,
 				"Expected %u, got %u\n",
 				__LINE__, BURST, total_packet_count());
-		return -1;
+		failed = 1;
 	}
 
+	rte_mempool_put_bulk(p, (void *)bufs, BURST);
+
+	if (failed)
+		return -1;
+
 	printf("Flush test with worker shutdown passed\n\n");
 	return 0;
@@ -581,5 +576,8 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
 	unsigned i;
 	struct rte_mbuf *bufs[RTE_MAX_LCORE];
-	rte_mempool_get_bulk(p, (void *)bufs, num_workers);
+	if (rte_mempool_get_bulk(p, (void *)bufs, num_workers) != 0) {
+		printf("line %d: Error getting mbufs from pool\n", __LINE__);
+		return;
+	}
 
 	zero_quit = 0;
@@ -589,9 +587,10 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
 	rte_distributor_process(d, bufs, num_workers);
 
-	rte_mempool_put_bulk(p, (void *)bufs, num_workers);
-
 	rte_distributor_process(d, NULL, 0);
 	rte_distributor_flush(d);
 	rte_eal_mp_wait_lcore();
+
+	rte_mempool_put_bulk(p, (void *)bufs, num_workers);
+
 	quit = 0;
 	worker_idx = 0;
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.421356226 +0000
+++ 0024-test-distributor-fix-freeing-mbufs.patch	2020-11-18 16:33:37.929215062 +0000
@@ -1 +1 @@
-From 13b13100eaf6de02e2be428dc4ff5099ba796ab5 Mon Sep 17 00:00:00 2001
+From 2a9389bb63bba97f79d389dd806581388b2524f5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 13b13100eaf6de02e2be428dc4ff5099ba796ab5 ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
- app/test/test_distributor.c | 67 ++++++++++++++++++-------------------
+ test/test/test_distributor.c | 67 ++++++++++++++++++------------------
@@ -31,4 +32,4 @@
-diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
-index 6cd7a2edda..ec1fe348ba 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 45b4b22b43..d13e38f062 100644
+--- a/test/test/test_distributor.c
++++ b/test/test/test_distributor.c
@@ -40 +41 @@
- 	unsigned int id = __atomic_fetch_add(&worker_idx, 1, __ATOMIC_RELAXED);
+ 	unsigned int id = __sync_fetch_and_add(&worker_idx, 1);
@@ -92 +93 @@
-@@ -360,7 +349,4 @@ handle_work_for_shutdown_test(void *arg)
+@@ -359,7 +348,4 @@ handle_work_for_shutdown_test(void *arg)
@@ -100 +101 @@
-@@ -371,12 +357,10 @@ handle_work_for_shutdown_test(void *arg)
+@@ -370,12 +356,10 @@ handle_work_for_shutdown_test(void *arg)
@@ -115 +116 @@
-@@ -389,12 +373,8 @@ handle_work_for_shutdown_test(void *arg)
+@@ -388,12 +372,8 @@ handle_work_for_shutdown_test(void *arg)
@@ -129 +130 @@
-@@ -412,5 +392,7 @@ sanity_test_with_worker_shutdown(struct worker_params *wp,
+@@ -411,5 +391,7 @@ sanity_test_with_worker_shutdown(struct worker_params *wp,
@@ -138 +139 @@
-@@ -438,14 +420,15 @@ sanity_test_with_worker_shutdown(struct worker_params *wp,
+@@ -437,14 +419,15 @@ sanity_test_with_worker_shutdown(struct worker_params *wp,
@@ -157 +158 @@
-@@ -461,7 +444,13 @@ sanity_test_with_worker_shutdown(struct worker_params *wp,
+@@ -460,7 +443,13 @@ sanity_test_with_worker_shutdown(struct worker_params *wp,
@@ -172 +173 @@
-@@ -477,5 +466,6 @@ test_flush_with_worker_shutdown(struct worker_params *wp,
+@@ -476,5 +465,6 @@ test_flush_with_worker_shutdown(struct worker_params *wp,
@@ -180 +181 @@
-@@ -514,7 +504,12 @@ test_flush_with_worker_shutdown(struct worker_params *wp,
+@@ -513,7 +503,12 @@ test_flush_with_worker_shutdown(struct worker_params *wp,
@@ -194 +195 @@
-@@ -582,5 +577,8 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
+@@ -581,5 +576,8 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
@@ -204 +205 @@
-@@ -590,9 +588,10 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
+@@ -589,9 +587,10 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)


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

* [dpdk-stable] patch 'test/distributor: fix lcores statistics' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (22 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'test/distributor: fix freeing mbufs' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'test/distributor: collect return mbufs' " Kevin Traynor
                   ` (46 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/4852ea2b3d0cbd694b1515fb3bc58a1cc3320a02

Thanks.

Kevin.

---
From 4852ea2b3d0cbd694b1515fb3bc58a1cc3320a02 Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Sat, 17 Oct 2020 05:06:52 +0200
Subject: [PATCH] test/distributor: fix lcores statistics

[ upstream commit 2dfdfcb404493a781d152afbc85a2a8a5b90580b ]

Statistics of handled packets are cleared and read on main lcore,
while they are increased in workers handlers on different lcores.

Without synchronization occasionally showed invalid values.
This patch uses atomic mechanisms to synchronize.
Relaxed memory model is used.

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

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 test/test/test_distributor.c | 39 +++++++++++++++++++++++++-----------
 1 file changed, 27 insertions(+), 12 deletions(-)

diff --git a/test/test/test_distributor.c b/test/test/test_distributor.c
index d13e38f062..d8e007c47b 100644
--- a/test/test/test_distributor.c
+++ b/test/test/test_distributor.c
@@ -44,5 +44,6 @@ total_packet_count(void)
 	unsigned i, count = 0;
 	for (i = 0; i < worker_idx; i++)
-		count += worker_stats[i].handled_packets;
+		count += __atomic_load_n(&worker_stats[i].handled_packets,
+				__ATOMIC_RELAXED);
 	return count;
 }
@@ -52,5 +53,8 @@ static inline void
 clear_packet_count(void)
 {
-	memset(&worker_stats, 0, sizeof(worker_stats));
+	unsigned int i;
+	for (i = 0; i < RTE_MAX_LCORE; i++)
+		__atomic_store_n(&worker_stats[i].handled_packets, 0,
+			__ATOMIC_RELAXED);
 }
 
@@ -130,5 +134,6 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 	for (i = 0; i < rte_lcore_count() - 1; i++)
 		printf("Worker %u handled %u packets\n", i,
-				worker_stats[i].handled_packets);
+			__atomic_load_n(&worker_stats[i].handled_packets,
+					__ATOMIC_RELAXED));
 	printf("Sanity test with all zero hashes done.\n");
 
@@ -155,5 +160,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 		for (i = 0; i < rte_lcore_count() - 1; i++)
 			printf("Worker %u handled %u packets\n", i,
-					worker_stats[i].handled_packets);
+				__atomic_load_n(
+					&worker_stats[i].handled_packets,
+					__ATOMIC_RELAXED));
 		printf("Sanity test with two hash values done\n");
 	}
@@ -181,5 +188,6 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 	for (i = 0; i < rte_lcore_count() - 1; i++)
 		printf("Worker %u handled %u packets\n", i,
-				worker_stats[i].handled_packets);
+			__atomic_load_n(&worker_stats[i].handled_packets,
+					__ATOMIC_RELAXED));
 	printf("Sanity test with non-zero hashes done\n");
 
@@ -273,10 +281,12 @@ handle_work_with_free_mbufs(void *arg)
 	num = rte_distributor_get_pkt(d, id, buf, NULL, 0);
 	while (!quit) {
-		worker_stats[id].handled_packets += num;
+		__atomic_fetch_add(&worker_stats[id].handled_packets, num,
+				__ATOMIC_RELAXED);
 		for (i = 0; i < num; i++)
 			rte_pktmbuf_free(buf[i]);
 		num = rte_distributor_get_pkt(d, id, buf, NULL, 0);
 	}
-	worker_stats[id].handled_packets += num;
+	__atomic_fetch_add(&worker_stats[id].handled_packets, num,
+			__ATOMIC_RELAXED);
 	rte_distributor_return_pkt(d, id, buf, num);
 	return 0;
@@ -347,5 +357,6 @@ handle_work_for_shutdown_test(void *arg)
 	 * for zero_quit */
 	while (!quit && !(id == zero_id && zero_quit)) {
-		worker_stats[id].handled_packets += num;
+		__atomic_fetch_add(&worker_stats[id].handled_packets, num,
+				__ATOMIC_RELAXED);
 		num = rte_distributor_get_pkt(d, id, buf, NULL, 0);
 
@@ -357,6 +368,7 @@ handle_work_for_shutdown_test(void *arg)
 		zero_id = __atomic_load_n(&zero_idx, __ATOMIC_ACQUIRE);
 	}
-	worker_stats[id].handled_packets += num;
 
+	__atomic_fetch_add(&worker_stats[id].handled_packets, num,
+			__ATOMIC_RELAXED);
 	if (id == zero_id) {
 		rte_distributor_return_pkt(d, id, NULL, 0);
@@ -371,5 +383,6 @@ handle_work_for_shutdown_test(void *arg)
 
 		while (!quit) {
-			worker_stats[id].handled_packets += num;
+			__atomic_fetch_add(&worker_stats[id].handled_packets,
+					num, __ATOMIC_RELAXED);
 			num = rte_distributor_get_pkt(d, id, buf, NULL, 0);
 		}
@@ -437,5 +450,6 @@ sanity_test_with_worker_shutdown(struct worker_params *wp,
 	for (i = 0; i < rte_lcore_count() - 1; i++)
 		printf("Worker %u handled %u packets\n", i,
-				worker_stats[i].handled_packets);
+			__atomic_load_n(&worker_stats[i].handled_packets,
+					__ATOMIC_RELAXED));
 
 	if (total_packet_count() != BURST * 2) {
@@ -497,5 +511,6 @@ test_flush_with_worker_shutdown(struct worker_params *wp,
 	for (i = 0; i < rte_lcore_count() - 1; i++)
 		printf("Worker %u handled %u packets\n", i,
-				worker_stats[i].handled_packets);
+			__atomic_load_n(&worker_stats[i].handled_packets,
+					__ATOMIC_RELAXED));
 
 	if (total_packet_count() != BURST) {
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.438541184 +0000
+++ 0025-test-distributor-fix-lcores-statistics.patch	2020-11-18 16:33:37.929215062 +0000
@@ -1 +1 @@
-From 2dfdfcb404493a781d152afbc85a2a8a5b90580b Mon Sep 17 00:00:00 2001
+From 4852ea2b3d0cbd694b1515fb3bc58a1cc3320a02 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2dfdfcb404493a781d152afbc85a2a8a5b90580b ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
- app/test/test_distributor.c | 39 +++++++++++++++++++++++++------------
+ test/test/test_distributor.c | 39 +++++++++++++++++++++++++-----------
@@ -23,4 +24,4 @@
-diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
-index ec1fe348ba..4343efed14 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 d13e38f062..d8e007c47b 100644
+--- a/test/test/test_distributor.c
++++ b/test/test/test_distributor.c
@@ -85 +86 @@
-@@ -348,5 +358,6 @@ handle_work_for_shutdown_test(void *arg)
+@@ -347,5 +357,6 @@ handle_work_for_shutdown_test(void *arg)
@@ -93 +94 @@
-@@ -358,6 +369,7 @@ handle_work_for_shutdown_test(void *arg)
+@@ -357,6 +368,7 @@ handle_work_for_shutdown_test(void *arg)
@@ -102 +103 @@
-@@ -372,5 +384,6 @@ handle_work_for_shutdown_test(void *arg)
+@@ -371,5 +383,6 @@ handle_work_for_shutdown_test(void *arg)
@@ -110 +111 @@
-@@ -438,5 +451,6 @@ sanity_test_with_worker_shutdown(struct worker_params *wp,
+@@ -437,5 +450,6 @@ sanity_test_with_worker_shutdown(struct worker_params *wp,
@@ -118 +119 @@
-@@ -498,5 +512,6 @@ test_flush_with_worker_shutdown(struct worker_params *wp,
+@@ -497,5 +511,6 @@ test_flush_with_worker_shutdown(struct worker_params *wp,


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

* [dpdk-stable] patch 'test/distributor: collect return mbufs' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (23 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'test/distributor: fix lcores statistics' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix API documentation' " Kevin Traynor
                   ` (45 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/6a938ac29a5f2962ec44bbd947807bedf064da82

Thanks.

Kevin.

---
From 6a938ac29a5f2962ec44bbd947807bedf064da82 Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Sat, 17 Oct 2020 05:06:53 +0200
Subject: [PATCH] test/distributor: collect return mbufs

[ upstream commit 79c5e12ac29567ed6c1750f732f04619c2a9cc7a ]

During quit_workers function distributor's main core processes
some packets to wake up pending worker cores so they can quit.
As quit_workers acts also as a cleanup procedure for next test
case it should also collect these packets returned by workers'
handlers, so the cyclic buffer with returned packets
in distributor remains empty.

Fixes: c3eabff124e6 ("distributor: add unit tests")
Fixes: c0de0eb82e40 ("distributor: switch over to new API")

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
 test/test/test_distributor.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/test/test_distributor.c b/test/test/test_distributor.c
index d8e007c47b..43fd231904 100644
--- a/test/test/test_distributor.c
+++ b/test/test/test_distributor.c
@@ -591,4 +591,5 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
 	unsigned i;
 	struct rte_mbuf *bufs[RTE_MAX_LCORE];
+	struct rte_mbuf *returns[RTE_MAX_LCORE];
 	if (rte_mempool_get_bulk(p, (void *)bufs, num_workers) != 0) {
 		printf("line %d: Error getting mbufs from pool\n", __LINE__);
@@ -606,4 +607,8 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
 	rte_eal_mp_wait_lcore();
 
+	while (rte_distributor_returned_pkts(d, returns, RTE_MAX_LCORE))
+		;
+
+	rte_distributor_clear_returns(d);
 	rte_mempool_put_bulk(p, (void *)bufs, num_workers);
 
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.456246720 +0000
+++ 0026-test-distributor-collect-return-mbufs.patch	2020-11-18 16:33:37.930215063 +0000
@@ -1 +1 @@
-From 79c5e12ac29567ed6c1750f732f04619c2a9cc7a Mon Sep 17 00:00:00 2001
+From 6a938ac29a5f2962ec44bbd947807bedf064da82 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 79c5e12ac29567ed6c1750f732f04619c2a9cc7a ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
- app/test/test_distributor.c | 5 +++++
+ test/test/test_distributor.c | 5 +++++
@@ -23,5 +24,5 @@
-diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
-index 4343efed14..3f0aeb7b90 100644
---- a/app/test/test_distributor.c
-+++ b/app/test/test_distributor.c
-@@ -592,4 +592,5 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
+diff --git a/test/test/test_distributor.c b/test/test/test_distributor.c
+index d8e007c47b..43fd231904 100644
+--- a/test/test/test_distributor.c
++++ b/test/test/test_distributor.c
+@@ -591,4 +591,5 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
@@ -33 +34 @@
-@@ -607,4 +608,8 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
+@@ -606,4 +607,8 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)


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

* [dpdk-stable] patch 'distributor: fix API documentation' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (24 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'test/distributor: collect return mbufs' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'test/distributor: fix race conditions on shutdown' " Kevin Traynor
                   ` (44 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/eda0d430f943c689cb0087d23a5fc979cae74bc3

Thanks.

Kevin.

---
From eda0d430f943c689cb0087d23a5fc979cae74bc3 Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Sat, 17 Oct 2020 05:06:54 +0200
Subject: [PATCH] distributor: fix API documentation

[ upstream commit ed4be82d9e645c86ccd16938bdb200cdecaa2906 ]

After introducing burst API there were some artefacts in the
API documentation from legacy single API.
Also the rte_distributor_poll_pkt() function return values
mismatched the implementation.

Fixes: c0de0eb82e40 ("distributor: switch over to new API")

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
 lib/librte_distributor/rte_distributor.h | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/lib/librte_distributor/rte_distributor.h b/lib/librte_distributor/rte_distributor.h
index 327c0c4ab2..a073e64612 100644
--- a/lib/librte_distributor/rte_distributor.h
+++ b/lib/librte_distributor/rte_distributor.h
@@ -156,5 +156,5 @@ rte_distributor_clear_returns(struct rte_distributor *d);
  *   The mbufs pointer array to be filled in (up to 8 packets)
  * @param oldpkt
- *   The previous packet, if any, being processed by the worker
+ *   The previous packets, if any, being processed by the worker
  * @param retcount
  *   The number of packets being returned
@@ -188,13 +188,13 @@ rte_distributor_return_pkt(struct rte_distributor *d,
 /**
  * API called by a worker to request a new packet to process.
- * Any previous packet given to the worker is assumed to have completed
+ * Any previous packets given to the worker are assumed to have completed
  * processing, and may be optionally returned to the distributor via
  * the oldpkt parameter.
- * Unlike rte_distributor_get_pkt_burst(), this function does not wait for a
- * new packet to be provided by the distributor.
+ * Unlike rte_distributor_get_pkt(), this function does not wait for
+ * new packets to be provided by the distributor.
  *
- * NOTE: after calling this function, rte_distributor_poll_pkt_burst() should
- * be used to poll for the packet requested. The rte_distributor_get_pkt_burst()
- * API should *not* be used to try and retrieve the new packet.
+ * NOTE: after calling this function, rte_distributor_poll_pkt() should
+ * be used to poll for the packets requested. The rte_distributor_get_pkt()
+ * API should *not* be used to try and retrieve the new packets.
  *
  * @param d
@@ -214,7 +214,7 @@ rte_distributor_request_pkt(struct rte_distributor *d,
 
 /**
- * API called by a worker to check for a new packet that was previously
+ * API called by a worker to check for new packets that were previously
  * requested by a call to rte_distributor_request_pkt(). It does not wait
- * for the new packet to be available, but returns NULL if the request has
+ * for the new packets to be available, but returns if the request has
  * not yet been fulfilled by the distributor.
  *
@@ -228,6 +228,7 @@ rte_distributor_request_pkt(struct rte_distributor *d,
  *
  * @return
- *   The number of packets being given to the worker thread, zero if no
- *   packet is yet available.
+ *   The number of packets being given to the worker thread,
+ *   -1 if no packets are yet available (burst API - RTE_DIST_ALG_BURST)
+ *   0 if no packets are yet available (legacy single API - RTE_DIST_ALG_SINGLE)
  */
 int
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.472634556 +0000
+++ 0027-distributor-fix-API-documentation.patch	2020-11-18 16:33:37.930215063 +0000
@@ -1 +1 @@
-From ed4be82d9e645c86ccd16938bdb200cdecaa2906 Mon Sep 17 00:00:00 2001
+From eda0d430f943c689cb0087d23a5fc979cae74bc3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ed4be82d9e645c86ccd16938bdb200cdecaa2906 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org


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

* [dpdk-stable] patch 'test/distributor: fix race conditions on shutdown' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (25 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix API documentation' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix scalar matching' " Kevin Traynor
                   ` (43 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/f7b94e1e83274916f3ed163fcf5ebe02d93bb17c

Thanks.

Kevin.

---
From f7b94e1e83274916f3ed163fcf5ebe02d93bb17c Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Sat, 17 Oct 2020 05:06:55 +0200
Subject: [PATCH] test/distributor: fix race conditions on shutdown

[ upstream commit 92e69743ed18692a1470396c4e7e47246c2191a5 ]

Instead of making delays in test code and waiting
for worker hopefully to reach proper states,
synchronize worker shutdown test cases with spin lock
on atomic variable.

Fixes: c0de0eb82e40 ("distributor: switch over to new API")

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
 test/test/test_distributor.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/test/test/test_distributor.c b/test/test/test_distributor.c
index 43fd231904..459f75b96a 100644
--- a/test/test/test_distributor.c
+++ b/test/test/test_distributor.c
@@ -28,4 +28,5 @@ struct worker_params worker_params;
 static volatile int quit;      /**< general quit variable for all threads */
 static volatile int zero_quit; /**< var for when we just want thr0 to quit*/
+static volatile int zero_sleep; /**< thr0 has quit basic loop and is sleeping*/
 static volatile unsigned worker_idx;
 static volatile unsigned zero_idx;
@@ -377,6 +378,8 @@ handle_work_for_shutdown_test(void *arg)
 		 * when all workers are shutting down.
 		 */
+		__atomic_store_n(&zero_sleep, 1, __ATOMIC_RELEASE);
 		while (zero_quit)
 			usleep(100);
+		__atomic_store_n(&zero_sleep, 0, __ATOMIC_RELEASE);
 
 		num = rte_distributor_get_pkt(d, id, buf, NULL, 0);
@@ -446,5 +449,10 @@ sanity_test_with_worker_shutdown(struct worker_params *wp,
 	/* flush the distributor */
 	rte_distributor_flush(d);
-	rte_delay_us(10000);
+	while (!__atomic_load_n(&zero_sleep, __ATOMIC_ACQUIRE))
+		rte_distributor_flush(d);
+
+	zero_quit = 0;
+	while (__atomic_load_n(&zero_sleep, __ATOMIC_ACQUIRE))
+		rte_delay_us(100);
 
 	for (i = 0; i < rte_lcore_count() - 1; i++)
@@ -506,7 +514,12 @@ test_flush_with_worker_shutdown(struct worker_params *wp,
 	rte_distributor_flush(d);
 
-	rte_delay_us(10000);
+	while (!__atomic_load_n(&zero_sleep, __ATOMIC_ACQUIRE))
+		rte_distributor_flush(d);
 
 	zero_quit = 0;
+
+	while (__atomic_load_n(&zero_sleep, __ATOMIC_ACQUIRE))
+		rte_delay_us(100);
+
 	for (i = 0; i < rte_lcore_count() - 1; i++)
 		printf("Worker %u handled %u packets\n", i,
@@ -616,4 +629,6 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
 	worker_idx = 0;
 	zero_idx = RTE_MAX_LCORE;
+	zero_quit = 0;
+	zero_sleep = 0;
 }
 
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.489536518 +0000
+++ 0028-test-distributor-fix-race-conditions-on-shutdown.patch	2020-11-18 16:33:37.931215063 +0000
@@ -1 +1 @@
-From 92e69743ed18692a1470396c4e7e47246c2191a5 Mon Sep 17 00:00:00 2001
+From f7b94e1e83274916f3ed163fcf5ebe02d93bb17c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 92e69743ed18692a1470396c4e7e47246c2191a5 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
- app/test/test_distributor.c | 19 +++++++++++++++++--
+ test/test/test_distributor.c | 19 +++++++++++++++++--
@@ -20,4 +21,4 @@
-diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
-index 3f0aeb7b90..fdb6ea9ceb 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 43fd231904..459f75b96a 100644
+--- a/test/test/test_distributor.c
++++ b/test/test/test_distributor.c
@@ -30 +31 @@
-@@ -378,6 +379,8 @@ handle_work_for_shutdown_test(void *arg)
+@@ -377,6 +378,8 @@ handle_work_for_shutdown_test(void *arg)
@@ -39 +40 @@
-@@ -447,5 +450,10 @@ sanity_test_with_worker_shutdown(struct worker_params *wp,
+@@ -446,5 +449,10 @@ sanity_test_with_worker_shutdown(struct worker_params *wp,
@@ -51 +52 @@
-@@ -507,7 +515,12 @@ test_flush_with_worker_shutdown(struct worker_params *wp,
+@@ -506,7 +514,12 @@ test_flush_with_worker_shutdown(struct worker_params *wp,
@@ -65 +66 @@
-@@ -617,4 +630,6 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
+@@ -616,4 +629,6 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)


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

* [dpdk-stable] patch 'distributor: fix scalar matching' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (26 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'test/distributor: fix race conditions on shutdown' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix flushing in flight packets' " Kevin Traynor
                   ` (42 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/faf47ff9cdad6bfb0a4863ec184ec32d8656ccd1

Thanks.

Kevin.

---
From faf47ff9cdad6bfb0a4863ec184ec32d8656ccd1 Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Sat, 17 Oct 2020 05:06:56 +0200
Subject: [PATCH] distributor: fix scalar matching

[ upstream commit 626ceefbf4e1786ded4fed6a4987e3f1d370e9c0 ]

Fix improper indexes while comparing tags.
In the find_match_scalar() function:
* j iterates over flow tags of following packets;
* w iterates over backlog or in flight tags positions.

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

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
 lib/librte_distributor/rte_distributor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
index 873ca290dd..a417e06d78 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -278,5 +278,5 @@ find_match_scalar(struct rte_distributor *d,
 		for (j = 0; j < RTE_DIST_BURST_SIZE ; j++)
 			for (w = 0; w < RTE_DIST_BURST_SIZE; w++)
-				if (d->in_flight_tags[i][j] == data_ptr[w]) {
+				if (d->in_flight_tags[i][w] == data_ptr[j]) {
 					output_ptr[j] = i+1;
 					break;
@@ -284,5 +284,5 @@ find_match_scalar(struct rte_distributor *d,
 		for (j = 0; j < RTE_DIST_BURST_SIZE; j++)
 			for (w = 0; w < RTE_DIST_BURST_SIZE; w++)
-				if (bl->tags[j] == data_ptr[w]) {
+				if (bl->tags[w] == data_ptr[j]) {
 					output_ptr[j] = i+1;
 					break;
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.506137064 +0000
+++ 0029-distributor-fix-scalar-matching.patch	2020-11-18 16:33:37.932215064 +0000
@@ -1 +1 @@
-From 626ceefbf4e1786ded4fed6a4987e3f1d370e9c0 Mon Sep 17 00:00:00 2001
+From faf47ff9cdad6bfb0a4863ec184ec32d8656ccd1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 626ceefbf4e1786ded4fed6a4987e3f1d370e9c0 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 6e3eae58f8..9fea3f69ab 100644
+index 873ca290dd..a417e06d78 100644
@@ -24 +25 @@
-@@ -260,5 +260,5 @@ find_match_scalar(struct rte_distributor *d,
+@@ -278,5 +278,5 @@ find_match_scalar(struct rte_distributor *d,
@@ -31 +32 @@
-@@ -266,5 +266,5 @@ find_match_scalar(struct rte_distributor *d,
+@@ -284,5 +284,5 @@ find_match_scalar(struct rte_distributor *d,


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

* [dpdk-stable] patch 'distributor: fix flushing in flight packets' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (27 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix scalar matching' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix clearing returns buffer' " Kevin Traynor
                   ` (41 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/84833d715b7d254d25d5bcdeac0508c1cc4900dd

Thanks.

Kevin.

---
From 84833d715b7d254d25d5bcdeac0508c1cc4900dd Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Sat, 17 Oct 2020 05:06:58 +0200
Subject: [PATCH] distributor: fix flushing in flight packets

[ upstream commit 91d6b8235e726a40b87e9268b9686231eb1f7741 ]

rte_distributor_flush() is using total_outstanding()
function to calculate if it should still wait
for processing packets. However in burst mode
only backlog packets were counted.

This patch fixes that issue by counting also in flight
packets. There are also sum fixes to properly keep
count of in flight packets for each worker in bufs[].count.

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

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
 lib/librte_distributor/rte_distributor.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
index a417e06d78..405c5d9dbf 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -483,4 +483,5 @@ rte_distributor_process_v1705(struct rte_distributor *d,
 			if (__atomic_load_n(&(d->bufs[wid].bufptr64[0]),
 				__ATOMIC_ACQUIRE) & RTE_DISTRIB_GET_BUF) {
+				d->bufs[wid].count = 0;
 				release(d, wid);
 				handle_returns(d, wid);
@@ -497,9 +498,4 @@ rte_distributor_process_v1705(struct rte_distributor *d,
 		unsigned int pkts;
 
-		/* 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;
-
 		if ((num_mbufs - next_idx) < RTE_DIST_BURST_SIZE)
 			pkts = num_mbufs - next_idx;
@@ -621,6 +617,8 @@ rte_distributor_process_v1705(struct rte_distributor *d,
 		/* Sync with worker on GET_BUF flag. */
 		if ((__atomic_load_n(&(d->bufs[wid].bufptr64[0]),
-			__ATOMIC_ACQUIRE) & RTE_DISTRIB_GET_BUF))
+			__ATOMIC_ACQUIRE) & RTE_DISTRIB_GET_BUF)) {
+			d->bufs[wid].count = 0;
 			release(d, wid);
+		}
 
 	return num_mbufs;
@@ -673,5 +671,5 @@ total_outstanding(const struct rte_distributor *d)
 
 	for (wkr = 0; wkr < d->num_workers; wkr++)
-		total_outstanding += d->backlog[wkr].count;
+		total_outstanding += d->backlog[wkr].count + d->bufs[wkr].count;
 
 	return total_outstanding;
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.522274814 +0000
+++ 0030-distributor-fix-flushing-in-flight-packets.patch	2020-11-18 16:33:37.933215065 +0000
@@ -1 +1 @@
-From 91d6b8235e726a40b87e9268b9686231eb1f7741 Mon Sep 17 00:00:00 2001
+From 84833d715b7d254d25d5bcdeac0508c1cc4900dd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 91d6b8235e726a40b87e9268b9686231eb1f7741 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 9fea3f69ab..fb4e9d93f9 100644
+index a417e06d78..405c5d9dbf 100644
@@ -28 +29 @@
-@@ -466,4 +466,5 @@ rte_distributor_process(struct rte_distributor *d,
+@@ -483,4 +483,5 @@ rte_distributor_process_v1705(struct rte_distributor *d,
@@ -34 +35 @@
-@@ -480,9 +481,4 @@ rte_distributor_process(struct rte_distributor *d,
+@@ -497,9 +498,4 @@ rte_distributor_process_v1705(struct rte_distributor *d,
@@ -44 +45 @@
-@@ -604,6 +600,8 @@ rte_distributor_process(struct rte_distributor *d,
+@@ -621,6 +617,8 @@ rte_distributor_process_v1705(struct rte_distributor *d,
@@ -54 +55 @@
-@@ -648,5 +646,5 @@ total_outstanding(const struct rte_distributor *d)
+@@ -673,5 +671,5 @@ total_outstanding(const struct rte_distributor *d)


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

* [dpdk-stable] patch 'distributor: fix clearing returns buffer' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (28 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix flushing in flight packets' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'test/distributor: fix quitting workers in burst mode' " Kevin Traynor
                   ` (40 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/c4b0a4bbb4f64d7c9da58e981517ecc413341c1b

Thanks.

Kevin.

---
From c4b0a4bbb4f64d7c9da58e981517ecc413341c1b Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Sat, 17 Oct 2020 05:06:59 +0200
Subject: [PATCH] distributor: fix clearing returns buffer

[ upstream commit 20fa39d230d1e676c7bfe2a32f958f5851d471fc ]

The patch clears distributors returns buffer
in clear_returns() by setting start and count to 0.

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

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
 lib/librte_distributor/rte_distributor.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
index 405c5d9dbf..12142ec73a 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -731,4 +731,6 @@ rte_distributor_clear_returns_v1705(struct rte_distributor *d)
 		__atomic_store_n(&(d->bufs[wkr].retptr64[0]), 0,
 				__ATOMIC_RELEASE);
+
+	d->returns.start = d->returns.count = 0;
 }
 BIND_DEFAULT_SYMBOL(rte_distributor_clear_returns, _v1705, 17.05);
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.539470868 +0000
+++ 0031-distributor-fix-clearing-returns-buffer.patch	2020-11-18 16:33:37.933215065 +0000
@@ -1 +1 @@
-From 20fa39d230d1e676c7bfe2a32f958f5851d471fc Mon Sep 17 00:00:00 2001
+From c4b0a4bbb4f64d7c9da58e981517ecc413341c1b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 20fa39d230d1e676c7bfe2a32f958f5851d471fc ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index fb4e9d93f9..ef34facba6 100644
+index 405c5d9dbf..12142ec73a 100644
@@ -22 +23 @@
-@@ -703,4 +703,6 @@ rte_distributor_clear_returns(struct rte_distributor *d)
+@@ -731,4 +731,6 @@ rte_distributor_clear_returns_v1705(struct rte_distributor *d)
@@ -28 +29 @@
- 
+ BIND_DEFAULT_SYMBOL(rte_distributor_clear_returns, _v1705, 17.05);


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

* [dpdk-stable] patch 'test/distributor: fix quitting workers in burst mode' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (29 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix clearing returns buffer' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'test/distributor: fix mbuf leak on failure' " Kevin Traynor
                   ` (39 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/159e26b128ea69ca55e387ef541e70f4c261924a

Thanks.

Kevin.

---
From 159e26b128ea69ca55e387ef541e70f4c261924a Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Sat, 17 Oct 2020 05:07:01 +0200
Subject: [PATCH] test/distributor: fix quitting workers in burst mode

[ upstream commit f72bff0ec2723b7d7bfc9c655419030b1c8fffad ]

Sending number of packets equal to number of workers isn't enough
to stop all workers in burst version of distributor as more than
one packet can be matched and consumed by a single worker. This way
some of workers might not be awaken from rte_distributor_get_pkt().

This patch fixes it by sending packets one by one. Each sent packet
causes exactly one worker to quit.

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

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 test/test/test_distributor.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/test/test/test_distributor.c b/test/test/test_distributor.c
index 459f75b96a..e00966366d 100644
--- a/test/test/test_distributor.c
+++ b/test/test/test_distributor.c
@@ -612,7 +612,8 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
 	zero_quit = 0;
 	quit = 1;
-	for (i = 0; i < num_workers; i++)
+	for (i = 0; i < num_workers; i++) {
 		bufs[i]->hash.usr = i << 1;
-	rte_distributor_process(d, bufs, num_workers);
+		rte_distributor_process(d, &bufs[i], 1);
+	}
 
 	rte_distributor_process(d, NULL, 0);
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.555745692 +0000
+++ 0032-test-distributor-fix-quitting-workers-in-burst-mode.patch	2020-11-18 16:33:37.934215065 +0000
@@ -1 +1 @@
-From f72bff0ec2723b7d7bfc9c655419030b1c8fffad Mon Sep 17 00:00:00 2001
+From 159e26b128ea69ca55e387ef541e70f4c261924a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f72bff0ec2723b7d7bfc9c655419030b1c8fffad ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
- app/test/test_distributor.c | 5 +++--
+ test/test/test_distributor.c | 5 +++--
@@ -23,5 +24,5 @@
-diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
-index a4af0a39c6..e0cb698e1c 100644
---- a/app/test/test_distributor.c
-+++ b/app/test/test_distributor.c
-@@ -770,7 +770,8 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
+diff --git a/test/test/test_distributor.c b/test/test/test_distributor.c
+index 459f75b96a..e00966366d 100644
+--- a/test/test/test_distributor.c
++++ b/test/test/test_distributor.c
+@@ -612,7 +612,8 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)


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

* [dpdk-stable] patch 'test/distributor: fix mbuf leak on failure' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (30 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'test/distributor: fix quitting workers in burst mode' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'doc: add SPDX license tag header to meson guide' " Kevin Traynor
                   ` (38 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Sarosh Arif; +Cc: Lukasz Wojciechowski, David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/ea4b1fc8b00a92f038a79d4a9c558d31b47c5079

Thanks.

Kevin.

---
From ea4b1fc8b00a92f038a79d4a9c558d31b47c5079 Mon Sep 17 00:00:00 2001
From: Sarosh Arif <sarosh.arif@emumba.com>
Date: Tue, 8 Sep 2020 15:22:04 +0500
Subject: [PATCH] test/distributor: fix mbuf leak on failure

[ upstream commit 0e8704a453e5295ff9f498c6cdab7f829410ad88 ]

rte_mempool_get_bulk is used to get bufs/many_bufs from the pool,
but at some locations when test fails the bufs/many_bufs are
not returned back to the pool.
Due to this, multiple executions of distributor_autotest gives the
following error message: Error getting mbufs from pool.
To resolve this issue rte_mempool_put_bulk is used whenever the test
fails and returns.

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

Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>
Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Reviewed-by: David Hunt <david.hunt@intel.com>
---
 test/test/test_distributor.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/test/test_distributor.c b/test/test/test_distributor.c
index e00966366d..aa9d35a302 100644
--- a/test/test/test_distributor.c
+++ b/test/test/test_distributor.c
@@ -130,4 +130,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 				"Expected %u, got %u\n",
 				__LINE__, BURST, total_packet_count());
+		rte_mempool_put_bulk(p, (void *)bufs, BURST);
 		return -1;
 	}
@@ -156,4 +157,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 					"Expected %u, got %u\n",
 					__LINE__, BURST, total_packet_count());
+			rte_mempool_put_bulk(p, (void *)bufs, BURST);
 			return -1;
 		}
@@ -184,4 +186,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 				"Expected %u, got %u\n",
 				__LINE__, BURST, total_packet_count());
+		rte_mempool_put_bulk(p, (void *)bufs, BURST);
 		return -1;
 	}
@@ -239,4 +242,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 		printf("line %d: Missing packets, expected %d\n",
 				__LINE__, num_returned);
+		rte_mempool_put_bulk(p, (void *)many_bufs, BIG_BATCH);
 		return -1;
 	}
@@ -253,4 +257,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 		if (j == BIG_BATCH) {
 			printf("Error: could not find source packet #%u\n", i);
+			rte_mempool_put_bulk(p, (void *)many_bufs, BIG_BATCH);
 			return -1;
 		}
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.573397934 +0000
+++ 0033-test-distributor-fix-mbuf-leak-on-failure.patch	2020-11-18 16:33:37.935215066 +0000
@@ -1 +1 @@
-From 0e8704a453e5295ff9f498c6cdab7f829410ad88 Mon Sep 17 00:00:00 2001
+From ea4b1fc8b00a92f038a79d4a9c558d31b47c5079 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0e8704a453e5295ff9f498c6cdab7f829410ad88 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
- app/test/test_distributor.c | 5 +++++
+ test/test/test_distributor.c | 5 +++++
@@ -24,5 +25,5 @@
-diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
-index e0cb698e1c..73d735aa75 100644
---- a/app/test/test_distributor.c
-+++ b/app/test/test_distributor.c
-@@ -135,4 +135,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
+diff --git a/test/test/test_distributor.c b/test/test/test_distributor.c
+index e00966366d..aa9d35a302 100644
+--- a/test/test/test_distributor.c
++++ b/test/test/test_distributor.c
+@@ -130,4 +130,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
@@ -34 +35 @@
-@@ -161,4 +162,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
+@@ -156,4 +157,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
@@ -40 +41 @@
-@@ -189,4 +191,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
+@@ -184,4 +186,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
@@ -46 +47 @@
-@@ -244,4 +247,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
+@@ -239,4 +242,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
@@ -52 +53 @@
-@@ -258,4 +262,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
+@@ -253,4 +257,5 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)


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

* [dpdk-stable] patch 'doc: add SPDX license tag header to meson guide' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (31 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'test/distributor: fix mbuf leak on failure' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'app: fix missing dependencies' " Kevin Traynor
                   ` (37 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Stephen Hemminger, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/988b3c139e8d8d65a1ee79b7892b1bbe17a33782

Thanks.

Kevin.

---
From 988b3c139e8d8d65a1ee79b7892b1bbe17a33782 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 10 Sep 2020 12:32:05 +0100
Subject: [PATCH] doc: add SPDX license tag header to meson guide

[ upstream commit c0a775a141e3ee9f02aa0a75d975750d06890837 ]

The build-sdk-meson.rst file originates from the short plain-text meson
instructions added in 2018. Add SPDX tag and copyright notice based on the
original commit.

Fixes: 9c3adc289c5e ("doc: add instructions on build using meson")

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 doc/build-sdk-meson.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/doc/build-sdk-meson.txt b/doc/build-sdk-meson.txt
index 057734795e..69a80279f6 100644
--- a/doc/build-sdk-meson.txt
+++ b/doc/build-sdk-meson.txt
@@ -1,2 +1,5 @@
+..  SPDX-License-Identifier: BSD-3-Clause
+    Copyright(c) 2018 Intel Corporation.
+
 INSTALLING DPDK USING THE MESON BUILD SYSTEM
 ---------------------------------------------
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.590295749 +0000
+++ 0034-doc-add-SPDX-license-tag-header-to-meson-guide.patch	2020-11-18 16:33:37.935215066 +0000
@@ -1 +1 @@
-From c0a775a141e3ee9f02aa0a75d975750d06890837 Mon Sep 17 00:00:00 2001
+From 988b3c139e8d8d65a1ee79b7892b1bbe17a33782 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c0a775a141e3ee9f02aa0a75d975750d06890837 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
- doc/guides/prog_guide/build-sdk-meson.rst | 3 +++
+ doc/build-sdk-meson.txt | 3 +++
@@ -20,4 +21,4 @@
-diff --git a/doc/guides/prog_guide/build-sdk-meson.rst b/doc/guides/prog_guide/build-sdk-meson.rst
-index d621bea565..3429e26479 100644
---- a/doc/guides/prog_guide/build-sdk-meson.rst
-+++ b/doc/guides/prog_guide/build-sdk-meson.rst
+diff --git a/doc/build-sdk-meson.txt b/doc/build-sdk-meson.txt
+index 057734795e..69a80279f6 100644
+--- a/doc/build-sdk-meson.txt
++++ b/doc/build-sdk-meson.txt
@@ -28,2 +29,2 @@
- Installing DPDK Using the meson build system
- ============================================
+ INSTALLING DPDK USING THE MESON BUILD SYSTEM
+ ---------------------------------------------


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

* [dpdk-stable] patch 'app: fix missing dependencies' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (32 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'doc: add SPDX license tag header to meson guide' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix missing dependency' " Kevin Traynor
                   ` (36 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/2a2c760d38bd601078214f490180dc4e2fb57d11

Thanks.

Kevin.

---
From 2a2c760d38bd601078214f490180dc4e2fb57d11 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 15 Oct 2020 16:05:47 +0100
Subject: [PATCH] app: fix missing dependencies

[ upstream commit fac83b3ef8accd5f0f4da5b9a60d047e448281f8 ]

A number of lib and driver dependencies for various apps were missed on
build because the proper macro names for their use were mismatched between
meson and make build systems. Before adding in equivalent compatibility
macros we need to ensure to add the proper dependencies to ensure a valid
build.

Fixes: 16ade738fd0d ("app/testpmd: build with meson")
Fixes: b5dc795a8a55 ("test: build app with meson as dpdk-test")
Fixes: 996ef1176111 ("app: add all remaining apps to meson build")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 app/test-crypto-perf/meson.build |  3 +++
 app/test-pmd/meson.build         | 12 ++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build
index d735b186f9..e3c5faf56f 100644
--- a/app/test-crypto-perf/meson.build
+++ b/app/test-crypto-perf/meson.build
@@ -14,2 +14,5 @@ sources = files('cperf_ops.c',
 		'main.c')
 deps += ['cryptodev']
+if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER')
+	deps += 'pmd_crypto_scheduler'
+endif
diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build
index adeeeeedba..39acefb445 100644
--- a/app/test-pmd/meson.build
+++ b/app/test-pmd/meson.build
@@ -34,4 +34,16 @@ if dpdk_conf.has('RTE_LIBRTE_PDUMP')
 	deps += 'pdump'
 endif
+if dpdk_conf.has('RTE_LIBRTE_BITRATESTATS')
+	deps += 'bitratestats'
+endif
+if dpdk_conf.has('RTE_LIBRTE_LATENCYSTATS')
+	deps += 'latencystats'
+endif
+if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER')
+	deps += 'pmd_crypto_scheduler'
+endif
+if dpdk_conf.has('RTE_LIBRTE_BOND_PMD')
+	deps += 'pmd_bond'
+endif
 if dpdk_conf.has('RTE_LIBRTE_BNXT_PMD')
 	deps += 'pmd_bnxt'
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.607132568 +0000
+++ 0035-app-fix-missing-dependencies.patch	2020-11-18 16:33:37.935215066 +0000
@@ -1 +1 @@
-From fac83b3ef8accd5f0f4da5b9a60d047e448281f8 Mon Sep 17 00:00:00 2001
+From 2a2c760d38bd601078214f490180dc4e2fb57d11 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fac83b3ef8accd5f0f4da5b9a60d047e448281f8 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -22,2 +23 @@
- app/test/meson.build             |  1 +
- 3 files changed, 16 insertions(+)
+ 2 files changed, 15 insertions(+)
@@ -26 +26 @@
-index f394b75ba5..4bd71510dc 100644
+index d735b186f9..e3c5faf56f 100644
@@ -29 +29 @@
-@@ -13,2 +13,5 @@ sources = files('cperf_ops.c',
+@@ -14,2 +14,5 @@ sources = files('cperf_ops.c',
@@ -31 +31 @@
- deps += ['cryptodev', 'net', 'security']
+ deps += ['cryptodev']
@@ -36 +36 @@
-index f52ab148f6..0d9e450494 100644
+index adeeeeedba..39acefb445 100644
@@ -39 +39 @@
-@@ -32,4 +32,16 @@ if dpdk_conf.has('RTE_LIBRTE_PDUMP')
+@@ -34,4 +34,16 @@ if dpdk_conf.has('RTE_LIBRTE_PDUMP')
@@ -56,10 +55,0 @@
-diff --git a/app/test/meson.build b/app/test/meson.build
-index dedf29dd7f..fc90a1909f 100644
---- a/app/test/meson.build
-+++ b/app/test/meson.build
-@@ -416,4 +416,5 @@ endif
- if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER')
- 	driver_test_names += 'cryptodev_scheduler_autotest'
-+	test_deps += 'pmd_crypto_scheduler'
- endif
- 


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

* [dpdk-stable] patch 'examples/l2fwd-crypto: fix missing dependency' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (33 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'app: fix missing dependencies' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'bus/pci: remove unused scan by address' " Kevin Traynor
                   ` (35 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/cc512d96205382864dc7092cd2aeb660b3bdd069

Thanks.

Kevin.

---
From cc512d96205382864dc7092cd2aeb660b3bdd069 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 15 Oct 2020 16:05:48 +0100
Subject: [PATCH] examples/l2fwd-crypto: fix missing dependency

[ upstream commit 52e2991eab280243e3ed0f0be56a2e2e74416d25 ]

When the crypto-scheduler support is enabled, we were missing the
dependency on it as part of the meson build.

Fixes: 89f0711f9ddf ("examples: build some samples with meson")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 examples/l2fwd-crypto/meson.build | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/examples/l2fwd-crypto/meson.build b/examples/l2fwd-crypto/meson.build
index 09438a6a02..c0b48334a3 100644
--- a/examples/l2fwd-crypto/meson.build
+++ b/examples/l2fwd-crypto/meson.build
@@ -8,4 +8,7 @@
 
 deps += 'cryptodev'
+if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER')
+	deps += 'pmd_crypto_scheduler'
+endif
 sources = files(
 	'main.c'
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.624319581 +0000
+++ 0036-examples-l2fwd-crypto-fix-missing-dependency.patch	2020-11-18 16:33:37.935215066 +0000
@@ -1 +1 @@
-From 52e2991eab280243e3ed0f0be56a2e2e74416d25 Mon Sep 17 00:00:00 2001
+From cc512d96205382864dc7092cd2aeb660b3bdd069 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 52e2991eab280243e3ed0f0be56a2e2e74416d25 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 6c852ad199..39e1604fac 100644
+index 09438a6a02..c0b48334a3 100644
@@ -28 +28,0 @@
- allow_experimental_apis = true
@@ -29,0 +30 @@
+ 	'main.c'


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

* [dpdk-stable] patch 'bus/pci: remove unused scan by address' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (34 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix missing dependency' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'eal/linux: fix memory leak in uevent handling' " Kevin Traynor
                   ` (34 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/f453331f4b544a76f58d27dce07baf6b78a00ce3

Thanks.

Kevin.

---
From f453331f4b544a76f58d27dce07baf6b78a00ce3 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 14 Oct 2020 22:18:13 +0200
Subject: [PATCH] bus/pci: remove unused scan by address

[ upstream commit 59440fbabfbcfae350e0efa6f47201b5cf0bd625 ]

The function pci_update_device was used to scan a device
for probing by PCI address.
This private function (and implementations) are unused
since such probing is removed.

Fixes: f3bac43b60da ("bus/pci: remove unused function to probe by address")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 drivers/bus/pci/bsd/pci.c   | 49 -------------------------------------
 drivers/bus/pci/linux/pci.c | 12 ---------
 drivers/bus/pci/private.h   | 13 ----------
 3 files changed, 74 deletions(-)

diff --git a/drivers/bus/pci/bsd/pci.c b/drivers/bus/pci/bsd/pci.c
index d09f8ee5a6..b760a4428d 100644
--- a/drivers/bus/pci/bsd/pci.c
+++ b/drivers/bus/pci/bsd/pci.c
@@ -387,53 +387,4 @@ rte_pci_get_iommu_class(void)
 }
 
-int
-pci_update_device(const struct rte_pci_addr *addr)
-{
-	int fd;
-	struct pci_conf matches[2];
-	struct pci_match_conf match = {
-		.pc_sel = {
-			.pc_domain = addr->domain,
-			.pc_bus = addr->bus,
-			.pc_dev = addr->devid,
-			.pc_func = addr->function,
-		},
-	};
-	struct pci_conf_io conf_io = {
-		.pat_buf_len = 0,
-		.num_patterns = 1,
-		.patterns = &match,
-		.match_buf_len = sizeof(matches),
-		.matches = &matches[0],
-	};
-
-	fd = open("/dev/pci", O_RDONLY);
-	if (fd < 0) {
-		RTE_LOG(ERR, EAL, "%s(): error opening /dev/pci\n", __func__);
-		goto error;
-	}
-
-	if (ioctl(fd, PCIOCGETCONF, &conf_io) < 0) {
-		RTE_LOG(ERR, EAL, "%s(): error with ioctl on /dev/pci: %s\n",
-				__func__, strerror(errno));
-		goto error;
-	}
-
-	if (conf_io.num_matches != 1)
-		goto error;
-
-	if (pci_scan_one(fd, &matches[0]) < 0)
-		goto error;
-
-	close(fd);
-
-	return 0;
-
-error:
-	if (fd >= 0)
-		close(fd);
-	return -1;
-}
-
 /* Read PCI config space. */
 int rte_pci_read_config(const struct rte_pci_device *dev,
diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index 280e779155..b447661a65 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -396,16 +396,4 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
 }
 
-int
-pci_update_device(const struct rte_pci_addr *addr)
-{
-	char filename[PATH_MAX];
-
-	snprintf(filename, sizeof(filename), "%s/" PCI_PRI_FMT,
-		 rte_pci_get_sysfs_path(), addr->domain, addr->bus, addr->devid,
-		 addr->function);
-
-	return pci_scan_one(filename, addr);
-}
-
 /*
  * split up a pci address into its constituent parts.
diff --git a/drivers/bus/pci/private.h b/drivers/bus/pci/private.h
index 9e1baf3efd..f79eb63554 100644
--- a/drivers/bus/pci/private.h
+++ b/drivers/bus/pci/private.h
@@ -56,17 +56,4 @@ void rte_pci_insert_device(struct rte_pci_device *exist_pci_dev,
 		struct rte_pci_device *new_pci_dev);
 
-/**
- * Update a pci device object by asking the kernel for the latest information.
- *
- * This function is private to EAL.
- *
- * @param addr
- *	The PCI Bus-Device-Function address to look for
- * @return
- *   - 0 on success.
- *   - negative on error.
- */
-int pci_update_device(const struct rte_pci_addr *addr);
-
 /**
  * Map the PCI resource of a PCI device in virtual memory
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.640356387 +0000
+++ 0037-bus-pci-remove-unused-scan-by-address.patch	2020-11-18 16:33:37.937215067 +0000
@@ -1 +1 @@
-From 59440fbabfbcfae350e0efa6f47201b5cf0bd625 Mon Sep 17 00:00:00 2001
+From f453331f4b544a76f58d27dce07baf6b78a00ce3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 59440fbabfbcfae350e0efa6f47201b5cf0bd625 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17,5 +18,4 @@
- drivers/bus/pci/bsd/pci.c     | 49 -----------------------------------
- drivers/bus/pci/linux/pci.c   | 12 ---------
- drivers/bus/pci/private.h     | 13 ----------
- drivers/bus/pci/windows/pci.c | 11 --------
- 4 files changed, 85 deletions(-)
+ drivers/bus/pci/bsd/pci.c   | 49 -------------------------------------
+ drivers/bus/pci/linux/pci.c | 12 ---------
+ drivers/bus/pci/private.h   | 13 ----------
+ 3 files changed, 74 deletions(-)
@@ -24 +24 @@
-index 97c611737a..4b8a208781 100644
+index d09f8ee5a6..b760a4428d 100644
@@ -27 +27 @@
-@@ -402,53 +402,4 @@ pci_device_iova_mode(const struct rte_pci_driver *pdrv __rte_unused,
+@@ -387,53 +387,4 @@ rte_pci_get_iommu_class(void)
@@ -82 +82 @@
-index 619d209ad2..2e1808b902 100644
+index 280e779155..b447661a65 100644
@@ -85 +85 @@
-@@ -398,16 +398,4 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
+@@ -396,16 +396,4 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
@@ -103 +103 @@
-index 16f997c701..f566943f5e 100644
+index 9e1baf3efd..f79eb63554 100644
@@ -106 +106 @@
-@@ -67,17 +67,4 @@ void rte_pci_insert_device(struct rte_pci_device *exist_pci_dev,
+@@ -56,17 +56,4 @@ void rte_pci_insert_device(struct rte_pci_device *exist_pci_dev,
@@ -123,21 +123 @@
-  * A structure describing a PCI mapping.
-diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c
-index 10bb0e9cf1..b450346bdc 100644
---- a/drivers/bus/pci/windows/pci.c
-+++ b/drivers/bus/pci/windows/pci.c
-@@ -50,15 +50,4 @@ rte_pci_unmap_device(struct rte_pci_device *dev __rte_unused)
- }
- 
--int
--pci_update_device(const struct rte_pci_addr *addr __rte_unused)
--{
--	/* This function is not implemented on Windows.
--	 * We really should short-circuit the call to these functions by
--	 * clearing the RTE_PCI_DRV_NEED_MAPPING flag
--	 * in the rte_pci_driver flags.
--	 */
--	return 0;
--}
--
- /* Read PCI config space. */
- int
+  * Map the PCI resource of a PCI device in virtual memory


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

* [dpdk-stable] patch 'eal/linux: fix memory leak in uevent handling' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (35 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'bus/pci: remove unused scan by address' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " Kevin Traynor
                   ` (33 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/9d7c95022a36cc2282aa8953806da2acaaea47df

Thanks.

Kevin.

---
From 9d7c95022a36cc2282aa8953806da2acaaea47df Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Sat, 23 May 2020 18:52:21 +0800
Subject: [PATCH] eal/linux: fix memory leak in uevent handling

[ upstream commit 01072d52affac0f7fb6b8a5c8dd98015c4cef4c3 ]

When the memory for uevent.devname is allocated in dev_uev_parse(). It
is not freed when parse the subsystem layer fails in dev_uev_parse().
Before return, it is also not freed in dev_uev_handler(). These cause a
memory leak.

Fixes: 0d0f478d0483 ("eal/linux: add uevent parse and process")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_eal/linuxapp/eal/eal_dev.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_dev.c b/lib/librte_eal/linuxapp/eal/eal_dev.c
index c41809380d..07172d2109 100644
--- a/lib/librte_eal/linuxapp/eal/eal_dev.c
+++ b/lib/librte_eal/linuxapp/eal/eal_dev.c
@@ -190,5 +190,5 @@ dev_uev_parse(const char *buf, struct rte_dev_event *event, int length)
 		event->subsystem = EAL_DEV_EVENT_SUBSYSTEM_VFIO;
 	else
-		return -1;
+		goto err;
 
 	/* parse the action type */
@@ -198,6 +198,9 @@ dev_uev_parse(const char *buf, struct rte_dev_event *event, int length)
 		event->type = RTE_DEV_EVENT_REMOVE;
 	else
-		return -1;
+		goto err;
 	return 0;
+err:
+	free(event->devname);
+	return -1;
 }
 
@@ -278,4 +281,5 @@ dev_uev_handler(__rte_unused void *param)
 		}
 		rte_dev_event_callback_process(uevent.devname, uevent.type);
+		free(uevent.devname);
 	}
 
@@ -284,4 +288,5 @@ dev_uev_handler(__rte_unused void *param)
 failure_handle_err:
 	rte_spinlock_unlock(&failure_handle_lock);
+	free(uevent.devname);
 }
 
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.659061661 +0000
+++ 0038-eal-linux-fix-memory-leak-in-uevent-handling.patch	2020-11-18 16:33:37.937215067 +0000
@@ -1 +1 @@
-From 01072d52affac0f7fb6b8a5c8dd98015c4cef4c3 Mon Sep 17 00:00:00 2001
+From 9d7c95022a36cc2282aa8953806da2acaaea47df Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 01072d52affac0f7fb6b8a5c8dd98015c4cef4c3 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
- lib/librte_eal/linux/eal_dev.c | 9 +++++++--
+ lib/librte_eal/linuxapp/eal/eal_dev.c | 9 +++++++--
@@ -20,5 +21,5 @@
-diff --git a/lib/librte_eal/linux/eal_dev.c b/lib/librte_eal/linux/eal_dev.c
-index 2e15762b56..5c0e752b2d 100644
---- a/lib/librte_eal/linux/eal_dev.c
-+++ b/lib/librte_eal/linux/eal_dev.c
-@@ -196,5 +196,5 @@ dev_uev_parse(const char *buf, struct rte_dev_event *event, int length)
+diff --git a/lib/librte_eal/linuxapp/eal/eal_dev.c b/lib/librte_eal/linuxapp/eal/eal_dev.c
+index c41809380d..07172d2109 100644
+--- a/lib/librte_eal/linuxapp/eal/eal_dev.c
++++ b/lib/librte_eal/linuxapp/eal/eal_dev.c
+@@ -190,5 +190,5 @@ dev_uev_parse(const char *buf, struct rte_dev_event *event, int length)
@@ -31 +32 @@
-@@ -204,6 +204,9 @@ dev_uev_parse(const char *buf, struct rte_dev_event *event, int length)
+@@ -198,6 +198,9 @@ dev_uev_parse(const char *buf, struct rte_dev_event *event, int length)
@@ -42 +43 @@
-@@ -283,4 +286,5 @@ dev_uev_handler(__rte_unused void *param)
+@@ -278,4 +281,5 @@ dev_uev_handler(__rte_unused void *param)
@@ -48 +49 @@
-@@ -289,4 +293,5 @@ dev_uev_handler(__rte_unused void *param)
+@@ -284,4 +288,5 @@ dev_uev_handler(__rte_unused void *param)


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

* [dpdk-stable] patch 'efd: fix tailq entry leak in error path' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (36 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'eal/linux: fix memory leak in uevent handling' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'eal: fix leak on device event callback unregister' " Kevin Traynor
                   ` (32 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Yipeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/941bad7770322c5e10f9e9e0d29d521f51713a02

Thanks.

Kevin.

---
From 941bad7770322c5e10f9e9e0d29d521f51713a02 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 29 Sep 2020 11:31:35 +0800
Subject: [PATCH] efd: fix tailq entry leak in error path

[ upstream commit c2402fcaf937b17da2b886443c3733b4234eea68 ]

In rte_efd_create() allocated memory for tailq entry, we should
free it when error happens, otherwise it will lead to memory leak.

Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
---
 lib/librte_efd/rte_efd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c
index a07b48475c..aa86f1a8e4 100644
--- a/lib/librte_efd/rte_efd.c
+++ b/lib/librte_efd/rte_efd.c
@@ -706,4 +706,5 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len,
 error_unlock_exit:
 	rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK);
+	rte_free(te);
 	rte_efd_free(table);
 
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.675267958 +0000
+++ 0039-efd-fix-tailq-entry-leak-in-error-path.patch	2020-11-18 16:33:37.938215068 +0000
@@ -1 +1 @@
-From c2402fcaf937b17da2b886443c3733b4234eea68 Mon Sep 17 00:00:00 2001
+From 941bad7770322c5e10f9e9e0d29d521f51713a02 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c2402fcaf937b17da2b886443c3733b4234eea68 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index ec3a4cd58e..77f46809f8 100644
+index a07b48475c..aa86f1a8e4 100644
@@ -22 +23 @@
-@@ -712,4 +712,5 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len,
+@@ -706,4 +706,5 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len,
@@ -24 +25 @@
- 	rte_mcfg_tailq_write_unlock();
+ 	rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK);


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

* [dpdk-stable] patch 'eal: fix leak on device event callback unregister' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (37 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'mem: fix config name in error logs' " Kevin Traynor
                   ` (31 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Jeff Guo, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/fc06dbfb1cffe80a4cbc960197baae92415a2632

Thanks.

Kevin.

---
From fc06dbfb1cffe80a4cbc960197baae92415a2632 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Wed, 21 Oct 2020 19:19:03 +0800
Subject: [PATCH] eal: fix leak on device event callback unregister

[ upstream commit c78bd27d4b74a74261b180cb8d5421b919c1ab9a ]

The event_cb->dev_name is not freed when freeing event_cb,
and this causes a memory leak.

Fixes: a753e53d517b ("eal: add device event monitor framework")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_eal/common/eal_common_dev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c
index dc2bc0c984..e0fabd3c12 100644
--- a/lib/librte_eal/common/eal_common_dev.c
+++ b/lib/librte_eal/common/eal_common_dev.c
@@ -527,4 +527,5 @@ rte_dev_event_callback_unregister(const char *device_name,
 		if (event_cb->active == 0) {
 			TAILQ_REMOVE(&dev_event_cbs, event_cb, next);
+			free(event_cb->dev_name);
 			free(event_cb);
 			ret++;
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.692864186 +0000
+++ 0040-eal-fix-leak-on-device-event-callback-unregister.patch	2020-11-18 16:33:37.939215068 +0000
@@ -1 +1 @@
-From c78bd27d4b74a74261b180cb8d5421b919c1ab9a Mon Sep 17 00:00:00 2001
+From fc06dbfb1cffe80a4cbc960197baae92415a2632 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c78bd27d4b74a74261b180cb8d5421b919c1ab9a ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 9e4f09d83e..363a2ca95e 100644
+index dc2bc0c984..e0fabd3c12 100644


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

* [dpdk-stable] patch 'mem: fix config name in error logs' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (38 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'eal: fix leak on device event callback unregister' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'examples/vm_power: fix build on Ubuntu 20.04' " Kevin Traynor
                   ` (30 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/0521cca7c8c96f88d2dccffce101ea56a568f608

Thanks.

Kevin.

---
From 0521cca7c8c96f88d2dccffce101ea56a568f608 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Thu, 22 Oct 2020 19:36:21 +0200
Subject: [PATCH] mem: fix config name in error logs

[ upstream commit a796c922d24da9444be9ede24d925d25519602b7 ]

When introducing the new option CONFIG_RTE_MAX_MEM_MB_PER_TYPE,
some logs were referencing a wrong name: CONFIG_RTE_MAX_MEM_PER_TYPE.

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

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_eal/bsdapp/eal/eal_memory.c   | 2 +-
 lib/librte_eal/linuxapp/eal/eal_memory.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/bsdapp/eal/eal_memory.c b/lib/librte_eal/bsdapp/eal/eal_memory.c
index 418c4bb0aa..79bd221490 100644
--- a/lib/librte_eal/bsdapp/eal/eal_memory.c
+++ b/lib/librte_eal/bsdapp/eal/eal_memory.c
@@ -181,5 +181,5 @@ rte_eal_hugepage_init(void)
 				RTE_LOG(ERR, EAL, "Could not find space for memseg. Please increase %s and/or %s in configuration.\n",
 					RTE_STR(CONFIG_RTE_MAX_MEMSEG_PER_TYPE),
-					RTE_STR(CONFIG_RTE_MAX_MEM_PER_TYPE));
+					RTE_STR(CONFIG_RTE_MAX_MEM_MB_PER_TYPE));
 				return -1;
 			}
diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c
index ac0424582e..e690d0ffd0 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
@@ -705,5 +705,5 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
 		RTE_LOG(ERR, EAL, "Could not find space for memseg. Please increase %s and/or %s in configuration.\n",
 				RTE_STR(CONFIG_RTE_MAX_MEMSEG_PER_TYPE),
-				RTE_STR(CONFIG_RTE_MAX_MEM_PER_TYPE));
+				RTE_STR(CONFIG_RTE_MAX_MEM_MB_PER_TYPE));
 		return -1;
 	}
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.709292424 +0000
+++ 0041-mem-fix-config-name-in-error-logs.patch	2020-11-18 16:33:37.941215070 +0000
@@ -1 +1 @@
-From a796c922d24da9444be9ede24d925d25519602b7 Mon Sep 17 00:00:00 2001
+From 0521cca7c8c96f88d2dccffce101ea56a568f608 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a796c922d24da9444be9ede24d925d25519602b7 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15,2 +16,2 @@
- lib/librte_eal/freebsd/eal_memory.c | 2 +-
- lib/librte_eal/linux/eal_memory.c   | 2 +-
+ lib/librte_eal/bsdapp/eal/eal_memory.c   | 2 +-
+ lib/librte_eal/linuxapp/eal/eal_memory.c | 2 +-
@@ -19,5 +20,5 @@
-diff --git a/lib/librte_eal/freebsd/eal_memory.c b/lib/librte_eal/freebsd/eal_memory.c
-index b8b337a554..8d4b26b9b8 100644
---- a/lib/librte_eal/freebsd/eal_memory.c
-+++ b/lib/librte_eal/freebsd/eal_memory.c
-@@ -175,5 +175,5 @@ rte_eal_hugepage_init(void)
+diff --git a/lib/librte_eal/bsdapp/eal/eal_memory.c b/lib/librte_eal/bsdapp/eal/eal_memory.c
+index 418c4bb0aa..79bd221490 100644
+--- a/lib/librte_eal/bsdapp/eal/eal_memory.c
++++ b/lib/librte_eal/bsdapp/eal/eal_memory.c
+@@ -181,5 +181,5 @@ rte_eal_hugepage_init(void)
@@ -30,5 +31,5 @@
-diff --git a/lib/librte_eal/linux/eal_memory.c b/lib/librte_eal/linux/eal_memory.c
-index 3e47efe582..df0f07ee7e 100644
---- a/lib/librte_eal/linux/eal_memory.c
-+++ b/lib/librte_eal/linux/eal_memory.c
-@@ -715,5 +715,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 ac0424582e..e690d0ffd0 100644
+--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
++++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
+@@ -705,5 +705,5 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)


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

* [dpdk-stable] patch 'examples/vm_power: fix build on Ubuntu 20.04' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (39 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'mem: fix config name in error logs' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'examples/multi_process: " Kevin Traynor
                   ` (29 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/0c91ae2ac58c6da03616fafa85ff05e69d483312

Thanks.

Kevin.

---
From 0c91ae2ac58c6da03616fafa85ff05e69d483312 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 28 Oct 2020 16:27:00 +0000
Subject: [PATCH] examples/vm_power: fix build on Ubuntu 20.04
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit a9f57cfc08810a0936bdc4f4766373a9802bca8e ]

When compiling on Ubuntu 20.04, a warning was issued about possible
truncation of the path string for the power management socket.

channel_manager.c: In function ‘add_all_channels’:
channel_manager.c:470:41: warning: ‘%s’ directive output may be
  truncated writing up to 255 bytes into a region of size 90
  [-Wformat-truncation=]
  470 |     sizeof(chan_info->channel_path), "%s%s",
      |                                         ^~

This can be fixed by adding in an explicit truncation check to the code
and handling it appropriately.

Fixes: e8ae9b662506 ("examples/vm_power: channel manager and monitor in host")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
 examples/vm_power_manager/channel_manager.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c
index c53ad4bf1b..acd2896ed2 100644
--- a/examples/vm_power_manager/channel_manager.c
+++ b/examples/vm_power_manager/channel_manager.c
@@ -462,7 +462,13 @@ add_all_channels(const char *vm_name)
 		}
 
-		snprintf(chan_info->channel_path,
+		if ((size_t)snprintf(chan_info->channel_path,
 				sizeof(chan_info->channel_path), "%s%s",
-				CHANNEL_MGR_SOCKET_PATH, dir->d_name);
+				CHANNEL_MGR_SOCKET_PATH, dir->d_name)
+					>= sizeof(chan_info->channel_path)) {
+			RTE_LOG(ERR, CHANNEL_MANAGER, "Pathname too long for channel '%s%s'\n",
+					CHANNEL_MGR_SOCKET_PATH, dir->d_name);
+			rte_free(chan_info);
+			continue;
+		}
 
 		if (setup_channel_info(&vm_info, &chan_info, channel_num) < 0) {
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.726388854 +0000
+++ 0042-examples-vm_power-fix-build-on-Ubuntu-20.04.patch	2020-11-18 16:33:37.942215070 +0000
@@ -1 +1 @@
-From a9f57cfc08810a0936bdc4f4766373a9802bca8e Mon Sep 17 00:00:00 2001
+From 0c91ae2ac58c6da03616fafa85ff05e69d483312 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit a9f57cfc08810a0936bdc4f4766373a9802bca8e ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org
@@ -32 +33 @@
-index 74a2a677e8..a26315051b 100644
+index c53ad4bf1b..acd2896ed2 100644
@@ -35 +36 @@
-@@ -468,7 +468,13 @@ add_all_channels(const char *vm_name)
+@@ -462,7 +462,13 @@ add_all_channels(const char *vm_name)


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

* [dpdk-stable] patch 'examples/multi_process: fix build on Ubuntu 20.04' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (40 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'examples/vm_power: fix build on Ubuntu 20.04' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'examples/performance-thread: fix build with low core count' " Kevin Traynor
                   ` (28 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Radu Nicolau, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/60ea36a0a2673615056aec7f8585b7647fddf4ef

Thanks.

Kevin.

---
From 60ea36a0a2673615056aec7f8585b7647fddf4ef Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 28 Oct 2020 16:27:01 +0000
Subject: [PATCH] examples/multi_process: fix build on Ubuntu 20.04
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 27b549c12df2ef2db6b271795b4df7b14a2d9c2c ]

Two warnings are reported by gcc 9.3.0 on Ubuntu 20.04.

When producing a printable mac address the buffer was appropriately sized
for holding the mac address exactly, but the actual snprintf included a
'\n' character at the end, which means that the snprintf technically is
getting truncated i.e. the \n would not be added due to lack of space.
This gets flagged as a problem by modern versions of gcc, e.g. on Ubuntu
20.04.

main.c:77:37: warning: ‘__builtin___snprintf_chk’ output truncated
  before the last format character [-Wformat-truncation=]
   77 |     "%02x:%02x:%02x:%02x:%02x:%02x\n",
      |                                     ^

Since the \n is getting stripped anyway, we can fix the issue by just
removing it. In the process we can switch to using the standard ethernet
address formatting function from rte_ether.h.

The other warning is about possible string truncation when getting the
RX queue name:

In file included from init.c:36:
init.c: In function ‘init’:
../shared/common.h:38:28: warning: ‘%u’ directive output may be truncated
  writing between 1 and 10 bytes into a region of size 8
  [-Wformat-truncation=]
   38 | #define MP_CLIENT_RXQ_NAME "MProc_Client_%u_RX"
      |                            ^~~~~~~~~~~~~~~~~~~~
../shared/common.h:52:35: note: in expansion of macro ‘MP_CLIENT_RXQ_NAME’
   52 |  snprintf(buffer, sizeof(buffer), MP_CLIENT_RXQ_NAME, id);
      |                                   ^~~~~~~~~~~~~~~~~~

This is a false positive, as the value of the "id" is limited to 255,
being stored in the app as a uint8_t value, removing the possibility of
the %u being replaced by anything other then 3 characters max (rather than
up to 10 as thought by the compiler). Therefore, the warning can be easily
removed by changing the type of the "id" parameter to the local function
from "unsigned" to "uint8_t" also, ensuring the compiler is aware of the
range limit.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
---
 .../client_server_mp/mp_server/main.c           | 17 ++++++++++-------
 .../client_server_mp/shared/common.h            |  2 +-
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/examples/multi_process/client_server_mp/mp_server/main.c b/examples/multi_process/client_server_mp/mp_server/main.c
index 98d675910e..1a5bf534ff 100644
--- a/examples/multi_process/client_server_mp/mp_server/main.c
+++ b/examples/multi_process/client_server_mp/mp_server/main.c
@@ -60,16 +60,19 @@ static const char *
 get_printable_mac_addr(uint16_t port)
 {
-	static const char err_address[] = "00:00:00:00:00:00";
-	static char addresses[RTE_MAX_ETHPORTS][sizeof(err_address)];
+	static const struct ether_addr null_mac; /* static defaults to 0 */
+	static char err_address[32];
+	static char addresses[RTE_MAX_ETHPORTS][32];
 
-	if (unlikely(port >= RTE_MAX_ETHPORTS))
+	if (unlikely(port >= RTE_MAX_ETHPORTS)) {
+		if (err_address[0] == '\0')
+			rte_ether_format_addr(err_address,
+					sizeof(err_address), &null_mac);
 		return err_address;
+	}
 	if (unlikely(addresses[port][0]=='\0')){
 		struct ether_addr mac;
 		rte_eth_macaddr_get(port, &mac);
-		snprintf(addresses[port], sizeof(addresses[port]),
-				"%02x:%02x:%02x:%02x:%02x:%02x\n",
-				mac.addr_bytes[0], mac.addr_bytes[1], mac.addr_bytes[2],
-				mac.addr_bytes[3], mac.addr_bytes[4], mac.addr_bytes[5]);
+		rte_ether_format_addr(addresses[port],
+				sizeof(addresses[port]), &mac);
 	}
 	return addresses[port];
diff --git a/examples/multi_process/client_server_mp/shared/common.h b/examples/multi_process/client_server_mp/shared/common.h
index 6dd43fcac2..76beca0101 100644
--- a/examples/multi_process/client_server_mp/shared/common.h
+++ b/examples/multi_process/client_server_mp/shared/common.h
@@ -44,5 +44,5 @@ struct port_info {
  */
 static inline const char *
-get_rx_queue_name(unsigned id)
+get_rx_queue_name(uint8_t id)
 {
 	/* buffer for return value. Size calculated by %u being replaced
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.744111461 +0000
+++ 0043-examples-multi_process-fix-build-on-Ubuntu-20.04.patch	2020-11-18 16:33:37.942215070 +0000
@@ -1 +1 @@
-From 27b549c12df2ef2db6b271795b4df7b14a2d9c2c Mon Sep 17 00:00:00 2001
+From 60ea36a0a2673615056aec7f8585b7647fddf4ef Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 27b549c12df2ef2db6b271795b4df7b14a2d9c2c ]
+
@@ -50 +51,0 @@
-Cc: stable@dpdk.org
@@ -60 +61 @@
-index ec7f6b11f3..b18e12dd4b 100644
+index 98d675910e..1a5bf534ff 100644
@@ -63 +64 @@
-@@ -60,10 +60,15 @@ static const char *
+@@ -60,16 +60,19 @@ static const char *
@@ -68 +69 @@
-+	static const struct rte_ether_addr null_mac; /* static defaults to 0 */
++	static const struct ether_addr null_mac; /* static defaults to 0 */
@@ -71 +71,0 @@
- 	int ret;
@@ -81,4 +81,2 @@
- 		struct rte_ether_addr mac;
-@@ -74,8 +79,6 @@ get_printable_mac_addr(uint16_t port)
- 			return err_address;
- 		}
+ 		struct ether_addr mac;
+ 		rte_eth_macaddr_get(port, &mac);


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

* [dpdk-stable] patch 'examples/performance-thread: fix build with low core count' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (41 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'examples/multi_process: " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'baseband/turbo_sw: fix memory leak in error path' " Kevin Traynor
                   ` (27 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Honnappa Nagarahalli
  Cc: Ruifeng Wang, Lukasz Wojciechowski, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/0ab5bf91a17d89be8c54e31bcd52c702cf5b1e31

Thanks.

Kevin.

---
From 0ab5bf91a17d89be8c54e31bcd52c702cf5b1e31 Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Fri, 16 Oct 2020 01:03:49 -0500
Subject: [PATCH] examples/performance-thread: fix build with low core count

[ upstream commit 4e3b2d4c76e6249e44b92ffa7c62c031eb23af81 ]

When the value of RTE_MAX_LCORE is small, it results in the
following compilation error.

../examples/performance-thread/l3fwd-thread/main.c:2338:34: error:
iteration 4 invokes undefined behavior
[-Werror=aggressive-loop-optimizations]

Fixes: d48415e1fee3 ("examples/performance-thread: add l3fwd-thread app")

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Tested-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Reviewed-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 examples/performance-thread/l3fwd-thread/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
index 8ec819dcbe..6768a0ebd3 100644
--- a/examples/performance-thread/l3fwd-thread/main.c
+++ b/examples/performance-thread/l3fwd-thread/main.c
@@ -600,6 +600,6 @@ struct thread_tx_conf {
 	struct thread_conf conf;
 
-	uint16_t tx_queue_id[RTE_MAX_LCORE];
-	struct mbuf_table tx_mbufs[RTE_MAX_LCORE];
+	uint16_t tx_queue_id[RTE_MAX_ETHPORTS];
+	struct mbuf_table tx_mbufs[RTE_MAX_ETHPORTS];
 
 	struct rte_ring *ring;
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.760244791 +0000
+++ 0044-examples-performance-thread-fix-build-with-low-core-.patch	2020-11-18 16:33:37.945215072 +0000
@@ -1 +1 @@
-From 4e3b2d4c76e6249e44b92ffa7c62c031eb23af81 Mon Sep 17 00:00:00 2001
+From 0ab5bf91a17d89be8c54e31bcd52c702cf5b1e31 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4e3b2d4c76e6249e44b92ffa7c62c031eb23af81 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index e96076f290..7bf61db6be 100644
+index 8ec819dcbe..6768a0ebd3 100644


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

* [dpdk-stable] patch 'baseband/turbo_sw: fix memory leak in error path' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (42 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'examples/performance-thread: fix build with low core count' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'examples/fips_validation: fix missed version line' " Kevin Traynor
                   ` (26 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Nicolas Chautru, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/3dd7e81837afae95b96a7efe8d430fffc49aaae2

Thanks.

Kevin.

---
From 3dd7e81837afae95b96a7efe8d430fffc49aaae2 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Thu, 15 Oct 2020 21:45:45 +0800
Subject: [PATCH] baseband/turbo_sw: fix memory leak in error path

[ upstream commit 240fb56cdb8a4d48359f83b2cb856410016b9207 ]

In q_setup() allocated memory for the queue data, we should free
it when error happens, otherwise it will lead to memory leak.

Fixes: b8cfe2c9aed2 ("bb/turbo_sw: add software turbo driver")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
 .../baseband/turbo_sw/bbdev_turbo_software.c  | 35 ++++++++++++++-----
 1 file changed, 26 insertions(+), 9 deletions(-)

diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
index 8ceb2769f3..f07c823d4b 100644
--- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
+++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
@@ -11,4 +11,5 @@
 #include <rte_kvargs.h>
 #include <rte_cycles.h>
+#include <rte_errno.h>
 
 #include <rte_bbdev.h>
@@ -234,5 +235,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 				"Creating queue name for device %u queue %u failed",
 				dev->data->dev_id, q_id);
-		return -ENAMETOOLONG;
+		ret = -ENAMETOOLONG;
+		goto free_q;
 	}
 	q->enc_out = rte_zmalloc_socket(name,
@@ -243,4 +245,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 		rte_bbdev_log(ERR,
 			"Failed to allocate queue memory for %s", name);
+		ret = -ENOMEM;
 		goto free_q;
 	}
@@ -254,5 +257,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 				"Creating queue name for device %u queue %u failed",
 				dev->data->dev_id, q_id);
-		return -ENAMETOOLONG;
+		ret = -ENAMETOOLONG;
+		goto free_q;
 	}
 	q->enc_in = rte_zmalloc_socket(name,
@@ -262,4 +266,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 		rte_bbdev_log(ERR,
 			"Failed to allocate queue memory for %s", name);
+		ret = -ENOMEM;
 		goto free_q;
 	}
@@ -272,5 +277,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 				"Creating queue name for device %u queue %u failed",
 				dev->data->dev_id, q_id);
-		return -ENAMETOOLONG;
+		ret = -ENAMETOOLONG;
+		goto free_q;
 	}
 	q->ag = rte_zmalloc_socket(name,
@@ -280,4 +286,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 		rte_bbdev_log(ERR,
 			"Failed to allocate queue memory for %s", name);
+		ret = -ENOMEM;
 		goto free_q;
 	}
@@ -290,5 +297,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 				"Creating queue name for device %u queue %u failed",
 				dev->data->dev_id, q_id);
-		return -ENAMETOOLONG;
+		ret = -ENAMETOOLONG;
+		goto free_q;
 	}
 	q->code_block = rte_zmalloc_socket(name,
@@ -298,4 +306,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 		rte_bbdev_log(ERR,
 			"Failed to allocate queue memory for %s", name);
+		ret = -ENOMEM;
 		goto free_q;
 	}
@@ -309,5 +318,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 				"Creating queue name for device %u queue %u failed",
 				dev->data->dev_id, q_id);
-		return -ENAMETOOLONG;
+		ret = -ENAMETOOLONG;
+		goto free_q;
 	}
 	q->deint_input = rte_zmalloc_socket(name,
@@ -317,4 +327,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 		rte_bbdev_log(ERR,
 			"Failed to allocate queue memory for %s", name);
+		ret = -ENOMEM;
 		goto free_q;
 	}
@@ -328,5 +339,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 				"Creating queue name for device %u queue %u failed",
 				dev->data->dev_id, q_id);
-		return -ENAMETOOLONG;
+		ret = -ENAMETOOLONG;
+		goto free_q;
 	}
 	q->deint_output = rte_zmalloc_socket(NULL,
@@ -336,4 +348,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 		rte_bbdev_log(ERR,
 			"Failed to allocate queue memory for %s", name);
+		ret = -ENOMEM;
 		goto free_q;
 	}
@@ -347,5 +360,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 				"Creating queue name for device %u queue %u failed",
 				dev->data->dev_id, q_id);
-		return -ENAMETOOLONG;
+		ret = -ENAMETOOLONG;
+		goto free_q;
 	}
 	q->adapter_output = rte_zmalloc_socket(NULL,
@@ -355,4 +369,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 		rte_bbdev_log(ERR,
 			"Failed to allocate queue memory for %s", name);
+		ret = -ENOMEM;
 		goto free_q;
 	}
@@ -365,5 +380,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 				"Creating queue name for device %u queue %u failed",
 				dev->data->dev_id, q_id);
-		return -ENAMETOOLONG;
+		ret = -ENAMETOOLONG;
+		goto free_q;
 	}
 	q->processed_pkts = rte_ring_create(name, queue_conf->queue_size,
@@ -371,4 +387,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 	if (q->processed_pkts == NULL) {
 		rte_bbdev_log(ERR, "Failed to create ring for %s", name);
+		ret = -rte_errno;
 		goto free_q;
 	}
@@ -390,5 +407,5 @@ free_q:
 	rte_free(q->adapter_output);
 	rte_free(q);
-	return -EFAULT;
+	return ret;
 }
 
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.779129935 +0000
+++ 0045-baseband-turbo_sw-fix-memory-leak-in-error-path.patch	2020-11-18 16:33:37.946215073 +0000
@@ -1 +1 @@
-From 240fb56cdb8a4d48359f83b2cb856410016b9207 Mon Sep 17 00:00:00 2001
+From 3dd7e81837afae95b96a7efe8d430fffc49aaae2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 240fb56cdb8a4d48359f83b2cb856410016b9207 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index a36099e91d..aa7f122382 100644
+index 8ceb2769f3..f07c823d4b 100644
@@ -28 +29 @@
-@@ -303,5 +304,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -234,5 +235,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -36 +37 @@
-@@ -312,4 +314,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -243,4 +245,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -42 +43 @@
-@@ -323,5 +326,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -254,5 +257,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -50 +51 @@
-@@ -331,4 +335,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -262,4 +266,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -56 +57 @@
-@@ -341,5 +346,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -272,5 +277,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -64 +65 @@
-@@ -349,4 +355,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -280,4 +286,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -70 +71 @@
-@@ -359,5 +366,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -290,5 +297,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -78 +79 @@
-@@ -367,4 +375,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -298,4 +306,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -84 +85 @@
-@@ -378,5 +387,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -309,5 +318,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -92 +93 @@
-@@ -386,4 +396,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -317,4 +327,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -98 +99 @@
-@@ -397,5 +408,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -328,5 +339,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -106 +107 @@
-@@ -405,4 +417,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -336,4 +348,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -112 +113 @@
-@@ -416,5 +429,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -347,5 +360,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -120 +121 @@
-@@ -424,4 +438,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -355,4 +369,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -126 +127 @@
-@@ -434,5 +449,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -365,5 +380,6 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -134 +135 @@
-@@ -440,4 +456,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -371,4 +387,5 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -140 +141 @@
-@@ -459,5 +476,5 @@ free_q:
+@@ -390,5 +407,5 @@ free_q:


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

* [dpdk-stable] patch 'examples/fips_validation: fix missed version line' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (43 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'baseband/turbo_sw: fix memory leak in error path' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'crypto/dpaa2_sec: remove dead code' " Kevin Traynor
                   ` (25 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Fan Zhang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/459faf05d3533a11aff082c933ae4bc21cc2c8d8

Thanks.

Kevin.

---
From 459faf05d3533a11aff082c933ae4bc21cc2c8d8 Mon Sep 17 00:00:00 2001
From: Fan Zhang <roy.fan.zhang@intel.com>
Date: Thu, 22 Oct 2020 10:59:26 +0100
Subject: [PATCH] examples/fips_validation: fix missed version line

[ upstream commit ecc3356fed449f0245127655aefb30844c1889c4 ]

This patch fixes the missing version line in the response file.

Fixes: 793650184099 ("examples/fips_validation: fix version compatibility")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 examples/fips_validation/fips_validation.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c
index 489c8bac98..d46f72d9b8 100644
--- a/examples/fips_validation/fips_validation.c
+++ b/examples/fips_validation/fips_validation.c
@@ -106,5 +106,5 @@ fips_test_parse_header(void)
 		return ret;
 
-	for (i = 0; i < info.nb_vec_lines; i++) {
+	for (i = 1; i < info.nb_vec_lines; i++) {
 		if (strstr(info.vec[i], "AESVS")) {
 			info.algo = FIPS_TEST_ALGO_AES;
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.796132599 +0000
+++ 0046-examples-fips_validation-fix-missed-version-line.patch	2020-11-18 16:33:37.946215073 +0000
@@ -1 +1 @@
-From ecc3356fed449f0245127655aefb30844c1889c4 Mon Sep 17 00:00:00 2001
+From 459faf05d3533a11aff082c933ae4bc21cc2c8d8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ecc3356fed449f0245127655aefb30844c1889c4 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index 7454a03b16..4c3ed80c82 100644
+index 489c8bac98..d46f72d9b8 100644
@@ -20,2 +21,2 @@
-@@ -119,5 +119,5 @@ fips_test_parse_header(void)
- 		fips_test_parse_version();
+@@ -106,5 +106,5 @@ fips_test_parse_header(void)
+ 		return ret;
@@ -23,4 +24,4 @@
--	for (i = 1; i < info.nb_vec_lines; i++) {
-+	for (i = 0; i < info.nb_vec_lines; i++) {
- 		if (!algo_parsed) {
- 			if (strstr(info.vec[i], "AESVS")) {
+-	for (i = 0; i < info.nb_vec_lines; i++) {
++	for (i = 1; i < info.nb_vec_lines; i++) {
+ 		if (strstr(info.vec[i], "AESVS")) {
+ 			info.algo = FIPS_TEST_ALGO_AES;


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

* [dpdk-stable] patch 'crypto/dpaa2_sec: remove dead code' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (44 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'examples/fips_validation: fix missed version line' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'common/qat: add missing kmod dependency info' " Kevin Traynor
                   ` (24 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: David Marchand; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/8749f40135561395837dc5c41c0f873b7a977322

Thanks.

Kevin.

---
From 8749f40135561395837dc5c41c0f873b7a977322 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 23 Oct 2020 09:43:04 +0200
Subject: [PATCH] crypto/dpaa2_sec: remove dead code

[ upstream commit 0ea0bbfebc3e557b1739b20de0dabbe938b2f058 ]

RTE_LIBRTE_SECURITY_TEST never existed, the variable under this check is
never used.

Fixes: e117c18a1dbe ("crypto/dpaa2_sec: restructure session management")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 0db5b4e6d9..b2f43e37b2 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2424,10 +2424,4 @@ dpaa2_sec_ipsec_proto_init(struct rte_crypto_cipher_xform *cipher_xform,
 }
 
-#ifdef RTE_LIBRTE_SECURITY_TEST
-static uint8_t aes_cbc_iv[] = {
-	0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-	0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f };
-#endif
-
 static int
 dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev,
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.812361705 +0000
+++ 0047-crypto-dpaa2_sec-remove-dead-code.patch	2020-11-18 16:33:37.949215075 +0000
@@ -1 +1 @@
-From 0ea0bbfebc3e557b1739b20de0dabbe938b2f058 Mon Sep 17 00:00:00 2001
+From 8749f40135561395837dc5c41c0f873b7a977322 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0ea0bbfebc3e557b1739b20de0dabbe938b2f058 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index ce1d50ce77..6ff0d833e9 100644
+index 0db5b4e6d9..b2f43e37b2 100644
@@ -22 +23 @@
-@@ -2821,10 +2821,4 @@ dpaa2_sec_ipsec_proto_init(struct rte_crypto_cipher_xform *cipher_xform,
+@@ -2424,10 +2424,4 @@ dpaa2_sec_ipsec_proto_init(struct rte_crypto_cipher_xform *cipher_xform,


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

* [dpdk-stable] patch 'common/qat: add missing kmod dependency info' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (45 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'crypto/dpaa2_sec: remove dead code' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'app/testpmd: fix bonding xmit balance policy command' " Kevin Traynor
                   ` (23 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Didier Pallard; +Cc: David Marchand, Fiona Trahe, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/03c4e8a252e0ee87d352ff8fc9d2591f0d0cad31

Thanks.

Kevin.

---
From 03c4e8a252e0ee87d352ff8fc9d2591f0d0cad31 Mon Sep 17 00:00:00 2001
From: Didier Pallard <didier.pallard@6wind.com>
Date: Fri, 23 Oct 2020 17:44:57 +0200
Subject: [PATCH] common/qat: add missing kmod dependency info

[ upstream commit a0fe0cc5313821cf9d990237f0bf762123b52fc7 ]

Dependency on kmod needed to manage crypto devices is missing
in qat crypto pmd.

Fixes: 0880c40113ef ("drivers: advertise kmod dependencies in pmdinfo")

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
 drivers/common/qat/qat_device.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/common/qat/qat_device.c b/drivers/common/qat/qat_device.c
index 2a1cf3e179..9f078191dd 100644
--- a/drivers/common/qat/qat_device.c
+++ b/drivers/common/qat/qat_device.c
@@ -302,2 +302,3 @@ qat_comp_dev_destroy(struct qat_pci_device *qat_pci_dev __rte_unused)
 RTE_PMD_REGISTER_PCI(QAT_PCI_NAME, rte_qat_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(QAT_PCI_NAME, pci_id_qat_map);
+RTE_PMD_REGISTER_KMOD_DEP(QAT_PCI_NAME, "* igb_uio | uio_pci_generic | vfio-pci");
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.831598978 +0000
+++ 0048-common-qat-add-missing-kmod-dependency-info.patch	2020-11-18 16:33:37.949215075 +0000
@@ -1 +1 @@
-From a0fe0cc5313821cf9d990237f0bf762123b52fc7 Mon Sep 17 00:00:00 2001
+From 03c4e8a252e0ee87d352ff8fc9d2591f0d0cad31 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a0fe0cc5313821cf9d990237f0bf762123b52fc7 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index b050ce20e4..9fa142b5e5 100644
+index 2a1cf3e179..9f078191dd 100644
@@ -23 +24 @@
-@@ -424,2 +424,3 @@ qat_comp_dev_destroy(struct qat_pci_device *qat_pci_dev __rte_unused)
+@@ -302,2 +302,3 @@ qat_comp_dev_destroy(struct qat_pci_device *qat_pci_dev __rte_unused)


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

* [dpdk-stable] patch 'app/testpmd: fix bonding xmit balance policy command' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (46 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'common/qat: add missing kmod dependency info' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/i40e: fix virtual channel conflict' " Kevin Traynor
                   ` (22 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/d73c0e33218758db1fb0db186393b367339f7af1

Thanks.

Kevin.

---
From d73c0e33218758db1fb0db186393b367339f7af1 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Tue, 20 Oct 2020 11:04:16 +0800
Subject: [PATCH] app/testpmd: fix bonding xmit balance policy command

[ upstream commit 393e557ea8401d925655eb6c7c91fc7a450dcf2b ]

Currently there exists inconsistency about name of transmission
policy for a Link Bonding device. "xmit_balance_policy" is not
correct, which should be modified to "balance_xmit_policy".

Fixes: 2950a769315e ("bond: testpmd support")
Fixes: ac718398f477 ("doc: testpmd application user guide")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/cmdline.c                      | 2 +-
 doc/guides/testpmd_app_ug/testpmd_funcs.rst | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index c8cd717992..c494f36578 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -618,5 +618,5 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"	Set Aggregation mode for IEEE802.3AD (mode 4)"
 
-			"set bonding xmit_balance_policy (port_id) (l2|l23|l34)\n"
+			"set bonding balance_xmit_policy (port_id) (l2|l23|l34)\n"
 			"	Set the transmit balance policy for bonded device running in balance mode.\n\n"
 
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 0d71e20c64..efa3b28766 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -2253,14 +2253,14 @@ For example, to set the MAC address of a Link Bonding device (port 10) to 00:00:
    testpmd> set bonding mac 10 00:00:00:00:00:01
 
-set bonding xmit_balance_policy
+set bonding balance_xmit_policy
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Set the transmission policy for a Link Bonding device when it is in Balance XOR mode::
 
-   testpmd> set bonding xmit_balance_policy (port_id) (l2|l23|l34)
+   testpmd> set bonding balance_xmit_policy (port_id) (l2|l23|l34)
 
 For example, set a Link Bonding device (port 10) to use a balance policy of layer 3+4 (IP addresses & UDP ports)::
 
-   testpmd> set bonding xmit_balance_policy 10 l34
+   testpmd> set bonding balance_xmit_policy 10 l34
 
 
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.847538583 +0000
+++ 0049-app-testpmd-fix-bonding-xmit-balance-policy-command.patch	2020-11-18 16:33:37.964215084 +0000
@@ -1 +1 @@
-From 393e557ea8401d925655eb6c7c91fc7a450dcf2b Mon Sep 17 00:00:00 2001
+From d73c0e33218758db1fb0db186393b367339f7af1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 393e557ea8401d925655eb6c7c91fc7a450dcf2b ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index d59c2b2c44..3f6d81c9a1 100644
+index c8cd717992..c494f36578 100644
@@ -25 +26 @@
-@@ -650,5 +650,5 @@ static void cmd_help_long_parsed(void *parsed_result,
+@@ -618,5 +618,5 @@ static void cmd_help_long_parsed(void *parsed_result,
@@ -33 +34 @@
-index 86aaf8fe0c..82d377ceed 100644
+index 0d71e20c64..efa3b28766 100644
@@ -36 +37 @@
-@@ -2606,14 +2606,14 @@ For example, to set the MAC address of a Link Bonding device (port 10) to 00:00:
+@@ -2253,14 +2253,14 @@ For example, to set the MAC address of a Link Bonding device (port 10) to 00:00:


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

* [dpdk-stable] patch 'net/i40e: fix virtual channel conflict' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (47 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'app/testpmd: fix bonding xmit balance policy command' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/ixgbe: check switch domain allocation result' " Kevin Traynor
                   ` (21 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Yuying Zhang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/693cd7919ca616107497c8321af326466162a890

Thanks.

Kevin.

---
From 693cd7919ca616107497c8321af326466162a890 Mon Sep 17 00:00:00 2001
From: Yuying Zhang <yuying.zhang@intel.com>
Date: Mon, 19 Oct 2020 02:20:25 +0000
Subject: [PATCH] net/i40e: fix virtual channel conflict

[ upstream commit 99e47bbe4c074c879bbe5d2c316754859fa00912 ]

i40evf_execute_vf_cmd() uses _atomic_set_cmd() to execute virtual
channel commands safely in multi-process mode and multi-thread mode.
However, it returns error when one process or thread is pending. Add
rte_spinlock_trylock() to handle this issue in concurrent scenarios.

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

Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.h    |  1 +
 drivers/net/i40e/i40e_ethdev_vf.c | 16 +++++++++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index 6cec6cf0c1..3def71bc54 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -1029,4 +1029,5 @@ struct i40e_vf {
 	bool promisc_multicast_enabled;
 
+	rte_spinlock_t cmd_send_lock;
 	uint32_t version_major; /* Major version number */
 	uint32_t version_minor; /* Minor version number */
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index e1ebaa55de..522322d3d7 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -314,5 +314,5 @@ _atomic_set_cmd(struct i40e_vf *vf, enum virtchnl_ops ops)
 
 static int
-i40evf_execute_vf_cmd(struct rte_eth_dev *dev, struct vf_cmd_info *args)
+_i40evf_execute_vf_cmd(struct rte_eth_dev *dev, struct vf_cmd_info *args)
 {
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -383,4 +383,17 @@ i40evf_execute_vf_cmd(struct rte_eth_dev *dev, struct vf_cmd_info *args)
 }
 
+static int
+i40evf_execute_vf_cmd(struct rte_eth_dev *dev, struct vf_cmd_info *args)
+{
+	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
+	int err;
+
+	while (!rte_spinlock_trylock(&vf->cmd_send_lock))
+		rte_delay_us_sleep(50);
+	err = _i40evf_execute_vf_cmd(dev, args);
+	rte_spinlock_unlock(&vf->cmd_send_lock);
+	return err;
+}
+
 /*
  * Check API version with sync wait until version read or fail from admin queue
@@ -1145,4 +1158,5 @@ i40evf_init_vf(struct rte_eth_dev *dev)
 	vf->adapter = I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 	vf->dev_data = dev->data;
+	rte_spinlock_init(&vf->cmd_send_lock);
 	err = i40e_set_mac_type(hw);
 	if (err) {
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.879944908 +0000
+++ 0050-net-i40e-fix-virtual-channel-conflict.patch	2020-11-18 16:33:37.967215086 +0000
@@ -1 +1 @@
-From 99e47bbe4c074c879bbe5d2c316754859fa00912 Mon Sep 17 00:00:00 2001
+From 693cd7919ca616107497c8321af326466162a890 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 99e47bbe4c074c879bbe5d2c316754859fa00912 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 1466998aa1..508a940dc6 100644
+index 6cec6cf0c1..3def71bc54 100644
@@ -25 +26 @@
-@@ -1210,4 +1210,5 @@ struct i40e_vf {
+@@ -1029,4 +1029,5 @@ struct i40e_vf {
@@ -32 +33 @@
-index 53154c3ef3..6e6eef5a6a 100644
+index e1ebaa55de..522322d3d7 100644
@@ -35 +36 @@
-@@ -315,5 +315,5 @@ _atomic_set_cmd(struct i40e_vf *vf, enum virtchnl_ops ops)
+@@ -314,5 +314,5 @@ _atomic_set_cmd(struct i40e_vf *vf, enum virtchnl_ops ops)
@@ -42 +43 @@
-@@ -406,4 +406,17 @@ i40evf_execute_vf_cmd(struct rte_eth_dev *dev, struct vf_cmd_info *args)
+@@ -383,4 +383,17 @@ i40evf_execute_vf_cmd(struct rte_eth_dev *dev, struct vf_cmd_info *args)
@@ -60 +61 @@
-@@ -1247,4 +1260,5 @@ i40evf_init_vf(struct rte_eth_dev *dev)
+@@ -1145,4 +1158,5 @@ i40evf_init_vf(struct rte_eth_dev *dev)


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

* [dpdk-stable] patch 'net/ixgbe: check switch domain allocation result' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (48 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/i40e: fix virtual channel conflict' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/i40e: fix QinQ flow pattern to allow non full mask' " Kevin Traynor
                   ` (20 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Conor Walsh; +Cc: Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/4508fba7011c47720984418d0c1e0b1355526d79

Thanks.

Kevin.

---
From 4508fba7011c47720984418d0c1e0b1355526d79 Mon Sep 17 00:00:00 2001
From: Conor Walsh <conor.walsh@intel.com>
Date: Tue, 20 Oct 2020 10:02:47 +0000
Subject: [PATCH] net/ixgbe: check switch domain allocation result

[ upstream commit c2c523189634c54cb99ce452a14c46d02cc4d2de ]

The return value of rte_eth_switch_domain_alloc() was not being checked
within ixgbe_pf_host_init() which caused a coverity issue. If the call
fails a warning is logged using PMD_INIT_LOG() and *vfinfo is free'd.
ixgbe_pf_host_init() now has a return value which is checked in
eth_ixgbe_dev_init()

Coverity issue: 362795
Fixes: cf80ba6e2038 ("net/ixgbe: add support for representor ports")

Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 11 +++++++++--
 drivers/net/ixgbe/ixgbe_ethdev.h |  2 +-
 drivers/net/ixgbe/ixgbe_pf.c     | 16 +++++++++++++---
 3 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index ac6f5f7def..f798d21e45 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1076,5 +1076,5 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 	uint32_t ctrl_ext;
 	uint16_t csum;
-	int diag, i;
+	int diag, i, ret;
 
 	PMD_INIT_FUNC_TRACE();
@@ -1250,5 +1250,12 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 
 	/* initialize PF if max_vfs not zero */
-	ixgbe_pf_host_init(eth_dev);
+	ret = ixgbe_pf_host_init(eth_dev);
+	if (ret) {
+		rte_free(eth_dev->data->mac_addrs);
+		eth_dev->data->mac_addrs = NULL;
+		rte_free(eth_dev->data->hash_mac_addrs);
+		eth_dev->data->hash_mac_addrs = NULL;
+		return ret;
+	}
 
 	ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT);
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index 2177d37060..db041a8787 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -706,5 +706,5 @@ void ixgbe_vlan_hw_filter_disable(struct rte_eth_dev *dev);
 void ixgbe_vlan_hw_strip_config(struct rte_eth_dev *dev);
 
-void ixgbe_pf_host_init(struct rte_eth_dev *eth_dev);
+int ixgbe_pf_host_init(struct rte_eth_dev *eth_dev);
 
 void ixgbe_pf_host_uninit(struct rte_eth_dev *eth_dev);
diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index 22d826cbf1..af564864d3 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -67,5 +67,5 @@ ixgbe_mb_intr_setup(struct rte_eth_dev *dev)
 }
 
-void ixgbe_pf_host_init(struct rte_eth_dev *eth_dev)
+int ixgbe_pf_host_init(struct rte_eth_dev *eth_dev)
 {
 	struct ixgbe_vf_info **vfinfo =
@@ -79,4 +79,5 @@ void ixgbe_pf_host_init(struct rte_eth_dev *eth_dev)
 	uint16_t vf_num;
 	uint8_t nb_queue;
+	int ret = 0;
 
 	PMD_INIT_FUNC_TRACE();
@@ -85,5 +86,5 @@ void ixgbe_pf_host_init(struct rte_eth_dev *eth_dev)
 	vf_num = dev_num_vf(eth_dev);
 	if (vf_num == 0)
-		return;
+		return ret;
 
 	*vfinfo = rte_zmalloc("vf_info", sizeof(struct ixgbe_vf_info) * vf_num, 0);
@@ -91,5 +92,12 @@ void ixgbe_pf_host_init(struct rte_eth_dev *eth_dev)
 		rte_panic("Cannot allocate memory for private VF data\n");
 
-	rte_eth_switch_domain_alloc(&(*vfinfo)->switch_domain_id);
+	ret = rte_eth_switch_domain_alloc(&(*vfinfo)->switch_domain_id);
+	if (ret) {
+		PMD_INIT_LOG(ERR,
+			"failed to allocate switch domain for device %d", ret);
+		rte_free(*vfinfo);
+		*vfinfo = NULL;
+		return ret;
+	}
 
 	memset(mirror_info, 0, sizeof(struct ixgbe_mirror_info));
@@ -119,4 +127,6 @@ void ixgbe_pf_host_init(struct rte_eth_dev *eth_dev)
 	/* set mb interrupt mask */
 	ixgbe_mb_intr_setup(eth_dev);
+
+	return ret;
 }
 
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.899262162 +0000
+++ 0051-net-ixgbe-check-switch-domain-allocation-result.patch	2020-11-18 16:33:37.974215091 +0000
@@ -1 +1 @@
-From c2c523189634c54cb99ce452a14c46d02cc4d2de Mon Sep 17 00:00:00 2001
+From 4508fba7011c47720984418d0c1e0b1355526d79 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c2c523189634c54cb99ce452a14c46d02cc4d2de ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 00101c2eec..913c45366a 100644
+index ac6f5f7def..f798d21e45 100644
@@ -28 +29 @@
-@@ -1078,5 +1078,5 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -1076,5 +1076,5 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -35 +36 @@
-@@ -1257,5 +1257,12 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -1250,5 +1250,12 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -50 +51 @@
-index 33905f7136..0132fb8db7 100644
+index 2177d37060..db041a8787 100644
@@ -53 +54 @@
-@@ -718,5 +718,5 @@ void ixgbe_vlan_hw_filter_disable(struct rte_eth_dev *dev);
+@@ -706,5 +706,5 @@ void ixgbe_vlan_hw_filter_disable(struct rte_eth_dev *dev);
@@ -61 +62 @@
-index ed5f96b1a4..4e25b1e72e 100644
+index 22d826cbf1..af564864d3 100644


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

* [dpdk-stable] patch 'net/i40e: fix QinQ flow pattern to allow non full mask' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (49 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/ixgbe: check switch domain allocation result' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/ixgbe: fix vector Rx' " Kevin Traynor
                   ` (19 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Padraig Connolly; +Cc: Bernard Iremonger, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/27c0b284cdfcf1072e6c1f2020a28ab1d094d291

Thanks.

Kevin.

---
From 27c0b284cdfcf1072e6c1f2020a28ab1d094d291 Mon Sep 17 00:00:00 2001
From: Padraig Connolly <padraig.j.connolly@intel.com>
Date: Thu, 15 Oct 2020 10:28:58 +0100
Subject: [PATCH] net/i40e: fix QinQ flow pattern to allow non full mask

[ upstream commit ff0df4e134cc6efe75e1ed103b2c7b316b8269e2 ]

Issue reported by customer that only full mask was allowed on inner and
outer VLAN tag, thus not allowing mask to set VLAN ID filter only.
Removed check that enforces inner vlan and outer vlan equal
I40E_TCI_MASK (full mask 0xffff).

Fixes: d37705068ee8 ("net/i40e: parse QinQ pattern")

Signed-off-by: Padraig Connolly <padraig.j.connolly@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 drivers/net/i40e/i40e_flow.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 088b92fdd1..e5c42144e0 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -4150,12 +4150,7 @@ i40e_flow_parse_qinq_pattern(__rte_unused struct rte_eth_dev *dev,
 
 	/* Get filter specification */
-	if ((o_vlan_mask != NULL) && (o_vlan_mask->tci ==
-			rte_cpu_to_be_16(I40E_TCI_MASK)) &&
-			(i_vlan_mask != NULL) &&
-			(i_vlan_mask->tci == rte_cpu_to_be_16(I40E_TCI_MASK))) {
-		filter->outer_vlan = rte_be_to_cpu_16(o_vlan_spec->tci)
-			& I40E_TCI_MASK;
-		filter->inner_vlan = rte_be_to_cpu_16(i_vlan_spec->tci)
-			& I40E_TCI_MASK;
+	if (o_vlan_mask != NULL &&  i_vlan_mask != NULL) {
+		filter->outer_vlan = rte_be_to_cpu_16(o_vlan_spec->tci);
+		filter->inner_vlan = rte_be_to_cpu_16(i_vlan_spec->tci);
 	} else {
 			rte_flow_error_set(error, EINVAL,
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.922308386 +0000
+++ 0052-net-i40e-fix-QinQ-flow-pattern-to-allow-non-full-mas.patch	2020-11-18 16:33:37.976215092 +0000
@@ -1 +1 @@
-From ff0df4e134cc6efe75e1ed103b2c7b316b8269e2 Mon Sep 17 00:00:00 2001
+From 27c0b284cdfcf1072e6c1f2020a28ab1d094d291 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ff0df4e134cc6efe75e1ed103b2c7b316b8269e2 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index adc5da1c53..8e7a9989b3 100644
+index 088b92fdd1..e5c42144e0 100644
@@ -24 +25 @@
-@@ -4650,12 +4650,7 @@ i40e_flow_parse_qinq_pattern(__rte_unused struct rte_eth_dev *dev,
+@@ -4150,12 +4150,7 @@ i40e_flow_parse_qinq_pattern(__rte_unused struct rte_eth_dev *dev,


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

* [dpdk-stable] patch 'net/ixgbe: fix vector Rx' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (50 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/i40e: fix QinQ flow pattern to allow non full mask' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/i40e: " Kevin Traynor
                   ` (18 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Jeff Guo; +Cc: Feifei Wang, Morten Brørup, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/b7a03919c8e63b053c7453888e6a4fc325bf2221

Thanks.

Kevin.

---
From b7a03919c8e63b053c7453888e6a4fc325bf2221 Mon Sep 17 00:00:00 2001
From: Jeff Guo <jia.guo@intel.com>
Date: Fri, 16 Oct 2020 17:44:27 +0800
Subject: [PATCH] net/ixgbe: fix vector Rx
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 5a3cca342417f7d4be4ac4b6225ca509617777c4 ]

The limitation of burst size in vector rx was removed, since it should
retrieve as much received packets as possible. And also the scattered
receive path should use a wrapper function to achieve the goal of
burst maximizing.

Bugzilla ID: 516
Fixes: b20971b6cca0 ("net/ixgbe: implement vector driver for ARM")
Fixes: 0e51f9dc4860 ("net/ixgbe: rename x86 vector driver file")

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Tested-by: Feifei Wang <feifei.wang2@arm.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c | 61 +++++++++++++++----------
 drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c  | 47 +++++++++++++------
 2 files changed, 70 insertions(+), 38 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
index d967236c44..da6ee2368d 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
@@ -131,15 +131,4 @@ desc_to_olflags_v(uint8x16x2_t sterr_tmp1, uint8x16x2_t sterr_tmp2,
 }
 
-/*
- * vPMD raw receive routine, only accept(nb_pkts >= RTE_IXGBE_DESCS_PER_LOOP)
- *
- * Notice:
- * - nb_pkts < RTE_IXGBE_DESCS_PER_LOOP, just return no packet
- * - nb_pkts > RTE_IXGBE_MAX_RX_BURST, only scan RTE_IXGBE_MAX_RX_BURST
- *   numbers of DD bit
- * - floor align nb_pkts to a RTE_IXGBE_DESC_PER_LOOP power-of-two
- * - don't support ol_flags for rss and csum err
- */
-
 #define IXGBE_VPMD_DESC_DD_MASK		0x01010101
 #define IXGBE_VPMD_DESC_EOP_MASK	0x02020202
@@ -207,4 +196,11 @@ desc_to_ptype_v(uint64x2_t descs[4], uint16_t pkt_type_mask,
 }
 
+/**
+ * vPMD raw receive routine, only accept(nb_pkts >= RTE_IXGBE_DESCS_PER_LOOP)
+ *
+ * Notice:
+ * - nb_pkts < RTE_IXGBE_DESCS_PER_LOOP, just return no packet
+ * - floor align nb_pkts to a RTE_IXGBE_DESC_PER_LOOP power-of-two
+ */
 static inline uint16_t
 _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
@@ -227,7 +223,4 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 				 rxq->crc_len, 0, 0, 0};
 
-	/* nb_pkts shall be less equal than RTE_IXGBE_MAX_RX_BURST */
-	nb_pkts = RTE_MIN(nb_pkts, RTE_IXGBE_MAX_RX_BURST);
-
 	/* nb_pkts has to be floor-aligned to RTE_IXGBE_DESCS_PER_LOOP */
 	nb_pkts = RTE_ALIGN_FLOOR(nb_pkts, RTE_IXGBE_DESCS_PER_LOOP);
@@ -383,11 +376,9 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 }
 
-/*
+/**
  * vPMD receive routine, only accept(nb_pkts >= RTE_IXGBE_DESCS_PER_LOOP)
  *
  * Notice:
  * - nb_pkts < RTE_IXGBE_DESCS_PER_LOOP, just return no packet
- * - nb_pkts > RTE_IXGBE_MAX_RX_BURST, only scan RTE_IXGBE_MAX_RX_BURST
- *   numbers of DD bit
  * - floor align nb_pkts to a RTE_IXGBE_DESC_PER_LOOP power-of-two
  * - don't support ol_flags for rss and csum err
@@ -400,5 +391,5 @@ ixgbe_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 }
 
-/*
+/**
  * vPMD receive routine that reassembles scattered packets
  *
@@ -406,11 +397,9 @@ ixgbe_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
  * - don't support ol_flags for rss and csum err
  * - nb_pkts < RTE_IXGBE_DESCS_PER_LOOP, just return no packet
- * - nb_pkts > RTE_IXGBE_MAX_RX_BURST, only scan RTE_IXGBE_MAX_RX_BURST
- *   numbers of DD bit
  * - floor align nb_pkts to a RTE_IXGBE_DESC_PER_LOOP power-of-two
  */
-uint16_t
-ixgbe_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
-		uint16_t nb_pkts)
+static uint16_t
+ixgbe_recv_scattered_burst_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+			       uint16_t nb_pkts)
 {
 	struct ixgbe_rx_queue *rxq = rx_queue;
@@ -444,4 +433,30 @@ ixgbe_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 }
 
+/**
+ * vPMD receive routine that reassembles scattered packets.
+ */
+uint16_t
+ixgbe_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+			      uint16_t nb_pkts)
+{
+	uint16_t retval = 0;
+
+	while (nb_pkts > RTE_IXGBE_MAX_RX_BURST) {
+		uint16_t burst;
+
+		burst = ixgbe_recv_scattered_burst_vec(rx_queue,
+						       rx_pkts + retval,
+						       RTE_IXGBE_MAX_RX_BURST);
+		retval += burst;
+		nb_pkts -= burst;
+		if (burst < RTE_IXGBE_MAX_RX_BURST)
+			return retval;
+	}
+
+	return retval + ixgbe_recv_scattered_burst_vec(rx_queue,
+						       rx_pkts + retval,
+						       nb_pkts);
+}
+
 static inline void
 vtx1(volatile union ixgbe_adv_tx_desc *txdp,
diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
index 599ba30e51..03eacfd86b 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c
@@ -303,11 +303,9 @@ desc_to_ptype_v(__m128i descs[4], uint16_t pkt_type_mask,
 }
 
-/*
+/**
  * vPMD raw receive routine, only accept(nb_pkts >= RTE_IXGBE_DESCS_PER_LOOP)
  *
  * Notice:
  * - nb_pkts < RTE_IXGBE_DESCS_PER_LOOP, just return no packet
- * - nb_pkts > RTE_IXGBE_MAX_RX_BURST, only scan RTE_IXGBE_MAX_RX_BURST
- *   numbers of DD bit
  * - floor align nb_pkts to a RTE_IXGBE_DESC_PER_LOOP power-of-two
  */
@@ -345,7 +343,4 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 	uint8_t vlan_flags;
 
-	/* nb_pkts shall be less equal than RTE_IXGBE_MAX_RX_BURST */
-	nb_pkts = RTE_MIN(nb_pkts, RTE_IXGBE_MAX_RX_BURST);
-
 	/* nb_pkts has to be floor-aligned to RTE_IXGBE_DESCS_PER_LOOP */
 	nb_pkts = RTE_ALIGN_FLOOR(nb_pkts, RTE_IXGBE_DESCS_PER_LOOP);
@@ -557,11 +552,9 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 }
 
-/*
+/**
  * vPMD receive routine, only accept(nb_pkts >= RTE_IXGBE_DESCS_PER_LOOP)
  *
  * Notice:
  * - nb_pkts < RTE_IXGBE_DESCS_PER_LOOP, just return no packet
- * - nb_pkts > RTE_IXGBE_MAX_RX_BURST, only scan RTE_IXGBE_MAX_RX_BURST
- *   numbers of DD bit
  * - floor align nb_pkts to a RTE_IXGBE_DESC_PER_LOOP power-of-two
  */
@@ -573,16 +566,14 @@ ixgbe_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 }
 
-/*
+/**
  * vPMD receive routine that reassembles scattered packets
  *
  * Notice:
  * - nb_pkts < RTE_IXGBE_DESCS_PER_LOOP, just return no packet
- * - nb_pkts > RTE_IXGBE_MAX_RX_BURST, only scan RTE_IXGBE_MAX_RX_BURST
- *   numbers of DD bit
  * - floor align nb_pkts to a RTE_IXGBE_DESC_PER_LOOP power-of-two
  */
-uint16_t
-ixgbe_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
-		uint16_t nb_pkts)
+static uint16_t
+ixgbe_recv_scattered_burst_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+			       uint16_t nb_pkts)
 {
 	struct ixgbe_rx_queue *rxq = rx_queue;
@@ -616,4 +607,30 @@ ixgbe_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 }
 
+/**
+ * vPMD receive routine that reassembles scattered packets.
+ */
+uint16_t
+ixgbe_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+			      uint16_t nb_pkts)
+{
+	uint16_t retval = 0;
+
+	while (nb_pkts > RTE_IXGBE_MAX_RX_BURST) {
+		uint16_t burst;
+
+		burst = ixgbe_recv_scattered_burst_vec(rx_queue,
+						       rx_pkts + retval,
+						       RTE_IXGBE_MAX_RX_BURST);
+		retval += burst;
+		nb_pkts -= burst;
+		if (burst < RTE_IXGBE_MAX_RX_BURST)
+			return retval;
+	}
+
+	return retval + ixgbe_recv_scattered_burst_vec(rx_queue,
+						       rx_pkts + retval,
+						       nb_pkts);
+}
+
 static inline void
 vtx1(volatile union ixgbe_adv_tx_desc *txdp,
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.942559122 +0000
+++ 0053-net-ixgbe-fix-vector-Rx.patch	2020-11-18 16:33:37.978215093 +0000
@@ -1 +1 @@
-From 5a3cca342417f7d4be4ac4b6225ca509617777c4 Mon Sep 17 00:00:00 2001
+From b7a03919c8e63b053c7453888e6a4fc325bf2221 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 5a3cca342417f7d4be4ac4b6225ca509617777c4 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index aa27ee1777..4c81ae9dcf 100644
+index d967236c44..da6ee2368d 100644
@@ -45,0 +47 @@
+ #define IXGBE_VPMD_DESC_DD_MASK		0x01010101
@@ -47 +48,0 @@
- #define IXGBE_UINT8_BIT			(CHAR_BIT * sizeof(uint8_t))
@@ -135 +136 @@
-index 586a261808..90c076825a 100644
+index 599ba30e51..03eacfd86b 100644


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

* [dpdk-stable] patch 'net/i40e: fix vector Rx' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (51 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/ixgbe: fix vector Rx' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/fm10k: " Kevin Traynor
                   ` (17 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Jeff Guo; +Cc: Morten Brørup, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/f12b0feb97b85829fc2e8f77aafbe63da4925f51

Thanks.

Kevin.

---
From f12b0feb97b85829fc2e8f77aafbe63da4925f51 Mon Sep 17 00:00:00 2001
From: Jeff Guo <jia.guo@intel.com>
Date: Fri, 16 Oct 2020 17:44:28 +0800
Subject: [PATCH] net/i40e: fix vector Rx
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 9e27f00f3a61939e02429d5782ca10bc4cd5e315 ]

The limitation of burst size in vector rx was removed, since it should
retrieve as much received packets as possible. And also the scattered
receive path should use a wrapper function to achieve the goal of
burst maximizing.

Bugzilla ID: 516
Fixes: 5b463eda8d26 ("net/i40e: make vector driver filenames consistent")
Fixes: ae0eb310f253 ("net/i40e: implement vector PMD for ARM")
Fixes: c3def6a8724c ("net/i40e: implement vector PMD for altivec")

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_rxtx_vec_altivec.c | 59 +++++++++++++++++-------
 drivers/net/i40e/i40e_rxtx_vec_neon.c    | 48 ++++++++++++++-----
 drivers/net/i40e/i40e_rxtx_vec_sse.c     | 48 ++++++++++++++-----
 3 files changed, 114 insertions(+), 41 deletions(-)

diff --git a/drivers/net/i40e/i40e_rxtx_vec_altivec.c b/drivers/net/i40e/i40e_rxtx_vec_altivec.c
index f3fc82672e..3a42636e05 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_altivec.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_altivec.c
@@ -218,9 +218,11 @@ desc_to_ptype_v(vector unsigned long descs[4], struct rte_mbuf **rx_pkts,
 }
 
- /* Notice:
-  * - nb_pkts < RTE_I40E_DESCS_PER_LOOP, just return no packet
-  * - nb_pkts > RTE_I40E_VPMD_RX_BURST, only scan RTE_I40E_VPMD_RX_BURST
-  *   numbers of DD bits
-  */
+/**
+ * vPMD raw receive routine, only accept(nb_pkts >= RTE_I40E_DESCS_PER_LOOP)
+ *
+ * Notice:
+ * - nb_pkts < RTE_I40E_DESCS_PER_LOOP, just return no packet
+ * - floor align nb_pkts to a RTE_I40E_DESCS_PER_LOOP power-of-two
+ */
 static inline uint16_t
 _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
@@ -244,7 +246,4 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 	vector unsigned long dd_check, eop_check;
 
-	/* nb_pkts shall be less equal than RTE_I40E_MAX_RX_BURST */
-	nb_pkts = RTE_MIN(nb_pkts, RTE_I40E_MAX_RX_BURST);
-
 	/* nb_pkts has to be floor-aligned to RTE_I40E_DESCS_PER_LOOP */
 	nb_pkts = RTE_ALIGN_FLOOR(nb_pkts, RTE_I40E_DESCS_PER_LOOP);
@@ -489,13 +488,13 @@ i40e_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 }
 
- /* vPMD receive routine that reassembles scattered packets
-  * Notice:
-  * - nb_pkts < RTE_I40E_DESCS_PER_LOOP, just return no packet
-  * - nb_pkts > RTE_I40E_VPMD_RX_BURST, only scan RTE_I40E_VPMD_RX_BURST
-  *   numbers of DD bits
-  */
-uint16_t
-i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
-			     uint16_t nb_pkts)
+/**
+ * vPMD receive routine that reassembles single burst of 32 scattered packets
+ *
+ * Notice:
+ * - nb_pkts < RTE_I40E_DESCS_PER_LOOP, just return no packet
+ */
+static uint16_t
+i40e_recv_scattered_burst_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+			      uint16_t nb_pkts)
 {
 	struct i40e_rx_queue *rxq = rx_queue;
@@ -530,4 +529,30 @@ i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 }
 
+/**
+ * vPMD receive routine that reassembles scattered packets.
+ */
+uint16_t
+i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+			     uint16_t nb_pkts)
+{
+	uint16_t retval = 0;
+
+	while (nb_pkts > RTE_I40E_VPMD_RX_BURST) {
+		uint16_t burst;
+
+		burst = i40e_recv_scattered_burst_vec(rx_queue,
+						      rx_pkts + retval,
+						      RTE_I40E_VPMD_RX_BURST);
+		retval += burst;
+		nb_pkts -= burst;
+		if (burst < RTE_I40E_VPMD_RX_BURST)
+			return retval;
+	}
+
+	return retval + i40e_recv_scattered_burst_vec(rx_queue,
+						      rx_pkts + retval,
+						      nb_pkts);
+}
+
 static inline void
 vtx1(volatile struct i40e_tx_desc *txdp,
diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c
index 56fc355ee2..5cac418cf0 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_neon.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c
@@ -188,9 +188,10 @@ desc_to_ptype_v(uint64x2_t descs[4], struct rte_mbuf **rx_pkts,
 }
 
- /*
+/**
+ * vPMD raw receive routine, only accept(nb_pkts >= RTE_I40E_DESCS_PER_LOOP)
+ *
  * Notice:
  * - nb_pkts < RTE_I40E_DESCS_PER_LOOP, just return no packet
- * - nb_pkts > RTE_I40E_VPMD_RX_BURST, only scan RTE_I40E_VPMD_RX_BURST
- *   numbers of DD bits
+ * - floor align nb_pkts to a RTE_I40E_DESCS_PER_LOOP power-of-two
  */
 static inline uint16_t
@@ -230,7 +231,4 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 		};
 
-	/* nb_pkts shall be less equal than RTE_I40E_MAX_RX_BURST */
-	nb_pkts = RTE_MIN(nb_pkts, RTE_I40E_MAX_RX_BURST);
-
 	/* nb_pkts has to be floor-aligned to RTE_I40E_DESCS_PER_LOOP */
 	nb_pkts = RTE_ALIGN_FLOOR(nb_pkts, RTE_I40E_DESCS_PER_LOOP);
@@ -439,13 +437,13 @@ i40e_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 }
 
- /* vPMD receive routine that reassembles scattered packets
+/**
+ * vPMD receive routine that reassembles single burst of 32 scattered packets
+ *
  * Notice:
  * - nb_pkts < RTE_I40E_DESCS_PER_LOOP, just return no packet
- * - nb_pkts > RTE_I40E_VPMD_RX_BURST, only scan RTE_I40E_VPMD_RX_BURST
- *   numbers of DD bits
  */
-uint16_t
-i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
-			     uint16_t nb_pkts)
+static uint16_t
+i40e_recv_scattered_burst_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+			      uint16_t nb_pkts)
 {
 
@@ -482,4 +480,30 @@ i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 }
 
+/**
+ * vPMD receive routine that reassembles scattered packets.
+ */
+uint16_t
+i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+			     uint16_t nb_pkts)
+{
+	uint16_t retval = 0;
+
+	while (nb_pkts > RTE_I40E_VPMD_RX_BURST) {
+		uint16_t burst;
+
+		burst = i40e_recv_scattered_burst_vec(rx_queue,
+						      rx_pkts + retval,
+						      RTE_I40E_VPMD_RX_BURST);
+		retval += burst;
+		nb_pkts -= burst;
+		if (burst < RTE_I40E_VPMD_RX_BURST)
+			return retval;
+	}
+
+	return retval + i40e_recv_scattered_burst_vec(rx_queue,
+						      rx_pkts + retval,
+						      nb_pkts);
+}
+
 static inline void
 vtx1(volatile struct i40e_tx_desc *txdp,
diff --git a/drivers/net/i40e/i40e_rxtx_vec_sse.c b/drivers/net/i40e/i40e_rxtx_vec_sse.c
index 1fc66b781a..f70969335f 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_sse.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_sse.c
@@ -207,9 +207,10 @@ desc_to_ptype_v(__m128i descs[4], struct rte_mbuf **rx_pkts,
 }
 
- /*
+/**
+ * vPMD raw receive routine, only accept(nb_pkts >= RTE_I40E_DESCS_PER_LOOP)
+ *
  * Notice:
  * - nb_pkts < RTE_I40E_DESCS_PER_LOOP, just return no packet
- * - nb_pkts > RTE_I40E_VPMD_RX_BURST, only scan RTE_I40E_VPMD_RX_BURST
- *   numbers of DD bits
+ * - floor align nb_pkts to a RTE_I40E_DESCS_PER_LOOP power-of-two
  */
 static inline uint16_t
@@ -243,7 +244,4 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 	__m128i dd_check, eop_check;
 
-	/* nb_pkts shall be less equal than RTE_I40E_MAX_RX_BURST */
-	nb_pkts = RTE_MIN(nb_pkts, RTE_I40E_MAX_RX_BURST);
-
 	/* nb_pkts has to be floor-aligned to RTE_I40E_DESCS_PER_LOOP */
 	nb_pkts = RTE_ALIGN_FLOOR(nb_pkts, RTE_I40E_DESCS_PER_LOOP);
@@ -470,13 +468,13 @@ i40e_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 }
 
- /* vPMD receive routine that reassembles scattered packets
+/**
+ * vPMD receive routine that reassembles single burst of 32 scattered packets
+ *
  * Notice:
  * - nb_pkts < RTE_I40E_DESCS_PER_LOOP, just return no packet
- * - nb_pkts > RTE_I40E_VPMD_RX_BURST, only scan RTE_I40E_VPMD_RX_BURST
- *   numbers of DD bits
  */
-uint16_t
-i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
-			     uint16_t nb_pkts)
+static uint16_t
+i40e_recv_scattered_burst_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+			      uint16_t nb_pkts)
 {
 
@@ -513,4 +511,30 @@ i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 }
 
+/**
+ * vPMD receive routine that reassembles scattered packets.
+ */
+uint16_t
+i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+			     uint16_t nb_pkts)
+{
+	uint16_t retval = 0;
+
+	while (nb_pkts > RTE_I40E_VPMD_RX_BURST) {
+		uint16_t burst;
+
+		burst = i40e_recv_scattered_burst_vec(rx_queue,
+						      rx_pkts + retval,
+						      RTE_I40E_VPMD_RX_BURST);
+		retval += burst;
+		nb_pkts -= burst;
+		if (burst < RTE_I40E_VPMD_RX_BURST)
+			return retval;
+	}
+
+	return retval + i40e_recv_scattered_burst_vec(rx_queue,
+						      rx_pkts + retval,
+						      nb_pkts);
+}
+
 static inline void
 vtx1(volatile struct i40e_tx_desc *txdp,
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.960290711 +0000
+++ 0054-net-i40e-fix-vector-Rx.patch	2020-11-18 16:33:37.979215094 +0000
@@ -1 +1 @@
-From 9e27f00f3a61939e02429d5782ca10bc4cd5e315 Mon Sep 17 00:00:00 2001
+From f12b0feb97b85829fc2e8f77aafbe63da4925f51 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 9e27f00f3a61939e02429d5782ca10bc4cd5e315 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 6862a017e1..d3238bfb6a 100644
+index f3fc82672e..3a42636e05 100644
@@ -33 +34 @@
-@@ -189,9 +189,11 @@ desc_to_ptype_v(vector unsigned long descs[4], struct rte_mbuf **rx_pkts,
+@@ -218,9 +218,11 @@ desc_to_ptype_v(vector unsigned long descs[4], struct rte_mbuf **rx_pkts,
@@ -50 +51 @@
-@@ -215,7 +217,4 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
+@@ -244,7 +246,4 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
@@ -58 +59 @@
-@@ -460,13 +459,13 @@ i40e_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -489,13 +488,13 @@ i40e_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -81 +82 @@
-@@ -501,4 +500,30 @@ i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -530,4 +529,30 @@ i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -113 +114 @@
-index 543ecadb07..f094de69ae 100644
+index 56fc355ee2..5cac418cf0 100644
@@ -116 +117 @@
-@@ -188,9 +188,10 @@ desc_to_ptype_v(uint64x2_t descs[4], struct rte_mbuf **__rte_restrict rx_pkts,
+@@ -188,9 +188,10 @@ desc_to_ptype_v(uint64x2_t descs[4], struct rte_mbuf **rx_pkts,
@@ -130 +131 @@
-@@ -231,7 +232,4 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *__rte_restrict rxq,
+@@ -230,7 +231,4 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
@@ -138 +139 @@
-@@ -440,13 +438,13 @@ i40e_recv_pkts_vec(void *__rte_restrict rx_queue,
+@@ -439,13 +437,13 @@ i40e_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -158 +159 @@
-@@ -483,4 +481,30 @@ i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -482,4 +480,30 @@ i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -190 +191 @@
-index 240ce478ab..4b2b6a28fc 100644
+index 1fc66b781a..f70969335f 100644
@@ -193 +194 @@
-@@ -343,9 +343,10 @@ desc_to_ptype_v(__m128i descs[4], struct rte_mbuf **rx_pkts,
+@@ -207,9 +207,10 @@ desc_to_ptype_v(__m128i descs[4], struct rte_mbuf **rx_pkts,
@@ -207 +208 @@
-@@ -379,7 +380,4 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
+@@ -243,7 +244,4 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
@@ -215 +216 @@
-@@ -606,13 +604,13 @@ i40e_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -470,13 +468,13 @@ i40e_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -235 +236 @@
-@@ -649,4 +647,30 @@ i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -513,4 +511,30 @@ i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,


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

* [dpdk-stable] patch 'net/fm10k: fix vector Rx' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (52 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/i40e: " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/vhost: fix xstats after clearing stats' " Kevin Traynor
                   ` (16 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Jeff Guo; +Cc: Morten Brørup, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/45dd7c985f37ac049697e0c5557743d5f9a9120e

Thanks.

Kevin.

---
From 45dd7c985f37ac049697e0c5557743d5f9a9120e Mon Sep 17 00:00:00 2001
From: Jeff Guo <jia.guo@intel.com>
Date: Fri, 16 Oct 2020 17:44:30 +0800
Subject: [PATCH] net/fm10k: fix vector Rx
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 2b768c43941fc9f86670b470523c8e5708a8080d ]

The scattered receive path should use a wrapper function to achieve the
goal of burst maximizing.

Bugzilla ID: 516
Fixes: fe65e1e1ce61 ("fm10k: add vector scatter Rx")

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/fm10k/fm10k_rxtx_vec.c | 39 ++++++++++++++++++++++++------
 1 file changed, 31 insertions(+), 8 deletions(-)

diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c
index d76dfd16fd..1194251396 100644
--- a/drivers/net/fm10k/fm10k_rxtx_vec.c
+++ b/drivers/net/fm10k/fm10k_rxtx_vec.c
@@ -646,16 +646,13 @@ fm10k_reassemble_packets(struct fm10k_rx_queue *rxq,
 }
 
-/*
- * vPMD receive routine that reassembles scattered packets
+/**
+ * vPMD receive routine that reassembles single burst of 32 scattered packets
  *
  * Notice:
  * - don't support ol_flags for rss and csum err
- * - nb_pkts > RTE_FM10K_MAX_RX_BURST, only scan RTE_FM10K_MAX_RX_BURST
- *   numbers of DD bit
  */
-uint16_t
-fm10k_recv_scattered_pkts_vec(void *rx_queue,
-				struct rte_mbuf **rx_pkts,
-				uint16_t nb_pkts)
+static uint16_t
+fm10k_recv_scattered_burst_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+			       uint16_t nb_pkts)
 {
 	struct fm10k_rx_queue *rxq = rx_queue;
@@ -692,4 +689,30 @@ fm10k_recv_scattered_pkts_vec(void *rx_queue,
 }
 
+/**
+ * vPMD receive routine that reassembles scattered packets.
+ */
+uint16_t
+fm10k_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+			      uint16_t nb_pkts)
+{
+	uint16_t retval = 0;
+
+	while (nb_pkts > RTE_FM10K_MAX_RX_BURST) {
+		uint16_t burst;
+
+		burst = fm10k_recv_scattered_burst_vec(rx_queue,
+						       rx_pkts + retval,
+						       RTE_FM10K_MAX_RX_BURST);
+		retval += burst;
+		nb_pkts -= burst;
+		if (burst < RTE_FM10K_MAX_RX_BURST)
+			return retval;
+	}
+
+	return retval + fm10k_recv_scattered_burst_vec(rx_queue,
+						       rx_pkts + retval,
+						       nb_pkts);
+}
+
 static const struct fm10k_txq_ops vec_txq_ops = {
 	.reset = fm10k_reset_tx_queue,
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.978309809 +0000
+++ 0055-net-fm10k-fix-vector-Rx.patch	2020-11-18 16:33:37.980215095 +0000
@@ -1 +1 @@
-From 2b768c43941fc9f86670b470523c8e5708a8080d Mon Sep 17 00:00:00 2001
+From 45dd7c985f37ac049697e0c5557743d5f9a9120e Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 2b768c43941fc9f86670b470523c8e5708a8080d ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index eff3933b5c..6fcc939ad9 100644
+index d76dfd16fd..1194251396 100644


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

* [dpdk-stable] patch 'net/vhost: fix xstats after clearing stats' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (53 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/fm10k: " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'vhost: fix virtqueues metadata allocation' " Kevin Traynor
                   ` (15 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: David Christensen; +Cc: Chenbo Xia, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/7ff9bbe37c5ec9664a099b6a1c8d7a3361926942

Thanks.

Kevin.

---
From 7ff9bbe37c5ec9664a099b6a1c8d7a3361926942 Mon Sep 17 00:00:00 2001
From: David Christensen <drc@linux.vnet.ibm.com>
Date: Thu, 15 Oct 2020 10:49:37 -0700
Subject: [PATCH] net/vhost: fix xstats after clearing stats

[ upstream commit d4fbb27459954bdbb9240d16b47bdfccf47c6e34 ]

The PMD API allows stats and xstats values to be cleared separately.
This is a problem for the vhost PMD since some of the xstats values are
derived from existing stats values.  For example:

testpmd> show port xstats all
...
tx_unicast_packets: 17562959
...
testpmd> clear port stats all
...
show port xstats all
...
tx_unicast_packets: 18446744073709551615
...

Modify the driver so that stats and xstats values are stored, updated,
and cleared separately.

Fixes: 4d6cf2ac93dc ("net/vhost: add extended statistics")

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 76 +++++++++++++++----------------
 1 file changed, 38 insertions(+), 38 deletions(-)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 93ca8ebe4b..88e3915503 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -67,4 +67,7 @@ enum vhost_xstats_pkts {
 	VHOST_MULTICAST_PKT,
 	VHOST_UNICAST_PKT,
+	VHOST_PKT,
+	VHOST_BYTE,
+	VHOST_MISSED_PKT,
 	VHOST_ERRORS_PKT,
 	VHOST_ERRORS_FRAGMENTED,
@@ -140,9 +143,9 @@ struct vhost_xstats_name_off {
 static const struct vhost_xstats_name_off vhost_rxport_stat_strings[] = {
 	{"good_packets",
-	 offsetof(struct vhost_queue, stats.pkts)},
+	 offsetof(struct vhost_queue, stats.xstats[VHOST_PKT])},
 	{"total_bytes",
-	 offsetof(struct vhost_queue, stats.bytes)},
+	 offsetof(struct vhost_queue, stats.xstats[VHOST_BYTE])},
 	{"missed_pkts",
-	 offsetof(struct vhost_queue, stats.missed_pkts)},
+	 offsetof(struct vhost_queue, stats.xstats[VHOST_MISSED_PKT])},
 	{"broadcast_packets",
 	 offsetof(struct vhost_queue, stats.xstats[VHOST_BROADCAST_PKT])},
@@ -180,9 +183,9 @@ static const struct vhost_xstats_name_off vhost_rxport_stat_strings[] = {
 static const struct vhost_xstats_name_off vhost_txport_stat_strings[] = {
 	{"good_packets",
-	 offsetof(struct vhost_queue, stats.pkts)},
+	 offsetof(struct vhost_queue, stats.xstats[VHOST_PKT])},
 	{"total_bytes",
-	 offsetof(struct vhost_queue, stats.bytes)},
+	 offsetof(struct vhost_queue, stats.xstats[VHOST_BYTE])},
 	{"missed_pkts",
-	 offsetof(struct vhost_queue, stats.missed_pkts)},
+	 offsetof(struct vhost_queue, stats.xstats[VHOST_MISSED_PKT])},
 	{"broadcast_packets",
 	 offsetof(struct vhost_queue, stats.xstats[VHOST_BROADCAST_PKT])},
@@ -276,21 +279,4 @@ vhost_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 		return nxstats;
 
-	for (i = 0; i < dev->data->nb_rx_queues; i++) {
-		vq = dev->data->rx_queues[i];
-		if (!vq)
-			continue;
-		vq->stats.xstats[VHOST_UNICAST_PKT] = vq->stats.pkts
-				- (vq->stats.xstats[VHOST_BROADCAST_PKT]
-				+ vq->stats.xstats[VHOST_MULTICAST_PKT]);
-	}
-	for (i = 0; i < dev->data->nb_tx_queues; i++) {
-		vq = dev->data->tx_queues[i];
-		if (!vq)
-			continue;
-		vq->stats.xstats[VHOST_UNICAST_PKT] = vq->stats.pkts
-				+ vq->stats.missed_pkts
-				- (vq->stats.xstats[VHOST_BROADCAST_PKT]
-				+ vq->stats.xstats[VHOST_MULTICAST_PKT]);
-	}
 	for (t = 0; t < VHOST_NB_XSTATS_RXPORT; t++) {
 		xstats[count].value = 0;
@@ -323,5 +309,5 @@ vhost_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 
 static inline void
-vhost_count_multicast_broadcast(struct vhost_queue *vq,
+vhost_count_xcast_packets(struct vhost_queue *vq,
 				struct rte_mbuf *mbuf)
 {
@@ -335,11 +321,13 @@ vhost_count_multicast_broadcast(struct vhost_queue *vq,
 		else
 			pstats->xstats[VHOST_MULTICAST_PKT]++;
+	} else {
+		pstats->xstats[VHOST_UNICAST_PKT]++;
 	}
 }
 
 static void
-vhost_update_packet_xstats(struct vhost_queue *vq,
-			   struct rte_mbuf **bufs,
-			   uint16_t count)
+vhost_update_packet_xstats(struct vhost_queue *vq, struct rte_mbuf **bufs,
+			   uint16_t count, uint64_t nb_bytes,
+			   uint64_t nb_missed)
 {
 	uint32_t pkt_len = 0;
@@ -348,5 +336,10 @@ vhost_update_packet_xstats(struct vhost_queue *vq,
 	struct vhost_stats *pstats = &vq->stats;
 
+	pstats->xstats[VHOST_BYTE] += nb_bytes;
+	pstats->xstats[VHOST_MISSED_PKT] += nb_missed;
+	pstats->xstats[VHOST_UNICAST_PKT] += nb_missed;
+
 	for (i = 0; i < count ; i++) {
+		pstats->xstats[VHOST_PKT]++;
 		pkt_len = bufs[i]->pkt_len;
 		if (pkt_len == 64) {
@@ -364,5 +357,5 @@ vhost_update_packet_xstats(struct vhost_queue *vq,
 				pstats->xstats[VHOST_1523_TO_MAX_PKT]++;
 		}
-		vhost_count_multicast_broadcast(vq, bufs[i]);
+		vhost_count_xcast_packets(vq, bufs[i]);
 	}
 }
@@ -374,4 +367,5 @@ eth_vhost_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
 	uint16_t i, nb_rx = 0;
 	uint16_t nb_receive = nb_bufs;
+	uint64_t nb_bytes = 0;
 
 	if (unlikely(rte_atomic32_read(&r->allow_queuing) == 0))
@@ -408,8 +402,9 @@ eth_vhost_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
 			rte_vlan_strip(bufs[i]);
 
-		r->stats.bytes += bufs[i]->pkt_len;
+		nb_bytes += bufs[i]->pkt_len;
 	}
 
-	vhost_update_packet_xstats(r, bufs, nb_rx);
+	r->stats.bytes += nb_bytes;
+	vhost_update_packet_xstats(r, bufs, nb_rx, nb_bytes, 0);
 
 out:
@@ -425,4 +420,6 @@ eth_vhost_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
 	uint16_t i, nb_tx = 0;
 	uint16_t nb_send = 0;
+	uint64_t nb_bytes = 0;
+	uint64_t nb_missed = 0;
 
 	if (unlikely(rte_atomic32_read(&r->allow_queuing) == 0))
@@ -465,18 +462,21 @@ eth_vhost_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
 	}
 
+	for (i = 0; likely(i < nb_tx); i++)
+		nb_bytes += bufs[i]->pkt_len;
+
+	nb_missed = nb_bufs - nb_tx;
+
 	r->stats.pkts += nb_tx;
+	r->stats.bytes += nb_bytes;
 	r->stats.missed_pkts += nb_bufs - nb_tx;
 
-	for (i = 0; likely(i < nb_tx); i++)
-		r->stats.bytes += bufs[i]->pkt_len;
+	vhost_update_packet_xstats(r, bufs, nb_tx, nb_bytes, nb_missed);
 
-	vhost_update_packet_xstats(r, bufs, nb_tx);
-
-	/* According to RFC2863 page42 section ifHCOutMulticastPkts and
-	 * ifHCOutBroadcastPkts, the counters "multicast" and "broadcast"
-	 * are increased when packets are not transmitted successfully.
+	/* According to RFC2863, ifHCOutUcastPkts, ifHCOutMulticastPkts and
+	 * ifHCOutBroadcastPkts counters are increased when packets are not
+	 * transmitted successfully.
 	 */
 	for (i = nb_tx; i < nb_bufs; i++)
-		vhost_count_multicast_broadcast(r, bufs[i]);
+		vhost_count_xcast_packets(r, bufs[i]);
 
 	for (i = 0; likely(i < nb_tx); i++)
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.996340986 +0000
+++ 0056-net-vhost-fix-xstats-after-clearing-stats.patch	2020-11-18 16:33:37.981215095 +0000
@@ -1 +1 @@
-From d4fbb27459954bdbb9240d16b47bdfccf47c6e34 Mon Sep 17 00:00:00 2001
+From 7ff9bbe37c5ec9664a099b6a1c8d7a3361926942 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d4fbb27459954bdbb9240d16b47bdfccf47c6e34 ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -35 +36 @@
-index f2712036fc..5845bb15f3 100644
+index 93ca8ebe4b..88e3915503 100644
@@ -38 +39 @@
-@@ -72,4 +72,7 @@ enum vhost_xstats_pkts {
+@@ -67,4 +67,7 @@ enum vhost_xstats_pkts {
@@ -46 +47 @@
-@@ -148,9 +151,9 @@ struct vhost_xstats_name_off {
+@@ -140,9 +143,9 @@ struct vhost_xstats_name_off {
@@ -59 +60 @@
-@@ -188,9 +191,9 @@ static const struct vhost_xstats_name_off vhost_rxport_stat_strings[] = {
+@@ -180,9 +183,9 @@ static const struct vhost_xstats_name_off vhost_rxport_stat_strings[] = {
@@ -72 +73 @@
-@@ -286,21 +289,4 @@ vhost_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
+@@ -276,21 +279,4 @@ vhost_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
@@ -94 +95 @@
-@@ -333,5 +319,5 @@ vhost_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
+@@ -323,5 +309,5 @@ vhost_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
@@ -101 +102 @@
-@@ -345,11 +331,13 @@ vhost_count_multicast_broadcast(struct vhost_queue *vq,
+@@ -335,11 +321,13 @@ vhost_count_multicast_broadcast(struct vhost_queue *vq,
@@ -118 +119 @@
-@@ -358,5 +346,10 @@ vhost_update_packet_xstats(struct vhost_queue *vq,
+@@ -348,5 +336,10 @@ vhost_update_packet_xstats(struct vhost_queue *vq,
@@ -129 +130 @@
-@@ -374,5 +367,5 @@ vhost_update_packet_xstats(struct vhost_queue *vq,
+@@ -364,5 +357,5 @@ vhost_update_packet_xstats(struct vhost_queue *vq,
@@ -136 +137 @@
-@@ -384,4 +377,5 @@ eth_vhost_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
+@@ -374,4 +367,5 @@ eth_vhost_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
@@ -142 +143 @@
-@@ -418,8 +412,9 @@ eth_vhost_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
+@@ -408,8 +402,9 @@ eth_vhost_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
@@ -154 +155 @@
-@@ -435,4 +430,6 @@ eth_vhost_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
+@@ -425,4 +420,6 @@ eth_vhost_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
@@ -161 +162 @@
-@@ -475,18 +472,21 @@ eth_vhost_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
+@@ -465,18 +462,21 @@ eth_vhost_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)


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

* [dpdk-stable] patch 'vhost: fix virtqueues metadata allocation' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (54 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/vhost: fix xstats after clearing stats' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'vhost: validate index in available entries API' " Kevin Traynor
                   ` (14 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Adrian Moreno, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/511ac28ae0092e03056fa61c5706883486145756

Thanks.

Kevin.

---
From 511ac28ae0092e03056fa61c5706883486145756 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Mon, 19 Oct 2020 19:34:09 +0200
Subject: [PATCH] vhost: fix virtqueues metadata allocation

[ upstream commit 8acd7c21335305426fbbc0a3aea2978734d0b2a8 ]

The Vhost-user backend implementation assumes there will be
no holes in the device's array of virtqueues metadata
pointers.

It can happen though, and would cause segmentation faults,
memory leaks or undefined behaviour.

This patch keep the assumption that there is no holes in this
array, and allocate all uninitialized virtqueues metadata up
to requested index.

Fixes: 160cbc815b41 ("vhost: remove a hack on queue allocation")

Suggested-by: Adrian Moreno <amorenoz@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 lib/librte_vhost/vhost.c | 33 ++++++++++++++++++++-------------
 1 file changed, 20 insertions(+), 13 deletions(-)

diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index 0432b26638..7040bbfff8 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -534,20 +534,27 @@ alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx)
 {
 	struct vhost_virtqueue *vq;
+	uint32_t i;
 
-	vq = rte_malloc(NULL, sizeof(struct vhost_virtqueue), 0);
-	if (vq == NULL) {
-		RTE_LOG(ERR, VHOST_CONFIG,
-			"Failed to allocate memory for vring:%u.\n", vring_idx);
-		return -1;
+	/* Also allocate holes, if any, up to requested vring index. */
+	for (i = 0; i <= vring_idx; i++) {
+		if (dev->virtqueue[i])
+			continue;
+
+		vq = rte_malloc(NULL, sizeof(struct vhost_virtqueue), 0);
+		if (vq == NULL) {
+			RTE_LOG(ERR, VHOST_CONFIG,
+				"Failed to allocate memory for vring:%u.\n", i);
+			return -1;
+		}
+
+		dev->virtqueue[i] = vq;
+		init_vring_queue(dev, vring_idx);
+		rte_spinlock_init(&vq->access_lock);
+		vq->avail_wrap_counter = 1;
+		vq->used_wrap_counter = 1;
+		vq->signalled_used_valid = false;
 	}
 
-	dev->virtqueue[vring_idx] = vq;
-	init_vring_queue(dev, vring_idx);
-	rte_spinlock_init(&vq->access_lock);
-	vq->avail_wrap_counter = 1;
-	vq->used_wrap_counter = 1;
-	vq->signalled_used_valid = false;
-
-	dev->nr_vring += 1;
+	dev->nr_vring = RTE_MAX(dev->nr_vring, vring_idx + 1);
 
 	return 0;
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:39.013324724 +0000
+++ 0057-vhost-fix-virtqueues-metadata-allocation.patch	2020-11-18 16:33:37.982215096 +0000
@@ -1 +1 @@
-From 8acd7c21335305426fbbc0a3aea2978734d0b2a8 Mon Sep 17 00:00:00 2001
+From 511ac28ae0092e03056fa61c5706883486145756 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8acd7c21335305426fbbc0a3aea2978734d0b2a8 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 6068c38ec6..0c9ba3b3af 100644
+index 0432b26638..7040bbfff8 100644
@@ -31 +32 @@
-@@ -580,20 +580,27 @@ alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx)
+@@ -534,20 +534,27 @@ alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx)
@@ -38 +39 @@
--		VHOST_LOG_CONFIG(ERR,
+-		RTE_LOG(ERR, VHOST_CONFIG,
@@ -48 +49 @@
-+			VHOST_LOG_CONFIG(ERR,
++			RTE_LOG(ERR, VHOST_CONFIG,


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

* [dpdk-stable] patch 'vhost: validate index in available entries API' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (55 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'vhost: fix virtqueues metadata allocation' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'vhost: validate index in guest notification " Kevin Traynor
                   ` (13 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/f2364da31bd9e061025b0e8c7ed7aee2c85e9db2

Thanks.

Kevin.

---
From f2364da31bd9e061025b0e8c7ed7aee2c85e9db2 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Mon, 19 Oct 2020 19:34:10 +0200
Subject: [PATCH] vhost: validate index in available entries API

[ upstream commit 8c042f8191f8337da30958d0f622776861e417a5 ]

This patch validates the queue index parameter, in order
to ensure neither out-of-bound accesses nor NULL pointer
dereferencing happen.

Fixes: a67f286a6596 ("vhost: export queue free entries")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 lib/librte_vhost/vhost.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index 7040bbfff8..2fd454441a 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -909,5 +909,10 @@ rte_vhost_avail_entries(int vid, uint16_t queue_id)
 		return 0;
 
+	if (queue_id >= VHOST_MAX_VRING)
+		return 0;
+
 	vq = dev->virtqueue[queue_id];
+	if (!vq)
+		return 0;
 
 	rte_spinlock_lock(&vq->access_lock);
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:39.031140497 +0000
+++ 0058-vhost-validate-index-in-available-entries-API.patch	2020-11-18 16:33:37.982215096 +0000
@@ -1 +1 @@
-From 8c042f8191f8337da30958d0f622776861e417a5 Mon Sep 17 00:00:00 2001
+From f2364da31bd9e061025b0e8c7ed7aee2c85e9db2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8c042f8191f8337da30958d0f622776861e417a5 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 0c9ba3b3af..193dafc369 100644
+index 7040bbfff8..2fd454441a 100644
@@ -23 +24 @@
-@@ -1261,5 +1261,10 @@ rte_vhost_avail_entries(int vid, uint16_t queue_id)
+@@ -909,5 +909,10 @@ rte_vhost_avail_entries(int vid, uint16_t queue_id)


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

* [dpdk-stable] patch 'vhost: validate index in guest notification API' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (56 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'vhost: validate index in available entries API' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/ena: remove unused macro' " Kevin Traynor
                   ` (12 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/c1e34850b7c10c4c8e22f52bd9f73e7184e939ea

Thanks.

Kevin.

---
From c1e34850b7c10c4c8e22f52bd9f73e7184e939ea Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Mon, 19 Oct 2020 19:34:11 +0200
Subject: [PATCH] vhost: validate index in guest notification API

[ upstream commit 366374054b656e049188216e2fa44831749c2a21 ]

This patch validates the queue index parameter, in order
to ensure neither out-of-bound accesses nor NULL pointer
dereferencing happen.

Fixes: 9eed6bfd2efb ("vhost: allow to enable or disable features")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 lib/librte_vhost/vhost.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index 2fd454441a..61754833c2 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -984,5 +984,10 @@ rte_vhost_enable_guest_notification(int vid, uint16_t queue_id, int enable)
 		return -1;
 
+	if (queue_id >= VHOST_MAX_VRING)
+		return -1;
+
 	vq = dev->virtqueue[queue_id];
+	if (!vq)
+		return -1;
 
 	rte_spinlock_lock(&vq->access_lock);
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:39.047840435 +0000
+++ 0059-vhost-validate-index-in-guest-notification-API.patch	2020-11-18 16:33:37.983215096 +0000
@@ -1 +1 @@
-From 366374054b656e049188216e2fa44831749c2a21 Mon Sep 17 00:00:00 2001
+From c1e34850b7c10c4c8e22f52bd9f73e7184e939ea Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 366374054b656e049188216e2fa44831749c2a21 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 193dafc369..801a1a5098 100644
+index 2fd454441a..61754833c2 100644
@@ -23 +24 @@
-@@ -1353,5 +1353,10 @@ rte_vhost_enable_guest_notification(int vid, uint16_t queue_id, int enable)
+@@ -984,5 +984,10 @@ rte_vhost_enable_guest_notification(int vid, uint16_t queue_id, int enable)


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

* [dpdk-stable] patch 'net/ena: remove unused macro' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (57 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'vhost: validate index in guest notification " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/mvpp2: fix memory leak in error path' " Kevin Traynor
                   ` (11 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: David Marchand; +Cc: Michal Krawczyk, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/820571e6ccc0082bbf9b677903cdd57a46119888

Thanks.

Kevin.

---
From 820571e6ccc0082bbf9b677903cdd57a46119888 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 23 Oct 2020 10:43:51 +0200
Subject: [PATCH] net/ena: remove unused macro

[ upstream commit 8bb7b198297d4d33b720b69480e2b41fb9ca91fb ]

This assert macro is not called anymore.
This also fixes an invalid reference to RTE_LOGTYPE_ERR that does not
exist.

Fixes: 3adcba9a8987 ("net/ena: update HAL to the newer version")
Fixes: 6f1c9df9e9cc ("net/ena: use dynamic log type for debug logging")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
---
 drivers/net/ena/base/ena_plat_dpdk.h | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h
index 7be9a254a1..4bc2a2b553 100644
--- a/drivers/net/ena/base/ena_plat_dpdk.h
+++ b/drivers/net/ena/base/ena_plat_dpdk.h
@@ -69,16 +69,4 @@ typedef uint64_t dma_addr_t;
 	(rte_get_timer_cycles() * US_PER_S / rte_get_timer_hz())
 
-#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG
-#define ENA_ASSERT(cond, format, arg...)				\
-	do {								\
-		if (unlikely(!(cond))) {				\
-			RTE_LOG(ERR, PMD, format, ##arg);		\
-			rte_panic("line %d\tassert \"" #cond "\""	\
-					"failed\n", __LINE__);		\
-		}							\
-	} while (0)
-#else
-#define ENA_ASSERT(cond, format, arg...) do {} while (0)
-#endif
 
 #define ENA_MAX_T(type, x, y) RTE_MAX((type)(x), (type)(y))
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:39.064393633 +0000
+++ 0060-net-ena-remove-unused-macro.patch	2020-11-18 16:33:37.984215097 +0000
@@ -1 +1 @@
-From 8bb7b198297d4d33b720b69480e2b41fb9ca91fb Mon Sep 17 00:00:00 2001
+From 820571e6ccc0082bbf9b677903cdd57a46119888 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8bb7b198297d4d33b720b69480e2b41fb9ca91fb ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +18,2 @@
- drivers/net/ena/base/ena_plat_dpdk.h | 13 -------------
- 1 file changed, 13 deletions(-)
+ drivers/net/ena/base/ena_plat_dpdk.h | 12 ------------
+ 1 file changed, 12 deletions(-)
@@ -21 +22 @@
-index ae4fd8f868..a6782f3732 100644
+index 7be9a254a1..4bc2a2b553 100644
@@ -24 +25,2 @@
-@@ -74,17 +74,4 @@ typedef uint64_t dma_addr_t;
+@@ -69,16 +69,4 @@ typedef uint64_t dma_addr_t;
+ 	(rte_get_timer_cycles() * US_PER_S / rte_get_timer_hz())
@@ -26 +27,0 @@
- extern int ena_logtype_com;
@@ -31,2 +32 @@
--			rte_log(RTE_LOGTYPE_ERR, ena_logtype_com,	\
--				format, ##arg);				\
+-			RTE_LOG(ERR, PMD, format, ##arg);		\


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

* [dpdk-stable] patch 'net/mvpp2: fix memory leak in error path' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (58 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/ena: remove unused macro' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/netvsc: allocate contiguous physical memory for RNDIS' " Kevin Traynor
                   ` (10 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Liron Himi, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/bc7fd1289fc55b5a6170db1cc572b94eee1c9f7d

Thanks.

Kevin.

---
From bc7fd1289fc55b5a6170db1cc572b94eee1c9f7d Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Thu, 22 Oct 2020 12:25:27 +0800
Subject: [PATCH] net/mvpp2: fix memory leak in error path

[ upstream commit 1b2c17d60d978d2570baa9e5c478ebca1fce3859 ]

In mrvl_create() allocated memory for 'mtr', we don't free it
when profile get fails and it will lead to memory leak.

We can get profile at the beginning of the function to
fix it, before calling mtr = rte_zmalloc_socket().

Fixes: cdb53f8da628 ("net/mvpp2: support metering")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Liron Himi <lironh@marvell.com>
---
 drivers/net/mvpp2/mrvl_mtr.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/mvpp2/mrvl_mtr.c b/drivers/net/mvpp2/mrvl_mtr.c
index 39272acea4..2fa5cb43ad 100644
--- a/drivers/net/mvpp2/mrvl_mtr.c
+++ b/drivers/net/mvpp2/mrvl_mtr.c
@@ -330,4 +330,10 @@ mrvl_create(struct rte_eth_dev *dev, uint32_t mtr_id,
 	struct mrvl_mtr *mtr;
 
+	profile = mrvl_mtr_profile_from_id(priv, params->meter_profile_id);
+	if (!profile)
+		return -rte_mtr_error_set(error, EINVAL,
+					  RTE_MTR_ERROR_TYPE_METER_PROFILE_ID,
+					  NULL, "Profile id does not exist\n");
+
 	mtr = mrvl_mtr_from_id(priv, mtr_id);
 	if (mtr)
@@ -342,10 +348,4 @@ mrvl_create(struct rte_eth_dev *dev, uint32_t mtr_id,
 					  NULL, NULL);
 
-	profile = mrvl_mtr_profile_from_id(priv, params->meter_profile_id);
-	if (!profile)
-		return -rte_mtr_error_set(error, EINVAL,
-					  RTE_MTR_ERROR_TYPE_METER_PROFILE_ID,
-					  NULL, "Profile id does not exist\n");
-
 	mtr->shared = shared;
 	mtr->mtr_id = mtr_id;
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:39.081393681 +0000
+++ 0061-net-mvpp2-fix-memory-leak-in-error-path.patch	2020-11-18 16:33:37.984215097 +0000
@@ -1 +1 @@
-From 1b2c17d60d978d2570baa9e5c478ebca1fce3859 Mon Sep 17 00:00:00 2001
+From bc7fd1289fc55b5a6170db1cc572b94eee1c9f7d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1b2c17d60d978d2570baa9e5c478ebca1fce3859 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org


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

* [dpdk-stable] patch 'net/netvsc: allocate contiguous physical memory for RNDIS' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (59 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/mvpp2: fix memory leak in error path' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'app/testpmd: fix RSS key for flow API RSS rule' " Kevin Traynor
                   ` (9 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Long Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/dad2bfdf57b6d2dd3d9d7bb787f75de6fef6cf59

Thanks.

Kevin.

---
From dad2bfdf57b6d2dd3d9d7bb787f75de6fef6cf59 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Wed, 21 Oct 2020 17:26:07 -0700
Subject: [PATCH] net/netvsc: allocate contiguous physical memory for RNDIS

[ upstream commit b8c3c628aff6defbabf677b4eea14c0529486357 ]

When sending data, netvsc assumes the tx_rndis buffer is contiguous and
calculates physical addresses based on this assumption.

Use memzone to allocate tx_rndis so it's guaranteed that this buffer is
physically contiguous.

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/netvsc/hn_rxtx.c | 23 ++++++++++++-----------
 drivers/net/netvsc/hn_var.h  |  2 ++
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 63b0f83f3a..38df13ce75 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -284,8 +284,13 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev,
 		     name, nb_desc, sizeof(struct hn_txdesc));
 
-	txq->tx_rndis = rte_calloc("hn_txq_rndis", nb_desc,
-				   HN_RNDIS_PKT_ALIGNED, RTE_CACHE_LINE_SIZE);
-	if (txq->tx_rndis == NULL)
+	txq->tx_rndis_mz = rte_memzone_reserve_aligned(name,
+			nb_desc * HN_RNDIS_PKT_ALIGNED, rte_socket_id(),
+			RTE_MEMZONE_IOVA_CONTIG, HN_RNDIS_PKT_ALIGNED);
+	if (!txq->tx_rndis_mz) {
+		err = -rte_errno;
 		goto error;
+	}
+	txq->tx_rndis = txq->tx_rndis_mz->addr;
+	txq->tx_rndis_iova = txq->tx_rndis_mz->iova;
 
 	txq->txdesc_pool = rte_mempool_create(name, nb_desc,
@@ -316,5 +321,5 @@ error:
 	if (txq->txdesc_pool)
 		rte_mempool_free(txq->txdesc_pool);
-	rte_free(txq->tx_rndis);
+	rte_memzone_free(txq->tx_rndis_mz);
 	rte_free(txq);
 	return err;
@@ -358,5 +363,5 @@ hn_dev_tx_queue_release(void *arg)
 		rte_mempool_free(txq->txdesc_pool);
 
-	rte_free(txq->tx_rndis);
+	rte_memzone_free(txq->tx_rndis_mz);
 	rte_free(txq);
 }
@@ -1341,10 +1346,6 @@ static int hn_xmit_sg(struct hn_tx_queue *txq,
 
 	/* pass IOVA of rndis header in first segment */
-	addr = rte_malloc_virt2iova(txq->tx_rndis);
-	if (unlikely(addr == RTE_BAD_IOVA)) {
-		PMD_DRV_LOG(ERR, "RNDIS transmit can not get iova");
-		return -EINVAL;
-	}
-	addr = addr + ((char *)txd->rndis_pkt - (char *)txq->tx_rndis);
+	addr = txq->tx_rndis_iova +
+		((char *)txd->rndis_pkt - (char *)txq->tx_rndis);
 
 	sg[0].page = addr / PAGE_SIZE;
diff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h
index fceb345099..a7e70aaa51 100644
--- a/drivers/net/netvsc/hn_var.h
+++ b/drivers/net/netvsc/hn_var.h
@@ -54,5 +54,7 @@ struct hn_tx_queue {
 	uint32_t	free_thresh;
 	struct rte_mempool *txdesc_pool;
+	const struct rte_memzone *tx_rndis_mz;
 	void		*tx_rndis;
+	rte_iova_t	tx_rndis_iova;
 
 	/* Applied packet transmission aggregation limits. */
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:39.097309833 +0000
+++ 0062-net-netvsc-allocate-contiguous-physical-memory-for-R.patch	2020-11-18 16:33:37.985215098 +0000
@@ -1 +1 @@
-From b8c3c628aff6defbabf677b4eea14c0529486357 Mon Sep 17 00:00:00 2001
+From dad2bfdf57b6d2dd3d9d7bb787f75de6fef6cf59 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b8c3c628aff6defbabf677b4eea14c0529486357 ]
+
@@ -12,2 +13,0 @@
-Cc: stable@dpdk.org
-
@@ -21 +21 @@
-index 5d59db513c..d8aa0996e7 100644
+index 63b0f83f3a..38df13ce75 100644
@@ -48 +48 @@
-@@ -367,5 +372,5 @@ hn_dev_tx_queue_release(void *arg)
+@@ -358,5 +363,5 @@ hn_dev_tx_queue_release(void *arg)
@@ -55 +55 @@
-@@ -1446,10 +1451,6 @@ static int hn_xmit_sg(struct hn_tx_queue *txq,
+@@ -1341,10 +1346,6 @@ static int hn_xmit_sg(struct hn_tx_queue *txq,
@@ -69 +69 @@
-index 56bfa972d1..20bb3c38dc 100644
+index fceb345099..a7e70aaa51 100644
@@ -72 +72 @@
-@@ -55,5 +55,7 @@ struct hn_tx_queue {
+@@ -54,5 +54,7 @@ struct hn_tx_queue {


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

* [dpdk-stable] patch 'app/testpmd: fix RSS key for flow API RSS rule' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (60 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/netvsc: allocate contiguous physical memory for RNDIS' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/i40e: fix flow director for eth + VLAN pattern' " Kevin Traynor
                   ` (8 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Lijun Ou; +Cc: Ophir Munk, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/6bf71338501ee4f96c498896d483e637a1b29e05

Thanks.

Kevin.

---
From 6bf71338501ee4f96c498896d483e637a1b29e05 Mon Sep 17 00:00:00 2001
From: Lijun Ou <oulijun@huawei.com>
Date: Wed, 21 Oct 2020 18:07:10 +0800
Subject: [PATCH] app/testpmd: fix RSS key for flow API RSS rule

[ upstream commit 1848b117cca159cc4e5f287876491e86e3413f21 ]

When a flow API RSS rule is issued in testpmd, device RSS key is changed
unexpectedly, device RSS key is changed to the testpmd default RSS key.

Consider the following usage with testpmd:
1. first, startup testpmd:
 testpmd> show port 0 rss-hash key
 RSS functions: all ipv4-frag ipv4-other ipv6-frag ipv6-other ip
 RSS key: 6D5A56DA255B0EC24167253D43A38FB0D0CA2BCBAE7B30B477CB2DA38030F
          20C6A42B73BBEAC01FA
2. create a rss rule
 testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end \
          actions rss types ipv4-udp end queues end / end

3. show rss-hash key
 testpmd> show port 0 rss-hash key
 RSS functions: all ipv4-udp udp
 RSS key: 74657374706D6427732064656661756C74205253532068617368206B65792
          C206F76657272696465

This is because testpmd always sends a key with the RSS rule,
if user provides a key as part of the rule that key is used, if user
doesn't provide a key, testpmd default key is sent to the PMDs, which is
causing device programmed RSS key to be changed.

There was a previous attempt to fix the same issue [1], but it has been
reverted back [2] because of the crash when 'key_len' is provided
without 'key'.

This patch follows the same approach with the initial fix [1] but also
addresses the crash.

After change, testpmd RSS key is 'NULL' by default, if user provides a
key as part of rule it is used, if not no key is sent to the PMDs at all

[1]
Commit a4391f8bae85 ("app/testpmd: set default RSS key as null")

[2]
Commit f3698c3d09a6 ("app/testpmd: revert setting default RSS")

Fixes: d0ad8648b1c5 ("app/testpmd: fix RSS flow action configuration")

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/cmdline_flow.c  | 15 ++-------------
 lib/librte_ethdev/rte_flow.c |  2 +-
 2 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index daba39ddfc..8561310e73 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -3260,24 +3260,13 @@ parse_vc_action_rss(struct context *ctx, const struct token *token,
 			.level = 0,
 			.types = rss_hf,
-			.key_len = sizeof(action_rss_data->key),
+			.key_len = 0,
 			.queue_num = RTE_MIN(nb_rxq, ACTION_RSS_QUEUE_NUM),
-			.key = action_rss_data->key,
+			.key = NULL,
 			.queue = action_rss_data->queue,
 		},
-		.key = "testpmd's default RSS hash key, "
-			"override it for better balancing",
 		.queue = { 0 },
 	};
 	for (i = 0; i < action_rss_data->conf.queue_num; ++i)
 		action_rss_data->queue[i] = i;
-	if (!port_id_is_invalid(ctx->port, DISABLED_WARN) &&
-	    ctx->port != (portid_t)RTE_PORT_ALL) {
-		struct rte_eth_dev_info info;
-
-		rte_eth_dev_info_get(ctx->port, &info);
-		action_rss_data->conf.key_len =
-			RTE_MIN(sizeof(action_rss_data->key),
-				info.hash_key_size);
-	}
 	action->conf = &action_rss_data->conf;
 	return ret;
diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c
index 7bfc06db7a..08002fcec4 100644
--- a/lib/librte_ethdev/rte_flow.c
+++ b/lib/librte_ethdev/rte_flow.c
@@ -558,5 +558,5 @@ rte_flow_conv_action_conf(void *buf, const size_t size,
 			   size > sizeof(*dst.rss) ? sizeof(*dst.rss) : size);
 		off = sizeof(*dst.rss);
-		if (src.rss->key_len) {
+		if (src.rss->key_len && src.rss->key) {
 			off = RTE_ALIGN_CEIL(off, sizeof(*dst.rss->key));
 			tmp = sizeof(*src.rss->key) * src.rss->key_len;
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:39.115406797 +0000
+++ 0063-app-testpmd-fix-RSS-key-for-flow-API-RSS-rule.patch	2020-11-18 16:33:37.989215100 +0000
@@ -1 +1 @@
-From 1848b117cca159cc4e5f287876491e86e3413f21 Mon Sep 17 00:00:00 2001
+From 6bf71338501ee4f96c498896d483e637a1b29e05 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1848b117cca159cc4e5f287876491e86e3413f21 ]
+
@@ -47 +48,0 @@
-Cc: stable@dpdk.org
@@ -53 +54 @@
- app/test-pmd/cmdline_flow.c  | 19 ++-----------------
+ app/test-pmd/cmdline_flow.c  | 15 ++-------------
@@ -55 +56 @@
- 2 files changed, 3 insertions(+), 18 deletions(-)
+ 2 files changed, 3 insertions(+), 14 deletions(-)
@@ -58 +59 @@
-index cd35d5b9cc..3d1dd05953 100644
+index daba39ddfc..8561310e73 100644
@@ -61 +62 @@
-@@ -4851,28 +4851,13 @@ parse_vc_action_rss(struct context *ctx, const struct token *token,
+@@ -3260,24 +3260,13 @@ parse_vc_action_rss(struct context *ctx, const struct token *token,
@@ -80,5 +80,0 @@
--		int ret2;
--
--		ret2 = rte_eth_dev_info_get(ctx->port, &info);
--		if (ret2 != 0)
--			return ret2;
@@ -85,0 +82 @@
+-		rte_eth_dev_info_get(ctx->port, &info);
@@ -93 +90 @@
-index d3e5cbc194..a06f64c271 100644
+index 7bfc06db7a..08002fcec4 100644
@@ -96 +93 @@
-@@ -578,5 +578,5 @@ rte_flow_conv_action_conf(void *buf, const size_t size,
+@@ -558,5 +558,5 @@ rte_flow_conv_action_conf(void *buf, const size_t size,


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

* [dpdk-stable] patch 'net/i40e: fix flow director for eth + VLAN pattern' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (61 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'app/testpmd: fix RSS key for flow API RSS rule' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/bnxt: fix resetting mbuf data offset' " Kevin Traynor
                   ` (7 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/0e6226e729f8a27aaace8e5f3701cb1af46a6e08

Thanks.

Kevin.

---
From 0e6226e729f8a27aaace8e5f3701cb1af46a6e08 Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Tue, 27 Oct 2020 14:21:47 +0800
Subject: [PATCH] net/i40e: fix flow director for eth + VLAN pattern

[ upstream commit 81aebb47d1895ae34c7469faa2544433cc9bf6a6 ]

Currently, can't create more than one following flow for
ETH + VLAN pattern.

1. flow create 0 ingress pattern eth / vlan vid is 350 / end
   actions queue index 2 / end
2. flow create 0 ingress pattern eth / vlan vid is 351 / end
   actions queue index 3 / end

The root cause is the vlan_tci is not set correctly, it will
cause the keys of both of the two flows are the same.

Fixes: 42044b69c67d ("net/i40e: support input set selection for FDIR")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/i40e/i40e_flow.c | 35 ++++++++++++++++++++++++-----------
 1 file changed, 24 insertions(+), 11 deletions(-)

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index e5c42144e0..2198473411 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -28,5 +28,8 @@
 #define I40E_IPV6_FRAG_HEADER	44
 #define I40E_TENANT_ARRAY_NUM	3
-#define I40E_TCI_MASK		0xFFFF
+#define I40E_VLAN_TCI_MASK	0xFFFF
+#define I40E_VLAN_PRI_MASK	0xE000
+#define I40E_VLAN_CFI_MASK	0x1000
+#define I40E_VLAN_VID_MASK	0x0FFF
 
 static int i40e_flow_validate(struct rte_eth_dev *dev,
@@ -2566,10 +2569,20 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 			RTE_ASSERT(!(input_set & I40E_INSET_LAST_ETHER_TYPE));
 			if (vlan_spec && vlan_mask) {
-				if (vlan_mask->tci ==
-				    rte_cpu_to_be_16(I40E_TCI_MASK)) {
-					input_set |= I40E_INSET_VLAN_INNER;
-					filter->input.flow_ext.vlan_tci =
-						vlan_spec->tci;
+				if (vlan_mask->tci !=
+				    rte_cpu_to_be_16(I40E_VLAN_TCI_MASK) &&
+				    vlan_mask->tci !=
+				    rte_cpu_to_be_16(I40E_VLAN_PRI_MASK) &&
+				    vlan_mask->tci !=
+				    rte_cpu_to_be_16(I40E_VLAN_CFI_MASK) &&
+				    vlan_mask->tci !=
+				    rte_cpu_to_be_16(I40E_VLAN_VID_MASK)) {
+					rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Unsupported TCI mask.");
 				}
+				input_set |= I40E_INSET_VLAN_INNER;
+				filter->input.flow_ext.vlan_tci =
+					vlan_spec->tci;
 			}
 			if (vlan_spec && vlan_mask && vlan_mask->inner_type) {
@@ -3395,8 +3408,8 @@ i40e_flow_parse_vxlan_pattern(__rte_unused struct rte_eth_dev *dev,
 			if (vlan_spec && vlan_mask) {
 				if (vlan_mask->tci ==
-				    rte_cpu_to_be_16(I40E_TCI_MASK))
+				    rte_cpu_to_be_16(I40E_VLAN_TCI_MASK))
 					filter->inner_vlan =
 					      rte_be_to_cpu_16(vlan_spec->tci) &
-					      I40E_TCI_MASK;
+					      I40E_VLAN_TCI_MASK;
 				filter_type |= ETH_TUNNEL_FILTER_IVLAN;
 			}
@@ -3626,8 +3639,8 @@ i40e_flow_parse_nvgre_pattern(__rte_unused struct rte_eth_dev *dev,
 			if (vlan_spec && vlan_mask) {
 				if (vlan_mask->tci ==
-				    rte_cpu_to_be_16(I40E_TCI_MASK))
+				    rte_cpu_to_be_16(I40E_VLAN_TCI_MASK))
 					filter->inner_vlan =
 					      rte_be_to_cpu_16(vlan_spec->tci) &
-					      I40E_TCI_MASK;
+					      I40E_VLAN_TCI_MASK;
 				filter_type |= ETH_TUNNEL_FILTER_IVLAN;
 			}
@@ -4246,5 +4259,5 @@ i40e_flow_parse_rss_pattern(__rte_unused struct rte_eth_dev *dev,
 			if (vlan_spec && vlan_mask) {
 				if (vlan_mask->tci ==
-					rte_cpu_to_be_16(I40E_TCI_MASK)) {
+					rte_cpu_to_be_16(I40E_VLAN_TCI_MASK)) {
 					info->region[0].user_priority[0] =
 						(rte_be_to_cpu_16(
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:39.136469561 +0000
+++ 0064-net-i40e-fix-flow-director-for-eth-VLAN-pattern.patch	2020-11-18 16:33:37.991215102 +0000
@@ -1 +1 @@
-From 81aebb47d1895ae34c7469faa2544433cc9bf6a6 Mon Sep 17 00:00:00 2001
+From 0e6226e729f8a27aaace8e5f3701cb1af46a6e08 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 81aebb47d1895ae34c7469faa2544433cc9bf6a6 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 8e7a9989b3..5bec0c7a84 100644
+index e5c42144e0..2198473411 100644
@@ -40 +41 @@
-@@ -2706,10 +2709,20 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
+@@ -2566,10 +2569,20 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
@@ -66 +67 @@
-@@ -3895,8 +3908,8 @@ i40e_flow_parse_vxlan_pattern(__rte_unused struct rte_eth_dev *dev,
+@@ -3395,8 +3408,8 @@ i40e_flow_parse_vxlan_pattern(__rte_unused struct rte_eth_dev *dev,
@@ -77 +78 @@
-@@ -4126,8 +4139,8 @@ i40e_flow_parse_nvgre_pattern(__rte_unused struct rte_eth_dev *dev,
+@@ -3626,8 +3639,8 @@ i40e_flow_parse_nvgre_pattern(__rte_unused struct rte_eth_dev *dev,
@@ -88 +89 @@
-@@ -4801,5 +4814,5 @@ i40e_flow_parse_rss_pattern(__rte_unused struct rte_eth_dev *dev,
+@@ -4246,5 +4259,5 @@ i40e_flow_parse_rss_pattern(__rte_unused struct rte_eth_dev *dev,


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

* [dpdk-stable] patch 'net/bnxt: fix resetting mbuf data offset' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (62 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/i40e: fix flow director for eth + VLAN pattern' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/vdev_netvsc: fix device probing error flow' " Kevin Traynor
                   ` (6 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Lance Richardson, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/ab206406dbfed2e9a1e8c4309cd32d9035cd416c

Thanks.

Kevin.

---
From ab206406dbfed2e9a1e8c4309cd32d9035cd416c Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Sun, 25 Oct 2020 20:56:14 -0700
Subject: [PATCH] net/bnxt: fix resetting mbuf data offset

[ upstream commit 3cefa72935fde04824fdfbee9c435c08278ab3c2 ]

Reset mbuf->data_off before handing the Rx packet to the application.
We were not doing this in the TPA path. It can cause applications
using this field for post processing to work incorrectly.

Fixes: 0958d8b6435d ("net/bnxt: support LRO")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 24c760ee25..a4234d1f05 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -142,4 +142,5 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq,
 	tpa_info->len = rte_le_to_cpu_32(tpa_start->len);
 
+	mbuf->data_off = RTE_PKTMBUF_HEADROOM;
 	mbuf->nb_segs = 1;
 	mbuf->next = NULL;
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:39.156446227 +0000
+++ 0065-net-bnxt-fix-resetting-mbuf-data-offset.patch	2020-11-18 16:33:37.992215102 +0000
@@ -1 +1 @@
-From 3cefa72935fde04824fdfbee9c435c08278ab3c2 Mon Sep 17 00:00:00 2001
+From ab206406dbfed2e9a1e8c4309cd32d9035cd416c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3cefa72935fde04824fdfbee9c435c08278ab3c2 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 2645ed61f4..4d0ab604f3 100644
+index 24c760ee25..a4234d1f05 100644
@@ -23 +24 @@
-@@ -151,4 +151,5 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq,
+@@ -142,4 +142,5 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq,


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

* [dpdk-stable] patch 'net/vdev_netvsc: fix device probing error flow' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (63 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/bnxt: fix resetting mbuf data offset' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/thunderx: fix memory leak on rbdr desc ring failure' " Kevin Traynor
                   ` (5 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Long Li; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/e304c6da914b1a70d6bfb5ef9f58be5dd14ed943

Thanks.

Kevin.

---
From e304c6da914b1a70d6bfb5ef9f58be5dd14ed943 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Thu, 22 Oct 2020 01:11:34 -0700
Subject: [PATCH] net/vdev_netvsc: fix device probing error flow

[ upstream commit 702b27d3fc4b82643d08d4b072e6d61b6d73e6be ]

If a device probe fails, the alarm is canceled and will no longer work
for previously probed devices.

Fix this by checking if alarm is necessary at the end of each device
probe.  Reset the alarm if there are vdev_netvsc_ctx created.

Fixes: e7dc5d7becc5 ("net/vdev_netvsc: implement core functionality")

Signed-off-by: Long Li <longli@microsoft.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/vdev_netvsc/vdev_netvsc.c | 27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index a865a82811..9ed8a4949d 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -685,4 +685,5 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
 
 	DRV_LOG(DEBUG, "invoked as \"%s\", using arguments \"%s\"", name, args);
+	rte_eal_alarm_cancel(vdev_netvsc_alarm, NULL);
 	if (!kvargs) {
 		DRV_LOG(ERR, "cannot parse arguments list");
@@ -700,9 +701,6 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
 			++specified;
 	}
-	if (ignore) {
-		if (kvargs)
-			rte_kvargs_free(kvargs);
-		return 0;
-	}
+	if (ignore)
+		goto ignore;
 	if (specified > 1) {
 		DRV_LOG(ERR, "More than one way used to specify the netvsc"
@@ -710,5 +708,4 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
 		goto error;
 	}
-	rte_eal_alarm_cancel(vdev_netvsc_alarm, NULL);
 	/* Gather interfaces. */
 	ret = vdev_netvsc_foreach_iface(vdev_netvsc_netvsc_probe, 1, name,
@@ -731,15 +728,17 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
 		DRV_LOG(WARNING, "non-netvsc device was probed as netvsc");
 	}
-	ret = rte_eal_alarm_set(VDEV_NETVSC_PROBE_MS * 1000,
-				vdev_netvsc_alarm, NULL);
-	if (ret < 0) {
-		DRV_LOG(ERR, "unable to schedule alarm callback: %s",
-			rte_strerror(-ret));
-		goto error;
-	}
 error:
+	++vdev_netvsc_ctx_inst;
+ignore:
 	if (kvargs)
 		rte_kvargs_free(kvargs);
-	++vdev_netvsc_ctx_inst;
+	/* Reset alarm if there are device context created */
+	if (vdev_netvsc_ctx_count) {
+		ret = rte_eal_alarm_set(VDEV_NETVSC_PROBE_MS * 1000,
+					vdev_netvsc_alarm, NULL);
+		if (ret < 0)
+			DRV_LOG(ERR, "unable to schedule alarm callback: %s",
+				rte_strerror(-ret));
+	}
 	return 0;
 }
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:39.173266366 +0000
+++ 0066-net-vdev_netvsc-fix-device-probing-error-flow.patch	2020-11-18 16:33:37.993215103 +0000
@@ -1 +1 @@
-From 702b27d3fc4b82643d08d4b072e6d61b6d73e6be Mon Sep 17 00:00:00 2001
+From e304c6da914b1a70d6bfb5ef9f58be5dd14ed943 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 702b27d3fc4b82643d08d4b072e6d61b6d73e6be ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 1ecb0b3e6a..c1b7099717 100644
+index a865a82811..9ed8a4949d 100644
@@ -25 +26 @@
-@@ -672,4 +672,5 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
+@@ -685,4 +685,5 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
@@ -31 +32 @@
-@@ -687,9 +688,6 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
+@@ -700,9 +701,6 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
@@ -43 +44 @@
-@@ -697,5 +695,4 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
+@@ -710,5 +708,4 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
@@ -49 +50 @@
-@@ -718,15 +715,17 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
+@@ -731,15 +728,17 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)


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

* [dpdk-stable] patch 'net/thunderx: fix memory leak on rbdr desc ring failure' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (64 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/vdev_netvsc: fix device probing error flow' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'app/testpmd: do not allow dynamic change of core number' " Kevin Traynor
                   ` (4 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/4a730b3da651720402a413072f48d258047ae177

Thanks.

Kevin.

---
From 4a730b3da651720402a413072f48d258047ae177 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 20 Oct 2020 23:02:37 +0800
Subject: [PATCH] net/thunderx: fix memory leak on rbdr desc ring failure

[ upstream commit 33d1405fc3264200d762c08728f4155335799456 ]

In nicvf_qset_rbdr_alloc(), we allocate memory for the 'rbdr'
structure but not released when allocate 'rbdr desc ring' fails.

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

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/net/thunderx/nicvf_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index d627a3bb70..a47a287a5f 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -646,4 +646,5 @@ nicvf_qset_rbdr_alloc(struct rte_eth_dev *dev, struct nicvf *nic,
 	if (rz == NULL) {
 		PMD_INIT_LOG(ERR, "Failed to allocate mem for rbdr desc ring");
+		rte_free(rbdr);
 		return -ENOMEM;
 	}
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:39.189807742 +0000
+++ 0067-net-thunderx-fix-memory-leak-on-rbdr-desc-ring-failu.patch	2020-11-18 16:33:37.994215104 +0000
@@ -1 +1 @@
-From 33d1405fc3264200d762c08728f4155335799456 Mon Sep 17 00:00:00 2001
+From 4a730b3da651720402a413072f48d258047ae177 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 33d1405fc3264200d762c08728f4155335799456 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index f0bd20a22b..b6bb05e500 100644
+index d627a3bb70..a47a287a5f 100644
@@ -22 +23 @@
-@@ -639,4 +639,5 @@ nicvf_qset_rbdr_alloc(struct rte_eth_dev *dev, struct nicvf *nic,
+@@ -646,4 +646,5 @@ nicvf_qset_rbdr_alloc(struct rte_eth_dev *dev, struct nicvf *nic,


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

* [dpdk-stable] patch 'app/testpmd: do not allow dynamic change of core number' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (65 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'net/thunderx: fix memory leak on rbdr desc ring failure' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'ethdev: fix data type for port id' " Kevin Traynor
                   ` (3 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Zhenghua Zhou; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/266047e5921bb30d4f60ffa3c746f81453bf62b9

Thanks.

Kevin.

---
From 266047e5921bb30d4f60ffa3c746f81453bf62b9 Mon Sep 17 00:00:00 2001
From: Zhenghua Zhou <zhenghuax.zhou@intel.com>
Date: Tue, 27 Oct 2020 06:42:52 +0000
Subject: [PATCH] app/testpmd: do not allow dynamic change of core number

[ upstream commit 653c6ed4a12ad40e476a8936b4f463e01acfbf78 ]

When the number of forwarding cores changed in runtime, the issue may
be encountered:
If the nbcore set little than current nbcore, the forwarding thread
will still running on the extra cores. Therefore, trying to stop
forwarding will hang testpmd, since it will wait for the extra cores to
stop.

So do not allow to change nbcore number when forwarding is running.

Fixes: 0c0db76f42ed ("app/testpmd: separate forward config setup from display")

Signed-off-by: Zhenghua Zhou <zhenghuax.zhou@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/config.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index e60f5db33b..7750fe4191 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2507,4 +2507,8 @@ void
 set_fwd_lcores_number(uint16_t nb_lc)
 {
+	if (test_done == 0) {
+		printf("Please stop forwarding first\n");
+		return;
+	}
 	if (nb_lc > nb_cfg_lcores) {
 		printf("nb fwd cores %u > %u (max. number of configured "
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:39.207639086 +0000
+++ 0068-app-testpmd-do-not-allow-dynamic-change-of-core-numb.patch	2020-11-18 16:33:37.996215105 +0000
@@ -1 +1 @@
-From 653c6ed4a12ad40e476a8936b4f463e01acfbf78 Mon Sep 17 00:00:00 2001
+From 266047e5921bb30d4f60ffa3c746f81453bf62b9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 653c6ed4a12ad40e476a8936b4f463e01acfbf78 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 136f4e5dbe..755d1dfc9c 100644
+index e60f5db33b..7750fe4191 100644
@@ -28 +29 @@
-@@ -3505,4 +3505,8 @@ void
+@@ -2507,4 +2507,8 @@ void


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

* [dpdk-stable] patch 'ethdev: fix data type for port id' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (66 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'app/testpmd: do not allow dynamic change of core number' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'fix spellings that Lintian complains about' " Kevin Traynor
                   ` (2 subsequent siblings)
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ajit Khaparde, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/3c3390c6ee1cfcf284fce5110e8cd34d85c8e361

Thanks.

Kevin.

---
From 3c3390c6ee1cfcf284fce5110e8cd34d85c8e361 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Wed, 4 Nov 2020 10:57:57 +0800
Subject: [PATCH] ethdev: fix data type for port id

[ upstream commit 4bb02a6f5b7f11aafde1be7bfd08b6e81997b916 ]

The ethdev port id is 16 bits now. This patch fixes the data type
of the variable for 'pid', which changing from uint32_t to uint16_t.

RTE_MAX_ETHPORTS is the maximum number of ports, which customized by
the user. To avoid 16-bit unsigned integer overflow, the valid value
of RTE_MAX_ETHPORTS should be set from 0 to UINT16_MAX, and it is
safer to cut one more port from space.

So we use RTE_BUILD_BUG_ON() to ensure that RTE_MAX_ETHPORTS is less
to UINT16_MAX.

Fixes: 5b7ba31148a8 ("ethdev: add port ownership")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_ethdev/rte_ethdev.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 3f3f9505b2..d4a1d1e5d2 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -382,5 +382,7 @@ static struct rte_eth_dev *
 _rte_eth_dev_allocated(const char *name)
 {
-	unsigned i;
+	uint16_t i;
+
+	RTE_BUILD_BUG_ON(RTE_MAX_ETHPORTS >= UINT16_MAX);
 
 	for (i = 0; i < RTE_MAX_ETHPORTS; i++) {
@@ -411,5 +413,5 @@ static uint16_t
 rte_eth_dev_find_free_port(void)
 {
-	unsigned i;
+	uint16_t i;
 
 	for (i = 0; i < RTE_MAX_ETHPORTS; i++) {
@@ -773,5 +775,5 @@ int
 rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
 {
-	uint32_t pid;
+	uint16_t pid;
 
 	if (name == NULL) {
@@ -3357,5 +3359,5 @@ rte_eth_mirror_rule_reset(uint16_t port_id, uint8_t rule_id)
 RTE_INIT(eth_dev_init_cb_lists)
 {
-	int i;
+	uint16_t i;
 
 	for (i = 0; i < RTE_MAX_ETHPORTS; i++)
@@ -3370,5 +3372,5 @@ rte_eth_dev_callback_register(uint16_t port_id,
 	struct rte_eth_dev *dev;
 	struct rte_eth_dev_callback *user_cb;
-	uint32_t next_port; /* size is 32-bit to prevent loop wrap-around */
+	uint16_t next_port;
 	uint16_t last_port;
 
@@ -3433,5 +3435,5 @@ rte_eth_dev_callback_unregister(uint16_t port_id,
 	struct rte_eth_dev *dev;
 	struct rte_eth_dev_callback *cb, *next;
-	uint32_t next_port; /* size is 32-bit to prevent loop wrap-around */
+	uint16_t next_port;
 	uint16_t last_port;
 
@@ -4374,5 +4376,5 @@ int __rte_experimental
 rte_eth_switch_domain_alloc(uint16_t *domain_id)
 {
-	unsigned int i;
+	uint16_t i;
 
 	*domain_id = RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID;
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:39.226292857 +0000
+++ 0069-ethdev-fix-data-type-for-port-id.patch	2020-11-18 16:33:37.998215106 +0000
@@ -1 +1 @@
-From 4bb02a6f5b7f11aafde1be7bfd08b6e81997b916 Mon Sep 17 00:00:00 2001
+From 3c3390c6ee1cfcf284fce5110e8cd34d85c8e361 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4bb02a6f5b7f11aafde1be7bfd08b6e81997b916 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index c5e3ba4218..17ddacc78d 100644
+index 3f3f9505b2..d4a1d1e5d2 100644
@@ -31,2 +32,2 @@
-@@ -412,5 +412,7 @@ static struct rte_eth_dev *
- eth_dev_allocated(const char *name)
+@@ -382,5 +382,7 @@ static struct rte_eth_dev *
+ _rte_eth_dev_allocated(const char *name)
@@ -40,2 +41,2 @@
-@@ -441,5 +443,5 @@ static uint16_t
- eth_dev_find_free_port(void)
+@@ -411,5 +413,5 @@ static uint16_t
+ rte_eth_dev_find_free_port(void)
@@ -47 +48 @@
-@@ -817,5 +819,5 @@ int
+@@ -773,5 +775,5 @@ int
@@ -54 +55 @@
-@@ -4294,5 +4296,5 @@ rte_eth_mirror_rule_reset(uint16_t port_id, uint8_t rule_id)
+@@ -3357,5 +3359,5 @@ rte_eth_mirror_rule_reset(uint16_t port_id, uint8_t rule_id)
@@ -61 +62 @@
-@@ -4307,5 +4309,5 @@ rte_eth_dev_callback_register(uint16_t port_id,
+@@ -3370,5 +3372,5 @@ rte_eth_dev_callback_register(uint16_t port_id,
@@ -68 +69 @@
-@@ -4370,5 +4372,5 @@ rte_eth_dev_callback_unregister(uint16_t port_id,
+@@ -3433,5 +3435,5 @@ rte_eth_dev_callback_unregister(uint16_t port_id,
@@ -75 +76 @@
-@@ -5427,5 +5429,5 @@ int
+@@ -4374,5 +4376,5 @@ int __rte_experimental


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

* [dpdk-stable] patch 'fix spellings that Lintian complains about' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (67 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'ethdev: fix data type for port id' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'doc: fix typo in KNI guide' " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'ethdev: move non-offload capabilities' " Kevin Traynor
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/30bf2faf0ec61543e4c5dbcfcef0cde5da004850

Thanks.

Kevin.

---
From 30bf2faf0ec61543e4c5dbcfcef0cde5da004850 Mon Sep 17 00:00:00 2001
From: Luca Boccassi <luca.boccassi@microsoft.com>
Date: Thu, 29 Oct 2020 13:36:33 +0000
Subject: [PATCH] fix spellings that Lintian complains about

[ upstream commit e8cff6142a2768983bb7950e5f2b0cc00dd59f33 ]

Fixes: 103809d032cd ("app/test-fib: add test application for FIB")
Fixes: 1265b5372d9d ("net/hns3: add some definitions for data structure and macro")
Fixes: a85e378cc606 ("net/ixgbe/base: add debug traces")
Fixes: 4861cde46116 ("i40e: new poll mode driver")
Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
Fixes: 86a2265e59d7 ("qede: add SRIOV support")
Fixes: 1db4d2330bc8 ("net/virtio-user: check negotiated features before set")

Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c                 | 2 +-
 drivers/net/ixgbe/base/ixgbe_x540.c               | 2 +-
 drivers/net/netvsc/hn_rndis.c                     | 2 +-
 drivers/net/qede/base/ecore_sriov.c               | 2 +-
 drivers/net/virtio/virtio_user/vhost_kernel_tap.c | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 522322d3d7..51d5830cfa 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -260,5 +260,5 @@ i40evf_read_pfmsg(struct rte_eth_dev *dev, struct i40evf_arq_msg_info *data)
 			vf->vf_reset = true;
 			vf->pend_msg |= PFMSG_RESET_IMPENDING;
-			PMD_DRV_LOG(INFO, "vf is reseting");
+			PMD_DRV_LOG(INFO, "VF is resetting");
 			break;
 		case VIRTCHNL_EVENT_PF_DRIVER_CLOSE:
diff --git a/drivers/net/ixgbe/base/ixgbe_x540.c b/drivers/net/ixgbe/base/ixgbe_x540.c
index d65f47c181..d91633a2da 100644
--- a/drivers/net/ixgbe/base/ixgbe_x540.c
+++ b/drivers/net/ixgbe/base/ixgbe_x540.c
@@ -785,5 +785,5 @@ s32 ixgbe_acquire_swfw_sync_X540(struct ixgbe_hw *hw, u32 mask)
 	 */
 	if (ixgbe_get_swfw_sync_semaphore(hw)) {
-		DEBUGOUT("Failed to get NVM sempahore and register semaphore while forcefully ignoring FW sempahore bit(s) and setting SW semaphore bit(s), returning IXGBE_ERR_SWFW_SYNC\n");
+		DEBUGOUT("Failed to get NVM semaphore and register semaphore while forcefully ignoring FW semaphore bit(s) and setting SW semaphore bit(s), returning IXGBE_ERR_SWFW_SYNC\n");
 		return IXGBE_ERR_SWFW_SYNC;
 	}
diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
index cb85ffe40d..3de1c664b0 100644
--- a/drivers/net/netvsc/hn_rndis.c
+++ b/drivers/net/netvsc/hn_rndis.c
@@ -277,5 +277,5 @@ static int hn_nvs_send_rndis_ctrl(struct vmbus_channel *chan,
 
 	if (sg.ofs + reqlen >  PAGE_SIZE) {
-		PMD_DRV_LOG(ERR, "RNDIS request crosses page bounary");
+		PMD_DRV_LOG(ERR, "RNDIS request crosses page boundary");
 		return -EINVAL;
 	}
diff --git a/drivers/net/qede/base/ecore_sriov.c b/drivers/net/qede/base/ecore_sriov.c
index 748252a42f..64c93991bb 100644
--- a/drivers/net/qede/base/ecore_sriov.c
+++ b/drivers/net/qede/base/ecore_sriov.c
@@ -4010,5 +4010,5 @@ ecore_iov_execute_vf_flr_cleanup(struct ecore_hwfn *p_hwfn,
 		if (rc) {
 			/* TODO - again, a mess... */
-			DP_ERR(p_hwfn, "Failed to re-enable VF[%d] acces\n",
+			DP_ERR(p_hwfn, "Failed to re-enable VF[%d] access\n",
 			       vfid);
 			return rc;
diff --git a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
index cdfbd4be7a..7edb4a3215 100644
--- a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
+++ b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
@@ -40,5 +40,5 @@ vhost_kernel_tap_set_offload(int fd, uint64_t features)
 	/* Check if our kernel supports TUNSETOFFLOAD */
 	if (ioctl(fd, TUNSETOFFLOAD, 0) != 0 && errno == EINVAL) {
-		PMD_DRV_LOG(ERR, "Kernel does't support TUNSETOFFLOAD\n");
+		PMD_DRV_LOG(ERR, "Kernel doesn't support TUNSETOFFLOAD\n");
 		return -ENOTSUP;
 	}
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:39.246413505 +0000
+++ 0070-fix-spellings-that-Lintian-complains-about.patch	2020-11-18 16:33:38.005215111 +0000
@@ -1 +1 @@
-From e8cff6142a2768983bb7950e5f2b0cc00dd59f33 Mon Sep 17 00:00:00 2001
+From 30bf2faf0ec61543e4c5dbcfcef0cde5da004850 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e8cff6142a2768983bb7950e5f2b0cc00dd59f33 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +17,0 @@
- app/test-fib/main.c                               | 4 ++--
- drivers/net/hns3/hns3_ethdev.h                    | 2 +-
@@ -24 +23 @@
- 7 files changed, 8 insertions(+), 8 deletions(-)
+ 5 files changed, 5 insertions(+), 5 deletions(-)
@@ -26,26 +24,0 @@
-diff --git a/app/test-fib/main.c b/app/test-fib/main.c
-index 9e6a4f2231..b0a97b0d7e 100644
---- a/app/test-fib/main.c
-+++ b/app/test-fib/main.c
-@@ -630,8 +630,8 @@ print_usage(void)
- 		"[-a <check nexthops for all ipv4 address space"
- 		"(only valid with -c)>]\n"
--		"[-b <fib algorithm>]\n\tavailible options for ipv4\n"
-+		"[-b <fib algorithm>]\n\tavailable options for ipv4\n"
- 		"\t\trib - RIB based FIB\n"
- 		"\t\tdir - DIR24_8 based FIB\n"
--		"\tavailible options for ipv6:\n"
-+		"\tavailable options for ipv6:\n"
- 		"\t\trib - RIB based FIB\n"
- 		"\t\ttrie - TRIE based FIB\n"
-diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
-index 63e0c2fb36..4c40df1cbb 100644
---- a/drivers/net/hns3/hns3_ethdev.h
-+++ b/drivers/net/hns3/hns3_ethdev.h
-@@ -170,5 +170,5 @@ enum hns3_media_type {
- struct hns3_mac {
- 	uint8_t mac_addr[RTE_ETHER_ADDR_LEN];
--	bool default_addr_setted; /* whether default addr(mac_addr) is setted */
-+	bool default_addr_setted; /* whether default addr(mac_addr) is set */
- 	uint8_t media_type;
- 	uint8_t phy_addr;
@@ -53 +26 @@
-index 6e6eef5a6a..c26b036b85 100644
+index 522322d3d7..51d5830cfa 100644
@@ -56 +29 @@
-@@ -261,5 +261,5 @@ i40evf_read_pfmsg(struct rte_eth_dev *dev, struct i40evf_arq_msg_info *data)
+@@ -260,5 +260,5 @@ i40evf_read_pfmsg(struct rte_eth_dev *dev, struct i40evf_arq_msg_info *data)
@@ -64 +37 @@
-index 4cea16a817..8efde4645a 100644
+index d65f47c181..d91633a2da 100644
@@ -75 +48 @@
-index 66d1966f29..1ce260c89b 100644
+index cb85ffe40d..3de1c664b0 100644
@@ -86 +59 @@
-index dac4cbee86..ed8cc695fe 100644
+index 748252a42f..64c93991bb 100644
@@ -89 +62 @@
-@@ -4078,5 +4078,5 @@ ecore_iov_execute_vf_flr_cleanup(struct ecore_hwfn *p_hwfn,
+@@ -4010,5 +4010,5 @@ ecore_iov_execute_vf_flr_cleanup(struct ecore_hwfn *p_hwfn,
@@ -97 +70 @@
-index acddefa33d..79b8446f8e 100644
+index cdfbd4be7a..7edb4a3215 100644


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

* [dpdk-stable] patch 'doc: fix typo in KNI guide' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (68 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'fix spellings that Lintian complains about' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  2020-11-18 16:35 ` [dpdk-stable] patch 'ethdev: move non-offload capabilities' " Kevin Traynor
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Ciara Power; +Cc: John McNamara, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/a2e740be7d8f8f6c09583763f5d34d1d59381eea

Thanks.

Kevin.

---
From a2e740be7d8f8f6c09583763f5d34d1d59381eea Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Mon, 2 Nov 2020 15:23:48 +0000
Subject: [PATCH] doc: fix typo in KNI guide

[ upstream commit cbd2f21ab76b5aa8d7c7967b37062cfb57d8002b ]

The typo "withe" should have been "with the". This is now fixed.

Fixes: 89397a01ce4a ("kni: set default carrier state of interface")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/prog_guide/kernel_nic_interface.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst
index ccf03a41de..5ba0705f0f 100644
--- a/doc/guides/prog_guide/kernel_nic_interface.rst
+++ b/doc/guides/prog_guide/kernel_nic_interface.rst
@@ -179,5 +179,5 @@ KNI Creation and Deletion
 
 Before any KNI interfaces can be created, the ``rte_kni`` kernel module must
-be loaded into the kernel and configured withe ``rte_kni_init()`` function.
+be loaded into the kernel and configured with the ``rte_kni_init()`` function.
 
 The KNI interfaces are created by a DPDK application dynamically via the
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:39.269723218 +0000
+++ 0071-doc-fix-typo-in-KNI-guide.patch	2020-11-18 16:33:38.005215111 +0000
@@ -1 +1 @@
-From cbd2f21ab76b5aa8d7c7967b37062cfb57d8002b Mon Sep 17 00:00:00 2001
+From a2e740be7d8f8f6c09583763f5d34d1d59381eea Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cbd2f21ab76b5aa8d7c7967b37062cfb57d8002b ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index de5d75bd4c..1ce03ec1a3 100644
+index ccf03a41de..5ba0705f0f 100644


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

* [dpdk-stable] patch 'ethdev: move non-offload capabilities' has been queued to LTS release 18.11.11
  2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
                   ` (69 preceding siblings ...)
  2020-11-18 16:35 ` [dpdk-stable] patch 'doc: fix typo in KNI guide' " Kevin Traynor
@ 2020-11-18 16:35 ` " Kevin Traynor
  70 siblings, 0 replies; 72+ messages in thread
From: Kevin Traynor @ 2020-11-18 16:35 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.11

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

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

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/d767546029d3df964a2168a982220fc64c0b4802

Thanks.

Kevin.

---
From d767546029d3df964a2168a982220fc64c0b4802 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Tue, 27 Oct 2020 14:20:22 +0100
Subject: [PATCH] ethdev: move non-offload capabilities

[ upstream commit e9ef7ec12be0764924b6eebfe2f00b15ed0345ff ]

The definitions of RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP
and RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP were inserted
before the last comment of Tx offloads.

It is moved in a better place,
with comments moved to be before the definition.
A group comment is added to better describe device capabilities.

Fixes: cac923cfea47 ("ethdev: support runtime queue setup")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 lib/librte_ethdev/rte_ethdev.h | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index e1f299c993..8fec807475 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1019,10 +1019,4 @@ struct rte_eth_conf {
  */
 #define DEV_TX_OFFLOAD_MATCH_METADATA   0x00200000
-
-#define RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP 0x00000001
-/**< Device supports Rx queue setup after device started*/
-#define RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP 0x00000002
-/**< Device supports Tx queue setup after device started*/
-
 /*
  * If new Tx offload capabilities are defined, they also must be
@@ -1030,4 +1024,13 @@ struct rte_eth_conf {
  */
 
+/**@{@name Device capabilities
+ * Non-offload capabilities reported in rte_eth_dev_info.dev_capa.
+ */
+/** Device supports Rx queue setup after device started. */
+#define RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP 0x00000001
+/** Device supports Tx queue setup after device started. */
+#define RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP 0x00000002
+/**@}*/
+
 /*
  * Fallback default preferred Rx/Tx port parameters.
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:39.287209304 +0000
+++ 0072-ethdev-move-non-offload-capabilities.patch	2020-11-18 16:33:38.008215113 +0000
@@ -1 +1 @@
-From e9ef7ec12be0764924b6eebfe2f00b15ed0345ff Mon Sep 17 00:00:00 2001
+From d767546029d3df964a2168a982220fc64c0b4802 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e9ef7ec12be0764924b6eebfe2f00b15ed0345ff ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -20,2 +21,2 @@
- lib/librte_ethdev/rte_ethdev.h | 16 +++++++++-------
- 1 file changed, 9 insertions(+), 7 deletions(-)
+ lib/librte_ethdev/rte_ethdev.h | 15 +++++++++------
+ 1 file changed, 9 insertions(+), 6 deletions(-)
@@ -24 +25 @@
-index f689550745..619cbe521e 100644
+index e1f299c993..8fec807475 100644
@@ -27 +28 @@
-@@ -1420,11 +1420,4 @@ struct rte_eth_conf {
+@@ -1019,10 +1019,4 @@ struct rte_eth_conf {
@@ -29,2 +30 @@
- #define DEV_TX_OFFLOAD_SEND_ON_TIMESTAMP 0x00200000
--
+ #define DEV_TX_OFFLOAD_MATCH_METADATA   0x00200000
@@ -39 +39 @@
-@@ -1432,4 +1425,13 @@ struct rte_eth_conf {
+@@ -1030,4 +1024,13 @@ struct rte_eth_conf {


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

end of thread, back to index

Thread overview: 72+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18 16:34 [dpdk-stable] patch 'net/netvsc: check for overflow on packet info from host' has been queued to LTS release 18.11.11 Kevin Traynor
2020-11-18 16:34 ` [dpdk-stable] patch 'net/netvsc: replace compiler builtin overflow check' " Kevin Traynor
2020-11-18 16:34 ` [dpdk-stable] patch 'eventdev: check allocation in Tx adapter' " Kevin Traynor
2020-11-18 16:34 ` [dpdk-stable] patch 'event/dpaa2: fix dereference before null check' " Kevin Traynor
2020-11-18 16:34 ` [dpdk-stable] patch 'eventdev: fix adapter leak in error path' " Kevin Traynor
2020-11-18 16:34 ` [dpdk-stable] patch 'test/event: fix function arguments for crypto adapter' " Kevin Traynor
2020-11-18 16:34 ` [dpdk-stable] patch 'eal/x86: fix memcpy AVX-512 enablement' " Kevin Traynor
2020-11-18 16:34 ` [dpdk-stable] patch 'vhost: fix virtio-net header length with packed ring' " Kevin Traynor
2020-11-18 16:34 ` [dpdk-stable] patch 'net/netvsc: fix Tx queue leak in error path' " Kevin Traynor
2020-11-18 16:34 ` [dpdk-stable] patch 'net/bonding: fix possible unbalanced packet receiving' " Kevin Traynor
2020-11-18 16:34 ` [dpdk-stable] patch 'net/bonding: fix Rx queue conversion' " Kevin Traynor
2020-11-18 16:34 ` [dpdk-stable] patch 'net/failsafe: fix state synchro cleanup' " Kevin Traynor
2020-11-18 16:34 ` [dpdk-stable] patch 'net/ring: check internal arguments' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'doc: fix EF10 Rx mode name in sfc guide' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'doc: fix typo in pcap " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'net/bnx2x: add QLogic vendor id for BCM57840' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'ethdev: fix memory ordering for callback functions' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix handshake synchronization' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix handshake deadlock' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix buffer use after free' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: handle worker shutdown in burst mode' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'test/distributor: fix shutdown of busy worker' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix return pkt calls in single mode' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'test/distributor: fix freeing mbufs' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'test/distributor: fix lcores statistics' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'test/distributor: collect return mbufs' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix API documentation' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'test/distributor: fix race conditions on shutdown' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix scalar matching' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix flushing in flight packets' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'distributor: fix clearing returns buffer' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'test/distributor: fix quitting workers in burst mode' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'test/distributor: fix mbuf leak on failure' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'doc: add SPDX license tag header to meson guide' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'app: fix missing dependencies' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix missing dependency' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'bus/pci: remove unused scan by address' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'eal/linux: fix memory leak in uevent handling' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'eal: fix leak on device event callback unregister' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'mem: fix config name in error logs' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'examples/vm_power: fix build on Ubuntu 20.04' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'examples/multi_process: " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'examples/performance-thread: fix build with low core count' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'baseband/turbo_sw: fix memory leak in error path' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'examples/fips_validation: fix missed version line' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'crypto/dpaa2_sec: remove dead code' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'common/qat: add missing kmod dependency info' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'app/testpmd: fix bonding xmit balance policy command' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'net/i40e: fix virtual channel conflict' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'net/ixgbe: check switch domain allocation result' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'net/i40e: fix QinQ flow pattern to allow non full mask' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'net/ixgbe: fix vector Rx' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'net/i40e: " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'net/fm10k: " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'net/vhost: fix xstats after clearing stats' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'vhost: fix virtqueues metadata allocation' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'vhost: validate index in available entries API' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'vhost: validate index in guest notification " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'net/ena: remove unused macro' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'net/mvpp2: fix memory leak in error path' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'net/netvsc: allocate contiguous physical memory for RNDIS' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'app/testpmd: fix RSS key for flow API RSS rule' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'net/i40e: fix flow director for eth + VLAN pattern' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'net/bnxt: fix resetting mbuf data offset' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'net/vdev_netvsc: fix device probing error flow' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'net/thunderx: fix memory leak on rbdr desc ring failure' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'app/testpmd: do not allow dynamic change of core number' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'ethdev: fix data type for port id' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'fix spellings that Lintian complains about' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'doc: fix typo in KNI guide' " Kevin Traynor
2020-11-18 16:35 ` [dpdk-stable] patch 'ethdev: move non-offload capabilities' " Kevin Traynor

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox