patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6
@ 2020-10-28 10:42 luca.boccassi
  2020-10-28 10:42 ` [dpdk-stable] patch 'bus/pci: remove duplicate declaration' " luca.boccassi
                   ` (206 more replies)
  0 siblings, 207 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:42 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From de0e7c4afd1301f054f54494958c8ab6e060b4e6 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 14 Aug 2020 10:45:14 -0700
Subject: [PATCH] eal/linux: change udev debug message

[ upstream commit 64201f10598b53b2218176eefc4d3888028dcb7b ]

The debug message was poorly worded and did not include the
part that would be useful. I.e it never said what was being ignored.
Change it to print the message so that if udev changes format or
other subsystems need to be added then the necessary information
will be in the debug log.

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

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 lib/librte_eal/linux/eal/eal_dev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/librte_eal/linux/eal/eal_dev.c b/lib/librte_eal/linux/eal/eal_dev.c
index 83c9cd6607..83b6068264 100644
--- a/lib/librte_eal/linux/eal/eal_dev.c
+++ b/lib/librte_eal/linux/eal/eal_dev.c
@@ -234,8 +234,7 @@ dev_uev_handler(__rte_unused void *param)
 
 	ret = dev_uev_parse(buf, &uevent, EAL_UEV_MSG_LEN);
 	if (ret < 0) {
-		RTE_LOG(DEBUG, EAL, "It is not an valid event "
-			"that need to be handle.\n");
+		RTE_LOG(DEBUG, EAL, "Ignoring uevent '%s'\n", buf);
 		return;
 	}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:11.838322953 +0000
+++ 0001-eal-linux-change-udev-debug-message.patch	2020-10-28 10:35:11.376828139 +0000
@@ -1,8 +1,10 @@
-From 64201f10598b53b2218176eefc4d3888028dcb7b Mon Sep 17 00:00:00 2001
+From de0e7c4afd1301f054f54494958c8ab6e060b4e6 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Fri, 14 Aug 2020 10:45:14 -0700
 Subject: [PATCH] eal/linux: change udev debug message
 
+[ upstream commit 64201f10598b53b2218176eefc4d3888028dcb7b ]
+
 The debug message was poorly worded and did not include the
 part that would be useful. I.e it never said what was being ignored.
 Change it to print the message so that if udev changes format or
@@ -14,13 +16,13 @@
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 Acked-by: Jeff Guo <jia.guo@intel.com>
 ---
- lib/librte_eal/linux/eal_dev.c | 3 +--
+ lib/librte_eal/linux/eal/eal_dev.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
 
-diff --git a/lib/librte_eal/linux/eal_dev.c b/lib/librte_eal/linux/eal_dev.c
+diff --git a/lib/librte_eal/linux/eal/eal_dev.c b/lib/librte_eal/linux/eal/eal_dev.c
 index 83c9cd6607..83b6068264 100644
---- a/lib/librte_eal/linux/eal_dev.c
-+++ b/lib/librte_eal/linux/eal_dev.c
+--- a/lib/librte_eal/linux/eal/eal_dev.c
++++ b/lib/librte_eal/linux/eal/eal_dev.c
 @@ -234,8 +234,7 @@ dev_uev_handler(__rte_unused void *param)
  
  	ret = dev_uev_parse(buf, &uevent, EAL_UEV_MSG_LEN);

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

* [dpdk-stable] patch 'bus/pci: remove duplicate declaration' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
@ 2020-10-28 10:42 ` luca.boccassi
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/failsafe: fix double space in warning log' " luca.boccassi
                   ` (205 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:42 UTC (permalink / raw)
  To: David Marchand; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From b4b613b2b4a6a91ae42a78f6993bcf8fd1e6f492 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 17 Sep 2020 13:28:23 +0200
Subject: [PATCH] bus/pci: remove duplicate declaration

[ upstream commit f252fe5e18e060e2b79f193d21d80e2dbbf743be ]

This declaration is the same as the one a few lines before.

Fixes: 6844d146ff39 ("eal: add bus pointer in device structure")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/bus/pci/private.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/bus/pci/private.h b/drivers/bus/pci/private.h
index af1c7ae5fe..9d14769a7e 100644
--- a/drivers/bus/pci/private.h
+++ b/drivers/bus/pci/private.h
@@ -15,8 +15,6 @@ extern struct rte_pci_bus rte_pci_bus;
 struct rte_pci_driver;
 struct rte_pci_device;
 
-extern struct rte_pci_bus rte_pci_bus;
-
 /**
  * Scan the content of the PCI bus, and the devices in the devices
  * list
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:11.863307471 +0000
+++ 0002-bus-pci-remove-duplicate-declaration.patch	2020-10-28 10:35:11.376828139 +0000
@@ -1,12 +1,13 @@
-From f252fe5e18e060e2b79f193d21d80e2dbbf743be Mon Sep 17 00:00:00 2001
+From b4b613b2b4a6a91ae42a78f6993bcf8fd1e6f492 Mon Sep 17 00:00:00 2001
 From: David Marchand <david.marchand@redhat.com>
 Date: Thu, 17 Sep 2020 13:28:23 +0200
 Subject: [PATCH] bus/pci: remove duplicate declaration
 
+[ upstream commit f252fe5e18e060e2b79f193d21d80e2dbbf743be ]
+
 This declaration is the same as the one a few lines before.
 
 Fixes: 6844d146ff39 ("eal: add bus pointer in device structure")
-Cc: stable@dpdk.org
 
 Signed-off-by: David Marchand <david.marchand@redhat.com>
 Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -15,7 +16,7 @@
  1 file changed, 2 deletions(-)
 
 diff --git a/drivers/bus/pci/private.h b/drivers/bus/pci/private.h
-index fadc767236..16f997c701 100644
+index af1c7ae5fe..9d14769a7e 100644
 --- a/drivers/bus/pci/private.h
 +++ b/drivers/bus/pci/private.h
 @@ -15,8 +15,6 @@ extern struct rte_pci_bus rte_pci_bus;

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

* [dpdk-stable] patch 'net/failsafe: fix double space in warning log' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
  2020-10-28 10:42 ` [dpdk-stable] patch 'bus/pci: remove duplicate declaration' " luca.boccassi
@ 2020-10-28 10:42 ` luca.boccassi
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/netvsc: fix multiple channel Rx' " luca.boccassi
                   ` (204 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:42 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Gaetan Rivet, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 73af0c03945b0524c5efac446a7f60c8c0c78e11 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 14 Aug 2020 10:39:33 -0700
Subject: [PATCH] net/failsafe: fix double space in warning log

[ upstream commit 09c00246e170fe6b15eeaf7c3d86f47fc02ef2bd ]

Already get a newline from WARN() macro call.

Fixes: 9dda3e3393c2 ("net/failsafe: add timestamp to stats snapshot")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Gaetan Rivet <grive@u256.net>
---
 drivers/net/failsafe/failsafe_ether.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c
index 93deacd134..6c27645b96 100644
--- a/drivers/net/failsafe/failsafe_ether.c
+++ b/drivers/net/failsafe/failsafe_ether.c
@@ -322,10 +322,10 @@ fs_dev_stats_save(struct sub_device *sdev)
 	if (err) {
 		uint64_t timestamp = sdev->stats_snapshot.timestamp;
 
-		WARN("Could not access latest statistics from sub-device %d.\n",
+		WARN("Could not access latest statistics from sub-device %d.",
 			 SUB_ID(sdev));
 		if (timestamp != 0)
-			WARN("Using latest snapshot taken before %"PRIu64" seconds.\n",
+			WARN("Using latest snapshot taken before %"PRIu64" seconds.",
 				 (rte_rdtsc() - timestamp) / rte_get_tsc_hz());
 	}
 	failsafe_stats_increment
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:11.889741463 +0000
+++ 0003-net-failsafe-fix-double-space-in-warning-log.patch	2020-10-28 10:35:11.380828199 +0000
@@ -1,12 +1,13 @@
-From 09c00246e170fe6b15eeaf7c3d86f47fc02ef2bd Mon Sep 17 00:00:00 2001
+From 73af0c03945b0524c5efac446a7f60c8c0c78e11 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Fri, 14 Aug 2020 10:39:33 -0700
 Subject: [PATCH] net/failsafe: fix double space in warning log
 
+[ upstream commit 09c00246e170fe6b15eeaf7c3d86f47fc02ef2bd ]
+
 Already get a newline from WARN() macro call.
 
 Fixes: 9dda3e3393c2 ("net/failsafe: add timestamp to stats snapshot")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 Acked-by: Gaetan Rivet <grive@u256.net>
@@ -15,7 +16,7 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c
-index 2b748bd8b4..70972d6717 100644
+index 93deacd134..6c27645b96 100644
 --- a/drivers/net/failsafe/failsafe_ether.c
 +++ b/drivers/net/failsafe/failsafe_ether.c
 @@ -322,10 +322,10 @@ fs_dev_stats_save(struct sub_device *sdev)

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

* [dpdk-stable] patch 'net/netvsc: fix multiple channel Rx' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
  2020-10-28 10:42 ` [dpdk-stable] patch 'bus/pci: remove duplicate declaration' " luca.boccassi
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/failsafe: fix double space in warning log' " luca.boccassi
@ 2020-10-28 10:42 ` luca.boccassi
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/netvsc: fix stale value after free' " luca.boccassi
                   ` (203 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:42 UTC (permalink / raw)
  To: Long Li; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From d55a06baec093c15e47c64f0990f42100ecda104 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Mon, 10 Aug 2020 19:33:11 -0700
Subject: [PATCH] net/netvsc: fix multiple channel Rx

[ upstream commit ac837bdd22400b220d60336f22c18091a92a40c9 ]

netvsc uses rxbuf_info buffer to track received packets attached via
rte_pktmbuf_attach_extbuf() and ack the host based on usage count. It
uses the transaction_id in the VMBus packet to locate where to use
memory in the rxbuf_info.

This is not correct in multiple channel setup, as different channels may
return identical transaction_ids at a time, and may corrupt the
rxbuf_info buffer.

Fix this by defining rxbuf_info for each queue.

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

Signed-off-by: Long Li <longli@microsoft.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/netvsc/hn_nvs.c  | 13 +++++++++----
 drivers/net/netvsc/hn_rxtx.c | 33 ++++++++++++++++++++++++++-------
 drivers/net/netvsc/hn_var.h  |  6 +++---
 3 files changed, 38 insertions(+), 14 deletions(-)

diff --git a/drivers/net/netvsc/hn_nvs.c b/drivers/net/netvsc/hn_nvs.c
index f88854dafc..eeb82ab9ee 100644
--- a/drivers/net/netvsc/hn_nvs.c
+++ b/drivers/net/netvsc/hn_nvs.c
@@ -223,9 +223,15 @@ hn_nvs_conn_rxbuf(struct hn_data *hv)
 		    resp.nvs_sect[0].slotcnt);
 	hv->rxbuf_section_cnt = resp.nvs_sect[0].slotcnt;
 
-	hv->rxbuf_info = rte_calloc("HN_RXBUF_INFO", hv->rxbuf_section_cnt,
-				    sizeof(*hv->rxbuf_info), RTE_CACHE_LINE_SIZE);
-	if (!hv->rxbuf_info) {
+	/*
+	 * Pimary queue's rxbuf_info is not allocated at creation time.
+	 * Now we can allocate it after we figure out the slotcnt.
+	 */
+	hv->primary->rxbuf_info = rte_calloc("HN_RXBUF_INFO",
+			hv->rxbuf_section_cnt,
+			sizeof(*hv->primary->rxbuf_info),
+			RTE_CACHE_LINE_SIZE);
+	if (!hv->primary->rxbuf_info) {
 		PMD_DRV_LOG(ERR,
 			    "could not allocate rxbuf info");
 		return -ENOMEM;
@@ -255,7 +261,6 @@ hn_nvs_disconn_rxbuf(struct hn_data *hv)
 			    error);
 	}
 
-	rte_free(hv->rxbuf_info);
 	/*
 	 * Linger long enough for NVS to disconnect RXBUF.
 	 */
diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index d6e518c88e..7fb8852797 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -493,21 +493,21 @@ next:
 static void hn_rx_buf_free_cb(void *buf __rte_unused, void *opaque)
 {
 	struct hn_rx_bufinfo *rxb = opaque;
-	struct hn_data *hv = rxb->hv;
+	struct hn_rx_queue *rxq = rxb->rxq;
 
-	rte_atomic32_dec(&hv->rxbuf_outstanding);
+	rte_atomic32_dec(&rxq->rxbuf_outstanding);
 	hn_nvs_ack_rxbuf(rxb->chan, rxb->xactid);
 }
 
-static struct hn_rx_bufinfo *hn_rx_buf_init(const struct hn_rx_queue *rxq,
+static struct hn_rx_bufinfo *hn_rx_buf_init(struct hn_rx_queue *rxq,
 					    const struct vmbus_chanpkt_rxbuf *pkt)
 {
 	struct hn_rx_bufinfo *rxb;
 
-	rxb = rxq->hv->rxbuf_info + pkt->hdr.xactid;
+	rxb = rxq->rxbuf_info + pkt->hdr.xactid;
 	rxb->chan = rxq->chan;
 	rxb->xactid = pkt->hdr.xactid;
-	rxb->hv = rxq->hv;
+	rxb->rxq = rxq;
 
 	rxb->shinfo.free_cb = hn_rx_buf_free_cb;
 	rxb->shinfo.fcb_opaque = rxb;
@@ -536,7 +536,7 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
 	 * some space available in receive area for later packets.
 	 */
 	if (dlen >= HN_RXCOPY_THRESHOLD &&
-	    (uint32_t)rte_atomic32_read(&hv->rxbuf_outstanding) <
+	    (uint32_t)rte_atomic32_read(&rxq->rxbuf_outstanding) <
 			hv->rxbuf_section_cnt / 2) {
 		struct rte_mbuf_ext_shared_info *shinfo;
 		const void *rxbuf;
@@ -553,7 +553,7 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
 
 		/* shinfo is already set to 1 by the caller */
 		if (rte_mbuf_ext_refcnt_update(shinfo, 1) == 2)
-			rte_atomic32_inc(&hv->rxbuf_outstanding);
+			rte_atomic32_inc(&rxq->rxbuf_outstanding);
 
 		rte_pktmbuf_attach_extbuf(m, data, iova,
 					  dlen + headroom, shinfo);
@@ -850,6 +850,23 @@ struct hn_rx_queue *hn_rx_queue_alloc(struct hn_data *hv,
 		return NULL;
 	}
 
+	/* setup rxbuf_info for non-primary queue */
+	if (queue_id) {
+		rxq->rxbuf_info = rte_calloc("HN_RXBUF_INFO",
+					hv->rxbuf_section_cnt,
+					sizeof(*rxq->rxbuf_info),
+					RTE_CACHE_LINE_SIZE);
+
+		if (!rxq->rxbuf_info) {
+			PMD_DRV_LOG(ERR,
+				"Could not allocate rxbuf info for queue %d\n",
+				queue_id);
+			rte_free(rxq->event_buf);
+			rte_free(rxq);
+			return NULL;
+		}
+	}
+
 	return rxq;
 }
 
@@ -904,6 +921,7 @@ hn_dev_rx_queue_setup(struct rte_eth_dev *dev,
 
 fail:
 	rte_ring_free(rxq->rx_ring);
+	rte_free(rxq->rxbuf_info);
 	rte_free(rxq->event_buf);
 	rte_free(rxq);
 	return error;
@@ -926,6 +944,7 @@ hn_rx_queue_free(struct hn_rx_queue *rxq, bool keep_primary)
 	if (keep_primary && rxq == rxq->hv->primary)
 		return;
 
+	rte_free(rxq->rxbuf_info);
 	rte_free(rxq->event_buf);
 	rte_free(rxq);
 }
diff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h
index b8e351deeb..a4d47abca3 100644
--- a/drivers/net/netvsc/hn_var.h
+++ b/drivers/net/netvsc/hn_var.h
@@ -82,13 +82,15 @@ struct hn_rx_queue {
 	struct hn_stats stats;
 
 	void *event_buf;
+	struct hn_rx_bufinfo *rxbuf_info;
+	rte_atomic32_t  rxbuf_outstanding;
 };
 
 
 /* multi-packet data from host */
 struct hn_rx_bufinfo {
 	struct vmbus_channel *chan;
-	struct hn_data *hv;
+	struct hn_rx_queue *rxq;
 	uint64_t	xactid;
 	struct rte_mbuf_ext_shared_info shinfo;
 } __rte_cache_aligned;
@@ -110,9 +112,7 @@ struct hn_data {
 	uint32_t	link_speed;
 
 	struct rte_mem_resource *rxbuf_res;	/* UIO resource for Rx */
-	struct hn_rx_bufinfo *rxbuf_info;
 	uint32_t	rxbuf_section_cnt;	/* # of Rx sections */
-	rte_atomic32_t	rxbuf_outstanding;
 	uint16_t	max_queues;		/* Max available queues */
 	uint16_t	num_queues;
 	uint64_t	rss_offloads;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:11.918542458 +0000
+++ 0004-net-netvsc-fix-multiple-channel-Rx.patch	2020-10-28 10:35:11.384828257 +0000
@@ -1,8 +1,10 @@
-From ac837bdd22400b220d60336f22c18091a92a40c9 Mon Sep 17 00:00:00 2001
+From d55a06baec093c15e47c64f0990f42100ecda104 Mon Sep 17 00:00:00 2001
 From: Long Li <longli@microsoft.com>
 Date: Mon, 10 Aug 2020 19:33:11 -0700
 Subject: [PATCH] net/netvsc: fix multiple channel Rx
 
+[ upstream commit ac837bdd22400b220d60336f22c18091a92a40c9 ]
+
 netvsc uses rxbuf_info buffer to track received packets attached via
 rte_pktmbuf_attach_extbuf() and ack the host based on usage count. It
 uses the transaction_id in the VMBus packet to locate where to use
@@ -15,7 +17,6 @@
 Fix this by defining rxbuf_info for each queue.
 
 Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
-Cc: stable@dpdk.org
 
 Signed-off-by: Long Li <longli@microsoft.com>
 Acked-by: Stephen Hemminger <stephen@networkplumber.org>
@@ -57,10 +58,10 @@
  	 * Linger long enough for NVS to disconnect RXBUF.
  	 */
 diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
-index 87b1184bc1..c8c4ee10c8 100644
+index d6e518c88e..7fb8852797 100644
 --- a/drivers/net/netvsc/hn_rxtx.c
 +++ b/drivers/net/netvsc/hn_rxtx.c
-@@ -524,21 +524,21 @@ next:
+@@ -493,21 +493,21 @@ next:
  static void hn_rx_buf_free_cb(void *buf __rte_unused, void *opaque)
  {
  	struct hn_rx_bufinfo *rxb = opaque;
@@ -87,7 +88,7 @@
  
  	rxb->shinfo.free_cb = hn_rx_buf_free_cb;
  	rxb->shinfo.fcb_opaque = rxb;
-@@ -568,7 +568,7 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
+@@ -536,7 +536,7 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
  	 * some space available in receive area for later packets.
  	 */
  	if (dlen >= HN_RXCOPY_THRESHOLD &&
@@ -96,7 +97,7 @@
  			hv->rxbuf_section_cnt / 2) {
  		struct rte_mbuf_ext_shared_info *shinfo;
  		const void *rxbuf;
-@@ -585,7 +585,7 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
+@@ -553,7 +553,7 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb,
  
  		/* shinfo is already set to 1 by the caller */
  		if (rte_mbuf_ext_refcnt_update(shinfo, 1) == 2)
@@ -105,7 +106,7 @@
  
  		rte_pktmbuf_attach_extbuf(m, data, iova,
  					  dlen + headroom, shinfo);
-@@ -888,6 +888,23 @@ struct hn_rx_queue *hn_rx_queue_alloc(struct hn_data *hv,
+@@ -850,6 +850,23 @@ struct hn_rx_queue *hn_rx_queue_alloc(struct hn_data *hv,
  		return NULL;
  	}
  
@@ -129,7 +130,7 @@
  	return rxq;
  }
  
-@@ -953,6 +970,7 @@ hn_dev_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -904,6 +921,7 @@ hn_dev_rx_queue_setup(struct rte_eth_dev *dev,
  
  fail:
  	rte_ring_free(rxq->rx_ring);
@@ -137,7 +138,7 @@
  	rte_free(rxq->event_buf);
  	rte_free(rxq);
  	return error;
-@@ -975,6 +993,7 @@ hn_rx_queue_free(struct hn_rx_queue *rxq, bool keep_primary)
+@@ -926,6 +944,7 @@ hn_rx_queue_free(struct hn_rx_queue *rxq, bool keep_primary)
  	if (keep_primary && rxq == rxq->hv->primary)
  		return;
  
@@ -146,10 +147,10 @@
  	rte_free(rxq);
  }
 diff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h
-index 7cb7713e93..4b63f87607 100644
+index b8e351deeb..a4d47abca3 100644
 --- a/drivers/net/netvsc/hn_var.h
 +++ b/drivers/net/netvsc/hn_var.h
-@@ -83,13 +83,15 @@ struct hn_rx_queue {
+@@ -82,13 +82,15 @@ struct hn_rx_queue {
  	struct hn_stats stats;
  
  	void *event_buf;
@@ -166,7 +167,7 @@
  	uint64_t	xactid;
  	struct rte_mbuf_ext_shared_info shinfo;
  } __rte_cache_aligned;
-@@ -111,9 +113,7 @@ struct hn_data {
+@@ -110,9 +112,7 @@ struct hn_data {
  	uint32_t	link_speed;
  
  	struct rte_mem_resource *rxbuf_res;	/* UIO resource for Rx */

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

* [dpdk-stable] patch 'net/netvsc: fix stale value after free' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (2 preceding siblings ...)
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/netvsc: fix multiple channel Rx' " luca.boccassi
@ 2020-10-28 10:42 ` luca.boccassi
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/hinic: fix negative array index read' " luca.boccassi
                   ` (202 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:42 UTC (permalink / raw)
  To: Long Li; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 4fbf3d1dc57bad4f708ae6c9f5c1b04e06c8db25 Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Mon, 10 Aug 2020 19:33:13 -0700
Subject: [PATCH] net/netvsc: fix stale value after free

[ upstream commit 0caf5621a4cdaadb40c7686d86bf58dd841057d3 ]

chim_index could potentially be used in other hn_txdesc when re-allocated.
Mark it as invalid to prevent stale value being used.

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

Signed-off-by: Long Li <longli@microsoft.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/netvsc/hn_rxtx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 7fb8852797..df15e56120 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -387,8 +387,10 @@ hn_nvs_send_completed(struct rte_eth_dev *dev, uint16_t queue_id,
 		++txq->stats.errors;
 	}
 
-	if (txd->chim_index != NVS_CHIM_IDX_INVALID)
+	if (txd->chim_index != NVS_CHIM_IDX_INVALID) {
 		hn_chim_free(hv, txd->chim_index);
+		txd->chim_index = NVS_CHIM_IDX_INVALID;
+	}
 
 	rte_pktmbuf_free(txd->m);
 	hn_txd_put(txq, txd);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:11.948757510 +0000
+++ 0005-net-netvsc-fix-stale-value-after-free.patch	2020-10-28 10:35:11.388828316 +0000
@@ -1,13 +1,14 @@
-From 0caf5621a4cdaadb40c7686d86bf58dd841057d3 Mon Sep 17 00:00:00 2001
+From 4fbf3d1dc57bad4f708ae6c9f5c1b04e06c8db25 Mon Sep 17 00:00:00 2001
 From: Long Li <longli@microsoft.com>
 Date: Mon, 10 Aug 2020 19:33:13 -0700
 Subject: [PATCH] net/netvsc: fix stale value after free
 
+[ upstream commit 0caf5621a4cdaadb40c7686d86bf58dd841057d3 ]
+
 chim_index could potentially be used in other hn_txdesc when re-allocated.
 Mark it as invalid to prevent stale value being used.
 
 Fixes: cc0251813277 ("net/netvsc: split send buffers from Tx descriptors")
-Cc: stable@dpdk.org
 
 Signed-off-by: Long Li <longli@microsoft.com>
 Acked-by: Stephen Hemminger <stephen@networkplumber.org>
@@ -16,10 +17,10 @@
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
-index c8c4ee10c8..a388ff2588 100644
+index 7fb8852797..df15e56120 100644
 --- a/drivers/net/netvsc/hn_rxtx.c
 +++ b/drivers/net/netvsc/hn_rxtx.c
-@@ -419,8 +419,10 @@ hn_nvs_send_completed(struct rte_eth_dev *dev, uint16_t queue_id,
+@@ -387,8 +387,10 @@ hn_nvs_send_completed(struct rte_eth_dev *dev, uint16_t queue_id,
  		++txq->stats.errors;
  	}
  

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

* [dpdk-stable] patch 'net/hinic: fix negative array index read' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (3 preceding siblings ...)
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/netvsc: fix stale value after free' " luca.boccassi
@ 2020-10-28 10:42 ` luca.boccassi
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/mlx5: remove unused includes' " luca.boccassi
                   ` (201 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:42 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 85d0811e73587d3486f282f11e984d36c7b3f44d Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Mon, 24 Aug 2020 20:43:46 +0800
Subject: [PATCH] net/hinic: fix negative array index read

[ upstream commit 2e8fb3d2442cc0123562d4c43a6e86a1bb3df62f ]

Negative array index read using variable 'i' as an index to array
'filter_info->pkt_filters'. Fixed by add return value check.

Coverity issue: 350364
Fixes: f4ca3fd54c4d ("net/hinic: create and destroy flow director filter")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/hinic/hinic_pmd_flow.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/hinic/hinic_pmd_flow.c b/drivers/net/hinic/hinic_pmd_flow.c
index 6752a8f15a..7bbdcc9e78 100644
--- a/drivers/net/hinic/hinic_pmd_flow.c
+++ b/drivers/net/hinic/hinic_pmd_flow.c
@@ -1934,6 +1934,8 @@ hinic_add_del_ethertype_filter(struct rte_eth_dev *dev,
 		ethertype_filter.pkt_proto = filter->ether_type;
 		i = hinic_ethertype_filter_lookup(filter_info,
 						&ethertype_filter);
+		if (i < 0)
+			return -EINVAL;
 
 		if ((filter_info->type_mask & (1 << i))) {
 			filter_info->pkt_filters[i].enable = FALSE;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:11.978698178 +0000
+++ 0006-net-hinic-fix-negative-array-index-read.patch	2020-10-28 10:35:11.392828375 +0000
@@ -1,14 +1,15 @@
-From 2e8fb3d2442cc0123562d4c43a6e86a1bb3df62f Mon Sep 17 00:00:00 2001
+From 85d0811e73587d3486f282f11e984d36c7b3f44d Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Mon, 24 Aug 2020 20:43:46 +0800
 Subject: [PATCH] net/hinic: fix negative array index read
 
+[ upstream commit 2e8fb3d2442cc0123562d4c43a6e86a1bb3df62f ]
+
 Negative array index read using variable 'i' as an index to array
 'filter_info->pkt_filters'. Fixed by add return value check.
 
 Coverity issue: 350364
 Fixes: f4ca3fd54c4d ("net/hinic: create and destroy flow director filter")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/drivers/net/hinic/hinic_pmd_flow.c b/drivers/net/hinic/hinic_pmd_flow.c
-index 503a32fff0..70fd4450c2 100644
+index 6752a8f15a..7bbdcc9e78 100644
 --- a/drivers/net/hinic/hinic_pmd_flow.c
 +++ b/drivers/net/hinic/hinic_pmd_flow.c
-@@ -2351,6 +2351,8 @@ hinic_add_del_ethertype_filter(struct rte_eth_dev *dev,
+@@ -1934,6 +1934,8 @@ hinic_add_del_ethertype_filter(struct rte_eth_dev *dev,
  		ethertype_filter.pkt_proto = filter->ether_type;
  		i = hinic_ethertype_filter_lookup(filter_info,
  						&ethertype_filter);

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

* [dpdk-stable] patch 'net/mlx5: remove unused includes' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (4 preceding siblings ...)
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/hinic: fix negative array index read' " luca.boccassi
@ 2020-10-28 10:42 ` luca.boccassi
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/mlx5: remove unused log macros' " luca.boccassi
                   ` (200 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:42 UTC (permalink / raw)
  To: Ophir Munk; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 17af797b96e2a8fc8bb7c1d6d23d811325d2719e Mon Sep 17 00:00:00 2001
From: Ophir Munk <ophirmu@mellanox.com>
Date: Tue, 25 Aug 2020 09:31:08 +0000
Subject: [PATCH] net/mlx5: remove unused includes

[ upstream commit f2e8b4556f89f8bb940612bfad5602801b5715e4 ]

Remove unused Linux included files:

<sys/ioctl.h>, <arpa/inet.h> from file net/mlx5/mlx5_mac.c
<sys/mman.h> from file net/mlx5/mlx5.c

Fixes: 771fa900b73a ("mlx5: introduce new driver for Mellanox ConnectX-4 adapters")

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5.c     | 1 -
 drivers/net/mlx5/mlx5_mac.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index ad1ff8dba1..88ed5ffa5c 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -13,7 +13,6 @@
 #include <errno.h>
 #include <net/if.h>
 #include <fcntl.h>
-#include <sys/mman.h>
 #include <linux/rtnetlink.h>
 
 /* Verbs header. */
diff --git a/drivers/net/mlx5/mlx5_mac.c b/drivers/net/mlx5/mlx5_mac.c
index 94f102d8a1..177871b211 100644
--- a/drivers/net/mlx5/mlx5_mac.c
+++ b/drivers/net/mlx5/mlx5_mac.c
@@ -11,7 +11,6 @@
 #include <errno.h>
 #include <netinet/in.h>
 #include <sys/ioctl.h>
-#include <arpa/inet.h>
 
 /* Verbs header. */
 /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.009802105 +0000
+++ 0007-net-mlx5-remove-unused-includes.patch	2020-10-28 10:35:11.400828492 +0000
@@ -1,48 +1,48 @@
-From f2e8b4556f89f8bb940612bfad5602801b5715e4 Mon Sep 17 00:00:00 2001
+From 17af797b96e2a8fc8bb7c1d6d23d811325d2719e Mon Sep 17 00:00:00 2001
 From: Ophir Munk <ophirmu@mellanox.com>
 Date: Tue, 25 Aug 2020 09:31:08 +0000
 Subject: [PATCH] net/mlx5: remove unused includes
 
+[ upstream commit f2e8b4556f89f8bb940612bfad5602801b5715e4 ]
+
 Remove unused Linux included files:
 
 <sys/ioctl.h>, <arpa/inet.h> from file net/mlx5/mlx5_mac.c
 <sys/mman.h> from file net/mlx5/mlx5.c
 
 Fixes: 771fa900b73a ("mlx5: introduce new driver for Mellanox ConnectX-4 adapters")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
 ---
  drivers/net/mlx5/mlx5.c     | 1 -
- drivers/net/mlx5/mlx5_mac.c | 2 --
- 2 files changed, 3 deletions(-)
+ drivers/net/mlx5/mlx5_mac.c | 1 -
+ 2 files changed, 2 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
-index b099b23c3d..ca60926399 100644
+index ad1ff8dba1..88ed5ffa5c 100644
 --- a/drivers/net/mlx5/mlx5.c
 +++ b/drivers/net/mlx5/mlx5.c
-@@ -9,7 +9,6 @@
- #include <stdint.h>
- #include <stdlib.h>
+@@ -13,7 +13,6 @@
  #include <errno.h>
+ #include <net/if.h>
+ #include <fcntl.h>
 -#include <sys/mman.h>
  #include <linux/rtnetlink.h>
  
- #include <rte_malloc.h>
+ /* Verbs header. */
 diff --git a/drivers/net/mlx5/mlx5_mac.c b/drivers/net/mlx5/mlx5_mac.c
-index 88c52b29f4..bd786fd638 100644
+index 94f102d8a1..177871b211 100644
 --- a/drivers/net/mlx5/mlx5_mac.c
 +++ b/drivers/net/mlx5/mlx5_mac.c
-@@ -9,8 +9,6 @@
- #include <inttypes.h>
+@@ -11,7 +11,6 @@
  #include <errno.h>
  #include <netinet/in.h>
--#include <sys/ioctl.h>
+ #include <sys/ioctl.h>
 -#include <arpa/inet.h>
  
- #include <rte_ether.h>
- #include <rte_ethdev_driver.h>
+ /* Verbs header. */
+ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/mlx5: remove unused log macros' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (5 preceding siblings ...)
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/mlx5: remove unused includes' " luca.boccassi
@ 2020-10-28 10:42 ` luca.boccassi
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/af_xdp: change return value from Rx to unsigned' " luca.boccassi
                   ` (199 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:42 UTC (permalink / raw)
  To: Ophir Munk; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 29db8c55a6f789b76940f8745fee1ff2a546b19f Mon Sep 17 00:00:00 2001
From: Ophir Munk <ophirmu@mellanox.com>
Date: Tue, 25 Aug 2020 09:31:10 +0000
Subject: [PATCH] net/mlx5: remove unused log macros

[ upstream commit 079f1ae5acf591c52a19f4c5c7e30de5252176e6 ]

Remove utility macros INFO, WARN, ERROR. They are not in use and
conflict with identical definitions when compiled under Windows.

Fixes: 80f2d0ed7ff9 ("net/mlx5: add hardware flow debug dump")

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_utils.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_utils.h b/drivers/net/mlx5/mlx5_utils.h
index fdf1379866..b23eec622d 100644
--- a/drivers/net/mlx5/mlx5_utils.h
+++ b/drivers/net/mlx5/mlx5_utils.h
@@ -115,10 +115,6 @@ extern int mlx5_logtype;
 
 #endif /* NDEBUG */
 
-#define INFO(...) DRV_LOG(INFO, __VA_ARGS__)
-#define WARN(...) DRV_LOG(WARNING, __VA_ARGS__)
-#define ERROR(...) DRV_LOG(ERR, __VA_ARGS__)
-
 /* Convenience macros for accessing mbuf fields. */
 #define NEXT(m) ((m)->next)
 #define DATA_LEN(m) ((m)->data_len)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.040635723 +0000
+++ 0008-net-mlx5-remove-unused-log-macros.patch	2020-10-28 10:35:11.400828492 +0000
@@ -1,13 +1,14 @@
-From 079f1ae5acf591c52a19f4c5c7e30de5252176e6 Mon Sep 17 00:00:00 2001
+From 29db8c55a6f789b76940f8745fee1ff2a546b19f Mon Sep 17 00:00:00 2001
 From: Ophir Munk <ophirmu@mellanox.com>
 Date: Tue, 25 Aug 2020 09:31:10 +0000
 Subject: [PATCH] net/mlx5: remove unused log macros
 
+[ upstream commit 079f1ae5acf591c52a19f4c5c7e30de5252176e6 ]
+
 Remove utility macros INFO, WARN, ERROR. They are not in use and
 conflict with identical definitions when compiled under Windows.
 
 Fixes: 80f2d0ed7ff9 ("net/mlx5: add hardware flow debug dump")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
 Acked-by: Matan Azrad <matan@mellanox.com>
@@ -16,12 +17,12 @@
  1 file changed, 4 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_utils.h b/drivers/net/mlx5/mlx5_utils.h
-index 97d931fcab..f078bdc65a 100644
+index fdf1379866..b23eec622d 100644
 --- a/drivers/net/mlx5/mlx5_utils.h
 +++ b/drivers/net/mlx5/mlx5_utils.h
-@@ -35,10 +35,6 @@ extern int mlx5_logtype;
- 		__VA_ARGS__ PMD_DRV_LOG_STRIP PMD_DRV_LOG_OPAREN, \
- 		PMD_DRV_LOG_CPAREN)
+@@ -115,10 +115,6 @@ extern int mlx5_logtype;
+ 
+ #endif /* NDEBUG */
  
 -#define INFO(...) DRV_LOG(INFO, __VA_ARGS__)
 -#define WARN(...) DRV_LOG(WARNING, __VA_ARGS__)

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

* [dpdk-stable] patch 'net/af_xdp: change return value from Rx to unsigned' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (6 preceding siblings ...)
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/mlx5: remove unused log macros' " luca.boccassi
@ 2020-10-28 10:42 ` luca.boccassi
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/bnxt: add memory allocation check in VF info init' " luca.boccassi
                   ` (198 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:42 UTC (permalink / raw)
  To: Ciara Loftus; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 1175785316109d499d62868f470a3e119335c09d Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Fri, 7 Aug 2020 09:32:48 +0000
Subject: [PATCH] net/af_xdp: change return value from Rx to unsigned

[ upstream commit 818129790fc45bc2082d0702918c2230725db2e5 ]

The af_xdp rx function was returning a negative value on error, when an
unsigned value is expected. Fix this.

Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index f5fca63eb5..844cd9986c 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -237,7 +237,7 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	if (rte_pktmbuf_alloc_bulk(umem->mb_pool, fq_bufs, nb_pkts)) {
 		AF_XDP_LOG(DEBUG,
 			"Failed to get enough buffers for fq.\n");
-		return -1;
+		return 0;
 	}
 
 	rcvd = xsk_ring_cons__peek(rx, nb_pkts, &idx_rx);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.069618727 +0000
+++ 0009-net-af_xdp-change-return-value-from-Rx-to-unsigned.patch	2020-10-28 10:35:11.400828492 +0000
@@ -1,13 +1,14 @@
-From 818129790fc45bc2082d0702918c2230725db2e5 Mon Sep 17 00:00:00 2001
+From 1175785316109d499d62868f470a3e119335c09d Mon Sep 17 00:00:00 2001
 From: Ciara Loftus <ciara.loftus@intel.com>
 Date: Fri, 7 Aug 2020 09:32:48 +0000
 Subject: [PATCH] net/af_xdp: change return value from Rx to unsigned
 
+[ upstream commit 818129790fc45bc2082d0702918c2230725db2e5 ]
+
 The af_xdp rx function was returning a negative value on error, when an
 unsigned value is expected. Fix this.
 
 Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
 Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -16,10 +17,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
-index 936d4a7d5f..7ce4ad04af 100644
+index f5fca63eb5..844cd9986c 100644
 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c
 +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
-@@ -236,7 +236,7 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -237,7 +237,7 @@ af_xdp_rx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
  	if (rte_pktmbuf_alloc_bulk(umem->mb_pool, fq_bufs, nb_pkts)) {
  		AF_XDP_LOG(DEBUG,
  			"Failed to get enough buffers for fq.\n");

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

* [dpdk-stable] patch 'net/bnxt: add memory allocation check in VF info init' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (7 preceding siblings ...)
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/af_xdp: change return value from Rx to unsigned' " luca.boccassi
@ 2020-10-28 10:42 ` luca.boccassi
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/bnxt: fix endianness while setting L4 destination port' " luca.boccassi
                   ` (197 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:42 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From fd2313c1bcc695f11b4c41ba76c96b6efc9a118a Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Fri, 31 Jul 2020 20:09:06 +0800
Subject: [PATCH] net/bnxt: add memory allocation check in VF info init

[ upstream commit 2477be96e7a34ee74314d2604b4943b5e317e627 ]

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

Fixes: b7778e8a1c00 ("net/bnxt: refactor to properly allocate resources for PF/VF")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index fed1aa3297..15ec7248c2 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -613,8 +613,12 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
 		if (new_max_vfs != bp->pf.max_vfs) {
 			if (bp->pf.vf_info)
 				rte_free(bp->pf.vf_info);
-			bp->pf.vf_info = rte_malloc("bnxt_vf_info",
+			bp->pf.vf_info = rte_zmalloc("bnxt_vf_info",
 			    sizeof(bp->pf.vf_info[0]) * new_max_vfs, 0);
+			if (bp->pf.vf_info == NULL) {
+				PMD_DRV_LOG(ERR, "Alloc vf info fail\n");
+				return -ENOMEM;
+			}
 			bp->pf.max_vfs = new_max_vfs;
 			for (i = 0; i < new_max_vfs; i++) {
 				bp->pf.vf_info[i].fid = bp->pf.first_vf_id + i;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.098747169 +0000
+++ 0010-net-bnxt-add-memory-allocation-check-in-VF-info-init.patch	2020-10-28 10:35:11.404828552 +0000
@@ -1,13 +1,14 @@
-From 2477be96e7a34ee74314d2604b4943b5e317e627 Mon Sep 17 00:00:00 2001
+From fd2313c1bcc695f11b4c41ba76c96b6efc9a118a Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Fri, 31 Jul 2020 20:09:06 +0800
 Subject: [PATCH] net/bnxt: add memory allocation check in VF info init
 
+[ upstream commit 2477be96e7a34ee74314d2604b4943b5e317e627 ]
+
 The function rte_malloc() could return NULL, the return
 value need to be checked.
 
 Fixes: b7778e8a1c00 ("net/bnxt: refactor to properly allocate resources for PF/VF")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
@@ -16,23 +17,23 @@
  1 file changed, 5 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
-index 643dd98977..43e3e27537 100644
+index fed1aa3297..15ec7248c2 100644
 --- a/drivers/net/bnxt/bnxt_hwrm.c
 +++ b/drivers/net/bnxt/bnxt_hwrm.c
-@@ -711,8 +711,12 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
- 		if (new_max_vfs != bp->pf->max_vfs) {
- 			if (bp->pf->vf_info)
- 				bnxt_hwrm_free_vf_info(bp);
--			bp->pf->vf_info = rte_malloc("bnxt_vf_info",
-+			bp->pf->vf_info = rte_zmalloc("bnxt_vf_info",
- 			    sizeof(bp->pf->vf_info[0]) * new_max_vfs, 0);
-+			if (bp->pf->vf_info == NULL) {
+@@ -613,8 +613,12 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
+ 		if (new_max_vfs != bp->pf.max_vfs) {
+ 			if (bp->pf.vf_info)
+ 				rte_free(bp->pf.vf_info);
+-			bp->pf.vf_info = rte_malloc("bnxt_vf_info",
++			bp->pf.vf_info = rte_zmalloc("bnxt_vf_info",
+ 			    sizeof(bp->pf.vf_info[0]) * new_max_vfs, 0);
++			if (bp->pf.vf_info == NULL) {
 +				PMD_DRV_LOG(ERR, "Alloc vf info fail\n");
 +				return -ENOMEM;
 +			}
- 			bp->pf->max_vfs = new_max_vfs;
+ 			bp->pf.max_vfs = new_max_vfs;
  			for (i = 0; i < new_max_vfs; i++) {
- 				bp->pf->vf_info[i].fid =
+ 				bp->pf.vf_info[i].fid = bp->pf.first_vf_id + i;
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/bnxt: fix endianness while setting L4 destination port' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (8 preceding siblings ...)
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/bnxt: add memory allocation check in VF info init' " luca.boccassi
@ 2020-10-28 10:42 ` luca.boccassi
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/bnxt: fix LRO configuration' " luca.boccassi
                   ` (196 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:42 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From d874855ddca76ecec37ff7cd5a6ed26f41a26225 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Fri, 28 Aug 2020 10:31:07 +0530
Subject: [PATCH] net/bnxt: fix endianness while setting L4 destination port

[ upstream commit d51a43f4343d35d850e6173ca3770ab3ef117adb ]

Use "req.tunnel_dst_port_val" in bnxt_hwrm_tunnel_dst_port_alloc()
as big endian since hwrm spec mandates this field in network byte order.

Also, fixed the endianness while parsing the command output.

Fixes: 10d074b2022d ("net/bnxt: support tunneling")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 15ec7248c2..f78563e944 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -3350,17 +3350,19 @@ int bnxt_hwrm_tunnel_dst_port_alloc(struct bnxt *bp, uint16_t port,
 
 	HWRM_PREP(req, TUNNEL_DST_PORT_ALLOC, BNXT_USE_CHIMP_MB);
 	req.tunnel_type = tunnel_type;
-	req.tunnel_dst_port_val = port;
+	req.tunnel_dst_port_val = rte_cpu_to_be_16(port);
 	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
 	HWRM_CHECK_RESULT();
 
 	switch (tunnel_type) {
 	case HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN:
-		bp->vxlan_fw_dst_port_id = resp->tunnel_dst_port_id;
+		bp->vxlan_fw_dst_port_id =
+			rte_le_to_cpu_16(resp->tunnel_dst_port_id);
 		bp->vxlan_port = port;
 		break;
 	case HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_GENEVE:
-		bp->geneve_fw_dst_port_id = resp->tunnel_dst_port_id;
+		bp->geneve_fw_dst_port_id =
+			rte_le_to_cpu_16(resp->tunnel_dst_port_id);
 		bp->geneve_port = port;
 		break;
 	default:
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.132975745 +0000
+++ 0011-net-bnxt-fix-endianness-while-setting-L4-destination.patch	2020-10-28 10:35:11.412828670 +0000
@@ -1,15 +1,16 @@
-From d51a43f4343d35d850e6173ca3770ab3ef117adb Mon Sep 17 00:00:00 2001
+From d874855ddca76ecec37ff7cd5a6ed26f41a26225 Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Date: Fri, 28 Aug 2020 10:31:07 +0530
 Subject: [PATCH] net/bnxt: fix endianness while setting L4 destination port
 
+[ upstream commit d51a43f4343d35d850e6173ca3770ab3ef117adb ]
+
 Use "req.tunnel_dst_port_val" in bnxt_hwrm_tunnel_dst_port_alloc()
 as big endian since hwrm spec mandates this field in network byte order.
 
 Also, fixed the endianness while parsing the command output.
 
 Fixes: 10d074b2022d ("net/bnxt: support tunneling")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
@@ -19,12 +20,12 @@
  1 file changed, 5 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
-index f534f20159..c1af814040 100644
+index 15ec7248c2..f78563e944 100644
 --- a/drivers/net/bnxt/bnxt_hwrm.c
 +++ b/drivers/net/bnxt/bnxt_hwrm.c
-@@ -3620,17 +3620,19 @@ int bnxt_hwrm_tunnel_dst_port_alloc(struct bnxt *bp, uint16_t port,
+@@ -3350,17 +3350,19 @@ int bnxt_hwrm_tunnel_dst_port_alloc(struct bnxt *bp, uint16_t port,
  
- 	HWRM_PREP(&req, HWRM_TUNNEL_DST_PORT_ALLOC, BNXT_USE_CHIMP_MB);
+ 	HWRM_PREP(req, TUNNEL_DST_PORT_ALLOC, BNXT_USE_CHIMP_MB);
  	req.tunnel_type = tunnel_type;
 -	req.tunnel_dst_port_val = port;
 +	req.tunnel_dst_port_val = rte_cpu_to_be_16(port);

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

* [dpdk-stable] patch 'net/bnxt: fix LRO configuration' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (9 preceding siblings ...)
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/bnxt: fix endianness while setting L4 destination port' " luca.boccassi
@ 2020-10-28 10:42 ` luca.boccassi
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/bnxt: fix structure variable initialization' " luca.boccassi
                   ` (195 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:42 UTC (permalink / raw)
  To: Venkat Duvvuru; +Cc: Kalesh AP, Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 0322383d4d264aa6f14e2d43772f5457bcee559d Mon Sep 17 00:00:00 2001
From: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Date: Fri, 28 Aug 2020 10:31:08 +0530
Subject: [PATCH] net/bnxt: fix LRO configuration

[ upstream commit 349355141cfe5823cd60d75e5e2f8b2acf3f8b17 ]

The maximum number of TCP segments that can be aggregated & the
maximum number of aggregations the VNIC supports are configured
incorrectly during LRO configuration.

This patch fixes these values.

Fixes: b150a7e7ee66 ("net/bnxt: support LRO on Thor adapters")

Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index f78563e944..ddcb81f29c 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -2127,8 +2127,8 @@ int bnxt_hwrm_vnic_tpa_cfg(struct bnxt *bp,
 				HWRM_VNIC_TPA_CFG_INPUT_FLAGS_GRO |
 				HWRM_VNIC_TPA_CFG_INPUT_FLAGS_AGG_WITH_ECN |
 			HWRM_VNIC_TPA_CFG_INPUT_FLAGS_AGG_WITH_SAME_GRE_SEQ);
-		req.max_agg_segs = rte_cpu_to_le_16(BNXT_TPA_MAX_AGGS(bp));
-		req.max_aggs = rte_cpu_to_le_16(BNXT_TPA_MAX_SEGS(bp));
+		req.max_aggs = rte_cpu_to_le_16(BNXT_TPA_MAX_AGGS(bp));
+		req.max_agg_segs = rte_cpu_to_le_16(BNXT_TPA_MAX_SEGS(bp));
 		req.min_agg_len = rte_cpu_to_le_32(512);
 	}
 	req.vnic_id = rte_cpu_to_le_16(vnic->fw_vnic_id);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.166086957 +0000
+++ 0012-net-bnxt-fix-LRO-configuration.patch	2020-10-28 10:35:11.416828728 +0000
@@ -1,8 +1,10 @@
-From 349355141cfe5823cd60d75e5e2f8b2acf3f8b17 Mon Sep 17 00:00:00 2001
+From 0322383d4d264aa6f14e2d43772f5457bcee559d Mon Sep 17 00:00:00 2001
 From: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
 Date: Fri, 28 Aug 2020 10:31:08 +0530
 Subject: [PATCH] net/bnxt: fix LRO configuration
 
+[ upstream commit 349355141cfe5823cd60d75e5e2f8b2acf3f8b17 ]
+
 The maximum number of TCP segments that can be aggregated & the
 maximum number of aggregations the VNIC supports are configured
 incorrectly during LRO configuration.
@@ -10,7 +12,6 @@
 This patch fixes these values.
 
 Fixes: b150a7e7ee66 ("net/bnxt: support LRO on Thor adapters")
-Cc: stable@dpdk.org
 
 Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
 Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
@@ -21,10 +22,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
-index c1af814040..f326f842b6 100644
+index f78563e944..ddcb81f29c 100644
 --- a/drivers/net/bnxt/bnxt_hwrm.c
 +++ b/drivers/net/bnxt/bnxt_hwrm.c
-@@ -2264,8 +2264,8 @@ int bnxt_hwrm_vnic_tpa_cfg(struct bnxt *bp,
+@@ -2127,8 +2127,8 @@ int bnxt_hwrm_vnic_tpa_cfg(struct bnxt *bp,
  				HWRM_VNIC_TPA_CFG_INPUT_FLAGS_GRO |
  				HWRM_VNIC_TPA_CFG_INPUT_FLAGS_AGG_WITH_ECN |
  			HWRM_VNIC_TPA_CFG_INPUT_FLAGS_AGG_WITH_SAME_GRE_SEQ);

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

* [dpdk-stable] patch 'net/bnxt: fix structure variable initialization' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (10 preceding siblings ...)
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/bnxt: fix LRO configuration' " luca.boccassi
@ 2020-10-28 10:42 ` luca.boccassi
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/bnxt: fix crash in vector mode Tx' " luca.boccassi
                   ` (194 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:42 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Lance Richardson, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 2a7ce4a15fc72e162383b974b31220f70971742a Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Fri, 28 Aug 2020 10:31:09 +0530
Subject: [PATCH] net/bnxt: fix structure variable initialization

[ upstream commit ce41561d1b998d9e15f74f9c3a6aff78e0f99871 ]

During port start if bnxt_alloc_all_hwrm_stat_ctxs() fails,
in the cleanup path we do see errors like below:

bnxt_hwrm_ring_free(): hwrm_ring_free cp failed. rc:2
bnxt_hwrm_ring_free(): hwrm_ring_free rx failed. rc:2

The reason for this is in bnxt_free_all_hwrm_rings(), the check
is made against "ring->fw_ring_id != INVALID_HW_RING_ID" which
always return true as ring->fw_ring_id is not set to INVALID_HW_RING_ID
while initialising the ring structs.

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

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ring.c | 1 +
 drivers/net/bnxt/bnxt_rxr.c  | 3 +++
 drivers/net/bnxt/bnxt_txr.c  | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c
index 1999cd7861..bb60f8ab0f 100644
--- a/drivers/net/bnxt/bnxt_ring.c
+++ b/drivers/net/bnxt/bnxt_ring.c
@@ -451,6 +451,7 @@ int bnxt_alloc_rxtx_nq_ring(struct bnxt *bp)
 	ring->ring_mask = ring->ring_size - 1;
 	ring->vmem_size = 0;
 	ring->vmem = NULL;
+	ring->fw_ring_id = INVALID_HW_RING_ID;
 
 	nqr->cp_ring_struct = ring;
 	rc = bnxt_alloc_rings(bp, 0, NULL, NULL, nqr, NULL, "l2_nqr");
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index fa3b4a6be4..32eaf75ed5 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -779,6 +779,7 @@ int bnxt_init_rx_ring_struct(struct bnxt_rx_queue *rxq, unsigned int socket_id)
 	ring->bd_dma = rxr->rx_desc_mapping;
 	ring->vmem_size = ring->ring_size * sizeof(struct bnxt_sw_rx_bd);
 	ring->vmem = (void **)&rxr->rx_buf_ring;
+	ring->fw_ring_id = INVALID_HW_RING_ID;
 
 	cpr = rte_zmalloc_socket("bnxt_rx_ring",
 				 sizeof(struct bnxt_cp_ring_info),
@@ -800,6 +801,7 @@ int bnxt_init_rx_ring_struct(struct bnxt_rx_queue *rxq, unsigned int socket_id)
 	ring->bd_dma = cpr->cp_desc_mapping;
 	ring->vmem_size = 0;
 	ring->vmem = NULL;
+	ring->fw_ring_id = INVALID_HW_RING_ID;
 
 	/* Allocate Aggregator rings */
 	ring = rte_zmalloc_socket("bnxt_rx_ring_struct",
@@ -815,6 +817,7 @@ int bnxt_init_rx_ring_struct(struct bnxt_rx_queue *rxq, unsigned int socket_id)
 	ring->bd_dma = rxr->ag_desc_mapping;
 	ring->vmem_size = ring->ring_size * sizeof(struct bnxt_sw_rx_bd);
 	ring->vmem = (void **)&rxr->ag_buf_ring;
+	ring->fw_ring_id = INVALID_HW_RING_ID;
 
 	return 0;
 }
diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index 16021407e8..9a18e8f6f7 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -78,6 +78,7 @@ int bnxt_init_tx_ring_struct(struct bnxt_tx_queue *txq, unsigned int socket_id)
 	ring->bd_dma = txr->tx_desc_mapping;
 	ring->vmem_size = ring->ring_size * sizeof(struct bnxt_sw_tx_bd);
 	ring->vmem = (void **)&txr->tx_buf_ring;
+	ring->fw_ring_id = INVALID_HW_RING_ID;
 
 	cpr = rte_zmalloc_socket("bnxt_tx_ring",
 				 sizeof(struct bnxt_cp_ring_info),
@@ -98,6 +99,7 @@ int bnxt_init_tx_ring_struct(struct bnxt_tx_queue *txq, unsigned int socket_id)
 	ring->bd_dma = cpr->cp_desc_mapping;
 	ring->vmem_size = 0;
 	ring->vmem = NULL;
+	ring->fw_ring_id = INVALID_HW_RING_ID;
 
 	return 0;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.198850185 +0000
+++ 0013-net-bnxt-fix-structure-variable-initialization.patch	2020-10-28 10:35:11.420828787 +0000
@@ -1,8 +1,10 @@
-From ce41561d1b998d9e15f74f9c3a6aff78e0f99871 Mon Sep 17 00:00:00 2001
+From 2a7ce4a15fc72e162383b974b31220f70971742a Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Date: Fri, 28 Aug 2020 10:31:09 +0530
 Subject: [PATCH] net/bnxt: fix structure variable initialization
 
+[ upstream commit ce41561d1b998d9e15f74f9c3a6aff78e0f99871 ]
+
 During port start if bnxt_alloc_all_hwrm_stat_ctxs() fails,
 in the cleanup path we do see errors like below:
 
@@ -16,7 +18,6 @@
 
 Fixes: 6eb3cc2294fd ("net/bnxt: add initial Tx code")
 Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
@@ -28,7 +29,7 @@
  3 files changed, 6 insertions(+)
 
 diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c
-index 54f6547442..8f2296b293 100644
+index 1999cd7861..bb60f8ab0f 100644
 --- a/drivers/net/bnxt/bnxt_ring.c
 +++ b/drivers/net/bnxt/bnxt_ring.c
 @@ -451,6 +451,7 @@ int bnxt_alloc_rxtx_nq_ring(struct bnxt *bp)
@@ -40,10 +41,10 @@
  	nqr->cp_ring_struct = ring;
  	rc = bnxt_alloc_rings(bp, 0, NULL, NULL, nqr, NULL, "l2_nqr");
 diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
-index 43b1256dcc..b086898148 100644
+index fa3b4a6be4..32eaf75ed5 100644
 --- a/drivers/net/bnxt/bnxt_rxr.c
 +++ b/drivers/net/bnxt/bnxt_rxr.c
-@@ -962,6 +962,7 @@ int bnxt_init_rx_ring_struct(struct bnxt_rx_queue *rxq, unsigned int socket_id)
+@@ -779,6 +779,7 @@ int bnxt_init_rx_ring_struct(struct bnxt_rx_queue *rxq, unsigned int socket_id)
  	ring->bd_dma = rxr->rx_desc_mapping;
  	ring->vmem_size = ring->ring_size * sizeof(struct bnxt_sw_rx_bd);
  	ring->vmem = (void **)&rxr->rx_buf_ring;
@@ -51,7 +52,7 @@
  
  	cpr = rte_zmalloc_socket("bnxt_rx_ring",
  				 sizeof(struct bnxt_cp_ring_info),
-@@ -983,6 +984,7 @@ int bnxt_init_rx_ring_struct(struct bnxt_rx_queue *rxq, unsigned int socket_id)
+@@ -800,6 +801,7 @@ int bnxt_init_rx_ring_struct(struct bnxt_rx_queue *rxq, unsigned int socket_id)
  	ring->bd_dma = cpr->cp_desc_mapping;
  	ring->vmem_size = 0;
  	ring->vmem = NULL;
@@ -59,7 +60,7 @@
  
  	/* Allocate Aggregator rings */
  	ring = rte_zmalloc_socket("bnxt_rx_ring_struct",
-@@ -998,6 +1000,7 @@ int bnxt_init_rx_ring_struct(struct bnxt_rx_queue *rxq, unsigned int socket_id)
+@@ -815,6 +817,7 @@ int bnxt_init_rx_ring_struct(struct bnxt_rx_queue *rxq, unsigned int socket_id)
  	ring->bd_dma = rxr->ag_desc_mapping;
  	ring->vmem_size = ring->ring_size * sizeof(struct bnxt_sw_rx_bd);
  	ring->vmem = (void **)&rxr->ag_buf_ring;
@@ -68,7 +69,7 @@
  	return 0;
  }
 diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
-index c7a2de67c7..20683315ed 100644
+index 16021407e8..9a18e8f6f7 100644
 --- a/drivers/net/bnxt/bnxt_txr.c
 +++ b/drivers/net/bnxt/bnxt_txr.c
 @@ -78,6 +78,7 @@ int bnxt_init_tx_ring_struct(struct bnxt_tx_queue *txq, unsigned int socket_id)

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

* [dpdk-stable] patch 'net/bnxt: fix crash in vector mode Tx' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (11 preceding siblings ...)
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/bnxt: fix structure variable initialization' " luca.boccassi
@ 2020-10-28 10:42 ` luca.boccassi
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/bnxt: fix L2 filter allocation' " luca.boccassi
                   ` (193 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:42 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Lance Richardson, Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 7ca263db77d64431aa64f91cac6ec64b05734a5b Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Fri, 28 Aug 2020 10:31:10 +0530
Subject: [PATCH] net/bnxt: fix crash in vector mode Tx

[ upstream commit 301cc1b4db590df8bbadbad9a0b2ea2ed125ba86 ]

rte_pktmbuf_prefree_seg() can return NULL if the mbuf still
has remaining references on it.

Adding a NULL check to prevent segfault.

Fixes: bc4a000f2f53 ("net/bnxt: implement SSE vector mode")
Fixes: 398358341419 ("net/bnxt: support NEON")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
index 8b4c396821..7529d0316b 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
@@ -338,6 +338,8 @@ bnxt_tx_cmp_vec(struct bnxt_tx_queue *txq, int nr_pkts)
 		tx_buf = &txr->tx_buf_ring[cons];
 		cons = RING_NEXT(txr->tx_ring_struct, cons);
 		mbuf = rte_pktmbuf_prefree_seg(tx_buf->mbuf);
+		if (unlikely(mbuf == NULL))
+			continue;
 		tx_buf->mbuf = NULL;
 
 		if (blk && mbuf->pool != free[0]->pool) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.229346377 +0000
+++ 0014-net-bnxt-fix-crash-in-vector-mode-Tx.patch	2020-10-28 10:35:11.420828787 +0000
@@ -1,8 +1,10 @@
-From 301cc1b4db590df8bbadbad9a0b2ea2ed125ba86 Mon Sep 17 00:00:00 2001
+From 7ca263db77d64431aa64f91cac6ec64b05734a5b Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Date: Fri, 28 Aug 2020 10:31:10 +0530
 Subject: [PATCH] net/bnxt: fix crash in vector mode Tx
 
+[ upstream commit 301cc1b4db590df8bbadbad9a0b2ea2ed125ba86 ]
+
 rte_pktmbuf_prefree_seg() can return NULL if the mbuf still
 has remaining references on it.
 
@@ -10,35 +12,20 @@
 
 Fixes: bc4a000f2f53 ("net/bnxt: implement SSE vector mode")
 Fixes: 398358341419 ("net/bnxt: support NEON")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
 Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
 Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
 ---
- drivers/net/bnxt/bnxt_rxtx_vec_neon.c | 2 ++
- drivers/net/bnxt/bnxt_rxtx_vec_sse.c  | 2 ++
- 2 files changed, 4 insertions(+)
-
-diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
-index 488a0b4667..bf76c2ac26 100644
---- a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
-+++ b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c
-@@ -329,6 +329,8 @@ bnxt_tx_cmp_vec(struct bnxt_tx_queue *txq, int nr_pkts)
- 		tx_buf = &txr->tx_buf_ring[cons];
- 		cons = RING_NEXT(txr->tx_ring_struct, cons);
- 		mbuf = rte_pktmbuf_prefree_seg(tx_buf->mbuf);
-+		if (unlikely(mbuf == NULL))
-+			continue;
- 		tx_buf->mbuf = NULL;
- 
- 		if (blk && mbuf->pool != free[0]->pool) {
+ drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
 diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
-index c4ca5cf2dd..98220bc1b3 100644
+index 8b4c396821..7529d0316b 100644
 --- a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
 +++ b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
-@@ -334,6 +334,8 @@ bnxt_tx_cmp_vec(struct bnxt_tx_queue *txq, int nr_pkts)
+@@ -338,6 +338,8 @@ bnxt_tx_cmp_vec(struct bnxt_tx_queue *txq, int nr_pkts)
  		tx_buf = &txr->tx_buf_ring[cons];
  		cons = RING_NEXT(txr->tx_ring_struct, cons);
  		mbuf = rte_pktmbuf_prefree_seg(tx_buf->mbuf);

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

* [dpdk-stable] patch 'net/bnxt: fix L2 filter allocation' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (12 preceding siblings ...)
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/bnxt: fix crash in vector mode Tx' " luca.boccassi
@ 2020-10-28 10:42 ` luca.boccassi
  2020-10-28 10:42 ` [dpdk-stable] patch 'bus/dpaa: remove logically dead code' " luca.boccassi
                   ` (192 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:42 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Venkat Duvvuru, Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 0576a693f9ccea14d0e88ac2a7805e02c847be5e Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Fri, 28 Aug 2020 10:31:11 +0530
Subject: [PATCH] net/bnxt: fix L2 filter allocation

[ upstream commit c92f053d4e2d3a2f42d1ad97fc596e8b3b86346a ]

DPDK does not support RoCE and XDP. The driver should set the
bit 5:4 of the flag to 1 and set bit 6 of the flag in the
HWRM_CFA_L2_FILTER_ALLOC command to disable RoCE and XDP features.

This change will greatly reduce the CFA resource consumption.

Fixes: f92735db1e4c ("net/bnxt: add L2 filter alloc/init/free")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index ddcb81f29c..7695a6372f 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -447,6 +447,9 @@ int bnxt_hwrm_set_l2_filter(struct bnxt *bp,
 
 	HWRM_PREP(req, CFA_L2_FILTER_ALLOC, BNXT_USE_CHIMP_MB);
 
+	/* PMD does not support XDP and RoCE */
+	filter->flags |= HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_XDP_DISABLE |
+			HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_TRAFFIC_L2;
 	req.flags = rte_cpu_to_le_32(filter->flags);
 
 	enables = filter->enables |
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.258732899 +0000
+++ 0015-net-bnxt-fix-L2-filter-allocation.patch	2020-10-28 10:35:11.424828846 +0000
@@ -1,8 +1,10 @@
-From c92f053d4e2d3a2f42d1ad97fc596e8b3b86346a Mon Sep 17 00:00:00 2001
+From 0576a693f9ccea14d0e88ac2a7805e02c847be5e Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Date: Fri, 28 Aug 2020 10:31:11 +0530
 Subject: [PATCH] net/bnxt: fix L2 filter allocation
 
+[ upstream commit c92f053d4e2d3a2f42d1ad97fc596e8b3b86346a ]
+
 DPDK does not support RoCE and XDP. The driver should set the
 bit 5:4 of the flag to 1 and set bit 6 of the flag in the
 HWRM_CFA_L2_FILTER_ALLOC command to disable RoCE and XDP features.
@@ -10,7 +12,6 @@
 This change will greatly reduce the CFA resource consumption.
 
 Fixes: f92735db1e4c ("net/bnxt: add L2 filter alloc/init/free")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
@@ -21,12 +22,12 @@
  1 file changed, 3 insertions(+)
 
 diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
-index f326f842b6..b26952646b 100644
+index ddcb81f29c..7695a6372f 100644
 --- a/drivers/net/bnxt/bnxt_hwrm.c
 +++ b/drivers/net/bnxt/bnxt_hwrm.c
-@@ -530,6 +530,9 @@ int bnxt_hwrm_set_l2_filter(struct bnxt *bp,
+@@ -447,6 +447,9 @@ int bnxt_hwrm_set_l2_filter(struct bnxt *bp,
  
- 	HWRM_PREP(&req, HWRM_CFA_L2_FILTER_ALLOC, BNXT_USE_CHIMP_MB);
+ 	HWRM_PREP(req, CFA_L2_FILTER_ALLOC, BNXT_USE_CHIMP_MB);
  
 +	/* PMD does not support XDP and RoCE */
 +	filter->flags |= HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_XDP_DISABLE |

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

* [dpdk-stable] patch 'bus/dpaa: remove logically dead code' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (13 preceding siblings ...)
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/bnxt: fix L2 filter allocation' " luca.boccassi
@ 2020-10-28 10:42 ` luca.boccassi
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/hns3: fix default MAC address from firmware' " luca.boccassi
                   ` (191 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:42 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 760665e988f1d6334ed7b69807276b4c0bf92ad3 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Mon, 24 Aug 2020 21:02:39 +0800
Subject: [PATCH] bus/dpaa: remove logically dead code

[ upstream commit 126a2c485c8012ff47bfd4825b9f71d2e606e3b8 ]

This patch removes logically dead code reported by coverity.

Coverity issue: 349930
Fixes: b9c94167904f ("bus/dpaa: decouple FQ portal alloc and init")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/bus/dpaa/base/qbman/qman_driver.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/bus/dpaa/base/qbman/qman_driver.c b/drivers/bus/dpaa/base/qbman/qman_driver.c
index 69244ef701..464998fe91 100644
--- a/drivers/bus/dpaa/base/qbman/qman_driver.c
+++ b/drivers/bus/dpaa/base/qbman/qman_driver.c
@@ -179,8 +179,6 @@ struct qman_portal *fsl_qman_fq_portal_create(int *fd)
 	*fd = q_fd;
 	return portal;
 err:
-	if (portal)
-		qman_free_global_portal(portal);
 	if (q_fd)
 		close(q_fd);
 	process_portal_unmap(&q_map.addr);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.291699244 +0000
+++ 0016-bus-dpaa-remove-logically-dead-code.patch	2020-10-28 10:35:11.424828846 +0000
@@ -1,13 +1,14 @@
-From 126a2c485c8012ff47bfd4825b9f71d2e606e3b8 Mon Sep 17 00:00:00 2001
+From 760665e988f1d6334ed7b69807276b4c0bf92ad3 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Mon, 24 Aug 2020 21:02:39 +0800
 Subject: [PATCH] bus/dpaa: remove logically dead code
 
+[ upstream commit 126a2c485c8012ff47bfd4825b9f71d2e606e3b8 ]
+
 This patch removes logically dead code reported by coverity.
 
 Coverity issue: 349930
 Fixes: b9c94167904f ("bus/dpaa: decouple FQ portal alloc and init")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -16,10 +17,10 @@
  1 file changed, 2 deletions(-)
 
 diff --git a/drivers/bus/dpaa/base/qbman/qman_driver.c b/drivers/bus/dpaa/base/qbman/qman_driver.c
-index 1166d68e21..a466c698fc 100644
+index 69244ef701..464998fe91 100644
 --- a/drivers/bus/dpaa/base/qbman/qman_driver.c
 +++ b/drivers/bus/dpaa/base/qbman/qman_driver.c
-@@ -189,8 +189,6 @@ struct qman_portal *fsl_qman_fq_portal_create(int *fd)
+@@ -179,8 +179,6 @@ struct qman_portal *fsl_qman_fq_portal_create(int *fd)
  	*fd = q_fd;
  	return portal;
  err:

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

* [dpdk-stable] patch 'net/hns3: fix default MAC address from firmware' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (14 preceding siblings ...)
  2020-10-28 10:42 ` [dpdk-stable] patch 'bus/dpaa: remove logically dead code' " luca.boccassi
@ 2020-10-28 10:42 ` luca.boccassi
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/hns3: fix some incomplete command structures' " luca.boccassi
                   ` (190 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:42 UTC (permalink / raw)
  To: Huisong Li; +Cc: Wei Hu, Chengchang Tang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From d7c09f1d39c794a95dd7b6f98945e0262e006d1a Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 25 Aug 2020 19:53:03 +0800
Subject: [PATCH] net/hns3: fix default MAC address from firmware

[ upstream commit 6c507191d12f2071625b70b220d3f4ffb4e34132 ]

Currently, default MAC address obtained from firmware in PF driver is
directly used by .mac_addr_set ops implementation function when the
rte_eth_dev_start API function is executed. At this moment, if the
default MAC addr isn't an unicast address, it will fail to set default
MAC addr to hardware.

So this patch adds the validity check of default MAC addr in PF driver.
We will use a random unicast address, if the default MAC address
obtained from firmware is not a valid unicast address.

In addition, this patch also adjusts the location of processing default
MAC addr in VF driver so as to increase relevance and readability of the
code.

Fixes: eab21776717e ("net/hns3: support setting VF MAC address by PF driver")
Fixes: d51867db65c1 ("net/hns3: add initialization")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    | 11 +++++++++++
 drivers/net/hns3/hns3_ethdev_vf.c |  4 ++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 217aea4c05..cac1aa53b4 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5386,6 +5386,8 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
 	struct rte_device *dev = eth_dev->device;
 	struct rte_pci_device *pci_dev = RTE_DEV_TO_PCI(dev);
 	struct hns3_adapter *hns = eth_dev->data->dev_private;
+	char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
+	struct rte_ether_addr *eth_addr;
 	struct hns3_hw *hw = &hns->hw;
 	uint16_t device_id = pci_dev->id.device_id;
 	int ret;
@@ -5464,6 +5466,15 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
 		goto err_rte_zmalloc;
 	}
 
+	eth_addr = (struct rte_ether_addr *)hw->mac.mac_addr;
+	if (!rte_is_valid_assigned_ether_addr(eth_addr)) {
+		rte_eth_random_addr(hw->mac.mac_addr);
+		rte_ether_format_addr(mac_str, RTE_ETHER_ADDR_FMT_SIZE,
+				(struct rte_ether_addr *)hw->mac.mac_addr);
+		hns3_warn(hw, "default mac_addr from firmware is an invalid "
+			  "unicast address, using random MAC address %s",
+			  mac_str);
+	}
 	rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.mac_addr,
 			    &eth_dev->data->mac_addrs[0]);
 
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index b929fbcc84..7acc679e9b 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1458,8 +1458,6 @@ hns3vf_init_vf(struct rte_eth_dev *eth_dev)
 		goto err_get_config;
 	}
 
-	rte_eth_random_addr(hw->mac.mac_addr); /* Generate a random mac addr */
-
 	ret = hns3vf_clear_vport_list(hw);
 	if (ret) {
 		PMD_INIT_LOG(ERR, "Failed to clear tbl list: %d", ret);
@@ -2253,8 +2251,10 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
 		goto err_rte_zmalloc;
 	}
 
+	rte_eth_random_addr(hw->mac.mac_addr); /* Generate a random mac addr */
 	rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.mac_addr,
 			    &eth_dev->data->mac_addrs[0]);
+
 	hw->adapter_state = HNS3_NIC_INITIALIZED;
 	/*
 	 * Pass the information to the rte_eth_dev_close() that it should also
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.320282074 +0000
+++ 0017-net-hns3-fix-default-MAC-address-from-firmware.patch	2020-10-28 10:35:11.432828963 +0000
@@ -1,8 +1,10 @@
-From 6c507191d12f2071625b70b220d3f4ffb4e34132 Mon Sep 17 00:00:00 2001
+From d7c09f1d39c794a95dd7b6f98945e0262e006d1a Mon Sep 17 00:00:00 2001
 From: Huisong Li <lihuisong@huawei.com>
 Date: Tue, 25 Aug 2020 19:53:03 +0800
 Subject: [PATCH] net/hns3: fix default MAC address from firmware
 
+[ upstream commit 6c507191d12f2071625b70b220d3f4ffb4e34132 ]
+
 Currently, default MAC address obtained from firmware in PF driver is
 directly used by .mac_addr_set ops implementation function when the
 rte_eth_dev_start API function is executed. At this moment, if the
@@ -19,30 +21,29 @@
 
 Fixes: eab21776717e ("net/hns3: support setting VF MAC address by PF driver")
 Fixes: d51867db65c1 ("net/hns3: add initialization")
-Cc: stable@dpdk.org
 
 Signed-off-by: Huisong Li <lihuisong@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
 Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
 ---
  drivers/net/hns3/hns3_ethdev.c    | 11 +++++++++++
- drivers/net/hns3/hns3_ethdev_vf.c | 29 ++++++++++++++---------------
- 2 files changed, 25 insertions(+), 15 deletions(-)
+ drivers/net/hns3/hns3_ethdev_vf.c |  4 ++--
+ 2 files changed, 13 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index fca035d4f5..4d5fa94ff4 100644
+index 217aea4c05..cac1aa53b4 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -5574,6 +5574,8 @@ static int
- hns3_dev_init(struct rte_eth_dev *eth_dev)
- {
+@@ -5386,6 +5386,8 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
+ 	struct rte_device *dev = eth_dev->device;
+ 	struct rte_pci_device *pci_dev = RTE_DEV_TO_PCI(dev);
  	struct hns3_adapter *hns = eth_dev->data->dev_private;
 +	char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
 +	struct rte_ether_addr *eth_addr;
  	struct hns3_hw *hw = &hns->hw;
+ 	uint16_t device_id = pci_dev->id.device_id;
  	int ret;
- 
-@@ -5646,6 +5648,15 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
+@@ -5464,6 +5466,15 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
  		goto err_rte_zmalloc;
  	}
  
@@ -59,48 +60,23 @@
  			    &eth_dev->data->mac_addrs[0]);
  
 diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
-index e0d6783b4a..1d8eef78ed 100644
+index b929fbcc84..7acc679e9b 100644
 --- a/drivers/net/hns3/hns3_ethdev_vf.c
 +++ b/drivers/net/hns3/hns3_ethdev_vf.c
-@@ -1748,21 +1748,6 @@ hns3vf_init_vf(struct rte_eth_dev *eth_dev)
+@@ -1458,8 +1458,6 @@ hns3vf_init_vf(struct rte_eth_dev *eth_dev)
  		goto err_get_config;
  	}
  
--	/*
--	 * The hns3 PF ethdev driver in kernel support setting VF MAC address
--	 * on the host by "ip link set ..." command. To avoid some incorrect
--	 * scenes, for example, hns3 VF PMD driver fails to receive and send
--	 * packets after user configure the MAC address by using the
--	 * "ip link set ..." command, hns3 VF PMD driver keep the same MAC
--	 * address strategy as the hns3 kernel ethdev driver in the
--	 * initialization. If user configure a MAC address by the ip command
--	 * for VF device, then hns3 VF PMD driver will start with it, otherwise
--	 * start with a random MAC address in the initialization.
--	 */
--	ret = rte_is_zero_ether_addr((struct rte_ether_addr *)hw->mac.mac_addr);
--	if (ret)
--		rte_eth_random_addr(hw->mac.mac_addr);
+-	rte_eth_random_addr(hw->mac.mac_addr); /* Generate a random mac addr */
 -
  	ret = hns3vf_clear_vport_list(hw);
  	if (ret) {
  		PMD_INIT_LOG(ERR, "Failed to clear tbl list: %d", ret);
-@@ -2644,8 +2629,22 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -2253,8 +2251,10 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
  		goto err_rte_zmalloc;
  	}
  
-+	/*
-+	 * The hns3 PF ethdev driver in kernel support setting VF MAC address
-+	 * on the host by "ip link set ..." command. To avoid some incorrect
-+	 * scenes, for example, hns3 VF PMD driver fails to receive and send
-+	 * packets after user configure the MAC address by using the
-+	 * "ip link set ..." command, hns3 VF PMD driver keep the same MAC
-+	 * address strategy as the hns3 kernel ethdev driver in the
-+	 * initialization. If user configure a MAC address by the ip command
-+	 * for VF device, then hns3 VF PMD driver will start with it, otherwise
-+	 * start with a random MAC address in the initialization.
-+	 */
-+	if (rte_is_zero_ether_addr((struct rte_ether_addr *)hw->mac.mac_addr))
-+		rte_eth_random_addr(hw->mac.mac_addr);
++	rte_eth_random_addr(hw->mac.mac_addr); /* Generate a random mac addr */
  	rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.mac_addr,
  			    &eth_dev->data->mac_addrs[0]);
 +

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

* [dpdk-stable] patch 'net/hns3: fix some incomplete command structures' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (15 preceding siblings ...)
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/hns3: fix default MAC address from firmware' " luca.boccassi
@ 2020-10-28 10:42 ` luca.boccassi
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/i40e: fix link status' " luca.boccassi
                   ` (189 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:42 UTC (permalink / raw)
  To: Huisong Li; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 019572c6dd21b43703535a03c8a4dd57104de881 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 25 Aug 2020 19:53:05 +0800
Subject: [PATCH] net/hns3: fix some incomplete command structures

[ upstream commit e2a8cae024a5de4d08bc79dead9528e9ce6836c5 ]

The descriptor of the command between firmware and driver consists of
8-byte header and 24-byte data field. The contents sent to firmware are
packaged into a command structure as the data field of command
descriptor.

There are some command structures in hns3_dcb.h file that are less than
24 byte. So this patch fixes these incomplete command structures.

Fixes: 62e3ccc2b94c ("net/hns3: support flow control")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_dcb.h | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_dcb.h b/drivers/net/hns3/hns3_dcb.h
index 9c2c5f21c1..1d6fe5dfdf 100644
--- a/drivers/net/hns3/hns3_dcb.h
+++ b/drivers/net/hns3/hns3_dcb.h
@@ -24,16 +24,19 @@ enum hns3_shap_bucket {
 struct hns3_priority_weight_cmd {
 	uint8_t pri_id;
 	uint8_t dwrr;
+	uint8_t rsvd[22];
 };
 
 struct hns3_qs_weight_cmd {
 	uint16_t qs_id;
 	uint8_t dwrr;
+	uint8_t rsvd[21];
 };
 
 struct hns3_pg_weight_cmd {
 	uint8_t pg_id;
 	uint8_t dwrr;
+	uint8_t rsvd[22];
 };
 
 struct hns3_ets_tc_weight_cmd {
@@ -48,6 +51,7 @@ struct hns3_qs_to_pri_link_cmd {
 	uint8_t priority;
 #define HNS3_DCB_QS_PRI_LINK_VLD_MSK	BIT(0)
 	uint8_t link_vld;
+	uint8_t rsvd1[18];
 };
 
 struct hns3_nq_to_qs_link_cmd {
@@ -55,6 +59,7 @@ struct hns3_nq_to_qs_link_cmd {
 	uint16_t rsvd;
 #define HNS3_DCB_Q_QS_LINK_VLD_MSK	BIT(10)
 	uint16_t qset_id;
+	uint8_t rsvd1[18];
 };
 
 #define HNS3_DCB_SHAP_IR_B_MSK  GENMASK(7, 0)
@@ -72,12 +77,14 @@ struct hns3_pri_shapping_cmd {
 	uint8_t pri_id;
 	uint8_t rsvd[3];
 	uint32_t pri_shapping_para;
+	uint32_t rsvd1[4];
 };
 
 struct hns3_pg_shapping_cmd {
 	uint8_t pg_id;
 	uint8_t rsvd[3];
 	uint32_t pg_shapping_para;
+	uint32_t rsvd1[4];
 };
 
 #define HNS3_BP_GRP_NUM		32
@@ -90,16 +97,18 @@ struct hns3_bp_to_qs_map_cmd {
 	uint8_t rsvd[2];
 	uint8_t qs_group_id;
 	uint32_t qs_bit_map;
-	uint32_t rsvd1;
+	uint32_t rsvd1[4];
 };
 
 struct hns3_pfc_en_cmd {
 	uint8_t tx_rx_en_bitmap;
 	uint8_t pri_en_bitmap;
+	uint8_t rsvd[22];
 };
 
 struct hns3_port_shapping_cmd {
 	uint32_t port_shapping_para;
+	uint32_t rsvd[5];
 };
 
 struct hns3_cfg_pause_param_cmd {
@@ -117,6 +126,7 @@ struct hns3_pg_to_pri_link_cmd {
 	uint8_t pg_id;
 	uint8_t rsvd1[3];
 	uint8_t pri_bit_map;
+	uint8_t rsvd2[19];
 };
 
 enum hns3_shaper_level {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.356151519 +0000
+++ 0018-net-hns3-fix-some-incomplete-command-structures.patch	2020-10-28 10:35:11.436829023 +0000
@@ -1,8 +1,10 @@
-From e2a8cae024a5de4d08bc79dead9528e9ce6836c5 Mon Sep 17 00:00:00 2001
+From 019572c6dd21b43703535a03c8a4dd57104de881 Mon Sep 17 00:00:00 2001
 From: Huisong Li <lihuisong@huawei.com>
 Date: Tue, 25 Aug 2020 19:53:05 +0800
 Subject: [PATCH] net/hns3: fix some incomplete command structures
 
+[ upstream commit e2a8cae024a5de4d08bc79dead9528e9ce6836c5 ]
+
 The descriptor of the command between firmware and driver consists of
 8-byte header and 24-byte data field. The contents sent to firmware are
 packaged into a command structure as the data field of command
@@ -12,7 +14,6 @@
 24 byte. So this patch fixes these incomplete command structures.
 
 Fixes: 62e3ccc2b94c ("net/hns3: support flow control")
-Cc: stable@dpdk.org
 
 Signed-off-by: Huisong Li <lihuisong@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -21,10 +22,10 @@
  1 file changed, 11 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/hns3/hns3_dcb.h b/drivers/net/hns3/hns3_dcb.h
-index 1636c5ae88..557d88bc18 100644
+index 9c2c5f21c1..1d6fe5dfdf 100644
 --- a/drivers/net/hns3/hns3_dcb.h
 +++ b/drivers/net/hns3/hns3_dcb.h
-@@ -26,16 +26,19 @@ enum hns3_shap_bucket {
+@@ -24,16 +24,19 @@ enum hns3_shap_bucket {
  struct hns3_priority_weight_cmd {
  	uint8_t pri_id;
  	uint8_t dwrr;
@@ -44,7 +45,7 @@
  };
  
  struct hns3_ets_tc_weight_cmd {
-@@ -50,6 +53,7 @@ struct hns3_qs_to_pri_link_cmd {
+@@ -48,6 +51,7 @@ struct hns3_qs_to_pri_link_cmd {
  	uint8_t priority;
  #define HNS3_DCB_QS_PRI_LINK_VLD_MSK	BIT(0)
  	uint8_t link_vld;
@@ -52,7 +53,7 @@
  };
  
  struct hns3_nq_to_qs_link_cmd {
-@@ -57,6 +61,7 @@ struct hns3_nq_to_qs_link_cmd {
+@@ -55,6 +59,7 @@ struct hns3_nq_to_qs_link_cmd {
  	uint16_t rsvd;
  #define HNS3_DCB_Q_QS_LINK_VLD_MSK	BIT(10)
  	uint16_t qset_id;
@@ -60,7 +61,7 @@
  };
  
  #define HNS3_DCB_SHAP_IR_B_MSK  GENMASK(7, 0)
-@@ -74,12 +79,14 @@ struct hns3_pri_shapping_cmd {
+@@ -72,12 +77,14 @@ struct hns3_pri_shapping_cmd {
  	uint8_t pri_id;
  	uint8_t rsvd[3];
  	uint32_t pri_shapping_para;
@@ -75,7 +76,7 @@
  };
  
  #define HNS3_BP_GRP_NUM		32
-@@ -92,16 +99,18 @@ struct hns3_bp_to_qs_map_cmd {
+@@ -90,16 +97,18 @@ struct hns3_bp_to_qs_map_cmd {
  	uint8_t rsvd[2];
  	uint8_t qs_group_id;
  	uint32_t qs_bit_map;
@@ -95,7 +96,7 @@
  };
  
  struct hns3_cfg_pause_param_cmd {
-@@ -119,6 +128,7 @@ struct hns3_pg_to_pri_link_cmd {
+@@ -117,6 +126,7 @@ struct hns3_pg_to_pri_link_cmd {
  	uint8_t pg_id;
  	uint8_t rsvd1[3];
  	uint8_t pri_bit_map;

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

* [dpdk-stable] patch 'net/i40e: fix link status' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (16 preceding siblings ...)
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/hns3: fix some incomplete command structures' " luca.boccassi
@ 2020-10-28 10:42 ` luca.boccassi
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/iavf: fix scattered Rx enabling' " luca.boccassi
                   ` (188 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:42 UTC (permalink / raw)
  To: Guinan Sun; +Cc: Jeff Guo, Jiaqi Min, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 75fe6aae29505468861f6486e82081386831b0fa Mon Sep 17 00:00:00 2001
From: Guinan Sun <guinanx.sun@intel.com>
Date: Fri, 4 Sep 2020 06:21:54 +0000
Subject: [PATCH] net/i40e: fix link status

[ upstream commit 3db12449e119587648adf0b189c0e45502b71285 ]

If the PF driver supports the new speed reporting capabilities
then use link_event_adv instead of link_event to get the speed.

Fixes: 2a73125b7041 ("i40evf: fix link info update")

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
Tested-by: Jiaqi Min <jiaqix.min@intel.com>
---
 drivers/net/i40e/base/virtchnl.h  | 16 ++++++++++-
 drivers/net/i40e/i40e_ethdev_vf.c | 46 +++++++++++++++++++++++++++++--
 2 files changed, 58 insertions(+), 4 deletions(-)

diff --git a/drivers/net/i40e/base/virtchnl.h b/drivers/net/i40e/base/virtchnl.h
index 0ec84e9dae..acd7b7eb88 100644
--- a/drivers/net/i40e/base/virtchnl.h
+++ b/drivers/net/i40e/base/virtchnl.h
@@ -233,7 +233,8 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);
 #define VIRTCHNL_VF_OFFLOAD_ENCAP		0X00100000
 #define VIRTCHNL_VF_OFFLOAD_ENCAP_CSUM		0X00200000
 #define VIRTCHNL_VF_OFFLOAD_RX_ENCAP_CSUM	0X00400000
-
+/* Define below the capability flags that are not offloads */
+#define VIRTCHNL_VF_CAP_ADV_LINK_SPEED		0x00000080
 #define VF_BASE_MODE_OFFLOADS (VIRTCHNL_VF_OFFLOAD_L2 | \
 			       VIRTCHNL_VF_OFFLOAD_VLAN | \
 			       VIRTCHNL_VF_OFFLOAD_RSS_PF)
@@ -522,10 +523,23 @@ enum virtchnl_event_codes {
 struct virtchnl_pf_event {
 	enum virtchnl_event_codes event;
 	union {
+		/* If the PF driver does not support the new speed reporting
+		 * capabilities then use link_event else use link_event_adv to
+		 * get the speed and link information. The ability to understand
+		 * new speeds is indicated by setting the capability flag
+		 * VIRTCHNL_VF_CAP_ADV_LINK_SPEED in vf_cap_flags parameter
+		 * in virtchnl_vf_resource struct and can be used to determine
+		 * which link event struct to use below.
+		 */
 		struct {
 			enum virtchnl_link_speed link_speed;
 			bool link_status;
 		} link_event;
+		struct {
+			/* link_speed provided in Mbps */
+			u32 link_speed;
+			u8 link_status;
+		} link_event_adv;
 	} event_data;
 
 	int severity;
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 0381ba64e1..9feed6222e 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -468,7 +468,8 @@ i40evf_get_vf_resource(struct rte_eth_dev *dev)
 		       VIRTCHNL_VF_OFFLOAD_RSS_AQ |
 		       VIRTCHNL_VF_OFFLOAD_RSS_REG |
 		       VIRTCHNL_VF_OFFLOAD_VLAN |
-		       VIRTCHNL_VF_OFFLOAD_RX_POLLING;
+		       VIRTCHNL_VF_OFFLOAD_RX_POLLING |
+		       VIRTCHNL_VF_CAP_ADV_LINK_SPEED;
 		args.in_args = (uint8_t *)&caps;
 		args.in_args_size = sizeof(caps);
 	} else {
@@ -1362,8 +1363,47 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,
 		break;
 	case VIRTCHNL_EVENT_LINK_CHANGE:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_LINK_CHANGE event");
-		vf->link_up = pf_msg->event_data.link_event.link_status;
-		vf->link_speed = pf_msg->event_data.link_event.link_speed;
+
+		if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_CAP_ADV_LINK_SPEED) {
+			vf->link_up =
+				pf_msg->event_data.link_event_adv.link_status;
+
+			switch (pf_msg->event_data.link_event_adv.link_speed) {
+			case ETH_SPEED_NUM_100M:
+				vf->link_speed = VIRTCHNL_LINK_SPEED_100MB;
+				break;
+			case ETH_SPEED_NUM_1G:
+				vf->link_speed = VIRTCHNL_LINK_SPEED_1GB;
+				break;
+			case ETH_SPEED_NUM_2_5G:
+				vf->link_speed = VIRTCHNL_LINK_SPEED_2_5GB;
+				break;
+			case ETH_SPEED_NUM_5G:
+				vf->link_speed = VIRTCHNL_LINK_SPEED_5GB;
+				break;
+			case ETH_SPEED_NUM_10G:
+				vf->link_speed = VIRTCHNL_LINK_SPEED_10GB;
+				break;
+			case ETH_SPEED_NUM_20G:
+				vf->link_speed = VIRTCHNL_LINK_SPEED_20GB;
+				break;
+			case ETH_SPEED_NUM_25G:
+				vf->link_speed = VIRTCHNL_LINK_SPEED_25GB;
+				break;
+			case ETH_SPEED_NUM_40G:
+				vf->link_speed = VIRTCHNL_LINK_SPEED_40GB;
+				break;
+			default:
+				vf->link_speed = VIRTCHNL_LINK_SPEED_UNKNOWN;
+				break;
+			}
+		} else {
+			vf->link_up =
+				pf_msg->event_data.link_event.link_status;
+			vf->link_speed =
+				pf_msg->event_data.link_event.link_speed;
+		}
+
 		break;
 	case VIRTCHNL_EVENT_PF_DRIVER_CLOSE:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_PF_DRIVER_CLOSE event");
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.385382736 +0000
+++ 0019-net-i40e-fix-link-status.patch	2020-10-28 10:35:11.440829082 +0000
@@ -1,13 +1,14 @@
-From 3db12449e119587648adf0b189c0e45502b71285 Mon Sep 17 00:00:00 2001
+From 75fe6aae29505468861f6486e82081386831b0fa Mon Sep 17 00:00:00 2001
 From: Guinan Sun <guinanx.sun@intel.com>
 Date: Fri, 4 Sep 2020 06:21:54 +0000
 Subject: [PATCH] net/i40e: fix link status
 
+[ upstream commit 3db12449e119587648adf0b189c0e45502b71285 ]
+
 If the PF driver supports the new speed reporting capabilities
 then use link_event_adv instead of link_event to get the speed.
 
 Fixes: 2a73125b7041 ("i40evf: fix link info update")
-Cc: stable@dpdk.org
 
 Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
 Acked-by: Jeff Guo <jia.guo@intel.com>
@@ -18,10 +19,10 @@
  2 files changed, 58 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/i40e/base/virtchnl.h b/drivers/net/i40e/base/virtchnl.h
-index 4f498ca456..9c64fd4690 100644
+index 0ec84e9dae..acd7b7eb88 100644
 --- a/drivers/net/i40e/base/virtchnl.h
 +++ b/drivers/net/i40e/base/virtchnl.h
-@@ -240,7 +240,8 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);
+@@ -233,7 +233,8 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);
  #define VIRTCHNL_VF_OFFLOAD_ENCAP		0X00100000
  #define VIRTCHNL_VF_OFFLOAD_ENCAP_CSUM		0X00200000
  #define VIRTCHNL_VF_OFFLOAD_RX_ENCAP_CSUM	0X00400000
@@ -31,7 +32,7 @@
  #define VF_BASE_MODE_OFFLOADS (VIRTCHNL_VF_OFFLOAD_L2 | \
  			       VIRTCHNL_VF_OFFLOAD_VLAN | \
  			       VIRTCHNL_VF_OFFLOAD_RSS_PF)
-@@ -536,10 +537,23 @@ enum virtchnl_event_codes {
+@@ -522,10 +523,23 @@ enum virtchnl_event_codes {
  struct virtchnl_pf_event {
  	enum virtchnl_event_codes event;
  	union {
@@ -56,10 +57,10 @@
  
  	int severity;
 diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
-index ac6c25b7cb..b755350cd2 100644
+index 0381ba64e1..9feed6222e 100644
 --- a/drivers/net/i40e/i40e_ethdev_vf.c
 +++ b/drivers/net/i40e/i40e_ethdev_vf.c
-@@ -469,7 +469,8 @@ i40evf_get_vf_resource(struct rte_eth_dev *dev)
+@@ -468,7 +468,8 @@ i40evf_get_vf_resource(struct rte_eth_dev *dev)
  		       VIRTCHNL_VF_OFFLOAD_RSS_AQ |
  		       VIRTCHNL_VF_OFFLOAD_RSS_REG |
  		       VIRTCHNL_VF_OFFLOAD_VLAN |
@@ -69,7 +70,7 @@
  		args.in_args = (uint8_t *)&caps;
  		args.in_args_size = sizeof(caps);
  	} else {
-@@ -1386,8 +1387,47 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,
+@@ -1362,8 +1363,47 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,
  		break;
  	case VIRTCHNL_EVENT_LINK_CHANGE:
  		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_LINK_CHANGE event");
@@ -116,9 +117,9 @@
 +				pf_msg->event_data.link_event.link_speed;
 +		}
 +
- 		i40evf_dev_link_update(dev, 0);
- 		_rte_eth_dev_callback_process(dev,
- 				RTE_ETH_EVENT_INTR_LSC, NULL);
+ 		break;
+ 	case VIRTCHNL_EVENT_PF_DRIVER_CLOSE:
+ 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_PF_DRIVER_CLOSE event");
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/iavf: fix scattered Rx enabling' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (17 preceding siblings ...)
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/i40e: fix link status' " luca.boccassi
@ 2020-10-28 10:42 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/iavf: fix port start during configuration restore' " luca.boccassi
                   ` (187 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:42 UTC (permalink / raw)
  To: Steve Yang; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 7b4464ccbcb451f3c66e9bbcbc3da766e60cdd94 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Fri, 4 Sep 2020 07:29:02 +0000
Subject: [PATCH] net/iavf: fix scattered Rx enabling

[ upstream commit 0f14a4127ea6e6e079caaccc98c98dc4b0b20e1d ]

No need to add additional vlan tag size for max packet size,
the queue's Rx Max Frame Size (rxq->max_pkt_len) already
includes the vlan header size in iavf.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 8ddd4aad9a..1556c146ea 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -263,7 +263,7 @@ iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq)
 
 	rxq->max_pkt_len = max_pkt_len;
 	if ((dev_data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_SCATTER) ||
-	    (rxq->max_pkt_len + 2 * IAVF_VLAN_TAG_SIZE) > buf_size) {
+	    rxq->max_pkt_len > buf_size) {
 		dev_data->scattered_rx = 1;
 	}
 	IAVF_PCI_REG_WRITE(rxq->qrx_tail, rxq->nb_rx_desc - 1);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.416870174 +0000
+++ 0020-net-iavf-fix-scattered-Rx-enabling.patch	2020-10-28 10:35:11.440829082 +0000
@@ -1,14 +1,15 @@
-From 0f14a4127ea6e6e079caaccc98c98dc4b0b20e1d Mon Sep 17 00:00:00 2001
+From 7b4464ccbcb451f3c66e9bbcbc3da766e60cdd94 Mon Sep 17 00:00:00 2001
 From: Steve Yang <stevex.yang@intel.com>
 Date: Fri, 4 Sep 2020 07:29:02 +0000
 Subject: [PATCH] net/iavf: fix scattered Rx enabling
 
+[ upstream commit 0f14a4127ea6e6e079caaccc98c98dc4b0b20e1d ]
+
 No need to add additional vlan tag size for max packet size,
 the queue's Rx Max Frame Size (rxq->max_pkt_len) already
 includes the vlan header size in iavf.
 
 Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
-Cc: stable@dpdk.org
 
 Signed-off-by: Steve Yang <stevex.yang@intel.com>
 Acked-by: Beilei Xing <beilei.xing@intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
-index 28ca3fa8f7..ec4b1a1487 100644
+index 8ddd4aad9a..1556c146ea 100644
 --- a/drivers/net/iavf/iavf_ethdev.c
 +++ b/drivers/net/iavf/iavf_ethdev.c
-@@ -286,7 +286,7 @@ iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq)
+@@ -263,7 +263,7 @@ iavf_init_rxq(struct rte_eth_dev *dev, struct iavf_rx_queue *rxq)
  
  	rxq->max_pkt_len = max_pkt_len;
  	if ((dev_data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_SCATTER) ||

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

* [dpdk-stable] patch 'net/iavf: fix port start during configuration restore' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (18 preceding siblings ...)
  2020-10-28 10:42 ` [dpdk-stable] patch 'net/iavf: fix scattered Rx enabling' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/iavf: fix setting of MAC address' " luca.boccassi
                   ` (186 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Steve Yang; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 02b72cde0b073b0fb0978ffc8b56717d547caa9c Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Fri, 4 Sep 2020 07:29:04 +0000
Subject: [PATCH] net/iavf: fix port start during configuration restore

[ upstream commit dd184a454111b54b0e45a3271becc3dd19ec8616 ]

If configuring VF promiscuous mode is not supported,
return -ENOTSUP error code in .promiscuous_enable/disable dev_ops.
This is to fix the port start during configuration restore,
where if .promiscuous_enable/disable dev_ops exists
and return any value other than -ENOTSUP, start will fail.

Same is done for .allmulticast_enable/disable dev_ops.

Fixes: ca041cd44fcc ("ethdev: change allmulticast callbacks to return status")
Fixes: 9039c8125730 ("ethdev: change promiscuous callbacks to return status")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 1556c146ea..d65412ae94 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -658,6 +658,8 @@ iavf_dev_promiscuous_enable(struct rte_eth_dev *dev)
 	ret = iavf_config_promisc(adapter, TRUE, vf->promisc_multicast_enabled);
 	if (!ret)
 		vf->promisc_unicast_enabled = TRUE;
+	else if (ret == IAVF_NOT_SUPPORTED)
+		ret = -ENOTSUP;
 	else
 		ret = -EAGAIN;
 
@@ -678,6 +680,8 @@ iavf_dev_promiscuous_disable(struct rte_eth_dev *dev)
 	ret = iavf_config_promisc(adapter, FALSE, vf->promisc_multicast_enabled);
 	if (!ret)
 		vf->promisc_unicast_enabled = FALSE;
+	else if (ret == IAVF_NOT_SUPPORTED)
+		ret = -ENOTSUP;
 	else
 		ret = -EAGAIN;
 
@@ -698,6 +702,8 @@ iavf_dev_allmulticast_enable(struct rte_eth_dev *dev)
 	ret = iavf_config_promisc(adapter, vf->promisc_unicast_enabled, TRUE);
 	if (!ret)
 		vf->promisc_multicast_enabled = TRUE;
+	else if (ret == IAVF_NOT_SUPPORTED)
+		ret = -ENOTSUP;
 	else
 		ret = -EAGAIN;
 
@@ -718,6 +724,8 @@ iavf_dev_allmulticast_disable(struct rte_eth_dev *dev)
 	ret = iavf_config_promisc(adapter, vf->promisc_unicast_enabled, FALSE);
 	if (!ret)
 		vf->promisc_multicast_enabled = FALSE;
+	else if (ret == IAVF_NOT_SUPPORTED)
+		ret = -ENOTSUP;
 	else
 		ret = -EAGAIN;
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.449047049 +0000
+++ 0021-net-iavf-fix-port-start-during-configuration-restore.patch	2020-10-28 10:35:11.440829082 +0000
@@ -1,8 +1,10 @@
-From dd184a454111b54b0e45a3271becc3dd19ec8616 Mon Sep 17 00:00:00 2001
+From 02b72cde0b073b0fb0978ffc8b56717d547caa9c Mon Sep 17 00:00:00 2001
 From: Steve Yang <stevex.yang@intel.com>
 Date: Fri, 4 Sep 2020 07:29:04 +0000
 Subject: [PATCH] net/iavf: fix port start during configuration restore
 
+[ upstream commit dd184a454111b54b0e45a3271becc3dd19ec8616 ]
+
 If configuring VF promiscuous mode is not supported,
 return -ENOTSUP error code in .promiscuous_enable/disable dev_ops.
 This is to fix the port start during configuration restore,
@@ -13,7 +15,6 @@
 
 Fixes: ca041cd44fcc ("ethdev: change allmulticast callbacks to return status")
 Fixes: 9039c8125730 ("ethdev: change promiscuous callbacks to return status")
-Cc: stable@dpdk.org
 
 Signed-off-by: Steve Yang <stevex.yang@intel.com>
 Acked-by: Beilei Xing <beilei.xing@intel.com>
@@ -22,40 +23,40 @@
  1 file changed, 8 insertions(+)
 
 diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
-index ec4b1a1487..5f3aea8a04 100644
+index 1556c146ea..d65412ae94 100644
 --- a/drivers/net/iavf/iavf_ethdev.c
 +++ b/drivers/net/iavf/iavf_ethdev.c
-@@ -690,6 +690,8 @@ iavf_dev_promiscuous_enable(struct rte_eth_dev *dev)
- 	ret = iavf_config_promisc(adapter, true, vf->promisc_multicast_enabled);
+@@ -658,6 +658,8 @@ iavf_dev_promiscuous_enable(struct rte_eth_dev *dev)
+ 	ret = iavf_config_promisc(adapter, TRUE, vf->promisc_multicast_enabled);
  	if (!ret)
- 		vf->promisc_unicast_enabled = true;
+ 		vf->promisc_unicast_enabled = TRUE;
 +	else if (ret == IAVF_NOT_SUPPORTED)
 +		ret = -ENOTSUP;
  	else
  		ret = -EAGAIN;
  
-@@ -711,6 +713,8 @@ iavf_dev_promiscuous_disable(struct rte_eth_dev *dev)
- 				  vf->promisc_multicast_enabled);
+@@ -678,6 +680,8 @@ iavf_dev_promiscuous_disable(struct rte_eth_dev *dev)
+ 	ret = iavf_config_promisc(adapter, FALSE, vf->promisc_multicast_enabled);
  	if (!ret)
- 		vf->promisc_unicast_enabled = false;
+ 		vf->promisc_unicast_enabled = FALSE;
 +	else if (ret == IAVF_NOT_SUPPORTED)
 +		ret = -ENOTSUP;
  	else
  		ret = -EAGAIN;
  
-@@ -731,6 +735,8 @@ iavf_dev_allmulticast_enable(struct rte_eth_dev *dev)
- 	ret = iavf_config_promisc(adapter, vf->promisc_unicast_enabled, true);
+@@ -698,6 +702,8 @@ iavf_dev_allmulticast_enable(struct rte_eth_dev *dev)
+ 	ret = iavf_config_promisc(adapter, vf->promisc_unicast_enabled, TRUE);
  	if (!ret)
- 		vf->promisc_multicast_enabled = true;
+ 		vf->promisc_multicast_enabled = TRUE;
 +	else if (ret == IAVF_NOT_SUPPORTED)
 +		ret = -ENOTSUP;
  	else
  		ret = -EAGAIN;
  
-@@ -751,6 +757,8 @@ iavf_dev_allmulticast_disable(struct rte_eth_dev *dev)
- 	ret = iavf_config_promisc(adapter, vf->promisc_unicast_enabled, false);
+@@ -718,6 +724,8 @@ iavf_dev_allmulticast_disable(struct rte_eth_dev *dev)
+ 	ret = iavf_config_promisc(adapter, vf->promisc_unicast_enabled, FALSE);
  	if (!ret)
- 		vf->promisc_multicast_enabled = false;
+ 		vf->promisc_multicast_enabled = FALSE;
 +	else if (ret == IAVF_NOT_SUPPORTED)
 +		ret = -ENOTSUP;
  	else

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

* [dpdk-stable] patch 'net/iavf: fix setting of MAC address' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (19 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/iavf: fix port start during configuration restore' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/iavf: downgrade error log' " luca.boccassi
                   ` (185 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Steve Yang; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 45120d61c2a497396d638cdae6c458f97d897b82 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Fri, 4 Sep 2020 07:29:05 +0000
Subject: [PATCH] net/iavf: fix setting of MAC address

[ upstream commit dd52fa0bade3d9e8bbb2229309c9f020cbe6872f ]

When setting the MAC address, the ethdev layer copies the new mac
address in dev->data->mac_addrs[0] before calling the dev_ops.

Therefore, is_same_ether_addr(mac_addr, dev->data->mac_addrs) was
always true, and the MAC was never set. Remove this test to fix the
issue.

Fixes: 538da7a1cad2 ("net: add rte prefix to ether functions")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index d65412ae94..a60b04ddd5 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -987,9 +987,6 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
 	old_addr = (struct rte_ether_addr *)hw->mac.addr;
 	perm_addr = (struct rte_ether_addr *)hw->mac.perm_addr;
 
-	if (rte_is_same_ether_addr(mac_addr, old_addr))
-		return 0;
-
 	/* If the MAC address is configured by host, skip the setting */
 	if (rte_is_valid_assigned_ether_addr(perm_addr))
 		return -EPERM;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.479276588 +0000
+++ 0022-net-iavf-fix-setting-of-MAC-address.patch	2020-10-28 10:35:11.444829140 +0000
@@ -1,8 +1,10 @@
-From dd52fa0bade3d9e8bbb2229309c9f020cbe6872f Mon Sep 17 00:00:00 2001
+From 45120d61c2a497396d638cdae6c458f97d897b82 Mon Sep 17 00:00:00 2001
 From: Steve Yang <stevex.yang@intel.com>
 Date: Fri, 4 Sep 2020 07:29:05 +0000
 Subject: [PATCH] net/iavf: fix setting of MAC address
 
+[ upstream commit dd52fa0bade3d9e8bbb2229309c9f020cbe6872f ]
+
 When setting the MAC address, the ethdev layer copies the new mac
 address in dev->data->mac_addrs[0] before calling the dev_ops.
 
@@ -11,7 +13,6 @@
 issue.
 
 Fixes: 538da7a1cad2 ("net: add rte prefix to ether functions")
-Cc: stable@dpdk.org
 
 Signed-off-by: Steve Yang <stevex.yang@intel.com>
 Acked-by: Beilei Xing <beilei.xing@intel.com>
@@ -20,10 +21,10 @@
  1 file changed, 3 deletions(-)
 
 diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
-index 5f3aea8a04..8e1d8a8d3e 100644
+index d65412ae94..a60b04ddd5 100644
 --- a/drivers/net/iavf/iavf_ethdev.c
 +++ b/drivers/net/iavf/iavf_ethdev.c
-@@ -1020,9 +1020,6 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
+@@ -987,9 +987,6 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
  	old_addr = (struct rte_ether_addr *)hw->mac.addr;
  	perm_addr = (struct rte_ether_addr *)hw->mac.perm_addr;
  

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

* [dpdk-stable] patch 'net/iavf: downgrade error log' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (20 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/iavf: fix setting of MAC address' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: fix out of bounds access' " luca.boccassi
                   ` (184 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Steve Yang; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From e86ab0fb523c0428ca21d7aa0a697cb63df603f1 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Fri, 4 Sep 2020 07:29:07 +0000
Subject: [PATCH] net/iavf: downgrade error log

[ upstream commit ef30148ac281a5a415a3c332a30d2616056c329a ]

When receiving the unsupported AQ messages, it's taken as an
error. It's not appropriate and triggers too much unnecessary print.

Fixes: 22b123a36d07 ("net/avf: initialize PMD")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/iavf/iavf_vchnl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 149673b9b3..aba177caec 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -261,7 +261,7 @@ iavf_handle_virtchnl_msg(struct rte_eth_dev *dev)
 			}
 			break;
 		default:
-			PMD_DRV_LOG(ERR, "Request %u is not supported yet",
+			PMD_DRV_LOG(DEBUG, "Request %u is not supported yet",
 				    aq_opc);
 			break;
 		}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.508864610 +0000
+++ 0023-net-iavf-downgrade-error-log.patch	2020-10-28 10:35:11.444829140 +0000
@@ -1,13 +1,14 @@
-From ef30148ac281a5a415a3c332a30d2616056c329a Mon Sep 17 00:00:00 2001
+From e86ab0fb523c0428ca21d7aa0a697cb63df603f1 Mon Sep 17 00:00:00 2001
 From: Steve Yang <stevex.yang@intel.com>
 Date: Fri, 4 Sep 2020 07:29:07 +0000
 Subject: [PATCH] net/iavf: downgrade error log
 
+[ upstream commit ef30148ac281a5a415a3c332a30d2616056c329a ]
+
 When receiving the unsupported AQ messages, it's taken as an
 error. It's not appropriate and triggers too much unnecessary print.
 
 Fixes: 22b123a36d07 ("net/avf: initialize PMD")
-Cc: stable@dpdk.org
 
 Signed-off-by: Steve Yang <stevex.yang@intel.com>
 Acked-by: Beilei Xing <beilei.xing@intel.com>
@@ -16,10 +17,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
-index a163548645..ea9b53a592 100644
+index 149673b9b3..aba177caec 100644
 --- a/drivers/net/iavf/iavf_vchnl.c
 +++ b/drivers/net/iavf/iavf_vchnl.c
-@@ -268,7 +268,7 @@ iavf_handle_virtchnl_msg(struct rte_eth_dev *dev)
+@@ -261,7 +261,7 @@ iavf_handle_virtchnl_msg(struct rte_eth_dev *dev)
  			}
  			break;
  		default:

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

* [dpdk-stable] patch 'net/hns3: fix out of bounds access' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (21 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/iavf: downgrade error log' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/ice: fix flow validation for unsupported patterns' " luca.boccassi
                   ` (183 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From b823997ee73ee99eb83c08ff0797f3361dd4124a Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Mon, 7 Sep 2020 09:46:33 +0800
Subject: [PATCH] net/hns3: fix out of bounds access

[ upstream commit c4c6c4c1f0ea8d8aac9d63a134d9f7a037aed493 ]

This patch fixes (out-of-bounds access) coverity issue.

Coverity issue: 349932
Fixes: 7d7f9f80bbfb ("net/hns3: support MAC address related operations")

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

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index cac1aa53b4..cd828202ee 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -1401,7 +1401,7 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
 	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
 	struct hns3_mac_vlan_tbl_entry_cmd req;
 	struct hns3_pf *pf = &hns->pf;
-	struct hns3_cmd_desc desc;
+	struct hns3_cmd_desc desc[3];
 	char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
 	uint16_t egress_port = 0;
 	uint8_t vf_id;
@@ -1436,7 +1436,7 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
 	 * it if the entry is inexistent. Repeated unicast entry
 	 * is not allowed in the mac vlan table.
 	 */
-	ret = hns3_lookup_mac_vlan_tbl(hw, &req, &desc, false);
+	ret = hns3_lookup_mac_vlan_tbl(hw, &req, desc, false);
 	if (ret == -ENOENT) {
 		if (!hns3_is_umv_space_full(hw)) {
 			ret = hns3_add_mac_vlan_tbl(hw, &req, NULL);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.538733334 +0000
+++ 0024-net-hns3-fix-out-of-bounds-access.patch	2020-10-28 10:35:11.448829200 +0000
@@ -1,13 +1,14 @@
-From c4c6c4c1f0ea8d8aac9d63a134d9f7a037aed493 Mon Sep 17 00:00:00 2001
+From b823997ee73ee99eb83c08ff0797f3361dd4124a Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Mon, 7 Sep 2020 09:46:33 +0800
 Subject: [PATCH] net/hns3: fix out of bounds access
 
+[ upstream commit c4c6c4c1f0ea8d8aac9d63a134d9f7a037aed493 ]
+
 This patch fixes (out-of-bounds access) coverity issue.
 
 Coverity issue: 349932
 Fixes: 7d7f9f80bbfb ("net/hns3: support MAC address related operations")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -16,10 +17,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index 4d5fa94ff4..9dd0d9cbf1 100644
+index cac1aa53b4..cd828202ee 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -1410,7 +1410,7 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
+@@ -1401,7 +1401,7 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
  	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
  	struct hns3_mac_vlan_tbl_entry_cmd req;
  	struct hns3_pf *pf = &hns->pf;
@@ -28,7 +29,7 @@
  	char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
  	uint16_t egress_port = 0;
  	uint8_t vf_id;
-@@ -1444,7 +1444,7 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
+@@ -1436,7 +1436,7 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
  	 * it if the entry is inexistent. Repeated unicast entry
  	 * is not allowed in the mac vlan table.
  	 */

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

* [dpdk-stable] patch 'net/ice: fix flow validation for unsupported patterns' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (22 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: fix out of bounds access' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'ethdev: remove redundant license text' " luca.boccassi
                   ` (182 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Guinan Sun; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 5071c928825fa508c86ef6b96f6510974ac2ff3a Mon Sep 17 00:00:00 2001
From: Guinan Sun <guinanx.sun@intel.com>
Date: Tue, 8 Sep 2020 03:15:05 +0000
Subject: [PATCH] net/ice: fix flow validation for unsupported patterns

[ upstream commit c28c993c8a255b13cb0fb5f8094cebf46176ef1d ]

When loading the OS default package and the pipeline mode is enabled
by the "pipeline-mode-support=1" operation. In this case, the wrong
parser is selected for processing and it will cause the unsupported
patterns(pppoes/pfcp/l2tpv3/esp/ah) to be validated successfully.
This patch corrects the parser selection issue.

Fixes: 47d460d63233 ("net/ice: rework switch filter")

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_switch_filter.c | 100 ++++++++++++++++++++++------
 1 file changed, 81 insertions(+), 19 deletions(-)

diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index c2f5aa78d5..03493ee464 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -98,12 +98,47 @@ struct sw_meta {
 
 static struct ice_flow_parser ice_switch_dist_parser_os;
 static struct ice_flow_parser ice_switch_dist_parser_comms;
-static struct ice_flow_parser ice_switch_perm_parser;
+static struct ice_flow_parser ice_switch_perm_parser_os;
+static struct ice_flow_parser ice_switch_perm_parser_comms;
+
+static struct
+ice_pattern_match_item ice_switch_pattern_dist_os[] = {
+	{pattern_ethertype,
+			ICE_SW_INSET_ETHER, ICE_INSET_NONE},
+	{pattern_eth_arp,
+			ICE_INSET_NONE, ICE_INSET_NONE},
+	{pattern_eth_ipv4,
+			ICE_SW_INSET_MAC_IPV4, ICE_INSET_NONE},
+	{pattern_eth_ipv4_udp,
+			ICE_SW_INSET_MAC_IPV4_UDP, ICE_INSET_NONE},
+	{pattern_eth_ipv4_tcp,
+			ICE_SW_INSET_MAC_IPV4_TCP, ICE_INSET_NONE},
+	{pattern_eth_ipv6,
+			ICE_SW_INSET_MAC_IPV6, ICE_INSET_NONE},
+	{pattern_eth_ipv6_udp,
+			ICE_SW_INSET_MAC_IPV6_UDP, ICE_INSET_NONE},
+	{pattern_eth_ipv6_tcp,
+			ICE_SW_INSET_MAC_IPV6_TCP, ICE_INSET_NONE},
+	{pattern_eth_ipv4_udp_vxlan_eth_ipv4,
+			ICE_SW_INSET_DIST_VXLAN_IPV4, ICE_INSET_NONE},
+	{pattern_eth_ipv4_udp_vxlan_eth_ipv4_udp,
+			ICE_SW_INSET_DIST_VXLAN_IPV4_UDP, ICE_INSET_NONE},
+	{pattern_eth_ipv4_udp_vxlan_eth_ipv4_tcp,
+			ICE_SW_INSET_DIST_VXLAN_IPV4_TCP, ICE_INSET_NONE},
+	{pattern_eth_ipv4_nvgre_eth_ipv4,
+			ICE_SW_INSET_DIST_NVGRE_IPV4, ICE_INSET_NONE},
+	{pattern_eth_ipv4_nvgre_eth_ipv4_udp,
+			ICE_SW_INSET_DIST_NVGRE_IPV4_UDP, ICE_INSET_NONE},
+	{pattern_eth_ipv4_nvgre_eth_ipv4_tcp,
+			ICE_SW_INSET_DIST_NVGRE_IPV4_TCP, ICE_INSET_NONE},
+};
 
 static struct
 ice_pattern_match_item ice_switch_pattern_dist_comms[] = {
 	{pattern_ethertype,
 			ICE_SW_INSET_ETHER, ICE_INSET_NONE},
+	{pattern_eth_arp,
+			ICE_INSET_NONE, ICE_INSET_NONE},
 	{pattern_eth_ipv4,
 			ICE_SW_INSET_MAC_IPV4, ICE_INSET_NONE},
 	{pattern_eth_ipv4_udp,
@@ -139,7 +174,7 @@ ice_pattern_match_item ice_switch_pattern_dist_comms[] = {
 };
 
 static struct
-ice_pattern_match_item ice_switch_pattern_dist_os[] = {
+ice_pattern_match_item ice_switch_pattern_perm_os[] = {
 	{pattern_ethertype,
 			ICE_SW_INSET_ETHER, ICE_INSET_NONE},
 	{pattern_eth_arp,
@@ -157,21 +192,25 @@ ice_pattern_match_item ice_switch_pattern_dist_os[] = {
 	{pattern_eth_ipv6_tcp,
 			ICE_SW_INSET_MAC_IPV6_TCP, ICE_INSET_NONE},
 	{pattern_eth_ipv4_udp_vxlan_eth_ipv4,
-			ICE_SW_INSET_DIST_VXLAN_IPV4, ICE_INSET_NONE},
+			ICE_SW_INSET_PERM_TUNNEL_IPV4, ICE_INSET_NONE},
 	{pattern_eth_ipv4_udp_vxlan_eth_ipv4_udp,
-			ICE_SW_INSET_DIST_VXLAN_IPV4_UDP, ICE_INSET_NONE},
+			ICE_SW_INSET_PERM_TUNNEL_IPV4_UDP, ICE_INSET_NONE},
 	{pattern_eth_ipv4_udp_vxlan_eth_ipv4_tcp,
-			ICE_SW_INSET_DIST_VXLAN_IPV4_TCP, ICE_INSET_NONE},
+			ICE_SW_INSET_PERM_TUNNEL_IPV4_TCP, ICE_INSET_NONE},
 	{pattern_eth_ipv4_nvgre_eth_ipv4,
-			ICE_SW_INSET_DIST_NVGRE_IPV4, ICE_INSET_NONE},
+			ICE_SW_INSET_PERM_TUNNEL_IPV4, ICE_INSET_NONE},
 	{pattern_eth_ipv4_nvgre_eth_ipv4_udp,
-			ICE_SW_INSET_DIST_NVGRE_IPV4_UDP, ICE_INSET_NONE},
+			ICE_SW_INSET_PERM_TUNNEL_IPV4_UDP, ICE_INSET_NONE},
 	{pattern_eth_ipv4_nvgre_eth_ipv4_tcp,
-			ICE_SW_INSET_DIST_NVGRE_IPV4_TCP, ICE_INSET_NONE},
+			ICE_SW_INSET_PERM_TUNNEL_IPV4_TCP, ICE_INSET_NONE},
 };
 
 static struct
-ice_pattern_match_item ice_switch_pattern_perm[] = {
+ice_pattern_match_item ice_switch_pattern_perm_comms[] = {
+	{pattern_ethertype,
+			ICE_SW_INSET_ETHER, ICE_INSET_NONE},
+	{pattern_eth_arp,
+		ICE_INSET_NONE, ICE_INSET_NONE},
 	{pattern_eth_ipv4,
 			ICE_SW_INSET_MAC_IPV4, ICE_INSET_NONE},
 	{pattern_eth_ipv4_udp,
@@ -1215,7 +1254,7 @@ ice_switch_init(struct ice_adapter *ad)
 {
 	int ret = 0;
 	struct ice_flow_parser *dist_parser;
-	struct ice_flow_parser *perm_parser = &ice_switch_perm_parser;
+	struct ice_flow_parser *perm_parser;
 
 	if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
 		dist_parser = &ice_switch_dist_parser_comms;
@@ -1224,10 +1263,16 @@ ice_switch_init(struct ice_adapter *ad)
 	else
 		return -EINVAL;
 
-	if (ad->devargs.pipe_mode_support)
+	if (ad->devargs.pipe_mode_support) {
+		if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
+			perm_parser = &ice_switch_perm_parser_comms;
+		else
+			perm_parser = &ice_switch_perm_parser_os;
+
 		ret = ice_register_parser(perm_parser, ad);
-	else
+	} else {
 		ret = ice_register_parser(dist_parser, ad);
+	}
 	return ret;
 }
 
@@ -1235,17 +1280,25 @@ static void
 ice_switch_uninit(struct ice_adapter *ad)
 {
 	struct ice_flow_parser *dist_parser;
-	struct ice_flow_parser *perm_parser = &ice_switch_perm_parser;
+	struct ice_flow_parser *perm_parser;
 
 	if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
 		dist_parser = &ice_switch_dist_parser_comms;
-	else
+	else if (ad->active_pkg_type == ICE_PKG_TYPE_OS_DEFAULT)
 		dist_parser = &ice_switch_dist_parser_os;
+	else
+		return;
+
+	if (ad->devargs.pipe_mode_support) {
+		if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
+			perm_parser = &ice_switch_perm_parser_comms;
+		else
+			perm_parser = &ice_switch_perm_parser_os;
 
-	if (ad->devargs.pipe_mode_support)
 		ice_unregister_parser(perm_parser, ad);
-	else
+	} else {
 		ice_unregister_parser(dist_parser, ad);
+	}
 }
 
 static struct
@@ -1278,10 +1331,19 @@ ice_flow_parser ice_switch_dist_parser_comms = {
 };
 
 static struct
-ice_flow_parser ice_switch_perm_parser = {
+ice_flow_parser ice_switch_perm_parser_os = {
 	.engine = &ice_switch_engine,
-	.array = ice_switch_pattern_perm,
-	.array_len = RTE_DIM(ice_switch_pattern_perm),
+	.array = ice_switch_pattern_perm_os,
+	.array_len = RTE_DIM(ice_switch_pattern_perm_os),
+	.parse_pattern_action = ice_switch_parse_pattern_action,
+	.stage = ICE_FLOW_STAGE_PERMISSION,
+};
+
+static struct
+ice_flow_parser ice_switch_perm_parser_comms = {
+	.engine = &ice_switch_engine,
+	.array = ice_switch_pattern_perm_comms,
+	.array_len = RTE_DIM(ice_switch_pattern_perm_comms),
 	.parse_pattern_action = ice_switch_parse_pattern_action,
 	.stage = ICE_FLOW_STAGE_PERMISSION,
 };
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.572282725 +0000
+++ 0025-net-ice-fix-flow-validation-for-unsupported-patterns.patch	2020-10-28 10:35:11.452829258 +0000
@@ -1,8 +1,10 @@
-From c28c993c8a255b13cb0fb5f8094cebf46176ef1d Mon Sep 17 00:00:00 2001
+From 5071c928825fa508c86ef6b96f6510974ac2ff3a Mon Sep 17 00:00:00 2001
 From: Guinan Sun <guinanx.sun@intel.com>
 Date: Tue, 8 Sep 2020 03:15:05 +0000
 Subject: [PATCH] net/ice: fix flow validation for unsupported patterns
 
+[ upstream commit c28c993c8a255b13cb0fb5f8094cebf46176ef1d ]
+
 When loading the OS default package and the pipeline mode is enabled
 by the "pipeline-mode-support=1" operation. In this case, the wrong
 parser is selected for processing and it will cause the unsupported
@@ -10,124 +12,29 @@
 This patch corrects the parser selection issue.
 
 Fixes: 47d460d63233 ("net/ice: rework switch filter")
-Cc: stable@dpdk.org
 
 Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
 ---
- drivers/net/ice/ice_switch_filter.c | 258 +++++++++++++++++-----------
- 1 file changed, 160 insertions(+), 98 deletions(-)
+ drivers/net/ice/ice_switch_filter.c | 100 ++++++++++++++++++++++------
+ 1 file changed, 81 insertions(+), 19 deletions(-)
 
 diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
-index 24320ac7df..4dfeeef50f 100644
+index c2f5aa78d5..03493ee464 100644
 --- a/drivers/net/ice/ice_switch_filter.c
 +++ b/drivers/net/ice/ice_switch_filter.c
-@@ -139,93 +139,8 @@ struct sw_meta {
+@@ -98,12 +98,47 @@ struct sw_meta {
  
  static struct ice_flow_parser ice_switch_dist_parser_os;
  static struct ice_flow_parser ice_switch_dist_parser_comms;
 -static struct ice_flow_parser ice_switch_perm_parser;
--
--static struct
--ice_pattern_match_item ice_switch_pattern_dist_comms[] = {
--	{pattern_ethertype,
--			ICE_SW_INSET_ETHER, ICE_INSET_NONE},
--	{pattern_ethertype_vlan,
--			ICE_SW_INSET_MAC_VLAN, ICE_INSET_NONE},
--	{pattern_eth_ipv4,
--			ICE_SW_INSET_MAC_IPV4, ICE_INSET_NONE},
--	{pattern_eth_ipv4_udp,
--			ICE_SW_INSET_MAC_IPV4_UDP, ICE_INSET_NONE},
--	{pattern_eth_ipv4_tcp,
--			ICE_SW_INSET_MAC_IPV4_TCP, ICE_INSET_NONE},
--	{pattern_eth_ipv6,
--			ICE_SW_INSET_MAC_IPV6, ICE_INSET_NONE},
--	{pattern_eth_ipv6_udp,
--			ICE_SW_INSET_MAC_IPV6_UDP, ICE_INSET_NONE},
--	{pattern_eth_ipv6_tcp,
--			ICE_SW_INSET_MAC_IPV6_TCP, ICE_INSET_NONE},
--	{pattern_eth_ipv4_udp_vxlan_eth_ipv4,
--			ICE_SW_INSET_DIST_VXLAN_IPV4, ICE_INSET_NONE},
--	{pattern_eth_ipv4_udp_vxlan_eth_ipv4_udp,
--			ICE_SW_INSET_DIST_VXLAN_IPV4_UDP, ICE_INSET_NONE},
--	{pattern_eth_ipv4_udp_vxlan_eth_ipv4_tcp,
--			ICE_SW_INSET_DIST_VXLAN_IPV4_TCP, ICE_INSET_NONE},
--	{pattern_eth_ipv4_nvgre_eth_ipv4,
--			ICE_SW_INSET_DIST_NVGRE_IPV4, ICE_INSET_NONE},
--	{pattern_eth_ipv4_nvgre_eth_ipv4_udp,
--			ICE_SW_INSET_DIST_NVGRE_IPV4_UDP, ICE_INSET_NONE},
--	{pattern_eth_ipv4_nvgre_eth_ipv4_tcp,
--			ICE_SW_INSET_DIST_NVGRE_IPV4_TCP, ICE_INSET_NONE},
--	{pattern_eth_pppoes,
--			ICE_SW_INSET_MAC_PPPOE, ICE_INSET_NONE},
--	{pattern_eth_vlan_pppoes,
--			ICE_SW_INSET_MAC_PPPOE, ICE_INSET_NONE},
--	{pattern_eth_pppoes_proto,
--			ICE_SW_INSET_MAC_PPPOE_PROTO, ICE_INSET_NONE},
--	{pattern_eth_vlan_pppoes_proto,
--			ICE_SW_INSET_MAC_PPPOE_PROTO, ICE_INSET_NONE},
--	{pattern_eth_pppoes_ipv4,
--			ICE_SW_INSET_MAC_PPPOE_IPV4, ICE_INSET_NONE},
--	{pattern_eth_pppoes_ipv4_tcp,
--			ICE_SW_INSET_MAC_PPPOE_IPV4_TCP, ICE_INSET_NONE},
--	{pattern_eth_pppoes_ipv4_udp,
--			ICE_SW_INSET_MAC_PPPOE_IPV4_UDP, ICE_INSET_NONE},
--	{pattern_eth_pppoes_ipv6,
--			ICE_SW_INSET_MAC_PPPOE_IPV6, ICE_INSET_NONE},
--	{pattern_eth_pppoes_ipv6_tcp,
--			ICE_SW_INSET_MAC_PPPOE_IPV6_TCP, ICE_INSET_NONE},
--	{pattern_eth_pppoes_ipv6_udp,
--			ICE_SW_INSET_MAC_PPPOE_IPV6_UDP, ICE_INSET_NONE},
--	{pattern_eth_vlan_pppoes_ipv4,
--			ICE_SW_INSET_MAC_PPPOE_IPV4, ICE_INSET_NONE},
--	{pattern_eth_vlan_pppoes_ipv4_tcp,
--			ICE_SW_INSET_MAC_PPPOE_IPV4_TCP, ICE_INSET_NONE},
--	{pattern_eth_vlan_pppoes_ipv4_udp,
--			ICE_SW_INSET_MAC_PPPOE_IPV4_UDP, ICE_INSET_NONE},
--	{pattern_eth_vlan_pppoes_ipv6,
--			ICE_SW_INSET_MAC_PPPOE_IPV6, ICE_INSET_NONE},
--	{pattern_eth_vlan_pppoes_ipv6_tcp,
--			ICE_SW_INSET_MAC_PPPOE_IPV6_TCP, ICE_INSET_NONE},
--	{pattern_eth_vlan_pppoes_ipv6_udp,
--			ICE_SW_INSET_MAC_PPPOE_IPV6_UDP, ICE_INSET_NONE},
--	{pattern_eth_ipv4_esp,
--			ICE_SW_INSET_MAC_IPV4_ESP, ICE_INSET_NONE},
--	{pattern_eth_ipv4_udp_esp,
--			ICE_SW_INSET_MAC_IPV4_ESP, ICE_INSET_NONE},
--	{pattern_eth_ipv6_esp,
--			ICE_SW_INSET_MAC_IPV6_ESP, ICE_INSET_NONE},
--	{pattern_eth_ipv6_udp_esp,
--			ICE_SW_INSET_MAC_IPV6_ESP, ICE_INSET_NONE},
--	{pattern_eth_ipv4_ah,
--			ICE_SW_INSET_MAC_IPV4_AH, ICE_INSET_NONE},
--	{pattern_eth_ipv6_ah,
--			ICE_SW_INSET_MAC_IPV6_AH, ICE_INSET_NONE},
--	{pattern_eth_ipv6_udp_ah,
--			ICE_INSET_NONE, ICE_INSET_NONE},
--	{pattern_eth_ipv4_l2tp,
--			ICE_SW_INSET_MAC_IPV4_L2TP, ICE_INSET_NONE},
--	{pattern_eth_ipv6_l2tp,
--			ICE_SW_INSET_MAC_IPV6_L2TP, ICE_INSET_NONE},
--	{pattern_eth_ipv4_pfcp,
--			ICE_INSET_NONE, ICE_INSET_NONE},
--	{pattern_eth_ipv6_pfcp,
--			ICE_INSET_NONE, ICE_INSET_NONE},
--};
 +static struct ice_flow_parser ice_switch_perm_parser_os;
 +static struct ice_flow_parser ice_switch_perm_parser_comms;
- 
- static struct
- ice_pattern_match_item ice_switch_pattern_dist_os[] = {
-@@ -262,11 +177,135 @@ ice_pattern_match_item ice_switch_pattern_dist_os[] = {
- };
- 
- static struct
--ice_pattern_match_item ice_switch_pattern_perm[] = {
-+ice_pattern_match_item ice_switch_pattern_dist_comms[] = {
- 	{pattern_ethertype,
- 			ICE_SW_INSET_ETHER, ICE_INSET_NONE},
- 	{pattern_ethertype_vlan,
- 			ICE_SW_INSET_MAC_VLAN, ICE_INSET_NONE},
++
++static struct
++ice_pattern_match_item ice_switch_pattern_dist_os[] = {
++	{pattern_ethertype,
++			ICE_SW_INSET_ETHER, ICE_INSET_NONE},
 +	{pattern_eth_arp,
 +			ICE_INSET_NONE, ICE_INSET_NONE},
 +	{pattern_eth_ipv4,
@@ -154,108 +61,60 @@
 +			ICE_SW_INSET_DIST_NVGRE_IPV4_UDP, ICE_INSET_NONE},
 +	{pattern_eth_ipv4_nvgre_eth_ipv4_tcp,
 +			ICE_SW_INSET_DIST_NVGRE_IPV4_TCP, ICE_INSET_NONE},
-+	{pattern_eth_pppoes,
-+			ICE_SW_INSET_MAC_PPPOE, ICE_INSET_NONE},
-+	{pattern_eth_vlan_pppoes,
-+			ICE_SW_INSET_MAC_PPPOE, ICE_INSET_NONE},
-+	{pattern_eth_pppoes_proto,
-+			ICE_SW_INSET_MAC_PPPOE_PROTO, ICE_INSET_NONE},
-+	{pattern_eth_vlan_pppoes_proto,
-+			ICE_SW_INSET_MAC_PPPOE_PROTO, ICE_INSET_NONE},
-+	{pattern_eth_pppoes_ipv4,
-+			ICE_SW_INSET_MAC_PPPOE_IPV4, ICE_INSET_NONE},
-+	{pattern_eth_pppoes_ipv4_tcp,
-+			ICE_SW_INSET_MAC_PPPOE_IPV4_TCP, ICE_INSET_NONE},
-+	{pattern_eth_pppoes_ipv4_udp,
-+			ICE_SW_INSET_MAC_PPPOE_IPV4_UDP, ICE_INSET_NONE},
-+	{pattern_eth_pppoes_ipv6,
-+			ICE_SW_INSET_MAC_PPPOE_IPV6, ICE_INSET_NONE},
-+	{pattern_eth_pppoes_ipv6_tcp,
-+			ICE_SW_INSET_MAC_PPPOE_IPV6_TCP, ICE_INSET_NONE},
-+	{pattern_eth_pppoes_ipv6_udp,
-+			ICE_SW_INSET_MAC_PPPOE_IPV6_UDP, ICE_INSET_NONE},
-+	{pattern_eth_vlan_pppoes_ipv4,
-+			ICE_SW_INSET_MAC_PPPOE_IPV4, ICE_INSET_NONE},
-+	{pattern_eth_vlan_pppoes_ipv4_tcp,
-+			ICE_SW_INSET_MAC_PPPOE_IPV4_TCP, ICE_INSET_NONE},
-+	{pattern_eth_vlan_pppoes_ipv4_udp,
-+			ICE_SW_INSET_MAC_PPPOE_IPV4_UDP, ICE_INSET_NONE},
-+	{pattern_eth_vlan_pppoes_ipv6,
-+			ICE_SW_INSET_MAC_PPPOE_IPV6, ICE_INSET_NONE},
-+	{pattern_eth_vlan_pppoes_ipv6_tcp,
-+			ICE_SW_INSET_MAC_PPPOE_IPV6_TCP, ICE_INSET_NONE},
-+	{pattern_eth_vlan_pppoes_ipv6_udp,
-+			ICE_SW_INSET_MAC_PPPOE_IPV6_UDP, ICE_INSET_NONE},
-+	{pattern_eth_ipv4_esp,
-+			ICE_SW_INSET_MAC_IPV4_ESP, ICE_INSET_NONE},
-+	{pattern_eth_ipv4_udp_esp,
-+			ICE_SW_INSET_MAC_IPV4_ESP, ICE_INSET_NONE},
-+	{pattern_eth_ipv6_esp,
-+			ICE_SW_INSET_MAC_IPV6_ESP, ICE_INSET_NONE},
-+	{pattern_eth_ipv6_udp_esp,
-+			ICE_SW_INSET_MAC_IPV6_ESP, ICE_INSET_NONE},
-+	{pattern_eth_ipv4_ah,
-+			ICE_SW_INSET_MAC_IPV4_AH, ICE_INSET_NONE},
-+	{pattern_eth_ipv6_ah,
-+			ICE_SW_INSET_MAC_IPV6_AH, ICE_INSET_NONE},
-+	{pattern_eth_ipv6_udp_ah,
-+			ICE_INSET_NONE, ICE_INSET_NONE},
-+	{pattern_eth_ipv4_l2tp,
-+			ICE_SW_INSET_MAC_IPV4_L2TP, ICE_INSET_NONE},
-+	{pattern_eth_ipv6_l2tp,
-+			ICE_SW_INSET_MAC_IPV6_L2TP, ICE_INSET_NONE},
-+	{pattern_eth_ipv4_pfcp,
-+			ICE_INSET_NONE, ICE_INSET_NONE},
-+	{pattern_eth_ipv6_pfcp,
-+			ICE_INSET_NONE, ICE_INSET_NONE},
 +};
-+
-+static struct
-+ice_pattern_match_item ice_switch_pattern_perm_os[] = {
-+	{pattern_ethertype,
-+			ICE_SW_INSET_ETHER, ICE_INSET_NONE},
-+	{pattern_ethertype_vlan,
-+			ICE_SW_INSET_MAC_VLAN, ICE_INSET_NONE},
+ 
+ static struct
+ ice_pattern_match_item ice_switch_pattern_dist_comms[] = {
+ 	{pattern_ethertype,
+ 			ICE_SW_INSET_ETHER, ICE_INSET_NONE},
 +	{pattern_eth_arp,
 +			ICE_INSET_NONE, ICE_INSET_NONE},
-+	{pattern_eth_ipv4,
-+			ICE_SW_INSET_MAC_IPV4, ICE_INSET_NONE},
-+	{pattern_eth_ipv4_udp,
-+			ICE_SW_INSET_MAC_IPV4_UDP, ICE_INSET_NONE},
-+	{pattern_eth_ipv4_tcp,
-+			ICE_SW_INSET_MAC_IPV4_TCP, ICE_INSET_NONE},
-+	{pattern_eth_ipv6,
-+			ICE_SW_INSET_MAC_IPV6, ICE_INSET_NONE},
-+	{pattern_eth_ipv6_udp,
-+			ICE_SW_INSET_MAC_IPV6_UDP, ICE_INSET_NONE},
-+	{pattern_eth_ipv6_tcp,
-+			ICE_SW_INSET_MAC_IPV6_TCP, ICE_INSET_NONE},
-+	{pattern_eth_ipv4_udp_vxlan_eth_ipv4,
+ 	{pattern_eth_ipv4,
+ 			ICE_SW_INSET_MAC_IPV4, ICE_INSET_NONE},
+ 	{pattern_eth_ipv4_udp,
+@@ -139,7 +174,7 @@ ice_pattern_match_item ice_switch_pattern_dist_comms[] = {
+ };
+ 
+ static struct
+-ice_pattern_match_item ice_switch_pattern_dist_os[] = {
++ice_pattern_match_item ice_switch_pattern_perm_os[] = {
+ 	{pattern_ethertype,
+ 			ICE_SW_INSET_ETHER, ICE_INSET_NONE},
+ 	{pattern_eth_arp,
+@@ -157,21 +192,25 @@ ice_pattern_match_item ice_switch_pattern_dist_os[] = {
+ 	{pattern_eth_ipv6_tcp,
+ 			ICE_SW_INSET_MAC_IPV6_TCP, ICE_INSET_NONE},
+ 	{pattern_eth_ipv4_udp_vxlan_eth_ipv4,
+-			ICE_SW_INSET_DIST_VXLAN_IPV4, ICE_INSET_NONE},
 +			ICE_SW_INSET_PERM_TUNNEL_IPV4, ICE_INSET_NONE},
-+	{pattern_eth_ipv4_udp_vxlan_eth_ipv4_udp,
+ 	{pattern_eth_ipv4_udp_vxlan_eth_ipv4_udp,
+-			ICE_SW_INSET_DIST_VXLAN_IPV4_UDP, ICE_INSET_NONE},
 +			ICE_SW_INSET_PERM_TUNNEL_IPV4_UDP, ICE_INSET_NONE},
-+	{pattern_eth_ipv4_udp_vxlan_eth_ipv4_tcp,
+ 	{pattern_eth_ipv4_udp_vxlan_eth_ipv4_tcp,
+-			ICE_SW_INSET_DIST_VXLAN_IPV4_TCP, ICE_INSET_NONE},
 +			ICE_SW_INSET_PERM_TUNNEL_IPV4_TCP, ICE_INSET_NONE},
-+	{pattern_eth_ipv4_nvgre_eth_ipv4,
+ 	{pattern_eth_ipv4_nvgre_eth_ipv4,
+-			ICE_SW_INSET_DIST_NVGRE_IPV4, ICE_INSET_NONE},
 +			ICE_SW_INSET_PERM_TUNNEL_IPV4, ICE_INSET_NONE},
-+	{pattern_eth_ipv4_nvgre_eth_ipv4_udp,
+ 	{pattern_eth_ipv4_nvgre_eth_ipv4_udp,
+-			ICE_SW_INSET_DIST_NVGRE_IPV4_UDP, ICE_INSET_NONE},
 +			ICE_SW_INSET_PERM_TUNNEL_IPV4_UDP, ICE_INSET_NONE},
-+	{pattern_eth_ipv4_nvgre_eth_ipv4_tcp,
+ 	{pattern_eth_ipv4_nvgre_eth_ipv4_tcp,
+-			ICE_SW_INSET_DIST_NVGRE_IPV4_TCP, ICE_INSET_NONE},
 +			ICE_SW_INSET_PERM_TUNNEL_IPV4_TCP, ICE_INSET_NONE},
-+};
-+
-+static struct
+ };
+ 
+ static struct
+-ice_pattern_match_item ice_switch_pattern_perm[] = {
 +ice_pattern_match_item ice_switch_pattern_perm_comms[] = {
 +	{pattern_ethertype,
 +			ICE_SW_INSET_ETHER, ICE_INSET_NONE},
-+	{pattern_ethertype_vlan,
-+			ICE_SW_INSET_MAC_VLAN, ICE_INSET_NONE},
 +	{pattern_eth_arp,
 +		ICE_INSET_NONE, ICE_INSET_NONE},
  	{pattern_eth_ipv4,
  			ICE_SW_INSET_MAC_IPV4, ICE_INSET_NONE},
  	{pattern_eth_ipv4_udp,
-@@ -1813,7 +1852,7 @@ ice_switch_init(struct ice_adapter *ad)
+@@ -1215,7 +1254,7 @@ ice_switch_init(struct ice_adapter *ad)
  {
  	int ret = 0;
  	struct ice_flow_parser *dist_parser;
@@ -264,7 +123,7 @@
  
  	if (ad->active_pkg_type == ICE_PKG_TYPE_COMMS)
  		dist_parser = &ice_switch_dist_parser_comms;
-@@ -1822,10 +1861,16 @@ ice_switch_init(struct ice_adapter *ad)
+@@ -1224,10 +1263,16 @@ ice_switch_init(struct ice_adapter *ad)
  	else
  		return -EINVAL;
  
@@ -283,7 +142,7 @@
  	return ret;
  }
  
-@@ -1833,17 +1878,25 @@ static void
+@@ -1235,17 +1280,25 @@ static void
  ice_switch_uninit(struct ice_adapter *ad)
  {
  	struct ice_flow_parser *dist_parser;
@@ -313,7 +172,7 @@
  }
  
  static struct
-@@ -1877,10 +1930,19 @@ ice_flow_parser ice_switch_dist_parser_comms = {
+@@ -1278,10 +1331,19 @@ ice_flow_parser ice_switch_dist_parser_comms = {
  };
  
  static struct

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

* [dpdk-stable] patch 'ethdev: remove redundant license text' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (23 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/ice: fix flow validation for unsupported patterns' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/iavf: fix command after PF reset' " luca.boccassi
                   ` (181 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Stephen Hemminger, Andrew Rybchenko, Jan Blunck, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 34507c3b03d78a4c3110ccb3d2888b33a12826bb Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 10 Sep 2020 12:08:48 +0100
Subject: [PATCH] ethdev: remove redundant license text

[ upstream commit b895a521f96585e6fe42a248b89e38cc1da81596 ]

Redundant BSD-3 license text removed, the licensing already documented
by "SPDX-License-Identifier: BSD-3-Clause" SPDX tag.

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 lib/librte_ethdev/rte_ethdev_pci.h  | 26 --------------------------
 lib/librte_ethdev/rte_ethdev_vdev.h | 26 --------------------------
 2 files changed, 52 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev_pci.h b/lib/librte_ethdev/rte_ethdev_pci.h
index cca94ec864..d44a8e2a39 100644
--- a/lib/librte_ethdev/rte_ethdev_pci.h
+++ b/lib/librte_ethdev/rte_ethdev_pci.h
@@ -3,32 +3,6 @@
  *
  *   Copyright(c) 2017 Brocade Communications Systems, Inc.
  *   Author: Jan Blunck <jblunck@infradead.org>
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of the copyright holder nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
 #ifndef _RTE_ETHDEV_PCI_H_
diff --git a/lib/librte_ethdev/rte_ethdev_vdev.h b/lib/librte_ethdev/rte_ethdev_vdev.h
index 259feda3f7..0abce0d21c 100644
--- a/lib/librte_ethdev/rte_ethdev_vdev.h
+++ b/lib/librte_ethdev/rte_ethdev_vdev.h
@@ -3,32 +3,6 @@
  *
  *   Copyright(c) 2017 Brocade Communications Systems, Inc.
  *   Author: Jan Blunck <jblunck@infradead.org>
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of the copyright holder nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
 #ifndef _RTE_ETHDEV_VDEV_H_
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.602561809 +0000
+++ 0026-ethdev-remove-redundant-license-text.patch	2020-10-28 10:35:11.452829258 +0000
@@ -1,13 +1,13 @@
-From b895a521f96585e6fe42a248b89e38cc1da81596 Mon Sep 17 00:00:00 2001
+From 34507c3b03d78a4c3110ccb3d2888b33a12826bb Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Thu, 10 Sep 2020 12:08:48 +0100
 Subject: [PATCH] ethdev: remove redundant license text
 
+[ upstream commit b895a521f96585e6fe42a248b89e38cc1da81596 ]
+
 Redundant BSD-3 license text removed, the licensing already documented
 by "SPDX-License-Identifier: BSD-3-Clause" SPDX tag.
 
-Cc: stable@dpdk.org
-
 Reported-by: Stephen Hemminger <stephen@networkplumber.org>
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -17,12 +17,12 @@
  2 files changed, 52 deletions(-)
 
 diff --git a/lib/librte_ethdev/rte_ethdev_pci.h b/lib/librte_ethdev/rte_ethdev_pci.h
-index 6ac6ea41f5..9c483468ba 100644
+index cca94ec864..d44a8e2a39 100644
 --- a/lib/librte_ethdev/rte_ethdev_pci.h
 +++ b/lib/librte_ethdev/rte_ethdev_pci.h
-@@ -1,32 +1,6 @@
- /* SPDX-License-Identifier: BSD-3-Clause
-  * Copyright(c) 2017 Brocade Communications Systems, Inc.
+@@ -3,32 +3,6 @@
+  *
+  *   Copyright(c) 2017 Brocade Communications Systems, Inc.
   *   Author: Jan Blunck <jblunck@infradead.org>
 - *
 - *   Redistribution and use in source and binary forms, with or without
@@ -54,12 +54,12 @@
  
  #ifndef _RTE_ETHDEV_PCI_H_
 diff --git a/lib/librte_ethdev/rte_ethdev_vdev.h b/lib/librte_ethdev/rte_ethdev_vdev.h
-index 64fa689ed3..4ba3f28964 100644
+index 259feda3f7..0abce0d21c 100644
 --- a/lib/librte_ethdev/rte_ethdev_vdev.h
 +++ b/lib/librte_ethdev/rte_ethdev_vdev.h
-@@ -1,32 +1,6 @@
- /* SPDX-License-Identifier: BSD-3-Clause
-  * Copyright(c) 2017 Brocade Communications Systems, Inc.
+@@ -3,32 +3,6 @@
+  *
+  *   Copyright(c) 2017 Brocade Communications Systems, Inc.
   *   Author: Jan Blunck <jblunck@infradead.org>
 - *
 - *   Redistribution and use in source and binary forms, with or without

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

* [dpdk-stable] patch 'net/iavf: fix command after PF reset' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (24 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'ethdev: remove redundant license text' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/ice/base: fix issues around move nodes' " luca.boccassi
                   ` (180 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Jeff Guo; +Cc: Hailin Xu, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 28f7721700ef3a9dad30f8888d0823865fa7b5d8 Mon Sep 17 00:00:00 2001
From: Jeff Guo <jia.guo@intel.com>
Date: Fri, 11 Sep 2020 18:18:48 +0800
Subject: [PATCH] net/iavf: fix command after PF reset

[ upstream commit 1eab95fe2e36e191ad85a9aacf82a44e7c8011fc ]

If PF reset is finished but VF reset is pending, VF should no need to
send any invalid cmd to PF. That would avoid mass unexpected behaviors
affecting the robust.

Fixes: 22b123a36d07 ("net/avf: initialize PMD")
Fixes: 9e03acd726cf ("net/iavf: fix flow access")

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Tested-by: Hailin Xu <hailinx.xu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf.h        | 2 +-
 drivers/net/iavf/iavf_ethdev.c | 3 +++
 drivers/net/iavf/iavf_vchnl.c  | 3 +++
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
index 84f8213542..04f7764456 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
@@ -104,7 +104,7 @@ struct iavf_info {
 	uint32_t link_speed;
 
 	struct iavf_vsi vsi;
-	bool vf_reset;
+	bool vf_reset;	/* true for VF reset pending, false for no VF reset */
 	uint64_t flags;
 
 	uint8_t *rss_lut;
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index a60b04ddd5..02e7006972 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1246,6 +1246,9 @@ iavf_init_vf(struct rte_eth_dev *dev)
 			goto err_rss;
 		}
 	}
+
+	vf->vf_reset = false;
+
 	return 0;
 err_rss:
 	rte_free(vf->rss_key);
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index aba177caec..3e0454593a 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -76,6 +76,9 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
 	if (_atomic_set_cmd(vf, args->ops))
 		return -1;
 
+	if (vf->vf_reset)
+		return -EIO;
+
 	ret = iavf_aq_send_msg_to_pf(hw, args->ops, IAVF_SUCCESS,
 				    args->in_args, args->in_args_size, NULL);
 	if (ret) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.630749809 +0000
+++ 0027-net-iavf-fix-command-after-PF-reset.patch	2020-10-28 10:35:11.456829317 +0000
@@ -1,32 +1,32 @@
-From 1eab95fe2e36e191ad85a9aacf82a44e7c8011fc Mon Sep 17 00:00:00 2001
+From 28f7721700ef3a9dad30f8888d0823865fa7b5d8 Mon Sep 17 00:00:00 2001
 From: Jeff Guo <jia.guo@intel.com>
 Date: Fri, 11 Sep 2020 18:18:48 +0800
 Subject: [PATCH] net/iavf: fix command after PF reset
 
+[ upstream commit 1eab95fe2e36e191ad85a9aacf82a44e7c8011fc ]
+
 If PF reset is finished but VF reset is pending, VF should no need to
 send any invalid cmd to PF. That would avoid mass unexpected behaviors
 affecting the robust.
 
 Fixes: 22b123a36d07 ("net/avf: initialize PMD")
 Fixes: 9e03acd726cf ("net/iavf: fix flow access")
-Cc: stable@dpdk.org
 
 Signed-off-by: Jeff Guo <jia.guo@intel.com>
 Tested-by: Hailin Xu <hailinx.xu@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
 ---
  drivers/net/iavf/iavf.h        | 2 +-
- drivers/net/iavf/iavf_ethdev.c | 2 ++
- drivers/net/iavf/iavf_hash.c   | 8 ++++++++
+ drivers/net/iavf/iavf_ethdev.c | 3 +++
  drivers/net/iavf/iavf_vchnl.c  | 3 +++
- 4 files changed, 14 insertions(+), 1 deletion(-)
+ 3 files changed, 7 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
-index 9ad331ee92..3198d85b3a 100644
+index 84f8213542..04f7764456 100644
 --- a/drivers/net/iavf/iavf.h
 +++ b/drivers/net/iavf/iavf.h
-@@ -134,7 +134,7 @@ struct iavf_info {
- 	uint16_t mc_addrs_num;   /* Multicast mac addresses number */
+@@ -104,7 +104,7 @@ struct iavf_info {
+ 	uint32_t link_speed;
  
  	struct iavf_vsi vsi;
 -	bool vf_reset;
@@ -35,46 +35,21 @@
  
  	uint8_t *rss_lut;
 diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
-index e1ff38e8be..6bb915d816 100644
+index a60b04ddd5..02e7006972 100644
 --- a/drivers/net/iavf/iavf_ethdev.c
 +++ b/drivers/net/iavf/iavf_ethdev.c
-@@ -1285,6 +1285,8 @@ iavf_init_vf(struct rte_eth_dev *dev)
+@@ -1246,6 +1246,9 @@ iavf_init_vf(struct rte_eth_dev *dev)
+ 			goto err_rss;
  		}
  	}
- 
++
 +	vf->vf_reset = false;
 +
  	return 0;
  err_rss:
  	rte_free(vf->rss_key);
-diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
-index ff77d71356..ddc6df8495 100644
---- a/drivers/net/iavf/iavf_hash.c
-+++ b/drivers/net/iavf/iavf_hash.c
-@@ -457,6 +457,9 @@ iavf_hash_init(struct iavf_adapter *ad)
- 	struct iavf_flow_parser *parser;
- 	int ret;
- 
-+	if (vf->vf_reset)
-+		return -EIO;
-+
- 	if (!vf->vf_res)
- 		return -EINVAL;
- 
-@@ -967,6 +970,11 @@ iavf_hash_destroy(__rte_unused struct iavf_adapter *ad,
- static void
- iavf_hash_uninit(struct iavf_adapter *ad)
- {
-+	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(ad);
-+
-+	if (vf->vf_reset)
-+		return;
-+
- 	if (iavf_hash_default_set(ad, false))
- 		PMD_DRV_LOG(ERR, "fail to delete default RSS");
- 
 diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
-index 69e1dc72aa..76f8e38d1e 100644
+index aba177caec..3e0454593a 100644
 --- a/drivers/net/iavf/iavf_vchnl.c
 +++ b/drivers/net/iavf/iavf_vchnl.c
 @@ -76,6 +76,9 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)

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

* [dpdk-stable] patch 'net/ice/base: fix issues around move nodes' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (25 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/iavf: fix command after PF reset' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/i40e/base: fix function header arguments' " luca.boccassi
                   ` (179 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Victor Raj, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 5d6c470fd61e3c36e4fa4f726e5781868aa25dde Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Wed, 26 Aug 2020 13:39:35 +0800
Subject: [PATCH] net/ice/base: fix issues around move nodes

[ upstream commit 252deadabce2c6d3cb2d3307a7fac8c1ea62b6c5 ]

1. Fixed the max children check when moving the last(8th) children. This
   allows the parent node to hold 8 children instead of 7.
2. Check whether the VSI is already part of the given aggregator subtree
   before moving it.

Fixes: 29a0c11489ef ("net/ice/base: clean code")

Signed-off-by: Victor Raj <victor.raj@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_sched.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index 0d2c64e33d..ef439c9ade 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -2228,7 +2228,7 @@ ice_sched_move_nodes(struct ice_port_info *pi, struct ice_sched_node *parent,
 		return ICE_ERR_PARAM;
 
 	/* Does parent have enough space */
-	if (parent->num_children + num_items >=
+	if (parent->num_children + num_items >
 	    hw->max_children[parent->tx_sched_layer])
 		return ICE_ERR_AQ_FULL;
 
@@ -2296,6 +2296,10 @@ ice_sched_move_vsi_to_agg(struct ice_port_info *pi, u16 vsi_handle, u32 agg_id,
 	if (!vsi_node)
 		return ICE_ERR_DOES_NOT_EXIST;
 
+	/* Is this VSI already part of given aggregator? */
+	if (ice_sched_find_node_in_subtree(pi->hw, agg_node, vsi_node))
+		return ICE_SUCCESS;
+
 	aggl = ice_sched_get_agg_layer(pi->hw);
 	vsil = ice_sched_get_vsi_layer(pi->hw);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.662171166 +0000
+++ 0028-net-ice-base-fix-issues-around-move-nodes.patch	2020-10-28 10:35:11.460829376 +0000
@@ -1,15 +1,16 @@
-From 252deadabce2c6d3cb2d3307a7fac8c1ea62b6c5 Mon Sep 17 00:00:00 2001
+From 5d6c470fd61e3c36e4fa4f726e5781868aa25dde Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang@intel.com>
 Date: Wed, 26 Aug 2020 13:39:35 +0800
 Subject: [PATCH] net/ice/base: fix issues around move nodes
 
+[ upstream commit 252deadabce2c6d3cb2d3307a7fac8c1ea62b6c5 ]
+
 1. Fixed the max children check when moving the last(8th) children. This
    allows the parent node to hold 8 children instead of 7.
 2. Check whether the VSI is already part of the given aggregator subtree
    before moving it.
 
 Fixes: 29a0c11489ef ("net/ice/base: clean code")
-Cc: stable@dpdk.org
 
 Signed-off-by: Victor Raj <victor.raj@intel.com>
 Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -19,10 +20,10 @@
  1 file changed, 5 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
-index cf9a6a777d..edd90aecb6 100644
+index 0d2c64e33d..ef439c9ade 100644
 --- a/drivers/net/ice/base/ice_sched.c
 +++ b/drivers/net/ice/base/ice_sched.c
-@@ -2267,7 +2267,7 @@ ice_sched_move_nodes(struct ice_port_info *pi, struct ice_sched_node *parent,
+@@ -2228,7 +2228,7 @@ ice_sched_move_nodes(struct ice_port_info *pi, struct ice_sched_node *parent,
  		return ICE_ERR_PARAM;
  
  	/* Does parent have enough space */
@@ -31,7 +32,7 @@
  	    hw->max_children[parent->tx_sched_layer])
  		return ICE_ERR_AQ_FULL;
  
-@@ -2335,6 +2335,10 @@ ice_sched_move_vsi_to_agg(struct ice_port_info *pi, u16 vsi_handle, u32 agg_id,
+@@ -2296,6 +2296,10 @@ ice_sched_move_vsi_to_agg(struct ice_port_info *pi, u16 vsi_handle, u32 agg_id,
  	if (!vsi_node)
  		return ICE_ERR_DOES_NOT_EXIST;
  

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

* [dpdk-stable] patch 'net/i40e/base: fix function header arguments' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (26 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/ice/base: fix issues around move nodes' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/i40e/base: fix Rx only for unicast promisc on VLAN' " luca.boccassi
                   ` (178 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Guinan Sun; +Cc: Jesse Brandeburg, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From e6d1ea8abf05bf2d0b50f93c06c0cd43e4eab682 Mon Sep 17 00:00:00 2001
From: Guinan Sun <guinanx.sun@intel.com>
Date: Sat, 12 Sep 2020 03:00:34 +0000
Subject: [PATCH] net/i40e/base: fix function header arguments

[ upstream commit 36fcba1ff56a99bd052cc8f1e24fb5fd4afe27ac ]

Fix them by adding the argument descriptions.

Fixes: 0d9d27bb8684 ("i40e/base: prepare local LLDP MIB in TLV")

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_dcb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c
index d99bd6e3f8..5a1f9903a5 100644
--- a/drivers/net/i40e/base/i40e_dcb.c
+++ b/drivers/net/i40e/base/i40e_dcb.c
@@ -1212,7 +1212,8 @@ enum i40e_status_code i40e_set_dcb_config(struct i40e_hw *hw)
 
 /**
  * i40e_dcb_config_to_lldp - Convert Dcbconfig to MIB format
- * @hw: pointer to the hw struct
+ * @lldpmib: pointer to mib to be output
+ * @miblen: pointer to u16 for length of lldpmib
  * @dcbcfg: store for LLDPDU data
  *
  * send DCB configuration to FW
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.695181445 +0000
+++ 0029-net-i40e-base-fix-function-header-arguments.patch	2020-10-28 10:35:11.460829376 +0000
@@ -1,12 +1,13 @@
-From 36fcba1ff56a99bd052cc8f1e24fb5fd4afe27ac Mon Sep 17 00:00:00 2001
+From e6d1ea8abf05bf2d0b50f93c06c0cd43e4eab682 Mon Sep 17 00:00:00 2001
 From: Guinan Sun <guinanx.sun@intel.com>
 Date: Sat, 12 Sep 2020 03:00:34 +0000
 Subject: [PATCH] net/i40e/base: fix function header arguments
 
+[ upstream commit 36fcba1ff56a99bd052cc8f1e24fb5fd4afe27ac ]
+
 Fix them by adding the argument descriptions.
 
 Fixes: 0d9d27bb8684 ("i40e/base: prepare local LLDP MIB in TLV")
-Cc: stable@dpdk.org
 
 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
 Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
@@ -16,10 +17,10 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c
-index a07c61e673..388af3d64d 100644
+index d99bd6e3f8..5a1f9903a5 100644
 --- a/drivers/net/i40e/base/i40e_dcb.c
 +++ b/drivers/net/i40e/base/i40e_dcb.c
-@@ -1267,7 +1267,8 @@ enum i40e_status_code i40e_set_dcb_config(struct i40e_hw *hw)
+@@ -1212,7 +1212,8 @@ enum i40e_status_code i40e_set_dcb_config(struct i40e_hw *hw)
  
  /**
   * i40e_dcb_config_to_lldp - Convert Dcbconfig to MIB format

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

* [dpdk-stable] patch 'net/i40e/base: fix Rx only for unicast promisc on VLAN' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (27 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/i40e/base: fix function header arguments' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/tap: free mempool when closing' " luca.boccassi
                   ` (177 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Guinan Sun; +Cc: Przemyslaw Patynowski, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 4b0dfbac70b79c215c89ced4bc66565b4f2d565c Mon Sep 17 00:00:00 2001
From: Guinan Sun <guinanx.sun@intel.com>
Date: Sat, 12 Sep 2020 03:00:36 +0000
Subject: [PATCH] net/i40e/base: fix Rx only for unicast promisc on VLAN

[ upstream commit 2972fc3f4000108cf48b49389851278abb35425a ]

Set promiscuous mode to rx traffic only if VSI has VLANs configured.
Rename misleading PROMISC_TX bit to proper name.
Added I40E_AQC_SET_VSI_PROMISC_RX_ONLY during VSI unicast promiscuous
mode configuration with port VLAN.
Aligned unicast promiscuous with VLAN to the one without VLAN.
Previously other VFs could listen to unicast tx traffic of other VFs.

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

Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_adminq_cmd.h |  2 +-
 drivers/net/i40e/base/i40e_common.c     | 36 +++++++++++++++++++------
 2 files changed, 29 insertions(+), 9 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index cd7f24cf14..48f93313bd 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1215,7 +1215,7 @@ struct i40e_aqc_set_vsi_promiscuous_modes {
 #define I40E_AQC_SET_VSI_PROMISC_BROADCAST	0x04
 #define I40E_AQC_SET_VSI_DEFAULT		0x08
 #define I40E_AQC_SET_VSI_PROMISC_VLAN		0x10
-#define I40E_AQC_SET_VSI_PROMISC_TX		0x8000
+#define I40E_AQC_SET_VSI_PROMISC_RX_ONLY	0x8000
 	__le16	seid;
 #define I40E_AQC_VSI_PROM_CMD_SEID_MASK		0x3FF
 	__le16	vlan_tag;
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 2172ea12fc..f179306e2e 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2222,6 +2222,22 @@ enum i40e_status_code i40e_aq_set_phy_debug(struct i40e_hw *hw, u8 cmd_flags,
 	return status;
 }
 
+/**
+ * i40e_hw_ver_ge
+ * @hw: pointer to the hw struct
+ * @maj: api major value
+ * @min: api minor value
+ *
+ * Assert whether current HW api version is greater/equal than provided.
+ **/
+static bool i40e_hw_ver_ge(struct i40e_hw *hw, u16 maj, u16 min)
+{
+	if (hw->aq.api_maj_ver > maj ||
+	    (hw->aq.api_maj_ver == maj && hw->aq.api_min_ver >= min))
+		return true;
+	return false;
+}
+
 /**
  * i40e_aq_add_vsi
  * @hw: pointer to the hw struct
@@ -2347,18 +2363,16 @@ enum i40e_status_code i40e_aq_set_vsi_unicast_promiscuous(struct i40e_hw *hw,
 
 	if (set) {
 		flags |= I40E_AQC_SET_VSI_PROMISC_UNICAST;
-		if (rx_only_promisc &&
-		    (((hw->aq.api_maj_ver == 1) && (hw->aq.api_min_ver >= 5)) ||
-		     (hw->aq.api_maj_ver > 1)))
-			flags |= I40E_AQC_SET_VSI_PROMISC_TX;
+		if (rx_only_promisc && i40e_hw_ver_ge(hw, 1, 5))
+			flags |= I40E_AQC_SET_VSI_PROMISC_RX_ONLY;
 	}
 
 	cmd->promiscuous_flags = CPU_TO_LE16(flags);
 
 	cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_UNICAST);
-	if (((hw->aq.api_maj_ver >= 1) && (hw->aq.api_min_ver >= 5)) ||
-	     (hw->aq.api_maj_ver > 1))
-		cmd->valid_flags |= CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_TX);
+	if (i40e_hw_ver_ge(hw, 1, 5))
+		cmd->valid_flags |=
+			CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_RX_ONLY);
 
 	cmd->seid = CPU_TO_LE16(seid);
 	status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
@@ -2490,11 +2504,17 @@ enum i40e_status_code i40e_aq_set_vsi_uc_promisc_on_vlan(struct i40e_hw *hw,
 	i40e_fill_default_direct_cmd_desc(&desc,
 					i40e_aqc_opc_set_vsi_promiscuous_modes);
 
-	if (enable)
+	if (enable) {
 		flags |= I40E_AQC_SET_VSI_PROMISC_UNICAST;
+		if (i40e_hw_ver_ge(hw, 1, 5))
+			flags |= I40E_AQC_SET_VSI_PROMISC_RX_ONLY;
+	}
 
 	cmd->promiscuous_flags = CPU_TO_LE16(flags);
 	cmd->valid_flags = CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_UNICAST);
+	if (i40e_hw_ver_ge(hw, 1, 5))
+		cmd->valid_flags |=
+			CPU_TO_LE16(I40E_AQC_SET_VSI_PROMISC_RX_ONLY);
 	cmd->seid = CPU_TO_LE16(seid);
 	cmd->vlan_tag = CPU_TO_LE16(vid | I40E_AQC_SET_VSI_VLAN_VALID);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.724760888 +0000
+++ 0030-net-i40e-base-fix-Rx-only-for-unicast-promisc-on-VLA.patch	2020-10-28 10:35:11.468829494 +0000
@@ -1,8 +1,10 @@
-From 2972fc3f4000108cf48b49389851278abb35425a Mon Sep 17 00:00:00 2001
+From 4b0dfbac70b79c215c89ced4bc66565b4f2d565c Mon Sep 17 00:00:00 2001
 From: Guinan Sun <guinanx.sun@intel.com>
 Date: Sat, 12 Sep 2020 03:00:36 +0000
 Subject: [PATCH] net/i40e/base: fix Rx only for unicast promisc on VLAN
 
+[ upstream commit 2972fc3f4000108cf48b49389851278abb35425a ]
+
 Set promiscuous mode to rx traffic only if VSI has VLANs configured.
 Rename misleading PROMISC_TX bit to proper name.
 Added I40E_AQC_SET_VSI_PROMISC_RX_ONLY during VSI unicast promiscuous
@@ -11,7 +13,6 @@
 Previously other VFs could listen to unicast tx traffic of other VFs.
 
 Fixes: 8db9e2a1b232 ("i40e: base driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com>
 Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
@@ -22,10 +23,10 @@
  2 files changed, 29 insertions(+), 9 deletions(-)
 
 diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
-index 65831ea7ab..2ca41db5d3 100644
+index cd7f24cf14..48f93313bd 100644
 --- a/drivers/net/i40e/base/i40e_adminq_cmd.h
 +++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
-@@ -1222,7 +1222,7 @@ struct i40e_aqc_set_vsi_promiscuous_modes {
+@@ -1215,7 +1215,7 @@ struct i40e_aqc_set_vsi_promiscuous_modes {
  #define I40E_AQC_SET_VSI_PROMISC_BROADCAST	0x04
  #define I40E_AQC_SET_VSI_DEFAULT		0x08
  #define I40E_AQC_SET_VSI_PROMISC_VLAN		0x10
@@ -35,10 +36,10 @@
  #define I40E_AQC_VSI_PROM_CMD_SEID_MASK		0x3FF
  	__le16	vlan_tag;
 diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
-index 15f4e91a40..cd8b27e407 100644
+index 2172ea12fc..f179306e2e 100644
 --- a/drivers/net/i40e/base/i40e_common.c
 +++ b/drivers/net/i40e/base/i40e_common.c
-@@ -2270,6 +2270,22 @@ enum i40e_status_code i40e_aq_set_phy_debug(struct i40e_hw *hw, u8 cmd_flags,
+@@ -2222,6 +2222,22 @@ enum i40e_status_code i40e_aq_set_phy_debug(struct i40e_hw *hw, u8 cmd_flags,
  	return status;
  }
  
@@ -61,7 +62,7 @@
  /**
   * i40e_aq_add_vsi
   * @hw: pointer to the hw struct
-@@ -2395,18 +2411,16 @@ enum i40e_status_code i40e_aq_set_vsi_unicast_promiscuous(struct i40e_hw *hw,
+@@ -2347,18 +2363,16 @@ enum i40e_status_code i40e_aq_set_vsi_unicast_promiscuous(struct i40e_hw *hw,
  
  	if (set) {
  		flags |= I40E_AQC_SET_VSI_PROMISC_UNICAST;
@@ -85,7 +86,7 @@
  
  	cmd->seid = CPU_TO_LE16(seid);
  	status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
-@@ -2538,11 +2552,17 @@ enum i40e_status_code i40e_aq_set_vsi_uc_promisc_on_vlan(struct i40e_hw *hw,
+@@ -2490,11 +2504,17 @@ enum i40e_status_code i40e_aq_set_vsi_uc_promisc_on_vlan(struct i40e_hw *hw,
  	i40e_fill_default_direct_cmd_desc(&desc,
  					i40e_aqc_opc_set_vsi_promiscuous_modes);
  

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

* [dpdk-stable] patch 'net/tap: free mempool when closing' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (28 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/i40e/base: fix Rx only for unicast promisc on VLAN' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/dpaa2: fix misuse of interface index' " luca.boccassi
                   ` (176 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 81230a8e0dc3cdc176e0704fb37e5bcf425c8351 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Sat, 8 Aug 2020 17:58:43 +0800
Subject: [PATCH] net/tap: free mempool when closing

[ upstream commit 05a8e4a35d3ca9c1e5271917ad081ba78cd73fce ]

When setup tx queues, we will create a mempool for the 'gso_ctx'.
The mempool is not freed when closing tap device. If free the tap
device and create it with different name, it will create a new
mempool. This maybe cause an OOM.

The snprintf function return value is not checked and the mempool
name may be truncated. This patch also fix it.

Fixes: 050316a88313 ("net/tap: support TSO (TCP Segment Offload)")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/tap/rte_eth_tap.c | 43 +++++++++++++++++++++--------------
 drivers/net/tap/rte_eth_tap.h |  1 +
 2 files changed, 27 insertions(+), 17 deletions(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 7081ae23e9..cfbd579cd6 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1070,6 +1070,9 @@ tap_dev_close(struct rte_eth_dev *dev)
 				&internals->remote_initial_flags);
 	}
 
+	rte_mempool_free(internals->gso_ctx_mp);
+	internals->gso_ctx_mp = NULL;
+
 	if (internals->ka_fd != -1) {
 		close(internals->ka_fd);
 		internals->ka_fd = -1;
@@ -1317,26 +1320,31 @@ tap_gso_ctx_setup(struct rte_gso_ctx *gso_ctx, struct rte_eth_dev *dev)
 {
 	uint32_t gso_types;
 	char pool_name[64];
-
-	/*
-	 * Create private mbuf pool with TAP_GSO_MBUF_SEG_SIZE bytes
-	 * size per mbuf use this pool for both direct and indirect mbufs
-	 */
-
-	struct rte_mempool *mp;      /* Mempool for GSO packets */
+	struct pmd_internals *pmd = dev->data->dev_private;
+	int ret;
 
 	/* initialize GSO context */
 	gso_types = DEV_TX_OFFLOAD_TCP_TSO;
-	snprintf(pool_name, sizeof(pool_name), "mp_%s", dev->device->name);
-	mp = rte_mempool_lookup((const char *)pool_name);
-	if (!mp) {
-		mp = rte_pktmbuf_pool_create(pool_name, TAP_GSO_MBUFS_NUM,
-			TAP_GSO_MBUF_CACHE_SIZE, 0,
+	if (!pmd->gso_ctx_mp) {
+		/*
+		 * Create private mbuf pool with TAP_GSO_MBUF_SEG_SIZE
+		 * bytes size per mbuf use this pool for both direct and
+		 * indirect mbufs
+		 */
+		ret = snprintf(pool_name, sizeof(pool_name), "mp_%s",
+				dev->device->name);
+		if (ret < 0 || ret >= (int)sizeof(pool_name)) {
+			TAP_LOG(ERR,
+				"%s: failed to create mbuf pool name for device %s,"
+				"device name too long or output error, ret: %d\n",
+				pmd->name, dev->device->name, ret);
+			return -ENAMETOOLONG;
+		}
+		pmd->gso_ctx_mp = rte_pktmbuf_pool_create(pool_name,
+			TAP_GSO_MBUFS_NUM, TAP_GSO_MBUF_CACHE_SIZE, 0,
 			RTE_PKTMBUF_HEADROOM + TAP_GSO_MBUF_SEG_SIZE,
 			SOCKET_ID_ANY);
-		if (!mp) {
-			struct pmd_internals *pmd = dev->data->dev_private;
-
+		if (!pmd->gso_ctx_mp) {
 			TAP_LOG(ERR,
 				"%s: failed to create mbuf pool for device %s\n",
 				pmd->name, dev->device->name);
@@ -1344,8 +1352,8 @@ tap_gso_ctx_setup(struct rte_gso_ctx *gso_ctx, struct rte_eth_dev *dev)
 		}
 	}
 
-	gso_ctx->direct_pool = mp;
-	gso_ctx->indirect_pool = mp;
+	gso_ctx->direct_pool = pmd->gso_ctx_mp;
+	gso_ctx->indirect_pool = pmd->gso_ctx_mp;
 	gso_ctx->gso_types = gso_types;
 	gso_ctx->gso_size = 0; /* gso_size is set in tx_burst() per packet */
 	gso_ctx->flag = 0;
@@ -1842,6 +1850,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, const char *tap_name,
 	pmd->type = type;
 	pmd->ka_fd = -1;
 	pmd->nlsk_fd = -1;
+	pmd->gso_ctx_mp = NULL;
 
 	pmd->ioctl_sock = socket(AF_INET, SOCK_DGRAM, 0);
 	if (pmd->ioctl_sock == -1) {
diff --git a/drivers/net/tap/rte_eth_tap.h b/drivers/net/tap/rte_eth_tap.h
index 8d6d53dc0a..ba45de8409 100644
--- a/drivers/net/tap/rte_eth_tap.h
+++ b/drivers/net/tap/rte_eth_tap.h
@@ -91,6 +91,7 @@ struct pmd_internals {
 	struct tx_queue txq[RTE_PMD_TAP_MAX_QUEUES]; /* List of TX queues */
 	struct rte_intr_handle intr_handle;          /* LSC interrupt handle. */
 	int ka_fd;                        /* keep-alive file descriptor */
+	struct rte_mempool *gso_ctx_mp;     /* Mempool for GSO packets */
 };
 
 struct pmd_process_private {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.762696151 +0000
+++ 0031-net-tap-free-mempool-when-closing.patch	2020-10-28 10:35:11.472829553 +0000
@@ -1,8 +1,10 @@
-From 05a8e4a35d3ca9c1e5271917ad081ba78cd73fce Mon Sep 17 00:00:00 2001
+From 81230a8e0dc3cdc176e0704fb37e5bcf425c8351 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Sat, 8 Aug 2020 17:58:43 +0800
 Subject: [PATCH] net/tap: free mempool when closing
 
+[ upstream commit 05a8e4a35d3ca9c1e5271917ad081ba78cd73fce ]
+
 When setup tx queues, we will create a mempool for the 'gso_ctx'.
 The mempool is not freed when closing tap device. If free the tap
 device and create it with different name, it will create a new
@@ -12,7 +14,6 @@
 name may be truncated. This patch also fix it.
 
 Fixes: 050316a88313 ("net/tap: support TSO (TCP Segment Offload)")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -22,10 +23,10 @@
  2 files changed, 27 insertions(+), 17 deletions(-)
 
 diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
-index b19e26ba0e..df16aa4ea7 100644
+index 7081ae23e9..cfbd579cd6 100644
 --- a/drivers/net/tap/rte_eth_tap.c
 +++ b/drivers/net/tap/rte_eth_tap.c
-@@ -1105,6 +1105,9 @@ tap_dev_close(struct rte_eth_dev *dev)
+@@ -1070,6 +1070,9 @@ tap_dev_close(struct rte_eth_dev *dev)
  				&internals->remote_initial_flags);
  	}
  
@@ -35,7 +36,7 @@
  	if (internals->ka_fd != -1) {
  		close(internals->ka_fd);
  		internals->ka_fd = -1;
-@@ -1352,26 +1355,31 @@ tap_gso_ctx_setup(struct rte_gso_ctx *gso_ctx, struct rte_eth_dev *dev)
+@@ -1317,26 +1320,31 @@ tap_gso_ctx_setup(struct rte_gso_ctx *gso_ctx, struct rte_eth_dev *dev)
  {
  	uint32_t gso_types;
  	char pool_name[64];
@@ -82,7 +83,7 @@
  			TAP_LOG(ERR,
  				"%s: failed to create mbuf pool for device %s\n",
  				pmd->name, dev->device->name);
-@@ -1379,8 +1387,8 @@ tap_gso_ctx_setup(struct rte_gso_ctx *gso_ctx, struct rte_eth_dev *dev)
+@@ -1344,8 +1352,8 @@ tap_gso_ctx_setup(struct rte_gso_ctx *gso_ctx, struct rte_eth_dev *dev)
  		}
  	}
  
@@ -93,7 +94,7 @@
  	gso_ctx->gso_types = gso_types;
  	gso_ctx->gso_size = 0; /* gso_size is set in tx_burst() per packet */
  	gso_ctx->flag = 0;
-@@ -1877,6 +1885,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, const char *tap_name,
+@@ -1842,6 +1850,7 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, const char *tap_name,
  	pmd->type = type;
  	pmd->ka_fd = -1;
  	pmd->nlsk_fd = -1;

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

* [dpdk-stable] patch 'net/dpaa2: fix misuse of interface index' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (29 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/tap: free mempool when closing' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/pfe: " luca.boccassi
                   ` (175 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Sachin Saxena; +Cc: Stephen Hemminger, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 908a58c8067c71282aa287ffa783f830c07222e1 Mon Sep 17 00:00:00 2001
From: Sachin Saxena <sachin.saxena@nxp.com>
Date: Mon, 14 Sep 2020 19:51:18 +0530
Subject: [PATCH] net/dpaa2: fix misuse of interface index

[ upstream commit 88e584a60d48b4416ad35649c2468656b514a449 ]

Dpaa2 pmd has no need to bound host interface
for which we require if_index field.
Setting it to 0 as unused.

Fixes: 3e5a335d3f88 ("net/dpaa2: add basic operations")

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index d7c9922a55..4443e0f133 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -249,8 +249,6 @@ dpaa2_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 
 	PMD_INIT_FUNC_TRACE();
 
-	dev_info->if_index = priv->hw_id;
-
 	dev_info->max_mac_addrs = priv->max_mac_filters;
 	dev_info->max_rx_pktlen = DPAA2_MAX_RX_PKT_LEN;
 	dev_info->min_rx_bufsize = DPAA2_MIN_RX_BUF_SIZE;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.793271257 +0000
+++ 0032-net-dpaa2-fix-misuse-of-interface-index.patch	2020-10-28 10:35:11.476829611 +0000
@@ -1,14 +1,15 @@
-From 88e584a60d48b4416ad35649c2468656b514a449 Mon Sep 17 00:00:00 2001
+From 908a58c8067c71282aa287ffa783f830c07222e1 Mon Sep 17 00:00:00 2001
 From: Sachin Saxena <sachin.saxena@nxp.com>
 Date: Mon, 14 Sep 2020 19:51:18 +0530
 Subject: [PATCH] net/dpaa2: fix misuse of interface index
 
+[ upstream commit 88e584a60d48b4416ad35649c2468656b514a449 ]
+
 Dpaa2 pmd has no need to bound host interface
 for which we require if_index field.
 Setting it to 0 as unused.
 
 Fixes: 3e5a335d3f88 ("net/dpaa2: add basic operations")
-Cc: stable@dpdk.org
 
 Reported-by: Stephen Hemminger <stephen@networkplumber.org>
 Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
@@ -18,10 +19,10 @@
  1 file changed, 2 deletions(-)
 
 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
-index 0e9f836e55..02daa4d250 100644
+index d7c9922a55..4443e0f133 100644
 --- a/drivers/net/dpaa2/dpaa2_ethdev.c
 +++ b/drivers/net/dpaa2/dpaa2_ethdev.c
-@@ -241,8 +241,6 @@ dpaa2_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -249,8 +249,6 @@ dpaa2_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
  
  	PMD_INIT_FUNC_TRACE();
  

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

* [dpdk-stable] patch 'net/pfe: fix misuse of interface index' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (30 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/dpaa2: fix misuse of interface index' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/dpaa: fix port ID type in API' " luca.boccassi
                   ` (174 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Sachin Saxena; +Cc: Stephen Hemminger, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 5079b7514da6e7f4a5b08b2a0cfcedf0b64314e6 Mon Sep 17 00:00:00 2001
From: Sachin Saxena <sachin.saxena@nxp.com>
Date: Mon, 14 Sep 2020 19:52:17 +0530
Subject: [PATCH] net/pfe: fix misuse of interface index

[ upstream commit 3351a1036ecfbf0d1fdf18269c0073543ea69d0c ]

Pfe pmd has no need to bound host interface
for which we require if_index field.
Setting it to 0 as unused.

Fixes: fe38ad9ba73e ("net/pfe: add device start/stop")

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/pfe/pfe_ethdev.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
index b1de866d34..5a231918a1 100644
--- a/drivers/net/pfe/pfe_ethdev.c
+++ b/drivers/net/pfe/pfe_ethdev.c
@@ -429,9 +429,6 @@ static int
 pfe_eth_info(struct rte_eth_dev *dev,
 		struct rte_eth_dev_info *dev_info)
 {
-	struct pfe_eth_priv_s *internals = dev->data->dev_private;
-
-	dev_info->if_index = internals->id;
 	dev_info->max_mac_addrs = PFE_MAX_MACS;
 	dev_info->max_rx_queues = dev->data->nb_rx_queues;
 	dev_info->max_tx_queues = dev->data->nb_tx_queues;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.824056350 +0000
+++ 0033-net-pfe-fix-misuse-of-interface-index.patch	2020-10-28 10:35:11.476829611 +0000
@@ -1,14 +1,15 @@
-From 3351a1036ecfbf0d1fdf18269c0073543ea69d0c Mon Sep 17 00:00:00 2001
+From 5079b7514da6e7f4a5b08b2a0cfcedf0b64314e6 Mon Sep 17 00:00:00 2001
 From: Sachin Saxena <sachin.saxena@nxp.com>
 Date: Mon, 14 Sep 2020 19:52:17 +0530
 Subject: [PATCH] net/pfe: fix misuse of interface index
 
+[ upstream commit 3351a1036ecfbf0d1fdf18269c0073543ea69d0c ]
+
 Pfe pmd has no need to bound host interface
 for which we require if_index field.
 Setting it to 0 as unused.
 
 Fixes: fe38ad9ba73e ("net/pfe: add device start/stop")
-Cc: stable@dpdk.org
 
 Reported-by: Stephen Hemminger <stephen@networkplumber.org>
 Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
@@ -18,10 +19,10 @@
  1 file changed, 3 deletions(-)
 
 diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
-index 368acfa554..97356d2b0b 100644
+index b1de866d34..5a231918a1 100644
 --- a/drivers/net/pfe/pfe_ethdev.c
 +++ b/drivers/net/pfe/pfe_ethdev.c
-@@ -427,9 +427,6 @@ static int
+@@ -429,9 +429,6 @@ static int
  pfe_eth_info(struct rte_eth_dev *dev,
  		struct rte_eth_dev_info *dev_info)
  {

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

* [dpdk-stable] patch 'net/dpaa: fix port ID type in API' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (31 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/pfe: " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/cxgbe: fix duplicate MAC addresses in MPS TCAM' " luca.boccassi
                   ` (173 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From f93ade8e2e3a0454f62fbbbf8e15872857a87232 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 25 Aug 2020 18:51:06 +0100
Subject: [PATCH] net/dpaa: fix port ID type in API

[ upstream commit ae8f4cf3283e4036b56709cee74ddfa386de5f6b ]

Updating the type for 'port' variable from 'uint8_t' to 'uint16_t'.

Fixes: 8c3495f5d2dd ("net/dpaa: support loopback API")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c  | 2 +-
 drivers/net/dpaa/rte_pmd_dpaa.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 5f81968d80..a54ec0deb6 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -1120,7 +1120,7 @@ is_dpaa_supported(struct rte_eth_dev *dev)
 }
 
 int
-rte_pmd_dpaa_set_tx_loopback(uint8_t port, uint8_t on)
+rte_pmd_dpaa_set_tx_loopback(uint16_t port, uint8_t on)
 {
 	struct rte_eth_dev *dev;
 	struct dpaa_if *dpaa_intf;
diff --git a/drivers/net/dpaa/rte_pmd_dpaa.h b/drivers/net/dpaa/rte_pmd_dpaa.h
index 8d244bb491..ec45633ba2 100644
--- a/drivers/net/dpaa/rte_pmd_dpaa.h
+++ b/drivers/net/dpaa/rte_pmd_dpaa.h
@@ -29,6 +29,6 @@
  *   - (-EINVAL) if bad parameter.
  */
 int
-rte_pmd_dpaa_set_tx_loopback(uint8_t port, uint8_t on);
+rte_pmd_dpaa_set_tx_loopback(uint16_t port, uint8_t on);
 
 #endif /* _PMD_DPAA_H_ */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.853715367 +0000
+++ 0034-net-dpaa-fix-port-ID-type-in-API.patch	2020-10-28 10:35:11.476829611 +0000
@@ -1,40 +1,26 @@
-From ae8f4cf3283e4036b56709cee74ddfa386de5f6b Mon Sep 17 00:00:00 2001
+From f93ade8e2e3a0454f62fbbbf8e15872857a87232 Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Tue, 25 Aug 2020 18:51:06 +0100
 Subject: [PATCH] net/dpaa: fix port ID type in API
 
+[ upstream commit ae8f4cf3283e4036b56709cee74ddfa386de5f6b ]
+
 Updating the type for 'port' variable from 'uint8_t' to 'uint16_t'.
 
 Fixes: 8c3495f5d2dd ("net/dpaa: support loopback API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
 ---
- doc/guides/rel_notes/deprecation.rst | 3 ---
- drivers/net/dpaa/dpaa_ethdev.c       | 2 +-
- drivers/net/dpaa/rte_pmd_dpaa.h      | 2 +-
- 3 files changed, 2 insertions(+), 5 deletions(-)
+ drivers/net/dpaa/dpaa_ethdev.c  | 2 +-
+ drivers/net/dpaa/rte_pmd_dpaa.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
-index 09646b29fb..5f568f4b72 100644
---- a/doc/guides/rel_notes/deprecation.rst
-+++ b/doc/guides/rel_notes/deprecation.rst
-@@ -193,9 +193,6 @@ Deprecation Notices
-   following the IPv6 header, as proposed in RFC
-   https://mails.dpdk.org/archives/dev/2020-August/177257.html.
- 
--* pmd_dpaa: The API ``rte_pmd_dpaa_set_tx_loopback`` will have extended
--  ``port_id`` definition from ``uint8_t`` to ``uint16_t``.
--
- * vhost: Vhost-user dequeue zero-copy support will be removed in 20.11.
-   The only known user is OVS where the feature is still experimental,
-   and has not received any update for 2.5 years.
 diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
-index a077b98c3e..8a6b19b5ce 100644
+index 5f81968d80..a54ec0deb6 100644
 --- a/drivers/net/dpaa/dpaa_ethdev.c
 +++ b/drivers/net/dpaa/dpaa_ethdev.c
-@@ -1473,7 +1473,7 @@ is_dpaa_supported(struct rte_eth_dev *dev)
+@@ -1120,7 +1120,7 @@ is_dpaa_supported(struct rte_eth_dev *dev)
  }
  
  int
@@ -42,7 +28,7 @@
 +rte_pmd_dpaa_set_tx_loopback(uint16_t port, uint8_t on)
  {
  	struct rte_eth_dev *dev;
- 
+ 	struct dpaa_if *dpaa_intf;
 diff --git a/drivers/net/dpaa/rte_pmd_dpaa.h b/drivers/net/dpaa/rte_pmd_dpaa.h
 index 8d244bb491..ec45633ba2 100644
 --- a/drivers/net/dpaa/rte_pmd_dpaa.h

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

* [dpdk-stable] patch 'net/cxgbe: fix duplicate MAC addresses in MPS TCAM' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (32 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/dpaa: fix port ID type in API' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/mlx5: fix RSS RETA reset on start' " luca.boccassi
                   ` (172 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Karra Satwik; +Cc: Rahul Lakkireddy, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 2fec236c7793acc04feae98805ca343d0999436e Mon Sep 17 00:00:00 2001
From: Karra Satwik <kaara.satwik@chelsio.com>
Date: Sat, 12 Sep 2020 05:17:51 +0530
Subject: [PATCH] net/cxgbe: fix duplicate MAC addresses in MPS TCAM

[ upstream commit 0dd95bc917e9a29065a8f73e13807492dca1e509 ]

During MAC address insertion to MPS TCAM, add a default mask when
the mask is not explicitly specified. Otherwise, driver misses the
mask comparison and ends up inserting duplicate entries in the
MPS TCAM.

Fixes: 6fda3f0ddda9 ("net/cxgbe: add API to program hardware MPS table")

Signed-off-by: Karra Satwik <kaara.satwik@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/mps_tcam.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/cxgbe/mps_tcam.c b/drivers/net/cxgbe/mps_tcam.c
index 5302d1343d..6e5fae9928 100644
--- a/drivers/net/cxgbe/mps_tcam.c
+++ b/drivers/net/cxgbe/mps_tcam.c
@@ -140,6 +140,7 @@ int cxgbe_mpstcam_modify(struct port_info *pi, int idx, const u8 *addr)
 	/* idx can now be different from what user provided */
 	entry = &mpstcam->entry[idx];
 	memcpy(entry->eth_addr, addr, RTE_ETHER_ADDR_LEN);
+	memset(entry->mask, ~0, RTE_ETHER_ADDR_LEN);
 	/* NOTE: we have considered the case that idx returned by t4_change_mac
 	 * will be different from the user provided value only if user
 	 * provided value is -1
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.884283387 +0000
+++ 0035-net-cxgbe-fix-duplicate-MAC-addresses-in-MPS-TCAM.patch	2020-10-28 10:35:11.476829611 +0000
@@ -1,15 +1,16 @@
-From 0dd95bc917e9a29065a8f73e13807492dca1e509 Mon Sep 17 00:00:00 2001
+From 2fec236c7793acc04feae98805ca343d0999436e Mon Sep 17 00:00:00 2001
 From: Karra Satwik <kaara.satwik@chelsio.com>
 Date: Sat, 12 Sep 2020 05:17:51 +0530
 Subject: [PATCH] net/cxgbe: fix duplicate MAC addresses in MPS TCAM
 
+[ upstream commit 0dd95bc917e9a29065a8f73e13807492dca1e509 ]
+
 During MAC address insertion to MPS TCAM, add a default mask when
 the mask is not explicitly specified. Otherwise, driver misses the
 mask comparison and ends up inserting duplicate entries in the
 MPS TCAM.
 
 Fixes: 6fda3f0ddda9 ("net/cxgbe: add API to program hardware MPS table")
-Cc: stable@dpdk.org
 
 Signed-off-by: Karra Satwik <kaara.satwik@chelsio.com>
 Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>

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

* [dpdk-stable] patch 'net/mlx5: fix RSS RETA reset on start' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (33 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/cxgbe: fix duplicate MAC addresses in MPS TCAM' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/nfp: expand device info get' " luca.boccassi
                   ` (171 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Maxime Leroy; +Cc: Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From ae09dbd15a26d99f607627bb3e0595efefcb642c Mon Sep 17 00:00:00 2001
From: Maxime Leroy <maxime.leroy@6wind.com>
Date: Thu, 16 Jul 2020 12:43:20 +0200
Subject: [PATCH] net/mlx5: fix RSS RETA reset on start

[ upstream commit e0d449513bcab58d9ab40bfeeb113b0db3093cad ]

The following sequences was working fine on mlx5:
   rte_eth_dev_configure(portid, ...);

   for (queueid = 0; queueid < nb_txq; queueid++)
      rte_eth_tx_queue_setup(portid, queueid, ...);

   for (queueid = 0; queueid < nb_rxq; queueid++)
      rte_eth_rx_queue_setup(portid, queueid, ...);

  // use a custom reta configuration
  rte_eth_dev_rss_reta_update(portid, reta_conf, reta_size);
  rte_eth_dev_start(portid);

We were able to configure a custom reta before starting the port.

The commit "net/mlx5: support RSS on hairpin" breaks this logic by
moving the code initializing the RSS reta from rte_eth_dev_configure
into rte_eth_dev_start.

To fix the issue, the skip_default_rss_reta is always set to 1 in
rte_eth_dev_rss_reta to avoid reconfigure the rss reta when the device
is started.

Fixes: 63bd16292c3a ("net/mlx5: support RSS on hairpin")

Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 drivers/net/mlx5/mlx5_rss.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_rss.c b/drivers/net/mlx5/mlx5_rss.c
index 102826452d..170005a7af 100644
--- a/drivers/net/mlx5/mlx5_rss.c
+++ b/drivers/net/mlx5/mlx5_rss.c
@@ -221,9 +221,11 @@ mlx5_dev_rss_reta_update(struct rte_eth_dev *dev,
 		assert(reta_conf[idx].reta[pos] < priv->rxqs_n);
 		(*priv->reta_idx)[i] = reta_conf[idx].reta[pos];
 	}
+
+	priv->skip_default_rss_reta = 1;
+
 	if (dev->data->dev_started) {
 		mlx5_dev_stop(dev);
-		priv->skip_default_rss_reta = 1;
 		return mlx5_dev_start(dev);
 	}
 	return 0;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.912757146 +0000
+++ 0036-net-mlx5-fix-RSS-RETA-reset-on-start.patch	2020-10-28 10:35:11.480829671 +0000
@@ -1,8 +1,10 @@
-From e0d449513bcab58d9ab40bfeeb113b0db3093cad Mon Sep 17 00:00:00 2001
+From ae09dbd15a26d99f607627bb3e0595efefcb642c Mon Sep 17 00:00:00 2001
 From: Maxime Leroy <maxime.leroy@6wind.com>
 Date: Thu, 16 Jul 2020 12:43:20 +0200
 Subject: [PATCH] net/mlx5: fix RSS RETA reset on start
 
+[ upstream commit e0d449513bcab58d9ab40bfeeb113b0db3093cad ]
+
 The following sequences was working fine on mlx5:
    rte_eth_dev_configure(portid, ...);
 
@@ -27,7 +29,6 @@
 is started.
 
 Fixes: 63bd16292c3a ("net/mlx5: support RSS on hairpin")
-Cc: stable@dpdk.org
 
 Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
 Acked-by: Ori Kam <orika@nvidia.com>
@@ -36,11 +37,11 @@
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/mlx5/mlx5_rss.c b/drivers/net/mlx5/mlx5_rss.c
-index a63cc8df9a..845cebe2e8 100644
+index 102826452d..170005a7af 100644
 --- a/drivers/net/mlx5/mlx5_rss.c
 +++ b/drivers/net/mlx5/mlx5_rss.c
-@@ -215,9 +215,11 @@ mlx5_dev_rss_reta_update(struct rte_eth_dev *dev,
- 		MLX5_ASSERT(reta_conf[idx].reta[pos] < priv->rxqs_n);
+@@ -221,9 +221,11 @@ mlx5_dev_rss_reta_update(struct rte_eth_dev *dev,
+ 		assert(reta_conf[idx].reta[pos] < priv->rxqs_n);
  		(*priv->reta_idx)[i] = reta_conf[idx].reta[pos];
  	}
 +

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

* [dpdk-stable] patch 'net/nfp: expand device info get' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (34 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/mlx5: fix RSS RETA reset on start' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'app/testpmd: fix name of bitrate library in meson build' " luca.boccassi
                   ` (170 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Heinrich Kuhn; +Cc: Simon Horman, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From c7f41e206d1219ab92f79a0d53c048e604ffb491 Mon Sep 17 00:00:00 2001
From: Heinrich Kuhn <heinrich.kuhn@netronome.com>
Date: Wed, 2 Sep 2020 13:52:27 +0200
Subject: [PATCH] net/nfp: expand device info get

[ upstream commit 69a0f8750aa349ed27fa7b635e2b47f74f11431a ]

Report Rx and Tx descriptor related limitations in the nfp dev_info_get
callback function. This commit also adds NFP_ALIGN_RING_DESC to replace
a static integer value used during rx/tx queue setups to validate
descriptor alignment.

Signed-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
---
 drivers/net/nfp/nfp_net.c     | 30 ++++++++++++++++++++++++------
 drivers/net/nfp/nfp_net_pmd.h |  6 ++++++
 2 files changed, 30 insertions(+), 6 deletions(-)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 082aa46825..54ea66b9d4 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1250,6 +1250,20 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		.tx_rs_thresh = DEFAULT_TX_RSBIT_THRESH,
 	};
 
+	dev_info->rx_desc_lim = (struct rte_eth_desc_lim) {
+		.nb_max = NFP_NET_MAX_RX_DESC,
+		.nb_min = NFP_NET_MIN_RX_DESC,
+		.nb_align = NFP_ALIGN_RING_DESC,
+	};
+
+	dev_info->tx_desc_lim = (struct rte_eth_desc_lim) {
+		.nb_max = NFP_NET_MAX_TX_DESC,
+		.nb_min = NFP_NET_MIN_TX_DESC,
+		.nb_align = NFP_ALIGN_RING_DESC,
+		.nb_seg_max = NFP_TX_MAX_SEG,
+		.nb_mtu_seg_max = NFP_TX_MAX_MTU_SEG,
+	};
+
 	dev_info->flow_type_rss_offloads = ETH_RSS_IPV4 |
 					   ETH_RSS_NONFRAG_IPV4_TCP |
 					   ETH_RSS_NONFRAG_IPV4_UDP |
@@ -1513,15 +1527,17 @@ nfp_net_rx_queue_setup(struct rte_eth_dev *dev,
 	const struct rte_memzone *tz;
 	struct nfp_net_rxq *rxq;
 	struct nfp_net_hw *hw;
+	uint32_t rx_desc_sz;
 
 	hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
 	PMD_INIT_FUNC_TRACE();
 
 	/* Validating number of descriptors */
-	if (((nb_desc * sizeof(struct nfp_net_rx_desc)) % 128) != 0 ||
-	    (nb_desc > NFP_NET_MAX_RX_DESC) ||
-	    (nb_desc < NFP_NET_MIN_RX_DESC)) {
+	rx_desc_sz = nb_desc * sizeof(struct nfp_net_rx_desc);
+	if (rx_desc_sz % NFP_ALIGN_RING_DESC != 0 ||
+	    nb_desc > NFP_NET_MAX_RX_DESC ||
+	    nb_desc < NFP_NET_MIN_RX_DESC) {
 		PMD_DRV_LOG(ERR, "Wrong nb_desc value");
 		return -EINVAL;
 	}
@@ -1660,15 +1676,17 @@ nfp_net_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	struct nfp_net_txq *txq;
 	uint16_t tx_free_thresh;
 	struct nfp_net_hw *hw;
+	uint32_t tx_desc_sz;
 
 	hw = NFP_NET_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
 	PMD_INIT_FUNC_TRACE();
 
 	/* Validating number of descriptors */
-	if (((nb_desc * sizeof(struct nfp_net_tx_desc)) % 128) != 0 ||
-	    (nb_desc > NFP_NET_MAX_TX_DESC) ||
-	    (nb_desc < NFP_NET_MIN_TX_DESC)) {
+	tx_desc_sz = nb_desc * sizeof(struct nfp_net_tx_desc);
+	if (tx_desc_sz % NFP_ALIGN_RING_DESC != 0 ||
+	    nb_desc > NFP_NET_MAX_TX_DESC ||
+	    nb_desc < NFP_NET_MIN_TX_DESC) {
 		PMD_DRV_LOG(ERR, "Wrong nb_desc value");
 		return -EINVAL;
 	}
diff --git a/drivers/net/nfp/nfp_net_pmd.h b/drivers/net/nfp/nfp_net_pmd.h
index cc1055c49a..466a11aca2 100644
--- a/drivers/net/nfp/nfp_net_pmd.h
+++ b/drivers/net/nfp/nfp_net_pmd.h
@@ -33,6 +33,12 @@ struct nfp_net_adapter;
 #define NFP_NET_MAX_RX_DESC (32 * 1024)
 #define NFP_NET_MIN_RX_DESC 64
 
+/* Descriptor alignment */
+#define NFP_ALIGN_RING_DESC 128
+
+#define NFP_TX_MAX_SEG     UINT8_MAX
+#define NFP_TX_MAX_MTU_SEG 8
+
 /* Bar allocation */
 #define NFP_NET_CRTL_BAR        0
 #define NFP_NET_TX_BAR          2
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.941426071 +0000
+++ 0037-net-nfp-expand-device-info-get.patch	2020-10-28 10:35:11.484829729 +0000
@@ -1,15 +1,15 @@
-From 69a0f8750aa349ed27fa7b635e2b47f74f11431a Mon Sep 17 00:00:00 2001
+From c7f41e206d1219ab92f79a0d53c048e604ffb491 Mon Sep 17 00:00:00 2001
 From: Heinrich Kuhn <heinrich.kuhn@netronome.com>
 Date: Wed, 2 Sep 2020 13:52:27 +0200
 Subject: [PATCH] net/nfp: expand device info get
 
+[ upstream commit 69a0f8750aa349ed27fa7b635e2b47f74f11431a ]
+
 Report Rx and Tx descriptor related limitations in the nfp dev_info_get
 callback function. This commit also adds NFP_ALIGN_RING_DESC to replace
 a static integer value used during rx/tx queue setups to validate
 descriptor alignment.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
 Signed-off-by: Simon Horman <simon.horman@netronome.com>
 ---
@@ -18,7 +18,7 @@
  2 files changed, 30 insertions(+), 6 deletions(-)
 
 diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
-index 2d20d4ce94..f5e4cd339d 100644
+index 082aa46825..54ea66b9d4 100644
 --- a/drivers/net/nfp/nfp_net.c
 +++ b/drivers/net/nfp/nfp_net.c
 @@ -1250,6 +1250,20 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -85,7 +85,7 @@
  		return -EINVAL;
  	}
 diff --git a/drivers/net/nfp/nfp_net_pmd.h b/drivers/net/nfp/nfp_net_pmd.h
-index cb2d19afe6..1295c5959e 100644
+index cc1055c49a..466a11aca2 100644
 --- a/drivers/net/nfp/nfp_net_pmd.h
 +++ b/drivers/net/nfp/nfp_net_pmd.h
 @@ -33,6 +33,12 @@ struct nfp_net_adapter;

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

* [dpdk-stable] patch 'app/testpmd: fix name of bitrate library in meson build' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (35 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/nfp: expand device info get' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: fix queue offload capability' " luca.boccassi
                   ` (169 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Wei Ling, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 3b2b4518c2364813fee6b8cc3f4883766406d209 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 2 Sep 2020 17:24:27 +0100
Subject: [PATCH] app/testpmd: fix name of bitrate library in meson build

[ upstream commit 54f89e3df4b16e9079c9d343870d16757429b68b ]

The bitrate library in DPDK is actually in a "bitratestats" directory,
so that is used by meson for the macro and library name.
Therefore, we need to update references to RTE_LIBRTE_BITRATE to
RTE_LIBRTE_BITRATESTATS in testpmd to have it found. Rather than
supporting both defines, since make is being removed, we can just
replace all instances of the former define with the latter.

To ensure testpmd links ok when this is done, we also need to add
bitratestats to the list of library dependencies.

Fixes: 5b9656b157d3 ("lib: build with meson")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Wei Ling <weix.ling@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/meson.build  |  3 +++
 app/test-pmd/parameters.c |  4 ++--
 app/test-pmd/testpmd.c    | 12 ++++++------
 app/test-pmd/testpmd.h    |  2 +-
 4 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build
index 6006c60f99..93235c8192 100644
--- a/app/test-pmd/meson.build
+++ b/app/test-pmd/meson.build
@@ -25,6 +25,9 @@ sources = files('cmdline.c',
 	'util.c')
 
 deps += ['ethdev', 'gro', 'gso', 'cmdline', 'metrics', 'meter', 'bus_pci']
+if dpdk_conf.has('RTE_LIBRTE_BITRATESTATS')
+	deps += 'bitratestats'
+endif
 if dpdk_conf.has('RTE_LIBRTE_PDUMP')
 	deps += 'pdump'
 endif
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 0eb7844783..b0f81641ed 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -604,7 +604,7 @@ launch_args_parse(int argc, char** argv)
 #ifdef RTE_LIBRTE_LATENCY_STATS
 		{ "latencystats",               1, 0, 0 },
 #endif
-#ifdef RTE_LIBRTE_BITRATE
+#ifdef RTE_LIBRTE_BITRATESTATS
 		{ "bitrate-stats",              1, 0, 0 },
 #endif
 		{ "disable-crc-strip",          0, 0, 0 },
@@ -972,7 +972,7 @@ launch_args_parse(int argc, char** argv)
 						 " must be >= 0\n", n);
 			}
 #endif
-#ifdef RTE_LIBRTE_BITRATE
+#ifdef RTE_LIBRTE_BITRATESTATS
 			if (!strcmp(lgopts[opt_idx].name, "bitrate-stats")) {
 				n = atoi(optarg);
 				if (n >= 0) {
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 8d3b7b2a3b..7f59cb02d1 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -54,7 +54,7 @@
 #endif
 #include <rte_flow.h>
 #include <rte_metrics.h>
-#ifdef RTE_LIBRTE_BITRATE
+#ifdef RTE_LIBRTE_BITRATESTATS
 #include <rte_bitrate.h>
 #endif
 #ifdef RTE_LIBRTE_LATENCY_STATS
@@ -471,7 +471,7 @@ uint8_t xstats_hide_zero;
 unsigned int num_sockets = 0;
 unsigned int socket_ids[RTE_MAX_NUMA_NODES];
 
-#ifdef RTE_LIBRTE_BITRATE
+#ifdef RTE_LIBRTE_BITRATESTATS
 /* Bitrate statistics */
 struct rte_stats_bitrates *bitrate_data;
 lcoreid_t bitrate_lcore_id;
@@ -1970,7 +1970,7 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd)
 	struct fwd_stream **fsm;
 	streamid_t nb_fs;
 	streamid_t sm_id;
-#ifdef RTE_LIBRTE_BITRATE
+#ifdef RTE_LIBRTE_BITRATESTATS
 	uint64_t tics_per_1sec;
 	uint64_t tics_datum;
 	uint64_t tics_current;
@@ -1985,7 +1985,7 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd)
 	do {
 		for (sm_id = 0; sm_id < nb_fs; sm_id++)
 			(*pkt_fwd)(fsm[sm_id]);
-#ifdef RTE_LIBRTE_BITRATE
+#ifdef RTE_LIBRTE_BITRATESTATS
 		if (bitrate_enabled != 0 &&
 				bitrate_lcore_id == rte_lcore_id()) {
 			tics_current = rte_rdtsc();
@@ -3609,7 +3609,7 @@ main(int argc, char** argv)
 			 "Check the core mask argument\n");
 
 	/* Bitrate/latency stats disabled by default */
-#ifdef RTE_LIBRTE_BITRATE
+#ifdef RTE_LIBRTE_BITRATESTATS
 	bitrate_enabled = 0;
 #endif
 #ifdef RTE_LIBRTE_LATENCY_STATS
@@ -3703,7 +3703,7 @@ main(int argc, char** argv)
 #endif
 
 	/* Setup bitrate stats */
-#ifdef RTE_LIBRTE_BITRATE
+#ifdef RTE_LIBRTE_BITRATESTATS
 	if (bitrate_enabled != 0) {
 		bitrate_data = rte_stats_bitrate_create();
 		if (bitrate_data == NULL)
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 2b1e9a24f9..82837d6f83 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -416,7 +416,7 @@ extern uint8_t latencystats_enabled;
 extern lcoreid_t latencystats_lcore_id;
 #endif
 
-#ifdef RTE_LIBRTE_BITRATE
+#ifdef RTE_LIBRTE_BITRATESTATS
 extern lcoreid_t bitrate_lcore_id;
 extern uint8_t bitrate_enabled;
 #endif
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:12.973333668 +0000
+++ 0038-app-testpmd-fix-name-of-bitrate-library-in-meson-bui.patch	2020-10-28 10:35:11.488829788 +0000
@@ -1,8 +1,10 @@
-From 54f89e3df4b16e9079c9d343870d16757429b68b Mon Sep 17 00:00:00 2001
+From 3b2b4518c2364813fee6b8cc3f4883766406d209 Mon Sep 17 00:00:00 2001
 From: Bruce Richardson <bruce.richardson@intel.com>
 Date: Wed, 2 Sep 2020 17:24:27 +0100
 Subject: [PATCH] app/testpmd: fix name of bitrate library in meson build
 
+[ upstream commit 54f89e3df4b16e9079c9d343870d16757429b68b ]
+
 The bitrate library in DPDK is actually in a "bitratestats" directory,
 so that is used by meson for the macro and library name.
 Therefore, we need to update references to RTE_LIBRTE_BITRATE to
@@ -14,7 +16,6 @@
 bitratestats to the list of library dependencies.
 
 Fixes: 5b9656b157d3 ("lib: build with meson")
-Cc: stable@dpdk.org
 
 Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
 Tested-by: Wei Ling <weix.ling@intel.com>
@@ -27,10 +28,10 @@
  4 files changed, 12 insertions(+), 9 deletions(-)
 
 diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build
-index ea56e547bb..f52ab148f6 100644
+index 6006c60f99..93235c8192 100644
 --- a/app/test-pmd/meson.build
 +++ b/app/test-pmd/meson.build
-@@ -25,6 +25,9 @@ sources = files('5tswap.c',
+@@ -25,6 +25,9 @@ sources = files('cmdline.c',
  	'util.c')
  
  deps += ['ethdev', 'gro', 'gso', 'cmdline', 'metrics', 'meter', 'bus_pci']
@@ -41,10 +42,10 @@
  	deps += 'pdump'
  endif
 diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
-index 784515314e..8c2aa13dd3 100644
+index 0eb7844783..b0f81641ed 100644
 --- a/app/test-pmd/parameters.c
 +++ b/app/test-pmd/parameters.c
-@@ -616,7 +616,7 @@ launch_args_parse(int argc, char** argv)
+@@ -604,7 +604,7 @@ launch_args_parse(int argc, char** argv)
  #ifdef RTE_LIBRTE_LATENCY_STATS
  		{ "latencystats",               1, 0, 0 },
  #endif
@@ -53,7 +54,7 @@
  		{ "bitrate-stats",              1, 0, 0 },
  #endif
  		{ "disable-crc-strip",          0, 0, 0 },
-@@ -991,7 +991,7 @@ launch_args_parse(int argc, char** argv)
+@@ -972,7 +972,7 @@ launch_args_parse(int argc, char** argv)
  						 " must be >= 0\n", n);
  			}
  #endif
@@ -63,7 +64,7 @@
  				n = atoi(optarg);
  				if (n >= 0) {
 diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
-index fb286b86e5..ee3dd27d81 100644
+index 8d3b7b2a3b..7f59cb02d1 100644
 --- a/app/test-pmd/testpmd.c
 +++ b/app/test-pmd/testpmd.c
 @@ -54,7 +54,7 @@
@@ -75,7 +76,7 @@
  #include <rte_bitrate.h>
  #endif
  #ifdef RTE_LIBRTE_LATENCY_STATS
-@@ -488,7 +488,7 @@ uint8_t record_burst_stats;
+@@ -471,7 +471,7 @@ uint8_t xstats_hide_zero;
  unsigned int num_sockets = 0;
  unsigned int socket_ids[RTE_MAX_NUMA_NODES];
  
@@ -84,7 +85,7 @@
  /* Bitrate statistics */
  struct rte_stats_bitrates *bitrate_data;
  lcoreid_t bitrate_lcore_id;
-@@ -2064,7 +2064,7 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd)
+@@ -1970,7 +1970,7 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd)
  	struct fwd_stream **fsm;
  	streamid_t nb_fs;
  	streamid_t sm_id;
@@ -93,7 +94,7 @@
  	uint64_t tics_per_1sec;
  	uint64_t tics_datum;
  	uint64_t tics_current;
-@@ -2079,7 +2079,7 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd)
+@@ -1985,7 +1985,7 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd)
  	do {
  		for (sm_id = 0; sm_id < nb_fs; sm_id++)
  			(*pkt_fwd)(fsm[sm_id]);
@@ -102,7 +103,7 @@
  		if (bitrate_enabled != 0 &&
  				bitrate_lcore_id == rte_lcore_id()) {
  			tics_current = rte_rdtsc();
-@@ -3707,7 +3707,7 @@ main(int argc, char** argv)
+@@ -3609,7 +3609,7 @@ main(int argc, char** argv)
  			 "Check the core mask argument\n");
  
  	/* Bitrate/latency stats disabled by default */
@@ -111,7 +112,7 @@
  	bitrate_enabled = 0;
  #endif
  #ifdef RTE_LIBRTE_LATENCY_STATS
-@@ -3801,7 +3801,7 @@ main(int argc, char** argv)
+@@ -3703,7 +3703,7 @@ main(int argc, char** argv)
  #endif
  
  	/* Setup bitrate stats */
@@ -121,10 +122,10 @@
  		bitrate_data = rte_stats_bitrate_create();
  		if (bitrate_data == NULL)
 diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
-index a8ae5cceb1..f139fe7a0a 100644
+index 2b1e9a24f9..82837d6f83 100644
 --- a/app/test-pmd/testpmd.h
 +++ b/app/test-pmd/testpmd.h
-@@ -403,7 +403,7 @@ extern uint8_t latencystats_enabled;
+@@ -416,7 +416,7 @@ extern uint8_t latencystats_enabled;
  extern lcoreid_t latencystats_lcore_id;
  #endif
  

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

* [dpdk-stable] patch 'net/hns3: fix queue offload capability' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (36 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'app/testpmd: fix name of bitrate library in meson build' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/mlx5: fix hairpin dependency on destination DevX TIR' " luca.boccassi
                   ` (168 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Wei Hu (Xavier); +Cc: Huisong Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From facb61edd4157bc718534cf5ed5c4d2e3603a7d8 Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Tue, 8 Sep 2020 20:28:07 +0800
Subject: [PATCH] net/hns3: fix queue offload capability

[ upstream commit c533b0ef1375724acd8625e2d5205475d472855c ]

Currently, offload capabilities are only enabled for all Rx/Tx queues in
hns3 PF/VF PMD driver, and offload capability only applied in a Rx/Tx
queue is not supported.
So this patch moves 'DEV_TX_OFFLOAD_MBUF_FAST_FREE' from
tx_queue_offload_capa to tx_offload_capa.

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

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    | 3 +--
 drivers/net/hns3/hns3_ethdev_vf.c | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index cd828202ee..27c89abfab 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2468,7 +2468,6 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
 				 DEV_RX_OFFLOAD_VLAN_FILTER |
 				 DEV_RX_OFFLOAD_JUMBO_FRAME |
 				 DEV_RX_OFFLOAD_RSS_HASH);
-	info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
 	info->tx_offload_capa = (DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM |
 				 DEV_TX_OFFLOAD_IPV4_CKSUM |
 				 DEV_TX_OFFLOAD_TCP_CKSUM |
@@ -2477,7 +2476,7 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
 				 DEV_TX_OFFLOAD_VLAN_INSERT |
 				 DEV_TX_OFFLOAD_QINQ_INSERT |
 				 DEV_TX_OFFLOAD_MULTI_SEGS |
-				 info->tx_queue_offload_capa);
+				 DEV_TX_OFFLOAD_MBUF_FAST_FREE);
 
 	info->rx_desc_lim = (struct rte_eth_desc_lim) {
 		.nb_max = HNS3_MAX_RING_DESC,
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 7acc679e9b..e30e9f65c4 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -805,7 +805,6 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
 				 DEV_RX_OFFLOAD_VLAN_FILTER |
 				 DEV_RX_OFFLOAD_JUMBO_FRAME |
 				 DEV_RX_OFFLOAD_RSS_HASH);
-	info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
 	info->tx_offload_capa = (DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM |
 				 DEV_TX_OFFLOAD_IPV4_CKSUM |
 				 DEV_TX_OFFLOAD_TCP_CKSUM |
@@ -814,7 +813,7 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
 				 DEV_TX_OFFLOAD_VLAN_INSERT |
 				 DEV_TX_OFFLOAD_QINQ_INSERT |
 				 DEV_TX_OFFLOAD_MULTI_SEGS |
-				 info->tx_queue_offload_capa);
+				 DEV_TX_OFFLOAD_MBUF_FAST_FREE);
 
 	info->rx_desc_lim = (struct rte_eth_desc_lim) {
 		.nb_max = HNS3_MAX_RING_DESC,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.007153387 +0000
+++ 0039-net-hns3-fix-queue-offload-capability.patch	2020-10-28 10:35:11.496829906 +0000
@@ -1,8 +1,10 @@
-From c533b0ef1375724acd8625e2d5205475d472855c Mon Sep 17 00:00:00 2001
+From facb61edd4157bc718534cf5ed5c4d2e3603a7d8 Mon Sep 17 00:00:00 2001
 From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
 Date: Tue, 8 Sep 2020 20:28:07 +0800
 Subject: [PATCH] net/hns3: fix queue offload capability
 
+[ upstream commit c533b0ef1375724acd8625e2d5205475d472855c ]
+
 Currently, offload capabilities are only enabled for all Rx/Tx queues in
 hns3 PF/VF PMD driver, and offload capability only applied in a Rx/Tx
 queue is not supported.
@@ -11,7 +13,6 @@
 
 Fixes: 1f5ca0b460cd ("net/hns3: support some device operations")
 Fixes: a5475d61fa34 ("net/hns3: support VF")
-Cc: stable@dpdk.org
 
 Signed-off-by: Huisong Li <lihuisong@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -21,47 +22,47 @@
  2 files changed, 2 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index 9dd0d9cbf1..b6ae69ff1f 100644
+index cd828202ee..27c89abfab 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -2472,7 +2472,6 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
+@@ -2468,7 +2468,6 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
+ 				 DEV_RX_OFFLOAD_VLAN_FILTER |
  				 DEV_RX_OFFLOAD_JUMBO_FRAME |
- 				 DEV_RX_OFFLOAD_RSS_HASH |
- 				 DEV_RX_OFFLOAD_TCP_LRO);
+ 				 DEV_RX_OFFLOAD_RSS_HASH);
 -	info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
  	info->tx_offload_capa = (DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM |
  				 DEV_TX_OFFLOAD_IPV4_CKSUM |
  				 DEV_TX_OFFLOAD_TCP_CKSUM |
-@@ -2483,7 +2482,7 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
- 				 DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
- 				 DEV_TX_OFFLOAD_GRE_TNL_TSO |
- 				 DEV_TX_OFFLOAD_GENEVE_TNL_TSO |
--				 info->tx_queue_offload_capa |
-+				 DEV_TX_OFFLOAD_MBUF_FAST_FREE |
- 				 hns3_txvlan_cap_get(hw));
+@@ -2477,7 +2476,7 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
+ 				 DEV_TX_OFFLOAD_VLAN_INSERT |
+ 				 DEV_TX_OFFLOAD_QINQ_INSERT |
+ 				 DEV_TX_OFFLOAD_MULTI_SEGS |
+-				 info->tx_queue_offload_capa);
++				 DEV_TX_OFFLOAD_MBUF_FAST_FREE);
  
  	info->rx_desc_lim = (struct rte_eth_desc_lim) {
+ 		.nb_max = HNS3_MAX_RING_DESC,
 diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
-index 1d8eef78ed..bea3695ce2 100644
+index 7acc679e9b..e30e9f65c4 100644
 --- a/drivers/net/hns3/hns3_ethdev_vf.c
 +++ b/drivers/net/hns3/hns3_ethdev_vf.c
-@@ -915,7 +915,6 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
+@@ -805,7 +805,6 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
+ 				 DEV_RX_OFFLOAD_VLAN_FILTER |
  				 DEV_RX_OFFLOAD_JUMBO_FRAME |
- 				 DEV_RX_OFFLOAD_RSS_HASH |
- 				 DEV_RX_OFFLOAD_TCP_LRO);
+ 				 DEV_RX_OFFLOAD_RSS_HASH);
 -	info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
  	info->tx_offload_capa = (DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM |
  				 DEV_TX_OFFLOAD_IPV4_CKSUM |
  				 DEV_TX_OFFLOAD_TCP_CKSUM |
-@@ -926,7 +925,7 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
- 				 DEV_TX_OFFLOAD_VXLAN_TNL_TSO |
- 				 DEV_TX_OFFLOAD_GRE_TNL_TSO |
- 				 DEV_TX_OFFLOAD_GENEVE_TNL_TSO |
--				 info->tx_queue_offload_capa |
-+				 DEV_TX_OFFLOAD_MBUF_FAST_FREE |
- 				 hns3_txvlan_cap_get(hw));
+@@ -814,7 +813,7 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
+ 				 DEV_TX_OFFLOAD_VLAN_INSERT |
+ 				 DEV_TX_OFFLOAD_QINQ_INSERT |
+ 				 DEV_TX_OFFLOAD_MULTI_SEGS |
+-				 info->tx_queue_offload_capa);
++				 DEV_TX_OFFLOAD_MBUF_FAST_FREE);
  
  	info->rx_desc_lim = (struct rte_eth_desc_lim) {
+ 		.nb_max = HNS3_MAX_RING_DESC,
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/mlx5: fix hairpin dependency on destination DevX TIR' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (37 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: fix queue offload capability' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/i40e: fix recreating flexible flow director rule' " luca.boccassi
                   ` (167 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From d2204df770ea31cff576e14adc811f5affc58452 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Sun, 13 Sep 2020 19:05:22 +0000
Subject: [PATCH] net/mlx5: fix hairpin dependency on destination DevX TIR

[ upstream commit b00f760354db0fd09f58bf6fb59972d50e772676 ]

The PMD supports hairpin only if DevX is supported and DV flow is
enabled.

When destination DevX TIR is not supported, the PMD tries to create TIR
action, and fails.

Avoid supporting hairpin when destination DevX TIR is not supported.

Fixes: b6b3bf86bd1a ("net/mlx5: get hairpin capabilities")

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

diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 3b1f18b3f3..92773dca28 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -1946,12 +1946,13 @@ int mlx5_get_module_eeprom(struct rte_eth_dev *dev,
  * @return
  *   0 on success, a negative errno value otherwise and rte_errno is set.
  */
-int mlx5_hairpin_cap_get(struct rte_eth_dev *dev,
-			 struct rte_eth_hairpin_cap *cap)
+int
+mlx5_hairpin_cap_get(struct rte_eth_dev *dev, struct rte_eth_hairpin_cap *cap)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
+	struct mlx5_dev_config *config = &priv->config;
 
-	if (priv->sh->devx == 0) {
+	if (!priv->sh->devx || !config->dest_tir || !config->dv_flow_en) {
 		rte_errno = ENOTSUP;
 		return -rte_errno;
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.042119654 +0000
+++ 0040-net-mlx5-fix-hairpin-dependency-on-destination-DevX-.patch	2020-10-28 10:35:11.496829906 +0000
@@ -1,8 +1,10 @@
-From b00f760354db0fd09f58bf6fb59972d50e772676 Mon Sep 17 00:00:00 2001
+From d2204df770ea31cff576e14adc811f5affc58452 Mon Sep 17 00:00:00 2001
 From: Michael Baum <michaelba@nvidia.com>
 Date: Sun, 13 Sep 2020 19:05:22 +0000
 Subject: [PATCH] net/mlx5: fix hairpin dependency on destination DevX TIR
 
+[ upstream commit b00f760354db0fd09f58bf6fb59972d50e772676 ]
+
 The PMD supports hairpin only if DevX is supported and DV flow is
 enabled.
 
@@ -12,24 +14,24 @@
 Avoid supporting hairpin when destination DevX TIR is not supported.
 
 Fixes: b6b3bf86bd1a ("net/mlx5: get hairpin capabilities")
-Cc: stable@dpdk.org
 
 Signed-off-by: Michael Baum <michaelba@nvidia.com>
 Acked-by: Matan Azrad <matan@nvidia.com>
 ---
- drivers/net/mlx5/mlx5_ethdev.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
+ drivers/net/mlx5/mlx5_ethdev.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
-index cefb45064e..a7924b103c 100644
+index 3b1f18b3f3..92773dca28 100644
 --- a/drivers/net/mlx5/mlx5_ethdev.c
 +++ b/drivers/net/mlx5/mlx5_ethdev.c
-@@ -569,12 +569,12 @@ mlx5_dev_to_eswitch_info(struct rte_eth_dev *dev)
+@@ -1946,12 +1946,13 @@ int mlx5_get_module_eeprom(struct rte_eth_dev *dev,
+  * @return
   *   0 on success, a negative errno value otherwise and rte_errno is set.
   */
- int
--mlx5_hairpin_cap_get(struct rte_eth_dev *dev,
+-int mlx5_hairpin_cap_get(struct rte_eth_dev *dev,
 -			 struct rte_eth_hairpin_cap *cap)
++int
 +mlx5_hairpin_cap_get(struct rte_eth_dev *dev, struct rte_eth_hairpin_cap *cap)
  {
  	struct mlx5_priv *priv = dev->data->dev_private;

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

* [dpdk-stable] patch 'net/i40e: fix recreating flexible flow director rule' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (38 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/mlx5: fix hairpin dependency on destination DevX TIR' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/ice: fix ptype parsing' " luca.boccassi
                   ` (166 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Guinan Sun; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 1ed7d60cd9c8f3f0f29947ad2eb47496ec630069 Mon Sep 17 00:00:00 2001
From: Guinan Sun <guinanx.sun@intel.com>
Date: Tue, 15 Sep 2020 06:52:25 +0000
Subject: [PATCH] net/i40e: fix recreating flexible flow director rule

[ upstream commit 0acf70d473072fd77b667a0419f8b9ab70b35b39 ]

This patch fixes the failure of recreate flexible fdir rule.
The root cause is that the flex_mask_flag is not reset during
flow destroy and flow flush.

Fixes: 6ced3dd72f5f ("net/i40e: support flexible payload parsing for FDIR")

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_fdir.c | 2 ++
 drivers/net/i40e/i40e_flow.c | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 9a2b40b8a7..8abdc3773a 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -1647,6 +1647,8 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
 			rte_free(fdir_filter);
 	} else {
 		ret = i40e_sw_fdir_filter_del(pf, &node->fdir.input);
+		if (ret >= 0)
+			pf->fdir.flex_mask_flag[pctype] = 0;
 	}
 
 	return ret;
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index ae2fb45930..11e0e24782 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -5044,8 +5044,10 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf)
 		}
 
 		for (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
-		     pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++)
+		     pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++) {
 			pf->fdir.inset_flag[pctype] = 0;
+			pf->fdir.flex_mask_flag[pctype] = 0;
+		}
 
 		/* Disable FDIR processing as all FDIR rules are now flushed */
 		i40e_fdir_rx_proc_enable(dev, 0);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.071584235 +0000
+++ 0041-net-i40e-fix-recreating-flexible-flow-director-rule.patch	2020-10-28 10:35:11.504830024 +0000
@@ -1,14 +1,15 @@
-From 0acf70d473072fd77b667a0419f8b9ab70b35b39 Mon Sep 17 00:00:00 2001
+From 1ed7d60cd9c8f3f0f29947ad2eb47496ec630069 Mon Sep 17 00:00:00 2001
 From: Guinan Sun <guinanx.sun@intel.com>
 Date: Tue, 15 Sep 2020 06:52:25 +0000
 Subject: [PATCH] net/i40e: fix recreating flexible flow director rule
 
+[ upstream commit 0acf70d473072fd77b667a0419f8b9ab70b35b39 ]
+
 This patch fixes the failure of recreate flexible fdir rule.
 The root cause is that the flex_mask_flag is not reset during
 flow destroy and flow flush.
 
 Fixes: 6ced3dd72f5f ("net/i40e: support flexible payload parsing for FDIR")
-Cc: stable@dpdk.org
 
 Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -18,24 +19,24 @@
  2 files changed, 5 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
-index 8e87b4a009..aa8e729495 100644
+index 9a2b40b8a7..8abdc3773a 100644
 --- a/drivers/net/i40e/i40e_fdir.c
 +++ b/drivers/net/i40e/i40e_fdir.c
-@@ -1882,6 +1882,8 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
- 			return -EINVAL;
- 		}
- 
-+		pf->fdir.flex_mask_flag[pctype] = 0;
-+
- 		if (fdir_info->fdir_invalprio == 1)
- 			wait_status = false;
+@@ -1647,6 +1647,8 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
+ 			rte_free(fdir_filter);
+ 	} else {
+ 		ret = i40e_sw_fdir_filter_del(pf, &node->fdir.input);
++		if (ret >= 0)
++			pf->fdir.flex_mask_flag[pctype] = 0;
  	}
+ 
+ 	return ret;
 diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
-index 51d8fdd790..adc5da1c53 100644
+index ae2fb45930..11e0e24782 100644
 --- a/drivers/net/i40e/i40e_flow.c
 +++ b/drivers/net/i40e/i40e_flow.c
-@@ -5679,8 +5679,10 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf)
- 			I40E_MAX_FDIR_FILTER_NUM);
+@@ -5044,8 +5044,10 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf)
+ 		}
  
  		for (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
 -		     pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++)

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

* [dpdk-stable] patch 'net/ice: fix ptype parsing' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (39 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/i40e: fix recreating flexible flow director rule' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'bus/dpaa: fix fd check before close' " luca.boccassi
                   ` (165 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Ting Xu; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 294e71a2e77d47c05925ff316f88d5acc42abdc7 Mon Sep 17 00:00:00 2001
From: Ting Xu <ting.xu@intel.com>
Date: Wed, 16 Sep 2020 11:02:28 +0800
Subject: [PATCH] net/ice: fix ptype parsing

[ upstream commit 0ff55924712e2a35476c0929235b21d2b77d9f97 ]

The ptype mask for flexible descriptor in Rx function ice_recv_pkts_vec
has a reversed order, which leads to an incorrect value of the final
ptype. This patch fix the mask to parse the correct ptype of RX packets.

Fixes: c68a52b8b38c ("net/ice: support vector SSE in Rx")

Signed-off-by: Ting Xu <ting.xu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx_vec_sse.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ice/ice_rxtx_vec_sse.c b/drivers/net/ice/ice_rxtx_vec_sse.c
index 9d5f1f194f..70b43e680b 100644
--- a/drivers/net/ice/ice_rxtx_vec_sse.c
+++ b/drivers/net/ice/ice_rxtx_vec_sse.c
@@ -188,10 +188,10 @@ static inline void
 ice_rx_desc_to_ptype_v(__m128i descs[4], struct rte_mbuf **rx_pkts,
 		       uint32_t *ptype_tbl)
 {
-	const __m128i ptype_mask = _mm_set_epi16(0, ICE_RX_FLEX_DESC_PTYPE_M,
-						 0, ICE_RX_FLEX_DESC_PTYPE_M,
-						 0, ICE_RX_FLEX_DESC_PTYPE_M,
-						 0, ICE_RX_FLEX_DESC_PTYPE_M);
+	const __m128i ptype_mask = _mm_set_epi16(ICE_RX_FLEX_DESC_PTYPE_M, 0,
+						 ICE_RX_FLEX_DESC_PTYPE_M, 0,
+						 ICE_RX_FLEX_DESC_PTYPE_M, 0,
+						 ICE_RX_FLEX_DESC_PTYPE_M, 0);
 	__m128i ptype_01 = _mm_unpacklo_epi32(descs[0], descs[1]);
 	__m128i ptype_23 = _mm_unpacklo_epi32(descs[2], descs[3]);
 	__m128i ptype_all = _mm_unpacklo_epi64(ptype_01, ptype_23);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.106717229 +0000
+++ 0042-net-ice-fix-ptype-parsing.patch	2020-10-28 10:35:11.504830024 +0000
@@ -1,14 +1,15 @@
-From 0ff55924712e2a35476c0929235b21d2b77d9f97 Mon Sep 17 00:00:00 2001
+From 294e71a2e77d47c05925ff316f88d5acc42abdc7 Mon Sep 17 00:00:00 2001
 From: Ting Xu <ting.xu@intel.com>
 Date: Wed, 16 Sep 2020 11:02:28 +0800
 Subject: [PATCH] net/ice: fix ptype parsing
 
+[ upstream commit 0ff55924712e2a35476c0929235b21d2b77d9f97 ]
+
 The ptype mask for flexible descriptor in Rx function ice_recv_pkts_vec
 has a reversed order, which leads to an incorrect value of the final
 ptype. This patch fix the mask to parse the correct ptype of RX packets.
 
 Fixes: c68a52b8b38c ("net/ice: support vector SSE in Rx")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ting Xu <ting.xu@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/ice/ice_rxtx_vec_sse.c b/drivers/net/ice/ice_rxtx_vec_sse.c
-index 965cd8b261..c4c9a91265 100644
+index 9d5f1f194f..70b43e680b 100644
 --- a/drivers/net/ice/ice_rxtx_vec_sse.c
 +++ b/drivers/net/ice/ice_rxtx_vec_sse.c
-@@ -237,10 +237,10 @@ static inline void
+@@ -188,10 +188,10 @@ static inline void
  ice_rx_desc_to_ptype_v(__m128i descs[4], struct rte_mbuf **rx_pkts,
  		       uint32_t *ptype_tbl)
  {

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

* [dpdk-stable] patch 'bus/dpaa: fix fd check before close' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (40 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/ice: fix ptype parsing' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/bnxt: fix checking VNIC in shutdown path' " luca.boccassi
                   ` (164 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From cf1ded5fa15cd96ab87a7210754ba65dfad7aed2 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 15 Sep 2020 19:57:40 +0800
Subject: [PATCH] bus/dpaa: fix fd check before close

[ upstream commit c61dc9713666e8c707352ec7d4ec23e4c4d9fdc7 ]

The fd is possibly a negative value while it is passed as an
argument to function "close". Fix the check to the fd.

Fixes: b9c94167904f ("bus/dpaa: decouple FQ portal alloc and init")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/dpaa/base/qbman/qman_driver.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/bus/dpaa/base/qbman/qman_driver.c b/drivers/bus/dpaa/base/qbman/qman_driver.c
index 464998fe91..e1dee17542 100644
--- a/drivers/bus/dpaa/base/qbman/qman_driver.c
+++ b/drivers/bus/dpaa/base/qbman/qman_driver.c
@@ -132,7 +132,7 @@ struct qman_portal *fsl_qman_fq_portal_create(int *fd)
 	struct qm_portal_config *q_pcfg;
 	struct dpaa_ioctl_irq_map irq_map;
 	struct dpaa_ioctl_portal_map q_map = {0};
-	int q_fd = 0, ret;
+	int q_fd, ret;
 
 	q_pcfg = kzalloc((sizeof(struct qm_portal_config)), 0);
 	if (!q_pcfg) {
@@ -169,7 +169,7 @@ struct qman_portal *fsl_qman_fq_portal_create(int *fd)
 	if (!portal) {
 		pr_err("Qman portal initialisation failed (%d)\n",
 		       q_pcfg->cpu);
-		goto err;
+		goto err_alloc;
 	}
 
 	irq_map.type = dpaa_portal_qman;
@@ -178,9 +178,9 @@ struct qman_portal *fsl_qman_fq_portal_create(int *fd)
 
 	*fd = q_fd;
 	return portal;
+err_alloc:
+	close(q_fd);
 err:
-	if (q_fd)
-		close(q_fd);
 	process_portal_unmap(&q_map.addr);
 	kfree(q_pcfg);
 	return NULL;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.135903536 +0000
+++ 0043-bus-dpaa-fix-fd-check-before-close.patch	2020-10-28 10:35:11.504830024 +0000
@@ -1,13 +1,14 @@
-From c61dc9713666e8c707352ec7d4ec23e4c4d9fdc7 Mon Sep 17 00:00:00 2001
+From cf1ded5fa15cd96ab87a7210754ba65dfad7aed2 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Tue, 15 Sep 2020 19:57:40 +0800
 Subject: [PATCH] bus/dpaa: fix fd check before close
 
+[ upstream commit c61dc9713666e8c707352ec7d4ec23e4c4d9fdc7 ]
+
 The fd is possibly a negative value while it is passed as an
 argument to function "close". Fix the check to the fd.
 
 Fixes: b9c94167904f ("bus/dpaa: decouple FQ portal alloc and init")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
@@ -16,10 +17,10 @@
  1 file changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/bus/dpaa/base/qbman/qman_driver.c b/drivers/bus/dpaa/base/qbman/qman_driver.c
-index a466c698fc..6d9aaff164 100644
+index 464998fe91..e1dee17542 100644
 --- a/drivers/bus/dpaa/base/qbman/qman_driver.c
 +++ b/drivers/bus/dpaa/base/qbman/qman_driver.c
-@@ -142,7 +142,7 @@ struct qman_portal *fsl_qman_fq_portal_create(int *fd)
+@@ -132,7 +132,7 @@ struct qman_portal *fsl_qman_fq_portal_create(int *fd)
  	struct qm_portal_config *q_pcfg;
  	struct dpaa_ioctl_irq_map irq_map;
  	struct dpaa_ioctl_portal_map q_map = {0};
@@ -28,7 +29,7 @@
  
  	q_pcfg = kzalloc((sizeof(struct qm_portal_config)), 0);
  	if (!q_pcfg) {
-@@ -179,7 +179,7 @@ struct qman_portal *fsl_qman_fq_portal_create(int *fd)
+@@ -169,7 +169,7 @@ struct qman_portal *fsl_qman_fq_portal_create(int *fd)
  	if (!portal) {
  		pr_err("Qman portal initialisation failed (%d)\n",
  		       q_pcfg->cpu);
@@ -37,7 +38,7 @@
  	}
  
  	irq_map.type = dpaa_portal_qman;
-@@ -188,9 +188,9 @@ struct qman_portal *fsl_qman_fq_portal_create(int *fd)
+@@ -178,9 +178,9 @@ struct qman_portal *fsl_qman_fq_portal_create(int *fd)
  
  	*fd = q_fd;
  	return portal;

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

* [dpdk-stable] patch 'net/bnxt: fix checking VNIC in shutdown path' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (41 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'bus/dpaa: fix fd check before close' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-29  6:29   ` Somnath Kotur
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/bnxt: add separate mutex for FW health check' " luca.boccassi
                   ` (163 subsequent siblings)
  206 siblings, 1 reply; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 590892526b436a852d0af36e55be8e15e110a1f1 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Thu, 10 Sep 2020 18:56:02 -0700
Subject: [PATCH] net/bnxt: fix checking VNIC in shutdown path

[ upstream commit 4b029f02de3a0ce9cdd9a3475b84ca2e42d74281 ]

Add a couple of NULL pointer checks in bnxt_free_all_filters()
and bnxt_free_vnics() respectively to guard against certain error
injection/recovery scenarios where it was found that the application
was crashing with the bp->vnic_info pointer being NULL.

Fixes: 51fafb89a9a0 ("net/bnxt: get rid of ff pools and use VNIC info array")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_filter.c | 15 +++++++++------
 drivers/net/bnxt/bnxt_vnic.c   |  3 +++
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c
index 622a9bb417..f4b18d5b84 100644
--- a/drivers/net/bnxt/bnxt_filter.c
+++ b/drivers/net/bnxt/bnxt_filter.c
@@ -81,6 +81,15 @@ void bnxt_free_all_filters(struct bnxt *bp)
 	struct bnxt_filter_info *filter, *temp_filter;
 	unsigned int i;
 
+	for (i = 0; i < bp->pf.max_vfs; i++) {
+		STAILQ_FOREACH(filter, &bp->pf.vf_info[i].filter, next) {
+			bnxt_hwrm_clear_l2_filter(bp, filter);
+		}
+	}
+
+	if (bp->vnic_info == NULL)
+		return;
+
 	for (i = 0; i < bp->nr_vnics; i++) {
 		vnic = &bp->vnic_info[i];
 		filter = STAILQ_FIRST(&vnic->filter);
@@ -94,12 +103,6 @@ void bnxt_free_all_filters(struct bnxt *bp)
 		}
 		STAILQ_INIT(&vnic->filter);
 	}
-
-	for (i = 0; i < bp->pf.max_vfs; i++) {
-		STAILQ_FOREACH(filter, &bp->pf.vf_info[i].filter, next) {
-			bnxt_hwrm_clear_l2_filter(bp, filter);
-		}
-	}
 }
 
 void bnxt_free_filter_mem(struct bnxt *bp)
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index bc054a8e0e..ef07721148 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -78,6 +78,9 @@ void bnxt_free_all_vnics(struct bnxt *bp)
 	struct bnxt_vnic_info *vnic;
 	unsigned int i;
 
+	if (bp->vnic_info == NULL)
+		return;
+
 	for (i = 0; i < bp->max_vnics; i++) {
 		vnic = &bp->vnic_info[i];
 		STAILQ_INSERT_TAIL(&bp->free_vnic_list, vnic, next);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.164340871 +0000
+++ 0044-net-bnxt-fix-checking-VNIC-in-shutdown-path.patch	2020-10-28 10:35:11.504830024 +0000
@@ -1,33 +1,34 @@
-From 4b029f02de3a0ce9cdd9a3475b84ca2e42d74281 Mon Sep 17 00:00:00 2001
+From 590892526b436a852d0af36e55be8e15e110a1f1 Mon Sep 17 00:00:00 2001
 From: Somnath Kotur <somnath.kotur@broadcom.com>
 Date: Thu, 10 Sep 2020 18:56:02 -0700
 Subject: [PATCH] net/bnxt: fix checking VNIC in shutdown path
 
+[ upstream commit 4b029f02de3a0ce9cdd9a3475b84ca2e42d74281 ]
+
 Add a couple of NULL pointer checks in bnxt_free_all_filters()
 and bnxt_free_vnics() respectively to guard against certain error
 injection/recovery scenarios where it was found that the application
 was crashing with the bp->vnic_info pointer being NULL.
 
 Fixes: 51fafb89a9a0 ("net/bnxt: get rid of ff pools and use VNIC info array")
-Cc: stable@dpdk.org
 
 Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
 Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
 ---
- drivers/net/bnxt/bnxt_filter.c | 14 +++++++++-----
+ drivers/net/bnxt/bnxt_filter.c | 15 +++++++++------
  drivers/net/bnxt/bnxt_vnic.c   |  3 +++
- 2 files changed, 12 insertions(+), 5 deletions(-)
+ 2 files changed, 12 insertions(+), 6 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c
-index d822ff607c..6d85983242 100644
+index 622a9bb417..f4b18d5b84 100644
 --- a/drivers/net/bnxt/bnxt_filter.c
 +++ b/drivers/net/bnxt/bnxt_filter.c
 @@ -81,6 +81,15 @@ void bnxt_free_all_filters(struct bnxt *bp)
  	struct bnxt_filter_info *filter, *temp_filter;
  	unsigned int i;
  
-+	for (i = 0; i < bp->pf->max_vfs; i++) {
-+		STAILQ_FOREACH(filter, &bp->pf->vf_info[i].filter, next) {
++	for (i = 0; i < bp->pf.max_vfs; i++) {
++		STAILQ_FOREACH(filter, &bp->pf.vf_info[i].filter, next) {
 +			bnxt_hwrm_clear_l2_filter(bp, filter);
 +		}
 +	}
@@ -38,12 +39,13 @@
  	for (i = 0; i < bp->nr_vnics; i++) {
  		vnic = &bp->vnic_info[i];
  		filter = STAILQ_FIRST(&vnic->filter);
-@@ -95,11 +104,6 @@ void bnxt_free_all_filters(struct bnxt *bp)
+@@ -94,12 +103,6 @@ void bnxt_free_all_filters(struct bnxt *bp)
+ 		}
  		STAILQ_INIT(&vnic->filter);
  	}
- 
--	for (i = 0; i < bp->pf->max_vfs; i++) {
--		STAILQ_FOREACH(filter, &bp->pf->vf_info[i].filter, next) {
+-
+-	for (i = 0; i < bp->pf.max_vfs; i++) {
+-		STAILQ_FOREACH(filter, &bp->pf.vf_info[i].filter, next) {
 -			bnxt_hwrm_clear_l2_filter(bp, filter);
 -		}
 -	}
@@ -51,7 +53,7 @@
  
  void bnxt_free_filter_mem(struct bnxt *bp)
 diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
-index 326c0d1b6d..9a135ae881 100644
+index bc054a8e0e..ef07721148 100644
 --- a/drivers/net/bnxt/bnxt_vnic.c
 +++ b/drivers/net/bnxt/bnxt_vnic.c
 @@ -78,6 +78,9 @@ void bnxt_free_all_vnics(struct bnxt *bp)

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

* [dpdk-stable] patch 'net/bnxt: add separate mutex for FW health check' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (42 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/bnxt: fix checking VNIC in shutdown path' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-29  6:30   ` Somnath Kotur
  2020-10-28 10:43 ` [dpdk-stable] patch 'gso: fix payload unit size for UDP' " luca.boccassi
                   ` (162 subsequent siblings)
  206 siblings, 1 reply; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Somnath Kotur
  Cc: Sriharsha Basavapatna, Kalesh AP, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From beb74f5be42aaa494ea6b278091b028043931f69 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Thu, 10 Sep 2020 18:56:03 -0700
Subject: [PATCH] net/bnxt: add separate mutex for FW health check

[ upstream commit 2993075dc253484ba3c87996981f32468aa86cbd ]

def_cp_lock was added to sync race between dev_configure and
int_handler. It should not be used to synchronize scheduling of FW
health check between dev_start and async event handler as well,
use a separate mutex for the same.

Fixes: a73b8e939f10 ("net/bnxt: fix race between start and interrupt handler")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        |  1 +
 drivers/net/bnxt/bnxt_ethdev.c | 17 +++++++++++++----
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 46cf418647..cdb3e2d3ff 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -593,6 +593,7 @@ struct bnxt {
 	rte_iova_t			hwrm_short_cmd_req_dma_addr;
 	rte_spinlock_t			hwrm_lock;
 	pthread_mutex_t			def_cp_lock;
+	pthread_mutex_t			health_check_lock;
 	uint16_t			max_req_len;
 	uint16_t			max_resp_len;
 	uint16_t                        hwrm_max_ext_req_len;
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index fe240b6ccc..d6afd03e56 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -885,9 +885,8 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
 	eth_dev->rx_pkt_burst = bnxt_receive_function(eth_dev);
 	eth_dev->tx_pkt_burst = bnxt_transmit_function(eth_dev);
 
-	pthread_mutex_lock(&bp->def_cp_lock);
 	bnxt_schedule_fw_health_check(bp);
-	pthread_mutex_unlock(&bp->def_cp_lock);
+
 	return 0;
 
 error:
@@ -4205,17 +4204,22 @@ void bnxt_schedule_fw_health_check(struct bnxt *bp)
 {
 	uint32_t polling_freq;
 
+	pthread_mutex_lock(&bp->health_check_lock);
+
 	if (!bnxt_is_recovery_enabled(bp))
-		return;
+		goto done;
 
 	if (bp->flags & BNXT_FLAG_FW_HEALTH_CHECK_SCHEDULED)
-		return;
+		goto done;
 
 	polling_freq = bp->recovery_info->driver_polling_freq;
 
 	rte_eal_alarm_set(US_PER_MS * polling_freq,
 			  bnxt_check_fw_health, (void *)bp);
 	bp->flags |= BNXT_FLAG_FW_HEALTH_CHECK_SCHEDULED;
+
+done:
+	pthread_mutex_unlock(&bp->health_check_lock);
 }
 
 static void bnxt_cancel_fw_health_check(struct bnxt *bp)
@@ -4747,6 +4751,10 @@ bnxt_init_locks(struct bnxt *bp)
 	err = pthread_mutex_init(&bp->def_cp_lock, NULL);
 	if (err)
 		PMD_DRV_LOG(ERR, "Unable to initialize def_cp_lock\n");
+
+	err = pthread_mutex_init(&bp->health_check_lock, NULL);
+	if (err)
+		PMD_DRV_LOG(ERR, "Unable to initialize health_check_lock\n");
 	return err;
 }
 
@@ -4888,6 +4896,7 @@ bnxt_uninit_locks(struct bnxt *bp)
 {
 	pthread_mutex_destroy(&bp->flow_lock);
 	pthread_mutex_destroy(&bp->def_cp_lock);
+	pthread_mutex_destroy(&bp->health_check_lock);
 }
 
 static int
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.193181379 +0000
+++ 0045-net-bnxt-add-separate-mutex-for-FW-health-check.patch	2020-10-28 10:35:11.508830082 +0000
@@ -1,15 +1,16 @@
-From 2993075dc253484ba3c87996981f32468aa86cbd Mon Sep 17 00:00:00 2001
+From beb74f5be42aaa494ea6b278091b028043931f69 Mon Sep 17 00:00:00 2001
 From: Somnath Kotur <somnath.kotur@broadcom.com>
 Date: Thu, 10 Sep 2020 18:56:03 -0700
 Subject: [PATCH] net/bnxt: add separate mutex for FW health check
 
+[ upstream commit 2993075dc253484ba3c87996981f32468aa86cbd ]
+
 def_cp_lock was added to sync race between dev_configure and
 int_handler. It should not be used to synchronize scheduling of FW
 health check between dev_start and async event handler as well,
 use a separate mutex for the same.
 
 Fixes: a73b8e939f10 ("net/bnxt: fix race between start and interrupt handler")
-Cc: stable@dpdk.org
 
 Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
 Reviewed-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
@@ -17,14 +18,14 @@
 Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
 ---
  drivers/net/bnxt/bnxt.h        |  1 +
- drivers/net/bnxt/bnxt_ethdev.c | 16 ++++++++++++----
- 2 files changed, 13 insertions(+), 4 deletions(-)
+ drivers/net/bnxt/bnxt_ethdev.c | 17 +++++++++++++----
+ 2 files changed, 14 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
-index f0b0800151..bb265999d4 100644
+index 46cf418647..cdb3e2d3ff 100644
 --- a/drivers/net/bnxt/bnxt.h
 +++ b/drivers/net/bnxt/bnxt.h
-@@ -712,6 +712,7 @@ struct bnxt {
+@@ -593,6 +593,7 @@ struct bnxt {
  	rte_iova_t			hwrm_short_cmd_req_dma_addr;
  	rte_spinlock_t			hwrm_lock;
  	pthread_mutex_t			def_cp_lock;
@@ -33,20 +34,21 @@
  	uint16_t			max_resp_len;
  	uint16_t                        hwrm_max_ext_req_len;
 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index 7c27e2435a..05e9a6abbf 100644
+index fe240b6ccc..d6afd03e56 100644
 --- a/drivers/net/bnxt/bnxt_ethdev.c
 +++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -1252,9 +1252,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
+@@ -885,9 +885,8 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
  	eth_dev->rx_pkt_burst = bnxt_receive_function(eth_dev);
  	eth_dev->tx_pkt_burst = bnxt_transmit_function(eth_dev);
  
 -	pthread_mutex_lock(&bp->def_cp_lock);
  	bnxt_schedule_fw_health_check(bp);
 -	pthread_mutex_unlock(&bp->def_cp_lock);
- 
++
  	return 0;
  
-@@ -4675,17 +4673,22 @@ void bnxt_schedule_fw_health_check(struct bnxt *bp)
+ error:
+@@ -4205,17 +4204,22 @@ void bnxt_schedule_fw_health_check(struct bnxt *bp)
  {
  	uint32_t polling_freq;
  
@@ -71,7 +73,7 @@
  }
  
  static void bnxt_cancel_fw_health_check(struct bnxt *bp)
-@@ -5473,6 +5476,10 @@ bnxt_init_locks(struct bnxt *bp)
+@@ -4747,6 +4751,10 @@ bnxt_init_locks(struct bnxt *bp)
  	err = pthread_mutex_init(&bp->def_cp_lock, NULL);
  	if (err)
  		PMD_DRV_LOG(ERR, "Unable to initialize def_cp_lock\n");
@@ -82,14 +84,14 @@
  	return err;
  }
  
-@@ -5884,6 +5891,7 @@ bnxt_uninit_locks(struct bnxt *bp)
+@@ -4888,6 +4896,7 @@ bnxt_uninit_locks(struct bnxt *bp)
  {
  	pthread_mutex_destroy(&bp->flow_lock);
  	pthread_mutex_destroy(&bp->def_cp_lock);
 +	pthread_mutex_destroy(&bp->health_check_lock);
- 	if (bp->rep_info) {
- 		pthread_mutex_destroy(&bp->rep_info->vfr_lock);
- 		pthread_mutex_destroy(&bp->rep_info->vfr_start_lock);
+ }
+ 
+ static int
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'gso: fix payload unit size for UDP' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (43 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/bnxt: add separate mutex for FW health check' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-29  4:45   ` [dpdk-stable] 答复: " Yi Yang -云服务集团
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/cxgbe: fix crash when accessing empty Tx mbuf list' " luca.boccassi
                   ` (161 subsequent siblings)
  206 siblings, 1 reply; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Yi Yang; +Cc: Jiayu Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 2b26f143b3014d23a31aa59deda659b172edcc32 Mon Sep 17 00:00:00 2001
From: Yi Yang <yangyi01@inspur.com>
Date: Thu, 17 Sep 2020 10:12:49 +0800
Subject: [PATCH] gso: fix payload unit size for UDP

[ upstream commit b9b75d9b5c9dbc71ee12f77e9abe089492708aae ]

Fragment offset of IPv4 header is measured in units of
8 bytes. Fragment offset of UDP fragments will be wrong
after GSO if pyld_unit_size isn't multiple of 8. Say
pyld_unit_size is 1500, fragment offset of the second
UDP fragment will be 187 (i.e. 1500 / 8), which means 1496,
and it will result in 4-byte data loss (1500 - 1496 = 4).
So UDP GRO will reassemble out a wrong packet.

Fixes: b166d4f30b66 ("gso: support UDP/IPv4 fragmentation")

Signed-off-by: Yi Yang <yangyi01@inspur.com>
Acked-by: Jiayu Hu <jiayu.hu@intel.com>
---
 lib/librte_gso/gso_udp4.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/librte_gso/gso_udp4.c b/lib/librte_gso/gso_udp4.c
index 21fea09273..6fa68f243a 100644
--- a/lib/librte_gso/gso_udp4.c
+++ b/lib/librte_gso/gso_udp4.c
@@ -69,7 +69,10 @@ gso_udp4_segment(struct rte_mbuf *pkt,
 		return 1;
 	}
 
-	pyld_unit_size = gso_size - hdr_offset;
+	/* pyld_unit_size must be a multiple of 8 because frag_off
+	 * uses 8 bytes as unit.
+	 */
+	pyld_unit_size = (gso_size - hdr_offset) & ~7U;
 
 	/* Segment the payload */
 	ret = gso_do_segment(pkt, hdr_offset, pyld_unit_size, direct_pool,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.228089104 +0000
+++ 0046-gso-fix-payload-unit-size-for-UDP.patch	2020-10-28 10:35:11.508830082 +0000
@@ -1,8 +1,10 @@
-From b9b75d9b5c9dbc71ee12f77e9abe089492708aae Mon Sep 17 00:00:00 2001
+From 2b26f143b3014d23a31aa59deda659b172edcc32 Mon Sep 17 00:00:00 2001
 From: Yi Yang <yangyi01@inspur.com>
 Date: Thu, 17 Sep 2020 10:12:49 +0800
 Subject: [PATCH] gso: fix payload unit size for UDP
 
+[ upstream commit b9b75d9b5c9dbc71ee12f77e9abe089492708aae ]
+
 Fragment offset of IPv4 header is measured in units of
 8 bytes. Fragment offset of UDP fragments will be wrong
 after GSO if pyld_unit_size isn't multiple of 8. Say
@@ -12,7 +14,6 @@
 So UDP GRO will reassemble out a wrong packet.
 
 Fixes: b166d4f30b66 ("gso: support UDP/IPv4 fragmentation")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yi Yang <yangyi01@inspur.com>
 Acked-by: Jiayu Hu <jiayu.hu@intel.com>

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

* [dpdk-stable] patch 'net/cxgbe: fix crash when accessing empty Tx mbuf list' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (44 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'gso: fix payload unit size for UDP' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'doc: improve multiport PF in nfp guide' " luca.boccassi
                   ` (160 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: Brian Poole, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 4c661677f11c87e3ffe0d6d6846a90477ce7b281 Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Tue, 1 Sep 2020 22:50:09 +0530
Subject: [PATCH] net/cxgbe: fix crash when accessing empty Tx mbuf list

[ upstream commit dca62adebf68ec94d84444fd2a61f03f73f51ffb ]

Ensure packets are available before accessing the mbuf list in Tx
burst function. Otherwise, just reclaim completed Tx descriptors and
exit.

Fixes: b1df19e43e1d ("net/cxgbe: fix prefetch for non-coalesced Tx packets")

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

diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index 51b63ef574..abd455c6ea 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -74,6 +74,9 @@ uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 	t4_os_lock(&txq->txq_lock);
 	/* free up desc from already completed tx */
 	reclaim_completed_tx(&txq->q);
+	if (unlikely(!nb_pkts))
+		goto out_unlock;
+
 	rte_prefetch0(rte_pktmbuf_mtod(tx_pkts[0], volatile void *));
 	while (total_sent < nb_pkts) {
 		pkts_remain = nb_pkts - total_sent;
@@ -94,6 +97,7 @@ uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 		reclaim_completed_tx(&txq->q);
 	}
 
+out_unlock:
 	t4_os_unlock(&txq->txq_lock);
 	return total_sent;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.256518858 +0000
+++ 0047-net-cxgbe-fix-crash-when-accessing-empty-Tx-mbuf-lis.patch	2020-10-28 10:35:11.512830142 +0000
@@ -1,14 +1,15 @@
-From dca62adebf68ec94d84444fd2a61f03f73f51ffb Mon Sep 17 00:00:00 2001
+From 4c661677f11c87e3ffe0d6d6846a90477ce7b281 Mon Sep 17 00:00:00 2001
 From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
 Date: Tue, 1 Sep 2020 22:50:09 +0530
 Subject: [PATCH] net/cxgbe: fix crash when accessing empty Tx mbuf list
 
+[ upstream commit dca62adebf68ec94d84444fd2a61f03f73f51ffb ]
+
 Ensure packets are available before accessing the mbuf list in Tx
 burst function. Otherwise, just reclaim completed Tx descriptors and
 exit.
 
 Fixes: b1df19e43e1d ("net/cxgbe: fix prefetch for non-coalesced Tx packets")
-Cc: stable@dpdk.org
 
 Reported-by: Brian Poole <brian90013@gmail.com>
 Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
@@ -17,10 +18,10 @@
  1 file changed, 4 insertions(+)
 
 diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
-index 7c6016d5cf..1205e17a6c 100644
+index 51b63ef574..abd455c6ea 100644
 --- a/drivers/net/cxgbe/cxgbe_ethdev.c
 +++ b/drivers/net/cxgbe/cxgbe_ethdev.c
-@@ -71,6 +71,9 @@ uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -74,6 +74,9 @@ uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
  	t4_os_lock(&txq->txq_lock);
  	/* free up desc from already completed tx */
  	reclaim_completed_tx(&txq->q);
@@ -30,7 +31,7 @@
  	rte_prefetch0(rte_pktmbuf_mtod(tx_pkts[0], volatile void *));
  	while (total_sent < nb_pkts) {
  		pkts_remain = nb_pkts - total_sent;
-@@ -91,6 +94,7 @@ uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+@@ -94,6 +97,7 @@ uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
  		reclaim_completed_tx(&txq->q);
  	}
  

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

* [dpdk-stable] patch 'doc: improve multiport PF in nfp guide' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (45 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/cxgbe: fix crash when accessing empty Tx mbuf list' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/sfc/base: fix tunnel configuration' " luca.boccassi
                   ` (159 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Heinrich Kuhn; +Cc: Simon Horman, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From bc7135aecd639de6015c1df70fe013b477941301 Mon Sep 17 00:00:00 2001
From: Heinrich Kuhn <heinrich.kuhn@netronome.com>
Date: Thu, 3 Sep 2020 13:23:51 +0200
Subject: [PATCH] doc: improve multiport PF in nfp guide

[ upstream commit 979f2bae0714c18899e5bbb3d472842b0ce20060 ]

The Agilio CX family of smartNIC's generally have a 1:many mapping of PF
to physical ports. Elaborate on this mapping in the PF multiport section
of the NFP PMD documentation.

Fixes: d625beafc8be ("doc: update NFP with PF support information")

Signed-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
---
 doc/guides/nics/nfp.rst | 39 ++++++++++++++++++++++++++++-----------
 1 file changed, 28 insertions(+), 11 deletions(-)

diff --git a/doc/guides/nics/nfp.rst b/doc/guides/nics/nfp.rst
index 5f2a0698f6..020e37d131 100644
--- a/doc/guides/nics/nfp.rst
+++ b/doc/guides/nics/nfp.rst
@@ -102,22 +102,39 @@ directory per firmware application. Options 1 and 2 for firmware filenames allow
 more than one SmartNIC, same type of SmartNIC or different ones, and to upload a
 different firmware to each SmartNIC.
 
+   .. Note::
+      Currently the NFP PMD supports using the PF with Agilio Basic Firmware. See
+      https://help.netronome.com/support/solutions for more information on the
+      various firmwares supported by the Netronome Agilio CX smartNIC.
 
 PF multiport support
 --------------------
 
-Some NFP cards support several physical ports with just one single PCI device.
-The DPDK core is designed with a 1:1 relationship between PCI devices and DPDK
-ports, so NFP PMD PF support requires handling the multiport case specifically.
-During NFP PF initialization, the PMD will extract the information about the
-number of PF ports from the firmware and will create as many DPDK ports as
-needed.
-
-Because the unusual relationship between a single PCI device and several DPDK
-ports, there are some limitations when using more than one PF DPDK port: there
-is no support for RX interrupts and it is not possible either to use those PF
-ports with the device hotplug functionality.
+The NFP PMD can work with up to 8 ports on the same PF device. The number of
+available ports is firmware and hardware dependent, and the driver looks for a
+firmware symbol during initialization to know how many can be used.
 
+DPDK apps work with ports, and a port is usually a PF or a VF PCI device.
+However, with the NFP PF multiport there is just one PF PCI device. Supporting
+this particular configuration requires the PMD to create ports in a special way,
+although once they are created, DPDK apps should be able to use them as normal
+PCI ports.
+
+NFP ports belonging to same PF can be seen inside PMD initialization with a
+suffix added to the PCI ID: wwww:xx:yy.z_port_n. For example, a PF with PCI ID
+0000:03:00.0 and four ports is seen by the PMD code as:
+
+   .. code-block:: console
+
+      0000:03:00.0_port_0
+      0000:03:00.0_port_1
+      0000:03:00.0_port_2
+      0000:03:00.0_port_3
+
+   .. Note::
+
+      There are some limitations with multiport support: RX interrupts and
+      device hot-plugging are not supported.
 
 PF multiprocess support
 -----------------------
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.285745936 +0000
+++ 0048-doc-improve-multiport-PF-in-nfp-guide.patch	2020-10-28 10:35:11.512830142 +0000
@@ -1,14 +1,15 @@
-From 979f2bae0714c18899e5bbb3d472842b0ce20060 Mon Sep 17 00:00:00 2001
+From bc7135aecd639de6015c1df70fe013b477941301 Mon Sep 17 00:00:00 2001
 From: Heinrich Kuhn <heinrich.kuhn@netronome.com>
 Date: Thu, 3 Sep 2020 13:23:51 +0200
 Subject: [PATCH] doc: improve multiport PF in nfp guide
 
+[ upstream commit 979f2bae0714c18899e5bbb3d472842b0ce20060 ]
+
 The Agilio CX family of smartNIC's generally have a 1:many mapping of PF
 to physical ports. Elaborate on this mapping in the PF multiport section
 of the NFP PMD documentation.
 
 Fixes: d625beafc8be ("doc: update NFP with PF support information")
-Cc: stable@dpdk.org
 
 Signed-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
 Signed-off-by: Simon Horman <simon.horman@netronome.com>

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

* [dpdk-stable] patch 'net/sfc/base: fix tunnel configuration' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (46 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'doc: improve multiport PF in nfp guide' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'vhost: fix IOTLB mempool single-consumer flag' " luca.boccassi
                   ` (158 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Igor Romanov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 32e242838581c3748fb36a1669c040ca5cc2304e Mon Sep 17 00:00:00 2001
From: Igor Romanov <igor.romanov@oktetlabs.ru>
Date: Tue, 8 Sep 2020 10:20:22 +0100
Subject: [PATCH] net/sfc/base: fix tunnel configuration

[ upstream commit 33f4e56dda2764eb62970a2c83f224fef43456c1 ]

Tunnel configuration may fail because of insufficient access rights
on a virtual function. Ignore the failure if a tunnel configuration
with empty UDP ports is requested.

Fixes: 17551f6dffcc ("net/sfc/base: add API to control UDP tunnel ports")

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/efx_tunnel.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/net/sfc/base/efx_tunnel.c b/drivers/net/sfc/base/efx_tunnel.c
index edb6be028f..c92c02cfa2 100644
--- a/drivers/net/sfc/base/efx_tunnel.c
+++ b/drivers/net/sfc/base/efx_tunnel.c
@@ -421,7 +421,7 @@ ef10_tunnel_reconfigure(
 {
 	efx_tunnel_cfg_t *etcp = &enp->en_tunnel_cfg;
 	efx_rc_t rc;
-	boolean_t resetting;
+	boolean_t resetting = B_FALSE;
 	efsys_lock_state_t state;
 	efx_tunnel_cfg_t etc;
 
@@ -446,8 +446,14 @@ ef10_tunnel_reconfigure(
 		 */
 		rc = efx_mcdi_set_tunnel_encap_udp_ports(enp, &etc, B_FALSE,
 		    &resetting);
-		if (rc != 0)
-			goto fail2;
+		if (rc != 0) {
+			/*
+			 * Do not fail if the access is denied when no
+			 * tunnel encap UDP ports are configured.
+			 */
+			if (rc != EACCES || etc.etc_udp_entries_num != 0)
+				goto fail2;
+		}
 
 		/*
 		 * Although the caller should be able to handle MC reboot,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.314537070 +0000
+++ 0049-net-sfc-base-fix-tunnel-configuration.patch	2020-10-28 10:35:11.512830142 +0000
@@ -1,14 +1,15 @@
-From 33f4e56dda2764eb62970a2c83f224fef43456c1 Mon Sep 17 00:00:00 2001
+From 32e242838581c3748fb36a1669c040ca5cc2304e Mon Sep 17 00:00:00 2001
 From: Igor Romanov <igor.romanov@oktetlabs.ru>
 Date: Tue, 8 Sep 2020 10:20:22 +0100
 Subject: [PATCH] net/sfc/base: fix tunnel configuration
 
+[ upstream commit 33f4e56dda2764eb62970a2c83f224fef43456c1 ]
+
 Tunnel configuration may fail because of insufficient access rights
 on a virtual function. Ignore the failure if a tunnel configuration
 with empty UDP ports is requested.
 
 Fixes: 17551f6dffcc ("net/sfc/base: add API to control UDP tunnel ports")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -17,7 +18,7 @@
  1 file changed, 9 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/sfc/base/efx_tunnel.c b/drivers/net/sfc/base/efx_tunnel.c
-index 3a034412cd..1cc072f0d9 100644
+index edb6be028f..c92c02cfa2 100644
 --- a/drivers/net/sfc/base/efx_tunnel.c
 +++ b/drivers/net/sfc/base/efx_tunnel.c
 @@ -421,7 +421,7 @@ ef10_tunnel_reconfigure(

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

* [dpdk-stable] patch 'vhost: fix IOTLB mempool single-consumer flag' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (47 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/sfc/base: fix tunnel configuration' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/af_xdp: fix umem size' " luca.boccassi
                   ` (157 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Eugenio Pérez; +Cc: Chenbo Xia, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 824ebcd5cf0310553dcb85470f5ba804453e6c73 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= <eperezma@redhat.com>
Date: Mon, 31 Aug 2020 09:59:22 +0200
Subject: [PATCH] vhost: fix IOTLB mempool single-consumer flag
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 46d3f57537059ef9ec497f97d98e57a1e5f2f417 ]

Control thread (which handles iotlb msg) and forwarding thread
both use iotlb to translate address. The former may modify the
same entry of mempool and may cause a loop in iotlb_pending_entries
list.

Bugzilla ID: 523
Fixes: d012d1f293f4 ("vhost: add IOTLB helper functions")

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/iotlb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/librte_vhost/iotlb.c b/lib/librte_vhost/iotlb.c
index 07443a94bc..2e90a63bb1 100644
--- a/lib/librte_vhost/iotlb.c
+++ b/lib/librte_vhost/iotlb.c
@@ -321,8 +321,7 @@ vhost_user_iotlb_init(struct virtio_net *dev, int vq_index)
 			IOTLB_CACHE_SIZE, sizeof(struct vhost_iotlb_entry), 0,
 			0, 0, NULL, NULL, NULL, socket,
 			MEMPOOL_F_NO_CACHE_ALIGN |
-			MEMPOOL_F_SP_PUT |
-			MEMPOOL_F_SC_GET);
+			MEMPOOL_F_SP_PUT);
 	if (!vq->iotlb_pool) {
 		RTE_LOG(ERR, VHOST_CONFIG,
 				"Failed to create IOTLB cache pool (%s)\n",
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.343102393 +0000
+++ 0050-vhost-fix-IOTLB-mempool-single-consumer-flag.patch	2020-10-28 10:35:11.512830142 +0000
@@ -1,4 +1,4 @@
-From 46d3f57537059ef9ec497f97d98e57a1e5f2f417 Mon Sep 17 00:00:00 2001
+From 824ebcd5cf0310553dcb85470f5ba804453e6c73 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= <eperezma@redhat.com>
 Date: Mon, 31 Aug 2020 09:59:22 +0200
 Subject: [PATCH] vhost: fix IOTLB mempool single-consumer flag
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 46d3f57537059ef9ec497f97d98e57a1e5f2f417 ]
+
 Control thread (which handles iotlb msg) and forwarding thread
 both use iotlb to translate address. The former may modify the
 same entry of mempool and may cause a loop in iotlb_pending_entries
@@ -13,7 +15,6 @@
 
 Bugzilla ID: 523
 Fixes: d012d1f293f4 ("vhost: add IOTLB helper functions")
-Cc: stable@dpdk.org
 
 Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
 Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
@@ -23,7 +24,7 @@
  1 file changed, 1 insertion(+), 2 deletions(-)
 
 diff --git a/lib/librte_vhost/iotlb.c b/lib/librte_vhost/iotlb.c
-index 5b3a0c090c..e0b67721b6 100644
+index 07443a94bc..2e90a63bb1 100644
 --- a/lib/librte_vhost/iotlb.c
 +++ b/lib/librte_vhost/iotlb.c
 @@ -321,8 +321,7 @@ vhost_user_iotlb_init(struct virtio_net *dev, int vq_index)
@@ -34,7 +35,7 @@
 -			MEMPOOL_F_SC_GET);
 +			MEMPOOL_F_SP_PUT);
  	if (!vq->iotlb_pool) {
- 		VHOST_LOG_CONFIG(ERR,
+ 		RTE_LOG(ERR, VHOST_CONFIG,
  				"Failed to create IOTLB cache pool (%s)\n",
 -- 
 2.20.1

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

* [dpdk-stable] patch 'net/af_xdp: fix umem size' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (48 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'vhost: fix IOTLB mempool single-consumer flag' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/iavf: fix iterator for RSS LUT' " luca.boccassi
                   ` (156 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Ciara Loftus; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From fc8892c12e467fe1dd4aec41f328a0ffec7ce58f Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Thu, 10 Sep 2020 09:06:47 +0000
Subject: [PATCH] net/af_xdp: fix umem size

[ upstream commit fb053c35c66ee0052fcb715f137c49305f83a6db ]

The kernel expects the start address of the UMEM to be page size
aligned.
Since the mempool is not guaranteed to have such alignment, we have been
aligning the address to the start of the page the mempool is on. However
when passing the 'size' of the UMEM during it's creation we did not take
this into account.

This commit adds the amount by which the address was aligned to the size
of the UMEM.

Bugzilla ID: 532
Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 844cd9986c..fbc95e5483 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -743,12 +743,17 @@ eth_link_update(struct rte_eth_dev *dev __rte_unused,
 }
 
 #if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG)
-static inline uint64_t get_base_addr(struct rte_mempool *mp)
+static inline uint64_t get_base_addr(struct rte_mempool *mp, uint64_t *align)
 {
 	struct rte_mempool_memhdr *memhdr;
+	uint64_t memhdr_addr, aligned_addr;
 
 	memhdr = STAILQ_FIRST(&mp->mem_list);
-	return (uint64_t)memhdr->addr & ~(getpagesize() - 1);
+	memhdr_addr = (uint64_t)memhdr->addr;
+	aligned_addr = memhdr_addr & ~(getpagesize() - 1);
+	*align = memhdr_addr - aligned_addr;
+
+	return aligned_addr;
 }
 
 static struct
@@ -763,6 +768,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals __rte_unused,
 		.flags = XDP_UMEM_UNALIGNED_CHUNK_FLAG};
 	void *base_addr = NULL;
 	struct rte_mempool *mb_pool = rxq->mb_pool;
+	uint64_t umem_size, align = 0;
 
 	usr_config.frame_size = rte_mempool_calc_obj_size(mb_pool->elt_size,
 								mb_pool->flags,
@@ -779,12 +785,11 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals __rte_unused,
 	}
 
 	umem->mb_pool = mb_pool;
-	base_addr = (void *)get_base_addr(mb_pool);
+	base_addr = (void *)get_base_addr(mb_pool, &align);
+	umem_size = mb_pool->populated_size * usr_config.frame_size + align;
 
-	ret = xsk_umem__create(&umem->umem, base_addr,
-			       mb_pool->populated_size * usr_config.frame_size,
-			       &umem->fq, &umem->cq,
-			       &usr_config);
+	ret = xsk_umem__create(&umem->umem, base_addr, umem_size,
+			       &umem->fq, &umem->cq, &usr_config);
 
 	if (ret) {
 		AF_XDP_LOG(ERR, "Failed to create umem");
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.372652229 +0000
+++ 0051-net-af_xdp-fix-umem-size.patch	2020-10-28 10:35:11.516830200 +0000
@@ -1,8 +1,10 @@
-From fb053c35c66ee0052fcb715f137c49305f83a6db Mon Sep 17 00:00:00 2001
+From fc8892c12e467fe1dd4aec41f328a0ffec7ce58f Mon Sep 17 00:00:00 2001
 From: Ciara Loftus <ciara.loftus@intel.com>
 Date: Thu, 10 Sep 2020 09:06:47 +0000
 Subject: [PATCH] net/af_xdp: fix umem size
 
+[ upstream commit fb053c35c66ee0052fcb715f137c49305f83a6db ]
+
 The kernel expects the start address of the UMEM to be page size
 aligned.
 Since the mempool is not guaranteed to have such alignment, we have been
@@ -15,7 +17,6 @@
 
 Bugzilla ID: 532
 Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
 ---
@@ -23,10 +24,10 @@
  1 file changed, 12 insertions(+), 7 deletions(-)
 
 diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
-index 7ce4ad04af..b65ee449fc 100644
+index 844cd9986c..fbc95e5483 100644
 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c
 +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
-@@ -746,12 +746,17 @@ eth_link_update(struct rte_eth_dev *dev __rte_unused,
+@@ -743,12 +743,17 @@ eth_link_update(struct rte_eth_dev *dev __rte_unused,
  }
  
  #if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG)
@@ -46,7 +47,7 @@
  }
  
  static struct
-@@ -766,6 +771,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals __rte_unused,
+@@ -763,6 +768,7 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals __rte_unused,
  		.flags = XDP_UMEM_UNALIGNED_CHUNK_FLAG};
  	void *base_addr = NULL;
  	struct rte_mempool *mb_pool = rxq->mb_pool;
@@ -54,7 +55,7 @@
  
  	usr_config.frame_size = rte_mempool_calc_obj_size(mb_pool->elt_size,
  								mb_pool->flags,
-@@ -782,12 +788,11 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals __rte_unused,
+@@ -779,12 +785,11 @@ xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals __rte_unused,
  	}
  
  	umem->mb_pool = mb_pool;

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

* [dpdk-stable] patch 'net/iavf: fix iterator for RSS LUT' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (49 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/af_xdp: fix umem size' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/netvsc: fix rndis packet addresses' " luca.boccassi
                   ` (155 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Ting Xu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 369dcff366853cd7c13564789f82a6bf87d32d31 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 21 Sep 2020 16:30:58 +0800
Subject: [PATCH] net/iavf: fix iterator for RSS LUT

[ upstream commit 6faf884136f302b3bf0d2f984090b6c3816c7062 ]

Change RSS LUT iterator from uint8_t to uint16_t since the
RSS LUT size could exceed 255.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Ting Xu <ting.xu@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 02e7006972..ab3c4bab5f 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -137,7 +137,7 @@ iavf_init_rss(struct iavf_adapter *adapter)
 {
 	struct iavf_info *vf =  IAVF_DEV_PRIVATE_TO_VF(adapter);
 	struct rte_eth_rss_conf *rss_conf;
-	uint8_t i, j, nb_q;
+	uint16_t i, j, nb_q;
 	int ret;
 
 	rss_conf = &adapter->eth_dev->data->dev_conf.rx_adv_conf.rss_conf;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.402233764 +0000
+++ 0052-net-iavf-fix-iterator-for-RSS-LUT.patch	2020-10-28 10:35:11.516830200 +0000
@@ -1,13 +1,14 @@
-From 6faf884136f302b3bf0d2f984090b6c3816c7062 Mon Sep 17 00:00:00 2001
+From 369dcff366853cd7c13564789f82a6bf87d32d31 Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang@intel.com>
 Date: Mon, 21 Sep 2020 16:30:58 +0800
 Subject: [PATCH] net/iavf: fix iterator for RSS LUT
 
+[ upstream commit 6faf884136f302b3bf0d2f984090b6c3816c7062 ]
+
 Change RSS LUT iterator from uint8_t to uint16_t since the
 RSS LUT size could exceed 255.
 
 Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
-Cc: stable@dpdk.org
 
 Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
 Acked-by: Ting Xu <ting.xu@intel.com>
@@ -16,10 +17,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
-index 6bb915d816..440da7d76a 100644
+index 02e7006972..ab3c4bab5f 100644
 --- a/drivers/net/iavf/iavf_ethdev.c
 +++ b/drivers/net/iavf/iavf_ethdev.c
-@@ -157,7 +157,7 @@ iavf_init_rss(struct iavf_adapter *adapter)
+@@ -137,7 +137,7 @@ iavf_init_rss(struct iavf_adapter *adapter)
  {
  	struct iavf_info *vf =  IAVF_DEV_PRIVATE_TO_VF(adapter);
  	struct rte_eth_rss_conf *rss_conf;

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

* [dpdk-stable] patch 'net/netvsc: fix rndis packet addresses' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (50 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/iavf: fix iterator for RSS LUT' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/enic: ignore VLAN inner type when it is zero' " luca.boccassi
                   ` (154 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Long Li; +Cc: Souvik Dey, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 03dae29c5d4bdb737c211750e29fa43ace42557a Mon Sep 17 00:00:00 2001
From: Long Li <longli@microsoft.com>
Date: Fri, 18 Sep 2020 11:53:47 -0700
Subject: [PATCH] net/netvsc: fix rndis packet addresses

[ upstream commit d9fecbe97ba7c1ad0dedf33910d8b4e4e444979a ]

The address should be calculated before type cast, not after.

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

Reported-by: Souvik Dey <sodey@rbbn.com>
Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/netvsc/hn_rxtx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index df15e56120..90ec8d7d57 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -160,8 +160,8 @@ static void hn_txd_init(struct rte_mempool *mp __rte_unused,
 
 	txd->queue_id = txq->queue_id;
 	txd->chim_index = NVS_CHIM_IDX_INVALID;
-	txd->rndis_pkt = (struct rndis_packet_msg *)(char *)txq->tx_rndis
-		+ idx * HN_RNDIS_PKT_ALIGNED;
+	txd->rndis_pkt = (struct rndis_packet_msg *)((char *)txq->tx_rndis
+		+ idx * HN_RNDIS_PKT_ALIGNED);
 }
 
 int
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.431507667 +0000
+++ 0053-net-netvsc-fix-rndis-packet-addresses.patch	2020-10-28 10:35:11.516830200 +0000
@@ -1,12 +1,13 @@
-From d9fecbe97ba7c1ad0dedf33910d8b4e4e444979a Mon Sep 17 00:00:00 2001
+From 03dae29c5d4bdb737c211750e29fa43ace42557a Mon Sep 17 00:00:00 2001
 From: Long Li <longli@microsoft.com>
 Date: Fri, 18 Sep 2020 11:53:47 -0700
 Subject: [PATCH] net/netvsc: fix rndis packet addresses
 
+[ upstream commit d9fecbe97ba7c1ad0dedf33910d8b4e4e444979a ]
+
 The address should be calculated before type cast, not after.
 
 Fixes: cc0251813277 ("net/netvsc: split send buffers from Tx descriptors")
-Cc: stable@dpdk.org
 
 Reported-by: Souvik Dey <sodey@rbbn.com>
 Signed-off-by: Long Li <longli@microsoft.com>
@@ -15,7 +16,7 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
-index 3e8d3b407d..65f1abae51 100644
+index df15e56120..90ec8d7d57 100644
 --- a/drivers/net/netvsc/hn_rxtx.c
 +++ b/drivers/net/netvsc/hn_rxtx.c
 @@ -160,8 +160,8 @@ static void hn_txd_init(struct rte_mempool *mp __rte_unused,

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

* [dpdk-stable] patch 'net/enic: ignore VLAN inner type when it is zero' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (51 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/netvsc: fix rndis packet addresses' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/enic: generate VXLAN src port if it is zero in template' " luca.boccassi
                   ` (153 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: John Daley, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 9b4b0577cdfb4a3c3155dd9b0efe6d46ec25ce3f Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim@cisco.com>
Date: Wed, 9 Sep 2020 07:00:04 -0700
Subject: [PATCH] net/enic: ignore VLAN inner type when it is zero

[ upstream commit 473e9407a4d7a365074d9b0618a8f1eccef291b5 ]

When a VLAN pattern is present, the flow handler always copies its
inner_type to the match buffer regardless of its value (i.e. HW
matches inner_type against packet's inner ethertype). When inner_type
spec and mask are both 0, adding it to the match buffer is usually
harmless but breaks the following pattern used in some applications
like OVS-DPDK.

flow create 0 ingress ... pattern eth ... type is 0x0800 /
vlan tci spec 0x2 tci mask 0xefff / ipv4 / end actions count /
of_pop_vlan / ...

The VLAN pattern's inner_type is 0. And the outer eth pattern's type
actually specifies the inner ethertype. The outer ethertype (0x0800)
is first copied to the match buffer. Then, the driver copies
inner_type (0) to the match buffer, which overwrites the existing
0x0800 with 0 and breaks the app usage above.

Simply ignore inner_type when it is 0, which is the correct
behavior. As a byproduct, the driver can support the usage like the
above.

Fixes: ea7768b5bba8 ("net/enic: add flow implementation based on Flow Manager API")

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

diff --git a/drivers/net/enic/enic_fm_flow.c b/drivers/net/enic/enic_fm_flow.c
index e8d5927674..5b456f20d4 100644
--- a/drivers/net/enic/enic_fm_flow.c
+++ b/drivers/net/enic/enic_fm_flow.c
@@ -349,8 +349,11 @@ enic_fm_copy_item_vlan(struct copy_item_args *arg)
 	eth_mask = (void *)&fm_mask->l2.eth;
 	eth_val = (void *)&fm_data->l2.eth;
 
-	/* Outer TPID cannot be matched */
-	if (eth_mask->ether_type)
+	/*
+	 * Outer TPID cannot be matched. If inner_type is 0, use what is
+	 * in the eth header.
+	 */
+	if (eth_mask->ether_type && mask->inner_type)
 		return -ENOTSUP;
 
 	/*
@@ -358,8 +361,10 @@ enic_fm_copy_item_vlan(struct copy_item_args *arg)
 	 * L2, regardless of vlan stripping settings. So, the inner type
 	 * from vlan becomes the ether type of the eth header.
 	 */
-	eth_mask->ether_type = mask->inner_type;
-	eth_val->ether_type = spec->inner_type;
+	if (mask->inner_type) {
+		eth_mask->ether_type = mask->inner_type;
+		eth_val->ether_type = spec->inner_type;
+	}
 	fm_data->fk_header_select |= FKH_ETHER | FKH_QTAG;
 	fm_mask->fk_header_select |= FKH_ETHER | FKH_QTAG;
 	fm_data->fk_vlan = rte_be_to_cpu_16(spec->tci);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.461581270 +0000
+++ 0054-net-enic-ignore-VLAN-inner-type-when-it-is-zero.patch	2020-10-28 10:35:11.520830259 +0000
@@ -1,8 +1,10 @@
-From 473e9407a4d7a365074d9b0618a8f1eccef291b5 Mon Sep 17 00:00:00 2001
+From 9b4b0577cdfb4a3c3155dd9b0efe6d46ec25ce3f Mon Sep 17 00:00:00 2001
 From: Hyong Youb Kim <hyonkim@cisco.com>
 Date: Wed, 9 Sep 2020 07:00:04 -0700
 Subject: [PATCH] net/enic: ignore VLAN inner type when it is zero
 
+[ upstream commit 473e9407a4d7a365074d9b0618a8f1eccef291b5 ]
+
 When a VLAN pattern is present, the flow handler always copies its
 inner_type to the match buffer regardless of its value (i.e. HW
 matches inner_type against packet's inner ethertype). When inner_type
@@ -25,7 +27,6 @@
 above.
 
 Fixes: ea7768b5bba8 ("net/enic: add flow implementation based on Flow Manager API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
 Reviewed-by: John Daley <johndale@cisco.com>
@@ -34,10 +35,10 @@
  1 file changed, 9 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/enic/enic_fm_flow.c b/drivers/net/enic/enic_fm_flow.c
-index ee671e11df..94e39a94bf 100644
+index e8d5927674..5b456f20d4 100644
 --- a/drivers/net/enic/enic_fm_flow.c
 +++ b/drivers/net/enic/enic_fm_flow.c
-@@ -392,8 +392,11 @@ enic_fm_copy_item_vlan(struct copy_item_args *arg)
+@@ -349,8 +349,11 @@ enic_fm_copy_item_vlan(struct copy_item_args *arg)
  	eth_mask = (void *)&fm_mask->l2.eth;
  	eth_val = (void *)&fm_data->l2.eth;
  
@@ -51,7 +52,7 @@
  		return -ENOTSUP;
  
  	/*
-@@ -401,8 +404,10 @@ enic_fm_copy_item_vlan(struct copy_item_args *arg)
+@@ -358,8 +361,10 @@ enic_fm_copy_item_vlan(struct copy_item_args *arg)
  	 * L2, regardless of vlan stripping settings. So, the inner type
  	 * from vlan becomes the ether type of the eth header.
  	 */

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

* [dpdk-stable] patch 'net/enic: generate VXLAN src port if it is zero in template' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (52 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/enic: ignore VLAN inner type when it is zero' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'test/ring: fix number of single element enqueue/dequeue' " luca.boccassi
                   ` (152 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: John Daley, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From af788d5aaf465b40e4112d19200ccb8eb283bd68 Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim@cisco.com>
Date: Wed, 9 Sep 2020 07:00:05 -0700
Subject: [PATCH] net/enic: generate VXLAN src port if it is zero in template

[ upstream commit d52054e70f8982d7d72edec14b5875c2a0ed23da ]

When VXLAN source port in the template is zero, the adapter is
expected to generate a value based on the inner packet flow, when it
performs encapsulation. Flow Manager in the VIC adapter currently
lacks such ability. So, generate a random port when creating a flow if
the port is zero, to avoid transmitting packets with source port 0.

Fixes: ea7768b5bba8 ("net/enic: add flow implementation based on Flow Manager API")

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

diff --git a/drivers/net/enic/enic_fm_flow.c b/drivers/net/enic/enic_fm_flow.c
index 5b456f20d4..ab008c7356 100644
--- a/drivers/net/enic/enic_fm_flow.c
+++ b/drivers/net/enic/enic_fm_flow.c
@@ -929,6 +929,17 @@ enic_fm_copy_vxlan_decap(struct enic_flowman *fm,
 	return enic_fm_append_action_op(fm, &fm_op, error);
 }
 
+/* Generate a reasonable source port number */
+static uint16_t
+gen_src_port(void)
+{
+	/* Min/max below are the default values in OVS-DPDK and Linux */
+	uint16_t p = rte_rand();
+	p = RTE_MAX(p, 32768);
+	p = RTE_MIN(p, 61000);
+	return rte_cpu_to_be_16(p);
+}
+
 /* VXLAN encap is done via flowman compound action */
 static int
 enic_fm_copy_vxlan_encap(struct enic_flowman *fm,
@@ -937,6 +948,7 @@ enic_fm_copy_vxlan_encap(struct enic_flowman *fm,
 {
 	struct fm_action_op fm_op;
 	struct rte_ether_hdr *eth;
+	struct rte_udp_hdr *udp;
 	uint16_t *ethertype;
 	void *template;
 	uint8_t off;
@@ -1035,8 +1047,17 @@ enic_fm_copy_vxlan_encap(struct enic_flowman *fm,
 		off + offsetof(struct rte_udp_hdr, dgram_len);
 	fm_op.encap.len2_delta =
 		sizeof(struct rte_udp_hdr) + sizeof(struct rte_vxlan_hdr);
+	udp = (struct rte_udp_hdr *)template;
 	append_template(&template, &off, item->spec,
 			sizeof(struct rte_udp_hdr));
+	/*
+	 * Firmware does not hash/fill source port yet. Generate a
+	 * random port, as there is *usually* one rte_flow for the
+	 * given inner packet stream (i.e. a single stream has one
+	 * random port).
+	 */
+	if (udp->src_port == 0)
+		udp->src_port = gen_src_port();
 	item++;
 	flow_item_skip_void(&item);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.493182983 +0000
+++ 0055-net-enic-generate-VXLAN-src-port-if-it-is-zero-in-te.patch	2020-10-28 10:35:11.520830259 +0000
@@ -1,8 +1,10 @@
-From d52054e70f8982d7d72edec14b5875c2a0ed23da Mon Sep 17 00:00:00 2001
+From af788d5aaf465b40e4112d19200ccb8eb283bd68 Mon Sep 17 00:00:00 2001
 From: Hyong Youb Kim <hyonkim@cisco.com>
 Date: Wed, 9 Sep 2020 07:00:05 -0700
 Subject: [PATCH] net/enic: generate VXLAN src port if it is zero in template
 
+[ upstream commit d52054e70f8982d7d72edec14b5875c2a0ed23da ]
+
 When VXLAN source port in the template is zero, the adapter is
 expected to generate a value based on the inner packet flow, when it
 performs encapsulation. Flow Manager in the VIC adapter currently
@@ -10,7 +12,6 @@
 the port is zero, to avoid transmitting packets with source port 0.
 
 Fixes: ea7768b5bba8 ("net/enic: add flow implementation based on Flow Manager API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
 Reviewed-by: John Daley <johndale@cisco.com>
@@ -19,10 +20,10 @@
  1 file changed, 21 insertions(+)
 
 diff --git a/drivers/net/enic/enic_fm_flow.c b/drivers/net/enic/enic_fm_flow.c
-index 94e39a94bf..8e5eb4d743 100644
+index 5b456f20d4..ab008c7356 100644
 --- a/drivers/net/enic/enic_fm_flow.c
 +++ b/drivers/net/enic/enic_fm_flow.c
-@@ -978,6 +978,17 @@ enic_fm_copy_vxlan_decap(struct enic_flowman *fm,
+@@ -929,6 +929,17 @@ enic_fm_copy_vxlan_decap(struct enic_flowman *fm,
  	return enic_fm_append_action_op(fm, &fm_op, error);
  }
  
@@ -40,7 +41,7 @@
  /* VXLAN encap is done via flowman compound action */
  static int
  enic_fm_copy_vxlan_encap(struct enic_flowman *fm,
-@@ -986,6 +997,7 @@ enic_fm_copy_vxlan_encap(struct enic_flowman *fm,
+@@ -937,6 +948,7 @@ enic_fm_copy_vxlan_encap(struct enic_flowman *fm,
  {
  	struct fm_action_op fm_op;
  	struct rte_ether_hdr *eth;
@@ -48,7 +49,7 @@
  	uint16_t *ethertype;
  	void *template;
  	uint8_t off;
-@@ -1084,8 +1096,17 @@ enic_fm_copy_vxlan_encap(struct enic_flowman *fm,
+@@ -1035,8 +1047,17 @@ enic_fm_copy_vxlan_encap(struct enic_flowman *fm,
  		off + offsetof(struct rte_udp_hdr, dgram_len);
  	fm_op.encap.len2_delta =
  		sizeof(struct rte_udp_hdr) + sizeof(struct rte_vxlan_hdr);

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

* [dpdk-stable] patch 'test/ring: fix number of single element enqueue/dequeue' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (53 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/enic: generate VXLAN src port if it is zero in template' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'maintainers: update Mellanox emails' " luca.boccassi
                   ` (151 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Feifei Wang
  Cc: Ruifeng Wang, Phil Yang, Honnappa Nagarahalli,
	Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From b54402145139750a450d3bc34849fbd9c1e2c475 Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Sun, 20 Sep 2020 06:48:51 -0500
Subject: [PATCH] test/ring: fix number of single element enqueue/dequeue

[ upstream commit f642148eea7c63ab0cfe7ef783657bd9db83518e ]

The ring capacity is (RING_SIZE - 1), thus only (RING_SIZE - 1) number of
elements can be enqueued into the ring.

Fixes: af75078fece3 ("first public release")

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

diff --git a/app/test/test_ring.c b/app/test/test_ring.c
index aaf1e70ad8..4825c9e2e9 100644
--- a/app/test/test_ring.c
+++ b/app/test/test_ring.c
@@ -696,7 +696,7 @@ test_ring_basic_ex(void)
 
 	printf("%u ring entries are now free\n", rte_ring_free_count(rp));
 
-	for (i = 0; i < RING_SIZE; i ++) {
+	for (i = 0; i < RING_SIZE - 1; i ++) {
 		rte_ring_enqueue(rp, obj[i]);
 	}
 
@@ -705,7 +705,7 @@ test_ring_basic_ex(void)
 		goto fail_test;
 	}
 
-	for (i = 0; i < RING_SIZE; i ++) {
+	for (i = 0; i < RING_SIZE - 1; i ++) {
 		rte_ring_dequeue(rp, &obj[i]);
 	}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.524515403 +0000
+++ 0056-test-ring-fix-number-of-single-element-enqueue-deque.patch	2020-10-28 10:35:11.524830318 +0000
@@ -1,13 +1,14 @@
-From f642148eea7c63ab0cfe7ef783657bd9db83518e Mon Sep 17 00:00:00 2001
+From b54402145139750a450d3bc34849fbd9c1e2c475 Mon Sep 17 00:00:00 2001
 From: Feifei Wang <feifei.wang2@arm.com>
 Date: Sun, 20 Sep 2020 06:48:51 -0500
 Subject: [PATCH] test/ring: fix number of single element enqueue/dequeue
 
+[ upstream commit f642148eea7c63ab0cfe7ef783657bd9db83518e ]
+
 The ring capacity is (RING_SIZE - 1), thus only (RING_SIZE - 1) number of
 elements can be enqueued into the ring.
 
 Fixes: af75078fece3 ("first public release")
-Cc: stable@dpdk.org
 
 Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
 Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
@@ -19,27 +20,27 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/app/test/test_ring.c b/app/test/test_ring.c
-index 0ae97d341e..04bdc9b696 100644
+index aaf1e70ad8..4825c9e2e9 100644
 --- a/app/test/test_ring.c
 +++ b/app/test/test_ring.c
-@@ -811,7 +811,7 @@ test_ring_basic_ex(void)
- 		printf("%u ring entries are now free\n",
- 			rte_ring_free_count(rp));
+@@ -696,7 +696,7 @@ test_ring_basic_ex(void)
+ 
+ 	printf("%u ring entries are now free\n", rte_ring_free_count(rp));
+ 
+-	for (i = 0; i < RING_SIZE; i ++) {
++	for (i = 0; i < RING_SIZE - 1; i ++) {
+ 		rte_ring_enqueue(rp, obj[i]);
+ 	}
+ 
+@@ -705,7 +705,7 @@ test_ring_basic_ex(void)
+ 		goto fail_test;
+ 	}
  
--		for (j = 0; j < RING_SIZE; j++) {
-+		for (j = 0; j < RING_SIZE - 1; j++) {
- 			test_ring_enqueue(rp, obj, esize[i], 1,
- 				TEST_RING_THREAD_DEF | TEST_RING_ELEM_SINGLE);
- 		}
-@@ -822,7 +822,7 @@ test_ring_basic_ex(void)
- 			goto fail_test;
- 		}
+-	for (i = 0; i < RING_SIZE; i ++) {
++	for (i = 0; i < RING_SIZE - 1; i ++) {
+ 		rte_ring_dequeue(rp, &obj[i]);
+ 	}
  
--		for (j = 0; j < RING_SIZE; j++) {
-+		for (j = 0; j < RING_SIZE - 1; j++) {
- 			test_ring_dequeue(rp, obj, esize[i], 1,
- 				TEST_RING_THREAD_DEF | TEST_RING_ELEM_SINGLE);
- 		}
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'maintainers: update Mellanox emails' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (54 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'test/ring: fix number of single element enqueue/dequeue' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'kni: fix build with Linux 5.9' " luca.boccassi
                   ` (150 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Ori Kam
  Cc: Matan Azrad, Jerin Jacob, Raslan Darawsheh, Raslan Darawsheh,
	Ori Kam, Matan Azrad, Shahaf Shuler, Shahaf Shuler,
	Viacheslav Ovsiienko, Viacheslav Ovsiienko, Marko Kovacevic,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 0e5f3ccd1d3781865b60754737a7b3abac535c01 Mon Sep 17 00:00:00 2001
From: Ori Kam <orika@nvidia.com>
Date: Wed, 12 Aug 2020 16:08:35 +0000
Subject: [PATCH] maintainers: update Mellanox emails

[ upstream commit e9b17185e167f6ec64b240851e4459ae4ae05492 ]

This patch updates Mellanox maintainers mails from
the Mellanox domain to Nvidia domain.

Signed-off-by: Ori Kam <orika@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 MAINTAINERS | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 418f0f41f9..952ded7b00 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -46,7 +46,7 @@ M: Jerin Jacob <jerinj@marvell.com>
 T: git://dpdk.org/next/dpdk-next-net-mrvl
 
 Next-net-mlx Tree
-M: Raslan Darawsheh <rasland@mellanox.com>
+M: Raslan Darawsheh <rasland@nvidia.com>
 T: git://dpdk.org/next/dpdk-next-net-mlx
 
 Next-virtio Tree
@@ -373,7 +373,7 @@ F: devtools/test-null.sh
 F: doc/guides/prog_guide/switch_representation.rst
 
 Flow API
-M: Ori Kam <orika@mellanox.com>
+M: Ori Kam <orika@nvidia.com>
 T: git://dpdk.org/next/dpdk-next-net
 F: app/test-pmd/cmdline_flow.c
 F: doc/guides/prog_guide/rte_flow.rst
@@ -731,17 +731,17 @@ F: doc/guides/nics/features/octeontx2*.ini
 F: doc/guides/nics/octeontx2.rst
 
 Mellanox mlx4
-M: Matan Azrad <matan@mellanox.com>
-M: Shahaf Shuler <shahafs@mellanox.com>
+M: Matan Azrad <matan@nvidia.com>
+M: Shahaf Shuler <shahafs@nvidia.com>
 T: git://dpdk.org/next/dpdk-next-net-mlx
 F: drivers/net/mlx4/
 F: doc/guides/nics/mlx4.rst
 F: doc/guides/nics/features/mlx4.ini
 
 Mellanox mlx5
-M: Matan Azrad <matan@mellanox.com>
-M: Shahaf Shuler <shahafs@mellanox.com>
-M: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
+M: Matan Azrad <matan@nvidia.com>
+M: Shahaf Shuler <shahafs@nvidia.com>
+M: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
 T: git://dpdk.org/next/dpdk-next-net-mlx
 F: drivers/net/mlx5/
 F: buildtools/options-ibverbs-static.sh
@@ -749,7 +749,7 @@ F: doc/guides/nics/mlx5.rst
 F: doc/guides/nics/features/mlx5.ini
 
 Microsoft vdev_netvsc - EXPERIMENTAL
-M: Matan Azrad <matan@mellanox.com>
+M: Matan Azrad <matan@nvidia.com>
 F: drivers/net/vdev_netvsc/
 F: doc/guides/nics/vdev_netvsc.rst
 F: doc/guides/nics/features/vdev_netvsc.ini
@@ -1494,7 +1494,7 @@ M: Marko Kovacevic <marko.kovacevic@intel.com>
 F: examples/fips_validation/
 F: doc/guides/sample_app_ug/fips_validation.rst
 
-M: Ori Kam <orika@mellanox.com>
+M: Ori Kam <orika@nvidia.com>
 F: examples/flow_filtering/
 F: doc/guides/sample_app_ug/flow_filtering.rst
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.554072142 +0000
+++ 0057-maintainers-update-Mellanox-emails.patch	2020-10-28 10:35:11.524830318 +0000
@@ -1,24 +1,24 @@
-From e9b17185e167f6ec64b240851e4459ae4ae05492 Mon Sep 17 00:00:00 2001
+From 0e5f3ccd1d3781865b60754737a7b3abac535c01 Mon Sep 17 00:00:00 2001
 From: Ori Kam <orika@nvidia.com>
 Date: Wed, 12 Aug 2020 16:08:35 +0000
 Subject: [PATCH] maintainers: update Mellanox emails
 
+[ upstream commit e9b17185e167f6ec64b240851e4459ae4ae05492 ]
+
 This patch updates Mellanox maintainers mails from
 the Mellanox domain to Nvidia domain.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Ori Kam <orika@nvidia.com>
 Acked-by: Matan Azrad <matan@nvidia.com>
 ---
- MAINTAINERS | 28 ++++++++++++++--------------
- 1 file changed, 14 insertions(+), 14 deletions(-)
+ MAINTAINERS | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
 
 diff --git a/MAINTAINERS b/MAINTAINERS
-index 6dbea330f9..3835818ef4 100644
+index 418f0f41f9..952ded7b00 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -45,7 +45,7 @@ M: Jerin Jacob <jerinj@marvell.com>
+@@ -46,7 +46,7 @@ M: Jerin Jacob <jerinj@marvell.com>
  T: git://dpdk.org/next/dpdk-next-net-mrvl
  
  Next-net-mlx Tree
@@ -36,17 +36,8 @@
  T: git://dpdk.org/next/dpdk-next-net
  F: app/test-pmd/cmdline_flow.c
  F: doc/guides/prog_guide/rte_flow.rst
-@@ -427,7 +427,7 @@ F: doc/guides/prog_guide/compressdev.rst
- F: doc/guides/compressdevs/features/default.ini
- 
- RegEx API - EXPERIMENTAL
--M: Ori Kam <orika@mellanox.com>
-+M: Ori Kam <orika@nvidia.com>
- F: lib/librte_regexdev/
- F: app/test-regex/
- F: doc/guides/prog_guide/regexdev.rst
-@@ -749,17 +749,17 @@ F: drivers/common/octeontx2/otx2_sec*
- F: drivers/net/octeontx2/otx2_ethdev_sec*
+@@ -731,17 +731,17 @@ F: doc/guides/nics/features/octeontx2*.ini
+ F: doc/guides/nics/octeontx2.rst
  
  Mellanox mlx4
 -M: Matan Azrad <matan@mellanox.com>
@@ -66,9 +57,9 @@
 +M: Shahaf Shuler <shahafs@nvidia.com>
 +M: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
  T: git://dpdk.org/next/dpdk-next-net-mlx
- F: drivers/common/mlx5/
  F: drivers/net/mlx5/
-@@ -768,7 +768,7 @@ F: doc/guides/nics/mlx5.rst
+ F: buildtools/options-ibverbs-static.sh
+@@ -749,7 +749,7 @@ F: doc/guides/nics/mlx5.rst
  F: doc/guides/nics/features/mlx5.ini
  
  Microsoft vdev_netvsc - EXPERIMENTAL
@@ -76,37 +67,8 @@
 +M: Matan Azrad <matan@nvidia.com>
  F: drivers/net/vdev_netvsc/
  F: doc/guides/nics/vdev_netvsc.rst
- 
-@@ -1113,7 +1113,7 @@ RegEx Drivers
- -------------
- 
- Mellanox mlx5
--M: Ori Kam <orika@mellanox.com>
-+M: Ori Kam <orika@nvidia.com>
- F: drivers/regex/mlx5/
- F: doc/guides/regexdevs/mlx5.rst
- F: doc/guides/regexdevs/features/mlx5.ini
-@@ -1130,8 +1130,8 @@ F: doc/guides/vdpadevs/ifc.rst
- F: doc/guides/vdpadevs/features/ifcvf.ini
- 
- Mellanox mlx5 vDPA
--M: Matan Azrad <matan@mellanox.com>
--M: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
-+M: Matan Azrad <matan@nvidia.com>
-+M: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
- F: drivers/vdpa/mlx5/
- F: doc/guides/vdpadevs/mlx5.rst
- F: doc/guides/vdpadevs/features/mlx5.ini
-@@ -1529,7 +1529,7 @@ F: app/test-pmd/
- F: doc/guides/testpmd_app_ug/
- 
- Flow performance tool
--M: Wisam Jaddo <wisamm@mellanox.com>
-+M: Wisam Jaddo <wisamm@nvidia.com>
- F: app/test-flow-perf/
- F: doc/guides/tools/flow-perf.rst
- 
-@@ -1569,7 +1569,7 @@ M: Marko Kovacevic <marko.kovacevic@intel.com>
+ F: doc/guides/nics/features/vdev_netvsc.ini
+@@ -1494,7 +1494,7 @@ M: Marko Kovacevic <marko.kovacevic@intel.com>
  F: examples/fips_validation/
  F: doc/guides/sample_app_ug/fips_validation.rst
  

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

* [dpdk-stable] patch 'kni: fix build with Linux 5.9' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (55 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'maintainers: update Mellanox emails' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'stack: reload head when pop fails' " luca.boccassi
                   ` (149 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 1844e46113dfcfcfcf21cabd6737767350cb4c9c Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Mon, 17 Aug 2020 11:32:47 +0100
Subject: [PATCH] kni: fix build with Linux 5.9

[ upstream commit 87efaea6376c8ae1a69e471450744a973995726b ]

Starting from Linux 5.9 'get_user_pages_remote()' API doesn't get
'struct task_struct' parameter:
commit 64019a2e467a ("mm/gup: remove task_struct pointer for all gup code")

The change reflected to the KNI with version check.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 kernel/linux/kni/compat.h  | 4 ++++
 kernel/linux/kni/kni_dev.h | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
index 9ee45dbf6f..d515b27669 100644
--- a/kernel/linux/kni/compat.h
+++ b/kernel/linux/kni/compat.h
@@ -134,3 +134,7 @@
 #if KERNEL_VERSION(5, 6, 0) <= LINUX_VERSION_CODE
 #define HAVE_TX_TIMEOUT_TXQUEUE
 #endif
+
+#if KERNEL_VERSION(5, 9, 0) > LINUX_VERSION_CODE
+#define HAVE_TSK_IN_GUP
+#endif
diff --git a/kernel/linux/kni/kni_dev.h b/kernel/linux/kni/kni_dev.h
index ca5f92a47b..c15da311ba 100644
--- a/kernel/linux/kni/kni_dev.h
+++ b/kernel/linux/kni/kni_dev.h
@@ -101,8 +101,13 @@ static inline phys_addr_t iova_to_phys(struct task_struct *tsk,
 	offset = iova & (PAGE_SIZE - 1);
 
 	/* Read one page struct info */
+#ifdef HAVE_TSK_IN_GUP
 	ret = get_user_pages_remote(tsk, tsk->mm, iova, 1,
 				    FOLL_TOUCH, &page, NULL, NULL);
+#else
+	ret = get_user_pages_remote(tsk->mm, iova, 1,
+				    FOLL_TOUCH, &page, NULL, NULL);
+#endif
 	if (ret < 0)
 		return 0;
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.583373119 +0000
+++ 0058-kni-fix-build-with-Linux-5.9.patch	2020-10-28 10:35:11.524830318 +0000
@@ -1,16 +1,16 @@
-From 87efaea6376c8ae1a69e471450744a973995726b Mon Sep 17 00:00:00 2001
+From 1844e46113dfcfcfcf21cabd6737767350cb4c9c Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Mon, 17 Aug 2020 11:32:47 +0100
 Subject: [PATCH] kni: fix build with Linux 5.9
 
+[ upstream commit 87efaea6376c8ae1a69e471450744a973995726b ]
+
 Starting from Linux 5.9 'get_user_pages_remote()' API doesn't get
 'struct task_struct' parameter:
 commit 64019a2e467a ("mm/gup: remove task_struct pointer for all gup code")
 
 The change reflected to the KNI with version check.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 ---
  kernel/linux/kni/compat.h  | 4 ++++

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

* [dpdk-stable] patch 'stack: reload head when pop fails' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (56 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'kni: fix build with Linux 5.9' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'stack: fix uninitialized variable' " luca.boccassi
                   ` (148 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Steven Lariau; +Cc: Dharmik Thakkar, Ruifeng Wang, Gage Eads, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 8e02b23f34dcda47d1ef7920315d7a162e2f6f79 Mon Sep 17 00:00:00 2001
From: Steven Lariau <steven.lariau@arm.com>
Date: Fri, 25 Sep 2020 18:43:38 +0100
Subject: [PATCH] stack: reload head when pop fails

[ upstream commit 18effad9cfa7ab077712c9d37672c3ae1bbf9213 ]

List head must be loaded right before continue (when failed to
find the new head).
Without this, one thread might keep trying and failing to pop items
without ever loading the new correct head.

Fixes: 7e6e609939a8 ("stack: add C11 atomic implementation")
Cc: gage.eads@intel.com

Signed-off-by: Steven Lariau <steven.lariau@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Gage Eads <gage.eads@intel.com>
---
 lib/librte_stack/rte_stack_lf_c11.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/librte_stack/rte_stack_lf_c11.h b/lib/librte_stack/rte_stack_lf_c11.h
index 999359f081..94129c3e8a 100644
--- a/lib/librte_stack/rte_stack_lf_c11.h
+++ b/lib/librte_stack/rte_stack_lf_c11.h
@@ -139,8 +139,10 @@ __rte_stack_lf_pop_elems(struct rte_stack_lf_list *list,
 		/* If NULL was encountered, the list was modified while
 		 * traversing it. Retry.
 		 */
-		if (i != num)
+		if (i != num) {
+			old_head = list->head;
 			continue;
+		}
 
 		new_head.top = tmp;
 		new_head.cnt = old_head.cnt + 1;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.611841151 +0000
+++ 0059-stack-reload-head-when-pop-fails.patch	2020-10-28 10:35:11.524830318 +0000
@@ -1,8 +1,10 @@
-From 18effad9cfa7ab077712c9d37672c3ae1bbf9213 Mon Sep 17 00:00:00 2001
+From 8e02b23f34dcda47d1ef7920315d7a162e2f6f79 Mon Sep 17 00:00:00 2001
 From: Steven Lariau <steven.lariau@arm.com>
 Date: Fri, 25 Sep 2020 18:43:38 +0100
 Subject: [PATCH] stack: reload head when pop fails
 
+[ upstream commit 18effad9cfa7ab077712c9d37672c3ae1bbf9213 ]
+
 List head must be loaded right before continue (when failed to
 find the new head).
 Without this, one thread might keep trying and failing to pop items
@@ -10,7 +12,6 @@
 
 Fixes: 7e6e609939a8 ("stack: add C11 atomic implementation")
 Cc: gage.eads@intel.com
-Cc: stable@dpdk.org
 
 Signed-off-by: Steven Lariau <steven.lariau@arm.com>
 Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
@@ -21,10 +22,10 @@
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/lib/librte_stack/rte_stack_lf_c11.h b/lib/librte_stack/rte_stack_lf_c11.h
-index 2bc6394194..adb9f590de 100644
+index 999359f081..94129c3e8a 100644
 --- a/lib/librte_stack/rte_stack_lf_c11.h
 +++ b/lib/librte_stack/rte_stack_lf_c11.h
-@@ -133,8 +133,10 @@ __rte_stack_lf_pop_elems(struct rte_stack_lf_list *list,
+@@ -139,8 +139,10 @@ __rte_stack_lf_pop_elems(struct rte_stack_lf_list *list,
  		/* If NULL was encountered, the list was modified while
  		 * traversing it. Retry.
  		 */

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

* [dpdk-stable] patch 'stack: fix uninitialized variable' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (57 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'stack: reload head when pop fails' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/hinic: fix Rx nombuf stats' " luca.boccassi
                   ` (147 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 7b19e1c122b85081cd05d9bd96f3805925bbf03d Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Fri, 25 Sep 2020 13:00:50 +0800
Subject: [PATCH] stack: fix uninitialized variable

[ upstream commit d1ca6cfd3c9d7626d43e01a6c14686d48dadf46b ]

This patch fixes an issue that uninitialized 'success'
is used to be compared with '0'.

Coverity issue: 337676
Fixes: 3340202f5954 ("stack: add lock-free implementation")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_stack/rte_stack_lf_generic.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_stack/rte_stack_lf_generic.h b/lib/librte_stack/rte_stack_lf_generic.h
index 3abbb53428..4850a05ee7 100644
--- a/lib/librte_stack/rte_stack_lf_generic.h
+++ b/lib/librte_stack/rte_stack_lf_generic.h
@@ -78,7 +78,7 @@ __rte_stack_lf_pop_elems(struct rte_stack_lf_list *list,
 			 struct rte_stack_lf_elem **last)
 {
 	struct rte_stack_lf_head old_head;
-	int success;
+	int success = 0;
 
 	/* Reserve num elements, if available */
 	while (1) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.640315870 +0000
+++ 0060-stack-fix-uninitialized-variable.patch	2020-10-28 10:35:11.524830318 +0000
@@ -1,14 +1,15 @@
-From d1ca6cfd3c9d7626d43e01a6c14686d48dadf46b Mon Sep 17 00:00:00 2001
+From 7b19e1c122b85081cd05d9bd96f3805925bbf03d Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Fri, 25 Sep 2020 13:00:50 +0800
 Subject: [PATCH] stack: fix uninitialized variable
 
+[ upstream commit d1ca6cfd3c9d7626d43e01a6c14686d48dadf46b ]
+
 This patch fixes an issue that uninitialized 'success'
 is used to be compared with '0'.
 
 Coverity issue: 337676
 Fixes: 3340202f5954 ("stack: add lock-free implementation")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: David Marchand <david.marchand@redhat.com>

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

* [dpdk-stable] patch 'net/hinic: fix Rx nombuf stats' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (58 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'stack: fix uninitialized variable' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/hinic/base: get default cos from chip' " luca.boccassi
                   ` (146 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Xiaoyun Wang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 345f5f655c7ed366be61b0f869c468599d9f7985 Mon Sep 17 00:00:00 2001
From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Date: Mon, 14 Sep 2020 22:31:44 +0800
Subject: [PATCH] net/hinic: fix Rx nombuf stats

[ upstream commit 3930d9ceaff9d0c2c86d39d52b007404f42b44b4 ]

rx_mbuf_alloc_failed value is not set to 0 when get stats from driver,
which may cause this counter added every time when call this ops.

Fixes: cb7b6606ebff ("net/hinic: add RSS stats and promiscuous ops")

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
---
 drivers/net/hinic/hinic_pmd_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index a26454c7c0..302b762725 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -1321,6 +1321,8 @@ hinic_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 		return err;
 	}
 
+	dev->data->rx_mbuf_alloc_failed = 0;
+
 	/* rx queue stats */
 	q_num = (nic_dev->num_rq < RTE_ETHDEV_QUEUE_STAT_CNTRS) ?
 			nic_dev->num_rq : RTE_ETHDEV_QUEUE_STAT_CNTRS;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.669149795 +0000
+++ 0061-net-hinic-fix-Rx-nombuf-stats.patch	2020-10-28 10:35:11.528830377 +0000
@@ -1,13 +1,14 @@
-From 3930d9ceaff9d0c2c86d39d52b007404f42b44b4 Mon Sep 17 00:00:00 2001
+From 345f5f655c7ed366be61b0f869c468599d9f7985 Mon Sep 17 00:00:00 2001
 From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 Date: Mon, 14 Sep 2020 22:31:44 +0800
 Subject: [PATCH] net/hinic: fix Rx nombuf stats
 
+[ upstream commit 3930d9ceaff9d0c2c86d39d52b007404f42b44b4 ]
+
 rx_mbuf_alloc_failed value is not set to 0 when get stats from driver,
 which may cause this counter added every time when call this ops.
 
 Fixes: cb7b6606ebff ("net/hinic: add RSS stats and promiscuous ops")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 ---
@@ -15,10 +16,10 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
-index 67e6afcf7a..b2c8a5165b 100644
+index a26454c7c0..302b762725 100644
 --- a/drivers/net/hinic/hinic_pmd_ethdev.c
 +++ b/drivers/net/hinic/hinic_pmd_ethdev.c
-@@ -1320,6 +1320,8 @@ hinic_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -1321,6 +1321,8 @@ hinic_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
  		return err;
  	}
  

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

* [dpdk-stable] patch 'net/hinic/base: get default cos from chip' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (59 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/hinic: fix Rx nombuf stats' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/hinic/base: fix clock definition with glibc version' " luca.boccassi
                   ` (145 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Xiaoyun Wang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 10235c4c54b666342cd874b7795ae4ca3a3734e7 Mon Sep 17 00:00:00 2001
From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Date: Mon, 14 Sep 2020 22:31:45 +0800
Subject: [PATCH] net/hinic/base: get default cos from chip

[ upstream commit d40023605420ca35b027036c134a43ca41c8e74f ]

Get default cos of pf driver from chip configuration file.

Fixes: 6691acef0d3d ("net/hinic: support VF")

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
---
 drivers/net/hinic/base/hinic_pmd_cfg.c |  7 +++--
 drivers/net/hinic/base/hinic_pmd_cfg.h |  1 +
 drivers/net/hinic/hinic_pmd_ethdev.c   | 39 ++++++++++++++++++++++----
 3 files changed, 39 insertions(+), 8 deletions(-)

diff --git a/drivers/net/hinic/base/hinic_pmd_cfg.c b/drivers/net/hinic/base/hinic_pmd_cfg.c
index aa883e0274..d0270738ae 100644
--- a/drivers/net/hinic/base/hinic_pmd_cfg.c
+++ b/drivers/net/hinic/base/hinic_pmd_cfg.c
@@ -112,6 +112,7 @@ static void hinic_parse_pub_res_cap(struct service_cap *cap,
 	cap->host_id = dev_cap->host_id;
 	cap->ep_id = dev_cap->ep_id;
 	cap->max_cos_id = dev_cap->max_cos_id;
+	cap->valid_cos_bitmap = dev_cap->valid_cos_bitmap;
 	cap->er_id = dev_cap->er_id;
 	cap->port_id = dev_cap->port_id;
 
@@ -134,9 +135,11 @@ static void hinic_parse_pub_res_cap(struct service_cap *cap,
 	cap->host_oq_id_mask_val = dev_cap->host_oq_id_mask_val;
 
 	PMD_DRV_LOG(INFO, "Get public resource capability:");
-	PMD_DRV_LOG(INFO, "host_id: 0x%x, ep_id: 0x%x, intr_type: 0x%x, max_cos_id: 0x%x, er_id: 0x%x, port_id: 0x%x",
+	PMD_DRV_LOG(INFO, "host_id: 0x%x, ep_id: 0x%x, intr_type: 0x%x, "
+		    "max_cos_id: 0x%x, cos_bitmap: 0x%x, er_id: 0x%x, port_id: 0x%x",
 		    cap->host_id, cap->ep_id, cap->intr_chip_en,
-		    cap->max_cos_id, cap->er_id, cap->port_id);
+		    cap->max_cos_id, cap->valid_cos_bitmap, cap->er_id,
+		    cap->port_id);
 	PMD_DRV_LOG(INFO, "host_total_function: 0x%x, host_oq_id_mask_val: 0x%x, max_vf: 0x%x",
 		    cap->host_total_function, cap->host_oq_id_mask_val,
 		    cap->max_vf);
diff --git a/drivers/net/hinic/base/hinic_pmd_cfg.h b/drivers/net/hinic/base/hinic_pmd_cfg.h
index 1741ca44a4..6e76e1d232 100644
--- a/drivers/net/hinic/base/hinic_pmd_cfg.h
+++ b/drivers/net/hinic/base/hinic_pmd_cfg.h
@@ -54,6 +54,7 @@ struct service_cap {
 	u8 ep_id;
 	u8 intr_chip_en;
 	u8 max_cos_id;	/* PF/VF's max cos id */
+	u8 valid_cos_bitmap;
 	u8 er_id;	/* PF/VF's ER */
 	u8 port_id;	/* PF/VF's physical port */
 	u8 max_vf;	/* max VF number that PF supported */
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index 302b762725..270e5791b8 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -2498,26 +2498,53 @@ static int hinic_set_default_dcb_feature(struct hinic_nic_dev *nic_dev)
 					up_pgid, up_bw, up_strict);
 }
 
+static int hinic_pf_get_default_cos(struct hinic_hwdev *hwdev, u8 *cos_id)
+{
+	u8 default_cos = 0;
+	u8 valid_cos_bitmap;
+	u8 i;
+
+	valid_cos_bitmap = hwdev->cfg_mgmt->svc_cap.valid_cos_bitmap;
+	if (!valid_cos_bitmap) {
+		PMD_DRV_LOG(ERR, "PF has none cos to support\n");
+		return -EFAULT;
+	}
+
+	for (i = 0; i < NR_MAX_COS; i++) {
+		if (valid_cos_bitmap & BIT(i))
+			default_cos = i; /* Find max cos id as default cos */
+	}
+
+	*cos_id = default_cos;
+
+	return 0;
+}
+
 static int hinic_init_default_cos(struct hinic_nic_dev *nic_dev)
 {
 	u8 cos_id = 0;
 	int err;
 
 	if (!HINIC_IS_VF(nic_dev->hwdev)) {
-		nic_dev->default_cos =
-				(hinic_global_func_id(nic_dev->hwdev) +
-						DEFAULT_BASE_COS) % NR_MAX_COS;
+		err = hinic_pf_get_default_cos(nic_dev->hwdev, &cos_id);
+		if (err) {
+			PMD_DRV_LOG(ERR, "Get PF default cos failed, err: %d",
+				    err);
+			return HINIC_ERROR;
+		}
 	} else {
 		err = hinic_vf_get_default_cos(nic_dev->hwdev, &cos_id);
 		if (err) {
 			PMD_DRV_LOG(ERR, "Get VF default cos failed, err: %d",
-					err);
+				    err);
 			return HINIC_ERROR;
 		}
-
-		nic_dev->default_cos = cos_id;
 	}
 
+	nic_dev->default_cos = cos_id;
+
+	PMD_DRV_LOG(INFO, "Default cos %d", nic_dev->default_cos);
+
 	return 0;
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.700272106 +0000
+++ 0062-net-hinic-base-get-default-cos-from-chip.patch	2020-10-28 10:35:11.532830435 +0000
@@ -1,12 +1,13 @@
-From d40023605420ca35b027036c134a43ca41c8e74f Mon Sep 17 00:00:00 2001
+From 10235c4c54b666342cd874b7795ae4ca3a3734e7 Mon Sep 17 00:00:00 2001
 From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 Date: Mon, 14 Sep 2020 22:31:45 +0800
 Subject: [PATCH] net/hinic/base: get default cos from chip
 
+[ upstream commit d40023605420ca35b027036c134a43ca41c8e74f ]
+
 Get default cos of pf driver from chip configuration file.
 
 Fixes: 6691acef0d3d ("net/hinic: support VF")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 ---
@@ -16,7 +17,7 @@
  3 files changed, 39 insertions(+), 8 deletions(-)
 
 diff --git a/drivers/net/hinic/base/hinic_pmd_cfg.c b/drivers/net/hinic/base/hinic_pmd_cfg.c
-index a0cc16d9e0..837734f9ba 100644
+index aa883e0274..d0270738ae 100644
 --- a/drivers/net/hinic/base/hinic_pmd_cfg.c
 +++ b/drivers/net/hinic/base/hinic_pmd_cfg.c
 @@ -112,6 +112,7 @@ static void hinic_parse_pub_res_cap(struct service_cap *cap,
@@ -54,10 +55,10 @@
  	u8 port_id;	/* PF/VF's physical port */
  	u8 max_vf;	/* max VF number that PF supported */
 diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
-index b2c8a5165b..6fd16e6144 100644
+index 302b762725..270e5791b8 100644
 --- a/drivers/net/hinic/hinic_pmd_ethdev.c
 +++ b/drivers/net/hinic/hinic_pmd_ethdev.c
-@@ -2583,26 +2583,53 @@ static int hinic_set_default_dcb_feature(struct hinic_nic_dev *nic_dev)
+@@ -2498,26 +2498,53 @@ static int hinic_set_default_dcb_feature(struct hinic_nic_dev *nic_dev)
  					up_pgid, up_bw, up_strict);
  }
  

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

* [dpdk-stable] patch 'net/hinic/base: fix clock definition with glibc version' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (60 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/hinic/base: get default cos from chip' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/qede: fix milliseconds sleep macro' " luca.boccassi
                   ` (144 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Xiaoyun Wang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 4f5ef8332e825cf809ab38364c7cc3b3a9220e41 Mon Sep 17 00:00:00 2001
From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
Date: Mon, 14 Sep 2020 22:31:46 +0800
Subject: [PATCH] net/hinic/base: fix clock definition with glibc version

[ upstream commit 9b5f64904b1fb01310e94a6c884b4a7f8e51b3a0 ]

Sync the repair of patch("fix compile error for old glibc
caused by CLOCK_MONOTONIC_RAW") in the community.

Fixes: efeed0894e9c ("net/hinic/base: avoid system time jump")

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
---
 drivers/net/hinic/base/hinic_compat.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h
index 341aa056ba..473a273b6b 100644
--- a/drivers/net/hinic/base/hinic_compat.h
+++ b/drivers/net/hinic/base/hinic_compat.h
@@ -198,11 +198,17 @@ static inline u32 readl(const volatile void *addr)
 #define spin_lock(spinlock_prt)		rte_spinlock_lock(spinlock_prt)
 #define spin_unlock(spinlock_prt)	rte_spinlock_unlock(spinlock_prt)
 
+#ifdef CLOCK_MONOTONIC_RAW /* Defined in glibc bits/time.h */
+#define CLOCK_TYPE CLOCK_MONOTONIC_RAW
+#else
+#define CLOCK_TYPE CLOCK_MONOTONIC
+#endif
+
 static inline unsigned long clock_gettime_ms(void)
 {
 	struct timespec tv;
 
-	(void)clock_gettime(CLOCK_MONOTONIC, &tv);
+	(void)clock_gettime(CLOCK_TYPE, &tv);
 
 	return (unsigned long)tv.tv_sec * 1000 +
 	       (unsigned long)tv.tv_nsec / 1000000;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.731888717 +0000
+++ 0063-net-hinic-base-fix-clock-definition-with-glibc-versi.patch	2020-10-28 10:35:11.532830435 +0000
@@ -1,13 +1,14 @@
-From 9b5f64904b1fb01310e94a6c884b4a7f8e51b3a0 Mon Sep 17 00:00:00 2001
+From 4f5ef8332e825cf809ab38364c7cc3b3a9220e41 Mon Sep 17 00:00:00 2001
 From: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 Date: Mon, 14 Sep 2020 22:31:46 +0800
 Subject: [PATCH] net/hinic/base: fix clock definition with glibc version
 
+[ upstream commit 9b5f64904b1fb01310e94a6c884b4a7f8e51b3a0 ]
+
 Sync the repair of patch("fix compile error for old glibc
 caused by CLOCK_MONOTONIC_RAW") in the community.
 
 Fixes: efeed0894e9c ("net/hinic/base: avoid system time jump")
-Cc: stable@dpdk.org
 
 Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>
 ---
@@ -15,10 +16,10 @@
  1 file changed, 7 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h
-index 7036b031c5..6dd210ec06 100644
+index 341aa056ba..473a273b6b 100644
 --- a/drivers/net/hinic/base/hinic_compat.h
 +++ b/drivers/net/hinic/base/hinic_compat.h
-@@ -166,11 +166,17 @@ static inline u32 readl(const volatile void *addr)
+@@ -198,11 +198,17 @@ static inline u32 readl(const volatile void *addr)
  #define spin_lock(spinlock_prt)		rte_spinlock_lock(spinlock_prt)
  #define spin_unlock(spinlock_prt)	rte_spinlock_unlock(spinlock_prt)
  

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

* [dpdk-stable] patch 'net/qede: fix milliseconds sleep macro' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (61 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/hinic/base: fix clock definition with glibc version' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/ena/base: use min/max macros with type conversion' " luca.boccassi
                   ` (143 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Devendra Singh Rawat; +Cc: Igor Russkikh, Rasesh Mody, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From b81bfe40219512e9ab74ffd486c02a769bc179cd Mon Sep 17 00:00:00 2001
From: Devendra Singh Rawat <dsinghrawat@marvell.com>
Date: Mon, 27 Jul 2020 19:46:44 +0530
Subject: [PATCH] net/qede: fix milliseconds sleep macro

[ upstream commit 91979430089bf897881238a168b631f1a81c5477 ]

The macro defined for milliseconds sleep was not putting the thread
to sleep and was simply calling a delay routine. This fix redefines
the macro to call the correct rte sleep API.

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

Signed-off-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
 drivers/net/qede/base/bcm_osal.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/qede/base/bcm_osal.h b/drivers/net/qede/base/bcm_osal.h
index 0f09557cf0..d9f507f233 100644
--- a/drivers/net/qede/base/bcm_osal.h
+++ b/drivers/net/qede/base/bcm_osal.h
@@ -81,9 +81,8 @@ typedef int bool;
 
 #define DELAY(x) rte_delay_us(x)
 #define usec_delay(x) DELAY(x)
-#define msec_delay(x) DELAY(1000 * (x))
 #define OSAL_UDELAY(time) usec_delay(time)
-#define OSAL_MSLEEP(time) msec_delay(time)
+#define OSAL_MSLEEP(time) rte_delay_us_sleep(1000 * (time))
 
 /* Memory allocations and deallocations */
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.760016656 +0000
+++ 0064-net-qede-fix-milliseconds-sleep-macro.patch	2020-10-28 10:35:11.532830435 +0000
@@ -1,14 +1,15 @@
-From 91979430089bf897881238a168b631f1a81c5477 Mon Sep 17 00:00:00 2001
+From b81bfe40219512e9ab74ffd486c02a769bc179cd Mon Sep 17 00:00:00 2001
 From: Devendra Singh Rawat <dsinghrawat@marvell.com>
 Date: Mon, 27 Jul 2020 19:46:44 +0530
 Subject: [PATCH] net/qede: fix milliseconds sleep macro
 
+[ upstream commit 91979430089bf897881238a168b631f1a81c5477 ]
+
 The macro defined for milliseconds sleep was not putting the thread
 to sleep and was simply calling a delay routine. This fix redefines
 the macro to call the correct rte sleep API.
 
 Fixes: ec94dbc57362 ("qede: add base driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
 Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
@@ -18,10 +19,10 @@
  1 file changed, 1 insertion(+), 2 deletions(-)
 
 diff --git a/drivers/net/qede/base/bcm_osal.h b/drivers/net/qede/base/bcm_osal.h
-index 5d4df5907a..ded4fb0f57 100644
+index 0f09557cf0..d9f507f233 100644
 --- a/drivers/net/qede/base/bcm_osal.h
 +++ b/drivers/net/qede/base/bcm_osal.h
-@@ -81,9 +81,8 @@ typedef intptr_t osal_int_ptr_t;
+@@ -81,9 +81,8 @@ typedef int bool;
  
  #define DELAY(x) rte_delay_us(x)
  #define usec_delay(x) DELAY(x)

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

* [dpdk-stable] patch 'net/ena/base: use min/max macros with type conversion' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (62 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/qede: fix milliseconds sleep macro' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/ena/base: specify delay operations' " luca.boccassi
                   ` (142 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Michal Krawczyk; +Cc: Igor Chauskin, Guy Tzalik, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From cd266c8c5572699f8496bd05b3b142ef6f0ddce8 Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Thu, 17 Sep 2020 07:30:16 +0200
Subject: [PATCH] net/ena/base: use min/max macros with type conversion

[ upstream commit 8478f502f844ca0055a313609a58d80d30a0bdfd ]

Usage of RTE_MIN(MAX) in ENA_MIN32, ENA_MIN16, ENA_MIN8 (and same for
the MAX), was not enough, as the HAL code is assuming that those macros
will convert both arguments to the specified uintX_t type.

As RTE_MIN(MAX) is using 'typeof' operator, the behavior won't be the
same, especially if arguments has different types (and it could cause
compilation warnings).

To satisfy that, the ENA_MIN_T and ENA_MAX_T macros were added, which
are converting both arguments to the type which is being passed as an
argument.

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

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/ena/base/ena_plat_dpdk.h | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h
index da97efca46..2090e34adf 100644
--- a/drivers/net/ena/base/ena_plat_dpdk.h
+++ b/drivers/net/ena/base/ena_plat_dpdk.h
@@ -85,12 +85,14 @@ extern int ena_logtype_com;
 #define ENA_ASSERT(cond, format, arg...) do {} while (0)
 #endif
 
-#define ENA_MAX32(x, y) RTE_MAX((x), (y))
-#define ENA_MAX16(x, y) RTE_MAX((x), (y))
-#define ENA_MAX8(x, y) RTE_MAX((x), (y))
-#define ENA_MIN32(x, y) RTE_MIN((x), (y))
-#define ENA_MIN16(x, y) RTE_MIN((x), (y))
-#define ENA_MIN8(x, y) RTE_MIN((x), (y))
+#define ENA_MAX_T(type, x, y) RTE_MAX((type)(x), (type)(y))
+#define ENA_MAX32(x, y) ENA_MAX_T(uint32_t, (x), (y))
+#define ENA_MAX16(x, y) ENA_MAX_T(uint16_t, (x), (y))
+#define ENA_MAX8(x, y) ENA_MAX_T(uint8_t, (x), (y))
+#define ENA_MIN_T(type, x, y) RTE_MIN((type)(x), (type)(y))
+#define ENA_MIN32(x, y) ENA_MIN_T(uint32_t, (x), (y))
+#define ENA_MIN16(x, y) ENA_MIN_T(uint16_t, (x), (y))
+#define ENA_MIN8(x, y) ENA_MIN_T(uint8_t, (x), (y))
 
 #define BITS_PER_LONG_LONG (__SIZEOF_LONG_LONG__ * 8)
 #define U64_C(x) x ## ULL
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.788652801 +0000
+++ 0065-net-ena-base-use-min-max-macros-with-type-conversion.patch	2020-10-28 10:35:11.536830495 +0000
@@ -1,8 +1,10 @@
-From 8478f502f844ca0055a313609a58d80d30a0bdfd Mon Sep 17 00:00:00 2001
+From cd266c8c5572699f8496bd05b3b142ef6f0ddce8 Mon Sep 17 00:00:00 2001
 From: Michal Krawczyk <mk@semihalf.com>
 Date: Thu, 17 Sep 2020 07:30:16 +0200
 Subject: [PATCH] net/ena/base: use min/max macros with type conversion
 
+[ upstream commit 8478f502f844ca0055a313609a58d80d30a0bdfd ]
+
 Usage of RTE_MIN(MAX) in ENA_MIN32, ENA_MIN16, ENA_MIN8 (and same for
 the MAX), was not enough, as the HAL code is assuming that those macros
 will convert both arguments to the specified uintX_t type.
@@ -16,7 +18,6 @@
 argument.
 
 Fixes: 9ba7981ec992 ("ena: add communication layer for DPDK")
-Cc: stable@dpdk.org
 
 Signed-off-by: Michal Krawczyk <mk@semihalf.com>
 Reviewed-by: Igor Chauskin <igorch@amazon.com>
@@ -27,10 +28,10 @@
  1 file changed, 8 insertions(+), 6 deletions(-)
 
 diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h
-index 595967e6e3..ba7a098f59 100644
+index da97efca46..2090e34adf 100644
 --- a/drivers/net/ena/base/ena_plat_dpdk.h
 +++ b/drivers/net/ena/base/ena_plat_dpdk.h
-@@ -86,12 +86,14 @@ extern int ena_logtype_com;
+@@ -85,12 +85,14 @@ extern int ena_logtype_com;
  #define ENA_ASSERT(cond, format, arg...) do {} while (0)
  #endif
  

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

* [dpdk-stable] patch 'net/ena/base: specify delay operations' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (63 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/ena/base: use min/max macros with type conversion' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/ena/base: fix release of wait event' " luca.boccassi
                   ` (141 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Michal Krawczyk; +Cc: Igor Chauskin, Guy Tzalik, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 6153928dce909b906c4ca47526cb69678a0523c8 Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Thu, 17 Sep 2020 07:30:17 +0200
Subject: [PATCH] net/ena/base: specify delay operations

[ upstream commit 5ec22f97b6300ff65f89c8cb0fa072de139ac520 ]

ENA_MSLEEP() and ENA_UDELAY() were expecting different behavior - the
first one is expecting driver to sleep, while the other, to busy wait.

For both cases, the rte_delay_(u|m)s() function was used, which could
be either sleep or block, depending on the configuration.

To make the macros valid, the operations should be specified directly.
Because of that, the rte_delay_us_sleep() and rte_delay_us_block() are
now being used.

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

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/ena/base/ena_plat_dpdk.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h
index 2090e34adf..5a9d71749e 100644
--- a/drivers/net/ena/base/ena_plat_dpdk.h
+++ b/drivers/net/ena/base/ena_plat_dpdk.h
@@ -55,8 +55,8 @@ typedef uint64_t dma_addr_t;
 
 #define ENA_ABORT() abort()
 
-#define ENA_MSLEEP(x) rte_delay_ms(x)
-#define ENA_UDELAY(x) rte_delay_us(x)
+#define ENA_MSLEEP(x) rte_delay_us_sleep(x * 1000)
+#define ENA_UDELAY(x) rte_delay_us_block(x)
 
 #define ENA_TOUCH(x) ((void)(x))
 #define memcpy_toio memcpy
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.817609221 +0000
+++ 0066-net-ena-base-specify-delay-operations.patch	2020-10-28 10:35:11.536830495 +0000
@@ -1,8 +1,10 @@
-From 5ec22f97b6300ff65f89c8cb0fa072de139ac520 Mon Sep 17 00:00:00 2001
+From 6153928dce909b906c4ca47526cb69678a0523c8 Mon Sep 17 00:00:00 2001
 From: Michal Krawczyk <mk@semihalf.com>
 Date: Thu, 17 Sep 2020 07:30:17 +0200
 Subject: [PATCH] net/ena/base: specify delay operations
 
+[ upstream commit 5ec22f97b6300ff65f89c8cb0fa072de139ac520 ]
+
 ENA_MSLEEP() and ENA_UDELAY() were expecting different behavior - the
 first one is expecting driver to sleep, while the other, to busy wait.
 
@@ -14,7 +16,6 @@
 now being used.
 
 Fixes: 9ba7981ec992 ("ena: add communication layer for DPDK")
-Cc: stable@dpdk.org
 
 Signed-off-by: Michal Krawczyk <mk@semihalf.com>
 Reviewed-by: Igor Chauskin <igorch@amazon.com>
@@ -25,10 +26,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h
-index ba7a098f59..d9b728c4d6 100644
+index 2090e34adf..5a9d71749e 100644
 --- a/drivers/net/ena/base/ena_plat_dpdk.h
 +++ b/drivers/net/ena/base/ena_plat_dpdk.h
-@@ -56,8 +56,8 @@ typedef uint64_t dma_addr_t;
+@@ -55,8 +55,8 @@ typedef uint64_t dma_addr_t;
  
  #define ENA_ABORT() abort()
  

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

* [dpdk-stable] patch 'net/ena/base: fix release of wait event' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (64 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/ena/base: specify delay operations' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/af_xdp: avoid deadlock due to empty fill queue' " luca.boccassi
                   ` (140 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Michal Krawczyk; +Cc: Igor Chauskin, Guy Tzalik, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 8b077cd951f41ec92402de0ca33a3d4ffcd45761 Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Thu, 17 Sep 2020 07:30:20 +0200
Subject: [PATCH] net/ena/base: fix release of wait event

[ upstream commit f034d4bb973a23e6dd2af8acdc3829b013962e47 ]

The wait event is being accessed without making sure it the completion
context exists. The check for that is just below, so it could be used
for releasing wait even safely.

Fixes: 3adcba9a8987 ("net/ena: update HAL to the newer version")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/ena/base/ena_com.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c
index 147c039124..592909c1be 100644
--- a/drivers/net/ena/base/ena_com.c
+++ b/drivers/net/ena/base/ena_com.c
@@ -1634,9 +1634,11 @@ void ena_com_admin_destroy(struct ena_com_dev *ena_dev)
 	struct ena_com_aenq *aenq = &ena_dev->aenq;
 	u16 size;
 
-	ENA_WAIT_EVENT_DESTROY(admin_queue->comp_ctx->wait_event);
-	if (admin_queue->comp_ctx)
+	if (admin_queue->comp_ctx) {
+		ENA_WAIT_EVENT_DESTROY(admin_queue->comp_ctx->wait_event);
 		ENA_MEM_FREE(ena_dev->dmadev, admin_queue->comp_ctx);
+	}
+
 	admin_queue->comp_ctx = NULL;
 	size = ADMIN_SQ_SIZE(admin_queue->q_depth);
 	if (sq->entries)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.845732197 +0000
+++ 0067-net-ena-base-fix-release-of-wait-event.patch	2020-10-28 10:35:11.536830495 +0000
@@ -1,14 +1,15 @@
-From f034d4bb973a23e6dd2af8acdc3829b013962e47 Mon Sep 17 00:00:00 2001
+From 8b077cd951f41ec92402de0ca33a3d4ffcd45761 Mon Sep 17 00:00:00 2001
 From: Michal Krawczyk <mk@semihalf.com>
 Date: Thu, 17 Sep 2020 07:30:20 +0200
 Subject: [PATCH] net/ena/base: fix release of wait event
 
+[ upstream commit f034d4bb973a23e6dd2af8acdc3829b013962e47 ]
+
 The wait event is being accessed without making sure it the completion
 context exists. The check for that is just below, so it could be used
 for releasing wait even safely.
 
 Fixes: 3adcba9a8987 ("net/ena: update HAL to the newer version")
-Cc: stable@dpdk.org
 
 Signed-off-by: Michal Krawczyk <mk@semihalf.com>
 Reviewed-by: Igor Chauskin <igorch@amazon.com>
@@ -19,10 +20,10 @@
  1 file changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c
-index b4e54318c6..ce239ab164 100644
+index 147c039124..592909c1be 100644
 --- a/drivers/net/ena/base/ena_com.c
 +++ b/drivers/net/ena/base/ena_com.c
-@@ -1655,11 +1655,13 @@ void ena_com_admin_destroy(struct ena_com_dev *ena_dev)
+@@ -1634,9 +1634,11 @@ void ena_com_admin_destroy(struct ena_com_dev *ena_dev)
  	struct ena_com_aenq *aenq = &ena_dev->aenq;
  	u16 size;
  
@@ -30,9 +31,7 @@
 -	if (admin_queue->comp_ctx)
 +	if (admin_queue->comp_ctx) {
 +		ENA_WAIT_EVENT_DESTROY(admin_queue->comp_ctx->wait_event);
- 		ENA_MEM_FREE(ena_dev->dmadev,
- 			     admin_queue->comp_ctx,
- 			     (admin_queue->q_depth * sizeof(struct ena_comp_ctx)));
+ 		ENA_MEM_FREE(ena_dev->dmadev, admin_queue->comp_ctx);
 +	}
 +
  	admin_queue->comp_ctx = NULL;

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

* [dpdk-stable] patch 'net/af_xdp: avoid deadlock due to empty fill queue' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (65 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/ena/base: fix release of wait event' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/i40e: fix byte counters' " luca.boccassi
                   ` (139 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: RongQing Li; +Cc: Dongsheng Rong, Ciara Loftus, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From d412170b226f6f5de3d6799697fd242e28f5b7b6 Mon Sep 17 00:00:00 2001
From: RongQing Li <lirongqing@baidu.com>
Date: Fri, 18 Sep 2020 19:32:31 +0800
Subject: [PATCH] net/af_xdp: avoid deadlock due to empty fill queue

[ upstream commit ab7ed23a2f3e74f1341de76b19256842c4cdc7f2 ]

While receiving packets, it is possible to fail to reserve
fill queue, since buffer ring is shared between tx and rx,
and maybe not available temporary. As a result both fill
queue and Rx queue will be empty.

Then kernel side will not be able to receive packets due to
empty fill queue, and dpdk will not be able to reserve fill
queue because dpdk doesn't have packets to receive, finally
deadlock will happen.

So move reserve fill queue before xsk_ring_cons__peek to fix it.

Signed-off-by: RongQing Li <lirongqing@baidu.com>
Signed-off-by: Dongsheng Rong <rongdongsheng@baidu.com>
Acked-by: Ciara Loftus <ciara.loftus@intel.com>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index fbc95e5483..c5c906ff96 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -305,22 +305,23 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	uint32_t free_thresh = fq->size >> 1;
 	struct rte_mbuf *mbufs[ETH_AF_XDP_RX_BATCH_SIZE];
 
-	if (unlikely(rte_pktmbuf_alloc_bulk(rxq->mb_pool, mbufs, nb_pkts) != 0))
-		return 0;
-
-	rcvd = xsk_ring_cons__peek(rx, nb_pkts, &idx_rx);
-	if (rcvd == 0) {
-#if defined(XDP_USE_NEED_WAKEUP)
-		if (xsk_ring_prod__needs_wakeup(fq))
-			(void)poll(rxq->fds, 1, 1000);
-#endif
-
-		goto out;
-	}
-
 	if (xsk_prod_nb_free(fq, free_thresh) >= free_thresh)
 		(void)reserve_fill_queue(umem, ETH_AF_XDP_RX_BATCH_SIZE, NULL);
 
+
+	if (unlikely(rte_pktmbuf_alloc_bulk(rxq->mb_pool, mbufs, nb_pkts) != 0))
+		return 0;
+
+	rcvd = xsk_ring_cons__peek(rx, nb_pkts, &idx_rx);
+	if (rcvd == 0) {
+#if defined(XDP_USE_NEED_WAKEUP)
+		if (xsk_ring_prod__needs_wakeup(fq))
+			(void)poll(rxq->fds, 1, 1000);
+#endif
+
+		goto out;
+	}
+
 	for (i = 0; i < rcvd; i++) {
 		const struct xdp_desc *desc;
 		uint64_t addr;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.876590801 +0000
+++ 0068-net-af_xdp-avoid-deadlock-due-to-empty-fill-queue.patch	2020-10-28 10:35:11.540830553 +0000
@@ -1,8 +1,10 @@
-From ab7ed23a2f3e74f1341de76b19256842c4cdc7f2 Mon Sep 17 00:00:00 2001
+From d412170b226f6f5de3d6799697fd242e28f5b7b6 Mon Sep 17 00:00:00 2001
 From: RongQing Li <lirongqing@baidu.com>
 Date: Fri, 18 Sep 2020 19:32:31 +0800
 Subject: [PATCH] net/af_xdp: avoid deadlock due to empty fill queue
 
+[ upstream commit ab7ed23a2f3e74f1341de76b19256842c4cdc7f2 ]
+
 While receiving packets, it is possible to fail to reserve
 fill queue, since buffer ring is shared between tx and rx,
 and maybe not available temporary. As a result both fill
@@ -15,8 +17,6 @@
 
 So move reserve fill queue before xsk_ring_cons__peek to fix it.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: RongQing Li <lirongqing@baidu.com>
 Signed-off-by: Dongsheng Rong <rongdongsheng@baidu.com>
 Acked-by: Ciara Loftus <ciara.loftus@intel.com>
@@ -25,10 +25,10 @@
  1 file changed, 14 insertions(+), 13 deletions(-)
 
 diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
-index b65ee449fc..00de671841 100644
+index fbc95e5483..c5c906ff96 100644
 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c
 +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
-@@ -304,22 +304,23 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -305,22 +305,23 @@ af_xdp_rx_cp(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
  	uint32_t free_thresh = fq->size >> 1;
  	struct rte_mbuf *mbufs[ETH_AF_XDP_RX_BATCH_SIZE];
  

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

* [dpdk-stable] patch 'net/i40e: fix byte counters' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (66 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/af_xdp: avoid deadlock due to empty fill queue' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/bnxt: fix link status during device recovery' " luca.boccassi
                   ` (138 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Junyu Jiang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From caa8c6ed731fcbfb1527d6686a9d4e85ecb70001 Mon Sep 17 00:00:00 2001
From: Junyu Jiang <junyux.jiang@intel.com>
Date: Tue, 22 Sep 2020 09:19:31 +0000
Subject: [PATCH] net/i40e: fix byte counters

[ upstream commit b96646187285b1b593b76af5dbcc365a99900377 ]

This patch fixed the issue that rx/tx bytes statistics counters
overflowed on 48 bit limitation by enlarging the limitation.

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

Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 doc/guides/nics/i40e.rst       |  9 +++++
 drivers/net/i40e/i40e_ethdev.c | 66 +++++++++++++++++++++-------------
 drivers/net/i40e/i40e_ethdev.h |  9 +++++
 3 files changed, 59 insertions(+), 25 deletions(-)

diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst
index 61d72c2b10..cfeb156935 100644
--- a/doc/guides/nics/i40e.rst
+++ b/doc/guides/nics/i40e.rst
@@ -582,6 +582,15 @@ When a packet is over maximum frame size, the packet is dropped.
 However, the Rx statistics, when calling `rte_eth_stats_get` incorrectly
 shows it as received.
 
+RX/TX statistics may be incorrect when register overflowed
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The rx_bytes/tx_bytes statistics register is 48 bit length.
+Although this limitation is enlarged to 64 bit length on the software side,
+but there is no way to detect if the overflow occurred more than once.
+So rx_bytes/tx_bytes statistics data is correct when statistics are
+updated at least once between two overflows.
+
 VF & TC max bandwidth setting
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 144758ef80..a8a534c6f8 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2934,6 +2934,21 @@ i40e_dev_link_update(struct rte_eth_dev *dev,
 	return ret;
 }
 
+static void
+i40e_stat_update_48_in_64(struct i40e_hw *hw, uint32_t hireg,
+			  uint32_t loreg, bool offset_loaded, uint64_t *offset,
+			  uint64_t *stat, uint64_t *prev_stat)
+{
+	i40e_stat_update_48(hw, hireg, loreg, offset_loaded, offset, stat);
+	/* enlarge the limitation when statistics counters overflowed */
+	if (offset_loaded) {
+		if (I40E_RXTX_BYTES_L_48_BIT(*prev_stat) > *stat)
+			*stat += (uint64_t)1 << I40E_48_BIT_WIDTH;
+		*stat += I40E_RXTX_BYTES_H_16_BIT(*prev_stat);
+	}
+	*prev_stat = *stat;
+}
+
 /* Get all the statistics of a VSI */
 void
 i40e_update_vsi_stats(struct i40e_vsi *vsi)
@@ -2943,9 +2958,9 @@ i40e_update_vsi_stats(struct i40e_vsi *vsi)
 	struct i40e_hw *hw = I40E_VSI_TO_HW(vsi);
 	int idx = rte_le_to_cpu_16(vsi->info.stat_counter_idx);
 
-	i40e_stat_update_48(hw, I40E_GLV_GORCH(idx), I40E_GLV_GORCL(idx),
-			    vsi->offset_loaded, &oes->rx_bytes,
-			    &nes->rx_bytes);
+	i40e_stat_update_48_in_64(hw, I40E_GLV_GORCH(idx), I40E_GLV_GORCL(idx),
+				  vsi->offset_loaded, &oes->rx_bytes,
+				  &nes->rx_bytes, &vsi->prev_rx_bytes);
 	i40e_stat_update_48(hw, I40E_GLV_UPRCH(idx), I40E_GLV_UPRCL(idx),
 			    vsi->offset_loaded, &oes->rx_unicast,
 			    &nes->rx_unicast);
@@ -2966,9 +2981,9 @@ i40e_update_vsi_stats(struct i40e_vsi *vsi)
 	i40e_stat_update_32(hw, I40E_GLV_RUPP(idx), vsi->offset_loaded,
 			    &oes->rx_unknown_protocol,
 			    &nes->rx_unknown_protocol);
-	i40e_stat_update_48(hw, I40E_GLV_GOTCH(idx), I40E_GLV_GOTCL(idx),
-			    vsi->offset_loaded, &oes->tx_bytes,
-			    &nes->tx_bytes);
+	i40e_stat_update_48_in_64(hw, I40E_GLV_GOTCH(idx), I40E_GLV_GOTCL(idx),
+				  vsi->offset_loaded, &oes->tx_bytes,
+				  &nes->tx_bytes, &vsi->prev_tx_bytes);
 	i40e_stat_update_48(hw, I40E_GLV_UPTCH(idx), I40E_GLV_UPTCL(idx),
 			    vsi->offset_loaded, &oes->tx_unicast,
 			    &nes->tx_unicast);
@@ -3010,17 +3025,18 @@ i40e_read_stats_registers(struct i40e_pf *pf, struct i40e_hw *hw)
 	struct i40e_hw_port_stats *os = &pf->stats_offset; /* old stats */
 
 	/* Get rx/tx bytes of internal transfer packets */
-	i40e_stat_update_48(hw, I40E_GLV_GORCH(hw->port),
-			I40E_GLV_GORCL(hw->port),
-			pf->offset_loaded,
-			&pf->internal_stats_offset.rx_bytes,
-			&pf->internal_stats.rx_bytes);
-
-	i40e_stat_update_48(hw, I40E_GLV_GOTCH(hw->port),
-			I40E_GLV_GOTCL(hw->port),
-			pf->offset_loaded,
-			&pf->internal_stats_offset.tx_bytes,
-			&pf->internal_stats.tx_bytes);
+	i40e_stat_update_48_in_64(hw, I40E_GLV_GORCH(hw->port),
+				  I40E_GLV_GORCL(hw->port),
+				  pf->offset_loaded,
+				  &pf->internal_stats_offset.rx_bytes,
+				  &pf->internal_stats.rx_bytes,
+				  &pf->internal_prev_rx_bytes);
+	i40e_stat_update_48_in_64(hw, I40E_GLV_GOTCH(hw->port),
+				  I40E_GLV_GOTCL(hw->port),
+				  pf->offset_loaded,
+				  &pf->internal_stats_offset.tx_bytes,
+				  &pf->internal_stats.tx_bytes,
+				  &pf->internal_prev_tx_bytes);
 	/* Get total internal rx packet count */
 	i40e_stat_update_48(hw, I40E_GLV_UPRCH(hw->port),
 			    I40E_GLV_UPRCL(hw->port),
@@ -3060,10 +3076,10 @@ i40e_read_stats_registers(struct i40e_pf *pf, struct i40e_hw *hw)
 		pf->internal_stats.rx_broadcast) * RTE_ETHER_CRC_LEN;
 
 	/* Get statistics of struct i40e_eth_stats */
-	i40e_stat_update_48(hw, I40E_GLPRT_GORCH(hw->port),
-			    I40E_GLPRT_GORCL(hw->port),
-			    pf->offset_loaded, &os->eth.rx_bytes,
-			    &ns->eth.rx_bytes);
+	i40e_stat_update_48_in_64(hw, I40E_GLPRT_GORCH(hw->port),
+				  I40E_GLPRT_GORCL(hw->port),
+				  pf->offset_loaded, &os->eth.rx_bytes,
+				  &ns->eth.rx_bytes, &pf->prev_rx_bytes);
 	i40e_stat_update_48(hw, I40E_GLPRT_UPRCH(hw->port),
 			    I40E_GLPRT_UPRCL(hw->port),
 			    pf->offset_loaded, &os->eth.rx_unicast,
@@ -3118,10 +3134,10 @@ i40e_read_stats_registers(struct i40e_pf *pf, struct i40e_hw *hw)
 			    pf->offset_loaded,
 			    &os->eth.rx_unknown_protocol,
 			    &ns->eth.rx_unknown_protocol);
-	i40e_stat_update_48(hw, I40E_GLPRT_GOTCH(hw->port),
-			    I40E_GLPRT_GOTCL(hw->port),
-			    pf->offset_loaded, &os->eth.tx_bytes,
-			    &ns->eth.tx_bytes);
+	i40e_stat_update_48_in_64(hw, I40E_GLPRT_GOTCH(hw->port),
+				  I40E_GLPRT_GOTCL(hw->port),
+				  pf->offset_loaded, &os->eth.tx_bytes,
+				  &ns->eth.tx_bytes, &pf->prev_tx_bytes);
 	i40e_stat_update_48(hw, I40E_GLPRT_UPTCH(hw->port),
 			    I40E_GLPRT_UPTCL(hw->port),
 			    pf->offset_loaded, &os->eth.tx_unicast,
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index e9621d67ad..1cd75b4366 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -270,6 +270,9 @@ enum i40e_flxpld_layer_idx {
 #define I40E_ETH_OVERHEAD \
 	(RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + I40E_VLAN_TAG_SIZE * 2)
 
+#define I40E_RXTX_BYTES_H_16_BIT(bytes) ((bytes) & ~I40E_48_BIT_MASK)
+#define I40E_RXTX_BYTES_L_48_BIT(bytes) ((bytes) & I40E_48_BIT_MASK)
+
 struct i40e_adapter;
 struct rte_pci_driver;
 
@@ -387,6 +390,8 @@ struct i40e_vsi {
 	uint8_t vlan_anti_spoof_on; /* The VLAN anti-spoofing enabled */
 	uint8_t vlan_filter_on; /* The VLAN filter enabled */
 	struct i40e_bw_info bw_info; /* VSI bandwidth information */
+	uint64_t prev_rx_bytes;
+	uint64_t prev_tx_bytes;
 };
 
 struct pool_entry {
@@ -1007,6 +1012,10 @@ struct i40e_pf {
 	uint16_t switch_domain_id;
 
 	struct i40e_vf_msg_cfg vf_msg_cfg;
+	uint64_t prev_rx_bytes;
+	uint64_t prev_tx_bytes;
+	uint64_t internal_prev_rx_bytes;
+	uint64_t internal_prev_tx_bytes;
 };
 
 enum pending_msg {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.906126878 +0000
+++ 0069-net-i40e-fix-byte-counters.patch	2020-10-28 10:35:11.552830730 +0000
@@ -1,13 +1,14 @@
-From b96646187285b1b593b76af5dbcc365a99900377 Mon Sep 17 00:00:00 2001
+From caa8c6ed731fcbfb1527d6686a9d4e85ecb70001 Mon Sep 17 00:00:00 2001
 From: Junyu Jiang <junyux.jiang@intel.com>
 Date: Tue, 22 Sep 2020 09:19:31 +0000
 Subject: [PATCH] net/i40e: fix byte counters
 
+[ upstream commit b96646187285b1b593b76af5dbcc365a99900377 ]
+
 This patch fixed the issue that rx/tx bytes statistics counters
 overflowed on 48 bit limitation by enlarging the limitation.
 
 Fixes: 4861cde46116 ("i40e: new poll mode driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -18,10 +19,10 @@
  3 files changed, 59 insertions(+), 25 deletions(-)
 
 diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst
-index b7430f6c4e..a0b81e6695 100644
+index 61d72c2b10..cfeb156935 100644
 --- a/doc/guides/nics/i40e.rst
 +++ b/doc/guides/nics/i40e.rst
-@@ -670,6 +670,15 @@ When a packet is over maximum frame size, the packet is dropped.
+@@ -582,6 +582,15 @@ When a packet is over maximum frame size, the packet is dropped.
  However, the Rx statistics, when calling `rte_eth_stats_get` incorrectly
  shows it as received.
  
@@ -38,10 +39,10 @@
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
 diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
-index 563f21d9df..6439baf2f8 100644
+index 144758ef80..a8a534c6f8 100644
 --- a/drivers/net/i40e/i40e_ethdev.c
 +++ b/drivers/net/i40e/i40e_ethdev.c
-@@ -3052,6 +3052,21 @@ i40e_dev_link_update(struct rte_eth_dev *dev,
+@@ -2934,6 +2934,21 @@ i40e_dev_link_update(struct rte_eth_dev *dev,
  	return ret;
  }
  
@@ -63,7 +64,7 @@
  /* Get all the statistics of a VSI */
  void
  i40e_update_vsi_stats(struct i40e_vsi *vsi)
-@@ -3061,9 +3076,9 @@ i40e_update_vsi_stats(struct i40e_vsi *vsi)
+@@ -2943,9 +2958,9 @@ i40e_update_vsi_stats(struct i40e_vsi *vsi)
  	struct i40e_hw *hw = I40E_VSI_TO_HW(vsi);
  	int idx = rte_le_to_cpu_16(vsi->info.stat_counter_idx);
  
@@ -76,7 +77,7 @@
  	i40e_stat_update_48(hw, I40E_GLV_UPRCH(idx), I40E_GLV_UPRCL(idx),
  			    vsi->offset_loaded, &oes->rx_unicast,
  			    &nes->rx_unicast);
-@@ -3084,9 +3099,9 @@ i40e_update_vsi_stats(struct i40e_vsi *vsi)
+@@ -2966,9 +2981,9 @@ i40e_update_vsi_stats(struct i40e_vsi *vsi)
  	i40e_stat_update_32(hw, I40E_GLV_RUPP(idx), vsi->offset_loaded,
  			    &oes->rx_unknown_protocol,
  			    &nes->rx_unknown_protocol);
@@ -89,7 +90,7 @@
  	i40e_stat_update_48(hw, I40E_GLV_UPTCH(idx), I40E_GLV_UPTCL(idx),
  			    vsi->offset_loaded, &oes->tx_unicast,
  			    &nes->tx_unicast);
-@@ -3128,17 +3143,18 @@ i40e_read_stats_registers(struct i40e_pf *pf, struct i40e_hw *hw)
+@@ -3010,17 +3025,18 @@ i40e_read_stats_registers(struct i40e_pf *pf, struct i40e_hw *hw)
  	struct i40e_hw_port_stats *os = &pf->stats_offset; /* old stats */
  
  	/* Get rx/tx bytes of internal transfer packets */
@@ -119,7 +120,7 @@
  	/* Get total internal rx packet count */
  	i40e_stat_update_48(hw, I40E_GLV_UPRCH(hw->port),
  			    I40E_GLV_UPRCL(hw->port),
-@@ -3178,10 +3194,10 @@ i40e_read_stats_registers(struct i40e_pf *pf, struct i40e_hw *hw)
+@@ -3060,10 +3076,10 @@ i40e_read_stats_registers(struct i40e_pf *pf, struct i40e_hw *hw)
  		pf->internal_stats.rx_broadcast) * RTE_ETHER_CRC_LEN;
  
  	/* Get statistics of struct i40e_eth_stats */
@@ -134,7 +135,7 @@
  	i40e_stat_update_48(hw, I40E_GLPRT_UPRCH(hw->port),
  			    I40E_GLPRT_UPRCL(hw->port),
  			    pf->offset_loaded, &os->eth.rx_unicast,
-@@ -3236,10 +3252,10 @@ i40e_read_stats_registers(struct i40e_pf *pf, struct i40e_hw *hw)
+@@ -3118,10 +3134,10 @@ i40e_read_stats_registers(struct i40e_pf *pf, struct i40e_hw *hw)
  			    pf->offset_loaded,
  			    &os->eth.rx_unknown_protocol,
  			    &ns->eth.rx_unknown_protocol);
@@ -150,10 +151,10 @@
  			    I40E_GLPRT_UPTCL(hw->port),
  			    pf->offset_loaded, &os->eth.tx_unicast,
 diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
-index 19f821829a..1466998aa1 100644
+index e9621d67ad..1cd75b4366 100644
 --- a/drivers/net/i40e/i40e_ethdev.h
 +++ b/drivers/net/i40e/i40e_ethdev.h
-@@ -282,6 +282,9 @@ struct rte_flow {
+@@ -270,6 +270,9 @@ enum i40e_flxpld_layer_idx {
  #define I40E_ETH_OVERHEAD \
  	(RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + I40E_VLAN_TAG_SIZE * 2)
  
@@ -163,7 +164,7 @@
  struct i40e_adapter;
  struct rte_pci_driver;
  
-@@ -399,6 +402,8 @@ struct i40e_vsi {
+@@ -387,6 +390,8 @@ struct i40e_vsi {
  	uint8_t vlan_anti_spoof_on; /* The VLAN anti-spoofing enabled */
  	uint8_t vlan_filter_on; /* The VLAN filter enabled */
  	struct i40e_bw_info bw_info; /* VSI bandwidth information */
@@ -172,7 +173,7 @@
  };
  
  struct pool_entry {
-@@ -1156,6 +1161,10 @@ struct i40e_pf {
+@@ -1007,6 +1012,10 @@ struct i40e_pf {
  	uint16_t switch_domain_id;
  
  	struct i40e_vf_msg_cfg vf_msg_cfg;

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

* [dpdk-stable] patch 'net/bnxt: fix link status during device recovery' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (67 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/i40e: fix byte counters' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-29  9:22   ` Kalesh Anakkur Purayil
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/ixgbe: fix VF reset HW error handling' " luca.boccassi
                   ` (137 subsequent siblings)
  206 siblings, 1 reply; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 77d290729b074c88263d3024229f806fa176e684 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 22 Sep 2020 11:04:16 +0530
Subject: [PATCH] net/bnxt: fix link status during device recovery

[ upstream commit 6fcd0de92298f61b8f96ba170db9e81923019626 ]

Driver should not send the phy_cfg request to bring link down
during reset recovery. If the driver sends the phy_cfg request
in recovery process, then FW needs to re-establish the link which
in turn increases the recovery time based on PHY type and link partners.

Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index d6afd03e56..bbfe883c15 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -942,7 +942,9 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
 
 	bnxt_cancel_fw_health_check(bp);
 
-	bnxt_dev_set_link_down_op(eth_dev);
+	/* Do not bring link down during reset recovery */
+	if (!is_bnxt_in_error(bp))
+		bnxt_dev_set_link_down_op(eth_dev);
 
 	/* Wait for link to be reset and the async notification to process.
 	 * During reset recovery, there is no need to wait and
@@ -3908,7 +3910,7 @@ static void bnxt_write_fw_reset_reg(struct bnxt *bp, uint32_t index)
 
 static void bnxt_dev_cleanup(struct bnxt *bp)
 {
-	bnxt_set_hwrm_link_config(bp, false);
+	bp->eth_dev->data->dev_link.link_status = 0;
 	bp->link_info.link_up = 0;
 	if (bp->eth_dev->data->dev_started)
 		bnxt_dev_stop_op(bp->eth_dev);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.947167689 +0000
+++ 0070-net-bnxt-fix-link-status-during-device-recovery.patch	2020-10-28 10:35:11.556830789 +0000
@@ -1,15 +1,16 @@
-From 6fcd0de92298f61b8f96ba170db9e81923019626 Mon Sep 17 00:00:00 2001
+From 77d290729b074c88263d3024229f806fa176e684 Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Date: Tue, 22 Sep 2020 11:04:16 +0530
 Subject: [PATCH] net/bnxt: fix link status during device recovery
 
+[ upstream commit 6fcd0de92298f61b8f96ba170db9e81923019626 ]
+
 Driver should not send the phy_cfg request to bring link down
 during reset recovery. If the driver sends the phy_cfg request
 in recovery process, then FW needs to re-establish the link which
 in turn increases the recovery time based on PHY type and link partners.
 
 Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
@@ -19,10 +20,10 @@
  1 file changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index 05e9a6abbf..e0afaac694 100644
+index d6afd03e56..bbfe883c15 100644
 --- a/drivers/net/bnxt/bnxt_ethdev.c
 +++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -1323,7 +1323,9 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
+@@ -942,7 +942,9 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
  
  	bnxt_cancel_fw_health_check(bp);
  
@@ -33,13 +34,13 @@
  
  	/* Wait for link to be reset and the async notification to process.
  	 * During reset recovery, there is no need to wait and
-@@ -4377,7 +4379,7 @@ static void bnxt_write_fw_reset_reg(struct bnxt *bp, uint32_t index)
+@@ -3908,7 +3910,7 @@ static void bnxt_write_fw_reset_reg(struct bnxt *bp, uint32_t index)
  
  static void bnxt_dev_cleanup(struct bnxt *bp)
  {
 -	bnxt_set_hwrm_link_config(bp, false);
 +	bp->eth_dev->data->dev_link.link_status = 0;
- 	bp->link_info->link_up = 0;
+ 	bp->link_info.link_up = 0;
  	if (bp->eth_dev->data->dev_started)
  		bnxt_dev_stop_op(bp->eth_dev);
 -- 

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

* [dpdk-stable] patch 'net/ixgbe: fix VF reset HW error handling' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (68 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/bnxt: fix link status during device recovery' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/bnxt: fix shift operation' " luca.boccassi
                   ` (136 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Steve Yang; +Cc: Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From accddf94303af82a223f9289e9ea3ee7751ff4c0 Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Tue, 15 Sep 2020 06:46:22 +0000
Subject: [PATCH] net/ixgbe: fix VF reset HW error handling

[ upstream commit 7c6e6aef870848cf887b2115d7c13bfcde6f4627 ]

When start a VF with no initial MAC address assigned by the underlying
Host PF driver, just reuse the MAC address assigned when VF is
initializing.

Fixes: f69166c9a3c9 ("net/ixgbe: fix reset error handling")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 875d4ee3db..768183e9cb 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -5335,10 +5335,16 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
 	ixgbe_dev_wait_setup_link_complete(dev, 0);
 
 	err = hw->mac.ops.reset_hw(hw);
-	if (err) {
+
+	/**
+	 * In this case, reuses the MAC address assigned by VF
+	 * initialization.
+	 */
+	if (err != IXGBE_SUCCESS && err != IXGBE_ERR_INVALID_MAC_ADDR) {
 		PMD_INIT_LOG(ERR, "Unable to reset vf hardware (%d)", err);
 		return err;
 	}
+
 	hw->mac.get_link_status = true;
 
 	/* negotiate mailbox API version to use with the PF. */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.977207843 +0000
+++ 0071-net-ixgbe-fix-VF-reset-HW-error-handling.patch	2020-10-28 10:35:11.564830907 +0000
@@ -1,14 +1,15 @@
-From 7c6e6aef870848cf887b2115d7c13bfcde6f4627 Mon Sep 17 00:00:00 2001
+From accddf94303af82a223f9289e9ea3ee7751ff4c0 Mon Sep 17 00:00:00 2001
 From: Steve Yang <stevex.yang@intel.com>
 Date: Tue, 15 Sep 2020 06:46:22 +0000
 Subject: [PATCH] net/ixgbe: fix VF reset HW error handling
 
+[ upstream commit 7c6e6aef870848cf887b2115d7c13bfcde6f4627 ]
+
 When start a VF with no initial MAC address assigned by the underlying
 Host PF driver, just reuse the MAC address assigned when VF is
 initializing.
 
 Fixes: f69166c9a3c9 ("net/ixgbe: fix reset error handling")
-Cc: stable@dpdk.org
 
 Signed-off-by: Steve Yang <stevex.yang@intel.com>
 Acked-by: Jeff Guo <jia.guo@intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 7 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
-index c74467e068..8da963a916 100644
+index 875d4ee3db..768183e9cb 100644
 --- a/drivers/net/ixgbe/ixgbe_ethdev.c
 +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
-@@ -5320,10 +5320,16 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
+@@ -5335,10 +5335,16 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
  	ixgbe_dev_wait_setup_link_complete(dev, 0);
  
  	err = hw->mac.ops.reset_hw(hw);

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

* [dpdk-stable] patch 'net/bnxt: fix shift operation' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (69 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/ixgbe: fix VF reset HW error handling' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/bnxt: fix drop enable in get Rx queue info' " luca.boccassi
                   ` (135 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Venkat Duvvuru, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From aaccec59f821937ff1862f9b3600a3a4f8ef3796 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Tue, 22 Sep 2020 12:36:27 +0530
Subject: [PATCH] net/bnxt: fix shift operation

[ upstream commit affb4d5c212957f3844a7bbd00a5f2ba703b8a33 ]

In page_roundup() left shifting by more than 31 bits could have
undefined behavior as the return value is int and in page_getenum()
it is possible to return a value as high as 63.
Fix that to cap the return value to less than 32.

Coverity issue: 343463
Fixes: b7778e8a1c00 ("net/bnxt: refactor to properly allocate resources for PF/VF")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 7695a6372f..1fcba99558 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -52,7 +52,7 @@ static int page_getenum(size_t size)
 	if (size <= 1 << 30)
 		return 30;
 	PMD_DRV_LOG(ERR, "Page size %zu out of range\n", size);
-	return sizeof(void *) * 8 - 1;
+	return sizeof(int) * 8 - 1;
 }
 
 static int page_roundup(size_t size)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.009969081 +0000
+++ 0072-net-bnxt-fix-shift-operation.patch	2020-10-28 10:35:11.568830966 +0000
@@ -1,8 +1,10 @@
-From affb4d5c212957f3844a7bbd00a5f2ba703b8a33 Mon Sep 17 00:00:00 2001
+From aaccec59f821937ff1862f9b3600a3a4f8ef3796 Mon Sep 17 00:00:00 2001
 From: Somnath Kotur <somnath.kotur@broadcom.com>
 Date: Tue, 22 Sep 2020 12:36:27 +0530
 Subject: [PATCH] net/bnxt: fix shift operation
 
+[ upstream commit affb4d5c212957f3844a7bbd00a5f2ba703b8a33 ]
+
 In page_roundup() left shifting by more than 31 bits could have
 undefined behavior as the return value is int and in page_getenum()
 it is possible to return a value as high as 63.
@@ -10,7 +12,6 @@
 
 Coverity issue: 343463
 Fixes: b7778e8a1c00 ("net/bnxt: refactor to properly allocate resources for PF/VF")
-Cc: stable@dpdk.org
 
 Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
 Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
@@ -20,7 +21,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
-index d0b820f149..577c5d1352 100644
+index 7695a6372f..1fcba99558 100644
 --- a/drivers/net/bnxt/bnxt_hwrm.c
 +++ b/drivers/net/bnxt/bnxt_hwrm.c
 @@ -52,7 +52,7 @@ static int page_getenum(size_t size)

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

* [dpdk-stable] patch 'net/bnxt: fix drop enable in get Rx queue info' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (70 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/bnxt: fix shift operation' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/bnxt: fix queue get " luca.boccassi
                   ` (134 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 7215702b49d59a190de92b1dac5a5e4f713cf42f Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Tue, 22 Sep 2020 13:30:34 -0400
Subject: [PATCH] net/bnxt: fix drop enable in get Rx queue info

[ upstream commit bd881e8d2a075b2dd69362176e2f8c76c88187ec ]

Return correct value for rx_drop_en. Add per-queue field to
track rx_drop_en configuration.

Fixes: 2fc201884be8 ("net/bnxt: support rxq/txq get information")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 5 ++---
 drivers/net/bnxt/bnxt_rxq.c    | 5 +++++
 drivers/net/bnxt/bnxt_rxq.h    | 4 ++++
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index bbfe883c15..e219dbf0d0 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -541,8 +541,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
 			.wthresh = 0,
 		},
 		.rx_free_thresh = 32,
-		/* If no descriptors available, pkts are dropped by default */
-		.rx_drop_en = 1,
+		.rx_drop_en = BNXT_DEFAULT_RX_DROP_EN,
 	};
 
 	dev_info->default_txconf = (struct rte_eth_txconf) {
@@ -2204,7 +2203,7 @@ bnxt_rxq_info_get_op(struct rte_eth_dev *dev, uint16_t queue_id,
 	qinfo->nb_desc = rxq->nb_rx_desc;
 
 	qinfo->conf.rx_free_thresh = rxq->rx_free_thresh;
-	qinfo->conf.rx_drop_en = 0;
+	qinfo->conf.rx_drop_en = rxq->drop_en;
 	qinfo->conf.rx_deferred_start = rxq->rx_deferred_start;
 }
 
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index e42308a97f..682cdb91ad 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -328,6 +328,11 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
 	rxq->nb_rx_desc = nb_desc;
 	rxq->rx_free_thresh = rx_conf->rx_free_thresh;
 
+	if (rx_conf->rx_drop_en != BNXT_DEFAULT_RX_DROP_EN)
+		PMD_DRV_LOG(NOTICE,
+			    "Per-queue config of drop-en is not supported.\n");
+	rxq->drop_en = BNXT_DEFAULT_RX_DROP_EN;
+
 	PMD_DRV_LOG(DEBUG, "RX Buf MTU %d\n", eth_dev->data->mtu);
 
 	rc = bnxt_init_rx_ring_struct(rxq, socket_id);
diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
index 4f5182d9e9..b722eeb2c8 100644
--- a/drivers/net/bnxt/bnxt_rxq.h
+++ b/drivers/net/bnxt/bnxt_rxq.h
@@ -6,6 +6,9 @@
 #ifndef _BNXT_RQX_H_
 #define _BNXT_RQX_H_
 
+/* Drop by default when receive desc is not available. */
+#define BNXT_DEFAULT_RX_DROP_EN		1
+
 struct bnxt;
 struct bnxt_rx_ring_info;
 struct bnxt_cp_ring_info;
@@ -31,6 +34,7 @@ struct bnxt_rx_queue {
 	uint8_t			crc_len; /* 0 if CRC stripped, 4 otherwise */
 	uint8_t			rx_deferred_start; /* not in global dev start */
 	uint8_t			rx_started; /* RX queue is started */
+	uint8_t			drop_en; /* Drop when rx desc not available. */
 
 	struct bnxt		*bp;
 	int			index;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.039500061 +0000
+++ 0073-net-bnxt-fix-drop-enable-in-get-Rx-queue-info.patch	2020-10-28 10:35:11.572831025 +0000
@@ -1,13 +1,14 @@
-From bd881e8d2a075b2dd69362176e2f8c76c88187ec Mon Sep 17 00:00:00 2001
+From 7215702b49d59a190de92b1dac5a5e4f713cf42f Mon Sep 17 00:00:00 2001
 From: Lance Richardson <lance.richardson@broadcom.com>
 Date: Tue, 22 Sep 2020 13:30:34 -0400
 Subject: [PATCH] net/bnxt: fix drop enable in get Rx queue info
 
+[ upstream commit bd881e8d2a075b2dd69362176e2f8c76c88187ec ]
+
 Return correct value for rx_drop_en. Add per-queue field to
 track rx_drop_en configuration.
 
 Fixes: 2fc201884be8 ("net/bnxt: support rxq/txq get information")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
 Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
@@ -19,10 +20,10 @@
  3 files changed, 11 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index 5fc8d1ccb5..d0d11a6d0e 100644
+index bbfe883c15..e219dbf0d0 100644
 --- a/drivers/net/bnxt/bnxt_ethdev.c
 +++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -929,8 +929,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
+@@ -541,8 +541,7 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
  			.wthresh = 0,
  		},
  		.rx_free_thresh = 32,
@@ -32,7 +33,7 @@
  	};
  
  	dev_info->default_txconf = (struct rte_eth_txconf) {
-@@ -2644,7 +2643,7 @@ bnxt_rxq_info_get_op(struct rte_eth_dev *dev, uint16_t queue_id,
+@@ -2204,7 +2203,7 @@ bnxt_rxq_info_get_op(struct rte_eth_dev *dev, uint16_t queue_id,
  	qinfo->nb_desc = rxq->nb_rx_desc;
  
  	qinfo->conf.rx_free_thresh = rxq->rx_free_thresh;
@@ -42,12 +43,12 @@
  }
  
 diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
-index 793a47d112..8cc77f7f9e 100644
+index e42308a97f..682cdb91ad 100644
 --- a/drivers/net/bnxt/bnxt_rxq.c
 +++ b/drivers/net/bnxt/bnxt_rxq.c
-@@ -330,6 +330,11 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
- 	rxq->rx_free_thresh =
- 		RTE_MIN(rte_align32pow2(nb_desc) / 4, RTE_BNXT_MAX_RX_BURST);
+@@ -328,6 +328,11 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
+ 	rxq->nb_rx_desc = nb_desc;
+ 	rxq->rx_free_thresh = rx_conf->rx_free_thresh;
  
 +	if (rx_conf->rx_drop_en != BNXT_DEFAULT_RX_DROP_EN)
 +		PMD_DRV_LOG(NOTICE,
@@ -58,12 +59,12 @@
  
  	rc = bnxt_init_rx_ring_struct(rxq, socket_id);
 diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
-index fae92ea45c..f70cb04373 100644
+index 4f5182d9e9..b722eeb2c8 100644
 --- a/drivers/net/bnxt/bnxt_rxq.h
 +++ b/drivers/net/bnxt/bnxt_rxq.h
-@@ -9,6 +9,9 @@
- /* Maximum receive burst supported in vector mode. */
- #define RTE_BNXT_MAX_RX_BURST		64U
+@@ -6,6 +6,9 @@
+ #ifndef _BNXT_RQX_H_
+ #define _BNXT_RQX_H_
  
 +/* Drop by default when receive desc is not available. */
 +#define BNXT_DEFAULT_RX_DROP_EN		1
@@ -71,7 +72,7 @@
  struct bnxt;
  struct bnxt_rx_ring_info;
  struct bnxt_cp_ring_info;
-@@ -34,6 +37,7 @@ struct bnxt_rx_queue {
+@@ -31,6 +34,7 @@ struct bnxt_rx_queue {
  	uint8_t			crc_len; /* 0 if CRC stripped, 4 otherwise */
  	uint8_t			rx_deferred_start; /* not in global dev start */
  	uint8_t			rx_started; /* RX queue is started */

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

* [dpdk-stable] patch 'net/bnxt: fix queue get info' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (71 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/bnxt: fix drop enable in get Rx queue info' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: fix deleting default VLAN from PF' " luca.boccassi
                   ` (133 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From aca542737a31ca9fed96300d31e1d01810e86513 Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Tue, 22 Sep 2020 13:30:35 -0400
Subject: [PATCH] net/bnxt: fix queue get info

[ upstream commit bd6345e4f48a737ec498d013953e785ab185e5f1 ]

Return current offloads in rxq_info_get()/txq_info_get().

Fixes: 2fc201884be8 ("net/bnxt: support rxq/txq get information")

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

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index e219dbf0d0..c6e9ad8e6a 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2205,6 +2205,7 @@ bnxt_rxq_info_get_op(struct rte_eth_dev *dev, uint16_t queue_id,
 	qinfo->conf.rx_free_thresh = rxq->rx_free_thresh;
 	qinfo->conf.rx_drop_en = rxq->drop_en;
 	qinfo->conf.rx_deferred_start = rxq->rx_deferred_start;
+	qinfo->conf.offloads = dev->data->dev_conf.rxmode.offloads;
 }
 
 static void
@@ -2228,6 +2229,7 @@ bnxt_txq_info_get_op(struct rte_eth_dev *dev, uint16_t queue_id,
 	qinfo->conf.tx_free_thresh = txq->tx_free_thresh;
 	qinfo->conf.tx_rs_thresh = 0;
 	qinfo->conf.tx_deferred_start = txq->tx_deferred_start;
+	qinfo->conf.offloads = dev->data->dev_conf.txmode.offloads;
 }
 
 int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.071513227 +0000
+++ 0074-net-bnxt-fix-queue-get-info.patch	2020-10-28 10:35:11.576831083 +0000
@@ -1,12 +1,13 @@
-From bd6345e4f48a737ec498d013953e785ab185e5f1 Mon Sep 17 00:00:00 2001
+From aca542737a31ca9fed96300d31e1d01810e86513 Mon Sep 17 00:00:00 2001
 From: Lance Richardson <lance.richardson@broadcom.com>
 Date: Tue, 22 Sep 2020 13:30:35 -0400
 Subject: [PATCH] net/bnxt: fix queue get info
 
+[ upstream commit bd6345e4f48a737ec498d013953e785ab185e5f1 ]
+
 Return current offloads in rxq_info_get()/txq_info_get().
 
 Fixes: 2fc201884be8 ("net/bnxt: support rxq/txq get information")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
 Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
@@ -16,10 +17,10 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index d0d11a6d0e..bb6b25dff2 100644
+index e219dbf0d0..c6e9ad8e6a 100644
 --- a/drivers/net/bnxt/bnxt_ethdev.c
 +++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -2645,6 +2645,7 @@ bnxt_rxq_info_get_op(struct rte_eth_dev *dev, uint16_t queue_id,
+@@ -2205,6 +2205,7 @@ bnxt_rxq_info_get_op(struct rte_eth_dev *dev, uint16_t queue_id,
  	qinfo->conf.rx_free_thresh = rxq->rx_free_thresh;
  	qinfo->conf.rx_drop_en = rxq->drop_en;
  	qinfo->conf.rx_deferred_start = rxq->rx_deferred_start;
@@ -27,14 +28,14 @@
  }
  
  static void
-@@ -2668,6 +2669,7 @@ bnxt_txq_info_get_op(struct rte_eth_dev *dev, uint16_t queue_id,
+@@ -2228,6 +2229,7 @@ bnxt_txq_info_get_op(struct rte_eth_dev *dev, uint16_t queue_id,
  	qinfo->conf.tx_free_thresh = txq->tx_free_thresh;
  	qinfo->conf.tx_rs_thresh = 0;
  	qinfo->conf.tx_deferred_start = txq->tx_deferred_start;
 +	qinfo->conf.offloads = dev->data->dev_conf.txmode.offloads;
  }
  
- static const struct {
+ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/hns3: fix deleting default VLAN from PF' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (72 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/bnxt: fix queue get " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: skip VF register access when PF in FLR' " luca.boccassi
                   ` (132 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 6f16309fc0b462eeb94fb6f2b444b32e7e9665c9 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Tue, 22 Sep 2020 20:03:14 +0800
Subject: [PATCH] net/hns3: fix deleting default VLAN from PF

[ upstream commit c1ecff85d18baa1e43e82d8cb9aebd518f0f0c7c ]

Currently, the default VLAN (vlan id 0) will never be deleted from the
hardware VLAN table based on hns3 PF device. As a result, even a
non-zero PVID is set by calling rte_eth_dev_set_vlan_pvid based on hns3
PF device, packets with VLAN 0 and without VLAN are still received by PF
driver in Rx direction.

This patch deletes the restriction that VLAN 0 cannot be removed in PVID
configuration to ensure packets without PVID will be filtered when PVID
is set. And the patch adds VLAN 0 to the soft list when initializing
vlan configuration to ensure that VLAN 0 will be deleted from the
hardware VLAN table when device is closed.

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

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

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 27c89abfab..76f163d129 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -35,7 +35,7 @@
 #define HNS3_DEFAULT_PORT_CONF_QUEUES_NUM	1
 
 #define HNS3_SERVICE_INTERVAL		1000000 /* us */
-#define HNS3_INVLID_PVID		0xFFFF
+#define HNS3_INVALID_PVID		0xFFFF
 
 #define HNS3_FILTER_TYPE_VF		0
 #define HNS3_FILTER_TYPE_PORT		1
@@ -338,8 +338,9 @@ hns3_vlan_filter_configure(struct hns3_adapter *hns, uint16_t vlan_id, int on)
 	int ret = 0;
 
 	/*
-	 * When vlan filter is enabled, hardware regards vlan id 0 as the entry
-	 * for normal packet, deleting vlan id 0 is not allowed.
+	 * When vlan filter is enabled, hardware regards packets without vlan
+	 * as packets with vlan 0. So, to receive packets without vlan, vlan id
+	 * 0 is not allowed to be removed by rte_eth_dev_vlan_filter.
 	 */
 	if (on == 0 && vlan_id == 0)
 		return 0;
@@ -356,7 +357,7 @@ hns3_vlan_filter_configure(struct hns3_adapter *hns, uint16_t vlan_id, int on)
 		writen_to_tbl = true;
 	}
 
-	if (ret == 0 && vlan_id) {
+	if (ret == 0) {
 		if (on)
 			hns3_add_dev_vlan_table(hns, vlan_id, writen_to_tbl);
 		else
@@ -720,16 +721,6 @@ hns3_vlan_txvlan_cfg(struct hns3_adapter *hns, uint16_t port_base_vlan_state,
 	return ret;
 }
 
-static void
-hns3_store_port_base_vlan_info(struct hns3_adapter *hns, uint16_t pvid, int on)
-{
-	struct hns3_hw *hw = &hns->hw;
-
-	hw->port_base_vlan_cfg.state = on ?
-	    HNS3_PORT_BASE_VLAN_ENABLE : HNS3_PORT_BASE_VLAN_DISABLE;
-
-	hw->port_base_vlan_cfg.pvid = pvid;
-}
 
 static void
 hns3_rm_all_vlan_table(struct hns3_adapter *hns, bool is_del_list)
@@ -738,10 +729,10 @@ hns3_rm_all_vlan_table(struct hns3_adapter *hns, bool is_del_list)
 	struct hns3_pf *pf = &hns->pf;
 
 	LIST_FOREACH(vlan_entry, &pf->vlan_list, next) {
-		if (vlan_entry->hd_tbl_status)
+		if (vlan_entry->hd_tbl_status) {
 			hns3_set_port_vlan_filter(hns, vlan_entry->vlan_id, 0);
-
-		vlan_entry->hd_tbl_status = false;
+			vlan_entry->hd_tbl_status = false;
+		}
 	}
 
 	if (is_del_list) {
@@ -761,10 +752,10 @@ hns3_add_all_vlan_table(struct hns3_adapter *hns)
 	struct hns3_pf *pf = &hns->pf;
 
 	LIST_FOREACH(vlan_entry, &pf->vlan_list, next) {
-		if (!vlan_entry->hd_tbl_status)
+		if (!vlan_entry->hd_tbl_status) {
 			hns3_set_port_vlan_filter(hns, vlan_entry->vlan_id, 1);
-
-		vlan_entry->hd_tbl_status = true;
+			vlan_entry->hd_tbl_status = true;
+		}
 	}
 }
 
@@ -775,7 +766,7 @@ hns3_remove_all_vlan_table(struct hns3_adapter *hns)
 	int ret;
 
 	hns3_rm_all_vlan_table(hns, true);
-	if (hw->port_base_vlan_cfg.pvid != HNS3_INVLID_PVID) {
+	if (hw->port_base_vlan_cfg.pvid != HNS3_INVALID_PVID) {
 		ret = hns3_set_port_vlan_filter(hns,
 						hw->port_base_vlan_cfg.pvid, 0);
 		if (ret) {
@@ -788,40 +779,41 @@ hns3_remove_all_vlan_table(struct hns3_adapter *hns)
 
 static int
 hns3_update_vlan_filter_entries(struct hns3_adapter *hns,
-				uint16_t port_base_vlan_state,
-				uint16_t new_pvid, uint16_t old_pvid)
+			uint16_t port_base_vlan_state, uint16_t new_pvid)
 {
 	struct hns3_hw *hw = &hns->hw;
-	int ret = 0;
+	uint16_t old_pvid;
+	int ret;
 
 	if (port_base_vlan_state == HNS3_PORT_BASE_VLAN_ENABLE) {
-		if (old_pvid != HNS3_INVLID_PVID && old_pvid != 0) {
+		old_pvid = hw->port_base_vlan_cfg.pvid;
+		if (old_pvid != HNS3_INVALID_PVID) {
 			ret = hns3_set_port_vlan_filter(hns, old_pvid, 0);
 			if (ret) {
-				hns3_err(hw,
-					 "Failed to clear clear old pvid filter, ret =%d",
-					 ret);
+				hns3_err(hw, "failed to remove old pvid %u, "
+						"ret = %d", old_pvid, ret);
 				return ret;
 			}
 		}
 
 		hns3_rm_all_vlan_table(hns, false);
-		return hns3_set_port_vlan_filter(hns, new_pvid, 1);
-	}
-
-	if (new_pvid != 0) {
+		ret = hns3_set_port_vlan_filter(hns, new_pvid, 1);
+		if (ret) {
+			hns3_err(hw, "failed to add new pvid %u, ret = %d",
+					new_pvid, ret);
+			return ret;
+		}
+	} else {
 		ret = hns3_set_port_vlan_filter(hns, new_pvid, 0);
 		if (ret) {
-			hns3_err(hw, "Failed to set port vlan filter, ret =%d",
-				 ret);
+			hns3_err(hw, "failed to remove pvid %u, ret = %d",
+					new_pvid, ret);
 			return ret;
 		}
-	}
 
-	if (new_pvid == hw->port_base_vlan_cfg.pvid)
 		hns3_add_all_vlan_table(hns);
-
-	return ret;
+	}
+	return 0;
 }
 
 static int
@@ -857,11 +849,10 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
 {
 	struct hns3_hw *hw = &hns->hw;
 	uint16_t port_base_vlan_state;
-	uint16_t old_pvid;
 	int ret;
 
 	if (on == 0 && pvid != hw->port_base_vlan_cfg.pvid) {
-		if (hw->port_base_vlan_cfg.pvid != HNS3_INVLID_PVID)
+		if (hw->port_base_vlan_cfg.pvid != HNS3_INVALID_PVID)
 			hns3_warn(hw, "Invalid operation! As current pvid set "
 				  "is %u, disable pvid %u is invalid",
 				  hw->port_base_vlan_cfg.pvid, pvid);
@@ -884,19 +875,18 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
 		return ret;
 	}
 
-	if (pvid == HNS3_INVLID_PVID)
+	if (pvid == HNS3_INVALID_PVID)
 		goto out;
-	old_pvid = hw->port_base_vlan_cfg.pvid;
-	ret = hns3_update_vlan_filter_entries(hns, port_base_vlan_state, pvid,
-					      old_pvid);
+	ret = hns3_update_vlan_filter_entries(hns, port_base_vlan_state, pvid);
 	if (ret) {
-		hns3_err(hw, "Failed to update vlan filter entries, ret =%d",
+		hns3_err(hw, "failed to update vlan filter entries, ret = %d",
 			 ret);
 		return ret;
 	}
 
 out:
-	hns3_store_port_base_vlan_info(hns, pvid, on);
+	hw->port_base_vlan_cfg.state = port_base_vlan_state;
+	hw->port_base_vlan_cfg.pvid = on ? pvid : HNS3_INVALID_PVID;
 	return ret;
 }
 
@@ -919,20 +909,19 @@ hns3_vlan_pvid_set(struct rte_eth_dev *dev, uint16_t pvid, int on)
 	return ret;
 }
 
-static void
-init_port_base_vlan_info(struct hns3_hw *hw)
-{
-	hw->port_base_vlan_cfg.state = HNS3_PORT_BASE_VLAN_DISABLE;
-	hw->port_base_vlan_cfg.pvid = HNS3_INVLID_PVID;
-}
-
 static int
 hns3_default_vlan_config(struct hns3_adapter *hns)
 {
 	struct hns3_hw *hw = &hns->hw;
 	int ret;
 
-	ret = hns3_set_port_vlan_filter(hns, 0, 1);
+	/*
+	 * When vlan filter is enabled, hardware regards packets without vlan
+	 * as packets with vlan 0. Therefore, if vlan 0 is not in the vlan
+	 * table, packets without vlan won't be received. So, add vlan 0 as
+	 * the default vlan.
+	 */
+	ret = hns3_vlan_filter_configure(hns, 0, 1);
 	if (ret)
 		hns3_err(hw, "default vlan 0 config failed, ret =%d", ret);
 	return ret;
@@ -951,8 +940,10 @@ hns3_init_vlan_config(struct hns3_adapter *hns)
 	 * ensure that the hardware configuration remains unchanged before and
 	 * after reset.
 	 */
-	if (rte_atomic16_read(&hw->reset.resetting) == 0)
-		init_port_base_vlan_info(hw);
+	if (rte_atomic16_read(&hw->reset.resetting) == 0) {
+		hw->port_base_vlan_cfg.state = HNS3_PORT_BASE_VLAN_DISABLE;
+		hw->port_base_vlan_cfg.pvid = HNS3_INVALID_PVID;
+	}
 
 	ret = hns3_vlan_filter_init(hns);
 	if (ret) {
@@ -974,7 +965,7 @@ hns3_init_vlan_config(struct hns3_adapter *hns)
 	 * and hns3_restore_vlan_conf later.
 	 */
 	if (rte_atomic16_read(&hw->reset.resetting) == 0) {
-		ret = hns3_vlan_pvid_configure(hns, HNS3_INVLID_PVID, 0);
+		ret = hns3_vlan_pvid_configure(hns, HNS3_INVALID_PVID, 0);
 		if (ret) {
 			hns3_err(hw, "pvid set fail in pf, ret =%d", ret);
 			return ret;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.104554495 +0000
+++ 0075-net-hns3-fix-deleting-default-VLAN-from-PF.patch	2020-10-28 10:35:11.580831143 +0000
@@ -1,8 +1,10 @@
-From c1ecff85d18baa1e43e82d8cb9aebd518f0f0c7c Mon Sep 17 00:00:00 2001
+From 6f16309fc0b462eeb94fb6f2b444b32e7e9665c9 Mon Sep 17 00:00:00 2001
 From: Chengchang Tang <tangchengchang@huawei.com>
 Date: Tue, 22 Sep 2020 20:03:14 +0800
 Subject: [PATCH] net/hns3: fix deleting default VLAN from PF
 
+[ upstream commit c1ecff85d18baa1e43e82d8cb9aebd518f0f0c7c ]
+
 Currently, the default VLAN (vlan id 0) will never be deleted from the
 hardware VLAN table based on hns3 PF device. As a result, even a
 non-zero PVID is set by calling rte_eth_dev_set_vlan_pvid based on hns3
@@ -16,7 +18,6 @@
 hardware VLAN table when device is closed.
 
 Fixes: 411d23b9eafb ("net/hns3: support VLAN")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -25,7 +26,7 @@
  1 file changed, 48 insertions(+), 57 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index 3e98df33c7..abc1742119 100644
+index 27c89abfab..76f163d129 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
 @@ -35,7 +35,7 @@
@@ -37,7 +38,7 @@
  
  #define HNS3_FILTER_TYPE_VF		0
  #define HNS3_FILTER_TYPE_PORT		1
-@@ -346,8 +346,9 @@ hns3_vlan_filter_configure(struct hns3_adapter *hns, uint16_t vlan_id, int on)
+@@ -338,8 +338,9 @@ hns3_vlan_filter_configure(struct hns3_adapter *hns, uint16_t vlan_id, int on)
  	int ret = 0;
  
  	/*
@@ -49,7 +50,7 @@
  	 */
  	if (on == 0 && vlan_id == 0)
  		return 0;
-@@ -364,7 +365,7 @@ hns3_vlan_filter_configure(struct hns3_adapter *hns, uint16_t vlan_id, int on)
+@@ -356,7 +357,7 @@ hns3_vlan_filter_configure(struct hns3_adapter *hns, uint16_t vlan_id, int on)
  		writen_to_tbl = true;
  	}
  
@@ -58,7 +59,7 @@
  		if (on)
  			hns3_add_dev_vlan_table(hns, vlan_id, writen_to_tbl);
  		else
-@@ -743,16 +744,6 @@ hns3_vlan_txvlan_cfg(struct hns3_adapter *hns, uint16_t port_base_vlan_state,
+@@ -720,16 +721,6 @@ hns3_vlan_txvlan_cfg(struct hns3_adapter *hns, uint16_t port_base_vlan_state,
  	return ret;
  }
  
@@ -75,7 +76,7 @@
  
  static void
  hns3_rm_all_vlan_table(struct hns3_adapter *hns, bool is_del_list)
-@@ -761,10 +752,10 @@ hns3_rm_all_vlan_table(struct hns3_adapter *hns, bool is_del_list)
+@@ -738,10 +729,10 @@ hns3_rm_all_vlan_table(struct hns3_adapter *hns, bool is_del_list)
  	struct hns3_pf *pf = &hns->pf;
  
  	LIST_FOREACH(vlan_entry, &pf->vlan_list, next) {
@@ -89,7 +90,7 @@
  	}
  
  	if (is_del_list) {
-@@ -784,10 +775,10 @@ hns3_add_all_vlan_table(struct hns3_adapter *hns)
+@@ -761,10 +752,10 @@ hns3_add_all_vlan_table(struct hns3_adapter *hns)
  	struct hns3_pf *pf = &hns->pf;
  
  	LIST_FOREACH(vlan_entry, &pf->vlan_list, next) {
@@ -103,7 +104,7 @@
  	}
  }
  
-@@ -798,7 +789,7 @@ hns3_remove_all_vlan_table(struct hns3_adapter *hns)
+@@ -775,7 +766,7 @@ hns3_remove_all_vlan_table(struct hns3_adapter *hns)
  	int ret;
  
  	hns3_rm_all_vlan_table(hns, true);
@@ -112,7 +113,7 @@
  		ret = hns3_set_port_vlan_filter(hns,
  						hw->port_base_vlan_cfg.pvid, 0);
  		if (ret) {
-@@ -811,40 +802,41 @@ hns3_remove_all_vlan_table(struct hns3_adapter *hns)
+@@ -788,40 +779,41 @@ hns3_remove_all_vlan_table(struct hns3_adapter *hns)
  
  static int
  hns3_update_vlan_filter_entries(struct hns3_adapter *hns,
@@ -171,7 +172,7 @@
  }
  
  static int
-@@ -883,11 +875,10 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
+@@ -857,11 +849,10 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
  {
  	struct hns3_hw *hw = &hns->hw;
  	uint16_t port_base_vlan_state;
@@ -184,7 +185,7 @@
  			hns3_warn(hw, "Invalid operation! As current pvid set "
  				  "is %u, disable pvid %u is invalid",
  				  hw->port_base_vlan_cfg.pvid, pvid);
-@@ -910,19 +901,18 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
+@@ -884,19 +875,18 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
  		return ret;
  	}
  
@@ -209,8 +210,8 @@
  	return ret;
  }
  
-@@ -968,20 +958,19 @@ hns3_vlan_pvid_set(struct rte_eth_dev *dev, uint16_t pvid, int on)
- 	return 0;
+@@ -919,20 +909,19 @@ hns3_vlan_pvid_set(struct rte_eth_dev *dev, uint16_t pvid, int on)
+ 	return ret;
  }
  
 -static void
@@ -237,7 +238,7 @@
  	if (ret)
  		hns3_err(hw, "default vlan 0 config failed, ret =%d", ret);
  	return ret;
-@@ -1000,8 +989,10 @@ hns3_init_vlan_config(struct hns3_adapter *hns)
+@@ -951,8 +940,10 @@ hns3_init_vlan_config(struct hns3_adapter *hns)
  	 * ensure that the hardware configuration remains unchanged before and
  	 * after reset.
  	 */
@@ -250,7 +251,7 @@
  
  	ret = hns3_vlan_filter_init(hns);
  	if (ret) {
-@@ -1023,7 +1014,7 @@ hns3_init_vlan_config(struct hns3_adapter *hns)
+@@ -974,7 +965,7 @@ hns3_init_vlan_config(struct hns3_adapter *hns)
  	 * and hns3_restore_vlan_conf later.
  	 */
  	if (rte_atomic16_read(&hw->reset.resetting) == 0) {

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

* [dpdk-stable] patch 'net/hns3: skip VF register access when PF in FLR' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (73 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: fix deleting default VLAN from PF' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: fix config when creating RSS rule after flush' " luca.boccassi
                   ` (131 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Hongbo Zheng; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 393a0611c7e389abb87c5deeb6790fb388decc22 Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3@huawei.com>
Date: Tue, 22 Sep 2020 20:03:18 +0800
Subject: [PATCH] net/hns3: skip VF register access when PF in FLR

[ upstream commit 0eb7334f4034c08cbf2f23352bec0d35356872f1 ]

According to the protocol of PCIe, FLR to a PF device resets the PF state
as well as the SR-IOV extended capability including VF Enable which means
that VFs no longer exist.

When PF device is in FLR reset stage, at this time, the register state
of VF device is not reliable, so VF device's register state detection
is not carried out in PF FLR.

In this case, we just ignore the register states to avoid accessing
nonexistent register and return false in the internal function named
hns3vf_is_reset_pending to indicate that there are no other reset states
that need to be processed by PMD driver.

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

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.h    |  7 +++++++
 drivers/net/hns3/hns3_ethdev_vf.c | 15 +++++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 35e64aa5ae..6e9173abd4 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -256,6 +256,13 @@ enum hns3_reset_level {
 	 * Kernel PF driver use mailbox to inform DPDK VF to do reset, the value
 	 * of the reset level and the one defined in kernel driver should be
 	 * same.
+	 *
+	 * According to the protocol of PCIe, FLR to a PF resets the PF state as
+	 * well as the SR-IOV extended capability including VF Enable which
+	 * means that VFs no longer exist.
+	 *
+	 * In PF FLR, the register state of VF is not reliable, VF's driver
+	 * should not access the registers of the VF device.
 	 */
 	HNS3_VF_FULL_RESET = 3,
 	HNS3_FLR_RESET,     /* A VF perform FLR reset */
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index e30e9f65c4..37c7d33f59 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1840,6 +1840,21 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns)
 	struct hns3_hw *hw = &hns->hw;
 	enum hns3_reset_level reset;
 
+	/*
+	 * According to the protocol of PCIe, FLR to a PF device resets the PF
+	 * state as well as the SR-IOV extended capability including VF Enable
+	 * which means that VFs no longer exist.
+	 *
+	 * HNS3_VF_FULL_RESET means PF device is in FLR reset. when PF device
+	 * is in FLR stage, the register state of VF device is not reliable,
+	 * so register states detection can not be carried out. In this case,
+	 * we just ignore the register states and return false to indicate that
+	 * there are no other reset states that need to be processed by driver.
+	 */
+	if (hw->reset.level == HNS3_VF_FULL_RESET)
+		return false;
+
+	/* Check the registers to confirm whether there is reset pending */
 	hns3vf_check_event_cause(hns, NULL);
 	reset = hns3vf_get_reset_level(hw, &hw->reset.pending);
 	if (hw->reset.level != HNS3_NONE_RESET && hw->reset.level < reset) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.136886055 +0000
+++ 0076-net-hns3-skip-VF-register-access-when-PF-in-FLR.patch	2020-10-28 10:35:11.584831201 +0000
@@ -1,8 +1,10 @@
-From 0eb7334f4034c08cbf2f23352bec0d35356872f1 Mon Sep 17 00:00:00 2001
+From 393a0611c7e389abb87c5deeb6790fb388decc22 Mon Sep 17 00:00:00 2001
 From: Hongbo Zheng <zhenghongbo3@huawei.com>
 Date: Tue, 22 Sep 2020 20:03:18 +0800
 Subject: [PATCH] net/hns3: skip VF register access when PF in FLR
 
+[ upstream commit 0eb7334f4034c08cbf2f23352bec0d35356872f1 ]
+
 According to the protocol of PCIe, FLR to a PF device resets the PF state
 as well as the SR-IOV extended capability including VF Enable which means
 that VFs no longer exist.
@@ -17,7 +19,6 @@
 that need to be processed by PMD driver.
 
 Fixes: 2790c6464725 ("net/hns3: support device reset")
-Cc: stable@dpdk.org
 
 Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -27,10 +28,10 @@
  2 files changed, 22 insertions(+)
 
 diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
-index f170df9176..3f3f973c72 100644
+index 35e64aa5ae..6e9173abd4 100644
 --- a/drivers/net/hns3/hns3_ethdev.h
 +++ b/drivers/net/hns3/hns3_ethdev.h
-@@ -275,6 +275,13 @@ enum hns3_reset_level {
+@@ -256,6 +256,13 @@ enum hns3_reset_level {
  	 * Kernel PF driver use mailbox to inform DPDK VF to do reset, the value
  	 * of the reset level and the one defined in kernel driver should be
  	 * same.
@@ -45,10 +46,10 @@
  	HNS3_VF_FULL_RESET = 3,
  	HNS3_FLR_RESET,     /* A VF perform FLR reset */
 diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
-index 565cf60e76..cb2747b132 100644
+index e30e9f65c4..37c7d33f59 100644
 --- a/drivers/net/hns3/hns3_ethdev_vf.c
 +++ b/drivers/net/hns3/hns3_ethdev_vf.c
-@@ -2191,6 +2191,21 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns)
+@@ -1840,6 +1840,21 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns)
  	struct hns3_hw *hw = &hns->hw;
  	enum hns3_reset_level reset;
  

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

* [dpdk-stable] patch 'net/hns3: fix config when creating RSS rule after flush' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (74 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: skip VF register access when PF in FLR' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: fix flow RSS queue number 0' " luca.boccassi
                   ` (130 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Lijun Ou; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 7c8157cb3edfa02a1d710d454a896aab72ad3fa8 Mon Sep 17 00:00:00 2001
From: Lijun Ou <oulijun@huawei.com>
Date: Tue, 22 Sep 2020 20:03:25 +0800
Subject: [PATCH] net/hns3: fix config when creating RSS rule after flush

[ upstream commit eb158fc756a5c0c91ed05a676b2085927d76aa63 ]

Currnetly, when user create a flow RSS rule and then flush the rule, driver
will set 0 for the internal structure of hw->rss_info maintained in driver.
And then user create a flow RSS rule without specified RSS hash key, driver
configure a validate RSS hash key into hardware network engine and will
cause an RSS error. The related steps when using testpmd as
follows:
  flow 0 <pattern> action rss xx end / end
  flow flush 0
  flow 0 <pattern> action rss queues 0 1 end / end

To slove the preceding problem, the flow flush processing is modified.
it don't clear all RSS configurations for hw->rss_info. Actually the RSS
key information in the hardware is not cleared, therefore, the
hw->rss_info.key is kept consistent with the value in the hardware. In
addition, because reset the redirection table, we need to set queues NULL
and queue_num for zero that indicate the corresponding parameters in the
hardware is unavailable. Also we set hw->rss_info.func to
RTE_ETH_HASH_FUNCTION_MAX that indicate it is invalid.

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

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

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 0301d6b169..94819bd42c 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1198,10 +1198,24 @@ static bool
 hns3_action_rss_same(const struct rte_flow_action_rss *comp,
 		     const struct rte_flow_action_rss *with)
 {
-	return (comp->func == with->func &&
-		comp->level == with->level &&
-		comp->types == with->types &&
-		comp->key_len == with->key_len &&
+	bool func_is_same;
+
+	/*
+	 * When user flush all RSS rule, RSS func is set invalid with
+	 * RTE_ETH_HASH_FUNCTION_MAX. Then the user create a flow after
+	 * flushed, any validate RSS func is different with it before
+	 * flushed. Others, when user create an action RSS with RSS func
+	 * specified RTE_ETH_HASH_FUNCTION_DEFAULT, the func is the same
+	 * between continuous RSS flow.
+	 */
+	if (comp->func == RTE_ETH_HASH_FUNCTION_MAX)
+		func_is_same = false;
+	else
+		func_is_same = (with->func ? (comp->func == with->func) : true);
+
+	return (func_is_same &&
+		comp->types == (with->types & HNS3_ETH_RSS_SUPPORT) &&
+		comp->level == with->level && comp->key_len == with->key_len &&
 		comp->queue_num == with->queue_num &&
 		!memcmp(comp->key, with->key, with->key_len) &&
 		!memcmp(comp->queue, with->queue,
@@ -1502,7 +1516,19 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
 				hns3_err(hw, "RSS disable failed(%d)", ret);
 				return ret;
 			}
-			memset(rss_info, 0, sizeof(struct hns3_rss_conf));
+
+			if (rss_flow_conf.queue_num) {
+				/*
+				 * Due the content of queue pointer have been
+				 * reset to 0, the rss_info->conf.queue should
+				 * be set NULL.
+				 */
+				rss_info->conf.queue = NULL;
+				rss_info->conf.queue_num = 0;
+			}
+
+			/* set RSS func invalid after flushed */
+			rss_info->conf.func = RTE_ETH_HASH_FUNCTION_MAX;
 			return 0;
 		}
 		return -EINVAL;
@@ -1564,6 +1590,10 @@ hns3_restore_rss_filter(struct rte_eth_dev *dev)
 	if (hw->rss_info.conf.queue_num == 0)
 		return 0;
 
+	/* When user flush all rules, it doesn't need to restore RSS rule */
+	if (hw->rss_info.conf.func == RTE_ETH_HASH_FUNCTION_MAX)
+		return 0;
+
 	return hns3_config_rss_filter(dev, &hw->rss_info, true);
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.167899994 +0000
+++ 0077-net-hns3-fix-config-when-creating-RSS-rule-after-flu.patch	2020-10-28 10:35:11.584831201 +0000
@@ -1,8 +1,10 @@
-From eb158fc756a5c0c91ed05a676b2085927d76aa63 Mon Sep 17 00:00:00 2001
+From 7c8157cb3edfa02a1d710d454a896aab72ad3fa8 Mon Sep 17 00:00:00 2001
 From: Lijun Ou <oulijun@huawei.com>
 Date: Tue, 22 Sep 2020 20:03:25 +0800
 Subject: [PATCH] net/hns3: fix config when creating RSS rule after flush
 
+[ upstream commit eb158fc756a5c0c91ed05a676b2085927d76aa63 ]
+
 Currnetly, when user create a flow RSS rule and then flush the rule, driver
 will set 0 for the internal structure of hw->rss_info maintained in driver.
 And then user create a flow RSS rule without specified RSS hash key, driver
@@ -23,7 +25,6 @@
 RTE_ETH_HASH_FUNCTION_MAX that indicate it is invalid.
 
 Fixes: c37ca66f2b27 ("net/hns3: support RSS")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lijun Ou <oulijun@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -32,10 +33,10 @@
  1 file changed, 35 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
-index f4ea47aff4..6f2ff87496 100644
+index 0301d6b169..94819bd42c 100644
 --- a/drivers/net/hns3/hns3_flow.c
 +++ b/drivers/net/hns3/hns3_flow.c
-@@ -1293,10 +1293,24 @@ static bool
+@@ -1198,10 +1198,24 @@ static bool
  hns3_action_rss_same(const struct rte_flow_action_rss *comp,
  		     const struct rte_flow_action_rss *with)
  {
@@ -64,7 +65,7 @@
  		comp->queue_num == with->queue_num &&
  		!memcmp(comp->key, with->key, with->key_len) &&
  		!memcmp(comp->queue, with->queue,
-@@ -1589,7 +1603,19 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
+@@ -1502,7 +1516,19 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
  				hns3_err(hw, "RSS disable failed(%d)", ret);
  				return ret;
  			}
@@ -85,7 +86,7 @@
  			return 0;
  		}
  		return -EINVAL;
-@@ -1651,6 +1677,10 @@ hns3_restore_rss_filter(struct rte_eth_dev *dev)
+@@ -1564,6 +1590,10 @@ hns3_restore_rss_filter(struct rte_eth_dev *dev)
  	if (hw->rss_info.conf.queue_num == 0)
  		return 0;
  

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

* [dpdk-stable] patch 'net/hns3: fix flow RSS queue number 0' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (75 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: fix config when creating RSS rule after flush' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: fix flushing RSS rule' " luca.boccassi
                   ` (129 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Wei Hu (Xavier); +Cc: Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 56023b9778ce6f1722a425809f1bbcc6efbb9616 Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Tue, 22 Sep 2020 20:03:26 +0800
Subject: [PATCH] net/hns3: fix flow RSS queue number 0

[ upstream commit b03ddaadc0e9776a05b73de14701f0cf2730885e ]

When user specifies RSS queue num for 0 in action list by flow create API,
it should create a valid flow rule. The following flow rule should be
success in the command line of the testpmd application:
flow create 0 <pattern> actions rss queues  / end

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

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

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 94819bd42c..9904918110 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1265,10 +1265,9 @@ hns3_parse_rss_filter(struct rte_eth_dev *dev,
 	uint16_t n;
 
 	NEXT_ITEM_OF_ACTION(act, actions, act_index);
-	/* Get configuration args from APP cmdline input */
 	rss = act->conf;
 
-	if (rss == NULL || rss->queue_num == 0) {
+	if (rss == NULL) {
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ACTION,
 					  act, "no valid queues");
@@ -1433,11 +1432,6 @@ hns3_update_indir_table(struct rte_eth_dev *dev,
 	uint8_t queue_id;
 	uint32_t i;
 
-	if (num == 0) {
-		hns3_err(hw, "No PF queues are configured to enable RSS");
-		return -ENOTSUP;
-	}
-
 	allow_rss_queues = RTE_MIN(dev->data->nb_rx_queues, hw->rss_size_max);
 	/* Fill in redirection table */
 	memcpy(indir_tbl, hw->rss_info.rss_indirection_tbl,
@@ -1545,10 +1539,11 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
 	hns3_info(hw, "Max of contiguous %u PF queues are configured", num);
 
 	rte_spinlock_lock(&hw->lock);
-	/* Update redirection talbe of rss */
-	ret = hns3_update_indir_table(dev, &rss_flow_conf, num);
-	if (ret)
-		goto rss_config_err;
+	if (num) {
+		ret = hns3_update_indir_table(dev, &rss_flow_conf, num);
+		if (ret)
+			goto rss_config_err;
+	}
 
 	/* Set hash algorithm and flow types by the user's config */
 	ret = hns3_hw_rss_hash_set(hw, &rss_flow_conf);
@@ -1574,9 +1569,6 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev)
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
 
-	if (hw->rss_info.conf.queue_num == 0)
-		return 0;
-
 	return hns3_config_rss_filter(dev, &hw->rss_info, false);
 }
 
@@ -1587,9 +1579,6 @@ hns3_restore_rss_filter(struct rte_eth_dev *dev)
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
 
-	if (hw->rss_info.conf.queue_num == 0)
-		return 0;
-
 	/* When user flush all rules, it doesn't need to restore RSS rule */
 	if (hw->rss_info.conf.func == RTE_ETH_HASH_FUNCTION_MAX)
 		return 0;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.196865956 +0000
+++ 0078-net-hns3-fix-flow-RSS-queue-number-0.patch	2020-10-28 10:35:11.588831261 +0000
@@ -1,15 +1,16 @@
-From b03ddaadc0e9776a05b73de14701f0cf2730885e Mon Sep 17 00:00:00 2001
+From 56023b9778ce6f1722a425809f1bbcc6efbb9616 Mon Sep 17 00:00:00 2001
 From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
 Date: Tue, 22 Sep 2020 20:03:26 +0800
 Subject: [PATCH] net/hns3: fix flow RSS queue number 0
 
+[ upstream commit b03ddaadc0e9776a05b73de14701f0cf2730885e ]
+
 When user specifies RSS queue num for 0 in action list by flow create API,
 it should create a valid flow rule. The following flow rule should be
 success in the command line of the testpmd application:
 flow create 0 <pattern> actions rss queues  / end
 
 Fixes: c37ca66f2b27 ("net/hns3: support RSS")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lijun Ou <oulijun@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -18,10 +19,10 @@
  1 file changed, 6 insertions(+), 17 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
-index 6f2ff87496..5b5124c196 100644
+index 94819bd42c..9904918110 100644
 --- a/drivers/net/hns3/hns3_flow.c
 +++ b/drivers/net/hns3/hns3_flow.c
-@@ -1360,10 +1360,9 @@ hns3_parse_rss_filter(struct rte_eth_dev *dev,
+@@ -1265,10 +1265,9 @@ hns3_parse_rss_filter(struct rte_eth_dev *dev,
  	uint16_t n;
  
  	NEXT_ITEM_OF_ACTION(act, actions, act_index);
@@ -33,7 +34,7 @@
  		return rte_flow_error_set(error, EINVAL,
  					  RTE_FLOW_ERROR_TYPE_ACTION,
  					  act, "no valid queues");
-@@ -1537,11 +1536,6 @@ hns3_update_indir_table(struct rte_eth_dev *dev,
+@@ -1433,11 +1432,6 @@ hns3_update_indir_table(struct rte_eth_dev *dev,
  	uint8_t queue_id;
  	uint32_t i;
  
@@ -45,7 +46,7 @@
  	allow_rss_queues = RTE_MIN(dev->data->nb_rx_queues, hw->rss_size_max);
  	/* Fill in redirection table */
  	memcpy(indir_tbl, hw->rss_info.rss_indirection_tbl,
-@@ -1632,10 +1626,11 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
+@@ -1545,10 +1539,11 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
  	hns3_info(hw, "Max of contiguous %u PF queues are configured", num);
  
  	rte_spinlock_lock(&hw->lock);
@@ -61,7 +62,7 @@
  
  	/* Set hash algorithm and flow types by the user's config */
  	ret = hns3_hw_rss_hash_set(hw, &rss_flow_conf);
-@@ -1661,9 +1656,6 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev)
+@@ -1574,9 +1569,6 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev)
  	struct hns3_adapter *hns = dev->data->dev_private;
  	struct hns3_hw *hw = &hns->hw;
  
@@ -71,7 +72,7 @@
  	return hns3_config_rss_filter(dev, &hw->rss_info, false);
  }
  
-@@ -1674,9 +1666,6 @@ hns3_restore_rss_filter(struct rte_eth_dev *dev)
+@@ -1587,9 +1579,6 @@ hns3_restore_rss_filter(struct rte_eth_dev *dev)
  	struct hns3_adapter *hns = dev->data->dev_private;
  	struct hns3_hw *hw = &hns->hw;
  

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

* [dpdk-stable] patch 'net/hns3: fix flushing RSS rule' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (76 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: fix flow RSS queue number 0' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: fix configuring device with RSS enabled' " luca.boccassi
                   ` (128 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Lijun Ou; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 2ca208f42094aa32f2cadb31e5d2a6a1ddf041fe Mon Sep 17 00:00:00 2001
From: Lijun Ou <oulijun@huawei.com>
Date: Tue, 22 Sep 2020 20:03:27 +0800
Subject: [PATCH] net/hns3: fix flushing RSS rule

[ upstream commit ec674cb742e5a756b9e4c7623c486220a718c885 ]

When user create a flow without RSS by calling rte_flow_create API and then
destroy it by calling rte_flow_flush API, driver should not clear RSS rule.

A reasonable handling method is that when user creates an RSS rule, the
driver should clear the created RSS rule when flushing destroy all flow
rules. Also, hw->rss_info should save the RSS config of the last success
RSS rule. When create n RSS rules, the RSS should not be disabled before
the last RSS rule destroyed.

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

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 81 ++++++++++++++++++++++++++----------
 drivers/net/hns3/hns3_rss.h  |  1 +
 2 files changed, 59 insertions(+), 23 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 9904918110..a53d5ed2b1 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1456,7 +1456,9 @@ static int
 hns3_config_rss_filter(struct rte_eth_dev *dev,
 		       const struct hns3_rss_conf *conf, bool add)
 {
+	struct hns3_process_private *process_list = dev->process_private;
 	struct hns3_adapter *hns = dev->data->dev_private;
+	struct hns3_rss_conf_ele *rss_filter_ptr;
 	struct hns3_hw *hw = &hns->hw;
 	struct hns3_rss_conf *rss_info;
 	uint64_t flow_types;
@@ -1504,28 +1506,27 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
 
 	rss_info = &hw->rss_info;
 	if (!add) {
-		if (hns3_action_rss_same(&rss_info->conf, &rss_flow_conf)) {
-			ret = hns3_disable_rss(hw);
-			if (ret) {
-				hns3_err(hw, "RSS disable failed(%d)", ret);
-				return ret;
-			}
-
-			if (rss_flow_conf.queue_num) {
-				/*
-				 * Due the content of queue pointer have been
-				 * reset to 0, the rss_info->conf.queue should
-				 * be set NULL.
-				 */
-				rss_info->conf.queue = NULL;
-				rss_info->conf.queue_num = 0;
-			}
-
-			/* set RSS func invalid after flushed */
-			rss_info->conf.func = RTE_ETH_HASH_FUNCTION_MAX;
+		if (!conf->valid)
 			return 0;
+
+		ret = hns3_disable_rss(hw);
+		if (ret) {
+			hns3_err(hw, "RSS disable failed(%d)", ret);
+			return ret;
 		}
-		return -EINVAL;
+
+		if (rss_flow_conf.queue_num) {
+			/*
+			 * Due the content of queue pointer have been reset to
+			 * 0, the rss_info->conf.queue should be set NULL
+			 */
+			rss_info->conf.queue = NULL;
+			rss_info->conf.queue_num = 0;
+		}
+
+		/* set RSS func invalid after flushed */
+		rss_info->conf.func = RTE_ETH_HASH_FUNCTION_MAX;
+		return 0;
 	}
 
 	/* Get rx queues num */
@@ -1556,6 +1557,13 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
 		goto rss_config_err;
 	}
 
+	/*
+	 * When create a new RSS rule, the old rule will be overlaid and set
+	 * invalid.
+	 */
+	TAILQ_FOREACH(rss_filter_ptr, &process_list->filter_rss_list, entries)
+		rss_filter_ptr->filter_info.valid = false;
+
 rss_config_err:
 	rte_spinlock_unlock(&hw->lock);
 
@@ -1566,10 +1574,36 @@ rss_config_err:
 static int
 hns3_clear_rss_filter(struct rte_eth_dev *dev)
 {
+	struct hns3_process_private *process_list = dev->process_private;
 	struct hns3_adapter *hns = dev->data->dev_private;
+	struct hns3_rss_conf_ele *rss_filter_ptr;
 	struct hns3_hw *hw = &hns->hw;
+	int rss_rule_succ_cnt = 0; /* count for success of clearing RSS rules */
+	int rss_rule_fail_cnt = 0; /* count for failure of clearing RSS rules */
+	int ret = 0;
 
-	return hns3_config_rss_filter(dev, &hw->rss_info, false);
+	rss_filter_ptr = TAILQ_FIRST(&process_list->filter_rss_list);
+	while (rss_filter_ptr) {
+		TAILQ_REMOVE(&process_list->filter_rss_list, rss_filter_ptr,
+			     entries);
+		ret = hns3_config_rss_filter(dev, &rss_filter_ptr->filter_info,
+					     false);
+		if (ret)
+			rss_rule_fail_cnt++;
+		else
+			rss_rule_succ_cnt++;
+		rte_free(rss_filter_ptr);
+		rss_filter_ptr = TAILQ_FIRST(&process_list->filter_rss_list);
+	}
+
+	if (rss_rule_fail_cnt) {
+		hns3_err(hw, "fail to delete all RSS filters, success num = %d "
+			     "fail num = %d", rss_rule_succ_cnt,
+			     rss_rule_fail_cnt);
+		ret = -EIO;
+	}
+
+	return ret;
 }
 
 /* Restore the rss filter */
@@ -1720,6 +1754,7 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 		}
 		memcpy(&rss_filter_ptr->filter_info, rss_conf,
 			sizeof(struct hns3_rss_conf));
+		rss_filter_ptr->filter_info.valid = true;
 		TAILQ_INSERT_TAIL(&process_list->filter_rss_list,
 				  rss_filter_ptr, entries);
 
@@ -1785,7 +1820,6 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
 	struct hns3_fdir_rule_ele *fdir_rule_ptr;
 	struct hns3_rss_conf_ele *rss_filter_ptr;
 	struct hns3_flow_mem *flow_node;
-	struct hns3_hw *hw = &hns->hw;
 	enum rte_filter_type filter_type;
 	struct hns3_fdir_rule fdir_rule;
 	int ret;
@@ -1815,7 +1849,8 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
 		break;
 	case RTE_ETH_FILTER_HASH:
 		rss_filter_ptr = (struct hns3_rss_conf_ele *)flow->rule;
-		ret = hns3_config_rss_filter(dev, &hw->rss_info, false);
+		ret = hns3_config_rss_filter(dev, &rss_filter_ptr->filter_info,
+					     false);
 		if (ret)
 			return rte_flow_error_set(error, EIO,
 						  RTE_FLOW_ERROR_TYPE_HANDLE,
diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h
index 8f065af0aa..b49e399901 100644
--- a/drivers/net/hns3/hns3_rss.h
+++ b/drivers/net/hns3/hns3_rss.h
@@ -54,6 +54,7 @@ struct hns3_rss_conf {
 	struct hns3_rss_tuple_cfg rss_tuple_sets;
 	uint8_t rss_indirection_tbl[HNS3_RSS_IND_TBL_SIZE]; /* Shadow table */
 	uint16_t queue[HNS3_RSS_QUEUES_BUFFER_NUM]; /* Queues indices to use */
+	bool valid; /* check if RSS rule is valid */
 };
 
 /* Bit 8 ~Bit 15 */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.226151435 +0000
+++ 0079-net-hns3-fix-flushing-RSS-rule.patch	2020-10-28 10:35:11.588831261 +0000
@@ -1,8 +1,10 @@
-From ec674cb742e5a756b9e4c7623c486220a718c885 Mon Sep 17 00:00:00 2001
+From 2ca208f42094aa32f2cadb31e5d2a6a1ddf041fe Mon Sep 17 00:00:00 2001
 From: Lijun Ou <oulijun@huawei.com>
 Date: Tue, 22 Sep 2020 20:03:27 +0800
 Subject: [PATCH] net/hns3: fix flushing RSS rule
 
+[ upstream commit ec674cb742e5a756b9e4c7623c486220a718c885 ]
+
 When user create a flow without RSS by calling rte_flow_create API and then
 destroy it by calling rte_flow_flush API, driver should not clear RSS rule.
 
@@ -13,7 +15,6 @@
 the last RSS rule destroyed.
 
 Fixes: c37ca66f2b27 ("net/hns3: support RSS")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lijun Ou <oulijun@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -23,10 +24,10 @@
  2 files changed, 59 insertions(+), 23 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
-index 5b5124c196..05cc95e3cf 100644
+index 9904918110..a53d5ed2b1 100644
 --- a/drivers/net/hns3/hns3_flow.c
 +++ b/drivers/net/hns3/hns3_flow.c
-@@ -1560,7 +1560,9 @@ static int
+@@ -1456,7 +1456,9 @@ static int
  hns3_config_rss_filter(struct rte_eth_dev *dev,
  		       const struct hns3_rss_conf *conf, bool add)
  {
@@ -36,7 +37,7 @@
  	struct hns3_hw *hw = &hns->hw;
  	struct hns3_rss_conf *rss_info;
  	uint64_t flow_types;
-@@ -1591,28 +1593,27 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
+@@ -1504,28 +1506,27 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
  
  	rss_info = &hw->rss_info;
  	if (!add) {
@@ -84,7 +85,7 @@
  	}
  
  	/* Get rx queues num */
-@@ -1643,6 +1644,13 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
+@@ -1556,6 +1557,13 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
  		goto rss_config_err;
  	}
  
@@ -98,7 +99,7 @@
  rss_config_err:
  	rte_spinlock_unlock(&hw->lock);
  
-@@ -1653,10 +1661,36 @@ rss_config_err:
+@@ -1566,10 +1574,36 @@ rss_config_err:
  static int
  hns3_clear_rss_filter(struct rte_eth_dev *dev)
  {
@@ -136,7 +137,7 @@
  }
  
  /* Restore the rss filter */
-@@ -1807,6 +1841,7 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -1720,6 +1754,7 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  		}
  		memcpy(&rss_filter_ptr->filter_info, rss_conf,
  			sizeof(struct hns3_rss_conf));
@@ -144,7 +145,7 @@
  		TAILQ_INSERT_TAIL(&process_list->filter_rss_list,
  				  rss_filter_ptr, entries);
  
-@@ -1872,7 +1907,6 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
+@@ -1785,7 +1820,6 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
  	struct hns3_fdir_rule_ele *fdir_rule_ptr;
  	struct hns3_rss_conf_ele *rss_filter_ptr;
  	struct hns3_flow_mem *flow_node;
@@ -152,7 +153,7 @@
  	enum rte_filter_type filter_type;
  	struct hns3_fdir_rule fdir_rule;
  	int ret;
-@@ -1902,7 +1936,8 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
+@@ -1815,7 +1849,8 @@ hns3_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow,
  		break;
  	case RTE_ETH_FILTER_HASH:
  		rss_filter_ptr = (struct hns3_rss_conf_ele *)flow->rule;
@@ -163,17 +164,17 @@
  			return rte_flow_error_set(error, EIO,
  						  RTE_FLOW_ERROR_TYPE_HANDLE,
 diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h
-index 47d3586225..8fa1b301b8 100644
+index 8f065af0aa..b49e399901 100644
 --- a/drivers/net/hns3/hns3_rss.h
 +++ b/drivers/net/hns3/hns3_rss.h
-@@ -47,6 +47,7 @@ struct hns3_rss_conf {
+@@ -54,6 +54,7 @@ struct hns3_rss_conf {
  	struct hns3_rss_tuple_cfg rss_tuple_sets;
  	uint8_t rss_indirection_tbl[HNS3_RSS_IND_TBL_SIZE]; /* Shadow table */
  	uint16_t queue[HNS3_RSS_QUEUES_BUFFER_NUM]; /* Queues indices to use */
 +	bool valid; /* check if RSS rule is valid */
  };
  
- #ifndef ilog2
+ /* Bit 8 ~Bit 15 */
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/hns3: fix configuring device with RSS enabled' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (77 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: fix flushing RSS rule' " luca.boccassi
@ 2020-10-28 10:43 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/hns3: fix storing RSS info when creating flow action' " luca.boccassi
                   ` (127 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:43 UTC (permalink / raw)
  To: Wei Hu (Xavier); +Cc: Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From ff7d808e67614a9c68ffab697fc1490ce387769c Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Tue, 22 Sep 2020 20:03:28 +0800
Subject: [PATCH] net/hns3: fix configuring device with RSS enabled

[ upstream commit fd81968387634571845e879e7b5d64c5cfa8880d ]

Currently, when running the following commands in the CLI of testpmd
application, the driver reports an -EINVAL error when performing the No.3
step.
1) flow create 0 ingress pattern end actions rss key <key> func simple_xor
     types all end / end
2) flow flush 0
3) port config dcb vt off pfc off

The root cause as below:
In the No.2 step, when RSS rules is flushed, we set the the flag
hw->rss_dis_flag with true to indicate RSS id disabled. And in the No.3
step, calling rte_eth_dev_configure API function, the internal function
named hns3_dev_rss_hash_update check hw->rss_dis_flag is true and return
-EINVAL.

When user calls the rte_eth_dev_configure API function with the input
parameter dev_conf->rxmode.mq_mode having ETH_MQ_RX_RSS_FLAG to enable RSS,
driver should set internal flag hw->rss_dis_flag with false to indicate RSS
is enabled in the '.dev_configure' ops implementation function named
hns3_dev_configure and hns3vf_dev_configure.

Fixes: 5e782bc2570c ("net/hns3: fix configuring RSS hash when rules are flushed")

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

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 76f163d129..af43a4473c 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2307,6 +2307,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
 	if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) {
 		conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
 		rss_conf = conf->rx_adv_conf.rss_conf;
+		hw->rss_dis_flag = false;
 		if (rss_conf.rss_key == NULL) {
 			rss_conf.rss_key = rss_cfg->key;
 			rss_conf.rss_key_len = HNS3_RSS_KEY_SIZE;
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 37c7d33f59..87558832b2 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -679,6 +679,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
 	/* When RSS is not configured, redirect the packet queue 0 */
 	if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) {
 		conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
+		hw->rss_dis_flag = false;
 		rss_conf = conf->rx_adv_conf.rss_conf;
 		if (rss_conf.rss_key == NULL) {
 			rss_conf.rss_key = rss_cfg->key;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.256054739 +0000
+++ 0080-net-hns3-fix-configuring-device-with-RSS-enabled.patch	2020-10-28 10:35:11.596831378 +0000
@@ -1,8 +1,10 @@
-From fd81968387634571845e879e7b5d64c5cfa8880d Mon Sep 17 00:00:00 2001
+From ff7d808e67614a9c68ffab697fc1490ce387769c Mon Sep 17 00:00:00 2001
 From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
 Date: Tue, 22 Sep 2020 20:03:28 +0800
 Subject: [PATCH] net/hns3: fix configuring device with RSS enabled
 
+[ upstream commit fd81968387634571845e879e7b5d64c5cfa8880d ]
+
 Currently, when running the following commands in the CLI of testpmd
 application, the driver reports an -EINVAL error when performing the No.3
 step.
@@ -25,7 +27,6 @@
 hns3_dev_configure and hns3vf_dev_configure.
 
 Fixes: 5e782bc2570c ("net/hns3: fix configuring RSS hash when rules are flushed")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lijun Ou <oulijun@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -35,10 +36,10 @@
  2 files changed, 2 insertions(+)
 
 diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
-index 10cfc5d47d..99bcc7a9a4 100644
+index 76f163d129..af43a4473c 100644
 --- a/drivers/net/hns3/hns3_ethdev.c
 +++ b/drivers/net/hns3/hns3_ethdev.c
-@@ -2326,6 +2326,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
+@@ -2307,6 +2307,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
  	if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) {
  		conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
  		rss_conf = conf->rx_adv_conf.rss_conf;
@@ -47,10 +48,10 @@
  			rss_conf.rss_key = rss_cfg->key;
  			rss_conf.rss_key_len = HNS3_RSS_KEY_SIZE;
 diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
-index cb2747b132..4c73441116 100644
+index 37c7d33f59..87558832b2 100644
 --- a/drivers/net/hns3/hns3_ethdev_vf.c
 +++ b/drivers/net/hns3/hns3_ethdev_vf.c
-@@ -783,6 +783,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
+@@ -679,6 +679,7 @@ hns3vf_dev_configure(struct rte_eth_dev *dev)
  	/* When RSS is not configured, redirect the packet queue 0 */
  	if ((uint32_t)mq_mode & ETH_MQ_RX_RSS_FLAG) {
  		conf->rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;

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

* [dpdk-stable] patch 'net/hns3: fix storing RSS info when creating flow action' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (78 preceding siblings ...)
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: fix configuring device with RSS enabled' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'mempool/octeontx: fix aura to pool mapping' " luca.boccassi
                   ` (126 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Wei Hu (Xavier); +Cc: Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From a041d47269e61a15a224ed3ac258a3e75344aafd Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Tue, 22 Sep 2020 20:03:29 +0800
Subject: [PATCH] net/hns3: fix storing RSS info when creating flow action

[ upstream commit 81f04b9c20d802972c1c9e3aa0cd4a491f66eb25 ]

Currently, when calling the rte_flow_query API function to query the RSS
information, the queue related information is not as expected.

The root cause is that when application call the rte_flow_create API
function to create RSS action, the operation of storing the data whose typs
is struct rte_flow_action_rss is incorrect in the '.create' ops
implementation function named hns3_flow_create.

This patch fixes it by replacing memcpy with hns3_rss_conf_copy function to
store the RSS information in the hns3_flow_create.

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

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

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index a53d5ed2b1..4bc6812283 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1752,8 +1752,8 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			ret = -ENOMEM;
 			goto err;
 		}
-		memcpy(&rss_filter_ptr->filter_info, rss_conf,
-			sizeof(struct hns3_rss_conf));
+		hns3_rss_conf_copy(&rss_filter_ptr->filter_info,
+				   &rss_conf->conf);
 		rss_filter_ptr->filter_info.valid = true;
 		TAILQ_INSERT_TAIL(&process_list->filter_rss_list,
 				  rss_filter_ptr, entries);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.289580247 +0000
+++ 0081-net-hns3-fix-storing-RSS-info-when-creating-flow-act.patch	2020-10-28 10:35:11.596831378 +0000
@@ -1,8 +1,10 @@
-From 81f04b9c20d802972c1c9e3aa0cd4a491f66eb25 Mon Sep 17 00:00:00 2001
+From a041d47269e61a15a224ed3ac258a3e75344aafd Mon Sep 17 00:00:00 2001
 From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
 Date: Tue, 22 Sep 2020 20:03:29 +0800
 Subject: [PATCH] net/hns3: fix storing RSS info when creating flow action
 
+[ upstream commit 81f04b9c20d802972c1c9e3aa0cd4a491f66eb25 ]
+
 Currently, when calling the rte_flow_query API function to query the RSS
 information, the queue related information is not as expected.
 
@@ -15,7 +17,6 @@
 store the RSS information in the hns3_flow_create.
 
 Fixes: c37ca66f2b27 ("net/hns3: support RSS")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lijun Ou <oulijun@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -24,10 +25,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
-index 05cc95e3cf..2cdfb6872b 100644
+index a53d5ed2b1..4bc6812283 100644
 --- a/drivers/net/hns3/hns3_flow.c
 +++ b/drivers/net/hns3/hns3_flow.c
-@@ -1839,8 +1839,8 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -1752,8 +1752,8 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
  			ret = -ENOMEM;
  			goto err;
  		}

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

* [dpdk-stable] patch 'mempool/octeontx: fix aura to pool mapping' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (79 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/hns3: fix storing RSS info when creating flow action' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/octeontx2: fix multi segment mode for jumbo packets' " luca.boccassi
                   ` (125 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 655f346a13320cfce7054b944f3a3efcea0c6c96 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Wed, 29 Jul 2020 00:13:45 +0530
Subject: [PATCH] mempool/octeontx: fix aura to pool mapping

[ upstream commit e1712291b1fe834612403a086bbe6078e96748fb ]

When sending commands to Kernel FPA PF driver, it expects the
aura to be in the range of 0 to 16 for a given FPA pool.
In OCTEON TX we map a pool,aura pair as single mempool handle,
always set the aura id to 0 for a given FPA pool.

Fixes: 179c7e893f64 ("mempool/octeontx: fix pool to aura mapping")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/mempool/octeontx/octeontx_fpavf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c
index 63f8fb3b50..e37b844842 100644
--- a/drivers/mempool/octeontx/octeontx_fpavf.c
+++ b/drivers/mempool/octeontx/octeontx_fpavf.c
@@ -267,7 +267,7 @@ octeontx_fpapf_pool_setup(unsigned int gpool, unsigned int buf_size,
 		POOL_LTYPE(0x2) | POOL_STYPE(0) | POOL_SET_NAT_ALIGN |
 		POOL_ENA;
 
-	cfg.aid = FPA_AURA_IDX(gpool);
+	cfg.aid = 0;
 	cfg.pool_cfg = reg;
 	cfg.pool_stack_base = phys_addr;
 	cfg.pool_stack_end = phys_addr + memsz;
@@ -353,7 +353,7 @@ octeontx_fpapf_aura_attach(unsigned int gpool_index)
 	hdr.vfid = gpool_index;
 	hdr.res_code = 0;
 	memset(&cfg, 0x0, sizeof(struct octeontx_mbox_fpa_cfg));
-	cfg.aid = FPA_AURA_IDX(gpool_index);
+	cfg.aid = 0;
 
 	ret = octeontx_mbox_send(&hdr, &cfg,
 					sizeof(struct octeontx_mbox_fpa_cfg),
@@ -382,7 +382,7 @@ octeontx_fpapf_aura_detach(unsigned int gpool_index)
 		goto err;
 	}
 
-	cfg.aid = FPA_AURA_IDX(gpool_index);
+	cfg.aid = 0;
 	hdr.coproc = FPA_COPROC;
 	hdr.msg = FPA_DETACHAURA;
 	hdr.vfid = gpool_index;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.320245699 +0000
+++ 0082-mempool-octeontx-fix-aura-to-pool-mapping.patch	2020-10-28 10:35:11.596831378 +0000
@@ -1,15 +1,16 @@
-From e1712291b1fe834612403a086bbe6078e96748fb Mon Sep 17 00:00:00 2001
+From 655f346a13320cfce7054b944f3a3efcea0c6c96 Mon Sep 17 00:00:00 2001
 From: Pavan Nikhilesh <pbhagavatula@marvell.com>
 Date: Wed, 29 Jul 2020 00:13:45 +0530
 Subject: [PATCH] mempool/octeontx: fix aura to pool mapping
 
+[ upstream commit e1712291b1fe834612403a086bbe6078e96748fb ]
+
 When sending commands to Kernel FPA PF driver, it expects the
 aura to be in the range of 0 to 16 for a given FPA pool.
 In OCTEON TX we map a pool,aura pair as single mempool handle,
 always set the aura id to 0 for a given FPA pool.
 
 Fixes: 179c7e893f64 ("mempool/octeontx: fix pool to aura mapping")
-Cc: stable@dpdk.org
 
 Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
 Acked-by: Jerin Jacob <jerinj@marvell.com>
@@ -18,10 +19,10 @@
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c
-index 339da7824f..94dc5cd815 100644
+index 63f8fb3b50..e37b844842 100644
 --- a/drivers/mempool/octeontx/octeontx_fpavf.c
 +++ b/drivers/mempool/octeontx/octeontx_fpavf.c
-@@ -259,7 +259,7 @@ octeontx_fpapf_pool_setup(unsigned int gpool, unsigned int buf_size,
+@@ -267,7 +267,7 @@ octeontx_fpapf_pool_setup(unsigned int gpool, unsigned int buf_size,
  		POOL_LTYPE(0x2) | POOL_STYPE(0) | POOL_SET_NAT_ALIGN |
  		POOL_ENA;
  
@@ -30,7 +31,7 @@
  	cfg.pool_cfg = reg;
  	cfg.pool_stack_base = phys_addr;
  	cfg.pool_stack_end = phys_addr + memsz;
-@@ -345,7 +345,7 @@ octeontx_fpapf_aura_attach(unsigned int gpool_index)
+@@ -353,7 +353,7 @@ octeontx_fpapf_aura_attach(unsigned int gpool_index)
  	hdr.vfid = gpool_index;
  	hdr.res_code = 0;
  	memset(&cfg, 0x0, sizeof(struct octeontx_mbox_fpa_cfg));
@@ -39,7 +40,7 @@
  
  	ret = octeontx_mbox_send(&hdr, &cfg,
  					sizeof(struct octeontx_mbox_fpa_cfg),
-@@ -374,7 +374,7 @@ octeontx_fpapf_aura_detach(unsigned int gpool_index)
+@@ -382,7 +382,7 @@ octeontx_fpapf_aura_detach(unsigned int gpool_index)
  		goto err;
  	}
  

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

* [dpdk-stable] patch 'net/octeontx2: fix multi segment mode for jumbo packets' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (80 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'mempool/octeontx: fix aura to pool mapping' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/fm10k: fix memory leak when thresh check fails' " luca.boccassi
                   ` (124 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Harman Kalra; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 4894d13ada8b411bdc787f6469b9a34907e2da94 Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Mon, 10 Aug 2020 16:25:45 +0530
Subject: [PATCH] net/octeontx2: fix multi segment mode for jumbo packets

[ upstream commit 27e27ec62999fa91b2a4865d6909ccbb5118eb26 ]

Scatter gather mode should get enabled:
 - If mbuf size is less than max received packet length.
 - MTU is reconfigured greater than mbuf size.

Fixes: 0e2efd02db58 ("net/octeontx2: add MTU set operation")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/net/octeontx2/otx2_ethdev.c     | 30 +++++++++++++++++++++++++
 drivers/net/octeontx2/otx2_ethdev.h     |  2 ++
 drivers/net/octeontx2/otx2_ethdev_ops.c |  9 +-------
 3 files changed, 33 insertions(+), 8 deletions(-)

diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index 102d06b39b..41930c5df0 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -568,6 +568,9 @@ otx2_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t rq,
 		}
 	}
 
+	/* Setup scatter mode if needed by jumbo */
+	otx2_nix_enable_mseg_on_jumbo(rxq);
+
 	return 0;
 
 free_rxq:
@@ -695,6 +698,33 @@ nix_tx_offload_flags(struct rte_eth_dev *eth_dev)
 	return flags;
 }
 
+void
+otx2_nix_enable_mseg_on_jumbo(struct otx2_eth_rxq *rxq)
+{
+	struct rte_pktmbuf_pool_private *mbp_priv;
+	struct rte_eth_dev *eth_dev;
+	struct otx2_eth_dev *dev;
+	uint32_t buffsz;
+
+	eth_dev = rxq->eth_dev;
+	dev = otx2_eth_pmd_priv(eth_dev);
+
+	/* Get rx buffer size */
+	mbp_priv = rte_mempool_get_priv(rxq->pool);
+	buffsz = mbp_priv->mbuf_data_room_size - RTE_PKTMBUF_HEADROOM;
+
+	if (eth_dev->data->dev_conf.rxmode.max_rx_pkt_len > buffsz) {
+		dev->rx_offloads |= DEV_RX_OFFLOAD_SCATTER;
+		dev->tx_offloads |= DEV_TX_OFFLOAD_MULTI_SEGS;
+
+		/* Setting up the rx[tx]_offload_flags due to change
+		 * in rx[tx]_offloads.
+		 */
+		dev->rx_offload_flags |= nix_rx_offload_flags(eth_dev);
+		dev->tx_offload_flags |= nix_tx_offload_flags(eth_dev);
+	}
+}
+
 static int
 nix_sq_init(struct otx2_eth_txq *txq)
 {
diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index 0aadaecf72..48148ede4c 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -424,6 +424,8 @@ int otx2_nix_set_mc_addr_list(struct rte_eth_dev *eth_dev,
 /* MTU */
 int otx2_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu);
 int otx2_nix_recalc_mtu(struct rte_eth_dev *eth_dev);
+void otx2_nix_enable_mseg_on_jumbo(struct otx2_eth_rxq *rxq);
+
 
 /* Link */
 void otx2_nix_toggle_flag_link_cfg(struct otx2_eth_dev *dev, bool set);
diff --git a/drivers/net/octeontx2/otx2_ethdev_ops.c b/drivers/net/octeontx2/otx2_ethdev_ops.c
index 93ef04803d..24a0d3f01d 100644
--- a/drivers/net/octeontx2/otx2_ethdev_ops.c
+++ b/drivers/net/octeontx2/otx2_ethdev_ops.c
@@ -72,22 +72,15 @@ otx2_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
 int
 otx2_nix_recalc_mtu(struct rte_eth_dev *eth_dev)
 {
-	struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
 	struct rte_eth_dev_data *data = eth_dev->data;
-	struct rte_pktmbuf_pool_private *mbp_priv;
 	struct otx2_eth_rxq *rxq;
-	uint32_t buffsz;
 	uint16_t mtu;
 	int rc;
 
-	/* Get rx buffer size */
 	rxq = data->rx_queues[0];
-	mbp_priv = rte_mempool_get_priv(rxq->pool);
-	buffsz = mbp_priv->mbuf_data_room_size - RTE_PKTMBUF_HEADROOM;
 
 	/* Setup scatter mode if needed by jumbo */
-	if (data->dev_conf.rxmode.max_rx_pkt_len > buffsz)
-		dev->rx_offloads |= DEV_RX_OFFLOAD_SCATTER;
+	otx2_nix_enable_mseg_on_jumbo(rxq);
 
 	/* Setup MTU based on max_rx_pkt_len */
 	mtu = data->dev_conf.rxmode.max_rx_pkt_len - NIX_L2_OVERHEAD;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.347981103 +0000
+++ 0083-net-octeontx2-fix-multi-segment-mode-for-jumbo-packe.patch	2020-10-28 10:35:11.600831437 +0000
@@ -1,14 +1,15 @@
-From 27e27ec62999fa91b2a4865d6909ccbb5118eb26 Mon Sep 17 00:00:00 2001
+From 4894d13ada8b411bdc787f6469b9a34907e2da94 Mon Sep 17 00:00:00 2001
 From: Harman Kalra <hkalra@marvell.com>
 Date: Mon, 10 Aug 2020 16:25:45 +0530
 Subject: [PATCH] net/octeontx2: fix multi segment mode for jumbo packets
 
+[ upstream commit 27e27ec62999fa91b2a4865d6909ccbb5118eb26 ]
+
 Scatter gather mode should get enabled:
  - If mbuf size is less than max received packet length.
  - MTU is reconfigured greater than mbuf size.
 
 Fixes: 0e2efd02db58 ("net/octeontx2: add MTU set operation")
-Cc: stable@dpdk.org
 
 Signed-off-by: Harman Kalra <hkalra@marvell.com>
 Acked-by: Jerin Jacob <jerinj@marvell.com>
@@ -19,10 +20,10 @@
  3 files changed, 33 insertions(+), 8 deletions(-)
 
 diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
-index c06e32f26b..3ad50d7cfe 100644
+index 102d06b39b..41930c5df0 100644
 --- a/drivers/net/octeontx2/otx2_ethdev.c
 +++ b/drivers/net/octeontx2/otx2_ethdev.c
-@@ -657,6 +657,9 @@ otx2_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t rq,
+@@ -568,6 +568,9 @@ otx2_nix_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t rq,
  		}
  	}
  
@@ -32,8 +33,8 @@
  	return 0;
  
  free_rxq:
-@@ -878,6 +881,33 @@ nix_sqb_unlock(struct rte_mempool *mp)
- 	return 0;
+@@ -695,6 +698,33 @@ nix_tx_offload_flags(struct rte_eth_dev *eth_dev)
+ 	return flags;
  }
  
 +void
@@ -67,10 +68,10 @@
  nix_sq_init(struct otx2_eth_txq *txq)
  {
 diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
-index a114112391..8e6e70d452 100644
+index 0aadaecf72..48148ede4c 100644
 --- a/drivers/net/octeontx2/otx2_ethdev.h
 +++ b/drivers/net/octeontx2/otx2_ethdev.h
-@@ -437,6 +437,8 @@ int otx2_nix_set_mc_addr_list(struct rte_eth_dev *eth_dev,
+@@ -424,6 +424,8 @@ int otx2_nix_set_mc_addr_list(struct rte_eth_dev *eth_dev,
  /* MTU */
  int otx2_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu);
  int otx2_nix_recalc_mtu(struct rte_eth_dev *eth_dev);
@@ -80,7 +81,7 @@
  /* Link */
  void otx2_nix_toggle_flag_link_cfg(struct otx2_eth_dev *dev, bool set);
 diff --git a/drivers/net/octeontx2/otx2_ethdev_ops.c b/drivers/net/octeontx2/otx2_ethdev_ops.c
-index faecf216c1..b36d37b9f7 100644
+index 93ef04803d..24a0d3f01d 100644
 --- a/drivers/net/octeontx2/otx2_ethdev_ops.c
 +++ b/drivers/net/octeontx2/otx2_ethdev_ops.c
 @@ -72,22 +72,15 @@ otx2_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)

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

* [dpdk-stable] patch 'net/fm10k: fix memory leak when thresh check fails' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (81 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/octeontx2: fix multi segment mode for jumbo packets' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'app/testpmd: fix port id check in Tx VLAN command' " luca.boccassi
                   ` (123 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 3b77cd741f5dfd61738cafa0dabf8adf5586270e Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Mon, 28 Sep 2020 20:44:42 +0800
Subject: [PATCH] net/fm10k: fix memory leak when thresh check fails

[ upstream commit c87a6de2a130c436fcf73b27f829c48e8249bcc4 ]

In fm10k_rx_queue_setup(), we allocate memory for the queue
structure but not released when thresh check fails.

Fixes: 6cfe8969c969 ("fm10k: add Rx queue setup/release")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/fm10k/fm10k_ethdev.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index a65865c683..5ce59be7d5 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -1854,9 +1854,10 @@ fm10k_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id,
 	q->tail_ptr = (volatile uint32_t *)
 		&((uint32_t *)hw->hw_addr)[FM10K_RDT(queue_id)];
 	q->offloads = offloads;
-	if (handle_rxconf(q, conf))
+	if (handle_rxconf(q, conf)) {
+		rte_free(q);
 		return -EINVAL;
-
+	}
 	/* allocate memory for the software ring */
 	q->sw_ring = rte_zmalloc_socket("fm10k sw ring",
 			(nb_desc + q->nb_fake_desc) * sizeof(struct rte_mbuf *),
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.378618201 +0000
+++ 0084-net-fm10k-fix-memory-leak-when-thresh-check-fails.patch	2020-10-28 10:35:11.604831496 +0000
@@ -1,13 +1,14 @@
-From c87a6de2a130c436fcf73b27f829c48e8249bcc4 Mon Sep 17 00:00:00 2001
+From 3b77cd741f5dfd61738cafa0dabf8adf5586270e Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Mon, 28 Sep 2020 20:44:42 +0800
 Subject: [PATCH] net/fm10k: fix memory leak when thresh check fails
 
+[ upstream commit c87a6de2a130c436fcf73b27f829c48e8249bcc4 ]
+
 In fm10k_rx_queue_setup(), we allocate memory for the queue
 structure but not released when thresh check fails.
 
 Fixes: 6cfe8969c969 ("fm10k: add Rx queue setup/release")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -16,10 +17,10 @@
  1 file changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
-index 5771d83b55..98e396b8e7 100644
+index a65865c683..5ce59be7d5 100644
 --- a/drivers/net/fm10k/fm10k_ethdev.c
 +++ b/drivers/net/fm10k/fm10k_ethdev.c
-@@ -1841,9 +1841,10 @@ fm10k_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id,
+@@ -1854,9 +1854,10 @@ fm10k_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id,
  	q->tail_ptr = (volatile uint32_t *)
  		&((uint32_t *)hw->hw_addr)[FM10K_RDT(queue_id)];
  	q->offloads = offloads;

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

* [dpdk-stable] patch 'app/testpmd: fix port id check in Tx VLAN command' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (82 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/fm10k: fix memory leak when thresh check fails' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'app/testpmd: fix VLAN configuration on failure' " luca.boccassi
                   ` (122 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Wei Hu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From ca5779171268ff3d969e2df74252bf69090652a4 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Fri, 25 Sep 2020 20:47:14 +0800
Subject: [PATCH] app/testpmd: fix port id check in Tx VLAN command

[ upstream commit b428e71775e43acc7b074c82b0d9e08f401dde6b ]

To set Tx vlan offloads, it is required to stop port firstly. But before
checking whether the port is stopped, the port id entered by the user
is not checked for validity. When the port id is illegal, it would lead
to a segmentation fault since it attempts to access a member of
non-existent port.

This patch adds verification of port id in tx vlan offloads and remove
duplicated check.

Fixes: 597f9fafe13b ("app/testpmd: convert to new Tx offloads API")

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

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 2d18b6caf2..f522b599b7 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -4168,6 +4168,9 @@ cmd_tx_vlan_set_parsed(void *parsed_result,
 {
 	struct cmd_tx_vlan_set_result *res = parsed_result;
 
+	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
+		return;
+
 	if (!port_is_stopped(res->port_id)) {
 		printf("Please stop port %d first\n", res->port_id);
 		return;
@@ -4222,6 +4225,9 @@ cmd_tx_vlan_set_qinq_parsed(void *parsed_result,
 {
 	struct cmd_tx_vlan_set_qinq_result *res = parsed_result;
 
+	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
+		return;
+
 	if (!port_is_stopped(res->port_id)) {
 		printf("Please stop port %d first\n", res->port_id);
 		return;
@@ -4335,6 +4341,9 @@ cmd_tx_vlan_reset_parsed(void *parsed_result,
 {
 	struct cmd_tx_vlan_reset_result *res = parsed_result;
 
+	if (port_id_is_invalid(res->port_id, ENABLED_WARN))
+		return;
+
 	if (!port_is_stopped(res->port_id)) {
 		printf("Please stop port %d first\n", res->port_id);
 		return;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 726a263421..01c984d025 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3235,8 +3235,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
 	struct rte_eth_dev_info dev_info;
 	int ret;
 
-	if (port_id_is_invalid(port_id, ENABLED_WARN))
-		return;
 	if (vlan_id_is_invalid(vlan_id))
 		return;
 
@@ -3267,8 +3265,6 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 	struct rte_eth_dev_info dev_info;
 	int ret;
 
-	if (port_id_is_invalid(port_id, ENABLED_WARN))
-		return;
 	if (vlan_id_is_invalid(vlan_id))
 		return;
 	if (vlan_id_is_invalid(vlan_id_outer))
@@ -3294,8 +3290,6 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
 void
 tx_vlan_reset(portid_t port_id)
 {
-	if (port_id_is_invalid(port_id, ENABLED_WARN))
-		return;
 	ports[port_id].dev_conf.txmode.offloads &=
 				~(DEV_TX_OFFLOAD_VLAN_INSERT |
 				  DEV_TX_OFFLOAD_QINQ_INSERT);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.408825386 +0000
+++ 0085-app-testpmd-fix-port-id-check-in-Tx-VLAN-command.patch	2020-10-28 10:35:11.620831731 +0000
@@ -1,8 +1,10 @@
-From b428e71775e43acc7b074c82b0d9e08f401dde6b Mon Sep 17 00:00:00 2001
+From ca5779171268ff3d969e2df74252bf69090652a4 Mon Sep 17 00:00:00 2001
 From: Chengchang Tang <tangchengchang@huawei.com>
 Date: Fri, 25 Sep 2020 20:47:14 +0800
 Subject: [PATCH] app/testpmd: fix port id check in Tx VLAN command
 
+[ upstream commit b428e71775e43acc7b074c82b0d9e08f401dde6b ]
+
 To set Tx vlan offloads, it is required to stop port firstly. But before
 checking whether the port is stopped, the port id entered by the user
 is not checked for validity. When the port id is illegal, it would lead
@@ -13,7 +15,6 @@
 duplicated check.
 
 Fixes: 597f9fafe13b ("app/testpmd: convert to new Tx offloads API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -24,10 +25,10 @@
  2 files changed, 9 insertions(+), 6 deletions(-)
 
 diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
-index 08e123fe69..524c75b267 100644
+index 2d18b6caf2..f522b599b7 100644
 --- a/app/test-pmd/cmdline.c
 +++ b/app/test-pmd/cmdline.c
-@@ -4294,6 +4294,9 @@ cmd_tx_vlan_set_parsed(void *parsed_result,
+@@ -4168,6 +4168,9 @@ cmd_tx_vlan_set_parsed(void *parsed_result,
  {
  	struct cmd_tx_vlan_set_result *res = parsed_result;
  
@@ -37,7 +38,7 @@
  	if (!port_is_stopped(res->port_id)) {
  		printf("Please stop port %d first\n", res->port_id);
  		return;
-@@ -4348,6 +4351,9 @@ cmd_tx_vlan_set_qinq_parsed(void *parsed_result,
+@@ -4222,6 +4225,9 @@ cmd_tx_vlan_set_qinq_parsed(void *parsed_result,
  {
  	struct cmd_tx_vlan_set_qinq_result *res = parsed_result;
  
@@ -47,7 +48,7 @@
  	if (!port_is_stopped(res->port_id)) {
  		printf("Please stop port %d first\n", res->port_id);
  		return;
-@@ -4461,6 +4467,9 @@ cmd_tx_vlan_reset_parsed(void *parsed_result,
+@@ -4335,6 +4341,9 @@ cmd_tx_vlan_reset_parsed(void *parsed_result,
  {
  	struct cmd_tx_vlan_reset_result *res = parsed_result;
  
@@ -58,10 +59,10 @@
  		printf("Please stop port %d first\n", res->port_id);
  		return;
 diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
-index 17a6efed24..03bf26bc94 100644
+index 726a263421..01c984d025 100644
 --- a/app/test-pmd/config.c
 +++ b/app/test-pmd/config.c
-@@ -3664,8 +3664,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
+@@ -3235,8 +3235,6 @@ tx_vlan_set(portid_t port_id, uint16_t vlan_id)
  	struct rte_eth_dev_info dev_info;
  	int ret;
  
@@ -70,7 +71,7 @@
  	if (vlan_id_is_invalid(vlan_id))
  		return;
  
-@@ -3696,8 +3694,6 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
+@@ -3267,8 +3265,6 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
  	struct rte_eth_dev_info dev_info;
  	int ret;
  
@@ -79,7 +80,7 @@
  	if (vlan_id_is_invalid(vlan_id))
  		return;
  	if (vlan_id_is_invalid(vlan_id_outer))
-@@ -3723,8 +3719,6 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
+@@ -3294,8 +3290,6 @@ tx_qinq_set(portid_t port_id, uint16_t vlan_id, uint16_t vlan_id_outer)
  void
  tx_vlan_reset(portid_t port_id)
  {

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

* [dpdk-stable] patch 'app/testpmd: fix VLAN configuration on failure' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (83 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'app/testpmd: fix port id check in Tx VLAN command' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'app/testpmd: remove restriction on Tx segments set' " luca.boccassi
                   ` (121 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Wei Hu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From b0be1fb74d1114f9debcd1c1796faba238c45e96 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Fri, 25 Sep 2020 20:47:15 +0800
Subject: [PATCH] app/testpmd: fix VLAN configuration on failure

[ upstream commit 57d4198a0b50f93d921b4b3d30cbdea7f4131db5 ]

When failing to configure VLAN offloads after the port was started, there
is no need to update the port configuration. Currently, when user
configure an unsupported VLAN offloads and fails, and then restart the
port, it will fails since the configuration has been refreshed.

This patch makes the function return directly instead of refreshing the
configuration when execution fails.

Fixes: 384161e00627 ("app/testpmd: adjust on the fly VLAN configuration")

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

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 01c984d025..139475bd6d 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3080,9 +3080,11 @@ vlan_extend_set(portid_t port_id, int on)
 	}
 
 	diag = rte_eth_dev_set_vlan_offload(port_id, vlan_offload);
-	if (diag < 0)
+	if (diag < 0) {
 		printf("rx_vlan_extend_set(port_pi=%d, on=%d) failed "
 	       "diag=%d\n", port_id, on, diag);
+		return;
+	}
 	ports[port_id].dev_conf.rxmode.offloads = port_rx_offloads;
 }
 
@@ -3107,9 +3109,11 @@ rx_vlan_strip_set(portid_t port_id, int on)
 	}
 
 	diag = rte_eth_dev_set_vlan_offload(port_id, vlan_offload);
-	if (diag < 0)
+	if (diag < 0) {
 		printf("rx_vlan_strip_set(port_pi=%d, on=%d) failed "
 	       "diag=%d\n", port_id, on, diag);
+		return;
+	}
 	ports[port_id].dev_conf.rxmode.offloads = port_rx_offloads;
 }
 
@@ -3148,9 +3152,11 @@ rx_vlan_filter_set(portid_t port_id, int on)
 	}
 
 	diag = rte_eth_dev_set_vlan_offload(port_id, vlan_offload);
-	if (diag < 0)
+	if (diag < 0) {
 		printf("rx_vlan_filter_set(port_pi=%d, on=%d) failed "
 	       "diag=%d\n", port_id, on, diag);
+		return;
+	}
 	ports[port_id].dev_conf.rxmode.offloads = port_rx_offloads;
 }
 
@@ -3175,9 +3181,11 @@ rx_vlan_qinq_strip_set(portid_t port_id, int on)
 	}
 
 	diag = rte_eth_dev_set_vlan_offload(port_id, vlan_offload);
-	if (diag < 0)
+	if (diag < 0) {
 		printf("%s(port_pi=%d, on=%d) failed "
 	       "diag=%d\n", __func__, port_id, on, diag);
+		return;
+	}
 	ports[port_id].dev_conf.rxmode.offloads = port_rx_offloads;
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.454441032 +0000
+++ 0086-app-testpmd-fix-VLAN-configuration-on-failure.patch	2020-10-28 10:35:11.624831790 +0000
@@ -1,8 +1,10 @@
-From 57d4198a0b50f93d921b4b3d30cbdea7f4131db5 Mon Sep 17 00:00:00 2001
+From b0be1fb74d1114f9debcd1c1796faba238c45e96 Mon Sep 17 00:00:00 2001
 From: Chengchang Tang <tangchengchang@huawei.com>
 Date: Fri, 25 Sep 2020 20:47:15 +0800
 Subject: [PATCH] app/testpmd: fix VLAN configuration on failure
 
+[ upstream commit 57d4198a0b50f93d921b4b3d30cbdea7f4131db5 ]
+
 When failing to configure VLAN offloads after the port was started, there
 is no need to update the port configuration. Currently, when user
 configure an unsupported VLAN offloads and fails, and then restart the
@@ -12,7 +14,6 @@
 configuration when execution fails.
 
 Fixes: 384161e00627 ("app/testpmd: adjust on the fly VLAN configuration")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -22,10 +23,10 @@
  1 file changed, 12 insertions(+), 4 deletions(-)
 
 diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
-index 03bf26bc94..0bec547f51 100644
+index 01c984d025..139475bd6d 100644
 --- a/app/test-pmd/config.c
 +++ b/app/test-pmd/config.c
-@@ -3509,9 +3509,11 @@ vlan_extend_set(portid_t port_id, int on)
+@@ -3080,9 +3080,11 @@ vlan_extend_set(portid_t port_id, int on)
  	}
  
  	diag = rte_eth_dev_set_vlan_offload(port_id, vlan_offload);
@@ -38,7 +39,7 @@
  	ports[port_id].dev_conf.rxmode.offloads = port_rx_offloads;
  }
  
-@@ -3536,9 +3538,11 @@ rx_vlan_strip_set(portid_t port_id, int on)
+@@ -3107,9 +3109,11 @@ rx_vlan_strip_set(portid_t port_id, int on)
  	}
  
  	diag = rte_eth_dev_set_vlan_offload(port_id, vlan_offload);
@@ -51,7 +52,7 @@
  	ports[port_id].dev_conf.rxmode.offloads = port_rx_offloads;
  }
  
-@@ -3577,9 +3581,11 @@ rx_vlan_filter_set(portid_t port_id, int on)
+@@ -3148,9 +3152,11 @@ rx_vlan_filter_set(portid_t port_id, int on)
  	}
  
  	diag = rte_eth_dev_set_vlan_offload(port_id, vlan_offload);
@@ -64,7 +65,7 @@
  	ports[port_id].dev_conf.rxmode.offloads = port_rx_offloads;
  }
  
-@@ -3604,9 +3610,11 @@ rx_vlan_qinq_strip_set(portid_t port_id, int on)
+@@ -3175,9 +3181,11 @@ rx_vlan_qinq_strip_set(portid_t port_id, int on)
  	}
  
  	diag = rte_eth_dev_set_vlan_offload(port_id, vlan_offload);

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

* [dpdk-stable] patch 'app/testpmd: remove restriction on Tx segments set' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (84 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'app/testpmd: fix VLAN configuration on failure' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'app/testpmd: fix packet header in txonly mode' " luca.boccassi
                   ` (120 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Wei Hu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 592a24a376f091be4d49a92ac25e634154fc4db1 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Fri, 25 Sep 2020 20:47:16 +0800
Subject: [PATCH] app/testpmd: remove restriction on Tx segments set

[ upstream commit 8dae835d88b745dee761771513095525adb9ed74 ]

Currently, if nb_txd is not set, the txpkts is not allowed to be set
because the nb_txd is used to avoid the number of segments exceed the Tx
ring size and the default value of nb_txd is 0. And there is a bug that
nb_txd is the global configuration for Tx ring size and the ring size
could be changed by some command per queue. So these valid check is
unreliable and introduced unnecessary constraints.

This patch adds a valid check function to use the real Tx ring size to
check the validity of txpkts.

Fixes: af75078fece3 ("first public release")

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

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 139475bd6d..67bc18de91 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1684,6 +1684,38 @@ tx_queue_id_is_invalid(queueid_t txq_id)
 	return 1;
 }
 
+static int
+get_tx_ring_size(portid_t port_id, queueid_t txq_id, uint16_t *ring_size)
+{
+	struct rte_port *port = &ports[port_id];
+	struct rte_eth_txq_info tx_qinfo;
+	int ret;
+
+	ret = rte_eth_tx_queue_info_get(port_id, txq_id, &tx_qinfo);
+	if (ret == 0) {
+		*ring_size = tx_qinfo.nb_desc;
+		return ret;
+	}
+
+	if (ret != -ENOTSUP)
+		return ret;
+	/*
+	 * If the rte_eth_tx_queue_info_get is not support for this PMD,
+	 * ring_size stored in testpmd will be used for validity verification.
+	 * When configure the txq by rte_eth_tx_queue_setup with nb_tx_desc
+	 * being 0, it will use a default value provided by PMDs to setup this
+	 * txq. If the default value is 0, it will use the
+	 * RTE_ETH_DEV_FALLBACK_TX_RINGSIZE to setup this txq.
+	 */
+	if (port->nb_tx_desc[txq_id])
+		*ring_size = port->nb_tx_desc[txq_id];
+	else if (port->dev_info.default_txportconf.ring_size)
+		*ring_size = port->dev_info.default_txportconf.ring_size;
+	else
+		*ring_size = RTE_ETH_DEV_FALLBACK_TX_RINGSIZE;
+	return 0;
+}
+
 static int
 rx_desc_id_is_invalid(uint16_t rxdesc_id)
 {
@@ -2726,17 +2758,41 @@ show_tx_pkt_segments(void)
 	printf("Split packet: %s\n", split);
 }
 
+static bool
+nb_segs_is_invalid(unsigned int nb_segs)
+{
+	uint16_t ring_size;
+	uint16_t queue_id;
+	uint16_t port_id;
+	int ret;
+
+	RTE_ETH_FOREACH_DEV(port_id) {
+		for (queue_id = 0; queue_id < nb_txq; queue_id++) {
+			ret = get_tx_ring_size(port_id, queue_id, &ring_size);
+
+			if (ret)
+				return true;
+
+			if (ring_size < nb_segs) {
+				printf("nb segments per TX packets=%u >= "
+				       "TX queue(%u) ring_size=%u - ignored\n",
+				       nb_segs, queue_id, ring_size);
+				return true;
+			}
+		}
+	}
+
+	return false;
+}
+
 void
 set_tx_pkt_segments(unsigned *seg_lengths, unsigned nb_segs)
 {
 	uint16_t tx_pkt_len;
 	unsigned i;
 
-	if (nb_segs >= (unsigned) nb_txd) {
-		printf("nb segments per TX packets=%u >= nb_txd=%u - ignored\n",
-		       nb_segs, (unsigned int) nb_txd);
+	if (nb_segs_is_invalid(nb_segs))
 		return;
-	}
 
 	/*
 	 * Check that each segment length is greater or equal than
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.485447177 +0000
+++ 0087-app-testpmd-remove-restriction-on-Tx-segments-set.patch	2020-10-28 10:35:11.628831849 +0000
@@ -1,8 +1,10 @@
-From 8dae835d88b745dee761771513095525adb9ed74 Mon Sep 17 00:00:00 2001
+From 592a24a376f091be4d49a92ac25e634154fc4db1 Mon Sep 17 00:00:00 2001
 From: Chengchang Tang <tangchengchang@huawei.com>
 Date: Fri, 25 Sep 2020 20:47:16 +0800
 Subject: [PATCH] app/testpmd: remove restriction on Tx segments set
 
+[ upstream commit 8dae835d88b745dee761771513095525adb9ed74 ]
+
 Currently, if nb_txd is not set, the txpkts is not allowed to be set
 because the nb_txd is used to avoid the number of segments exceed the Tx
 ring size and the default value of nb_txd is 0. And there is a bug that
@@ -14,7 +16,6 @@
 check the validity of txpkts.
 
 Fixes: af75078fece3 ("first public release")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -24,10 +25,10 @@
  1 file changed, 60 insertions(+), 4 deletions(-)
 
 diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
-index 0bec547f51..8f63b4ea40 100644
+index 139475bd6d..67bc18de91 100644
 --- a/app/test-pmd/config.c
 +++ b/app/test-pmd/config.c
-@@ -2009,6 +2009,38 @@ tx_queue_id_is_invalid(queueid_t txq_id)
+@@ -1684,6 +1684,38 @@ tx_queue_id_is_invalid(queueid_t txq_id)
  	return 1;
  }
  
@@ -66,7 +67,7 @@
  static int
  rx_desc_id_is_invalid(uint16_t rxdesc_id)
  {
-@@ -3103,17 +3135,41 @@ show_tx_pkt_segments(void)
+@@ -2726,17 +2758,41 @@ show_tx_pkt_segments(void)
  	printf("Split packet: %s\n", split);
  }
  

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

* [dpdk-stable] patch 'app/testpmd: fix packet header in txonly mode' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (85 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'app/testpmd: remove restriction on Tx segments set' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'app/testpmd: fix descriptor id check' " luca.boccassi
                   ` (119 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Wei Hu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 844575e05eba2fc821a550ca0b05bd834082e2f9 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Fri, 25 Sep 2020 20:47:17 +0800
Subject: [PATCH] app/testpmd: fix packet header in txonly mode

[ upstream commit b253a6bbf144c8e6505dd76fe0051967eddc6903 ]

In txonly forward mode, the packet header is fixed by the initial
setting, including the packet length and checksum. So when the packets
varies, this may cause a packet header error. Currently, there are two
methods in txonly mode to randomly change the packets.
1. Set txsplit random and txpkts (x[,y]*), the number of segments
   each packets will be a random value between 1 and total number of
   segments determined by txpkts settings.
   The step as follows:
     a) ./testpmd -w xxx -l xx -n 4 -- -i --disable-device-start
     b) port config 0 tx_offload multi_segs on
     c) set fwd txonly
     d) set txsplit rand
     e) set txpkts 2048,2048,2048,2048
     f) start
The nb_segs of the packets sent by testpmd will be 1~4. The real packet
length will be 2048, 4096, 6144 and 8192. But in fact the packet length
in ip header and udp header will be fixed by 8178 and 8158.

2. Set txonly-multi-flow. the ip address will be varied to generate
   multiple flow.
   The step as follows:
     a) ./testpmd -w xxx -l xx -n 4 -- -i --txonly-multi-flow
     b) set fwd txonly
     c) start
The ip address of each pkts will change randomly, but since the header
is fixed, the checksum may be a error value.

Therefore, this patch adds a function to update the packet length and
check sum in the pkts header when the txsplit mode is set to rand or
multi-flow is set.

Fixes: 82010ef55e7c ("app/testpmd: make txonly mode generate multiple flows")
Fixes: 79bec05b32b7 ("app/testpmd: add ability to split outgoing packets")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/txonly.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index 8ed436def5..a1822c631d 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -147,6 +147,34 @@ setup_pkt_udp_ip_headers(struct rte_ipv4_hdr *ip_hdr,
 	ip_hdr->hdr_checksum = (uint16_t) ip_cksum;
 }
 
+static inline void
+update_pkt_header(struct rte_mbuf *pkt, uint32_t total_pkt_len)
+{
+	struct rte_ipv4_hdr *ip_hdr;
+	struct rte_udp_hdr *udp_hdr;
+	uint16_t pkt_data_len;
+	uint16_t pkt_len;
+
+	pkt_data_len = (uint16_t) (total_pkt_len - (
+					sizeof(struct rte_ether_hdr) +
+					sizeof(struct rte_ipv4_hdr) +
+					sizeof(struct rte_udp_hdr)));
+	/* updata udp pkt length */
+	udp_hdr = rte_pktmbuf_mtod_offset(pkt, struct rte_udp_hdr *,
+				sizeof(struct rte_ether_hdr) +
+				sizeof(struct rte_ipv4_hdr));
+	pkt_len = (uint16_t) (pkt_data_len + sizeof(struct rte_udp_hdr));
+	udp_hdr->dgram_len = RTE_CPU_TO_BE_16(pkt_len);
+
+	/* updata ip pkt length and csum */
+	ip_hdr = rte_pktmbuf_mtod_offset(pkt, struct rte_ipv4_hdr *,
+				sizeof(struct rte_ether_hdr));
+	ip_hdr->hdr_checksum = 0;
+	pkt_len = (uint16_t) (pkt_len + sizeof(struct rte_ipv4_hdr));
+	ip_hdr->total_length = RTE_CPU_TO_BE_16(pkt_len);
+	ip_hdr->hdr_checksum = rte_ipv4_cksum(ip_hdr);
+}
+
 static inline bool
 pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
 		struct rte_ether_hdr *eth_hdr, const uint16_t vlan_tci,
@@ -212,6 +240,10 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
 	copy_buf_to_pkt(&pkt_udp_hdr, sizeof(pkt_udp_hdr), pkt,
 			sizeof(struct rte_ether_hdr) +
 			sizeof(struct rte_ipv4_hdr));
+
+	if (unlikely(tx_pkt_split == TX_PKT_SPLIT_RND) || txonly_multi_flow)
+		update_pkt_header(pkt, pkt_len);
+
 	/*
 	 * Complete first mbuf of packet and append it to the
 	 * burst of packets to be transmitted.
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.517914177 +0000
+++ 0088-app-testpmd-fix-packet-header-in-txonly-mode.patch	2020-10-28 10:35:11.628831849 +0000
@@ -1,8 +1,10 @@
-From b253a6bbf144c8e6505dd76fe0051967eddc6903 Mon Sep 17 00:00:00 2001
+From 844575e05eba2fc821a550ca0b05bd834082e2f9 Mon Sep 17 00:00:00 2001
 From: Chengchang Tang <tangchengchang@huawei.com>
 Date: Fri, 25 Sep 2020 20:47:17 +0800
 Subject: [PATCH] app/testpmd: fix packet header in txonly mode
 
+[ upstream commit b253a6bbf144c8e6505dd76fe0051967eddc6903 ]
+
 In txonly forward mode, the packet header is fixed by the initial
 setting, including the packet length and checksum. So when the packets
 varies, this may cause a packet header error. Currently, there are two
@@ -36,7 +38,6 @@
 
 Fixes: 82010ef55e7c ("app/testpmd: make txonly mode generate multiple flows")
 Fixes: 79bec05b32b7 ("app/testpmd: add ability to split outgoing packets")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -46,10 +47,10 @@
  1 file changed, 32 insertions(+)
 
 diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
-index 45def72a33..d55ee7ca00 100644
+index 8ed436def5..a1822c631d 100644
 --- a/app/test-pmd/txonly.c
 +++ b/app/test-pmd/txonly.c
-@@ -156,6 +156,34 @@ setup_pkt_udp_ip_headers(struct rte_ipv4_hdr *ip_hdr,
+@@ -147,6 +147,34 @@ setup_pkt_udp_ip_headers(struct rte_ipv4_hdr *ip_hdr,
  	ip_hdr->hdr_checksum = (uint16_t) ip_cksum;
  }
  
@@ -84,7 +85,7 @@
  static inline bool
  pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
  		struct rte_ether_hdr *eth_hdr, const uint16_t vlan_tci,
-@@ -223,6 +251,10 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
+@@ -212,6 +240,10 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
  	copy_buf_to_pkt(&pkt_udp_hdr, sizeof(pkt_udp_hdr), pkt,
  			sizeof(struct rte_ether_hdr) +
  			sizeof(struct rte_ipv4_hdr));
@@ -92,9 +93,9 @@
 +	if (unlikely(tx_pkt_split == TX_PKT_SPLIT_RND) || txonly_multi_flow)
 +		update_pkt_header(pkt, pkt_len);
 +
- 	if (unlikely(timestamp_enable)) {
- 		uint64_t skew = RTE_PER_LCORE(timestamp_qskew);
- 		struct {
+ 	/*
+ 	 * Complete first mbuf of packet and append it to the
+ 	 * burst of packets to be transmitted.
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'app/testpmd: fix descriptor id check' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (86 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'app/testpmd: fix packet header in txonly mode' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'app/testpmd: fix displaying Rx/Tx queues information' " luca.boccassi
                   ` (118 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Wei Hu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 33eb75df240a7343f0279d6b7b8fab6b1e0345ce Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Fri, 25 Sep 2020 20:47:18 +0800
Subject: [PATCH] app/testpmd: fix descriptor id check

[ upstream commit 25340d5342a1f0c34c7e9c1fb8c2becc7e70fa31 ]

The number of desc is a per queue configuration. But in the check
function, nb_txd & nb_rxd are used to check whether the desc_id is
valid. nb_txd & nb_rxd are the global configuration of number of desc.
If the queue configuration is changed by cmdline liks: "port config xx
txq xx ring_size xxx", the real value will be changed.

This patch use the real value to check whether the desc_id is valid.
And if these are not configured by user. It will use the default value
to check it, since the rte_eth_rx_queue_setup & rte_eth_tx_queue_setup
will use a default value to configure the queue if nb_rx_desc or
nb_tx_desc is zero.

Fixes: af75078fece3 ("first public release")

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

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 67bc18de91..e1c7143586 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1684,6 +1684,38 @@ tx_queue_id_is_invalid(queueid_t txq_id)
 	return 1;
 }
 
+static int
+get_rx_ring_size(portid_t port_id, queueid_t rxq_id, uint16_t *ring_size)
+{
+	struct rte_port *port = &ports[port_id];
+	struct rte_eth_rxq_info rx_qinfo;
+	int ret;
+
+	ret = rte_eth_rx_queue_info_get(port_id, rxq_id, &rx_qinfo);
+	if (ret == 0) {
+		*ring_size = rx_qinfo.nb_desc;
+		return ret;
+	}
+
+	if (ret != -ENOTSUP)
+		return ret;
+	/*
+	 * If the rte_eth_rx_queue_info_get is not support for this PMD,
+	 * ring_size stored in testpmd will be used for validity verification.
+	 * When configure the rxq by rte_eth_rx_queue_setup with nb_rx_desc
+	 * being 0, it will use a default value provided by PMDs to setup this
+	 * rxq. If the default value is 0, it will use the
+	 * RTE_ETH_DEV_FALLBACK_RX_RINGSIZE to setup this rxq.
+	 */
+	if (port->nb_rx_desc[rxq_id])
+		*ring_size = port->nb_rx_desc[rxq_id];
+	else if (port->dev_info.default_rxportconf.ring_size)
+		*ring_size = port->dev_info.default_rxportconf.ring_size;
+	else
+		*ring_size = RTE_ETH_DEV_FALLBACK_RX_RINGSIZE;
+	return 0;
+}
+
 static int
 get_tx_ring_size(portid_t port_id, queueid_t txq_id, uint16_t *ring_size)
 {
@@ -1717,22 +1749,38 @@ get_tx_ring_size(portid_t port_id, queueid_t txq_id, uint16_t *ring_size)
 }
 
 static int
-rx_desc_id_is_invalid(uint16_t rxdesc_id)
+rx_desc_id_is_invalid(portid_t port_id, queueid_t rxq_id, uint16_t rxdesc_id)
 {
-	if (rxdesc_id < nb_rxd)
+	uint16_t ring_size;
+	int ret;
+
+	ret = get_rx_ring_size(port_id, rxq_id, &ring_size);
+	if (ret)
+		return 1;
+
+	if (rxdesc_id < ring_size)
 		return 0;
-	printf("Invalid RX descriptor %d (must be < nb_rxd=%d)\n",
-	       rxdesc_id, nb_rxd);
+
+	printf("Invalid RX descriptor %u (must be < ring_size=%u)\n",
+	       rxdesc_id, ring_size);
 	return 1;
 }
 
 static int
-tx_desc_id_is_invalid(uint16_t txdesc_id)
+tx_desc_id_is_invalid(portid_t port_id, queueid_t txq_id, uint16_t txdesc_id)
 {
-	if (txdesc_id < nb_txd)
+	uint16_t ring_size;
+	int ret;
+
+	ret = get_tx_ring_size(port_id, txq_id, &ring_size);
+	if (ret)
+		return 1;
+
+	if (txdesc_id < ring_size)
 		return 0;
-	printf("Invalid TX descriptor %d (must be < nb_txd=%d)\n",
-	       txdesc_id, nb_txd);
+
+	printf("Invalid TX descriptor %u (must be < ring_size=%u)\n",
+	       txdesc_id, ring_size);
 	return 1;
 }
 
@@ -1853,11 +1901,7 @@ rx_ring_desc_display(portid_t port_id, queueid_t rxq_id, uint16_t rxd_id)
 {
 	const struct rte_memzone *rx_mz;
 
-	if (port_id_is_invalid(port_id, ENABLED_WARN))
-		return;
-	if (rx_queue_id_is_invalid(rxq_id))
-		return;
-	if (rx_desc_id_is_invalid(rxd_id))
+	if (rx_desc_id_is_invalid(port_id, rxq_id, rxd_id))
 		return;
 	rx_mz = ring_dma_zone_lookup("rx_ring", port_id, rxq_id);
 	if (rx_mz == NULL)
@@ -1870,11 +1914,7 @@ tx_ring_desc_display(portid_t port_id, queueid_t txq_id, uint16_t txd_id)
 {
 	const struct rte_memzone *tx_mz;
 
-	if (port_id_is_invalid(port_id, ENABLED_WARN))
-		return;
-	if (tx_queue_id_is_invalid(txq_id))
-		return;
-	if (tx_desc_id_is_invalid(txd_id))
+	if (tx_desc_id_is_invalid(port_id, txq_id, txd_id))
 		return;
 	tx_mz = ring_dma_zone_lookup("tx_ring", port_id, txq_id);
 	if (tx_mz == NULL)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.546103677 +0000
+++ 0089-app-testpmd-fix-descriptor-id-check.patch	2020-10-28 10:35:11.632831908 +0000
@@ -1,8 +1,10 @@
-From 25340d5342a1f0c34c7e9c1fb8c2becc7e70fa31 Mon Sep 17 00:00:00 2001
+From 33eb75df240a7343f0279d6b7b8fab6b1e0345ce Mon Sep 17 00:00:00 2001
 From: Chengchang Tang <tangchengchang@huawei.com>
 Date: Fri, 25 Sep 2020 20:47:18 +0800
 Subject: [PATCH] app/testpmd: fix descriptor id check
 
+[ upstream commit 25340d5342a1f0c34c7e9c1fb8c2becc7e70fa31 ]
+
 The number of desc is a per queue configuration. But in the check
 function, nb_txd & nb_rxd are used to check whether the desc_id is
 valid. nb_txd & nb_rxd are the global configuration of number of desc.
@@ -16,7 +18,6 @@
 nb_tx_desc is zero.
 
 Fixes: af75078fece3 ("first public release")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -26,10 +27,10 @@
  1 file changed, 58 insertions(+), 18 deletions(-)
 
 diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
-index 8f63b4ea40..0b655368b8 100644
+index 67bc18de91..e1c7143586 100644
 --- a/app/test-pmd/config.c
 +++ b/app/test-pmd/config.c
-@@ -2009,6 +2009,38 @@ tx_queue_id_is_invalid(queueid_t txq_id)
+@@ -1684,6 +1684,38 @@ tx_queue_id_is_invalid(queueid_t txq_id)
  	return 1;
  }
  
@@ -68,7 +69,7 @@
  static int
  get_tx_ring_size(portid_t port_id, queueid_t txq_id, uint16_t *ring_size)
  {
-@@ -2042,22 +2074,38 @@ get_tx_ring_size(portid_t port_id, queueid_t txq_id, uint16_t *ring_size)
+@@ -1717,22 +1749,38 @@ get_tx_ring_size(portid_t port_id, queueid_t txq_id, uint16_t *ring_size)
  }
  
  static int
@@ -115,7 +116,7 @@
  	return 1;
  }
  
-@@ -2178,11 +2226,7 @@ rx_ring_desc_display(portid_t port_id, queueid_t rxq_id, uint16_t rxd_id)
+@@ -1853,11 +1901,7 @@ rx_ring_desc_display(portid_t port_id, queueid_t rxq_id, uint16_t rxd_id)
  {
  	const struct rte_memzone *rx_mz;
  
@@ -128,7 +129,7 @@
  		return;
  	rx_mz = ring_dma_zone_lookup("rx_ring", port_id, rxq_id);
  	if (rx_mz == NULL)
-@@ -2195,11 +2239,7 @@ tx_ring_desc_display(portid_t port_id, queueid_t txq_id, uint16_t txd_id)
+@@ -1870,11 +1914,7 @@ tx_ring_desc_display(portid_t port_id, queueid_t txq_id, uint16_t txd_id)
  {
  	const struct rte_memzone *tx_mz;
  

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

* [dpdk-stable] patch 'app/testpmd: fix displaying Rx/Tx queues information' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (87 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'app/testpmd: fix descriptor id check' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/qede: fix dereference before null check' " luca.boccassi
                   ` (117 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Huisong Li; +Cc: Wei Hu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From d2e8ae537ec001139495c335d754db403b82f7f7 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 25 Sep 2020 20:47:19 +0800
Subject: [PATCH] app/testpmd: fix displaying Rx/Tx queues information

[ upstream commit 700ded7aa15f5ecc5b68d12fcb6fd3bfe06e599d ]

Currently, the information of Rx/Tx queues from PMD driver is not
displayed exactly in the rxtx_config_display function. Because
"ports[pid].rx_conf" and "ports[pid].tx_conf" maintained in testpmd
application may be not the value actually used by PMD driver. For
instance, user does not set a field, but PMD driver has to use the
default value.

This patch fixes rxtx_config_display so that the information of Rx/Tx
queues can be really displayed for the PMD driver that implement
.rxq_info_get and .txq_info_get ops callback function.

Fixes: 75c530c1bd53 ("app/testpmd: fix port configuration print")
Fixes: d44f8a485f5d ("app/testpmd: enable per queue configure")

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

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index e1c7143586..343402f172 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1955,10 +1955,17 @@ rxtx_config_display(void)
 		struct rte_eth_txconf *tx_conf = &ports[pid].tx_conf[0];
 		uint16_t *nb_rx_desc = &ports[pid].nb_rx_desc[0];
 		uint16_t *nb_tx_desc = &ports[pid].nb_tx_desc[0];
-		uint16_t nb_rx_desc_tmp;
-		uint16_t nb_tx_desc_tmp;
 		struct rte_eth_rxq_info rx_qinfo;
 		struct rte_eth_txq_info tx_qinfo;
+		uint16_t rx_free_thresh_tmp;
+		uint16_t tx_free_thresh_tmp;
+		uint16_t tx_rs_thresh_tmp;
+		uint16_t nb_rx_desc_tmp;
+		uint16_t nb_tx_desc_tmp;
+		uint64_t offloads_tmp;
+		uint8_t pthresh_tmp;
+		uint8_t hthresh_tmp;
+		uint8_t wthresh_tmp;
 		int32_t rc;
 
 		/* per port config */
@@ -1972,41 +1979,64 @@ rxtx_config_display(void)
 		/* per rx queue config only for first queue to be less verbose */
 		for (qid = 0; qid < 1; qid++) {
 			rc = rte_eth_rx_queue_info_get(pid, qid, &rx_qinfo);
-			if (rc)
+			if (rc) {
 				nb_rx_desc_tmp = nb_rx_desc[qid];
-			else
+				rx_free_thresh_tmp =
+					rx_conf[qid].rx_free_thresh;
+				pthresh_tmp = rx_conf[qid].rx_thresh.pthresh;
+				hthresh_tmp = rx_conf[qid].rx_thresh.hthresh;
+				wthresh_tmp = rx_conf[qid].rx_thresh.wthresh;
+				offloads_tmp = rx_conf[qid].offloads;
+			} else {
 				nb_rx_desc_tmp = rx_qinfo.nb_desc;
+				rx_free_thresh_tmp =
+						rx_qinfo.conf.rx_free_thresh;
+				pthresh_tmp = rx_qinfo.conf.rx_thresh.pthresh;
+				hthresh_tmp = rx_qinfo.conf.rx_thresh.hthresh;
+				wthresh_tmp = rx_qinfo.conf.rx_thresh.wthresh;
+				offloads_tmp = rx_qinfo.conf.offloads;
+			}
 
 			printf("    RX queue: %d\n", qid);
 			printf("      RX desc=%d - RX free threshold=%d\n",
-				nb_rx_desc_tmp, rx_conf[qid].rx_free_thresh);
+				nb_rx_desc_tmp, rx_free_thresh_tmp);
 			printf("      RX threshold registers: pthresh=%d hthresh=%d "
 				" wthresh=%d\n",
-				rx_conf[qid].rx_thresh.pthresh,
-				rx_conf[qid].rx_thresh.hthresh,
-				rx_conf[qid].rx_thresh.wthresh);
-			printf("      RX Offloads=0x%"PRIx64"\n",
-				rx_conf[qid].offloads);
+				pthresh_tmp, hthresh_tmp, wthresh_tmp);
+			printf("      RX Offloads=0x%"PRIx64"\n", offloads_tmp);
 		}
 
 		/* per tx queue config only for first queue to be less verbose */
 		for (qid = 0; qid < 1; qid++) {
 			rc = rte_eth_tx_queue_info_get(pid, qid, &tx_qinfo);
-			if (rc)
+			if (rc) {
 				nb_tx_desc_tmp = nb_tx_desc[qid];
-			else
+				tx_free_thresh_tmp =
+					tx_conf[qid].tx_free_thresh;
+				pthresh_tmp = tx_conf[qid].tx_thresh.pthresh;
+				hthresh_tmp = tx_conf[qid].tx_thresh.hthresh;
+				wthresh_tmp = tx_conf[qid].tx_thresh.wthresh;
+				offloads_tmp = tx_conf[qid].offloads;
+				tx_rs_thresh_tmp = tx_conf[qid].tx_rs_thresh;
+			} else {
 				nb_tx_desc_tmp = tx_qinfo.nb_desc;
+				tx_free_thresh_tmp =
+						tx_qinfo.conf.tx_free_thresh;
+				pthresh_tmp = tx_qinfo.conf.tx_thresh.pthresh;
+				hthresh_tmp = tx_qinfo.conf.tx_thresh.hthresh;
+				wthresh_tmp = tx_qinfo.conf.tx_thresh.wthresh;
+				offloads_tmp = tx_qinfo.conf.offloads;
+				tx_rs_thresh_tmp = tx_qinfo.conf.tx_rs_thresh;
+			}
 
 			printf("    TX queue: %d\n", qid);
 			printf("      TX desc=%d - TX free threshold=%d\n",
-				nb_tx_desc_tmp, tx_conf[qid].tx_free_thresh);
+				nb_tx_desc_tmp, tx_free_thresh_tmp);
 			printf("      TX threshold registers: pthresh=%d hthresh=%d "
 				" wthresh=%d\n",
-				tx_conf[qid].tx_thresh.pthresh,
-				tx_conf[qid].tx_thresh.hthresh,
-				tx_conf[qid].tx_thresh.wthresh);
+				pthresh_tmp, hthresh_tmp, wthresh_tmp);
 			printf("      TX offloads=0x%"PRIx64" - TX RS bit threshold=%d\n",
-				tx_conf[qid].offloads, tx_conf->tx_rs_thresh);
+				offloads_tmp, tx_rs_thresh_tmp);
 		}
 	}
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.578095747 +0000
+++ 0090-app-testpmd-fix-displaying-Rx-Tx-queues-information.patch	2020-10-28 10:35:11.636831967 +0000
@@ -1,8 +1,10 @@
-From 700ded7aa15f5ecc5b68d12fcb6fd3bfe06e599d Mon Sep 17 00:00:00 2001
+From d2e8ae537ec001139495c335d754db403b82f7f7 Mon Sep 17 00:00:00 2001
 From: Huisong Li <lihuisong@huawei.com>
 Date: Fri, 25 Sep 2020 20:47:19 +0800
 Subject: [PATCH] app/testpmd: fix displaying Rx/Tx queues information
 
+[ upstream commit 700ded7aa15f5ecc5b68d12fcb6fd3bfe06e599d ]
+
 Currently, the information of Rx/Tx queues from PMD driver is not
 displayed exactly in the rxtx_config_display function. Because
 "ports[pid].rx_conf" and "ports[pid].tx_conf" maintained in testpmd
@@ -16,7 +18,6 @@
 
 Fixes: 75c530c1bd53 ("app/testpmd: fix port configuration print")
 Fixes: d44f8a485f5d ("app/testpmd: enable per queue configure")
-Cc: stable@dpdk.org
 
 Signed-off-by: Huisong Li <lihuisong@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -26,10 +27,10 @@
  1 file changed, 47 insertions(+), 17 deletions(-)
 
 diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
-index 0b655368b8..470c68567a 100644
+index e1c7143586..343402f172 100644
 --- a/app/test-pmd/config.c
 +++ b/app/test-pmd/config.c
-@@ -2280,10 +2280,17 @@ rxtx_config_display(void)
+@@ -1955,10 +1955,17 @@ rxtx_config_display(void)
  		struct rte_eth_txconf *tx_conf = &ports[pid].tx_conf[0];
  		uint16_t *nb_rx_desc = &ports[pid].nb_rx_desc[0];
  		uint16_t *nb_tx_desc = &ports[pid].nb_tx_desc[0];
@@ -49,7 +50,7 @@
  		int32_t rc;
  
  		/* per port config */
-@@ -2297,41 +2304,64 @@ rxtx_config_display(void)
+@@ -1972,41 +1979,64 @@ rxtx_config_display(void)
  		/* per rx queue config only for first queue to be less verbose */
  		for (qid = 0; qid < 1; qid++) {
  			rc = rte_eth_rx_queue_info_get(pid, qid, &rx_qinfo);

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

* [dpdk-stable] patch 'net/qede: fix dereference before null check' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (88 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'app/testpmd: fix displaying Rx/Tx queues information' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/sfc: fix RSS hash flag when offload is disabled' " luca.boccassi
                   ` (116 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From cb7e37a0b5c7001a8e000cefa21aecfcf499ab67 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Mon, 24 Aug 2020 19:46:53 +0800
Subject: [PATCH] net/qede: fix dereference before null check

[ upstream commit b5c2f5a0ba7b2f7c21be167d5ea418c46552a299 ]

Coverity flags that 'fp->sb_info' variable is used before
it's checked for NULL. This patch fixes this issue.

Coverity issue: 260413
Fixes: 4c4bdadfa9e7 ("net/qede: refactoring multi-queue implementation")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/qede/qede_rxtx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index ab69cba179..64e6de4743 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -676,9 +676,9 @@ void qede_dealloc_fp_resc(struct rte_eth_dev *eth_dev)
 
 	for (sb_idx = 0; sb_idx < QEDE_RXTX_MAX(qdev); sb_idx++) {
 		fp = &qdev->fp_array[sb_idx];
-		DP_INFO(edev, "Free sb_info index 0x%x\n",
-				fp->sb_info->igu_sb_id);
 		if (fp->sb_info) {
+			DP_INFO(edev, "Free sb_info index 0x%x\n",
+					fp->sb_info->igu_sb_id);
 			OSAL_DMA_FREE_COHERENT(edev, fp->sb_info->sb_virt,
 				fp->sb_info->sb_phys,
 				sizeof(struct status_block));
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.610484606 +0000
+++ 0091-net-qede-fix-dereference-before-null-check.patch	2020-10-28 10:35:11.636831967 +0000
@@ -1,14 +1,15 @@
-From b5c2f5a0ba7b2f7c21be167d5ea418c46552a299 Mon Sep 17 00:00:00 2001
+From cb7e37a0b5c7001a8e000cefa21aecfcf499ab67 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Mon, 24 Aug 2020 19:46:53 +0800
 Subject: [PATCH] net/qede: fix dereference before null check
 
+[ upstream commit b5c2f5a0ba7b2f7c21be167d5ea418c46552a299 ]
+
 Coverity flags that 'fp->sb_info' variable is used before
 it's checked for NULL. This patch fixes this issue.
 
 Coverity issue: 260413
 Fixes: 4c4bdadfa9e7 ("net/qede: refactoring multi-queue implementation")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -17,7 +18,7 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
-index ea264f59d7..75d78cebb5 100644
+index ab69cba179..64e6de4743 100644
 --- a/drivers/net/qede/qede_rxtx.c
 +++ b/drivers/net/qede/qede_rxtx.c
 @@ -676,9 +676,9 @@ void qede_dealloc_fp_resc(struct rte_eth_dev *eth_dev)

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

* [dpdk-stable] patch 'net/sfc: fix RSS hash flag when offload is disabled' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (89 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/qede: fix dereference before null check' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/sfc: fix RSS hash offload if queue action is used' " luca.boccassi
                   ` (115 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Igor Romanov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 157419673a8421a8999c4a561ce1bc57ed5a5264 Mon Sep 17 00:00:00 2001
From: Igor Romanov <igor.romanov@oktetlabs.ru>
Date: Thu, 24 Sep 2020 13:40:58 +0100
Subject: [PATCH] net/sfc: fix RSS hash flag when offload is disabled

[ upstream commit dbf9910c1b13ebb7ced661447ab7dd9d0f5728ce ]

Do not set RSS hash flag in the received mbufs when RSS hash
offload is not enabled, which means that RSS hash value is invalid.

Fixes: 5d308972954c ("ethdev: add mbuf RSS update as an offload")

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_rx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index 61736196cc..3ecd8da8c9 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -1155,7 +1155,8 @@ sfc_rx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
 	info.batch_max = encp->enc_rx_batch_max;
 	info.prefix_size = encp->enc_rx_prefix_size;
 
-	if (rss->hash_support == EFX_RX_HASH_AVAILABLE && rss->channels > 0)
+	if (rss->hash_support == EFX_RX_HASH_AVAILABLE && rss->channels > 0 &&
+	    (offloads & DEV_RX_OFFLOAD_RSS_HASH))
 		info.flags |= SFC_RXQ_FLAG_RSS_HASH;
 
 	info.rxq_entries = rxq_info->entries;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.641521895 +0000
+++ 0092-net-sfc-fix-RSS-hash-flag-when-offload-is-disabled.patch	2020-10-28 10:35:11.636831967 +0000
@@ -1,13 +1,14 @@
-From dbf9910c1b13ebb7ced661447ab7dd9d0f5728ce Mon Sep 17 00:00:00 2001
+From 157419673a8421a8999c4a561ce1bc57ed5a5264 Mon Sep 17 00:00:00 2001
 From: Igor Romanov <igor.romanov@oktetlabs.ru>
 Date: Thu, 24 Sep 2020 13:40:58 +0100
 Subject: [PATCH] net/sfc: fix RSS hash flag when offload is disabled
 
+[ upstream commit dbf9910c1b13ebb7ced661447ab7dd9d0f5728ce ]
+
 Do not set RSS hash flag in the received mbufs when RSS hash
 offload is not enabled, which means that RSS hash value is invalid.
 
 Fixes: 5d308972954c ("ethdev: add mbuf RSS update as an offload")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -16,7 +17,7 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
-index a62ce4a17d..dccafb163a 100644
+index 61736196cc..3ecd8da8c9 100644
 --- a/drivers/net/sfc/sfc_rx.c
 +++ b/drivers/net/sfc/sfc_rx.c
 @@ -1155,7 +1155,8 @@ sfc_rx_qinit(struct sfc_adapter *sa, unsigned int sw_index,

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

* [dpdk-stable] patch 'net/sfc: fix RSS hash offload if queue action is used' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (90 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/sfc: fix RSS hash flag when offload is disabled' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'drivers/net: fix port id size' " luca.boccassi
                   ` (114 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Igor Romanov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From d175b6131bfb369cc1af2951d05e9ad03eaa184a Mon Sep 17 00:00:00 2001
From: Igor Romanov <igor.romanov@oktetlabs.ru>
Date: Thu, 24 Sep 2020 13:40:59 +0100
Subject: [PATCH] net/sfc: fix RSS hash offload if queue action is used

[ upstream commit 92a15fc541fcba1848933c4ba5c6e08f6330bc13 ]

When RSS hash offload is requested, the ingress filters that forward
packets to an RX queue must have an RSS context assigned to them to
calculate RSS hash, which was not always provided.

Fix it by creating a dummy RSS context that forwards packets
to the same queue and assign it to created by flow API filters when
RSS hash offload is enabled. RSS key and hash functions from
default RSS context are used.

Fixes: 5d308972954c ("ethdev: add mbuf RSS update as an offload")

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc.c        |  1 +
 drivers/net/sfc/sfc.h        |  2 ++
 drivers/net/sfc/sfc_ethdev.c | 48 +++++++++++++++++--------
 drivers/net/sfc/sfc_flow.c   | 69 +++++++++++++++++++++++++++++-------
 drivers/net/sfc/sfc_flow.h   |  2 ++
 drivers/net/sfc/sfc_rx.c     | 13 ++++---
 drivers/net/sfc/sfc_rx.h     |  1 +
 7 files changed, 105 insertions(+), 31 deletions(-)

diff --git a/drivers/net/sfc/sfc.c b/drivers/net/sfc/sfc.c
index 3f5cd7758b..da67acaa87 100644
--- a/drivers/net/sfc/sfc.c
+++ b/drivers/net/sfc/sfc.c
@@ -684,6 +684,7 @@ sfc_rss_attach(struct sfc_adapter *sa)
 	efx_intr_fini(sa->nic);
 
 	rte_memcpy(rss->key, default_rss_key, sizeof(rss->key));
+	rss->dummy_rss_context = EFX_RSS_CONTEXT_DEFAULT;
 
 	return 0;
 
diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h
index cc52228771..bce6beefaa 100644
--- a/drivers/net/sfc/sfc.h
+++ b/drivers/net/sfc/sfc.h
@@ -172,6 +172,8 @@ struct sfc_rss {
 	efx_rx_hash_type_t		hash_types;
 	unsigned int			tbl[EFX_RSS_TBL_SIZE];
 	uint8_t				key[EFX_RSS_KEY_SIZE];
+
+	uint32_t			dummy_rss_context;
 };
 
 /* Adapter private data shared by primary and secondary processes */
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index f8867b0ec0..d33c476bd7 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -1515,8 +1515,15 @@ sfc_dev_rss_hash_update(struct rte_eth_dev *dev,
 	struct sfc_adapter *sa = sfc_adapter_by_eth_dev(dev);
 	struct sfc_rss *rss = &sfc_sa2shared(sa)->rss;
 	unsigned int efx_hash_types;
+	uint32_t contexts[] = {EFX_RSS_CONTEXT_DEFAULT, rss->dummy_rss_context};
+	unsigned int n_contexts;
+	unsigned int mode_i = 0;
+	unsigned int key_i = 0;
+	unsigned int i = 0;
 	int rc = 0;
 
+	n_contexts = rss->dummy_rss_context == EFX_RSS_CONTEXT_DEFAULT ? 1 : 2;
+
 	if (sfc_sa2shared(sa)->isolated)
 		return -ENOTSUP;
 
@@ -1543,19 +1550,24 @@ sfc_dev_rss_hash_update(struct rte_eth_dev *dev,
 	if (rc != 0)
 		goto fail_rx_hf_rte_to_efx;
 
-	rc = efx_rx_scale_mode_set(sa->nic, EFX_RSS_CONTEXT_DEFAULT,
-				   rss->hash_alg, efx_hash_types, B_TRUE);
-	if (rc != 0)
-		goto fail_scale_mode_set;
+	for (mode_i = 0; mode_i < n_contexts; mode_i++) {
+		rc = efx_rx_scale_mode_set(sa->nic, contexts[mode_i],
+					   rss->hash_alg, efx_hash_types,
+					   B_TRUE);
+		if (rc != 0)
+			goto fail_scale_mode_set;
+	}
 
 	if (rss_conf->rss_key != NULL) {
 		if (sa->state == SFC_ADAPTER_STARTED) {
-			rc = efx_rx_scale_key_set(sa->nic,
-						  EFX_RSS_CONTEXT_DEFAULT,
-						  rss_conf->rss_key,
-						  sizeof(rss->key));
-			if (rc != 0)
-				goto fail_scale_key_set;
+			for (key_i = 0; key_i < n_contexts; key_i++) {
+				rc = efx_rx_scale_key_set(sa->nic,
+							  contexts[key_i],
+							  rss_conf->rss_key,
+							  sizeof(rss->key));
+				if (rc != 0)
+					goto fail_scale_key_set;
+			}
 		}
 
 		rte_memcpy(rss->key, rss_conf->rss_key, sizeof(rss->key));
@@ -1568,12 +1580,20 @@ sfc_dev_rss_hash_update(struct rte_eth_dev *dev,
 	return 0;
 
 fail_scale_key_set:
-	if (efx_rx_scale_mode_set(sa->nic, EFX_RSS_CONTEXT_DEFAULT,
-				  EFX_RX_HASHALG_TOEPLITZ,
-				  rss->hash_types, B_TRUE) != 0)
-		sfc_err(sa, "failed to restore RSS mode");
+	for (i = 0; i < key_i; i++) {
+		if (efx_rx_scale_key_set(sa->nic, contexts[i], rss->key,
+					 sizeof(rss->key)) != 0)
+			sfc_err(sa, "failed to restore RSS key");
+	}
 
 fail_scale_mode_set:
+	for (i = 0; i < mode_i; i++) {
+		if (efx_rx_scale_mode_set(sa->nic, contexts[i],
+					  EFX_RX_HASHALG_TOEPLITZ,
+					  rss->hash_types, B_TRUE) != 0)
+			sfc_err(sa, "failed to restore RSS mode");
+	}
+
 fail_rx_hf_rte_to_efx:
 	sfc_adapter_unlock(sa);
 	return -rc;
diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c
index 023e55d951..91aa2a687a 100644
--- a/drivers/net/sfc/sfc_flow.c
+++ b/drivers/net/sfc/sfc_flow.c
@@ -1240,6 +1240,7 @@ sfc_flow_parse_queue(struct sfc_adapter *sa,
 		     struct rte_flow *flow)
 {
 	struct sfc_rxq *rxq;
+	struct sfc_rxq_info *rxq_info;
 
 	if (queue->index >= sfc_sa2shared(sa)->rxq_count)
 		return -EINVAL;
@@ -1247,6 +1248,10 @@ sfc_flow_parse_queue(struct sfc_adapter *sa,
 	rxq = &sa->rxq_ctrl[queue->index];
 	flow->spec.template.efs_dmaq_id = (uint16_t)rxq->hw_index;
 
+	rxq_info = &sfc_sa2shared(sa)->rxq_info[queue->index];
+	flow->spec.rss_hash_required = !!(rxq_info->rxq_flags &
+					    SFC_RXQ_FLAG_RSS_HASH);
+
 	return 0;
 }
 
@@ -1405,13 +1410,34 @@ sfc_flow_filter_insert(struct sfc_adapter *sa,
 	struct sfc_rss *rss = &sas->rss;
 	struct sfc_flow_rss *flow_rss = &flow->rss_conf;
 	uint32_t efs_rss_context = EFX_RSS_CONTEXT_DEFAULT;
+	boolean_t create_context;
 	unsigned int i;
 	int rc = 0;
 
-	if (flow->rss) {
-		unsigned int rss_spread = MIN(flow_rss->rxq_hw_index_max -
-					      flow_rss->rxq_hw_index_min + 1,
-					      EFX_MAXRSS);
+	create_context = flow->rss || (flow->spec.rss_hash_required &&
+			rss->dummy_rss_context == EFX_RSS_CONTEXT_DEFAULT);
+
+	if (create_context) {
+		unsigned int rss_spread;
+		unsigned int rss_hash_types;
+		uint8_t *rss_key;
+
+		if (flow->rss) {
+			rss_spread = MIN(flow_rss->rxq_hw_index_max -
+					flow_rss->rxq_hw_index_min + 1,
+					EFX_MAXRSS);
+			rss_hash_types = flow_rss->rss_hash_types;
+			rss_key = flow_rss->rss_key;
+		} else {
+			/*
+			 * Initialize dummy RSS context parameters to have
+			 * valid RSS hash. Use default RSS hash function and
+			 * key.
+			 */
+			rss_spread = 1;
+			rss_hash_types = rss->hash_types;
+			rss_key = rss->key;
+		}
 
 		rc = efx_rx_scale_context_alloc(sa->nic,
 						EFX_RX_SCALE_EXCLUSIVE,
@@ -1422,16 +1448,19 @@ sfc_flow_filter_insert(struct sfc_adapter *sa,
 
 		rc = efx_rx_scale_mode_set(sa->nic, efs_rss_context,
 					   rss->hash_alg,
-					   flow_rss->rss_hash_types, B_TRUE);
+					   rss_hash_types, B_TRUE);
 		if (rc != 0)
 			goto fail_scale_mode_set;
 
 		rc = efx_rx_scale_key_set(sa->nic, efs_rss_context,
-					  flow_rss->rss_key,
-					  sizeof(rss->key));
+					  rss_key, sizeof(rss->key));
 		if (rc != 0)
 			goto fail_scale_key_set;
+	} else {
+		efs_rss_context = rss->dummy_rss_context;
+	}
 
+	if (flow->rss || flow->spec.rss_hash_required) {
 		/*
 		 * At this point, fully elaborated filter specifications
 		 * have been produced from the template. To make sure that
@@ -1442,8 +1471,9 @@ sfc_flow_filter_insert(struct sfc_adapter *sa,
 			efx_filter_spec_t *spec = &flow->spec.filters[i];
 
 			spec->efs_rss_context = efs_rss_context;
-			spec->efs_dmaq_id = flow_rss->rxq_hw_index_min;
 			spec->efs_flags |= EFX_FILTER_FLAG_RX_RSS;
+			if (flow->rss)
+				spec->efs_dmaq_id = flow_rss->rxq_hw_index_min;
 		}
 	}
 
@@ -1451,7 +1481,12 @@ sfc_flow_filter_insert(struct sfc_adapter *sa,
 	if (rc != 0)
 		goto fail_filter_insert;
 
-	if (flow->rss) {
+	if (create_context) {
+		unsigned int dummy_tbl[RTE_DIM(flow_rss->rss_tbl)] = {0};
+		unsigned int *tbl;
+
+		tbl = flow->rss ? flow_rss->rss_tbl : dummy_tbl;
+
 		/*
 		 * Scale table is set after filter insertion because
 		 * the table entries are relative to the base RxQ ID
@@ -1461,10 +1496,13 @@ sfc_flow_filter_insert(struct sfc_adapter *sa,
 		 * the table entries, and the operation will succeed
 		 */
 		rc = efx_rx_scale_tbl_set(sa->nic, efs_rss_context,
-					  flow_rss->rss_tbl,
-					  RTE_DIM(flow_rss->rss_tbl));
+					  tbl, RTE_DIM(flow_rss->rss_tbl));
 		if (rc != 0)
 			goto fail_scale_tbl_set;
+
+		/* Remember created dummy RSS context */
+		if (!flow->rss)
+			rss->dummy_rss_context = efs_rss_context;
 	}
 
 	return 0;
@@ -1475,7 +1513,7 @@ fail_scale_tbl_set:
 fail_filter_insert:
 fail_scale_key_set:
 fail_scale_mode_set:
-	if (efs_rss_context != EFX_RSS_CONTEXT_DEFAULT)
+	if (create_context)
 		efx_rx_scale_context_free(sa->nic, efs_rss_context);
 
 fail_scale_context_alloc:
@@ -2474,12 +2512,19 @@ sfc_flow_fini(struct sfc_adapter *sa)
 void
 sfc_flow_stop(struct sfc_adapter *sa)
 {
+	struct sfc_adapter_shared * const sas = sfc_sa2shared(sa);
+	struct sfc_rss *rss = &sas->rss;
 	struct rte_flow *flow;
 
 	SFC_ASSERT(sfc_adapter_is_locked(sa));
 
 	TAILQ_FOREACH(flow, &sa->filter.flow_list, entries)
 		sfc_flow_filter_remove(sa, flow);
+
+	if (rss->dummy_rss_context != EFX_RSS_CONTEXT_DEFAULT) {
+		efx_rx_scale_context_free(sa->nic, rss->dummy_rss_context);
+		rss->dummy_rss_context = EFX_RSS_CONTEXT_DEFAULT;
+	}
 }
 
 int
diff --git a/drivers/net/sfc/sfc_flow.h b/drivers/net/sfc/sfc_flow.h
index 71ec18cb95..f59db0a468 100644
--- a/drivers/net/sfc/sfc_flow.h
+++ b/drivers/net/sfc/sfc_flow.h
@@ -43,6 +43,8 @@ struct sfc_flow_spec {
 	efx_filter_spec_t filters[SF_FLOW_SPEC_NB_FILTERS_MAX];
 	/* number of complete specifications */
 	unsigned int count;
+	/* RSS hash toggle */
+	boolean_t rss_hash_required;
 };
 
 /* PMD-specific definition of the opaque type from rte_flow.h */
diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index 3ecd8da8c9..9a1c368328 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -1139,6 +1139,13 @@ sfc_rx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
 	rxq_info->refill_threshold =
 		RTE_MAX(rx_free_thresh, SFC_RX_REFILL_BULK);
 	rxq_info->refill_mb_pool = mb_pool;
+
+	if (rss->hash_support == EFX_RX_HASH_AVAILABLE && rss->channels > 0 &&
+	    (offloads & DEV_RX_OFFLOAD_RSS_HASH))
+		rxq_info->rxq_flags = SFC_RXQ_FLAG_RSS_HASH;
+	else
+		rxq_info->rxq_flags = 0;
+
 	rxq->buf_size = buf_size;
 
 	rc = sfc_dma_alloc(sa, "rxq", sw_index,
@@ -1154,11 +1161,7 @@ sfc_rx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
 	info.buf_size = buf_size;
 	info.batch_max = encp->enc_rx_batch_max;
 	info.prefix_size = encp->enc_rx_prefix_size;
-
-	if (rss->hash_support == EFX_RX_HASH_AVAILABLE && rss->channels > 0 &&
-	    (offloads & DEV_RX_OFFLOAD_RSS_HASH))
-		info.flags |= SFC_RXQ_FLAG_RSS_HASH;
-
+	info.flags = rxq_info->rxq_flags;
 	info.rxq_entries = rxq_info->entries;
 	info.rxq_hw_ring = rxq->mem.esm_base;
 	info.evq_hw_index = sfc_evq_index_by_rxq_sw_index(sa, sw_index);
diff --git a/drivers/net/sfc/sfc_rx.h b/drivers/net/sfc/sfc_rx.h
index 42b16e2ee6..4c31cfbaa2 100644
--- a/drivers/net/sfc/sfc_rx.h
+++ b/drivers/net/sfc/sfc_rx.h
@@ -115,6 +115,7 @@ struct sfc_rxq_info {
 	boolean_t		deferred_started;
 	unsigned int		refill_threshold;
 	struct rte_mempool	*refill_mb_pool;
+	unsigned int		rxq_flags;
 };
 
 struct sfc_rxq_info *sfc_rxq_info_by_dp_rxq(const struct sfc_dp_rxq *dp_rxq);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.672255866 +0000
+++ 0093-net-sfc-fix-RSS-hash-offload-if-queue-action-is-used.patch	2020-10-28 10:35:11.644832085 +0000
@@ -1,8 +1,10 @@
-From 92a15fc541fcba1848933c4ba5c6e08f6330bc13 Mon Sep 17 00:00:00 2001
+From d175b6131bfb369cc1af2951d05e9ad03eaa184a Mon Sep 17 00:00:00 2001
 From: Igor Romanov <igor.romanov@oktetlabs.ru>
 Date: Thu, 24 Sep 2020 13:40:59 +0100
 Subject: [PATCH] net/sfc: fix RSS hash offload if queue action is used
 
+[ upstream commit 92a15fc541fcba1848933c4ba5c6e08f6330bc13 ]
+
 When RSS hash offload is requested, the ingress filters that forward
 packets to an RX queue must have an RSS context assigned to them to
 calculate RSS hash, which was not always provided.
@@ -13,7 +15,6 @@
 default RSS context are used.
 
 Fixes: 5d308972954c ("ethdev: add mbuf RSS update as an offload")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -28,10 +29,10 @@
  7 files changed, 105 insertions(+), 31 deletions(-)
 
 diff --git a/drivers/net/sfc/sfc.c b/drivers/net/sfc/sfc.c
-index 4be65c15dc..615e15af64 100644
+index 3f5cd7758b..da67acaa87 100644
 --- a/drivers/net/sfc/sfc.c
 +++ b/drivers/net/sfc/sfc.c
-@@ -685,6 +685,7 @@ sfc_rss_attach(struct sfc_adapter *sa)
+@@ -684,6 +684,7 @@ sfc_rss_attach(struct sfc_adapter *sa)
  	efx_intr_fini(sa->nic);
  
  	rte_memcpy(rss->key, default_rss_key, sizeof(rss->key));
@@ -40,10 +41,10 @@
  	return 0;
  
 diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h
-index fa7c79b80b..5ea29362e1 100644
+index cc52228771..bce6beefaa 100644
 --- a/drivers/net/sfc/sfc.h
 +++ b/drivers/net/sfc/sfc.h
-@@ -157,6 +157,8 @@ struct sfc_rss {
+@@ -172,6 +172,8 @@ struct sfc_rss {
  	efx_rx_hash_type_t		hash_types;
  	unsigned int			tbl[EFX_RSS_TBL_SIZE];
  	uint8_t				key[EFX_RSS_KEY_SIZE];
@@ -53,10 +54,10 @@
  
  /* Adapter private data shared by primary and secondary processes */
 diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
-index 6e6eb16860..602351bcc4 100644
+index f8867b0ec0..d33c476bd7 100644
 --- a/drivers/net/sfc/sfc_ethdev.c
 +++ b/drivers/net/sfc/sfc_ethdev.c
-@@ -1544,8 +1544,15 @@ sfc_dev_rss_hash_update(struct rte_eth_dev *dev,
+@@ -1515,8 +1515,15 @@ sfc_dev_rss_hash_update(struct rte_eth_dev *dev,
  	struct sfc_adapter *sa = sfc_adapter_by_eth_dev(dev);
  	struct sfc_rss *rss = &sfc_sa2shared(sa)->rss;
  	unsigned int efx_hash_types;
@@ -72,7 +73,7 @@
  	if (sfc_sa2shared(sa)->isolated)
  		return -ENOTSUP;
  
-@@ -1572,19 +1579,24 @@ sfc_dev_rss_hash_update(struct rte_eth_dev *dev,
+@@ -1543,19 +1550,24 @@ sfc_dev_rss_hash_update(struct rte_eth_dev *dev,
  	if (rc != 0)
  		goto fail_rx_hf_rte_to_efx;
  
@@ -107,7 +108,7 @@
  		}
  
  		rte_memcpy(rss->key, rss_conf->rss_key, sizeof(rss->key));
-@@ -1597,12 +1609,20 @@ sfc_dev_rss_hash_update(struct rte_eth_dev *dev,
+@@ -1568,12 +1580,20 @@ sfc_dev_rss_hash_update(struct rte_eth_dev *dev,
  	return 0;
  
  fail_scale_key_set:
@@ -133,41 +134,41 @@
  	sfc_adapter_unlock(sa);
  	return -rc;
 diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c
-index 1a3c0d618b..cb802d7991 100644
+index 023e55d951..91aa2a687a 100644
 --- a/drivers/net/sfc/sfc_flow.c
 +++ b/drivers/net/sfc/sfc_flow.c
-@@ -1293,6 +1293,7 @@ sfc_flow_parse_queue(struct sfc_adapter *sa,
- 	struct sfc_flow_spec *spec = &flow->spec;
- 	struct sfc_flow_spec_filter *spec_filter = &spec->filter;
+@@ -1240,6 +1240,7 @@ sfc_flow_parse_queue(struct sfc_adapter *sa,
+ 		     struct rte_flow *flow)
+ {
  	struct sfc_rxq *rxq;
 +	struct sfc_rxq_info *rxq_info;
  
  	if (queue->index >= sfc_sa2shared(sa)->rxq_count)
  		return -EINVAL;
-@@ -1300,6 +1301,10 @@ sfc_flow_parse_queue(struct sfc_adapter *sa,
+@@ -1247,6 +1248,10 @@ sfc_flow_parse_queue(struct sfc_adapter *sa,
  	rxq = &sa->rxq_ctrl[queue->index];
- 	spec_filter->template.efs_dmaq_id = (uint16_t)rxq->hw_index;
+ 	flow->spec.template.efs_dmaq_id = (uint16_t)rxq->hw_index;
  
 +	rxq_info = &sfc_sa2shared(sa)->rxq_info[queue->index];
-+	spec_filter->rss_hash_required = !!(rxq_info->rxq_flags &
++	flow->spec.rss_hash_required = !!(rxq_info->rxq_flags &
 +					    SFC_RXQ_FLAG_RSS_HASH);
 +
  	return 0;
  }
  
-@@ -1465,13 +1470,34 @@ sfc_flow_filter_insert(struct sfc_adapter *sa,
- 	struct sfc_flow_spec_filter *spec_filter = &flow->spec.filter;
- 	struct sfc_flow_rss *flow_rss = &spec_filter->rss_conf;
+@@ -1405,13 +1410,34 @@ sfc_flow_filter_insert(struct sfc_adapter *sa,
+ 	struct sfc_rss *rss = &sas->rss;
+ 	struct sfc_flow_rss *flow_rss = &flow->rss_conf;
  	uint32_t efs_rss_context = EFX_RSS_CONTEXT_DEFAULT;
 +	boolean_t create_context;
  	unsigned int i;
  	int rc = 0;
  
--	if (spec_filter->rss) {
+-	if (flow->rss) {
 -		unsigned int rss_spread = MIN(flow_rss->rxq_hw_index_max -
 -					      flow_rss->rxq_hw_index_min + 1,
 -					      EFX_MAXRSS);
-+	create_context = spec_filter->rss || (spec_filter->rss_hash_required &&
++	create_context = flow->rss || (flow->spec.rss_hash_required &&
 +			rss->dummy_rss_context == EFX_RSS_CONTEXT_DEFAULT);
 +
 +	if (create_context) {
@@ -175,7 +176,7 @@
 +		unsigned int rss_hash_types;
 +		uint8_t *rss_key;
 +
-+		if (spec_filter->rss) {
++		if (flow->rss) {
 +			rss_spread = MIN(flow_rss->rxq_hw_index_max -
 +					flow_rss->rxq_hw_index_min + 1,
 +					EFX_MAXRSS);
@@ -194,7 +195,7 @@
  
  		rc = efx_rx_scale_context_alloc(sa->nic,
  						EFX_RX_SCALE_EXCLUSIVE,
-@@ -1482,16 +1508,19 @@ sfc_flow_filter_insert(struct sfc_adapter *sa,
+@@ -1422,16 +1448,19 @@ sfc_flow_filter_insert(struct sfc_adapter *sa,
  
  		rc = efx_rx_scale_mode_set(sa->nic, efs_rss_context,
  					   rss->hash_alg,
@@ -213,36 +214,36 @@
 +		efs_rss_context = rss->dummy_rss_context;
 +	}
  
-+	if (spec_filter->rss || spec_filter->rss_hash_required) {
++	if (flow->rss || flow->spec.rss_hash_required) {
  		/*
  		 * At this point, fully elaborated filter specifications
  		 * have been produced from the template. To make sure that
-@@ -1502,8 +1531,9 @@ sfc_flow_filter_insert(struct sfc_adapter *sa,
- 			efx_filter_spec_t *spec = &spec_filter->filters[i];
+@@ -1442,8 +1471,9 @@ sfc_flow_filter_insert(struct sfc_adapter *sa,
+ 			efx_filter_spec_t *spec = &flow->spec.filters[i];
  
  			spec->efs_rss_context = efs_rss_context;
 -			spec->efs_dmaq_id = flow_rss->rxq_hw_index_min;
  			spec->efs_flags |= EFX_FILTER_FLAG_RX_RSS;
-+			if (spec_filter->rss)
++			if (flow->rss)
 +				spec->efs_dmaq_id = flow_rss->rxq_hw_index_min;
  		}
  	}
  
-@@ -1511,7 +1541,12 @@ sfc_flow_filter_insert(struct sfc_adapter *sa,
+@@ -1451,7 +1481,12 @@ sfc_flow_filter_insert(struct sfc_adapter *sa,
  	if (rc != 0)
  		goto fail_filter_insert;
  
--	if (spec_filter->rss) {
+-	if (flow->rss) {
 +	if (create_context) {
 +		unsigned int dummy_tbl[RTE_DIM(flow_rss->rss_tbl)] = {0};
 +		unsigned int *tbl;
 +
-+		tbl = spec_filter->rss ? flow_rss->rss_tbl : dummy_tbl;
++		tbl = flow->rss ? flow_rss->rss_tbl : dummy_tbl;
 +
  		/*
  		 * Scale table is set after filter insertion because
  		 * the table entries are relative to the base RxQ ID
-@@ -1521,10 +1556,13 @@ sfc_flow_filter_insert(struct sfc_adapter *sa,
+@@ -1461,10 +1496,13 @@ sfc_flow_filter_insert(struct sfc_adapter *sa,
  		 * the table entries, and the operation will succeed
  		 */
  		rc = efx_rx_scale_tbl_set(sa->nic, efs_rss_context,
@@ -253,12 +254,12 @@
  			goto fail_scale_tbl_set;
 +
 +		/* Remember created dummy RSS context */
-+		if (!spec_filter->rss)
++		if (!flow->rss)
 +			rss->dummy_rss_context = efs_rss_context;
  	}
  
  	return 0;
-@@ -1535,7 +1573,7 @@ fail_scale_tbl_set:
+@@ -1475,7 +1513,7 @@ fail_scale_tbl_set:
  fail_filter_insert:
  fail_scale_key_set:
  fail_scale_mode_set:
@@ -267,7 +268,7 @@
  		efx_rx_scale_context_free(sa->nic, efs_rss_context);
  
  fail_scale_context_alloc:
-@@ -2634,12 +2672,19 @@ sfc_flow_fini(struct sfc_adapter *sa)
+@@ -2474,12 +2512,19 @@ sfc_flow_fini(struct sfc_adapter *sa)
  void
  sfc_flow_stop(struct sfc_adapter *sa)
  {
@@ -277,8 +278,8 @@
  
  	SFC_ASSERT(sfc_adapter_is_locked(sa));
  
- 	TAILQ_FOREACH(flow, &sa->flow_list, entries)
- 		sfc_flow_remove(sa, flow, NULL);
+ 	TAILQ_FOREACH(flow, &sa->filter.flow_list, entries)
+ 		sfc_flow_filter_remove(sa, flow);
 +
 +	if (rss->dummy_rss_context != EFX_RSS_CONTEXT_DEFAULT) {
 +		efx_rx_scale_context_free(sa->nic, rss->dummy_rss_context);
@@ -288,20 +289,20 @@
  
  int
 diff --git a/drivers/net/sfc/sfc_flow.h b/drivers/net/sfc/sfc_flow.h
-index 5a7dad8f09..433c7a31e9 100644
+index 71ec18cb95..f59db0a468 100644
 --- a/drivers/net/sfc/sfc_flow.h
 +++ b/drivers/net/sfc/sfc_flow.h
-@@ -52,6 +52,8 @@ struct sfc_flow_spec_filter {
+@@ -43,6 +43,8 @@ struct sfc_flow_spec {
+ 	efx_filter_spec_t filters[SF_FLOW_SPEC_NB_FILTERS_MAX];
+ 	/* number of complete specifications */
  	unsigned int count;
- 	/* RSS toggle */
- 	boolean_t rss;
 +	/* RSS hash toggle */
 +	boolean_t rss_hash_required;
- 	/* RSS configuration */
- 	struct sfc_flow_rss rss_conf;
  };
+ 
+ /* PMD-specific definition of the opaque type from rte_flow.h */
 diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
-index dccafb163a..3e5c8e42da 100644
+index 3ecd8da8c9..9a1c368328 100644
 --- a/drivers/net/sfc/sfc_rx.c
 +++ b/drivers/net/sfc/sfc_rx.c
 @@ -1139,6 +1139,13 @@ sfc_rx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
@@ -332,7 +333,7 @@
  	info.rxq_hw_ring = rxq->mem.esm_base;
  	info.evq_hw_index = sfc_evq_index_by_rxq_sw_index(sa, sw_index);
 diff --git a/drivers/net/sfc/sfc_rx.h b/drivers/net/sfc/sfc_rx.h
-index 697ea29d62..b0b5327a49 100644
+index 42b16e2ee6..4c31cfbaa2 100644
 --- a/drivers/net/sfc/sfc_rx.h
 +++ b/drivers/net/sfc/sfc_rx.h
 @@ -115,6 +115,7 @@ struct sfc_rxq_info {

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

* [dpdk-stable] patch 'drivers/net: fix port id size' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (91 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/sfc: fix RSS hash offload if queue action is used' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'app: fix ethdev " luca.boccassi
                   ` (113 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Chenbo Xia; +Cc: Ajit Khaparde, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 41d5a9c17c01719d96a145910767584a12bc8fe6 Mon Sep 17 00:00:00 2001
From: Chenbo Xia <chenbo.xia@intel.com>
Date: Wed, 30 Sep 2020 12:23:26 +0800
Subject: [PATCH] drivers/net: fix port id size

[ upstream commit fac8177a3669ff63d9ecb04372539e93e1f96ebf ]

The ethdev port id should be 16 bits now. This patch changes the
variable size of port id in some net drivers from 8 bits to 16
bits.

Fixes: 09b23f8b9df6 ("net/bnxt: fix port stop process and cleanup resources")
Fixes: 769de16872ab ("net/bnxt: fix port default rule create/destroy")
Fixes: 50370662b727 ("net/ice: support device and queue ops")
Fixes: a50d7cbbdad7 ("net/qede: support registers dump")

Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/ice/ice_rxtx.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h
index 9e3d2cd076..041f00970d 100644
--- a/drivers/net/ice/ice_rxtx.h
+++ b/drivers/net/ice/ice_rxtx.h
@@ -66,7 +66,7 @@ struct ice_rx_queue {
 	uint16_t rxrearm_start;	/**< the idx we start the re-arming from */
 	uint64_t mbuf_initializer; /**< value to init mbufs */
 
-	uint8_t port_id; /* device port ID */
+	uint16_t port_id; /* device port ID */
 	uint8_t crc_len; /* 0 if CRC stripped, 4 otherwise */
 	uint16_t queue_id; /* RX queue index */
 	uint16_t reg_idx; /* RX queue register index */
@@ -109,7 +109,7 @@ struct ice_tx_queue {
 	uint8_t pthresh; /**< Prefetch threshold register. */
 	uint8_t hthresh; /**< Host threshold register. */
 	uint8_t wthresh; /**< Write-back threshold reg. */
-	uint8_t port_id; /* Device port identifier. */
+	uint16_t port_id; /* Device port identifier. */
 	uint16_t queue_id; /* TX queue index. */
 	uint32_t q_teid; /* TX schedule node id. */
 	uint16_t reg_idx;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.708075078 +0000
+++ 0094-drivers-net-fix-port-id-size.patch	2020-10-28 10:35:11.644832085 +0000
@@ -1,8 +1,10 @@
-From fac8177a3669ff63d9ecb04372539e93e1f96ebf Mon Sep 17 00:00:00 2001
+From 41d5a9c17c01719d96a145910767584a12bc8fe6 Mon Sep 17 00:00:00 2001
 From: Chenbo Xia <chenbo.xia@intel.com>
 Date: Wed, 30 Sep 2020 12:23:26 +0800
 Subject: [PATCH] drivers/net: fix port id size
 
+[ upstream commit fac8177a3669ff63d9ecb04372539e93e1f96ebf ]
+
 The ethdev port id should be 16 bits now. This patch changes the
 variable size of port id in some net drivers from 8 bits to 16
 bits.
@@ -11,77 +13,28 @@
 Fixes: 769de16872ab ("net/bnxt: fix port default rule create/destroy")
 Fixes: 50370662b727 ("net/ice: support device and queue ops")
 Fixes: a50d7cbbdad7 ("net/qede: support registers dump")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
 Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
 ---
- drivers/net/bnxt/tf_ulp/bnxt_ulp.c      | 2 +-
- drivers/net/bnxt/tf_ulp/ulp_def_rules.c | 6 +++---
- drivers/net/ice/ice_rxtx.h              | 4 ++--
- drivers/net/qede/base/bcm_osal.h        | 2 +-
- drivers/net/qede/qede_regs.c            | 2 +-
- 5 files changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
-index 93a79592d6..289619411f 100644
---- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
-+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
-@@ -646,7 +646,7 @@ static void
- bnxt_ulp_destroy_vfr_default_rules(struct bnxt *bp, bool global)
- {
- 	struct bnxt_ulp_vfr_rule_info *info;
--	uint8_t port_id;
-+	uint16_t port_id;
- 	struct rte_eth_dev *vfr_eth_dev;
- 	struct bnxt_representor *vfr_bp;
- 
-diff --git a/drivers/net/bnxt/tf_ulp/ulp_def_rules.c b/drivers/net/bnxt/tf_ulp/ulp_def_rules.c
-index f421e2ed6e..8dea235f0b 100644
---- a/drivers/net/bnxt/tf_ulp/ulp_def_rules.c
-+++ b/drivers/net/bnxt/tf_ulp/ulp_def_rules.c
-@@ -402,7 +402,7 @@ void
- bnxt_ulp_destroy_df_rules(struct bnxt *bp, bool global)
- {
- 	struct bnxt_ulp_df_rule_info *info;
--	uint8_t port_id;
-+	uint16_t port_id;
- 
- 	if (!BNXT_TRUFLOW_EN(bp) ||
- 	    BNXT_ETH_DEV_IS_REPRESENTOR(bp->eth_dev))
-@@ -466,7 +466,7 @@ int32_t
- bnxt_ulp_create_df_rules(struct bnxt *bp)
- {
- 	struct bnxt_ulp_df_rule_info *info;
--	uint8_t port_id;
-+	uint16_t port_id;
- 	int rc;
- 
- 	if (!BNXT_TRUFLOW_EN(bp) ||
-@@ -540,7 +540,7 @@ bnxt_ulp_create_vfr_default_rules(struct rte_eth_dev *vfr_ethdev)
- 	struct rte_eth_dev *parent_dev = vfr->parent_dev;
- 	struct bnxt *bp = parent_dev->data->dev_private;
- 	uint16_t vfr_port_id = vfr_ethdev->data->port_id;
--	uint8_t port_id;
-+	uint16_t port_id;
- 	int rc;
- 
- 	if (!bp || !BNXT_TRUFLOW_EN(bp))
+ drivers/net/ice/ice_rxtx.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
 diff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h
-index 6937faec3e..1c23c7541e 100644
+index 9e3d2cd076..041f00970d 100644
 --- a/drivers/net/ice/ice_rxtx.h
 +++ b/drivers/net/ice/ice_rxtx.h
-@@ -71,7 +71,7 @@ struct ice_rx_queue {
+@@ -66,7 +66,7 @@ struct ice_rx_queue {
  	uint16_t rxrearm_start;	/**< the idx we start the re-arming from */
  	uint64_t mbuf_initializer; /**< value to init mbufs */
  
 -	uint8_t port_id; /* device port ID */
 +	uint16_t port_id; /* device port ID */
  	uint8_t crc_len; /* 0 if CRC stripped, 4 otherwise */
- 	uint8_t fdir_enabled; /* 0 if FDIR disabled, 1 when enabled */
  	uint16_t queue_id; /* RX queue index */
-@@ -117,7 +117,7 @@ struct ice_tx_queue {
+ 	uint16_t reg_idx; /* RX queue register index */
+@@ -109,7 +109,7 @@ struct ice_tx_queue {
  	uint8_t pthresh; /**< Prefetch threshold register. */
  	uint8_t hthresh; /**< Host threshold register. */
  	uint8_t wthresh; /**< Write-back threshold reg. */
@@ -90,32 +43,6 @@
  	uint16_t queue_id; /* TX queue index. */
  	uint32_t q_teid; /* TX schedule node id. */
  	uint16_t reg_idx;
-diff --git a/drivers/net/qede/base/bcm_osal.h b/drivers/net/qede/base/bcm_osal.h
-index 575d4d0998..c5b5399282 100644
---- a/drivers/net/qede/base/bcm_osal.h
-+++ b/drivers/net/qede/base/bcm_osal.h
-@@ -382,7 +382,7 @@ void qede_hw_err_notify(struct ecore_hwfn *p_hwfn,
- /* TODO: */
- #define OSAL_SCHEDULE_RECOVERY_HANDLER(hwfn) nothing
- 
--int qede_save_fw_dump(uint8_t port_id);
-+int qede_save_fw_dump(uint16_t port_id);
- 
- #define OSAL_SAVE_FW_DUMP(port_id) qede_save_fw_dump(port_id)
- 
-diff --git a/drivers/net/qede/qede_regs.c b/drivers/net/qede/qede_regs.c
-index 1f2dbc6e7b..d2ea1c9108 100644
---- a/drivers/net/qede/qede_regs.c
-+++ b/drivers/net/qede/qede_regs.c
-@@ -242,7 +242,7 @@ qede_write_fwdump(const char *dump_file, void *dump, size_t len)
- }
- 
- int
--qede_save_fw_dump(uint8_t port_id)
-+qede_save_fw_dump(uint16_t port_id)
- {
- 	struct rte_eth_dev *eth_dev = &rte_eth_devices[port_id];
- 	struct rte_dev_reg_info regs;
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'app: fix ethdev port id size' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (92 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'drivers/net: fix port id size' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'doc: " luca.boccassi
                   ` (112 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Chenbo Xia; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 8a2fbac4059e7f2fedd493276a03b9b9a414d695 Mon Sep 17 00:00:00 2001
From: Chenbo Xia <chenbo.xia@intel.com>
Date: Wed, 30 Sep 2020 12:23:27 +0800
Subject: [PATCH] app: fix ethdev port id size

[ upstream commit 9b539662437c0bbd385329bf077224cbb83d0c48 ]

The ethdev port id should be 16 bits now. This patch changes the
variable size of port id in applications from 8 bits to 16 bits.

Fixes: e977e4199a8d ("app/testpmd: add commands to load/unload BPF filters")
Fixes: 46cf97e4bbfa ("eventdev: add test for eth Tx adapter")

Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/bpf_cmd.c               | 4 ++--
 app/test/test_event_eth_tx_adapter.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/bpf_cmd.c b/app/test-pmd/bpf_cmd.c
index 830bfc13a5..d2deadd4e6 100644
--- a/app/test-pmd/bpf_cmd.c
+++ b/app/test-pmd/bpf_cmd.c
@@ -55,7 +55,7 @@ static const struct rte_bpf_xsym bpf_xsym[] = {
 struct cmd_bpf_ld_result {
 	cmdline_fixed_string_t bpf;
 	cmdline_fixed_string_t dir;
-	uint8_t port;
+	uint16_t port;
 	uint16_t queue;
 	cmdline_fixed_string_t op;
 	cmdline_fixed_string_t flags;
@@ -153,7 +153,7 @@ cmdline_parse_inst_t cmd_operate_bpf_ld_parse = {
 struct cmd_bpf_unld_result {
 	cmdline_fixed_string_t bpf;
 	cmdline_fixed_string_t dir;
-	uint8_t port;
+	uint16_t port;
 	uint16_t queue;
 };
 
diff --git a/app/test/test_event_eth_tx_adapter.c b/app/test/test_event_eth_tx_adapter.c
index 3af749280a..7073030902 100644
--- a/app/test/test_event_eth_tx_adapter.c
+++ b/app/test/test_event_eth_tx_adapter.c
@@ -45,7 +45,7 @@ static uint64_t eid = ~0ULL;
 static uint32_t tid;
 
 static inline int
-port_init_common(uint8_t port, const struct rte_eth_conf *port_conf,
+port_init_common(uint16_t port, const struct rte_eth_conf *port_conf,
 		struct rte_mempool *mp)
 {
 	const uint16_t rx_ring_size = RING_SIZE, tx_ring_size = RING_SIZE;
@@ -104,7 +104,7 @@ port_init_common(uint8_t port, const struct rte_eth_conf *port_conf,
 }
 
 static inline int
-port_init(uint8_t port, struct rte_mempool *mp)
+port_init(uint16_t port, struct rte_mempool *mp)
 {
 	struct rte_eth_conf conf = { 0 };
 	return port_init_common(port, &conf, mp);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.739735900 +0000
+++ 0095-app-fix-ethdev-port-id-size.patch	2020-10-28 10:35:11.648832144 +0000
@@ -1,14 +1,15 @@
-From 9b539662437c0bbd385329bf077224cbb83d0c48 Mon Sep 17 00:00:00 2001
+From 8a2fbac4059e7f2fedd493276a03b9b9a414d695 Mon Sep 17 00:00:00 2001
 From: Chenbo Xia <chenbo.xia@intel.com>
 Date: Wed, 30 Sep 2020 12:23:27 +0800
 Subject: [PATCH] app: fix ethdev port id size
 
+[ upstream commit 9b539662437c0bbd385329bf077224cbb83d0c48 ]
+
 The ethdev port id should be 16 bits now. This patch changes the
 variable size of port id in applications from 8 bits to 16 bits.
 
 Fixes: e977e4199a8d ("app/testpmd: add commands to load/unload BPF filters")
 Fixes: 46cf97e4bbfa ("eventdev: add test for eth Tx adapter")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -18,7 +19,7 @@
  2 files changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/app/test-pmd/bpf_cmd.c b/app/test-pmd/bpf_cmd.c
-index 0f984ccf4a..16e3c3b3b3 100644
+index 830bfc13a5..d2deadd4e6 100644
 --- a/app/test-pmd/bpf_cmd.c
 +++ b/app/test-pmd/bpf_cmd.c
 @@ -55,7 +55,7 @@ static const struct rte_bpf_xsym bpf_xsym[] = {

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

* [dpdk-stable] patch 'doc: fix ethdev port id size' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (93 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'app: fix ethdev " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'examples/vhost_blk: check driver start failure' " luca.boccassi
                   ` (111 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Chenbo Xia; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 076663a6d35318e78732028aeefa22a30b668288 Mon Sep 17 00:00:00 2001
From: Chenbo Xia <chenbo.xia@intel.com>
Date: Wed, 30 Sep 2020 12:23:28 +0800
Subject: [PATCH] doc: fix ethdev port id size

[ upstream commit ea87c337e59c855f5949029f7f9259329824d515 ]

The ethdev port id should be 16 bits now. This patch changes the
variable size of port id in docs from 8 bits to 16 bits.

Fixes: fdec9301f52d ("doc: add flow classify guides")
Fixes: 4a3ef59a10c8 ("examples/flow_filtering: add simple demo of flow API")

Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 doc/guides/sample_app_ug/flow_classify.rst  | 2 +-
 doc/guides/sample_app_ug/flow_filtering.rst | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/guides/sample_app_ug/flow_classify.rst b/doc/guides/sample_app_ug/flow_classify.rst
index bc234b50a7..451a0db88f 100644
--- a/doc/guides/sample_app_ug/flow_classify.rst
+++ b/doc/guides/sample_app_ug/flow_classify.rst
@@ -271,7 +271,7 @@ Forwarding application is shown below:
 .. code-block:: c
 
     static inline int
-    port_init(uint8_t port, struct rte_mempool *mbuf_pool)
+    port_init(uint16_t port, struct rte_mempool *mbuf_pool)
     {
         struct rte_eth_conf port_conf = port_conf_default;
         const uint16_t rx_rings = 1, tx_rings = 1;
diff --git a/doc/guides/sample_app_ug/flow_filtering.rst b/doc/guides/sample_app_ug/flow_filtering.rst
index 5e5a6cd8a0..d3653e57b2 100644
--- a/doc/guides/sample_app_ug/flow_filtering.rst
+++ b/doc/guides/sample_app_ug/flow_filtering.rst
@@ -384,7 +384,7 @@ This function is located in the ``flow_blocks.c`` file.
 .. code-block:: c
 
    static struct rte_flow *
-   generate_ipv4_flow(uint8_t port_id, uint16_t rx_q,
+   generate_ipv4_flow(uint16_t port_id, uint16_t rx_q,
                    uint32_t src_ip, uint32_t src_mask,
                    uint32_t dest_ip, uint32_t dest_mask,
                    struct rte_flow_error *error)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.769758836 +0000
+++ 0096-doc-fix-ethdev-port-id-size.patch	2020-10-28 10:35:11.648832144 +0000
@@ -1,14 +1,15 @@
-From ea87c337e59c855f5949029f7f9259329824d515 Mon Sep 17 00:00:00 2001
+From 076663a6d35318e78732028aeefa22a30b668288 Mon Sep 17 00:00:00 2001
 From: Chenbo Xia <chenbo.xia@intel.com>
 Date: Wed, 30 Sep 2020 12:23:28 +0800
 Subject: [PATCH] doc: fix ethdev port id size
 
+[ upstream commit ea87c337e59c855f5949029f7f9259329824d515 ]
+
 The ethdev port id should be 16 bits now. This patch changes the
 variable size of port id in docs from 8 bits to 16 bits.
 
 Fixes: fdec9301f52d ("doc: add flow classify guides")
 Fixes: 4a3ef59a10c8 ("examples/flow_filtering: add simple demo of flow API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chenbo Xia <chenbo.xia@intel.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -18,7 +19,7 @@
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/doc/guides/sample_app_ug/flow_classify.rst b/doc/guides/sample_app_ug/flow_classify.rst
-index dc40b4d6f9..31175cff0a 100644
+index bc234b50a7..451a0db88f 100644
 --- a/doc/guides/sample_app_ug/flow_classify.rst
 +++ b/doc/guides/sample_app_ug/flow_classify.rst
 @@ -271,7 +271,7 @@ Forwarding application is shown below:

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

* [dpdk-stable] patch 'examples/vhost_blk: check driver start failure' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (94 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'doc: " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/virtio: fix packed ring indirect descricptors setup' " luca.boccassi
                   ` (110 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From abe125b262bf316c05576f549a0bfc47e396b140 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Fri, 25 Sep 2020 19:22:06 +0800
Subject: [PATCH] examples/vhost_blk: check driver start failure

[ upstream commit dc9e658013d9c2be798f9ff43b8cd2c63c844f17 ]

This checks the return value from the function
rte_vhost_driver_start.

Coverity issue: 362027
Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 examples/vhost_blk/vhost_blk.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c
index b757c9228b..32c88628c4 100644
--- a/examples/vhost_blk/vhost_blk.c
+++ b/examples/vhost_blk/vhost_blk.c
@@ -1082,7 +1082,11 @@ int main(int argc, char *argv[])
 		return -1;
 	}
 
-	rte_vhost_driver_start(dev_pathname);
+	ret = rte_vhost_driver_start(dev_pathname);
+	if (ret < 0) {
+		fprintf(stderr, "Failed to start vhost driver.\n");
+		return -1;
+	}
 
 	/* loop for exit the application */
 	while (1)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.798644296 +0000
+++ 0097-examples-vhost_blk-check-driver-start-failure.patch	2020-10-28 10:35:11.648832144 +0000
@@ -1,14 +1,15 @@
-From dc9e658013d9c2be798f9ff43b8cd2c63c844f17 Mon Sep 17 00:00:00 2001
+From abe125b262bf316c05576f549a0bfc47e396b140 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Fri, 25 Sep 2020 19:22:06 +0800
 Subject: [PATCH] examples/vhost_blk: check driver start failure
 
+[ upstream commit dc9e658013d9c2be798f9ff43b8cd2c63c844f17 ]
+
 This checks the return value from the function
 rte_vhost_driver_start.
 
 Coverity issue: 362027
 Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
@@ -17,12 +18,12 @@
  1 file changed, 5 insertions(+), 1 deletion(-)
 
 diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c
-index f4c59437a0..8f5d61a589 100644
+index b757c9228b..32c88628c4 100644
 --- a/examples/vhost_blk/vhost_blk.c
 +++ b/examples/vhost_blk/vhost_blk.c
-@@ -877,7 +877,11 @@ int main(int argc, char *argv[])
- 
- 	signal(SIGINT, signal_handler);
+@@ -1082,7 +1082,11 @@ int main(int argc, char *argv[])
+ 		return -1;
+ 	}
  
 -	rte_vhost_driver_start(dev_pathname);
 +	ret = rte_vhost_driver_start(dev_pathname);

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

* [dpdk-stable] patch 'net/virtio: fix packed ring indirect descricptors setup' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (95 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'examples/vhost_blk: check driver start failure' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'vdpa/ifc: fix build with recent kernels' " luca.boccassi
                   ` (109 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Marvin Liu; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From c39ba61a44ed25a899b5a1d68029b2d2bb830345 Mon Sep 17 00:00:00 2001
From: Marvin Liu <yong.liu@intel.com>
Date: Mon, 28 Sep 2020 16:20:51 +0800
Subject: [PATCH] net/virtio: fix packed ring indirect descricptors setup

[ upstream commit 381f39ebb78a35d8dcc2d4500419644c7de5400f ]

Add packed indirect descriptors format into virtio Tx
region. When initializing vring, packed indirect
descriptors will be initialized if ring type is packed.

Fixes: bc80357cd677 ("net/virtio: drop unused field in Tx region structure")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_ethdev.c | 13 +++++++++++--
 drivers/net/virtio/virtqueue.h     | 17 +++++++++++++++--
 2 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 35203940a7..8a107ebf9e 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -610,10 +610,9 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx)
 		txr = hdr_mz->addr;
 		memset(txr, 0, vq_size * sizeof(*txr));
 		for (i = 0; i < vq_size; i++) {
-			struct vring_desc *start_dp = txr[i].tx_indir;
-
 			/* first indirect descriptor is always the tx header */
 			if (!vtpci_packed_queue(hw)) {
+				struct vring_desc *start_dp = txr[i].tx_indir;
 				vring_desc_init_split(start_dp,
 						      RTE_DIM(txr[i].tx_indir));
 				start_dp->addr = txvq->virtio_net_hdr_mem
@@ -622,6 +621,16 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx)
 						   tx_hdr);
 				start_dp->len = hw->vtnet_hdr_size;
 				start_dp->flags = VRING_DESC_F_NEXT;
+			} else {
+				struct vring_packed_desc *start_dp =
+					txr[i].tx_packed_indir;
+				vring_desc_init_indirect_packed(start_dp,
+				      RTE_DIM(txr[i].tx_packed_indir));
+				start_dp->addr = txvq->virtio_net_hdr_mem
+					+ i * sizeof(*txr)
+					+ offsetof(struct virtio_tx_region,
+						   tx_hdr);
+				start_dp->len = hw->vtnet_hdr_size;
 			}
 		}
 	}
diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
index 58ad7309ae..e901249601 100644
--- a/drivers/net/virtio/virtqueue.h
+++ b/drivers/net/virtio/virtqueue.h
@@ -324,8 +324,11 @@ struct virtio_net_hdr_mrg_rxbuf {
 #define VIRTIO_MAX_TX_INDIRECT 8
 struct virtio_tx_region {
 	struct virtio_net_hdr_mrg_rxbuf tx_hdr;
-	struct vring_desc tx_indir[VIRTIO_MAX_TX_INDIRECT]
-		__attribute__((__aligned__(16)));
+	union {
+		struct vring_desc tx_indir[VIRTIO_MAX_TX_INDIRECT];
+		struct vring_packed_desc
+			tx_packed_indir[VIRTIO_MAX_TX_INDIRECT];
+	} __attribute__((__aligned__(16)));
 };
 
 static inline int
@@ -363,6 +366,16 @@ vring_desc_init_split(struct vring_desc *dp, uint16_t n)
 	dp[i].next = VQ_RING_DESC_CHAIN_END;
 }
 
+static inline void
+vring_desc_init_indirect_packed(struct vring_packed_desc *dp, int n)
+{
+	int i;
+	for (i = 0; i < n; i++) {
+		dp[i].id = (uint16_t)i;
+		dp[i].flags = VRING_DESC_F_WRITE;
+	}
+}
+
 /**
  * Tell the backend not to interrupt us. Implementation for packed virtqueues.
  */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.827590704 +0000
+++ 0098-net-virtio-fix-packed-ring-indirect-descricptors-set.patch	2020-10-28 10:35:11.652832202 +0000
@@ -1,14 +1,15 @@
-From 381f39ebb78a35d8dcc2d4500419644c7de5400f Mon Sep 17 00:00:00 2001
+From c39ba61a44ed25a899b5a1d68029b2d2bb830345 Mon Sep 17 00:00:00 2001
 From: Marvin Liu <yong.liu@intel.com>
 Date: Mon, 28 Sep 2020 16:20:51 +0800
 Subject: [PATCH] net/virtio: fix packed ring indirect descricptors setup
 
+[ upstream commit 381f39ebb78a35d8dcc2d4500419644c7de5400f ]
+
 Add packed indirect descriptors format into virtio Tx
 region. When initializing vring, packed indirect
 descriptors will be initialized if ring type is packed.
 
 Fixes: bc80357cd677 ("net/virtio: drop unused field in Tx region structure")
-Cc: stable@dpdk.org
 
 Signed-off-by: Marvin Liu <yong.liu@intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -18,10 +19,10 @@
  2 files changed, 26 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
-index 1eb3240d89..0236c756dc 100644
+index 35203940a7..8a107ebf9e 100644
 --- a/drivers/net/virtio/virtio_ethdev.c
 +++ b/drivers/net/virtio/virtio_ethdev.c
-@@ -609,10 +609,9 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx)
+@@ -610,10 +610,9 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx)
  		txr = hdr_mz->addr;
  		memset(txr, 0, vq_size * sizeof(*txr));
  		for (i = 0; i < vq_size; i++) {
@@ -33,7 +34,7 @@
  				vring_desc_init_split(start_dp,
  						      RTE_DIM(txr[i].tx_indir));
  				start_dp->addr = txvq->virtio_net_hdr_mem
-@@ -621,6 +620,16 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx)
+@@ -622,6 +621,16 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx)
  						   tx_hdr);
  				start_dp->len = hw->vtnet_hdr_size;
  				start_dp->flags = VRING_DESC_F_NEXT;
@@ -51,24 +52,24 @@
  		}
  	}
 diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
-index 738b1a519c..a41363219d 100644
+index 58ad7309ae..e901249601 100644
 --- a/drivers/net/virtio/virtqueue.h
 +++ b/drivers/net/virtio/virtqueue.h
-@@ -329,8 +329,11 @@ struct virtio_net_hdr_mrg_rxbuf {
+@@ -324,8 +324,11 @@ struct virtio_net_hdr_mrg_rxbuf {
  #define VIRTIO_MAX_TX_INDIRECT 8
  struct virtio_tx_region {
  	struct virtio_net_hdr_mrg_rxbuf tx_hdr;
 -	struct vring_desc tx_indir[VIRTIO_MAX_TX_INDIRECT]
--		__rte_aligned(16);
+-		__attribute__((__aligned__(16)));
 +	union {
 +		struct vring_desc tx_indir[VIRTIO_MAX_TX_INDIRECT];
 +		struct vring_packed_desc
 +			tx_packed_indir[VIRTIO_MAX_TX_INDIRECT];
-+	} __rte_aligned(16);
++	} __attribute__((__aligned__(16)));
  };
  
  static inline int
-@@ -368,6 +371,16 @@ vring_desc_init_split(struct vring_desc *dp, uint16_t n)
+@@ -363,6 +366,16 @@ vring_desc_init_split(struct vring_desc *dp, uint16_t n)
  	dp[i].next = VQ_RING_DESC_CHAIN_END;
  }
  

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

* [dpdk-stable] patch 'vdpa/ifc: fix build with recent kernels' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (96 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/virtio: fix packed ring indirect descricptors setup' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'vfio: fix group descriptor check' " luca.boccassi
                   ` (108 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Brandon Lo, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From b0cad9cfe65a03af49b7506a16127a8d5b24961e Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Fri, 2 Oct 2020 09:54:00 +0200
Subject: [PATCH] vdpa/ifc: fix build with recent kernels

[ upstream commit 4e1b5092ad1ce3e3bd66eb20a9976d027e424b0a ]

VIRTIO_F_IOMMU_PLATFORM is now defined in recent kernel
headers, causing build issue.

Let's define it in the IFC vDPA driver only if it wasn't already.

Fixes: a3f8150eac6d ("net/ifcvf: add ifcvf vDPA driver")

Reported-by: Brandon Lo <blo@iol.unh.edu>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/ifc/base/ifcvf.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ifc/base/ifcvf.h b/drivers/net/ifc/base/ifcvf.h
index 9be2770fea..3f7497bd02 100644
--- a/drivers/net/ifc/base/ifcvf.h
+++ b/drivers/net/ifc/base/ifcvf.h
@@ -13,7 +13,10 @@
 #define IFCVF_SUBSYS_DEVICE_ID	0x001A
 
 #define IFCVF_MAX_QUEUES		1
+
+#ifndef VIRTIO_F_IOMMU_PLATFORM
 #define VIRTIO_F_IOMMU_PLATFORM		33
+#endif
 
 /* Common configuration */
 #define IFCVF_PCI_CAP_COMMON_CFG	1
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.858988377 +0000
+++ 0099-vdpa-ifc-fix-build-with-recent-kernels.patch	2020-10-28 10:35:11.652832202 +0000
@@ -1,27 +1,28 @@
-From 4e1b5092ad1ce3e3bd66eb20a9976d027e424b0a Mon Sep 17 00:00:00 2001
+From b0cad9cfe65a03af49b7506a16127a8d5b24961e Mon Sep 17 00:00:00 2001
 From: Maxime Coquelin <maxime.coquelin@redhat.com>
 Date: Fri, 2 Oct 2020 09:54:00 +0200
 Subject: [PATCH] vdpa/ifc: fix build with recent kernels
 
+[ upstream commit 4e1b5092ad1ce3e3bd66eb20a9976d027e424b0a ]
+
 VIRTIO_F_IOMMU_PLATFORM is now defined in recent kernel
 headers, causing build issue.
 
 Let's define it in the IFC vDPA driver only if it wasn't already.
 
 Fixes: a3f8150eac6d ("net/ifcvf: add ifcvf vDPA driver")
-Cc: stable@dpdk.org
 
 Reported-by: Brandon Lo <blo@iol.unh.edu>
 Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
 Acked-by: David Marchand <david.marchand@redhat.com>
 ---
- drivers/vdpa/ifc/base/ifcvf.h | 3 +++
+ drivers/net/ifc/base/ifcvf.h | 3 +++
  1 file changed, 3 insertions(+)
 
-diff --git a/drivers/vdpa/ifc/base/ifcvf.h b/drivers/vdpa/ifc/base/ifcvf.h
-index a288ce57dc..573a35ffb4 100644
---- a/drivers/vdpa/ifc/base/ifcvf.h
-+++ b/drivers/vdpa/ifc/base/ifcvf.h
+diff --git a/drivers/net/ifc/base/ifcvf.h b/drivers/net/ifc/base/ifcvf.h
+index 9be2770fea..3f7497bd02 100644
+--- a/drivers/net/ifc/base/ifcvf.h
++++ b/drivers/net/ifc/base/ifcvf.h
 @@ -13,7 +13,10 @@
  #define IFCVF_SUBSYS_DEVICE_ID	0x001A
  

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

* [dpdk-stable] patch 'vfio: fix group descriptor check' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (97 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'vdpa/ifc: fix build with recent kernels' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'bus/fslmc: fix VFIO " luca.boccassi
                   ` (107 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 06077f1238d574eb85e8b9430af82afc42768817 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 19 May 2020 11:42:00 +0800
Subject: [PATCH] vfio: fix group descriptor check

[ upstream commit 1f16fa99aa36e043e395184d6ad37a348eafeba7 ]

The issue is that a file descriptor at 0 is a valid one. Currently
the file not found, the return value will be set to 0. As a result,
it is impossible to distinguish between a correct descriptor and a
failed return value. Fix it to return -ENOENT instead of 0.

Fixes: b758423bc4fe ("vfio: fix race condition with sysfs")
Fixes: ff0b67d1c868 ("vfio: DMA mapping")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/linux/eal/eal_vfio.c         | 23 ++++++++++++---------
 lib/librte_eal/linux/eal/eal_vfio_mp_sync.c |  4 ++--
 2 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/lib/librte_eal/linux/eal/eal_vfio.c b/lib/librte_eal/linux/eal/eal_vfio.c
index 289f066508..1be02e7f13 100644
--- a/lib/librte_eal/linux/eal/eal_vfio.c
+++ b/lib/librte_eal/linux/eal/eal_vfio.c
@@ -293,7 +293,7 @@ vfio_open_group_fd(int iommu_group_num)
 							strerror(errno));
 					return -1;
 				}
-				return 0;
+				return -ENOENT;
 			}
 			/* noiommu group found */
 		}
@@ -318,12 +318,12 @@ vfio_open_group_fd(int iommu_group_num)
 			vfio_group_fd = mp_rep->fds[0];
 		} else if (p->result == SOCKET_NO_FD) {
 			RTE_LOG(ERR, EAL, "  bad VFIO group fd\n");
-			vfio_group_fd = 0;
+			vfio_group_fd = -ENOENT;
 		}
 	}
 
 	free(mp_reply.msgs);
-	if (vfio_group_fd < 0)
+	if (vfio_group_fd < 0 && vfio_group_fd != -ENOENT)
 		RTE_LOG(ERR, EAL, "  cannot request group fd\n");
 	return vfio_group_fd;
 }
@@ -379,9 +379,9 @@ vfio_get_group_fd(struct vfio_config *vfio_cfg,
 	}
 
 	vfio_group_fd = vfio_open_group_fd(iommu_group_num);
-	if (vfio_group_fd <= 0) {
+	if (vfio_group_fd < 0) {
 		RTE_LOG(ERR, EAL, "Failed to open group %d\n", iommu_group_num);
-		return -1;
+		return vfio_group_fd;
 	}
 
 	cur_grp->group_num = iommu_group_num;
@@ -728,11 +728,14 @@ rte_vfio_setup_device(const char *sysfs_base, const char *dev_addr,
 
 	/* get the actual group fd */
 	vfio_group_fd = rte_vfio_get_group_fd(iommu_group_num);
-	if (vfio_group_fd < 0)
+	if (vfio_group_fd < 0 && vfio_group_fd != -ENOENT)
 		return -1;
 
-	/* if group_fd == 0, that means the device isn't managed by VFIO */
-	if (vfio_group_fd == 0) {
+	/*
+	 * if vfio_group_fd == -ENOENT, that means the device
+	 * isn't managed by VFIO
+	 */
+	if (vfio_group_fd == -ENOENT) {
 		RTE_LOG(WARNING, EAL, " %s not managed by VFIO driver, skipping\n",
 				dev_addr);
 		return 1;
@@ -952,10 +955,10 @@ rte_vfio_release_device(const char *sysfs_base, const char *dev_addr,
 
 	/* get the actual group fd */
 	vfio_group_fd = rte_vfio_get_group_fd(iommu_group_num);
-	if (vfio_group_fd <= 0) {
+	if (vfio_group_fd < 0) {
 		RTE_LOG(INFO, EAL, "rte_vfio_get_group_fd failed for %s\n",
 				   dev_addr);
-		ret = -1;
+		ret = vfio_group_fd;
 		goto out;
 	}
 
diff --git a/lib/librte_eal/linux/eal/eal_vfio_mp_sync.c b/lib/librte_eal/linux/eal/eal_vfio_mp_sync.c
index 5f2a5fc1d9..6254696ae5 100644
--- a/lib/librte_eal/linux/eal/eal_vfio_mp_sync.c
+++ b/lib/librte_eal/linux/eal/eal_vfio_mp_sync.c
@@ -44,9 +44,9 @@ vfio_mp_primary(const struct rte_mp_msg *msg, const void *peer)
 		r->req = SOCKET_REQ_GROUP;
 		r->group_num = m->group_num;
 		fd = rte_vfio_get_group_fd(m->group_num);
-		if (fd < 0)
+		if (fd < 0 && fd != -ENOENT)
 			r->result = SOCKET_ERR;
-		else if (fd == 0)
+		else if (fd == -ENOENT)
 			/* if VFIO group exists but isn't bound to VFIO driver */
 			r->result = SOCKET_NO_FD;
 		else {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.887278703 +0000
+++ 0100-vfio-fix-group-descriptor-check.patch	2020-10-28 10:35:11.652832202 +0000
@@ -1,8 +1,10 @@
-From 1f16fa99aa36e043e395184d6ad37a348eafeba7 Mon Sep 17 00:00:00 2001
+From 06077f1238d574eb85e8b9430af82afc42768817 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Tue, 19 May 2020 11:42:00 +0800
 Subject: [PATCH] vfio: fix group descriptor check
 
+[ upstream commit 1f16fa99aa36e043e395184d6ad37a348eafeba7 ]
+
 The issue is that a file descriptor at 0 is a valid one. Currently
 the file not found, the return value will be set to 0. As a result,
 it is impossible to distinguish between a correct descriptor and a
@@ -10,20 +12,19 @@
 
 Fixes: b758423bc4fe ("vfio: fix race condition with sysfs")
 Fixes: ff0b67d1c868 ("vfio: DMA mapping")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
 ---
- lib/librte_eal/linux/eal_vfio.c         | 23 +++++++++++++----------
- lib/librte_eal/linux/eal_vfio_mp_sync.c |  4 ++--
+ lib/librte_eal/linux/eal/eal_vfio.c         | 23 ++++++++++++---------
+ lib/librte_eal/linux/eal/eal_vfio_mp_sync.c |  4 ++--
  2 files changed, 15 insertions(+), 12 deletions(-)
 
-diff --git a/lib/librte_eal/linux/eal_vfio.c b/lib/librte_eal/linux/eal_vfio.c
-index e07979936e..380f2f44aa 100644
---- a/lib/librte_eal/linux/eal_vfio.c
-+++ b/lib/librte_eal/linux/eal_vfio.c
-@@ -295,7 +295,7 @@ vfio_open_group_fd(int iommu_group_num)
+diff --git a/lib/librte_eal/linux/eal/eal_vfio.c b/lib/librte_eal/linux/eal/eal_vfio.c
+index 289f066508..1be02e7f13 100644
+--- a/lib/librte_eal/linux/eal/eal_vfio.c
++++ b/lib/librte_eal/linux/eal/eal_vfio.c
+@@ -293,7 +293,7 @@ vfio_open_group_fd(int iommu_group_num)
  							strerror(errno));
  					return -1;
  				}
@@ -32,7 +33,7 @@
  			}
  			/* noiommu group found */
  		}
-@@ -320,12 +320,12 @@ vfio_open_group_fd(int iommu_group_num)
+@@ -318,12 +318,12 @@ vfio_open_group_fd(int iommu_group_num)
  			vfio_group_fd = mp_rep->fds[0];
  		} else if (p->result == SOCKET_NO_FD) {
  			RTE_LOG(ERR, EAL, "  bad VFIO group fd\n");
@@ -47,7 +48,7 @@
  		RTE_LOG(ERR, EAL, "  cannot request group fd\n");
  	return vfio_group_fd;
  }
-@@ -381,9 +381,9 @@ vfio_get_group_fd(struct vfio_config *vfio_cfg,
+@@ -379,9 +379,9 @@ vfio_get_group_fd(struct vfio_config *vfio_cfg,
  	}
  
  	vfio_group_fd = vfio_open_group_fd(iommu_group_num);
@@ -59,7 +60,7 @@
  	}
  
  	cur_grp->group_num = iommu_group_num;
-@@ -733,11 +733,14 @@ rte_vfio_setup_device(const char *sysfs_base, const char *dev_addr,
+@@ -728,11 +728,14 @@ rte_vfio_setup_device(const char *sysfs_base, const char *dev_addr,
  
  	/* get the actual group fd */
  	vfio_group_fd = rte_vfio_get_group_fd(iommu_group_num);
@@ -77,7 +78,7 @@
  		RTE_LOG(WARNING, EAL, " %s not managed by VFIO driver, skipping\n",
  				dev_addr);
  		return 1;
-@@ -975,10 +978,10 @@ rte_vfio_release_device(const char *sysfs_base, const char *dev_addr,
+@@ -952,10 +955,10 @@ rte_vfio_release_device(const char *sysfs_base, const char *dev_addr,
  
  	/* get the actual group fd */
  	vfio_group_fd = rte_vfio_get_group_fd(iommu_group_num);
@@ -90,10 +91,10 @@
  		goto out;
  	}
  
-diff --git a/lib/librte_eal/linux/eal_vfio_mp_sync.c b/lib/librte_eal/linux/eal_vfio_mp_sync.c
+diff --git a/lib/librte_eal/linux/eal/eal_vfio_mp_sync.c b/lib/librte_eal/linux/eal/eal_vfio_mp_sync.c
 index 5f2a5fc1d9..6254696ae5 100644
---- a/lib/librte_eal/linux/eal_vfio_mp_sync.c
-+++ b/lib/librte_eal/linux/eal_vfio_mp_sync.c
+--- a/lib/librte_eal/linux/eal/eal_vfio_mp_sync.c
++++ b/lib/librte_eal/linux/eal/eal_vfio_mp_sync.c
 @@ -44,9 +44,9 @@ vfio_mp_primary(const struct rte_mp_msg *msg, const void *peer)
  		r->req = SOCKET_REQ_GROUP;
  		r->group_num = m->group_num;

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

* [dpdk-stable] patch 'bus/fslmc: fix VFIO group descriptor check' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (98 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'vfio: fix group descriptor check' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'bus/pci: fix memory leak when unmapping VFIO resource' " luca.boccassi
                   ` (106 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Anatoly Burakov, Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 9bff5af5271ac690d2b5ca9640ce0cc2d9bcb3e6 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Tue, 19 May 2020 11:42:12 +0800
Subject: [PATCH] bus/fslmc: fix VFIO group descriptor check

[ upstream commit 4b10ae80272b1bec113fbf5848065b66f030c327 ]

The issue is that a file descriptor at 0 is a valid one. Currently
the file not found, the return value will be set to 0. As a result,
it is impossible to distinguish between a correct descriptor and a
failed return value. Fix it to return -ENOENT instead of 0.

Fixes: a69f79300262 ("bus/fslmc: support multi VFIO group")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/fslmc_vfio.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index abf2338440..bf9e3e49a5 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -448,11 +448,14 @@ fslmc_vfio_setup_device(const char *sysfs_base, const char *dev_addr,
 
 	/* get the actual group fd */
 	vfio_group_fd = rte_vfio_get_group_fd(iommu_group_no);
-	if (vfio_group_fd < 0)
+	if (vfio_group_fd < 0 && vfio_group_fd != -ENOENT)
 		return -1;
 
-	/* if group_fd == 0, that means the device isn't managed by VFIO */
-	if (vfio_group_fd == 0) {
+	/*
+	 * if vfio_group_fd == -ENOENT, that means the device
+	 * isn't managed by VFIO
+	 */
+	if (vfio_group_fd == -ENOENT) {
 		RTE_LOG(WARNING, EAL, " %s not managed by VFIO driver, skipping\n",
 				dev_addr);
 		return 1;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.917830698 +0000
+++ 0101-bus-fslmc-fix-VFIO-group-descriptor-check.patch	2020-10-28 10:35:11.656832261 +0000
@@ -1,15 +1,16 @@
-From 4b10ae80272b1bec113fbf5848065b66f030c327 Mon Sep 17 00:00:00 2001
+From 9bff5af5271ac690d2b5ca9640ce0cc2d9bcb3e6 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Tue, 19 May 2020 11:42:12 +0800
 Subject: [PATCH] bus/fslmc: fix VFIO group descriptor check
 
+[ upstream commit 4b10ae80272b1bec113fbf5848065b66f030c327 ]
+
 The issue is that a file descriptor at 0 is a valid one. Currently
 the file not found, the return value will be set to 0. As a result,
 it is impossible to distinguish between a correct descriptor and a
 failed return value. Fix it to return -ENOENT instead of 0.
 
 Fixes: a69f79300262 ("bus/fslmc: support multi VFIO group")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
@@ -19,10 +20,10 @@
  1 file changed, 6 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
-index 9134ec5527..2e1803a185 100644
+index abf2338440..bf9e3e49a5 100644
 --- a/drivers/bus/fslmc/fslmc_vfio.c
 +++ b/drivers/bus/fslmc/fslmc_vfio.c
-@@ -457,11 +457,14 @@ fslmc_vfio_setup_device(const char *sysfs_base, const char *dev_addr,
+@@ -448,11 +448,14 @@ fslmc_vfio_setup_device(const char *sysfs_base, const char *dev_addr,
  
  	/* get the actual group fd */
  	vfio_group_fd = rte_vfio_get_group_fd(iommu_group_no);

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

* [dpdk-stable] patch 'bus/pci: fix memory leak when unmapping VFIO resource' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (99 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'bus/fslmc: fix VFIO " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'bus/pci: fix leak on VFIO mapping error' " luca.boccassi
                   ` (105 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 03941a263cc287f42f73adac8a10a4b9032a2d5a Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Fri, 11 Sep 2020 18:57:42 +0800
Subject: [PATCH] bus/pci: fix memory leak when unmapping VFIO resource

[ upstream commit e34a43a6729dd33e430e1815a395893fe1c643d6 ]

The 'vfio_res' is not freed when unmapping resource by primary process.
This leads to memory leak.

Fixes: ab53203e194b ("vfio: enable unmapping resource for secondary")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 drivers/bus/pci/linux/pci_vfio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index ba60e7ce99..5dcf15424c 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -1003,7 +1003,7 @@ pci_vfio_unmap_resource_primary(struct rte_pci_device *dev)
 	}
 
 	TAILQ_REMOVE(vfio_res_list, vfio_res, next);
-
+	rte_free(vfio_res);
 	return 0;
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.947159617 +0000
+++ 0102-bus-pci-fix-memory-leak-when-unmapping-VFIO-resource.patch	2020-10-28 10:35:11.656832261 +0000
@@ -1,13 +1,14 @@
-From e34a43a6729dd33e430e1815a395893fe1c643d6 Mon Sep 17 00:00:00 2001
+From 03941a263cc287f42f73adac8a10a4b9032a2d5a Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Fri, 11 Sep 2020 18:57:42 +0800
 Subject: [PATCH] bus/pci: fix memory leak when unmapping VFIO resource
 
+[ upstream commit e34a43a6729dd33e430e1815a395893fe1c643d6 ]
+
 The 'vfio_res' is not freed when unmapping resource by primary process.
 This leads to memory leak.
 
 Fixes: ab53203e194b ("vfio: enable unmapping resource for secondary")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
@@ -16,10 +17,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
-index d2073994fa..940ebc1e35 100644
+index ba60e7ce99..5dcf15424c 100644
 --- a/drivers/bus/pci/linux/pci_vfio.c
 +++ b/drivers/bus/pci/linux/pci_vfio.c
-@@ -1015,7 +1015,7 @@ pci_vfio_unmap_resource_primary(struct rte_pci_device *dev)
+@@ -1003,7 +1003,7 @@ pci_vfio_unmap_resource_primary(struct rte_pci_device *dev)
  	}
  
  	TAILQ_REMOVE(vfio_res_list, vfio_res, next);

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

* [dpdk-stable] patch 'bus/pci: fix leak on VFIO mapping error' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (100 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'bus/pci: fix memory leak when unmapping VFIO resource' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'doc: fix formatting of notes in meson guide' " luca.boccassi
                   ` (104 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 6fb58ea15dbb2e1edd1ffa1217fc58f044ed3d6d Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Fri, 11 Sep 2020 19:08:04 +0800
Subject: [PATCH] bus/pci: fix leak on VFIO mapping error

[ upstream commit 2a089d2d52f45bca6f179345fa3f3abe1a0e2ea9 ]

Currently, only the 'vfio_dev_fd' is closed in failure path, so
some resources are not released(such as 'vfio_group_fd'). The
rte_vfio_release_device() should be used to avoid this problem.

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

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 drivers/bus/pci/linux/pci_vfio.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
index 5dcf15424c..a0bb1f5fd3 100644
--- a/drivers/bus/pci/linux/pci_vfio.c
+++ b/drivers/bus/pci/linux/pci_vfio.c
@@ -826,7 +826,8 @@ pci_vfio_map_resource_primary(struct rte_pci_device *dev)
 err_vfio_res:
 	rte_free(vfio_res);
 err_vfio_dev_fd:
-	close(vfio_dev_fd);
+	rte_vfio_release_device(rte_pci_get_sysfs_path(),
+			pci_addr, vfio_dev_fd);
 	return -1;
 }
 
@@ -894,7 +895,8 @@ pci_vfio_map_resource_secondary(struct rte_pci_device *dev)
 
 	return 0;
 err_vfio_dev_fd:
-	close(vfio_dev_fd);
+	rte_vfio_release_device(rte_pci_get_sysfs_path(),
+			pci_addr, vfio_dev_fd);
 	return -1;
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:14.976545325 +0000
+++ 0103-bus-pci-fix-leak-on-VFIO-mapping-error.patch	2020-10-28 10:35:11.656832261 +0000
@@ -1,14 +1,15 @@
-From 2a089d2d52f45bca6f179345fa3f3abe1a0e2ea9 Mon Sep 17 00:00:00 2001
+From 6fb58ea15dbb2e1edd1ffa1217fc58f044ed3d6d Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Fri, 11 Sep 2020 19:08:04 +0800
 Subject: [PATCH] bus/pci: fix leak on VFIO mapping error
 
+[ upstream commit 2a089d2d52f45bca6f179345fa3f3abe1a0e2ea9 ]
+
 Currently, only the 'vfio_dev_fd' is closed in failure path, so
 some resources are not released(such as 'vfio_group_fd'). The
 rte_vfio_release_device() should be used to avoid this problem.
 
 Fixes: 33604c31354a ("vfio: refactor PCI BAR mapping")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c
-index 940ebc1e35..ef4f72017f 100644
+index 5dcf15424c..a0bb1f5fd3 100644
 --- a/drivers/bus/pci/linux/pci_vfio.c
 +++ b/drivers/bus/pci/linux/pci_vfio.c
-@@ -838,7 +838,8 @@ pci_vfio_map_resource_primary(struct rte_pci_device *dev)
+@@ -826,7 +826,8 @@ pci_vfio_map_resource_primary(struct rte_pci_device *dev)
  err_vfio_res:
  	rte_free(vfio_res);
  err_vfio_dev_fd:
@@ -30,7 +31,7 @@
  	return -1;
  }
  
-@@ -906,7 +907,8 @@ pci_vfio_map_resource_secondary(struct rte_pci_device *dev)
+@@ -894,7 +895,8 @@ pci_vfio_map_resource_secondary(struct rte_pci_device *dev)
  
  	return 0;
  err_vfio_dev_fd:

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

* [dpdk-stable] patch 'doc: fix formatting of notes in meson guide' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (101 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'bus/pci: fix leak on VFIO mapping error' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'rcu: avoid literal suffix warning in C++ mode' " luca.boccassi
                   ` (103 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: John McNamara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From b8ec7ffe965b43ce7c4b84185605d21bbb65aae1 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 3 Sep 2020 15:00:33 +0100
Subject: [PATCH] doc: fix formatting of notes in meson guide

[ upstream commit 1509ef9350671ee13381ce8e3c1741c2effc28b1 ]

The "note" callouts in the chapter describing the meson build were
incorrectly formatted, so adjust to use the correct markdown syntax.

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

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 doc/build-sdk-meson.txt | 25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/doc/build-sdk-meson.txt b/doc/build-sdk-meson.txt
index 3a3682cd44..f3ff9289cb 100644
--- a/doc/build-sdk-meson.txt
+++ b/doc/build-sdk-meson.txt
@@ -94,14 +94,17 @@ Examples of setting the same options using meson configure::
 
 	meson configure -Dmax_lcores=8
 
-NOTE: once meson has been run to configure a build in a directory, it
-cannot be run again on the same directory. Instead ``meson configure``
-should be used to change the build settings within the directory, and when
-``ninja`` is called to do the build itself, it will trigger the necessary
-re-scan from meson.
+.. note::
 
-NOTE: machine=default uses a config that works on all supported architectures
-regardless of the capabilities of the machine where the build is happening.
+        once meson has been run to configure a build in a directory, it
+        cannot be run again on the same directory. Instead ``meson configure``
+        should be used to change the build settings within the directory, and when
+        ``ninja`` is called to do the build itself, it will trigger the necessary
+        re-scan from meson.
+
+.. note::
+        machine=default uses a config that works on all supported architectures
+        regardless of the capabilities of the machine where the build is happening.
 
 As well as those settings taken from ``meson configure``, other options
 such as the compiler to use can be passed via environment variables. For
@@ -109,9 +112,11 @@ example::
 
 	CC=clang meson clang-build
 
-NOTE: for more comprehensive overriding of compilers or other environment
-settings, the tools for cross-compilation may be considered. However, for
-basic overriding of the compiler etc., the above form works as expected.
+.. note::
+
+        for more comprehensive overriding of compilers or other environment
+        settings, the tools for cross-compilation may be considered. However, for
+        basic overriding of the compiler etc., the above form works as expected.
 
 
 Performing the Build
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.005957276 +0000
+++ 0104-doc-fix-formatting-of-notes-in-meson-guide.patch	2020-10-28 10:35:11.656832261 +0000
@@ -1,27 +1,28 @@
-From 1509ef9350671ee13381ce8e3c1741c2effc28b1 Mon Sep 17 00:00:00 2001
+From b8ec7ffe965b43ce7c4b84185605d21bbb65aae1 Mon Sep 17 00:00:00 2001
 From: Bruce Richardson <bruce.richardson@intel.com>
 Date: Thu, 3 Sep 2020 15:00:33 +0100
 Subject: [PATCH] doc: fix formatting of notes in meson guide
 
+[ upstream commit 1509ef9350671ee13381ce8e3c1741c2effc28b1 ]
+
 The "note" callouts in the chapter describing the meson build were
 incorrectly formatted, so adjust to use the correct markdown syntax.
 
 Fixes: 9c3adc289c5e ("doc: add instructions on build using meson")
-Cc: stable@dpdk.org
 
 Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
 Acked-by: John McNamara <john.mcnamara@intel.com>
 ---
- doc/guides/prog_guide/build-sdk-meson.rst | 25 ++++++++++++++---------
+ doc/build-sdk-meson.txt | 25 +++++++++++++++----------
  1 file changed, 15 insertions(+), 10 deletions(-)
 
-diff --git a/doc/guides/prog_guide/build-sdk-meson.rst b/doc/guides/prog_guide/build-sdk-meson.rst
-index 44d1cafdf0..d621bea565 100644
---- a/doc/guides/prog_guide/build-sdk-meson.rst
-+++ b/doc/guides/prog_guide/build-sdk-meson.rst
-@@ -102,14 +102,17 @@ Examples of setting some of the same options using meson configure::
+diff --git a/doc/build-sdk-meson.txt b/doc/build-sdk-meson.txt
+index 3a3682cd44..f3ff9289cb 100644
+--- a/doc/build-sdk-meson.txt
++++ b/doc/build-sdk-meson.txt
+@@ -94,14 +94,17 @@ Examples of setting the same options using meson configure::
  
- 	meson configure -Denable_trace_fp=true
+ 	meson configure -Dmax_lcores=8
  
 -NOTE: once meson has been run to configure a build in a directory, it
 -cannot be run again on the same directory. Instead ``meson configure``
@@ -44,7 +45,7 @@
  
  As well as those settings taken from ``meson configure``, other options
  such as the compiler to use can be passed via environment variables. For
-@@ -117,9 +120,11 @@ example::
+@@ -109,9 +112,11 @@ example::
  
  	CC=clang meson clang-build
  

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

* [dpdk-stable] patch 'rcu: avoid literal suffix warning in C++ mode' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (102 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'doc: fix formatting of notes in meson guide' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'mem: fix allocation in container with SELinux' " luca.boccassi
                   ` (102 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From ebfbb4f145b17840d6fce829fa6fbb2f549b6a55 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Fri, 4 Sep 2020 23:47:34 +0300
Subject: [PATCH] rcu: avoid literal suffix warning in C++ mode

[ upstream commit a6c824360aaa0eeeb00ded6f7c93d7274ea290b0 ]

Sequences like "value = %"PRIu64 (no space before PRIu64) are parsed as
a single preprocessor token, user-defined-string-literal, in C++11
onwards. While modern compilers are smart enough to parse this properly,
GCC 9.3.0 generates warnings like:

    rte_rcu_qsbr.h:555:26: warning: invalid suffix on literal; C++11
    requires a space between literal and string macro [-Wliteral-suffix]

Add spaces around format specifier macros to make public headers
compatible with C++ without causing warnings. Make similar changes in C
source for style consistency within the library.

Fixes: 64994b56c ("rcu: add RCU library supporting QSBR mechanism")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 lib/librte_rcu/rte_rcu_qsbr.c |  6 +++---
 lib/librte_rcu/rte_rcu_qsbr.h | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/librte_rcu/rte_rcu_qsbr.c b/lib/librte_rcu/rte_rcu_qsbr.c
index 2f3fad776e..58d58c5be5 100644
--- a/lib/librte_rcu/rte_rcu_qsbr.c
+++ b/lib/librte_rcu/rte_rcu_qsbr.c
@@ -242,10 +242,10 @@ rte_rcu_qsbr_dump(FILE *f, struct rte_rcu_qsbr *v)
 
 	fprintf(f, "\n");
 
-	fprintf(f, "  Token = %"PRIu64"\n",
+	fprintf(f, "  Token = %" PRIu64 "\n",
 			__atomic_load_n(&v->token, __ATOMIC_ACQUIRE));
 
-	fprintf(f, "  Least Acknowledged Token = %"PRIu64"\n",
+	fprintf(f, "  Least Acknowledged Token = %" PRIu64 "\n",
 			__atomic_load_n(&v->acked_token, __ATOMIC_ACQUIRE));
 
 	fprintf(f, "Quiescent State Counts for readers:\n");
@@ -255,7 +255,7 @@ rte_rcu_qsbr_dump(FILE *f, struct rte_rcu_qsbr *v)
 		id = i << __RTE_QSBR_THRID_INDEX_SHIFT;
 		while (bmap) {
 			t = __builtin_ctzl(bmap);
-			fprintf(f, "thread ID = %u, count = %"PRIu64", lock count = %u\n",
+			fprintf(f, "thread ID = %u, count = %" PRIu64 ", lock count = %u\n",
 				id + t,
 				__atomic_load_n(
 					&v->qsbr_cnt[id + t].cnt,
diff --git a/lib/librte_rcu/rte_rcu_qsbr.h b/lib/librte_rcu/rte_rcu_qsbr.h
index 078de261f1..430cdfb58a 100644
--- a/lib/librte_rcu/rte_rcu_qsbr.h
+++ b/lib/librte_rcu/rte_rcu_qsbr.h
@@ -470,7 +470,7 @@ rte_rcu_qsbr_quiescent(struct rte_rcu_qsbr *v, unsigned int thread_id)
 		__atomic_store_n(&v->qsbr_cnt[thread_id].cnt,
 					 t, __ATOMIC_RELEASE);
 
-	__RTE_RCU_DP_LOG(DEBUG, "%s: update: token = %"PRIu64", Thread ID = %d",
+	__RTE_RCU_DP_LOG(DEBUG, "%s: update: token = %" PRIu64 ", Thread ID = %d",
 		__func__, t, thread_id);
 }
 
@@ -498,13 +498,13 @@ __rte_rcu_qsbr_check_selective(struct rte_rcu_qsbr *v, uint64_t t, bool wait)
 		while (bmap) {
 			j = __builtin_ctzl(bmap);
 			__RTE_RCU_DP_LOG(DEBUG,
-				"%s: check: token = %"PRIu64", wait = %d, Bit Map = 0x%"PRIx64", Thread ID = %d",
+				"%s: check: token = %" PRIu64 ", wait = %d, Bit Map = 0x%" PRIx64 ", Thread ID = %d",
 				__func__, t, wait, bmap, id + j);
 			c = __atomic_load_n(
 					&v->qsbr_cnt[id + j].cnt,
 					__ATOMIC_ACQUIRE);
 			__RTE_RCU_DP_LOG(DEBUG,
-				"%s: status: token = %"PRIu64", wait = %d, Thread QS cnt = %"PRIu64", Thread ID = %d",
+				"%s: status: token = %" PRIu64 ", wait = %d, Thread QS cnt = %" PRIu64 ", Thread ID = %d",
 				__func__, t, wait, c, id+j);
 
 			/* Counter is not checked for wrap-around condition
@@ -561,12 +561,12 @@ __rte_rcu_qsbr_check_all(struct rte_rcu_qsbr *v, uint64_t t, bool wait)
 
 	for (i = 0, cnt = v->qsbr_cnt; i < v->max_threads; i++, cnt++) {
 		__RTE_RCU_DP_LOG(DEBUG,
-			"%s: check: token = %"PRIu64", wait = %d, Thread ID = %d",
+			"%s: check: token = %" PRIu64 ", wait = %d, Thread ID = %d",
 			__func__, t, wait, i);
 		while (1) {
 			c = __atomic_load_n(&cnt->cnt, __ATOMIC_ACQUIRE);
 			__RTE_RCU_DP_LOG(DEBUG,
-				"%s: status: token = %"PRIu64", wait = %d, Thread QS cnt = %"PRIu64", Thread ID = %d",
+				"%s: status: token = %" PRIu64 ", wait = %d, Thread QS cnt = %" PRIu64 ", Thread ID = %d",
 				__func__, t, wait, c, i);
 
 			/* Counter is not checked for wrap-around condition
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.033909625 +0000
+++ 0105-rcu-avoid-literal-suffix-warning-in-C-mode.patch	2020-10-28 10:35:11.660832320 +0000
@@ -1,8 +1,10 @@
-From a6c824360aaa0eeeb00ded6f7c93d7274ea290b0 Mon Sep 17 00:00:00 2001
+From ebfbb4f145b17840d6fce829fa6fbb2f549b6a55 Mon Sep 17 00:00:00 2001
 From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
 Date: Fri, 4 Sep 2020 23:47:34 +0300
 Subject: [PATCH] rcu: avoid literal suffix warning in C++ mode
 
+[ upstream commit a6c824360aaa0eeeb00ded6f7c93d7274ea290b0 ]
+
 Sequences like "value = %"PRIu64 (no space before PRIu64) are parsed as
 a single preprocessor token, user-defined-string-literal, in C++11
 onwards. While modern compilers are smart enough to parse this properly,
@@ -16,20 +18,19 @@
 source for style consistency within the library.
 
 Fixes: 64994b56c ("rcu: add RCU library supporting QSBR mechanism")
-Cc: stable@dpdk.org
 
 Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
 Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 ---
- lib/librte_rcu/rte_rcu_qsbr.c | 13 +++++++------
- lib/librte_rcu/rte_rcu_qsbr.h | 14 +++++++-------
- 2 files changed, 14 insertions(+), 13 deletions(-)
+ lib/librte_rcu/rte_rcu_qsbr.c |  6 +++---
+ lib/librte_rcu/rte_rcu_qsbr.h | 10 +++++-----
+ 2 files changed, 8 insertions(+), 8 deletions(-)
 
 diff --git a/lib/librte_rcu/rte_rcu_qsbr.c b/lib/librte_rcu/rte_rcu_qsbr.c
-index aebfdb0da4..a5f9de3267 100644
+index 2f3fad776e..58d58c5be5 100644
 --- a/lib/librte_rcu/rte_rcu_qsbr.c
 +++ b/lib/librte_rcu/rte_rcu_qsbr.c
-@@ -244,10 +244,10 @@ rte_rcu_qsbr_dump(FILE *f, struct rte_rcu_qsbr *v)
+@@ -242,10 +242,10 @@ rte_rcu_qsbr_dump(FILE *f, struct rte_rcu_qsbr *v)
  
  	fprintf(f, "\n");
  
@@ -42,7 +43,7 @@
  			__atomic_load_n(&v->acked_token, __ATOMIC_ACQUIRE));
  
  	fprintf(f, "Quiescent State Counts for readers:\n");
-@@ -257,7 +257,7 @@ rte_rcu_qsbr_dump(FILE *f, struct rte_rcu_qsbr *v)
+@@ -255,7 +255,7 @@ rte_rcu_qsbr_dump(FILE *f, struct rte_rcu_qsbr *v)
  		id = i << __RTE_QSBR_THRID_INDEX_SHIFT;
  		while (bmap) {
  			t = __builtin_ctzl(bmap);
@@ -51,39 +52,11 @@
  				id + t,
  				__atomic_load_n(
  					&v->qsbr_cnt[id + t].cnt,
-@@ -402,7 +402,7 @@ int rte_rcu_qsbr_dq_enqueue(struct rte_rcu_qsbr_dq *dq, void *e)
- 		 * other issues.
- 		 */
- 		rte_log(RTE_LOG_INFO, rte_rcu_log_type,
--			"%s(): Skipped enqueuing token = %"PRIu64"\n",
-+			"%s(): Skipped enqueuing token = %" PRIu64 "\n",
- 			__func__, dq_elem->token);
- 
- 		rte_errno = ENOSPC;
-@@ -410,7 +410,8 @@ int rte_rcu_qsbr_dq_enqueue(struct rte_rcu_qsbr_dq *dq, void *e)
- 	}
- 
- 	rte_log(RTE_LOG_INFO, rte_rcu_log_type,
--		"%s(): Enqueued token = %"PRIu64"\n", __func__, dq_elem->token);
-+		"%s(): Enqueued token = %" PRIu64 "\n",
-+		__func__, dq_elem->token);
- 
- 	return 0;
- }
-@@ -449,7 +450,7 @@ rte_rcu_qsbr_dq_reclaim(struct rte_rcu_qsbr_dq *dq, unsigned int n,
- 		rte_ring_dequeue_elem_finish(dq->r, 1);
- 
- 		rte_log(RTE_LOG_INFO, rte_rcu_log_type,
--			"%s(): Reclaimed token = %"PRIu64"\n",
-+			"%s(): Reclaimed token = %" PRIu64 "\n",
- 			__func__, dq_elem->token);
- 
- 		dq->free_fn(dq->p, dq_elem->elem, 1);
 diff --git a/lib/librte_rcu/rte_rcu_qsbr.h b/lib/librte_rcu/rte_rcu_qsbr.h
-index a98e8f0f82..aa237cf75e 100644
+index 078de261f1..430cdfb58a 100644
 --- a/lib/librte_rcu/rte_rcu_qsbr.h
 +++ b/lib/librte_rcu/rte_rcu_qsbr.h
-@@ -552,7 +552,7 @@ rte_rcu_qsbr_quiescent(struct rte_rcu_qsbr *v, unsigned int thread_id)
+@@ -470,7 +470,7 @@ rte_rcu_qsbr_quiescent(struct rte_rcu_qsbr *v, unsigned int thread_id)
  		__atomic_store_n(&v->qsbr_cnt[thread_id].cnt,
  					 t, __ATOMIC_RELEASE);
  
@@ -92,7 +65,7 @@
  		__func__, t, thread_id);
  }
  
-@@ -580,13 +580,13 @@ __rte_rcu_qsbr_check_selective(struct rte_rcu_qsbr *v, uint64_t t, bool wait)
+@@ -498,13 +498,13 @@ __rte_rcu_qsbr_check_selective(struct rte_rcu_qsbr *v, uint64_t t, bool wait)
  		while (bmap) {
  			j = __builtin_ctzl(bmap);
  			__RTE_RCU_DP_LOG(DEBUG,
@@ -108,7 +81,7 @@
  				__func__, t, wait, c, id+j);
  
  			/* Counter is not checked for wrap-around condition
-@@ -643,12 +643,12 @@ __rte_rcu_qsbr_check_all(struct rte_rcu_qsbr *v, uint64_t t, bool wait)
+@@ -561,12 +561,12 @@ __rte_rcu_qsbr_check_all(struct rte_rcu_qsbr *v, uint64_t t, bool wait)
  
  	for (i = 0, cnt = v->qsbr_cnt; i < v->max_threads; i++, cnt++) {
  		__RTE_RCU_DP_LOG(DEBUG,
@@ -123,19 +96,6 @@
  				__func__, t, wait, c, i);
  
  			/* Counter is not checked for wrap-around condition
-@@ -725,10 +725,10 @@ rte_rcu_qsbr_check(struct rte_rcu_qsbr *v, uint64_t t, bool wait)
- 	/* Check if all the readers have already acknowledged this token */
- 	if (likely(t <= v->acked_token)) {
- 		__RTE_RCU_DP_LOG(DEBUG,
--			"%s: check: token = %"PRIu64", wait = %d",
-+			"%s: check: token = %" PRIu64 ", wait = %d",
- 			__func__, t, wait);
- 		__RTE_RCU_DP_LOG(DEBUG,
--			"%s: status: least acked token = %"PRIu64"",
-+			"%s: status: least acked token = %" PRIu64,
- 			__func__, v->acked_token);
- 		return 1;
- 	}
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'mem: fix allocation in container with SELinux' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (103 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'rcu: avoid literal suffix warning in C++ mode' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'examples/vm_power: fix 32-bit build' " luca.boccassi
                   ` (101 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: David Marchand; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 62aa29ccae8cc8f0b83cf454136997a4b70466c6 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 10 Sep 2020 18:24:07 +0200
Subject: [PATCH] mem: fix allocation in container with SELinux

[ upstream commit aa48ddf4f0d2a9f90cd9247ac779ced55588c27a ]

This is something we encountered while working in an OpenShift
environment with SELinux enabled.
In this environment, a DPDK application could create/write to hugepage
files but removing them was refused.
This resulted in dirty files being reused when starting a new DPDK
application and triggered random crashes / erratic behavior.

Getting a SELinux setup can be a challenge, and even more if you add
containers to the picture :-).
So here is a reproducer for the interested testers:

  # cat >wrap.c <<EOF
  #define _GNU_SOURCE
  #include <dlfcn.h>
  #include <errno.h>
  #include <stdio.h>
  #include <string.h>
  #include <sys/stat.h>
  #include <sys/types.h>
  #include <unistd.h>

  int unlink(const char *pathname)
  {
  	static int (*orig)(const char *pathname) = NULL;
  	struct stat st;

  	if (orig == NULL)
  		orig = dlsym(RTLD_NEXT, "unlink");
  	if (strstr(pathname, "rtemap_") != NULL &&
			stat(pathname, &st) == 0) {
  		fprintf(stderr, "### refused unlink for %s\n",
  			pathname);
  		errno = EACCES;
  		return -1;
  	}
  	fprintf(stderr, "### called unlink for %s\n", pathname);
  	return orig(pathname);
  }

  int unlinkat(int dirfd, const char *pathname, int flags)
  {
  	static int (*orig)(int dirfd, const char *pathname, int flags) =
  		NULL;
  	struct stat st;

  	if (orig == NULL)
  		orig = dlsym(RTLD_NEXT, "unlinkat");
  	if (strstr(pathname, "rtemap_") != NULL &&
  			fstatat(dirfd, pathname, &st, flags) == 0) {
  		fprintf(stderr, "### refused unlinkat for %s\n",
  			pathname);
  		errno = EACCES;
  		return -1;
  	}
  	fprintf(stderr, "### called unlinkat for %s\n", pathname);
  	return orig(dirfd, pathname, flags);
  }
  EOF

  # gcc -fPIC -shared  -o libwrap.so wrap.c -ldl
  # \rm /dev/hugepages/rtemap*

  # # First run is fine
  # LD_PRELOAD=libwrap.so dpdk-testpmd -w 0000:01:00.0 -- -i
  [...]
  Configuring Port 0 (socket 0)
  Port 0: 24:6E:96:3C:52:D8
  Checking link statuses...
  Done
  testpmd>

  # # Second run we have dirty memory
  # LD_PRELOAD=libwrap.so dpdk-testpmd -w 0000:01:00.0 -- -i
  [...]
  ### refused unlinkat for rtemap_0
  [...]
  Port 0 is now not stopped
  Please stop the ports first
  Done
  testpmd>

Removing hugepage files is done in multiple places and the memory
allocation code is complex.
This fix tries to do the minimum and avoids touching other paths.

If trying to remove the hugepage file before allocating a page fails,
the error is reported to the caller and the user will see a memory
allocation error log.

Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runtime")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/linux/eal/eal_memalloc.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/lib/librte_eal/linux/eal/eal_memalloc.c b/lib/librte_eal/linux/eal/eal_memalloc.c
index 678094acf9..08b9888b07 100644
--- a/lib/librte_eal/linux/eal/eal_memalloc.c
+++ b/lib/librte_eal/linux/eal/eal_memalloc.c
@@ -325,6 +325,21 @@ get_seg_fd(char *path, int buflen, struct hugepage_info *hi,
 		fd = fd_list[list_idx].fds[seg_idx];
 
 		if (fd < 0) {
+			/* A primary process is the only one creating these
+			 * files. If there is a leftover that was not cleaned
+			 * by clear_hugedir(), we must *now* make sure to drop
+			 * the file or we will remap old stuff while the rest
+			 * of the code is built on the assumption that a new
+			 * page is clean.
+			 */
+			if (rte_eal_process_type() == RTE_PROC_PRIMARY &&
+					unlink(path) == -1 &&
+					errno != ENOENT) {
+				RTE_LOG(DEBUG, EAL, "%s(): could not remove '%s': %s\n",
+					__func__, path, strerror(errno));
+				return -1;
+			}
+
 			fd = open(path, O_CREAT | O_RDWR, 0600);
 			if (fd < 0) {
 				RTE_LOG(DEBUG, EAL, "%s(): open failed: %s\n",
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.063984209 +0000
+++ 0106-mem-fix-allocation-in-container-with-SELinux.patch	2020-10-28 10:35:11.660832320 +0000
@@ -1,8 +1,10 @@
-From aa48ddf4f0d2a9f90cd9247ac779ced55588c27a Mon Sep 17 00:00:00 2001
+From 62aa29ccae8cc8f0b83cf454136997a4b70466c6 Mon Sep 17 00:00:00 2001
 From: David Marchand <david.marchand@redhat.com>
 Date: Thu, 10 Sep 2020 18:24:07 +0200
 Subject: [PATCH] mem: fix allocation in container with SELinux
 
+[ upstream commit aa48ddf4f0d2a9f90cd9247ac779ced55588c27a ]
+
 This is something we encountered while working in an OpenShift
 environment with SELinux enabled.
 In this environment, a DPDK application could create/write to hugepage
@@ -93,19 +95,18 @@
 allocation error log.
 
 Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runtime")
-Cc: stable@dpdk.org
 
 Signed-off-by: David Marchand <david.marchand@redhat.com>
 Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
 ---
- lib/librte_eal/linux/eal_memalloc.c | 15 +++++++++++++++
+ lib/librte_eal/linux/eal/eal_memalloc.c | 15 +++++++++++++++
  1 file changed, 15 insertions(+)
 
-diff --git a/lib/librte_eal/linux/eal_memalloc.c b/lib/librte_eal/linux/eal_memalloc.c
-index db60e79975..40a5c4aa1d 100644
---- a/lib/librte_eal/linux/eal_memalloc.c
-+++ b/lib/librte_eal/linux/eal_memalloc.c
-@@ -329,6 +329,21 @@ get_seg_fd(char *path, int buflen, struct hugepage_info *hi,
+diff --git a/lib/librte_eal/linux/eal/eal_memalloc.c b/lib/librte_eal/linux/eal/eal_memalloc.c
+index 678094acf9..08b9888b07 100644
+--- a/lib/librte_eal/linux/eal/eal_memalloc.c
++++ b/lib/librte_eal/linux/eal/eal_memalloc.c
+@@ -325,6 +325,21 @@ get_seg_fd(char *path, int buflen, struct hugepage_info *hi,
  		fd = fd_list[list_idx].fds[seg_idx];
  
  		if (fd < 0) {

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

* [dpdk-stable] patch 'examples/vm_power: fix 32-bit build' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (104 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'mem: fix allocation in container with SELinux' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'bus/fslmc: fix dpio close' " luca.boccassi
                   ` (100 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: David Marchand, Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 55064d17700422e9b05ab5717ab7799ea8417fb6 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Mon, 5 Oct 2020 18:02:01 +0100
Subject: [PATCH] examples/vm_power: fix 32-bit build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 984d99ccb09fd62b8c6151698a764af6f90592cb ]

Compiler version:
gcc 10.2.1 "cc (GCC) 10.2.1 20200723 (Red Hat 10.2.1-1)"

Build error:
../examples/vm_power_manager/guest_cli/vm_power_cli_guest.c:346:23:
 warning: format ‘%ld’ expects argument of type ‘long int’, but
	argument 4 has type ‘uint64_t’ {aka ‘long long unsigned int’}
	[-Wformat=]
  346 |    cmdline_printf(cl, "Capabilities of [%d] vcore are:"
      |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
  349 |      pkt_caps_list.turbo[i],
      |      ~~~~~~~~~~~~~~~~~~~~~~
      |                         |
      |                         uint64_t {aka long long unsigned int}

Fixes: 07525d1a047a ("examples/vm_power: send capabilities request from guest")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 examples/vm_power_manager/guest_cli/vm_power_cli_guest.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
index 96c1a1ff69..f9b47186ee 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
@@ -344,13 +344,15 @@ cmd_query_caps_list_parsed(void *parsed_result,
 		unsigned int i;
 		for (i = 0; i < pkt_caps_list.num_vcpu; ++i)
 			cmdline_printf(cl, "Capabilities of [%d] vcore are:"
-					" turbo possibility: %ld, is priority core: %ld.\n",
+					" turbo possibility: %" PRId64 ", "
+					"is priority core: %" PRId64 ".\n",
 					i,
 					pkt_caps_list.turbo[i],
 					pkt_caps_list.priority[i]);
 	} else {
 		cmdline_printf(cl, "Capabilities of [%d] vcore are:"
-				" turbo possibility: %ld, is priority core: %ld.\n",
+				" turbo possibility: %" PRId64 ", "
+				"is priority core: %" PRId64 ".\n",
 				lcore_id,
 				pkt_caps_list.turbo[lcore_id],
 				pkt_caps_list.priority[lcore_id]);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.093595758 +0000
+++ 0107-examples-vm_power-fix-32-bit-build.patch	2020-10-28 10:35:11.660832320 +0000
@@ -1,4 +1,4 @@
-From 984d99ccb09fd62b8c6151698a764af6f90592cb Mon Sep 17 00:00:00 2001
+From 55064d17700422e9b05ab5717ab7799ea8417fb6 Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Mon, 5 Oct 2020 18:02:01 +0100
 Subject: [PATCH] examples/vm_power: fix 32-bit build
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 984d99ccb09fd62b8c6151698a764af6f90592cb ]
+
 Compiler version:
 gcc 10.2.1 "cc (GCC) 10.2.1 20200723 (Red Hat 10.2.1-1)"
 
@@ -23,7 +25,6 @@
       |                         uint64_t {aka long long unsigned int}
 
 Fixes: 07525d1a047a ("examples/vm_power: send capabilities request from guest")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 Tested-by: David Marchand <david.marchand@redhat.com>

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

* [dpdk-stable] patch 'bus/fslmc: fix dpio close' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (105 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'examples/vm_power: fix 32-bit build' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'bus/fslmc: fix atomic queues on NXP LX2 platform' " luca.boccassi
                   ` (99 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Rohit Raj; +Cc: Sachin Saxena, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 11222d2fd839b297673c3ef27286c393d7ef5a01 Mon Sep 17 00:00:00 2001
From: Rohit Raj <rohit.raj@nxp.com>
Date: Tue, 28 Jul 2020 21:54:59 +0530
Subject: [PATCH] bus/fslmc: fix dpio close

[ upstream commit ba156cdf70f20ec5321592fe4595ab8f9ae343ec ]

The current state of the DPIO object should be checked
before trying to close/disable the object.

Fixes: 293c0ca94c36 ("bus/fslmc: support memory backed portals with QBMAN 5.0")

Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
Acked-by: Sachin Saxena <sachin.saxena@oss.nxp.com>
---
 drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
index 3ca3ae4f51..9c09c69fe9 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
@@ -546,8 +546,13 @@ dpaa2_create_dpio_device(int vdev_fd,
 
 err:
 	if (dpio_dev->dpio) {
-		dpio_disable(dpio_dev->dpio, CMD_PRI_LOW, dpio_dev->token);
-		dpio_close(dpio_dev->dpio, CMD_PRI_LOW,  dpio_dev->token);
+		if (dpio_dev->token) {
+			dpio_disable(dpio_dev->dpio, CMD_PRI_LOW,
+				     dpio_dev->token);
+			dpio_close(dpio_dev->dpio, CMD_PRI_LOW,
+				   dpio_dev->token);
+		}
+
 		rte_free(dpio_dev->dpio);
 	}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.122287515 +0000
+++ 0108-bus-fslmc-fix-dpio-close.patch	2020-10-28 10:35:11.664832379 +0000
@@ -1,13 +1,14 @@
-From ba156cdf70f20ec5321592fe4595ab8f9ae343ec Mon Sep 17 00:00:00 2001
+From 11222d2fd839b297673c3ef27286c393d7ef5a01 Mon Sep 17 00:00:00 2001
 From: Rohit Raj <rohit.raj@nxp.com>
 Date: Tue, 28 Jul 2020 21:54:59 +0530
 Subject: [PATCH] bus/fslmc: fix dpio close
 
+[ upstream commit ba156cdf70f20ec5321592fe4595ab8f9ae343ec ]
+
 The current state of the DPIO object should be checked
 before trying to close/disable the object.
 
 Fixes: 293c0ca94c36 ("bus/fslmc: support memory backed portals with QBMAN 5.0")
-Cc: stable@dpdk.org
 
 Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
 Acked-by: Sachin Saxena <sachin.saxena@oss.nxp.com>
@@ -16,10 +17,10 @@
  1 file changed, 7 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
-index 97be761164..b0055b1644 100644
+index 3ca3ae4f51..9c09c69fe9 100644
 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
 +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
-@@ -528,8 +528,13 @@ dpaa2_create_dpio_device(int vdev_fd,
+@@ -546,8 +546,13 @@ dpaa2_create_dpio_device(int vdev_fd,
  
  err:
  	if (dpio_dev->dpio) {
@@ -32,9 +33,9 @@
 +				   dpio_dev->token);
 +		}
 +
- 		rte_free(dpio_dev->eqresp);
  		rte_free(dpio_dev->dpio);
  	}
+ 
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'bus/fslmc: fix atomic queues on NXP LX2 platform' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (106 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'bus/fslmc: fix dpio close' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'raw/skeleton: reset test statistics' " luca.boccassi
                   ` (98 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Youri Querry; +Cc: Rohit Raj, Nipun Gupta, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From d1aaa24a6789cfdddd8de4bcaae7006d2b00e1c5 Mon Sep 17 00:00:00 2001
From: Youri Querry <youri.querry_1@nxp.com>
Date: Thu, 24 Sep 2020 09:32:04 +0530
Subject: [PATCH] bus/fslmc: fix atomic queues on NXP LX2 platform

[ upstream commit 8bd11d45d53d66da5e2adb7faf2ea64b36120f60 ]

Traffic was stalling after few packet while running l2fwd-event
in atomic mode on LX2 platform. It was due to wrong dca setting
while enqueuing packets to EQCR.
This patch fixes the issue by writing correct dca setting.

Fixes: 1b49352f41be ("bus/fslmc: rename portal pi index to consumer index")

Signed-off-by: Youri Querry <youri.querry_1@nxp.com>
Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
---
 drivers/bus/fslmc/qbman/qbman_portal.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/fslmc/qbman/qbman_portal.c b/drivers/bus/fslmc/qbman/qbman_portal.c
index d4223bdc8b..54bea97820 100644
--- a/drivers/bus/fslmc/qbman/qbman_portal.c
+++ b/drivers/bus/fslmc/qbman/qbman_portal.c
@@ -999,6 +999,8 @@ static int qbman_swp_enqueue_multiple_mem_back(struct qbman_swp *s,
 				QBMAN_CENA_SWP_EQCR(eqcr_pi & half_mask));
 		memcpy(&p[1], &cl[1], 28);
 		memcpy(&p[8], &fd[i], sizeof(*fd));
+		p[0] = cl[0] | s->eqcr.pi_vb;
+
 		if (flags && (flags[i] & QBMAN_ENQUEUE_FLAG_DCA)) {
 			struct qbman_eq_desc *d = (struct qbman_eq_desc *)p;
 
@@ -1006,7 +1008,6 @@ static int qbman_swp_enqueue_multiple_mem_back(struct qbman_swp *s,
 				((flags[i]) & QBMAN_EQCR_DCA_IDXMASK);
 		}
 		eqcr_pi++;
-		p[0] = cl[0] | s->eqcr.pi_vb;
 
 		if (!(eqcr_pi & half_mask))
 			s->eqcr.pi_vb ^= QB_VALID_BIT;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.151316939 +0000
+++ 0109-bus-fslmc-fix-atomic-queues-on-NXP-LX2-platform.patch	2020-10-28 10:35:11.664832379 +0000
@@ -1,15 +1,16 @@
-From 8bd11d45d53d66da5e2adb7faf2ea64b36120f60 Mon Sep 17 00:00:00 2001
+From d1aaa24a6789cfdddd8de4bcaae7006d2b00e1c5 Mon Sep 17 00:00:00 2001
 From: Youri Querry <youri.querry_1@nxp.com>
 Date: Thu, 24 Sep 2020 09:32:04 +0530
 Subject: [PATCH] bus/fslmc: fix atomic queues on NXP LX2 platform
 
+[ upstream commit 8bd11d45d53d66da5e2adb7faf2ea64b36120f60 ]
+
 Traffic was stalling after few packet while running l2fwd-event
 in atomic mode on LX2 platform. It was due to wrong dca setting
 while enqueuing packets to EQCR.
 This patch fixes the issue by writing correct dca setting.
 
 Fixes: 1b49352f41be ("bus/fslmc: rename portal pi index to consumer index")
-Cc: stable@dpdk.org
 
 Signed-off-by: Youri Querry <youri.querry_1@nxp.com>
 Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
@@ -19,10 +20,10 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/bus/fslmc/qbman/qbman_portal.c b/drivers/bus/fslmc/qbman/qbman_portal.c
-index 0a2af7be4c..77c9d508c4 100644
+index d4223bdc8b..54bea97820 100644
 --- a/drivers/bus/fslmc/qbman/qbman_portal.c
 +++ b/drivers/bus/fslmc/qbman/qbman_portal.c
-@@ -1201,6 +1201,8 @@ static int qbman_swp_enqueue_multiple_mem_back(struct qbman_swp *s,
+@@ -999,6 +999,8 @@ static int qbman_swp_enqueue_multiple_mem_back(struct qbman_swp *s,
  				QBMAN_CENA_SWP_EQCR(eqcr_pi & half_mask));
  		memcpy(&p[1], &cl[1], 28);
  		memcpy(&p[8], &fd[i], sizeof(*fd));
@@ -31,7 +32,7 @@
  		if (flags && (flags[i] & QBMAN_ENQUEUE_FLAG_DCA)) {
  			struct qbman_eq_desc *d = (struct qbman_eq_desc *)p;
  
-@@ -1208,7 +1210,6 @@ static int qbman_swp_enqueue_multiple_mem_back(struct qbman_swp *s,
+@@ -1006,7 +1008,6 @@ static int qbman_swp_enqueue_multiple_mem_back(struct qbman_swp *s,
  				((flags[i]) & QBMAN_EQCR_DCA_IDXMASK);
  		}
  		eqcr_pi++;

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

* [dpdk-stable] patch 'raw/skeleton: reset test statistics' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (107 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'bus/fslmc: fix atomic queues on NXP LX2 platform' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'raw/skeleton: allow closing already closed device' " luca.boccassi
                   ` (97 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From d8d56bd8c2c7c1053226fb124f9976bea516f22d Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Mon, 21 Sep 2020 23:44:19 +0200
Subject: [PATCH] raw/skeleton: reset test statistics

[ upstream commit 22b5c63ed13fbae5934a312cba657ec1901f7539 ]

Statistics: passed, failed, unsupported and total are kept
in global static variables. As global variables they are initiated
with zeroes. However running test multiple times cumulates results
from previous calls.

This patch resets statistics with zeroes in testsuite_setup().

To reproduce issue fixed by this patch, run rawdev_autotest command
in dpdk-test app multiple times.

Fixes: 55ca1b0f2151 ("raw/skeleton: add test cases")

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/raw/skeleton/skeleton_rawdev_test.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/raw/skeleton/skeleton_rawdev_test.c b/drivers/raw/skeleton/skeleton_rawdev_test.c
index 9ecfdee818..1190e28bb7 100644
--- a/drivers/raw/skeleton/skeleton_rawdev_test.c
+++ b/drivers/raw/skeleton/skeleton_rawdev_test.c
@@ -42,6 +42,12 @@ static int
 testsuite_setup(void)
 {
 	uint8_t count;
+
+	total = 0;
+	passed = 0;
+	failed = 0;
+	unsupported = 0;
+
 	count = rte_rawdev_count();
 	if (!count) {
 		SKELDEV_TEST_INFO("\tNo existing rawdev; "
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.181852064 +0000
+++ 0110-raw-skeleton-reset-test-statistics.patch	2020-10-28 10:35:11.664832379 +0000
@@ -1,8 +1,10 @@
-From 22b5c63ed13fbae5934a312cba657ec1901f7539 Mon Sep 17 00:00:00 2001
+From d8d56bd8c2c7c1053226fb124f9976bea516f22d Mon Sep 17 00:00:00 2001
 From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Date: Mon, 21 Sep 2020 23:44:19 +0200
 Subject: [PATCH] raw/skeleton: reset test statistics
 
+[ upstream commit 22b5c63ed13fbae5934a312cba657ec1901f7539 ]
+
 Statistics: passed, failed, unsupported and total are kept
 in global static variables. As global variables they are initiated
 with zeroes. However running test multiple times cumulates results
@@ -14,7 +16,6 @@
 in dpdk-test app multiple times.
 
 Fixes: 55ca1b0f2151 ("raw/skeleton: add test cases")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
@@ -23,7 +24,7 @@
  1 file changed, 6 insertions(+)
 
 diff --git a/drivers/raw/skeleton/skeleton_rawdev_test.c b/drivers/raw/skeleton/skeleton_rawdev_test.c
-index bb4b6efe40..1405df080d 100644
+index 9ecfdee818..1190e28bb7 100644
 --- a/drivers/raw/skeleton/skeleton_rawdev_test.c
 +++ b/drivers/raw/skeleton/skeleton_rawdev_test.c
 @@ -42,6 +42,12 @@ static int

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

* [dpdk-stable] patch 'raw/skeleton: allow closing already closed device' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (108 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'raw/skeleton: reset test statistics' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'port: remove useless assignment' " luca.boccassi
                   ` (96 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 8a53e82ec4504863795134649ac80ad2f230bcd8 Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Mon, 21 Sep 2020 23:44:20 +0200
Subject: [PATCH] raw/skeleton: allow closing already closed device

[ upstream commit e640362b34e868b82bfb047761e05056ba77e58e ]

This patch return OK code (0) from skeleton_rawdev_close function
if firmware is in SKELETON_FW_READY state. Formerly it returned
-EINVAL error code.

Returning an error here is troublesome as it disallows proper release
of the rawdev. The rte_rawdev_pmd_release function from librte_rawdev
library calls drivers' rawdev_close handler and continues execution
only in case of errorless call.
(see lib/librte_rawdev/rte_rawdev.c:540)

The SKELETON_FW_READY state is reached after creation, reset, unload
or close of the device. The device should be ok to be released in
such situations.

To reproduce issue fixed by this patch, call rawdev_autotest
from dpdk-test app for few times. As the device is not properly
released, the next calls will fail.

Fixes: 61c592a8d035 ("raw/skeleton: introduce skeleton rawdev driver")

Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
---
 drivers/raw/skeleton/skeleton_rawdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/raw/skeleton/skeleton_rawdev.c b/drivers/raw/skeleton/skeleton_rawdev.c
index 586183a5b8..1daf0fecd2 100644
--- a/drivers/raw/skeleton/skeleton_rawdev.c
+++ b/drivers/raw/skeleton/skeleton_rawdev.c
@@ -189,9 +189,11 @@ static int skeleton_rawdev_close(struct rte_rawdev *dev)
 		}
 		break;
 	case SKELETON_FW_READY:
+		SKELETON_PMD_DEBUG("Device already in stopped state");
+		break;
 	case SKELETON_FW_ERROR:
 	default:
-		SKELETON_PMD_DEBUG("Device already in stopped state");
+		SKELETON_PMD_DEBUG("Device in impossible state");
 		ret = -EINVAL;
 		break;
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.210176241 +0000
+++ 0111-raw-skeleton-allow-closing-already-closed-device.patch	2020-10-28 10:35:11.664832379 +0000
@@ -1,8 +1,10 @@
-From e640362b34e868b82bfb047761e05056ba77e58e Mon Sep 17 00:00:00 2001
+From 8a53e82ec4504863795134649ac80ad2f230bcd8 Mon Sep 17 00:00:00 2001
 From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Date: Mon, 21 Sep 2020 23:44:20 +0200
 Subject: [PATCH] raw/skeleton: allow closing already closed device
 
+[ upstream commit e640362b34e868b82bfb047761e05056ba77e58e ]
+
 This patch return OK code (0) from skeleton_rawdev_close function
 if firmware is in SKELETON_FW_READY state. Formerly it returned
 -EINVAL error code.
@@ -22,7 +24,6 @@
 released, the next calls will fail.
 
 Fixes: 61c592a8d035 ("raw/skeleton: introduce skeleton rawdev driver")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 ---
@@ -30,10 +31,10 @@
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/raw/skeleton/skeleton_rawdev.c b/drivers/raw/skeleton/skeleton_rawdev.c
-index f8b47a391a..aa3beaad18 100644
+index 586183a5b8..1daf0fecd2 100644
 --- a/drivers/raw/skeleton/skeleton_rawdev.c
 +++ b/drivers/raw/skeleton/skeleton_rawdev.c
-@@ -190,9 +190,11 @@ static int skeleton_rawdev_close(struct rte_rawdev *dev)
+@@ -189,9 +189,11 @@ static int skeleton_rawdev_close(struct rte_rawdev *dev)
  		}
  		break;
  	case SKELETON_FW_READY:

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

* [dpdk-stable] patch 'port: remove useless assignment' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (109 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'raw/skeleton: allow closing already closed device' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'power: fix current frequency index' " luca.boccassi
                   ` (95 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Fan Zhang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 73c73f77b768d1f02cfb5c932b538ed1bee52bc0 Mon Sep 17 00:00:00 2001
From: Fan Zhang <roy.fan.zhang@intel.com>
Date: Fri, 18 Sep 2020 09:23:10 +0100
Subject: [PATCH] port: remove useless assignment

[ upstream commit 9ef2627cf64d4316224ca2de983fc32db9ed23c4 ]

This patch fixes an unused value in pcap source port by
removing the setting to the value.

Coverity issue: 362020
Fixes: d4b42133d85b ("port: add pcap file source")

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

diff --git a/lib/librte_port/rte_port_source_sink.c b/lib/librte_port/rte_port_source_sink.c
index 74b7385a28..68575c9833 100644
--- a/lib/librte_port/rte_port_source_sink.c
+++ b/lib/librte_port/rte_port_source_sink.c
@@ -116,7 +116,7 @@ pcap_source_load(struct rte_port_source *port,
 	}
 
 	for (i = 0; i < n_pkts; i++) {
-		pkt = pcap_next(pcap_handle, &pcap_hdr);
+		pcap_next(pcap_handle, &pcap_hdr);
 		port->pkt_len[i] = RTE_MIN(max_len, pcap_hdr.len);
 		pkt_len_aligns[i] = RTE_CACHE_LINE_ROUNDUP(
 			port->pkt_len[i]);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.239045555 +0000
+++ 0112-port-remove-useless-assignment.patch	2020-10-28 10:35:11.664832379 +0000
@@ -1,14 +1,15 @@
-From 9ef2627cf64d4316224ca2de983fc32db9ed23c4 Mon Sep 17 00:00:00 2001
+From 73c73f77b768d1f02cfb5c932b538ed1bee52bc0 Mon Sep 17 00:00:00 2001
 From: Fan Zhang <roy.fan.zhang@intel.com>
 Date: Fri, 18 Sep 2020 09:23:10 +0100
 Subject: [PATCH] port: remove useless assignment
 
+[ upstream commit 9ef2627cf64d4316224ca2de983fc32db9ed23c4 ]
+
 This patch fixes an unused value in pcap source port by
 removing the setting to the value.
 
 Coverity issue: 362020
 Fixes: d4b42133d85b ("port: add pcap file source")
-Cc: stable@dpdk.org
 
 Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
 ---

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

* [dpdk-stable] patch 'power: fix current frequency index' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (110 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'port: remove useless assignment' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'timer: add limitation note for sync stop and reset' " luca.boccassi
                   ` (94 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Reshma Pattan; +Cc: Liang Ma, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 6e2760a68cd64d05b6cc82185b7ec00d3fb5b9d9 Mon Sep 17 00:00:00 2001
From: Reshma Pattan <reshma.pattan@intel.com>
Date: Wed, 29 Jul 2020 14:58:53 +0100
Subject: [PATCH] power: fix current frequency index

[ upstream commit a3f9cca718d75f2d60f5895be94f0f14e5fc4865 ]

During power initialization the pstate cpufreq api is
not setting the initial curr_idx of pstate_power_info
to corresponding current frequency index.

Without this the idx is always 0, which is causing the
below check to pass and returns without setting the initial
min/max frequency to system max frequency and this leads to
incorrect frequency settings when power_pstate_cpufreq_set_freq()
is called in the apps.

set_freq_internal(struct pstate_power_info *pi, uint32_t idx)
{
...

 /* Check if it is the same as current */
        if (idx == pi->curr_idx)
                return 0;
...
}

scenario 1:
If system has starting scaling min/max: 1000/1000, and want to
set this to 2200/2200, the max frequency gets updated but not min.

scenario 2:
If system has starting scaling min/max: 2200/1000, and want to set
to 2200/2200, the max, min frequency was not updated. Since no change
in max that should be ok, but min was also ignored, which will be fixed
now with the new changes.

Fixes: e6c6dc0f ("power: add p-state driver compatibility")

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reviewed-by: Liang Ma <liang.j.ma@intel.com>
---
 lib/librte_power/power_pstate_cpufreq.c | 59 +++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/lib/librte_power/power_pstate_cpufreq.c b/lib/librte_power/power_pstate_cpufreq.c
index 2d8a9499dc..fa16b44146 100644
--- a/lib/librte_power/power_pstate_cpufreq.c
+++ b/lib/librte_power/power_pstate_cpufreq.c
@@ -52,6 +52,9 @@
 		} \
 } while (0)
 
+/* macros used for rounding frequency to nearest 100000 */
+#define FREQ_ROUNDING_DELTA 50000
+#define ROUND_FREQ_TO_N_100000 100000
 
 #define POWER_CONVERT_TO_DECIMAL 10
 #define BUS_FREQ     100000
@@ -531,6 +534,57 @@ out:
 	return ret;
 }
 
+static int
+power_get_cur_idx(struct pstate_power_info *pi)
+{
+	FILE *f_cur;
+	int ret = -1;
+	char *p_cur;
+	char buf_cur[BUFSIZ];
+	char fullpath_cur[PATH_MAX];
+	char *s_cur;
+	uint32_t sys_cur_freq = 0;
+	unsigned int i;
+
+	snprintf(fullpath_cur, sizeof(fullpath_cur),
+			POWER_SYSFILE_CUR_FREQ,
+			pi->lcore_id);
+	f_cur = fopen(fullpath_cur, "r");
+	FOPEN_OR_ERR_RET(f_cur, ret);
+
+	/* initialize the cur_idx to matching current frequency freq index */
+	s_cur = fgets(buf_cur, sizeof(buf_cur), f_cur);
+	FOPS_OR_NULL_GOTO(s_cur, fail);
+
+	p_cur = strchr(buf_cur, '\n');
+	if (p_cur != NULL)
+		*p_cur = 0;
+	sys_cur_freq = strtoul(buf_cur, &p_cur, POWER_CONVERT_TO_DECIMAL);
+
+	/* convert the frequency to nearest 100000 value
+	 * Ex: if sys_cur_freq=1396789 then freq_conv=1400000
+	 * Ex: if sys_cur_freq=800030 then freq_conv=800000
+	 * Ex: if sys_cur_freq=800030 then freq_conv=800000
+	 */
+	unsigned int freq_conv = 0;
+	freq_conv = (sys_cur_freq + FREQ_ROUNDING_DELTA)
+				/ ROUND_FREQ_TO_N_100000;
+	freq_conv = freq_conv * ROUND_FREQ_TO_N_100000;
+
+	for (i = 0; i < pi->nb_freqs; i++) {
+		if (freq_conv == pi->freqs[i]) {
+			pi->curr_idx = i;
+			break;
+		}
+	}
+
+	fclose(f_cur);
+	return 0;
+fail:
+	fclose(f_cur);
+	return ret;
+}
+
 int
 power_pstate_cpufreq_init(unsigned int lcore_id)
 {
@@ -571,6 +625,11 @@ power_pstate_cpufreq_init(unsigned int lcore_id)
 		goto fail;
 	}
 
+	if (power_get_cur_idx(pi) < 0) {
+		RTE_LOG(ERR, POWER, "Cannot get current frequency "
+				"index of lcore %u\n", lcore_id);
+		goto fail;
+	}
 
 	/* Set freq to max by default */
 	if (power_pstate_cpufreq_freq_max(lcore_id) < 0) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.268005980 +0000
+++ 0113-power-fix-current-frequency-index.patch	2020-10-28 10:35:11.668832438 +0000
@@ -1,8 +1,10 @@
-From a3f9cca718d75f2d60f5895be94f0f14e5fc4865 Mon Sep 17 00:00:00 2001
+From 6e2760a68cd64d05b6cc82185b7ec00d3fb5b9d9 Mon Sep 17 00:00:00 2001
 From: Reshma Pattan <reshma.pattan@intel.com>
 Date: Wed, 29 Jul 2020 14:58:53 +0100
 Subject: [PATCH] power: fix current frequency index
 
+[ upstream commit a3f9cca718d75f2d60f5895be94f0f14e5fc4865 ]
+
 During power initialization the pstate cpufreq api is
 not setting the initial curr_idx of pstate_power_info
 to corresponding current frequency index.
@@ -34,7 +36,6 @@
 now with the new changes.
 
 Fixes: e6c6dc0f ("power: add p-state driver compatibility")
-Cc: stable@dpdk.org
 
 Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
 Reviewed-by: Liang Ma <liang.j.ma@intel.com>
@@ -43,10 +44,10 @@
  1 file changed, 59 insertions(+)
 
 diff --git a/lib/librte_power/power_pstate_cpufreq.c b/lib/librte_power/power_pstate_cpufreq.c
-index e3126d3754..edf6328e5f 100644
+index 2d8a9499dc..fa16b44146 100644
 --- a/lib/librte_power/power_pstate_cpufreq.c
 +++ b/lib/librte_power/power_pstate_cpufreq.c
-@@ -51,6 +51,9 @@
+@@ -52,6 +52,9 @@
  		} \
  } while (0)
  
@@ -112,9 +113,9 @@
 +}
 +
  int
- power_pstate_cpufreq_check_supported(void)
+ power_pstate_cpufreq_init(unsigned int lcore_id)
  {
-@@ -586,6 +640,11 @@ power_pstate_cpufreq_init(unsigned int lcore_id)
+@@ -571,6 +625,11 @@ power_pstate_cpufreq_init(unsigned int lcore_id)
  		goto fail;
  	}
  

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

* [dpdk-stable] patch 'timer: add limitation note for sync stop and reset' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (111 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'power: fix current frequency index' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'app/testpmd: fix build with gcc 11' " luca.boccassi
                   ` (93 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Erik Gabriel Carrillo; +Cc: Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 92749fc95c9c53d6eef799b70af2d0e1246c3bf6 Mon Sep 17 00:00:00 2001
From: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Date: Wed, 9 Sep 2020 09:41:14 -0500
Subject: [PATCH] timer: add limitation note for sync stop and reset

[ upstream commit 0875ec4dd55a548a1f8a27674b1c136c0800d73d ]

If a timer's callback function calls rte_timer_reset_sync() or
rte_timer_stop_sync() on another timer that is in the RUNNING state and
owned by the current lcore, the *_sync() calls will loop indefinitely.

Relatedly, if a timer's callback function calls *_sync() on another
timer that is in the RUNNING state and is owned by a different lcore,
but a timer callback function runs on that different lcore and calls
*_sync() on a timer that is in the RUNNING state and owned by the
current lcore, the two lcores will loop indefinitely.

Add a note in the rte_timer_stop_sync and rte_timer_reset_sync
documentation that indicates that these APIs should not be used inside
timer callback functions in order to avoid the hangs described above,
and suggests an alternative.

Bugzilla ID: 491

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 lib/librte_timer/rte_timer.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lib/librte_timer/rte_timer.h b/lib/librte_timer/rte_timer.h
index 9dc5fc3092..88cc267686 100644
--- a/lib/librte_timer/rte_timer.h
+++ b/lib/librte_timer/rte_timer.h
@@ -274,6 +274,12 @@ int rte_timer_reset(struct rte_timer *tim, uint64_t ticks,
  *   The callback function of the timer.
  * @param arg
  *   The user argument of the callback function.
+ *
+ * @note
+ *   This API should not be called inside a timer's callback function to
+ *   reset another timer; doing so could hang in certain scenarios. Instead,
+ *   the rte_timer_reset() API can be called directly and its return code
+ *   can be checked for success or failure.
  */
 void
 rte_timer_reset_sync(struct rte_timer *tim, uint64_t ticks,
@@ -313,6 +319,12 @@ int rte_timer_stop(struct rte_timer *tim);
  *
  * @param tim
  *   The timer handle.
+ *
+ * @note
+ *   This API should not be called inside a timer's callback function to
+ *   stop another timer; doing so could hang in certain scenarios. Instead, the
+ *   rte_timer_stop() API can be called directly and its return code can
+ *   be checked for success or failure.
  */
 void rte_timer_stop_sync(struct rte_timer *tim);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.296554170 +0000
+++ 0114-timer-add-limitation-note-for-sync-stop-and-reset.patch	2020-10-28 10:35:11.668832438 +0000
@@ -1,8 +1,10 @@
-From 0875ec4dd55a548a1f8a27674b1c136c0800d73d Mon Sep 17 00:00:00 2001
+From 92749fc95c9c53d6eef799b70af2d0e1246c3bf6 Mon Sep 17 00:00:00 2001
 From: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
 Date: Wed, 9 Sep 2020 09:41:14 -0500
 Subject: [PATCH] timer: add limitation note for sync stop and reset
 
+[ upstream commit 0875ec4dd55a548a1f8a27674b1c136c0800d73d ]
+
 If a timer's callback function calls rte_timer_reset_sync() or
 rte_timer_stop_sync() on another timer that is in the RUNNING state and
 owned by the current lcore, the *_sync() calls will loop indefinitely.
@@ -19,7 +21,6 @@
 and suggests an alternative.
 
 Bugzilla ID: 491
-Cc: stable@dpdk.org
 
 Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
 Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
@@ -28,10 +29,10 @@
  1 file changed, 12 insertions(+)
 
 diff --git a/lib/librte_timer/rte_timer.h b/lib/librte_timer/rte_timer.h
-index 7af83783b0..22a27aa08d 100644
+index 9dc5fc3092..88cc267686 100644
 --- a/lib/librte_timer/rte_timer.h
 +++ b/lib/librte_timer/rte_timer.h
-@@ -262,6 +262,12 @@ int rte_timer_reset(struct rte_timer *tim, uint64_t ticks,
+@@ -274,6 +274,12 @@ int rte_timer_reset(struct rte_timer *tim, uint64_t ticks,
   *   The callback function of the timer.
   * @param arg
   *   The user argument of the callback function.
@@ -44,7 +45,7 @@
   */
  void
  rte_timer_reset_sync(struct rte_timer *tim, uint64_t ticks,
-@@ -301,6 +307,12 @@ int rte_timer_stop(struct rte_timer *tim);
+@@ -313,6 +319,12 @@ int rte_timer_stop(struct rte_timer *tim);
   *
   * @param tim
   *   The timer handle.

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

* [dpdk-stable] patch 'app/testpmd: fix build with gcc 11' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (112 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'timer: add limitation note for sync stop and reset' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'pmdinfogen: " luca.boccassi
                   ` (92 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: David Marchand, Phil Yang, Asaf Penso, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 96f51e519ac49511a7c61c57b818daa1873d0671 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Mon, 21 Sep 2020 14:38:29 +0100
Subject: [PATCH] app/testpmd: fix build with gcc 11
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 62aa0e8c6693bb5656b5a9ad5c5248fce9150ee3 ]

Error observed with gcc 11 under development
gcc (GCC) 11.0.0 20200920 (experimental)

../app/test-pmd/config.c:1777:61:
	warning: argument 3 of type ‘const uint32_t[n]’
	{aka ‘const unsigned int[n]’} declared as a variable length
	array [-Wvla-parameter]
 1777 | port_flow_list(portid_t port_id, uint32_t n,
 			const uint32_t group[n])
      |                 ~~~~~~~~~~~~~~~^~~~~~~~
In file included from ../app/test-pmd/config.c:53:
../app/test-pmd/testpmd.h:764:67:
	note: previously declared as a pointer ‘const uint32_t *’
	{aka ‘const unsigned int *’}
  764 | void port_flow_list(portid_t port_id, uint32_t n,
  				const uint32_t *group);
      |                         ~~~~~~~~~~~~~~~~^~~~~

Fixes: 938a184a1870 ("app/testpmd: implement basic support for flow API")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Asaf Penso <asafp@nvidia.com>
---
 app/test-pmd/config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 343402f172..124a6b8c57 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1568,7 +1568,7 @@ port_flow_query(portid_t port_id, uint32_t rule,
 
 /** List flow rules. */
 void
-port_flow_list(portid_t port_id, uint32_t n, const uint32_t group[n])
+port_flow_list(portid_t port_id, uint32_t n, const uint32_t *group)
 {
 	struct rte_port *port;
 	struct port_flow *pf;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.325632411 +0000
+++ 0115-app-testpmd-fix-build-with-gcc-11.patch	2020-10-28 10:35:11.672832496 +0000
@@ -1,4 +1,4 @@
-From 62aa0e8c6693bb5656b5a9ad5c5248fce9150ee3 Mon Sep 17 00:00:00 2001
+From 96f51e519ac49511a7c61c57b818daa1873d0671 Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Mon, 21 Sep 2020 14:38:29 +0100
 Subject: [PATCH] app/testpmd: fix build with gcc 11
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 62aa0e8c6693bb5656b5a9ad5c5248fce9150ee3 ]
+
 Error observed with gcc 11 under development
 gcc (GCC) 11.0.0 20200920 (experimental)
 
@@ -25,7 +27,6 @@
       |                         ~~~~~~~~~~~~~~~~^~~~~
 
 Fixes: 938a184a1870 ("app/testpmd: implement basic support for flow API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 Reviewed-by: David Marchand <david.marchand@redhat.com>
@@ -36,10 +37,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
-index 418ea6dda4..e73dc66c8d 100644
+index 343402f172..124a6b8c57 100644
 --- a/app/test-pmd/config.c
 +++ b/app/test-pmd/config.c
-@@ -1896,7 +1896,7 @@ port_flow_aged(portid_t port_id, uint8_t destroy)
+@@ -1568,7 +1568,7 @@ port_flow_query(portid_t port_id, uint32_t rule,
  
  /** List flow rules. */
  void

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

* [dpdk-stable] patch 'pmdinfogen: fix build with gcc 11' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (113 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'app/testpmd: fix build with gcc 11' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'raw/ioat: fix missing close function' " luca.boccassi
                   ` (91 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 928a5ae05cdd22d975566b82c1b2c66fd107d9ca Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Mon, 21 Sep 2020 14:38:30 +0100
Subject: [PATCH] pmdinfogen: fix build with gcc 11
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 5a75cc3c88143496030b5bed76bd031ddbe9e355 ]

Error observed with gcc 11 under development
gcc (GCC) 11.0.0 20200920 (experimental)

build error:
In file included from ../buildtools/pmdinfogen/pmdinfogen.c:17:
../buildtools/pmdinfogen/pmdinfogen.c: In function ‘parse_elf’:
../buildtools/pmdinfogen/pmdinfogen.h:78:1:
	warning: this ‘else’ clause does not guard...
	[-Wmisleading-indentation]
   78 | else \
      | ^~~~
../buildtools/pmdinfogen/pmdinfogen.h:83:35:
	note: in expansion of macro ‘CONVERT_NATIVE’
   83 | #define TO_NATIVE(fend, width, x) CONVERT_NATIVE(fend, width, x)
      |                                   ^~~~~~~~~~~~~~
../buildtools/pmdinfogen/pmdinfogen.c:152:28:
	note: in expansion of macro ‘TO_NATIVE’
  152 |         hdr->e_type      = TO_NATIVE(endian, 16, hdr->e_type);
      |                            ^~~~~~~~~
../buildtools/pmdinfogen/pmdinfogen.h:80:9:
	note: ...this statement, but the latter is misleadingly indented
	as if it were guarded by the ‘else’
   80 |         ___x; \
      |         ^~~~

Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 buildtools/pmdinfogen/pmdinfogen.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/buildtools/pmdinfogen/pmdinfogen.h b/buildtools/pmdinfogen/pmdinfogen.h
index c8a9e2136a..467216d12b 100644
--- a/buildtools/pmdinfogen/pmdinfogen.h
+++ b/buildtools/pmdinfogen/pmdinfogen.h
@@ -82,7 +82,7 @@ if ((fend) == ELFDATA2LSB) \
 	___x = le##width##toh(x); \
 else \
 	___x = be##width##toh(x); \
-	___x; \
+___x; \
 })
 
 #define TO_NATIVE(fend, width, x) CONVERT_NATIVE(fend, width, x)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.358138557 +0000
+++ 0116-pmdinfogen-fix-build-with-gcc-11.patch	2020-10-28 10:35:11.672832496 +0000
@@ -1,4 +1,4 @@
-From 5a75cc3c88143496030b5bed76bd031ddbe9e355 Mon Sep 17 00:00:00 2001
+From 928a5ae05cdd22d975566b82c1b2c66fd107d9ca Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Mon, 21 Sep 2020 14:38:30 +0100
 Subject: [PATCH] pmdinfogen: fix build with gcc 11
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 5a75cc3c88143496030b5bed76bd031ddbe9e355 ]
+
 Error observed with gcc 11 under development
 gcc (GCC) 11.0.0 20200920 (experimental)
 
@@ -32,7 +34,6 @@
       |         ^~~~
 
 Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 Reviewed-by: David Marchand <david.marchand@redhat.com>
@@ -41,10 +42,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/buildtools/pmdinfogen/pmdinfogen.h b/buildtools/pmdinfogen/pmdinfogen.h
-index 93930e4543..38fd3ddcc3 100644
+index c8a9e2136a..467216d12b 100644
 --- a/buildtools/pmdinfogen/pmdinfogen.h
 +++ b/buildtools/pmdinfogen/pmdinfogen.h
-@@ -77,7 +77,7 @@ if ((fend) == ELFDATA2LSB) \
+@@ -82,7 +82,7 @@ if ((fend) == ELFDATA2LSB) \
  	___x = le##width##toh(x); \
  else \
  	___x = be##width##toh(x); \

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

* [dpdk-stable] patch 'raw/ioat: fix missing close function' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (114 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'pmdinfogen: " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'examples/ioat: fix stats print' " luca.boccassi
                   ` (90 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Kevin Laatz; +Cc: Sunil Pai G, Bruce Richardson, Radu Nicolau, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From b0e37c91df43873f22c843875accceb1e11fa83f Mon Sep 17 00:00:00 2001
From: Kevin Laatz <kevin.laatz@intel.com>
Date: Thu, 8 Oct 2020 10:51:10 +0100
Subject: [PATCH] raw/ioat: fix missing close function

[ upstream commit 8c6cedee761c7abd8c3d451bffa7c70747ab7629 ]

When rte_rawdev_pmd_release() is called, rte_rawdev_close() looks for a
dev_close function for the device causing a segmentation fault when no
close() function is implemented for a driver.

This patch resolves the issue by adding a stub function ioat_dev_close().

Fixes: f687e842e328 ("raw/ioat: introduce IOAT driver")

Reported-by: Sunil Pai G <sunil.pai.g@intel.com>
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Sunil Pai G <sunil.pai.g@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
---
 drivers/raw/ioat/ioat_rawdev.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/raw/ioat/ioat_rawdev.c b/drivers/raw/ioat/ioat_rawdev.c
index af8414b34c..a9b762330a 100644
--- a/drivers/raw/ioat/ioat_rawdev.c
+++ b/drivers/raw/ioat/ioat_rawdev.c
@@ -198,6 +198,12 @@ ioat_xstats_reset(struct rte_rawdev *dev, const uint32_t *ids, uint32_t nb_ids)
 	return 0;
 }
 
+static int
+ioat_dev_close(struct rte_rawdev *dev __rte_unused)
+{
+	return 0;
+}
+
 extern int ioat_rawdev_test(uint16_t dev_id);
 
 static int
@@ -207,6 +213,7 @@ ioat_rawdev_create(const char *name, struct rte_pci_device *dev)
 			.dev_configure = ioat_dev_configure,
 			.dev_start = ioat_dev_start,
 			.dev_stop = ioat_dev_stop,
+			.dev_close = ioat_dev_close,
 			.dev_info_get = ioat_dev_info_get,
 			.xstats_get = ioat_xstats_get,
 			.xstats_get_names = ioat_xstats_get_names,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.386270719 +0000
+++ 0117-raw-ioat-fix-missing-close-function.patch	2020-10-28 10:35:11.672832496 +0000
@@ -1,8 +1,10 @@
-From 8c6cedee761c7abd8c3d451bffa7c70747ab7629 Mon Sep 17 00:00:00 2001
+From b0e37c91df43873f22c843875accceb1e11fa83f Mon Sep 17 00:00:00 2001
 From: Kevin Laatz <kevin.laatz@intel.com>
 Date: Thu, 8 Oct 2020 10:51:10 +0100
 Subject: [PATCH] raw/ioat: fix missing close function
 
+[ upstream commit 8c6cedee761c7abd8c3d451bffa7c70747ab7629 ]
+
 When rte_rawdev_pmd_release() is called, rte_rawdev_close() looks for a
 dev_close function for the device causing a segmentation fault when no
 close() function is implemented for a driver.
@@ -10,7 +12,6 @@
 This patch resolves the issue by adding a stub function ioat_dev_close().
 
 Fixes: f687e842e328 ("raw/ioat: introduce IOAT driver")
-Cc: stable@dpdk.org
 
 Reported-by: Sunil Pai G <sunil.pai.g@intel.com>
 Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
@@ -22,10 +23,10 @@
  1 file changed, 7 insertions(+)
 
 diff --git a/drivers/raw/ioat/ioat_rawdev.c b/drivers/raw/ioat/ioat_rawdev.c
-index 7f1a154360..0732b059fe 100644
+index af8414b34c..a9b762330a 100644
 --- a/drivers/raw/ioat/ioat_rawdev.c
 +++ b/drivers/raw/ioat/ioat_rawdev.c
-@@ -203,6 +203,12 @@ ioat_xstats_reset(struct rte_rawdev *dev, const uint32_t *ids, uint32_t nb_ids)
+@@ -198,6 +198,12 @@ ioat_xstats_reset(struct rte_rawdev *dev, const uint32_t *ids, uint32_t nb_ids)
  	return 0;
  }
  
@@ -38,7 +39,7 @@
  extern int ioat_rawdev_test(uint16_t dev_id);
  
  static int
-@@ -212,6 +218,7 @@ ioat_rawdev_create(const char *name, struct rte_pci_device *dev)
+@@ -207,6 +213,7 @@ ioat_rawdev_create(const char *name, struct rte_pci_device *dev)
  			.dev_configure = ioat_dev_configure,
  			.dev_start = ioat_dev_start,
  			.dev_stop = ioat_dev_stop,

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

* [dpdk-stable] patch 'examples/ioat: fix stats print' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (115 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'raw/ioat: fix missing close function' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/hns3: fix error type when validating RSS flow action' " luca.boccassi
                   ` (89 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Kevin Laatz; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 1046574c774105dc4b955ae5ec2e102068eef758 Mon Sep 17 00:00:00 2001
From: Kevin Laatz <kevin.laatz@intel.com>
Date: Thu, 17 Sep 2020 14:07:40 +0100
Subject: [PATCH] examples/ioat: fix stats print

[ upstream commit 64d0a9097d96e554697f8473f196266bfaf62b9d ]

Currently some of the status string at the top of the stats output is being
cut off. To fix this, the status string array size has been increased.
In addition to this, the "\n" has been moved to the printf, rather than
having it in the last string, in case of future formatting issues due to
truncation.

Bugzilla ID: 536
Fixes: 632bcd9b5d4f ("examples/ioat: print statistics")

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/ioat/ioatfwd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/examples/ioat/ioatfwd.c b/examples/ioat/ioatfwd.c
index b66ee73bce..7971442b5d 100644
--- a/examples/ioat/ioatfwd.c
+++ b/examples/ioat/ioatfwd.c
@@ -168,7 +168,7 @@ print_stats(char *prgname)
 	struct rte_rawdev_xstats_name *names_xstats;
 	uint64_t *xstats;
 	unsigned int *ids_xstats, nb_xstats;
-	char status_string[120]; /* to print at the top of the output */
+	char status_string[255]; /* to print at the top of the output */
 	int status_strlen;
 	int ret;
 
@@ -194,7 +194,7 @@ print_stats(char *prgname)
 		"Rx Queues = %d, ", nb_queues);
 	status_strlen += snprintf(status_string + status_strlen,
 		sizeof(status_string) - status_strlen,
-		"Ring Size = %d\n", ring_size);
+		"Ring Size = %d", ring_size);
 
 	/* Allocate memory for xstats names and values */
 	ret = rte_rawdev_xstats_names_get(
@@ -251,7 +251,7 @@ print_stats(char *prgname)
 
 		memset(&delta_ts, 0, sizeof(struct total_statistics));
 
-		printf("%s", status_string);
+		printf("%s\n", status_string);
 
 		for (i = 0; i < cfg.nb_ports; i++) {
 			port_id = cfg.ports[i].rxtx_port;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.414850746 +0000
+++ 0118-examples-ioat-fix-stats-print.patch	2020-10-28 10:35:11.672832496 +0000
@@ -1,8 +1,10 @@
-From 64d0a9097d96e554697f8473f196266bfaf62b9d Mon Sep 17 00:00:00 2001
+From 1046574c774105dc4b955ae5ec2e102068eef758 Mon Sep 17 00:00:00 2001
 From: Kevin Laatz <kevin.laatz@intel.com>
 Date: Thu, 17 Sep 2020 14:07:40 +0100
 Subject: [PATCH] examples/ioat: fix stats print
 
+[ upstream commit 64d0a9097d96e554697f8473f196266bfaf62b9d ]
+
 Currently some of the status string at the top of the stats output is being
 cut off. To fix this, the status string array size has been increased.
 In addition to this, the "\n" has been moved to the printf, rather than
@@ -11,7 +13,6 @@
 
 Bugzilla ID: 536
 Fixes: 632bcd9b5d4f ("examples/ioat: print statistics")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
 Acked-by: Bruce Richardson <bruce.richardson@intel.com>
@@ -20,7 +21,7 @@
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/examples/ioat/ioatfwd.c b/examples/ioat/ioatfwd.c
-index e6d1d1236e..8cf606e25b 100644
+index b66ee73bce..7971442b5d 100644
 --- a/examples/ioat/ioatfwd.c
 +++ b/examples/ioat/ioatfwd.c
 @@ -168,7 +168,7 @@ print_stats(char *prgname)

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

* [dpdk-stable] patch 'net/hns3: fix error type when validating RSS flow action' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (116 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'examples/ioat: fix stats print' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/hns3: fix flow error type' " luca.boccassi
                   ` (88 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Wei Hu (Xavier); +Cc: Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From e9c49642bda64e099b8c137a919f3be45df744fb Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Tue, 29 Sep 2020 20:01:11 +0800
Subject: [PATCH] net/hns3: fix error type when validating RSS flow action

[ upstream commit f8f8df765f5f9a983f20a9a4f061f5a02672f693 ]

Because the macro named RTE_FLOW_ERROR_TYPE_ACTION_CONF indicates a
action configuration and the macro named RTE_FLOW_ERROR_TYPE_ACTION
indicates a specific action, the driver needs to return
RTE_FLOW_ERROR_ACTION_CONF type and notify the user when a RSS
configuration is invalid with actions list in the internal function
named hns3_parse_rss_filter called by the '.validate' ops implementation
function named hns3_flow_validate.

Besides, this patch removes some unnecessary judgment lines in
hns3_parse_rss_filter.

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

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

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 4bc6812283..1137cb24e8 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1261,7 +1261,6 @@ hns3_parse_rss_filter(struct rte_eth_dev *dev,
 	const struct rte_flow_action_rss *rss;
 	const struct rte_flow_action *act;
 	uint32_t act_index = 0;
-	uint64_t flow_types;
 	uint16_t n;
 
 	NEXT_ITEM_OF_ACTION(act, actions, act_index);
@@ -1269,7 +1268,7 @@ hns3_parse_rss_filter(struct rte_eth_dev *dev,
 
 	if (rss == NULL) {
 		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ACTION,
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
 					  act, "no valid queues");
 	}
 
@@ -1277,47 +1276,32 @@ hns3_parse_rss_filter(struct rte_eth_dev *dev,
 		if (rss->queue[n] < dev->data->nb_rx_queues)
 			continue;
 		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ACTION,
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
 					  act,
 					  "queue id > max number of queues");
 	}
 
-	/* Parse flow types of RSS */
 	if (!(rss->types & HNS3_ETH_RSS_SUPPORT) && rss->types)
 		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ACTION,
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
 					  act,
 					  "Flow types is unsupported by "
 					  "hns3's RSS");
-
-	flow_types = rss->types & HNS3_ETH_RSS_SUPPORT;
-	if (flow_types != rss->types)
-		hns3_warn(hw, "RSS flow types(%" PRIx64 ") include unsupported "
-			  "flow types", rss->types);
-
-	/* Parse RSS related parameters from RSS configuration */
-	switch (rss->func) {
-	case RTE_ETH_HASH_FUNCTION_DEFAULT:
-	case RTE_ETH_HASH_FUNCTION_TOEPLITZ:
-	case RTE_ETH_HASH_FUNCTION_SIMPLE_XOR:
-		break;
-	default:
+	if (rss->func >= RTE_ETH_HASH_FUNCTION_MAX)
 		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_ACTION, act,
-					  "input RSS hash functions are not supported");
-	}
-
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, act,
+					  "RSS hash func are not supported");
 	if (rss->level)
 		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_ACTION, act,
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, act,
 					  "a nonzero RSS encapsulation level is not supported");
 	if (rss->key_len && rss->key_len != RTE_DIM(rss_conf->key))
 		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_ACTION, act,
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, act,
 					  "RSS hash key must be exactly 40 bytes");
 	if (rss->queue_num > RTE_DIM(rss_conf->queue))
 		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_ACTION, act,
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, act,
 					  "too many queues for RSS context");
 
 	act_index++;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.443754562 +0000
+++ 0119-net-hns3-fix-error-type-when-validating-RSS-flow-act.patch	2020-10-28 10:35:11.676832556 +0000
@@ -1,8 +1,10 @@
-From f8f8df765f5f9a983f20a9a4f061f5a02672f693 Mon Sep 17 00:00:00 2001
+From e9c49642bda64e099b8c137a919f3be45df744fb Mon Sep 17 00:00:00 2001
 From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
 Date: Tue, 29 Sep 2020 20:01:11 +0800
 Subject: [PATCH] net/hns3: fix error type when validating RSS flow action
 
+[ upstream commit f8f8df765f5f9a983f20a9a4f061f5a02672f693 ]
+
 Because the macro named RTE_FLOW_ERROR_TYPE_ACTION_CONF indicates a
 action configuration and the macro named RTE_FLOW_ERROR_TYPE_ACTION
 indicates a specific action, the driver needs to return
@@ -15,19 +17,18 @@
 hns3_parse_rss_filter.
 
 Fixes: c37ca66f2b27 ("net/hns3: support RSS")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lijun Ou <oulijun@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
 ---
- drivers/net/hns3/hns3_flow.c | 35 +++++++++--------------------------
- 1 file changed, 9 insertions(+), 26 deletions(-)
+ drivers/net/hns3/hns3_flow.c | 34 +++++++++-------------------------
+ 1 file changed, 9 insertions(+), 25 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
-index f8e5f05d38..a6676d650d 100644
+index 4bc6812283..1137cb24e8 100644
 --- a/drivers/net/hns3/hns3_flow.c
 +++ b/drivers/net/hns3/hns3_flow.c
-@@ -1356,7 +1356,6 @@ hns3_parse_rss_filter(struct rte_eth_dev *dev,
+@@ -1261,7 +1261,6 @@ hns3_parse_rss_filter(struct rte_eth_dev *dev,
  	const struct rte_flow_action_rss *rss;
  	const struct rte_flow_action *act;
  	uint32_t act_index = 0;
@@ -35,7 +36,7 @@
  	uint16_t n;
  
  	NEXT_ITEM_OF_ACTION(act, actions, act_index);
-@@ -1364,7 +1363,7 @@ hns3_parse_rss_filter(struct rte_eth_dev *dev,
+@@ -1269,7 +1268,7 @@ hns3_parse_rss_filter(struct rte_eth_dev *dev,
  
  	if (rss == NULL) {
  		return rte_flow_error_set(error, EINVAL,
@@ -44,7 +45,7 @@
  					  act, "no valid queues");
  	}
  
-@@ -1372,48 +1371,32 @@ hns3_parse_rss_filter(struct rte_eth_dev *dev,
+@@ -1277,47 +1276,32 @@ hns3_parse_rss_filter(struct rte_eth_dev *dev,
  		if (rss->queue[n] < dev->data->nb_rx_queues)
  			continue;
  		return rte_flow_error_set(error, EINVAL,
@@ -73,7 +74,6 @@
 -	case RTE_ETH_HASH_FUNCTION_DEFAULT:
 -	case RTE_ETH_HASH_FUNCTION_TOEPLITZ:
 -	case RTE_ETH_HASH_FUNCTION_SIMPLE_XOR:
--	case RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ:
 -		break;
 -	default:
 +	if (rss->func >= RTE_ETH_HASH_FUNCTION_MAX)
@@ -100,7 +100,7 @@
 +					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, act,
  					  "too many queues for RSS context");
  
- 	if (rss->types & (ETH_RSS_L4_DST_ONLY | ETH_RSS_L4_SRC_ONLY) &&
+ 	act_index++;
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/hns3: fix flow error type' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (117 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/hns3: fix error type when validating RSS flow action' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/hns3: check PCI config space reads' " luca.boccassi
                   ` (87 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Wei Hu (Xavier); +Cc: Chengwen Feng, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 377ce6254e47889ec3d2026309148626a6187a6c Mon Sep 17 00:00:00 2001
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date: Tue, 29 Sep 2020 20:01:12 +0800
Subject: [PATCH] net/hns3: fix flow error type

[ upstream commit f2577609209330341922bea57e24b7e27ba084d3 ]

The API of rte_flow_error_set is used to pass detail error information
to caller, this patch sets suitable type when calling rte_flow_error_set
API.

Fixes: fcba820d9b9e ("net/hns3: support flow director")
Fixes: c37ca66f2b27 ("net/hns3: support RSS")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 54 ++++++++++++++++++------------------
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 1137cb24e8..21dd126ffe 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -128,9 +128,9 @@ hns3_counter_new(struct rte_eth_dev *dev, uint32_t shared, uint32_t id,
 	if (cnt) {
 		if (!cnt->shared || cnt->shared != shared)
 			return rte_flow_error_set(error, ENOTSUP,
-						  RTE_FLOW_ERROR_TYPE_ACTION,
-						  cnt,
-						  "Counter id is used,shared flag not match");
+				RTE_FLOW_ERROR_TYPE_ACTION_CONF,
+				cnt,
+				"Counter id is used, shared flag not match");
 		cnt->ref_cnt++;
 		return 0;
 	}
@@ -138,7 +138,7 @@ hns3_counter_new(struct rte_eth_dev *dev, uint32_t shared, uint32_t id,
 	cnt = rte_zmalloc("hns3 counter", sizeof(*cnt), 0);
 	if (cnt == NULL)
 		return rte_flow_error_set(error, ENOMEM,
-					  RTE_FLOW_ERROR_TYPE_ACTION, cnt,
+					  RTE_FLOW_ERROR_TYPE_HANDLE, cnt,
 					  "Alloc mem for counter failed");
 	cnt->id = id;
 	cnt->shared = shared;
@@ -166,13 +166,13 @@ hns3_counter_query(struct rte_eth_dev *dev, struct rte_flow *flow,
 	cnt = hns3_counter_lookup(dev, flow->counter_id);
 	if (cnt == NULL)
 		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
+					  RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
 					  "Can't find counter id");
 
 	ret = hns3_get_count(&hns->hw, flow->counter_id, &value);
 	if (ret) {
 		rte_flow_error_set(error, -ret,
-				   RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+				   RTE_FLOW_ERROR_TYPE_HANDLE,
 				   NULL, "Read counter fail.");
 		return ret;
 	}
@@ -279,9 +279,9 @@ hns3_handle_actions(struct rte_eth_dev *dev,
 			    (const struct rte_flow_action_mark *)actions->conf;
 			if (mark->id >= HNS3_MAX_FILTER_ID)
 				return rte_flow_error_set(error, EINVAL,
-						     RTE_FLOW_ERROR_TYPE_ACTION,
-						     actions,
-						     "Invalid Mark ID");
+						RTE_FLOW_ERROR_TYPE_ACTION_CONF,
+						actions,
+						"Invalid Mark ID");
 			rule->fd_id = mark->id;
 			rule->flags |= HNS3_RULE_FLAG_FDID;
 			break;
@@ -295,9 +295,9 @@ hns3_handle_actions(struct rte_eth_dev *dev,
 			counter_num = pf->fdir.fd_cfg.cnt_num[HNS3_FD_STAGE_1];
 			if (act_count->id >= counter_num)
 				return rte_flow_error_set(error, EINVAL,
-						     RTE_FLOW_ERROR_TYPE_ACTION,
-						     actions,
-						     "Invalid counter id");
+						RTE_FLOW_ERROR_TYPE_ACTION_CONF,
+						actions,
+						"Invalid counter id");
 			rule->act_cnt = *act_count;
 			rule->flags |= HNS3_RULE_FLAG_COUNTER;
 			break;
@@ -461,7 +461,7 @@ hns3_parse_ipv4(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
 		    ipv4_mask->hdr.time_to_live ||
 		    ipv4_mask->hdr.hdr_checksum) {
 			return rte_flow_error_set(error, EINVAL,
-						  RTE_FLOW_ERROR_TYPE_ITEM,
+						  RTE_FLOW_ERROR_TYPE_ITEM_MASK,
 						  item,
 						  "Only support src & dst ip,tos,proto in IPV4");
 		}
@@ -526,7 +526,7 @@ hns3_parse_ipv6(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
 		if (ipv6_mask->hdr.vtc_flow ||
 		    ipv6_mask->hdr.payload_len || ipv6_mask->hdr.hop_limits) {
 			return rte_flow_error_set(error, EINVAL,
-						  RTE_FLOW_ERROR_TYPE_ITEM,
+						  RTE_FLOW_ERROR_TYPE_ITEM_MASK,
 						  item,
 						  "Only support src & dst ip,proto in IPV6");
 		}
@@ -586,7 +586,7 @@ hns3_parse_tcp(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
 		    tcp_mask->hdr.rx_win ||
 		    tcp_mask->hdr.cksum || tcp_mask->hdr.tcp_urp) {
 			return rte_flow_error_set(error, EINVAL,
-						  RTE_FLOW_ERROR_TYPE_ITEM,
+						  RTE_FLOW_ERROR_TYPE_ITEM_MASK,
 						  item,
 						  "Only support src & dst port in TCP");
 		}
@@ -633,7 +633,7 @@ hns3_parse_udp(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
 		udp_mask = item->mask;
 		if (udp_mask->hdr.dgram_len || udp_mask->hdr.dgram_cksum) {
 			return rte_flow_error_set(error, EINVAL,
-						  RTE_FLOW_ERROR_TYPE_ITEM,
+						  RTE_FLOW_ERROR_TYPE_ITEM_MASK,
 						  item,
 						  "Only support src & dst port in UDP");
 		}
@@ -680,7 +680,7 @@ hns3_parse_sctp(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
 		sctp_mask = item->mask;
 		if (sctp_mask->hdr.cksum)
 			return rte_flow_error_set(error, EINVAL,
-						  RTE_FLOW_ERROR_TYPE_ITEM,
+						  RTE_FLOW_ERROR_TYPE_ITEM_MASK,
 						  item,
 						  "Only support src & dst port in SCTP");
 
@@ -825,14 +825,14 @@ hns3_parse_vxlan(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
 
 	if (vxlan_mask->flags)
 		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ITEM, item,
+					  RTE_FLOW_ERROR_TYPE_ITEM_MASK, item,
 					  "Flags is not supported in VxLAN");
 
 	/* VNI must be totally masked or not. */
 	if (memcmp(vxlan_mask->vni, full_mask, VNI_OR_TNI_LEN) &&
 	    memcmp(vxlan_mask->vni, zero_mask, VNI_OR_TNI_LEN))
 		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ITEM, item,
+					  RTE_FLOW_ERROR_TYPE_ITEM_MASK, item,
 					  "VNI must be totally masked or not in VxLAN");
 	if (vxlan_mask->vni[0]) {
 		hns3_set_bit(rule->input_set, OUTER_TUN_VNI, 1);
@@ -876,14 +876,14 @@ hns3_parse_nvgre(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
 
 	if (nvgre_mask->protocol || nvgre_mask->c_k_s_rsvd0_ver)
 		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ITEM, item,
+					  RTE_FLOW_ERROR_TYPE_ITEM_MASK, item,
 					  "Ver/protocal is not supported in NVGRE");
 
 	/* TNI must be totally masked or not. */
 	if (memcmp(nvgre_mask->tni, full_mask, VNI_OR_TNI_LEN) &&
 	    memcmp(nvgre_mask->tni, zero_mask, VNI_OR_TNI_LEN))
 		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ITEM, item,
+					  RTE_FLOW_ERROR_TYPE_ITEM_MASK, item,
 					  "TNI must be totally masked or not in NVGRE");
 
 	if (nvgre_mask->tni[0]) {
@@ -930,13 +930,13 @@ hns3_parse_geneve(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
 
 	if (geneve_mask->ver_opt_len_o_c_rsvd0 || geneve_mask->protocol)
 		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ITEM, item,
+					  RTE_FLOW_ERROR_TYPE_ITEM_MASK, item,
 					  "Ver/protocal is not supported in GENEVE");
 	/* VNI must be totally masked or not. */
 	if (memcmp(geneve_mask->vni, full_mask, VNI_OR_TNI_LEN) &&
 	    memcmp(geneve_mask->vni, zero_mask, VNI_OR_TNI_LEN))
 		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ITEM, item,
+					  RTE_FLOW_ERROR_TYPE_ITEM_MASK, item,
 					  "VNI must be totally masked or not in GENEVE");
 	if (geneve_mask->vni[0]) {
 		hns3_set_bit(rule->input_set, OUTER_TUN_VNI, 1);
@@ -967,7 +967,7 @@ hns3_parse_tunnel(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
 		break;
 	default:
 		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_HANDLE,
+					  RTE_FLOW_ERROR_TYPE_ITEM,
 					  NULL, "Unsupported tunnel type!");
 	}
 	if (ret)
@@ -1021,7 +1021,7 @@ hns3_parse_normal(const struct rte_flow_item *item,
 		break;
 	default:
 		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_HANDLE,
+					  RTE_FLOW_ERROR_TYPE_ITEM,
 					  NULL, "Unsupported normal type!");
 	}
 
@@ -1037,7 +1037,7 @@ hns3_validate_item(const struct rte_flow_item *item,
 
 	if (item->last)
 		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_UNSPECIFIED, item,
+					  RTE_FLOW_ERROR_TYPE_ITEM_LAST, item,
 					  "Not supported last point for range");
 
 	for (i = 0; i < step_mngr.count; i++) {
@@ -1123,7 +1123,7 @@ hns3_parse_fdir_filter(struct rte_eth_dev *dev,
 
 	if (dev->data->dev_conf.fdir_conf.mode != RTE_FDIR_MODE_PERFECT)
 		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_ITEM_NUM, NULL,
+					  RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
 					  "fdir_conf.mode isn't perfect");
 
 	step_mngr.items = first_items;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.475830650 +0000
+++ 0120-net-hns3-fix-flow-error-type.patch	2020-10-28 10:35:11.676832556 +0000
@@ -1,15 +1,16 @@
-From f2577609209330341922bea57e24b7e27ba084d3 Mon Sep 17 00:00:00 2001
+From 377ce6254e47889ec3d2026309148626a6187a6c Mon Sep 17 00:00:00 2001
 From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
 Date: Tue, 29 Sep 2020 20:01:12 +0800
 Subject: [PATCH] net/hns3: fix flow error type
 
+[ upstream commit f2577609209330341922bea57e24b7e27ba084d3 ]
+
 The API of rte_flow_error_set is used to pass detail error information
 to caller, this patch sets suitable type when calling rte_flow_error_set
 API.
 
 Fixes: fcba820d9b9e ("net/hns3: support flow director")
 Fixes: c37ca66f2b27 ("net/hns3: support RSS")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -18,10 +19,10 @@
  1 file changed, 27 insertions(+), 27 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
-index a6676d650d..4fb129e32b 100644
+index 1137cb24e8..21dd126ffe 100644
 --- a/drivers/net/hns3/hns3_flow.c
 +++ b/drivers/net/hns3/hns3_flow.c
-@@ -168,9 +168,9 @@ hns3_counter_new(struct rte_eth_dev *dev, uint32_t shared, uint32_t id,
+@@ -128,9 +128,9 @@ hns3_counter_new(struct rte_eth_dev *dev, uint32_t shared, uint32_t id,
  	if (cnt) {
  		if (!cnt->shared || cnt->shared != shared)
  			return rte_flow_error_set(error, ENOTSUP,
@@ -34,7 +35,7 @@
  		cnt->ref_cnt++;
  		return 0;
  	}
-@@ -178,7 +178,7 @@ hns3_counter_new(struct rte_eth_dev *dev, uint32_t shared, uint32_t id,
+@@ -138,7 +138,7 @@ hns3_counter_new(struct rte_eth_dev *dev, uint32_t shared, uint32_t id,
  	cnt = rte_zmalloc("hns3 counter", sizeof(*cnt), 0);
  	if (cnt == NULL)
  		return rte_flow_error_set(error, ENOMEM,
@@ -43,7 +44,7 @@
  					  "Alloc mem for counter failed");
  	cnt->id = id;
  	cnt->shared = shared;
-@@ -206,13 +206,13 @@ hns3_counter_query(struct rte_eth_dev *dev, struct rte_flow *flow,
+@@ -166,13 +166,13 @@ hns3_counter_query(struct rte_eth_dev *dev, struct rte_flow *flow,
  	cnt = hns3_counter_lookup(dev, flow->counter_id);
  	if (cnt == NULL)
  		return rte_flow_error_set(error, EINVAL,
@@ -59,7 +60,7 @@
  				   NULL, "Read counter fail.");
  		return ret;
  	}
-@@ -374,9 +374,9 @@ hns3_handle_actions(struct rte_eth_dev *dev,
+@@ -279,9 +279,9 @@ hns3_handle_actions(struct rte_eth_dev *dev,
  			    (const struct rte_flow_action_mark *)actions->conf;
  			if (mark->id >= HNS3_MAX_FILTER_ID)
  				return rte_flow_error_set(error, EINVAL,
@@ -72,7 +73,7 @@
  			rule->fd_id = mark->id;
  			rule->flags |= HNS3_RULE_FLAG_FDID;
  			break;
-@@ -390,9 +390,9 @@ hns3_handle_actions(struct rte_eth_dev *dev,
+@@ -295,9 +295,9 @@ hns3_handle_actions(struct rte_eth_dev *dev,
  			counter_num = pf->fdir.fd_cfg.cnt_num[HNS3_FD_STAGE_1];
  			if (act_count->id >= counter_num)
  				return rte_flow_error_set(error, EINVAL,
@@ -85,7 +86,7 @@
  			rule->act_cnt = *act_count;
  			rule->flags |= HNS3_RULE_FLAG_COUNTER;
  			break;
-@@ -556,7 +556,7 @@ hns3_parse_ipv4(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
+@@ -461,7 +461,7 @@ hns3_parse_ipv4(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
  		    ipv4_mask->hdr.time_to_live ||
  		    ipv4_mask->hdr.hdr_checksum) {
  			return rte_flow_error_set(error, EINVAL,
@@ -94,7 +95,7 @@
  						  item,
  						  "Only support src & dst ip,tos,proto in IPV4");
  		}
-@@ -621,7 +621,7 @@ hns3_parse_ipv6(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
+@@ -526,7 +526,7 @@ hns3_parse_ipv6(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
  		if (ipv6_mask->hdr.vtc_flow ||
  		    ipv6_mask->hdr.payload_len || ipv6_mask->hdr.hop_limits) {
  			return rte_flow_error_set(error, EINVAL,
@@ -103,7 +104,7 @@
  						  item,
  						  "Only support src & dst ip,proto in IPV6");
  		}
-@@ -681,7 +681,7 @@ hns3_parse_tcp(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
+@@ -586,7 +586,7 @@ hns3_parse_tcp(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
  		    tcp_mask->hdr.rx_win ||
  		    tcp_mask->hdr.cksum || tcp_mask->hdr.tcp_urp) {
  			return rte_flow_error_set(error, EINVAL,
@@ -112,7 +113,7 @@
  						  item,
  						  "Only support src & dst port in TCP");
  		}
-@@ -728,7 +728,7 @@ hns3_parse_udp(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
+@@ -633,7 +633,7 @@ hns3_parse_udp(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
  		udp_mask = item->mask;
  		if (udp_mask->hdr.dgram_len || udp_mask->hdr.dgram_cksum) {
  			return rte_flow_error_set(error, EINVAL,
@@ -121,7 +122,7 @@
  						  item,
  						  "Only support src & dst port in UDP");
  		}
-@@ -775,7 +775,7 @@ hns3_parse_sctp(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
+@@ -680,7 +680,7 @@ hns3_parse_sctp(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
  		sctp_mask = item->mask;
  		if (sctp_mask->hdr.cksum)
  			return rte_flow_error_set(error, EINVAL,
@@ -130,7 +131,7 @@
  						  item,
  						  "Only support src & dst port in SCTP");
  
-@@ -920,14 +920,14 @@ hns3_parse_vxlan(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
+@@ -825,14 +825,14 @@ hns3_parse_vxlan(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
  
  	if (vxlan_mask->flags)
  		return rte_flow_error_set(error, EINVAL,
@@ -147,7 +148,7 @@
  					  "VNI must be totally masked or not in VxLAN");
  	if (vxlan_mask->vni[0]) {
  		hns3_set_bit(rule->input_set, OUTER_TUN_VNI, 1);
-@@ -971,14 +971,14 @@ hns3_parse_nvgre(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
+@@ -876,14 +876,14 @@ hns3_parse_nvgre(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
  
  	if (nvgre_mask->protocol || nvgre_mask->c_k_s_rsvd0_ver)
  		return rte_flow_error_set(error, EINVAL,
@@ -164,7 +165,7 @@
  					  "TNI must be totally masked or not in NVGRE");
  
  	if (nvgre_mask->tni[0]) {
-@@ -1025,13 +1025,13 @@ hns3_parse_geneve(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
+@@ -930,13 +930,13 @@ hns3_parse_geneve(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
  
  	if (geneve_mask->ver_opt_len_o_c_rsvd0 || geneve_mask->protocol)
  		return rte_flow_error_set(error, EINVAL,
@@ -180,7 +181,7 @@
  					  "VNI must be totally masked or not in GENEVE");
  	if (geneve_mask->vni[0]) {
  		hns3_set_bit(rule->input_set, OUTER_TUN_VNI, 1);
-@@ -1062,7 +1062,7 @@ hns3_parse_tunnel(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
+@@ -967,7 +967,7 @@ hns3_parse_tunnel(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
  		break;
  	default:
  		return rte_flow_error_set(error, ENOTSUP,
@@ -189,7 +190,7 @@
  					  NULL, "Unsupported tunnel type!");
  	}
  	if (ret)
-@@ -1116,7 +1116,7 @@ hns3_parse_normal(const struct rte_flow_item *item,
+@@ -1021,7 +1021,7 @@ hns3_parse_normal(const struct rte_flow_item *item,
  		break;
  	default:
  		return rte_flow_error_set(error, ENOTSUP,
@@ -198,7 +199,7 @@
  					  NULL, "Unsupported normal type!");
  	}
  
-@@ -1132,7 +1132,7 @@ hns3_validate_item(const struct rte_flow_item *item,
+@@ -1037,7 +1037,7 @@ hns3_validate_item(const struct rte_flow_item *item,
  
  	if (item->last)
  		return rte_flow_error_set(error, ENOTSUP,
@@ -207,7 +208,7 @@
  					  "Not supported last point for range");
  
  	for (i = 0; i < step_mngr.count; i++) {
-@@ -1218,7 +1218,7 @@ hns3_parse_fdir_filter(struct rte_eth_dev *dev,
+@@ -1123,7 +1123,7 @@ hns3_parse_fdir_filter(struct rte_eth_dev *dev,
  
  	if (dev->data->dev_conf.fdir_conf.mode != RTE_FDIR_MODE_PERFECT)
  		return rte_flow_error_set(error, ENOTSUP,

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

* [dpdk-stable] patch 'net/hns3: check PCI config space reads' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (118 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/hns3: fix flow error type' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/mlx5: fix meter table definitions' " luca.boccassi
                   ` (86 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Hongbo Zheng; +Cc: Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From dd2e679a4923c4f3e3b9ffc910ea909409e3ffaf Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3@huawei.com>
Date: Tue, 29 Sep 2020 20:01:16 +0800
Subject: [PATCH] net/hns3: check PCI config space reads

[ upstream commit 243651cb6c8ca98ba7790d564f3d50cf9cd6c923 ]

This patch add return value check when calling rte_pci_read_config
function.

Fixes: cea37e513329 ("net/hns3: fix FLR reset")

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 62 +++++++++++++++++++++++++------
 1 file changed, 51 insertions(+), 11 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 87558832b2..5d1da44155 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -64,12 +64,18 @@ static int hns3vf_add_mc_mac_addr(struct hns3_hw *hw,
 static int hns3vf_remove_mc_mac_addr(struct hns3_hw *hw,
 				     struct rte_ether_addr *mac_addr);
 /* set PCI bus mastering */
-static void
+static int
 hns3vf_set_bus_master(const struct rte_pci_device *device, bool op)
 {
 	uint16_t reg;
+	int ret;
 
-	rte_pci_read_config(device, &reg, sizeof(reg), PCI_COMMAND);
+	ret = rte_pci_read_config(device, &reg, sizeof(reg), PCI_COMMAND);
+	if (ret < 0) {
+		PMD_INIT_LOG(ERR, "Failed to read PCI offset 0x%x",
+			     PCI_COMMAND);
+		return ret;
+	}
 
 	if (op)
 		/* set the master bit */
@@ -77,7 +83,7 @@ hns3vf_set_bus_master(const struct rte_pci_device *device, bool op)
 	else
 		reg &= ~(PCI_COMMAND_MASTER);
 
-	rte_pci_write_config(device, &reg, sizeof(reg), PCI_COMMAND);
+	return rte_pci_write_config(device, &reg, sizeof(reg), PCI_COMMAND);
 }
 
 /**
@@ -94,16 +100,34 @@ hns3vf_find_pci_capability(const struct rte_pci_device *device, int cap)
 	uint8_t pos;
 	uint8_t id;
 	int ttl;
+	int ret;
+
+	ret = rte_pci_read_config(device, &status, sizeof(status), PCI_STATUS);
+	if (ret < 0) {
+		PMD_INIT_LOG(ERR, "Failed to read PCI offset 0x%x", PCI_STATUS);
+		return 0;
+	}
 
-	rte_pci_read_config(device, &status, sizeof(status), PCI_STATUS);
 	if (!(status & PCI_STATUS_CAP_LIST))
 		return 0;
 
 	ttl = MAX_PCIE_CAPABILITY;
-	rte_pci_read_config(device, &pos, sizeof(pos), PCI_CAPABILITY_LIST);
+	ret = rte_pci_read_config(device, &pos, sizeof(pos),
+				  PCI_CAPABILITY_LIST);
+	if (ret < 0) {
+		PMD_INIT_LOG(ERR, "Failed to read PCI offset 0x%x",
+			     PCI_CAPABILITY_LIST);
+		return 0;
+	}
+
 	while (ttl-- && pos >= PCI_STD_HEADER_SIZEOF) {
-		rte_pci_read_config(device, &id, sizeof(id),
-				    (pos + PCI_CAP_LIST_ID));
+		ret = rte_pci_read_config(device, &id, sizeof(id),
+					  (pos + PCI_CAP_LIST_ID));
+		if (ret < 0) {
+			PMD_INIT_LOG(ERR, "Failed to read PCI offset 0x%x",
+				     (pos + PCI_CAP_LIST_ID));
+			break;
+		}
 
 		if (id == 0xFF)
 			break;
@@ -111,8 +135,13 @@ hns3vf_find_pci_capability(const struct rte_pci_device *device, int cap)
 		if (id == cap)
 			return (int)pos;
 
-		rte_pci_read_config(device, &pos, sizeof(pos),
-				    (pos + PCI_CAP_LIST_NEXT));
+		ret = rte_pci_read_config(device, &pos, sizeof(pos),
+					  (pos + PCI_CAP_LIST_NEXT));
+		if (ret < 0) {
+			PMD_INIT_LOG(ERR, "Failed to read PCI offset 0x%x",
+				     (pos + PCI_CAP_LIST_NEXT));
+			break;
+		}
 	}
 	return 0;
 }
@@ -122,11 +151,18 @@ hns3vf_enable_msix(const struct rte_pci_device *device, bool op)
 {
 	uint16_t control;
 	int pos;
+	int ret;
 
 	pos = hns3vf_find_pci_capability(device, PCI_CAP_ID_MSIX);
 	if (pos) {
-		rte_pci_read_config(device, &control, sizeof(control),
+		ret = rte_pci_read_config(device, &control, sizeof(control),
 				    (pos + PCI_MSIX_FLAGS));
+		if (ret < 0) {
+			PMD_INIT_LOG(ERR, "Failed to read PCI offset 0x%x",
+				     (pos + PCI_MSIX_FLAGS));
+			return -ENXIO;
+		}
+
 		if (op)
 			control |= PCI_MSIX_FLAGS_ENABLE;
 		else
@@ -2110,7 +2146,11 @@ hns3vf_reinit_dev(struct hns3_adapter *hns)
 
 	if (hw->reset.level == HNS3_VF_FULL_RESET) {
 		rte_intr_disable(&pci_dev->intr_handle);
-		hns3vf_set_bus_master(pci_dev, true);
+		ret = hns3vf_set_bus_master(pci_dev, true);
+		if (ret) {
+			hns3_err(hw, "failed to set pci bus, ret = %d", ret);
+			return ret;
+		}
 	}
 
 	/* Firmware command initialize */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.506050445 +0000
+++ 0121-net-hns3-check-PCI-config-space-reads.patch	2020-10-28 10:35:11.680832615 +0000
@@ -1,13 +1,14 @@
-From 243651cb6c8ca98ba7790d564f3d50cf9cd6c923 Mon Sep 17 00:00:00 2001
+From dd2e679a4923c4f3e3b9ffc910ea909409e3ffaf Mon Sep 17 00:00:00 2001
 From: Hongbo Zheng <zhenghongbo3@huawei.com>
 Date: Tue, 29 Sep 2020 20:01:16 +0800
 Subject: [PATCH] net/hns3: check PCI config space reads
 
+[ upstream commit 243651cb6c8ca98ba7790d564f3d50cf9cd6c923 ]
+
 This patch add return value check when calling rte_pci_read_config
 function.
 
 Fixes: cea37e513329 ("net/hns3: fix FLR reset")
-Cc: stable@dpdk.org
 
 Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
 Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
@@ -16,7 +17,7 @@
  1 file changed, 51 insertions(+), 11 deletions(-)
 
 diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
-index cf7ab2359d..1a19c0e6e6 100644
+index 87558832b2..5d1da44155 100644
 --- a/drivers/net/hns3/hns3_ethdev_vf.c
 +++ b/drivers/net/hns3/hns3_ethdev_vf.c
 @@ -64,12 +64,18 @@ static int hns3vf_add_mc_mac_addr(struct hns3_hw *hw,
@@ -124,7 +125,7 @@
  		if (op)
  			control |= PCI_MSIX_FLAGS_ENABLE;
  		else
-@@ -2576,7 +2612,11 @@ hns3vf_reinit_dev(struct hns3_adapter *hns)
+@@ -2110,7 +2146,11 @@ hns3vf_reinit_dev(struct hns3_adapter *hns)
  
  	if (hw->reset.level == HNS3_VF_FULL_RESET) {
  		rte_intr_disable(&pci_dev->intr_handle);

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

* [dpdk-stable] patch 'net/mlx5: fix meter table definitions' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (119 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/hns3: check PCI config space reads' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/mlx5: fix Rx queue count calculation' " luca.boccassi
                   ` (85 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 1015860cae9b0cc9e57bcc9941f2b00ab815116b Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Wed, 30 Sep 2020 14:47:01 +0800
Subject: [PATCH] net/mlx5: fix meter table definitions

[ upstream commit 3e8f3e51fd930674b5b0a481f35a4914a1a3accb ]

As metering and metadata features were developed at the same time. The
metering and metadata tables are defined conflicted.

This cause the meter suffix flow jump to the same metadata table and
cause flow deadloop.

Adjust the metering table define to fix that issue.

Fixes: 46a5e6bc6a85 ("net/mlx5: prepare meter flow tables")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 07be509f65..fd66aaf318 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -602,14 +602,14 @@ struct mlx5_flow_tbl_resource {
 };
 
 #define MLX5_MAX_TABLES UINT16_MAX
-#define MLX5_FLOW_TABLE_LEVEL_METER (UINT16_MAX - 3)
-#define MLX5_FLOW_TABLE_LEVEL_SUFFIX (UINT16_MAX - 2)
 #define MLX5_HAIRPIN_TX_TABLE (UINT16_MAX - 1)
 /* Reserve the last two tables for metadata register copy. */
 #define MLX5_FLOW_MREG_ACT_TABLE_GROUP (MLX5_MAX_TABLES - 1)
 #define MLX5_FLOW_MREG_CP_TABLE_GROUP (MLX5_MAX_TABLES - 2)
 /* Tables for metering splits should be added here. */
 #define MLX5_MAX_TABLES_EXTERNAL (MLX5_MAX_TABLES - 3)
+#define MLX5_FLOW_TABLE_LEVEL_METER (MLX5_MAX_TABLES - 4)
+#define MLX5_FLOW_TABLE_LEVEL_SUFFIX (MLX5_MAX_TABLES - 3)
 #define MLX5_MAX_TABLES_FDB UINT16_MAX
 
 #define MLX5_DBR_SIZE RTE_CACHE_LINE_SIZE
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.536307889 +0000
+++ 0122-net-mlx5-fix-meter-table-definitions.patch	2020-10-28 10:35:11.680832615 +0000
@@ -1,8 +1,10 @@
-From 3e8f3e51fd930674b5b0a481f35a4914a1a3accb Mon Sep 17 00:00:00 2001
+From 1015860cae9b0cc9e57bcc9941f2b00ab815116b Mon Sep 17 00:00:00 2001
 From: Suanming Mou <suanmingm@nvidia.com>
 Date: Wed, 30 Sep 2020 14:47:01 +0800
 Subject: [PATCH] net/mlx5: fix meter table definitions
 
+[ upstream commit 3e8f3e51fd930674b5b0a481f35a4914a1a3accb ]
+
 As metering and metadata features were developed at the same time. The
 metering and metadata tables are defined conflicted.
 
@@ -12,7 +14,6 @@
 Adjust the metering table define to fix that issue.
 
 Fixes: 46a5e6bc6a85 ("net/mlx5: prepare meter flow tables")
-Cc: stable@dpdk.org
 
 Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
@@ -21,10 +22,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
-index 43da9a1fb4..bd91e167e0 100644
+index 07be509f65..fd66aaf318 100644
 --- a/drivers/net/mlx5/mlx5.h
 +++ b/drivers/net/mlx5/mlx5.h
-@@ -503,14 +503,14 @@ struct mlx5_flow_tbl_resource {
+@@ -602,14 +602,14 @@ struct mlx5_flow_tbl_resource {
  };
  
  #define MLX5_MAX_TABLES UINT16_MAX
@@ -40,7 +41,7 @@
 +#define MLX5_FLOW_TABLE_LEVEL_SUFFIX (MLX5_MAX_TABLES - 3)
  #define MLX5_MAX_TABLES_FDB UINT16_MAX
  
- /* ID generation structure. */
+ #define MLX5_DBR_SIZE RTE_CACHE_LINE_SIZE
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/mlx5: fix Rx queue count calculation' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (120 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/mlx5: fix meter table definitions' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/qede: fix getting link details' " luca.boccassi
                   ` (84 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 3a66893d9808a77bf9caada6007d6ab040478cac Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Tue, 29 Sep 2020 18:36:23 +0000
Subject: [PATCH] net/mlx5: fix Rx queue count calculation

[ upstream commit d2d57605522d4a43be17e22e649e54033f6d8835 ]

There are a few discrepancies in the Rx queue count calculation.

The wrong index is used to calculate the number of used descriptors
in an Rx queue in case of the compressed CQE processing. The global
CQ index is used while we really need an internal index in a single
compressed session to get the right number of elements processed.

The total number of CQs should be used instead of the number of mbufs
to find out about the maximum number of Rx descriptors. These numbers
are not equal for the Multi-Packet Rx queue.

Allow the Rx queue count calculation for all possible Rx bursts since
CQ handling is the same for regular, vectorized, and multi-packet Rx
queues.

Fixes: 26f04883441a ("net/mlx5: support Rx queue count API")

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

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index a9c6181289..fb4fe94235 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -468,19 +468,11 @@ rx_queue_count(struct mlx5_rxq_data *rxq)
 {
 	struct rxq_zip *zip = &rxq->zip;
 	volatile struct mlx5_cqe *cqe;
+	unsigned int cq_ci = rxq->cq_ci;
 	const unsigned int cqe_n = (1 << rxq->cqe_n);
 	const unsigned int cqe_cnt = cqe_n - 1;
-	unsigned int cq_ci;
-	unsigned int used;
+	unsigned int used = 0;
 
-	/* if we are processing a compressed cqe */
-	if (zip->ai) {
-		used = zip->cqe_cnt - zip->ca;
-		cq_ci = zip->cq_ci;
-	} else {
-		used = 0;
-		cq_ci = rxq->cq_ci;
-	}
 	cqe = &(*rxq->cqes)[cq_ci & cqe_cnt];
 	while (check_cqe(cqe, cqe_n, cq_ci) != MLX5_CQE_STATUS_HW_OWN) {
 		int8_t op_own;
@@ -488,14 +480,17 @@ rx_queue_count(struct mlx5_rxq_data *rxq)
 
 		op_own = cqe->op_own;
 		if (MLX5_CQE_FORMAT(op_own) == MLX5_COMPRESSED)
-			n = rte_be_to_cpu_32(cqe->byte_cnt);
+			if (unlikely(zip->ai))
+				n = zip->cqe_cnt - zip->ai;
+			else
+				n = rte_be_to_cpu_32(cqe->byte_cnt);
 		else
 			n = 1;
 		cq_ci += n;
 		used += n;
 		cqe = &(*rxq->cqes)[cq_ci & cqe_cnt];
 	}
-	used = RTE_MIN(used, (1U << rxq->elts_n) - 1);
+	used = RTE_MIN(used, cqe_n);
 	return used;
 }
 
@@ -518,11 +513,12 @@ mlx5_rx_descriptor_status(void *rx_queue, uint16_t offset)
 			container_of(rxq, struct mlx5_rxq_ctrl, rxq);
 	struct rte_eth_dev *dev = ETH_DEV(rxq_ctrl->priv);
 
-	if (dev->rx_pkt_burst != mlx5_rx_burst) {
+	if (dev->rx_pkt_burst == NULL ||
+	    dev->rx_pkt_burst == removed_rx_burst) {
 		rte_errno = ENOTSUP;
 		return -rte_errno;
 	}
-	if (offset >= (1 << rxq->elts_n)) {
+	if (offset >= (1 << rxq->cqe_n)) {
 		rte_errno = EINVAL;
 		return -rte_errno;
 	}
@@ -550,7 +546,8 @@ mlx5_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	struct mlx5_priv *priv = dev->data->dev_private;
 	struct mlx5_rxq_data *rxq;
 
-	if (dev->rx_pkt_burst != mlx5_rx_burst) {
+	if (dev->rx_pkt_burst == NULL ||
+	    dev->rx_pkt_burst == removed_rx_burst) {
 		rte_errno = ENOTSUP;
 		return -rte_errno;
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.565830281 +0000
+++ 0123-net-mlx5-fix-Rx-queue-count-calculation.patch	2020-10-28 10:35:11.684832673 +0000
@@ -1,8 +1,10 @@
-From d2d57605522d4a43be17e22e649e54033f6d8835 Mon Sep 17 00:00:00 2001
+From 3a66893d9808a77bf9caada6007d6ab040478cac Mon Sep 17 00:00:00 2001
 From: Alexander Kozyrev <akozyrev@nvidia.com>
 Date: Tue, 29 Sep 2020 18:36:23 +0000
 Subject: [PATCH] net/mlx5: fix Rx queue count calculation
 
+[ upstream commit d2d57605522d4a43be17e22e649e54033f6d8835 ]
+
 There are a few discrepancies in the Rx queue count calculation.
 
 The wrong index is used to calculate the number of used descriptors
@@ -19,7 +21,6 @@
 queues.
 
 Fixes: 26f04883441a ("net/mlx5: support Rx queue count API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
 Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
@@ -28,10 +29,10 @@
  1 file changed, 12 insertions(+), 15 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
-index 0b87be15b4..2422a4d6ca 100644
+index a9c6181289..fb4fe94235 100644
 --- a/drivers/net/mlx5/mlx5_rxtx.c
 +++ b/drivers/net/mlx5/mlx5_rxtx.c
-@@ -465,19 +465,11 @@ rx_queue_count(struct mlx5_rxq_data *rxq)
+@@ -468,19 +468,11 @@ rx_queue_count(struct mlx5_rxq_data *rxq)
  {
  	struct rxq_zip *zip = &rxq->zip;
  	volatile struct mlx5_cqe *cqe;
@@ -53,7 +54,7 @@
  	cqe = &(*rxq->cqes)[cq_ci & cqe_cnt];
  	while (check_cqe(cqe, cqe_n, cq_ci) != MLX5_CQE_STATUS_HW_OWN) {
  		int8_t op_own;
-@@ -485,14 +477,17 @@ rx_queue_count(struct mlx5_rxq_data *rxq)
+@@ -488,14 +480,17 @@ rx_queue_count(struct mlx5_rxq_data *rxq)
  
  		op_own = cqe->op_own;
  		if (MLX5_CQE_FORMAT(op_own) == MLX5_COMPRESSED)
@@ -73,7 +74,7 @@
  	return used;
  }
  
-@@ -515,11 +510,12 @@ mlx5_rx_descriptor_status(void *rx_queue, uint16_t offset)
+@@ -518,11 +513,12 @@ mlx5_rx_descriptor_status(void *rx_queue, uint16_t offset)
  			container_of(rxq, struct mlx5_rxq_ctrl, rxq);
  	struct rte_eth_dev *dev = ETH_DEV(rxq_ctrl->priv);
  
@@ -88,7 +89,7 @@
  		rte_errno = EINVAL;
  		return -rte_errno;
  	}
-@@ -630,7 +626,8 @@ mlx5_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -550,7 +546,8 @@ mlx5_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)
  	struct mlx5_priv *priv = dev->data->dev_private;
  	struct mlx5_rxq_data *rxq;
  

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

* [dpdk-stable] patch 'net/qede: fix getting link details' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (121 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/mlx5: fix Rx queue count calculation' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'ethdev: fix RSS flow expansion in case of mismatch' " luca.boccassi
                   ` (83 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: Ferruh Yigit, Igor Russkikh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 6efa54e3430982b3f868a023e76b5dc95b40c481 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rmody@marvell.com>
Date: Fri, 2 Oct 2020 12:59:45 -0700
Subject: [PATCH] net/qede: fix getting link details

[ upstream commit effb1d0b9527815a7cd5422bce5defbc0884cea0 ]

This patch fixes get current link details, without this change the link
details can be inaccurate if proper lock is not acquired.

Fixes: 739a5b2f2b49 ("net/qede/base: use passed ptt handler")

Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
---
 drivers/net/qede/qede_main.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c
index 8580cbcd7f..67392d6aa4 100644
--- a/drivers/net/qede/qede_main.c
+++ b/drivers/net/qede/qede_main.c
@@ -575,13 +575,12 @@ qed_get_current_link(struct ecore_dev *edev, struct qed_link_output *if_link)
 	hwfn = &edev->hwfns[0];
 	if (IS_PF(edev)) {
 		ptt = ecore_ptt_acquire(hwfn);
-		if (!ptt)
-			DP_NOTICE(hwfn, true, "Failed to fill link; No PTT\n");
-
+		if (ptt) {
 			qed_fill_link(hwfn, ptt, if_link);
-
-		if (ptt)
 			ecore_ptt_release(hwfn, ptt);
+		} else {
+			DP_NOTICE(hwfn, true, "Failed to fill link; No PTT\n");
+		}
 	} else {
 		qed_fill_link(hwfn, NULL, if_link);
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.600550906 +0000
+++ 0124-net-qede-fix-getting-link-details.patch	2020-10-28 10:35:11.684832673 +0000
@@ -1,13 +1,14 @@
-From effb1d0b9527815a7cd5422bce5defbc0884cea0 Mon Sep 17 00:00:00 2001
+From 6efa54e3430982b3f868a023e76b5dc95b40c481 Mon Sep 17 00:00:00 2001
 From: Rasesh Mody <rmody@marvell.com>
 Date: Fri, 2 Oct 2020 12:59:45 -0700
 Subject: [PATCH] net/qede: fix getting link details
 
+[ upstream commit effb1d0b9527815a7cd5422bce5defbc0884cea0 ]
+
 This patch fixes get current link details, without this change the link
 details can be inaccurate if proper lock is not acquired.
 
 Fixes: 739a5b2f2b49 ("net/qede/base: use passed ptt handler")
-Cc: stable@dpdk.org
 
 Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
 Signed-off-by: Rasesh Mody <rmody@marvell.com>
@@ -17,10 +18,10 @@
  1 file changed, 4 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c
-index 0d3cea6e42..caa9d1d4f6 100644
+index 8580cbcd7f..67392d6aa4 100644
 --- a/drivers/net/qede/qede_main.c
 +++ b/drivers/net/qede/qede_main.c
-@@ -587,13 +587,12 @@ qed_get_current_link(struct ecore_dev *edev, struct qed_link_output *if_link)
+@@ -575,13 +575,12 @@ qed_get_current_link(struct ecore_dev *edev, struct qed_link_output *if_link)
  	hwfn = &edev->hwfns[0];
  	if (IS_PF(edev)) {
  		ptt = ecore_ptt_acquire(hwfn);

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

* [dpdk-stable] patch 'ethdev: fix RSS flow expansion in case of mismatch' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (122 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/qede: fix getting link details' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/mlx5: remove unused variable in Tx queue creation' " luca.boccassi
                   ` (82 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Dekel Peled; +Cc: Xiaoyu Min, Viacheslav Ovsiienko, Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 311ef43d620d0a907130d7856b2c991be32c71d1 Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@nvidia.com>
Date: Thu, 24 Sep 2020 17:52:13 +0300
Subject: [PATCH] ethdev: fix RSS flow expansion in case of mismatch

[ upstream commit 7f6a3168edc38d4caf353ee150071c827fe01b95 ]

Function rte_flow_expand_rss() is used to expand a flow rule with
partial pattern into several rules, to ensure all relevant packets
are matched.
It uses utility function rte_flow_expand_rss_item_complete(), to check
if the last valid item in the flow rule pattern needs to be completed.
For example the pattern "eth / ipv4 proto is 17 / end" will be completed
with a "udp" item.
This function returns "void" item in two cases:
1) The last item has empty spec, for example "eth / ipv4 / end".
2) The last itme has spec that can't be expanded for RSS.
   For example the pattern "eth / ipv4 proto is 47 / end" ends with IPv4
   item that has next protocol GRE.

In both cases the flow rule may be expanded, but in the second case such
expansion may create rules with invalid pattern.
For example "eth / ipv4 proto is 47 / udp / end".
In such a case the flow rule should not be expanded.

This patch updates function rte_flow_expand_rss_item_complete().
Return value RTE_FLOW_ITEM_TYPE_END is used to indicate the flow rule
should not be expanded.
In such a case, rte_flow_expand_rss() will return with the original flow
rule only, without any expansion.

Fixes: fc2dd8dd492f ("ethdev: fix expand RSS flows")

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 lib/librte_ethdev/rte_flow.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c
index 391165646a..7171c11499 100644
--- a/lib/librte_ethdev/rte_flow.c
+++ b/lib/librte_ethdev/rte_flow.c
@@ -241,6 +241,8 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
 			ret = RTE_FLOW_ITEM_TYPE_IPV6;
 		else if (rte_be_to_cpu_16(ether_type) == RTE_ETHER_TYPE_VLAN)
 			ret = RTE_FLOW_ITEM_TYPE_VLAN;
+		else
+			ret = RTE_FLOW_ITEM_TYPE_END;
 		break;
 	case RTE_FLOW_ITEM_TYPE_VLAN:
 		if (item->mask)
@@ -258,6 +260,8 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
 			ret = RTE_FLOW_ITEM_TYPE_IPV6;
 		else if (rte_be_to_cpu_16(ether_type) == RTE_ETHER_TYPE_VLAN)
 			ret = RTE_FLOW_ITEM_TYPE_VLAN;
+		else
+			ret = RTE_FLOW_ITEM_TYPE_END;
 		break;
 	case RTE_FLOW_ITEM_TYPE_IPV4:
 		if (item->mask)
@@ -278,6 +282,8 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
 			ret = RTE_FLOW_ITEM_TYPE_IPV4;
 		else if (ip_next_proto == IPPROTO_IPV6)
 			ret = RTE_FLOW_ITEM_TYPE_IPV6;
+		else
+			ret = RTE_FLOW_ITEM_TYPE_END;
 		break;
 	case RTE_FLOW_ITEM_TYPE_IPV6:
 		if (item->mask)
@@ -298,6 +304,8 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
 			ret = RTE_FLOW_ITEM_TYPE_IPV4;
 		else if (ip_next_proto == IPPROTO_IPV6)
 			ret = RTE_FLOW_ITEM_TYPE_IPV6;
+		else
+			ret = RTE_FLOW_ITEM_TYPE_END;
 		break;
 	default:
 		ret = RTE_FLOW_ITEM_TYPE_VOID;
@@ -1104,10 +1112,14 @@ rte_flow_expand_rss(struct rte_flow_expand_rss *buf, size_t size,
 	memset(flow_items, 0, sizeof(flow_items));
 	user_pattern_size -= sizeof(*item);
 	/*
-	 * Check if the last valid item has spec set
-	 * and need complete pattern.
+	 * Check if the last valid item has spec set, need complete pattern,
+	 * and the pattern can be used for expansion.
 	 */
 	missed_item.type = rte_flow_expand_rss_item_complete(last_item);
+	if (missed_item.type == RTE_FLOW_ITEM_TYPE_END) {
+		/* Item type END indicates expansion is not required. */
+		return lsize;
+	}
 	if (missed_item.type != RTE_FLOW_ITEM_TYPE_VOID) {
 		next = NULL;
 		missed = 1;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.629398450 +0000
+++ 0125-ethdev-fix-RSS-flow-expansion-in-case-of-mismatch.patch	2020-10-28 10:35:11.688832733 +0000
@@ -1,8 +1,10 @@
-From 7f6a3168edc38d4caf353ee150071c827fe01b95 Mon Sep 17 00:00:00 2001
+From 311ef43d620d0a907130d7856b2c991be32c71d1 Mon Sep 17 00:00:00 2001
 From: Dekel Peled <dekelp@nvidia.com>
 Date: Thu, 24 Sep 2020 17:52:13 +0300
 Subject: [PATCH] ethdev: fix RSS flow expansion in case of mismatch
 
+[ upstream commit 7f6a3168edc38d4caf353ee150071c827fe01b95 ]
+
 Function rte_flow_expand_rss() is used to expand a flow rule with
 partial pattern into several rules, to ensure all relevant packets
 are matched.
@@ -28,7 +30,6 @@
 rule only, without any expansion.
 
 Fixes: fc2dd8dd492f ("ethdev: fix expand RSS flows")
-Cc: stable@dpdk.org
 
 Signed-off-by: Dekel Peled <dekelp@nvidia.com>
 Acked-by: Xiaoyu Min <jackmin@nvidia.com>
@@ -39,10 +40,10 @@
  1 file changed, 14 insertions(+), 2 deletions(-)
 
 diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c
-index f8fdd68fe9..59a386d074 100644
+index 391165646a..7171c11499 100644
 --- a/lib/librte_ethdev/rte_flow.c
 +++ b/lib/librte_ethdev/rte_flow.c
-@@ -247,6 +247,8 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
+@@ -241,6 +241,8 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
  			ret = RTE_FLOW_ITEM_TYPE_IPV6;
  		else if (rte_be_to_cpu_16(ether_type) == RTE_ETHER_TYPE_VLAN)
  			ret = RTE_FLOW_ITEM_TYPE_VLAN;
@@ -51,7 +52,7 @@
  		break;
  	case RTE_FLOW_ITEM_TYPE_VLAN:
  		if (item->mask)
-@@ -264,6 +266,8 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
+@@ -258,6 +260,8 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
  			ret = RTE_FLOW_ITEM_TYPE_IPV6;
  		else if (rte_be_to_cpu_16(ether_type) == RTE_ETHER_TYPE_VLAN)
  			ret = RTE_FLOW_ITEM_TYPE_VLAN;
@@ -60,7 +61,7 @@
  		break;
  	case RTE_FLOW_ITEM_TYPE_IPV4:
  		if (item->mask)
-@@ -284,6 +288,8 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
+@@ -278,6 +282,8 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
  			ret = RTE_FLOW_ITEM_TYPE_IPV4;
  		else if (ip_next_proto == IPPROTO_IPV6)
  			ret = RTE_FLOW_ITEM_TYPE_IPV6;
@@ -69,7 +70,7 @@
  		break;
  	case RTE_FLOW_ITEM_TYPE_IPV6:
  		if (item->mask)
-@@ -304,6 +310,8 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
+@@ -298,6 +304,8 @@ rte_flow_expand_rss_item_complete(const struct rte_flow_item *item)
  			ret = RTE_FLOW_ITEM_TYPE_IPV4;
  		else if (ip_next_proto == IPPROTO_IPV6)
  			ret = RTE_FLOW_ITEM_TYPE_IPV6;
@@ -78,7 +79,7 @@
  		break;
  	default:
  		ret = RTE_FLOW_ITEM_TYPE_VOID;
-@@ -1110,10 +1118,14 @@ rte_flow_expand_rss(struct rte_flow_expand_rss *buf, size_t size,
+@@ -1104,10 +1112,14 @@ rte_flow_expand_rss(struct rte_flow_expand_rss *buf, size_t size,
  	memset(flow_items, 0, sizeof(flow_items));
  	user_pattern_size -= sizeof(*item);
  	/*

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

* [dpdk-stable] patch 'net/mlx5: remove unused variable in Tx queue creation' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (123 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'ethdev: fix RSS flow expansion in case of mismatch' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/bnxt: fix link update' " luca.boccassi
                   ` (81 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Michael Baum; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 17919bbb10f606a242a7c3b860c5c713255ae40d Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Thu, 1 Oct 2020 14:09:13 +0000
Subject: [PATCH] net/mlx5: remove unused variable in Tx queue creation

[ upstream commit fa2dd3d4d6e24bf2956828bf05de86e6e6d88c3e ]

When a CQ is not created by DevX, it be allocated by either DV function
or by regular Verbs function.

The CQ DV attributes variable was wrongly defined and initialized in Tx
queue creation while the CQ is created by the regular Verbs function
what remained the attributes variable unused.

Remove the unused variable.

Fixes: faf2667fe8d5 ("net/mlx5: separate DPDK from verbs Tx queue objects")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_txq.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index f688027fb3..36aa9b59f3 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -582,7 +582,6 @@ mlx5_txq_obj_new(struct rte_eth_dev *dev, uint16_t idx,
 	struct mlx5_txq_obj *txq_obj = NULL;
 	union {
 		struct ibv_qp_init_attr_ex init;
-		struct ibv_cq_init_attr_ex cq;
 		struct ibv_qp_attr mod;
 	} attr;
 	unsigned int cqe_n;
@@ -610,9 +609,6 @@ mlx5_txq_obj_new(struct rte_eth_dev *dev, uint16_t idx,
 		return NULL;
 	}
 	memset(&tmpl, 0, sizeof(struct mlx5_txq_obj));
-	attr.cq = (struct ibv_cq_init_attr_ex){
-		.comp_mask = 0,
-	};
 	cqe_n = desc / MLX5_TX_COMP_THRESH +
 		1 + MLX5_TX_COMP_THRESH_INLINE_DIV;
 	tmpl.cq = mlx5_glue->create_cq(priv->sh->ctx, cqe_n, NULL, NULL, 0);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.659600639 +0000
+++ 0126-net-mlx5-remove-unused-variable-in-Tx-queue-creation.patch	2020-10-28 10:35:11.688832733 +0000
@@ -1,8 +1,10 @@
-From fa2dd3d4d6e24bf2956828bf05de86e6e6d88c3e Mon Sep 17 00:00:00 2001
+From 17919bbb10f606a242a7c3b860c5c713255ae40d Mon Sep 17 00:00:00 2001
 From: Michael Baum <michaelba@nvidia.com>
 Date: Thu, 1 Oct 2020 14:09:13 +0000
 Subject: [PATCH] net/mlx5: remove unused variable in Tx queue creation
 
+[ upstream commit fa2dd3d4d6e24bf2956828bf05de86e6e6d88c3e ]
+
 When a CQ is not created by DevX, it be allocated by either DV function
 or by regular Verbs function.
 
@@ -13,7 +15,6 @@
 Remove the unused variable.
 
 Fixes: faf2667fe8d5 ("net/mlx5: separate DPDK from verbs Tx queue objects")
-Cc: stable@dpdk.org
 
 Signed-off-by: Michael Baum <michaelba@nvidia.com>
 Acked-by: Matan Azrad <matan@nvidia.com>
@@ -22,10 +23,10 @@
  1 file changed, 4 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
-index fc730fae82..ef3137bd14 100644
+index f688027fb3..36aa9b59f3 100644
 --- a/drivers/net/mlx5/mlx5_txq.c
 +++ b/drivers/net/mlx5/mlx5_txq.c
-@@ -1168,7 +1168,6 @@ mlx5_txq_obj_new(struct rte_eth_dev *dev, uint16_t idx,
+@@ -582,7 +582,6 @@ mlx5_txq_obj_new(struct rte_eth_dev *dev, uint16_t idx,
  	struct mlx5_txq_obj *txq_obj = NULL;
  	union {
  		struct ibv_qp_init_attr_ex init;
@@ -33,7 +34,7 @@
  		struct ibv_qp_attr mod;
  	} attr;
  	unsigned int cqe_n;
-@@ -1198,9 +1197,6 @@ mlx5_txq_obj_new(struct rte_eth_dev *dev, uint16_t idx,
+@@ -610,9 +609,6 @@ mlx5_txq_obj_new(struct rte_eth_dev *dev, uint16_t idx,
  		return NULL;
  	}
  	memset(&tmpl, 0, sizeof(struct mlx5_txq_obj));

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

* [dpdk-stable] patch 'net/bnxt: fix link update' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (124 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/mlx5: remove unused variable in Tx queue creation' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-29  9:24   ` Kalesh Anakkur Purayil
  2020-10-28 10:44 ` [dpdk-stable] patch 'common/mlx5: fix PCI address lookup' " luca.boccassi
                   ` (80 subsequent siblings)
  206 siblings, 1 reply; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 6037750360153c816ead7b67b3a522cfff6763c1 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 6 Oct 2020 21:31:56 +0530
Subject: [PATCH] net/bnxt: fix link update

[ upstream commit af57c49ca101d8f4c4138082b49dc86d4857f8de ]

1. When port is stopped, we can forcibly set the link status for the
   device to down.
2. VFs and MH PFs do not have the privilege to bring the link down.
   As a result driver prints "Link Up" when port is stopped.
3. When driver receives link status/speed/config async event from fw,
   driver invokes bnxt_link_update() with exp_link_status as ETH_LINK_UP
   This is not logically correct as the async event could be for Link up
   or link down or for speed change.

Fixes: 074cacb9907a ("net/bnxt: fix link during port toggle")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        |  6 +++--
 drivers/net/bnxt/bnxt_cpr.c    |  2 +-
 drivers/net/bnxt/bnxt_ethdev.c | 40 +++++++++++++++++-----------------
 3 files changed, 25 insertions(+), 23 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index cdb3e2d3ff..78249be6c7 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -233,8 +233,8 @@ struct bnxt_pf_info {
 };
 
 /* Max wait time for link up is 10s and link down is 500ms */
-#define BNXT_LINK_UP_WAIT_CNT	200
-#define BNXT_LINK_DOWN_WAIT_CNT	10
+#define BNXT_MAX_LINK_WAIT_CNT	200
+#define BNXT_MIN_LINK_WAIT_CNT	10
 #define BNXT_LINK_WAIT_INTERVAL	50
 struct bnxt_link_info {
 	uint32_t		phy_flags;
@@ -681,6 +681,8 @@ void bnxt_schedule_fw_health_check(struct bnxt *bp);
 
 bool is_bnxt_supported(struct rte_eth_dev *dev);
 bool bnxt_stratus_device(struct bnxt *bp);
+int bnxt_link_update_op(struct rte_eth_dev *eth_dev,
+			int wait_to_complete);
 extern const struct rte_flow_ops bnxt_flow_ops;
 #define bnxt_acquire_flow_lock(bp) \
 	pthread_mutex_lock(&(bp)->flow_lock)
diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index c0e492e6c2..ba9933dc9b 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -63,7 +63,7 @@ void bnxt_handle_async_event(struct bnxt *bp,
 	case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CHANGE:
 	case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE:
 		/* FALLTHROUGH */
-		bnxt_link_update(bp->eth_dev, 0, ETH_LINK_UP);
+		bnxt_link_update_op(bp->eth_dev, 0);
 		break;
 	case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD:
 		PMD_DRV_LOG(INFO, "Async event: PF driver unloaded\n");
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index c6e9ad8e6a..a94b73623c 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -871,7 +871,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
 	eth_dev->data->scattered_rx = bnxt_scattered_rx(eth_dev);
 	eth_dev->data->dev_started = 1;
 
-	bnxt_link_update(eth_dev, 1, ETH_LINK_UP);
+	bnxt_link_update_op(eth_dev, 1);
 
 	if (rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
 		vlan_mask |= ETH_VLAN_FILTER_MASK;
@@ -928,6 +928,7 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
 	struct bnxt *bp = eth_dev->data->dev_private;
 	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
 	struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
+	struct rte_eth_link link;
 
 	eth_dev->data->dev_started = 0;
 	/* Prevent crashes when queues are still in use */
@@ -942,15 +943,15 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
 	bnxt_cancel_fw_health_check(bp);
 
 	/* Do not bring link down during reset recovery */
-	if (!is_bnxt_in_error(bp))
+	if (!is_bnxt_in_error(bp)) {
 		bnxt_dev_set_link_down_op(eth_dev);
-
-	/* Wait for link to be reset and the async notification to process.
-	 * During reset recovery, there is no need to wait and
-	 * VF/NPAR functions do not have privilege to change PHY config.
-	 */
-	if (!is_bnxt_in_error(bp) && BNXT_SINGLE_PF(bp))
-		bnxt_link_update(eth_dev, 1, ETH_LINK_DOWN);
+		/* Wait for link to be reset */
+		if (BNXT_SINGLE_PF(bp))
+			rte_delay_ms(500);
+		/* clear the recorded link status */
+		memset(&link, 0, sizeof(link));
+		rte_eth_linkstatus_set(eth_dev, &link);
+	}
 
 	/* Clean queue intr-vector mapping */
 	rte_intr_efd_disable(intr_handle);
@@ -1106,14 +1107,13 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,
 	return rc;
 }
 
-int bnxt_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete,
-		     bool exp_link_status)
+int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
 {
 	int rc = 0;
 	struct bnxt *bp = eth_dev->data->dev_private;
 	struct rte_eth_link new;
-	int cnt = exp_link_status ? BNXT_LINK_UP_WAIT_CNT :
-		  BNXT_LINK_DOWN_WAIT_CNT;
+	int cnt = wait_to_complete ? BNXT_MAX_LINK_WAIT_CNT :
+			BNXT_MIN_LINK_WAIT_CNT;
 
 	rc = is_bnxt_in_error(bp);
 	if (rc)
@@ -1131,12 +1131,18 @@ int bnxt_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete,
 			goto out;
 		}
 
-		if (!wait_to_complete || new.link_status == exp_link_status)
+		if (!wait_to_complete || new.link_status)
 			break;
 
 		rte_delay_ms(BNXT_LINK_WAIT_INTERVAL);
 	} while (cnt--);
 
+	/* Only single function PF can bring phy down.
+	 * When port is stopped, report link down for VF/MH/NPAR functions.
+	 */
+	if (!BNXT_SINGLE_PF(bp) && !eth_dev->data->dev_started)
+		memset(&new, 0, sizeof(new));
+
 out:
 	/* Timed out or success */
 	if (new.link_status != eth_dev->data->dev_link.link_status ||
@@ -1153,12 +1159,6 @@ out:
 	return rc;
 }
 
-static int bnxt_link_update_op(struct rte_eth_dev *eth_dev,
-			       int wait_to_complete)
-{
-	return bnxt_link_update(eth_dev, wait_to_complete, ETH_LINK_UP);
-}
-
 static int bnxt_promiscuous_enable_op(struct rte_eth_dev *eth_dev)
 {
 	struct bnxt *bp = eth_dev->data->dev_private;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.689269158 +0000
+++ 0127-net-bnxt-fix-link-update.patch	2020-10-28 10:35:11.692832791 +0000
@@ -1,8 +1,10 @@
-From af57c49ca101d8f4c4138082b49dc86d4857f8de Mon Sep 17 00:00:00 2001
+From 6037750360153c816ead7b67b3a522cfff6763c1 Mon Sep 17 00:00:00 2001
 From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Date: Tue, 6 Oct 2020 21:31:56 +0530
 Subject: [PATCH] net/bnxt: fix link update
 
+[ upstream commit af57c49ca101d8f4c4138082b49dc86d4857f8de ]
+
 1. When port is stopped, we can forcibly set the link status for the
    device to down.
 2. VFs and MH PFs do not have the privilege to bring the link down.
@@ -13,22 +15,21 @@
    or link down or for speed change.
 
 Fixes: 074cacb9907a ("net/bnxt: fix link during port toggle")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
 Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
 Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
 ---
- drivers/net/bnxt/bnxt.h        |  4 ++--
+ drivers/net/bnxt/bnxt.h        |  6 +++--
  drivers/net/bnxt/bnxt_cpr.c    |  2 +-
  drivers/net/bnxt/bnxt_ethdev.c | 40 +++++++++++++++++-----------------
- 3 files changed, 23 insertions(+), 23 deletions(-)
+ 3 files changed, 25 insertions(+), 23 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
-index ae38428e69..eca74486e7 100644
+index cdb3e2d3ff..78249be6c7 100644
 --- a/drivers/net/bnxt/bnxt.h
 +++ b/drivers/net/bnxt/bnxt.h
-@@ -268,8 +268,8 @@ struct bnxt_pf_info {
+@@ -233,8 +233,8 @@ struct bnxt_pf_info {
  };
  
  /* Max wait time for link up is 10s and link down is 500ms */
@@ -39,11 +40,20 @@
  #define BNXT_LINK_WAIT_INTERVAL	50
  struct bnxt_link_info {
  	uint32_t		phy_flags;
+@@ -681,6 +681,8 @@ void bnxt_schedule_fw_health_check(struct bnxt *bp);
+ 
+ bool is_bnxt_supported(struct rte_eth_dev *dev);
+ bool bnxt_stratus_device(struct bnxt *bp);
++int bnxt_link_update_op(struct rte_eth_dev *eth_dev,
++			int wait_to_complete);
+ extern const struct rte_flow_ops bnxt_flow_ops;
+ #define bnxt_acquire_flow_lock(bp) \
+ 	pthread_mutex_lock(&(bp)->flow_lock)
 diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
-index 8311e265ae..a3a7e6ab70 100644
+index c0e492e6c2..ba9933dc9b 100644
 --- a/drivers/net/bnxt/bnxt_cpr.c
 +++ b/drivers/net/bnxt/bnxt_cpr.c
-@@ -111,7 +111,7 @@ void bnxt_handle_async_event(struct bnxt *bp,
+@@ -63,7 +63,7 @@ void bnxt_handle_async_event(struct bnxt *bp,
  	case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CHANGE:
  	case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE:
  		/* FALLTHROUGH */
@@ -53,10 +63,10 @@
  	case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD:
  		PMD_DRV_LOG(INFO, "Async event: PF driver unloaded\n");
 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index 624cb20311..1bb0aa838a 100644
+index c6e9ad8e6a..a94b73623c 100644
 --- a/drivers/net/bnxt/bnxt_ethdev.c
 +++ b/drivers/net/bnxt/bnxt_ethdev.c
-@@ -1279,7 +1279,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
+@@ -871,7 +871,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
  	eth_dev->data->scattered_rx = bnxt_scattered_rx(eth_dev);
  	eth_dev->data->dev_started = 1;
  
@@ -65,15 +75,15 @@
  
  	if (rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
  		vlan_mask |= ETH_VLAN_FILTER_MASK;
-@@ -1347,6 +1347,7 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
+@@ -928,6 +928,7 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
  	struct bnxt *bp = eth_dev->data->dev_private;
  	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
  	struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
 +	struct rte_eth_link link;
  
  	eth_dev->data->dev_started = 0;
- 	eth_dev->data->scattered_rx = 0;
-@@ -1369,15 +1370,15 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
+ 	/* Prevent crashes when queues are still in use */
+@@ -942,15 +943,15 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev)
  	bnxt_cancel_fw_health_check(bp);
  
  	/* Do not bring link down during reset recovery */
@@ -97,7 +107,7 @@
  
  	/* Clean queue intr-vector mapping */
  	rte_intr_efd_disable(intr_handle);
-@@ -1557,14 +1558,13 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,
+@@ -1106,14 +1107,13 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,
  	return rc;
  }
  
@@ -115,7 +125,7 @@
  
  	rc = is_bnxt_in_error(bp);
  	if (rc)
-@@ -1582,12 +1582,18 @@ int bnxt_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete,
+@@ -1131,12 +1131,18 @@ int bnxt_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete,
  			goto out;
  		}
  
@@ -135,12 +145,12 @@
  out:
  	/* Timed out or success */
  	if (new.link_status != eth_dev->data->dev_link.link_status ||
-@@ -1604,12 +1610,6 @@ out:
+@@ -1153,12 +1159,6 @@ out:
  	return rc;
  }
  
--int bnxt_link_update_op(struct rte_eth_dev *eth_dev,
--			int wait_to_complete)
+-static int bnxt_link_update_op(struct rte_eth_dev *eth_dev,
+-			       int wait_to_complete)
 -{
 -	return bnxt_link_update(eth_dev, wait_to_complete, ETH_LINK_UP);
 -}

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

* [dpdk-stable] patch 'common/mlx5: fix PCI address lookup' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (125 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/bnxt: fix link update' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/fm10k: fix memory leak when Tx thresh check fails' " luca.boccassi
                   ` (79 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 9f5bb85bf418674e339ab0a631d0d6a271230b49 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Sun, 13 Sep 2020 19:55:06 +0000
Subject: [PATCH] common/mlx5: fix PCI address lookup

[ upstream commit 482a1d34b60e7b918a39b2ccd32e06638f8c5aa4 ]

mlx5 PMDs use the mlx5_dev_to_pci_addr() routine to convert
Infiniband device name to the Bus-Device-Function location
on the PCI bus. The routine returned success even in case of
not found identification string. On caller side it likely
caused the wrong match with the BDF of previous device
resulting in wrong representor and master recognitions.

Fixes: 771fa900b73a ("mlx5: introduce new driver for Mellanox ConnectX-4 adapters")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx4/mlx4.c        | 18 ++++++++++++------
 drivers/net/mlx5/mlx5_ethdev.c | 18 ++++++++++++------
 2 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 55398e4d01..9dda4ef330 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -465,6 +465,7 @@ mlx4_ibv_device_to_pci_addr(const struct ibv_device *device,
 {
 	FILE *file;
 	char line[32];
+	int rc = -ENOENT;
 	MKSTR(path, "%s/device/uevent", device->ibdev_path);
 
 	file = fopen(path, "rb");
@@ -474,16 +475,18 @@ mlx4_ibv_device_to_pci_addr(const struct ibv_device *device,
 	}
 	while (fgets(line, sizeof(line), file) == line) {
 		size_t len = strlen(line);
-		int ret;
 
 		/* Truncate long lines. */
-		if (len == (sizeof(line) - 1))
+		if (len == (sizeof(line) - 1)) {
 			while (line[(len - 1)] != '\n') {
-				ret = fgetc(file);
+				int ret = fgetc(file);
 				if (ret == EOF)
-					break;
+					goto exit;
 				line[(len - 1)] = ret;
 			}
+			/* No match for long lines. */
+			continue;
+		}
 		/* Extract information. */
 		if (sscanf(line,
 			   "PCI_SLOT_NAME="
@@ -492,12 +495,15 @@ mlx4_ibv_device_to_pci_addr(const struct ibv_device *device,
 			   &pci_addr->bus,
 			   &pci_addr->devid,
 			   &pci_addr->function) == 4) {
-			ret = 0;
+			rc = 0;
 			break;
 		}
 	}
+exit:
 	fclose(file);
-	return 0;
+	if (rc)
+		rte_errno = -rc;
+	return rc;
 }
 
 /**
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 92773dca28..ef332536ee 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -1226,6 +1226,7 @@ mlx5_dev_to_pci_addr(const char *dev_path,
 {
 	FILE *file;
 	char line[32];
+	int rc = -ENOENT;
 	MKSTR(path, "%s/device/uevent", dev_path);
 
 	file = fopen(path, "rb");
@@ -1235,16 +1236,18 @@ mlx5_dev_to_pci_addr(const char *dev_path,
 	}
 	while (fgets(line, sizeof(line), file) == line) {
 		size_t len = strlen(line);
-		int ret;
 
 		/* Truncate long lines. */
-		if (len == (sizeof(line) - 1))
+		if (len == (sizeof(line) - 1)) {
 			while (line[(len - 1)] != '\n') {
-				ret = fgetc(file);
+				int ret = fgetc(file);
 				if (ret == EOF)
-					break;
+					goto exit;
 				line[(len - 1)] = ret;
 			}
+			/* No match for long lines. */
+			continue;
+		}
 		/* Extract information. */
 		if (sscanf(line,
 			   "PCI_SLOT_NAME="
@@ -1253,12 +1256,15 @@ mlx5_dev_to_pci_addr(const char *dev_path,
 			   &pci_addr->bus,
 			   &pci_addr->devid,
 			   &pci_addr->function) == 4) {
-			ret = 0;
+			rc = 0;
 			break;
 		}
 	}
+exit:
 	fclose(file);
-	return 0;
+	if (rc)
+		rte_errno = -rc;
+	return rc;
 }
 
 /**
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.724987039 +0000
+++ 0128-common-mlx5-fix-PCI-address-lookup.patch	2020-10-28 10:35:11.696832850 +0000
@@ -1,8 +1,10 @@
-From 482a1d34b60e7b918a39b2ccd32e06638f8c5aa4 Mon Sep 17 00:00:00 2001
+From 9f5bb85bf418674e339ab0a631d0d6a271230b49 Mon Sep 17 00:00:00 2001
 From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
 Date: Sun, 13 Sep 2020 19:55:06 +0000
 Subject: [PATCH] common/mlx5: fix PCI address lookup
 
+[ upstream commit 482a1d34b60e7b918a39b2ccd32e06638f8c5aa4 ]
+
 mlx5 PMDs use the mlx5_dev_to_pci_addr() routine to convert
 Infiniband device name to the Bus-Device-Function location
 on the PCI bus. The routine returned success even in case of
@@ -11,18 +13,71 @@
 resulting in wrong representor and master recognitions.
 
 Fixes: 771fa900b73a ("mlx5: introduce new driver for Mellanox ConnectX-4 adapters")
-Cc: stable@dpdk.org
 
 Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
 ---
- drivers/common/mlx5/linux/mlx5_common_os.c | 18 +++++++++++++-----
- 1 file changed, 13 insertions(+), 5 deletions(-)
+ drivers/net/mlx4/mlx4.c        | 18 ++++++++++++------
+ drivers/net/mlx5/mlx5_ethdev.c | 18 ++++++++++++------
+ 2 files changed, 24 insertions(+), 12 deletions(-)
 
-diff --git a/drivers/common/mlx5/linux/mlx5_common_os.c b/drivers/common/mlx5/linux/mlx5_common_os.c
-index 7bb3ba6f82..0edd78ea6d 100644
---- a/drivers/common/mlx5/linux/mlx5_common_os.c
-+++ b/drivers/common/mlx5/linux/mlx5_common_os.c
-@@ -39,6 +39,7 @@ mlx5_dev_to_pci_addr(const char *dev_path,
+diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
+index 55398e4d01..9dda4ef330 100644
+--- a/drivers/net/mlx4/mlx4.c
++++ b/drivers/net/mlx4/mlx4.c
+@@ -465,6 +465,7 @@ mlx4_ibv_device_to_pci_addr(const struct ibv_device *device,
+ {
+ 	FILE *file;
+ 	char line[32];
++	int rc = -ENOENT;
+ 	MKSTR(path, "%s/device/uevent", device->ibdev_path);
+ 
+ 	file = fopen(path, "rb");
+@@ -474,16 +475,18 @@ mlx4_ibv_device_to_pci_addr(const struct ibv_device *device,
+ 	}
+ 	while (fgets(line, sizeof(line), file) == line) {
+ 		size_t len = strlen(line);
+-		int ret;
+ 
+ 		/* Truncate long lines. */
+-		if (len == (sizeof(line) - 1))
++		if (len == (sizeof(line) - 1)) {
+ 			while (line[(len - 1)] != '\n') {
+-				ret = fgetc(file);
++				int ret = fgetc(file);
+ 				if (ret == EOF)
+-					break;
++					goto exit;
+ 				line[(len - 1)] = ret;
+ 			}
++			/* No match for long lines. */
++			continue;
++		}
+ 		/* Extract information. */
+ 		if (sscanf(line,
+ 			   "PCI_SLOT_NAME="
+@@ -492,12 +495,15 @@ mlx4_ibv_device_to_pci_addr(const struct ibv_device *device,
+ 			   &pci_addr->bus,
+ 			   &pci_addr->devid,
+ 			   &pci_addr->function) == 4) {
+-			ret = 0;
++			rc = 0;
+ 			break;
+ 		}
+ 	}
++exit:
+ 	fclose(file);
+-	return 0;
++	if (rc)
++		rte_errno = -rc;
++	return rc;
+ }
+ 
+ /**
+diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
+index 92773dca28..ef332536ee 100644
+--- a/drivers/net/mlx5/mlx5_ethdev.c
++++ b/drivers/net/mlx5/mlx5_ethdev.c
+@@ -1226,6 +1226,7 @@ mlx5_dev_to_pci_addr(const char *dev_path,
  {
  	FILE *file;
  	char line[32];
@@ -30,7 +85,7 @@
  	MKSTR(path, "%s/device/uevent", dev_path);
  
  	file = fopen(path, "rb");
-@@ -48,16 +49,19 @@ mlx5_dev_to_pci_addr(const char *dev_path,
+@@ -1235,16 +1236,18 @@ mlx5_dev_to_pci_addr(const char *dev_path,
  	}
  	while (fgets(line, sizeof(line), file) == line) {
  		size_t len = strlen(line);
@@ -42,7 +97,6 @@
  			while (line[(len - 1)] != '\n') {
 -				ret = fgetc(file);
 +				int ret = fgetc(file);
-+
  				if (ret == EOF)
 -					break;
 +					goto exit;
@@ -54,10 +108,11 @@
  		/* Extract information. */
  		if (sscanf(line,
  			   "PCI_SLOT_NAME="
-@@ -66,11 +70,15 @@ mlx5_dev_to_pci_addr(const char *dev_path,
+@@ -1253,12 +1256,15 @@ mlx5_dev_to_pci_addr(const char *dev_path,
  			   &pci_addr->bus,
  			   &pci_addr->devid,
  			   &pci_addr->function) == 4) {
+-			ret = 0;
 +			rc = 0;
  			break;
  		}

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

* [dpdk-stable] patch 'net/fm10k: fix memory leak when Tx thresh check fails' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (126 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'common/mlx5: fix PCI address lookup' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/iavf: fix flow flush after PF reset' " luca.boccassi
                   ` (78 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Xiao Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 4d88e14ad7f458cc586c838609a893e0b20e5ce9 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Wed, 7 Oct 2020 15:36:46 +0800
Subject: [PATCH] net/fm10k: fix memory leak when Tx thresh check fails

[ upstream commit 9e4f075bc500dafe4568edf99b9a1161b554316e ]

In fm10k_tx_queue_setup(), we allocate memory for the queue
structure but not released when Tx thresh check fails.

Fixes: 98068e0e044e ("fm10k: add Tx queue setup/release")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Xiao Wang <xiao.w.wang@intel.com>
---
 drivers/net/fm10k/fm10k_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 5ce59be7d5..7a83b6f68e 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -2037,8 +2037,10 @@ fm10k_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id,
 	q->ops = &def_txq_ops;
 	q->tail_ptr = (volatile uint32_t *)
 		&((uint32_t *)hw->hw_addr)[FM10K_TDT(queue_id)];
-	if (handle_txconf(q, conf))
+	if (handle_txconf(q, conf)) {
+		rte_free(q);
 		return -EINVAL;
+	}
 
 	/* allocate memory for the software ring */
 	q->sw_ring = rte_zmalloc_socket("fm10k sw ring",
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.754284907 +0000
+++ 0129-net-fm10k-fix-memory-leak-when-Tx-thresh-check-fails.patch	2020-10-28 10:35:11.700832909 +0000
@@ -1,13 +1,14 @@
-From 9e4f075bc500dafe4568edf99b9a1161b554316e Mon Sep 17 00:00:00 2001
+From 4d88e14ad7f458cc586c838609a893e0b20e5ce9 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Wed, 7 Oct 2020 15:36:46 +0800
 Subject: [PATCH] net/fm10k: fix memory leak when Tx thresh check fails
 
+[ upstream commit 9e4f075bc500dafe4568edf99b9a1161b554316e ]
+
 In fm10k_tx_queue_setup(), we allocate memory for the queue
 structure but not released when Tx thresh check fails.
 
 Fixes: 98068e0e044e ("fm10k: add Tx queue setup/release")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Acked-by: Xiao Wang <xiao.w.wang@intel.com>
@@ -16,10 +17,10 @@
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
-index 3096370718..c4a6fdf7f0 100644
+index 5ce59be7d5..7a83b6f68e 100644
 --- a/drivers/net/fm10k/fm10k_ethdev.c
 +++ b/drivers/net/fm10k/fm10k_ethdev.c
-@@ -2024,8 +2024,10 @@ fm10k_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id,
+@@ -2037,8 +2037,10 @@ fm10k_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id,
  	q->ops = &def_txq_ops;
  	q->tail_ptr = (volatile uint32_t *)
  		&((uint32_t *)hw->hw_addr)[FM10K_TDT(queue_id)];

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

* [dpdk-stable] patch 'net/iavf: fix flow flush after PF reset' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (127 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/fm10k: fix memory leak when Tx thresh check fails' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'raw/dpaa2_qdma: fix " luca.boccassi
                   ` (77 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Jeff Guo; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From fe90482c72b4805a1afbb0768fa7e0a0536347d6 Mon Sep 17 00:00:00 2001
From: Jeff Guo <jia.guo@intel.com>
Date: Wed, 30 Sep 2020 13:44:12 +0800
Subject: [PATCH] net/iavf: fix flow flush after PF reset

[ upstream commit c02ea7410e5124ad44ad7419ab16a43e1b3af647 ]

When VF begin reset after PF reset, VF will be uninitialized at first
and then be initialized, during the time any invalid cmd such as flow
flush should not be sent to PF until the uninitialization is finished.

Fixes: 1eab95fe2e36 ("net/iavf: fix command after PF reset")

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 4 ++--
 drivers/net/iavf/iavf_vchnl.c  | 7 ++++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index ab3c4bab5f..3315dce8c8 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -1247,8 +1247,6 @@ iavf_init_vf(struct rte_eth_dev *dev)
 		}
 	}
 
-	vf->vf_reset = false;
-
 	return 0;
 err_rss:
 	rte_free(vf->rss_key);
@@ -1424,6 +1422,8 @@ iavf_dev_uninit(struct rte_eth_dev *dev)
 		vf->rss_key = NULL;
 	}
 
+	vf->vf_reset = false;
+
 	return 0;
 }
 
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 3e0454593a..8b7339f8a8 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -73,12 +73,12 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
 	int err = 0;
 	int i = 0;
 
-	if (_atomic_set_cmd(vf, args->ops))
-		return -1;
-
 	if (vf->vf_reset)
 		return -EIO;
 
+	if (_atomic_set_cmd(vf, args->ops))
+		return -1;
+
 	ret = iavf_aq_send_msg_to_pf(hw, args->ops, IAVF_SUCCESS,
 				    args->in_args, args->in_args_size, NULL);
 	if (ret) {
@@ -182,6 +182,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
 	switch (pf_msg->event) {
 	case VIRTCHNL_EVENT_RESET_IMPENDING:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event");
+		vf->vf_reset = true;
 		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
 					      NULL);
 		break;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.785479753 +0000
+++ 0130-net-iavf-fix-flow-flush-after-PF-reset.patch	2020-10-28 10:35:11.700832909 +0000
@@ -1,28 +1,28 @@
-From c02ea7410e5124ad44ad7419ab16a43e1b3af647 Mon Sep 17 00:00:00 2001
+From fe90482c72b4805a1afbb0768fa7e0a0536347d6 Mon Sep 17 00:00:00 2001
 From: Jeff Guo <jia.guo@intel.com>
 Date: Wed, 30 Sep 2020 13:44:12 +0800
 Subject: [PATCH] net/iavf: fix flow flush after PF reset
 
+[ upstream commit c02ea7410e5124ad44ad7419ab16a43e1b3af647 ]
+
 When VF begin reset after PF reset, VF will be uninitialized at first
 and then be initialized, during the time any invalid cmd such as flow
 flush should not be sent to PF until the uninitialization is finished.
 
 Fixes: 1eab95fe2e36 ("net/iavf: fix command after PF reset")
-Cc: stable@dpdk.org
 
 Signed-off-by: Jeff Guo <jia.guo@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
 ---
  drivers/net/iavf/iavf_ethdev.c | 4 ++--
- drivers/net/iavf/iavf_hash.c   | 4 ++++
  drivers/net/iavf/iavf_vchnl.c  | 7 ++++---
- 3 files changed, 10 insertions(+), 5 deletions(-)
+ 2 files changed, 6 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
-index a5b1433306..d451762fc0 100644
+index ab3c4bab5f..3315dce8c8 100644
 --- a/drivers/net/iavf/iavf_ethdev.c
 +++ b/drivers/net/iavf/iavf_ethdev.c
-@@ -1285,8 +1285,6 @@ iavf_init_vf(struct rte_eth_dev *dev)
+@@ -1247,8 +1247,6 @@ iavf_init_vf(struct rte_eth_dev *dev)
  		}
  	}
  
@@ -31,35 +31,17 @@
  	return 0;
  err_rss:
  	rte_free(vf->rss_key);
-@@ -1505,6 +1503,8 @@ iavf_dev_close(struct rte_eth_dev *dev)
- 	rte_free(vf->aq_resp);
- 	vf->aq_resp = NULL;
+@@ -1424,6 +1422,8 @@ iavf_dev_uninit(struct rte_eth_dev *dev)
+ 		vf->rss_key = NULL;
+ 	}
  
 +	vf->vf_reset = false;
 +
  	return 0;
  }
  
-diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c
-index 4b7f4a872a..be821b62eb 100644
---- a/drivers/net/iavf/iavf_hash.c
-+++ b/drivers/net/iavf/iavf_hash.c
-@@ -1034,9 +1034,13 @@ iavf_hash_destroy(__rte_unused struct iavf_adapter *ad,
- 		  struct rte_flow *flow,
- 		  __rte_unused struct rte_flow_error *error)
- {
-+	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(ad);
- 	struct virtchnl_rss_cfg *rss_cfg;
- 	int ret = 0;
- 
-+	if (vf->vf_reset)
-+		return 0;
-+
- 	rss_cfg = (struct virtchnl_rss_cfg *)flow->rule;
- 
- 	ret = iavf_add_del_rss_cfg(ad, rss_cfg, false);
 diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
-index 76f8e38d1e..e369430833 100644
+index 3e0454593a..8b7339f8a8 100644
 --- a/drivers/net/iavf/iavf_vchnl.c
 +++ b/drivers/net/iavf/iavf_vchnl.c
 @@ -73,12 +73,12 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
@@ -78,12 +60,12 @@
  	ret = iavf_aq_send_msg_to_pf(hw, args->ops, IAVF_SUCCESS,
  				    args->in_args, args->in_args_size, NULL);
  	if (ret) {
-@@ -189,6 +189,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
+@@ -182,6 +182,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
  	switch (pf_msg->event) {
  	case VIRTCHNL_EVENT_RESET_IMPENDING:
  		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event");
 +		vf->vf_reset = true;
- 		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+ 		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
  					      NULL);
  		break;
 -- 

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

* [dpdk-stable] patch 'raw/dpaa2_qdma: fix reset' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (128 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/iavf: fix flow flush after PF reset' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'eal: fix doxygen for EAL cleanup' " luca.boccassi
                   ` (76 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Nipun Gupta, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From d4a043f08be87f7ddb97c4969e3fd2f6beef5cda Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Wed, 9 Sep 2020 09:11:46 +0800
Subject: [PATCH] raw/dpaa2_qdma: fix reset

[ upstream commit f4eb44f81d8c47d157523f893fbab9baeb38f9c1 ]

This issue detected by coverity, CID#279443(Structurally dead code).

Coverity issue: 279443
Fixes: c22fab9a6c34 ("raw/dpaa2_qdma: support configuration APIs")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
---
 drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
index c905954004..b31d7aacb3 100644
--- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
+++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
@@ -455,9 +455,10 @@ rte_qdma_reset(void)
 	/* In case there are pending jobs on any VQ, return -EBUSY */
 	for (i = 0; i < qdma_dev.max_vqs; i++) {
 		if (qdma_vqs[i].in_use && (qdma_vqs[i].num_enqueues !=
-		    qdma_vqs[i].num_dequeues))
+		    qdma_vqs[i].num_dequeues)) {
 			DPAA2_QDMA_ERR("Jobs are still pending on VQ: %d", i);
 			return -EBUSY;
+		}
 	}
 
 	/* Reset HW queues */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.817124946 +0000
+++ 0131-raw-dpaa2_qdma-fix-reset.patch	2020-10-28 10:35:11.704832968 +0000
@@ -1,13 +1,14 @@
-From f4eb44f81d8c47d157523f893fbab9baeb38f9c1 Mon Sep 17 00:00:00 2001
+From d4a043f08be87f7ddb97c4969e3fd2f6beef5cda Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Wed, 9 Sep 2020 09:11:46 +0800
 Subject: [PATCH] raw/dpaa2_qdma: fix reset
 
+[ upstream commit f4eb44f81d8c47d157523f893fbab9baeb38f9c1 ]
+
 This issue detected by coverity, CID#279443(Structurally dead code).
 
 Coverity issue: 279443
 Fixes: c22fab9a6c34 ("raw/dpaa2_qdma: support configuration APIs")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
@@ -16,10 +17,10 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
-index 0b9c4e3d72..4b8474951e 100644
+index c905954004..b31d7aacb3 100644
 --- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
 +++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c
-@@ -452,9 +452,10 @@ rte_qdma_reset(void)
+@@ -455,9 +455,10 @@ rte_qdma_reset(void)
  	/* In case there are pending jobs on any VQ, return -EBUSY */
  	for (i = 0; i < qdma_dev.max_vqs; i++) {
  		if (qdma_vqs[i].in_use && (qdma_vqs[i].num_enqueues !=

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

* [dpdk-stable] patch 'eal: fix doxygen for EAL cleanup' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (129 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'raw/dpaa2_qdma: fix " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'build: skip detecting libpcap via pcap-config' " luca.boccassi
                   ` (75 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: David Marchand; +Cc: Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 28fdf3c4b8fd0300d281891091115997a02e4da9 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 9 Oct 2020 09:15:54 +0200
Subject: [PATCH] eal: fix doxygen for EAL cleanup

[ upstream commit 1a11380bf45be83d66493819f3a6e8c9868869be ]

Align rte_eal_cleanup return codes description to the rest of dpdk.

Fixes: aec9c13c5257 ("eal: add function to release internal resources")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_eal/common/include/rte_eal.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h
index 2f9ed298de..58f41d329f 100644
--- a/lib/librte_eal/common/include/rte_eal.h
+++ b/lib/librte_eal/common/include/rte_eal.h
@@ -138,8 +138,9 @@ int rte_eal_init(int argc, char **argv);
  * be made. It is expected that common usage of this function is to call it
  * just before terminating the process.
  *
- * @return 0 Successfully released all internal EAL resources
- * @return -EFAULT There was an error in releasing all resources.
+ * @return
+ *  - 0 Successfully released all internal EAL resources.
+ *  - -EFAULT There was an error in releasing all resources.
  */
 int rte_eal_cleanup(void);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.846679652 +0000
+++ 0132-eal-fix-doxygen-for-EAL-cleanup.patch	2020-10-28 10:35:11.704832968 +0000
@@ -1,24 +1,25 @@
-From 1a11380bf45be83d66493819f3a6e8c9868869be Mon Sep 17 00:00:00 2001
+From 28fdf3c4b8fd0300d281891091115997a02e4da9 Mon Sep 17 00:00:00 2001
 From: David Marchand <david.marchand@redhat.com>
 Date: Fri, 9 Oct 2020 09:15:54 +0200
 Subject: [PATCH] eal: fix doxygen for EAL cleanup
 
+[ upstream commit 1a11380bf45be83d66493819f3a6e8c9868869be ]
+
 Align rte_eal_cleanup return codes description to the rest of dpdk.
 
 Fixes: aec9c13c5257 ("eal: add function to release internal resources")
-Cc: stable@dpdk.org
 
 Signed-off-by: David Marchand <david.marchand@redhat.com>
 Acked-by: Thomas Monjalon <thomas@monjalon.net>
 ---
- lib/librte_eal/include/rte_eal.h | 5 +++--
+ lib/librte_eal/common/include/rte_eal.h | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)
 
-diff --git a/lib/librte_eal/include/rte_eal.h b/lib/librte_eal/include/rte_eal.h
-index ddcf6a2e7a..e3c2ef185e 100644
---- a/lib/librte_eal/include/rte_eal.h
-+++ b/lib/librte_eal/include/rte_eal.h
-@@ -130,8 +130,9 @@ int rte_eal_init(int argc, char **argv);
+diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h
+index 2f9ed298de..58f41d329f 100644
+--- a/lib/librte_eal/common/include/rte_eal.h
++++ b/lib/librte_eal/common/include/rte_eal.h
+@@ -138,8 +138,9 @@ int rte_eal_init(int argc, char **argv);
   * be made. It is expected that common usage of this function is to call it
   * just before terminating the process.
   *

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

* [dpdk-stable] patch 'build: skip detecting libpcap via pcap-config' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (130 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'eal: fix doxygen for EAL cleanup' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'doc: fix diagram in dpaa2 guide' " luca.boccassi
                   ` (74 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Luca Boccassi, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 364bc27dfb965bac34446f3159c0befd8027e498 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 9 Oct 2020 15:19:14 +0100
Subject: [PATCH] build: skip detecting libpcap via pcap-config

[ upstream commit cce5aecf3c3ce30724e4686bf867f146dd2fb625 ]

When compiling for a slightly different architecture, e.g. 32-bit on 64-bit
systems using CFLAGS rather than a cross-file, the pcap-config utility can
often return parameters that are unusable for the build in question, i.e.
providing the native 64-bit library paths rather than checking for 32-bit
equivalent.

Since many distros now include a version of libpcap with a
pkg-config file, and for those that don't find-library should work ok as a
fallback, we can explicitly just use pkg-config in the dependency search,
causing meson to skip trying to use pcap-config.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Luca Boccassi <bluca@debian.org>
Tested-by: David Marchand <david.marchand@redhat.com>
---
 config/meson.build | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index 0a5e5b1c44..9afd05b95e 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -160,11 +160,9 @@ if libbsd.found()
 endif
 
 # check for pcap
-pcap_dep = dependency('pcap', required: false)
-if pcap_dep.found()
-	# pcap got a pkg-config file only in 1.9.0 and before that meson uses
-	# an internal pcap-config finder, which is not compatible with
-	# cross-compilation, so try to fallback to find_library
+pcap_dep = dependency('libpcap', required: false, method: 'pkg-config')
+if not pcap_dep.found()
+	# pcap got a pkg-config file only in 1.9.0
 	pcap_dep = cc.find_library('pcap', required: false)
 endif
 if pcap_dep.found() and cc.has_header('pcap.h', dependencies: pcap_dep)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.875825162 +0000
+++ 0133-build-skip-detecting-libpcap-via-pcap-config.patch	2020-10-28 10:35:11.704832968 +0000
@@ -1,8 +1,10 @@
-From cce5aecf3c3ce30724e4686bf867f146dd2fb625 Mon Sep 17 00:00:00 2001
+From 364bc27dfb965bac34446f3159c0befd8027e498 Mon Sep 17 00:00:00 2001
 From: Bruce Richardson <bruce.richardson@intel.com>
 Date: Fri, 9 Oct 2020 15:19:14 +0100
 Subject: [PATCH] build: skip detecting libpcap via pcap-config
 
+[ upstream commit cce5aecf3c3ce30724e4686bf867f146dd2fb625 ]
+
 When compiling for a slightly different architecture, e.g. 32-bit on 64-bit
 systems using CFLAGS rather than a cross-file, the pcap-config utility can
 often return parameters that are unusable for the build in question, i.e.
@@ -14,8 +16,6 @@
 fallback, we can explicitly just use pkg-config in the dependency search,
 causing meson to skip trying to use pcap-config.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
 Reviewed-by: Luca Boccassi <bluca@debian.org>
 Tested-by: David Marchand <david.marchand@redhat.com>
@@ -24,10 +24,10 @@
  1 file changed, 3 insertions(+), 5 deletions(-)
 
 diff --git a/config/meson.build b/config/meson.build
-index 69f2aeb605..9fb903c9ba 100644
+index 0a5e5b1c44..9afd05b95e 100644
 --- a/config/meson.build
 +++ b/config/meson.build
-@@ -163,11 +163,9 @@ if libbsd.found()
+@@ -160,11 +160,9 @@ if libbsd.found()
  endif
  
  # check for pcap

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

* [dpdk-stable] patch 'doc: fix diagram in dpaa2 guide' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (131 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'build: skip detecting libpcap via pcap-config' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'net: check segment pointer in raw checksum processing' " luca.boccassi
                   ` (73 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Sachin Saxena; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 2f766df7721e1cc8e7e2b00a8ea9b4b343ed57fb Mon Sep 17 00:00:00 2001
From: Sachin Saxena <sachin.saxena@oss.nxp.com>
Date: Thu, 8 Oct 2020 08:43:57 +0530
Subject: [PATCH] doc: fix diagram in dpaa2 guide

[ upstream commit 1736219b3c5737c943620c22121b361e35b18d0d ]

The diagram to show dpaa2 drivers brief
was missing in dpaa2.html file.

fix a typo in encoding for a literal block
to make it visible in generated doc file.

Fixes: 846a8305f277 ("doc: add DPAA2 NIC details")

Signed-off-by: Sachin Saxena <sachin.saxena@oss.nxp.com>
---
 doc/guides/nics/dpaa2.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/guides/nics/dpaa2.rst b/doc/guides/nics/dpaa2.rst
index fdfa6fdd5a..e54a5ff4d2 100644
--- a/doc/guides/nics/dpaa2.rst
+++ b/doc/guides/nics/dpaa2.rst
@@ -1,5 +1,5 @@
 ..  SPDX-License-Identifier: BSD-3-Clause
-    Copyright 2016 NXP
+    Copyright 2016,2020 NXP
 
 
 DPAA2 Poll Mode Driver
@@ -300,7 +300,7 @@ The diagram below shows the dpaa2 drivers involved in a networking
 scenario and the objects bound to each driver.  A brief description
 of each driver follows.
 
-.. code-block: console
+.. code-block:: console
 
 
                                        +------------+
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.904887995 +0000
+++ 0134-doc-fix-diagram-in-dpaa2-guide.patch	2020-10-28 10:35:11.704832968 +0000
@@ -1,8 +1,10 @@
-From 1736219b3c5737c943620c22121b361e35b18d0d Mon Sep 17 00:00:00 2001
+From 2f766df7721e1cc8e7e2b00a8ea9b4b343ed57fb Mon Sep 17 00:00:00 2001
 From: Sachin Saxena <sachin.saxena@oss.nxp.com>
 Date: Thu, 8 Oct 2020 08:43:57 +0530
 Subject: [PATCH] doc: fix diagram in dpaa2 guide
 
+[ upstream commit 1736219b3c5737c943620c22121b361e35b18d0d ]
+
 The diagram to show dpaa2 drivers brief
 was missing in dpaa2.html file.
 
@@ -10,7 +12,6 @@
 to make it visible in generated doc file.
 
 Fixes: 846a8305f277 ("doc: add DPAA2 NIC details")
-Cc: stable@dpdk.org
 
 Signed-off-by: Sachin Saxena <sachin.saxena@oss.nxp.com>
 ---
@@ -18,7 +19,7 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/doc/guides/nics/dpaa2.rst b/doc/guides/nics/dpaa2.rst
-index d656b7f7a5..ca6ba5b5e2 100644
+index fdfa6fdd5a..e54a5ff4d2 100644
 --- a/doc/guides/nics/dpaa2.rst
 +++ b/doc/guides/nics/dpaa2.rst
 @@ -1,5 +1,5 @@

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

* [dpdk-stable] patch 'net: check segment pointer in raw checksum processing' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (132 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'doc: fix diagram in dpaa2 guide' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/virtio: check raw checksum failure' " luca.boccassi
                   ` (72 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Chas Williams; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 501b711ce2d8f2b688b7a857d57a242e453fe30e Mon Sep 17 00:00:00 2001
From: Chas Williams <3chas3@gmail.com>
Date: Thu, 1 Oct 2020 06:22:44 -0400
Subject: [PATCH] net: check segment pointer in raw checksum processing

[ upstream commit d98b0fc1af6c3c752304f3910da1d97a57ddd53b ]

If the overall pkt_len and segment lengths are out of agreement,
it is possible for the seg to be NULL after the loop. Add assert
to check this condition in debug builds. Otherwise, return failure.

Fixes: c442fed81bb9 ("net: add function to calculate checksum in mbuf")

Signed-off-by: Chas Williams <3chas3@gmail.com>
---
 lib/librte_net/rte_ip.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
index 0897da744c..d34c0611f0 100644
--- a/lib/librte_net/rte_ip.h
+++ b/lib/librte_net/rte_ip.h
@@ -225,6 +225,9 @@ rte_raw_cksum_mbuf(const struct rte_mbuf *m, uint32_t off, uint32_t len,
 			break;
 		off -= seglen;
 	}
+	RTE_ASSERT(seg != NULL);
+	if (seg == NULL)
+		return -1;
 	seglen -= off;
 	buf = rte_pktmbuf_mtod_offset(seg, const char *, off);
 	if (seglen >= len) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.933488722 +0000
+++ 0135-net-check-segment-pointer-in-raw-checksum-processing.patch	2020-10-28 10:35:11.704832968 +0000
@@ -1,14 +1,15 @@
-From d98b0fc1af6c3c752304f3910da1d97a57ddd53b Mon Sep 17 00:00:00 2001
+From 501b711ce2d8f2b688b7a857d57a242e453fe30e Mon Sep 17 00:00:00 2001
 From: Chas Williams <3chas3@gmail.com>
 Date: Thu, 1 Oct 2020 06:22:44 -0400
 Subject: [PATCH] net: check segment pointer in raw checksum processing
 
+[ upstream commit d98b0fc1af6c3c752304f3910da1d97a57ddd53b ]
+
 If the overall pkt_len and segment lengths are out of agreement,
 it is possible for the seg to be NULL after the loop. Add assert
 to check this condition in debug builds. Otherwise, return failure.
 
 Fixes: c442fed81bb9 ("net: add function to calculate checksum in mbuf")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chas Williams <3chas3@gmail.com>
 ---
@@ -16,7 +17,7 @@
  1 file changed, 3 insertions(+)
 
 diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
-index bb55ebb6fa..8382d0fac7 100644
+index 0897da744c..d34c0611f0 100644
 --- a/lib/librte_net/rte_ip.h
 +++ b/lib/librte_net/rte_ip.h
 @@ -225,6 +225,9 @@ rte_raw_cksum_mbuf(const struct rte_mbuf *m, uint32_t off, uint32_t len,

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

* [dpdk-stable] patch 'net/virtio: check raw checksum failure' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (133 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'net: check segment pointer in raw checksum processing' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'mem: fix allocation failure on non-NUMA kernel' " luca.boccassi
                   ` (71 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Chas Williams; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 35ce81d79f5c941fe93658a46e3019558b9f8ce1 Mon Sep 17 00:00:00 2001
From: Chas Williams <3chas3@gmail.com>
Date: Thu, 1 Oct 2020 06:22:45 -0400
Subject: [PATCH] net/virtio: check raw checksum failure

[ upstream commit dd6d6704f5b83e42af6ef3674a54ce7fb80d0254 ]

rte_raw_cksum_mbuf can fail, so we should check to see if it
has. If so, return with an error.

Fixes: 96cb6711939e ("net/virtio: support Rx checksum offload")

Signed-off-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_rxtx.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 060410577a..5211736d29 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -1184,9 +1184,10 @@ virtio_rx_offload(struct rte_mbuf *m, struct virtio_net_hdr *hdr)
 			 */
 			uint16_t csum = 0, off;
 
-			rte_raw_cksum_mbuf(m, hdr->csum_start,
+			if (rte_raw_cksum_mbuf(m, hdr->csum_start,
 				rte_pktmbuf_pkt_len(m) - hdr->csum_start,
-				&csum);
+				&csum) < 0)
+				return -EINVAL;
 			if (likely(csum != 0xffff))
 				csum = ~csum;
 			off = hdr->csum_offset + hdr->csum_start;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.962601219 +0000
+++ 0136-net-virtio-check-raw-checksum-failure.patch	2020-10-28 10:35:11.708833026 +0000
@@ -1,26 +1,26 @@
-From dd6d6704f5b83e42af6ef3674a54ce7fb80d0254 Mon Sep 17 00:00:00 2001
+From 35ce81d79f5c941fe93658a46e3019558b9f8ce1 Mon Sep 17 00:00:00 2001
 From: Chas Williams <3chas3@gmail.com>
 Date: Thu, 1 Oct 2020 06:22:45 -0400
 Subject: [PATCH] net/virtio: check raw checksum failure
 
+[ upstream commit dd6d6704f5b83e42af6ef3674a54ce7fb80d0254 ]
+
 rte_raw_cksum_mbuf can fail, so we should check to see if it
 has. If so, return with an error.
 
 Fixes: 96cb6711939e ("net/virtio: support Rx checksum offload")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chas Williams <3chas3@gmail.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
 ---
- drivers/net/virtio/virtio_rxtx.c            | 5 +++--
- drivers/net/virtio/virtio_rxtx_packed_avx.c | 5 +++--
- 2 files changed, 6 insertions(+), 4 deletions(-)
+ drivers/net/virtio/virtio_rxtx.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
-index 88c03bf40e..77934e8c58 100644
+index 060410577a..5211736d29 100644
 --- a/drivers/net/virtio/virtio_rxtx.c
 +++ b/drivers/net/virtio/virtio_rxtx.c
-@@ -910,9 +910,10 @@ virtio_rx_offload(struct rte_mbuf *m, struct virtio_net_hdr *hdr)
+@@ -1184,9 +1184,10 @@ virtio_rx_offload(struct rte_mbuf *m, struct virtio_net_hdr *hdr)
  			 */
  			uint16_t csum = 0, off;
  
@@ -33,23 +33,6 @@
  			if (likely(csum != 0xffff))
  				csum = ~csum;
  			off = hdr->csum_offset + hdr->csum_start;
-diff --git a/drivers/net/virtio/virtio_rxtx_packed_avx.c b/drivers/net/virtio/virtio_rxtx_packed_avx.c
-index ce035b5747..9bc62719ee 100644
---- a/drivers/net/virtio/virtio_rxtx_packed_avx.c
-+++ b/drivers/net/virtio/virtio_rxtx_packed_avx.c
-@@ -336,9 +336,10 @@ virtio_vec_rx_offload(struct rte_mbuf *m, struct virtio_net_hdr *hdr)
- 			 */
- 			uint16_t csum = 0, off;
- 
--			rte_raw_cksum_mbuf(m, hdr->csum_start,
-+			if (rte_raw_cksum_mbuf(m, hdr->csum_start,
- 				rte_pktmbuf_pkt_len(m) - hdr->csum_start,
--				&csum);
-+				&csum) < 0)
-+				return -1;
- 			if (likely(csum != 0xffff))
- 				csum = ~csum;
- 			off = hdr->csum_offset + hdr->csum_start;
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'mem: fix allocation failure on non-NUMA kernel' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (134 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/virtio: check raw checksum failure' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'acl: fix x86 build for compiler without AVX2' " luca.boccassi
                   ` (70 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Nick Connolly; +Cc: Nicolas Dichtel, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From a6877eb98ed273677fbe0cdccbd731444b2e065b Mon Sep 17 00:00:00 2001
From: Nick Connolly <nick.connolly@mayadata.io>
Date: Mon, 12 Oct 2020 20:28:03 +0100
Subject: [PATCH] mem: fix allocation failure on non-NUMA kernel

[ upstream commit 9d42642e866ea100b190ad8de4c8b27d1b310a13 ]

Running dpdk-helloworld on Linux with lib numa present, but no kernel
support for NUMA (CONFIG_NUMA=n) causes rte_service_init() to fail with
EAL: error allocating rte services array.

alloc_seg() calls get_mempolicy to verify that the allocation
has happened on the correct socket, but receives ENOSYS from
the kernel and fails the allocation.

The allocated socket should only be verified if check_numa() is true.

Fixes: 2a96c88be83e ("mem: ease init in a docker container")

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Reviewed-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/linux/eal/eal_memalloc.c | 30 ++++++++++++++++---------
 1 file changed, 19 insertions(+), 11 deletions(-)

diff --git a/lib/librte_eal/linux/eal/eal_memalloc.c b/lib/librte_eal/linux/eal/eal_memalloc.c
index 08b9888b07..51d239de37 100644
--- a/lib/librte_eal/linux/eal/eal_memalloc.c
+++ b/lib/librte_eal/linux/eal/eal_memalloc.c
@@ -614,17 +614,25 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,
 	}
 
 #ifdef RTE_EAL_NUMA_AWARE_HUGEPAGES
-	ret = get_mempolicy(&cur_socket_id, NULL, 0, addr,
-			    MPOL_F_NODE | MPOL_F_ADDR);
-	if (ret < 0) {
-		RTE_LOG(DEBUG, EAL, "%s(): get_mempolicy: %s\n",
-			__func__, strerror(errno));
-		goto mapped;
-	} else if (cur_socket_id != socket_id) {
-		RTE_LOG(DEBUG, EAL,
-				"%s(): allocation happened on wrong socket (wanted %d, got %d)\n",
-			__func__, socket_id, cur_socket_id);
-		goto mapped;
+	/*
+	 * If the kernel has been built without NUMA support, get_mempolicy()
+	 * will return an error. If check_numa() returns false, memory
+	 * allocation is not NUMA aware and the socket_id should not be
+	 * checked.
+	 */
+	if (check_numa()) {
+		ret = get_mempolicy(&cur_socket_id, NULL, 0, addr,
+					MPOL_F_NODE | MPOL_F_ADDR);
+		if (ret < 0) {
+			RTE_LOG(DEBUG, EAL, "%s(): get_mempolicy: %s\n",
+				__func__, strerror(errno));
+			goto mapped;
+		} else if (cur_socket_id != socket_id) {
+			RTE_LOG(DEBUG, EAL,
+					"%s(): allocation happened on wrong socket (wanted %d, got %d)\n",
+				__func__, socket_id, cur_socket_id);
+			goto mapped;
+		}
 	}
 #else
 	if (rte_socket_count() > 1)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.992883919 +0000
+++ 0137-mem-fix-allocation-failure-on-non-NUMA-kernel.patch	2020-10-28 10:35:11.708833026 +0000
@@ -1,8 +1,10 @@
-From 9d42642e866ea100b190ad8de4c8b27d1b310a13 Mon Sep 17 00:00:00 2001
+From a6877eb98ed273677fbe0cdccbd731444b2e065b Mon Sep 17 00:00:00 2001
 From: Nick Connolly <nick.connolly@mayadata.io>
 Date: Mon, 12 Oct 2020 20:28:03 +0100
 Subject: [PATCH] mem: fix allocation failure on non-NUMA kernel
 
+[ upstream commit 9d42642e866ea100b190ad8de4c8b27d1b310a13 ]
+
 Running dpdk-helloworld on Linux with lib numa present, but no kernel
 support for NUMA (CONFIG_NUMA=n) causes rte_service_init() to fail with
 EAL: error allocating rte services array.
@@ -14,20 +16,19 @@
 The allocated socket should only be verified if check_numa() is true.
 
 Fixes: 2a96c88be83e ("mem: ease init in a docker container")
-Cc: stable@dpdk.org
 
 Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
 Reviewed-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
 Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
 ---
- lib/librte_eal/linux/eal_memalloc.c | 30 ++++++++++++++++++-----------
+ lib/librte_eal/linux/eal/eal_memalloc.c | 30 ++++++++++++++++---------
  1 file changed, 19 insertions(+), 11 deletions(-)
 
-diff --git a/lib/librte_eal/linux/eal_memalloc.c b/lib/librte_eal/linux/eal_memalloc.c
-index 40a5c4aa1d..6dc1b2baec 100644
---- a/lib/librte_eal/linux/eal_memalloc.c
-+++ b/lib/librte_eal/linux/eal_memalloc.c
-@@ -625,17 +625,25 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,
+diff --git a/lib/librte_eal/linux/eal/eal_memalloc.c b/lib/librte_eal/linux/eal/eal_memalloc.c
+index 08b9888b07..51d239de37 100644
+--- a/lib/librte_eal/linux/eal/eal_memalloc.c
++++ b/lib/librte_eal/linux/eal/eal_memalloc.c
+@@ -614,17 +614,25 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,
  	}
  
  #ifdef RTE_EAL_NUMA_AWARE_HUGEPAGES

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

* [dpdk-stable] patch 'acl: fix x86 build for compiler without AVX2' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (135 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'mem: fix allocation failure on non-NUMA kernel' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'doc: fix missing classify methods in ACL guide' " luca.boccassi
                   ` (69 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From eb7f3f43bcb3dcf02d266795bebf8d77d8fe0fa9 Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
Date: Tue, 6 Oct 2020 16:03:03 +0100
Subject: [PATCH] acl: fix x86 build for compiler without AVX2

[ upstream commit 85348c3e7dd5019e4d2f738c7492bc4c9d4bf9d2 ]

Right now we define dummy version of rte_acl_classify_avx2()
when both X86 and AVX2 are not detected, though it should be
for non-AVX2 case only.

Fixes: e53ce4e41379 ("acl: remove use of weak functions")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_acl/rte_acl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_acl/rte_acl.c b/lib/librte_acl/rte_acl.c
index 777ec4d340..715b023592 100644
--- a/lib/librte_acl/rte_acl.c
+++ b/lib/librte_acl/rte_acl.c
@@ -16,7 +16,6 @@ static struct rte_tailq_elem rte_acl_tailq = {
 };
 EAL_REGISTER_TAILQ(rte_acl_tailq)
 
-#ifndef RTE_ARCH_X86
 #ifndef CC_AVX2_SUPPORT
 /*
  * If the compiler doesn't support AVX2 instructions,
@@ -33,6 +32,7 @@ rte_acl_classify_avx2(__rte_unused const struct rte_acl_ctx *ctx,
 }
 #endif
 
+#ifndef RTE_ARCH_X86
 int
 rte_acl_classify_sse(__rte_unused const struct rte_acl_ctx *ctx,
 	__rte_unused const uint8_t **data,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.024790640 +0000
+++ 0138-acl-fix-x86-build-for-compiler-without-AVX2.patch	2020-10-28 10:35:11.708833026 +0000
@@ -1,14 +1,15 @@
-From 85348c3e7dd5019e4d2f738c7492bc4c9d4bf9d2 Mon Sep 17 00:00:00 2001
+From eb7f3f43bcb3dcf02d266795bebf8d77d8fe0fa9 Mon Sep 17 00:00:00 2001
 From: Konstantin Ananyev <konstantin.ananyev@intel.com>
 Date: Tue, 6 Oct 2020 16:03:03 +0100
 Subject: [PATCH] acl: fix x86 build for compiler without AVX2
 
+[ upstream commit 85348c3e7dd5019e4d2f738c7492bc4c9d4bf9d2 ]
+
 Right now we define dummy version of rte_acl_classify_avx2()
 when both X86 and AVX2 are not detected, though it should be
 for non-AVX2 case only.
 
 Fixes: e53ce4e41379 ("acl: remove use of weak functions")
-Cc: stable@dpdk.org
 
 Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
 Reviewed-by: David Marchand <david.marchand@redhat.com>
@@ -17,7 +18,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/lib/librte_acl/rte_acl.c b/lib/librte_acl/rte_acl.c
-index e2c1ed4ad0..aa430a378d 100644
+index 777ec4d340..715b023592 100644
 --- a/lib/librte_acl/rte_acl.c
 +++ b/lib/librte_acl/rte_acl.c
 @@ -16,7 +16,6 @@ static struct rte_tailq_elem rte_acl_tailq = {

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

* [dpdk-stable] patch 'doc: fix missing classify methods in ACL guide' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (136 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'acl: fix x86 build for compiler without AVX2' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:44 ` [dpdk-stable] patch 'table: fix hash for 32-bit' " luca.boccassi
                   ` (68 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 13f33483a30d194edf94ae708d120f8d1c9f9fdc Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
Date: Tue, 6 Oct 2020 16:03:04 +0100
Subject: [PATCH] doc: fix missing classify methods in ACL guide

[ upstream commit 28377e37ecdbdcd99218e33c53d3a06cc87726c9 ]

Add brief description for missing ACL classify algorithms:
RTE_ACL_CLASSIFY_NEON and RTE_ACL_CLASSIFY_ALTIVEC.

Fixes: 34fa6c27c156 ("acl: add NEON optimization for ARMv8")
Fixes: 1d73135f9f1c ("acl: add AltiVec for ppc64")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 doc/guides/prog_guide/packet_classif_access_ctrl.rst | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/doc/guides/prog_guide/packet_classif_access_ctrl.rst b/doc/guides/prog_guide/packet_classif_access_ctrl.rst
index 2945eacf55..f99302a5e8 100644
--- a/doc/guides/prog_guide/packet_classif_access_ctrl.rst
+++ b/doc/guides/prog_guide/packet_classif_access_ctrl.rst
@@ -373,6 +373,12 @@ There are several implementations of classify algorithm:
 
 *   **RTE_ACL_CLASSIFY_AVX2**: vector implementation, can process up to 16 flows in parallel. Requires AVX2 support.
 
+*   **RTE_ACL_CLASSIFY_NEON**: vector implementation, can process up to 8 flows
+    in parallel. Requires NEON support.
+
+*   **RTE_ACL_CLASSIFY_ALTIVEC**: vector implementation, can process up to 8
+    flows in parallel. Requires ALTIVEC support.
+
 It is purely a runtime decision which method to choose, there is no build-time difference.
 All implementations operates over the same internal RT structures and use similar principles. The main difference is that vector implementations can manually exploit IA SIMD instructions and process several input data flows in parallel.
 At startup ACL library determines the highest available classify method for the given platform and sets it as default one. Though the user has an ability to override the default classifier function for a given ACL context or perform particular search using non-default classify method. In that case it is user responsibility to make sure that given platform supports selected classify implementation.
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.053341538 +0000
+++ 0139-doc-fix-missing-classify-methods-in-ACL-guide.patch	2020-10-28 10:35:11.712833086 +0000
@@ -1,14 +1,15 @@
-From 28377e37ecdbdcd99218e33c53d3a06cc87726c9 Mon Sep 17 00:00:00 2001
+From 13f33483a30d194edf94ae708d120f8d1c9f9fdc Mon Sep 17 00:00:00 2001
 From: Konstantin Ananyev <konstantin.ananyev@intel.com>
 Date: Tue, 6 Oct 2020 16:03:04 +0100
 Subject: [PATCH] doc: fix missing classify methods in ACL guide
 
+[ upstream commit 28377e37ecdbdcd99218e33c53d3a06cc87726c9 ]
+
 Add brief description for missing ACL classify algorithms:
 RTE_ACL_CLASSIFY_NEON and RTE_ACL_CLASSIFY_ALTIVEC.
 
 Fixes: 34fa6c27c156 ("acl: add NEON optimization for ARMv8")
 Fixes: 1d73135f9f1c ("acl: add AltiVec for ppc64")
-Cc: stable@dpdk.org
 
 Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
 Reviewed-by: David Marchand <david.marchand@redhat.com>
@@ -17,7 +18,7 @@
  1 file changed, 6 insertions(+)
 
 diff --git a/doc/guides/prog_guide/packet_classif_access_ctrl.rst b/doc/guides/prog_guide/packet_classif_access_ctrl.rst
-index 0345512b9e..daf03e6d7a 100644
+index 2945eacf55..f99302a5e8 100644
 --- a/doc/guides/prog_guide/packet_classif_access_ctrl.rst
 +++ b/doc/guides/prog_guide/packet_classif_access_ctrl.rst
 @@ -373,6 +373,12 @@ There are several implementations of classify algorithm:

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

* [dpdk-stable] patch 'table: fix hash for 32-bit' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (137 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'doc: fix missing classify methods in ACL guide' " luca.boccassi
@ 2020-10-28 10:44 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'crypto/octeontx2: fix session-less mode' " luca.boccassi
                   ` (67 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:44 UTC (permalink / raw)
  To: Ting Xu; +Cc: Cristian Dumitrescu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From e4510620eb2e0bca82bba9c95f424fc0ad4934a7 Mon Sep 17 00:00:00 2001
From: Ting Xu <ting.xu@intel.com>
Date: Wed, 22 Jul 2020 10:16:28 +0800
Subject: [PATCH] table: fix hash for 32-bit

[ upstream commit 99541c3028d741a09fe5dca95e79d8d020130173 ]

When create softnic hash table with 16 keys, it failed on 32-bit
environment, because the pointer field in structure rte_bucket_4_16
is only 32 bits. Add a padding field in 32-bit environment to keep
the structure to a multiple of 64 bytes. Apply this to 8-byte and
32-byte key hash function as well.

Fixes: 8aa327214c ("table: hash")

Signed-off-by: Ting Xu <ting.xu@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 lib/librte_table/rte_table_hash_key16.c | 17 +++++++++++++++++
 lib/librte_table/rte_table_hash_key32.c | 17 +++++++++++++++++
 lib/librte_table/rte_table_hash_key8.c  | 16 ++++++++++++++++
 3 files changed, 50 insertions(+)

diff --git a/lib/librte_table/rte_table_hash_key16.c b/lib/librte_table/rte_table_hash_key16.c
index 2cca1c924a..c4384b114d 100644
--- a/lib/librte_table/rte_table_hash_key16.c
+++ b/lib/librte_table/rte_table_hash_key16.c
@@ -33,6 +33,7 @@
 
 #endif
 
+#ifdef RTE_ARCH_64
 struct rte_bucket_4_16 {
 	/* Cache line 0 */
 	uint64_t signature[4 + 1];
@@ -46,6 +47,22 @@ struct rte_bucket_4_16 {
 	/* Cache line 2 */
 	uint8_t data[0];
 };
+#else
+struct rte_bucket_4_16 {
+	/* Cache line 0 */
+	uint64_t signature[4 + 1];
+	uint64_t lru_list;
+	struct rte_bucket_4_16 *next;
+	uint32_t pad;
+	uint64_t next_valid;
+
+	/* Cache line 1 */
+	uint64_t key[4][2];
+
+	/* Cache line 2 */
+	uint8_t data[0];
+};
+#endif
 
 struct rte_table_hash {
 	struct rte_table_stats stats;
diff --git a/lib/librte_table/rte_table_hash_key32.c b/lib/librte_table/rte_table_hash_key32.c
index a137c50284..3e0031fe1e 100644
--- a/lib/librte_table/rte_table_hash_key32.c
+++ b/lib/librte_table/rte_table_hash_key32.c
@@ -33,6 +33,7 @@
 
 #endif
 
+#ifdef RTE_ARCH_64
 struct rte_bucket_4_32 {
 	/* Cache line 0 */
 	uint64_t signature[4 + 1];
@@ -46,6 +47,22 @@ struct rte_bucket_4_32 {
 	/* Cache line 3 */
 	uint8_t data[0];
 };
+#else
+struct rte_bucket_4_32 {
+	/* Cache line 0 */
+	uint64_t signature[4 + 1];
+	uint64_t lru_list;
+	struct rte_bucket_4_32 *next;
+	uint32_t pad;
+	uint64_t next_valid;
+
+	/* Cache lines 1 and 2 */
+	uint64_t key[4][4];
+
+	/* Cache line 3 */
+	uint8_t data[0];
+};
+#endif
 
 struct rte_table_hash {
 	struct rte_table_stats stats;
diff --git a/lib/librte_table/rte_table_hash_key8.c b/lib/librte_table/rte_table_hash_key8.c
index 1811ad8d05..34e3ed1af9 100644
--- a/lib/librte_table/rte_table_hash_key8.c
+++ b/lib/librte_table/rte_table_hash_key8.c
@@ -31,6 +31,7 @@
 
 #endif
 
+#ifdef RTE_ARCH_64
 struct rte_bucket_4_8 {
 	/* Cache line 0 */
 	uint64_t signature;
@@ -43,6 +44,21 @@ struct rte_bucket_4_8 {
 	/* Cache line 1 */
 	uint8_t data[0];
 };
+#else
+struct rte_bucket_4_8 {
+	/* Cache line 0 */
+	uint64_t signature;
+	uint64_t lru_list;
+	struct rte_bucket_4_8 *next;
+	uint32_t pad;
+	uint64_t next_valid;
+
+	uint64_t key[4];
+
+	/* Cache line 1 */
+	uint8_t data[0];
+};
+#endif
 
 struct rte_table_hash {
 	struct rte_table_stats stats;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.082325914 +0000
+++ 0140-table-fix-hash-for-32-bit.patch	2020-10-28 10:35:11.712833086 +0000
@@ -1,8 +1,10 @@
-From 99541c3028d741a09fe5dca95e79d8d020130173 Mon Sep 17 00:00:00 2001
+From e4510620eb2e0bca82bba9c95f424fc0ad4934a7 Mon Sep 17 00:00:00 2001
 From: Ting Xu <ting.xu@intel.com>
 Date: Wed, 22 Jul 2020 10:16:28 +0800
 Subject: [PATCH] table: fix hash for 32-bit
 
+[ upstream commit 99541c3028d741a09fe5dca95e79d8d020130173 ]
+
 When create softnic hash table with 16 keys, it failed on 32-bit
 environment, because the pointer field in structure rte_bucket_4_16
 is only 32 bits. Add a padding field in 32-bit environment to keep
@@ -10,7 +12,6 @@
 32-byte key hash function as well.
 
 Fixes: 8aa327214c ("table: hash")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ting Xu <ting.xu@intel.com>
 Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>

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

* [dpdk-stable] patch 'crypto/octeontx2: fix session-less mode' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (138 preceding siblings ...)
  2020-10-28 10:44 ` [dpdk-stable] patch 'table: fix hash for 32-bit' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'app/test-sad: fix uninitialized variable' " luca.boccassi
                   ` (66 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Ankur Dwivedi; +Cc: Anoob Joseph, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 17beb6dbfeeb09d75749950ac8b48ca550c95ed0 Mon Sep 17 00:00:00 2001
From: Ankur Dwivedi <adwivedi@marvell.com>
Date: Fri, 18 Sep 2020 19:15:45 +0530
Subject: [PATCH] crypto/octeontx2: fix session-less mode

[ upstream commit 4a35a46409eb59bb55102120946503920d41f7de ]

A temporary session is created for sessionless crypto operations.
rte_cryptodev_sym_session_create() should be used for creating the
temporary session as it initializes the session structure in the
correct way. Also the session should be set to 0 before freeing it.

Fixes: 17ac2a72191b ("crypto/octeontx2: add enqueue/dequeue ops")

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
 drivers/crypto/octeontx2/otx2_cryptodev_ops.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
index 65101b0d2f..af4bbccd7d 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
@@ -518,8 +518,8 @@ otx2_cpt_enqueue_sym_sessless(struct otx2_cpt_qp *qp, struct rte_crypto_op *op,
 	int ret;
 
 	/* Create temporary session */
-
-	if (rte_mempool_get(qp->sess_mp, (void **)&sess))
+	sess = rte_cryptodev_sym_session_create(qp->sess_mp);
+	if (sess == NULL)
 		return -ENOMEM;
 
 	ret = sym_session_configure(driver_id, sym_op->xform, sess,
@@ -671,6 +671,8 @@ static inline void
 otx2_cpt_dequeue_post_process(struct otx2_cpt_qp *qp, struct rte_crypto_op *cop,
 			      uintptr_t *rsp, uint8_t cc)
 {
+	unsigned int sz;
+
 	if (cop->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC) {
 		if (likely(cc == NO_ERR)) {
 			/* Verify authentication data if required */
@@ -689,6 +691,9 @@ otx2_cpt_dequeue_post_process(struct otx2_cpt_qp *qp, struct rte_crypto_op *cop,
 		if (unlikely(cop->sess_type == RTE_CRYPTO_OP_SESSIONLESS)) {
 			sym_session_clear(otx2_cryptodev_driver_id,
 					  cop->sym->session);
+			sz = rte_cryptodev_sym_get_existing_header_session_size(
+					cop->sym->session);
+			memset(cop->sym->session, 0, sz);
 			rte_mempool_put(qp->sess_mp, cop->sym->session);
 			cop->sym->session = NULL;
 		}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.113402491 +0000
+++ 0141-crypto-octeontx2-fix-session-less-mode.patch	2020-10-28 10:35:11.712833086 +0000
@@ -1,15 +1,16 @@
-From 4a35a46409eb59bb55102120946503920d41f7de Mon Sep 17 00:00:00 2001
+From 17beb6dbfeeb09d75749950ac8b48ca550c95ed0 Mon Sep 17 00:00:00 2001
 From: Ankur Dwivedi <adwivedi@marvell.com>
 Date: Fri, 18 Sep 2020 19:15:45 +0530
 Subject: [PATCH] crypto/octeontx2: fix session-less mode
 
+[ upstream commit 4a35a46409eb59bb55102120946503920d41f7de ]
+
 A temporary session is created for sessionless crypto operations.
 rte_cryptodev_sym_session_create() should be used for creating the
 temporary session as it initializes the session structure in the
 correct way. Also the session should be set to 0 before freeing it.
 
 Fixes: 17ac2a72191b ("crypto/octeontx2: add enqueue/dequeue ops")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
 Acked-by: Anoob Joseph <anoobj@marvell.com>
@@ -18,10 +19,10 @@
  1 file changed, 7 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
-index df39cde957..d38365a331 100644
+index 65101b0d2f..af4bbccd7d 100644
 --- a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
 +++ b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
-@@ -648,8 +648,8 @@ otx2_cpt_enqueue_sym_sessless(struct otx2_cpt_qp *qp, struct rte_crypto_op *op,
+@@ -518,8 +518,8 @@ otx2_cpt_enqueue_sym_sessless(struct otx2_cpt_qp *qp, struct rte_crypto_op *op,
  	int ret;
  
  	/* Create temporary session */
@@ -32,16 +33,16 @@
  		return -ENOMEM;
  
  	ret = sym_session_configure(driver_id, sym_op->xform, sess,
-@@ -866,6 +866,8 @@ static inline void
+@@ -671,6 +671,8 @@ static inline void
  otx2_cpt_dequeue_post_process(struct otx2_cpt_qp *qp, struct rte_crypto_op *cop,
  			      uintptr_t *rsp, uint8_t cc)
  {
 +	unsigned int sz;
 +
  	if (cop->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC) {
- 		if (cop->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) {
- 			if (likely(cc == OTX2_IPSEC_PO_CC_SUCCESS)) {
-@@ -894,6 +896,9 @@ otx2_cpt_dequeue_post_process(struct otx2_cpt_qp *qp, struct rte_crypto_op *cop,
+ 		if (likely(cc == NO_ERR)) {
+ 			/* Verify authentication data if required */
+@@ -689,6 +691,9 @@ otx2_cpt_dequeue_post_process(struct otx2_cpt_qp *qp, struct rte_crypto_op *cop,
  		if (unlikely(cop->sess_type == RTE_CRYPTO_OP_SESSIONLESS)) {
  			sym_session_clear(otx2_cryptodev_driver_id,
  					  cop->sym->session);

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

* [dpdk-stable] patch 'app/test-sad: fix uninitialized variable' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (139 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'crypto/octeontx2: fix session-less mode' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/crypto: fix device number' " luca.boccassi
                   ` (65 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Vladimir Medvedkin; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From d3549443b21ffc8941feeb17a0882aa675a94ac4 Mon Sep 17 00:00:00 2001
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Date: Fri, 18 Sep 2020 13:35:56 +0100
Subject: [PATCH] app/test-sad: fix uninitialized variable

[ upstream commit d26ec0d90e8bc4489b1338a48af0023a53e3edb3 ]

Coverity issue: 362055
Fixes: 908be0651a5a ("app/test-sad: add test application for IPsec SAD")

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 app/test-sad/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-sad/main.c b/app/test-sad/main.c
index b01e84c570..8380fad744 100644
--- a/app/test-sad/main.c
+++ b/app/test-sad/main.c
@@ -617,7 +617,7 @@ main(int argc, char **argv)
 {
 	int ret;
 	struct rte_ipsec_sad *sad;
-	struct rte_ipsec_sad_conf conf;
+	struct rte_ipsec_sad_conf conf = {0};
 	unsigned int lcore_id;
 
 	ret = rte_eal_init(argc, argv);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.142551783 +0000
+++ 0142-app-test-sad-fix-uninitialized-variable.patch	2020-10-28 10:35:11.716833144 +0000
@@ -1,11 +1,12 @@
-From d26ec0d90e8bc4489b1338a48af0023a53e3edb3 Mon Sep 17 00:00:00 2001
+From d3549443b21ffc8941feeb17a0882aa675a94ac4 Mon Sep 17 00:00:00 2001
 From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
 Date: Fri, 18 Sep 2020 13:35:56 +0100
 Subject: [PATCH] app/test-sad: fix uninitialized variable
 
+[ upstream commit d26ec0d90e8bc4489b1338a48af0023a53e3edb3 ]
+
 Coverity issue: 362055
 Fixes: 908be0651a5a ("app/test-sad: add test application for IPsec SAD")
-Cc: stable@dpdk.org
 
 Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
 ---

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

* [dpdk-stable] patch 'test/crypto: fix device number' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (140 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'app/test-sad: fix uninitialized variable' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'crypto/dpaa_sec: fix a null pointer dereference' " luca.boccassi
                   ` (64 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Ankur Dwivedi; +Cc: Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From a0a9359d0350e69139958b0c5b34e1d4a2203385 Mon Sep 17 00:00:00 2001
From: Ankur Dwivedi <adwivedi@marvell.com>
Date: Thu, 30 Jul 2020 16:50:17 +0530
Subject: [PATCH] test/crypto: fix device number

[ upstream commit ff56727b4fae5841ec0c214223e71e78511b5687 ]

In testsuite_setup(), ts_params is configured for first valid device.
The same device should be used as valid device in
test_device_configure_invalid_dev_id test case.

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

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 app/test/test_cryptodev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index fd1056dec1..75d35c6582 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -643,7 +643,7 @@ test_device_configure_invalid_dev_id(void)
 			"Need at least %d devices for test", 1);
 
 	/* valid dev_id values */
-	dev_id = ts_params->valid_devs[ts_params->valid_dev_count - 1];
+	dev_id = ts_params->valid_devs[0];
 
 	/* Stop the device in case it's started so it can be configured */
 	rte_cryptodev_stop(dev_id);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.172271556 +0000
+++ 0143-test-crypto-fix-device-number.patch	2020-10-28 10:35:11.724833262 +0000
@@ -1,14 +1,15 @@
-From ff56727b4fae5841ec0c214223e71e78511b5687 Mon Sep 17 00:00:00 2001
+From a0a9359d0350e69139958b0c5b34e1d4a2203385 Mon Sep 17 00:00:00 2001
 From: Ankur Dwivedi <adwivedi@marvell.com>
 Date: Thu, 30 Jul 2020 16:50:17 +0530
 Subject: [PATCH] test/crypto: fix device number
 
+[ upstream commit ff56727b4fae5841ec0c214223e71e78511b5687 ]
+
 In testsuite_setup(), ts_params is configured for first valid device.
 The same device should be used as valid device in
 test_device_configure_invalid_dev_id test case.
 
 Fixes: 202d375c60bc ("app/test: add cryptodev unit and performance tests")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
 Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
-index 153d001194..162c21dd88 100644
+index fd1056dec1..75d35c6582 100644
 --- a/app/test/test_cryptodev.c
 +++ b/app/test/test_cryptodev.c
-@@ -755,7 +755,7 @@ test_device_configure_invalid_dev_id(void)
+@@ -643,7 +643,7 @@ test_device_configure_invalid_dev_id(void)
  			"Need at least %d devices for test", 1);
  
  	/* valid dev_id values */

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

* [dpdk-stable] patch 'crypto/dpaa_sec: fix a null pointer dereference' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (141 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/crypto: fix device number' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'app/bbdev: fix test vector symlink' " luca.boccassi
                   ` (63 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From a1d4781f98130649437ee812533776cb8c0c58d8 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Sat, 5 Sep 2020 18:26:02 +0800
Subject: [PATCH] crypto/dpaa_sec: fix a null pointer dereference

[ upstream commit 8839c8a1f79e722be6397590bd7d255972a398b4 ]

This patch fixes a null pointer dereference after null check detected by
coverity scan.

Coverity issue: 349904
Fixes: 6a0c9d364afc ("crypto/dpaax_sec: support HFN override")

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

diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 35f1feac44..a650313cdb 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -2959,7 +2959,8 @@ dpaa_sec_set_pdcp_session(struct rte_cryptodev *dev,
 	session->pdcp.hfn = pdcp_xform->hfn;
 	session->pdcp.hfn_threshold = pdcp_xform->hfn_threshold;
 	session->pdcp.hfn_ovd = pdcp_xform->hfn_ovrd;
-	session->pdcp.hfn_ovd_offset = cipher_xform->iv.offset;
+	if (cipher_xform)
+		session->pdcp.hfn_ovd_offset = cipher_xform->iv.offset;
 
 	rte_spinlock_lock(&dev_priv->lock);
 	for (i = 0; i < MAX_DPAA_CORES; i++) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.210650780 +0000
+++ 0144-crypto-dpaa_sec-fix-a-null-pointer-dereference.patch	2020-10-28 10:35:11.728833321 +0000
@@ -1,14 +1,15 @@
-From 8839c8a1f79e722be6397590bd7d255972a398b4 Mon Sep 17 00:00:00 2001
+From a1d4781f98130649437ee812533776cb8c0c58d8 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Sat, 5 Sep 2020 18:26:02 +0800
 Subject: [PATCH] crypto/dpaa_sec: fix a null pointer dereference
 
+[ upstream commit 8839c8a1f79e722be6397590bd7d255972a398b4 ]
+
 This patch fixes a null pointer dereference after null check detected by
 coverity scan.
 
 Coverity issue: 349904
 Fixes: 6a0c9d364afc ("crypto/dpaax_sec: support HFN override")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
@@ -17,10 +18,10 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
-index 97002170b0..0495422a4c 100644
+index 35f1feac44..a650313cdb 100644
 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c
 +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
-@@ -2949,7 +2949,8 @@ dpaa_sec_set_pdcp_session(struct rte_cryptodev *dev,
+@@ -2959,7 +2959,8 @@ dpaa_sec_set_pdcp_session(struct rte_cryptodev *dev,
  	session->pdcp.hfn = pdcp_xform->hfn;
  	session->pdcp.hfn_threshold = pdcp_xform->hfn_threshold;
  	session->pdcp.hfn_ovd = pdcp_xform->hfn_ovrd;

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

* [dpdk-stable] patch 'app/bbdev: fix test vector symlink' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (142 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'crypto/dpaa_sec: fix a null pointer dereference' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'baseband/fpga_lte_fec: fix crash with debug' " luca.boccassi
                   ` (62 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Nicolas Chautru; +Cc: Aidan Goddard, Dave Burley, Liu Tianjiao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 48c7145f86c04b37373fc3a9573d81e2ed1bf7ab Mon Sep 17 00:00:00 2001
From: Nicolas Chautru <nicolas.chautru@intel.com>
Date: Wed, 9 Sep 2020 14:15:51 -0700
Subject: [PATCH] app/bbdev: fix test vector symlink

[ upstream commit 99c886d3e3490207809bf276b37d734df7613c16 ]

5G DL default symlink was pointing to a 4G vector.

Fixes: d762705308c4 ("app/bbdev: add test vectors for 5GNR")

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Aidan Goddard <aidan.goddard@accelercomm.com>
Acked-by: Dave Burley <dave.burley@accelercomm.com>
Acked-by: Liu Tianjiao <tianjiao.liu@intel.com>
---
 app/test-bbdev/ldpc_enc_default.data | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-bbdev/ldpc_enc_default.data b/app/test-bbdev/ldpc_enc_default.data
index 371cbc692d..52d51ae330 120000
--- a/app/test-bbdev/ldpc_enc_default.data
+++ b/app/test-bbdev/ldpc_enc_default.data
@@ -1 +1 @@
-test_vectors/turbo_dec_c1_k6144_r0_e10376_crc24b_sbd_negllr_high_snr.data
\ No newline at end of file
+test_vectors/ldpc_enc_v2342.data
\ No newline at end of file
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.241994634 +0000
+++ 0145-app-bbdev-fix-test-vector-symlink.patch	2020-10-28 10:35:11.728833321 +0000
@@ -1,12 +1,13 @@
-From 99c886d3e3490207809bf276b37d734df7613c16 Mon Sep 17 00:00:00 2001
+From 48c7145f86c04b37373fc3a9573d81e2ed1bf7ab Mon Sep 17 00:00:00 2001
 From: Nicolas Chautru <nicolas.chautru@intel.com>
 Date: Wed, 9 Sep 2020 14:15:51 -0700
 Subject: [PATCH] app/bbdev: fix test vector symlink
 
+[ upstream commit 99c886d3e3490207809bf276b37d734df7613c16 ]
+
 5G DL default symlink was pointing to a 4G vector.
 
 Fixes: d762705308c4 ("app/bbdev: add test vectors for 5GNR")
-Cc: stable@dpdk.org
 
 Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
 Acked-by: Aidan Goddard <aidan.goddard@accelercomm.com>

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

* [dpdk-stable] patch 'baseband/fpga_lte_fec: fix crash with debug' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (143 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'app/bbdev: fix test vector symlink' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/crypto: fix stats test' " luca.boccassi
                   ` (61 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Nicolas Chautru, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From b13e19d34bdfc86687b6cb80ae002f9134d89106 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Tue, 6 Oct 2020 12:04:21 +0200
Subject: [PATCH] baseband/fpga_lte_fec: fix crash with debug

[ upstream commit 755fb0887ff1283c2eaac6090bf46a4f4aa363dd ]

When RTE_LIBRTE_BBDEV_DEBUG is enabled, rte_device's driver
pointer is dereferenced twice in fpga_lte_fec's probe callback.
It causes a segmentation fault because this pointer is only
assigned after probe callback call.

This patch makes use of rte_pci_driver pointer instead

Fixes: efd453698c49 ("baseband/fpga_lte_fec: add driver for FEC on FPGA")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
index 8bd10b401a..0a75a0ff13 100644
--- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
+++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
@@ -2325,7 +2325,7 @@ fpga_lte_fec_init(struct rte_bbdev *dev, struct rte_pci_driver *drv)
 
 	rte_bbdev_log_debug(
 			"Init device %s [%s] @ virtaddr %p phyaddr %#"PRIx64,
-			dev->device->driver->name, dev->data->name,
+			drv->driver.name, dev->data->name,
 			(void *)pci_dev->mem_resource[0].addr,
 			pci_dev->mem_resource[0].phys_addr);
 }
@@ -2380,7 +2380,7 @@ fpga_lte_fec_probe(struct rte_pci_driver *pci_drv,
 		((uint16_t)(version_id >> 16)), ((uint16_t)version_id));
 
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
-	if (!strcmp(bbdev->device->driver->name,
+	if (!strcmp(pci_drv->driver.name,
 			RTE_STR(FPGA_LTE_FEC_PF_DRIVER_NAME)))
 		print_static_reg_debug_info(d->mmio_base);
 #endif
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.270812301 +0000
+++ 0146-baseband-fpga_lte_fec-fix-crash-with-debug.patch	2020-10-28 10:35:11.728833321 +0000
@@ -1,8 +1,10 @@
-From 755fb0887ff1283c2eaac6090bf46a4f4aa363dd Mon Sep 17 00:00:00 2001
+From b13e19d34bdfc86687b6cb80ae002f9134d89106 Mon Sep 17 00:00:00 2001
 From: Maxime Coquelin <maxime.coquelin@redhat.com>
 Date: Tue, 6 Oct 2020 12:04:21 +0200
 Subject: [PATCH] baseband/fpga_lte_fec: fix crash with debug
 
+[ upstream commit 755fb0887ff1283c2eaac6090bf46a4f4aa363dd ]
+
 When RTE_LIBRTE_BBDEV_DEBUG is enabled, rte_device's driver
 pointer is dereferenced twice in fpga_lte_fec's probe callback.
 It causes a segmentation fault because this pointer is only
@@ -11,7 +13,6 @@
 This patch makes use of rte_pci_driver pointer instead
 
 Fixes: efd453698c49 ("baseband/fpga_lte_fec: add driver for FEC on FPGA")
-Cc: stable@dpdk.org
 
 Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
 Acked-by: Nicolas Chautru <nicolas.chautru@intel.com>
@@ -20,10 +21,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
-index 71de399eef..a0fb11cb47 100644
+index 8bd10b401a..0a75a0ff13 100644
 --- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
 +++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
-@@ -2328,7 +2328,7 @@ fpga_lte_fec_init(struct rte_bbdev *dev, struct rte_pci_driver *drv)
+@@ -2325,7 +2325,7 @@ fpga_lte_fec_init(struct rte_bbdev *dev, struct rte_pci_driver *drv)
  
  	rte_bbdev_log_debug(
  			"Init device %s [%s] @ virtaddr %p phyaddr %#"PRIx64,
@@ -32,7 +33,7 @@
  			(void *)pci_dev->mem_resource[0].addr,
  			pci_dev->mem_resource[0].phys_addr);
  }
-@@ -2383,7 +2383,7 @@ fpga_lte_fec_probe(struct rte_pci_driver *pci_drv,
+@@ -2380,7 +2380,7 @@ fpga_lte_fec_probe(struct rte_pci_driver *pci_drv,
  		((uint16_t)(version_id >> 16)), ((uint16_t)version_id));
  
  #ifdef RTE_LIBRTE_BBDEV_DEBUG

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

* [dpdk-stable] patch 'test/crypto: fix stats test' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (144 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'baseband/fpga_lte_fec: fix crash with debug' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'crypto/armv8: fix mempool object returning' " luca.boccassi
                   ` (60 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Adam Dybkowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 1efe9f0924ec1b1000df11834f974fe2a5c14db9 Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Mon, 31 Aug 2020 16:51:43 +0800
Subject: [PATCH] test/crypto: fix stats test

[ upstream commit b450503612eebc59de96aa3f20ec5ea0e3ceb400 ]

ut_setup / ut_teardown are invoked for each test case by test framework.
The call inside test_stats is unnecessary and even incorrect.
This caused double free of objects such as crypto operation structure.
Trapped the issue when RTE_LIBRTE_MEMPOOL_DEBUG was enabled.
Fix issue by removing ut_setup / ut_teardown from test case implementation.

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

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Tested-by: Adam Dybkowski <adamx.dybkowski@intel.com>
---
 app/test/test_cryptodev.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 75d35c6582..a852040ec2 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -9425,9 +9425,7 @@ test_stats(void)
 		"rte_cryptodev_stats_get invalid Param failed");
 
 	/* Test expected values */
-	ut_setup();
 	test_AES_CBC_HMAC_SHA1_encrypt_digest();
-	ut_teardown();
 	TEST_ASSERT_SUCCESS(rte_cryptodev_stats_get(ts_params->valid_devs[0],
 			&stats),
 		"rte_cryptodev_stats_get failed");
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.301208099 +0000
+++ 0147-test-crypto-fix-stats-test.patch	2020-10-28 10:35:11.740833497 +0000
@@ -1,8 +1,10 @@
-From b450503612eebc59de96aa3f20ec5ea0e3ceb400 Mon Sep 17 00:00:00 2001
+From 1efe9f0924ec1b1000df11834f974fe2a5c14db9 Mon Sep 17 00:00:00 2001
 From: Ruifeng Wang <ruifeng.wang@arm.com>
 Date: Mon, 31 Aug 2020 16:51:43 +0800
 Subject: [PATCH] test/crypto: fix stats test
 
+[ upstream commit b450503612eebc59de96aa3f20ec5ea0e3ceb400 ]
+
 ut_setup / ut_teardown are invoked for each test case by test framework.
 The call inside test_stats is unnecessary and even incorrect.
 This caused double free of objects such as crypto operation structure.
@@ -10,7 +12,6 @@
 Fix issue by removing ut_setup / ut_teardown from test case implementation.
 
 Fixes: 202d375c60bc ("app/test: add cryptodev unit and performance tests")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
 Tested-by: Adam Dybkowski <adamx.dybkowski@intel.com>
@@ -19,10 +20,10 @@
  1 file changed, 2 deletions(-)
 
 diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
-index 704aa7c414..d702cb91a3 100644
+index 75d35c6582..a852040ec2 100644
 --- a/app/test/test_cryptodev.c
 +++ b/app/test/test_cryptodev.c
-@@ -9326,9 +9326,7 @@ test_stats(void)
+@@ -9425,9 +9425,7 @@ test_stats(void)
  		"rte_cryptodev_stats_get invalid Param failed");
  
  	/* Test expected values */

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

* [dpdk-stable] patch 'crypto/armv8: fix mempool object returning' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (145 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/crypto: fix stats test' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'cryptodev: fix parameter parsing' " luca.boccassi
                   ` (59 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 8c04c7829c6fe7e8acdc2b4ff9a7db7b89fa8f0a Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Mon, 31 Aug 2020 16:51:44 +0800
Subject: [PATCH] crypto/armv8: fix mempool object returning

[ upstream commit 76a4ed5b3bc91c5296e3d6780243d237f3ed8506 ]

Crypto session and device session private data were put back
to wrong pools.
This caused data corruption when the object was reallocated and used.
Because objects from different mempools have different element size,
and wrong mempool info caused out of bound write.
Fix the issue by putting back objects to correct mempools.

Fixes: b3bbd9e5f265 ("cryptodev: support device independent sessions")
Fixes: 725d2a7fbf71 ("cryptodev: change queue pair configure structure")

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/armv8/rte_armv8_pmd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index bc897ac713..3c5af17e68 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -666,8 +666,8 @@ process_op(struct armv8_crypto_qp *qp, struct rte_crypto_op *op,
 		memset(op->sym->session, 0,
 			rte_cryptodev_sym_get_existing_header_session_size(
 				op->sym->session));
-		rte_mempool_put(qp->sess_mp, sess);
-		rte_mempool_put(qp->sess_mp_priv, op->sym->session);
+		rte_mempool_put(qp->sess_mp_priv, sess);
+		rte_mempool_put(qp->sess_mp, op->sym->session);
 		op->sym->session = NULL;
 	}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.339063633 +0000
+++ 0148-crypto-armv8-fix-mempool-object-returning.patch	2020-10-28 10:35:11.740833497 +0000
@@ -1,8 +1,10 @@
-From 76a4ed5b3bc91c5296e3d6780243d237f3ed8506 Mon Sep 17 00:00:00 2001
+From 8c04c7829c6fe7e8acdc2b4ff9a7db7b89fa8f0a Mon Sep 17 00:00:00 2001
 From: Ruifeng Wang <ruifeng.wang@arm.com>
 Date: Mon, 31 Aug 2020 16:51:44 +0800
 Subject: [PATCH] crypto/armv8: fix mempool object returning
 
+[ upstream commit 76a4ed5b3bc91c5296e3d6780243d237f3ed8506 ]
+
 Crypto session and device session private data were put back
 to wrong pools.
 This caused data corruption when the object was reallocated and used.
@@ -12,7 +14,6 @@
 
 Fixes: b3bbd9e5f265 ("cryptodev: support device independent sessions")
 Fixes: 725d2a7fbf71 ("cryptodev: change queue pair configure structure")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
 Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
@@ -21,10 +22,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
-index c95729db50..72d29ae0cb 100644
+index bc897ac713..3c5af17e68 100644
 --- a/drivers/crypto/armv8/rte_armv8_pmd.c
 +++ b/drivers/crypto/armv8/rte_armv8_pmd.c
-@@ -674,8 +674,8 @@ process_op(struct armv8_crypto_qp *qp, struct rte_crypto_op *op,
+@@ -666,8 +666,8 @@ process_op(struct armv8_crypto_qp *qp, struct rte_crypto_op *op,
  		memset(op->sym->session, 0,
  			rte_cryptodev_sym_get_existing_header_session_size(
  				op->sym->session));

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

* [dpdk-stable] patch 'cryptodev: fix parameter parsing' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (146 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'crypto/armv8: fix mempool object returning' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'examples/fips_validation: fix buffer overflow' " luca.boccassi
                   ` (58 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Haggai Eran; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 1d8fa909f9b5ea6eba8da1dcba3de63e39b2c6c5 Mon Sep 17 00:00:00 2001
From: Haggai Eran <haggaie@nvidia.com>
Date: Thu, 8 Oct 2020 22:42:14 +0300
Subject: [PATCH] cryptodev: fix parameter parsing

[ upstream commit 784fb396f72d98070f3afaf309a7addb4c0d8da1 ]

The rte_cryptodev_pmd_parse_input_args function crashes with a
segmentation fault when passing a non-empty argument string.

The function passes cryptodev_pmd_valid_params to rte_kvargs_parse,
which accepts a NULL-terminated list of valid keys, yet
cryptodev_pmd_valid_params does not end with NULL. The patch adds the
missing NULL pointer.

Fixes: 9e6edea41805 ("cryptodev: add APIs to assist PMD initialisation")

Signed-off-by: Haggai Eran <haggaie@nvidia.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 lib/librte_cryptodev/rte_cryptodev_pmd.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index fba14f2fa0..c4935b3307 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -41,7 +41,8 @@ extern "C" {
 static const char * const cryptodev_pmd_valid_params[] = {
 	RTE_CRYPTODEV_PMD_NAME_ARG,
 	RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
-	RTE_CRYPTODEV_PMD_SOCKET_ID_ARG
+	RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
+	NULL
 };
 
 /**
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.368510271 +0000
+++ 0149-cryptodev-fix-parameter-parsing.patch	2020-10-28 10:35:11.740833497 +0000
@@ -1,8 +1,10 @@
-From 784fb396f72d98070f3afaf309a7addb4c0d8da1 Mon Sep 17 00:00:00 2001
+From 1d8fa909f9b5ea6eba8da1dcba3de63e39b2c6c5 Mon Sep 17 00:00:00 2001
 From: Haggai Eran <haggaie@nvidia.com>
 Date: Thu, 8 Oct 2020 22:42:14 +0300
 Subject: [PATCH] cryptodev: fix parameter parsing
 
+[ upstream commit 784fb396f72d98070f3afaf309a7addb4c0d8da1 ]
+
 The rte_cryptodev_pmd_parse_input_args function crashes with a
 segmentation fault when passing a non-empty argument string.
 
@@ -12,7 +14,6 @@
 missing NULL pointer.
 
 Fixes: 9e6edea41805 ("cryptodev: add APIs to assist PMD initialisation")
-Cc: stable@dpdk.org
 
 Signed-off-by: Haggai Eran <haggaie@nvidia.com>
 Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
@@ -21,7 +22,7 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
-index 81975d72b4..1367222f73 100644
+index fba14f2fa0..c4935b3307 100644
 --- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
 +++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
 @@ -41,7 +41,8 @@ extern "C" {

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

* [dpdk-stable] patch 'examples/fips_validation: fix buffer overflow' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (147 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'cryptodev: fix parameter parsing' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'examples/fips_validation: fix version compatibility' " luca.boccassi
                   ` (57 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From ee56b4aeff67262f14409fc587eb5bdd346f3d43 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Tue, 6 Oct 2020 09:41:41 +0200
Subject: [PATCH] examples/fips_validation: fix buffer overflow

[ upstream commit 9275af3bd9faa0337b418736bb622704d158fbac ]

If the file name is larger than MAX_STRING_SIZE (64), strcpy()
will overwrite the content of memory.

Replace strcpy() by rte_strscpy(), check its return value, and
increase file_name size to 256.

Fixes: 3d0fad56b74a ("examples/fips_validation: add crypto FIPS application")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 examples/fips_validation/fips_validation.c | 12 ++++++++++--
 examples/fips_validation/fips_validation.h |  3 ++-
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c
index 303f03495b..778c734fb2 100644
--- a/examples/fips_validation/fips_validation.c
+++ b/examples/fips_validation/fips_validation.c
@@ -275,7 +275,11 @@ fips_test_init(const char *req_file_path, const char *rsp_file_path,
 
 	fips_test_clear();
 
-	strcpy(info.file_name, req_file_path);
+	if (rte_strscpy(info.file_name, req_file_path,
+				sizeof(info.file_name)) < 0) {
+		RTE_LOG(ERR, USER1, "Path %s too long\n", req_file_path);
+		return -EINVAL;
+	}
 	info.algo = FIPS_TEST_ALGO_MAX;
 	if (parse_file_type(req_file_path) < 0) {
 		RTE_LOG(ERR, USER1, "File %s type not supported\n",
@@ -301,7 +305,11 @@ fips_test_init(const char *req_file_path, const char *rsp_file_path,
 		return -ENOMEM;
 	}
 
-	strlcpy(info.device_name, device_name, sizeof(info.device_name));
+	if (rte_strscpy(info.device_name, device_name,
+				sizeof(info.device_name)) < 0) {
+		RTE_LOG(ERR, USER1, "Device name %s too long\n", device_name);
+		return -EINVAL;
+	}
 
 	if (fips_test_parse_header() < 0) {
 		RTE_LOG(ERR, USER1, "Failed parsing header\n");
diff --git a/examples/fips_validation/fips_validation.h b/examples/fips_validation/fips_validation.h
index d517365291..fb0194d57b 100644
--- a/examples/fips_validation/fips_validation.h
+++ b/examples/fips_validation/fips_validation.h
@@ -14,6 +14,7 @@
 #define MAX_NB_TESTS		10240
 #define MAX_BUF_SIZE		2048
 #define MAX_STRING_SIZE		64
+#define MAX_FILE_NAME_SIZE	256
 #define MAX_DIGEST_SIZE		64
 
 #define POSITIVE_TEST		0
@@ -163,7 +164,7 @@ struct fips_test_interim_info {
 	uint32_t vec_start_off;
 	uint32_t nb_vec_lines;
 	char device_name[MAX_STRING_SIZE];
-	char file_name[MAX_STRING_SIZE];
+	char file_name[MAX_FILE_NAME_SIZE];
 
 	union {
 		struct aesavs_interim_data aes_data;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.396894405 +0000
+++ 0150-examples-fips_validation-fix-buffer-overflow.patch	2020-10-28 10:35:11.740833497 +0000
@@ -1,8 +1,10 @@
-From 9275af3bd9faa0337b418736bb622704d158fbac Mon Sep 17 00:00:00 2001
+From ee56b4aeff67262f14409fc587eb5bdd346f3d43 Mon Sep 17 00:00:00 2001
 From: Olivier Matz <olivier.matz@6wind.com>
 Date: Tue, 6 Oct 2020 09:41:41 +0200
 Subject: [PATCH] examples/fips_validation: fix buffer overflow
 
+[ upstream commit 9275af3bd9faa0337b418736bb622704d158fbac ]
+
 If the file name is larger than MAX_STRING_SIZE (64), strcpy()
 will overwrite the content of memory.
 
@@ -10,7 +12,6 @@
 increase file_name size to 256.
 
 Fixes: 3d0fad56b74a ("examples/fips_validation: add crypto FIPS application")
-Cc: stable@dpdk.org
 
 Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
 Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
@@ -20,10 +21,10 @@
  2 files changed, 12 insertions(+), 3 deletions(-)
 
 diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c
-index 9bdf257b8b..13f763c9aa 100644
+index 303f03495b..778c734fb2 100644
 --- a/examples/fips_validation/fips_validation.c
 +++ b/examples/fips_validation/fips_validation.c
-@@ -281,7 +281,11 @@ fips_test_init(const char *req_file_path, const char *rsp_file_path,
+@@ -275,7 +275,11 @@ fips_test_init(const char *req_file_path, const char *rsp_file_path,
  
  	fips_test_clear();
  
@@ -36,7 +37,7 @@
  	info.algo = FIPS_TEST_ALGO_MAX;
  	if (parse_file_type(req_file_path) < 0) {
  		RTE_LOG(ERR, USER1, "File %s type not supported\n",
-@@ -307,7 +311,11 @@ fips_test_init(const char *req_file_path, const char *rsp_file_path,
+@@ -301,7 +305,11 @@ fips_test_init(const char *req_file_path, const char *rsp_file_path,
  		return -ENOMEM;
  	}
  
@@ -50,7 +51,7 @@
  	if (fips_test_parse_header() < 0) {
  		RTE_LOG(ERR, USER1, "Failed parsing header\n");
 diff --git a/examples/fips_validation/fips_validation.h b/examples/fips_validation/fips_validation.h
-index 75fa555fa6..deba83eada 100644
+index d517365291..fb0194d57b 100644
 --- a/examples/fips_validation/fips_validation.h
 +++ b/examples/fips_validation/fips_validation.h
 @@ -14,6 +14,7 @@
@@ -61,7 +62,7 @@
  #define MAX_DIGEST_SIZE		64
  
  #define POSITIVE_TEST		0
-@@ -164,7 +165,7 @@ struct fips_test_interim_info {
+@@ -163,7 +164,7 @@ struct fips_test_interim_info {
  	uint32_t vec_start_off;
  	uint32_t nb_vec_lines;
  	char device_name[MAX_STRING_SIZE];

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

* [dpdk-stable] patch 'examples/fips_validation: fix version compatibility' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (148 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'examples/fips_validation: fix buffer overflow' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix stats query without queue pair' " luca.boccassi
                   ` (56 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Archana Muniganti; +Cc: Fan Zhang, Yu Jiang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 1184955296710562d30501b5457a1e24a7b7a04f Mon Sep 17 00:00:00 2001
From: Archana Muniganti <marchana@marvell.com>
Date: Wed, 9 Sep 2020 21:56:35 +0530
Subject: [PATCH] examples/fips_validation: fix version compatibility

[ upstream commit 79365018409917a1bf3222cb3352d7c06a878e87 ]

Separate out CAVS request file version 21.4 code to support
lower versions.

Fixes: 32440cdf2af9 ("examples/fips_validation: fix parsing of TDES vectors")
Fixes: 2b84d2bd47df ("examples/fips_validation: fix count overwrite for TDES")

Signed-off-by: Archana Muniganti <marchana@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Tested-by: Yu Jiang <yux.jiang@intel.com>
---
 examples/fips_validation/fips_validation.c | 40 ++++++++++++++++------
 examples/fips_validation/fips_validation.h |  1 +
 examples/fips_validation/main.c            |  6 ++--
 3 files changed, 35 insertions(+), 12 deletions(-)

diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c
index 778c734fb2..910f012e36 100644
--- a/examples/fips_validation/fips_validation.c
+++ b/examples/fips_validation/fips_validation.c
@@ -92,6 +92,15 @@ error_exit:
 	return -ENOMEM;
 }
 
+static void
+fips_test_parse_version(void)
+{
+	int len = strlen(info.vec[0]);
+	char *ptr = info.vec[0];
+
+	info.version = strtof(ptr + len - 4, NULL);
+}
+
 static int
 fips_test_parse_header(void)
 {
@@ -106,7 +115,10 @@ fips_test_parse_header(void)
 	if (ret < 0)
 		return ret;
 
-	for (i = 0; i < info.nb_vec_lines; i++) {
+	if (info.nb_vec_lines)
+		fips_test_parse_version();
+
+	for (i = 1; i < info.nb_vec_lines; i++) {
 		if (!algo_parsed) {
 			if (strstr(info.vec[i], "AESVS")) {
 				algo_parsed = 1;
@@ -346,6 +358,8 @@ fips_test_parse_one_case(void)
 	uint32_t interim_cnt = 0;
 	int ret;
 
+	info.vec_start_off = 0;
+
 	if (info.interim_callbacks) {
 		for (i = 0; i < info.nb_vec_lines; i++) {
 			is_interim = 0;
@@ -367,17 +381,24 @@ fips_test_parse_one_case(void)
 		}
 	}
 
-	info.vec_start_off = interim_cnt;
-
 	if (interim_cnt) {
-		for (i = 0; i < interim_cnt; i++)
-			fprintf(info.fp_wr, "%s\n", info.vec[i]);
-		fprintf(info.fp_wr, "\n");
+		if (info.version == 21.4f) {
+			for (i = 0; i < interim_cnt; i++)
+				fprintf(info.fp_wr, "%s\n", info.vec[i]);
+			fprintf(info.fp_wr, "\n");
 
-		if (info.nb_vec_lines == interim_cnt)
+			if (info.nb_vec_lines == interim_cnt)
+				return 1;
+		} else {
+			for (i = 0; i < info.nb_vec_lines; i++)
+				fprintf(info.fp_wr, "%s\n", info.vec[i]);
+			fprintf(info.fp_wr, "\n");
 			return 1;
+		}
 	}
 
+	info.vec_start_off = interim_cnt;
+
 	for (i = info.vec_start_off; i < info.nb_vec_lines; i++) {
 		for (j = 0; info.callbacks[j].key != NULL; j++)
 			if (strstr(info.vec[i], info.callbacks[j].key)) {
@@ -642,7 +663,7 @@ update_info_vec(uint32_t count)
 
 	cb = &info.writeback_callbacks[0];
 
-	if (!(strstr(info.vec[0], cb->key))) {
+	if ((info.version == 21.4f) && (!(strstr(info.vec[0], cb->key)))) {
 		fprintf(info.fp_wr, "%s%u\n", cb->key, count);
 		i = 0;
 	} else {
@@ -650,9 +671,8 @@ update_info_vec(uint32_t count)
 				count);
 		i = 1;
 	}
-	snprintf(info.vec[0], strlen(info.vec[0]) + 4, "%s%u", cb->key, count);
 
-	for (i = 1; i < info.nb_vec_lines; i++) {
+	for (; i < info.nb_vec_lines; i++) {
 		for (j = 1; info.writeback_callbacks[j].key != NULL; j++) {
 			cb = &info.writeback_callbacks[j];
 			if (strstr(info.vec[i], cb->key)) {
diff --git a/examples/fips_validation/fips_validation.h b/examples/fips_validation/fips_validation.h
index fb0194d57b..295624b1b5 100644
--- a/examples/fips_validation/fips_validation.h
+++ b/examples/fips_validation/fips_validation.h
@@ -165,6 +165,7 @@ struct fips_test_interim_info {
 	uint32_t nb_vec_lines;
 	char device_name[MAX_STRING_SIZE];
 	char file_name[MAX_FILE_NAME_SIZE];
+	float version;
 
 	union {
 		struct aesavs_interim_data aes_data;
diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index 693ad9b483..eadfdb4bac 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -1030,10 +1030,12 @@ fips_mct_tdes_test(void)
 	int test_mode = info.interim_info.tdes_data.test_mode;
 
 	for (i = 0; i < TDES_EXTERN_ITER; i++) {
-		if (i == 0) {
+		if ((i == 0) && (info.version == 21.4f)) {
 			if (!(strstr(info.vec[0], "COUNT")))
 				fprintf(info.fp_wr, "%s%u\n", "COUNT = ", 0);
-		} else
+		}
+
+		if (i != 0)
 			update_info_vec(i);
 
 		fips_test_write_one_case();
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.426311087 +0000
+++ 0151-examples-fips_validation-fix-version-compatibility.patch	2020-10-28 10:35:11.744833557 +0000
@@ -1,14 +1,15 @@
-From 79365018409917a1bf3222cb3352d7c06a878e87 Mon Sep 17 00:00:00 2001
+From 1184955296710562d30501b5457a1e24a7b7a04f Mon Sep 17 00:00:00 2001
 From: Archana Muniganti <marchana@marvell.com>
 Date: Wed, 9 Sep 2020 21:56:35 +0530
 Subject: [PATCH] examples/fips_validation: fix version compatibility
 
+[ upstream commit 79365018409917a1bf3222cb3352d7c06a878e87 ]
+
 Separate out CAVS request file version 21.4 code to support
 lower versions.
 
 Fixes: 32440cdf2af9 ("examples/fips_validation: fix parsing of TDES vectors")
 Fixes: 2b84d2bd47df ("examples/fips_validation: fix count overwrite for TDES")
-Cc: stable@dpdk.org
 
 Signed-off-by: Archana Muniganti <marchana@marvell.com>
 Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
@@ -20,7 +21,7 @@
  3 files changed, 35 insertions(+), 12 deletions(-)
 
 diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c
-index 13f763c9aa..7454a03b16 100644
+index 778c734fb2..910f012e36 100644
 --- a/examples/fips_validation/fips_validation.c
 +++ b/examples/fips_validation/fips_validation.c
 @@ -92,6 +92,15 @@ error_exit:
@@ -51,7 +52,7 @@
  		if (!algo_parsed) {
  			if (strstr(info.vec[i], "AESVS")) {
  				algo_parsed = 1;
-@@ -352,6 +364,8 @@ fips_test_parse_one_case(void)
+@@ -346,6 +358,8 @@ fips_test_parse_one_case(void)
  	uint32_t interim_cnt = 0;
  	int ret;
  
@@ -60,7 +61,7 @@
  	if (info.interim_callbacks) {
  		for (i = 0; i < info.nb_vec_lines; i++) {
  			is_interim = 0;
-@@ -373,17 +387,24 @@ fips_test_parse_one_case(void)
+@@ -367,17 +381,24 @@ fips_test_parse_one_case(void)
  		}
  	}
  
@@ -91,7 +92,7 @@
  	for (i = info.vec_start_off; i < info.nb_vec_lines; i++) {
  		for (j = 0; info.callbacks[j].key != NULL; j++)
  			if (strstr(info.vec[i], info.callbacks[j].key)) {
-@@ -648,7 +669,7 @@ update_info_vec(uint32_t count)
+@@ -642,7 +663,7 @@ update_info_vec(uint32_t count)
  
  	cb = &info.writeback_callbacks[0];
  
@@ -100,7 +101,7 @@
  		fprintf(info.fp_wr, "%s%u\n", cb->key, count);
  		i = 0;
  	} else {
-@@ -656,9 +677,8 @@ update_info_vec(uint32_t count)
+@@ -650,9 +671,8 @@ update_info_vec(uint32_t count)
  				count);
  		i = 1;
  	}
@@ -112,10 +113,10 @@
  			cb = &info.writeback_callbacks[j];
  			if (strstr(info.vec[i], cb->key)) {
 diff --git a/examples/fips_validation/fips_validation.h b/examples/fips_validation/fips_validation.h
-index deba83eada..ca8964aaa1 100644
+index fb0194d57b..295624b1b5 100644
 --- a/examples/fips_validation/fips_validation.h
 +++ b/examples/fips_validation/fips_validation.h
-@@ -166,6 +166,7 @@ struct fips_test_interim_info {
+@@ -165,6 +165,7 @@ struct fips_test_interim_info {
  	uint32_t nb_vec_lines;
  	char device_name[MAX_STRING_SIZE];
  	char file_name[MAX_FILE_NAME_SIZE];
@@ -124,10 +125,10 @@
  	union {
  		struct aesavs_interim_data aes_data;
 diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
-index 9e46307bb2..2a7a3fb5e0 100644
+index 693ad9b483..eadfdb4bac 100644
 --- a/examples/fips_validation/main.c
 +++ b/examples/fips_validation/main.c
-@@ -1088,10 +1088,12 @@ fips_mct_tdes_test(void)
+@@ -1030,10 +1030,12 @@ fips_mct_tdes_test(void)
  	int test_mode = info.interim_info.tdes_data.test_mode;
  
  	for (i = 0; i < TDES_EXTERN_ITER; i++) {

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

* [dpdk-stable] patch 'crypto/dpaa2_sec: fix stats query without queue pair' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (149 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'examples/fips_validation: fix version compatibility' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'crypto/aesni_mb: fix CCM digest size check' " luca.boccassi
                   ` (55 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 459f36b9a03db55d3b56b8857b030ae80d6a626f Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Thu, 3 Sep 2020 22:47:44 +0530
Subject: [PATCH] crypto/dpaa2_sec: fix stats query without queue pair

[ upstream commit 356bcac8f11ef916f47be74b295c36755d8165cf ]

dpdk-procinfo calls the crypto stats API, which results segmentation
fault on DPAA2_SEC.
The queue pair array will be NULL, when it is used without
configuring the SEC device.

Fixes: 02f35eee264b ("crypto/dpaa2_sec: support statistics")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 0cc98b3c2b..60e9bf702b 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -3492,7 +3492,7 @@ void dpaa2_sec_stats_get(struct rte_cryptodev *dev,
 		return;
 	}
 	for (i = 0; i < dev->data->nb_queue_pairs; i++) {
-		if (qp[i] == NULL) {
+		if (qp == NULL || qp[i] == NULL) {
 			DPAA2_SEC_DEBUG("Uninitialised queue pair");
 			continue;
 		}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.456856146 +0000
+++ 0152-crypto-dpaa2_sec-fix-stats-query-without-queue-pair.patch	2020-10-28 10:35:11.748833616 +0000
@@ -1,15 +1,16 @@
-From 356bcac8f11ef916f47be74b295c36755d8165cf Mon Sep 17 00:00:00 2001
+From 459f36b9a03db55d3b56b8857b030ae80d6a626f Mon Sep 17 00:00:00 2001
 From: Hemant Agrawal <hemant.agrawal@nxp.com>
 Date: Thu, 3 Sep 2020 22:47:44 +0530
 Subject: [PATCH] crypto/dpaa2_sec: fix stats query without queue pair
 
+[ upstream commit 356bcac8f11ef916f47be74b295c36755d8165cf ]
+
 dpdk-procinfo calls the crypto stats API, which results segmentation
 fault on DPAA2_SEC.
 The queue pair array will be NULL, when it is used without
 configuring the SEC device.
 
 Fixes: 02f35eee264b ("crypto/dpaa2_sec: support statistics")
-Cc: stable@dpdk.org
 
 Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
 Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
@@ -18,10 +19,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
-index 109e61ae16..f480aafd01 100644
+index 0cc98b3c2b..60e9bf702b 100644
 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
 +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
-@@ -3501,7 +3501,7 @@ void dpaa2_sec_stats_get(struct rte_cryptodev *dev,
+@@ -3492,7 +3492,7 @@ void dpaa2_sec_stats_get(struct rte_cryptodev *dev,
  		return;
  	}
  	for (i = 0; i < dev->data->nb_queue_pairs; i++) {

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

* [dpdk-stable] patch 'crypto/aesni_mb: fix CCM digest size check' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (150 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix stats query without queue pair' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'crypto/aesni_mb: fix GCM " luca.boccassi
                   ` (54 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 33e87f16a377adee2907103cef178f6eb5674911 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Fri, 9 Oct 2020 12:05:19 +0000
Subject: [PATCH] crypto/aesni_mb: fix CCM digest size check

[ upstream commit 07bfb9047ba12f169e09606be72e821facbf88c2 ]

Digest size for CCM was being checked for other algorithms
apart from CCM.

Fixes: c4c0c312a823 ("crypto/aesni_mb: check for invalid digest size")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 29 +++++++++++-----------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 40feae3c62..8850934f1f 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -537,6 +537,14 @@ aesni_mb_set_session_aead_parameters(const MB_MGR *mb_mgr,
 		return -EINVAL;
 	}
 
+	/* Set IV parameters */
+	sess->iv.offset = xform->aead.iv.offset;
+	sess->iv.length = xform->aead.iv.length;
+
+	/* Set digest sizes */
+	sess->auth.req_digest_len = xform->aead.digest_length;
+	sess->auth.gen_digest_len = sess->auth.req_digest_len;
+
 	switch (xform->aead.algo) {
 	case RTE_CRYPTO_AEAD_AES_CCM:
 		sess->cipher.mode = CCM;
@@ -555,6 +563,13 @@ aesni_mb_set_session_aead_parameters(const MB_MGR *mb_mgr,
 			return -EINVAL;
 		}
 
+		/* CCM digests must be between 4 and 16 and an even number */
+		if (sess->auth.req_digest_len < AES_CCM_DIGEST_MIN_LEN ||
+				sess->auth.req_digest_len > AES_CCM_DIGEST_MAX_LEN ||
+				(sess->auth.req_digest_len & 1) == 1) {
+			AESNI_MB_LOG(ERR, "Invalid digest size\n");
+			return -EINVAL;
+		}
 		break;
 
 	case RTE_CRYPTO_AEAD_AES_GCM:
@@ -589,20 +604,6 @@ aesni_mb_set_session_aead_parameters(const MB_MGR *mb_mgr,
 		return -ENOTSUP;
 	}
 
-	/* Set IV parameters */
-	sess->iv.offset = xform->aead.iv.offset;
-	sess->iv.length = xform->aead.iv.length;
-
-	sess->auth.req_digest_len = xform->aead.digest_length;
-	/* CCM digests must be between 4 and 16 and an even number */
-	if (sess->auth.req_digest_len < AES_CCM_DIGEST_MIN_LEN ||
-			sess->auth.req_digest_len > AES_CCM_DIGEST_MAX_LEN ||
-			(sess->auth.req_digest_len & 1) == 1) {
-		AESNI_MB_LOG(ERR, "Invalid digest size\n");
-		return -EINVAL;
-	}
-	sess->auth.gen_digest_len = sess->auth.req_digest_len;
-
 	return 0;
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.488872615 +0000
+++ 0153-crypto-aesni_mb-fix-CCM-digest-size-check.patch	2020-10-28 10:35:11.748833616 +0000
@@ -1,13 +1,14 @@
-From 07bfb9047ba12f169e09606be72e821facbf88c2 Mon Sep 17 00:00:00 2001
+From 33e87f16a377adee2907103cef178f6eb5674911 Mon Sep 17 00:00:00 2001
 From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
 Date: Fri, 9 Oct 2020 12:05:19 +0000
 Subject: [PATCH] crypto/aesni_mb: fix CCM digest size check
 
+[ upstream commit 07bfb9047ba12f169e09606be72e821facbf88c2 ]
+
 Digest size for CCM was being checked for other algorithms
 apart from CCM.
 
 Fixes: c4c0c312a823 ("crypto/aesni_mb: check for invalid digest size")
-Cc: stable@dpdk.org
 
 Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
 ---
@@ -15,10 +16,10 @@
  1 file changed, 15 insertions(+), 14 deletions(-)
 
 diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
-index 34a39ca992..ba2882d276 100644
+index 40feae3c62..8850934f1f 100644
 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
 +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
-@@ -661,6 +661,14 @@ aesni_mb_set_session_aead_parameters(const MB_MGR *mb_mgr,
+@@ -537,6 +537,14 @@ aesni_mb_set_session_aead_parameters(const MB_MGR *mb_mgr,
  		return -EINVAL;
  	}
  
@@ -33,7 +34,7 @@
  	switch (xform->aead.algo) {
  	case RTE_CRYPTO_AEAD_AES_CCM:
  		sess->cipher.mode = CCM;
-@@ -679,6 +687,13 @@ aesni_mb_set_session_aead_parameters(const MB_MGR *mb_mgr,
+@@ -555,6 +563,13 @@ aesni_mb_set_session_aead_parameters(const MB_MGR *mb_mgr,
  			return -EINVAL;
  		}
  
@@ -47,7 +48,7 @@
  		break;
  
  	case RTE_CRYPTO_AEAD_AES_GCM:
-@@ -713,20 +728,6 @@ aesni_mb_set_session_aead_parameters(const MB_MGR *mb_mgr,
+@@ -589,20 +604,6 @@ aesni_mb_set_session_aead_parameters(const MB_MGR *mb_mgr,
  		return -ENOTSUP;
  	}
  

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

* [dpdk-stable] patch 'crypto/aesni_mb: fix GCM digest size check' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (151 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'crypto/aesni_mb: fix CCM digest size check' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/event_crypto_adapter: fix configuration' " luca.boccassi
                   ` (53 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From a281d0d527cbe4c3ca81f4ce099756d98171a281 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Fri, 9 Oct 2020 12:05:20 +0000
Subject: [PATCH] crypto/aesni_mb: fix GCM digest size check

[ upstream commit e45847d8fd0cd9c46ea13a6b5b87087cfb8ae393 ]

GCM digest sizes should be between 1 and 16 bytes.

Fixes: 7b2d4706c90e ("crypto/aesni_mb: support newer library version only")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 .../crypto/aesni_mb/aesni_mb_pmd_private.h    |  4 ++--
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    | 22 +++++++++----------
 .../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c    |  8 +++----
 3 files changed, 16 insertions(+), 18 deletions(-)

diff --git a/drivers/crypto/aesni_mb/aesni_mb_pmd_private.h b/drivers/crypto/aesni_mb/aesni_mb_pmd_private.h
index b3cb2f1cf9..03da3dc999 100644
--- a/drivers/crypto/aesni_mb/aesni_mb_pmd_private.h
+++ b/drivers/crypto/aesni_mb/aesni_mb_pmd_private.h
@@ -74,7 +74,7 @@ static const unsigned auth_truncated_digest_byte_lengths[] = {
 		[AES_CMAC]	= 12,
 		[AES_CCM]	= 8,
 		[NULL_HASH]	= 0,
-		[AES_GMAC]	= 16,
+		[AES_GMAC]	= 12,
 		[PLAIN_SHA1]	= 20,
 		[PLAIN_SHA_224]	= 28,
 		[PLAIN_SHA_256]	= 32,
@@ -105,7 +105,7 @@ static const unsigned auth_digest_byte_lengths[] = {
 		[AES_XCBC]	= 16,
 		[AES_CMAC]	= 16,
 		[AES_CCM]	= 16,
-		[AES_GMAC]	= 12,
+		[AES_GMAC]	= 16,
 		[NULL_HASH]	= 0,
 		[PLAIN_SHA1]	= 20,
 		[PLAIN_SHA_224]	= 28,
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 8850934f1f..d2fa0664e3 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -203,19 +203,11 @@ aesni_mb_set_session_auth_parameters(const MB_MGR *mb_mgr,
 			sess->cipher.direction = DECRYPT;
 
 		sess->auth.algo = AES_GMAC;
-		/*
-		 * Multi-buffer lib supports 8, 12 and 16 bytes of digest.
-		 * If size requested is different, generate the full digest
-		 * (16 bytes) in a temporary location and then memcpy
-		 * the requested number of bytes.
-		 */
-		if (sess->auth.req_digest_len != 16 &&
-				sess->auth.req_digest_len != 12 &&
-				sess->auth.req_digest_len != 8) {
-			sess->auth.gen_digest_len = 16;
-		} else {
-			sess->auth.gen_digest_len = sess->auth.req_digest_len;
+		if (sess->auth.req_digest_len > get_digest_byte_length(AES_GMAC)) {
+			AESNI_MB_LOG(ERR, "Invalid digest size\n");
+			return -EINVAL;
 		}
+		sess->auth.gen_digest_len = sess->auth.req_digest_len;
 		sess->iv.length = xform->auth.iv.length;
 		sess->iv.offset = xform->auth.iv.offset;
 
@@ -597,6 +589,12 @@ aesni_mb_set_session_aead_parameters(const MB_MGR *mb_mgr,
 			return -EINVAL;
 		}
 
+		/* GCM digest size must be between 1 and 16 */
+		if (sess->auth.req_digest_len == 0 ||
+				sess->auth.req_digest_len > 16) {
+			AESNI_MB_LOG(ERR, "Invalid digest size\n");
+			return -EINVAL;
+		}
 		break;
 
 	default:
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
index d8609ad114..da614768b4 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
@@ -449,9 +449,9 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
 					.increment = 8
 				},
 				.digest_size = {
-					.min = 8,
+					.min = 1,
 					.max = 16,
-					.increment = 4
+					.increment = 1
 				},
 				.aad_size = {
 					.min = 0,
@@ -479,9 +479,9 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
 					.increment = 8
 				},
 				.digest_size = {
-					.min = 8,
+					.min = 1,
 					.max = 16,
-					.increment = 4
+					.increment = 1
 				},
 				.iv_size = {
 					.min = 12,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.519016455 +0000
+++ 0154-crypto-aesni_mb-fix-GCM-digest-size-check.patch	2020-10-28 10:35:11.752833674 +0000
@@ -1,12 +1,13 @@
-From e45847d8fd0cd9c46ea13a6b5b87087cfb8ae393 Mon Sep 17 00:00:00 2001
+From a281d0d527cbe4c3ca81f4ce099756d98171a281 Mon Sep 17 00:00:00 2001
 From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
 Date: Fri, 9 Oct 2020 12:05:20 +0000
 Subject: [PATCH] crypto/aesni_mb: fix GCM digest size check
 
+[ upstream commit e45847d8fd0cd9c46ea13a6b5b87087cfb8ae393 ]
+
 GCM digest sizes should be between 1 and 16 bytes.
 
 Fixes: 7b2d4706c90e ("crypto/aesni_mb: support newer library version only")
-Cc: stable@dpdk.org
 
 Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
 ---
@@ -16,32 +17,32 @@
  3 files changed, 16 insertions(+), 18 deletions(-)
 
 diff --git a/drivers/crypto/aesni_mb/aesni_mb_pmd_private.h b/drivers/crypto/aesni_mb/aesni_mb_pmd_private.h
-index 9693bf9854..7481e1d5e9 100644
+index b3cb2f1cf9..03da3dc999 100644
 --- a/drivers/crypto/aesni_mb/aesni_mb_pmd_private.h
 +++ b/drivers/crypto/aesni_mb/aesni_mb_pmd_private.h
-@@ -85,7 +85,7 @@ static const unsigned auth_truncated_digest_byte_lengths[] = {
- 		[AES_CMAC]			= 12,
- 		[AES_CCM]			= 8,
- 		[NULL_HASH]			= 0,
--		[AES_GMAC]			= 16,
-+		[AES_GMAC]			= 12,
- 		[PLAIN_SHA1]			= 20,
- 		[PLAIN_SHA_224]			= 28,
- 		[PLAIN_SHA_256]			= 32,
-@@ -121,7 +121,7 @@ static const unsigned auth_digest_byte_lengths[] = {
- 		[AES_XCBC]			= 16,
- 		[AES_CMAC]			= 16,
- 		[AES_CCM]			= 16,
--		[AES_GMAC]			= 12,
-+		[AES_GMAC]			= 16,
- 		[NULL_HASH]			= 0,
- 		[PLAIN_SHA1]			= 20,
- 		[PLAIN_SHA_224]			= 28,
+@@ -74,7 +74,7 @@ static const unsigned auth_truncated_digest_byte_lengths[] = {
+ 		[AES_CMAC]	= 12,
+ 		[AES_CCM]	= 8,
+ 		[NULL_HASH]	= 0,
+-		[AES_GMAC]	= 16,
++		[AES_GMAC]	= 12,
+ 		[PLAIN_SHA1]	= 20,
+ 		[PLAIN_SHA_224]	= 28,
+ 		[PLAIN_SHA_256]	= 32,
+@@ -105,7 +105,7 @@ static const unsigned auth_digest_byte_lengths[] = {
+ 		[AES_XCBC]	= 16,
+ 		[AES_CMAC]	= 16,
+ 		[AES_CCM]	= 16,
+-		[AES_GMAC]	= 12,
++		[AES_GMAC]	= 16,
+ 		[NULL_HASH]	= 0,
+ 		[PLAIN_SHA1]	= 20,
+ 		[PLAIN_SHA_224]	= 28,
 diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
-index ba2882d276..7dbe40e025 100644
+index 8850934f1f..d2fa0664e3 100644
 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
 +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
-@@ -213,19 +213,11 @@ aesni_mb_set_session_auth_parameters(const MB_MGR *mb_mgr,
+@@ -203,19 +203,11 @@ aesni_mb_set_session_auth_parameters(const MB_MGR *mb_mgr,
  			sess->cipher.direction = DECRYPT;
  
  		sess->auth.algo = AES_GMAC;
@@ -65,7 +66,7 @@
  		sess->iv.length = xform->auth.iv.length;
  		sess->iv.offset = xform->auth.iv.offset;
  
-@@ -721,6 +713,12 @@ aesni_mb_set_session_aead_parameters(const MB_MGR *mb_mgr,
+@@ -597,6 +589,12 @@ aesni_mb_set_session_aead_parameters(const MB_MGR *mb_mgr,
  			return -EINVAL;
  		}
  
@@ -79,10 +80,10 @@
  
  	default:
 diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
-index e54205f1b8..46b8517a9f 100644
+index d8609ad114..da614768b4 100644
 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
 +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c
-@@ -455,9 +455,9 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
+@@ -449,9 +449,9 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
  					.increment = 8
  				},
  				.digest_size = {
@@ -94,7 +95,7 @@
  				},
  				.aad_size = {
  					.min = 0,
-@@ -485,9 +485,9 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
+@@ -479,9 +479,9 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {
  					.increment = 8
  				},
  				.digest_size = {

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

* [dpdk-stable] patch 'test/event_crypto_adapter: fix configuration' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (152 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'crypto/aesni_mb: fix GCM " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'eventdev: check allocation in Tx adapter' " luca.boccassi
                   ` (52 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Abhinandan Gujjar; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 130b526d1bfcc7b9c6d3a5d6e3cc356b8a63d12e Mon Sep 17 00:00:00 2001
From: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Date: Thu, 17 Sep 2020 06:44:35 +0530
Subject: [PATCH] test/event_crypto_adapter: fix configuration

[ upstream commit 74449375237f2c2efd57211e667c726ef710a393 ]

This patch updates the xform with right configuration.
For session based ops, sym session pool is created with
valid userdata size.

Fixes: 24054e3640a2 ("test/crypto: use separate session mempools")

Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 app/test/test_event_crypto_adapter.c | 24 +++++-------------------
 1 file changed, 5 insertions(+), 19 deletions(-)

diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index 8d42462d87..530ce96f1a 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -171,7 +171,6 @@ test_op_forward_mode(uint8_t session_less)
 	struct rte_event ev;
 	uint32_t cap;
 	int ret;
-	uint8_t cipher_key[17];
 
 	memset(&m_data, 0, sizeof(m_data));
 
@@ -183,14 +182,7 @@ test_op_forward_mode(uint8_t session_less)
 	/* Setup Cipher Parameters */
 	cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
 	cipher_xform.next = NULL;
-
-	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
-	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
-
-	cipher_xform.cipher.key.data = cipher_key;
-	cipher_xform.cipher.key.length = 16;
-	cipher_xform.cipher.iv.offset = IV_OFFSET;
-	cipher_xform.cipher.iv.length = 16;
+	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL;
 
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
@@ -378,7 +370,6 @@ test_op_new_mode(uint8_t session_less)
 	struct rte_mbuf *m;
 	uint32_t cap;
 	int ret;
-	uint8_t cipher_key[17];
 
 	memset(&m_data, 0, sizeof(m_data));
 
@@ -390,14 +381,7 @@ test_op_new_mode(uint8_t session_less)
 	/* Setup Cipher Parameters */
 	cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
 	cipher_xform.next = NULL;
-
-	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC;
-	cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
-
-	cipher_xform.cipher.key.data = cipher_key;
-	cipher_xform.cipher.key.length = 16;
-	cipher_xform.cipher.iv.offset = IV_OFFSET;
-	cipher_xform.cipher.iv.length = 16;
+	cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_NULL;
 
 	op = rte_crypto_op_alloc(params.op_mpool,
 			RTE_CRYPTO_OP_TYPE_SYMMETRIC);
@@ -564,7 +548,9 @@ configure_cryptodev(void)
 
 	params.session_mpool = rte_cryptodev_sym_session_pool_create(
 			"CRYPTO_ADAPTER_SESSION_MP",
-			MAX_NB_SESSIONS, 0, 0, 0, SOCKET_ID_ANY);
+			MAX_NB_SESSIONS, 0, 0,
+			sizeof(union rte_event_crypto_metadata),
+			SOCKET_ID_ANY);
 	TEST_ASSERT_NOT_NULL(params.session_mpool,
 			"session mempool allocation failed\n");
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.549919788 +0000
+++ 0155-test-event_crypto_adapter-fix-configuration.patch	2020-10-28 10:35:11.752833674 +0000
@@ -1,14 +1,15 @@
-From 74449375237f2c2efd57211e667c726ef710a393 Mon Sep 17 00:00:00 2001
+From 130b526d1bfcc7b9c6d3a5d6e3cc356b8a63d12e Mon Sep 17 00:00:00 2001
 From: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
 Date: Thu, 17 Sep 2020 06:44:35 +0530
 Subject: [PATCH] test/event_crypto_adapter: fix configuration
 
+[ upstream commit 74449375237f2c2efd57211e667c726ef710a393 ]
+
 This patch updates the xform with right configuration.
 For session based ops, sym session pool is created with
 valid userdata size.
 
 Fixes: 24054e3640a2 ("test/crypto: use separate session mempools")
-Cc: stable@dpdk.org
 
 Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
 Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

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

* [dpdk-stable] patch 'eventdev: check allocation in Tx adapter' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (153 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/event_crypto_adapter: fix configuration' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'event/dpaa2: fix dereference before null check' " luca.boccassi
                   ` (51 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Nikhil Rao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From f939dab3507a6c03743baf16bbaeae6b5ff2b967 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 d02ef57f4e..8a1573e75f 100644
--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
@@ -733,6 +733,8 @@ 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++) {
 			if (txa_service_is_queue_added(txa, eth_dev, i))
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.579157086 +0000
+++ 0156-eventdev-check-allocation-in-Tx-adapter.patch	2020-10-28 10:35:11.752833674 +0000
@@ -1,13 +1,14 @@
-From e3eebdced05c471327353a773640fec929cb298b Mon Sep 17 00:00:00 2001
+From f939dab3507a6c03743baf16bbaeae6b5ff2b967 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")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
@@ -16,10 +17,10 @@
  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 bb21dc4075..86287b4e66 100644
+index d02ef57f4e..8a1573e75f 100644
 --- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
 +++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
-@@ -734,6 +734,8 @@ txa_service_queue_add(uint8_t id,
+@@ -733,6 +733,8 @@ txa_service_queue_add(uint8_t id,
  
  		qdone = rte_zmalloc(txa->mem_name,
  				nb_queues * sizeof(*qdone), 0);

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

* [dpdk-stable] patch 'event/dpaa2: fix dereference before null check' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (154 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'eventdev: check allocation in Tx adapter' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'eventdev: fix adapter leak in error path' " luca.boccassi
                   ` (50 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Nipun Gupta, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From ace6739983f23a71f7a61757544413fcd19b3e6d 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 ede7b01618..5ae76d4d9d 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -567,14 +567,14 @@ 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);
 }
 
 static int
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.609168481 +0000
+++ 0157-event-dpaa2-fix-dereference-before-null-check.patch	2020-10-28 10:35:11.752833674 +0000
@@ -1,14 +1,15 @@
-From db5e0e7aea5e256c43489a3b272a4318b6ddca9f Mon Sep 17 00:00:00 2001
+From ace6739983f23a71f7a61757544413fcd19b3e6d 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")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
@@ -17,10 +18,10 @@
  1 file changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
-index 3ae4441ee3..f7383ca738 100644
+index ede7b01618..5ae76d4d9d 100644
 --- a/drivers/event/dpaa2/dpaa2_eventdev.c
 +++ b/drivers/event/dpaa2/dpaa2_eventdev.c
-@@ -569,14 +569,14 @@ dpaa2_eventdev_port_release(void *port)
+@@ -567,14 +567,14 @@ dpaa2_eventdev_port_release(void *port)
  
  	EVENTDEV_INIT_FUNC_TRACE();
  

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

* [dpdk-stable] patch 'eventdev: fix adapter leak in error path' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (155 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'event/dpaa2: fix dereference before null check' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/event: fix function arguments for crypto adapter' " luca.boccassi
                   ` (49 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 0da6f9ab3f97ac8234667c32c30302328c8b6b23 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 22d9108168..db9af8c200 100644
--- a/lib/librte_eventdev/rte_event_crypto_adapter.c
+++ b/lib/librte_eventdev/rte_event_crypto_adapter.c
@@ -240,6 +240,7 @@ rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id,
 	if (ret < 0) {
 		RTE_EDEV_LOG_ERR("Failed to get info for eventdev %d: %s!",
 				 dev_id, dev_info.driver_name);
+		rte_free(adapter);
 		return ret;
 	}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.638291516 +0000
+++ 0158-eventdev-fix-adapter-leak-in-error-path.patch	2020-10-28 10:35:11.756833733 +0000
@@ -1,14 +1,15 @@
-From b7b09dab5e9507541222d1d2ce86f55e9eb32b9e Mon Sep 17 00:00:00 2001
+From 0da6f9ab3f97ac8234667c32c30302328c8b6b23 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")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Acked-by: Jerin Jacob <jerinj@marvell.com>
@@ -17,10 +18,10 @@
  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 8f25933163..b04312128a 100644
+index 22d9108168..db9af8c200 100644
 --- a/lib/librte_eventdev/rte_event_crypto_adapter.c
 +++ b/lib/librte_eventdev/rte_event_crypto_adapter.c
-@@ -241,6 +241,7 @@ rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id,
+@@ -240,6 +240,7 @@ rte_event_crypto_adapter_create_ext(uint8_t id, uint8_t dev_id,
  	if (ret < 0) {
  		RTE_EDEV_LOG_ERR("Failed to get info for eventdev %d: %s!",
  				 dev_id, dev_info.driver_name);

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

* [dpdk-stable] patch 'test/event: fix function arguments for crypto adapter' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (156 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'eventdev: fix adapter leak in error path' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'eal/x86: fix memcpy AVX-512 enablement' " luca.boccassi
                   ` (48 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Ankur Dwivedi; +Cc: Abhinandan Gujjar, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From cf95edefbd899fa494b6467736078d7c49ab3342 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>
---
 app/test/test_event_crypto_adapter.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
index 530ce96f1a..1a9aa06c7d 100644
--- a/app/test/test_event_crypto_adapter.c
+++ b/app/test/test_event_crypto_adapter.c
@@ -201,8 +201,8 @@ test_op_forward_mode(uint8_t session_less)
 				&cipher_xform, params.session_priv_mpool);
 		TEST_ASSERT_SUCCESS(ret, "Failed to init session\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");
 
 		if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) {
@@ -288,7 +288,7 @@ test_sessionless_with_op_forward_mode(void)
 	uint32_t cap;
 	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");
 
 	if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) &&
@@ -313,7 +313,7 @@ test_session_with_op_forward_mode(void)
 	uint32_t cap;
 	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");
 
 	if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) &&
@@ -394,8 +394,8 @@ test_op_new_mode(uint8_t session_less)
 				params.session_mpool);
 		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");
 
 		if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_SESSION_PRIVATE_DATA) {
@@ -444,7 +444,7 @@ test_sessionless_with_op_new_mode(void)
 	uint32_t cap;
 	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");
 
 	if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) &&
@@ -470,7 +470,7 @@ test_session_with_op_new_mode(void)
 	uint32_t cap;
 	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");
 
 	if (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) &&
@@ -692,7 +692,7 @@ 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");
 
@@ -705,7 +705,7 @@ test_crypto_adapter_qp_add_del(void)
 	uint32_t cap;
 	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");
 
 	if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.667822401 +0000
+++ 0159-test-event-fix-function-arguments-for-crypto-adapter.patch	2020-10-28 10:35:11.756833733 +0000
@@ -1,8 +1,10 @@
-From 45eb85e9bff1c03cf72fb2ff9722757b64d47735 Mon Sep 17 00:00:00 2001
+From cf95edefbd899fa494b6467736078d7c49ab3342 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.
 
@@ -12,7 +14,6 @@
 be the second argument.
 
 Fixes: 3c2c535ecfc0 ("test: add event crypto adapter auto-test")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
 Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
@@ -21,7 +22,7 @@
  1 file changed, 10 insertions(+), 10 deletions(-)
 
 diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
-index db9d75d3ff..37bcbecd47 100644
+index 530ce96f1a..1a9aa06c7d 100644
 --- a/app/test/test_event_crypto_adapter.c
 +++ b/app/test/test_event_crypto_adapter.c
 @@ -201,8 +201,8 @@ test_op_forward_mode(uint8_t session_less)

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

* [dpdk-stable] patch 'eal/x86: fix memcpy AVX-512 enablement' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (157 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/event: fix function arguments for crypto adapter' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'vhost: fix external mbuf creation' " luca.boccassi
                   ` (47 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Yingya Han, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 73a7720e3abce74051e059370a1db04cfbd7b10a 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
@@ -45,7 +45,7 @@ extern "C" {
 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
@@ -95,6 +95,10 @@ rte_mov256(uint8_t *dst, const uint8_t *src);
  * @note This is implemented as a macro, so it's address should not be taken
  * 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.
  * @param src
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.696918899 +0000
+++ 0160-eal-x86-fix-memcpy-AVX-512-enablement.patch	2020-10-28 10:35:11.756833733 +0000
@@ -1,8 +1,10 @@
-From e8a83681f458d95d197bd37208fed3c3900def03 Mon Sep 17 00:00:00 2001
+From 73a7720e3abce74051e059370a1db04cfbd7b10a 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
@@ -17,19 +19,31 @@
 
 Fixes: a25a650be5f0 ("build: add infrastructure for meson and ninja builds")
 Fixes: 3e1bb55fd6ef ("build/x86: add SSE flags")
-Cc: stable@dpdk.org
 
 Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
 Tested-by: Yingya Han <yingyax.han@intel.com>
 ---
- 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 ++++
  2 files changed, 5 insertions(+), 1 deletion(-)
 
-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
+@@ -45,7 +45,7 @@ extern "C" {
+ 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/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
 @@ -95,6 +95,10 @@ rte_mov256(uint8_t *dst, const uint8_t *src);
   * @note This is implemented as a macro, so it's address should not be taken
   * and care is needed as parameter expressions may be evaluated multiple times.
@@ -41,19 +55,6 @@
   * @param dst
   *   Pointer to the destination of the data.
   * @param src
-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
-@@ -45,7 +45,7 @@ extern "C" {
- 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
- 
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'vhost: fix external mbuf creation' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (158 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'eal/x86: fix memcpy AVX-512 enablement' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'vhost: fix virtio-net header length with packed ring' " luca.boccassi
                   ` (46 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 04acc850841d45a8d0bd2def14387b3f229af3a4 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Wed, 7 Oct 2020 14:53:18 +0200
Subject: [PATCH] vhost: fix external mbuf creation

[ upstream commit fa5054c4bb994311278d4a99cccf09be69296177 ]

In virtio_dev_extbuf_alloc(), the shinfo structure used to store
the reference counter and the free callback of the external buffer
is by default stored inside the mbuf data.

This is wrong because the mbuf (and its data) can be freed before
the external buffer, for instance in the following situation:

  pkt2 = rte_pktmbuf_alloc(mp);
  rte_pktmbuf_attach(pkt2, pkt);
  rte_pktmbuf_free(pkt);

After this, pkt is freed, but it still contains shinfo, which is
referenced by pkt2.

Fix this by always storing the shinfo beside the external buffer.

Fixes: c3ff0ac70acb ("vhost: improve performance by supporting large buffer")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/virtio_net.c | 30 ++++++++----------------------
 1 file changed, 8 insertions(+), 22 deletions(-)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index a6c106c13c..b8237f2eb4 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -1595,16 +1595,8 @@ virtio_dev_extbuf_alloc(struct rte_mbuf *pkt, uint32_t size)
 	rte_iova_t iova;
 	void *buf;
 
-	/* Try to use pkt buffer to store shinfo to reduce the amount of memory
-	 * required, otherwise store shinfo in the new buffer.
-	 */
-	if (rte_pktmbuf_tailroom(pkt) >= sizeof(*shinfo))
-		shinfo = rte_pktmbuf_mtod(pkt,
-					  struct rte_mbuf_ext_shared_info *);
-	else {
-		total_len += sizeof(*shinfo) + sizeof(uintptr_t);
-		total_len = RTE_ALIGN_CEIL(total_len, sizeof(uintptr_t));
-	}
+	total_len += sizeof(*shinfo) + sizeof(uintptr_t);
+	total_len = RTE_ALIGN_CEIL(total_len, sizeof(uintptr_t));
 
 	if (unlikely(total_len > UINT16_MAX))
 		return -ENOSPC;
@@ -1615,18 +1607,12 @@ virtio_dev_extbuf_alloc(struct rte_mbuf *pkt, uint32_t size)
 		return -ENOMEM;
 
 	/* Initialize shinfo */
-	if (shinfo) {
-		shinfo->free_cb = virtio_dev_extbuf_free;
-		shinfo->fcb_opaque = buf;
-		rte_mbuf_ext_refcnt_set(shinfo, 1);
-	} else {
-		shinfo = rte_pktmbuf_ext_shinfo_init_helper(buf, &buf_len,
-					      virtio_dev_extbuf_free, buf);
-		if (unlikely(shinfo == NULL)) {
-			rte_free(buf);
-			RTE_LOG(ERR, VHOST_DATA, "Failed to init shinfo\n");
-			return -1;
-		}
+	shinfo = rte_pktmbuf_ext_shinfo_init_helper(buf, &buf_len,
+						virtio_dev_extbuf_free, buf);
+	if (unlikely(shinfo == NULL)) {
+		rte_free(buf);
+		RTE_LOG(ERR, VHOST_DATA, "Failed to init shinfo\n");
+		return -1;
 	}
 
 	iova = rte_malloc_virt2iova(buf);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.726942443 +0000
+++ 0161-vhost-fix-external-mbuf-creation.patch	2020-10-28 10:35:11.760833792 +0000
@@ -1,8 +1,10 @@
-From fa5054c4bb994311278d4a99cccf09be69296177 Mon Sep 17 00:00:00 2001
+From 04acc850841d45a8d0bd2def14387b3f229af3a4 Mon Sep 17 00:00:00 2001
 From: Olivier Matz <olivier.matz@6wind.com>
 Date: Wed, 7 Oct 2020 14:53:18 +0200
 Subject: [PATCH] vhost: fix external mbuf creation
 
+[ upstream commit fa5054c4bb994311278d4a99cccf09be69296177 ]
+
 In virtio_dev_extbuf_alloc(), the shinfo structure used to store
 the reference counter and the free callback of the external buffer
 is by default stored inside the mbuf data.
@@ -20,7 +22,6 @@
 Fix this by always storing the shinfo beside the external buffer.
 
 Fixes: c3ff0ac70acb ("vhost: improve performance by supporting large buffer")
-Cc: stable@dpdk.org
 
 Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -29,10 +30,10 @@
  1 file changed, 8 insertions(+), 22 deletions(-)
 
 diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
-index 0a0bea1a5a..008f5ceb04 100644
+index a6c106c13c..b8237f2eb4 100644
 --- a/lib/librte_vhost/virtio_net.c
 +++ b/lib/librte_vhost/virtio_net.c
-@@ -2098,16 +2098,8 @@ virtio_dev_extbuf_alloc(struct rte_mbuf *pkt, uint32_t size)
+@@ -1595,16 +1595,8 @@ virtio_dev_extbuf_alloc(struct rte_mbuf *pkt, uint32_t size)
  	rte_iova_t iova;
  	void *buf;
  
@@ -51,7 +52,7 @@
  
  	if (unlikely(total_len > UINT16_MAX))
  		return -ENOSPC;
-@@ -2118,18 +2110,12 @@ virtio_dev_extbuf_alloc(struct rte_mbuf *pkt, uint32_t size)
+@@ -1615,18 +1607,12 @@ virtio_dev_extbuf_alloc(struct rte_mbuf *pkt, uint32_t size)
  		return -ENOMEM;
  
  	/* Initialize shinfo */
@@ -64,14 +65,14 @@
 -					      virtio_dev_extbuf_free, buf);
 -		if (unlikely(shinfo == NULL)) {
 -			rte_free(buf);
--			VHOST_LOG_DATA(ERR, "Failed to init shinfo\n");
+-			RTE_LOG(ERR, VHOST_DATA, "Failed to init shinfo\n");
 -			return -1;
 -		}
 +	shinfo = rte_pktmbuf_ext_shinfo_init_helper(buf, &buf_len,
 +						virtio_dev_extbuf_free, buf);
 +	if (unlikely(shinfo == NULL)) {
 +		rte_free(buf);
-+		VHOST_LOG_DATA(ERR, "Failed to init shinfo\n");
++		RTE_LOG(ERR, VHOST_DATA, "Failed to init shinfo\n");
 +		return -1;
  	}
  

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

* [dpdk-stable] patch 'vhost: fix virtio-net header length with packed ring' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (159 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'vhost: fix external mbuf creation' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/dpaa2: fix build with timesync functions' " luca.boccassi
                   ` (45 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Marvin Liu, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 0461fa1134443efb3378c41746d210408ead2c19 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 4cc0ce21e0..647f0e9cde 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -350,7 +350,9 @@ 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 {
 		dev->vhost_hlen = sizeof(struct virtio_net_hdr);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.757555512 +0000
+++ 0162-vhost-fix-virtio-net-header-length-with-packed-ring.patch	2020-10-28 10:35:11.760833792 +0000
@@ -1,8 +1,10 @@
-From 22eaf2613537ba6b0e79f656195eeeaa3dd14666 Mon Sep 17 00:00:00 2001
+From 0461fa1134443efb3378c41746d210408ead2c19 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.
@@ -12,7 +14,6 @@
 
 Fixes: a922401f35cc ("vhost: add Rx support for packed ring")
 Fixes: ae999ce49dcb ("vhost: add Tx support for packed ring")
-Cc: stable@dpdk.org
 
 Reported-by: Marvin Liu <yong.liu@intel.com>
 Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
@@ -22,10 +23,10 @@
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
-index 4deceb3e00..5d1fb9e863 100644
+index 4cc0ce21e0..647f0e9cde 100644
 --- a/lib/librte_vhost/vhost_user.c
 +++ b/lib/librte_vhost/vhost_user.c
-@@ -341,7 +341,9 @@ vhost_user_set_features(struct virtio_net **pdev, struct VhostUserMsg *msg,
+@@ -350,7 +350,9 @@ vhost_user_set_features(struct virtio_net **pdev, struct VhostUserMsg *msg,
  
  	dev->features = features;
  	if (dev->features &

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

* [dpdk-stable] patch 'net/dpaa2: fix build with timesync functions' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (160 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'vhost: fix virtio-net header length with packed ring' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/netvsc: fix Tx queue leak in error path' " luca.boccassi
                   ` (44 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Chenxu Di; +Cc: Ferruh Yigit, Sachin Saxena, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From e3d00438db8bf4794df58375bd54e134707e7b43 Mon Sep 17 00:00:00 2001
From: Chenxu Di <chenxux.di@intel.com>
Date: Tue, 6 Oct 2020 18:16:37 +0100
Subject: [PATCH] net/dpaa2: fix build with timesync functions

[ upstream commit c6299a086711b0578fcebe6a2ee99f3cba6faa54 ]

Some timesync related source files are built only when
'RTE_LIBRTE_IEEE1588' config is set, which is missing in meson.

Building with '-DRTE_LIBRTE_IEEE1588' cflag will enable timesync
functionality in the files that are build, but it won't build files
that require 'RTE_LIBRTE_IEEE1588' config.
This causes the build error.

Fixing by removing config check in meson file and build all .c files by
default, but wrap relevant code part with 'RTE_LIBRTE_IEEE1588' macro.

Also removing 'RTE_LIBRTE_IEEE1588' ifdef around some fields of the data
structures, to not require finer grained macro wraps on the functions
using them.
Since the registration of the function disabled with macro check, having
functions compiled shouldn't affect the functionality.

Fixes: 184c39d16568 ("net/dpaa2: add DPRTC sub-module")

Signed-off-by: Chenxu Di <chenxux.di@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Sachin Saxena <sachin.saxena@oss.nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.h | 4 ----
 drivers/net/dpaa2/dpaa2_ptp.c    | 2 ++
 drivers/net/dpaa2/meson.build    | 7 ++-----
 3 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h
index 95674b26b9..0030251b8a 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.h
+++ b/drivers/net/dpaa2/dpaa2_ethdev.h
@@ -135,7 +135,6 @@ struct dpaa2_dev_priv {
 	uint16_t ss_offset;
 	uint64_t ss_iova;
 	uint64_t ss_param_iova;
-#if defined(RTE_LIBRTE_IEEE1588)
 	/*stores timestamp of last received packet on dev*/
 	uint64_t rx_timestamp;
 	/*stores timestamp of last received tx confirmation packet on dev*/
@@ -144,7 +143,6 @@ struct dpaa2_dev_priv {
 	 * it corresponds to last packet transmitted
 	 */
 	struct dpaa2_queue *next_tx_conf_queue;
-#endif
 
 	struct rte_eth_dev *eth_dev; /**< Pointer back to holding ethdev */
 
@@ -200,7 +198,6 @@ void dpaa2_dev_free_eqresp_buf(uint16_t eqresp_ci);
 void dpaa2_flow_clean(struct rte_eth_dev *dev);
 uint16_t dpaa2_dev_tx_conf(void *queue)  __attribute__((unused));
 
-#if defined(RTE_LIBRTE_IEEE1588)
 int dpaa2_timesync_enable(struct rte_eth_dev *dev);
 int dpaa2_timesync_disable(struct rte_eth_dev *dev);
 int dpaa2_timesync_read_time(struct rte_eth_dev *dev,
@@ -213,5 +210,4 @@ int dpaa2_timesync_read_rx_timestamp(struct rte_eth_dev *dev,
 						uint32_t flags __rte_unused);
 int dpaa2_timesync_read_tx_timestamp(struct rte_eth_dev *dev,
 					  struct timespec *timestamp);
-#endif
 #endif /* _DPAA2_ETHDEV_H */
diff --git a/drivers/net/dpaa2/dpaa2_ptp.c b/drivers/net/dpaa2/dpaa2_ptp.c
index 316912fe3e..bd9bcd58b0 100644
--- a/drivers/net/dpaa2/dpaa2_ptp.c
+++ b/drivers/net/dpaa2/dpaa2_ptp.c
@@ -129,6 +129,7 @@ int dpaa2_timesync_read_rx_timestamp(struct rte_eth_dev *dev,
 	return 0;
 }
 
+#if defined(RTE_LIBRTE_IEEE1588)
 static int
 dpaa2_create_dprtc_device(int vdev_fd __rte_unused,
 			   struct vfio_device_info *obj_info __rte_unused,
@@ -179,3 +180,4 @@ static struct rte_dpaa2_object rte_dpaa2_dprtc_obj = {
 };
 
 RTE_PMD_REGISTER_DPAA2_OBJECT(dprtc, rte_dpaa2_dprtc_obj);
+#endif
diff --git a/drivers/net/dpaa2/meson.build b/drivers/net/dpaa2/meson.build
index 571cdb7d4b..fc4707db10 100644
--- a/drivers/net/dpaa2/meson.build
+++ b/drivers/net/dpaa2/meson.build
@@ -13,15 +13,12 @@ sources = files('base/dpaa2_hw_dpni.c',
 		'dpaa2_flow.c',
 		'dpaa2_rxtx.c',
 		'dpaa2_sparser.c',
+		'dpaa2_ptp.c',
+		'mc/dprtc.c',
 		'mc/dpkg.c',
 		'mc/dpdmux.c',
 		'mc/dpni.c')
 
-if dpdk_conf.has('RTE_LIBRTE_IEEE1588')
-	sources += files('mc/dprtc.c')
-	sources += files('dpaa2_ptp.c')
-endif
-
 includes += include_directories('base', 'mc')
 
 # depends on fslmc bus which uses experimental API
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.788385803 +0000
+++ 0163-net-dpaa2-fix-build-with-timesync-functions.patch	2020-10-28 10:35:11.764833851 +0000
@@ -1,8 +1,10 @@
-From c6299a086711b0578fcebe6a2ee99f3cba6faa54 Mon Sep 17 00:00:00 2001
+From e3d00438db8bf4794df58375bd54e134707e7b43 Mon Sep 17 00:00:00 2001
 From: Chenxu Di <chenxux.di@intel.com>
 Date: Tue, 6 Oct 2020 18:16:37 +0100
 Subject: [PATCH] net/dpaa2: fix build with timesync functions
 
+[ upstream commit c6299a086711b0578fcebe6a2ee99f3cba6faa54 ]
+
 Some timesync related source files are built only when
 'RTE_LIBRTE_IEEE1588' config is set, which is missing in meson.
 
@@ -21,7 +23,6 @@
 functions compiled shouldn't affect the functionality.
 
 Fixes: 184c39d16568 ("net/dpaa2: add DPRTC sub-module")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chenxu Di <chenxux.di@intel.com>
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -33,10 +34,10 @@
  3 files changed, 4 insertions(+), 9 deletions(-)
 
 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h
-index e577355d57..94cf253827 100644
+index 95674b26b9..0030251b8a 100644
 --- a/drivers/net/dpaa2/dpaa2_ethdev.h
 +++ b/drivers/net/dpaa2/dpaa2_ethdev.h
-@@ -160,7 +160,6 @@ struct dpaa2_dev_priv {
+@@ -135,7 +135,6 @@ struct dpaa2_dev_priv {
  	uint16_t ss_offset;
  	uint64_t ss_iova;
  	uint64_t ss_param_iova;
@@ -44,7 +45,7 @@
  	/*stores timestamp of last received packet on dev*/
  	uint64_t rx_timestamp;
  	/*stores timestamp of last received tx confirmation packet on dev*/
-@@ -169,7 +168,6 @@ struct dpaa2_dev_priv {
+@@ -144,7 +143,6 @@ struct dpaa2_dev_priv {
  	 * it corresponds to last packet transmitted
  	 */
  	struct dpaa2_queue *next_tx_conf_queue;
@@ -52,22 +53,22 @@
  
  	struct rte_eth_dev *eth_dev; /**< Pointer back to holding ethdev */
  
-@@ -227,7 +225,6 @@ void dpaa2_dev_free_eqresp_buf(uint16_t eqresp_ci);
+@@ -200,7 +198,6 @@ void dpaa2_dev_free_eqresp_buf(uint16_t eqresp_ci);
  void dpaa2_flow_clean(struct rte_eth_dev *dev);
- uint16_t dpaa2_dev_tx_conf(void *queue)  __rte_unused;
+ uint16_t dpaa2_dev_tx_conf(void *queue)  __attribute__((unused));
  
 -#if defined(RTE_LIBRTE_IEEE1588)
  int dpaa2_timesync_enable(struct rte_eth_dev *dev);
  int dpaa2_timesync_disable(struct rte_eth_dev *dev);
  int dpaa2_timesync_read_time(struct rte_eth_dev *dev,
-@@ -240,5 +237,4 @@ int dpaa2_timesync_read_rx_timestamp(struct rte_eth_dev *dev,
+@@ -213,5 +210,4 @@ int dpaa2_timesync_read_rx_timestamp(struct rte_eth_dev *dev,
  						uint32_t flags __rte_unused);
  int dpaa2_timesync_read_tx_timestamp(struct rte_eth_dev *dev,
  					  struct timespec *timestamp);
 -#endif
  #endif /* _DPAA2_ETHDEV_H */
 diff --git a/drivers/net/dpaa2/dpaa2_ptp.c b/drivers/net/dpaa2/dpaa2_ptp.c
-index f58eedb314..899dd5d442 100644
+index 316912fe3e..bd9bcd58b0 100644
 --- a/drivers/net/dpaa2/dpaa2_ptp.c
 +++ b/drivers/net/dpaa2/dpaa2_ptp.c
 @@ -129,6 +129,7 @@ int dpaa2_timesync_read_rx_timestamp(struct rte_eth_dev *dev,
@@ -84,7 +85,7 @@
  RTE_PMD_REGISTER_DPAA2_OBJECT(dprtc, rte_dpaa2_dprtc_obj);
 +#endif
 diff --git a/drivers/net/dpaa2/meson.build b/drivers/net/dpaa2/meson.build
-index 6dd0eb274c..4312aa73f7 100644
+index 571cdb7d4b..fc4707db10 100644
 --- a/drivers/net/dpaa2/meson.build
 +++ b/drivers/net/dpaa2/meson.build
 @@ -13,15 +13,12 @@ sources = files('base/dpaa2_hw_dpni.c',
@@ -104,7 +105,7 @@
 -
  includes += include_directories('base', 'mc')
  
- install_headers('rte_pmd_dpaa2.h')
+ # depends on fslmc bus which uses experimental API
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'net/netvsc: fix Tx queue leak in error path' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (161 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/dpaa2: fix build with timesync functions' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/bonding: fix possible unbalanced packet receiving' " luca.boccassi
                   ` (43 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Long Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 81bb7d7c3ef7d0355d78ac31ff4f8b228facfa7e 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 90ec8d7d57..460f1bc57f 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -252,16 +252,6 @@ 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)
 		tx_free_thresh = RTE_MIN(nb_desc / 4,
@@ -276,6 +266,15 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev,
 		return -EINVAL;
 	}
 
+	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;
 
 	snprintf(name, sizeof(name),
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.817761445 +0000
+++ 0164-net-netvsc-fix-Tx-queue-leak-in-error-path.patch	2020-10-28 10:35:11.764833851 +0000
@@ -1,8 +1,10 @@
-From f3013acfc17b8920b97223421976f3b3bb32489a Mon Sep 17 00:00:00 2001
+From 81bb7d7c3ef7d0355d78ac31ff4f8b228facfa7e 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.
 
@@ -10,7 +12,6 @@
 fix it, before calling txq = rte_zmalloc_socket().
 
 Fixes: cc0251813277 ("net/netvsc: split send buffers from Tx descriptors")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Acked-by: Long Li <longli@microsoft.com>
@@ -19,7 +20,7 @@
  1 file changed, 9 insertions(+), 10 deletions(-)
 
 diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
-index 65f1abae51..5d59db513c 100644
+index 90ec8d7d57..460f1bc57f 100644
 --- a/drivers/net/netvsc/hn_rxtx.c
 +++ b/drivers/net/netvsc/hn_rxtx.c
 @@ -252,16 +252,6 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/bonding: fix possible unbalanced packet receiving' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (162 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/netvsc: fix Tx queue leak in error path' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/bonding: fix Rx queue conversion' " luca.boccassi
                   ` (42 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: RongQing Li; +Cc: Dongsheng Rong, Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 8b53ea69745f6fd2fc21029c3dc7f36e4ea7abdf 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/eth_bond_private.h |  3 ++-
 drivers/net/bonding/rte_eth_bond_api.c |  6 ------
 drivers/net/bonding/rte_eth_bond_pmd.c | 14 +++++++-------
 3 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/drivers/net/bonding/eth_bond_private.h b/drivers/net/bonding/eth_bond_private.h
index c9b2d0fe46..af92a4c52a 100644
--- a/drivers/net/bonding/eth_bond_private.h
+++ b/drivers/net/bonding/eth_bond_private.h
@@ -50,6 +50,8 @@ extern const struct rte_flow_ops bond_flow_ops;
 /** Port Queue Mapping Structure */
 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;
 	/**< Reference to eth_dev private structure */
@@ -132,7 +134,6 @@ struct bond_dev_private {
 	uint16_t nb_rx_queues;			/**< Total number of rx queues */
 	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 */
 
diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index 97c667e007..a4007fe07c 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -129,12 +129,6 @@ deactivate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id)
 	RTE_ASSERT(active_count < RTE_DIM(internals->active_slaves));
 	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) {
 			bond_mode_8023ad_start(eth_dev);
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index fccfcb2c89..178a39096b 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -69,7 +69,7 @@ bond_ethdev_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	struct bond_rx_queue *bd_rx_q = (struct bond_rx_queue *)queue;
 	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++) {
 		uint16_t num_rx_slave;
@@ -86,8 +86,8 @@ bond_ethdev_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 			active_slave = 0;
 	}
 
-	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;
 }
 
@@ -303,9 +303,9 @@ rx_burst_8023ad(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts,
 	memcpy(slaves, internals->active_slaves,
 			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;
 	}
 	for (i = 0; i < slave_count && num_rx_total < nb_pkts; i++) {
@@ -367,8 +367,8 @@ rx_burst_8023ad(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts,
 			idx = 0;
 	}
 
-	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;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.847205425 +0000
+++ 0165-net-bonding-fix-possible-unbalanced-packet-receiving.patch	2020-10-28 10:35:11.768833910 +0000
@@ -1,8 +1,10 @@
-From 97602faa9e03c91465fc55f5464762796ce641c7 Mon Sep 17 00:00:00 2001
+From 8b53ea69745f6fd2fc21029c3dc7f36e4ea7abdf 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
@@ -20,7 +22,6 @@
 per queue variable
 
 Fixes: ae2a04864a9a ("net/bonding: reduce slave starvation on Rx poll")
-Cc: stable@dpdk.org
 
 Signed-off-by: RongQing Li <lirongqing@baidu.com>
 Signed-off-by: Dongsheng Rong <rongdongsheng@baidu.com>
@@ -32,7 +33,7 @@
  3 files changed, 9 insertions(+), 14 deletions(-)
 
 diff --git a/drivers/net/bonding/eth_bond_private.h b/drivers/net/bonding/eth_bond_private.h
-index 0a0034705d..62e3a9dbf3 100644
+index c9b2d0fe46..af92a4c52a 100644
 --- a/drivers/net/bonding/eth_bond_private.h
 +++ b/drivers/net/bonding/eth_bond_private.h
 @@ -50,6 +50,8 @@ extern const struct rte_flow_ops bond_flow_ops;
@@ -70,7 +71,7 @@
  		if (internals->mode == BONDING_MODE_8023AD) {
  			bond_mode_8023ad_start(eth_dev);
 diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
-index 1f761c7c9e..05ac25fcad 100644
+index fccfcb2c89..178a39096b 100644
 --- a/drivers/net/bonding/rte_eth_bond_pmd.c
 +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
 @@ -69,7 +69,7 @@ bond_ethdev_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)

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

* [dpdk-stable] patch 'net/bonding: fix Rx queue conversion' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (163 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/bonding: fix possible unbalanced packet receiving' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/pcap: fix input only Rx' " luca.boccassi
                   ` (41 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Dongsheng Rong; +Cc: RongQing Li, Wei Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 385e28cdf2d4c78db74c4cf0a2f73fa477212629 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 178a39096b..e7cb418053 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -534,8 +534,8 @@ mode6_debug(const char __attribute__((unused)) *info,
 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 rte_ether_hdr *eth_h;
 	uint16_t ether_type, offset;
 	uint16_t nb_recv_pkts;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.880289496 +0000
+++ 0166-net-bonding-fix-Rx-queue-conversion.patch	2020-10-28 10:35:11.772833968 +0000
@@ -1,13 +1,14 @@
-From 99fb0a03fd1e4ce2ea839014a5d0df87a1282405 Mon Sep 17 00:00:00 2001
+From 385e28cdf2d4c78db74c4cf0a2f73fa477212629 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")
-Cc: stable@dpdk.org
 
 Signed-off-by: Dongsheng Rong <rongdongsheng@baidu.com>
 Signed-off-by: RongQing Li <lirongqing@baidu.com>
@@ -17,10 +18,10 @@
  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 05ac25fcad..1c404b2edd 100644
+index 178a39096b..e7cb418053 100644
 --- a/drivers/net/bonding/rte_eth_bond_pmd.c
 +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
-@@ -534,8 +534,8 @@ mode6_debug(const char __rte_unused *info,
+@@ -534,8 +534,8 @@ mode6_debug(const char __attribute__((unused)) *info,
  static uint16_t
  bond_ethdev_rx_burst_alb(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
  {

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

* [dpdk-stable] patch 'net/pcap: fix input only Rx' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (164 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/bonding: fix Rx queue conversion' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/memif: do not update local copy of tail in Tx' " luca.boccassi
                   ` (40 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Muthurajan Jayakumar, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 4189755e31b57644393e33f306c7676bafa672b6 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 8 Oct 2020 12:34:25 +0100
Subject: [PATCH] net/pcap: fix input only Rx

[ upstream commit 113a461e82d3abe450da1daa21deebdea218532b ]

When input only Rx interface argument 'rx_iface_in' provided, current
code assigns 'eth_null_rx' burst function by mistake and no packet
received as a result.
Like in following usage no packets received from physical interface:
"--vdev net_pcap0,rx_iface_in=eth0,tx_iface=eth0"

Fixing the burst function assignment when 'rx_iface_in' argument is used

Fixes: f14a94591504 ("net/pcap: remove Rx queue argument necessity")

Reported-by: Muthurajan Jayakumar <muthurajan.jayakumar@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/pcap/rte_eth_pcap.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index aa7ef6fdbc..6fb26c8c9d 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -1398,7 +1398,8 @@ pmd_pcap_probe(struct rte_vdev_device *dev)
 	devargs_all.is_rx_pcap =
 		rte_kvargs_count(kvlist, ETH_PCAP_RX_PCAP_ARG) ? 1 : 0;
 	devargs_all.is_rx_iface =
-		rte_kvargs_count(kvlist, ETH_PCAP_RX_IFACE_ARG) ? 1 : 0;
+		(rte_kvargs_count(kvlist, ETH_PCAP_RX_IFACE_ARG) +
+		 rte_kvargs_count(kvlist, ETH_PCAP_RX_IFACE_IN_ARG)) ? 1 : 0;
 	pcaps.num_of_queue = 0;
 
 	devargs_all.is_tx_pcap =
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.911486178 +0000
+++ 0167-net-pcap-fix-input-only-Rx.patch	2020-10-28 10:35:11.772833968 +0000
@@ -1,8 +1,10 @@
-From 113a461e82d3abe450da1daa21deebdea218532b Mon Sep 17 00:00:00 2001
+From 4189755e31b57644393e33f306c7676bafa672b6 Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Thu, 8 Oct 2020 12:34:25 +0100
 Subject: [PATCH] net/pcap: fix input only Rx
 
+[ upstream commit 113a461e82d3abe450da1daa21deebdea218532b ]
+
 When input only Rx interface argument 'rx_iface_in' provided, current
 code assigns 'eth_null_rx' burst function by mistake and no packet
 received as a result.
@@ -12,7 +14,6 @@
 Fixing the burst function assignment when 'rx_iface_in' argument is used
 
 Fixes: f14a94591504 ("net/pcap: remove Rx queue argument necessity")
-Cc: stable@dpdk.org
 
 Reported-by: Muthurajan Jayakumar <muthurajan.jayakumar@intel.com>
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -21,10 +22,10 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
-index da4988064a..057aa9dbfc 100644
+index aa7ef6fdbc..6fb26c8c9d 100644
 --- a/drivers/net/pcap/rte_eth_pcap.c
 +++ b/drivers/net/pcap/rte_eth_pcap.c
-@@ -1416,7 +1416,8 @@ pmd_pcap_probe(struct rte_vdev_device *dev)
+@@ -1398,7 +1398,8 @@ pmd_pcap_probe(struct rte_vdev_device *dev)
  	devargs_all.is_rx_pcap =
  		rte_kvargs_count(kvlist, ETH_PCAP_RX_PCAP_ARG) ? 1 : 0;
  	devargs_all.is_rx_iface =

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

* [dpdk-stable] patch 'net/memif: do not update local copy of tail in Tx' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (165 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/pcap: fix input only Rx' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/memif: relax load of ring tail for M2S ring' " luca.boccassi
                   ` (39 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Honnappa Nagarahalli; +Cc: Phil Yang, Ruifeng Wang, Jakub Grajciar, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 0f3cfad7f4a430d876a9c8470f58d8fb93bb00f6 Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Mon, 28 Sep 2020 14:03:27 -0500
Subject: [PATCH] net/memif: do not update local copy of tail in Tx

[ upstream commit 7fff1d311372d5dc850abbc5d09fe5cfc966538c ]

In the case of S2M queues, the receiver synchronizes with the sender
(i.e. informs of the packets it has received) using ring->tail.
Hence, the sender does not need to update last_tail.

In the case of M2S queues, the receiver uses last_tail to
keep track of the descriptors it has received. The
sender is not required to update the last_tail. Updating
the last_tail makes it a shared variable between the
transmitter and receiver affecting the performance.

Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
---
 drivers/net/memif/rte_eth_memif.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index aa83df3652..1c41988069 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -561,12 +561,10 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	ring_size = 1 << mq->log2_ring_size;
 	mask = ring_size - 1;
 
-	n_free = __atomic_load_n(&ring->tail, __ATOMIC_ACQUIRE) - mq->last_tail;
-	mq->last_tail += n_free;
-
 	if (type == MEMIF_RING_S2M) {
 		slot = __atomic_load_n(&ring->head, __ATOMIC_ACQUIRE);
-		n_free = ring_size - slot + mq->last_tail;
+		n_free = ring_size - slot +
+				__atomic_load_n(&ring->tail, __ATOMIC_ACQUIRE);
 	} else {
 		slot = __atomic_load_n(&ring->tail, __ATOMIC_ACQUIRE);
 		n_free = __atomic_load_n(&ring->head, __ATOMIC_ACQUIRE) - slot;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.941435084 +0000
+++ 0168-net-memif-do-not-update-local-copy-of-tail-in-Tx.patch	2020-10-28 10:35:11.772833968 +0000
@@ -1,8 +1,10 @@
-From 7fff1d311372d5dc850abbc5d09fe5cfc966538c Mon Sep 17 00:00:00 2001
+From 0f3cfad7f4a430d876a9c8470f58d8fb93bb00f6 Mon Sep 17 00:00:00 2001
 From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Date: Mon, 28 Sep 2020 14:03:27 -0500
 Subject: [PATCH] net/memif: do not update local copy of tail in Tx
 
+[ upstream commit 7fff1d311372d5dc850abbc5d09fe5cfc966538c ]
+
 In the case of S2M queues, the receiver synchronizes with the sender
 (i.e. informs of the packets it has received) using ring->tail.
 Hence, the sender does not need to update last_tail.
@@ -14,7 +16,6 @@
 transmitter and receiver affecting the performance.
 
 Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")
-Cc: stable@dpdk.org
 
 Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Reviewed-by: Phil Yang <phil.yang@arm.com>
@@ -25,10 +26,10 @@
  1 file changed, 2 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
-index ff8a58081f..d749b5b16c 100644
+index aa83df3652..1c41988069 100644
 --- a/drivers/net/memif/rte_eth_memif.c
 +++ b/drivers/net/memif/rte_eth_memif.c
-@@ -580,12 +580,10 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -561,12 +561,10 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
  	ring_size = 1 << mq->log2_ring_size;
  	mask = ring_size - 1;
  

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

* [dpdk-stable] patch 'net/memif: relax load of ring tail for M2S ring' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (166 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/memif: do not update local copy of tail in Tx' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/memif: relax load of ring head " luca.boccassi
                   ` (38 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Honnappa Nagarahalli; +Cc: Phil Yang, Ruifeng Wang, Jakub Grajciar, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 863291558d1067b389c0c97827f46c8c385f94a5 Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Mon, 28 Sep 2020 14:03:28 -0500
Subject: [PATCH] net/memif: relax load of ring tail for M2S ring

[ upstream commit 827660278032e94541aa8f9363aa16afe6ad0964 ]

For M2S rings, ring->tail is updated by the sender and eth_memif_tx
function is called in the context of sending thread. The loads in
the sender do not need to synchronize with its own stores.

Fixes: a2aafb9aa651 ("net/memif: optimize with one-way barrier")

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
---
 drivers/net/memif/rte_eth_memif.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 1c41988069..3b377bc54c 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -566,7 +566,13 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 		n_free = ring_size - slot +
 				__atomic_load_n(&ring->tail, __ATOMIC_ACQUIRE);
 	} else {
-		slot = __atomic_load_n(&ring->tail, __ATOMIC_ACQUIRE);
+		/* For M2S queues ring->tail is updated by the sender and
+		 * this function is called in the context of sending thread.
+		 * The loads in the sender do not need to synchronize with
+		 * its own stores. Hence, the following load can be a
+		 * relaxed load.
+		 */
+		slot = __atomic_load_n(&ring->tail, __ATOMIC_RELAXED);
 		n_free = __atomic_load_n(&ring->head, __ATOMIC_ACQUIRE) - slot;
 	}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.972530616 +0000
+++ 0169-net-memif-relax-load-of-ring-tail-for-M2S-ring.patch	2020-10-28 10:35:11.776834028 +0000
@@ -1,14 +1,15 @@
-From 827660278032e94541aa8f9363aa16afe6ad0964 Mon Sep 17 00:00:00 2001
+From 863291558d1067b389c0c97827f46c8c385f94a5 Mon Sep 17 00:00:00 2001
 From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Date: Mon, 28 Sep 2020 14:03:28 -0500
 Subject: [PATCH] net/memif: relax load of ring tail for M2S ring
 
+[ upstream commit 827660278032e94541aa8f9363aa16afe6ad0964 ]
+
 For M2S rings, ring->tail is updated by the sender and eth_memif_tx
 function is called in the context of sending thread. The loads in
 the sender do not need to synchronize with its own stores.
 
 Fixes: a2aafb9aa651 ("net/memif: optimize with one-way barrier")
-Cc: stable@dpdk.org
 
 Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Reviewed-by: Phil Yang <phil.yang@arm.com>
@@ -19,10 +20,10 @@
  1 file changed, 7 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
-index d749b5b16c..b72e24932e 100644
+index 1c41988069..3b377bc54c 100644
 --- a/drivers/net/memif/rte_eth_memif.c
 +++ b/drivers/net/memif/rte_eth_memif.c
-@@ -585,7 +585,13 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -566,7 +566,13 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
  		n_free = ring_size - slot +
  				__atomic_load_n(&ring->tail, __ATOMIC_ACQUIRE);
  	} else {

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

* [dpdk-stable] patch 'net/memif: relax load of ring head for M2S ring' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (167 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/memif: relax load of ring tail for M2S ring' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/memif: relax load of ring head for S2M " luca.boccassi
                   ` (37 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Honnappa Nagarahalli; +Cc: Phil Yang, Ruifeng Wang, Jakub Grajciar, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From bac91cd3440496b6692b8442941ff5d78f13ff54 Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Mon, 28 Sep 2020 14:03:29 -0500
Subject: [PATCH] net/memif: relax load of ring head for M2S ring

[ upstream commit 562fc6ef142c706b15136b80070dec84bb641d8b ]

For M2S rings, ring->head is updated by the receiver and eth_memif_rx
function is called in the context of receiving thread. The loads in
the receiver do not need to synchronize with its own stores.

Fixes: a2aafb9aa651 ("net/memif: optimize with one-way barrier")

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
---
 drivers/net/memif/rte_eth_memif.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 3b377bc54c..26c06d9055 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -398,7 +398,11 @@ no_free_bufs:
 
 refill:
 	if (type == MEMIF_RING_M2S) {
-		head = __atomic_load_n(&ring->head, __ATOMIC_ACQUIRE);
+		/* ring->head is updated by the receiver and this function
+		 * is called in the context of receiver thread. The loads in
+		 * the receiver do not need to synchronize with its own stores.
+		 */
+		head = __atomic_load_n(&ring->head, __ATOMIC_RELAXED);
 		n_slots = ring_size - head + mq->last_tail;
 
 		while (n_slots--) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.002396335 +0000
+++ 0170-net-memif-relax-load-of-ring-head-for-M2S-ring.patch	2020-10-28 10:35:11.776834028 +0000
@@ -1,14 +1,15 @@
-From 562fc6ef142c706b15136b80070dec84bb641d8b Mon Sep 17 00:00:00 2001
+From bac91cd3440496b6692b8442941ff5d78f13ff54 Mon Sep 17 00:00:00 2001
 From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Date: Mon, 28 Sep 2020 14:03:29 -0500
 Subject: [PATCH] net/memif: relax load of ring head for M2S ring
 
+[ upstream commit 562fc6ef142c706b15136b80070dec84bb641d8b ]
+
 For M2S rings, ring->head is updated by the receiver and eth_memif_rx
 function is called in the context of receiving thread. The loads in
 the receiver do not need to synchronize with its own stores.
 
 Fixes: a2aafb9aa651 ("net/memif: optimize with one-way barrier")
-Cc: stable@dpdk.org
 
 Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Reviewed-by: Phil Yang <phil.yang@arm.com>
@@ -19,10 +20,10 @@
  1 file changed, 5 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
-index b72e24932e..6deab098b5 100644
+index 3b377bc54c..26c06d9055 100644
 --- a/drivers/net/memif/rte_eth_memif.c
 +++ b/drivers/net/memif/rte_eth_memif.c
-@@ -410,7 +410,11 @@ no_free_bufs:
+@@ -398,7 +398,11 @@ no_free_bufs:
  
  refill:
  	if (type == MEMIF_RING_M2S) {

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

* [dpdk-stable] patch 'net/memif: relax load of ring head for S2M ring' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (168 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/memif: relax load of ring head " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/af_xdp: use strlcpy instead of strncpy' " luca.boccassi
                   ` (36 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Honnappa Nagarahalli; +Cc: Phil Yang, Ruifeng Wang, Jakub Grajciar, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From eb3ab17e94427d3b32aeb32ba13b8fe49df9a2ec Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Mon, 28 Sep 2020 14:03:30 -0500
Subject: [PATCH] net/memif: relax load of ring head for S2M ring

[ upstream commit 2416db2039e7f17fabf8e21d18181aa3823985ab ]

For S2M rings, ring->head is updated by the sender and eth_memif_tx
function is called in the context of sending thread. The loads in
the sender do not need to synchronize with its own stores.

Fixes: a2aafb9aa651 ("net/memif: optimize with one-way barrier")

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
---
 drivers/net/memif/rte_eth_memif.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 26c06d9055..aa75a04278 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -566,7 +566,13 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	mask = ring_size - 1;
 
 	if (type == MEMIF_RING_S2M) {
-		slot = __atomic_load_n(&ring->head, __ATOMIC_ACQUIRE);
+		/* For S2M queues ring->head is updated by the sender and
+		 * this function is called in the context of sending thread.
+		 * The loads in the sender do not need to synchronize with
+		 * its own stores. Hence, the following load can be a
+		 * relaxed load.
+		 */
+		slot = __atomic_load_n(&ring->head, __ATOMIC_RELAXED);
 		n_free = ring_size - slot +
 				__atomic_load_n(&ring->tail, __ATOMIC_ACQUIRE);
 	} else {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.032160997 +0000
+++ 0171-net-memif-relax-load-of-ring-head-for-S2M-ring.patch	2020-10-28 10:35:11.776834028 +0000
@@ -1,14 +1,15 @@
-From 2416db2039e7f17fabf8e21d18181aa3823985ab Mon Sep 17 00:00:00 2001
+From eb3ab17e94427d3b32aeb32ba13b8fe49df9a2ec Mon Sep 17 00:00:00 2001
 From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Date: Mon, 28 Sep 2020 14:03:30 -0500
 Subject: [PATCH] net/memif: relax load of ring head for S2M ring
 
+[ upstream commit 2416db2039e7f17fabf8e21d18181aa3823985ab ]
+
 For S2M rings, ring->head is updated by the sender and eth_memif_tx
 function is called in the context of sending thread. The loads in
 the sender do not need to synchronize with its own stores.
 
 Fixes: a2aafb9aa651 ("net/memif: optimize with one-way barrier")
-Cc: stable@dpdk.org
 
 Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Reviewed-by: Phil Yang <phil.yang@arm.com>
@@ -19,10 +20,10 @@
  1 file changed, 7 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
-index 6deab098b5..b16c73f231 100644
+index 26c06d9055..aa75a04278 100644
 --- a/drivers/net/memif/rte_eth_memif.c
 +++ b/drivers/net/memif/rte_eth_memif.c
-@@ -585,7 +585,13 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -566,7 +566,13 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
  	mask = ring_size - 1;
  
  	if (type == MEMIF_RING_S2M) {

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

* [dpdk-stable] patch 'net/af_xdp: use strlcpy instead of strncpy' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (169 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/memif: relax load of ring head for S2M " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/octeontx2: fix RSS flow create' " luca.boccassi
                   ` (35 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Ciara Loftus; +Cc: Bruce Richardson, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 7029c20146ae6714be78a59e514df26242a5d855 Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Wed, 7 Oct 2020 09:20:50 +0000
Subject: [PATCH] net/af_xdp: use strlcpy instead of strncpy

[ upstream commit 6d3c595d3a4e856307b92d1a824b07b48da1cc3c ]

strncpy may leave the destination buffer not NULL terminated so use
strlcpy instead.

Coverity issue: 362975
Fixes: 339b88c6a91f ("net/af_xdp: support multi-queue")

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index c5c906ff96..6fab9aab78 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -1116,7 +1116,7 @@ xdp_get_channels_info(const char *if_name, int *max_queues,
 
 	channels.cmd = ETHTOOL_GCHANNELS;
 	ifr.ifr_data = (void *)&channels;
-	strncpy(ifr.ifr_name, if_name, IFNAMSIZ);
+	strlcpy(ifr.ifr_name, if_name, IFNAMSIZ);
 	ret = ioctl(fd, SIOCETHTOOL, &ifr);
 	if (ret) {
 		if (errno == EOPNOTSUPP) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.061987119 +0000
+++ 0172-net-af_xdp-use-strlcpy-instead-of-strncpy.patch	2020-10-28 10:35:11.780834087 +0000
@@ -1,14 +1,15 @@
-From 6d3c595d3a4e856307b92d1a824b07b48da1cc3c Mon Sep 17 00:00:00 2001
+From 7029c20146ae6714be78a59e514df26242a5d855 Mon Sep 17 00:00:00 2001
 From: Ciara Loftus <ciara.loftus@intel.com>
 Date: Wed, 7 Oct 2020 09:20:50 +0000
 Subject: [PATCH] net/af_xdp: use strlcpy instead of strncpy
 
+[ upstream commit 6d3c595d3a4e856307b92d1a824b07b48da1cc3c ]
+
 strncpy may leave the destination buffer not NULL terminated so use
 strlcpy instead.
 
 Coverity issue: 362975
 Fixes: 339b88c6a91f ("net/af_xdp: support multi-queue")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
 Acked-by: Bruce Richardson <bruce.richardson@intel.com>
@@ -18,10 +19,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
-index eaf2c9c873..ac00cbab8e 100644
+index c5c906ff96..6fab9aab78 100644
 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c
 +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
-@@ -1362,7 +1362,7 @@ xdp_get_channels_info(const char *if_name, int *max_queues,
+@@ -1116,7 +1116,7 @@ xdp_get_channels_info(const char *if_name, int *max_queues,
  
  	channels.cmd = ETHTOOL_GCHANNELS;
  	ifr.ifr_data = (void *)&channels;

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

* [dpdk-stable] patch 'net/octeontx2: fix RSS flow create' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (170 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/af_xdp: use strlcpy instead of strncpy' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/octeontx2: remove useless check before free' " luca.boccassi
                   ` (34 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Kiran Kumar K; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 1a45c8d0c3653cd4bccb2bfcdc58ad17845e5e88 Mon Sep 17 00:00:00 2001
From: Kiran Kumar K <kirankumark@marvell.com>
Date: Sat, 10 Oct 2020 12:03:10 +0530
Subject: [PATCH] net/octeontx2: fix RSS flow create

[ upstream commit 617c97d2e2924e640745442080c375c95568a2e6 ]

While creating flow with action type RSS, action type is not being
set to RSS, and action type is being set to unicast. Therefore it breaks
RSS functionality. This patch add changes to program the RSS action
properly.

Fixes: 4092e4845dc1 ("net/octeontx2: add flow operations")

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
---
 drivers/net/octeontx2/otx2_flow.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/octeontx2/otx2_flow.c b/drivers/net/octeontx2/otx2_flow.c
index f1fb9f9884..c9886c9705 100644
--- a/drivers/net/octeontx2/otx2_flow.c
+++ b/drivers/net/octeontx2/otx2_flow.c
@@ -269,6 +269,8 @@ flow_program_rss_action(struct rte_eth_dev *eth_dev,
 			if (rc)
 				return rc;
 
+			flow->npc_action &= (~(0xfULL));
+			flow->npc_action |= NIX_RX_ACTIONOP_RSS;
 			flow->npc_action |=
 				((uint64_t)(alg_idx & NIX_RSS_ACT_ALG_MASK) <<
 				 NIX_RSS_ACT_ALG_OFFSET) |
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.091596886 +0000
+++ 0173-net-octeontx2-fix-RSS-flow-create.patch	2020-10-28 10:35:11.780834087 +0000
@@ -1,15 +1,16 @@
-From 617c97d2e2924e640745442080c375c95568a2e6 Mon Sep 17 00:00:00 2001
+From 1a45c8d0c3653cd4bccb2bfcdc58ad17845e5e88 Mon Sep 17 00:00:00 2001
 From: Kiran Kumar K <kirankumark@marvell.com>
 Date: Sat, 10 Oct 2020 12:03:10 +0530
 Subject: [PATCH] net/octeontx2: fix RSS flow create
 
+[ upstream commit 617c97d2e2924e640745442080c375c95568a2e6 ]
+
 While creating flow with action type RSS, action type is not being
 set to RSS, and action type is being set to unicast. Therefore it breaks
 RSS functionality. This patch add changes to program the RSS action
 properly.
 
 Fixes: 4092e4845dc1 ("net/octeontx2: add flow operations")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
 ---
@@ -17,10 +18,10 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/drivers/net/octeontx2/otx2_flow.c b/drivers/net/octeontx2/otx2_flow.c
-index 9b32b2accf..e07cea7093 100644
+index f1fb9f9884..c9886c9705 100644
 --- a/drivers/net/octeontx2/otx2_flow.c
 +++ b/drivers/net/octeontx2/otx2_flow.c
-@@ -272,6 +272,8 @@ flow_program_rss_action(struct rte_eth_dev *eth_dev,
+@@ -269,6 +269,8 @@ flow_program_rss_action(struct rte_eth_dev *eth_dev,
  			if (rc)
  				return rc;
  

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

* [dpdk-stable] patch 'net/octeontx2: remove useless check before free' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (171 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/octeontx2: fix RSS flow create' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/pcap: fix crash on exit for infinite Rx' " luca.boccassi
                   ` (33 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 27fb25749f55e70beb2963a7a4f85982f5425a18 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Fri, 9 Oct 2020 20:39:05 +0800
Subject: [PATCH] net/octeontx2: remove useless check before free

[ upstream commit 29892e064c1813927195fdbb7d80aede1ccd017d ]

The glibc free allows free(NULL) as null operation,
so remove this useless null checks.

Coverity issue: 357719
Fixes: da138cd47e06 ("net/octeontx2: handle port reconfigure")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/net/octeontx2/otx2_ethdev.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index 41930c5df0..c952373be4 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -1170,10 +1170,8 @@ nix_store_queue_cfg_and_then_release(struct rte_eth_dev *eth_dev)
 	return 0;
 
 fail:
-	if (tx_qconf)
-		free(tx_qconf);
-	if (rx_qconf)
-		free(rx_qconf);
+	free(tx_qconf);
+	free(rx_qconf);
 
 	return -ENOMEM;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.121309085 +0000
+++ 0174-net-octeontx2-remove-useless-check-before-free.patch	2020-10-28 10:35:11.780834087 +0000
@@ -1,14 +1,15 @@
-From 29892e064c1813927195fdbb7d80aede1ccd017d Mon Sep 17 00:00:00 2001
+From 27fb25749f55e70beb2963a7a4f85982f5425a18 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian@huawei.com>
 Date: Fri, 9 Oct 2020 20:39:05 +0800
 Subject: [PATCH] net/octeontx2: remove useless check before free
 
+[ upstream commit 29892e064c1813927195fdbb7d80aede1ccd017d ]
+
 The glibc free allows free(NULL) as null operation,
 so remove this useless null checks.
 
 Coverity issue: 357719
 Fixes: da138cd47e06 ("net/octeontx2: handle port reconfigure")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Acked-by: Jerin Jacob <jerinj@marvell.com>
@@ -17,10 +18,10 @@
  1 file changed, 2 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
-index 03d81faef1..b69b92bf58 100644
+index 41930c5df0..c952373be4 100644
 --- a/drivers/net/octeontx2/otx2_ethdev.c
 +++ b/drivers/net/octeontx2/otx2_ethdev.c
-@@ -1383,10 +1383,8 @@ nix_store_queue_cfg_and_then_release(struct rte_eth_dev *eth_dev)
+@@ -1170,10 +1170,8 @@ nix_store_queue_cfg_and_then_release(struct rte_eth_dev *eth_dev)
  	return 0;
  
  fail:

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

* [dpdk-stable] patch 'net/pcap: fix crash on exit for infinite Rx' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (172 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/octeontx2: remove useless check before free' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/failsafe: fix state synchro cleanup' " luca.boccassi
                   ` (32 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 8d628c33c4e016f5f06c0550448d4c7bae9209af Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Fri, 9 Oct 2020 16:50:39 +0100
Subject: [PATCH] net/pcap: fix crash on exit for infinite Rx

[ upstream commit fbedd8ca9e6807df022af8fde9b1d6d2c87fda6d ]

If the infinite Rx argument ('infinite_rx') is provided a ring is
allocated and filled in the '.rx_queue_setup' dev_ops.
Later this ring freed in the '.dev_close' dev_ops.

If the 'infinite_rx' provided and '.dev_close' called before
'.rx_queue_setup', the ring will be NULL and trying to empty/free it
will cause a crash.

This is fixed by adding ring NULL check before trying to empty/free it.

Bugzilla ID: 548
Fixes: a3f5252e5cbd ("net/pcap: enable infinitely Rx a pcap file")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/pcap/rte_eth_pcap.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 6fb26c8c9d..fbff559c0a 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -735,6 +735,13 @@ eth_dev_close(struct rte_eth_dev *dev)
 			struct pcap_rx_queue *pcap_q = &internals->rx_queue[i];
 			struct rte_mbuf *pcap_buf;
 
+			/*
+			 * 'pcap_q->pkts' can be NULL if 'eth_dev_close()'
+			 * called before 'eth_rx_queue_setup()' has been called
+			 */
+			if (pcap_q->pkts == NULL)
+				continue;
+
 			while (!rte_ring_dequeue(pcap_q->pkts,
 					(void **)&pcap_buf))
 				rte_pktmbuf_free(pcap_buf);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.152151375 +0000
+++ 0175-net-pcap-fix-crash-on-exit-for-infinite-Rx.patch	2020-10-28 10:35:11.784834145 +0000
@@ -1,8 +1,10 @@
-From fbedd8ca9e6807df022af8fde9b1d6d2c87fda6d Mon Sep 17 00:00:00 2001
+From 8d628c33c4e016f5f06c0550448d4c7bae9209af Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit@intel.com>
 Date: Fri, 9 Oct 2020 16:50:39 +0100
 Subject: [PATCH] net/pcap: fix crash on exit for infinite Rx
 
+[ upstream commit fbedd8ca9e6807df022af8fde9b1d6d2c87fda6d ]
+
 If the infinite Rx argument ('infinite_rx') is provided a ring is
 allocated and filled in the '.rx_queue_setup' dev_ops.
 Later this ring freed in the '.dev_close' dev_ops.
@@ -15,7 +17,6 @@
 
 Bugzilla ID: 548
 Fixes: a3f5252e5cbd ("net/pcap: enable infinitely Rx a pcap file")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
 ---
@@ -23,10 +24,10 @@
  1 file changed, 7 insertions(+)
 
 diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
-index 057aa9dbfc..49764c0ee6 100644
+index 6fb26c8c9d..fbff559c0a 100644
 --- a/drivers/net/pcap/rte_eth_pcap.c
 +++ b/drivers/net/pcap/rte_eth_pcap.c
-@@ -748,6 +748,13 @@ eth_dev_close(struct rte_eth_dev *dev)
+@@ -735,6 +735,13 @@ eth_dev_close(struct rte_eth_dev *dev)
  			struct pcap_rx_queue *pcap_q = &internals->rx_queue[i];
  			struct rte_mbuf *pcap_buf;
  

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

* [dpdk-stable] patch 'net/failsafe: fix state synchro cleanup' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (173 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/pcap: fix crash on exit for infinite Rx' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/ring: check internal arguments' " luca.boccassi
                   ` (31 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Gaetan Rivet; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 382958f4fef1a0d857939a460f98200fc8b8a635 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 6c27645b96..98fbdefc50 100644
--- a/drivers/net/failsafe/failsafe_ether.c
+++ b/drivers/net/failsafe/failsafe_ether.c
@@ -383,14 +383,23 @@ failsafe_dev_remove(struct rte_eth_dev *dev)
 	struct sub_device *sdev;
 	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);
+	}
 }
 
 static int
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.181223024 +0000
+++ 0176-net-failsafe-fix-state-synchro-cleanup.patch	2020-10-28 10:35:11.784834145 +0000
@@ -1,8 +1,10 @@
-From 352074b3a4b1518f3c1ec70865c407f135d8fa4d Mon Sep 17 00:00:00 2001
+From 382958f4fef1a0d857939a460f98200fc8b8a635 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.
@@ -14,7 +16,6 @@
 and stats saving to active devices.
 
 Fixes: 598fb8aec6f6 ("net/failsafe: support device removal")
-Cc: stable@dpdk.org
 
 Signed-off-by: Gaetan Rivet <grive@u256.net>
 ---
@@ -22,7 +23,7 @@
  1 file changed, 16 insertions(+), 7 deletions(-)
 
 diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c
-index 7c68bbdec0..f18935a7e2 100644
+index 6c27645b96..98fbdefc50 100644
 --- a/drivers/net/failsafe/failsafe_ether.c
 +++ b/drivers/net/failsafe/failsafe_ether.c
 @@ -383,14 +383,23 @@ failsafe_dev_remove(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/ring: check internal arguments' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (174 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/failsafe: fix state synchro cleanup' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'doc: fix EF10 Rx mode name in sfc guide' " luca.boccassi
                   ` (30 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Kevin Laatz; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From f0a2c7875173de240a75e5f6fedbb5d9068b4d40 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 f0fafa0c0d..f35f54e78d 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -16,6 +16,7 @@
 #define ETH_RING_ACTION_CREATE		"CREATE"
 #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[] = {
 	ETH_RING_NUMA_NODE_ACTION_ARG,
@@ -539,8 +540,21 @@ 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.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.210498506 +0000
+++ 0177-net-ring-check-internal-arguments.patch	2020-10-28 10:35:11.784834145 +0000
@@ -1,15 +1,16 @@
-From e37bbe212d48a7375a6239478a114829d05692b5 Mon Sep 17 00:00:00 2001
+From f0a2c7875173de240a75e5f6fedbb5d9068b4d40 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")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -18,7 +19,7 @@
  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 83c5502123..22c0802688 100644
+index f0fafa0c0d..f35f54e78d 100644
 --- a/drivers/net/ring/rte_eth_ring.c
 +++ b/drivers/net/ring/rte_eth_ring.c
 @@ -16,6 +16,7 @@
@@ -29,7 +30,7 @@
  
  static const char *valid_arguments[] = {
  	ETH_RING_NUMA_NODE_ACTION_ARG,
-@@ -571,8 +572,21 @@ parse_internal_args(const char *key __rte_unused, const char *value,
+@@ -539,8 +540,21 @@ parse_internal_args(const char *key __rte_unused, const char *value,
  {
  	struct ring_internal_args **internal_args = data;
  	void *args;

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

* [dpdk-stable] patch 'doc: fix EF10 Rx mode name in sfc guide' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (175 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/ring: check internal arguments' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'doc: fix typo in pcap " luca.boccassi
                   ` (29 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 0761181778c5a055841861f2fb50ad0a5949f3cc 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 67d9b054d5..f79ebf518c 100644
--- a/doc/guides/nics/sfc_efx.rst
+++ b/doc/guides/nics/sfc_efx.rst
@@ -295,7 +295,7 @@ whitelist option like "-w 02:00.0,arg1=value1,...".
 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.
   **auto** allows the driver itself to make a choice based on firmware
@@ -304,7 +304,7 @@ boolean parameters value.
   **ef10** chooses EF10 (SFN7xxx, SFN8xxx, X2xxx) native datapath which is
   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.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.238874420 +0000
+++ 0178-doc-fix-EF10-Rx-mode-name-in-sfc-guide.patch	2020-10-28 10:35:11.784834145 +0000
@@ -1,10 +1,11 @@
-From e1ecb6c775c81553750853f894a8655781a91cef Mon Sep 17 00:00:00 2001
+From 0761181778c5a055841861f2fb50ad0a5949f3cc 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")
-Cc: stable@dpdk.org
 
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
 ---
@@ -12,10 +13,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/doc/guides/nics/sfc_efx.rst b/doc/guides/nics/sfc_efx.rst
-index ab44ce66c8..812c1e7951 100644
+index 67d9b054d5..f79ebf518c 100644
 --- a/doc/guides/nics/sfc_efx.rst
 +++ b/doc/guides/nics/sfc_efx.rst
-@@ -297,7 +297,7 @@ whitelist option like "-w 02:00.0,arg1=value1,...".
+@@ -295,7 +295,7 @@ whitelist option like "-w 02:00.0,arg1=value1,...".
  Case-insensitive 1/y/yes/on or 0/n/no/off may be used to specify
  boolean parameters value.
  
@@ -24,7 +25,7 @@
  
    Choose receive datapath implementation.
    **auto** allows the driver itself to make a choice based on firmware
-@@ -306,7 +306,7 @@ boolean parameters value.
+@@ -304,7 +304,7 @@ boolean parameters value.
    **ef10** chooses EF10 (SFN7xxx, SFN8xxx, X2xxx) native datapath which is
    more efficient than libefx-based and provides richer packet type
    classification.

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

* [dpdk-stable] patch 'doc: fix typo in pcap guide' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (176 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'doc: fix EF10 Rx mode name in sfc guide' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/bnx2x: add QLogic vendor id for BCM57840' " luca.boccassi
                   ` (28 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Sarosh Arif; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From c6ac3ee9787e56f76a30692efb0904d874f4ad48 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 cf230ae40a..8fdb49179a 100644
--- a/doc/guides/nics/pcap_ring.rst
+++ b/doc/guides/nics/pcap_ring.rst
@@ -166,7 +166,7 @@ Forward packets through two network interfaces:
 .. code-block:: console
 
     $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.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.267487672 +0000
+++ 0179-doc-fix-typo-in-pcap-guide.patch	2020-10-28 10:35:11.784834145 +0000
@@ -1,13 +1,14 @@
-From a09272436e5a60d9dedd901ecf261daade69fb90 Mon Sep 17 00:00:00 2001
+From c6ac3ee9787e56f76a30692efb0904d874f4ad48 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")
-Cc: stable@dpdk.org
 
 Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'net/bnx2x: add QLogic vendor id for BCM57840' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (177 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'doc: fix typo in pcap " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'ethdev: fix memory ordering for callback functions' " luca.boccassi
                   ` (27 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: Souvik Dey, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 6373e6571ebb373139c6904836b2e29fdbe1b448 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 7864b5b80a..8a1a3fc7f9 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -20,6 +20,7 @@ int bnx2x_logtype_driver;
  * The set of PCI devices this driver supports
  */
 #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) },
 	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57711) },
@@ -27,11 +28,13 @@ static const struct rte_pci_id pci_id_bnx2x_map[] = {
 	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57811) },
 	{ 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
 	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57810_MF) },
 	{ 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,6 +44,7 @@ static const struct rte_pci_id pci_id_bnx2xvf_map[] = {
 	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57810_VF) },
 	{ 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.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.295759596 +0000
+++ 0180-net-bnx2x-add-QLogic-vendor-id-for-BCM57840.patch	2020-10-28 10:35:11.788834205 +0000
@@ -1,12 +1,13 @@
-From 9bb607af360e4572e0b64bc2a3edc8c8c6e9e14b Mon Sep 17 00:00:00 2001
+From 6373e6571ebb373139c6904836b2e29fdbe1b448 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")
-Cc: stable@dpdk.org
 
 Reported-by: Souvik Dey <sodey@rbbn.com>
 Signed-off-by: Rasesh Mody <rmody@marvell.com>
@@ -15,10 +16,10 @@
  1 file changed, 4 insertions(+)
 
 diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
-index 40225b2f44..ce9df87489 100644
+index 7864b5b80a..8a1a3fc7f9 100644
 --- a/drivers/net/bnx2x/bnx2x_ethdev.c
 +++ b/drivers/net/bnx2x/bnx2x_ethdev.c
-@@ -17,6 +17,7 @@
+@@ -20,6 +20,7 @@ int bnx2x_logtype_driver;
   * The set of PCI devices this driver supports
   */
  #define BROADCOM_PCI_VENDOR_ID 0x14E4
@@ -26,7 +27,7 @@
  static const struct rte_pci_id pci_id_bnx2x_map[] = {
  	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57800) },
  	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57711) },
-@@ -24,11 +25,13 @@ static const struct rte_pci_id pci_id_bnx2x_map[] = {
+@@ -27,11 +28,13 @@ static const struct rte_pci_id pci_id_bnx2x_map[] = {
  	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57811) },
  	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57840_OBS) },
  	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57840_4_10) },
@@ -40,7 +41,7 @@
  #endif
  	{ .vendor_id = 0, }
  };
-@@ -38,6 +41,7 @@ static const struct rte_pci_id pci_id_bnx2xvf_map[] = {
+@@ -41,6 +44,7 @@ static const struct rte_pci_id pci_id_bnx2xvf_map[] = {
  	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57810_VF) },
  	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57811_VF) },
  	{ RTE_PCI_DEVICE(BROADCOM_PCI_VENDOR_ID, CHIP_NUM_57840_VF) },

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

* [dpdk-stable] patch 'ethdev: fix memory ordering for callback functions' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (178 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'net/bnx2x: add QLogic vendor id for BCM57840' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix handshake synchronization' " luca.boccassi
                   ` (26 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Honnappa Nagarahalli
  Cc: Ola Liljedahl, Phil Yang, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 67ba3dd4691d213d5d8d3988384edfa90bfc747d 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 984b5caa9d..d74429a9e7 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -4435,12 +4435,20 @@ rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
 		rte_eth_devices[port_id].post_rx_burst_cbs[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);
 
@@ -4521,12 +4529,20 @@ rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
 		rte_eth_devices[port_id].pre_tx_burst_cbs[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);
 
@@ -4557,7 +4573,7 @@ rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
 		cb = *prev_cb;
 		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;
 		}
@@ -4591,7 +4607,7 @@ rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id,
 		cb = *prev_cb;
 		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 d1a593ad11..51f9f2569f 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -3612,7 +3612,8 @@ struct rte_eth_rxtx_callback;
  *   The callback function
  * @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
  *   NULL on error.
@@ -3641,7 +3642,8 @@ rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
  *   The callback function
  * @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
  *   NULL on error.
@@ -3669,7 +3671,8 @@ rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id,
  *   The callback function
  * @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
  *   NULL on error.
@@ -3694,7 +3697,9 @@ rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
  *   on that queue.
  *
  * - 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
  *   The port identifier of the Ethernet device.
@@ -3727,7 +3732,9 @@ int rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
  *   on that queue.
  *
  * - 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
  *   The port identifier of the Ethernet device.
@@ -4388,10 +4395,18 @@ rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,
 				     rx_pkts, nb_pkts);
 
 #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,
 						nb_pkts, cb->param);
@@ -4652,7 +4667,16 @@ rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,
 #endif
 
 #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)) {
 		do {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.325166133 +0000
+++ 0181-ethdev-fix-memory-ordering-for-callback-functions.patch	2020-10-28 10:35:11.792834263 +0000
@@ -1,15 +1,16 @@
-From 2b69bd1179162f69c0a90d5b09309498d362b3d7 Mon Sep 17 00:00:00 2001
+From 67ba3dd4691d213d5d8d3988384edfa90bfc747d 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")
-Cc: stable@dpdk.org
 
 Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
 Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
@@ -21,10 +22,10 @@
  2 files changed, 55 insertions(+), 15 deletions(-)
 
 diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
-index 2198548663..7eaeccc19d 100644
+index 984b5caa9d..d74429a9e7 100644
 --- a/lib/librte_ethdev/rte_ethdev.c
 +++ b/lib/librte_ethdev/rte_ethdev.c
-@@ -4610,12 +4610,20 @@ rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
+@@ -4435,12 +4435,20 @@ rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
  		rte_eth_devices[port_id].post_rx_burst_cbs[queue_id];
  
  	if (!tail) {
@@ -47,7 +48,7 @@
  	}
  	rte_spinlock_unlock(&rte_eth_rx_cb_lock);
  
-@@ -4700,12 +4708,20 @@ rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
+@@ -4521,12 +4529,20 @@ rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
  		rte_eth_devices[port_id].pre_tx_burst_cbs[queue_id];
  
  	if (!tail) {
@@ -70,7 +71,7 @@
  	}
  	rte_spinlock_unlock(&rte_eth_tx_cb_lock);
  
-@@ -4736,7 +4752,7 @@ rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
+@@ -4557,7 +4573,7 @@ rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
  		cb = *prev_cb;
  		if (cb == user_cb) {
  			/* Remove the user cb from the callback list. */
@@ -79,7 +80,7 @@
  			ret = 0;
  			break;
  		}
-@@ -4770,7 +4786,7 @@ rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id,
+@@ -4591,7 +4607,7 @@ rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id,
  		cb = *prev_cb;
  		if (cb == user_cb) {
  			/* Remove the user cb from the callback list. */
@@ -89,10 +90,10 @@
  			break;
  		}
 diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
-index f07dbc4d26..c37b3a1a81 100644
+index d1a593ad11..51f9f2569f 100644
 --- a/lib/librte_ethdev/rte_ethdev.h
 +++ b/lib/librte_ethdev/rte_ethdev.h
-@@ -3911,7 +3911,8 @@ struct rte_eth_rxtx_callback;
+@@ -3612,7 +3612,8 @@ struct rte_eth_rxtx_callback;
   *   The callback function
   * @param user_param
   *   A generic pointer parameter which will be passed to each invocation of the
@@ -102,7 +103,7 @@
   *
   * @return
   *   NULL on error.
-@@ -3940,7 +3941,8 @@ rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
+@@ -3641,7 +3642,8 @@ rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
   *   The callback function
   * @param user_param
   *   A generic pointer parameter which will be passed to each invocation of the
@@ -112,7 +113,7 @@
   *
   * @return
   *   NULL on error.
-@@ -3968,7 +3970,8 @@ rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id,
+@@ -3669,7 +3671,8 @@ rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id,
   *   The callback function
   * @param user_param
   *   A generic pointer parameter which will be passed to each invocation of the
@@ -122,7 +123,7 @@
   *
   * @return
   *   NULL on error.
-@@ -3993,7 +3996,9 @@ rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
+@@ -3694,7 +3697,9 @@ rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
   *   on that queue.
   *
   * - After a short delay - where the delay is sufficient to allow any
@@ -133,7 +134,7 @@
   *
   * @param port_id
   *   The port identifier of the Ethernet device.
-@@ -4026,7 +4031,9 @@ int rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
+@@ -3727,7 +3732,9 @@ int rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
   *   on that queue.
   *
   * - After a short delay - where the delay is sufficient to allow any
@@ -144,7 +145,7 @@
   *
   * @param port_id
   *   The port identifier of the Ethernet device.
-@@ -4687,10 +4694,18 @@ rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,
+@@ -4388,10 +4395,18 @@ rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,
  				     rx_pkts, nb_pkts);
  
  #ifdef RTE_ETHDEV_RXTX_CALLBACKS
@@ -166,7 +167,7 @@
  		do {
  			nb_rx = cb->fn.rx(port_id, queue_id, rx_pkts, nb_rx,
  						nb_pkts, cb->param);
-@@ -4953,7 +4968,16 @@ rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,
+@@ -4652,7 +4667,16 @@ rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,
  #endif
  
  #ifdef RTE_ETHDEV_RXTX_CALLBACKS

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

* [dpdk-stable] patch 'distributor: fix handshake synchronization' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (179 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'ethdev: fix memory ordering for callback functions' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix handshake deadlock' " luca.boccassi
                   ` (25 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From c4f615c8172d4fa24d2e8486bfe0b0386b13838e 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_single.c |  4 ++++
 2 files changed, 16 insertions(+)

diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
index 1c047f065a..c6b19a3886 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -169,6 +169,18 @@ rte_distributor_return_pkt(struct rte_distributor *d,
 			return -EINVAL;
 	}
 
+	/* 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);
 	for (i = 0; i < RTE_DIST_BURST_SIZE; i++)
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
@@ -74,6 +74,10 @@ rte_distributor_return_pkt_single(struct rte_distributor_single *d,
 	union rte_distributor_buffer_single *buf = &d->bufs[worker_id];
 	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);
 	return 0;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.363747343 +0000
+++ 0182-distributor-fix-handshake-synchronization.patch	2020-10-28 10:35:11.796834322 +0000
@@ -1,8 +1,10 @@
-From bea84d5592eb2658cf8c36214a9db75d398efa1c Mon Sep 17 00:00:00 2001
+From c4f615c8172d4fa24d2e8486bfe0b0386b13838e 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
@@ -13,7 +15,6 @@
 handshake on it is cleared by distributor lcore.
 
 Fixes: 775003ad2f96 ("distributor: add new burst-capable library")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Acked-by: David Hunt <david.hunt@intel.com>

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

* [dpdk-stable] patch 'distributor: fix handshake deadlock' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (180 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix handshake synchronization' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix buffer use after free' " luca.boccassi
                   ` (24 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From e5fc315a5f05aaa14b099618a4076d8dcc82f7e1 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 c6b19a3886..d6d4350a28 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -319,12 +319,14 @@ release(struct rte_distributor *d, unsigned int wkr)
 	struct rte_distributor_buffer *buf = &(d->bufs[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;
 
@@ -374,6 +376,7 @@ rte_distributor_process(struct rte_distributor *d,
 		/* 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) {
 				release(d, wid);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.392993092 +0000
+++ 0183-distributor-fix-handshake-deadlock.patch	2020-10-28 10:35:11.796834322 +0000
@@ -1,8 +1,10 @@
-From 5acce079e7dc773c17bf2043fc18106392b4a863 Mon Sep 17 00:00:00 2001
+From e5fc315a5f05aaa14b099618a4076d8dcc82f7e1 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.
@@ -21,7 +23,6 @@
 packets while waiting to release new.
 
 Fixes: 775003ad2f96 ("distributor: add new burst-capable library")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Acked-by: David Hunt <david.hunt@intel.com>

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

* [dpdk-stable] patch 'distributor: fix buffer use after free' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (181 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix handshake deadlock' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: handle worker shutdown in burst mode' " luca.boccassi
                   ` (23 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 56cf2de232b0fb7195abfd379410845b595c9d9b 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>
---
 app/test/test_distributor.c              | 28 +++++++++---------------
 lib/librte_distributor/rte_distributor.c |  4 ++--
 2 files changed, 12 insertions(+), 20 deletions(-)

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
@@ -62,13 +62,10 @@ handle_work(void *arg)
 	struct rte_mbuf *buf[8] __rte_cache_aligned;
 	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 = __atomic_fetch_add(&worker_idx, 1, __ATOMIC_RELAXED);
-	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,
 				__ATOMIC_RELAXED);
@@ -272,19 +269,16 @@ handle_work_with_free_mbufs(void *arg)
 	struct rte_distributor *d = wp->dist;
 	unsigned int count = 0;
 	unsigned int i;
-	unsigned int num = 0;
+	unsigned int num;
 	unsigned int id = __atomic_fetch_add(&worker_idx, 1, __ATOMIC_RELAXED);
 
-	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;
 		count += num;
 		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;
 	count += num;
@@ -342,14 +336,14 @@ handle_work_for_shutdown_test(void *arg)
 	struct worker_params *wp = 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;
 	unsigned int returned = 0;
 	const unsigned int id = __atomic_fetch_add(&worker_idx, 1,
 			__ATOMIC_RELAXED);
 
-	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
 	 * for zero_quit */
@@ -358,8 +352,7 @@ handle_work_for_shutdown_test(void *arg)
 		count += num;
 		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;
 	}
 	worker_stats[id].handled_packets += num;
@@ -373,14 +366,13 @@ handle_work_for_shutdown_test(void *arg)
 		while (zero_quit)
 			usleep(100);
 
-		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;
 			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,
 				id, buf, num);
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
@@ -42,7 +42,7 @@ 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;
 	}
 
@@ -134,7 +134,7 @@ rte_distributor_get_pkt(struct rte_distributor *d,
 	if (unlikely(d->alg_type == RTE_DIST_ALG_SINGLE)) {
 		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
 			return -EINVAL;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.422557693 +0000
+++ 0184-distributor-fix-buffer-use-after-free.patch	2020-10-28 10:35:11.796834322 +0000
@@ -1,8 +1,10 @@
-From 6bd951b48222caaa10a796057f617cab04f928b0 Mon Sep 17 00:00:00 2001
+From 56cf2de232b0fb7195abfd379410845b595c9d9b 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.
@@ -14,7 +16,6 @@
 0 as number of returned packets, where packets are not returned.
 
 Fixes: 775003ad2f96 ("distributor: add new burst-capable library")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Acked-by: David Hunt <david.hunt@intel.com>

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

* [dpdk-stable] patch 'distributor: handle worker shutdown in burst mode' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (182 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix buffer use after free' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: fix shutdown of busy worker' " luca.boccassi
                   ` (22 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From bb35b7dda957003f4b0828d2c81509d7218fd241 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/distributor_private.h |   3 +
 lib/librte_distributor/rte_distributor.c     | 175 +++++++++++++++----
 2 files changed, 146 insertions(+), 32 deletions(-)

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
@@ -155,6 +155,9 @@ struct rte_distributor {
 	enum rte_distributor_match_function dist_match_fn;
 
 	struct rte_distributor_single *d_single;
+
+	uint8_t active[RTE_DISTRIB_MAX_WORKERS];
+	uint8_t activesum;
 };
 
 void
diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c
index 93c90cf543..7aa079d53c 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -51,7 +51,7 @@ rte_distributor_request_pkt(struct rte_distributor *d,
 	 * Sync with worker on GET_BUF flag.
 	 */
 	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;
 
@@ -67,11 +67,11 @@ rte_distributor_request_pkt(struct rte_distributor *d,
 	for (i = count; i < RTE_DIST_BURST_SIZE; i++)
 		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;
 
 	/*
 	 * Finally, set the GET_BUF  to signal to distributor that cache
@@ -97,11 +97,13 @@ rte_distributor_poll_pkt(struct rte_distributor *d,
 		return (pkts[0]) ? 1 : 0;
 	}
 
-	/* 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;
 
 	/* since bufptr64 is signed, this should be an arithmetic shift */
@@ -113,7 +115,7 @@ rte_distributor_poll_pkt(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.
 	 * Sync with distributor on GET_BUF flag. Release bufptrs.
@@ -173,7 +175,7 @@ rte_distributor_return_pkt(struct rte_distributor *d,
 	 * Sync with worker on GET_BUF flag.
 	 */
 	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;
 
@@ -185,17 +187,25 @@ rte_distributor_return_pkt(struct rte_distributor *d,
 	__atomic_thread_fence(__ATOMIC_ACQUIRE);
 	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;
 }
@@ -265,6 +275,59 @@ 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);
+}
+
 
 /*
  * When the handshake bits indicate that there are packets coming
@@ -283,19 +346,33 @@ 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));
 				/* store returns in a circular buffer */
 				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.
 		 */
@@ -320,11 +397,15 @@ release(struct rte_distributor *d, unsigned int wkr)
 	unsigned int i;
 
 	handle_returns(d, wkr);
+	if (unlikely(!d->active[wkr]))
+		return 0;
 
 	/* Sync with worker on GET_BUF flag */
 	while (!(__atomic_load_n(&(d->bufs[wkr].bufptr64[0]), __ATOMIC_ACQUIRE)
 		& RTE_DISTRIB_GET_BUF)) {
 		handle_returns(d, wkr);
+		if (unlikely(!d->active[wkr]))
+			return 0;
 		rte_pause();
 	}
 
@@ -364,7 +445,7 @@ rte_distributor_process(struct rte_distributor *d,
 	int64_t next_value = 0;
 	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) {
 		/* Call the old API */
@@ -372,11 +453,13 @@ rte_distributor_process(struct rte_distributor *d,
 			mbufs, num_mbufs);
 	}
 
+	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) {
 				release(d, wid);
@@ -386,6 +469,9 @@ rte_distributor_process(struct rte_distributor *d,
 		return 0;
 	}
 
+	if (unlikely(!d->activesum))
+		return 0;
+
 	while (next_idx < num_mbufs) {
 		uint16_t matches[RTE_DIST_BURST_SIZE];
 		unsigned int pkts;
@@ -410,22 +496,30 @@ rte_distributor_process(struct rte_distributor *d,
 		for (; i < RTE_DIST_BURST_SIZE; i++)
 			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
 		 * the incoming packets. Any zeroes need to be assigned
 		 * workers.
 		 */
 
-		for (j = 0; j < pkts; j++) {
-
 			next_mb = mbufs[next_idx++];
 			next_value = (((int64_t)(uintptr_t)next_mb) <<
 					RTE_DISTRIB_FLAG_BITS);
@@ -445,12 +539,18 @@ rte_distributor_process(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];
 				if (unlikely(bl->count ==
 						RTE_DIST_BURST_SIZE)) {
 					release(d, matches[j]-1);
+					if (!d->active[matches[j]-1]) {
+						j--;
+						next_idx--;
+						matching_required = 1;
+						continue;
+					}
 				}
 
 				/* Add to worker that already has flow */
@@ -460,11 +560,21 @@ rte_distributor_process(struct rte_distributor *d,
 				bl->pkts[idx] = next_value;
 
 			} 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;
+					}
 				}
 
 				/* Add to current worker worker */
@@ -483,9 +593,7 @@ rte_distributor_process(struct rte_distributor *d,
 						matches[w] = wkr+1;
 			}
 		}
-		wkr++;
-		if (wkr >= d->num_workers)
-			wkr = 0;
+		wkr = (wkr + 1) % d->num_workers;
 	}
 
 	/* Flush out all non-full cache-lines to workers. */
@@ -661,6 +769,9 @@ rte_distributor_create(const char *name,
 	for (i = 0 ; i < num_workers ; i++)
 		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);
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.452507691 +0000
+++ 0185-distributor-handle-worker-shutdown-in-burst-mode.patch	2020-10-28 10:35:11.796834322 +0000
@@ -1,8 +1,10 @@
-From 480d5a7c812eedad973dd7143e5fec8e092ff619 Mon Sep 17 00:00:00 2001
+From bb35b7dda957003f4b0828d2c81509d7218fd241 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
@@ -36,7 +38,6 @@
 to react for possible activation deactivation of workers.
 
 Fixes: 775003ad2f96 ("distributor: add new burst-capable library")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Acked-by: David Hunt <david.hunt@intel.com>

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

* [dpdk-stable] patch 'test/distributor: fix shutdown of busy worker' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (183 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: handle worker shutdown in burst mode' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix return pkt calls in single mode' " luca.boccassi
                   ` (21 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 6b792339111a059ebe146e9ea984628f94555958 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>
---
 app/test/test_distributor.c | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
index 52230d2504..dcc4e76a9a 100644
--- a/app/test/test_distributor.c
+++ b/app/test/test_distributor.c
@@ -28,6 +28,7 @@ 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 unsigned worker_idx;
+static volatile unsigned zero_idx;
 
 struct worker_stats {
 	volatile unsigned handled_packets;
@@ -340,26 +341,43 @@ handle_work_for_shutdown_test(void *arg)
 	unsigned int total = 0;
 	unsigned int i;
 	unsigned int returned = 0;
+	unsigned int zero_id = 0;
+	unsigned int zero_unset;
 	const unsigned int id = __atomic_fetch_add(&worker_idx, 1,
 			__ATOMIC_RELAXED);
 
 	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;
 		for (i = 0; i < num; i++)
 			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;
 	}
 	worker_stats[id].handled_packets += num;
 	count += num;
 	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,6 +596,7 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
 	rte_eal_mp_wait_lcore();
 	quit = 0;
 	worker_idx = 0;
+	zero_idx = RTE_MAX_LCORE;
 }
 
 static int
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.482204903 +0000
+++ 0186-test-distributor-fix-shutdown-of-busy-worker.patch	2020-10-28 10:35:11.796834322 +0000
@@ -1,8 +1,10 @@
-From cf669d6930116b80493d67cdc5d7a1a568eed8e9 Mon Sep 17 00:00:00 2001
+From 6b792339111a059ebe146e9ea984628f94555958 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.
@@ -23,7 +25,6 @@
 variable. This way the freezed lcore is always the proper one.
 
 Fixes: c3eabff124e6 ("distributor: add unit tests")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Tested-by: David Hunt <david.hunt@intel.com>
@@ -32,7 +33,7 @@
  1 file changed, 21 insertions(+), 2 deletions(-)
 
 diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
-index 52230d2504..6cd7a2edda 100644
+index 52230d2504..dcc4e76a9a 100644
 --- a/app/test/test_distributor.c
 +++ b/app/test/test_distributor.c
 @@ -28,6 +28,7 @@ struct worker_params worker_params;
@@ -57,7 +58,7 @@
 +	if (num > 0) {
 +		zero_unset = RTE_MAX_LCORE;
 +		__atomic_compare_exchange_n(&zero_idx, &zero_unset, id,
-+			false, __ATOMIC_ACQ_REL, __ATOMIC_ACQUIRE);
++			0, __ATOMIC_ACQ_REL, __ATOMIC_ACQUIRE);
 +	}
 +	zero_id = __atomic_load_n(&zero_idx, __ATOMIC_ACQUIRE);
 +
@@ -74,7 +75,7 @@
 +		if (num > 0) {
 +			zero_unset = RTE_MAX_LCORE;
 +			__atomic_compare_exchange_n(&zero_idx, &zero_unset, id,
-+				false, __ATOMIC_ACQ_REL, __ATOMIC_ACQUIRE);
++				0, __ATOMIC_ACQ_REL, __ATOMIC_ACQUIRE);
 +		}
 +		zero_id = __atomic_load_n(&zero_idx, __ATOMIC_ACQUIRE);
 +

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

* [dpdk-stable] patch 'distributor: fix return pkt calls in single mode' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (184 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: fix shutdown of busy worker' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: fix freeing mbufs' " luca.boccassi
                   ` (20 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From fc18db55809fda46f982d7da75c6848089553094 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 7aa079d53c..6e3eae58f8 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -167,6 +167,9 @@ rte_distributor_return_pkt(struct rte_distributor *d,
 		if (num == 1)
 			return rte_distributor_return_pkt_single(d->d_single,
 				worker_id, oldpkt[0]);
+		else if (num == 0)
+			return rte_distributor_return_pkt_single(d->d_single,
+				worker_id, NULL);
 		else
 			return -EINVAL;
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.510725875 +0000
+++ 0187-distributor-fix-return-pkt-calls-in-single-mode.patch	2020-10-28 10:35:11.800834381 +0000
@@ -1,8 +1,10 @@
-From f25fe0d5e3e0dd1650845eca928f2263898f5a19 Mon Sep 17 00:00:00 2001
+From fc18db55809fda46f982d7da75c6848089553094 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
@@ -16,7 +18,6 @@
 in single mode.
 
 Fixes: 775003ad2f96 ("distributor: add new burst-capable library")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Acked-by: David Hunt <david.hunt@intel.com>

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

* [dpdk-stable] patch 'test/distributor: fix freeing mbufs' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (185 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix return pkt calls in single mode' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: fix lcores statistics' " luca.boccassi
                   ` (19 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 994f141c6bb08069efb1a1d15868391575a72d97 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>
---
 app/test/test_distributor.c | 67 ++++++++++++++++++-------------------
 1 file changed, 33 insertions(+), 34 deletions(-)

diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
index dcc4e76a9a..62495a8c67 100644
--- a/app/test/test_distributor.c
+++ b/app/test/test_distributor.c
@@ -63,20 +63,18 @@ handle_work(void *arg)
 	struct rte_mbuf *buf[8] __rte_cache_aligned;
 	struct worker_params *wp = arg;
 	struct rte_distributor *db = wp->dist;
-	unsigned int count = 0, num;
+	unsigned int num;
 	unsigned int id = __atomic_fetch_add(&worker_idx, 1, __ATOMIC_RELAXED);
 
 	num = rte_distributor_get_pkt(db, id, buf, NULL, 0);
 	while (!quit) {
 		__atomic_fetch_add(&worker_stats[id].handled_packets, num,
 				__ATOMIC_RELAXED);
-		count += num;
 		num = rte_distributor_get_pkt(db, id,
 				buf, buf, num);
 	}
 	__atomic_fetch_add(&worker_stats[id].handled_packets, num,
 			__ATOMIC_RELAXED);
-	count += num;
 	rte_distributor_return_pkt(db, id, buf, num);
 	return 0;
 }
@@ -268,7 +266,6 @@ handle_work_with_free_mbufs(void *arg)
 	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 i;
 	unsigned int num;
 	unsigned int id = __atomic_fetch_add(&worker_idx, 1, __ATOMIC_RELAXED);
@@ -276,13 +273,11 @@ 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;
-		count += num;
 		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;
-	count += num;
 	rte_distributor_return_pkt(d, id, buf, num);
 	return 0;
 }
@@ -308,7 +303,6 @@ sanity_test_with_mbuf_alloc(struct worker_params *wp, struct rte_mempool *p)
 			rte_distributor_process(d, NULL, 0);
 		for (j = 0; j < BURST; j++) {
 			bufs[j]->hash.usr = (i+j) << 1;
-			rte_mbuf_refcnt_set(bufs[j], 1);
 		}
 
 		rte_distributor_process(d, bufs, BURST);
@@ -332,15 +326,10 @@ sanity_test_with_mbuf_alloc(struct worker_params *wp, struct rte_mempool *p)
 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;
 	const unsigned int id = __atomic_fetch_add(&worker_idx, 1,
@@ -359,9 +348,6 @@ handle_work_for_shutdown_test(void *arg)
 	 * for zero_quit */
 	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);
 
 		if (num > 0) {
@@ -370,14 +356,12 @@ handle_work_for_shutdown_test(void *arg)
 				0, __ATOMIC_ACQ_REL, __ATOMIC_ACQUIRE);
 		}
 		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,14 +372,10 @@ 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,7 +391,9 @@ 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,16 +419,17 @@ 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 */
 	rte_distributor_flush(d);
@@ -460,9 +443,15 @@ sanity_test_with_worker_shutdown(struct worker_params *wp,
 		printf("Line %d: Error, not all packets flushed. "
 				"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,7 +465,8 @@ 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,9 +503,14 @@ test_flush_with_worker_shutdown(struct worker_params *wp,
 		printf("Line %d: Error, not all packets flushed. "
 				"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,7 +576,10 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
 	const unsigned num_workers = rte_lcore_count() - 1;
 	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;
 	quit = 1;
@@ -589,11 +587,12 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
 		bufs[i]->hash.usr = i << 1;
 	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;
 	zero_idx = RTE_MAX_LCORE;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.539131387 +0000
+++ 0188-test-distributor-fix-freeing-mbufs.patch	2020-10-28 10:35:11.800834381 +0000
@@ -1,8 +1,10 @@
-From 13b13100eaf6de02e2be428dc4ff5099ba796ab5 Mon Sep 17 00:00:00 2001
+From 994f141c6bb08069efb1a1d15868391575a72d97 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
@@ -20,7 +22,6 @@
 Additionally this patch cleans up unused variables.
 
 Fixes: c0de0eb82e40 ("distributor: switch over to new API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Acked-by: David Hunt <david.hunt@intel.com>
@@ -29,7 +30,7 @@
  1 file changed, 33 insertions(+), 34 deletions(-)
 
 diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
-index 6cd7a2edda..ec1fe348ba 100644
+index dcc4e76a9a..62495a8c67 100644
 --- a/app/test/test_distributor.c
 +++ b/app/test/test_distributor.c
 @@ -63,20 +63,18 @@ handle_work(void *arg)
@@ -111,7 +112,7 @@
  
  		if (num > 0) {
 @@ -370,14 +356,12 @@ handle_work_for_shutdown_test(void *arg)
- 				false, __ATOMIC_ACQ_REL, __ATOMIC_ACQUIRE);
+ 				0, __ATOMIC_ACQ_REL, __ATOMIC_ACQUIRE);
  		}
  		zero_id = __atomic_load_n(&zero_idx, __ATOMIC_ACQUIRE);
 -

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

* [dpdk-stable] patch 'test/distributor: fix lcores statistics' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (186 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: fix freeing mbufs' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: collect return mbufs' " luca.boccassi
                   ` (18 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 2ceaaa8d33c635f5f9d56e5b4f20387d7a53b932 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>
---
 app/test/test_distributor.c | 39 +++++++++++++++++++++++++------------
 1 file changed, 27 insertions(+), 12 deletions(-)

diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
index 62495a8c67..6e5bdc3f60 100644
--- a/app/test/test_distributor.c
+++ b/app/test/test_distributor.c
@@ -43,7 +43,8 @@ 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;
 }
 
@@ -51,7 +52,10 @@ total_packet_count(void)
 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);
 }
 
 /* this is the basic worker function for sanity test
@@ -129,7 +133,8 @@ 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");
 
 	/* pick two flows and check they go correctly */
@@ -154,7 +159,9 @@ 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");
 	}
 
@@ -180,7 +187,8 @@ 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");
 
 	rte_mempool_put_bulk(p, (void *)bufs, BURST);
@@ -272,12 +280,14 @@ 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,7 +357,8 @@ handle_work_for_shutdown_test(void *arg)
 	/* wait for quit single globally, or for worker zero, wait
 	 * 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);
 
 		if (num > 0) {
@@ -357,8 +368,9 @@ 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,7 +383,8 @@ handle_work_for_shutdown_test(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);
 			num = rte_distributor_get_pkt(d, id, buf, NULL, 0);
 		}
 	}
@@ -437,7 +450,8 @@ 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) {
 		printf("Line %d: Error, not all packets flushed. "
@@ -497,7 +511,8 @@ test_flush_with_worker_shutdown(struct worker_params *wp,
 	zero_quit = 0;
 	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) {
 		printf("Line %d: Error, not all packets flushed. "
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.568182056 +0000
+++ 0189-test-distributor-fix-lcores-statistics.patch	2020-10-28 10:35:11.800834381 +0000
@@ -1,8 +1,10 @@
-From 2dfdfcb404493a781d152afbc85a2a8a5b90580b Mon Sep 17 00:00:00 2001
+From 2ceaaa8d33c635f5f9d56e5b4f20387d7a53b932 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.
 
@@ -11,7 +13,6 @@
 Relaxed memory model is used.
 
 Fixes: c3eabff124e6 ("distributor: add unit tests")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Acked-by: David Hunt <david.hunt@intel.com>
@@ -21,7 +22,7 @@
  1 file changed, 27 insertions(+), 12 deletions(-)
 
 diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
-index ec1fe348ba..4343efed14 100644
+index 62495a8c67..6e5bdc3f60 100644
 --- a/app/test/test_distributor.c
 +++ b/app/test/test_distributor.c
 @@ -43,7 +43,8 @@ total_packet_count(void)

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

* [dpdk-stable] patch 'test/distributor: collect return mbufs' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (187 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: fix lcores statistics' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix API documentation' " luca.boccassi
                   ` (17 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 3a30ad139a83687e015de9dadc762013d45e3be4 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>
---
 app/test/test_distributor.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
index 6e5bdc3f60..7219925521 100644
--- a/app/test/test_distributor.c
+++ b/app/test/test_distributor.c
@@ -591,6 +591,7 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
 	const unsigned num_workers = rte_lcore_count() - 1;
 	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__);
 		return;
@@ -606,6 +607,10 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
 	rte_distributor_flush(d);
 	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);
 
 	quit = 0;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.597055959 +0000
+++ 0190-test-distributor-collect-return-mbufs.patch	2020-10-28 10:35:11.800834381 +0000
@@ -1,8 +1,10 @@
-From 79c5e12ac29567ed6c1750f732f04619c2a9cc7a Mon Sep 17 00:00:00 2001
+From 3a30ad139a83687e015de9dadc762013d45e3be4 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
@@ -12,7 +14,6 @@
 
 Fixes: c3eabff124e6 ("distributor: add unit tests")
 Fixes: c0de0eb82e40 ("distributor: switch over to new API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Acked-by: David Hunt <david.hunt@intel.com>
@@ -21,7 +22,7 @@
  1 file changed, 5 insertions(+)
 
 diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
-index 4343efed14..3f0aeb7b90 100644
+index 6e5bdc3f60..7219925521 100644
 --- a/app/test/test_distributor.c
 +++ b/app/test/test_distributor.c
 @@ -591,6 +591,7 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)

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

* [dpdk-stable] patch 'distributor: fix API documentation' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (188 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: collect return mbufs' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: fix race conditions on shutdown' " luca.boccassi
                   ` (16 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 7c3f944d2fec17fad74d96e36fa93dcd6d0aad84 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
@@ -155,7 +155,7 @@ rte_distributor_clear_returns(struct rte_distributor *d);
  * @param pkts
  *   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
  *
@@ -187,15 +187,15 @@ 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
  *   The distributor instance to be used
@@ -213,9 +213,9 @@ rte_distributor_request_pkt(struct rte_distributor *d,
 		unsigned int count);
 
 /**
- * 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.
  *
  * @param d
@@ -227,8 +227,9 @@ rte_distributor_request_pkt(struct rte_distributor *d,
  *   The array of mbufs being given to the worker
  *
  * @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
 rte_distributor_poll_pkt(struct rte_distributor *d,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.626301998 +0000
+++ 0191-distributor-fix-API-documentation.patch	2020-10-28 10:35:11.800834381 +0000
@@ -1,15 +1,16 @@
-From ed4be82d9e645c86ccd16938bdb200cdecaa2906 Mon Sep 17 00:00:00 2001
+From 7c3f944d2fec17fad74d96e36fa93dcd6d0aad84 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")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Acked-by: David Hunt <david.hunt@intel.com>

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

* [dpdk-stable] patch 'test/distributor: fix race conditions on shutdown' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (189 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix API documentation' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix scalar matching' " luca.boccassi
                   ` (15 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From c26c6e434ba2fe8863f8a6fce27b030703742243 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>
---
 app/test/test_distributor.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
index 7219925521..e9e8e2c7af 100644
--- a/app/test/test_distributor.c
+++ b/app/test/test_distributor.c
@@ -27,6 +27,7 @@ struct worker_params worker_params;
 /* statics - all zero-initialized by default */
 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,8 +378,10 @@ handle_work_for_shutdown_test(void *arg)
 		/* for worker zero, allow it to restart to pick up last packet
 		 * 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,7 +449,12 @@ 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++)
 		printf("Worker %u handled %u packets\n", i,
@@ -506,9 +514,14 @@ test_flush_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++)
 		printf("Worker %u handled %u packets\n", i,
 			__atomic_load_n(&worker_stats[i].handled_packets,
@@ -616,6 +629,8 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
 	quit = 0;
 	worker_idx = 0;
 	zero_idx = RTE_MAX_LCORE;
+	zero_quit = 0;
+	zero_sleep = 0;
 }
 
 static int
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.654469274 +0000
+++ 0192-test-distributor-fix-race-conditions-on-shutdown.patch	2020-10-28 10:35:11.800834381 +0000
@@ -1,15 +1,16 @@
-From 92e69743ed18692a1470396c4e7e47246c2191a5 Mon Sep 17 00:00:00 2001
+From c26c6e434ba2fe8863f8a6fce27b030703742243 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")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Acked-by: David Hunt <david.hunt@intel.com>
@@ -18,7 +19,7 @@
  1 file changed, 17 insertions(+), 2 deletions(-)
 
 diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
-index 3f0aeb7b90..fdb6ea9ceb 100644
+index 7219925521..e9e8e2c7af 100644
 --- a/app/test/test_distributor.c
 +++ b/app/test/test_distributor.c
 @@ -27,6 +27,7 @@ struct worker_params worker_params;

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

* [dpdk-stable] patch 'distributor: fix scalar matching' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (190 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: fix race conditions on shutdown' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix flushing in flight packets' " luca.boccassi
                   ` (14 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 66839753bb9c0fc3400b56b1381d566326fa4f2e 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 6e3eae58f8..9fea3f69ab 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -259,13 +259,13 @@ 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;
 				}
 		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.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.683206866 +0000
+++ 0193-distributor-fix-scalar-matching.patch	2020-10-28 10:35:11.800834381 +0000
@@ -1,15 +1,16 @@
-From 626ceefbf4e1786ded4fed6a4987e3f1d370e9c0 Mon Sep 17 00:00:00 2001
+From 66839753bb9c0fc3400b56b1381d566326fa4f2e 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")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Acked-by: David Hunt <david.hunt@intel.com>

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

* [dpdk-stable] patch 'distributor: fix flushing in flight packets' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (191 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix scalar matching' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix clearing returns buffer' " luca.boccassi
                   ` (13 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From a5b5ebfb5a41ff69bf7bba06ac6b8cc9e2d45d10 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 9fea3f69ab..fb4e9d93f9 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -465,6 +465,7 @@ rte_distributor_process(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) {
+				d->bufs[wid].count = 0;
 				release(d, wid);
 				handle_returns(d, wid);
 			}
@@ -479,11 +480,6 @@ rte_distributor_process(struct rte_distributor *d,
 		uint16_t matches[RTE_DIST_BURST_SIZE];
 		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;
 		else
@@ -603,8 +599,10 @@ rte_distributor_process(struct rte_distributor *d,
 	for (wid = 0 ; wid < d->num_workers; wid++)
 		/* 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;
 }
@@ -647,7 +645,7 @@ total_outstanding(const struct rte_distributor *d)
 	unsigned int wkr, total_outstanding = 0;
 
 	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.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.712062136 +0000
+++ 0194-distributor-fix-flushing-in-flight-packets.patch	2020-10-28 10:35:11.804834440 +0000
@@ -1,8 +1,10 @@
-From 91d6b8235e726a40b87e9268b9686231eb1f7741 Mon Sep 17 00:00:00 2001
+From a5b5ebfb5a41ff69bf7bba06ac6b8cc9e2d45d10 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
@@ -13,7 +15,6 @@
 count of in flight packets for each worker in bufs[].count.
 
 Fixes: 775003ad2f96 ("distributor: add new burst-capable library")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Acked-by: David Hunt <david.hunt@intel.com>

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

* [dpdk-stable] patch 'distributor: fix clearing returns buffer' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (192 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix flushing in flight packets' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: ensure all packets are delivered' " luca.boccassi
                   ` (12 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 21edfcc889bcb3255af2e340fa207973e95b5c17 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 fb4e9d93f9..ef34facba6 100644
--- a/lib/librte_distributor/rte_distributor.c
+++ b/lib/librte_distributor/rte_distributor.c
@@ -702,6 +702,8 @@ rte_distributor_clear_returns(struct rte_distributor *d)
 		/* Sync with worker. Release retptrs. */
 		__atomic_store_n(&(d->bufs[wkr].retptr64[0]), 0,
 				__ATOMIC_RELEASE);
+
+	d->returns.start = d->returns.count = 0;
 }
 
 /* creates a distributor instance */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.740757907 +0000
+++ 0195-distributor-fix-clearing-returns-buffer.patch	2020-10-28 10:35:11.804834440 +0000
@@ -1,13 +1,14 @@
-From 20fa39d230d1e676c7bfe2a32f958f5851d471fc Mon Sep 17 00:00:00 2001
+From 21edfcc889bcb3255af2e340fa207973e95b5c17 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")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Acked-by: David Hunt <david.hunt@intel.com>

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

* [dpdk-stable] patch 'test/distributor: ensure all packets are delivered' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (193 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix clearing returns buffer' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: fix quitting workers in burst mode' " luca.boccassi
                   ` (11 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From b3d6175b8ea44b5349a643e9140cc787d884a4c1 Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Sat, 17 Oct 2020 05:07:00 +0200
Subject: [PATCH] test/distributor: ensure all packets are delivered

[ upstream commit e1f1400cf6b85bbb6f4b7b088d54758e210343e7 ]

In all distributor tests there is a chance that tests
will send packets to distributor with rte_distributor_process()
before workers are started and requested for packets.

This patch ensures that all packets are delivered to workers
by calling rte_distributor_process() in loop until number
of successfully processed packets reaches required by test.
Change is applied to every first call in test case.

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

diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
index e9e8e2c7af..199f88887d 100644
--- a/app/test/test_distributor.c
+++ b/app/test/test_distributor.c
@@ -103,6 +103,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 	struct rte_mbuf *returns[BURST*2];
 	unsigned int i, count;
 	unsigned int retries;
+	unsigned int processed;
 
 	printf("=== Basic distributor sanity tests ===\n");
 	clear_packet_count();
@@ -116,7 +117,11 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 	for (i = 0; i < BURST; i++)
 		bufs[i]->hash.usr = 0;
 
-	rte_distributor_process(db, bufs, BURST);
+	processed = 0;
+	while (processed < BURST)
+		processed += rte_distributor_process(db, &bufs[processed],
+			BURST - processed);
+
 	count = 0;
 	do {
 
@@ -304,6 +309,7 @@ sanity_test_with_mbuf_alloc(struct worker_params *wp, struct rte_mempool *p)
 	struct rte_distributor *d = wp->dist;
 	unsigned i;
 	struct rte_mbuf *bufs[BURST];
+	unsigned int processed;
 
 	printf("=== Sanity test with mbuf alloc/free (%s) ===\n", wp->name);
 
@@ -316,7 +322,10 @@ sanity_test_with_mbuf_alloc(struct worker_params *wp, struct rte_mempool *p)
 			bufs[j]->hash.usr = (i+j) << 1;
 		}
 
-		rte_distributor_process(d, bufs, BURST);
+		processed = 0;
+		while (processed < BURST)
+			processed += rte_distributor_process(d,
+				&bufs[processed], BURST - processed);
 	}
 
 	rte_distributor_flush(d);
@@ -410,6 +419,7 @@ sanity_test_with_worker_shutdown(struct worker_params *wp,
 	struct rte_mbuf *bufs2[BURST];
 	unsigned int i;
 	unsigned int failed = 0;
+	unsigned int processed = 0;
 
 	printf("=== Sanity test of worker shutdown ===\n");
 
@@ -427,7 +437,10 @@ sanity_test_with_worker_shutdown(struct worker_params *wp,
 	for (i = 0; i < BURST; i++)
 		bufs[i]->hash.usr = 1;
 
-	rte_distributor_process(d, bufs, BURST);
+	processed = 0;
+	while (processed < BURST)
+		processed += rte_distributor_process(d, &bufs[processed],
+			BURST - processed);
 	rte_distributor_flush(d);
 
 	/* at this point, we will have processed some packets and have a full
@@ -489,6 +502,7 @@ test_flush_with_worker_shutdown(struct worker_params *wp,
 	struct rte_mbuf *bufs[BURST];
 	unsigned int i;
 	unsigned int failed = 0;
+	unsigned int processed;
 
 	printf("=== Test flush fn with worker shutdown (%s) ===\n", wp->name);
 
@@ -503,7 +517,10 @@ test_flush_with_worker_shutdown(struct worker_params *wp,
 	for (i = 0; i < BURST; i++)
 		bufs[i]->hash.usr = 0;
 
-	rte_distributor_process(d, bufs, BURST);
+	processed = 0;
+	while (processed < BURST)
+		processed += rte_distributor_process(d, &bufs[processed],
+			BURST - processed);
 	/* at this point, we will have processed some packets and have a full
 	 * backlog for the other ones at worker 0.
 	 */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.769708130 +0000
+++ 0196-test-distributor-ensure-all-packets-are-delivered.patch	2020-10-28 10:35:11.804834440 +0000
@@ -1,8 +1,10 @@
-From e1f1400cf6b85bbb6f4b7b088d54758e210343e7 Mon Sep 17 00:00:00 2001
+From b3d6175b8ea44b5349a643e9140cc787d884a4c1 Mon Sep 17 00:00:00 2001
 From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Date: Sat, 17 Oct 2020 05:07:00 +0200
 Subject: [PATCH] test/distributor: ensure all packets are delivered
 
+[ upstream commit e1f1400cf6b85bbb6f4b7b088d54758e210343e7 ]
+
 In all distributor tests there is a chance that tests
 will send packets to distributor with rte_distributor_process()
 before workers are started and requested for packets.
@@ -12,16 +14,14 @@
 of successfully processed packets reaches required by test.
 Change is applied to every first call in test case.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Acked-by: David Hunt <david.hunt@intel.com>
 ---
- app/test/test_distributor.c | 32 +++++++++++++++++++++++++++-----
- 1 file changed, 27 insertions(+), 5 deletions(-)
+ app/test/test_distributor.c | 25 +++++++++++++++++++++----
+ 1 file changed, 21 insertions(+), 4 deletions(-)
 
 diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
-index cfae5a1ac9..a4af0a39c6 100644
+index e9e8e2c7af..199f88887d 100644
 --- a/app/test/test_distributor.c
 +++ b/app/test/test_distributor.c
 @@ -103,6 +103,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
@@ -105,27 +105,6 @@
  	/* at this point, we will have processed some packets and have a full
  	 * backlog for the other ones at worker 0.
  	 */
-@@ -585,6 +602,7 @@ sanity_mark_test(struct worker_params *wp, struct rte_mempool *p)
- 	unsigned int i, count, id;
- 	unsigned int sorted[buf_count], seq;
- 	unsigned int failed = 0;
-+	unsigned int processed;
- 
- 	printf("=== Marked packets test ===\n");
- 	clear_packet_count();
-@@ -615,7 +633,11 @@ sanity_mark_test(struct worker_params *wp, struct rte_mempool *p)
- 
- 	count = 0;
- 	for (i = 0; i < buf_count/burst; i++) {
--		rte_distributor_process(db, &bufs[i * burst], burst);
-+		processed = 0;
-+		while (processed < burst)
-+			processed += rte_distributor_process(db,
-+				&bufs[i * burst + processed],
-+				burst - processed);
- 		count += rte_distributor_returned_pkts(db, &returns[count],
- 			buf_count - count);
- 	}
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'test/distributor: fix quitting workers in burst mode' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (194 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: ensure all packets are delivered' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: fix mbuf leak on failure' " luca.boccassi
                   ` (10 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Lukasz Wojciechowski; +Cc: Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From c2a92ce0d1bcda8472995a3577263f06cf30b73f 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>
---
 app/test/test_distributor.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
index 199f88887d..281b015363 100644
--- a/app/test/test_distributor.c
+++ b/app/test/test_distributor.c
@@ -629,9 +629,10 @@ 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);
 	rte_distributor_flush(d);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.798551373 +0000
+++ 0197-test-distributor-fix-quitting-workers-in-burst-mode.patch	2020-10-28 10:35:11.804834440 +0000
@@ -1,8 +1,10 @@
-From f72bff0ec2723b7d7bfc9c655419030b1c8fffad Mon Sep 17 00:00:00 2001
+From c2a92ce0d1bcda8472995a3577263f06cf30b73f 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
@@ -12,7 +14,6 @@
 causes exactly one worker to quit.
 
 Fixes: 775003ad2f96 ("distributor: add new burst-capable library")
-Cc: stable@dpdk.org
 
 Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
 Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
@@ -21,10 +22,10 @@
  1 file changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
-index a4af0a39c6..e0cb698e1c 100644
+index 199f88887d..281b015363 100644
 --- a/app/test/test_distributor.c
 +++ b/app/test/test_distributor.c
-@@ -769,9 +769,10 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
+@@ -629,9 +629,10 @@ quit_workers(struct worker_params *wp, struct rte_mempool *p)
  
  	zero_quit = 0;
  	quit = 1;

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

* [dpdk-stable] patch 'test/distributor: fix mbuf leak on failure' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (195 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: fix quitting workers in burst mode' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'crypto/caam_jr: fix device tree parsing for SEC_ERA' " luca.boccassi
                   ` (9 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Sarosh Arif; +Cc: Lukasz Wojciechowski, David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From cb224aacbc652fe4f706bc84e07833f01d93cf51 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>
---
 app/test/test_distributor.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
index 281b015363..3b2a4cbcf9 100644
--- a/app/test/test_distributor.c
+++ b/app/test/test_distributor.c
@@ -134,6 +134,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 		printf("Line %d: Error, not all packets flushed. "
 				"Expected %u, got %u\n",
 				__LINE__, BURST, total_packet_count());
+		rte_mempool_put_bulk(p, (void *)bufs, BURST);
 		return -1;
 	}
 
@@ -160,6 +161,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 			printf("Line %d: Error, not all packets flushed. "
 					"Expected %u, got %u\n",
 					__LINE__, BURST, total_packet_count());
+			rte_mempool_put_bulk(p, (void *)bufs, BURST);
 			return -1;
 		}
 
@@ -188,6 +190,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 		printf("Line %d: Error, not all packets flushed. "
 				"Expected %u, got %u\n",
 				__LINE__, BURST, total_packet_count());
+		rte_mempool_put_bulk(p, (void *)bufs, BURST);
 		return -1;
 	}
 
@@ -243,6 +246,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)
 	if (num_returned != BIG_BATCH) {
 		printf("line %d: Missing packets, expected %d\n",
 				__LINE__, num_returned);
+		rte_mempool_put_bulk(p, (void *)many_bufs, BIG_BATCH);
 		return -1;
 	}
 
@@ -257,6 +261,7 @@ 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.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.828051142 +0000
+++ 0198-test-distributor-fix-mbuf-leak-on-failure.patch	2020-10-28 10:35:11.804834440 +0000
@@ -1,8 +1,10 @@
-From 0e8704a453e5295ff9f498c6cdab7f829410ad88 Mon Sep 17 00:00:00 2001
+From cb224aacbc652fe4f706bc84e07833f01d93cf51 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.
@@ -12,7 +14,6 @@
 fails and returns.
 
 Fixes: c3eabff124e6 ("distributor: add unit tests")
-Cc: stable@dpdk.org
 
 Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>
 Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
@@ -22,7 +23,7 @@
  1 file changed, 5 insertions(+)
 
 diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c
-index e0cb698e1c..73d735aa75 100644
+index 281b015363..3b2a4cbcf9 100644
 --- a/app/test/test_distributor.c
 +++ b/app/test/test_distributor.c
 @@ -134,6 +134,7 @@ sanity_test(struct worker_params *wp, struct rte_mempool *p)

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

* [dpdk-stable] patch 'crypto/caam_jr: fix device tree parsing for SEC_ERA' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (196 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: fix mbuf leak on failure' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:45 ` [dpdk-stable] patch 'doc: add SPDX license tag header to meson guide' " luca.boccassi
                   ` (8 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Gagandeep Singh; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 88abf42899163beb1f7a5b54360d6da851a19670 Mon Sep 17 00:00:00 2001
From: Gagandeep Singh <g.singh@nxp.com>
Date: Mon, 19 Oct 2020 17:48:01 +0800
Subject: [PATCH] crypto/caam_jr: fix device tree parsing for SEC_ERA

[ upstream commit c6887eca58ac0aeb2aa54b58d881d1bbf5543d96 ]

Previously, SEC_ERA was hardcoded and it was removed in [1].
Now when that hardcoded was removed, it is supposed to be
read from the device tree but it is not done correctly.
This patch calls a necessary API of_init() before using any
of_* APIs to retrieve information from the device tree and
if reading integer value that must be converted to cpu endianness
before using it.

[1] eef9e0412a84 ("drivers/crypto: fix build with -fno-common")

Fixes: 1d678de329ab ("crypto/caam_jr: add basic job ring routines")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/caam_jr/caam_jr.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
index 86aa9a103e..d6fa8cf7e8 100644
--- a/drivers/crypto/caam_jr/caam_jr.c
+++ b/drivers/crypto/caam_jr/caam_jr.c
@@ -2398,6 +2398,8 @@ init_error:
 static int
 cryptodev_caam_jr_probe(struct rte_vdev_device *vdev)
 {
+	int ret;
+
 	struct rte_cryptodev_pmd_init_params init_params = {
 		"",
 		sizeof(struct sec_job_ring_t),
@@ -2414,6 +2416,12 @@ cryptodev_caam_jr_probe(struct rte_vdev_device *vdev)
 	input_args = rte_vdev_device_args(vdev);
 	rte_cryptodev_pmd_parse_input_args(&init_params, input_args);
 
+	ret = of_init();
+	if (ret) {
+		RTE_LOG(ERR, PMD,
+		"of_init failed\n");
+		return -EINVAL;
+	}
 	/* if sec device version is not configured */
 	if (!rta_get_sec_era()) {
 		const struct device_node *caam_node;
@@ -2424,7 +2432,7 @@ cryptodev_caam_jr_probe(struct rte_vdev_device *vdev)
 					NULL);
 			if (prop) {
 				rta_set_sec_era(
-					INTL_SEC_ERA(cpu_to_caam32(*prop)));
+					INTL_SEC_ERA(rte_be_to_cpu_32(*prop)));
 				break;
 			}
 		}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.857654307 +0000
+++ 0199-crypto-caam_jr-fix-device-tree-parsing-for-SEC_ERA.patch	2020-10-28 10:35:11.808834498 +0000
@@ -1,8 +1,10 @@
-From c6887eca58ac0aeb2aa54b58d881d1bbf5543d96 Mon Sep 17 00:00:00 2001
+From 88abf42899163beb1f7a5b54360d6da851a19670 Mon Sep 17 00:00:00 2001
 From: Gagandeep Singh <g.singh@nxp.com>
 Date: Mon, 19 Oct 2020 17:48:01 +0800
 Subject: [PATCH] crypto/caam_jr: fix device tree parsing for SEC_ERA
 
+[ upstream commit c6887eca58ac0aeb2aa54b58d881d1bbf5543d96 ]
+
 Previously, SEC_ERA was hardcoded and it was removed in [1].
 Now when that hardcoded was removed, it is supposed to be
 read from the device tree but it is not done correctly.
@@ -14,7 +16,6 @@
 [1] eef9e0412a84 ("drivers/crypto: fix build with -fno-common")
 
 Fixes: 1d678de329ab ("crypto/caam_jr: add basic job ring routines")
-Cc: stable@dpdk.org
 
 Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
 Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
@@ -23,10 +24,10 @@
  1 file changed, 9 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
-index c004ec4077..3fb3fe0f8a 100644
+index 86aa9a103e..d6fa8cf7e8 100644
 --- a/drivers/crypto/caam_jr/caam_jr.c
 +++ b/drivers/crypto/caam_jr/caam_jr.c
-@@ -2388,6 +2388,8 @@ init_error:
+@@ -2398,6 +2398,8 @@ init_error:
  static int
  cryptodev_caam_jr_probe(struct rte_vdev_device *vdev)
  {
@@ -35,7 +36,7 @@
  	struct rte_cryptodev_pmd_init_params init_params = {
  		"",
  		sizeof(struct sec_job_ring_t),
-@@ -2404,6 +2406,12 @@ cryptodev_caam_jr_probe(struct rte_vdev_device *vdev)
+@@ -2414,6 +2416,12 @@ cryptodev_caam_jr_probe(struct rte_vdev_device *vdev)
  	input_args = rte_vdev_device_args(vdev);
  	rte_cryptodev_pmd_parse_input_args(&init_params, input_args);
  
@@ -48,7 +49,7 @@
  	/* if sec device version is not configured */
  	if (!rta_get_sec_era()) {
  		const struct device_node *caam_node;
-@@ -2414,7 +2422,7 @@ cryptodev_caam_jr_probe(struct rte_vdev_device *vdev)
+@@ -2424,7 +2432,7 @@ cryptodev_caam_jr_probe(struct rte_vdev_device *vdev)
  					NULL);
  			if (prop) {
  				rta_set_sec_era(

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

* [dpdk-stable] patch 'doc: add SPDX license tag header to meson guide' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (197 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'crypto/caam_jr: fix device tree parsing for SEC_ERA' " luca.boccassi
@ 2020-10-28 10:45 ` luca.boccassi
  2020-10-28 10:46 ` [dpdk-stable] patch 'app: fix missing dependencies' " luca.boccassi
                   ` (7 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:45 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Stephen Hemminger, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From a44c2084e85921119acdecc48f25dcf7c7790f8e 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 f3ff9289cb..8fb60a7c11 100644
--- a/doc/build-sdk-meson.txt
+++ b/doc/build-sdk-meson.txt
@@ -1,3 +1,6 @@
+..  SPDX-License-Identifier: BSD-3-Clause
+    Copyright(c) 2018 Intel Corporation.
+
 INSTALLING DPDK USING THE MESON BUILD SYSTEM
 ---------------------------------------------
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.888011830 +0000
+++ 0200-doc-add-SPDX-license-tag-header-to-meson-guide.patch	2020-10-28 10:35:11.808834498 +0000
@@ -1,32 +1,33 @@
-From c0a775a141e3ee9f02aa0a75d975750d06890837 Mon Sep 17 00:00:00 2001
+From a44c2084e85921119acdecc48f25dcf7c7790f8e 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")
-Cc: stable@dpdk.org
 
 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/guides/prog_guide/build-sdk-meson.rst | 3 +++
+ doc/build-sdk-meson.txt | 3 +++
  1 file changed, 3 insertions(+)
 
-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 f3ff9289cb..8fb60a7c11 100644
+--- a/doc/build-sdk-meson.txt
++++ b/doc/build-sdk-meson.txt
 @@ -1,3 +1,6 @@
 +..  SPDX-License-Identifier: BSD-3-Clause
 +    Copyright(c) 2018 Intel Corporation.
 +
- Installing DPDK Using the meson build system
- ============================================
+ INSTALLING DPDK USING THE MESON BUILD SYSTEM
+ ---------------------------------------------
  
 -- 
 2.20.1

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

* [dpdk-stable] patch 'app: fix missing dependencies' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (198 preceding siblings ...)
  2020-10-28 10:45 ` [dpdk-stable] patch 'doc: add SPDX license tag header to meson guide' " luca.boccassi
@ 2020-10-28 10:46 ` luca.boccassi
  2020-10-28 10:46 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix missing dependency' " luca.boccassi
                   ` (6 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:46 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 93d49d3ce1a43a87f600228e5d66d3f391cb4051 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 ++++++++++++
 app/test/meson.build             |  1 +
 3 files changed, 16 insertions(+)

diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build
index 0674396da8..c416091fdd 100644
--- a/app/test-crypto-perf/meson.build
+++ b/app/test-crypto-perf/meson.build
@@ -13,3 +13,6 @@ sources = files('cperf_ops.c',
 		'cperf_test_verify.c',
 		'main.c')
 deps += ['cryptodev', 'security']
+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 93235c8192..5d77314df7 100644
--- a/app/test-pmd/meson.build
+++ b/app/test-pmd/meson.build
@@ -31,6 +31,18 @@ endif
 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'
 endif
diff --git a/app/test/meson.build b/app/test/meson.build
index 12668fa454..1fa9124c7e 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -380,6 +380,7 @@ endif
 
 if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER')
 	driver_test_names += 'cryptodev_scheduler_autotest'
+	test_deps += 'pmd_crypto_scheduler'
 endif
 
 foreach d:test_deps
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.916405482 +0000
+++ 0201-app-fix-missing-dependencies.patch	2020-10-28 10:35:11.808834498 +0000
@@ -1,8 +1,10 @@
-From fac83b3ef8accd5f0f4da5b9a60d047e448281f8 Mon Sep 17 00:00:00 2001
+From 93d49d3ce1a43a87f600228e5d66d3f391cb4051 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
@@ -12,7 +14,6 @@
 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")
-Cc: stable@dpdk.org
 
 Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
 Acked-by: Luca Boccassi <bluca@debian.org>
@@ -23,18 +24,18 @@
  3 files changed, 16 insertions(+)
 
 diff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build
-index f394b75ba5..4bd71510dc 100644
+index 0674396da8..c416091fdd 100644
 --- a/app/test-crypto-perf/meson.build
 +++ b/app/test-crypto-perf/meson.build
-@@ -12,3 +12,6 @@ sources = files('cperf_ops.c',
+@@ -13,3 +13,6 @@ sources = files('cperf_ops.c',
  		'cperf_test_verify.c',
  		'main.c')
- deps += ['cryptodev', 'net', 'security']
+ deps += ['cryptodev', 'security']
 +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 f52ab148f6..0d9e450494 100644
+index 93235c8192..5d77314df7 100644
 --- a/app/test-pmd/meson.build
 +++ b/app/test-pmd/meson.build
 @@ -31,6 +31,18 @@ endif
@@ -57,10 +58,10 @@
  	deps += 'pmd_bnxt'
  endif
 diff --git a/app/test/meson.build b/app/test/meson.build
-index dedf29dd7f..fc90a1909f 100644
+index 12668fa454..1fa9124c7e 100644
 --- a/app/test/meson.build
 +++ b/app/test/meson.build
-@@ -415,6 +415,7 @@ endif
+@@ -380,6 +380,7 @@ endif
  
  if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER')
  	driver_test_names += 'cryptodev_scheduler_autotest'

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

* [dpdk-stable] patch 'examples/l2fwd-crypto: fix missing dependency' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (199 preceding siblings ...)
  2020-10-28 10:46 ` [dpdk-stable] patch 'app: fix missing dependencies' " luca.boccassi
@ 2020-10-28 10:46 ` luca.boccassi
  2020-10-28 10:46 ` [dpdk-stable] patch 'ipc: fix spelling in log and comment' " luca.boccassi
                   ` (5 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:46 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From d8290040d15a1959aa722ae0317f6ba721bbd391 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 6c852ad199..39e1604fac 100644
--- a/examples/l2fwd-crypto/meson.build
+++ b/examples/l2fwd-crypto/meson.build
@@ -7,6 +7,9 @@
 # DPDK instance, use 'make'
 
 deps += 'cryptodev'
+if dpdk_conf.has('RTE_LIBRTE_PMD_CRYPTO_SCHEDULER')
+	deps += 'pmd_crypto_scheduler'
+endif
 allow_experimental_apis = true
 sources = files(
 	'main.c'
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.945907520 +0000
+++ 0202-examples-l2fwd-crypto-fix-missing-dependency.patch	2020-10-28 10:35:11.808834498 +0000
@@ -1,13 +1,14 @@
-From 52e2991eab280243e3ed0f0be56a2e2e74416d25 Mon Sep 17 00:00:00 2001
+From d8290040d15a1959aa722ae0317f6ba721bbd391 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")
-Cc: stable@dpdk.org
 
 Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
 Acked-by: Luca Boccassi <bluca@debian.org>

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

* [dpdk-stable] patch 'ipc: fix spelling in log and comment' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (200 preceding siblings ...)
  2020-10-28 10:46 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix missing dependency' " luca.boccassi
@ 2020-10-28 10:46 ` luca.boccassi
  2020-10-28 10:46 ` [dpdk-stable] patch 'bus/pci: remove unused scan by address' " luca.boccassi
                   ` (4 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:46 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 4178595c977bfb54c75ba1537a39973c5caa92a3 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 15 Oct 2020 17:26:52 -0700
Subject: [PATCH] ipc: fix spelling in log and comment

[ upstream commit 5b183ff611fc7aa4414abb99a31609a379323722 ]

Fixes spelling in comment and message about thread error.
Found while looking at checkpatch complaints about "thead"

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/librte_eal/common/eal_common_proc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c
index 935e8fefeb..13ae2b915e 100644
--- a/lib/librte_eal/common/eal_common_proc.c
+++ b/lib/librte_eal/common/eal_common_proc.c
@@ -416,7 +416,7 @@ process_async_request(struct pending_request *sr, const struct timespec *now)
 	/* did we timeout? */
 	timeout = timespec_cmp(&param->end, now) <= 0;
 
-	/* if we received a response, adjust relevant data and copy mesasge. */
+	/* if we received a response, adjust relevant data and copy message. */
 	if (sr->reply_received == 1 && sr->reply) {
 		struct rte_mp_msg *msg, *user_msgs, *tmp;
 
@@ -621,7 +621,7 @@ rte_mp_channel_init(void)
 
 	if (rte_ctrl_thread_create(&mp_handle_tid, "rte_mp_handle",
 			NULL, mp_handle, NULL) < 0) {
-		RTE_LOG(ERR, EAL, "failed to create mp thead: %s\n",
+		RTE_LOG(ERR, EAL, "failed to create mp thread: %s\n",
 			strerror(errno));
 		close(mp_fd);
 		close(dir_fd);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:17.974602687 +0000
+++ 0203-ipc-fix-spelling-in-log-and-comment.patch	2020-10-28 10:35:11.808834498 +0000
@@ -1,8 +1,10 @@
-From 5b183ff611fc7aa4414abb99a31609a379323722 Mon Sep 17 00:00:00 2001
+From 4178595c977bfb54c75ba1537a39973c5caa92a3 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Thu, 15 Oct 2020 17:26:52 -0700
 Subject: [PATCH] ipc: fix spelling in log and comment
 
+[ upstream commit 5b183ff611fc7aa4414abb99a31609a379323722 ]
+
 Fixes spelling in comment and message about thread error.
 Found while looking at checkpatch complaints about "thead"
 
@@ -12,10 +14,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c
-index 8ba4a29dc4..6d1af3c0e7 100644
+index 935e8fefeb..13ae2b915e 100644
 --- a/lib/librte_eal/common/eal_common_proc.c
 +++ b/lib/librte_eal/common/eal_common_proc.c
-@@ -423,7 +423,7 @@ process_async_request(struct pending_request *sr, const struct timespec *now)
+@@ -416,7 +416,7 @@ process_async_request(struct pending_request *sr, const struct timespec *now)
  	/* did we timeout? */
  	timeout = timespec_cmp(&param->end, now) <= 0;
  
@@ -24,7 +26,7 @@
  	if (sr->reply_received == 1 && sr->reply) {
  		struct rte_mp_msg *msg, *user_msgs, *tmp;
  
-@@ -630,7 +630,7 @@ rte_mp_channel_init(void)
+@@ -621,7 +621,7 @@ rte_mp_channel_init(void)
  
  	if (rte_ctrl_thread_create(&mp_handle_tid, "rte_mp_handle",
  			NULL, mp_handle, NULL) < 0) {

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

* [dpdk-stable] patch 'bus/pci: remove unused scan by address' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (201 preceding siblings ...)
  2020-10-28 10:46 ` [dpdk-stable] patch 'ipc: fix spelling in log and comment' " luca.boccassi
@ 2020-10-28 10:46 ` luca.boccassi
  2020-10-28 10:46 ` [dpdk-stable] patch 'eal/linux: fix memory leak in uevent handling' " luca.boccassi
                   ` (3 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:46 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From edd51184ee9d3971e676f1095ec0642803d442fb 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 ebbfeb13a8..081c62ab06 100644
--- a/drivers/bus/pci/bsd/pci.c
+++ b/drivers/bus/pci/bsd/pci.c
@@ -392,55 +392,6 @@ pci_device_iova_mode(const struct rte_pci_driver *pdrv __rte_unused,
 	return RTE_IOVA_PA;
 }
 
-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,
 		void *buf, size_t len, off_t offset)
diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index 71b0a3053d..dba87f1275 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -394,18 +394,6 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
 	return 0;
 }
 
-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 9d14769a7e..81735e4c0a 100644
--- a/drivers/bus/pci/private.h
+++ b/drivers/bus/pci/private.h
@@ -55,19 +55,6 @@ void rte_pci_add_device(struct rte_pci_device *pci_dev);
 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.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:18.003825377 +0000
+++ 0204-bus-pci-remove-unused-scan-by-address.patch	2020-10-28 10:35:11.812834558 +0000
@@ -1,30 +1,30 @@
-From 59440fbabfbcfae350e0efa6f47201b5cf0bd625 Mon Sep 17 00:00:00 2001
+From edd51184ee9d3971e676f1095ec0642803d442fb 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")
-Cc: stable@dpdk.org
 
 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 ----------
- 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(-)
 
 diff --git a/drivers/bus/pci/bsd/pci.c b/drivers/bus/pci/bsd/pci.c
-index 97c611737a..4b8a208781 100644
+index ebbfeb13a8..081c62ab06 100644
 --- a/drivers/bus/pci/bsd/pci.c
 +++ b/drivers/bus/pci/bsd/pci.c
-@@ -401,55 +401,6 @@ pci_device_iova_mode(const struct rte_pci_driver *pdrv __rte_unused,
+@@ -392,55 +392,6 @@ pci_device_iova_mode(const struct rte_pci_driver *pdrv __rte_unused,
  	return RTE_IOVA_PA;
  }
  
@@ -81,10 +81,10 @@
  int rte_pci_read_config(const struct rte_pci_device *dev,
  		void *buf, size_t len, off_t offset)
 diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
-index 619d209ad2..2e1808b902 100644
+index 71b0a3053d..dba87f1275 100644
 --- a/drivers/bus/pci/linux/pci.c
 +++ b/drivers/bus/pci/linux/pci.c
-@@ -397,18 +397,6 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
+@@ -394,18 +394,6 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
  	return 0;
  }
  
@@ -104,10 +104,10 @@
   * split up a pci address into its constituent parts.
   */
 diff --git a/drivers/bus/pci/private.h b/drivers/bus/pci/private.h
-index 16f997c701..f566943f5e 100644
+index 9d14769a7e..81735e4c0a 100644
 --- a/drivers/bus/pci/private.h
 +++ b/drivers/bus/pci/private.h
-@@ -66,19 +66,6 @@ void rte_pci_add_device(struct rte_pci_device *pci_dev);
+@@ -55,19 +55,6 @@ void rte_pci_add_device(struct rte_pci_device *pci_dev);
  void rte_pci_insert_device(struct rte_pci_device *exist_pci_dev,
  		struct rte_pci_device *new_pci_dev);
  
@@ -125,30 +125,8 @@
 -int pci_update_device(const struct rte_pci_addr *addr);
 -
  /**
-  * 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
-@@ -49,17 +49,6 @@ 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
- rte_pci_read_config(const struct rte_pci_device *dev __rte_unused,
+  * Map the PCI resource of a PCI device in virtual memory
+  *
 -- 
 2.20.1
 

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

* [dpdk-stable] patch 'eal/linux: fix memory leak in uevent handling' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (202 preceding siblings ...)
  2020-10-28 10:46 ` [dpdk-stable] patch 'bus/pci: remove unused scan by address' " luca.boccassi
@ 2020-10-28 10:46 ` luca.boccassi
  2020-10-28 10:46 ` [dpdk-stable] patch 'crypto/scheduler: fix header install with meson' " luca.boccassi
                   ` (2 subsequent siblings)
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:46 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 5594a7c182d5d66b1c3ad94dbc3a25cbcc540270 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/linux/eal/eal_dev.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/linux/eal/eal_dev.c b/lib/librte_eal/linux/eal/eal_dev.c
index 83b6068264..803979ff46 100644
--- a/lib/librte_eal/linux/eal/eal_dev.c
+++ b/lib/librte_eal/linux/eal/eal_dev.c
@@ -189,7 +189,7 @@ dev_uev_parse(const char *buf, struct rte_dev_event *event, int length)
 	else if (!strncmp(subsystem, "vfio", 4))
 		event->subsystem = EAL_DEV_EVENT_SUBSYSTEM_VFIO;
 	else
-		return -1;
+		goto err;
 
 	/* parse the action type */
 	if (!strncmp(action, "add", 3))
@@ -197,8 +197,11 @@ dev_uev_parse(const char *buf, struct rte_dev_event *event, int length)
 	else if (!strncmp(action, "remove", 6))
 		event->type = RTE_DEV_EVENT_REMOVE;
 	else
-		return -1;
+		goto err;
 	return 0;
+err:
+	free(event->devname);
+	return -1;
 }
 
 static void
@@ -276,12 +279,14 @@ dev_uev_handler(__rte_unused void *param)
 			rte_spinlock_unlock(&failure_handle_lock);
 		}
 		rte_dev_event_callback_process(uevent.devname, uevent.type);
+		free(uevent.devname);
 	}
 
 	return;
 
 failure_handle_err:
 	rte_spinlock_unlock(&failure_handle_lock);
+	free(uevent.devname);
 }
 
 int
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:18.034048101 +0000
+++ 0205-eal-linux-fix-memory-leak-in-uevent-handling.patch	2020-10-28 10:35:11.812834558 +0000
@@ -1,27 +1,28 @@
-From 01072d52affac0f7fb6b8a5c8dd98015c4cef4c3 Mon Sep 17 00:00:00 2001
+From 5594a7c182d5d66b1c3ad94dbc3a25cbcc540270 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")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
 Reviewed-by: David Marchand <david.marchand@redhat.com>
 ---
- lib/librte_eal/linux/eal_dev.c | 9 +++++++--
+ lib/librte_eal/linux/eal/eal_dev.c | 9 +++++++--
  1 file changed, 7 insertions(+), 2 deletions(-)
 
-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
-@@ -195,7 +195,7 @@ dev_uev_parse(const char *buf, struct rte_dev_event *event, int length)
+diff --git a/lib/librte_eal/linux/eal/eal_dev.c b/lib/librte_eal/linux/eal/eal_dev.c
+index 83b6068264..803979ff46 100644
+--- a/lib/librte_eal/linux/eal/eal_dev.c
++++ b/lib/librte_eal/linux/eal/eal_dev.c
+@@ -189,7 +189,7 @@ dev_uev_parse(const char *buf, struct rte_dev_event *event, int length)
  	else if (!strncmp(subsystem, "vfio", 4))
  		event->subsystem = EAL_DEV_EVENT_SUBSYSTEM_VFIO;
  	else
@@ -30,7 +31,7 @@
  
  	/* parse the action type */
  	if (!strncmp(action, "add", 3))
-@@ -203,8 +203,11 @@ dev_uev_parse(const char *buf, struct rte_dev_event *event, int length)
+@@ -197,8 +197,11 @@ dev_uev_parse(const char *buf, struct rte_dev_event *event, int length)
  	else if (!strncmp(action, "remove", 6))
  		event->type = RTE_DEV_EVENT_REMOVE;
  	else
@@ -43,7 +44,7 @@
  }
  
  static void
-@@ -282,12 +285,14 @@ dev_uev_handler(__rte_unused void *param)
+@@ -276,12 +279,14 @@ dev_uev_handler(__rte_unused void *param)
  			rte_spinlock_unlock(&failure_handle_lock);
  		}
  		rte_dev_event_callback_process(uevent.devname, uevent.type);

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

* [dpdk-stable] patch 'crypto/scheduler: fix header install with meson' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (203 preceding siblings ...)
  2020-10-28 10:46 ` [dpdk-stable] patch 'eal/linux: fix memory leak in uevent handling' " luca.boccassi
@ 2020-10-28 10:46 ` luca.boccassi
  2020-10-28 10:46 ` [dpdk-stable] patch 'config: add Graviton2(arm64) defconfig' " luca.boccassi
  2020-11-30 11:50 ` [dpdk-stable] patch 'mcslock: fix hang in weak memory model' " luca.boccassi
  206 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:46 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 42c791782395674634ac2d5a67d134de6bbb4c19 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 22 Oct 2020 14:34:23 +0200
Subject: [PATCH] crypto/scheduler: fix header install with meson

The headers variable is only used in lib/meson.build context.
For drivers, an explicit install_headers() is necessary.

Reproduced while compiling the l2fwd-crypto example out of meson
(which can be done by adding it in devtools/test-meson-builds.sh
examples build test).

Fixes: cd2b6458a1cb ("crypto/scheduler: add in meson build")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/crypto/scheduler/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/scheduler/meson.build b/drivers/crypto/scheduler/meson.build
index c5ba2d6804..cb0f3a8ba9 100644
--- a/drivers/crypto/scheduler/meson.build
+++ b/drivers/crypto/scheduler/meson.build
@@ -13,7 +13,7 @@ sources = files(
 	'scheduler_roundrobin.c',
 )
 
-headers = files(
+install_headers(
 	'rte_cryptodev_scheduler.h',
 	'rte_cryptodev_scheduler_operations.h',
 )
-- 
2.20.1


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

* [dpdk-stable] patch 'config: add Graviton2(arm64) defconfig' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (204 preceding siblings ...)
  2020-10-28 10:46 ` [dpdk-stable] patch 'crypto/scheduler: fix header install with meson' " luca.boccassi
@ 2020-10-28 10:46 ` luca.boccassi
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
  2020-11-09 18:50   ` [dpdk-stable] patch 'eal: fix MCS lock and ticketlock headers install' " luca.boccassi
  2020-11-30 11:50 ` [dpdk-stable] patch 'mcslock: fix hang in weak memory model' " luca.boccassi
  206 siblings, 2 replies; 374+ messages in thread
From: luca.boccassi @ 2020-10-28 10:46 UTC (permalink / raw)
  To: Vimal Chungath; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From b22cfbdd0ccaed9ff6f7db599765b267802680d5 Mon Sep 17 00:00:00 2001
From: Vimal Chungath <vcchunga@amazon.com>
Date: Wed, 7 Oct 2020 15:59:14 -0700
Subject: [PATCH] config: add Graviton2(arm64) defconfig

Add make configuration for Graviton2 platform with
64-bit Arm Neoverse N1 cores.

Sample build steps:
make config T=arm64-graviton2-linux-gcc O=arm64-build
make -C arm64-build
OR
make config T=graviton2 O=arm64-build
make -C arm64-build

For more information about Graviton2 platform, refer to:
https://aws.amazon.com/ec2/graviton/

Signed-off-by: Vimal Chungath <vcchunga@amazon.com>
---
 config/defconfig_arm64-graviton2-linux-gcc    |  1 +
 config/defconfig_arm64-graviton2-linuxapp-gcc | 13 +++++++
 config/defconfig_graviton2                    |  1 +
 mk/machine/graviton2/rte.vars.mk              | 34 +++++++++++++++++++
 4 files changed, 49 insertions(+)
 create mode 120000 config/defconfig_arm64-graviton2-linux-gcc
 create mode 100644 config/defconfig_arm64-graviton2-linuxapp-gcc
 create mode 120000 config/defconfig_graviton2
 create mode 100644 mk/machine/graviton2/rte.vars.mk

diff --git a/config/defconfig_arm64-graviton2-linux-gcc b/config/defconfig_arm64-graviton2-linux-gcc
new file mode 120000
index 0000000000..80ac94d54d
--- /dev/null
+++ b/config/defconfig_arm64-graviton2-linux-gcc
@@ -0,0 +1 @@
+defconfig_arm64-graviton2-linuxapp-gcc
\ No newline at end of file
diff --git a/config/defconfig_arm64-graviton2-linuxapp-gcc b/config/defconfig_arm64-graviton2-linuxapp-gcc
new file mode 100644
index 0000000000..e99fef3073
--- /dev/null
+++ b/config/defconfig_arm64-graviton2-linuxapp-gcc
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) Amazon.com, Inc or its affiliates
+#
+
+#include "defconfig_arm64-armv8a-linux-gcc"
+
+CONFIG_RTE_MACHINE="graviton2"
+CONFIG_RTE_MAX_LCORE=64
+CONFIG_RTE_CACHE_LINE_SIZE=64
+CONFIG_RTE_MAX_MEM_MB=1048576
+CONFIG_RTE_MAX_NUMA_NODES=1
+CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n
+CONFIG_RTE_LIBRTE_VHOST_NUMA=n
diff --git a/config/defconfig_graviton2 b/config/defconfig_graviton2
new file mode 120000
index 0000000000..80ac94d54d
--- /dev/null
+++ b/config/defconfig_graviton2
@@ -0,0 +1 @@
+defconfig_arm64-graviton2-linuxapp-gcc
\ No newline at end of file
diff --git a/mk/machine/graviton2/rte.vars.mk b/mk/machine/graviton2/rte.vars.mk
new file mode 100644
index 0000000000..1796c9cf8f
--- /dev/null
+++ b/mk/machine/graviton2/rte.vars.mk
@@ -0,0 +1,34 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) Amazon.com, Inc or its affiliates
+#
+
+#
+# machine:
+#
+#   - can define ARCH variable (overridden by cmdline value)
+#   - can define CROSS variable (overridden by cmdline value)
+#   - define MACHINE_CFLAGS variable (overridden by cmdline value)
+#   - define MACHINE_LDFLAGS variable (overridden by cmdline value)
+#   - define MACHINE_ASFLAGS variable (overridden by cmdline value)
+#   - can define CPU_CFLAGS variable (overridden by cmdline value) that
+#     overrides the one defined in arch.
+#   - can define CPU_LDFLAGS variable (overridden by cmdline value) that
+#     overrides the one defined in arch.
+#   - can define CPU_ASFLAGS variable (overridden by cmdline value) that
+#     overrides the one defined in arch.
+#   - may override any previously defined variable
+#
+
+# ARCH =
+# CROSS =
+# MACHINE_CFLAGS =
+# MACHINE_LDFLAGS =
+# MACHINE_ASFLAGS =
+# CPU_CFLAGS =
+# CPU_LDFLAGS =
+# CPU_ASFLAGS =
+
+include $(RTE_SDK)/mk/rte.helper.mk
+
+MACHINE_CFLAGS += $(call rte_cc_has_argument, -march=armv8.2-a+crypto)
+MACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=neoverse-n1)
-- 
2.20.1


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

* [dpdk-stable] 答复: patch 'gso: fix payload unit size for UDP' has been queued to stable release 19.11.6
  2020-10-28 10:43 ` [dpdk-stable] patch 'gso: fix payload unit size for UDP' " luca.boccassi
@ 2020-10-29  4:45   ` Yi Yang -云服务集团
  2020-10-29 11:10     ` Luca Boccassi
  0 siblings, 1 reply; 374+ messages in thread
From: Yi Yang (杨燚)-云服务集团 @ 2020-10-29  4:45 UTC (permalink / raw)
  To: luca.boccassi; +Cc: jiayu.hu, stable

Thanks for picking up it, nice to have it in stable release. By the way, would you like to cherry-pick GRO patches for stable release? OVS is using 19.11 stable branch, we had better have GRO support there because I'm enabling VXLAN TSO support in OVS DPDK, GRO and GSO are necessary for it.

commit e2d81106367321cf49d6b4e5d087e1a7c2e808ba
Author: Yi Yang <yangyi01@inspur.com>
Date:   Thu Sep 24 16:57:39 2020 +0800

    gro: support VXLAN UDP/IPv4

    VXLAN UDP/IPv4 GRO can help improve VM-to-VM UDP
    performance when UFO or GSO is enabled in VM, GRO
    must be supported if UFO or GSO is enabled,
    otherwise, performance can't get big improvement
    if only GSO is there.

    With this enabled in DPDK, OVS DPDK can leverage it
    to improve VM-to-VM UDP performance, it will reassemble
    VXLAN UDP/IPv4 fragments immediate after they are
    received from a physical NIC. It is very helpful in
    OVS DPDK VXLAN use case.

    Signed-off-by: Yi Yang <yangyi01@inspur.com>
    Acked-by: Jiayu Hu <jiayu.hu@intel.com>


commit 1ca5e67408528b9870bb40f400c5f934aa91dcce
Author: Yi Yang <yangyi01@inspur.com>
Date:   Thu Sep 24 16:57:38 2020 +0800

    gro: support UDP/IPv4

    UDP/IPv4 GRO can help improve VM-to-VM UDP performance
    when UFO or GSO is enabled in VM, GRO must be supported
    if UFO or GSO is enabled, otherwise, performance can't
    get big improvement if only GSO is there.

    With this enabled in DPDK, OVS DPDK can leverage it
    to improve VM-to-VM UDP performance, it will reassemble
    UDP fragments immediate after they are received from
    a physical NIC. It is very helpful in OVS DPDK VLAN use
    case.

    Signed-off-by: Yi Yang <yangyi01@inspur.com>
    Acked-by: Jiayu Hu <jiayu.hu@intel.com>

-----邮件原件-----
发件人: luca.boccassi@gmail.com [mailto:luca.boccassi@gmail.com] 
发送时间: 2020年10月28日 18:43
收件人: Yi Yang (杨燚)-云服务集团 <yangyi01@inspur.com>
抄送: Jiayu Hu <jiayu.hu@intel.com>; dpdk stable <stable@dpdk.org>
主题: patch 'gso: fix payload unit size for UDP' has been queued to stable release 19.11.6

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

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

Thanks.

Luca Boccassi

---
From 2b26f143b3014d23a31aa59deda659b172edcc32 Mon Sep 17 00:00:00 2001
From: Yi Yang <yangyi01@inspur.com>
Date: Thu, 17 Sep 2020 10:12:49 +0800
Subject: [PATCH] gso: fix payload unit size for UDP

[ upstream commit b9b75d9b5c9dbc71ee12f77e9abe089492708aae ]

Fragment offset of IPv4 header is measured in units of
8 bytes. Fragment offset of UDP fragments will be wrong after GSO if pyld_unit_size isn't multiple of 8. Say pyld_unit_size is 1500, fragment offset of the second UDP fragment will be 187 (i.e. 1500 / 8), which means 1496, and it will result in 4-byte data loss (1500 - 1496 = 4).
So UDP GRO will reassemble out a wrong packet.

Fixes: b166d4f30b66 ("gso: support UDP/IPv4 fragmentation")

Signed-off-by: Yi Yang <yangyi01@inspur.com>
Acked-by: Jiayu Hu <jiayu.hu@intel.com>
---
 lib/librte_gso/gso_udp4.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/librte_gso/gso_udp4.c b/lib/librte_gso/gso_udp4.c index 21fea09273..6fa68f243a 100644
--- a/lib/librte_gso/gso_udp4.c
+++ b/lib/librte_gso/gso_udp4.c
@@ -69,7 +69,10 @@ gso_udp4_segment(struct rte_mbuf *pkt,
 		return 1;
 	}
 
-	pyld_unit_size = gso_size - hdr_offset;
+	/* pyld_unit_size must be a multiple of 8 because frag_off
+	 * uses 8 bytes as unit.
+	 */
+	pyld_unit_size = (gso_size - hdr_offset) & ~7U;
 
 	/* Segment the payload */
 	ret = gso_do_segment(pkt, hdr_offset, pyld_unit_size, direct_pool,
--
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.228089104 +0000
+++ 0046-gso-fix-payload-unit-size-for-UDP.patch	2020-10-28 10:35:11.508830082 +0000
@@ -1,8 +1,10 @@
-From b9b75d9b5c9dbc71ee12f77e9abe089492708aae Mon Sep 17 00:00:00 2001
+From 2b26f143b3014d23a31aa59deda659b172edcc32 Mon Sep 17 00:00:00 2001
 From: Yi Yang <yangyi01@inspur.com>
 Date: Thu, 17 Sep 2020 10:12:49 +0800
 Subject: [PATCH] gso: fix payload unit size for UDP
 
+[ upstream commit b9b75d9b5c9dbc71ee12f77e9abe089492708aae ]
+
 Fragment offset of IPv4 header is measured in units of
 8 bytes. Fragment offset of UDP fragments will be wrong  after GSO if pyld_unit_size isn't multiple of 8. Say @@ -12,7 +14,6 @@  So UDP GRO will reassemble out a wrong packet.
 
 Fixes: b166d4f30b66 ("gso: support UDP/IPv4 fragmentation")
-Cc: stable@dpdk.org
 
 Signed-off-by: Yi Yang <yangyi01@inspur.com>
 Acked-by: Jiayu Hu <jiayu.hu@intel.com>

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

* Re: [dpdk-stable] patch 'net/bnxt: fix checking VNIC in shutdown path' has been queued to stable release 19.11.6
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/bnxt: fix checking VNIC in shutdown path' " luca.boccassi
@ 2020-10-29  6:29   ` Somnath Kotur
  0 siblings, 0 replies; 374+ messages in thread
From: Somnath Kotur @ 2020-10-29  6:29 UTC (permalink / raw)
  To: luca.boccassi; +Cc: Ajit Khaparde, dpdk stable

On Wed, Oct 28, 2020 at 4:18 PM <luca.boccassi@gmail.com> wrote:
>
> Hi,
>
> FYI, your patch has been queued to stable release 19.11.6
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 10/30/20. So please
> shout if anyone has objections.
>
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
>
> Thanks.
>
> Luca Boccassi
>
> ---
> From 590892526b436a852d0af36e55be8e15e110a1f1 Mon Sep 17 00:00:00 2001
> From: Somnath Kotur <somnath.kotur@broadcom.com>
> Date: Thu, 10 Sep 2020 18:56:02 -0700
> Subject: [PATCH] net/bnxt: fix checking VNIC in shutdown path
>
> [ upstream commit 4b029f02de3a0ce9cdd9a3475b84ca2e42d74281 ]
>
> Add a couple of NULL pointer checks in bnxt_free_all_filters()
> and bnxt_free_vnics() respectively to guard against certain error
> injection/recovery scenarios where it was found that the application
> was crashing with the bp->vnic_info pointer being NULL.
>
> Fixes: 51fafb89a9a0 ("net/bnxt: get rid of ff pools and use VNIC info array")
>
> Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> ---
>  drivers/net/bnxt/bnxt_filter.c | 15 +++++++++------
>  drivers/net/bnxt/bnxt_vnic.c   |  3 +++
>  2 files changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c
> index 622a9bb417..f4b18d5b84 100644
> --- a/drivers/net/bnxt/bnxt_filter.c
> +++ b/drivers/net/bnxt/bnxt_filter.c
> @@ -81,6 +81,15 @@ void bnxt_free_all_filters(struct bnxt *bp)
>         struct bnxt_filter_info *filter, *temp_filter;
>         unsigned int i;
>
> +       for (i = 0; i < bp->pf.max_vfs; i++) {
> +               STAILQ_FOREACH(filter, &bp->pf.vf_info[i].filter, next) {
> +                       bnxt_hwrm_clear_l2_filter(bp, filter);
> +               }
> +       }
> +
> +       if (bp->vnic_info == NULL)
> +               return;
> +
>         for (i = 0; i < bp->nr_vnics; i++) {
>                 vnic = &bp->vnic_info[i];
>                 filter = STAILQ_FIRST(&vnic->filter);
> @@ -94,12 +103,6 @@ void bnxt_free_all_filters(struct bnxt *bp)
>                 }
>                 STAILQ_INIT(&vnic->filter);
>         }
> -
> -       for (i = 0; i < bp->pf.max_vfs; i++) {
> -               STAILQ_FOREACH(filter, &bp->pf.vf_info[i].filter, next) {
> -                       bnxt_hwrm_clear_l2_filter(bp, filter);
> -               }
> -       }
>  }
>
>  void bnxt_free_filter_mem(struct bnxt *bp)
> diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
> index bc054a8e0e..ef07721148 100644
> --- a/drivers/net/bnxt/bnxt_vnic.c
> +++ b/drivers/net/bnxt/bnxt_vnic.c
> @@ -78,6 +78,9 @@ void bnxt_free_all_vnics(struct bnxt *bp)
>         struct bnxt_vnic_info *vnic;
>         unsigned int i;
>
> +       if (bp->vnic_info == NULL)
> +               return;
> +
>         for (i = 0; i < bp->max_vnics; i++) {
>                 vnic = &bp->vnic_info[i];
>                 STAILQ_INSERT_TAIL(&bp->free_vnic_list, vnic, next);
> --
> 2.20.1
>
> ---
>   Diff of the applied patch vs upstream commit (please double-check if non-empty:
> ---
> --- -   2020-10-28 10:35:13.164340871 +0000
> +++ 0044-net-bnxt-fix-checking-VNIC-in-shutdown-path.patch      2020-10-28 10:35:11.504830024 +0000
> @@ -1,33 +1,34 @@
> -From 4b029f02de3a0ce9cdd9a3475b84ca2e42d74281 Mon Sep 17 00:00:00 2001
> +From 590892526b436a852d0af36e55be8e15e110a1f1 Mon Sep 17 00:00:00 2001
>  From: Somnath Kotur <somnath.kotur@broadcom.com>
>  Date: Thu, 10 Sep 2020 18:56:02 -0700
>  Subject: [PATCH] net/bnxt: fix checking VNIC in shutdown path
>
> +[ upstream commit 4b029f02de3a0ce9cdd9a3475b84ca2e42d74281 ]
> +
>  Add a couple of NULL pointer checks in bnxt_free_all_filters()
>  and bnxt_free_vnics() respectively to guard against certain error
>  injection/recovery scenarios where it was found that the application
>  was crashing with the bp->vnic_info pointer being NULL.
>
>  Fixes: 51fafb89a9a0 ("net/bnxt: get rid of ff pools and use VNIC info array")
> -Cc: stable@dpdk.org
>
>  Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
>  Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
>  ---
> - drivers/net/bnxt/bnxt_filter.c | 14 +++++++++-----
> + drivers/net/bnxt/bnxt_filter.c | 15 +++++++++------
>   drivers/net/bnxt/bnxt_vnic.c   |  3 +++
> - 2 files changed, 12 insertions(+), 5 deletions(-)
> + 2 files changed, 12 insertions(+), 6 deletions(-)
>
>  diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c
> -index d822ff607c..6d85983242 100644
> +index 622a9bb417..f4b18d5b84 100644
>  --- a/drivers/net/bnxt/bnxt_filter.c
>  +++ b/drivers/net/bnxt/bnxt_filter.c
>  @@ -81,6 +81,15 @@ void bnxt_free_all_filters(struct bnxt *bp)
>         struct bnxt_filter_info *filter, *temp_filter;
>         unsigned int i;
>
> -+      for (i = 0; i < bp->pf->max_vfs; i++) {
> -+              STAILQ_FOREACH(filter, &bp->pf->vf_info[i].filter, next) {
> ++      for (i = 0; i < bp->pf.max_vfs; i++) {
> ++              STAILQ_FOREACH(filter, &bp->pf.vf_info[i].filter, next) {
>  +                      bnxt_hwrm_clear_l2_filter(bp, filter);
>  +              }
>  +      }
> @@ -38,12 +39,13 @@
>         for (i = 0; i < bp->nr_vnics; i++) {
>                 vnic = &bp->vnic_info[i];
>                 filter = STAILQ_FIRST(&vnic->filter);
> -@@ -95,11 +104,6 @@ void bnxt_free_all_filters(struct bnxt *bp)
> +@@ -94,12 +103,6 @@ void bnxt_free_all_filters(struct bnxt *bp)
> +               }
>                 STAILQ_INIT(&vnic->filter);
>         }
> -
> --      for (i = 0; i < bp->pf->max_vfs; i++) {
> --              STAILQ_FOREACH(filter, &bp->pf->vf_info[i].filter, next) {
> +-
> +-      for (i = 0; i < bp->pf.max_vfs; i++) {
> +-              STAILQ_FOREACH(filter, &bp->pf.vf_info[i].filter, next) {
>  -                      bnxt_hwrm_clear_l2_filter(bp, filter);
>  -              }
>  -      }
> @@ -51,7 +53,7 @@
>
>   void bnxt_free_filter_mem(struct bnxt *bp)
>  diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
> -index 326c0d1b6d..9a135ae881 100644
> +index bc054a8e0e..ef07721148 100644
>  --- a/drivers/net/bnxt/bnxt_vnic.c
>  +++ b/drivers/net/bnxt/bnxt_vnic.c
>  @@ -78,6 +78,9 @@ void bnxt_free_all_vnics(struct bnxt *bp)

Luca,
          I see that the rebase is not correct, you'd want me to
re-spin the corrected version and send it to the 'stable' mailing
list, right?

Thanks
Som

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

* Re: [dpdk-stable] patch 'net/bnxt: add separate mutex for FW health check' has been queued to stable release 19.11.6
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/bnxt: add separate mutex for FW health check' " luca.boccassi
@ 2020-10-29  6:30   ` Somnath Kotur
  0 siblings, 0 replies; 374+ messages in thread
From: Somnath Kotur @ 2020-10-29  6:30 UTC (permalink / raw)
  To: luca.boccassi
  Cc: Sriharsha Basavapatna, Kalesh AP, Ajit Khaparde, dpdk stable

On Wed, Oct 28, 2020 at 4:18 PM <luca.boccassi@gmail.com> wrote:
>
> Hi,
>
> FYI, your patch has been queued to stable release 19.11.6
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 10/30/20. So please
> shout if anyone has objections.
>
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
>
> Thanks.
>
> Luca Boccassi
>
> ---
> From beb74f5be42aaa494ea6b278091b028043931f69 Mon Sep 17 00:00:00 2001
> From: Somnath Kotur <somnath.kotur@broadcom.com>
> Date: Thu, 10 Sep 2020 18:56:03 -0700
> Subject: [PATCH] net/bnxt: add separate mutex for FW health check
>
> [ upstream commit 2993075dc253484ba3c87996981f32468aa86cbd ]
>
> def_cp_lock was added to sync race between dev_configure and
> int_handler. It should not be used to synchronize scheduling of FW
> health check between dev_start and async event handler as well,
> use a separate mutex for the same.
>
> Fixes: a73b8e939f10 ("net/bnxt: fix race between start and interrupt handler")
>
> Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
> Reviewed-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> ---
>  drivers/net/bnxt/bnxt.h        |  1 +
>  drivers/net/bnxt/bnxt_ethdev.c | 17 +++++++++++++----
>  2 files changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
> index 46cf418647..cdb3e2d3ff 100644
> --- a/drivers/net/bnxt/bnxt.h
> +++ b/drivers/net/bnxt/bnxt.h
> @@ -593,6 +593,7 @@ struct bnxt {
>         rte_iova_t                      hwrm_short_cmd_req_dma_addr;
>         rte_spinlock_t                  hwrm_lock;
>         pthread_mutex_t                 def_cp_lock;
> +       pthread_mutex_t                 health_check_lock;
>         uint16_t                        max_req_len;
>         uint16_t                        max_resp_len;
>         uint16_t                        hwrm_max_ext_req_len;
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> index fe240b6ccc..d6afd03e56 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -885,9 +885,8 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
>         eth_dev->rx_pkt_burst = bnxt_receive_function(eth_dev);
>         eth_dev->tx_pkt_burst = bnxt_transmit_function(eth_dev);
>
> -       pthread_mutex_lock(&bp->def_cp_lock);
>         bnxt_schedule_fw_health_check(bp);
> -       pthread_mutex_unlock(&bp->def_cp_lock);
> +
>         return 0;
>
>  error:
> @@ -4205,17 +4204,22 @@ void bnxt_schedule_fw_health_check(struct bnxt *bp)
>  {
>         uint32_t polling_freq;
>
> +       pthread_mutex_lock(&bp->health_check_lock);
> +
>         if (!bnxt_is_recovery_enabled(bp))
> -               return;
> +               goto done;
>
>         if (bp->flags & BNXT_FLAG_FW_HEALTH_CHECK_SCHEDULED)
> -               return;
> +               goto done;
>
>         polling_freq = bp->recovery_info->driver_polling_freq;
>
>         rte_eal_alarm_set(US_PER_MS * polling_freq,
>                           bnxt_check_fw_health, (void *)bp);
>         bp->flags |= BNXT_FLAG_FW_HEALTH_CHECK_SCHEDULED;
> +
> +done:
> +       pthread_mutex_unlock(&bp->health_check_lock);
>  }
>
>  static void bnxt_cancel_fw_health_check(struct bnxt *bp)
> @@ -4747,6 +4751,10 @@ bnxt_init_locks(struct bnxt *bp)
>         err = pthread_mutex_init(&bp->def_cp_lock, NULL);
>         if (err)
>                 PMD_DRV_LOG(ERR, "Unable to initialize def_cp_lock\n");
> +
> +       err = pthread_mutex_init(&bp->health_check_lock, NULL);
> +       if (err)
> +               PMD_DRV_LOG(ERR, "Unable to initialize health_check_lock\n");
>         return err;
>  }
>
> @@ -4888,6 +4896,7 @@ bnxt_uninit_locks(struct bnxt *bp)
>  {
>         pthread_mutex_destroy(&bp->flow_lock);
>         pthread_mutex_destroy(&bp->def_cp_lock);
> +       pthread_mutex_destroy(&bp->health_check_lock);
>  }
>
>  static int
> --
> 2.20.1
>
> ---
>   Diff of the applied patch vs upstream commit (please double-check if non-empty:
> ---
> --- -   2020-10-28 10:35:13.193181379 +0000
> +++ 0045-net-bnxt-add-separate-mutex-for-FW-health-check.patch  2020-10-28 10:35:11.508830082 +0000
> @@ -1,15 +1,16 @@
> -From 2993075dc253484ba3c87996981f32468aa86cbd Mon Sep 17 00:00:00 2001
> +From beb74f5be42aaa494ea6b278091b028043931f69 Mon Sep 17 00:00:00 2001
>  From: Somnath Kotur <somnath.kotur@broadcom.com>
>  Date: Thu, 10 Sep 2020 18:56:03 -0700
>  Subject: [PATCH] net/bnxt: add separate mutex for FW health check
>
> +[ upstream commit 2993075dc253484ba3c87996981f32468aa86cbd ]
> +
>  def_cp_lock was added to sync race between dev_configure and
>  int_handler. It should not be used to synchronize scheduling of FW
>  health check between dev_start and async event handler as well,
>  use a separate mutex for the same.
>
>  Fixes: a73b8e939f10 ("net/bnxt: fix race between start and interrupt handler")
> -Cc: stable@dpdk.org
>
>  Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
>  Reviewed-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
> @@ -17,14 +18,14 @@
>  Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
>  ---
>   drivers/net/bnxt/bnxt.h        |  1 +
> - drivers/net/bnxt/bnxt_ethdev.c | 16 ++++++++++++----
> - 2 files changed, 13 insertions(+), 4 deletions(-)
> + drivers/net/bnxt/bnxt_ethdev.c | 17 +++++++++++++----
> + 2 files changed, 14 insertions(+), 4 deletions(-)
>
>  diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
> -index f0b0800151..bb265999d4 100644
> +index 46cf418647..cdb3e2d3ff 100644
>  --- a/drivers/net/bnxt/bnxt.h
>  +++ b/drivers/net/bnxt/bnxt.h
> -@@ -712,6 +712,7 @@ struct bnxt {
> +@@ -593,6 +593,7 @@ struct bnxt {
>         rte_iova_t                      hwrm_short_cmd_req_dma_addr;
>         rte_spinlock_t                  hwrm_lock;
>         pthread_mutex_t                 def_cp_lock;
> @@ -33,20 +34,21 @@
>         uint16_t                        max_resp_len;
>         uint16_t                        hwrm_max_ext_req_len;
>  diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> -index 7c27e2435a..05e9a6abbf 100644
> +index fe240b6ccc..d6afd03e56 100644
>  --- a/drivers/net/bnxt/bnxt_ethdev.c
>  +++ b/drivers/net/bnxt/bnxt_ethdev.c
> -@@ -1252,9 +1252,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
> +@@ -885,9 +885,8 @@ static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev)
>         eth_dev->rx_pkt_burst = bnxt_receive_function(eth_dev);
>         eth_dev->tx_pkt_burst = bnxt_transmit_function(eth_dev);
>
>  -      pthread_mutex_lock(&bp->def_cp_lock);
>         bnxt_schedule_fw_health_check(bp);
>  -      pthread_mutex_unlock(&bp->def_cp_lock);
> -
> ++
>         return 0;
>
> -@@ -4675,17 +4673,22 @@ void bnxt_schedule_fw_health_check(struct bnxt *bp)
> + error:
> +@@ -4205,17 +4204,22 @@ void bnxt_schedule_fw_health_check(struct bnxt *bp)
>   {
>         uint32_t polling_freq;
>
> @@ -71,7 +73,7 @@
>   }
>
>   static void bnxt_cancel_fw_health_check(struct bnxt *bp)
> -@@ -5473,6 +5476,10 @@ bnxt_init_locks(struct bnxt *bp)
> +@@ -4747,6 +4751,10 @@ bnxt_init_locks(struct bnxt *bp)
>         err = pthread_mutex_init(&bp->def_cp_lock, NULL);
>         if (err)
>                 PMD_DRV_LOG(ERR, "Unable to initialize def_cp_lock\n");
> @@ -82,14 +84,14 @@
>         return err;
>   }
>
> -@@ -5884,6 +5891,7 @@ bnxt_uninit_locks(struct bnxt *bp)
> +@@ -4888,6 +4896,7 @@ bnxt_uninit_locks(struct bnxt *bp)
>   {
>         pthread_mutex_destroy(&bp->flow_lock);
>         pthread_mutex_destroy(&bp->def_cp_lock);
>  +      pthread_mutex_destroy(&bp->health_check_lock);
> -       if (bp->rep_info) {
> -               pthread_mutex_destroy(&bp->rep_info->vfr_lock);
> -               pthread_mutex_destroy(&bp->rep_info->vfr_start_lock);
> + }
> +
> + static int
>  --
>  2.20.1
>
Luca,
          I see that the rebase is not correct, you'd want me to
re-spin the corrected version and send it to the 'stable' mailing
list, right?

Thanks
Som

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

* Re: [dpdk-stable] patch 'net/bnxt: fix link status during device recovery' has been queued to stable release 19.11.6
  2020-10-28 10:43 ` [dpdk-stable] patch 'net/bnxt: fix link status during device recovery' " luca.boccassi
@ 2020-10-29  9:22   ` Kalesh Anakkur Purayil
  0 siblings, 0 replies; 374+ messages in thread
From: Kalesh Anakkur Purayil @ 2020-10-29  9:22 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi Luca,

On Wed, Oct 28, 2020 at 4:19 PM <luca.boccassi@gmail.com> wrote:

> Hi,
>
> FYI, your patch has been queued to stable release 19.11.6
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 10/30/20. So please
> shout if anyone has objections.
>
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for
> rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
>
> Thanks.
>
> Luca Boccassi
>
> ---
> From 77d290729b074c88263d3024229f806fa176e684 Mon Sep 17 00:00:00 2001
> From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> Date: Tue, 22 Sep 2020 11:04:16 +0530
> Subject: [PATCH] net/bnxt: fix link status during device recovery
>
> [ upstream commit 6fcd0de92298f61b8f96ba170db9e81923019626 ]
>
> Driver should not send the phy_cfg request to bring link down
> during reset recovery. If the driver sends the phy_cfg request
> in recovery process, then FW needs to re-establish the link which
> in turn increases the recovery time based on PHY type and link partners.
>
> Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
>
> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> ---
>  drivers/net/bnxt/bnxt_ethdev.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c
> b/drivers/net/bnxt/bnxt_ethdev.c
> index d6afd03e56..bbfe883c15 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -942,7 +942,9 @@ static void bnxt_dev_stop_op(struct rte_eth_dev
> *eth_dev)
>
>         bnxt_cancel_fw_health_check(bp);
>
> -       bnxt_dev_set_link_down_op(eth_dev);
> +       /* Do not bring link down during reset recovery */
> +       if (!is_bnxt_in_error(bp))
> +               bnxt_dev_set_link_down_op(eth_dev);
>
>         /* Wait for link to be reset and the async notification to process.
>          * During reset recovery, there is no need to wait and
> @@ -3908,7 +3910,7 @@ static void bnxt_write_fw_reset_reg(struct bnxt *bp,
> uint32_t index)
>
>  static void bnxt_dev_cleanup(struct bnxt *bp)
>  {
> -       bnxt_set_hwrm_link_config(bp, false);
> +       bp->eth_dev->data->dev_link.link_status = 0;
>         bp->link_info.link_up = 0;
>         if (bp->eth_dev->data->dev_started)
>                 bnxt_dev_stop_op(bp->eth_dev);
> --
> 2.20.1
>
> ---
>   Diff of the applied patch vs upstream commit (please double-check if
> non-empty:
> ---
> --- -   2020-10-28 10:35:13.947167689 +0000
> +++ 0070-net-bnxt-fix-link-status-during-device-recovery.patch  2020-10-28
> 10:35:11.556830789 +0000
> @@ -1,15 +1,16 @@
> -From 6fcd0de92298f61b8f96ba170db9e81923019626 Mon Sep 17 00:00:00 2001
> +From 77d290729b074c88263d3024229f806fa176e684 Mon Sep 17 00:00:00 2001
>  From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
>  Date: Tue, 22 Sep 2020 11:04:16 +0530
>  Subject: [PATCH] net/bnxt: fix link status during device recovery
>
> +[ upstream commit 6fcd0de92298f61b8f96ba170db9e81923019626 ]
> +
>  Driver should not send the phy_cfg request to bring link down
>  during reset recovery. If the driver sends the phy_cfg request
>  in recovery process, then FW needs to re-establish the link which
>  in turn increases the recovery time based on PHY type and link partners.
>
>  Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
> -Cc: stable@dpdk.org
>
>  Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
>  Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
> @@ -19,10 +20,10 @@
>   1 file changed, 4 insertions(+), 2 deletions(-)
>
>  diff --git a/drivers/net/bnxt/bnxt_ethdev.c
> b/drivers/net/bnxt/bnxt_ethdev.c
> -index 05e9a6abbf..e0afaac694 100644
> +index d6afd03e56..bbfe883c15 100644
>  --- a/drivers/net/bnxt/bnxt_ethdev.c
>  +++ b/drivers/net/bnxt/bnxt_ethdev.c
> -@@ -1323,7 +1323,9 @@ static void bnxt_dev_stop_op(struct rte_eth_dev
> *eth_dev)
> +@@ -942,7 +942,9 @@ static void bnxt_dev_stop_op(struct rte_eth_dev
> *eth_dev)
>
>         bnxt_cancel_fw_health_check(bp);
>
> @@ -33,13 +34,13 @@
>
>         /* Wait for link to be reset and the async notification to process.
>          * During reset recovery, there is no need to wait and
> -@@ -4377,7 +4379,7 @@ static void bnxt_write_fw_reset_reg(struct bnxt
> *bp, uint32_t index)
> +@@ -3908,7 +3910,7 @@ static void bnxt_write_fw_reset_reg(struct bnxt
> *bp, uint32_t index)
>
>   static void bnxt_dev_cleanup(struct bnxt *bp)
>   {
>  -      bnxt_set_hwrm_link_config(bp, false);
>  +      bp->eth_dev->data->dev_link.link_status = 0;
> -       bp->link_info->link_up = 0;
> +       bp->link_info.link_up = 0;
>         if (bp->eth_dev->data->dev_started)
>                 bnxt_dev_stop_op(bp->eth_dev);
>

Luca,
          I see that the rebase is not correct, I will fix and send the
patch to 19.11 LTS.

Regards,
Kalesh

>  --
>


-- 
Regards,
Kalesh A P

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

* Re: [dpdk-stable] patch 'net/bnxt: fix link update' has been queued to stable release 19.11.6
  2020-10-28 10:44 ` [dpdk-stable] patch 'net/bnxt: fix link update' " luca.boccassi
@ 2020-10-29  9:24   ` Kalesh Anakkur Purayil
  0 siblings, 0 replies; 374+ messages in thread
From: Kalesh Anakkur Purayil @ 2020-10-29  9:24 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

On Wed, Oct 28, 2020 at 4:22 PM <luca.boccassi@gmail.com> wrote:

> Hi,
>
> FYI, your patch has been queued to stable release 19.11.6
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 10/30/20. So please
> shout if anyone has objections.
>
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for
> rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
>
> Thanks.
>
> Luca Boccassi
>
> ---
> From 6037750360153c816ead7b67b3a522cfff6763c1 Mon Sep 17 00:00:00 2001
> From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> Date: Tue, 6 Oct 2020 21:31:56 +0530
> Subject: [PATCH] net/bnxt: fix link update
>
> [ upstream commit af57c49ca101d8f4c4138082b49dc86d4857f8de ]
>
> 1. When port is stopped, we can forcibly set the link status for the
>    device to down.
> 2. VFs and MH PFs do not have the privilege to bring the link down.
>    As a result driver prints "Link Up" when port is stopped.
> 3. When driver receives link status/speed/config async event from fw,
>    driver invokes bnxt_link_update() with exp_link_status as ETH_LINK_UP
>    This is not logically correct as the async event could be for Link up
>    or link down or for speed change.
>
> Fixes: 074cacb9907a ("net/bnxt: fix link during port toggle")
>
> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> ---
>  drivers/net/bnxt/bnxt.h        |  6 +++--
>  drivers/net/bnxt/bnxt_cpr.c    |  2 +-
>  drivers/net/bnxt/bnxt_ethdev.c | 40 +++++++++++++++++-----------------
>  3 files changed, 25 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
> index cdb3e2d3ff..78249be6c7 100644
> --- a/drivers/net/bnxt/bnxt.h
> +++ b/drivers/net/bnxt/bnxt.h
> @@ -233,8 +233,8 @@ struct bnxt_pf_info {
>  };
>
>  /* Max wait time for link up is 10s and link down is 500ms */
> -#define BNXT_LINK_UP_WAIT_CNT  200
> -#define BNXT_LINK_DOWN_WAIT_CNT        10
> +#define BNXT_MAX_LINK_WAIT_CNT 200
> +#define BNXT_MIN_LINK_WAIT_CNT 10
>  #define BNXT_LINK_WAIT_INTERVAL        50
>  struct bnxt_link_info {
>         uint32_t                phy_flags;
> @@ -681,6 +681,8 @@ void bnxt_schedule_fw_health_check(struct bnxt *bp);
>
>  bool is_bnxt_supported(struct rte_eth_dev *dev);
>  bool bnxt_stratus_device(struct bnxt *bp);
> +int bnxt_link_update_op(struct rte_eth_dev *eth_dev,
> +                       int wait_to_complete);
>  extern const struct rte_flow_ops bnxt_flow_ops;
>  #define bnxt_acquire_flow_lock(bp) \
>         pthread_mutex_lock(&(bp)->flow_lock)
> diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
> index c0e492e6c2..ba9933dc9b 100644
> --- a/drivers/net/bnxt/bnxt_cpr.c
> +++ b/drivers/net/bnxt/bnxt_cpr.c
> @@ -63,7 +63,7 @@ void bnxt_handle_async_event(struct bnxt *bp,
>         case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CHANGE:
>         case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE:
>                 /* FALLTHROUGH */
> -               bnxt_link_update(bp->eth_dev, 0, ETH_LINK_UP);
> +               bnxt_link_update_op(bp->eth_dev, 0);
>                 break;
>         case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD:
>                 PMD_DRV_LOG(INFO, "Async event: PF driver unloaded\n");
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c
> b/drivers/net/bnxt/bnxt_ethdev.c
> index c6e9ad8e6a..a94b73623c 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -871,7 +871,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev
> *eth_dev)
>         eth_dev->data->scattered_rx = bnxt_scattered_rx(eth_dev);
>         eth_dev->data->dev_started = 1;
>
> -       bnxt_link_update(eth_dev, 1, ETH_LINK_UP);
> +       bnxt_link_update_op(eth_dev, 1);
>
>         if (rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
>                 vlan_mask |= ETH_VLAN_FILTER_MASK;
> @@ -928,6 +928,7 @@ static void bnxt_dev_stop_op(struct rte_eth_dev
> *eth_dev)
>         struct bnxt *bp = eth_dev->data->dev_private;
>         struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
>         struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
> +       struct rte_eth_link link;
>
>         eth_dev->data->dev_started = 0;
>         /* Prevent crashes when queues are still in use */
> @@ -942,15 +943,15 @@ static void bnxt_dev_stop_op(struct rte_eth_dev
> *eth_dev)
>         bnxt_cancel_fw_health_check(bp);
>
>         /* Do not bring link down during reset recovery */
> -       if (!is_bnxt_in_error(bp))
> +       if (!is_bnxt_in_error(bp)) {
>                 bnxt_dev_set_link_down_op(eth_dev);
> -
> -       /* Wait for link to be reset and the async notification to process.
> -        * During reset recovery, there is no need to wait and
> -        * VF/NPAR functions do not have privilege to change PHY config.
> -        */
> -       if (!is_bnxt_in_error(bp) && BNXT_SINGLE_PF(bp))
> -               bnxt_link_update(eth_dev, 1, ETH_LINK_DOWN);
> +               /* Wait for link to be reset */
> +               if (BNXT_SINGLE_PF(bp))
> +                       rte_delay_ms(500);
> +               /* clear the recorded link status */
> +               memset(&link, 0, sizeof(link));
> +               rte_eth_linkstatus_set(eth_dev, &link);
> +       }
>
>         /* Clean queue intr-vector mapping */
>         rte_intr_efd_disable(intr_handle);
> @@ -1106,14 +1107,13 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev
> *eth_dev,
>         return rc;
>  }
>
> -int bnxt_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete,
> -                    bool exp_link_status)
> +int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
>  {
>         int rc = 0;
>         struct bnxt *bp = eth_dev->data->dev_private;
>         struct rte_eth_link new;
> -       int cnt = exp_link_status ? BNXT_LINK_UP_WAIT_CNT :
> -                 BNXT_LINK_DOWN_WAIT_CNT;
> +       int cnt = wait_to_complete ? BNXT_MAX_LINK_WAIT_CNT :
> +                       BNXT_MIN_LINK_WAIT_CNT;
>
>         rc = is_bnxt_in_error(bp);
>         if (rc)
> @@ -1131,12 +1131,18 @@ int bnxt_link_update(struct rte_eth_dev *eth_dev,
> int wait_to_complete,
>                         goto out;
>                 }
>
> -               if (!wait_to_complete || new.link_status ==
> exp_link_status)
> +               if (!wait_to_complete || new.link_status)
>                         break;
>
>                 rte_delay_ms(BNXT_LINK_WAIT_INTERVAL);
>         } while (cnt--);
>
> +       /* Only single function PF can bring phy down.
> +        * When port is stopped, report link down for VF/MH/NPAR functions.
> +        */
> +       if (!BNXT_SINGLE_PF(bp) && !eth_dev->data->dev_started)
> +               memset(&new, 0, sizeof(new));
> +
>  out:
>         /* Timed out or success */
>         if (new.link_status != eth_dev->data->dev_link.link_status ||
> @@ -1153,12 +1159,6 @@ out:
>         return rc;
>  }
>
> -static int bnxt_link_update_op(struct rte_eth_dev *eth_dev,
> -                              int wait_to_complete)
> -{
> -       return bnxt_link_update(eth_dev, wait_to_complete, ETH_LINK_UP);
> -}
> -
>  static int bnxt_promiscuous_enable_op(struct rte_eth_dev *eth_dev)
>  {
>         struct bnxt *bp = eth_dev->data->dev_private;
> --
> 2.20.1
>
> ---
>   Diff of the applied patch vs upstream commit (please double-check if
> non-empty:
> ---
> --- -   2020-10-28 10:35:15.689269158 +0000
> +++ 0127-net-bnxt-fix-link-update.patch 2020-10-28 10:35:11.692832791 +0000
> @@ -1,8 +1,10 @@
> -From af57c49ca101d8f4c4138082b49dc86d4857f8de Mon Sep 17 00:00:00 2001
> +From 6037750360153c816ead7b67b3a522cfff6763c1 Mon Sep 17 00:00:00 2001
>  From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
>  Date: Tue, 6 Oct 2020 21:31:56 +0530
>  Subject: [PATCH] net/bnxt: fix link update
>
> +[ upstream commit af57c49ca101d8f4c4138082b49dc86d4857f8de ]
> +
>  1. When port is stopped, we can forcibly set the link status for the
>     device to down.
>  2. VFs and MH PFs do not have the privilege to bring the link down.
> @@ -13,22 +15,21 @@
>     or link down or for speed change.
>
>  Fixes: 074cacb9907a ("net/bnxt: fix link during port toggle")
> -Cc: stable@dpdk.org
>
>  Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
>  Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
>  Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
>  ---
> - drivers/net/bnxt/bnxt.h        |  4 ++--
> + drivers/net/bnxt/bnxt.h        |  6 +++--
>   drivers/net/bnxt/bnxt_cpr.c    |  2 +-
>   drivers/net/bnxt/bnxt_ethdev.c | 40 +++++++++++++++++-----------------
> - 3 files changed, 23 insertions(+), 23 deletions(-)
> + 3 files changed, 25 insertions(+), 23 deletions(-)
>
>  diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
> -index ae38428e69..eca74486e7 100644
> +index cdb3e2d3ff..78249be6c7 100644
>  --- a/drivers/net/bnxt/bnxt.h
>  +++ b/drivers/net/bnxt/bnxt.h
> -@@ -268,8 +268,8 @@ struct bnxt_pf_info {
> +@@ -233,8 +233,8 @@ struct bnxt_pf_info {
>   };
>
>   /* Max wait time for link up is 10s and link down is 500ms */
> @@ -39,11 +40,20 @@
>   #define BNXT_LINK_WAIT_INTERVAL       50
>   struct bnxt_link_info {
>         uint32_t                phy_flags;
> +@@ -681,6 +681,8 @@ void bnxt_schedule_fw_health_check(struct bnxt *bp);
> +
> + bool is_bnxt_supported(struct rte_eth_dev *dev);
> + bool bnxt_stratus_device(struct bnxt *bp);
> ++int bnxt_link_update_op(struct rte_eth_dev *eth_dev,
> ++                      int wait_to_complete);
> + extern const struct rte_flow_ops bnxt_flow_ops;
> + #define bnxt_acquire_flow_lock(bp) \
> +       pthread_mutex_lock(&(bp)->flow_lock)
>  diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
> -index 8311e265ae..a3a7e6ab70 100644
> +index c0e492e6c2..ba9933dc9b 100644
>  --- a/drivers/net/bnxt/bnxt_cpr.c
>  +++ b/drivers/net/bnxt/bnxt_cpr.c
> -@@ -111,7 +111,7 @@ void bnxt_handle_async_event(struct bnxt *bp,
> +@@ -63,7 +63,7 @@ void bnxt_handle_async_event(struct bnxt *bp,
>         case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CHANGE:
>         case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE:
>                 /* FALLTHROUGH */
> @@ -53,10 +63,10 @@
>         case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD:
>                 PMD_DRV_LOG(INFO, "Async event: PF driver unloaded\n");
>  diff --git a/drivers/net/bnxt/bnxt_ethdev.c
> b/drivers/net/bnxt/bnxt_ethdev.c
> -index 624cb20311..1bb0aa838a 100644
> +index c6e9ad8e6a..a94b73623c 100644
>  --- a/drivers/net/bnxt/bnxt_ethdev.c
>  +++ b/drivers/net/bnxt/bnxt_ethdev.c
> -@@ -1279,7 +1279,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev
> *eth_dev)
> +@@ -871,7 +871,7 @@ static int bnxt_dev_start_op(struct rte_eth_dev
> *eth_dev)
>         eth_dev->data->scattered_rx = bnxt_scattered_rx(eth_dev);
>         eth_dev->data->dev_started = 1;
>
> @@ -65,15 +75,15 @@
>
>         if (rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
>                 vlan_mask |= ETH_VLAN_FILTER_MASK;
> -@@ -1347,6 +1347,7 @@ static void bnxt_dev_stop_op(struct rte_eth_dev
> *eth_dev)
> +@@ -928,6 +928,7 @@ static void bnxt_dev_stop_op(struct rte_eth_dev
> *eth_dev)
>         struct bnxt *bp = eth_dev->data->dev_private;
>         struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
>         struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
>  +      struct rte_eth_link link;
>
>         eth_dev->data->dev_started = 0;
> -       eth_dev->data->scattered_rx = 0;
> -@@ -1369,15 +1370,15 @@ static void bnxt_dev_stop_op(struct rte_eth_dev
> *eth_dev)
> +       /* Prevent crashes when queues are still in use */
> +@@ -942,15 +943,15 @@ static void bnxt_dev_stop_op(struct rte_eth_dev
> *eth_dev)
>         bnxt_cancel_fw_health_check(bp);
>
>         /* Do not bring link down during reset recovery */
> @@ -97,7 +107,7 @@
>
>         /* Clean queue intr-vector mapping */
>         rte_intr_efd_disable(intr_handle);
> -@@ -1557,14 +1558,13 @@ static int bnxt_mac_addr_add_op(struct
> rte_eth_dev *eth_dev,
> +@@ -1106,14 +1107,13 @@ static int bnxt_mac_addr_add_op(struct
> rte_eth_dev *eth_dev,
>         return rc;
>   }
>
> @@ -115,7 +125,7 @@
>
>         rc = is_bnxt_in_error(bp);
>         if (rc)
> -@@ -1582,12 +1582,18 @@ int bnxt_link_update(struct rte_eth_dev *eth_dev,
> int wait_to_complete,
> +@@ -1131,12 +1131,18 @@ int bnxt_link_update(struct rte_eth_dev *eth_dev,
> int wait_to_complete,
>                         goto out;
>                 }
>
> @@ -135,12 +145,12 @@
>   out:
>         /* Timed out or success */
>         if (new.link_status != eth_dev->data->dev_link.link_status ||
> -@@ -1604,12 +1610,6 @@ out:
> +@@ -1153,12 +1159,6 @@ out:
>         return rc;
>   }
>
> --int bnxt_link_update_op(struct rte_eth_dev *eth_dev,
> --                      int wait_to_complete)
> +-static int bnxt_link_update_op(struct rte_eth_dev *eth_dev,
> +-                             int wait_to_complete)
>  -{
>  -      return bnxt_link_update(eth_dev, wait_to_complete, ETH_LINK_UP);
>  -}
>

  Hi Luca,
          I see that the rebase is not correct, I will fix it and send the
patch to 19.11 LTS.


-- 
Regards,
Kalesh A P

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

* Re: [dpdk-stable] 答复: patch 'gso: fix payload unit size for UDP' has been queued to stable release 19.11.6
  2020-10-29  4:45   ` [dpdk-stable] 答复: " Yi Yang -云服务集团
@ 2020-10-29 11:10     ` Luca Boccassi
  2020-10-29 11:29       ` Kevin Traynor
  2020-10-30  0:32       ` [dpdk-stable] 答复: [gmail.com代发]Re: " Yi Yang -云服务集团
  0 siblings, 2 replies; 374+ messages in thread
From: Luca Boccassi @ 2020-10-29 11:10 UTC (permalink / raw)
  To: Yi Yang (杨燚)-云服务集团
  Cc: jiayu.hu, stable

Hi,

Sorry, but it seems to me adding entire new features in the shared
libraries is a bit over the grey line that separates what we deem an
acceptable change for a stable release.

On Thu, 2020-10-29 at 04:45 +0000, Yi Yang (杨燚)-云服务集团 wrote:
> Thanks for picking up it, nice to have it in stable release. By the way, would you like to cherry-pick GRO patches for stable release? OVS is using 19.11 stable branch, we had better have GRO support there because I'm enabling VXLAN TSO support in OVS DPDK, GRO and GSO are necessary for it.
> 
> commit e2d81106367321cf49d6b4e5d087e1a7c2e808ba
> Author: Yi Yang <yangyi01@inspur.com>
> Date:   Thu Sep 24 16:57:39 2020 +0800
> 
>     gro: support VXLAN UDP/IPv4
> 
>     VXLAN UDP/IPv4 GRO can help improve VM-to-VM UDP
>     performance when UFO or GSO is enabled in VM, GRO
>     must be supported if UFO or GSO is enabled,
>     otherwise, performance can't get big improvement
>     if only GSO is there.
> 
>     With this enabled in DPDK, OVS DPDK can leverage it
>     to improve VM-to-VM UDP performance, it will reassemble
>     VXLAN UDP/IPv4 fragments immediate after they are
>     received from a physical NIC. It is very helpful in
>     OVS DPDK VXLAN use case.
> 
>     Signed-off-by: Yi Yang <yangyi01@inspur.com>
>     Acked-by: Jiayu Hu <jiayu.hu@intel.com>
> 
> 
> commit 1ca5e67408528b9870bb40f400c5f934aa91dcce
> Author: Yi Yang <yangyi01@inspur.com>
> Date:   Thu Sep 24 16:57:38 2020 +0800
> 
>     gro: support UDP/IPv4
> 
>     UDP/IPv4 GRO can help improve VM-to-VM UDP performance
>     when UFO or GSO is enabled in VM, GRO must be supported
>     if UFO or GSO is enabled, otherwise, performance can't
>     get big improvement if only GSO is there.
> 
>     With this enabled in DPDK, OVS DPDK can leverage it
>     to improve VM-to-VM UDP performance, it will reassemble
>     UDP fragments immediate after they are received from
>     a physical NIC. It is very helpful in OVS DPDK VLAN use
>     case.
> 
>     Signed-off-by: Yi Yang <yangyi01@inspur.com>
>     Acked-by: Jiayu Hu <jiayu.hu@intel.com>
> 
> -----邮件原件-----
> 发件人: luca.boccassi@gmail.com [mailto:luca.boccassi@gmail.com] 
> 发送时间: 2020年10月28日 18:43
> 收件人: Yi Yang (杨燚)-云服务集团 <yangyi01@inspur.com>
> 抄送: Jiayu Hu <jiayu.hu@intel.com>; dpdk stable <stable@dpdk.org>
> 主题: patch 'gso: fix payload unit size for UDP' has been queued to stable release 19.11.6
> 
> Hi,
> 
> FYI, your patch has been queued to stable release 19.11.6
> 
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 10/30/20. So please shout if anyone has objections.
> 
> Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing
> (ie: not only metadata diffs), please double check that the rebase was correctly done.
> 
> Thanks.
> 
> Luca Boccassi
> 
> ---
> From 2b26f143b3014d23a31aa59deda659b172edcc32 Mon Sep 17 00:00:00 2001
> From: Yi Yang <yangyi01@inspur.com>
> Date: Thu, 17 Sep 2020 10:12:49 +0800
> Subject: [PATCH] gso: fix payload unit size for UDP
> 
> [ upstream commit b9b75d9b5c9dbc71ee12f77e9abe089492708aae ]
> 
> Fragment offset of IPv4 header is measured in units of
> 8 bytes. Fragment offset of UDP fragments will be wrong after GSO if pyld_unit_size isn't multiple of 8. Say pyld_unit_size is 1500, fragment offset of the second UDP fragment will be 187 (i.e. 1500 / 8), which means 1496, and it will result in 4-byte data loss (1500 - 1496 = 4).
> So UDP GRO will reassemble out a wrong packet.
> 
> Fixes: b166d4f30b66 ("gso: support UDP/IPv4 fragmentation")
> 
> Signed-off-by: Yi Yang <yangyi01@inspur.com>
> Acked-by: Jiayu Hu <jiayu.hu@intel.com>
> ---
>  lib/librte_gso/gso_udp4.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/librte_gso/gso_udp4.c b/lib/librte_gso/gso_udp4.c index 21fea09273..6fa68f243a 100644
> --- a/lib/librte_gso/gso_udp4.c
> +++ b/lib/librte_gso/gso_udp4.c
> @@ -69,7 +69,10 @@ gso_udp4_segment(struct rte_mbuf *pkt,
>  		return 1;
>  	}
>  
> -	pyld_unit_size = gso_size - hdr_offset;
> +	/* pyld_unit_size must be a multiple of 8 because frag_off
> +	 * uses 8 bytes as unit.
> +	 */
> +	pyld_unit_size = (gso_size - hdr_offset) & ~7U;
>  
>  	/* Segment the payload */
>  	ret = gso_do_segment(pkt, hdr_offset, pyld_unit_size, direct_pool,
> --
> 2.20.1
> 
> ---
>   Diff of the applied patch vs upstream commit (please double-check if non-empty:
> ---
> --- -	2020-10-28 10:35:13.228089104 +0000
> +++ 0046-gso-fix-payload-unit-size-for-UDP.patch	2020-10-28 10:35:11.508830082 +0000
> @@ -1,8 +1,10 @@
> -From b9b75d9b5c9dbc71ee12f77e9abe089492708aae Mon Sep 17 00:00:00 2001
> +From 2b26f143b3014d23a31aa59deda659b172edcc32 Mon Sep 17 00:00:00 2001
>  From: Yi Yang <yangyi01@inspur.com>
>  Date: Thu, 17 Sep 2020 10:12:49 +0800
>  Subject: [PATCH] gso: fix payload unit size for UDP
>  
> +[ upstream commit b9b75d9b5c9dbc71ee12f77e9abe089492708aae ]
> +
>  Fragment offset of IPv4 header is measured in units of
>  8 bytes. Fragment offset of UDP fragments will be wrong  after GSO if pyld_unit_size isn't multiple of 8. Say @@ -12,7 +14,6 @@  So UDP GRO will reassemble out a wrong packet.
>  
>  Fixes: b166d4f30b66 ("gso: support UDP/IPv4 fragmentation")
> -Cc: stable@dpdk.org
>  
>  Signed-off-by: Yi Yang <yangyi01@inspur.com>
>  Acked-by: Jiayu Hu <jiayu.hu@intel.com>


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

* Re: [dpdk-stable] 答复: patch 'gso: fix payload unit size for UDP' has been queued to stable release 19.11.6
  2020-10-29 11:10     ` Luca Boccassi
@ 2020-10-29 11:29       ` Kevin Traynor
  2020-10-30  0:26         ` [dpdk-stable] 答复: " Yi Yang -云服务集团
  2020-10-30  0:32       ` [dpdk-stable] 答复: [gmail.com代发]Re: " Yi Yang -云服务集团
  1 sibling, 1 reply; 374+ messages in thread
From: Kevin Traynor @ 2020-10-29 11:29 UTC (permalink / raw)
  To: Luca Boccassi,
	Yi Yang
	(杨燚)-云服务集团
  Cc: jiayu.hu, stable, Ian Stokes, Ilya Maximets

On 29/10/2020 11:10, Luca Boccassi wrote:
> Hi,
> 
> Sorry, but it seems to me adding entire new features in the shared
> libraries is a bit over the grey line that separates what we deem an
> acceptable change for a stable release.
> 
> On Thu, 2020-10-29 at 04:45 +0000, Yi Yang (杨燚)-云服务集团 wrote:
>> Thanks for picking up it, nice to have it in stable release. By the way, would you like to cherry-pick GRO patches for stable release? OVS is using 19.11 stable branch, we had better have GRO support there because I'm enabling VXLAN TSO support in OVS DPDK, GRO and GSO are necessary for it.
>>

OVS normally uses the the latest DPDK LTS, so it should be moving to
20.11 in the next couple of months. There is an OVS branch called
'dpdk-latest' for developing against the DPDK main branch, so you should
be able to test and send patches for it in preparation of OVS using 20.11.

>> commit e2d81106367321cf49d6b4e5d087e1a7c2e808ba
>> Author: Yi Yang <yangyi01@inspur.com>
>> Date:   Thu Sep 24 16:57:39 2020 +0800
>>
>>     gro: support VXLAN UDP/IPv4
>>
>>     VXLAN UDP/IPv4 GRO can help improve VM-to-VM UDP
>>     performance when UFO or GSO is enabled in VM, GRO
>>     must be supported if UFO or GSO is enabled,
>>     otherwise, performance can't get big improvement
>>     if only GSO is there.
>>
>>     With this enabled in DPDK, OVS DPDK can leverage it
>>     to improve VM-to-VM UDP performance, it will reassemble
>>     VXLAN UDP/IPv4 fragments immediate after they are
>>     received from a physical NIC. It is very helpful in
>>     OVS DPDK VXLAN use case.
>>
>>     Signed-off-by: Yi Yang <yangyi01@inspur.com>
>>     Acked-by: Jiayu Hu <jiayu.hu@intel.com>
>>
>>
>> commit 1ca5e67408528b9870bb40f400c5f934aa91dcce
>> Author: Yi Yang <yangyi01@inspur.com>
>> Date:   Thu Sep 24 16:57:38 2020 +0800
>>
>>     gro: support UDP/IPv4
>>
>>     UDP/IPv4 GRO can help improve VM-to-VM UDP performance
>>     when UFO or GSO is enabled in VM, GRO must be supported
>>     if UFO or GSO is enabled, otherwise, performance can't
>>     get big improvement if only GSO is there.
>>
>>     With this enabled in DPDK, OVS DPDK can leverage it
>>     to improve VM-to-VM UDP performance, it will reassemble
>>     UDP fragments immediate after they are received from
>>     a physical NIC. It is very helpful in OVS DPDK VLAN use
>>     case.
>>
>>     Signed-off-by: Yi Yang <yangyi01@inspur.com>
>>     Acked-by: Jiayu Hu <jiayu.hu@intel.com>
>>
>> -----邮件原件-----
>> 发件人: luca.boccassi@gmail.com [mailto:luca.boccassi@gmail.com] 
>> 发送时间: 2020年10月28日 18:43
>> 收件人: Yi Yang (杨燚)-云服务集团 <yangyi01@inspur.com>
>> 抄送: Jiayu Hu <jiayu.hu@intel.com>; dpdk stable <stable@dpdk.org>
>> 主题: patch 'gso: fix payload unit size for UDP' has been queued to stable release 19.11.6
>>
>> Hi,
>>
>> FYI, your patch has been queued to stable release 19.11.6
>>
>> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
>> It will be pushed if I get no objections before 10/30/20. So please shout if anyone has objections.
>>
>> Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing
>> (ie: not only metadata diffs), please double check that the rebase was correctly done.
>>
>> Thanks.
>>
>> Luca Boccassi
>>
>> ---
>> From 2b26f143b3014d23a31aa59deda659b172edcc32 Mon Sep 17 00:00:00 2001
>> From: Yi Yang <yangyi01@inspur.com>
>> Date: Thu, 17 Sep 2020 10:12:49 +0800
>> Subject: [PATCH] gso: fix payload unit size for UDP
>>
>> [ upstream commit b9b75d9b5c9dbc71ee12f77e9abe089492708aae ]
>>
>> Fragment offset of IPv4 header is measured in units of
>> 8 bytes. Fragment offset of UDP fragments will be wrong after GSO if pyld_unit_size isn't multiple of 8. Say pyld_unit_size is 1500, fragment offset of the second UDP fragment will be 187 (i.e. 1500 / 8), which means 1496, and it will result in 4-byte data loss (1500 - 1496 = 4).
>> So UDP GRO will reassemble out a wrong packet.
>>
>> Fixes: b166d4f30b66 ("gso: support UDP/IPv4 fragmentation")
>>
>> Signed-off-by: Yi Yang <yangyi01@inspur.com>
>> Acked-by: Jiayu Hu <jiayu.hu@intel.com>
>> ---
>>  lib/librte_gso/gso_udp4.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/lib/librte_gso/gso_udp4.c b/lib/librte_gso/gso_udp4.c index 21fea09273..6fa68f243a 100644
>> --- a/lib/librte_gso/gso_udp4.c
>> +++ b/lib/librte_gso/gso_udp4.c
>> @@ -69,7 +69,10 @@ gso_udp4_segment(struct rte_mbuf *pkt,
>>  		return 1;
>>  	}
>>  
>> -	pyld_unit_size = gso_size - hdr_offset;
>> +	/* pyld_unit_size must be a multiple of 8 because frag_off
>> +	 * uses 8 bytes as unit.
>> +	 */
>> +	pyld_unit_size = (gso_size - hdr_offset) & ~7U;
>>  
>>  	/* Segment the payload */
>>  	ret = gso_do_segment(pkt, hdr_offset, pyld_unit_size, direct_pool,
>> --
>> 2.20.1
>>
>> ---
>>   Diff of the applied patch vs upstream commit (please double-check if non-empty:
>> ---
>> --- -	2020-10-28 10:35:13.228089104 +0000
>> +++ 0046-gso-fix-payload-unit-size-for-UDP.patch	2020-10-28 10:35:11.508830082 +0000
>> @@ -1,8 +1,10 @@
>> -From b9b75d9b5c9dbc71ee12f77e9abe089492708aae Mon Sep 17 00:00:00 2001
>> +From 2b26f143b3014d23a31aa59deda659b172edcc32 Mon Sep 17 00:00:00 2001
>>  From: Yi Yang <yangyi01@inspur.com>
>>  Date: Thu, 17 Sep 2020 10:12:49 +0800
>>  Subject: [PATCH] gso: fix payload unit size for UDP
>>  
>> +[ upstream commit b9b75d9b5c9dbc71ee12f77e9abe089492708aae ]
>> +
>>  Fragment offset of IPv4 header is measured in units of
>>  8 bytes. Fragment offset of UDP fragments will be wrong  after GSO if pyld_unit_size isn't multiple of 8. Say @@ -12,7 +14,6 @@  So UDP GRO will reassemble out a wrong packet.
>>  
>>  Fixes: b166d4f30b66 ("gso: support UDP/IPv4 fragmentation")
>> -Cc: stable@dpdk.org
>>  
>>  Signed-off-by: Yi Yang <yangyi01@inspur.com>
>>  Acked-by: Jiayu Hu <jiayu.hu@intel.com>
> 


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

* [dpdk-stable] 答复:  答复: patch 'gso: fix payload unit size for UDP' has been queued to stable release 19.11.6
  2020-10-29 11:29       ` Kevin Traynor
@ 2020-10-30  0:26         ` Yi Yang -云服务集团
  2020-10-30  9:31           ` Kevin Traynor
  0 siblings, 1 reply; 374+ messages in thread
From: Yi Yang (杨燚)-云服务集团 @ 2020-10-30  0:26 UTC (permalink / raw)
  To: ktraynor, bluca; +Cc: jiayu.hu, stable, ian.stokes, i.maximets

Got it, thanks Kevin for comments. How can I use 'dpdk-latest' for OVS DPDK build in travis and local machine? Any existing guide for using 'dpdk-latest'?

-----邮件原件-----
发件人: Kevin Traynor [mailto:ktraynor@redhat.com] 
发送时间: 2020年10月29日 19:29
收件人: Luca Boccassi <bluca@debian.org>; Yi Yang (杨燚)-云服务集团 <yangyi01@inspur.com>
抄送: jiayu.hu@intel.com; stable@dpdk.org; Ian Stokes <ian.stokes@intel.com>; Ilya Maximets <i.maximets@ovn.org>
主题: Re: [dpdk-stable] 答复: patch 'gso: fix payload unit size for UDP' has been queued to stable release 19.11.6

On 29/10/2020 11:10, Luca Boccassi wrote:
> Hi,
> 
> Sorry, but it seems to me adding entire new features in the shared 
> libraries is a bit over the grey line that separates what we deem an 
> acceptable change for a stable release.
> 
> On Thu, 2020-10-29 at 04:45 +0000, Yi Yang (杨燚)-云服务集团 wrote:
>> Thanks for picking up it, nice to have it in stable release. By the way, would you like to cherry-pick GRO patches for stable release? OVS is using 19.11 stable branch, we had better have GRO support there because I'm enabling VXLAN TSO support in OVS DPDK, GRO and GSO are necessary for it.
>>

OVS normally uses the the latest DPDK LTS, so it should be moving to
20.11 in the next couple of months. There is an OVS branch called 'dpdk-latest' for developing against the DPDK main branch, so you should be able to test and send patches for it in preparation of OVS using 20.11.

>> commit e2d81106367321cf49d6b4e5d087e1a7c2e808ba
>> Author: Yi Yang <yangyi01@inspur.com>
>> Date:   Thu Sep 24 16:57:39 2020 +0800
>>
>>     gro: support VXLAN UDP/IPv4
>>
>>     VXLAN UDP/IPv4 GRO can help improve VM-to-VM UDP
>>     performance when UFO or GSO is enabled in VM, GRO
>>     must be supported if UFO or GSO is enabled,
>>     otherwise, performance can't get big improvement
>>     if only GSO is there.
>>
>>     With this enabled in DPDK, OVS DPDK can leverage it
>>     to improve VM-to-VM UDP performance, it will reassemble
>>     VXLAN UDP/IPv4 fragments immediate after they are
>>     received from a physical NIC. It is very helpful in
>>     OVS DPDK VXLAN use case.
>>
>>     Signed-off-by: Yi Yang <yangyi01@inspur.com>
>>     Acked-by: Jiayu Hu <jiayu.hu@intel.com>
>>
>>
>> commit 1ca5e67408528b9870bb40f400c5f934aa91dcce
>> Author: Yi Yang <yangyi01@inspur.com>
>> Date:   Thu Sep 24 16:57:38 2020 +0800
>>
>>     gro: support UDP/IPv4
>>
>>     UDP/IPv4 GRO can help improve VM-to-VM UDP performance
>>     when UFO or GSO is enabled in VM, GRO must be supported
>>     if UFO or GSO is enabled, otherwise, performance can't
>>     get big improvement if only GSO is there.
>>
>>     With this enabled in DPDK, OVS DPDK can leverage it
>>     to improve VM-to-VM UDP performance, it will reassemble
>>     UDP fragments immediate after they are received from
>>     a physical NIC. It is very helpful in OVS DPDK VLAN use
>>     case.
>>
>>     Signed-off-by: Yi Yang <yangyi01@inspur.com>
>>     Acked-by: Jiayu Hu <jiayu.hu@intel.com>
>>
>> -----邮件原件-----
>> 发件人: luca.boccassi@gmail.com [mailto:luca.boccassi@gmail.com]
>> 发送时间: 2020年10月28日 18:43
>> 收件人: Yi Yang (杨燚)-云服务集团 <yangyi01@inspur.com>
>> 抄送: Jiayu Hu <jiayu.hu@intel.com>; dpdk stable <stable@dpdk.org>
>> 主题: patch 'gso: fix payload unit size for UDP' has been queued to 
>> stable release 19.11.6
>>
>> Hi,
>>
>> FYI, your patch has been queued to stable release 19.11.6
>>
>> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
>> It will be pushed if I get no objections before 10/30/20. So please shout if anyone has objections.
>>
>> Also note that after the patch there's a diff of the upstream commit 
>> vs the patch applied to the branch. This will indicate if there was 
>> any rebasing needed to apply to the stable branch. If there were code 
>> changes for rebasing
>> (ie: not only metadata diffs), please double check that the rebase was correctly done.
>>
>> Thanks.
>>
>> Luca Boccassi
>>
>> ---
>> From 2b26f143b3014d23a31aa59deda659b172edcc32 Mon Sep 17 00:00:00 
>> 2001
>> From: Yi Yang <yangyi01@inspur.com>
>> Date: Thu, 17 Sep 2020 10:12:49 +0800
>> Subject: [PATCH] gso: fix payload unit size for UDP
>>
>> [ upstream commit b9b75d9b5c9dbc71ee12f77e9abe089492708aae ]
>>
>> Fragment offset of IPv4 header is measured in units of
>> 8 bytes. Fragment offset of UDP fragments will be wrong after GSO if pyld_unit_size isn't multiple of 8. Say pyld_unit_size is 1500, fragment offset of the second UDP fragment will be 187 (i.e. 1500 / 8), which means 1496, and it will result in 4-byte data loss (1500 - 1496 = 4).
>> So UDP GRO will reassemble out a wrong packet.
>>
>> Fixes: b166d4f30b66 ("gso: support UDP/IPv4 fragmentation")
>>
>> Signed-off-by: Yi Yang <yangyi01@inspur.com>
>> Acked-by: Jiayu Hu <jiayu.hu@intel.com>
>> ---
>>  lib/librte_gso/gso_udp4.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/lib/librte_gso/gso_udp4.c b/lib/librte_gso/gso_udp4.c 
>> index 21fea09273..6fa68f243a 100644
>> --- a/lib/librte_gso/gso_udp4.c
>> +++ b/lib/librte_gso/gso_udp4.c
>> @@ -69,7 +69,10 @@ gso_udp4_segment(struct rte_mbuf *pkt,
>>  		return 1;
>>  	}
>>  
>> -	pyld_unit_size = gso_size - hdr_offset;
>> +	/* pyld_unit_size must be a multiple of 8 because frag_off
>> +	 * uses 8 bytes as unit.
>> +	 */
>> +	pyld_unit_size = (gso_size - hdr_offset) & ~7U;
>>  
>>  	/* Segment the payload */
>>  	ret = gso_do_segment(pkt, hdr_offset, pyld_unit_size, direct_pool,
>> --
>> 2.20.1
>>
>> ---
>>   Diff of the applied patch vs upstream commit (please double-check if non-empty:
>> ---
>> --- -	2020-10-28 10:35:13.228089104 +0000
>> +++ 0046-gso-fix-payload-unit-size-for-UDP.patch	2020-10-28 10:35:11.508830082 +0000
>> @@ -1,8 +1,10 @@
>> -From b9b75d9b5c9dbc71ee12f77e9abe089492708aae Mon Sep 17 00:00:00 
>> 2001
>> +From 2b26f143b3014d23a31aa59deda659b172edcc32 Mon Sep 17 00:00:00 
>> +2001
>>  From: Yi Yang <yangyi01@inspur.com>
>>  Date: Thu, 17 Sep 2020 10:12:49 +0800
>>  Subject: [PATCH] gso: fix payload unit size for UDP
>>  
>> +[ upstream commit b9b75d9b5c9dbc71ee12f77e9abe089492708aae ]
>> +
>>  Fragment offset of IPv4 header is measured in units of
>>  8 bytes. Fragment offset of UDP fragments will be wrong  after GSO if pyld_unit_size isn't multiple of 8. Say @@ -12,7 +14,6 @@  So UDP GRO will reassemble out a wrong packet.
>>  
>>  Fixes: b166d4f30b66 ("gso: support UDP/IPv4 fragmentation")
>> -Cc: stable@dpdk.org
>>  
>>  Signed-off-by: Yi Yang <yangyi01@inspur.com>
>>  Acked-by: Jiayu Hu <jiayu.hu@intel.com>
> 


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

* [dpdk-stable] 答复: [gmail.com代发]Re: 答复: patch 'gso: fix payload unit size for UDP' has been queued to stable release 19.11.6
  2020-10-29 11:10     ` Luca Boccassi
  2020-10-29 11:29       ` Kevin Traynor
@ 2020-10-30  0:32       ` Yi Yang -云服务集团
  1 sibling, 0 replies; 374+ messages in thread
From: Yi Yang (杨燚)-云服务集团 @ 2020-10-30  0:32 UTC (permalink / raw)
  To: bluca; +Cc: jiayu.hu, stable

Strictly speaking, they aren't new features, just some feature enhancements, API and ABI aren't changed, so existing applications using them won't realize there is any change, but new applications can use these new enhancements.

Kevin said OVS will switch to 20.11 in the coming several months, that is also an option if we can pull them into 19.11 stable branch.

-----邮件原件-----
发件人: Luca Boccassi [mailto:bluca@debian.org] 
发送时间: 2020年10月29日 19:10
收件人: Yi Yang (杨燚)-云服务集团 <yangyi01@inspur.com>
抄送: jiayu.hu@intel.com; stable@dpdk.org
主题: [gmail.com代发]Re: 答复: patch 'gso: fix payload unit size for UDP' has been queued to stable release 19.11.6

Hi,

Sorry, but it seems to me adding entire new features in the shared libraries is a bit over the grey line that separates what we deem an acceptable change for a stable release.

On Thu, 2020-10-29 at 04:45 +0000, Yi Yang (杨燚)-云服务集团 wrote:
> Thanks for picking up it, nice to have it in stable release. By the way, would you like to cherry-pick GRO patches for stable release? OVS is using 19.11 stable branch, we had better have GRO support there because I'm enabling VXLAN TSO support in OVS DPDK, GRO and GSO are necessary for it.
> 
> commit e2d81106367321cf49d6b4e5d087e1a7c2e808ba
> Author: Yi Yang <yangyi01@inspur.com>
> Date:   Thu Sep 24 16:57:39 2020 +0800
> 
>     gro: support VXLAN UDP/IPv4
> 
>     VXLAN UDP/IPv4 GRO can help improve VM-to-VM UDP
>     performance when UFO or GSO is enabled in VM, GRO
>     must be supported if UFO or GSO is enabled,
>     otherwise, performance can't get big improvement
>     if only GSO is there.
> 
>     With this enabled in DPDK, OVS DPDK can leverage it
>     to improve VM-to-VM UDP performance, it will reassemble
>     VXLAN UDP/IPv4 fragments immediate after they are
>     received from a physical NIC. It is very helpful in
>     OVS DPDK VXLAN use case.
> 
>     Signed-off-by: Yi Yang <yangyi01@inspur.com>
>     Acked-by: Jiayu Hu <jiayu.hu@intel.com>
> 
> 
> commit 1ca5e67408528b9870bb40f400c5f934aa91dcce
> Author: Yi Yang <yangyi01@inspur.com>
> Date:   Thu Sep 24 16:57:38 2020 +0800
> 
>     gro: support UDP/IPv4
> 
>     UDP/IPv4 GRO can help improve VM-to-VM UDP performance
>     when UFO or GSO is enabled in VM, GRO must be supported
>     if UFO or GSO is enabled, otherwise, performance can't
>     get big improvement if only GSO is there.
> 
>     With this enabled in DPDK, OVS DPDK can leverage it
>     to improve VM-to-VM UDP performance, it will reassemble
>     UDP fragments immediate after they are received from
>     a physical NIC. It is very helpful in OVS DPDK VLAN use
>     case.
> 
>     Signed-off-by: Yi Yang <yangyi01@inspur.com>
>     Acked-by: Jiayu Hu <jiayu.hu@intel.com>
> 
> -----邮件原件-----
> 发件人: luca.boccassi@gmail.com [mailto:luca.boccassi@gmail.com]
> 发送时间: 2020年10月28日 18:43
> 收件人: Yi Yang (杨燚)-云服务集团 <yangyi01@inspur.com>
> 抄送: Jiayu Hu <jiayu.hu@intel.com>; dpdk stable <stable@dpdk.org>
> 主题: patch 'gso: fix payload unit size for UDP' has been queued to 
> stable release 19.11.6
> 
> Hi,
> 
> FYI, your patch has been queued to stable release 19.11.6
> 
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 10/30/20. So please shout if anyone has objections.
> 
> Also note that after the patch there's a diff of the upstream commit 
> vs the patch applied to the branch. This will indicate if there was 
> any rebasing needed to apply to the stable branch. If there were code 
> changes for rebasing
> (ie: not only metadata diffs), please double check that the rebase was correctly done.
> 
> Thanks.
> 
> Luca Boccassi
> 
> ---
> From 2b26f143b3014d23a31aa59deda659b172edcc32 Mon Sep 17 00:00:00 2001
> From: Yi Yang <yangyi01@inspur.com>
> Date: Thu, 17 Sep 2020 10:12:49 +0800
> Subject: [PATCH] gso: fix payload unit size for UDP
> 
> [ upstream commit b9b75d9b5c9dbc71ee12f77e9abe089492708aae ]
> 
> Fragment offset of IPv4 header is measured in units of
> 8 bytes. Fragment offset of UDP fragments will be wrong after GSO if pyld_unit_size isn't multiple of 8. Say pyld_unit_size is 1500, fragment offset of the second UDP fragment will be 187 (i.e. 1500 / 8), which means 1496, and it will result in 4-byte data loss (1500 - 1496 = 4).
> So UDP GRO will reassemble out a wrong packet.
> 
> Fixes: b166d4f30b66 ("gso: support UDP/IPv4 fragmentation")
> 
> Signed-off-by: Yi Yang <yangyi01@inspur.com>
> Acked-by: Jiayu Hu <jiayu.hu@intel.com>
> ---
>  lib/librte_gso/gso_udp4.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/librte_gso/gso_udp4.c b/lib/librte_gso/gso_udp4.c 
> index 21fea09273..6fa68f243a 100644
> --- a/lib/librte_gso/gso_udp4.c
> +++ b/lib/librte_gso/gso_udp4.c
> @@ -69,7 +69,10 @@ gso_udp4_segment(struct rte_mbuf *pkt,
>  		return 1;
>  	}
>  
> -	pyld_unit_size = gso_size - hdr_offset;
> +	/* pyld_unit_size must be a multiple of 8 because frag_off
> +	 * uses 8 bytes as unit.
> +	 */
> +	pyld_unit_size = (gso_size - hdr_offset) & ~7U;
>  
>  	/* Segment the payload */
>  	ret = gso_do_segment(pkt, hdr_offset, pyld_unit_size, direct_pool,
> --
> 2.20.1
> 
> ---
>   Diff of the applied patch vs upstream commit (please double-check if non-empty:
> ---
> --- -	2020-10-28 10:35:13.228089104 +0000
> +++ 0046-gso-fix-payload-unit-size-for-UDP.patch	2020-10-28 10:35:11.508830082 +0000
> @@ -1,8 +1,10 @@
> -From b9b75d9b5c9dbc71ee12f77e9abe089492708aae Mon Sep 17 00:00:00 
> 2001
> +From 2b26f143b3014d23a31aa59deda659b172edcc32 Mon Sep 17 00:00:00 
> +2001
>  From: Yi Yang <yangyi01@inspur.com>
>  Date: Thu, 17 Sep 2020 10:12:49 +0800
>  Subject: [PATCH] gso: fix payload unit size for UDP
>  
> +[ upstream commit b9b75d9b5c9dbc71ee12f77e9abe089492708aae ]
> +
>  Fragment offset of IPv4 header is measured in units of
>  8 bytes. Fragment offset of UDP fragments will be wrong  after GSO if pyld_unit_size isn't multiple of 8. Say @@ -12,7 +14,6 @@  So UDP GRO will reassemble out a wrong packet.
>  
>  Fixes: b166d4f30b66 ("gso: support UDP/IPv4 fragmentation")
> -Cc: stable@dpdk.org
>  
>  Signed-off-by: Yi Yang <yangyi01@inspur.com>
>  Acked-by: Jiayu Hu <jiayu.hu@intel.com>


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

* Re: [dpdk-stable] 答复:  答复: patch 'gso: fix payload unit size for UDP' has been queued to stable release 19.11.6
  2020-10-30  0:26         ` [dpdk-stable] 答复: " Yi Yang -云服务集团
@ 2020-10-30  9:31           ` Kevin Traynor
  0 siblings, 0 replies; 374+ messages in thread
From: Kevin Traynor @ 2020-10-30  9:31 UTC (permalink / raw)
  To: Yi Yang
	(杨燚)-云服务集团,
	bluca
  Cc: jiayu.hu, stable, ian.stokes, i.maximets

On 30/10/2020 00:26, Yi Yang (杨燚)-云服务集团 wrote:
> Got it, thanks Kevin for comments. How can I use 'dpdk-latest' for OVS DPDK build in travis and local machine? Any existing guide for using 'dpdk-latest'?
> 

You can use it the same way you use OVS master branch, except pairing
with DPDK main branch instead of 19.11. Patches for it should have
[PATCH dpdk-latest]. I'm not sure if the robot runs travis for patches
on it, I don't think so - I guess you can run it with your own travis
account.

> -----邮件原件-----
> 发件人: Kevin Traynor [mailto:ktraynor@redhat.com] 
> 发送时间: 2020年10月29日 19:29
> 收件人: Luca Boccassi <bluca@debian.org>; Yi Yang (杨燚)-云服务集团 <yangyi01@inspur.com>
> 抄送: jiayu.hu@intel.com; stable@dpdk.org; Ian Stokes <ian.stokes@intel.com>; Ilya Maximets <i.maximets@ovn.org>
> 主题: Re: [dpdk-stable] 答复: patch 'gso: fix payload unit size for UDP' has been queued to stable release 19.11.6
> 
> On 29/10/2020 11:10, Luca Boccassi wrote:
>> Hi,
>>
>> Sorry, but it seems to me adding entire new features in the shared 
>> libraries is a bit over the grey line that separates what we deem an 
>> acceptable change for a stable release.
>>
>> On Thu, 2020-10-29 at 04:45 +0000, Yi Yang (杨燚)-云服务集团 wrote:
>>> Thanks for picking up it, nice to have it in stable release. By the way, would you like to cherry-pick GRO patches for stable release? OVS is using 19.11 stable branch, we had better have GRO support there because I'm enabling VXLAN TSO support in OVS DPDK, GRO and GSO are necessary for it.
>>>
> 
> OVS normally uses the the latest DPDK LTS, so it should be moving to
> 20.11 in the next couple of months. There is an OVS branch called 'dpdk-latest' for developing against the DPDK main branch, so you should be able to test and send patches for it in preparation of OVS using 20.11.
> 
>>> commit e2d81106367321cf49d6b4e5d087e1a7c2e808ba
>>> Author: Yi Yang <yangyi01@inspur.com>
>>> Date:   Thu Sep 24 16:57:39 2020 +0800
>>>
>>>     gro: support VXLAN UDP/IPv4
>>>
>>>     VXLAN UDP/IPv4 GRO can help improve VM-to-VM UDP
>>>     performance when UFO or GSO is enabled in VM, GRO
>>>     must be supported if UFO or GSO is enabled,
>>>     otherwise, performance can't get big improvement
>>>     if only GSO is there.
>>>
>>>     With this enabled in DPDK, OVS DPDK can leverage it
>>>     to improve VM-to-VM UDP performance, it will reassemble
>>>     VXLAN UDP/IPv4 fragments immediate after they are
>>>     received from a physical NIC. It is very helpful in
>>>     OVS DPDK VXLAN use case.
>>>
>>>     Signed-off-by: Yi Yang <yangyi01@inspur.com>
>>>     Acked-by: Jiayu Hu <jiayu.hu@intel.com>
>>>
>>>
>>> commit 1ca5e67408528b9870bb40f400c5f934aa91dcce
>>> Author: Yi Yang <yangyi01@inspur.com>
>>> Date:   Thu Sep 24 16:57:38 2020 +0800
>>>
>>>     gro: support UDP/IPv4
>>>
>>>     UDP/IPv4 GRO can help improve VM-to-VM UDP performance
>>>     when UFO or GSO is enabled in VM, GRO must be supported
>>>     if UFO or GSO is enabled, otherwise, performance can't
>>>     get big improvement if only GSO is there.
>>>
>>>     With this enabled in DPDK, OVS DPDK can leverage it
>>>     to improve VM-to-VM UDP performance, it will reassemble
>>>     UDP fragments immediate after they are received from
>>>     a physical NIC. It is very helpful in OVS DPDK VLAN use
>>>     case.
>>>
>>>     Signed-off-by: Yi Yang <yangyi01@inspur.com>
>>>     Acked-by: Jiayu Hu <jiayu.hu@intel.com>
>>>
>>> -----邮件原件-----
>>> 发件人: luca.boccassi@gmail.com [mailto:luca.boccassi@gmail.com]
>>> 发送时间: 2020年10月28日 18:43
>>> 收件人: Yi Yang (杨燚)-云服务集团 <yangyi01@inspur.com>
>>> 抄送: Jiayu Hu <jiayu.hu@intel.com>; dpdk stable <stable@dpdk.org>
>>> 主题: patch 'gso: fix payload unit size for UDP' has been queued to 
>>> stable release 19.11.6
>>>
>>> Hi,
>>>
>>> FYI, your patch has been queued to stable release 19.11.6
>>>
>>> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
>>> It will be pushed if I get no objections before 10/30/20. So please shout if anyone has objections.
>>>
>>> Also note that after the patch there's a diff of the upstream commit 
>>> vs the patch applied to the branch. This will indicate if there was 
>>> any rebasing needed to apply to the stable branch. If there were code 
>>> changes for rebasing
>>> (ie: not only metadata diffs), please double check that the rebase was correctly done.
>>>
>>> Thanks.
>>>
>>> Luca Boccassi
>>>
>>> ---
>>> From 2b26f143b3014d23a31aa59deda659b172edcc32 Mon Sep 17 00:00:00 
>>> 2001
>>> From: Yi Yang <yangyi01@inspur.com>
>>> Date: Thu, 17 Sep 2020 10:12:49 +0800
>>> Subject: [PATCH] gso: fix payload unit size for UDP
>>>
>>> [ upstream commit b9b75d9b5c9dbc71ee12f77e9abe089492708aae ]
>>>
>>> Fragment offset of IPv4 header is measured in units of
>>> 8 bytes. Fragment offset of UDP fragments will be wrong after GSO if pyld_unit_size isn't multiple of 8. Say pyld_unit_size is 1500, fragment offset of the second UDP fragment will be 187 (i.e. 1500 / 8), which means 1496, and it will result in 4-byte data loss (1500 - 1496 = 4).
>>> So UDP GRO will reassemble out a wrong packet.
>>>
>>> Fixes: b166d4f30b66 ("gso: support UDP/IPv4 fragmentation")
>>>
>>> Signed-off-by: Yi Yang <yangyi01@inspur.com>
>>> Acked-by: Jiayu Hu <jiayu.hu@intel.com>
>>> ---
>>>  lib/librte_gso/gso_udp4.c | 5 ++++-
>>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/lib/librte_gso/gso_udp4.c b/lib/librte_gso/gso_udp4.c 
>>> index 21fea09273..6fa68f243a 100644
>>> --- a/lib/librte_gso/gso_udp4.c
>>> +++ b/lib/librte_gso/gso_udp4.c
>>> @@ -69,7 +69,10 @@ gso_udp4_segment(struct rte_mbuf *pkt,
>>>  		return 1;
>>>  	}
>>>  
>>> -	pyld_unit_size = gso_size - hdr_offset;
>>> +	/* pyld_unit_size must be a multiple of 8 because frag_off
>>> +	 * uses 8 bytes as unit.
>>> +	 */
>>> +	pyld_unit_size = (gso_size - hdr_offset) & ~7U;
>>>  
>>>  	/* Segment the payload */
>>>  	ret = gso_do_segment(pkt, hdr_offset, pyld_unit_size, direct_pool,
>>> --
>>> 2.20.1
>>>
>>> ---
>>>   Diff of the applied patch vs upstream commit (please double-check if non-empty:
>>> ---
>>> --- -	2020-10-28 10:35:13.228089104 +0000
>>> +++ 0046-gso-fix-payload-unit-size-for-UDP.patch	2020-10-28 10:35:11.508830082 +0000
>>> @@ -1,8 +1,10 @@
>>> -From b9b75d9b5c9dbc71ee12f77e9abe089492708aae Mon Sep 17 00:00:00 
>>> 2001
>>> +From 2b26f143b3014d23a31aa59deda659b172edcc32 Mon Sep 17 00:00:00 
>>> +2001
>>>  From: Yi Yang <yangyi01@inspur.com>
>>>  Date: Thu, 17 Sep 2020 10:12:49 +0800
>>>  Subject: [PATCH] gso: fix payload unit size for UDP
>>>  
>>> +[ upstream commit b9b75d9b5c9dbc71ee12f77e9abe089492708aae ]
>>> +
>>>  Fragment offset of IPv4 header is measured in units of
>>>  8 bytes. Fragment offset of UDP fragments will be wrong  after GSO if pyld_unit_size isn't multiple of 8. Say @@ -12,7 +14,6 @@  So UDP GRO will reassemble out a wrong packet.
>>>  
>>>  Fixes: b166d4f30b66 ("gso: support UDP/IPv4 fragmentation")
>>> -Cc: stable@dpdk.org
>>>  
>>>  Signed-off-by: Yi Yang <yangyi01@inspur.com>
>>>  Acked-by: Jiayu Hu <jiayu.hu@intel.com>
>>
> 


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

* [dpdk-stable] patch 'efd: fix tailq entry leak in error path' has been queued to stable release 19.11.6
  2020-10-28 10:46 ` [dpdk-stable] patch 'config: add Graviton2(arm64) defconfig' " luca.boccassi
@ 2020-11-09 18:39   ` luca.boccassi
  2020-11-09 18:39     ` [dpdk-stable] patch 'net/softnic: use POSIX network address conversion' " luca.boccassi
                       ` (81 more replies)
  2020-11-09 18:50   ` [dpdk-stable] patch 'eal: fix MCS lock and ticketlock headers install' " luca.boccassi
  1 sibling, 82 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:39 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Yipeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1ff9a185c8402e9a5ac8f20c92b00c6b99f03b28

Thanks.

Luca Boccassi

---
From 1ff9a185c8402e9a5ac8f20c92b00c6b99f03b28 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 4deeb17924..3fd1f1c97b 100644
--- a/lib/librte_efd/rte_efd.c
+++ b/lib/librte_efd/rte_efd.c
@@ -707,6 +707,7 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len,
 
 error_unlock_exit:
 	rte_mcfg_tailq_write_unlock();
+	rte_free(te);
 	rte_efd_free(table);
 
 	return NULL;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:11.273309985 +0000
+++ 0001-efd-fix-tailq-entry-leak-in-error-path.patch	2020-11-09 18:40:11.063310224 +0000
@@ -1 +1 @@
-From c2402fcaf937b17da2b886443c3733b4234eea68 Mon Sep 17 00:00:00 2001
+From 1ff9a185c8402e9a5ac8f20c92b00c6b99f03b28 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 4deeb17924..3fd1f1c97b 100644
@@ -22 +23 @@
-@@ -711,6 +711,7 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len,
+@@ -707,6 +707,7 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len,

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

* [dpdk-stable] patch 'net/softnic: use POSIX network address conversion' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
@ 2020-11-09 18:39     ` luca.boccassi
  2020-11-09 18:39     ` [dpdk-stable] patch 'examples/ip_pipeline: " luca.boccassi
                       ` (80 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:39 UTC (permalink / raw)
  To: Ibtisam Tariq; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2050cb945b492e13d98c5a6726e9e06534e275c0

Thanks.

Luca Boccassi

---
From 2050cb945b492e13d98c5a6726e9e06534e275c0 Mon Sep 17 00:00:00 2001
From: Ibtisam Tariq <ibtisam.tariq@emumba.com>
Date: Mon, 13 Jul 2020 09:57:28 +0000
Subject: [PATCH] net/softnic: use POSIX network address conversion

[ upstream commit 4a91344b5e06081f8e2254266bb469489f6633d8 ]

inet_pton4 and inet_pton6 was reimplemented. Replace implementation of
inet_pton4 and inet_pton6 with libc inet_pton function

Bugzilla ID: 365
Fixes: 31ce8d888625 ("net/softnic: add command interface")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ibtisam Tariq <ibtisam.tariq@emumba.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/softnic/parser.c | 188 +----------------------------------
 1 file changed, 4 insertions(+), 184 deletions(-)

diff --git a/drivers/net/softnic/parser.c b/drivers/net/softnic/parser.c
index dc15ec8aa2..ebcb10268a 100644
--- a/drivers/net/softnic/parser.c
+++ b/drivers/net/softnic/parser.c
@@ -4,24 +4,6 @@
  * All rights reserved.
  */
 
-/* For inet_pton4() and inet_pton6() functions:
- *
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
 #include <stdint.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -33,6 +15,8 @@
 #include <libgen.h>
 #include <unistd.h>
 #include <sys/wait.h>
+#include <arpa/inet.h>
+#include <sys/socket.h>
 
 #include <rte_errno.h>
 
@@ -364,170 +348,6 @@ softnic_parse_mpls_labels(char *string, uint32_t *labels, uint32_t *n_labels)
 	return 0;
 }
 
-#define INADDRSZ 4
-#define IN6ADDRSZ 16
-
-/* int
- * inet_pton4(src, dst)
- *      like inet_aton() but without all the hexadecimal and shorthand.
- * return:
- *      1 if `src' is a valid dotted quad, else 0.
- * notice:
- *      does not touch `dst' unless it's returning 1.
- * author:
- *      Paul Vixie, 1996.
- */
-static int
-inet_pton4(const char *src, unsigned char *dst)
-{
-	static const char digits[] = "0123456789";
-	int saw_digit, octets, ch;
-	unsigned char tmp[INADDRSZ], *tp;
-
-	saw_digit = 0;
-	octets = 0;
-	*(tp = tmp) = 0;
-	while ((ch = *src++) != '\0') {
-		const char *pch;
-
-		pch = strchr(digits, ch);
-		if (pch != NULL) {
-			unsigned int new = *tp * 10 + (pch - digits);
-
-			if (new > 255)
-				return 0;
-			if (!saw_digit) {
-				if (++octets > 4)
-					return 0;
-				saw_digit = 1;
-			}
-			*tp = (unsigned char)new;
-		} else if (ch == '.' && saw_digit) {
-			if (octets == 4)
-				return 0;
-			*++tp = 0;
-			saw_digit = 0;
-		} else
-			return 0;
-	}
-	if (octets < 4)
-		return 0;
-
-	memcpy(dst, tmp, INADDRSZ);
-	return 1;
-}
-
-/* int
- * inet_pton6(src, dst)
- *      convert presentation level address to network order binary form.
- * return:
- *      1 if `src' is a valid [RFC1884 2.2] address, else 0.
- * notice:
- *      (1) does not touch `dst' unless it's returning 1.
- *      (2) :: in a full address is silently ignored.
- * credit:
- *      inspired by Mark Andrews.
- * author:
- *      Paul Vixie, 1996.
- */
-static int
-inet_pton6(const char *src, unsigned char *dst)
-{
-	static const char xdigits_l[] = "0123456789abcdef",
-		xdigits_u[] = "0123456789ABCDEF";
-	unsigned char tmp[IN6ADDRSZ], *tp = 0, *endp = 0, *colonp = 0;
-	const char *xdigits = 0, *curtok = 0;
-	int ch = 0, saw_xdigit = 0, count_xdigit = 0;
-	unsigned int val = 0;
-	unsigned int dbloct_count = 0;
-
-	memset((tp = tmp), '\0', IN6ADDRSZ);
-	endp = tp + IN6ADDRSZ;
-	colonp = NULL;
-	/* Leading :: requires some special handling. */
-	if (*src == ':')
-		if (*++src != ':')
-			return 0;
-	curtok = src;
-	saw_xdigit = count_xdigit = 0;
-	val = 0;
-
-	while ((ch = *src++) != '\0') {
-		const char *pch;
-
-		pch = strchr((xdigits = xdigits_l), ch);
-		if (pch == NULL)
-			pch = strchr((xdigits = xdigits_u), ch);
-		if (pch != NULL) {
-			if (count_xdigit >= 4)
-				return 0;
-			val <<= 4;
-			val |= (pch - xdigits);
-			if (val > 0xffff)
-				return 0;
-			saw_xdigit = 1;
-			count_xdigit++;
-			continue;
-		}
-		if (ch == ':') {
-			curtok = src;
-			if (!saw_xdigit) {
-				if (colonp)
-					return 0;
-				colonp = tp;
-				continue;
-			} else if (*src == '\0') {
-				return 0;
-			}
-			if (tp + sizeof(int16_t) > endp)
-				return 0;
-			*tp++ = (unsigned char)((val >> 8) & 0xff);
-			*tp++ = (unsigned char)(val & 0xff);
-			saw_xdigit = 0;
-			count_xdigit = 0;
-			val = 0;
-			dbloct_count++;
-			continue;
-		}
-		if (ch == '.' && ((tp + INADDRSZ) <= endp) &&
-		    inet_pton4(curtok, tp) > 0) {
-			tp += INADDRSZ;
-			saw_xdigit = 0;
-			dbloct_count += 2;
-			break;  /* '\0' was seen by inet_pton4(). */
-		}
-		return 0;
-	}
-	if (saw_xdigit) {
-		if (tp + sizeof(int16_t) > endp)
-			return 0;
-		*tp++ = (unsigned char)((val >> 8) & 0xff);
-		*tp++ = (unsigned char)(val & 0xff);
-		dbloct_count++;
-	}
-	if (colonp != NULL) {
-		/* if we already have 8 double octets, having a colon means error */
-		if (dbloct_count == 8)
-			return 0;
-
-		/* Since some memmove()'s erroneously fail to handle
-		 * overlapping regions, we'll do the shift by hand.
-		 */
-		const int n = tp - colonp;
-		int i;
-
-		for (i = 1; i <= n; i++) {
-			endp[-i] = colonp[n - i];
-			colonp[n - i] = 0;
-		}
-		tp = endp;
-	}
-	if (tp != endp)
-		return 0;
-	memcpy(dst, tmp, IN6ADDRSZ);
-	return 1;
-}
-
 static struct rte_ether_addr *
 my_ether_aton(const char *a)
 {
@@ -577,7 +397,7 @@ softnic_parse_ipv4_addr(const char *token, struct in_addr *ipv4)
 	if (strlen(token) >= INET_ADDRSTRLEN)
 		return -EINVAL;
 
-	if (inet_pton4(token, (unsigned char *)ipv4) != 1)
+	if (inet_pton(AF_INET, token, ipv4) != 1)
 		return -EINVAL;
 
 	return 0;
@@ -589,7 +409,7 @@ softnic_parse_ipv6_addr(const char *token, struct in6_addr *ipv6)
 	if (strlen(token) >= INET6_ADDRSTRLEN)
 		return -EINVAL;
 
-	if (inet_pton6(token, (unsigned char *)ipv6) != 1)
+	if (inet_pton(AF_INET6, token, ipv6) != 1)
 		return -EINVAL;
 
 	return 0;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:11.307855956 +0000
+++ 0002-net-softnic-use-POSIX-network-address-conversion.patch	2020-11-09 18:40:11.063310224 +0000
@@ -1 +1 @@
-From 4a91344b5e06081f8e2254266bb469489f6633d8 Mon Sep 17 00:00:00 2001
+From 2050cb945b492e13d98c5a6726e9e06534e275c0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,2 @@
+
+[ upstream commit 4a91344b5e06081f8e2254266bb469489f6633d8 ]

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

* [dpdk-stable] patch 'examples/ip_pipeline: use POSIX network address conversion' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
  2020-11-09 18:39     ` [dpdk-stable] patch 'net/softnic: use POSIX network address conversion' " luca.boccassi
@ 2020-11-09 18:39     ` luca.boccassi
  2020-11-09 18:39     ` [dpdk-stable] patch 'examples/ipsec-secgw: " luca.boccassi
                       ` (79 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:39 UTC (permalink / raw)
  To: Ibtisam Tariq; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/da520256bbf31136105601746e5a9ba858572ab8

Thanks.

Luca Boccassi

---
From da520256bbf31136105601746e5a9ba858572ab8 Mon Sep 17 00:00:00 2001
From: Ibtisam Tariq <ibtisam.tariq@emumba.com>
Date: Mon, 13 Jul 2020 09:57:29 +0000
Subject: [PATCH] examples/ip_pipeline: use POSIX network address conversion

[ upstream commit 03ef8c1b6b0db7cb666a4656c0c493330e217fb3 ]

inet_pton4 and inet_pton6 was reimplemented. Replacing implementation of
inet_pton4 and inet_pton6 with libc inet_pton function

Bugzilla ID: 365
Fixes: ed7a0490f7e2 ("examples/ip_pipeline: add string parsing helpers")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ibtisam Tariq <ibtisam.tariq@emumba.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 examples/ip_pipeline/parser.c | 190 +---------------------------------
 1 file changed, 4 insertions(+), 186 deletions(-)

diff --git a/examples/ip_pipeline/parser.c b/examples/ip_pipeline/parser.c
index 3fffeb5867..f043d6bf4f 100644
--- a/examples/ip_pipeline/parser.c
+++ b/examples/ip_pipeline/parser.c
@@ -4,25 +4,6 @@
  * All rights reserved.
  */
 
-/*
- * For inet_pton4() and inet_pton6() functions:
- *
- * Copyright (c) 1996 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
 #include <stdint.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -34,6 +15,8 @@
 #include <libgen.h>
 #include <unistd.h>
 #include <sys/wait.h>
+#include <arpa/inet.h>
+#include <sys/socket.h>
 
 #include <rte_errno.h>
 #include <rte_string_fns.h>
@@ -348,171 +331,6 @@ parse_mpls_labels(char *string, uint32_t *labels, uint32_t *n_labels)
 	return 0;
 }
 
-#define INADDRSZ 4
-#define IN6ADDRSZ 16
-
-/* int
- * inet_pton4(src, dst)
- *      like inet_aton() but without all the hexadecimal and shorthand.
- * return:
- *      1 if `src' is a valid dotted quad, else 0.
- * notice:
- *      does not touch `dst' unless it's returning 1.
- * author:
- *      Paul Vixie, 1996.
- */
-static int
-inet_pton4(const char *src, unsigned char *dst)
-{
-	static const char digits[] = "0123456789";
-	int saw_digit, octets, ch;
-	unsigned char tmp[INADDRSZ], *tp;
-
-	saw_digit = 0;
-	octets = 0;
-	*(tp = tmp) = 0;
-	while ((ch = *src++) != '\0') {
-		const char *pch;
-
-		pch = strchr(digits, ch);
-		if (pch != NULL) {
-			unsigned int new = *tp * 10 + (pch - digits);
-
-			if (new > 255)
-				return 0;
-			if (!saw_digit) {
-				if (++octets > 4)
-					return 0;
-				saw_digit = 1;
-			}
-			*tp = (unsigned char)new;
-		} else if (ch == '.' && saw_digit) {
-			if (octets == 4)
-				return 0;
-			*++tp = 0;
-			saw_digit = 0;
-		} else
-			return 0;
-	}
-	if (octets < 4)
-		return 0;
-
-	memcpy(dst, tmp, INADDRSZ);
-	return 1;
-}
-
-/* int
- * inet_pton6(src, dst)
- *      convert presentation level address to network order binary form.
- * return:
- *      1 if `src' is a valid [RFC1884 2.2] address, else 0.
- * notice:
- *      (1) does not touch `dst' unless it's returning 1.
- *      (2) :: in a full address is silently ignored.
- * credit:
- *      inspired by Mark Andrews.
- * author:
- *      Paul Vixie, 1996.
- */
-static int
-inet_pton6(const char *src, unsigned char *dst)
-{
-	static const char xdigits_l[] = "0123456789abcdef",
-		xdigits_u[] = "0123456789ABCDEF";
-	unsigned char tmp[IN6ADDRSZ], *tp = 0, *endp = 0, *colonp = 0;
-	const char *xdigits = 0, *curtok = 0;
-	int ch = 0, saw_xdigit = 0, count_xdigit = 0;
-	unsigned int val = 0;
-	unsigned dbloct_count = 0;
-
-	memset((tp = tmp), '\0', IN6ADDRSZ);
-	endp = tp + IN6ADDRSZ;
-	colonp = NULL;
-	/* Leading :: requires some special handling. */
-	if (*src == ':')
-		if (*++src != ':')
-			return 0;
-	curtok = src;
-	saw_xdigit = count_xdigit = 0;
-	val = 0;
-
-	while ((ch = *src++) != '\0') {
-		const char *pch;
-
-		pch = strchr((xdigits = xdigits_l), ch);
-		if (pch == NULL)
-			pch = strchr((xdigits = xdigits_u), ch);
-		if (pch != NULL) {
-			if (count_xdigit >= 4)
-				return 0;
-			val <<= 4;
-			val |= (pch - xdigits);
-			if (val > 0xffff)
-				return 0;
-			saw_xdigit = 1;
-			count_xdigit++;
-			continue;
-		}
-		if (ch == ':') {
-			curtok = src;
-			if (!saw_xdigit) {
-				if (colonp)
-					return 0;
-				colonp = tp;
-				continue;
-			} else if (*src == '\0') {
-				return 0;
-			}
-			if (tp + sizeof(int16_t) > endp)
-				return 0;
-			*tp++ = (unsigned char) ((val >> 8) & 0xff);
-			*tp++ = (unsigned char) (val & 0xff);
-			saw_xdigit = 0;
-			count_xdigit = 0;
-			val = 0;
-			dbloct_count++;
-			continue;
-		}
-		if (ch == '.' && ((tp + INADDRSZ) <= endp) &&
-		    inet_pton4(curtok, tp) > 0) {
-			tp += INADDRSZ;
-			saw_xdigit = 0;
-			dbloct_count += 2;
-			break;  /* '\0' was seen by inet_pton4(). */
-		}
-		return 0;
-	}
-	if (saw_xdigit) {
-		if (tp + sizeof(int16_t) > endp)
-			return 0;
-		*tp++ = (unsigned char) ((val >> 8) & 0xff);
-		*tp++ = (unsigned char) (val & 0xff);
-		dbloct_count++;
-	}
-	if (colonp != NULL) {
-		/* if we already have 8 double octets, having a colon means error */
-		if (dbloct_count == 8)
-			return 0;
-
-		/*
-		 * Since some memmove()'s erroneously fail to handle
-		 * overlapping regions, we'll do the shift by hand.
-		 */
-		const int n = tp - colonp;
-		int i;
-
-		for (i = 1; i <= n; i++) {
-			endp[-i] = colonp[n - i];
-			colonp[n - i] = 0;
-		}
-		tp = endp;
-	}
-	if (tp != endp)
-		return 0;
-	memcpy(dst, tmp, IN6ADDRSZ);
-	return 1;
-}
-
 static struct rte_ether_addr *
 my_ether_aton(const char *a)
 {
@@ -562,7 +380,7 @@ parse_ipv4_addr(const char *token, struct in_addr *ipv4)
 	if (strlen(token) >= INET_ADDRSTRLEN)
 		return -EINVAL;
 
-	if (inet_pton4(token, (unsigned char *)ipv4) != 1)
+	if (inet_pton(AF_INET, token, ipv4) != 1)
 		return -EINVAL;
 
 	return 0;
@@ -574,7 +392,7 @@ parse_ipv6_addr(const char *token, struct in6_addr *ipv6)
 	if (strlen(token) >= INET6_ADDRSTRLEN)
 		return -EINVAL;
 
-	if (inet_pton6(token, (unsigned char *)ipv6) != 1)
+	if (inet_pton(AF_INET6, token, ipv6) != 1)
 		return -EINVAL;
 
 	return 0;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:11.342601923 +0000
+++ 0003-examples-ip_pipeline-use-POSIX-network-address-conve.patch	2020-11-09 18:40:11.063310224 +0000
@@ -1 +1 @@
-From 03ef8c1b6b0db7cb666a4656c0c493330e217fb3 Mon Sep 17 00:00:00 2001
+From da520256bbf31136105601746e5a9ba858572ab8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 03ef8c1b6b0db7cb666a4656c0c493330e217fb3 ]
+
@@ -20 +22 @@
-index fb0769fe37..dfd71a71d3 100644
+index 3fffeb5867..f043d6bf4f 100644

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

* [dpdk-stable] patch 'examples/ipsec-secgw: use POSIX network address conversion' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
  2020-11-09 18:39     ` [dpdk-stable] patch 'net/softnic: use POSIX network address conversion' " luca.boccassi
  2020-11-09 18:39     ` [dpdk-stable] patch 'examples/ip_pipeline: " luca.boccassi
@ 2020-11-09 18:39     ` luca.boccassi
  2020-11-09 18:39     ` [dpdk-stable] patch 'eal: fix leak on device event callback unregister' " luca.boccassi
                       ` (78 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:39 UTC (permalink / raw)
  To: Ibtisam Tariq; +Cc: David Marchand, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3109cc617c1c882c3b44434d801a73eca8a5e4ed

Thanks.

Luca Boccassi

---
From 3109cc617c1c882c3b44434d801a73eca8a5e4ed Mon Sep 17 00:00:00 2001
From: Ibtisam Tariq <ibtisam.tariq@emumba.com>
Date: Mon, 13 Jul 2020 09:57:30 +0000
Subject: [PATCH] examples/ipsec-secgw: use POSIX network address conversion

[ upstream commit 4054466be9c64e72c37cffd840ab0f35a946a867 ]

inet_pton4 and inet_pton6 was reimplemented. Replace implementation of
inet_pton4 and inet_pton6 with libc inet_pton function

Bugzilla ID: 365
Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ibtisam Tariq <ibtisam.tariq@emumba.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 examples/ipsec-secgw/parser.c | 173 +---------------------------------
 1 file changed, 5 insertions(+), 168 deletions(-)

diff --git a/examples/ipsec-secgw/parser.c b/examples/ipsec-secgw/parser.c
index fc8c238fe5..dfabac2dbf 100644
--- a/examples/ipsec-secgw/parser.c
+++ b/examples/ipsec-secgw/parser.c
@@ -1,6 +1,9 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  * Copyright(c) 2016 Intel Corporation
  */
+#include <arpa/inet.h>
+#include <sys/socket.h>
+
 #include <rte_common.h>
 #include <rte_crypto.h>
 #include <rte_string_fns.h>
@@ -39,172 +42,6 @@ parse_tokenize_string(char *string, char *tokens[], uint32_t *n_tokens)
 	return 0;
 }
 
-#define INADDRSZ 4
-#define IN6ADDRSZ 16
-
-/* int
- * inet_pton4(src, dst)
- *      like inet_aton() but without all the hexadecimal and shorthand.
- * return:
- *      1 if `src' is a valid dotted quad, else 0.
- * notice:
- *      does not touch `dst' unless it's returning 1.
- * author:
- *      Paul Vixie, 1996.
- */
-static int
-inet_pton4(const char *src, unsigned char *dst)
-{
-	static const char digits[] = "0123456789";
-	int saw_digit, octets, ch;
-	unsigned char tmp[INADDRSZ], *tp;
-
-	saw_digit = 0;
-	octets = 0;
-	*(tp = tmp) = 0;
-	while ((ch = *src++) != '\0') {
-		const char *pch;
-
-		pch = strchr(digits, ch);
-		if (pch != NULL) {
-			unsigned int new = *tp * 10 + (pch - digits);
-
-			if (new > 255)
-				return 0;
-			if (!saw_digit) {
-				if (++octets > 4)
-					return 0;
-				saw_digit = 1;
-			}
-			*tp = (unsigned char)new;
-		} else if (ch == '.' && saw_digit) {
-			if (octets == 4)
-				return 0;
-			*++tp = 0;
-			saw_digit = 0;
-		} else
-			return 0;
-	}
-	if (octets < 4)
-		return 0;
-
-	memcpy(dst, tmp, INADDRSZ);
-	return 1;
-}
-
-/* int
- * inet_pton6(src, dst)
- *      convert presentation level address to network order binary form.
- * return:
- *      1 if `src' is a valid [RFC1884 2.2] address, else 0.
- * notice:
- *      (1) does not touch `dst' unless it's returning 1.
- *      (2) :: in a full address is silently ignored.
- * credit:
- *      inspired by Mark Andrews.
- * author:
- *      Paul Vixie, 1996.
- */
-static int
-inet_pton6(const char *src, unsigned char *dst)
-{
-	static const char xdigits_l[] = "0123456789abcdef",
-		xdigits_u[] = "0123456789ABCDEF";
-	unsigned char tmp[IN6ADDRSZ], *tp = 0, *endp = 0, *colonp = 0;
-	const char *xdigits = 0, *curtok = 0;
-	int ch = 0, saw_xdigit = 0, count_xdigit = 0;
-	unsigned int val = 0;
-	unsigned dbloct_count = 0;
-
-	memset((tp = tmp), '\0', IN6ADDRSZ);
-	endp = tp + IN6ADDRSZ;
-	colonp = NULL;
-	/* Leading :: requires some special handling. */
-	if (*src == ':')
-		if (*++src != ':')
-			return 0;
-	curtok = src;
-	saw_xdigit = count_xdigit = 0;
-	val = 0;
-
-	while ((ch = *src++) != '\0') {
-		const char *pch;
-
-		pch = strchr((xdigits = xdigits_l), ch);
-		if (pch == NULL)
-			pch = strchr((xdigits = xdigits_u), ch);
-		if (pch != NULL) {
-			if (count_xdigit >= 4)
-				return 0;
-			val <<= 4;
-			val |= (pch - xdigits);
-			if (val > 0xffff)
-				return 0;
-			saw_xdigit = 1;
-			count_xdigit++;
-			continue;
-		}
-		if (ch == ':') {
-			curtok = src;
-			if (!saw_xdigit) {
-				if (colonp)
-					return 0;
-				colonp = tp;
-				continue;
-			} else if (*src == '\0') {
-				return 0;
-			}
-			if (tp + sizeof(int16_t) > endp)
-				return 0;
-			*tp++ = (unsigned char) ((val >> 8) & 0xff);
-			*tp++ = (unsigned char) (val & 0xff);
-			saw_xdigit = 0;
-			count_xdigit = 0;
-			val = 0;
-			dbloct_count++;
-			continue;
-		}
-		if (ch == '.' && ((tp + INADDRSZ) <= endp) &&
-		    inet_pton4(curtok, tp) > 0) {
-			tp += INADDRSZ;
-			saw_xdigit = 0;
-			dbloct_count += 2;
-			break;  /* '\0' was seen by inet_pton4(). */
-		}
-		return 0;
-	}
-	if (saw_xdigit) {
-		if (tp + sizeof(int16_t) > endp)
-			return 0;
-		*tp++ = (unsigned char) ((val >> 8) & 0xff);
-		*tp++ = (unsigned char) (val & 0xff);
-		dbloct_count++;
-	}
-	if (colonp != NULL) {
-		/* if we already have 8 double octets, having a colon
-		 * means error */
-		if (dbloct_count == 8)
-			return 0;
-
-		/*
-		 * Since some memmove()'s erroneously fail to handle
-		 * overlapping regions, we'll do the shift by hand.
-		 */
-		const int n = tp - colonp;
-		int i;
-
-		for (i = 1; i <= n; i++) {
-			endp[-i] = colonp[n - i];
-			colonp[n - i] = 0;
-		}
-		tp = endp;
-	}
-	if (tp != endp)
-		return 0;
-	memcpy(dst, tmp, IN6ADDRSZ);
-	return 1;
-}
-
 int
 parse_ipv4_addr(const char *token, struct in_addr *ipv4, uint32_t *mask)
 {
@@ -229,7 +66,7 @@ parse_ipv4_addr(const char *token, struct in_addr *ipv4, uint32_t *mask)
 	if (strlen(ip_str) >= INET_ADDRSTRLEN)
 		return -EINVAL;
 
-	if (inet_pton4(ip_str, (unsigned char *)ipv4) != 1)
+	if (inet_pton(AF_INET, ip_str, ipv4) != 1)
 		return -EINVAL;
 
 	return 0;
@@ -260,7 +97,7 @@ parse_ipv6_addr(const char *token, struct in6_addr *ipv6, uint32_t *mask)
 	if (strlen(ip_str) >= INET6_ADDRSTRLEN)
 		return -EINVAL;
 
-	if (inet_pton6(ip_str, (unsigned char *)ipv6) != 1)
+	if (inet_pton(AF_INET6, ip_str, ipv6) != 1)
 		return -EINVAL;
 
 	return 0;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:11.382605693 +0000
+++ 0004-examples-ipsec-secgw-use-POSIX-network-address-conve.patch	2020-11-09 18:40:11.067310286 +0000
@@ -1 +1 @@
-From 4054466be9c64e72c37cffd840ab0f35a946a867 Mon Sep 17 00:00:00 2001
+From 3109cc617c1c882c3b44434d801a73eca8a5e4ed Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4054466be9c64e72c37cffd840ab0f35a946a867 ]
+
@@ -21 +23 @@
-index 8f66660322..9069129914 100644
+index fc8c238fe5..dfabac2dbf 100644
@@ -34 +36 @@
-@@ -40,172 +43,6 @@ parse_tokenize_string(char *string, char *tokens[], uint32_t *n_tokens)
+@@ -39,172 +42,6 @@ parse_tokenize_string(char *string, char *tokens[], uint32_t *n_tokens)
@@ -207 +209 @@
-@@ -230,7 +67,7 @@ parse_ipv4_addr(const char *token, struct in_addr *ipv4, uint32_t *mask)
+@@ -229,7 +66,7 @@ parse_ipv4_addr(const char *token, struct in_addr *ipv4, uint32_t *mask)
@@ -216 +218 @@
-@@ -261,7 +98,7 @@ parse_ipv6_addr(const char *token, struct in6_addr *ipv6, uint32_t *mask)
+@@ -260,7 +97,7 @@ parse_ipv6_addr(const char *token, struct in6_addr *ipv6, uint32_t *mask)

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

* [dpdk-stable] patch 'eal: fix leak on device event callback unregister' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (2 preceding siblings ...)
  2020-11-09 18:39     ` [dpdk-stable] patch 'examples/ipsec-secgw: " luca.boccassi
@ 2020-11-09 18:39     ` luca.boccassi
  2020-11-09 18:39     ` [dpdk-stable] patch 'mem: fix config name in error logs' " luca.boccassi
                       ` (77 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:39 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Jeff Guo, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6461d31b0b5e9fe79121c1cde300c3e1a3b2a3e5

Thanks.

Luca Boccassi

---
From 6461d31b0b5e9fe79121c1cde300c3e1a3b2a3e5 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 9e4f09d83e..363a2ca95e 100644
--- a/lib/librte_eal/common/eal_common_dev.c
+++ b/lib/librte_eal/common/eal_common_dev.c
@@ -526,6 +526,7 @@ 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++;
 		} else {
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:11.423213542 +0000
+++ 0005-eal-fix-leak-on-device-event-callback-unregister.patch	2020-11-09 18:40:11.067310286 +0000
@@ -1 +1 @@
-From c78bd27d4b74a74261b180cb8d5421b919c1ab9a Mon Sep 17 00:00:00 2001
+From 6461d31b0b5e9fe79121c1cde300c3e1a3b2a3e5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c78bd27d4b74a74261b180cb8d5421b919c1ab9a ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'mem: fix config name in error logs' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (3 preceding siblings ...)
  2020-11-09 18:39     ` [dpdk-stable] patch 'eal: fix leak on device event callback unregister' " luca.boccassi
@ 2020-11-09 18:39     ` luca.boccassi
  2020-11-09 18:39     ` [dpdk-stable] patch 'examples/ip_pipeline: fix external build' " luca.boccassi
                       ` (76 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:39 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e85eb5178ae270cda848473ebdeac77c93402444

Thanks.

Luca Boccassi

---
From e85eb5178ae270cda848473ebdeac77c93402444 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/freebsd/eal/eal_memory.c | 2 +-
 lib/librte_eal/linux/eal/eal_memory.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/freebsd/eal/eal_memory.c b/lib/librte_eal/freebsd/eal/eal_memory.c
index 5bc2da160c..fb1549fbe6 100644
--- a/lib/librte_eal/freebsd/eal/eal_memory.c
+++ b/lib/librte_eal/freebsd/eal/eal_memory.c
@@ -193,7 +193,7 @@ rte_eal_hugepage_init(void)
 			if (msl_idx == RTE_MAX_MEMSEG_LISTS) {
 				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;
 			}
 			arr = &msl->memseg_arr;
diff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c
index 7a9c97ff88..c93d9bb2b8 100644
--- a/lib/librte_eal/linux/eal/eal_memory.c
+++ b/lib/librte_eal/linux/eal/eal_memory.c
@@ -703,7 +703,7 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
 	if (msl_idx == RTE_MAX_MEMSEG_LISTS) {
 		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.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:11.460633134 +0000
+++ 0006-mem-fix-config-name-in-error-logs.patch	2020-11-09 18:40:11.071310349 +0000
@@ -1 +1 @@
-From a796c922d24da9444be9ede24d925d25519602b7 Mon Sep 17 00:00:00 2001
+From e85eb5178ae270cda848473ebdeac77c93402444 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/freebsd/eal/eal_memory.c | 2 +-
+ lib/librte_eal/linux/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
-@@ -174,7 +174,7 @@ rte_eal_hugepage_init(void)
+diff --git a/lib/librte_eal/freebsd/eal/eal_memory.c b/lib/librte_eal/freebsd/eal/eal_memory.c
+index 5bc2da160c..fb1549fbe6 100644
+--- a/lib/librte_eal/freebsd/eal/eal_memory.c
++++ b/lib/librte_eal/freebsd/eal/eal_memory.c
+@@ -193,7 +193,7 @@ rte_eal_hugepage_init(void)
@@ -32,5 +33,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
-@@ -714,7 +714,7 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)
+diff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c
+index 7a9c97ff88..c93d9bb2b8 100644
+--- a/lib/librte_eal/linux/eal/eal_memory.c
++++ b/lib/librte_eal/linux/eal/eal_memory.c
+@@ -703,7 +703,7 @@ remap_segment(struct hugepage_file *hugepages, int seg_start, int seg_end)

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

* [dpdk-stable] patch 'examples/ip_pipeline: fix external build' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (4 preceding siblings ...)
  2020-11-09 18:39     ` [dpdk-stable] patch 'mem: fix config name in error logs' " luca.boccassi
@ 2020-11-09 18:39     ` luca.boccassi
  2020-11-09 18:39     ` [dpdk-stable] patch 'examples/vm_power: fix build on Ubuntu 20.04' " luca.boccassi
                       ` (75 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:39 UTC (permalink / raw)
  To: Cristian Dumitrescu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0bce7670df87a2887d075470176fb4a53b203f92

Thanks.

Luca Boccassi

---
From 0bce7670df87a2887d075470176fb4a53b203f92 Mon Sep 17 00:00:00 2001
From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Date: Mon, 26 Oct 2020 21:57:55 +0000
Subject: [PATCH] examples/ip_pipeline: fix external build

[ upstream commit 570e681079e8d7ca65fb2949189ccbff1eb9e418 ]

Fix build with external makefile.

Fixes: fbc74e66334f ("examples/ip_pipeline: remove infra code")

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 examples/ip_pipeline/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/ip_pipeline/Makefile b/examples/ip_pipeline/Makefile
index 1116bb6c18..b8e086267b 100644
--- a/examples/ip_pipeline/Makefile
+++ b/examples/ip_pipeline/Makefile
@@ -37,7 +37,7 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
-CFLAGS += -I.
+CFLAGS += -I. -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE
 
 OBJS := $(patsubst %.c,build/%.o,$(SRCS-y))
 
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:11.501417046 +0000
+++ 0007-examples-ip_pipeline-fix-external-build.patch	2020-11-09 18:40:11.071310349 +0000
@@ -1 +1 @@
-From 570e681079e8d7ca65fb2949189ccbff1eb9e418 Mon Sep 17 00:00:00 2001
+From 0bce7670df87a2887d075470176fb4a53b203f92 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 570e681079e8d7ca65fb2949189ccbff1eb9e418 ]
+
@@ -16 +18 @@
-index d25e39a464..4b391973cb 100644
+index 1116bb6c18..b8e086267b 100644
@@ -19 +21 @@
-@@ -39,7 +39,7 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
+@@ -37,7 +37,7 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)

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

* [dpdk-stable] patch 'examples/vm_power: fix build on Ubuntu 20.04' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (5 preceding siblings ...)
  2020-11-09 18:39     ` [dpdk-stable] patch 'examples/ip_pipeline: fix external build' " luca.boccassi
@ 2020-11-09 18:39     ` luca.boccassi
  2020-11-09 18:39     ` [dpdk-stable] patch 'examples/multi_process: " luca.boccassi
                       ` (74 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:39 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d14d8f22ce4ed2672fed1ae174503238f820d726

Thanks.

Luca Boccassi

---
From d14d8f22ce4ed2672fed1ae174503238f820d726 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 74a2a677e8..a26315051b 100644
--- a/examples/vm_power_manager/channel_manager.c
+++ b/examples/vm_power_manager/channel_manager.c
@@ -467,9 +467,15 @@ add_all_channels(const char *vm_name)
 			continue;
 		}
 
-		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) {
 			rte_free(chan_info);
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:11.538379585 +0000
+++ 0008-examples-vm_power-fix-build-on-Ubuntu-20.04.patch	2020-11-09 18:40:11.071310349 +0000
@@ -1 +1 @@
-From a9f57cfc08810a0936bdc4f4766373a9802bca8e Mon Sep 17 00:00:00 2001
+From d14d8f22ce4ed2672fed1ae174503238f820d726 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit a9f57cfc08810a0936bdc4f4766373a9802bca8e ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'examples/multi_process: fix build on Ubuntu 20.04' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (6 preceding siblings ...)
  2020-11-09 18:39     ` [dpdk-stable] patch 'examples/vm_power: fix build on Ubuntu 20.04' " luca.boccassi
@ 2020-11-09 18:39     ` luca.boccassi
  2020-11-09 18:39     ` [dpdk-stable] patch 'test/rcu: fix build with low core count' " luca.boccassi
                       ` (73 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:39 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Radu Nicolau, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/200a950019a983933ada6425ded00314337c28a4

Thanks.

Luca Boccassi

---
From 200a950019a983933ada6425ded00314337c28a4 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 802e29d10d..1084b303ff 100644
--- a/examples/multi_process/client_server_mp/mp_server/main.c
+++ b/examples/multi_process/client_server_mp/mp_server/main.c
@@ -59,12 +59,17 @@ static struct client_rx_buf *cl_rx_buf;
 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 rte_ether_addr null_mac; /* static defaults to 0 */
+	static char err_address[32];
+	static char addresses[RTE_MAX_ETHPORTS][32];
 	int ret;
 
-	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 rte_ether_addr mac;
 		ret = rte_eth_macaddr_get(port, &mac);
@@ -73,10 +78,8 @@ get_printable_mac_addr(uint16_t port)
 			       port, rte_strerror(-ret));
 			return err_address;
 		}
-		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
@@ -43,7 +43,7 @@ struct port_info {
  * Given the rx queue name template above, get the queue name
  */
 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
 	 * by maximum 3 digits (plus an extra byte for safety) */
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:11.580647101 +0000
+++ 0009-examples-multi_process-fix-build-on-Ubuntu-20.04.patch	2020-11-09 18:40:11.075310411 +0000
@@ -1 +1 @@
-From 27b549c12df2ef2db6b271795b4df7b14a2d9c2c Mon Sep 17 00:00:00 2001
+From 200a950019a983933ada6425ded00314337c28a4 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 802e29d10d..1084b303ff 100644

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

* [dpdk-stable] patch 'test/rcu: fix build with low core count' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (7 preceding siblings ...)
  2020-11-09 18:39     ` [dpdk-stable] patch 'examples/multi_process: " luca.boccassi
@ 2020-11-09 18:39     ` luca.boccassi
  2020-11-09 18:39     ` [dpdk-stable] patch 'examples/performance-thread: " luca.boccassi
                       ` (72 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:39 UTC (permalink / raw)
  To: Honnappa Nagarahalli; +Cc: Ruifeng Wang, Lukasz Wojciechowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9d663d0e983b52192354372076b8be2e254f194f

Thanks.

Luca Boccassi

---
From 9d663d0e983b52192354372076b8be2e254f194f Mon Sep 17 00:00:00 2001
From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Date: Fri, 16 Oct 2020 01:03:48 -0500
Subject: [PATCH] test/rcu: fix build with low core count

[ upstream commit 0ca6007efc3a74f5d4184a7844a40cc7f4ad2c1d ]

When RTE_MAX_LCORE value is small, following compiler errors
are observed.

../app/test/test_rcu_qsbr.c:296:54: error: iteration 2 invokes
undefined behavior [-Werror=aggressive-loop-optimizations]

../app/test/test_rcu_qsbr.c:315:55: error: array subscript is above
array bounds [-Werror=array-bounds]

Fixes: b87089b0bb19 ("test/rcu: add API and functional tests")

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>
---
 app/test/test_rcu_qsbr.c | 56 +++++++++++++++++++++++-----------------
 1 file changed, 33 insertions(+), 23 deletions(-)

diff --git a/app/test/test_rcu_qsbr.c b/app/test/test_rcu_qsbr.c
index b60dc5099c..5542b3c175 100644
--- a/app/test/test_rcu_qsbr.c
+++ b/app/test/test_rcu_qsbr.c
@@ -273,13 +273,13 @@ static int
 test_rcu_qsbr_start(void)
 {
 	uint64_t token;
-	int i;
+	unsigned int i;
 
 	printf("\nTest rte_rcu_qsbr_start()\n");
 
 	rte_rcu_qsbr_init(t[0], RTE_MAX_LCORE);
 
-	for (i = 0; i < 3; i++)
+	for (i = 0; i < num_cores; i++)
 		rte_rcu_qsbr_thread_register(t[0], enabled_core_ids[i]);
 
 	token = rte_rcu_qsbr_start(t[0]);
@@ -293,14 +293,18 @@ test_rcu_qsbr_check_reader(void *arg)
 {
 	struct rte_rcu_qsbr *temp;
 	uint8_t read_type = (uint8_t)((uintptr_t)arg);
+	unsigned int i;
 
 	temp = t[read_type];
 
 	/* Update quiescent state counter */
-	rte_rcu_qsbr_quiescent(temp, enabled_core_ids[0]);
-	rte_rcu_qsbr_quiescent(temp, enabled_core_ids[1]);
-	rte_rcu_qsbr_thread_unregister(temp, enabled_core_ids[2]);
-	rte_rcu_qsbr_quiescent(temp, enabled_core_ids[3]);
+	for (i = 0; i < num_cores; i++) {
+		if (i % 2 == 0)
+			rte_rcu_qsbr_quiescent(temp, enabled_core_ids[i]);
+		else
+			rte_rcu_qsbr_thread_unregister(temp,
+							enabled_core_ids[i]);
+	}
 	return 0;
 }
 
@@ -311,7 +315,8 @@ test_rcu_qsbr_check_reader(void *arg)
 static int
 test_rcu_qsbr_check(void)
 {
-	int i, ret;
+	int ret;
+	unsigned int i;
 	uint64_t token;
 
 	printf("\nTest rte_rcu_qsbr_check()\n");
@@ -329,7 +334,7 @@ test_rcu_qsbr_check(void)
 	ret = rte_rcu_qsbr_check(t[0], token, true);
 	TEST_RCU_QSBR_RETURN_IF_ERROR((ret == 0), "Blocking QSBR check");
 
-	for (i = 0; i < 3; i++)
+	for (i = 0; i < num_cores; i++)
 		rte_rcu_qsbr_thread_register(t[0], enabled_core_ids[i]);
 
 	ret = rte_rcu_qsbr_check(t[0], token, false);
@@ -344,7 +349,7 @@ test_rcu_qsbr_check(void)
 	/* Threads are offline, hence this should pass */
 	TEST_RCU_QSBR_RETURN_IF_ERROR((ret == 0), "Non-blocking QSBR check");
 
-	for (i = 0; i < 3; i++)
+	for (i = 0; i < num_cores; i++)
 		rte_rcu_qsbr_thread_unregister(t[0], enabled_core_ids[i]);
 
 	ret = rte_rcu_qsbr_check(t[0], token, true);
@@ -352,7 +357,7 @@ test_rcu_qsbr_check(void)
 
 	rte_rcu_qsbr_init(t[0], RTE_MAX_LCORE);
 
-	for (i = 0; i < 4; i++)
+	for (i = 0; i < num_cores; i++)
 		rte_rcu_qsbr_thread_register(t[0], enabled_core_ids[i]);
 
 	token = rte_rcu_qsbr_start(t[0]);
@@ -591,7 +596,7 @@ test_rcu_qsbr_thread_offline(void)
 static int
 test_rcu_qsbr_dump(void)
 {
-	int i;
+	unsigned int i;
 
 	printf("\nTest rte_rcu_qsbr_dump()\n");
 
@@ -608,7 +613,7 @@ test_rcu_qsbr_dump(void)
 
 	rte_rcu_qsbr_thread_register(t[0], enabled_core_ids[0]);
 
-	for (i = 1; i < 3; i++)
+	for (i = 1; i < num_cores; i++)
 		rte_rcu_qsbr_thread_register(t[1], enabled_core_ids[i]);
 
 	rte_rcu_qsbr_dump(stdout, t[0]);
@@ -758,7 +763,7 @@ test_rcu_qsbr_sw_sv_3qs(void)
 {
 	uint64_t token[3];
 	uint32_t c;
-	int i;
+	int i, num_readers;
 	int32_t pos[3];
 
 	writer_done = 0;
@@ -781,7 +786,11 @@ test_rcu_qsbr_sw_sv_3qs(void)
 	thread_info[0].ih = 0;
 
 	/* Reader threads are launched */
-	for (i = 0; i < 4; i++)
+	/* Keep the number of reader threads low to reduce
+	 * the execution time.
+	 */
+	num_readers = num_cores < 4 ? num_cores : 4;
+	for (i = 0; i < num_readers; i++)
 		rte_eal_remote_launch(test_rcu_qsbr_reader, &thread_info[0],
 					enabled_core_ids[i]);
 
@@ -814,7 +823,7 @@ test_rcu_qsbr_sw_sv_3qs(void)
 
 	/* Check the quiescent state status */
 	rte_rcu_qsbr_check(t[0], token[0], true);
-	for (i = 0; i < 4; i++) {
+	for (i = 0; i < num_readers; i++) {
 		c = hash_data[0][0][enabled_core_ids[i]];
 		if (c != COUNTER_VALUE && c != 0) {
 			printf("Reader lcore %d did not complete #0 = %d\n",
@@ -832,7 +841,7 @@ test_rcu_qsbr_sw_sv_3qs(void)
 
 	/* Check the quiescent state status */
 	rte_rcu_qsbr_check(t[0], token[1], true);
-	for (i = 0; i < 4; i++) {
+	for (i = 0; i < num_readers; i++) {
 		c = hash_data[0][3][enabled_core_ids[i]];
 		if (c != COUNTER_VALUE && c != 0) {
 			printf("Reader lcore %d did not complete #3 = %d\n",
@@ -850,7 +859,7 @@ test_rcu_qsbr_sw_sv_3qs(void)
 
 	/* Check the quiescent state status */
 	rte_rcu_qsbr_check(t[0], token[2], true);
-	for (i = 0; i < 4; i++) {
+	for (i = 0; i < num_readers; i++) {
 		c = hash_data[0][6][enabled_core_ids[i]];
 		if (c != COUNTER_VALUE && c != 0) {
 			printf("Reader lcore %d did not complete #6 = %d\n",
@@ -869,7 +878,7 @@ test_rcu_qsbr_sw_sv_3qs(void)
 	writer_done = 1;
 
 	/* Wait and check return value from reader threads */
-	for (i = 0; i < 4; i++)
+	for (i = 0; i < num_readers; i++)
 		if (rte_eal_wait_lcore(enabled_core_ids[i]) < 0)
 			goto error;
 	rte_hash_free(h[0]);
@@ -899,6 +908,12 @@ test_rcu_qsbr_mw_mv_mqs(void)
 	unsigned int i, j;
 	unsigned int test_cores;
 
+	if (RTE_MAX_LCORE < 5 || num_cores < 4) {
+		printf("Not enough cores for %s, expecting at least 5\n",
+			__func__);
+		return TEST_SKIPPED;
+	}
+
 	writer_done = 0;
 	test_cores = num_cores / 4;
 	test_cores = test_cores * 4;
@@ -984,11 +999,6 @@ test_rcu_qsbr_main(void)
 {
 	uint16_t core_id;
 
-	if (rte_lcore_count() < 5) {
-		printf("Not enough cores for rcu_qsbr_autotest, expecting at least 5\n");
-		return TEST_SKIPPED;
-	}
-
 	num_cores = 0;
 	RTE_LCORE_FOREACH_SLAVE(core_id) {
 		enabled_core_ids[num_cores] = core_id;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:11.620316516 +0000
+++ 0010-test-rcu-fix-build-with-low-core-count.patch	2020-11-09 18:40:11.075310411 +0000
@@ -1 +1 @@
-From 0ca6007efc3a74f5d4184a7844a40cc7f4ad2c1d Mon Sep 17 00:00:00 2001
+From 9d663d0e983b52192354372076b8be2e254f194f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0ca6007efc3a74f5d4184a7844a40cc7f4ad2c1d ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 7ae66e4dfb..ab37a068cd 100644
+index b60dc5099c..5542b3c175 100644
@@ -30 +31 @@
-@@ -286,13 +286,13 @@ static int
+@@ -273,13 +273,13 @@ static int
@@ -46 +47 @@
-@@ -306,14 +306,18 @@ test_rcu_qsbr_check_reader(void *arg)
+@@ -293,14 +293,18 @@ test_rcu_qsbr_check_reader(void *arg)
@@ -69 +70 @@
-@@ -324,7 +328,8 @@ test_rcu_qsbr_check_reader(void *arg)
+@@ -311,7 +315,8 @@ test_rcu_qsbr_check_reader(void *arg)
@@ -79 +80 @@
-@@ -342,7 +347,7 @@ test_rcu_qsbr_check(void)
+@@ -329,7 +334,7 @@ test_rcu_qsbr_check(void)
@@ -88 +89 @@
-@@ -357,7 +362,7 @@ test_rcu_qsbr_check(void)
+@@ -344,7 +349,7 @@ test_rcu_qsbr_check(void)
@@ -97 +98 @@
-@@ -365,7 +370,7 @@ test_rcu_qsbr_check(void)
+@@ -352,7 +357,7 @@ test_rcu_qsbr_check(void)
@@ -106 +107 @@
-@@ -928,7 +933,7 @@ end:
+@@ -591,7 +596,7 @@ test_rcu_qsbr_thread_offline(void)
@@ -115 +116 @@
-@@ -945,7 +950,7 @@ test_rcu_qsbr_dump(void)
+@@ -608,7 +613,7 @@ test_rcu_qsbr_dump(void)
@@ -124 +125 @@
-@@ -1095,7 +1100,7 @@ test_rcu_qsbr_sw_sv_3qs(void)
+@@ -758,7 +763,7 @@ test_rcu_qsbr_sw_sv_3qs(void)
@@ -133 +134 @@
-@@ -1118,7 +1123,11 @@ test_rcu_qsbr_sw_sv_3qs(void)
+@@ -781,7 +786,11 @@ test_rcu_qsbr_sw_sv_3qs(void)
@@ -146 +147 @@
-@@ -1151,7 +1160,7 @@ test_rcu_qsbr_sw_sv_3qs(void)
+@@ -814,7 +823,7 @@ test_rcu_qsbr_sw_sv_3qs(void)
@@ -155 +156 @@
-@@ -1169,7 +1178,7 @@ test_rcu_qsbr_sw_sv_3qs(void)
+@@ -832,7 +841,7 @@ test_rcu_qsbr_sw_sv_3qs(void)
@@ -164 +165 @@
-@@ -1187,7 +1196,7 @@ test_rcu_qsbr_sw_sv_3qs(void)
+@@ -850,7 +859,7 @@ test_rcu_qsbr_sw_sv_3qs(void)
@@ -173 +174 @@
-@@ -1206,7 +1215,7 @@ test_rcu_qsbr_sw_sv_3qs(void)
+@@ -869,7 +878,7 @@ test_rcu_qsbr_sw_sv_3qs(void)
@@ -182 +183 @@
-@@ -1236,6 +1245,12 @@ test_rcu_qsbr_mw_mv_mqs(void)
+@@ -899,6 +908,12 @@ test_rcu_qsbr_mw_mv_mqs(void)
@@ -195 +196 @@
-@@ -1321,11 +1336,6 @@ test_rcu_qsbr_main(void)
+@@ -984,11 +999,6 @@ test_rcu_qsbr_main(void)
@@ -205 +206 @@
- 	RTE_LCORE_FOREACH_WORKER(core_id) {
+ 	RTE_LCORE_FOREACH_SLAVE(core_id) {

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

* [dpdk-stable] patch 'examples/performance-thread: fix build with low core count' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (8 preceding siblings ...)
  2020-11-09 18:39     ` [dpdk-stable] patch 'test/rcu: fix build with low core count' " luca.boccassi
@ 2020-11-09 18:39     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'test/mbuf: skip field registration at busy offset' " luca.boccassi
                       ` (71 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:39 UTC (permalink / raw)
  To: Honnappa Nagarahalli
  Cc: Ruifeng Wang, Lukasz Wojciechowski, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4fa4a861588e9d5edf600903a41baa7df4bb60fb

Thanks.

Luca Boccassi

---
From 4fa4a861588e9d5edf600903a41baa7df4bb60fb 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 f58a70b77f..c527bb0c79 100644
--- a/examples/performance-thread/l3fwd-thread/main.c
+++ b/examples/performance-thread/l3fwd-thread/main.c
@@ -599,8 +599,8 @@ struct thread_rx_conf rx_thread[MAX_RX_THREAD];
 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;
 	struct lthread_cond **ready;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:11.659352168 +0000
+++ 0011-examples-performance-thread-fix-build-with-low-core-.patch	2020-11-09 18:40:11.083310535 +0000
@@ -1 +1 @@
-From 4e3b2d4c76e6249e44b92ffa7c62c031eb23af81 Mon Sep 17 00:00:00 2001
+From 4fa4a861588e9d5edf600903a41baa7df4bb60fb 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 f58a70b77f..c527bb0c79 100644

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

* [dpdk-stable] patch 'test/mbuf: skip field registration at busy offset' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (9 preceding siblings ...)
  2020-11-09 18:39     ` [dpdk-stable] patch 'examples/performance-thread: " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'mbuf: fix typo in dynamic field convention note' " luca.boccassi
                       ` (70 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/edf74865b7b6cf9b92ab72772d1c297221fb91c6

Thanks.

Luca Boccassi

---
From edf74865b7b6cf9b92ab72772d1c297221fb91c6 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Sat, 31 Oct 2020 15:27:03 +0100
Subject: [PATCH] test/mbuf: skip field registration at busy offset

[ upstream commit 530de86a12079bc85a93ae505fba6d47e6f18bc1 ]

There is a test for dynamic field registration at a specific offset.
Depending on which driver is probed, some dynamic fields may be
already registered at this offset.
This failure is skipped with a warning.

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

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_mbuf.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c
index bf04025a82..a5bd1693b2 100644
--- a/app/test/test_mbuf.c
+++ b/app/test/test_mbuf.c
@@ -2481,9 +2481,13 @@ test_mbuf_dyn(struct rte_mempool *pktmbuf_pool)
 
 	offset3 = rte_mbuf_dynfield_register_offset(&dynfield3,
 				offsetof(struct rte_mbuf, dynfield1[1]));
-	if (offset3 != offsetof(struct rte_mbuf, dynfield1[1]))
-		GOTO_FAIL("failed to register dynamic field 3, offset=%d: %s",
-			offset3, strerror(errno));
+	if (offset3 != offsetof(struct rte_mbuf, dynfield1[1])) {
+		if (rte_errno == EBUSY)
+			printf("mbuf test error skipped: dynfield is busy\n");
+		else
+			GOTO_FAIL("failed to register dynamic field 3, offset="
+				"%d: %s", offset3, strerror(errno));
+	}
 
 	printf("dynfield: offset=%d, offset2=%d, offset3=%d\n",
 		offset, offset2, offset3);
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:11.701363593 +0000
+++ 0012-test-mbuf-skip-field-registration-at-busy-offset.patch	2020-11-09 18:40:11.083310535 +0000
@@ -1 +1 @@
-From 530de86a12079bc85a93ae505fba6d47e6f18bc1 Mon Sep 17 00:00:00 2001
+From edf74865b7b6cf9b92ab72772d1c297221fb91c6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 530de86a12079bc85a93ae505fba6d47e6f18bc1 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 80d1850da9..3a13cf4e1f 100644
+index bf04025a82..a5bd1693b2 100644
@@ -25 +26 @@
-@@ -2608,9 +2608,13 @@ test_mbuf_dyn(struct rte_mempool *pktmbuf_pool)
+@@ -2481,9 +2481,13 @@ test_mbuf_dyn(struct rte_mempool *pktmbuf_pool)

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

* [dpdk-stable] patch 'mbuf: fix typo in dynamic field convention note' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (10 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'test/mbuf: skip field registration at busy offset' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'event/dpaa2: remove dead code from self test' " luca.boccassi
                       ` (69 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/fb86d42d93057ad93875173e98fd370bac7e0346

Thanks.

Luca Boccassi

---
From fb86d42d93057ad93875173e98fd370bac7e0346 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Sun, 25 Oct 2020 21:39:26 +0100
Subject: [PATCH] mbuf: fix typo in dynamic field convention note

[ upstream commit 34d26d26b7f92b2b418af513504fead362c91806 ]

Replace "in a in PMD" with "in a PMD".

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

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 lib/librte_mbuf/rte_mbuf_dyn.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_mbuf/rte_mbuf_dyn.h b/lib/librte_mbuf/rte_mbuf_dyn.h
index 96c363137e..f9f6dbbac8 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.h
+++ b/lib/librte_mbuf/rte_mbuf_dyn.h
@@ -62,7 +62,7 @@
  * conventions than function names in dpdk:
  * - "rte_mbuf_dynfield_<name>" if defined in mbuf library
  * - "rte_<libname>_dynfield_<name>" if defined in another library
- * - "rte_net_<pmd>_dynfield_<name>" if defined in a in PMD
+ * - "rte_net_<pmd>_dynfield_<name>" if defined in a PMD
  * - any name that does not start with "rte_" in an application
  */
 
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:11.741391586 +0000
+++ 0013-mbuf-fix-typo-in-dynamic-field-convention-note.patch	2020-11-09 18:40:11.087310598 +0000
@@ -1 +1 @@
-From 34d26d26b7f92b2b418af513504fead362c91806 Mon Sep 17 00:00:00 2001
+From fb86d42d93057ad93875173e98fd370bac7e0346 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 34d26d26b7f92b2b418af513504fead362c91806 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 8407230ecf..0ebac88b83 100644
+index 96c363137e..f9f6dbbac8 100644

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

* [dpdk-stable] patch 'event/dpaa2: remove dead code from self test' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (11 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'mbuf: fix typo in dynamic field convention note' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'crypto/scheduler: remove unused internal seqn' " luca.boccassi
                       ` (68 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: David Marchand; +Cc: Nipun Gupta, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b50a8c33a3f3c177e20b801b6b9cb77a32404fea

Thanks.

Luca Boccassi

---
From b50a8c33a3f3c177e20b801b6b9cb77a32404fea Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 28 Oct 2020 13:20:05 +0100
Subject: [PATCH] event/dpaa2: remove dead code from self test

[ upstream commit b5b2d4a51a9c644f5e5d8893d66e5154c0a7793f ]

This code has never been used since introduction.

Fixes: 653242c3375a ("event/dpaa2: add self test")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
---
 drivers/event/dpaa2/dpaa2_eventdev_selftest.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/event/dpaa2/dpaa2_eventdev_selftest.c b/drivers/event/dpaa2/dpaa2_eventdev_selftest.c
index ba4f4bd234..1f35807b21 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev_selftest.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev_selftest.c
@@ -47,17 +47,6 @@ struct event_attr {
 	uint8_t seq;
 };
 
-static uint32_t seqn_list_index;
-static int seqn_list[NUM_PACKETS];
-
-static void
-seqn_list_init(void)
-{
-	RTE_BUILD_BUG_ON(NUM_PACKETS < MAX_EVENTS);
-	memset(seqn_list, 0, sizeof(seqn_list));
-	seqn_list_index = 0;
-}
-
 struct test_core_param {
 	rte_atomic32_t *total_events;
 	uint64_t dequeue_tmo_ticks;
@@ -516,7 +505,7 @@ launch_workers_and_wait(int (*master_worker)(void *),
 		return 0;
 
 	rte_atomic32_set(&atomic_total_events, total_events);
-	seqn_list_init();
+	RTE_BUILD_BUG_ON(NUM_PACKETS < MAX_EVENTS);
 
 	param = malloc(sizeof(struct test_core_param) * nb_workers);
 	if (!param)
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:11.780360575 +0000
+++ 0014-event-dpaa2-remove-dead-code-from-self-test.patch	2020-11-09 18:40:11.087310598 +0000
@@ -1 +1 @@
-From b5b2d4a51a9c644f5e5d8893d66e5154c0a7793f Mon Sep 17 00:00:00 2001
+From b50a8c33a3f3c177e20b801b6b9cb77a32404fea Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b5b2d4a51a9c644f5e5d8893d66e5154c0a7793f ]
+
@@ -17 +19 @@
-index b1f3891484..5447db8a8a 100644
+index ba4f4bd234..1f35807b21 100644
@@ -38 +40 @@
-@@ -516,7 +505,7 @@ launch_workers_and_wait(int (*main_worker)(void *),
+@@ -516,7 +505,7 @@ launch_workers_and_wait(int (*master_worker)(void *),

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

* [dpdk-stable] patch 'crypto/scheduler: remove unused internal seqn' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (12 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'event/dpaa2: remove dead code from self test' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'doc: remove notice about AES-GCM IV and J0' " luca.boccassi
                       ` (67 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/89219b8fe16017bfef369a654733b17b609ae56d

Thanks.

Luca Boccassi

---
From 89219b8fe16017bfef369a654733b17b609ae56d Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 28 Oct 2020 13:20:06 +0100
Subject: [PATCH] crypto/scheduler: remove unused internal seqn

[ upstream commit 2601dcffd5ac10cc1f8d4fc318315ebc4cc097d2 ]

This field has been left behind after dropping its use.

Fixes: 8a48e039432b ("crypto/scheduler: optimize crypto op ordering")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/crypto/scheduler/scheduler_pmd_private.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/crypto/scheduler/scheduler_pmd_private.h b/drivers/crypto/scheduler/scheduler_pmd_private.h
index 3ed480c183..d6870177b1 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_private.h
+++ b/drivers/crypto/scheduler/scheduler_pmd_private.h
@@ -59,7 +59,6 @@ struct scheduler_qp_ctx {
 	uint32_t max_nb_objs;
 
 	struct rte_ring *order_ring;
-	uint32_t seqn;
 } __rte_cache_aligned;
 
 
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:11.819997126 +0000
+++ 0015-crypto-scheduler-remove-unused-internal-seqn.patch	2020-11-09 18:40:11.087310598 +0000
@@ -1 +1 @@
-From 2601dcffd5ac10cc1f8d4fc318315ebc4cc097d2 Mon Sep 17 00:00:00 2001
+From 89219b8fe16017bfef369a654733b17b609ae56d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2601dcffd5ac10cc1f8d4fc318315ebc4cc097d2 ]
+
@@ -16 +18 @@
-index adb4eb0632..4d33b9ab44 100644
+index 3ed480c183..d6870177b1 100644

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

* [dpdk-stable] patch 'doc: remove notice about AES-GCM IV and J0' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (13 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'crypto/scheduler: remove unused internal seqn' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'baseband/turbo_sw: fix memory leak in error path' " luca.boccassi
                       ` (66 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Arek Kusztal; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/145749bc13de2fe2f7916b46f425b07fb42a7d5e

Thanks.

Luca Boccassi

---
From 145749bc13de2fe2f7916b46f425b07fb42a7d5e Mon Sep 17 00:00:00 2001
From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Date: Wed, 14 Oct 2020 06:07:00 +0100
Subject: [PATCH] doc: remove notice about AES-GCM IV and J0

[ upstream commit 57e03d2a620534cee72a54396d799a0a6c1ca2d5 ]

This patch removes information about deprecation of AES-GCM/GMAC
API for IV without J0.

Fixes: fac52fb26a54 ("cryptodev: add option to support both IV and J0 for GCM")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
 doc/guides/rel_notes/deprecation.rst | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index afa94b43e2..c2e1298342 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -67,12 +67,6 @@ Deprecation Notices
   In 19.11 PMDs will still update the field even when the offload is not
   enabled.
 
-* cryptodev: support for using IV with all sizes is added, J0 still can
-  be used but only when IV length in following structs ``rte_crypto_auth_xform``,
-  ``rte_crypto_aead_xform`` is set to zero. When IV length is greater or equal
-  to one it means it represents IV, when is set to zero it means J0 is used
-  directly, in this case 16 bytes of J0 need to be passed.
-
 * sched: To allow more traffic classes, flexible mapping of pipe queues to
   traffic classes, and subport level configuration of pipes and queues
   changes will be made to macros, data structures and API functions defined
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:11.859038676 +0000
+++ 0016-doc-remove-notice-about-AES-GCM-IV-and-J0.patch	2020-11-09 18:40:11.087310598 +0000
@@ -1 +1 @@
-From 57e03d2a620534cee72a54396d799a0a6c1ca2d5 Mon Sep 17 00:00:00 2001
+From 145749bc13de2fe2f7916b46f425b07fb42a7d5e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 57e03d2a620534cee72a54396d799a0a6c1ca2d5 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 22aecf0bab..43e0e09be5 100644
+index afa94b43e2..c2e1298342 100644
@@ -21,3 +22,3 @@
-@@ -132,12 +132,6 @@ Deprecation Notices
-   will be limited to maximum 256 queues.
-   Also compile time flag ``RTE_ETHDEV_QUEUE_STAT_CNTRS`` will be removed.
+@@ -67,12 +67,6 @@ Deprecation Notices
+   In 19.11 PMDs will still update the field even when the offload is not
+   enabled.

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

* [dpdk-stable] patch 'baseband/turbo_sw: fix memory leak in error path' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (14 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'doc: remove notice about AES-GCM IV and J0' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'crypto/octeontx2: fix multi-process' " luca.boccassi
                       ` (65 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Nicolas Chautru, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a973d06b4f47609fb3ef4fc483bc483a57ee1c61

Thanks.

Luca Boccassi

---
From a973d06b4f47609fb3ef4fc483bc483a57ee1c61 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 e6d9501240..18c4649917 100644
--- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
+++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
@@ -10,6 +10,7 @@
 #include <rte_ring.h>
 #include <rte_kvargs.h>
 #include <rte_cycles.h>
+#include <rte_errno.h>
 
 #include <rte_bbdev.h>
 #include <rte_bbdev_pmd.h>
@@ -303,7 +304,8 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 		rte_bbdev_log(ERR,
 				"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,
 			((RTE_BBDEV_TURBO_MAX_TB_SIZE >> 3) + 3) *
@@ -312,6 +314,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 	if (q->enc_out == NULL) {
 		rte_bbdev_log(ERR,
 			"Failed to allocate queue memory for %s", name);
+		ret = -ENOMEM;
 		goto free_q;
 	}
 
@@ -323,7 +326,8 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 		rte_bbdev_log(ERR,
 				"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,
 			(RTE_BBDEV_LDPC_MAX_CB_SIZE >> 3) * sizeof(*q->enc_in),
@@ -331,6 +335,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 	if (q->enc_in == NULL) {
 		rte_bbdev_log(ERR,
 			"Failed to allocate queue memory for %s", name);
+		ret = -ENOMEM;
 		goto free_q;
 	}
 
@@ -341,7 +346,8 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 		rte_bbdev_log(ERR,
 				"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,
 			RTE_BBDEV_TURBO_MAX_CB_SIZE * 10 * sizeof(*q->ag),
@@ -349,6 +355,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 	if (q->ag == NULL) {
 		rte_bbdev_log(ERR,
 			"Failed to allocate queue memory for %s", name);
+		ret = -ENOMEM;
 		goto free_q;
 	}
 
@@ -359,7 +366,8 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 		rte_bbdev_log(ERR,
 				"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,
 			RTE_BBDEV_TURBO_MAX_CB_SIZE * sizeof(*q->code_block),
@@ -367,6 +375,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 	if (q->code_block == NULL) {
 		rte_bbdev_log(ERR,
 			"Failed to allocate queue memory for %s", name);
+		ret = -ENOMEM;
 		goto free_q;
 	}
 
@@ -378,7 +387,8 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 		rte_bbdev_log(ERR,
 				"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,
 			DEINT_INPUT_BUF_SIZE * sizeof(*q->deint_input),
@@ -386,6 +396,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 	if (q->deint_input == NULL) {
 		rte_bbdev_log(ERR,
 			"Failed to allocate queue memory for %s", name);
+		ret = -ENOMEM;
 		goto free_q;
 	}
 
@@ -397,7 +408,8 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 		rte_bbdev_log(ERR,
 				"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,
 			DEINT_OUTPUT_BUF_SIZE * sizeof(*q->deint_output),
@@ -405,6 +417,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 	if (q->deint_output == NULL) {
 		rte_bbdev_log(ERR,
 			"Failed to allocate queue memory for %s", name);
+		ret = -ENOMEM;
 		goto free_q;
 	}
 
@@ -416,7 +429,8 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 		rte_bbdev_log(ERR,
 				"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,
 			ADAPTER_OUTPUT_BUF_SIZE * sizeof(*q->adapter_output),
@@ -424,6 +438,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 	if (q->adapter_output == NULL) {
 		rte_bbdev_log(ERR,
 			"Failed to allocate queue memory for %s", name);
+		ret = -ENOMEM;
 		goto free_q;
 	}
 
@@ -434,12 +449,14 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
 		rte_bbdev_log(ERR,
 				"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,
 			queue_conf->socket, RING_F_SP_ENQ | RING_F_SC_DEQ);
 	if (q->processed_pkts == NULL) {
 		rte_bbdev_log(ERR, "Failed to create ring for %s", name);
+		ret = -rte_errno;
 		goto free_q;
 	}
 
@@ -459,7 +476,7 @@ free_q:
 	rte_free(q->deint_output);
 	rte_free(q->adapter_output);
 	rte_free(q);
-	return -EFAULT;
+	return ret;
 }
 
 static const struct rte_bbdev_ops pmd_ops = {
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:11.896932363 +0000
+++ 0017-baseband-turbo_sw-fix-memory-leak-in-error-path.patch	2020-11-09 18:40:11.091310660 +0000
@@ -1 +1 @@
-From 240fb56cdb8a4d48359f83b2cb856410016b9207 Mon Sep 17 00:00:00 2001
+From a973d06b4f47609fb3ef4fc483bc483a57ee1c61 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 e6d9501240..18c4649917 100644
@@ -30 +31 @@
-@@ -302,7 +303,8 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -303,7 +304,8 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -40 +41 @@
-@@ -311,6 +313,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -312,6 +314,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -48 +49 @@
-@@ -322,7 +325,8 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -323,7 +326,8 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -58 +59 @@
-@@ -330,6 +334,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -331,6 +335,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -66 +67 @@
-@@ -340,7 +345,8 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -341,7 +346,8 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -76 +77 @@
-@@ -348,6 +354,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -349,6 +355,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -84 +85 @@
-@@ -358,7 +365,8 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -359,7 +366,8 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -94 +95 @@
-@@ -366,6 +374,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -367,6 +375,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -102 +103 @@
-@@ -377,7 +386,8 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -378,7 +387,8 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -112 +113 @@
-@@ -385,6 +395,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -386,6 +396,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -120 +121 @@
-@@ -396,7 +407,8 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -397,7 +408,8 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -130 +131 @@
-@@ -404,6 +416,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -405,6 +417,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -138 +139 @@
-@@ -415,7 +428,8 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -416,7 +429,8 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -148 +149 @@
-@@ -423,6 +437,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -424,6 +438,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -156 +157 @@
-@@ -433,12 +448,14 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
+@@ -434,12 +449,14 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id,
@@ -172 +173 @@
-@@ -458,7 +475,7 @@ free_q:
+@@ -459,7 +476,7 @@ free_q:

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

* [dpdk-stable] patch 'crypto/octeontx2: fix multi-process' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (15 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'baseband/turbo_sw: fix memory leak in error path' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-10 10:59       ` [dpdk-stable] [EXT] " Ankur Dwivedi
  2020-11-09 18:40     ` [dpdk-stable] patch 'examples/fips_validation: fix missed version line' " luca.boccassi
                       ` (64 subsequent siblings)
  81 siblings, 1 reply; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Ankur Dwivedi; +Cc: Anoob Joseph, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3415ca530b2ea4acdbc15b3c6eb4c4f4177a09dc

Thanks.

Luca Boccassi

---
From 3415ca530b2ea4acdbc15b3c6eb4c4f4177a09dc Mon Sep 17 00:00:00 2001
From: Ankur Dwivedi <adwivedi@marvell.com>
Date: Thu, 22 Oct 2020 13:20:00 +0530
Subject: [PATCH] crypto/octeontx2: fix multi-process

[ upstream commit 9fd11c1583c9b3249f49755b3216a79698e94700 ]

During crypto device probe few functions should be called only
for the primary process. This patch fixes this issue.

Fixes: 818d138bcce9 ("crypto/octeontx2: add init sequence in probe")

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Reviewed-by: Anoob Joseph <anoobj@marvell.com>
---
 drivers/crypto/octeontx2/otx2_cryptodev.c     | 49 +++++++++++--------
 drivers/crypto/octeontx2/otx2_cryptodev.h     |  2 +
 drivers/crypto/octeontx2/otx2_cryptodev_ops.c | 13 +++--
 3 files changed, 40 insertions(+), 24 deletions(-)

diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c b/drivers/crypto/octeontx2/otx2_cryptodev.c
index 417eda6de6..2323de1f60 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev.c
@@ -70,31 +70,34 @@ otx2_cpt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 
 	otx2_dev = &vf->otx2_dev;
 
-	/* Initialize the base otx2_dev object */
-	ret = otx2_dev_init(pci_dev, otx2_dev);
-	if (ret) {
-		CPT_LOG_ERR("Could not initialize otx2_dev");
-		goto pmd_destroy;
-	}
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+		/* Initialize the base otx2_dev object */
+		ret = otx2_dev_init(pci_dev, otx2_dev);
+		if (ret) {
+			CPT_LOG_ERR("Could not initialize otx2_dev");
+			goto pmd_destroy;
+		}
 
-	/* Get number of queues available on the device */
-	ret = otx2_cpt_available_queues_get(dev, &nb_queues);
-	if (ret) {
-		CPT_LOG_ERR("Could not determine the number of queues available");
-		goto otx2_dev_fini;
-	}
+		/* Get number of queues available on the device */
+		ret = otx2_cpt_available_queues_get(dev, &nb_queues);
+		if (ret) {
+			CPT_LOG_ERR("Could not determine the number of queues available");
+			goto otx2_dev_fini;
+		}
 
-	/* Don't exceed the limits set per VF */
-	nb_queues = RTE_MIN(nb_queues, OTX2_CPT_MAX_QUEUES_PER_VF);
+		/* Don't exceed the limits set per VF */
+		nb_queues = RTE_MIN(nb_queues, OTX2_CPT_MAX_QUEUES_PER_VF);
 
-	if (nb_queues == 0) {
-		CPT_LOG_ERR("No free queues available on the device");
-		goto otx2_dev_fini;
-	}
+		if (nb_queues == 0) {
+			CPT_LOG_ERR("No free queues available on the device");
+			goto otx2_dev_fini;
+		}
 
-	vf->max_queues = nb_queues;
+		vf->max_queues = nb_queues;
 
-	CPT_LOG_INFO("Max queues supported by device: %d", vf->max_queues);
+		CPT_LOG_INFO("Max queues supported by device: %d",
+				vf->max_queues);
+	}
 
 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
 			     RTE_CRYPTODEV_FF_HW_ACCELERATED |
@@ -105,10 +108,14 @@ otx2_cpt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 			     RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO |
 			     RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT;
 
+	if (rte_eal_process_type() == RTE_PROC_SECONDARY)
+		otx2_cpt_set_enqdeq_fns(dev);
+
 	return 0;
 
 otx2_dev_fini:
-	otx2_dev_fini(pci_dev, otx2_dev);
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+		otx2_dev_fini(pci_dev, otx2_dev);
 pmd_destroy:
 	rte_cryptodev_pmd_destroy(dev);
 exit:
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.h b/drivers/crypto/octeontx2/otx2_cryptodev.h
index c0aa661b3b..17c0bee661 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev.h
+++ b/drivers/crypto/octeontx2/otx2_cryptodev.h
@@ -40,4 +40,6 @@ extern int otx2_cpt_logtype;
  */
 extern uint8_t otx2_cryptodev_driver_id;
 
+void otx2_cpt_set_enqdeq_fns(struct rte_cryptodev *dev);
+
 #endif /* _OTX2_CRYPTODEV_H_ */
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
index af4bbccd7d..292aff1928 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
@@ -813,6 +813,15 @@ otx2_cpt_dequeue_burst(void *qptr, struct rte_crypto_op **ops, uint16_t nb_ops)
 	return nb_completed;
 }
 
+void
+otx2_cpt_set_enqdeq_fns(struct rte_cryptodev *dev)
+{
+	dev->enqueue_burst = otx2_cpt_enqueue_burst;
+	dev->dequeue_burst = otx2_cpt_dequeue_burst;
+
+	rte_mb();
+}
+
 /* PMD ops */
 
 static int
@@ -862,10 +871,8 @@ otx2_cpt_dev_config(struct rte_cryptodev *dev,
 		goto queues_detach;
 	}
 
-	dev->enqueue_burst = otx2_cpt_enqueue_burst;
-	dev->dequeue_burst = otx2_cpt_dequeue_burst;
+	otx2_cpt_set_enqdeq_fns(dev);
 
-	rte_mb();
 	return 0;
 
 queues_detach:
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:11.932938032 +0000
+++ 0018-crypto-octeontx2-fix-multi-process.patch	2020-11-09 18:40:11.091310660 +0000
@@ -1 +1 @@
-From 9fd11c1583c9b3249f49755b3216a79698e94700 Mon Sep 17 00:00:00 2001
+From 3415ca530b2ea4acdbc15b3c6eb4c4f4177a09dc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9fd11c1583c9b3249f49755b3216a79698e94700 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
- drivers/crypto/octeontx2/otx2_cryptodev.c     | 57 +++++++++++--------
+ drivers/crypto/octeontx2/otx2_cryptodev.c     | 49 +++++++++++--------
@@ -17,2 +18,2 @@
- drivers/crypto/octeontx2/otx2_cryptodev_ops.c | 13 ++++-
- 3 files changed, 44 insertions(+), 28 deletions(-)
+ drivers/crypto/octeontx2/otx2_cryptodev_ops.c | 13 +++--
+ 3 files changed, 40 insertions(+), 24 deletions(-)
@@ -21 +22 @@
-index 02d2fd83bd..1de04f4a66 100644
+index 417eda6de6..2323de1f60 100644
@@ -24 +25 @@
-@@ -70,36 +70,39 @@ otx2_cpt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+@@ -70,31 +70,34 @@ otx2_cpt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
@@ -74,0 +76 @@
++	}
@@ -76,15 +78,5 @@
--	ret = otx2_cpt_hardware_caps_get(dev, vf->hw_caps);
--	if (ret) {
--		CPT_LOG_ERR("Could not determine hardware capabilities");
--		goto otx2_dev_fini;
-+		ret = otx2_cpt_hardware_caps_get(dev, vf->hw_caps);
-+		if (ret) {
-+			CPT_LOG_ERR("Could not determine hardware capabilities");
-+			goto otx2_dev_fini;
-+		}
- 	}
- 
- 	otx2_crypto_capabilities_init(vf->hw_caps);
-@@ -121,10 +124,14 @@ otx2_cpt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
- 			     RTE_CRYPTODEV_FF_SYM_SESSIONLESS |
- 			     RTE_CRYPTODEV_FF_SECURITY;
+ 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
+ 			     RTE_CRYPTODEV_FF_HW_ACCELERATED |
+@@ -105,10 +108,14 @@ otx2_cpt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+ 			     RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO |
+ 			     RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT;
@@ -105 +97 @@
-index 7b1b648639..febb4ee74d 100644
+index c0aa661b3b..17c0bee661 100644
@@ -108 +100 @@
-@@ -51,4 +51,6 @@ extern int otx2_cpt_logtype;
+@@ -40,4 +40,6 @@ extern int otx2_cpt_logtype;
@@ -116 +108 @@
-index 790af02dc6..be37d3cac1 100644
+index af4bbccd7d..292aff1928 100644
@@ -119 +111 @@
-@@ -1019,6 +1019,15 @@ otx2_cpt_dequeue_burst(void *qptr, struct rte_crypto_op **ops, uint16_t nb_ops)
+@@ -813,6 +813,15 @@ otx2_cpt_dequeue_burst(void *qptr, struct rte_crypto_op **ops, uint16_t nb_ops)
@@ -135,2 +127,2 @@
-@@ -1081,10 +1090,8 @@ otx2_cpt_dev_config(struct rte_cryptodev *dev,
- 		goto intr_unregister;
+@@ -862,10 +871,8 @@ otx2_cpt_dev_config(struct rte_cryptodev *dev,
+ 		goto queues_detach;
@@ -146 +138 @@
- intr_unregister:
+ queues_detach:

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

* [dpdk-stable] patch 'examples/fips_validation: fix missed version line' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (16 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'crypto/octeontx2: fix multi-process' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'crypto/dpaa2_sec: remove dead code' " luca.boccassi
                       ` (63 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Fan Zhang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3803a42a0b1c5da04aff94ddc4404977d4f8b8dc

Thanks.

Luca Boccassi

---
From 3803a42a0b1c5da04aff94ddc4404977d4f8b8dc 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 910f012e36..701d87dc4d 100644
--- a/examples/fips_validation/fips_validation.c
+++ b/examples/fips_validation/fips_validation.c
@@ -118,7 +118,7 @@ fips_test_parse_header(void)
 	if (info.nb_vec_lines)
 		fips_test_parse_version();
 
-	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")) {
 				algo_parsed = 1;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:11.971315689 +0000
+++ 0019-examples-fips_validation-fix-missed-version-line.patch	2020-11-09 18:40:11.091310660 +0000
@@ -1 +1 @@
-From ecc3356fed449f0245127655aefb30844c1889c4 Mon Sep 17 00:00:00 2001
+From 3803a42a0b1c5da04aff94ddc4404977d4f8b8dc 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 910f012e36..701d87dc4d 100644

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

* [dpdk-stable] patch 'crypto/dpaa2_sec: remove dead code' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (17 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'examples/fips_validation: fix missed version line' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'common/qat: add missing kmod dependency info' " luca.boccassi
                       ` (62 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: David Marchand; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/65394dd2a6fef5915c868162f186671fc0f6a958

Thanks.

Luca Boccassi

---
From 65394dd2a6fef5915c868162f186671fc0f6a958 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 60e9bf702b..5eb78eca57 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -2746,12 +2746,6 @@ dpaa2_sec_ipsec_proto_init(struct rte_crypto_cipher_xform *cipher_xform,
 	return 0;
 }
 
-#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,
 			    struct rte_security_session_conf *conf,
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.008154725 +0000
+++ 0020-crypto-dpaa2_sec-remove-dead-code.patch	2020-11-09 18:40:11.095310722 +0000
@@ -1 +1 @@
-From 0ea0bbfebc3e557b1739b20de0dabbe938b2f058 Mon Sep 17 00:00:00 2001
+From 65394dd2a6fef5915c868162f186671fc0f6a958 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 60e9bf702b..5eb78eca57 100644
@@ -22 +23 @@
-@@ -2820,12 +2820,6 @@ dpaa2_sec_ipsec_proto_init(struct rte_crypto_cipher_xform *cipher_xform,
+@@ -2746,12 +2746,6 @@ dpaa2_sec_ipsec_proto_init(struct rte_crypto_cipher_xform *cipher_xform,

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

* [dpdk-stable] patch 'common/qat: add missing kmod dependency info' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (18 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'crypto/dpaa2_sec: remove dead code' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'crypto/octeontx: fix out-of-place support' " luca.boccassi
                       ` (61 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Didier Pallard; +Cc: David Marchand, Fiona Trahe, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/cc39464a48310038c15c250bce045c46a6a08750

Thanks.

Luca Boccassi

---
From cc39464a48310038c15c250bce045c46a6a08750 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 03f5fd1a3b..e3d2b9c79a 100644
--- a/drivers/common/qat/qat_device.c
+++ b/drivers/common/qat/qat_device.c
@@ -421,3 +421,4 @@ 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.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.051332569 +0000
+++ 0021-common-qat-add-missing-kmod-dependency-info.patch	2020-11-09 18:40:11.095310722 +0000
@@ -1 +1 @@
-From a0fe0cc5313821cf9d990237f0bf762123b52fc7 Mon Sep 17 00:00:00 2001
+From cc39464a48310038c15c250bce045c46a6a08750 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 03f5fd1a3b..e3d2b9c79a 100644
@@ -23 +24 @@
-@@ -423,3 +423,4 @@ qat_comp_dev_destroy(struct qat_pci_device *qat_pci_dev __rte_unused)
+@@ -421,3 +421,4 @@ qat_comp_dev_destroy(struct qat_pci_device *qat_pci_dev __rte_unused)

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

* [dpdk-stable] patch 'crypto/octeontx: fix out-of-place support' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (19 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'common/qat: add missing kmod dependency info' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'crypto/octeontx2: " luca.boccassi
                       ` (60 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Didier Pallard; +Cc: Ankur Dwivedi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/31d465f92cdd307a811f259147161ce9bcece7fd

Thanks.

Luca Boccassi

---
From 31d465f92cdd307a811f259147161ce9bcece7fd Mon Sep 17 00:00:00 2001
From: Didier Pallard <didier.pallard@6wind.com>
Date: Tue, 27 Oct 2020 16:19:43 +0100
Subject: [PATCH] crypto/octeontx: fix out-of-place support

[ upstream commit 16c011472df0f9bc4a6f3fc21dabacc274e4ad1e ]

Out of place with linear buffers is supported by octeontx
while not advertised.

Fixes: 0dc1cffa4d33 ("crypto/octeontx: add hardware init routine")

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Ankur Dwivedi <adwivedi@marvell.com>
---
 doc/guides/cryptodevs/features/octeontx.ini | 1 +
 drivers/crypto/octeontx/otx_cryptodev_ops.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/doc/guides/cryptodevs/features/octeontx.ini b/doc/guides/cryptodevs/features/octeontx.ini
index 1c036c5baf..629e6bfc41 100644
--- a/doc/guides/cryptodevs/features/octeontx.ini
+++ b/doc/guides/cryptodevs/features/octeontx.ini
@@ -11,6 +11,7 @@ HW Accelerated         = Y
 In Place SGL           = Y
 OOP SGL In LB  Out     = Y
 OOP SGL In SGL Out     = Y
+OOP LB  In LB  Out     = Y
 RSA PRIV OP KEY QT     = Y
 
 ;
diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c b/drivers/crypto/octeontx/otx_cryptodev_ops.c
index ba56b212b9..4eadb773ef 100644
--- a/drivers/crypto/octeontx/otx_cryptodev_ops.c
+++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c
@@ -905,6 +905,7 @@ otx_cpt_dev_create(struct rte_cryptodev *c_dev)
 				RTE_CRYPTODEV_FF_HW_ACCELERATED |
 				RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 				RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+				RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT |
 				RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT |
 				RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT;
 		break;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.091901741 +0000
+++ 0022-crypto-octeontx-fix-out-of-place-support.patch	2020-11-09 18:40:11.095310722 +0000
@@ -1 +1 @@
-From 16c011472df0f9bc4a6f3fc21dabacc274e4ad1e Mon Sep 17 00:00:00 2001
+From 31d465f92cdd307a811f259147161ce9bcece7fd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 16c011472df0f9bc4a6f3fc21dabacc274e4ad1e ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 4ce4ff1699..10d94e3f7b 100644
+index 1c036c5baf..629e6bfc41 100644
@@ -29 +29,0 @@
- Symmetric sessionless  = Y
@@ -30,0 +31 @@
+ ;
@@ -32 +33 @@
-index 14f22e3011..05d6dfff7c 100644
+index ba56b212b9..4eadb773ef 100644
@@ -35 +36 @@
-@@ -985,6 +985,7 @@ otx_cpt_dev_create(struct rte_cryptodev *c_dev)
+@@ -905,6 +905,7 @@ otx_cpt_dev_create(struct rte_cryptodev *c_dev)
@@ -41,2 +42,2 @@
- 				RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
- 				RTE_CRYPTODEV_FF_SYM_SESSIONLESS;
+ 				RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT;
+ 		break;

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

* [dpdk-stable] patch 'crypto/octeontx2: fix out-of-place support' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (20 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'crypto/octeontx: fix out-of-place support' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'gso: fix mbuf freeing responsibility' " luca.boccassi
                       ` (59 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Didier Pallard; +Cc: Ankur Dwivedi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/73299825e498d41d9b307fe8c262d3f1b6695f8c

Thanks.

Luca Boccassi

---
From 73299825e498d41d9b307fe8c262d3f1b6695f8c Mon Sep 17 00:00:00 2001
From: Didier Pallard <didier.pallard@6wind.com>
Date: Tue, 27 Oct 2020 16:20:58 +0100
Subject: [PATCH] crypto/octeontx2: fix out-of-place support

[ upstream commit 8bd1040a708dd1303d1f75a3bd55205b2ec605ce ]

Out of place with linear buffers is supported by octeontx2
while not advertised.

Fixes: 6aa9ceaddf1d ("crypto/octeontx2: add symmetric capabilities")

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Ankur Dwivedi <adwivedi@marvell.com>
---
 doc/guides/cryptodevs/features/octeontx2.ini | 1 +
 drivers/crypto/octeontx2/otx2_cryptodev.c    | 1 +
 2 files changed, 2 insertions(+)

diff --git a/doc/guides/cryptodevs/features/octeontx2.ini b/doc/guides/cryptodevs/features/octeontx2.ini
index 7d07053cb1..6a205870af 100644
--- a/doc/guides/cryptodevs/features/octeontx2.ini
+++ b/doc/guides/cryptodevs/features/octeontx2.ini
@@ -11,6 +11,7 @@ HW Accelerated         = Y
 In Place SGL           = Y
 OOP SGL In LB  Out     = Y
 OOP SGL In SGL Out     = Y
+OOP LB  In LB  Out     = Y
 RSA PRIV OP KEY QT     = Y
 
 ;
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c b/drivers/crypto/octeontx2/otx2_cryptodev.c
index 2323de1f60..8523817847 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev.c
@@ -103,6 +103,7 @@ otx2_cpt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 			     RTE_CRYPTODEV_FF_HW_ACCELERATED |
 			     RTE_CRYPTODEV_FF_SYM_OPERATION_CHAINING |
 			     RTE_CRYPTODEV_FF_IN_PLACE_SGL |
+			     RTE_CRYPTODEV_FF_OOP_LB_IN_LB_OUT |
 			     RTE_CRYPTODEV_FF_OOP_SGL_IN_LB_OUT |
 			     RTE_CRYPTODEV_FF_OOP_SGL_IN_SGL_OUT |
 			     RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO |
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.130931749 +0000
+++ 0023-crypto-octeontx2-fix-out-of-place-support.patch	2020-11-09 18:40:11.095310722 +0000
@@ -1 +1 @@
-From 8bd1040a708dd1303d1f75a3bd55205b2ec605ce Mon Sep 17 00:00:00 2001
+From 73299825e498d41d9b307fe8c262d3f1b6695f8c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8bd1040a708dd1303d1f75a3bd55205b2ec605ce ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index c7e418d826..b0d50ce984 100644
+index 7d07053cb1..6a205870af 100644
@@ -23 +24 @@
-@@ -12,6 +12,7 @@ Protocol offload       = Y
+@@ -11,6 +11,7 @@ HW Accelerated         = Y
@@ -29 +29,0 @@
- Symmetric sessionless  = Y
@@ -30,0 +31 @@
+ ;
@@ -32 +33 @@
-index 1de04f4a66..e0a559b663 100644
+index 2323de1f60..8523817847 100644
@@ -35 +36 @@
-@@ -117,6 +117,7 @@ otx2_cpt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+@@ -103,6 +103,7 @@ otx2_cpt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,

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

* [dpdk-stable] patch 'gso: fix mbuf freeing responsibility' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (21 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'crypto/octeontx2: " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 22:39       ` Ananyev, Konstantin
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/iavf: fix unchecked Tx cleanup error' " luca.boccassi
                       ` (58 subsequent siblings)
  81 siblings, 1 reply; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Yi Yang; +Cc: Jiayu Hu, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6dce2ff12e8191ffd4d23e1ab9322f2d042f6e5b

Thanks.

Luca Boccassi

---
From 6dce2ff12e8191ffd4d23e1ab9322f2d042f6e5b Mon Sep 17 00:00:00 2001
From: Yi Yang <yangyi01@inspur.com>
Date: Mon, 26 Oct 2020 14:47:13 +0800
Subject: [PATCH] gso: fix mbuf freeing responsibility

[ upstream commit c0d002aed98d6d1d38d6bb318a5bd2ed5cdc01b1 ]

rte_gso_segment decreased refcnt of pkt by one, but
it is wrong if pkt is external mbuf, pkt won't be
freed because of incorrect refcnt, the result is
application can't allocate mbuf from mempool because
mbufs in mempool are run out of.

One correct way is application should call
rte_pktmbuf_free after calling rte_gso_segment to free
pkt explicitly. rte_gso_segment must not handle it, this
should be responsibility of application.

This commit changed rte_gso_segment in functional behavior
and return value, so the application must take appropriate
actions according to return values, "ret < 0" means it
should free and drop 'pkt', "ret == 0" means 'pkt' isn't
GSOed but 'pkt' can be transmitted as a normal packet,
"ret > 0" means 'pkt' has been GSOed into two or multiple
segments, it should use "pkts_out" to transmit these
segments. The application must free 'pkt' after call
rte_gso_segment when return value isn't equal to 0.

Fixes: 119583797b6a ("gso: support TCP/IPv4 GSO")

Signed-off-by: Yi Yang <yangyi01@inspur.com>
Acked-by: Jiayu Hu <jiayu.hu@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 app/test-pmd/csumonly.c                           | 12 ++++++++++--
 .../generic_segmentation_offload_lib.rst          |  7 +++++--
 drivers/net/tap/rte_eth_tap.c                     | 12 ++++++++++--
 lib/librte_gso/gso_tcp4.c                         |  6 ++----
 lib/librte_gso/gso_tunnel_tcp4.c                  | 14 +++++---------
 lib/librte_gso/gso_udp4.c                         |  6 ++----
 lib/librte_gso/rte_gso.c                          | 15 +++------------
 lib/librte_gso/rte_gso.h                          |  8 ++++++--
 8 files changed, 43 insertions(+), 37 deletions(-)

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 7b92ab1195..d0eef8b51c 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -1050,9 +1050,17 @@ tunnel_update:
 			ret = rte_gso_segment(pkts_burst[i], gso_ctx,
 					&gso_segments[nb_segments],
 					GSO_MAX_PKT_BURST - nb_segments);
-			if (ret >= 0)
+			if (ret >= 1) {
+				/* pkts_burst[i] can be freed safely here. */
+				rte_pktmbuf_free(pkts_burst[i]);
 				nb_segments += ret;
-			else {
+			} else if (ret == 0) {
+				/* 0 means it can be transmitted directly
+				 * without gso.
+				 */
+				gso_segments[nb_segments] = pkts_burst[i];
+				nb_segments += 1;
+			} else {
 				TESTPMD_LOG(DEBUG, "Unable to segment packet");
 				rte_pktmbuf_free(pkts_burst[i]);
 			}
diff --git a/doc/guides/prog_guide/generic_segmentation_offload_lib.rst b/doc/guides/prog_guide/generic_segmentation_offload_lib.rst
index 205cb8a866..ad91c6e5fc 100644
--- a/doc/guides/prog_guide/generic_segmentation_offload_lib.rst
+++ b/doc/guides/prog_guide/generic_segmentation_offload_lib.rst
@@ -25,8 +25,9 @@ Bearing that in mind, the GSO library enables DPDK applications to segment
 packets in software. Note however, that GSO is implemented as a standalone
 library, and not via a 'fallback' mechanism (i.e. for when TSO is unsupported
 in the underlying hardware); that is, applications must explicitly invoke the
-GSO library to segment packets. The size of GSO segments ``(segsz)`` is
-configurable by the application.
+GSO library to segment packets, they also must call ``rte_pktmbuf_free()``
+to free mbuf GSO segments attached after calling ``rte_gso_segment()``.
+The size of GSO segments (``segsz``) is configurable by the application.
 
 Limitations
 -----------
@@ -233,6 +234,8 @@ To segment an outgoing packet, an application must:
 
 #. Invoke the GSO segmentation API, ``rte_gso_segment()``.
 
+#. Call ``rte_pktmbuf_free()`` to free mbuf ``rte_gso_segment()`` segments.
+
 #. If required, update the L3 and L4 checksums of the newly-created segments.
    For tunneled packets, the outer IPv4 headers' checksums should also be
    updated. Alternatively, the application may offload checksum calculation
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index cfbd579cd6..1e2f21d96f 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -713,8 +713,16 @@ pmd_tx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 			if (num_tso_mbufs < 0)
 				break;
 
-			mbuf = gso_mbufs;
-			num_mbufs = num_tso_mbufs;
+			if (num_tso_mbufs >= 1) {
+				mbuf = gso_mbufs;
+				num_mbufs = num_tso_mbufs;
+			} else {
+				/* 0 means it can be transmitted directly
+				 * without gso.
+				 */
+				mbuf = &mbuf_in;
+				num_mbufs = 1;
+			}
 		} else {
 			/* stats.errs will be incremented */
 			if (rte_pktmbuf_pkt_len(mbuf_in) > max_size)
diff --git a/lib/librte_gso/gso_tcp4.c b/lib/librte_gso/gso_tcp4.c
index ade172ac73..d31feaff95 100644
--- a/lib/librte_gso/gso_tcp4.c
+++ b/lib/librte_gso/gso_tcp4.c
@@ -50,15 +50,13 @@ gso_tcp4_segment(struct rte_mbuf *pkt,
 			pkt->l2_len);
 	frag_off = rte_be_to_cpu_16(ipv4_hdr->fragment_offset);
 	if (unlikely(IS_FRAGMENTED(frag_off))) {
-		pkts_out[0] = pkt;
-		return 1;
+		return 0;
 	}
 
 	/* Don't process the packet without data */
 	hdr_offset = pkt->l2_len + pkt->l3_len + pkt->l4_len;
 	if (unlikely(hdr_offset >= pkt->pkt_len)) {
-		pkts_out[0] = pkt;
-		return 1;
+		return 0;
 	}
 
 	pyld_unit_size = gso_size - hdr_offset;
diff --git a/lib/librte_gso/gso_tunnel_tcp4.c b/lib/librte_gso/gso_tunnel_tcp4.c
index e0384c26d0..166aace73a 100644
--- a/lib/librte_gso/gso_tunnel_tcp4.c
+++ b/lib/librte_gso/gso_tunnel_tcp4.c
@@ -62,7 +62,7 @@ gso_tunnel_tcp4_segment(struct rte_mbuf *pkt,
 {
 	struct rte_ipv4_hdr *inner_ipv4_hdr;
 	uint16_t pyld_unit_size, hdr_offset, frag_off;
-	int ret = 1;
+	int ret;
 
 	hdr_offset = pkt->outer_l2_len + pkt->outer_l3_len + pkt->l2_len;
 	inner_ipv4_hdr = (struct rte_ipv4_hdr *)(rte_pktmbuf_mtod(pkt, char *) +
@@ -73,25 +73,21 @@ gso_tunnel_tcp4_segment(struct rte_mbuf *pkt,
 	 */
 	frag_off = rte_be_to_cpu_16(inner_ipv4_hdr->fragment_offset);
 	if (unlikely(IS_FRAGMENTED(frag_off))) {
-		pkts_out[0] = pkt;
-		return 1;
+		return 0;
 	}
 
 	hdr_offset += pkt->l3_len + pkt->l4_len;
 	/* Don't process the packet without data */
 	if (hdr_offset >= pkt->pkt_len) {
-		pkts_out[0] = pkt;
-		return 1;
+		return 0;
 	}
 	pyld_unit_size = gso_size - hdr_offset;
 
 	/* Segment the payload */
 	ret = gso_do_segment(pkt, hdr_offset, pyld_unit_size, direct_pool,
 			indirect_pool, pkts_out, nb_pkts_out);
-	if (ret <= 1)
-		return ret;
-
-	update_tunnel_ipv4_tcp_headers(pkt, ipid_delta, pkts_out, ret);
+	if (ret > 1)
+		update_tunnel_ipv4_tcp_headers(pkt, ipid_delta, pkts_out, ret);
 
 	return ret;
 }
diff --git a/lib/librte_gso/gso_udp4.c b/lib/librte_gso/gso_udp4.c
index 6fa68f243a..5d0186aa24 100644
--- a/lib/librte_gso/gso_udp4.c
+++ b/lib/librte_gso/gso_udp4.c
@@ -52,8 +52,7 @@ gso_udp4_segment(struct rte_mbuf *pkt,
 			pkt->l2_len);
 	frag_off = rte_be_to_cpu_16(ipv4_hdr->fragment_offset);
 	if (unlikely(IS_FRAGMENTED(frag_off))) {
-		pkts_out[0] = pkt;
-		return 1;
+		return 0;
 	}
 
 	/*
@@ -65,8 +64,7 @@ gso_udp4_segment(struct rte_mbuf *pkt,
 
 	/* Don't process the packet without data. */
 	if (unlikely(hdr_offset + pkt->l4_len >= pkt->pkt_len)) {
-		pkts_out[0] = pkt;
-		return 1;
+		return 0;
 	}
 
 	/* pyld_unit_size must be a multiple of 8 because frag_off
diff --git a/lib/librte_gso/rte_gso.c b/lib/librte_gso/rte_gso.c
index 751b5b625e..896350ebc8 100644
--- a/lib/librte_gso/rte_gso.c
+++ b/lib/librte_gso/rte_gso.c
@@ -30,7 +30,6 @@ rte_gso_segment(struct rte_mbuf *pkt,
 		uint16_t nb_pkts_out)
 {
 	struct rte_mempool *direct_pool, *indirect_pool;
-	struct rte_mbuf *pkt_seg;
 	uint64_t ol_flags;
 	uint16_t gso_size;
 	uint8_t ipid_delta;
@@ -44,8 +43,7 @@ rte_gso_segment(struct rte_mbuf *pkt,
 
 	if (gso_ctx->gso_size >= pkt->pkt_len) {
 		pkt->ol_flags &= (~(PKT_TX_TCP_SEG | PKT_TX_UDP_SEG));
-		pkts_out[0] = pkt;
-		return 1;
+		return 0;
 	}
 
 	direct_pool = gso_ctx->direct_pool;
@@ -75,18 +73,11 @@ rte_gso_segment(struct rte_mbuf *pkt,
 				indirect_pool, pkts_out, nb_pkts_out);
 	} else {
 		/* unsupported packet, skip */
-		pkts_out[0] = pkt;
 		RTE_LOG(DEBUG, GSO, "Unsupported packet type\n");
-		return 1;
+		ret = 0;
 	}
 
-	if (ret > 1) {
-		pkt_seg = pkt;
-		while (pkt_seg) {
-			rte_mbuf_refcnt_update(pkt_seg, -1);
-			pkt_seg = pkt_seg->next;
-		}
-	} else if (ret < 0) {
+	if (ret < 0) {
 		/* Revert the ol_flags in the event of failure. */
 		pkt->ol_flags = ol_flags;
 	}
diff --git a/lib/librte_gso/rte_gso.h b/lib/librte_gso/rte_gso.h
index 3aab297f44..d93ee8e5b1 100644
--- a/lib/librte_gso/rte_gso.h
+++ b/lib/librte_gso/rte_gso.h
@@ -89,8 +89,11 @@ struct rte_gso_ctx {
  * the GSO segments are sent to should support transmission of multi-segment
  * packets.
  *
- * If the input packet is GSO'd, its mbuf refcnt reduces by 1. Therefore,
- * when all GSO segments are freed, the input packet is freed automatically.
+ * If the input packet is GSO'd, all the indirect segments are attached to the
+ * input packet.
+ *
+ * rte_gso_segment() will not free the input packet no matter whether it is
+ * GSO'd or not, the application should free it after calling rte_gso_segment().
  *
  * If the memory space in pkts_out or MBUF pools is insufficient, this
  * function fails, and it returns (-1) * errno. Otherwise, GSO succeeds,
@@ -109,6 +112,7 @@ struct rte_gso_ctx {
  *
  * @return
  *  - The number of GSO segments filled in pkts_out on success.
+ *  - Return 0 if it does not need to be GSO'd.
  *  - Return -ENOMEM if run out of memory in MBUF pools.
  *  - Return -EINVAL for invalid parameters.
  */
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.168193728 +0000
+++ 0024-gso-fix-mbuf-freeing-responsibility.patch	2020-11-09 18:40:11.103310846 +0000
@@ -1 +1 @@
-From c0d002aed98d6d1d38d6bb318a5bd2ed5cdc01b1 Mon Sep 17 00:00:00 2001
+From 6dce2ff12e8191ffd4d23e1ab9322f2d042f6e5b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c0d002aed98d6d1d38d6bb318a5bd2ed5cdc01b1 ]
+
@@ -28 +29,0 @@
-Cc: stable@dpdk.org
@@ -36 +36,0 @@
- doc/guides/rel_notes/release_20_11.rst            |  6 ++++++
@@ -43 +43 @@
- 9 files changed, 49 insertions(+), 37 deletions(-)
+ 8 files changed, 43 insertions(+), 37 deletions(-)
@@ -46 +46 @@
-index 3d7d244d1e..d813d4fae0 100644
+index 7b92ab1195..d0eef8b51c 100644
@@ -49 +49 @@
-@@ -1080,9 +1080,17 @@ tunnel_update:
+@@ -1050,9 +1050,17 @@ tunnel_update:
@@ -94,17 +93,0 @@
-diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
-index 7c8246d1b3..1524f61915 100644
---- a/doc/guides/rel_notes/release_20_11.rst
-+++ b/doc/guides/rel_notes/release_20_11.rst
-@@ -569,6 +569,12 @@ API Changes
- 
- * bpf: ``RTE_BPF_XTYPE_NUM`` has been dropped from ``rte_bpf_xtype``.
- 
-+* gso: Changed ``rte_gso_segment`` behaviour and return value:
-+
-+  * ``pkt`` is not saved to ``pkts_out[0]`` if not GSOed.
-+  * Return 0 instead of 1 for the above case.
-+  * ``pkt`` is not freed, no matter whether it is GSOed, leaving to the caller.
-+
- * acl: ``RTE_ACL_CLASSIFY_NUM`` enum value has been removed.
-   This enum value was not used inside DPDK, while it prevented to add new
-   classify algorithms without causing an ABI breakage.
@@ -112 +95 @@
-index 81c688471d..2f8abb12c5 100644
+index cfbd579cd6..1e2f21d96f 100644
@@ -115 +98 @@
-@@ -751,8 +751,16 @@ pmd_tx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
+@@ -713,8 +713,16 @@ pmd_tx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)

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

* [dpdk-stable] patch 'net/iavf: fix unchecked Tx cleanup error' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (22 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'gso: fix mbuf freeing responsibility' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'app/testpmd: fix bonding xmit balance policy command' " luca.boccassi
                       ` (57 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Leyi Rong; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/590b5f4242a8663df7d755011e80056e08c53d85

Thanks.

Luca Boccassi

---
From 590b5f4242a8663df7d755011e80056e08c53d85 Mon Sep 17 00:00:00 2001
From: Leyi Rong <leyi.rong@intel.com>
Date: Mon, 19 Oct 2020 13:42:53 +0800
Subject: [PATCH] net/iavf: fix unchecked Tx cleanup error

[ upstream commit fd0dd9b3cfc02b15842092a229be5d3988a79c2a ]

Coverity complains of unchecked return value warning of
iavf_xmit_cleanup, while this cleanup is opportunistic and will not cause
problems if it fails. So instead of checking the return value of
iavf_xmit_cleanup and return in case of cleanup failure, we directly cast
it to void function to make the Coverity happy.

Coverity issue: 363045
Fixes: 02d212ca3125 ("net/iavf: rename remaining avf strings")

Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 88f79ba379..6aafc72e24 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -1506,7 +1506,7 @@ iavf_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 
 	/* Check if the descriptor ring needs to be cleaned. */
 	if (txq->nb_free < txq->free_thresh)
-		iavf_xmit_cleanup(txq);
+		(void)iavf_xmit_cleanup(txq);
 
 	for (nb_tx = 0; nb_tx < nb_pkts; nb_tx++) {
 		td_cmd = 0;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.206629097 +0000
+++ 0025-net-iavf-fix-unchecked-Tx-cleanup-error.patch	2020-11-09 18:40:11.103310846 +0000
@@ -1 +1 @@
-From fd0dd9b3cfc02b15842092a229be5d3988a79c2a Mon Sep 17 00:00:00 2001
+From 590b5f4242a8663df7d755011e80056e08c53d85 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fd0dd9b3cfc02b15842092a229be5d3988a79c2a ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index edb2dc3ca4..7d4f4ed485 100644
+index 88f79ba379..6aafc72e24 100644
@@ -26 +27 @@
-@@ -1891,7 +1891,7 @@ iavf_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
+@@ -1506,7 +1506,7 @@ iavf_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)

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

* [dpdk-stable] patch 'app/testpmd: fix bonding xmit balance policy command' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (23 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/iavf: fix unchecked Tx cleanup error' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/bnxt: fix queue release' " luca.boccassi
                       ` (56 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c78e321342ce7fe8f6493d72f136a253ad547462

Thanks.

Luca Boccassi

---
From c78e321342ce7fe8f6493d72f136a253ad547462 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 f522b599b7..9287fa3ea4 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -614,7 +614,7 @@ static void cmd_help_long_parsed(void *parsed_result,
 			"set bonding mode IEEE802.3AD aggregator policy (port_id) (agg_name)"
 			"	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"
 
 			"set bonding mon_period (port_id) (value)\n"
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 78bdf60fe6..4dd29ee929 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -2437,16 +2437,16 @@ 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
 
 
 set bonding mon_period
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.246481038 +0000
+++ 0026-app-testpmd-fix-bonding-xmit-balance-policy-command.patch	2020-11-09 18:40:11.127311220 +0000
@@ -1 +1 @@
-From 393e557ea8401d925655eb6c7c91fc7a450dcf2b Mon Sep 17 00:00:00 2001
+From c78e321342ce7fe8f6493d72f136a253ad547462 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 f522b599b7..9287fa3ea4 100644
@@ -25 +26 @@
-@@ -649,7 +649,7 @@ static void cmd_help_long_parsed(void *parsed_result,
+@@ -614,7 +614,7 @@ static void cmd_help_long_parsed(void *parsed_result,
@@ -35 +36 @@
-index 86aaf8fe0c..82d377ceed 100644
+index 78bdf60fe6..4dd29ee929 100644
@@ -38 +39 @@
-@@ -2605,16 +2605,16 @@ For example, to set the MAC address of a Link Bonding device (port 10) to 00:00:
+@@ -2437,16 +2437,16 @@ For example, to set the MAC address of a Link Bonding device (port 10) to 00:00:

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

* [dpdk-stable] patch 'net/bnxt: fix queue release' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (24 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'app/testpmd: fix bonding xmit balance policy command' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/bnxt: fix xstats by id' " luca.boccassi
                       ` (55 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f41c86a38298fb4cb16b7c7409e22ca33ba40cfe

Thanks.

Luca Boccassi

---
From f41c86a38298fb4cb16b7c7409e22ca33ba40cfe Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Tue, 20 Oct 2020 09:41:18 +0530
Subject: [PATCH] net/bnxt: fix queue release

[ upstream commit 97c3271781bf1094b0ab0235f472fb5a468b02d3 ]

Some of the ring related memory was not being freed in both the release
ops. Fix to free them now.
Add some more NULL ptr checks in the corresponding queue_release_mbufs()
and queue_release_op() respectively.
Also call queue_release_op() in the error path of the corresponding
queue_setup_op()

Fixes: 6133f207970c ("net/bnxt: add Rx queue create/destroy")
Fixes: 51c87ebafc7d ("net/bnxt: add Tx queue create/destroy")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxq.c | 42 +++++++++++++++++++++++--------------
 drivers/net/bnxt/bnxt_txq.c | 36 ++++++++++++++++++-------------
 2 files changed, 47 insertions(+), 31 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 682cdb91ad..bb0196670a 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -201,7 +201,7 @@ void bnxt_rx_queue_release_mbufs(struct bnxt_rx_queue *rxq)
 	struct bnxt_tpa_info *tpa_info;
 	uint16_t i;
 
-	if (!rxq)
+	if (!rxq || !rxq->rx_ring)
 		return;
 
 	rte_spinlock_lock(&rxq->lock);
@@ -266,12 +266,21 @@ void bnxt_rx_queue_release_op(void *rx_queue)
 		bnxt_rx_queue_release_mbufs(rxq);
 
 		/* Free RX ring hardware descriptors */
-		bnxt_free_ring(rxq->rx_ring->rx_ring_struct);
-		/* Free RX Agg ring hardware descriptors */
-		bnxt_free_ring(rxq->rx_ring->ag_ring_struct);
+		if (rxq->rx_ring) {
+			bnxt_free_ring(rxq->rx_ring->rx_ring_struct);
+			rte_free(rxq->rx_ring->rx_ring_struct);
+			/* Free RX Agg ring hardware descriptors */
+			bnxt_free_ring(rxq->rx_ring->ag_ring_struct);
+			rte_free(rxq->rx_ring->ag_ring_struct);
 
+			rte_free(rxq->rx_ring);
+		}
 		/* Free RX completion ring hardware descriptors */
-		bnxt_free_ring(rxq->cp_ring->cp_ring_struct);
+		if (rxq->cp_ring) {
+			bnxt_free_ring(rxq->cp_ring->cp_ring_struct);
+			rte_free(rxq->cp_ring->cp_ring_struct);
+			rte_free(rxq->cp_ring);
+		}
 
 		bnxt_free_rxq_stats(rxq);
 		rte_memzone_free(rxq->mz);
@@ -307,8 +316,7 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
 
 	if (!nb_desc || nb_desc > MAX_RX_DESC_CNT) {
 		PMD_DRV_LOG(ERR, "nb_desc %d is invalid\n", nb_desc);
-		rc = -EINVAL;
-		goto out;
+		return -EINVAL;
 	}
 
 	if (eth_dev->data->rx_queues) {
@@ -320,8 +328,7 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
 				 RTE_CACHE_LINE_SIZE, socket_id);
 	if (!rxq) {
 		PMD_DRV_LOG(ERR, "bnxt_rx_queue allocation failed!\n");
-		rc = -ENOMEM;
-		goto out;
+		return -ENOMEM;
 	}
 	rxq->bp = bp;
 	rxq->mb_pool = mp;
@@ -336,8 +343,11 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
 	PMD_DRV_LOG(DEBUG, "RX Buf MTU %d\n", eth_dev->data->mtu);
 
 	rc = bnxt_init_rx_ring_struct(rxq, socket_id);
-	if (rc)
-		goto out;
+	if (rc) {
+		PMD_DRV_LOG(ERR,
+			    "init_rx_ring_struct failed!\n");
+		goto err;
+	}
 
 	PMD_DRV_LOG(DEBUG, "RX Buf size is %d\n", rxq->rx_buf_size);
 	rxq->queue_id = queue_idx;
@@ -352,10 +362,8 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
 	if (bnxt_alloc_rings(bp, queue_idx, NULL, rxq, rxq->cp_ring, NULL,
 			     "rxr")) {
 		PMD_DRV_LOG(ERR,
-			"ring_dma_zone_reserve for rx_ring failed!\n");
-		bnxt_rx_queue_release_op(rxq);
-		rc = -ENOMEM;
-		goto out;
+			    "ring_dma_zone_reserve for rx_ring failed!\n");
+		goto err;
 	}
 	rte_atomic64_init(&rxq->rx_mbuf_alloc_fail);
 
@@ -379,7 +387,9 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
 	if (!queue_idx)
 		bnxt_mtu_set_op(eth_dev, eth_dev->data->mtu);
 
-out:
+	return 0;
+err:
+	bnxt_rx_queue_release_op(rxq);
 	return rc;
 }
 
diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c
index 2d7645eeb0..160e841576 100644
--- a/drivers/net/bnxt/bnxt_txq.c
+++ b/drivers/net/bnxt/bnxt_txq.c
@@ -27,7 +27,7 @@ static void bnxt_tx_queue_release_mbufs(struct bnxt_tx_queue *txq)
 	struct bnxt_sw_tx_bd *sw_ring;
 	uint16_t i;
 
-	if (!txq)
+	if (!txq || !txq->tx_ring)
 		return;
 
 	sw_ring = txq->tx_ring->tx_buf_ring;
@@ -62,10 +62,18 @@ void bnxt_tx_queue_release_op(void *tx_queue)
 
 		/* Free TX ring hardware descriptors */
 		bnxt_tx_queue_release_mbufs(txq);
-		bnxt_free_ring(txq->tx_ring->tx_ring_struct);
+		if (txq->tx_ring) {
+			bnxt_free_ring(txq->tx_ring->tx_ring_struct);
+			rte_free(txq->tx_ring->tx_ring_struct);
+			rte_free(txq->tx_ring);
+		}
 
 		/* Free TX completion ring hardware descriptors */
-		bnxt_free_ring(txq->cp_ring->cp_ring_struct);
+		if (txq->cp_ring) {
+			bnxt_free_ring(txq->cp_ring->cp_ring_struct);
+			rte_free(txq->cp_ring->cp_ring_struct);
+			rte_free(txq->cp_ring);
+		}
 
 		bnxt_free_txq_stats(txq);
 		rte_memzone_free(txq->mz);
@@ -99,8 +107,7 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
 
 	if (!nb_desc || nb_desc > MAX_TX_DESC_CNT) {
 		PMD_DRV_LOG(ERR, "nb_desc %d is invalid", nb_desc);
-		rc = -EINVAL;
-		goto out;
+		return -EINVAL;
 	}
 
 	if (eth_dev->data->tx_queues) {
@@ -114,8 +121,7 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
 				 RTE_CACHE_LINE_SIZE, socket_id);
 	if (!txq) {
 		PMD_DRV_LOG(ERR, "bnxt_tx_queue allocation failed!");
-		rc = -ENOMEM;
-		goto out;
+		return -ENOMEM;
 	}
 
 	txq->free = rte_zmalloc_socket(NULL,
@@ -123,9 +129,8 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
 				       RTE_CACHE_LINE_SIZE, socket_id);
 	if (!txq->free) {
 		PMD_DRV_LOG(ERR, "allocation of tx mbuf free array failed!");
-		rte_free(txq);
 		rc = -ENOMEM;
-		goto out;
+		goto err;
 	}
 	txq->bp = bp;
 	txq->nb_tx_desc = nb_desc;
@@ -134,7 +139,7 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
 
 	rc = bnxt_init_tx_ring_struct(txq, socket_id);
 	if (rc)
-		goto out;
+		goto err;
 
 	txq->queue_id = queue_idx;
 	txq->port_id = eth_dev->data->port_id;
@@ -143,16 +148,14 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
 	if (bnxt_alloc_rings(bp, queue_idx, txq, NULL, txq->cp_ring, NULL,
 			     "txr")) {
 		PMD_DRV_LOG(ERR, "ring_dma_zone_reserve for tx_ring failed!");
-		bnxt_tx_queue_release_op(txq);
 		rc = -ENOMEM;
-		goto out;
+		goto err;
 	}
 
 	if (bnxt_init_one_tx_ring(txq)) {
 		PMD_DRV_LOG(ERR, "bnxt_init_one_tx_ring failed!");
-		bnxt_tx_queue_release_op(txq);
 		rc = -ENOMEM;
-		goto out;
+		goto err;
 	}
 
 	eth_dev->data->tx_queues[queue_idx] = txq;
@@ -161,6 +164,9 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
 		txq->tx_started = false;
 	else
 		txq->tx_started = true;
-out:
+
+	return 0;
+err:
+	bnxt_tx_queue_release_op(txq);
 	return rc;
 }
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.305001249 +0000
+++ 0027-net-bnxt-fix-queue-release.patch	2020-11-09 18:40:11.127311220 +0000
@@ -1 +1 @@
-From 97c3271781bf1094b0ab0235f472fb5a468b02d3 Mon Sep 17 00:00:00 2001
+From f41c86a38298fb4cb16b7c7409e22ca33ba40cfe Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 97c3271781bf1094b0ab0235f472fb5a468b02d3 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 1003ca6410..78514143e5 100644
+index 682cdb91ad..bb0196670a 100644
@@ -28 +29 @@
-@@ -207,7 +207,7 @@ void bnxt_rx_queue_release_mbufs(struct bnxt_rx_queue *rxq)
+@@ -201,7 +201,7 @@ void bnxt_rx_queue_release_mbufs(struct bnxt_rx_queue *rxq)
@@ -37 +38 @@
-@@ -273,12 +273,21 @@ void bnxt_rx_queue_release_op(void *rx_queue)
+@@ -266,12 +266,21 @@ void bnxt_rx_queue_release_op(void *rx_queue)
@@ -63 +64 @@
-@@ -314,8 +323,7 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
+@@ -307,8 +316,7 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
@@ -65 +66 @@
- 	if (nb_desc < BNXT_MIN_RING_DESC || nb_desc > MAX_RX_DESC_CNT) {
+ 	if (!nb_desc || nb_desc > MAX_RX_DESC_CNT) {
@@ -73 +74 @@
-@@ -327,8 +335,7 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
+@@ -320,8 +328,7 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
@@ -83 +84 @@
-@@ -344,8 +351,11 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
+@@ -336,8 +343,11 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
@@ -97 +98 @@
-@@ -360,10 +370,8 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
+@@ -352,10 +362,8 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
@@ -110 +111 @@
-@@ -387,7 +395,9 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
+@@ -379,7 +387,9 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
@@ -122 +123 @@
-index c8d75ac951..c9792a2af2 100644
+index 2d7645eeb0..160e841576 100644
@@ -157 +158 @@
- 	if (nb_desc < BNXT_MIN_RING_DESC || nb_desc > MAX_TX_DESC_CNT) {
+ 	if (!nb_desc || nb_desc > MAX_TX_DESC_CNT) {
@@ -186 +187 @@
-@@ -138,7 +143,7 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
+@@ -134,7 +139,7 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
@@ -195 +196 @@
-@@ -147,16 +152,14 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
+@@ -143,16 +148,14 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
@@ -214 +215 @@
-@@ -165,6 +168,9 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
+@@ -161,6 +164,9 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev,

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

* [dpdk-stable] patch 'net/bnxt: fix xstats by id' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (25 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/bnxt: fix queue release' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/mlx5: fix xstats reset reinitialization' " luca.boccassi
                       ` (54 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f9f235f69970211bff39a39f6a7753f622d34bc1

Thanks.

Luca Boccassi

---
From f9f235f69970211bff39a39f6a7753f622d34bc1 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 16 Jun 2020 16:36:13 +0100
Subject: [PATCH] net/bnxt: fix xstats by id

[ upstream commit 0b42b92ae42953e6984622afe91c76a43b59ab69 ]

The xstat by id device operation seems wrong, it fills 'xstats' struct
via 'bnxt_dev_xstats_get_op()' call, but the retrieved values are not
transferred to user input 'values' array.

ethdev layer 'rte_eth_xstats_get_by_id()' &
'rte_eth_xstats_get_names_by_id' already provides "by id" support when
device operations are missing.
It is good for PMD to provide these device operations if it has a more
performant way to get by id. But current implementation in PMD already
does same thing with the ethdev APIs, so removing them provides same
functionality.

Fixes: 88920136688c ("net/bnxt: support xstats get by id")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c |  2 -
 drivers/net/bnxt/bnxt_stats.c  | 67 ----------------------------------
 2 files changed, 69 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 1b1f130ed3..65527a0637 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3811,8 +3811,6 @@ static const struct eth_dev_ops bnxt_dev_ops = {
 	.txq_info_get = bnxt_txq_info_get_op,
 	.dev_led_on = bnxt_dev_led_on_op,
 	.dev_led_off = bnxt_dev_led_off_op,
-	.xstats_get_by_id = bnxt_dev_xstats_get_by_id_op,
-	.xstats_get_names_by_id = bnxt_dev_xstats_get_names_by_id_op,
 	.rx_queue_count = bnxt_rx_queue_count_op,
 	.rx_descriptor_status = bnxt_rx_descriptor_status_op,
 	.tx_descriptor_status = bnxt_tx_descriptor_status_op,
diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index be5b514f49..84011fc3ea 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -617,70 +617,3 @@ int bnxt_dev_xstats_reset_op(struct rte_eth_dev *eth_dev)
 
 	return ret;
 }
-
-int bnxt_dev_xstats_get_by_id_op(struct rte_eth_dev *dev, const uint64_t *ids,
-		uint64_t *values, unsigned int limit)
-{
-	/* Account for the Tx drop pkts aka the Anti spoof counter */
-	const unsigned int stat_cnt = RTE_DIM(bnxt_rx_stats_strings) +
-				RTE_DIM(bnxt_tx_stats_strings) + 1 +
-				RTE_DIM(bnxt_rx_ext_stats_strings) +
-				RTE_DIM(bnxt_tx_ext_stats_strings);
-	struct bnxt *bp = dev->data->dev_private;
-	struct rte_eth_xstat xstats[stat_cnt];
-	uint64_t values_copy[stat_cnt];
-	uint16_t i;
-	int rc;
-
-	rc = is_bnxt_in_error(bp);
-	if (rc)
-		return rc;
-
-	if (!ids)
-		return bnxt_dev_xstats_get_op(dev, xstats, stat_cnt);
-
-	bnxt_dev_xstats_get_by_id_op(dev, NULL, values_copy, stat_cnt);
-	for (i = 0; i < limit; i++) {
-		if (ids[i] >= stat_cnt) {
-			PMD_DRV_LOG(ERR, "id value isn't valid");
-			return -EINVAL;
-		}
-		values[i] = values_copy[ids[i]];
-	}
-	return stat_cnt;
-}
-
-int bnxt_dev_xstats_get_names_by_id_op(struct rte_eth_dev *dev,
-				struct rte_eth_xstat_name *xstats_names,
-				const uint64_t *ids, unsigned int limit)
-{
-	/* Account for the Tx drop pkts aka the Anti spoof counter */
-	const unsigned int stat_cnt = RTE_DIM(bnxt_rx_stats_strings) +
-				RTE_DIM(bnxt_tx_stats_strings) + 1 +
-				RTE_DIM(bnxt_rx_ext_stats_strings) +
-				RTE_DIM(bnxt_tx_ext_stats_strings);
-	struct rte_eth_xstat_name xstats_names_copy[stat_cnt];
-	struct bnxt *bp = dev->data->dev_private;
-	uint16_t i;
-	int rc;
-
-	rc = is_bnxt_in_error(bp);
-	if (rc)
-		return rc;
-
-	if (!ids)
-		return bnxt_dev_xstats_get_names_op(dev, xstats_names,
-						    stat_cnt);
-	bnxt_dev_xstats_get_names_by_id_op(dev, xstats_names_copy, NULL,
-			stat_cnt);
-
-	for (i = 0; i < limit; i++) {
-		if (ids[i] >= stat_cnt) {
-			PMD_DRV_LOG(ERR, "id value isn't valid");
-			return -EINVAL;
-		}
-		strcpy(xstats_names[i].name,
-				xstats_names_copy[ids[i]].name);
-	}
-	return stat_cnt;
-}
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.339225409 +0000
+++ 0028-net-bnxt-fix-xstats-by-id.patch	2020-11-09 18:40:11.131311282 +0000
@@ -1 +1 @@
-From 0b42b92ae42953e6984622afe91c76a43b59ab69 Mon Sep 17 00:00:00 2001
+From f9f235f69970211bff39a39f6a7753f622d34bc1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0b42b92ae42953e6984622afe91c76a43b59ab69 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -25,2 +26,2 @@
- drivers/net/bnxt/bnxt_stats.c  | 69 ----------------------------------
- 2 files changed, 71 deletions(-)
+ drivers/net/bnxt/bnxt_stats.c  | 67 ----------------------------------
+ 2 files changed, 69 deletions(-)
@@ -29 +30 @@
-index f1350d39da..e2b66c4712 100644
+index 1b1f130ed3..65527a0637 100644
@@ -32,2 +33,2 @@
-@@ -4344,8 +4344,6 @@ static const struct eth_dev_ops bnxt_dev_ops = {
- 	.tx_burst_mode_get = bnxt_tx_burst_mode_get,
+@@ -3811,8 +3811,6 @@ static const struct eth_dev_ops bnxt_dev_ops = {
+ 	.txq_info_get = bnxt_txq_info_get_op,
@@ -38,3 +39,3 @@
- 	.rx_queue_start = bnxt_rx_queue_start,
- 	.rx_queue_stop = bnxt_rx_queue_stop,
- 	.tx_queue_start = bnxt_tx_queue_start,
+ 	.rx_queue_count = bnxt_rx_queue_count_op,
+ 	.rx_descriptor_status = bnxt_rx_descriptor_status_op,
+ 	.tx_descriptor_status = bnxt_tx_descriptor_status_op,
@@ -42 +43 @@
-index cb7756d54f..3c9715f5fa 100644
+index be5b514f49..84011fc3ea 100644
@@ -45 +46,2 @@
-@@ -828,75 +828,6 @@ int bnxt_dev_xstats_reset_op(struct rte_eth_dev *eth_dev)
+@@ -617,70 +617,3 @@ int bnxt_dev_xstats_reset_op(struct rte_eth_dev *eth_dev)
+ 
@@ -48 +50 @@
- 
+-
@@ -52 +54 @@
--	struct bnxt *bp = dev->data->dev_private;
+-	/* Account for the Tx drop pkts aka the Anti spoof counter */
@@ -54,2 +56 @@
--				RTE_DIM(bnxt_tx_stats_strings) +
--				RTE_DIM(bnxt_func_stats_strings) +
+-				RTE_DIM(bnxt_tx_stats_strings) + 1 +
@@ -57,2 +58,2 @@
--				RTE_DIM(bnxt_tx_ext_stats_strings) +
--				bnxt_flow_stats_cnt(bp);
+-				RTE_DIM(bnxt_tx_ext_stats_strings);
+-	struct bnxt *bp = dev->data->dev_private;
@@ -86 +87 @@
--	struct bnxt *bp = dev->data->dev_private;
+-	/* Account for the Tx drop pkts aka the Anti spoof counter */
@@ -88,2 +89 @@
--				RTE_DIM(bnxt_tx_stats_strings) +
--				RTE_DIM(bnxt_func_stats_strings) +
+-				RTE_DIM(bnxt_tx_stats_strings) + 1 +
@@ -91,2 +91 @@
--				RTE_DIM(bnxt_tx_ext_stats_strings) +
--				bnxt_flow_stats_cnt(bp);
+-				RTE_DIM(bnxt_tx_ext_stats_strings);
@@ -93,0 +93 @@
+-	struct bnxt *bp = dev->data->dev_private;
@@ -117,4 +116,0 @@
--
- /* Update the input context memory with the flow counter IDs
-  * of the flows that we are interested in.
-  * Also, update the output tables with the current local values

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

* [dpdk-stable] patch 'net/mlx5: fix xstats reset reinitialization' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (26 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/bnxt: fix xstats by id' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/mlx5: fix port shared data reference count' " luca.boccassi
                       ` (53 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Shiri Kuzin; +Cc: Ralf Hoffmann, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d0f1f4bd45a3e2ea9490ea49d6ec8a0373ab21b5

Thanks.

Luca Boccassi

---
From d0f1f4bd45a3e2ea9490ea49d6ec8a0373ab21b5 Mon Sep 17 00:00:00 2001
From: Shiri Kuzin <shirik@nvidia.com>
Date: Mon, 19 Oct 2020 09:36:50 +0300
Subject: [PATCH] net/mlx5: fix xstats reset reinitialization

[ upstream commit 42dcd453d9b63841a5460a6ca3872eb7648d73bd ]

The mlx5_xstats_reset clears the device extended statistics.
In this function the driver may reinitialize the structures
that are used to read device counters.

In case of reinitialization, the number of counters may
change, which wouldn't be taken into account by the
reset API callback and can cause a segmentation fault.

This issue is fixed by allocating the counters size after
the reinitialization.

Fixes: a4193ae3bc4f ("net/mlx5: support extended statistics")

Reported-by: Ralf Hoffmann <ralf.hoffmann@allegro-packets.com>
Signed-off-by: Shiri Kuzin <shirik@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_stats.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c
index f3ec9543fe..ccdcdcfff6 100644
--- a/drivers/net/mlx5/mlx5_stats.c
+++ b/drivers/net/mlx5/mlx5_stats.c
@@ -536,8 +536,7 @@ mlx5_xstats_reset(struct rte_eth_dev *dev)
 	struct mlx5_xstats_ctrl *xstats_ctrl = &priv->xstats_ctrl;
 	int stats_n;
 	unsigned int i;
-	unsigned int n = xstats_ctrl->mlx5_stats_n;
-	uint64_t counters[n];
+	uint64_t *counters;
 	int ret;
 
 	stats_n = mlx5_ethtool_get_stats_n(dev);
@@ -548,17 +547,26 @@ mlx5_xstats_reset(struct rte_eth_dev *dev)
 	}
 	if (xstats_ctrl->stats_n != stats_n)
 		mlx5_stats_init(dev);
+	counters =  malloc(sizeof(*counters) * xstats_ctrl->mlx5_stats_n);
+	if (!counters) {
+		DRV_LOG(WARNING, "port %u unable to allocate memory for xstats "
+				"counters",
+		     dev->data->port_id);
+		rte_errno = ENOMEM;
+		return -rte_errno;
+	}
 	ret = mlx5_read_dev_counters(dev, counters);
 	if (ret) {
 		DRV_LOG(ERR, "port %u cannot read device counters: %s",
 			dev->data->port_id, strerror(rte_errno));
+		free(counters);
 		return ret;
 	}
-	for (i = 0; i != n; ++i) {
+	for (i = 0; i != xstats_ctrl->mlx5_stats_n; ++i) {
 		xstats_ctrl->base[i] = counters[i];
 		xstats_ctrl->hw_stats[i] = 0;
 	}
-
+	free(counters);
 	return 0;
 }
 
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.380967135 +0000
+++ 0029-net-mlx5-fix-xstats-reset-reinitialization.patch	2020-11-09 18:40:11.131311282 +0000
@@ -1 +1 @@
-From 42dcd453d9b63841a5460a6ca3872eb7648d73bd Mon Sep 17 00:00:00 2001
+From d0f1f4bd45a3e2ea9490ea49d6ec8a0373ab21b5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 42dcd453d9b63841a5460a6ca3872eb7648d73bd ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -24,2 +25,2 @@
- drivers/net/mlx5/mlx5_stats.c | 18 +++++++++++++++---
- 1 file changed, 15 insertions(+), 3 deletions(-)
+ drivers/net/mlx5/mlx5_stats.c | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
@@ -28 +29 @@
-index e30542e984..82d4d4a745 100644
+index f3ec9543fe..ccdcdcfff6 100644
@@ -31,9 +32 @@
-@@ -17,6 +17,7 @@
- #include "mlx5_defs.h"
- #include "mlx5.h"
- #include "mlx5_rxtx.h"
-+#include "mlx5_malloc.h"
- 
- /**
-  * DPDK callback to get extended device statistics.
-@@ -216,8 +217,7 @@ mlx5_xstats_reset(struct rte_eth_dev *dev)
+@@ -536,8 +536,7 @@ mlx5_xstats_reset(struct rte_eth_dev *dev)
@@ -48,2 +41,2 @@
- 	stats_n = mlx5_os_get_stats_n(dev);
-@@ -228,17 +228,29 @@ mlx5_xstats_reset(struct rte_eth_dev *dev)
+ 	stats_n = mlx5_ethtool_get_stats_n(dev);
+@@ -548,17 +547,26 @@ mlx5_xstats_reset(struct rte_eth_dev *dev)
@@ -52,4 +45,2 @@
- 		mlx5_os_stats_init(dev);
-+	counters =  mlx5_malloc(MLX5_MEM_SYS, sizeof(*counters) *
-+			xstats_ctrl->mlx5_stats_n, 0,
-+			SOCKET_ID_ANY);
+ 		mlx5_stats_init(dev);
++	counters =  malloc(sizeof(*counters) * xstats_ctrl->mlx5_stats_n);
@@ -63 +54 @@
- 	ret = mlx5_os_read_dev_counters(dev, counters);
+ 	ret = mlx5_read_dev_counters(dev, counters);
@@ -67 +58 @@
-+		mlx5_free(counters);
++		free(counters);
@@ -75,2 +66,2 @@
- 	mlx5_txpp_xstats_reset(dev);
-+	mlx5_free(counters);
+-
++	free(counters);

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

* [dpdk-stable] patch 'net/mlx5: fix port shared data reference count' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (27 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/mlx5: fix xstats reset reinitialization' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/i40e: fix virtual channel conflict' " luca.boccassi
                       ` (52 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Xueming Li; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/54a97855544b7f8bbed432e1bf7566e884957077

Thanks.

Luca Boccassi

---
From 54a97855544b7f8bbed432e1bf7566e884957077 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Wed, 21 Oct 2020 11:15:23 +0000
Subject: [PATCH] net/mlx5: fix port shared data reference count

[ upstream commit 16dbba257c9ceccb30577d189dc6ca7e1042552f ]

When probe a representor, tag cache hash table and modification cache
hash table allocated memory upon each port, overwrote previous existing
cache in shared context data.

This patch moves reference check of shared data prior to hash table
allocation to avoid such issue.

Fixes: 6801116688fe ("net/mlx5: fix multiple flow table hash list")
Fixes: 1ef4cdef2682 ("net/mlx5: fix flow tag hash list conversion")

Acked-by: Matan Azrad <matan@nvidia.com>
Signed-off-by: Xueming Li <xuemingl@nvidia.com>
---
 drivers/net/mlx5/mlx5.c         | 30 ++++++++----------------------
 drivers/net/mlx5/mlx5.h         |  2 --
 drivers/net/mlx5/mlx5_flow_dv.c |  4 ++--
 3 files changed, 10 insertions(+), 26 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 88ed5ffa5c..f2327903eb 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -951,13 +951,12 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
 {
 	struct mlx5_ibv_shared *sh = priv->sh;
 	char s[MLX5_HLIST_NAMESIZE];
-	int err = 0;
+	int err;
 
-	if (!sh->flow_tbls)
-		err = mlx5_alloc_table_hash_list(priv);
-	else
-		DRV_LOG(DEBUG, "sh->flow_tbls[%p] already created, reuse",
-			(void *)sh->flow_tbls);
+	assert(sh && sh->refcnt);
+	if (sh->refcnt > 1)
+		return 0;
+	err = mlx5_alloc_table_hash_list(priv);
 	if (err)
 		return err;
 	/* Create tags hash list table. */
@@ -971,12 +970,6 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
 #ifdef HAVE_MLX5DV_DR
 	void *domain;
 
-	if (sh->dv_refcnt) {
-		/* Shared DV/DR structures is already initialized. */
-		sh->dv_refcnt++;
-		priv->dr_shared = 1;
-		return 0;
-	}
 	/* Reference counter is zero, we should initialize structures. */
 	domain = mlx5_glue->dr_create_domain(sh->ctx,
 					     MLX5DV_DR_DOMAIN_TYPE_NIC_RX);
@@ -1010,8 +1003,6 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
 #endif
 	sh->pop_vlan_action = mlx5_glue->dr_create_flow_action_pop_vlan();
 #endif /* HAVE_MLX5DV_DR */
-	sh->dv_refcnt++;
-	priv->dr_shared = 1;
 	return 0;
 error:
 	/* Rollback the created objects. */
@@ -1053,17 +1044,12 @@ error:
 static void
 mlx5_free_shared_dr(struct mlx5_priv *priv)
 {
-	struct mlx5_ibv_shared *sh;
+	struct mlx5_ibv_shared *sh = priv->sh;
 
-	if (!priv->dr_shared)
+	assert(sh && sh->dv_refcnt);
+	if (sh->refcnt > 1)
 		return;
-	priv->dr_shared = 0;
-	sh = priv->sh;
-	assert(sh);
 #ifdef HAVE_MLX5DV_DR
-	assert(sh->dv_refcnt);
-	if (sh->dv_refcnt && --sh->dv_refcnt)
-		return;
 	if (sh->rx_domain) {
 		mlx5_glue->dr_destroy_domain(sh->rx_domain);
 		sh->rx_domain = NULL;
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index fd66aaf318..2f76d162cf 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -669,7 +669,6 @@ struct mlx5_ibv_shared {
 	uint32_t dv_meta_mask; /* flow META metadata supported mask. */
 	uint32_t dv_mark_mask; /* flow MARK metadata supported mask. */
 	uint32_t dv_regc0_mask; /* available bits of metatada reg_c[0]. */
-	uint32_t dv_refcnt; /* DV/DR data reference counter. */
 	void *fdb_domain; /* FDB Direct Rules name space handle. */
 	void *rx_domain; /* RX Direct Rules name space handle. */
 	void *tx_domain; /* TX Direct Rules name space handle. */
@@ -731,7 +730,6 @@ struct mlx5_priv {
 	unsigned int isolated:1; /* Whether isolated mode is enabled. */
 	unsigned int representor:1; /* Device is a port representor. */
 	unsigned int master:1; /* Device is a E-Switch master. */
-	unsigned int dr_shared:1; /* DV/DR data is shared. */
 	unsigned int counter_fallback:1; /* Use counter fallback management. */
 	unsigned int mtr_en:1; /* Whether support meter. */
 	unsigned int mtr_reg_share:1; /* Whether support meter REG_C share. */
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 60d6af04e2..4ba1df7027 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -280,7 +280,7 @@ flow_dv_shared_lock(struct rte_eth_dev *dev)
 	struct mlx5_priv *priv = dev->data->dev_private;
 	struct mlx5_ibv_shared *sh = priv->sh;
 
-	if (sh->dv_refcnt > 1) {
+	if (sh->refcnt > 1) {
 		int ret;
 
 		ret = pthread_mutex_lock(&sh->dv_mutex);
@@ -295,7 +295,7 @@ flow_dv_shared_unlock(struct rte_eth_dev *dev)
 	struct mlx5_priv *priv = dev->data->dev_private;
 	struct mlx5_ibv_shared *sh = priv->sh;
 
-	if (sh->dv_refcnt > 1) {
+	if (sh->refcnt > 1) {
 		int ret;
 
 		ret = pthread_mutex_unlock(&sh->dv_mutex);
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.417235841 +0000
+++ 0030-net-mlx5-fix-port-shared-data-reference-count.patch	2020-11-09 18:40:11.143311469 +0000
@@ -1 +1 @@
-From 16dbba257c9ceccb30577d189dc6ca7e1042552f Mon Sep 17 00:00:00 2001
+From 54a97855544b7f8bbed432e1bf7566e884957077 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 16dbba257c9ceccb30577d189dc6ca7e1042552f ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -20,3 +21,3 @@
- drivers/net/mlx5/linux/mlx5_os.c | 30 ++++++++----------------------
- drivers/net/mlx5/mlx5.h          |  2 --
- drivers/net/mlx5/mlx5_flow_dv.c  |  4 ++--
+ drivers/net/mlx5/mlx5.c         | 30 ++++++++----------------------
+ drivers/net/mlx5/mlx5.h         |  2 --
+ drivers/net/mlx5/mlx5_flow_dv.c |  4 ++--
@@ -25,5 +26,5 @@
-diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
-index 457008ef9e..40f9446d43 100644
---- a/drivers/net/mlx5/linux/mlx5_os.c
-+++ b/drivers/net/mlx5/linux/mlx5_os.c
-@@ -226,13 +226,12 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
+diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
+index 88ed5ffa5c..f2327903eb 100644
+--- a/drivers/net/mlx5/mlx5.c
++++ b/drivers/net/mlx5/mlx5.c
+@@ -951,13 +951,12 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
@@ -31 +32 @@
- 	struct mlx5_dev_ctx_shared *sh = priv->sh;
+ 	struct mlx5_ibv_shared *sh = priv->sh;
@@ -39 +40 @@
--		DRV_LOG(DEBUG, "sh->flow_tbls[%p] already created, reuse\n",
+-		DRV_LOG(DEBUG, "sh->flow_tbls[%p] already created, reuse",
@@ -41 +42 @@
-+	MLX5_ASSERT(sh && sh->refcnt);
++	assert(sh && sh->refcnt);
@@ -48 +49 @@
-@@ -261,12 +260,6 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
+@@ -971,12 +970,6 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
@@ -61,2 +62,2 @@
-@@ -306,8 +299,6 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
- 	}
+@@ -1010,8 +1003,6 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
+ #endif
@@ -70,3 +71,3 @@
-@@ -357,17 +348,12 @@ error:
- void
- mlx5_os_free_shared_dr(struct mlx5_priv *priv)
+@@ -1053,17 +1044,12 @@ error:
+ static void
+ mlx5_free_shared_dr(struct mlx5_priv *priv)
@@ -74,2 +75,2 @@
--	struct mlx5_dev_ctx_shared *sh;
-+	struct mlx5_dev_ctx_shared *sh = priv->sh;
+-	struct mlx5_ibv_shared *sh;
++	struct mlx5_ibv_shared *sh = priv->sh;
@@ -78 +79 @@
-+	MLX5_ASSERT(sh && sh->refcnt);
++	assert(sh && sh->dv_refcnt);
@@ -83 +84 @@
--	MLX5_ASSERT(sh);
+-	assert(sh);
@@ -85 +86 @@
--	MLX5_ASSERT(sh->dv_refcnt);
+-	assert(sh->dv_refcnt);
@@ -92 +93 @@
-index fa69c66137..c9d5d71630 100644
+index fd66aaf318..2f76d162cf 100644
@@ -95 +96 @@
-@@ -635,7 +635,6 @@ struct mlx5_dev_ctx_shared {
+@@ -669,7 +669,6 @@ struct mlx5_ibv_shared {
@@ -103 +104 @@
-@@ -823,7 +822,6 @@ struct mlx5_priv {
+@@ -731,7 +730,6 @@ struct mlx5_priv {
@@ -108 +109 @@
- 	unsigned int txpp_en:1; /* Tx packet pacing enabled. */
+ 	unsigned int counter_fallback:1; /* Use counter fallback management. */
@@ -112 +113 @@
-index 49d96362f8..15cd34e331 100644
+index 60d6af04e2..4ba1df7027 100644
@@ -115 +116 @@
-@@ -293,7 +293,7 @@ flow_dv_shared_lock(struct rte_eth_dev *dev)
+@@ -280,7 +280,7 @@ flow_dv_shared_lock(struct rte_eth_dev *dev)
@@ -117 +118 @@
- 	struct mlx5_dev_ctx_shared *sh = priv->sh;
+ 	struct mlx5_ibv_shared *sh = priv->sh;
@@ -124 +125 @@
-@@ -308,7 +308,7 @@ flow_dv_shared_unlock(struct rte_eth_dev *dev)
+@@ -295,7 +295,7 @@ flow_dv_shared_unlock(struct rte_eth_dev *dev)
@@ -126 +127 @@
- 	struct mlx5_dev_ctx_shared *sh = priv->sh;
+ 	struct mlx5_ibv_shared *sh = priv->sh;

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

* [dpdk-stable] patch 'net/i40e: fix virtual channel conflict' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (28 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/mlx5: fix port shared data reference count' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/ixgbe: check switch domain allocation result' " luca.boccassi
                       ` (51 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Yuying Zhang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/89efff2eebdbce1f7df307e92cc1dd3c9fe3d1a6

Thanks.

Luca Boccassi

---
From 89efff2eebdbce1f7df307e92cc1dd3c9fe3d1a6 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 1cd75b4366..8668dedf9d 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -1060,6 +1060,7 @@ struct i40e_vf {
 	bool promisc_unicast_enabled;
 	bool promisc_multicast_enabled;
 
+	rte_spinlock_t cmd_send_lock;
 	uint32_t version_major; /* Major version number */
 	uint32_t version_minor; /* Minor version number */
 	uint16_t promisc_flags; /* Promiscuous setting */
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 9feed6222e..4cdffe9127 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -317,7 +317,7 @@ _atomic_set_cmd(struct i40e_vf *vf, enum virtchnl_ops ops)
 #define ASQ_DELAY_MS  10
 
 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);
 	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
@@ -408,6 +408,19 @@ i40evf_execute_vf_cmd(struct rte_eth_dev *dev, struct vf_cmd_info *args)
 	return err | vf->cmd_retval;
 }
 
+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
  */
@@ -1224,6 +1237,7 @@ 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) {
 		PMD_INIT_LOG(ERR, "set_mac_type failed: %d", err);
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.466735995 +0000
+++ 0031-net-i40e-fix-virtual-channel-conflict.patch	2020-11-09 18:40:11.147311531 +0000
@@ -1 +1 @@
-From 99e47bbe4c074c879bbe5d2c316754859fa00912 Mon Sep 17 00:00:00 2001
+From 89efff2eebdbce1f7df307e92cc1dd3c9fe3d1a6 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 1cd75b4366..8668dedf9d 100644
@@ -25 +26 @@
-@@ -1209,6 +1209,7 @@ struct i40e_vf {
+@@ -1060,6 +1060,7 @@ struct i40e_vf {
@@ -34 +35 @@
-index 53154c3ef3..6e6eef5a6a 100644
+index 9feed6222e..4cdffe9127 100644
@@ -37 +38 @@
-@@ -314,7 +314,7 @@ _atomic_set_cmd(struct i40e_vf *vf, enum virtchnl_ops ops)
+@@ -317,7 +317,7 @@ _atomic_set_cmd(struct i40e_vf *vf, enum virtchnl_ops ops)
@@ -46 +47 @@
-@@ -405,6 +405,19 @@ i40evf_execute_vf_cmd(struct rte_eth_dev *dev, struct vf_cmd_info *args)
+@@ -408,6 +408,19 @@ i40evf_execute_vf_cmd(struct rte_eth_dev *dev, struct vf_cmd_info *args)
@@ -66 +67 @@
-@@ -1246,6 +1259,7 @@ i40evf_init_vf(struct rte_eth_dev *dev)
+@@ -1224,6 +1237,7 @@ i40evf_init_vf(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/ixgbe: check switch domain allocation result' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (29 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/i40e: fix virtual channel conflict' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/i40e: fix QinQ flow pattern to allow non full mask' " luca.boccassi
                       ` (50 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Conor Walsh; +Cc: Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/cb799a36c2f214d601d525209348e992c45e1083

Thanks.

Luca Boccassi

---
From cb799a36c2f214d601d525209348e992c45e1083 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 768183e9cb..de528d242b 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1095,7 +1095,7 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 		IXGBE_DEV_PRIVATE_TO_BW_CONF(eth_dev->data->dev_private);
 	uint32_t ctrl_ext;
 	uint16_t csum;
-	int diag, i;
+	int diag, i, ret;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -1274,7 +1274,14 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 	memset(hwstrip, 0, sizeof(*hwstrip));
 
 	/* 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);
 	/* let hardware know driver is loaded */
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index 0334c226be..edb66f8258 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -712,7 +712,7 @@ 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 d0d85e1386..ca30be71eb 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -66,7 +66,7 @@ ixgbe_mb_intr_setup(struct rte_eth_dev *dev)
 	return 0;
 }
 
-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 =
 		IXGBE_DEV_PRIVATE_TO_P_VFDATA(eth_dev->data->dev_private);
@@ -78,19 +78,27 @@ void ixgbe_pf_host_init(struct rte_eth_dev *eth_dev)
 		IXGBE_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
 	uint16_t vf_num;
 	uint8_t nb_queue;
+	int ret = 0;
 
 	PMD_INIT_FUNC_TRACE();
 
 	RTE_ETH_DEV_SRIOV(eth_dev).active = 0;
 	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);
 	if (*vfinfo == NULL)
 		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));
 	memset(uta_info, 0, sizeof(struct ixgbe_uta_info));
@@ -118,6 +126,8 @@ void ixgbe_pf_host_init(struct rte_eth_dev *eth_dev)
 
 	/* set mb interrupt mask */
 	ixgbe_mb_intr_setup(eth_dev);
+
+	return ret;
 }
 
 void ixgbe_pf_host_uninit(struct rte_eth_dev *eth_dev)
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.504212405 +0000
+++ 0032-net-ixgbe-check-switch-domain-allocation-result.patch	2020-11-09 18:40:11.155311656 +0000
@@ -1 +1 @@
-From c2c523189634c54cb99ce452a14c46d02cc4d2de Mon Sep 17 00:00:00 2001
+From cb799a36c2f214d601d525209348e992c45e1083 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 768183e9cb..de528d242b 100644
@@ -28 +29 @@
-@@ -1077,7 +1077,7 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -1095,7 +1095,7 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -37 +38 @@
-@@ -1256,7 +1256,14 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
+@@ -1274,7 +1274,14 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
@@ -54 +55 @@
-index 33905f7136..0132fb8db7 100644
+index 0334c226be..edb66f8258 100644
@@ -57 +58 @@
-@@ -717,7 +717,7 @@ void ixgbe_vlan_hw_filter_disable(struct rte_eth_dev *dev);
+@@ -712,7 +712,7 @@ void ixgbe_vlan_hw_filter_disable(struct rte_eth_dev *dev);
@@ -67 +68 @@
-index ed5f96b1a4..4e25b1e72e 100644
+index d0d85e1386..ca30be71eb 100644

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

* [dpdk-stable] patch 'net/i40e: fix QinQ flow pattern to allow non full mask' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (30 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/ixgbe: check switch domain allocation result' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/ixgbe: fix vector Rx' " luca.boccassi
                       ` (49 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Padraig Connolly; +Cc: Bernard Iremonger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6955f4bf01ca00b656ee38260abe5e9978ed4605

Thanks.

Luca Boccassi

---
From 6955f4bf01ca00b656ee38260abe5e9978ed4605 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 11e0e24782..7fe22e3007 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -4178,14 +4178,9 @@ 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,
 					   RTE_FLOW_ERROR_TYPE_ITEM,
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.546816862 +0000
+++ 0033-net-i40e-fix-QinQ-flow-pattern-to-allow-non-full-mas.patch	2020-11-09 18:40:11.155311656 +0000
@@ -1 +1 @@
-From ff0df4e134cc6efe75e1ed103b2c7b316b8269e2 Mon Sep 17 00:00:00 2001
+From 6955f4bf01ca00b656ee38260abe5e9978ed4605 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 11e0e24782..7fe22e3007 100644
@@ -24 +25 @@
-@@ -4649,14 +4649,9 @@ i40e_flow_parse_qinq_pattern(__rte_unused struct rte_eth_dev *dev,
+@@ -4178,14 +4178,9 @@ i40e_flow_parse_qinq_pattern(__rte_unused struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/ixgbe: fix vector Rx' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (31 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/i40e: fix QinQ flow pattern to allow non full mask' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/i40e: " luca.boccassi
                       ` (48 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Jeff Guo; +Cc: Feifei Wang, Morten Brørup, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/bf5bfe91da381ab0443ca54a66b805223bd54c72

Thanks.

Luca Boccassi

---
From bf5bfe91da381ab0443ca54a66b805223bd54c72 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 27ff535709..b254fb0023 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c
@@ -130,17 +130,6 @@ desc_to_olflags_v(uint8x16x2_t sterr_tmp1, uint8x16x2_t sterr_tmp2,
 	rx_pkts[3]->ol_flags = vol.e[3];
 }
 
-/*
- * 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_EOP_MASK	0x02020202
 #define IXGBE_UINT8_BIT			(CHAR_BIT * sizeof(uint8_t))
 
@@ -206,6 +195,13 @@ desc_to_ptype_v(uint64x2_t descs[4], uint16_t pkt_type_mask,
 				vgetq_lane_u32(tunnel_check, 3));
 }
 
+/**
+ * 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,
 		   uint16_t nb_pkts, uint8_t *split_packet)
@@ -226,9 +222,6 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 	uint16x8_t crc_adjust = {0, 0, rxq->crc_len, 0,
 				 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);
 
@@ -382,13 +375,11 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 	return nb_pkts_recd;
 }
 
-/*
+/**
  * 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
  */
@@ -399,19 +390,17 @@ ixgbe_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	return _recv_raw_pkts_vec(rx_queue, rx_pkts, nb_pkts, NULL);
 }
 
-/*
+/**
  * vPMD receive routine that reassembles scattered packets
  *
  * Notice:
  * - 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;
 	uint8_t split_flags[RTE_IXGBE_MAX_RX_BURST] = {0};
@@ -443,6 +432,32 @@ ixgbe_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 		&split_flags[i]);
 }
 
+/**
+ * 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,
 		struct rte_mbuf *pkt, uint64_t flags)
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
@@ -302,13 +302,11 @@ desc_to_ptype_v(__m128i descs[4], uint16_t pkt_type_mask,
 		get_packet_type(3, pkt_info, etqf_check, tunnel_check);
 }
 
-/*
+/**
  * 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
  */
 static inline uint16_t
@@ -344,9 +342,6 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 	__m128i mbuf_init;
 	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);
 
@@ -556,13 +551,11 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 	return nb_pkts_recd;
 }
 
-/*
+/**
  * 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
  */
 uint16_t
@@ -572,18 +565,16 @@ ixgbe_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	return _recv_raw_pkts_vec(rx_queue, rx_pkts, nb_pkts, NULL);
 }
 
-/*
+/**
  * 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;
 	uint8_t split_flags[RTE_IXGBE_MAX_RX_BURST] = {0};
@@ -615,6 +606,32 @@ ixgbe_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 		&split_flags[i]);
 }
 
+/**
+ * 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,
 		struct rte_mbuf *pkt, uint64_t flags)
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.584764493 +0000
+++ 0034-net-ixgbe-fix-vector-Rx.patch	2020-11-09 18:40:11.159311718 +0000
@@ -1 +1 @@
-From 5a3cca342417f7d4be4ac4b6225ca509617777c4 Mon Sep 17 00:00:00 2001
+From bf5bfe91da381ab0443ca54a66b805223bd54c72 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 27ff535709..b254fb0023 100644
@@ -147 +148 @@
-index 586a261808..90c076825a 100644
+index 599ba30e51..03eacfd86b 100644

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

* [dpdk-stable] patch 'net/i40e: fix vector Rx' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (32 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/ixgbe: fix vector Rx' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/ice: " luca.boccassi
                       ` (47 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Jeff Guo; +Cc: Morten Brørup, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/74ae68fa24100d7b136bd0eed320f95511505265

Thanks.

Luca Boccassi

---
From 74ae68fa24100d7b136bd0eed320f95511505265 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 5406828afb..39f4d60ca8 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_altivec.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_altivec.c
@@ -188,11 +188,13 @@ desc_to_ptype_v(vector unsigned long descs[4], struct rte_mbuf **rx_pkts,
 		ptype_tbl[(*(vector unsigned char *)&ptype1)[8]];
 }
 
- /* 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,
 		   uint16_t nb_pkts, uint8_t *split_packet)
@@ -214,9 +216,6 @@ _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);
 
@@ -459,15 +458,15 @@ i40e_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	return _recv_raw_pkts_vec(rx_queue, rx_pkts, nb_pkts, NULL);
 }
 
- /* 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;
 	uint8_t split_flags[RTE_I40E_VPMD_RX_BURST] = {0};
@@ -500,6 +499,32 @@ i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 		&split_flags[i]);
 }
 
+/**
+ * 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,
 	struct rte_mbuf *pkt, uint64_t flags)
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
@@ -187,11 +187,12 @@ 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
 _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
@@ -229,9 +230,6 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 		0, 0, 0       /* ignore non-length fields */
 		};
 
-	/* 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);
 
@@ -438,15 +436,15 @@ i40e_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	return _recv_raw_pkts_vec(rx_queue, rx_pkts, nb_pkts, NULL);
 }
 
- /* 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)
 {
 
 	struct i40e_rx_queue *rxq = rx_queue;
@@ -481,6 +479,32 @@ i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 		&split_flags[i]);
 }
 
+/**
+ * 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,
 		struct rte_mbuf *pkt, uint64_t flags)
diff --git a/drivers/net/i40e/i40e_rxtx_vec_sse.c b/drivers/net/i40e/i40e_rxtx_vec_sse.c
index 6ab0bb0d32..5a009146f3 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_sse.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_sse.c
@@ -342,11 +342,12 @@ desc_to_ptype_v(__m128i descs[4], struct rte_mbuf **rx_pkts,
 	rx_pkts[3]->packet_type = ptype_tbl[_mm_extract_epi8(ptype1, 8)];
 }
 
- /*
+/**
+ * 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
 _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
@@ -378,9 +379,6 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 			offsetof(struct rte_mbuf, rx_descriptor_fields1) + 8);
 	__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);
 
@@ -605,15 +603,15 @@ i40e_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	return _recv_raw_pkts_vec(rx_queue, rx_pkts, nb_pkts, NULL);
 }
 
- /* 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)
 {
 
 	struct i40e_rx_queue *rxq = rx_queue;
@@ -648,6 +646,32 @@ i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 		&split_flags[i]);
 }
 
+/**
+ * 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,
 		struct rte_mbuf *pkt, uint64_t flags)
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.618947583 +0000
+++ 0035-net-i40e-fix-vector-Rx.patch	2020-11-09 18:40:11.159311718 +0000
@@ -1 +1 @@
-From 9e27f00f3a61939e02429d5782ca10bc4cd5e315 Mon Sep 17 00:00:00 2001
+From 74ae68fa24100d7b136bd0eed320f95511505265 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 5406828afb..39f4d60ca8 100644
@@ -121 +122 @@
-index 543ecadb07..f094de69ae 100644
+index 56fc355ee2..5cac418cf0 100644
@@ -124 +125 @@
-@@ -187,11 +187,12 @@ desc_to_ptype_v(uint64x2_t descs[4], struct rte_mbuf **__rte_restrict rx_pkts,
+@@ -187,11 +187,12 @@ desc_to_ptype_v(uint64x2_t descs[4], struct rte_mbuf **rx_pkts,
@@ -139,2 +140,2 @@
- _recv_raw_pkts_vec(struct i40e_rx_queue *__rte_restrict rxq,
-@@ -230,9 +231,6 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *__rte_restrict rxq,
+ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
+@@ -229,9 +230,6 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
@@ -150 +151 @@
-@@ -439,15 +437,15 @@ i40e_recv_pkts_vec(void *__rte_restrict rx_queue,
+@@ -438,15 +436,15 @@ i40e_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -172 +173 @@
-@@ -482,6 +480,32 @@ i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -481,6 +479,32 @@ i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -206 +207 @@
-index 240ce478ab..4b2b6a28fc 100644
+index 6ab0bb0d32..5a009146f3 100644

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

* [dpdk-stable] patch 'net/ice: fix vector Rx' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (33 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/i40e: " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/fm10k: " luca.boccassi
                       ` (46 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Jeff Guo; +Cc: Yingya Han, Morten Brørup, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2bce196481e8f3757462716c14b4f270a64b0ee5

Thanks.

Luca Boccassi

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

[ upstream commit 7d911640b0a739f55d8fc40a625e0bc8f0831805 ]

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: c68a52b8b38c ("net/ice: support vector SSE in Rx")

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Tested-by: Yingya Han <yingyax.han@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx_vec_sse.c | 46 +++++++++++++++++++++++-------
 1 file changed, 35 insertions(+), 11 deletions(-)

diff --git a/drivers/net/ice/ice_rxtx_vec_sse.c b/drivers/net/ice/ice_rxtx_vec_sse.c
index 70b43e680b..cfa65aae91 100644
--- a/drivers/net/ice/ice_rxtx_vec_sse.c
+++ b/drivers/net/ice/ice_rxtx_vec_sse.c
@@ -205,10 +205,11 @@ ice_rx_desc_to_ptype_v(__m128i descs[4], struct rte_mbuf **rx_pkts,
 }
 
 /**
+ * vPMD raw receive routine, only accept(nb_pkts >= ICE_DESCS_PER_LOOP)
+ *
  * Notice:
  * - nb_pkts < ICE_DESCS_PER_LOOP, just return no packet
- * - nb_pkts > ICE_VPMD_RX_BURST, only scan ICE_VPMD_RX_BURST
- *   numbers of DD bits
+ * - floor align nb_pkts to a ICE_DESCS_PER_LOOP power-of-two
  */
 static inline uint16_t
 _ice_recv_raw_pkts_vec(struct ice_rx_queue *rxq, struct rte_mbuf **rx_pkts,
@@ -264,9 +265,6 @@ _ice_recv_raw_pkts_vec(struct ice_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 	const __m128i eop_check = _mm_set_epi64x(0x0000000200000002LL,
 						 0x0000000200000002LL);
 
-	/* nb_pkts shall be less equal than ICE_MAX_RX_BURST */
-	nb_pkts = RTE_MIN(nb_pkts, ICE_MAX_RX_BURST);
-
 	/* nb_pkts has to be floor-aligned to ICE_DESCS_PER_LOOP */
 	nb_pkts = RTE_ALIGN_FLOOR(nb_pkts, ICE_DESCS_PER_LOOP);
 
@@ -454,15 +452,15 @@ ice_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	return _ice_recv_raw_pkts_vec(rx_queue, rx_pkts, nb_pkts, NULL);
 }
 
-/* vPMD receive routine that reassembles scattered packets
+/**
+ * vPMD receive routine that reassembles single burst of 32 scattered packets
+ *
  * Notice:
  * - nb_pkts < ICE_DESCS_PER_LOOP, just return no packet
- * - nb_pkts > ICE_VPMD_RX_BURST, only scan ICE_VPMD_RX_BURST
- *   numbers of DD bits
  */
-uint16_t
-ice_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
-			    uint16_t nb_pkts)
+static uint16_t
+ice_recv_scattered_burst_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+			     uint16_t nb_pkts)
 {
 	struct ice_rx_queue *rxq = rx_queue;
 	uint8_t split_flags[ICE_VPMD_RX_BURST] = {0};
@@ -496,6 +494,32 @@ ice_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 					     &split_flags[i]);
 }
 
+/**
+ * vPMD receive routine that reassembles scattered packets.
+ */
+uint16_t
+ice_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+			    uint16_t nb_pkts)
+{
+	uint16_t retval = 0;
+
+	while (nb_pkts > ICE_VPMD_RX_BURST) {
+		uint16_t burst;
+
+		burst = ice_recv_scattered_burst_vec(rx_queue,
+						     rx_pkts + retval,
+						     ICE_VPMD_RX_BURST);
+		retval += burst;
+		nb_pkts -= burst;
+		if (burst < ICE_VPMD_RX_BURST)
+			return retval;
+	}
+
+	return retval + ice_recv_scattered_burst_vec(rx_queue,
+						     rx_pkts + retval,
+						     nb_pkts);
+}
+
 static inline void
 ice_vtx1(volatile struct ice_tx_desc *txdp, struct rte_mbuf *pkt,
 	 uint64_t flags)
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.652471319 +0000
+++ 0036-net-ice-fix-vector-Rx.patch	2020-11-09 18:40:11.159311718 +0000
@@ -1 +1 @@
-From 7d911640b0a739f55d8fc40a625e0bc8f0831805 Mon Sep 17 00:00:00 2001
+From 2bce196481e8f3757462716c14b4f270a64b0ee5 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 7d911640b0a739f55d8fc40a625e0bc8f0831805 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 1afd96ac9d..e950c1b922 100644
+index 70b43e680b..cfa65aae91 100644
@@ -30 +31 @@
-@@ -254,10 +254,11 @@ ice_rx_desc_to_ptype_v(__m128i descs[4], struct rte_mbuf **rx_pkts,
+@@ -205,10 +205,11 @@ ice_rx_desc_to_ptype_v(__m128i descs[4], struct rte_mbuf **rx_pkts,
@@ -44 +45 @@
-@@ -314,9 +315,6 @@ _ice_recv_raw_pkts_vec(struct ice_rx_queue *rxq, struct rte_mbuf **rx_pkts,
+@@ -264,9 +265,6 @@ _ice_recv_raw_pkts_vec(struct ice_rx_queue *rxq, struct rte_mbuf **rx_pkts,
@@ -54 +55 @@
-@@ -560,15 +558,15 @@ ice_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -454,15 +452,15 @@ ice_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -76 +77 @@
-@@ -602,6 +600,32 @@ ice_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -496,6 +494,32 @@ ice_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,

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

* [dpdk-stable] patch 'net/fm10k: fix vector Rx' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (34 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/ice: " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/iavf: " luca.boccassi
                       ` (45 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Jeff Guo; +Cc: Morten Brørup, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4445ad3496d8a6b9894af59f876f0e92f8d80921

Thanks.

Luca Boccassi

---
From 4445ad3496d8a6b9894af59f876f0e92f8d80921 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
@@ -645,18 +645,15 @@ fm10k_reassemble_packets(struct fm10k_rx_queue *rxq,
 	return pkt_idx;
 }
 
-/*
- * 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;
 	uint8_t split_flags[RTE_FM10K_MAX_RX_BURST] = {0};
@@ -691,6 +688,32 @@ fm10k_recv_scattered_pkts_vec(void *rx_queue,
 		&split_flags[i]);
 }
 
+/**
+ * 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.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.683932758 +0000
+++ 0037-net-fm10k-fix-vector-Rx.patch	2020-11-09 18:40:11.163311780 +0000
@@ -1 +1 @@
-From 2b768c43941fc9f86670b470523c8e5708a8080d Mon Sep 17 00:00:00 2001
+From 4445ad3496d8a6b9894af59f876f0e92f8d80921 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] 374+ messages in thread

* [dpdk-stable] patch 'net/iavf: fix vector Rx' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (35 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/fm10k: " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/vhost: fix xstats after clearing stats' " luca.boccassi
                       ` (44 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Jeff Guo; +Cc: Morten Brørup, Wei Ling, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3e92f86692ee585957ac5932ab853b6711179012

Thanks.

Luca Boccassi

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

[ upstream commit 851b22ff688e759a961ed969ea620372b20581d9 ]

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: 319c421f3890 ("net/avf: enable SSE Rx Tx")
Fixes: 1162f5a0ef31 ("net/iavf: support flexible Rx descriptor in SSE path")
Fixes: 5b6e8859081d ("net/iavf: support flexible Rx descriptor in AVX path")

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Tested-by: Wei Ling <weix.ling@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx_vec_sse.c | 49 +++++++++++++++++++++-------
 1 file changed, 37 insertions(+), 12 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c b/drivers/net/iavf/iavf_rxtx_vec_sse.c
index 2b16dc1b52..458730e089 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_sse.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c
@@ -227,10 +227,12 @@ desc_to_ptype_v(__m128i descs[4], struct rte_mbuf **rx_pkts)
 	rx_pkts[3]->packet_type = type_table[_mm_extract_epi8(ptype1, 8)];
 }
 
-/* Notice:
+/**
+ * vPMD raw receive routine, only accept(nb_pkts >= IAVF_VPMD_DESCS_PER_LOOP)
+ *
+ * Notice:
  * - nb_pkts < IAVF_VPMD_DESCS_PER_LOOP, just return no packet
- * - nb_pkts > IAVF_VPMD_RX_MAX_BURST, only scan IAVF_VPMD_RX_MAX_BURST
- *   numbers of DD bits
+ * - floor align nb_pkts to a IAVF_VPMD_DESCS_PER_LOOP power-of-two
  */
 static inline uint16_t
 _recv_raw_pkts_vec(struct iavf_rx_queue *rxq, struct rte_mbuf **rx_pkts,
@@ -260,9 +262,6 @@ _recv_raw_pkts_vec(struct iavf_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 			offsetof(struct rte_mbuf, rx_descriptor_fields1) + 8);
 	__m128i dd_check, eop_check;
 
-	/* nb_pkts shall be less equal than IAVF_VPMD_RX_MAX_BURST */
-	nb_pkts = RTE_MIN(nb_pkts, IAVF_VPMD_RX_MAX_BURST);
-
 	/* nb_pkts has to be floor-aligned to IAVF_VPMD_DESCS_PER_LOOP */
 	nb_pkts = RTE_ALIGN_FLOOR(nb_pkts, IAVF_VPMD_DESCS_PER_LOOP);
 
@@ -486,15 +485,15 @@ iavf_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	return _recv_raw_pkts_vec(rx_queue, rx_pkts, nb_pkts, NULL);
 }
 
-/* vPMD receive routine that reassembles scattered packets
+/**
+ * vPMD receive routine that reassembles single burst of 32 scattered packets
+ *
  * Notice:
  * - nb_pkts < IAVF_VPMD_DESCS_PER_LOOP, just return no packet
- * - nb_pkts > VPMD_RX_MAX_BURST, only scan IAVF_VPMD_RX_MAX_BURST
- *   numbers of DD bits
  */
-uint16_t
-iavf_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
-			    uint16_t nb_pkts)
+static uint16_t
+iavf_recv_scattered_burst_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+			      uint16_t nb_pkts)
 {
 	struct iavf_rx_queue *rxq = rx_queue;
 	uint8_t split_flags[IAVF_VPMD_RX_MAX_BURST] = {0};
@@ -527,6 +526,32 @@ iavf_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 		&split_flags[i]);
 }
 
+/**
+ * vPMD receive routine that reassembles scattered packets.
+ */
+uint16_t
+iavf_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+			     uint16_t nb_pkts)
+{
+	uint16_t retval = 0;
+
+	while (nb_pkts > IAVF_VPMD_RX_MAX_BURST) {
+		uint16_t burst;
+
+		burst = iavf_recv_scattered_burst_vec(rx_queue,
+						      rx_pkts + retval,
+						      IAVF_VPMD_RX_MAX_BURST);
+		retval += burst;
+		nb_pkts -= burst;
+		if (burst < IAVF_VPMD_RX_MAX_BURST)
+			return retval;
+	}
+
+	return retval + iavf_recv_scattered_burst_vec(rx_queue,
+						      rx_pkts + retval,
+						      nb_pkts);
+}
+
 static inline void
 vtx1(volatile struct iavf_tx_desc *txdp, struct rte_mbuf *pkt, uint64_t flags)
 {
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.716967940 +0000
+++ 0038-net-iavf-fix-vector-Rx.patch	2020-11-09 18:40:11.163311780 +0000
@@ -1 +1 @@
-From 851b22ff688e759a961ed969ea620372b20581d9 Mon Sep 17 00:00:00 2001
+From 3e92f86692ee585957ac5932ab853b6711179012 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 851b22ff688e759a961ed969ea620372b20581d9 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -25,2 +26,2 @@
- drivers/net/iavf/iavf_rxtx_vec_sse.c | 151 ++++++++++++++++++---------
- 1 file changed, 102 insertions(+), 49 deletions(-)
+ drivers/net/iavf/iavf_rxtx_vec_sse.c | 49 +++++++++++++++++++++-------
+ 1 file changed, 37 insertions(+), 12 deletions(-)
@@ -29 +30 @@
-index 85c5bd4af0..11acaa029e 100644
+index 2b16dc1b52..458730e089 100644
@@ -32,2 +33,2 @@
-@@ -379,10 +379,12 @@ flex_desc_to_ptype_v(__m128i descs[4], struct rte_mbuf **rx_pkts,
- 	rx_pkts[3]->packet_type = type_table[_mm_extract_epi16(ptype_all, 7)];
+@@ -227,10 +227,12 @@ desc_to_ptype_v(__m128i descs[4], struct rte_mbuf **rx_pkts)
+ 	rx_pkts[3]->packet_type = type_table[_mm_extract_epi8(ptype1, 8)];
@@ -48 +49 @@
-@@ -413,9 +415,6 @@ _recv_raw_pkts_vec(struct iavf_rx_queue *rxq, struct rte_mbuf **rx_pkts,
+@@ -260,9 +262,6 @@ _recv_raw_pkts_vec(struct iavf_rx_queue *rxq, struct rte_mbuf **rx_pkts,
@@ -58,29 +59,2 @@
-@@ -627,10 +626,13 @@ _recv_raw_pkts_vec(struct iavf_rx_queue *rxq, struct rte_mbuf **rx_pkts,
- 	return nb_pkts_recd;
- }
- 
--/* Notice:
-+/**
-+ * vPMD raw receive routine for flex RxD,
-+ * only accept(nb_pkts >= IAVF_VPMD_DESCS_PER_LOOP)
-+ *
-+ * Notice:
-  * - nb_pkts < IAVF_VPMD_DESCS_PER_LOOP, just return no packet
-- * - nb_pkts > IAVF_VPMD_RX_MAX_BURST, only scan IAVF_VPMD_RX_MAX_BURST
-- *   numbers of DD bits
-+ * - floor align nb_pkts to a IAVF_VPMD_DESCS_PER_LOOP power-of-two
-  */
- static inline uint16_t
- _recv_raw_pkts_vec_flex_rxd(struct iavf_rx_queue *rxq,
-@@ -688,9 +690,6 @@ _recv_raw_pkts_vec_flex_rxd(struct iavf_rx_queue *rxq,
- 	const __m128i eop_check = _mm_set_epi64x(0x0000000200000002LL,
- 						 0x0000000200000002LL);
- 
--	/* nb_pkts shall be less equal than IAVF_VPMD_RX_MAX_BURST */
--	nb_pkts = RTE_MIN(nb_pkts, IAVF_VPMD_RX_MAX_BURST);
--
- 	/* nb_pkts has to be floor-aligned to IAVF_VPMD_DESCS_PER_LOOP */
- 	nb_pkts = RTE_ALIGN_FLOOR(nb_pkts, IAVF_VPMD_DESCS_PER_LOOP);
- 
-@@ -945,15 +944,15 @@ iavf_recv_pkts_vec_flex_rxd(void *rx_queue, struct rte_mbuf **rx_pkts,
- 	return _recv_raw_pkts_vec_flex_rxd(rx_queue, rx_pkts, nb_pkts, NULL);
+@@ -486,15 +485,15 @@ iavf_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+ 	return _recv_raw_pkts_vec(rx_queue, rx_pkts, nb_pkts, NULL);
@@ -107 +81 @@
-@@ -986,46 +985,100 @@ iavf_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -527,6 +526,32 @@ iavf_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -111 +84,0 @@
--/* vPMD receive routine that reassembles scattered packets for flex RxD
@@ -138,100 +110,0 @@
-+/**
-+ * vPMD receive routine that reassembles single burst of 32 scattered packets
-+ * for flex RxD
-+ *
-  * Notice:
-  * - nb_pkts < IAVF_VPMD_DESCS_PER_LOOP, just return no packet
-- * - nb_pkts > VPMD_RX_MAX_BURST, only scan IAVF_VPMD_RX_MAX_BURST
-- *   numbers of DD bits
-+ */
-+static uint16_t
-+iavf_recv_scattered_burst_vec_flex_rxd(void *rx_queue,
-+				       struct rte_mbuf **rx_pkts,
-+				       uint16_t nb_pkts)
-+{
-+	struct iavf_rx_queue *rxq = rx_queue;
-+	uint8_t split_flags[IAVF_VPMD_RX_MAX_BURST] = {0};
-+	unsigned int i = 0;
-+
-+	/* get some new buffers */
-+	uint16_t nb_bufs = _recv_raw_pkts_vec_flex_rxd(rxq, rx_pkts, nb_pkts,
-+					      split_flags);
-+	if (nb_bufs == 0)
-+		return 0;
-+
-+	/* happy day case, full burst + no packets to be joined */
-+	const uint64_t *split_fl64 = (uint64_t *)split_flags;
-+
-+	if (!rxq->pkt_first_seg &&
-+	    split_fl64[0] == 0 && split_fl64[1] == 0 &&
-+	    split_fl64[2] == 0 && split_fl64[3] == 0)
-+		return nb_bufs;
-+
-+	/* reassemble any packets that need reassembly*/
-+	if (!rxq->pkt_first_seg) {
-+		/* find the first split flag, and only reassemble then*/
-+		while (i < nb_bufs && !split_flags[i])
-+			i++;
-+		if (i == nb_bufs)
-+			return nb_bufs;
-+		rxq->pkt_first_seg = rx_pkts[i];
-+	}
-+	return i + reassemble_packets(rxq, &rx_pkts[i], nb_bufs - i,
-+		&split_flags[i]);
-+}
-+
-+/**
-+ * vPMD receive routine that reassembles scattered packets for flex RxD
-  */
- uint16_t
- iavf_recv_scattered_pkts_vec_flex_rxd(void *rx_queue,
- 				      struct rte_mbuf **rx_pkts,
- 				      uint16_t nb_pkts)
- {
--	struct iavf_rx_queue *rxq = rx_queue;
--	uint8_t split_flags[IAVF_VPMD_RX_MAX_BURST] = {0};
--	unsigned int i = 0;
--
--	/* get some new buffers */
--	uint16_t nb_bufs = _recv_raw_pkts_vec_flex_rxd(rxq, rx_pkts, nb_pkts,
--					      split_flags);
--	if (nb_bufs == 0)
--		return 0;
--
--	/* happy day case, full burst + no packets to be joined */
--	const uint64_t *split_fl64 = (uint64_t *)split_flags;
--
--	if (!rxq->pkt_first_seg &&
--	    split_fl64[0] == 0 && split_fl64[1] == 0 &&
--	    split_fl64[2] == 0 && split_fl64[3] == 0)
--		return nb_bufs;
--
--	/* reassemble any packets that need reassembly*/
--	if (!rxq->pkt_first_seg) {
--		/* find the first split flag, and only reassemble then*/
--		while (i < nb_bufs && !split_flags[i])
--			i++;
--		if (i == nb_bufs)
--			return nb_bufs;
--		rxq->pkt_first_seg = rx_pkts[i];
-+	uint16_t retval = 0;
-+
-+	while (nb_pkts > IAVF_VPMD_RX_MAX_BURST) {
-+		uint16_t burst;
-+
-+		burst = iavf_recv_scattered_burst_vec_flex_rxd(rx_queue,
-+						rx_pkts + retval,
-+						IAVF_VPMD_RX_MAX_BURST);
-+		retval += burst;
-+		nb_pkts -= burst;
-+		if (burst < IAVF_VPMD_RX_MAX_BURST)
-+			return retval;
- 	}
--	return i + reassemble_packets(rxq, &rx_pkts[i], nb_bufs - i,
--		&split_flags[i]);
-+
-+	return retval + iavf_recv_scattered_burst_vec_flex_rxd(rx_queue,
-+						      rx_pkts + retval,
-+						      nb_pkts);
- }
- 
@@ -238,0 +112,2 @@
+ vtx1(volatile struct iavf_tx_desc *txdp, struct rte_mbuf *pkt, uint64_t flags)
+ {

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

* [dpdk-stable] patch 'net/vhost: fix xstats after clearing stats' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (36 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/iavf: " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'vhost: fix virtqueues metadata allocation' " luca.boccassi
                       ` (43 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: David Christensen; +Cc: Chenbo Xia, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8123d107105e2e4685730975890b31f2a143029c

Thanks.

Luca Boccassi

---
From 8123d107105e2e4685730975890b31f2a143029c 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 85f91f0b9d..323efb3c07 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -68,6 +68,9 @@ enum vhost_xstats_pkts {
 	VHOST_BROADCAST_PKT,
 	VHOST_MULTICAST_PKT,
 	VHOST_UNICAST_PKT,
+	VHOST_PKT,
+	VHOST_BYTE,
+	VHOST_MISSED_PKT,
 	VHOST_ERRORS_PKT,
 	VHOST_ERRORS_FRAGMENTED,
 	VHOST_ERRORS_JABBER,
@@ -143,11 +146,11 @@ struct vhost_xstats_name_off {
 /* [rx]_is prepended to the name string here */
 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])},
 	{"multicast_packets",
@@ -183,11 +186,11 @@ static const struct vhost_xstats_name_off vhost_rxport_stat_strings[] = {
 /* [tx]_ is prepended to the name string here */
 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])},
 	{"multicast_packets",
@@ -281,23 +284,6 @@ vhost_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
 	if (n < nxstats)
 		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;
 		for (i = 0; i < dev->data->nb_rx_queues; i++) {
@@ -328,7 +314,7 @@ 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)
 {
 	struct rte_ether_addr *ea = NULL;
@@ -340,20 +326,27 @@ vhost_count_multicast_broadcast(struct vhost_queue *vq,
 			pstats->xstats[VHOST_BROADCAST_PKT]++;
 		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;
 	uint64_t i = 0;
 	uint64_t index;
 	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) {
 			pstats->xstats[VHOST_64_PKT]++;
@@ -369,7 +362,7 @@ vhost_update_packet_xstats(struct vhost_queue *vq,
 			else if (pkt_len > 1522)
 				pstats->xstats[VHOST_1523_TO_MAX_PKT]++;
 		}
-		vhost_count_multicast_broadcast(vq, bufs[i]);
+		vhost_count_xcast_packets(vq, bufs[i]);
 	}
 }
 
@@ -379,6 +372,7 @@ eth_vhost_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
 	struct vhost_queue *r = q;
 	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))
 		return 0;
@@ -413,10 +407,11 @@ eth_vhost_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
 		if (r->internal->vlan_strip)
 			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:
 	rte_atomic32_set(&r->while_queuing, 0);
@@ -430,6 +425,8 @@ eth_vhost_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
 	struct vhost_queue *r = q;
 	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))
 		return 0;
@@ -470,20 +467,23 @@ eth_vhost_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
 			break;
 	}
 
+	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++)
 		rte_pktmbuf_free(bufs[i]);
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.749315510 +0000
+++ 0039-net-vhost-fix-xstats-after-clearing-stats.patch	2020-11-09 18:40:11.163311780 +0000
@@ -1 +1 @@
-From d4fbb27459954bdbb9240d16b47bdfccf47c6e34 Mon Sep 17 00:00:00 2001
+From 8123d107105e2e4685730975890b31f2a143029c 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 85f91f0b9d..323efb3c07 100644
@@ -38 +39 @@
-@@ -71,6 +71,9 @@ enum vhost_xstats_pkts {
+@@ -68,6 +68,9 @@ enum vhost_xstats_pkts {
@@ -48 +49 @@
-@@ -147,11 +150,11 @@ struct vhost_xstats_name_off {
+@@ -143,11 +146,11 @@ struct vhost_xstats_name_off {
@@ -63 +64 @@
-@@ -187,11 +190,11 @@ static const struct vhost_xstats_name_off vhost_rxport_stat_strings[] = {
+@@ -183,11 +186,11 @@ static const struct vhost_xstats_name_off vhost_rxport_stat_strings[] = {
@@ -78 +79 @@
-@@ -285,23 +288,6 @@ vhost_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
+@@ -281,23 +284,6 @@ vhost_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
@@ -102 +103 @@
-@@ -332,7 +318,7 @@ vhost_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
+@@ -328,7 +314,7 @@ vhost_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
@@ -111 +112 @@
-@@ -344,20 +330,27 @@ vhost_count_multicast_broadcast(struct vhost_queue *vq,
+@@ -340,20 +326,27 @@ vhost_count_multicast_broadcast(struct vhost_queue *vq,
@@ -142 +143 @@
-@@ -373,7 +366,7 @@ vhost_update_packet_xstats(struct vhost_queue *vq,
+@@ -369,7 +362,7 @@ vhost_update_packet_xstats(struct vhost_queue *vq,
@@ -151 +152 @@
-@@ -383,6 +376,7 @@ eth_vhost_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
+@@ -379,6 +372,7 @@ eth_vhost_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
@@ -159 +160 @@
-@@ -417,10 +411,11 @@ eth_vhost_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
+@@ -413,10 +407,11 @@ eth_vhost_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
@@ -173 +174 @@
-@@ -434,6 +429,8 @@ eth_vhost_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
+@@ -430,6 +425,8 @@ eth_vhost_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
@@ -182 +183 @@
-@@ -474,20 +471,23 @@ eth_vhost_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
+@@ -470,20 +467,23 @@ eth_vhost_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)

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

* [dpdk-stable] patch 'vhost: fix virtqueues metadata allocation' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (37 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/vhost: fix xstats after clearing stats' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'vhost: validate index in available entries API' " luca.boccassi
                       ` (42 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Adrian Moreno, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/59bdbb385cfbfa370af8e7f1c8176231596b358a

Thanks.

Luca Boccassi

---
From 59bdbb385cfbfa370af8e7f1c8176231596b358a 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 20fda61518..0d65719f33 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -560,22 +560,29 @@ int
 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.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.780792043 +0000
+++ 0040-vhost-fix-virtqueues-metadata-allocation.patch	2020-11-09 18:40:11.163311780 +0000
@@ -1 +1 @@
-From 8acd7c21335305426fbbc0a3aea2978734d0b2a8 Mon Sep 17 00:00:00 2001
+From 59bdbb385cfbfa370af8e7f1c8176231596b358a 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 20fda61518..0d65719f33 100644
@@ -31 +32 @@
-@@ -579,22 +579,29 @@ int
+@@ -560,22 +560,29 @@ int
@@ -39 +40 @@
--		VHOST_LOG_CONFIG(ERR,
+-		RTE_LOG(ERR, VHOST_CONFIG,
@@ -49 +50 @@
-+			VHOST_LOG_CONFIG(ERR,
++			RTE_LOG(ERR, VHOST_CONFIG,

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

* [dpdk-stable] patch 'vhost: validate index in available entries API' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (38 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'vhost: fix virtqueues metadata allocation' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'vhost: validate index in guest notification " luca.boccassi
                       ` (41 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d08a94deae48b03553538bbb8d6b44323c4ee304

Thanks.

Luca Boccassi

---
From d08a94deae48b03553538bbb8d6b44323c4ee304 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 0d65719f33..0f6c1ef8de 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -1258,7 +1258,12 @@ rte_vhost_avail_entries(int vid, uint16_t queue_id)
 	if (!dev)
 		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.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.812494287 +0000
+++ 0041-vhost-validate-index-in-available-entries-API.patch	2020-11-09 18:40:11.163311780 +0000
@@ -1 +1 @@
-From 8c042f8191f8337da30958d0f622776861e417a5 Mon Sep 17 00:00:00 2001
+From d08a94deae48b03553538bbb8d6b44323c4ee304 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 0d65719f33..0f6c1ef8de 100644
@@ -23 +24 @@
-@@ -1260,7 +1260,12 @@ rte_vhost_avail_entries(int vid, uint16_t queue_id)
+@@ -1258,7 +1258,12 @@ rte_vhost_avail_entries(int vid, uint16_t queue_id)

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

* [dpdk-stable] patch 'vhost: validate index in guest notification API' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (39 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'vhost: validate index in available entries API' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'vhost: validate index in live-migration " luca.boccassi
                       ` (40 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ed20f3a8ddd90b419d93d383765f6b4f6c93f3f9

Thanks.

Luca Boccassi

---
From ed20f3a8ddd90b419d93d383765f6b4f6c93f3f9 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 0f6c1ef8de..2d23de598e 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -1333,7 +1333,12 @@ rte_vhost_enable_guest_notification(int vid, uint16_t queue_id, int enable)
 	if (!dev)
 		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.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.843697404 +0000
+++ 0042-vhost-validate-index-in-guest-notification-API.patch	2020-11-09 18:40:11.167311842 +0000
@@ -1 +1 @@
-From 366374054b656e049188216e2fa44831749c2a21 Mon Sep 17 00:00:00 2001
+From ed20f3a8ddd90b419d93d383765f6b4f6c93f3f9 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 0f6c1ef8de..2d23de598e 100644
@@ -23 +24 @@
-@@ -1352,7 +1352,12 @@ rte_vhost_enable_guest_notification(int vid, uint16_t queue_id, int enable)
+@@ -1333,7 +1333,12 @@ rte_vhost_enable_guest_notification(int vid, uint16_t queue_id, int enable)

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

* [dpdk-stable] patch 'vhost: validate index in live-migration API' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (40 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'vhost: validate index in guest notification " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'vhost: validate index in inflight " luca.boccassi
                       ` (39 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/215263f3e48e81ea5af88c615fb4f57c4bce5968

Thanks.

Luca Boccassi

---
From 215263f3e48e81ea5af88c615fb4f57c4bce5968 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Mon, 19 Oct 2020 19:34:12 +0200
Subject: [PATCH] vhost: validate index in live-migration API

[ upstream commit 943daec05c596c03471e3f9432b104eaaa2edf0f ]

This patch validates the queue index parameter, in order
to ensure no out-of-bound accesses happen.

Fixes: bd2e0c3fe5ac ("vhost: add APIs for live migration")

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

diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index 2d23de598e..2e3dd0e0cf 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -1449,6 +1449,9 @@ int rte_vhost_get_vring_base(int vid, uint16_t queue_id,
 	if (dev == NULL || last_avail_idx == NULL || last_used_idx == NULL)
 		return -1;
 
+	if (queue_id >= VHOST_MAX_VRING)
+		return -1;
+
 	vq = dev->virtqueue[queue_id];
 	if (!vq)
 		return -1;
@@ -1475,6 +1478,9 @@ int rte_vhost_set_vring_base(int vid, uint16_t queue_id,
 	if (!dev)
 		return -1;
 
+	if (queue_id >= VHOST_MAX_VRING)
+		return -1;
+
 	vq = dev->virtqueue[queue_id];
 	if (!vq)
 		return -1;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.877292392 +0000
+++ 0043-vhost-validate-index-in-live-migration-API.patch	2020-11-09 18:40:11.167311842 +0000
@@ -1 +1 @@
-From 943daec05c596c03471e3f9432b104eaaa2edf0f Mon Sep 17 00:00:00 2001
+From 215263f3e48e81ea5af88c615fb4f57c4bce5968 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 943daec05c596c03471e3f9432b104eaaa2edf0f ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 801a1a5098..b9afe46ca2 100644
+index 2d23de598e..2e3dd0e0cf 100644
@@ -22 +23 @@
-@@ -1467,6 +1467,9 @@ int rte_vhost_get_vring_base(int vid, uint16_t queue_id,
+@@ -1449,6 +1449,9 @@ int rte_vhost_get_vring_base(int vid, uint16_t queue_id,
@@ -32 +33 @@
-@@ -1493,6 +1496,9 @@ int rte_vhost_set_vring_base(int vid, uint16_t queue_id,
+@@ -1475,6 +1478,9 @@ int rte_vhost_set_vring_base(int vid, uint16_t queue_id,

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

* [dpdk-stable] patch 'vhost: validate index in inflight API' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (41 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'vhost: validate index in live-migration " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/ena: remove unused macro' " luca.boccassi
                       ` (38 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4a20f64e544bdefdca8332bc790aef591ac401e5

Thanks.

Luca Boccassi

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

[ upstream commit d2475e890307a6edd9fdfcfc83b82d543881545e ]

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

Fixes: 4d891f77ddfa ("vhost: add APIs to get inflight ring")

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

diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index 2e3dd0e0cf..9f3eadeba6 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -1505,15 +1505,23 @@ rte_vhost_get_vring_base_from_inflight(int vid,
 				       uint16_t *last_used_idx)
 {
 	struct rte_vhost_inflight_info_packed *inflight_info;
+	struct vhost_virtqueue *vq;
 	struct virtio_net *dev = get_device(vid);
 
 	if (dev == NULL || last_avail_idx == NULL || last_used_idx == NULL)
 		return -1;
 
+	if (queue_id >= VHOST_MAX_VRING)
+		return -1;
+
+	vq = dev->virtqueue[queue_id];
+	if (!vq)
+		return -1;
+
 	if (!vq_is_packed(dev))
 		return -1;
 
-	inflight_info = dev->virtqueue[queue_id]->inflight_packed;
+	inflight_info = vq->inflight_packed;
 	if (!inflight_info)
 		return -1;
 
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.914445641 +0000
+++ 0044-vhost-validate-index-in-inflight-API.patch	2020-11-09 18:40:11.167311842 +0000
@@ -1 +1 @@
-From d2475e890307a6edd9fdfcfc83b82d543881545e Mon Sep 17 00:00:00 2001
+From 4a20f64e544bdefdca8332bc790aef591ac401e5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d2475e890307a6edd9fdfcfc83b82d543881545e ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index b9afe46ca2..f78bdfcc94 100644
+index 2e3dd0e0cf..9f3eadeba6 100644
@@ -23 +24 @@
-@@ -1523,15 +1523,23 @@ rte_vhost_get_vring_base_from_inflight(int vid,
+@@ -1505,15 +1505,23 @@ rte_vhost_get_vring_base_from_inflight(int vid,

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

* [dpdk-stable] patch 'net/ena: remove unused macro' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (42 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'vhost: validate index in inflight " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/mvpp2: fix memory leak in error path' " luca.boccassi
                       ` (37 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: David Marchand; +Cc: Michal Krawczyk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/df6c635e40bfae7c9fe72d15f3b580d16b5138a9

Thanks.

Luca Boccassi

---
From df6c635e40bfae7c9fe72d15f3b580d16b5138a9 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 | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h
index 5a9d71749e..a8c33dc4d4 100644
--- a/drivers/net/ena/base/ena_plat_dpdk.h
+++ b/drivers/net/ena/base/ena_plat_dpdk.h
@@ -71,19 +71,6 @@ typedef uint64_t dma_addr_t;
 	(rte_get_timer_cycles() * US_PER_S / rte_get_timer_hz())
 
 extern int ena_logtype_com;
-#if RTE_LOG_DP_LEVEL >= RTE_LOG_DEBUG
-#define ENA_ASSERT(cond, format, arg...)				\
-	do {								\
-		if (unlikely(!(cond))) {				\
-			rte_log(RTE_LOGTYPE_ERR, ena_logtype_com,	\
-				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))
 #define ENA_MAX32(x, y) ENA_MAX_T(uint32_t, (x), (y))
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.953500000 +0000
+++ 0045-net-ena-remove-unused-macro.patch	2020-11-09 18:40:11.167311842 +0000
@@ -1 +1 @@
-From 8bb7b198297d4d33b720b69480e2b41fb9ca91fb Mon Sep 17 00:00:00 2001
+From df6c635e40bfae7c9fe72d15f3b580d16b5138a9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8bb7b198297d4d33b720b69480e2b41fb9ca91fb ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index ae4fd8f868..a6782f3732 100644
+index 5a9d71749e..a8c33dc4d4 100644
@@ -24 +25 @@
-@@ -73,19 +73,6 @@ typedef uint64_t dma_addr_t;
+@@ -71,19 +71,6 @@ typedef uint64_t dma_addr_t;

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

* [dpdk-stable] patch 'net/mvpp2: fix memory leak in error path' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (43 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/ena: remove unused macro' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/netvsc: allocate contiguous physical memory for RNDIS' " luca.boccassi
                       ` (36 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Liron Himi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e30d958f1ec37a1a91f64a99b7b66a76fabbcfe5

Thanks.

Luca Boccassi

---
From e30d958f1ec37a1a91f64a99b7b66a76fabbcfe5 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
@@ -329,6 +329,12 @@ mrvl_create(struct rte_eth_dev *dev, uint32_t mtr_id,
 	struct mrvl_mtr_profile *profile;
 	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)
 		return -rte_mtr_error_set(error, EEXIST,
@@ -341,12 +347,6 @@ mrvl_create(struct rte_eth_dev *dev, uint32_t mtr_id,
 					  RTE_MTR_ERROR_TYPE_UNSPECIFIED,
 					  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;
 	mtr->plcr_bit = MRVL_PLCR_BIT_INVALID;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:12.990150595 +0000
+++ 0046-net-mvpp2-fix-memory-leak-in-error-path.patch	2020-11-09 18:40:11.167311842 +0000
@@ -1 +1 @@
-From 1b2c17d60d978d2570baa9e5c478ebca1fce3859 Mon Sep 17 00:00:00 2001
+From e30d958f1ec37a1a91f64a99b7b66a76fabbcfe5 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] 374+ messages in thread

* [dpdk-stable] patch 'net/netvsc: allocate contiguous physical memory for RNDIS' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (44 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/mvpp2: fix memory leak in error path' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'app/testpmd: fix RSS key for flow API RSS rule' " luca.boccassi
                       ` (35 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Long Li; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e896b661e65b9efc015818b9a10a25c3f73e5f5b

Thanks.

Luca Boccassi

---
From e896b661e65b9efc015818b9a10a25c3f73e5f5b 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 4286b6b463..c0965ab420 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -283,10 +283,15 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev,
 	PMD_INIT_LOG(DEBUG, "TX descriptor pool %s n=%u size=%zu",
 		     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,
 					      sizeof(struct hn_txdesc),
@@ -315,7 +320,7 @@ hn_dev_tx_queue_setup(struct rte_eth_dev *dev,
 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;
 }
@@ -357,7 +362,7 @@ hn_dev_tx_queue_release(void *arg)
 	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);
 }
 
@@ -1356,12 +1361,8 @@ static int hn_xmit_sg(struct hn_tx_queue *txq,
 	hn_rndis_dump(txd->rndis_pkt);
 
 	/* pass IOVA of rndis header in first segment */
-	addr = rte_malloc_virt2iova(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;
 	sg[0].ofs = addr & PAGE_MASK;
diff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h
index a4d47abca3..44c9db95a6 100644
--- a/drivers/net/netvsc/hn_var.h
+++ b/drivers/net/netvsc/hn_var.h
@@ -53,7 +53,9 @@ struct hn_tx_queue {
 	uint16_t	queue_id;
 	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. */
 	uint32_t	agg_szmax;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.027533497 +0000
+++ 0047-net-netvsc-allocate-contiguous-physical-memory-for-R.patch	2020-11-09 18:40:11.171311905 +0000
@@ -1 +1 @@
-From b8c3c628aff6defbabf677b4eea14c0529486357 Mon Sep 17 00:00:00 2001
+From e896b661e65b9efc015818b9a10a25c3f73e5f5b 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 4286b6b463..c0965ab420 100644
@@ -52 +52 @@
-@@ -366,7 +371,7 @@ hn_dev_tx_queue_release(void *arg)
+@@ -357,7 +362,7 @@ hn_dev_tx_queue_release(void *arg)
@@ -61 +61 @@
-@@ -1445,12 +1450,8 @@ static int hn_xmit_sg(struct hn_tx_queue *txq,
+@@ -1356,12 +1361,8 @@ static int hn_xmit_sg(struct hn_tx_queue *txq,
@@ -77 +77 @@
-index 56bfa972d1..20bb3c38dc 100644
+index a4d47abca3..44c9db95a6 100644
@@ -80 +80 @@
-@@ -54,7 +54,9 @@ struct hn_tx_queue {
+@@ -53,7 +53,9 @@ struct hn_tx_queue {

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

* [dpdk-stable] patch 'app/testpmd: fix RSS key for flow API RSS rule' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (45 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/netvsc: allocate contiguous physical memory for RNDIS' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'raw/ifpga/base: fix interrupt handler instance usage' " luca.boccassi
                       ` (34 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Lijun Ou; +Cc: Ophir Munk, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/33e2d706b6bc2551c1bd446baa32ac457c327061

Thanks.

Luca Boccassi

---
From 33e2d706b6bc2551c1bd446baa32ac457c327061 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  | 19 ++-----------------
 lib/librte_ethdev/rte_flow.c |  2 +-
 2 files changed, 3 insertions(+), 18 deletions(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index deced65016..be39f4b746 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -3900,30 +3900,15 @@ parse_vc_action_rss(struct context *ctx, const struct token *token,
 			.func = RTE_ETH_HASH_FUNCTION_DEFAULT,
 			.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;
-		int ret2;
-
-		ret2 = rte_eth_dev_info_get(ctx->port, &info);
-		if (ret2 != 0)
-			return ret2;
-
-		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 7171c11499..9964a241cb 100644
--- a/lib/librte_ethdev/rte_flow.c
+++ b/lib/librte_ethdev/rte_flow.c
@@ -621,7 +621,7 @@ 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;
 			if (size >= off + tmp)
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.066572451 +0000
+++ 0048-app-testpmd-fix-RSS-key-for-flow-API-RSS-rule.patch	2020-11-09 18:40:11.175311967 +0000
@@ -1 +1 @@
-From 1848b117cca159cc4e5f287876491e86e3413f21 Mon Sep 17 00:00:00 2001
+From 33e2d706b6bc2551c1bd446baa32ac457c327061 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1848b117cca159cc4e5f287876491e86e3413f21 ]
+
@@ -47 +48,0 @@
-Cc: stable@dpdk.org
@@ -58 +59 @@
-index cd35d5b9cc..3d1dd05953 100644
+index deced65016..be39f4b746 100644
@@ -61 +62 @@
-@@ -4850,30 +4850,15 @@ parse_vc_action_rss(struct context *ctx, const struct token *token,
+@@ -3900,30 +3900,15 @@ parse_vc_action_rss(struct context *ctx, const struct token *token,
@@ -95 +96 @@
-index d3e5cbc194..a06f64c271 100644
+index 7171c11499..9964a241cb 100644
@@ -98 +99 @@
-@@ -577,7 +577,7 @@ rte_flow_conv_action_conf(void *buf, const size_t size,
+@@ -621,7 +621,7 @@ rte_flow_conv_action_conf(void *buf, const size_t size,

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

* [dpdk-stable] patch 'raw/ifpga/base: fix interrupt handler instance usage' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (46 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'app/testpmd: fix RSS key for flow API RSS rule' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'raw/ifpga/base: handle unsupported interrupt type' " luca.boccassi
                       ` (33 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Wei Huang; +Cc: Tianfei Zhang, Rosen Xu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b010a819fdc87b235c10dfdb99a5e715bd57d396

Thanks.

Luca Boccassi

---
From b010a819fdc87b235c10dfdb99a5e715bd57d396 Mon Sep 17 00:00:00 2001
From: Wei Huang <wei.huang@intel.com>
Date: Fri, 23 Oct 2020 04:59:55 -0400
Subject: [PATCH] raw/ifpga/base: fix interrupt handler instance usage

[ upstream commit df016da79b59bf48118deab544d4e1829b0eebe1 ]

Interrupt handler copied to the local 'intr_handle' variable by value
before passing it to IRQ functions.
This leads IRQ functions update the local variable instead of
'ifpga_irq_handle'.

Instead, using 'intr_handle' local variable as pointer to
'ifpga_irq_handle' as intended.

Fixes: e0a1aafe2af9 ("raw/ifpga: introduce IRQ functions")

Signed-off-by: Wei Huang <wei.huang@intel.com>
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
---
 drivers/raw/ifpga/ifpga_rawdev.c | 34 ++++++++++++++++----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index b8701e155b..acbfdfda27 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -1336,17 +1336,16 @@ int
 ifpga_unregister_msix_irq(enum ifpga_irq_type type,
 		int vec_start, rte_intr_callback_fn handler, void *arg)
 {
-	struct rte_intr_handle intr_handle;
+	struct rte_intr_handle *intr_handle;
 
 	if (type == IFPGA_FME_IRQ)
-		intr_handle = ifpga_irq_handle[0];
+		intr_handle = &ifpga_irq_handle[0];
 	else if (type == IFPGA_AFU_IRQ)
-		intr_handle = ifpga_irq_handle[vec_start + 1];
+		intr_handle = &ifpga_irq_handle[vec_start + 1];
 
-	rte_intr_efd_disable(&intr_handle);
+	rte_intr_efd_disable(intr_handle);
 
-	return rte_intr_callback_unregister(&intr_handle,
-			handler, arg);
+	return rte_intr_callback_unregister(intr_handle, handler, arg);
 }
 
 int
@@ -1356,7 +1355,7 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
 		void *arg)
 {
 	int ret;
-	struct rte_intr_handle intr_handle;
+	struct rte_intr_handle *intr_handle;
 	struct opae_adapter *adapter;
 	struct opae_manager *mgr;
 	struct opae_accelerator *acc;
@@ -1370,26 +1369,26 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
 		return -ENODEV;
 
 	if (type == IFPGA_FME_IRQ) {
-		intr_handle = ifpga_irq_handle[0];
+		intr_handle = &ifpga_irq_handle[0];
 		count = 1;
 	} else if (type == IFPGA_AFU_IRQ)
-		intr_handle = ifpga_irq_handle[vec_start + 1];
+		intr_handle = &ifpga_irq_handle[vec_start + 1];
 
-	intr_handle.type = RTE_INTR_HANDLE_VFIO_MSIX;
+	intr_handle->type = RTE_INTR_HANDLE_VFIO_MSIX;
 
-	ret = rte_intr_efd_enable(&intr_handle, count);
+	ret = rte_intr_efd_enable(intr_handle, count);
 	if (ret)
 		return -ENODEV;
 
-	intr_handle.fd = intr_handle.efds[0];
+	intr_handle->fd = intr_handle->efds[0];
 
 	IFPGA_RAWDEV_PMD_DEBUG("register %s irq, vfio_fd=%d, fd=%d\n",
-			name, intr_handle.vfio_dev_fd,
-			intr_handle.fd);
+			name, intr_handle->vfio_dev_fd,
+			intr_handle->fd);
 
 	if (type == IFPGA_FME_IRQ) {
 		struct fpga_fme_err_irq_set err_irq_set;
-		err_irq_set.evtfd = intr_handle.efds[0];
+		err_irq_set.evtfd = intr_handle->efds[0];
 
 		ret = opae_manager_ifpga_set_err_irq(mgr, &err_irq_set);
 		if (ret)
@@ -1399,13 +1398,14 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
 		if (!acc)
 			return -EINVAL;
 
-		ret = opae_acc_set_irq(acc, vec_start, count, intr_handle.efds);
+		ret = opae_acc_set_irq(acc, vec_start, count,
+				intr_handle->efds);
 		if (ret)
 			return -EINVAL;
 	}
 
 	/* register interrupt handler using DPDK API */
-	ret = rte_intr_callback_register(&intr_handle,
+	ret = rte_intr_callback_register(intr_handle,
 			handler, (void *)arg);
 	if (ret)
 		return -EINVAL;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.109033606 +0000
+++ 0049-raw-ifpga-base-fix-interrupt-handler-instance-usage.patch	2020-11-09 18:40:11.175311967 +0000
@@ -1 +1 @@
-From df016da79b59bf48118deab544d4e1829b0eebe1 Mon Sep 17 00:00:00 2001
+From b010a819fdc87b235c10dfdb99a5e715bd57d396 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit df016da79b59bf48118deab544d4e1829b0eebe1 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index a7463de8e4..e5b938d9d6 100644
+index b8701e155b..acbfdfda27 100644
@@ -28 +29 @@
-@@ -1332,17 +1332,16 @@ int
+@@ -1336,17 +1336,16 @@ int
@@ -51 +52 @@
-@@ -1352,7 +1351,7 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
+@@ -1356,7 +1355,7 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
@@ -60 +61 @@
-@@ -1366,26 +1365,26 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
+@@ -1370,26 +1369,26 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
@@ -95 +96 @@
-@@ -1395,13 +1394,14 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
+@@ -1399,13 +1398,14 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,

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

* [dpdk-stable] patch 'raw/ifpga/base: handle unsupported interrupt type' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (47 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'raw/ifpga/base: fix interrupt handler instance usage' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'raw/ifpga/base: fix return of IRQ unregister' " luca.boccassi
                       ` (32 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Wei Huang; +Cc: Tianfei Zhang, Rosen Xu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a53c1f6348e17897b483a5fe749c6140ebb57c23

Thanks.

Luca Boccassi

---
From a53c1f6348e17897b483a5fe749c6140ebb57c23 Mon Sep 17 00:00:00 2001
From: Wei Huang <wei.huang@intel.com>
Date: Fri, 23 Oct 2020 04:59:56 -0400
Subject: [PATCH] raw/ifpga/base: handle unsupported interrupt type

[ upstream commit 509579206fe07a2d714d5be1ed6f1adc51340be6 ]

Handle unsupported interrupt type requests properly,
on unsupported interrupt case:
'ifpga_unregister_msix_irq()' returns success,
'ifpga_register_msix_irq()' return failure.

Fixes: e0a1aafe2af9 ("raw/ifpga: introduce IRQ functions")

Signed-off-by: Wei Huang <wei.huang@intel.com>
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
---
 drivers/raw/ifpga/ifpga_rawdev.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index acbfdfda27..fee24a98e1 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -1342,6 +1342,8 @@ ifpga_unregister_msix_irq(enum ifpga_irq_type type,
 		intr_handle = &ifpga_irq_handle[0];
 	else if (type == IFPGA_AFU_IRQ)
 		intr_handle = &ifpga_irq_handle[vec_start + 1];
+	else
+		return 0;
 
 	rte_intr_efd_disable(intr_handle);
 
@@ -1371,8 +1373,11 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
 	if (type == IFPGA_FME_IRQ) {
 		intr_handle = &ifpga_irq_handle[0];
 		count = 1;
-	} else if (type == IFPGA_AFU_IRQ)
+	} else if (type == IFPGA_AFU_IRQ) {
 		intr_handle = &ifpga_irq_handle[vec_start + 1];
+	} else {
+		return -EINVAL;
+	}
 
 	intr_handle->type = RTE_INTR_HANDLE_VFIO_MSIX;
 
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.141497263 +0000
+++ 0050-raw-ifpga-base-handle-unsupported-interrupt-type.patch	2020-11-09 18:40:11.179312029 +0000
@@ -1 +1 @@
-From 509579206fe07a2d714d5be1ed6f1adc51340be6 Mon Sep 17 00:00:00 2001
+From a53c1f6348e17897b483a5fe749c6140ebb57c23 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 509579206fe07a2d714d5be1ed6f1adc51340be6 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index e5b938d9d6..6319988066 100644
+index acbfdfda27..fee24a98e1 100644
@@ -25 +26 @@
-@@ -1338,6 +1338,8 @@ ifpga_unregister_msix_irq(enum ifpga_irq_type type,
+@@ -1342,6 +1342,8 @@ ifpga_unregister_msix_irq(enum ifpga_irq_type type,
@@ -34 +35 @@
-@@ -1367,8 +1369,11 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,
+@@ -1371,8 +1373,11 @@ ifpga_register_msix_irq(struct rte_rawdev *dev, int port_id,

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

* [dpdk-stable] patch 'raw/ifpga/base: fix return of IRQ unregister' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (48 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'raw/ifpga/base: handle unsupported interrupt type' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/ice: update writeback policy to reduce latency' " luca.boccassi
                       ` (31 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Wei Huang; +Cc: Tianfei Zhang, Rosen Xu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0911adf9dbab697f834efcdb0794b6cbe5919095

Thanks.

Luca Boccassi

---
From 0911adf9dbab697f834efcdb0794b6cbe5919095 Mon Sep 17 00:00:00 2001
From: Wei Huang <wei.huang@intel.com>
Date: Fri, 23 Oct 2020 04:59:57 -0400
Subject: [PATCH] raw/ifpga/base: fix return of IRQ unregister

[ upstream commit 93824cadd8f430d14c91e48146a99f90e8d31f28 ]

Since 'rte_intr_callback_unregister()' can return positive
value as success, but 'ifpga_rawdev_destroy()' handle it as
an error.

Instead, only negative return is treated as failure.

Fixes: e0a1aafe2af9 ("raw/ifpga: introduce IRQ functions")

Signed-off-by: Wei Huang <wei.huang@intel.com>
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
---
 drivers/raw/ifpga/ifpga_rawdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index fee24a98e1..7bfdde650d 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -1563,7 +1563,7 @@ ifpga_rawdev_destroy(struct rte_pci_device *pci_dev)
 		return -ENODEV;
 
 	if (ifpga_unregister_msix_irq(IFPGA_FME_IRQ, 0,
-				fme_interrupt_handler, mgr))
+				fme_interrupt_handler, mgr) < 0)
 		return -EINVAL;
 
 	opae_adapter_data_free(adapter->data);
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.174904648 +0000
+++ 0051-raw-ifpga-base-fix-return-of-IRQ-unregister.patch	2020-11-09 18:40:11.179312029 +0000
@@ -1 +1 @@
-From 93824cadd8f430d14c91e48146a99f90e8d31f28 Mon Sep 17 00:00:00 2001
+From 0911adf9dbab697f834efcdb0794b6cbe5919095 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 93824cadd8f430d14c91e48146a99f90e8d31f28 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 6319988066..fdeb713ff6 100644
+index fee24a98e1..7bfdde650d 100644
@@ -26 +27 @@
-@@ -1559,7 +1559,7 @@ ifpga_rawdev_destroy(struct rte_pci_device *pci_dev)
+@@ -1563,7 +1563,7 @@ ifpga_rawdev_destroy(struct rte_pci_device *pci_dev)

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

* [dpdk-stable] patch 'net/ice: update writeback policy to reduce latency' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (49 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'raw/ifpga/base: fix return of IRQ unregister' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/bnxt: fix boolean operator usage' " luca.boccassi
                       ` (30 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Jesse Brandeburg; +Cc: Brian Johnson, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d97dce73be24d6a4bdb1959cb24740a14a71e335

Thanks.

Luca Boccassi

---
From d97dce73be24d6a4bdb1959cb24740a14a71e335 Mon Sep 17 00:00:00 2001
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
Date: Fri, 23 Oct 2020 13:22:00 -0700
Subject: [PATCH] net/ice: update writeback policy to reduce latency

[ upstream commit 8b20510a042aee6681c33c20bb076b53cb354708 ]

Just like iavf, setting the value to 2us allows for generally good
streaming packet performance while keeping latency down, and
generally keeps the performance of the PF and VF interfaces similar.

The previous value of 0x10 was making latency on a single packet
receive be as much as 16us.

Fixes: 65dfc889d86b ("net/ice: support Rx queue interruption")

Reported-by: Brian Johnson <brian.johnson@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index cb71d7bfd4..8acfce00aa 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2633,7 +2633,7 @@ __vsi_queues_bind_intr(struct ice_vsi *vsi, uint16_t msix_vect,
 		PMD_DRV_LOG(INFO, "queue %d is binding to vect %d",
 			    base_queue + i, msix_vect);
 		/* set ITR0 value */
-		ICE_WRITE_REG(hw, GLINT_ITR(0, msix_vect), 0x10);
+		ICE_WRITE_REG(hw, GLINT_ITR(0, msix_vect), 0x2);
 		ICE_WRITE_REG(hw, QINT_RQCTL(base_queue + i), val);
 		ICE_WRITE_REG(hw, QINT_TQCTL(base_queue + i), val_tx);
 	}
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.207144288 +0000
+++ 0052-net-ice-update-writeback-policy-to-reduce-latency.patch	2020-11-09 18:40:11.183312091 +0000
@@ -1 +1 @@
-From 8b20510a042aee6681c33c20bb076b53cb354708 Mon Sep 17 00:00:00 2001
+From d97dce73be24d6a4bdb1959cb24740a14a71e335 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8b20510a042aee6681c33c20bb076b53cb354708 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 51b99c6506..3483f99897 100644
+index cb71d7bfd4..8acfce00aa 100644
@@ -27 +28 @@
-@@ -3345,7 +3345,7 @@ __vsi_queues_bind_intr(struct ice_vsi *vsi, uint16_t msix_vect,
+@@ -2633,7 +2633,7 @@ __vsi_queues_bind_intr(struct ice_vsi *vsi, uint16_t msix_vect,

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

* [dpdk-stable] patch 'net/bnxt: fix boolean operator usage' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (50 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/ice: update writeback policy to reduce latency' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/i40e: fix flow director for eth + VLAN pattern' " luca.boccassi
                       ` (29 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/25bce6cab35c1db26eac436dee5e6c145468fd5f

Thanks.

Luca Boccassi

---
From 25bce6cab35c1db26eac436dee5e6c145468fd5f Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Thu, 22 Oct 2020 14:45:10 -0400
Subject: [PATCH] net/bnxt: fix boolean operator usage

[ upstream commit 47b70761670dc8b5bb8399df280476d9767b11df ]

Use boolean AND operator instead of bitwise operator.

Coverity issue: 323488
Fixes: b42c15c83e88 ("net/bnxt: support trusted VF")

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

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 65527a0637..6b69172990 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1088,7 +1088,7 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,
 	if (rc)
 		return rc;
 
-	if (BNXT_VF(bp) & !BNXT_VF_IS_TRUSTED(bp)) {
+	if (BNXT_VF(bp) && !BNXT_VF_IS_TRUSTED(bp)) {
 		PMD_DRV_LOG(ERR, "Cannot add MAC address to a VF interface\n");
 		return -ENOTSUP;
 	}
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.242912988 +0000
+++ 0053-net-bnxt-fix-boolean-operator-usage.patch	2020-11-09 18:40:11.183312091 +0000
@@ -1 +1 @@
-From 47b70761670dc8b5bb8399df280476d9767b11df Mon Sep 17 00:00:00 2001
+From 25bce6cab35c1db26eac436dee5e6c145468fd5f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 47b70761670dc8b5bb8399df280476d9767b11df ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 8025e33e9a..6757d36825 100644
+index 65527a0637..6b69172990 100644
@@ -22 +23 @@
-@@ -1550,7 +1550,7 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,
+@@ -1088,7 +1088,7 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,

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

* [dpdk-stable] patch 'net/i40e: fix flow director for eth + VLAN pattern' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (51 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/bnxt: fix boolean operator usage' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/ice: fix Rx offload flags in SSE path' " luca.boccassi
                       ` (28 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0d41210ce1b01327d7896a34fc39d090d5843235

Thanks.

Luca Boccassi

---
From 0d41210ce1b01327d7896a34fc39d090d5843235 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 7fe22e3007..d650544900 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -26,7 +26,10 @@
 #define I40E_IPV6_TC_MASK	(0xFF << I40E_FDIR_IPv6_TC_OFFSET)
 #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,
 			      const struct rte_flow_attr *attr,
@@ -2564,12 +2567,22 @@ 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) {
 				if (vlan_mask->inner_type != RTE_BE16(0xffff)) {
@@ -3423,10 +3436,10 @@ 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;
 			}
 			break;
@@ -3654,10 +3667,10 @@ 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;
 			}
 			break;
@@ -4274,7 +4287,7 @@ i40e_flow_parse_rss_pattern(__rte_unused struct rte_eth_dev *dev,
 			vlan_mask = item->mask;
 			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(
 						vlan_spec->tci) >> 13) & 0x7;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.279555026 +0000
+++ 0054-net-i40e-fix-flow-director-for-eth-VLAN-pattern.patch	2020-11-09 18:40:11.187312154 +0000
@@ -1 +1 @@
-From 81aebb47d1895ae34c7469faa2544433cc9bf6a6 Mon Sep 17 00:00:00 2001
+From 0d41210ce1b01327d7896a34fc39d090d5843235 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 7fe22e3007..d650544900 100644
@@ -30 +31 @@
-@@ -27,7 +27,10 @@
+@@ -26,7 +26,10 @@
@@ -42 +43 @@
-@@ -2705,12 +2708,22 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
+@@ -2564,12 +2567,22 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
@@ -70 +71 @@
-@@ -3894,10 +3907,10 @@ i40e_flow_parse_vxlan_pattern(__rte_unused struct rte_eth_dev *dev,
+@@ -3423,10 +3436,10 @@ i40e_flow_parse_vxlan_pattern(__rte_unused struct rte_eth_dev *dev,
@@ -83 +84 @@
-@@ -4125,10 +4138,10 @@ i40e_flow_parse_nvgre_pattern(__rte_unused struct rte_eth_dev *dev,
+@@ -3654,10 +3667,10 @@ i40e_flow_parse_nvgre_pattern(__rte_unused struct rte_eth_dev *dev,
@@ -96 +97 @@
-@@ -4800,7 +4813,7 @@ i40e_flow_parse_rss_pattern(__rte_unused struct rte_eth_dev *dev,
+@@ -4274,7 +4287,7 @@ i40e_flow_parse_rss_pattern(__rte_unused struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/ice: fix Rx offload flags in SSE path' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (52 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/i40e: fix flow director for eth + VLAN pattern' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'ethdev: move non-offload capabilities' " luca.boccassi
                       ` (27 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e72c273e839add5b0b85e9495c2db0bf5690a9af

Thanks.

Luca Boccassi

---
From e72c273e839add5b0b85e9495c2db0bf5690a9af Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Fri, 23 Oct 2020 10:13:22 +0800
Subject: [PATCH] net/ice: fix Rx offload flags in SSE path

[ upstream commit bdc027118814781740065d962ce3dcb39ecebea0 ]

Update reading offload flags of last two of four packets.

Fixes: ece1f8a8f1c8 ("net/ice: switch to flexible descriptor in SSE path")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_rxtx_vec_sse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_rxtx_vec_sse.c b/drivers/net/ice/ice_rxtx_vec_sse.c
index cfa65aae91..af7286783d 100644
--- a/drivers/net/ice/ice_rxtx_vec_sse.c
+++ b/drivers/net/ice/ice_rxtx_vec_sse.c
@@ -140,7 +140,7 @@ ice_rx_desc_to_olflags_v(struct ice_rx_queue *rxq, __m128i descs[4],
 	flags = _mm_unpackhi_epi32(descs[0], descs[1]);
 	tmp_desc = _mm_unpackhi_epi32(descs[2], descs[3]);
 	tmp_desc = _mm_unpacklo_epi64(flags, tmp_desc);
-	tmp_desc = _mm_and_si128(flags, desc_mask);
+	tmp_desc = _mm_and_si128(tmp_desc, desc_mask);
 
 	/* checksum flags */
 	tmp_desc = _mm_srli_epi32(tmp_desc, 4);
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.315334017 +0000
+++ 0055-net-ice-fix-Rx-offload-flags-in-SSE-path.patch	2020-11-09 18:40:11.187312154 +0000
@@ -1 +1 @@
-From bdc027118814781740065d962ce3dcb39ecebea0 Mon Sep 17 00:00:00 2001
+From e72c273e839add5b0b85e9495c2db0bf5690a9af Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bdc027118814781740065d962ce3dcb39ecebea0 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index e950c1b922..626364719b 100644
+index cfa65aae91..af7286783d 100644
@@ -21 +22 @@
-@@ -159,7 +159,7 @@ ice_rx_desc_to_olflags_v(struct ice_rx_queue *rxq, __m128i descs[4],
+@@ -140,7 +140,7 @@ ice_rx_desc_to_olflags_v(struct ice_rx_queue *rxq, __m128i descs[4],

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

* [dpdk-stable] patch 'ethdev: move non-offload capabilities' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (53 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/ice: fix Rx offload flags in SSE path' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/ice/base: fix parameter name in comment' " luca.boccassi
                       ` (26 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f03080aa7d797cf630881ba56d4167744b06d5c1

Thanks.

Luca Boccassi

---
From f03080aa7d797cf630881ba56d4167744b06d5c1 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 51f9f2569f..017459e595 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1160,17 +1160,20 @@ struct rte_eth_conf {
 #define DEV_TX_OFFLOAD_IP_TNL_TSO       0x00080000
 /** Device supports outer UDP checksum */
 #define DEV_TX_OFFLOAD_OUTER_UDP_CKSUM  0x00100000
-
-#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
  * mentioned in rte_tx_offload_names in rte_ethdev.c file.
  */
 
+/**@{@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.
  * These are used if an application requests default parameters
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.345800073 +0000
+++ 0056-ethdev-move-non-offload-capabilities.patch	2020-11-09 18:40:11.191312216 +0000
@@ -1 +1 @@
-From e9ef7ec12be0764924b6eebfe2f00b15ed0345ff Mon Sep 17 00:00:00 2001
+From f03080aa7d797cf630881ba56d4167744b06d5c1 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 51f9f2569f..017459e595 100644
@@ -27,5 +28,4 @@
-@@ -1419,18 +1419,20 @@ struct rte_eth_conf {
-  * The mbuf field and flag are registered when the offload is configured.
-  */
- #define DEV_TX_OFFLOAD_SEND_ON_TIMESTAMP 0x00200000
--
+@@ -1160,17 +1160,20 @@ struct rte_eth_conf {
+ #define DEV_TX_OFFLOAD_IP_TNL_TSO       0x00080000
+ /** Device supports outer UDP checksum */
+ #define DEV_TX_OFFLOAD_OUTER_UDP_CKSUM  0x00100000

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

* [dpdk-stable] patch 'net/ice/base: fix parameter name in comment' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (54 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'ethdev: move non-offload capabilities' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/bnxt: increase size of Rx CQ' " luca.boccassi
                       ` (25 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Jesse Brandeburg, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f0a92d238633a76170680c314586b0e674129eda

Thanks.

Luca Boccassi

---
From f0a92d238633a76170680c314586b0e674129eda Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 20 Oct 2020 09:06:01 +0800
Subject: [PATCH] net/ice/base: fix parameter name in comment

[ upstream commit c675d5f852c37208640737b83398028186a12e46 ]

Fix parameter name for cookie_high and cookie_low.

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

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_adminq_cmd.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/base/ice_adminq_cmd.h b/drivers/net/ice/base/ice_adminq_cmd.h
index 2118247a7f..a99670d51e 100644
--- a/drivers/net/ice/base/ice_adminq_cmd.h
+++ b/drivers/net/ice/base/ice_adminq_cmd.h
@@ -2164,8 +2164,8 @@ struct ice_aqc_event_lan_overflow {
  * @opcode: AQ command opcode
  * @datalen: length in bytes of indirect/external data buffer
  * @retval: return value from firmware
- * @cookie_h: opaque data high-half
- * @cookie_l: opaque data low-half
+ * @cookie_high: opaque data high-half
+ * @cookie_low: opaque data low-half
  * @params: command-specific parameters
  *
  * Descriptor format for commands the driver posts on the Admin Transmit Queue
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.382179192 +0000
+++ 0057-net-ice-base-fix-parameter-name-in-comment.patch	2020-11-09 18:40:11.191312216 +0000
@@ -1 +1 @@
-From c675d5f852c37208640737b83398028186a12e46 Mon Sep 17 00:00:00 2001
+From f0a92d238633a76170680c314586b0e674129eda Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c675d5f852c37208640737b83398028186a12e46 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 3b75cf577a..c105a445ee 100644
+index 2118247a7f..a99670d51e 100644
@@ -22 +23 @@
-@@ -2652,8 +2652,8 @@ struct ice_aqc_clear_health_status {
+@@ -2164,8 +2164,8 @@ struct ice_aqc_event_lan_overflow {

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

* [dpdk-stable] patch 'net/bnxt: increase size of Rx CQ' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (55 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/ice/base: fix parameter name in comment' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/bnxt: fix resetting mbuf data offset' " luca.boccassi
                       ` (24 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Qingmin Liu, Randy Schacher, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d800f1ad66c56eea3cddc51e0a42d092315cf8ab

Thanks.

Luca Boccassi

---
From d800f1ad66c56eea3cddc51e0a42d092315cf8ab Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Sun, 25 Oct 2020 20:56:13 -0700
Subject: [PATCH] net/bnxt: increase size of Rx CQ

[ upstream commit 45c6e1c66a4b5d7374e864502dc2fdb1ee71ceae ]

LRO aka TPA and jumbo frame support uses aggregation ring for placing
Rx buffers. These features can generate multiple Rx completions for a
single Rx packet. Increase size of Rx Completion Queue to handle TPA
and aggregation ring events.

Fixes: daef48efe5e5 ("net/bnxt: support set MTU")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Qingmin Liu <qingmin.liu@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
---
 drivers/net/bnxt/bnxt_ring.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_ring.h b/drivers/net/bnxt/bnxt_ring.h
index 9913aed05e..f8442edb66 100644
--- a/drivers/net/bnxt/bnxt_ring.h
+++ b/drivers/net/bnxt/bnxt_ring.h
@@ -27,7 +27,7 @@
 #define DEFAULT_RX_RING_SIZE	256
 #define DEFAULT_TX_RING_SIZE	256
 
-#define AGG_RING_SIZE_FACTOR	2
+#define AGG_RING_SIZE_FACTOR	4
 #define AGG_RING_MULTIPLIER	2
 
 /* These assume 4k pages */
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.414840521 +0000
+++ 0058-net-bnxt-increase-size-of-Rx-CQ.patch	2020-11-09 18:40:11.191312216 +0000
@@ -1 +1 @@
-From 45c6e1c66a4b5d7374e864502dc2fdb1ee71ceae Mon Sep 17 00:00:00 2001
+From d800f1ad66c56eea3cddc51e0a42d092315cf8ab Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 45c6e1c66a4b5d7374e864502dc2fdb1ee71ceae ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index daf9804956..3d81f610c1 100644
+index 9913aed05e..f8442edb66 100644

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/bnxt: fix resetting mbuf data offset' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (56 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/bnxt: increase size of Rx CQ' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/bnxt: fix Rx performance by removing spinlock' " luca.boccassi
                       ` (23 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Lance Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d9d122771dd5f78c3be9c955a0ff53332729bbe9

Thanks.

Luca Boccassi

---
From d9d122771dd5f78c3be9c955a0ff53332729bbe9 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 32eaf75ed5..5afe5c4f36 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -145,6 +145,7 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq,
 	tpa_info->mbuf = mbuf;
 	tpa_info->len = rte_le_to_cpu_32(tpa_start->len);
 
+	mbuf->data_off = RTE_PKTMBUF_HEADROOM;
 	mbuf->nb_segs = 1;
 	mbuf->next = NULL;
 	mbuf->pkt_len = rte_le_to_cpu_32(tpa_start->len);
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.443888361 +0000
+++ 0059-net-bnxt-fix-resetting-mbuf-data-offset.patch	2020-11-09 18:40:11.191312216 +0000
@@ -1 +1 @@
-From 3cefa72935fde04824fdfbee9c435c08278ab3c2 Mon Sep 17 00:00:00 2001
+From d9d122771dd5f78c3be9c955a0ff53332729bbe9 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 32eaf75ed5..5afe5c4f36 100644
@@ -23 +24 @@
-@@ -150,6 +150,7 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq,
+@@ -145,6 +145,7 @@ static void bnxt_tpa_start(struct bnxt_rx_queue *rxq,

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/bnxt: fix Rx performance by removing spinlock' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (57 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/bnxt: fix resetting mbuf data offset' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/mlx: do not enforce RSS hash offload' " luca.boccassi
                       ` (22 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Rahul Gupta; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/08dcf505033ab43e18b60e0fb8a07279c19a26ca

Thanks.

Luca Boccassi

---
From 08dcf505033ab43e18b60e0fb8a07279c19a26ca Mon Sep 17 00:00:00 2001
From: Rahul Gupta <rahul.gupta@broadcom.com>
Date: Sun, 25 Oct 2020 20:56:16 -0700
Subject: [PATCH] net/bnxt: fix Rx performance by removing spinlock

[ upstream commit 33ac72d741b72c03350f89215df4eceb73cb61d8 ]

The spinlock was trying to protect scenarios where rx_queue stop/start
could be initiated dynamically. Assigning bnxt_dummy_recv_pkts and
bnxt_dummy_xmit_pkts immediately to avoid concurrent access of mbuf in Rx
and cleanup path should help achieve the same result.

Fixes: 14255b351537 ("net/bnxt: fix queue start/stop operations")

Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
---
 drivers/net/bnxt/bnxt.h     |  5 +++++
 drivers/net/bnxt/bnxt_cpr.c | 12 ++++++++++++
 drivers/net/bnxt/bnxt_cpr.h |  1 +
 drivers/net/bnxt/bnxt_rxq.c |  4 ----
 drivers/net/bnxt/bnxt_rxq.h |  3 ---
 drivers/net/bnxt/bnxt_rxr.c |  5 +----
 drivers/net/bnxt/bnxt_rxr.h |  2 --
 drivers/net/bnxt/bnxt_txr.h |  2 --
 8 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 78249be6c7..3700a277c7 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -683,6 +683,11 @@ bool is_bnxt_supported(struct rte_eth_dev *dev);
 bool bnxt_stratus_device(struct bnxt *bp);
 int bnxt_link_update_op(struct rte_eth_dev *eth_dev,
 			int wait_to_complete);
+uint16_t bnxt_dummy_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+			      uint16_t nb_pkts);
+uint16_t bnxt_dummy_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
+			      uint16_t nb_pkts);
+
 extern const struct rte_flow_ops bnxt_flow_ops;
 #define bnxt_acquire_flow_lock(bp) \
 	pthread_mutex_lock(&(bp)->flow_lock)
diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index ba9933dc9b..26c7dae88f 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -76,6 +76,12 @@ void bnxt_handle_async_event(struct bnxt *bp,
 		PMD_DRV_LOG(INFO, "Port conn async event\n");
 		break;
 	case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_RESET_NOTIFY:
+		/*
+		 * Avoid any rx/tx packet processing during firmware reset
+		 * operation.
+		 */
+		bnxt_stop_rxtx(bp);
+
 		/* Ignore reset notify async events when stopping the port */
 		if (!bp->eth_dev->data->dev_started) {
 			bp->flags |= BNXT_FLAG_FATAL_ERROR;
@@ -282,3 +288,9 @@ bool bnxt_is_recovery_enabled(struct bnxt *bp)
 
 	return false;
 }
+
+void bnxt_stop_rxtx(struct bnxt *bp)
+{
+	bp->eth_dev->rx_pkt_burst = &bnxt_dummy_recv_pkts;
+	bp->eth_dev->tx_pkt_burst = &bnxt_dummy_xmit_pkts;
+}
diff --git a/drivers/net/bnxt/bnxt_cpr.h b/drivers/net/bnxt/bnxt_cpr.h
index cccd6cdbe0..ff9697f4c8 100644
--- a/drivers/net/bnxt/bnxt_cpr.h
+++ b/drivers/net/bnxt/bnxt_cpr.h
@@ -126,4 +126,5 @@ void bnxt_wait_for_device_shutdown(struct bnxt *bp);
 bool bnxt_is_recovery_enabled(struct bnxt *bp);
 bool bnxt_is_master_func(struct bnxt *bp);
 
+void bnxt_stop_rxtx(struct bnxt *bp);
 #endif
diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index bb0196670a..d08ba6c3ca 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -204,8 +204,6 @@ void bnxt_rx_queue_release_mbufs(struct bnxt_rx_queue *rxq)
 	if (!rxq || !rxq->rx_ring)
 		return;
 
-	rte_spinlock_lock(&rxq->lock);
-
 	sw_ring = rxq->rx_ring->rx_buf_ring;
 	if (sw_ring) {
 		for (i = 0;
@@ -241,7 +239,6 @@ void bnxt_rx_queue_release_mbufs(struct bnxt_rx_queue *rxq)
 		}
 	}
 
-	rte_spinlock_unlock(&rxq->lock);
 }
 
 void bnxt_free_rx_mbufs(struct bnxt *bp)
@@ -381,7 +378,6 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
 		rxq->rx_started = true;
 	}
 	eth_dev->data->rx_queue_state[queue_idx] = queue_state;
-	rte_spinlock_init(&rxq->lock);
 
 	/* Configure mtu if it is different from what was configured before */
 	if (!queue_idx)
diff --git a/drivers/net/bnxt/bnxt_rxq.h b/drivers/net/bnxt/bnxt_rxq.h
index b722eeb2c8..ae3badb7a0 100644
--- a/drivers/net/bnxt/bnxt_rxq.h
+++ b/drivers/net/bnxt/bnxt_rxq.h
@@ -13,9 +13,6 @@ struct bnxt;
 struct bnxt_rx_ring_info;
 struct bnxt_cp_ring_info;
 struct bnxt_rx_queue {
-	rte_spinlock_t		lock;	/* Synchronize between rx_queue_stop
-					 * and fast path
-					 */
 	struct rte_mempool	*mb_pool; /* mbuf pool for RX ring */
 	struct rte_mbuf		*pkt_first_seg; /* 1st seg of pkt */
 	struct rte_mbuf		*pkt_last_seg; /* Last seg of pkt */
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 5afe5c4f36..136f0a2742 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -619,8 +619,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		return 0;
 
 	/* If Rx Q was stopped return */
-	if (unlikely(!rxq->rx_started ||
-		     !rte_spinlock_trylock(&rxq->lock)))
+	if (unlikely(!rxq->rx_started))
 		return 0;
 
 	/* Handle RX burst request */
@@ -702,8 +701,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 	}
 
 done:
-	rte_spinlock_unlock(&rxq->lock);
-
 	return nb_rx_pkts;
 }
 
diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
index 76bf88d707..410b46016b 100644
--- a/drivers/net/bnxt/bnxt_rxr.h
+++ b/drivers/net/bnxt/bnxt_rxr.h
@@ -212,8 +212,6 @@ struct bnxt_rx_ring_info {
 
 uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 			       uint16_t nb_pkts);
-uint16_t bnxt_dummy_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
-			      uint16_t nb_pkts);
 void bnxt_free_rx_rings(struct bnxt *bp);
 int bnxt_init_rx_ring_struct(struct bnxt_rx_queue *rxq, unsigned int socket_id);
 int bnxt_init_one_rx_ring(struct bnxt_rx_queue *rxq);
diff --git a/drivers/net/bnxt/bnxt_txr.h b/drivers/net/bnxt/bnxt_txr.h
index e7f43f9d1d..08fd2e0142 100644
--- a/drivers/net/bnxt/bnxt_txr.h
+++ b/drivers/net/bnxt/bnxt_txr.h
@@ -57,8 +57,6 @@ int bnxt_init_one_tx_ring(struct bnxt_tx_queue *txq);
 int bnxt_init_tx_ring_struct(struct bnxt_tx_queue *txq, unsigned int socket_id);
 uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			       uint16_t nb_pkts);
-uint16_t bnxt_dummy_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
-			      uint16_t nb_pkts);
 #ifdef RTE_ARCH_X86
 uint16_t bnxt_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 			    uint16_t nb_pkts);
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.474882719 +0000
+++ 0060-net-bnxt-fix-Rx-performance-by-removing-spinlock.patch	2020-11-09 18:40:11.195312278 +0000
@@ -1 +1 @@
-From 33ac72d741b72c03350f89215df4eceb73cb61d8 Mon Sep 17 00:00:00 2001
+From 08dcf505033ab43e18b60e0fb8a07279c19a26ca Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 33ac72d741b72c03350f89215df4eceb73cb61d8 ]
+
@@ -17 +19 @@
- drivers/net/bnxt/bnxt.h     |  4 ++++
+ drivers/net/bnxt/bnxt.h     |  5 +++++
@@ -25 +27 @@
- 8 files changed, 18 insertions(+), 15 deletions(-)
+ 8 files changed, 19 insertions(+), 15 deletions(-)
@@ -28 +30 @@
-index 57178192d2..90ced972c0 100644
+index 78249be6c7..3700a277c7 100644
@@ -31,2 +33,2 @@
-@@ -890,6 +890,10 @@ void bnxt_print_link_info(struct rte_eth_dev *eth_dev);
- uint16_t bnxt_rss_hash_tbl_size(const struct bnxt *bp);
+@@ -683,6 +683,11 @@ bool is_bnxt_supported(struct rte_eth_dev *dev);
+ bool bnxt_stratus_device(struct bnxt *bp);
@@ -39 +41 @@
- 
++
@@ -41 +43,2 @@
- 
+ #define bnxt_acquire_flow_lock(bp) \
+ 	pthread_mutex_lock(&(bp)->flow_lock)
@@ -43 +46 @@
-index 91d1ffe46c..ee96ae81bf 100644
+index ba9933dc9b..26c7dae88f 100644
@@ -46 +49 @@
-@@ -121,6 +121,12 @@ void bnxt_handle_async_event(struct bnxt *bp,
+@@ -76,6 +76,12 @@ void bnxt_handle_async_event(struct bnxt *bp,
@@ -59 +62 @@
-@@ -337,3 +343,9 @@ bool bnxt_is_recovery_enabled(struct bnxt *bp)
+@@ -282,3 +288,9 @@ bool bnxt_is_recovery_enabled(struct bnxt *bp)
@@ -80 +83 @@
-index 78514143e5..e0ec342162 100644
+index bb0196670a..d08ba6c3ca 100644
@@ -83 +86 @@
-@@ -210,8 +210,6 @@ void bnxt_rx_queue_release_mbufs(struct bnxt_rx_queue *rxq)
+@@ -204,8 +204,6 @@ void bnxt_rx_queue_release_mbufs(struct bnxt_rx_queue *rxq)
@@ -92 +95 @@
-@@ -248,7 +246,6 @@ void bnxt_rx_queue_release_mbufs(struct bnxt_rx_queue *rxq)
+@@ -241,7 +239,6 @@ void bnxt_rx_queue_release_mbufs(struct bnxt_rx_queue *rxq)
@@ -100 +103 @@
-@@ -389,7 +386,6 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
+@@ -381,7 +378,6 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
@@ -109 +112 @@
-index 201bda2269..c72105cf06 100644
+index b722eeb2c8..ae3badb7a0 100644
@@ -112 +115 @@
-@@ -16,9 +16,6 @@ struct bnxt;
+@@ -13,9 +13,6 @@ struct bnxt;
@@ -120,2 +123,2 @@
- 	uint64_t		mbuf_initializer; /* val to init mbuf */
- 	uint16_t		nb_rx_desc; /* num of RX desc */
+ 	struct rte_mbuf		*pkt_first_seg; /* 1st seg of pkt */
+ 	struct rte_mbuf		*pkt_last_seg; /* Last seg of pkt */
@@ -123 +126 @@
-index 4d0ab604f3..e375b31ed8 100644
+index 5afe5c4f36..136f0a2742 100644
@@ -126 +129 @@
-@@ -843,8 +843,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -619,8 +619,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -135,2 +138,2 @@
- #if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
-@@ -946,8 +945,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+ 	/* Handle RX burst request */
+@@ -702,8 +701,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -146 +149 @@
-index f9e60d01c2..3fc901fdf0 100644
+index 76bf88d707..410b46016b 100644
@@ -149 +152 @@
-@@ -77,8 +77,6 @@ struct bnxt_rx_ring_info {
+@@ -212,8 +212,6 @@ struct bnxt_rx_ring_info {
@@ -159 +162 @@
-index d241227d4c..3dfc8ef9b4 100644
+index e7f43f9d1d..08fd2e0142 100644
@@ -162 +165 @@
-@@ -49,8 +49,6 @@ int bnxt_init_one_tx_ring(struct bnxt_tx_queue *txq);
+@@ -57,8 +57,6 @@ int bnxt_init_one_tx_ring(struct bnxt_tx_queue *txq);
@@ -168 +171 @@
- #if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
+ #ifdef RTE_ARCH_X86

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/mlx: do not enforce RSS hash offload' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (58 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/bnxt: fix Rx performance by removing spinlock' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/vdev_netvsc: fix device probing error flow' " luca.boccassi
                       ` (21 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Andrew Rybchenko, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/247f3abafd373c621aace1cf70bfa4504ab169c7

Thanks.

Luca Boccassi

---
From 247f3abafd373c621aace1cf70bfa4504ab169c7 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@mellanox.com>
Date: Tue, 27 Oct 2020 15:14:36 +0000
Subject: [PATCH] net/mlx: do not enforce RSS hash offload

[ upstream commit 6db1fde3891c493b9d352487fc8b6384cc6d06f3 ]

Rx RSS hash offload should be controlled by the user
and should not be enforced by RSS multi-queue Rx mode.

Fixes: 8b945a7f7dcb ("drivers/net: update Rx RSS hash offload capabilities")

Author: Andrew Rybchenko <arybchenko@solarflare.com>
Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx4/mlx4.c        | 3 ---
 drivers/net/mlx5/mlx5_ethdev.c | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 9dda4ef330..8de265230d 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -252,9 +252,6 @@ mlx4_dev_configure(struct rte_eth_dev *dev)
 	struct rte_flow_error error;
 	int ret;
 
-	if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)
-		dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
-
 	/* Prepare internal flow rules. */
 	ret = mlx4_flow_sync(priv, &error);
 	if (ret) {
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index ef332536ee..a6a091259e 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -405,9 +405,6 @@ mlx5_dev_configure(struct rte_eth_dev *dev)
 		return -rte_errno;
 	}
 
-	if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)
-		dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
-
 	memcpy(priv->rss_conf.rss_key,
 	       use_app_rss_key ?
 	       dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key :
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.507850592 +0000
+++ 0061-net-mlx-do-not-enforce-RSS-hash-offload.patch	2020-11-09 18:40:11.195312278 +0000
@@ -1 +1 @@
-From 6db1fde3891c493b9d352487fc8b6384cc6d06f3 Mon Sep 17 00:00:00 2001
+From 247f3abafd373c621aace1cf70bfa4504ab169c7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6db1fde3891c493b9d352487fc8b6384cc6d06f3 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -17,2 +18,2 @@
- drivers/net/mlx5/mlx5_ethdev.c | 2 --
- 2 files changed, 5 deletions(-)
+ drivers/net/mlx5/mlx5_ethdev.c | 3 ---
+ 2 files changed, 6 deletions(-)
@@ -21 +22 @@
-index 34c2bbb373..d5d8c96351 100644
+index 9dda4ef330..8de265230d 100644
@@ -24 +25 @@
-@@ -249,9 +249,6 @@ mlx4_dev_configure(struct rte_eth_dev *dev)
+@@ -252,9 +252,6 @@ mlx4_dev_configure(struct rte_eth_dev *dev)
@@ -35 +36 @@
-index 2cd05c5f80..ee97480dcb 100644
+index ef332536ee..a6a091259e 100644
@@ -38 +39 @@
-@@ -85,8 +85,6 @@ mlx5_dev_configure(struct rte_eth_dev *dev)
+@@ -405,9 +405,6 @@ mlx5_dev_configure(struct rte_eth_dev *dev)
@@ -44,3 +45,4 @@
- 	if ((dev->data->dev_conf.txmode.offloads &
- 			DEV_TX_OFFLOAD_SEND_ON_TIMESTAMP) &&
- 			rte_mbuf_dyn_tx_timestamp_register(NULL, NULL) != 0) {
+-
+ 	memcpy(priv->rss_conf.rss_key,
+ 	       use_app_rss_key ?
+ 	       dev->data->dev_conf.rx_adv_conf.rss_conf.rss_key :

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/vdev_netvsc: fix device probing error flow' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (59 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/mlx: do not enforce RSS hash offload' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/hns3: fix RSS max queue id allowed in multi-TC' " luca.boccassi
                       ` (20 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Long Li; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/201ebb769bed8d45b49bc1da825a0b76d41ef11a

Thanks.

Luca Boccassi

---
From 201ebb769bed8d45b49bc1da825a0b76d41ef11a 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 be8f19c0c6..48081b9146 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -673,6 +673,7 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
 	int ret;
 
 	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");
 		goto error;
@@ -688,17 +689,13 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
 			 !strcmp(pair->key, VDEV_NETVSC_ARG_MAC))
 			++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"
 			" device.");
 		goto error;
 	}
-	rte_eal_alarm_cancel(vdev_netvsc_alarm, NULL);
 	/* Gather interfaces. */
 	ret = vdev_netvsc_foreach_iface(vdev_netvsc_netvsc_probe, 1, name,
 					kvargs, specified, &matched);
@@ -719,17 +716,19 @@ 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.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.538950910 +0000
+++ 0062-net-vdev_netvsc-fix-device-probing-error-flow.patch	2020-11-09 18:40:11.199312340 +0000
@@ -1 +1 @@
-From 702b27d3fc4b82643d08d4b072e6d61b6d73e6be Mon Sep 17 00:00:00 2001
+From 201ebb769bed8d45b49bc1da825a0b76d41ef11a 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 be8f19c0c6..48081b9146 100644
@@ -25 +26 @@
-@@ -671,6 +671,7 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
+@@ -673,6 +673,7 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
@@ -33 +34 @@
-@@ -686,17 +687,13 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
+@@ -688,17 +689,13 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
@@ -53 +54 @@
-@@ -717,17 +714,19 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)
+@@ -719,17 +716,19 @@ vdev_netvsc_vdev_probe(struct rte_vdev_device *dev)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix RSS max queue id allowed in multi-TC' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (60 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/vdev_netvsc: fix device probing error flow' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/hns3: fix data type to store queue number' " luca.boccassi
                       ` (19 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Huisong Li; +Cc: Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8d16746bf8be2e188090f9342de4a206bffe704e

Thanks.

Luca Boccassi

---
From 8d16746bf8be2e188090f9342de4a206bffe704e Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Thu, 29 Oct 2020 20:51:51 +0800
Subject: [PATCH] net/hns3: fix RSS max queue id allowed in multi-TC

[ upstream commit 5e76dfc33ff4e0523e52ba6b7d815640a3379140 ]

Currently, driver uses the maximum number of queues configured by user
as the maximum queue id that can be specified by the RSS rule or the
reta_update api. It is unreasonable and may trigger an incorrect
behavior in the multi-TC scenario. The driver must ensure that the queue
id configured in the redirection table must be within the range of the
number of queues allocated to a TC.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 45 +++++++++++++++---------------------
 drivers/net/hns3/hns3_rss.c  | 13 +++++------
 2 files changed, 24 insertions(+), 34 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 21dd126ffe..bd2d4ab3bc 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1272,13 +1272,18 @@ hns3_parse_rss_filter(struct rte_eth_dev *dev,
 					  act, "no valid queues");
 	}
 
+	if (rss->queue_num > RTE_DIM(rss_conf->queue))
+		return rte_flow_error_set(error, ENOTSUP,
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, act,
+					  "queue number configured exceeds "
+					  "queue buffer size driver supported");
+
 	for (n = 0; n < rss->queue_num; n++) {
-		if (rss->queue[n] < dev->data->nb_rx_queues)
+		if (rss->queue[n] < hw->alloc_rss_size)
 			continue;
 		return rte_flow_error_set(error, EINVAL,
-					  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
-					  act,
-					  "queue id > max number of queues");
+					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, act,
+					  "queue id must be less than queue number allocated to a TC");
 	}
 
 	if (!(rss->types & HNS3_ETH_RSS_SUPPORT) && rss->types)
@@ -1299,10 +1304,6 @@ hns3_parse_rss_filter(struct rte_eth_dev *dev,
 		return rte_flow_error_set(error, ENOTSUP,
 					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, act,
 					  "RSS hash key must be exactly 40 bytes");
-	if (rss->queue_num > RTE_DIM(rss_conf->queue))
-		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_ACTION_CONF, act,
-					  "too many queues for RSS context");
 
 	act_index++;
 
@@ -1338,9 +1339,8 @@ hns3_disable_rss(struct hns3_hw *hw)
 static void
 hns3_parse_rss_key(struct hns3_hw *hw, struct rte_flow_action_rss *rss_conf)
 {
-	if (rss_conf->key == NULL ||
-	    rss_conf->key_len < HNS3_RSS_KEY_SIZE) {
-		hns3_info(hw, "Default RSS hash key to be set");
+	if (rss_conf->key == NULL || rss_conf->key_len < HNS3_RSS_KEY_SIZE) {
+		hns3_warn(hw, "Default RSS hash key to be set");
 		rss_conf->key = hns3_hash_key;
 		rss_conf->key_len = HNS3_RSS_KEY_SIZE;
 	}
@@ -1381,10 +1381,8 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
 	struct hns3_rss_tuple_cfg *tuple;
 	int ret;
 
-	/* Parse hash key */
 	hns3_parse_rss_key(hw, rss_config);
 
-	/* Parse hash algorithm */
 	ret = hns3_parse_rss_algorithm(hw, &rss_config->func, &hash_algo);
 	if (ret)
 		return ret;
@@ -1412,21 +1410,19 @@ hns3_update_indir_table(struct rte_eth_dev *dev,
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
 	uint8_t indir_tbl[HNS3_RSS_IND_TBL_SIZE];
-	uint16_t j, allow_rss_queues;
+	uint16_t j;
 	uint8_t queue_id;
 	uint32_t i;
 
-	allow_rss_queues = RTE_MIN(dev->data->nb_rx_queues, hw->rss_size_max);
 	/* Fill in redirection table */
 	memcpy(indir_tbl, hw->rss_info.rss_indirection_tbl,
 	       HNS3_RSS_IND_TBL_SIZE);
 	for (i = 0, j = 0; i < HNS3_RSS_IND_TBL_SIZE; i++, j++) {
 		j %= num;
-		if (conf->queue[j] >= allow_rss_queues) {
-			hns3_err(hw, "Invalid queue id(%u) to be set in "
-				     "redirection table, max number of rss "
-				     "queues: %u", conf->queue[j],
-				 allow_rss_queues);
+		if (conf->queue[j] >= hw->alloc_rss_size) {
+			hns3_err(hw, "queue id(%u) set to redirection table "
+				 "exceeds queue number(%u) allocated to a TC.",
+				 conf->queue[j], hw->alloc_rss_size);
 			return -EINVAL;
 		}
 		queue_id = conf->queue[j];
@@ -1513,11 +1509,8 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
 		return 0;
 	}
 
-	/* Get rx queues num */
-	num = dev->data->nb_rx_queues;
-
 	/* Set rx queues to use */
-	num = RTE_MIN(num, rss_flow_conf.queue_num);
+	num = RTE_MIN(dev->data->nb_rx_queues, rss_flow_conf.queue_num);
 	if (rss_flow_conf.queue_num > num)
 		hns3_warn(hw, "Config queue numbers %u are beyond the scope of truncated",
 			  rss_flow_conf.queue_num);
@@ -1554,7 +1547,6 @@ rss_config_err:
 	return ret;
 }
 
-/* Remove the rss filter */
 static int
 hns3_clear_rss_filter(struct rte_eth_dev *dev)
 {
@@ -1590,7 +1582,6 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev)
 	return ret;
 }
 
-/* Restore the rss filter */
 int
 hns3_restore_rss_filter(struct rte_eth_dev *dev)
 {
@@ -1612,7 +1603,6 @@ hns3_flow_parse_rss(struct rte_eth_dev *dev,
 	struct hns3_hw *hw = &hns->hw;
 	bool ret;
 
-	/* Action rss same */
 	ret = hns3_action_rss_same(&hw->rss_info.conf, &conf->conf);
 	if (ret) {
 		hns3_err(hw, "Enter duplicate RSS configuration : %d", ret);
@@ -1770,6 +1760,7 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			ret = -ENOMEM;
 			goto err_fdir;
 		}
+
 		memcpy(&fdir_rule_ptr->fdir_conf, &fdir_rule,
 			sizeof(struct hns3_fdir_rule));
 		TAILQ_INSERT_TAIL(&process_list->fdir_list,
diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index a6cab29c93..a63d6ef725 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -358,7 +358,7 @@ hns3_dev_rss_reta_update(struct rte_eth_dev *dev,
 	struct hns3_rss_conf *rss_cfg = &hw->rss_info;
 	uint16_t i, indir_size = HNS3_RSS_IND_TBL_SIZE; /* Table size is 512 */
 	uint8_t indirection_tbl[HNS3_RSS_IND_TBL_SIZE];
-	uint16_t idx, shift, allow_rss_queues;
+	uint16_t idx, shift;
 	int ret;
 
 	if (reta_size != indir_size || reta_size > ETH_RSS_RETA_SIZE_512) {
@@ -370,16 +370,15 @@ hns3_dev_rss_reta_update(struct rte_eth_dev *dev,
 	rte_spinlock_lock(&hw->lock);
 	memcpy(indirection_tbl, rss_cfg->rss_indirection_tbl,
 		HNS3_RSS_IND_TBL_SIZE);
-	allow_rss_queues = RTE_MIN(dev->data->nb_rx_queues, hw->rss_size_max);
 	for (i = 0; i < reta_size; i++) {
 		idx = i / RTE_RETA_GROUP_SIZE;
 		shift = i % RTE_RETA_GROUP_SIZE;
-		if (reta_conf[idx].reta[shift] >= allow_rss_queues) {
+		if (reta_conf[idx].reta[shift] >= hw->alloc_rss_size) {
 			rte_spinlock_unlock(&hw->lock);
-			hns3_err(hw, "Invalid queue id(%u) to be set in "
-				 "redirection table, max number of rss "
-				 "queues: %u", reta_conf[idx].reta[shift],
-				 allow_rss_queues);
+			hns3_err(hw, "queue id(%u) set to redirection table "
+				 "exceeds queue number(%u) allocated to a TC",
+				 reta_conf[idx].reta[shift],
+				 hw->alloc_rss_size);
 			return -EINVAL;
 		}
 
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.569614065 +0000
+++ 0063-net-hns3-fix-RSS-max-queue-id-allowed-in-multi-TC.patch	2020-11-09 18:40:11.199312340 +0000
@@ -1 +1 @@
-From 5e76dfc33ff4e0523e52ba6b7d815640a3379140 Mon Sep 17 00:00:00 2001
+From 8d16746bf8be2e188090f9342de4a206bffe704e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5e76dfc33ff4e0523e52ba6b7d815640a3379140 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 73f5e8e37b..0d5dd1a7af 100644
+index 21dd126ffe..bd2d4ab3bc 100644
@@ -27 +28 @@
-@@ -1367,13 +1367,18 @@ hns3_parse_rss_filter(struct rte_eth_dev *dev,
+@@ -1272,13 +1272,18 @@ hns3_parse_rss_filter(struct rte_eth_dev *dev,
@@ -50 +51 @@
-@@ -1394,10 +1399,6 @@ hns3_parse_rss_filter(struct rte_eth_dev *dev,
+@@ -1299,10 +1304,6 @@ hns3_parse_rss_filter(struct rte_eth_dev *dev,
@@ -59,3 +60,3 @@
- 	/*
- 	 * For Kunpeng920 and Kunpeng930 NIC hardware, it is not supported to
-@@ -1450,9 +1451,8 @@ hns3_disable_rss(struct hns3_hw *hw)
+ 	act_index++;
+ 
+@@ -1338,9 +1339,8 @@ hns3_disable_rss(struct hns3_hw *hw)
@@ -73 +74 @@
-@@ -1493,10 +1493,8 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
+@@ -1381,10 +1381,8 @@ hns3_hw_rss_hash_set(struct hns3_hw *hw, struct rte_flow_action_rss *rss_config)
@@ -81,2 +82 @@
- 	ret = hns3_parse_rss_algorithm(hw, &rss_config->func,
- 				       &hw->rss_info.hash_algo);
+ 	ret = hns3_parse_rss_algorithm(hw, &rss_config->func, &hash_algo);
@@ -84 +84,2 @@
-@@ -1525,20 +1523,18 @@ hns3_update_indir_table(struct rte_eth_dev *dev,
+ 		return ret;
+@@ -1412,21 +1410,19 @@ hns3_update_indir_table(struct rte_eth_dev *dev,
@@ -87 +88 @@
- 	uint16_t indir_tbl[HNS3_RSS_IND_TBL_SIZE];
+ 	uint8_t indir_tbl[HNS3_RSS_IND_TBL_SIZE];
@@ -89,0 +91 @@
+ 	uint8_t queue_id;
@@ -95 +97 @@
- 	       sizeof(hw->rss_info.rss_indirection_tbl));
+ 	       HNS3_RSS_IND_TBL_SIZE);
@@ -109,2 +111,2 @@
- 		indir_tbl[i] = conf->queue[j];
-@@ -1607,11 +1603,8 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
+ 		queue_id = conf->queue[j];
+@@ -1513,11 +1509,8 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
@@ -123 +125 @@
-@@ -1648,7 +1641,6 @@ rss_config_err:
+@@ -1554,7 +1547,6 @@ rss_config_err:
@@ -131 +133 @@
-@@ -1684,7 +1676,6 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev)
+@@ -1590,7 +1582,6 @@ hns3_clear_rss_filter(struct rte_eth_dev *dev)
@@ -139 +141 @@
-@@ -1706,7 +1697,6 @@ hns3_flow_parse_rss(struct rte_eth_dev *dev,
+@@ -1612,7 +1603,6 @@ hns3_flow_parse_rss(struct rte_eth_dev *dev,
@@ -147 +149 @@
-@@ -1864,6 +1854,7 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -1770,6 +1760,7 @@ hns3_flow_create(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -156 +158 @@
-index 2efd410b4d..a4e552b221 100644
+index a6cab29c93..a63d6ef725 100644
@@ -159 +161 @@
-@@ -510,7 +510,7 @@ hns3_dev_rss_reta_update(struct rte_eth_dev *dev,
+@@ -358,7 +358,7 @@ hns3_dev_rss_reta_update(struct rte_eth_dev *dev,
@@ -162 +164 @@
- 	uint16_t indirection_tbl[HNS3_RSS_IND_TBL_SIZE];
+ 	uint8_t indirection_tbl[HNS3_RSS_IND_TBL_SIZE];
@@ -168 +170 @@
-@@ -522,16 +522,15 @@ hns3_dev_rss_reta_update(struct rte_eth_dev *dev,
+@@ -370,16 +370,15 @@ hns3_dev_rss_reta_update(struct rte_eth_dev *dev,
@@ -171 +173 @@
- 	       sizeof(rss_cfg->rss_indirection_tbl));
+ 		HNS3_RSS_IND_TBL_SIZE);

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix data type to store queue number' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (61 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/hns3: fix RSS max queue id allowed in multi-TC' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/hns3: check setting VF PCI bus return value' " luca.boccassi
                       ` (18 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Huisong Li; +Cc: Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/eb8dd4f623c4a895ea0e00e9e390d983b2d5dd95

Thanks.

Luca Boccassi

---
From eb8dd4f623c4a895ea0e00e9e390d983b2d5dd95 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Thu, 29 Oct 2020 20:51:54 +0800
Subject: [PATCH] net/hns3: fix data type to store queue number

[ upstream commit 708ecc07d23edff628008669401cfaf37a503ce8 ]

Currently, u8 type variable is used to control to release fake queues in
hns3_fake_rx/tx_queue_config function. Although there is no case in
which more than 256 fake queues are created in hns3 network engine, it
is unreasonable to compare u8 variable with u16 variable.

Fixes: a951c1ed3ab5 ("net/hns3: support different numbers of Rx and Tx queues")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index c1ffa136bd..5aee8cb995 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -991,7 +991,7 @@ hns3_fake_rx_queue_config(struct hns3_hw *hw, uint16_t nb_queues)
 {
 	uint16_t old_nb_queues = hw->fkq_data.nb_fake_rx_queues;
 	void **rxq;
-	uint8_t i;
+	uint16_t i;
 
 	if (hw->fkq_data.rx_queues == NULL && nb_queues != 0) {
 		/* first time configuration */
@@ -1038,7 +1038,7 @@ hns3_fake_tx_queue_config(struct hns3_hw *hw, uint16_t nb_queues)
 {
 	uint16_t old_nb_queues = hw->fkq_data.nb_fake_tx_queues;
 	void **txq;
-	uint8_t i;
+	uint16_t i;
 
 	if (hw->fkq_data.tx_queues == NULL && nb_queues != 0) {
 		/* first time configuration */
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.602582169 +0000
+++ 0064-net-hns3-fix-data-type-to-store-queue-number.patch	2020-11-09 18:40:11.199312340 +0000
@@ -1 +1 @@
-From 708ecc07d23edff628008669401cfaf37a503ce8 Mon Sep 17 00:00:00 2001
+From eb8dd4f623c4a895ea0e00e9e390d983b2d5dd95 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 708ecc07d23edff628008669401cfaf37a503ce8 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 3d5e4654c7..33864535b6 100644
+index c1ffa136bd..5aee8cb995 100644
@@ -24 +25 @@
-@@ -1378,7 +1378,7 @@ hns3_fake_rx_queue_config(struct hns3_hw *hw, uint16_t nb_queues)
+@@ -991,7 +991,7 @@ hns3_fake_rx_queue_config(struct hns3_hw *hw, uint16_t nb_queues)
@@ -33 +34 @@
-@@ -1425,7 +1425,7 @@ hns3_fake_tx_queue_config(struct hns3_hw *hw, uint16_t nb_queues)
+@@ -1038,7 +1038,7 @@ hns3_fake_tx_queue_config(struct hns3_hw *hw, uint16_t nb_queues)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/hns3: check setting VF PCI bus return value' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (62 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/hns3: fix data type to store queue number' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/enic: fix header sizes when copying flow patterns' " luca.boccassi
                       ` (17 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Hongbo Zheng; +Cc: Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8ce5fa4a5a81afc4af01a7b7c0aafae9fbe7d554

Thanks.

Luca Boccassi

---
From 8ce5fa4a5a81afc4af01a7b7c0aafae9fbe7d554 Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3@huawei.com>
Date: Thu, 29 Oct 2020 20:51:56 +0800
Subject: [PATCH] net/hns3: check setting VF PCI bus return value

[ upstream commit 7ac3ae7649985c54a10f6904c298918e00a07e92 ]

Currently hns3vf_reinit_dev only judge whether the return value of
setting PCI bus function is not 0, while it will return a negative
value when execute failed.

Fixes: 243651cb6c8c ("net/hns3: check PCI config space reads")

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 5d1da44155..b61616090b 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -2147,7 +2147,7 @@ hns3vf_reinit_dev(struct hns3_adapter *hns)
 	if (hw->reset.level == HNS3_VF_FULL_RESET) {
 		rte_intr_disable(&pci_dev->intr_handle);
 		ret = hns3vf_set_bus_master(pci_dev, true);
-		if (ret) {
+		if (ret < 0) {
 			hns3_err(hw, "failed to set pci bus, ret = %d", ret);
 			return ret;
 		}
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.635309865 +0000
+++ 0065-net-hns3-check-setting-VF-PCI-bus-return-value.patch	2020-11-09 18:40:11.203312403 +0000
@@ -1 +1 @@
-From 7ac3ae7649985c54a10f6904c298918e00a07e92 Mon Sep 17 00:00:00 2001
+From 8ce5fa4a5a81afc4af01a7b7c0aafae9fbe7d554 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7ac3ae7649985c54a10f6904c298918e00a07e92 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 9fb7941eb3..05a9341269 100644
+index 5d1da44155..b61616090b 100644
@@ -23 +24 @@
-@@ -2619,7 +2619,7 @@ hns3vf_reinit_dev(struct hns3_adapter *hns)
+@@ -2147,7 +2147,7 @@ hns3vf_reinit_dev(struct hns3_adapter *hns)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/enic: fix header sizes when copying flow patterns' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (63 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/hns3: check setting VF PCI bus return value' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/ena: fix getting xstats global stats offset' " luca.boccassi
                       ` (16 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: John Daley, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/87cb9574f46f2b70e0ad7cb08a3c6f58fc04123b

Thanks.

Luca Boccassi

---
From 87cb9574f46f2b70e0ad7cb08a3c6f58fc04123b Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim@cisco.com>
Date: Fri, 30 Oct 2020 00:27:49 -0700
Subject: [PATCH] net/enic: fix header sizes when copying flow patterns

[ upstream commit dd649913cca40dd2a7bbd50d63e82b8b75267795 ]

Several functions use sizeof(struct rte_flow_item_eth) and
sizeof(struct rte_flow_item_ipv6) when copying headers. These sizes
used to coincide with the sizes of rte_ether_hdr and
rte_ipv6_hdr. But, with recently added fields, rte_flow_item_eth and
rte_flow_item_ipv6 have grown in size. Use sizeof(rte_ether_hdr) and
sizeof(rte_ipv6_hdr) instead.

Coverity issue: 363572, 363573
Fixes: ea7768b5bba8 ("net/enic: add flow implementation based on Flow Manager API")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic_fm_flow.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/enic/enic_fm_flow.c b/drivers/net/enic/enic_fm_flow.c
index ab008c7356..e87988f48b 100644
--- a/drivers/net/enic/enic_fm_flow.c
+++ b/drivers/net/enic/enic_fm_flow.c
@@ -312,8 +312,8 @@ enic_fm_copy_item_eth(struct copy_item_args *arg)
 	fm_mask = &entry->ftm_mask.fk_hdrset[lvl];
 	fm_data->fk_header_select |= FKH_ETHER;
 	fm_mask->fk_header_select |= FKH_ETHER;
-	memcpy(&fm_data->l2.eth, spec, sizeof(*spec));
-	memcpy(&fm_mask->l2.eth, mask, sizeof(*mask));
+	memcpy(&fm_data->l2.eth, spec, sizeof(struct rte_ether_hdr));
+	memcpy(&fm_mask->l2.eth, mask, sizeof(struct rte_ether_hdr));
 	return 0;
 }
 
@@ -423,8 +423,8 @@ enic_fm_copy_item_ipv6(struct copy_item_args *arg)
 
 	fm_data->fk_header_select |= FKH_IPV6;
 	fm_mask->fk_header_select |= FKH_IPV6;
-	memcpy(&fm_data->l3.ip6, spec, sizeof(*spec));
-	memcpy(&fm_mask->l3.ip6, mask, sizeof(*mask));
+	memcpy(&fm_data->l3.ip6, spec, sizeof(struct rte_ipv6_hdr));
+	memcpy(&fm_mask->l3.ip6, mask, sizeof(struct rte_ipv6_hdr));
 	return 0;
 }
 
@@ -970,7 +970,7 @@ enic_fm_copy_vxlan_encap(struct enic_flowman *fm,
 	eth = (struct rte_ether_hdr *)template;
 	ethertype = &eth->ether_type;
 	append_template(&template, &off, item->spec,
-			sizeof(struct rte_flow_item_eth));
+			sizeof(struct rte_ether_hdr));
 	item++;
 	flow_item_skip_void(&item);
 	/* Optional VLAN */
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.667422237 +0000
+++ 0066-net-enic-fix-header-sizes-when-copying-flow-patterns.patch	2020-11-09 18:40:11.203312403 +0000
@@ -1 +1 @@
-From dd649913cca40dd2a7bbd50d63e82b8b75267795 Mon Sep 17 00:00:00 2001
+From 87cb9574f46f2b70e0ad7cb08a3c6f58fc04123b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dd649913cca40dd2a7bbd50d63e82b8b75267795 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 9cea94269c..86b91ed8b1 100644
+index ab008c7356..e87988f48b 100644
@@ -27 +28 @@
-@@ -368,8 +368,8 @@ enic_fm_copy_item_eth(struct copy_item_args *arg)
+@@ -312,8 +312,8 @@ enic_fm_copy_item_eth(struct copy_item_args *arg)
@@ -38 +39 @@
-@@ -479,8 +479,8 @@ enic_fm_copy_item_ipv6(struct copy_item_args *arg)
+@@ -423,8 +423,8 @@ enic_fm_copy_item_ipv6(struct copy_item_args *arg)
@@ -49 +50 @@
-@@ -1047,7 +1047,7 @@ enic_fm_copy_vxlan_encap(struct enic_flowman *fm,
+@@ -970,7 +970,7 @@ enic_fm_copy_vxlan_encap(struct enic_flowman *fm,

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/ena: fix getting xstats global stats offset' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (64 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/enic: fix header sizes when copying flow patterns' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/ena: fix setting Rx checksum flags in mbuf' " luca.boccassi
                       ` (15 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Michal Krawczyk; +Cc: Igor Chauskin, Guy Tzalik, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a9009414896e9aa0d9dd000f9e263908fd223dd7

Thanks.

Luca Boccassi

---
From a9009414896e9aa0d9dd000f9e263908fd223dd7 Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Fri, 30 Oct 2020 12:31:16 +0100
Subject: [PATCH] net/ena: fix getting xstats global stats offset

[ upstream commit 493107fd83a2848025dd42db67764bb0dc7943e0 ]

There was a bug in a code, which was reading stat_offset value from the
ena_stats_rx_strings array instead of ena_stats_global_strings.

It wasn't causing real problems just because ena_stats_rx_strings was
not smaller than ena_stats_global_strings and both arrays hold the same
offsets.

Fixes: 7830e905b7c9 ("net/ena: expose extended stats")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
---
 drivers/net/ena/ena_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index e8753ce010..a90d17ccc4 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -2479,7 +2479,7 @@ static int ena_xstats_get(struct rte_eth_dev *dev,
 		return 0;
 
 	for (stat = 0; stat < ENA_STATS_ARRAY_GLOBAL; stat++, count++) {
-		stat_offset = ena_stats_rx_strings[stat].stat_offset;
+		stat_offset = ena_stats_global_strings[stat].stat_offset;
 		stats_begin = &adapter->dev_stats;
 
 		xstats[count].id = count;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.699734643 +0000
+++ 0067-net-ena-fix-getting-xstats-global-stats-offset.patch	2020-11-09 18:40:11.207312465 +0000
@@ -1 +1 @@
-From 493107fd83a2848025dd42db67764bb0dc7943e0 Mon Sep 17 00:00:00 2001
+From a9009414896e9aa0d9dd000f9e263908fd223dd7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 493107fd83a2848025dd42db67764bb0dc7943e0 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index c513faf202..7ab9b93ba9 100644
+index e8753ce010..a90d17ccc4 100644
@@ -27 +28 @@
-@@ -2724,7 +2724,7 @@ static int ena_xstats_get(struct rte_eth_dev *dev,
+@@ -2479,7 +2479,7 @@ static int ena_xstats_get(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/ena: fix setting Rx checksum flags in mbuf' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (65 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/ena: fix getting xstats global stats offset' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/ena/base: align IO CQ allocation to 4K' " luca.boccassi
                       ` (14 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Michal Krawczyk; +Cc: Igor Chauskin, Guy Tzalik, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/45a2d11025b58827dbc209465067f6b283383ba3

Thanks.

Luca Boccassi

---
From 45a2d11025b58827dbc209465067f6b283383ba3 Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Fri, 30 Oct 2020 12:31:17 +0100
Subject: [PATCH] net/ena: fix setting Rx checksum flags in mbuf

[ upstream commit 856edce2b3dbc901905cd4c43920575f750f9d53 ]

The driver was never setting PKT_RX_*_CKSUM_GOOD flags, so the only way
of checking if the checksum was checked was by testing for the
PKT_RX_*_CKSUM_BAD. In that situation, the application couldn't detect
if the checksum was valid or unknown, as unknown flag is equal to 0.

Moreover, the l3_csum_err value is only valid if the l3_proto is
indicating IPv4, so it shouldn't be checked for other protocols.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
---
 drivers/net/ena/ena_ethdev.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index a90d17ccc4..2c19f6459f 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -267,21 +267,23 @@ static inline void ena_rx_mbuf_prepare(struct rte_mbuf *mbuf,
 	else if (ena_rx_ctx->l4_proto == ENA_ETH_IO_L4_PROTO_UDP)
 		packet_type |= RTE_PTYPE_L4_UDP;
 
-	if (ena_rx_ctx->l3_proto == ENA_ETH_IO_L3_PROTO_IPV4)
+	if (ena_rx_ctx->l3_proto == ENA_ETH_IO_L3_PROTO_IPV4) {
 		packet_type |= RTE_PTYPE_L3_IPV4;
-	else if (ena_rx_ctx->l3_proto == ENA_ETH_IO_L3_PROTO_IPV6)
+		if (unlikely(ena_rx_ctx->l3_csum_err))
+			ol_flags |= PKT_RX_IP_CKSUM_BAD;
+		else
+			ol_flags |= PKT_RX_IP_CKSUM_GOOD;
+	} else if (ena_rx_ctx->l3_proto == ENA_ETH_IO_L3_PROTO_IPV6) {
 		packet_type |= RTE_PTYPE_L3_IPV6;
+	}
 
-	if (!ena_rx_ctx->l4_csum_checked)
+	if (!ena_rx_ctx->l4_csum_checked || ena_rx_ctx->frag)
 		ol_flags |= PKT_RX_L4_CKSUM_UNKNOWN;
 	else
-		if (unlikely(ena_rx_ctx->l4_csum_err) && !ena_rx_ctx->frag)
+		if (unlikely(ena_rx_ctx->l4_csum_err))
 			ol_flags |= PKT_RX_L4_CKSUM_BAD;
 		else
-			ol_flags |= PKT_RX_L4_CKSUM_UNKNOWN;
-
-	if (unlikely(ena_rx_ctx->l3_csum_err))
-		ol_flags |= PKT_RX_IP_CKSUM_BAD;
+			ol_flags |= PKT_RX_L4_CKSUM_GOOD;
 
 	mbuf->ol_flags = ol_flags;
 	mbuf->packet_type = packet_type;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.732754568 +0000
+++ 0068-net-ena-fix-setting-Rx-checksum-flags-in-mbuf.patch	2020-11-09 18:40:11.207312465 +0000
@@ -1 +1 @@
-From 856edce2b3dbc901905cd4c43920575f750f9d53 Mon Sep 17 00:00:00 2001
+From 45a2d11025b58827dbc209465067f6b283383ba3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 856edce2b3dbc901905cd4c43920575f750f9d53 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 7ab9b93ba9..ad593c882c 100644
+index a90d17ccc4..2c19f6459f 100644
@@ -28 +29 @@
-@@ -296,21 +296,23 @@ static inline void ena_rx_mbuf_prepare(struct rte_mbuf *mbuf,
+@@ -267,21 +267,23 @@ static inline void ena_rx_mbuf_prepare(struct rte_mbuf *mbuf,

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/ena/base: align IO CQ allocation to 4K' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (66 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/ena: fix setting Rx checksum flags in mbuf' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/thunderx: fix memory leak on rbdr desc ring failure' " luca.boccassi
                       ` (13 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Michal Krawczyk; +Cc: Ido Segev, Igor Chauskin, Amit Bernstein, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/06d1be2a7cfff924dff99278b8ca1a3fbae223ec

Thanks.

Luca Boccassi

---
From 06d1be2a7cfff924dff99278b8ca1a3fbae223ec Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Fri, 30 Oct 2020 12:31:19 +0100
Subject: [PATCH] net/ena/base: align IO CQ allocation to 4K

[ upstream commit 4be6bc7fa13d2ea52a07c8423a09cfda17b5691c ]

Latest generation HW requires IO completion queue descriptors to be
aligned to a 4K in order to achieve the best performance.

Because of that, the new allocation macros were added, which allows
driver to allocate the memory with specified alignment.

The previous allocation macros are now wrappers around the macros
doing the alignment, with the alignment value equal to cacheline size.

Fixes: b68309be44c0 ("net/ena/base: update communication layer for the ENAv2")

Signed-off-by: Ido Segev <idose@amazon.com>
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Amit Bernstein <amitbern@amazon.com>
---
 drivers/net/ena/base/ena_com.c       | 26 ++++++++++----------
 drivers/net/ena/base/ena_com.h       |  2 ++
 drivers/net/ena/base/ena_plat_dpdk.h | 36 +++++++++++++++++++++-------
 3 files changed, 44 insertions(+), 20 deletions(-)

diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c
index 592909c1be..f8e8f448e3 100644
--- a/drivers/net/ena/base/ena_com.c
+++ b/drivers/net/ena/base/ena_com.c
@@ -401,19 +401,21 @@ static int ena_com_init_io_cq(struct ena_com_dev *ena_dev,
 	size = io_cq->cdesc_entry_size_in_bytes * io_cq->q_depth;
 	io_cq->bus = ena_dev->bus;
 
-	ENA_MEM_ALLOC_COHERENT_NODE(ena_dev->dmadev,
-			size,
-			io_cq->cdesc_addr.virt_addr,
-			io_cq->cdesc_addr.phys_addr,
-			io_cq->cdesc_addr.mem_handle,
-			ctx->numa_node,
-			prev_node);
+	ENA_MEM_ALLOC_COHERENT_NODE_ALIGNED(ena_dev->dmadev,
+					    size,
+					    io_cq->cdesc_addr.virt_addr,
+					    io_cq->cdesc_addr.phys_addr,
+					    io_cq->cdesc_addr.mem_handle,
+					    ctx->numa_node,
+					    prev_node,
+					    ENA_CDESC_RING_SIZE_ALIGNMENT);
 	if (!io_cq->cdesc_addr.virt_addr) {
-		ENA_MEM_ALLOC_COHERENT(ena_dev->dmadev,
-				       size,
-				       io_cq->cdesc_addr.virt_addr,
-				       io_cq->cdesc_addr.phys_addr,
-				       io_cq->cdesc_addr.mem_handle);
+		ENA_MEM_ALLOC_COHERENT_ALIGNED(ena_dev->dmadev,
+					       size,
+					       io_cq->cdesc_addr.virt_addr,
+					       io_cq->cdesc_addr.phys_addr,
+					       io_cq->cdesc_addr.mem_handle,
+					       ENA_CDESC_RING_SIZE_ALIGNMENT);
 	}
 
 	if (!io_cq->cdesc_addr.virt_addr) {
diff --git a/drivers/net/ena/base/ena_com.h b/drivers/net/ena/base/ena_com.h
index f1593345e8..fed2dec3e4 100644
--- a/drivers/net/ena/base/ena_com.h
+++ b/drivers/net/ena/base/ena_com.h
@@ -24,6 +24,8 @@
 #define ADMIN_CQ_SIZE(depth)	((depth) * sizeof(struct ena_admin_acq_entry))
 #define ADMIN_AENQ_SIZE(depth)	((depth) * sizeof(struct ena_admin_aenq_entry))
 
+#define ENA_CDESC_RING_SIZE_ALIGNMENT	(1 << 12) /* 4K */
+
 /*****************************************************************************/
 /*****************************************************************************/
 /* ENA adaptive interrupt moderation settings */
diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h
index a8c33dc4d4..9773be09e7 100644
--- a/drivers/net/ena/base/ena_plat_dpdk.h
+++ b/drivers/net/ena/base/ena_plat_dpdk.h
@@ -169,7 +169,8 @@ do {                                                                   \
  */
 extern rte_atomic32_t ena_alloc_cnt;
 
-#define ENA_MEM_ALLOC_COHERENT(dmadev, size, virt, phys, handle)	\
+#define ENA_MEM_ALLOC_COHERENT_ALIGNED(					\
+	dmadev, size, virt, phys, handle, alignment)			\
 	do {								\
 		const struct rte_memzone *mz = NULL;			\
 		ENA_TOUCH(dmadev); ENA_TOUCH(handle);			\
@@ -178,9 +179,10 @@ extern rte_atomic32_t ena_alloc_cnt;
 			snprintf(z_name, sizeof(z_name),		\
 			 "ena_alloc_%d",				\
 			 rte_atomic32_add_return(&ena_alloc_cnt, 1));	\
-			mz = rte_memzone_reserve(z_name, size,		\
+			mz = rte_memzone_reserve_aligned(z_name, size,	\
 					SOCKET_ID_ANY,			\
-					RTE_MEMZONE_IOVA_CONTIG);	\
+					RTE_MEMZONE_IOVA_CONTIG,	\
+					alignment);			\
 			handle = mz;					\
 		}							\
 		if (mz == NULL) {					\
@@ -192,13 +194,21 @@ extern rte_atomic32_t ena_alloc_cnt;
 			phys = mz->iova;				\
 		}							\
 	} while (0)
+#define ENA_MEM_ALLOC_COHERENT(dmadev, size, virt, phys, handle)	\
+		ENA_MEM_ALLOC_COHERENT_ALIGNED(				\
+			dmadev,						\
+			size,						\
+			virt,						\
+			phys,						\
+			handle,						\
+			RTE_CACHE_LINE_SIZE)
 #define ENA_MEM_FREE_COHERENT(dmadev, size, virt, phys, handle) 	\
 		({ ENA_TOUCH(size); ENA_TOUCH(phys);			\
 		   ENA_TOUCH(dmadev);					\
 		   rte_memzone_free(handle); })
 
-#define ENA_MEM_ALLOC_COHERENT_NODE(					\
-	dmadev, size, virt, phys, mem_handle, node, dev_node)		\
+#define ENA_MEM_ALLOC_COHERENT_NODE_ALIGNED(				\
+	dmadev, size, virt, phys, mem_handle, node, dev_node, alignment) \
 	do {								\
 		const struct rte_memzone *mz = NULL;			\
 		ENA_TOUCH(dmadev); ENA_TOUCH(dev_node);			\
@@ -207,8 +217,8 @@ extern rte_atomic32_t ena_alloc_cnt;
 			snprintf(z_name, sizeof(z_name),		\
 			 "ena_alloc_%d",				\
 			 rte_atomic32_add_return(&ena_alloc_cnt, 1));   \
-			mz = rte_memzone_reserve(z_name, size, node,	\
-				RTE_MEMZONE_IOVA_CONTIG);		\
+			mz = rte_memzone_reserve_aligned(z_name, size, node, \
+				RTE_MEMZONE_IOVA_CONTIG, alignment);	\
 			mem_handle = mz;				\
 		}							\
 		if (mz == NULL) {					\
@@ -220,7 +230,17 @@ extern rte_atomic32_t ena_alloc_cnt;
 			phys = mz->iova;				\
 		}							\
 	} while (0)
-
+#define ENA_MEM_ALLOC_COHERENT_NODE(					\
+	dmadev, size, virt, phys, mem_handle, node, dev_node)		\
+		ENA_MEM_ALLOC_COHERENT_NODE_ALIGNED(			\
+			dmadev,						\
+			size,						\
+			virt,						\
+			phys,						\
+			mem_handle,					\
+			node,						\
+			dev_node,					\
+			RTE_CACHE_LINE_SIZE)
 #define ENA_MEM_ALLOC_NODE(dmadev, size, virt, node, dev_node) \
 	do {								\
 		ENA_TOUCH(dmadev); ENA_TOUCH(dev_node);			\
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.764285931 +0000
+++ 0069-net-ena-base-align-IO-CQ-allocation-to-4K.patch	2020-11-09 18:40:11.211312527 +0000
@@ -1 +1 @@
-From 4be6bc7fa13d2ea52a07c8423a09cfda17b5691c Mon Sep 17 00:00:00 2001
+From 06d1be2a7cfff924dff99278b8ca1a3fbae223ec Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4be6bc7fa13d2ea52a07c8423a09cfda17b5691c ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 3686ae05c4..aae68721fb 100644
+index 592909c1be..f8e8f448e3 100644
@@ -32 +33 @@
-@@ -413,19 +413,21 @@ static int ena_com_init_io_cq(struct ena_com_dev *ena_dev,
+@@ -401,19 +401,21 @@ static int ena_com_init_io_cq(struct ena_com_dev *ena_dev,
@@ -67 +68 @@
-index 8eacaeab0e..64d8f247cb 100644
+index f1593345e8..fed2dec3e4 100644
@@ -70 +71 @@
-@@ -23,6 +23,8 @@
+@@ -24,6 +24,8 @@
@@ -80 +81 @@
-index a6782f3732..48c77f0c19 100644
+index a8c33dc4d4..9773be09e7 100644
@@ -83 +84 @@
-@@ -172,7 +172,8 @@ do {                                                                   \
+@@ -169,7 +169,8 @@ do {                                                                   \
@@ -93 +94 @@
-@@ -181,9 +182,10 @@ extern rte_atomic32_t ena_alloc_cnt;
+@@ -178,9 +179,10 @@ extern rte_atomic32_t ena_alloc_cnt;
@@ -106 +107 @@
-@@ -195,13 +197,21 @@ extern rte_atomic32_t ena_alloc_cnt;
+@@ -192,13 +194,21 @@ extern rte_atomic32_t ena_alloc_cnt;
@@ -130 +131 @@
-@@ -210,8 +220,8 @@ extern rte_atomic32_t ena_alloc_cnt;
+@@ -207,8 +217,8 @@ extern rte_atomic32_t ena_alloc_cnt;
@@ -141 +142 @@
-@@ -223,7 +233,17 @@ extern rte_atomic32_t ena_alloc_cnt;
+@@ -220,7 +230,17 @@ extern rte_atomic32_t ena_alloc_cnt;

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/thunderx: fix memory leak on rbdr desc ring failure' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (67 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/ena/base: align IO CQ allocation to 4K' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:40     ` [dpdk-stable] patch 'common/mlx5: fix DevX SQ object creation' " luca.boccassi
                       ` (12 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/db124729af4470a5210b06939db35a850414199a

Thanks.

Luca Boccassi

---
From db124729af4470a5210b06939db35a850414199a 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 26191586f7..770110eb1d 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -653,6 +653,7 @@ nicvf_qset_rbdr_alloc(struct rte_eth_dev *dev, struct nicvf *nic,
 				      NICVF_RBDR_BASE_ALIGN_BYTES, nic->node);
 	if (rz == NULL) {
 		PMD_INIT_LOG(ERR, "Failed to allocate mem for rbdr desc ring");
+		rte_free(rbdr);
 		return -ENOMEM;
 	}
 
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.798157902 +0000
+++ 0070-net-thunderx-fix-memory-leak-on-rbdr-desc-ring-failu.patch	2020-11-09 18:40:11.211312527 +0000
@@ -1 +1 @@
-From 33d1405fc3264200d762c08728f4155335799456 Mon Sep 17 00:00:00 2001
+From db124729af4470a5210b06939db35a850414199a 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 26191586f7..770110eb1d 100644
@@ -22 +23 @@
-@@ -638,6 +638,7 @@ nicvf_qset_rbdr_alloc(struct rte_eth_dev *dev, struct nicvf *nic,
+@@ -653,6 +653,7 @@ nicvf_qset_rbdr_alloc(struct rte_eth_dev *dev, struct nicvf *nic,

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'common/mlx5: fix DevX SQ object creation' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (68 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'net/thunderx: fix memory leak on rbdr desc ring failure' " luca.boccassi
@ 2020-11-09 18:40     ` luca.boccassi
  2020-11-09 18:41     ` [dpdk-stable] patch 'raw/ifpga: terminate string filled by readlink with null' " luca.boccassi
                       ` (11 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:40 UTC (permalink / raw)
  To: Tal Shnaiderman; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/060f17455ae84de71cd072cf2fdeb9a8536e087e

Thanks.

Luca Boccassi

---
From 060f17455ae84de71cd072cf2fdeb9a8536e087e Mon Sep 17 00:00:00 2001
From: Tal Shnaiderman <talshn@nvidia.com>
Date: Mon, 26 Oct 2020 20:17:48 +0200
Subject: [PATCH] common/mlx5: fix DevX SQ object creation

[ upstream commit 1912d158e1db1098fb81982dbb6013c213326837 ]

Fix wrong assignment of allow_multi_pkt_send_wqe
in mlx5_devx_cmd_create_sq.
The incorrect assignment was introduced in the initial
mlx5_devx_cmd_create_sq implementation.

sq_attr->flush_in_error_en is
mistakenly assigned to both allow_multi_pkt_send_wqe and
flush_in_error_en, it was detected during Windows PMD development.

The fix is simply assigning the right value in mlx5_devx_cmd_create_sq
to sq_attr->allow_multi_pkt_send_wqe

Fixes: ae18a1ae9692 ("net/mlx5: support Tx hairpin queues")

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_devx_cmds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_devx_cmds.c b/drivers/net/mlx5/mlx5_devx_cmds.c
index e223ee9b18..f9c4043c11 100644
--- a/drivers/net/mlx5/mlx5_devx_cmds.c
+++ b/drivers/net/mlx5/mlx5_devx_cmds.c
@@ -778,7 +778,7 @@ mlx5_devx_cmd_create_sq(struct ibv_context *ctx,
 	MLX5_SET(sqc, sq_ctx, fre, sq_attr->fre);
 	MLX5_SET(sqc, sq_ctx, flush_in_error_en, sq_attr->flush_in_error_en);
 	MLX5_SET(sqc, sq_ctx, allow_multi_pkt_send_wqe,
-		 sq_attr->flush_in_error_en);
+		 sq_attr->allow_multi_pkt_send_wqe);
 	MLX5_SET(sqc, sq_ctx, min_wqe_inline_mode,
 		 sq_attr->min_wqe_inline_mode);
 	MLX5_SET(sqc, sq_ctx, state, sq_attr->state);
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.829205057 +0000
+++ 0071-common-mlx5-fix-DevX-SQ-object-creation.patch	2020-11-09 18:40:11.215312589 +0000
@@ -1 +1 @@
-From 1912d158e1db1098fb81982dbb6013c213326837 Mon Sep 17 00:00:00 2001
+From 060f17455ae84de71cd072cf2fdeb9a8536e087e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1912d158e1db1098fb81982dbb6013c213326837 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
- drivers/common/mlx5/mlx5_devx_cmds.c | 2 +-
+ drivers/net/mlx5/mlx5_devx_cmds.c | 2 +-
@@ -27,5 +28,5 @@
-diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
-index 5b0f8a8654..a13febebfd 100644
---- a/drivers/common/mlx5/mlx5_devx_cmds.c
-+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
-@@ -1333,7 +1333,7 @@ mlx5_devx_cmd_create_sq(void *ctx,
+diff --git a/drivers/net/mlx5/mlx5_devx_cmds.c b/drivers/net/mlx5/mlx5_devx_cmds.c
+index e223ee9b18..f9c4043c11 100644
+--- a/drivers/net/mlx5/mlx5_devx_cmds.c
++++ b/drivers/net/mlx5/mlx5_devx_cmds.c
+@@ -778,7 +778,7 @@ mlx5_devx_cmd_create_sq(struct ibv_context *ctx,

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'raw/ifpga: terminate string filled by readlink with null' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (69 preceding siblings ...)
  2020-11-09 18:40     ` [dpdk-stable] patch 'common/mlx5: fix DevX SQ object creation' " luca.boccassi
@ 2020-11-09 18:41     ` luca.boccassi
  2020-11-09 18:41     ` [dpdk-stable] patch 'raw/ifpga: use trusted buffer to free' " luca.boccassi
                       ` (10 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:41 UTC (permalink / raw)
  To: Wei Huang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6bf53dde34211bc779dd4d69fa02775274073309

Thanks.

Luca Boccassi

---
From 6bf53dde34211bc779dd4d69fa02775274073309 Mon Sep 17 00:00:00 2001
From: Wei Huang <wei.huang@intel.com>
Date: Fri, 30 Oct 2020 03:35:06 -0400
Subject: [PATCH] raw/ifpga: terminate string filled by readlink with null

[ upstream commit 5a906909af93c46941bf0c56a97af8f0b279d1d4 ]

readlink() does not terminate string, add a null character at the end
of the string if readlink() succeeds.

Coverity issue: 362820
Fixes: 9c006c45d0c5 ("raw/ifpga: scan PCIe BDF device tree")

Signed-off-by: Wei Huang <wei.huang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/raw/ifpga/ifpga_rawdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index 7bfdde650d..05b6de6312 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -237,8 +237,9 @@ static int ifpga_rawdev_fill_info(struct ifpga_rawdev *ifpga_dev,
 	memset(link, 0, sizeof(link));
 	memset(link1, 0, sizeof(link1));
 	ret = readlink(path, link, (sizeof(link)-1));
-	if (ret == -1)
+	if ((ret < 0) || ((unsigned int)ret > (sizeof(link)-1)))
 		return -1;
+	link[ret] = 0;   /* terminate string with null character */
 	strlcpy(link1, link, sizeof(link1));
 	memset(ifpga_dev->parent_bdf, 0, 16);
 	point = strlen(link);
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.862002456 +0000
+++ 0072-raw-ifpga-terminate-string-filled-by-readlink-with-n.patch	2020-11-09 18:40:11.215312589 +0000
@@ -1 +1 @@
-From 5a906909af93c46941bf0c56a97af8f0b279d1d4 Mon Sep 17 00:00:00 2001
+From 6bf53dde34211bc779dd4d69fa02775274073309 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5a906909af93c46941bf0c56a97af8f0b279d1d4 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 0385514cdc..f9de1677b4 100644
+index 7bfdde650d..05b6de6312 100644
@@ -23 +24 @@
-@@ -230,8 +230,9 @@ static int ifpga_rawdev_fill_info(struct ifpga_rawdev *ifpga_dev,
+@@ -237,8 +237,9 @@ static int ifpga_rawdev_fill_info(struct ifpga_rawdev *ifpga_dev,

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'raw/ifpga: use trusted buffer to free' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (70 preceding siblings ...)
  2020-11-09 18:41     ` [dpdk-stable] patch 'raw/ifpga: terminate string filled by readlink with null' " luca.boccassi
@ 2020-11-09 18:41     ` luca.boccassi
  2020-11-09 18:41     ` [dpdk-stable] patch 'app/testpmd: do not allow dynamic change of core number' " luca.boccassi
                       ` (9 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:41 UTC (permalink / raw)
  To: Wei Huang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/df2ceeafd3b44d66ffc416019a1fdeedc3c68a32

Thanks.

Luca Boccassi

---
From df2ceeafd3b44d66ffc416019a1fdeedc3c68a32 Mon Sep 17 00:00:00 2001
From: Wei Huang <wei.huang@intel.com>
Date: Fri, 30 Oct 2020 03:35:07 -0400
Subject: [PATCH] raw/ifpga: use trusted buffer to free

[ upstream commit ceccbcd73829c495e148e3380de916ef4874c104 ]

In rte_fpga_do_pr, calling function read() may taints argument buffer
which turn to an untrusted value as argument of rte_free().

Coverity issue: 279449
Fixes: ef1e8ede3da5 ("raw/ifpga: add Intel FPGA bus rawdev driver")

Signed-off-by: Wei Huang <wei.huang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/raw/ifpga/ifpga_rawdev.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index 05b6de6312..0c5392d082 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -780,7 +780,7 @@ rte_fpga_do_pr(struct rte_rawdev *rawdev, int port_id,
 	int file_fd;
 	int ret = 0;
 	ssize_t buffer_size;
-	void *buffer;
+	void *buffer, *buf_to_free;
 	u64 pr_error;
 
 	if (!file_name)
@@ -812,6 +812,7 @@ rte_fpga_do_pr(struct rte_rawdev *rawdev, int port_id,
 		ret = -ENOMEM;
 		goto close_fd;
 	}
+	buf_to_free = buffer;
 
 	/*read the raw data*/
 	if (buffer_size != read(file_fd, (void *)buffer, buffer_size)) {
@@ -829,8 +830,8 @@ rte_fpga_do_pr(struct rte_rawdev *rawdev, int port_id,
 	}
 
 free_buffer:
-	if (buffer)
-		rte_free(buffer);
+	if (buf_to_free)
+		rte_free(buf_to_free);
 close_fd:
 	close(file_fd);
 	file_fd = 0;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.893459938 +0000
+++ 0073-raw-ifpga-use-trusted-buffer-to-free.patch	2020-11-09 18:40:11.215312589 +0000
@@ -1 +1 @@
-From ceccbcd73829c495e148e3380de916ef4874c104 Mon Sep 17 00:00:00 2001
+From df2ceeafd3b44d66ffc416019a1fdeedc3c68a32 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ceccbcd73829c495e148e3380de916ef4874c104 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index f9de1677b4..27129b133e 100644
+index 05b6de6312..0c5392d082 100644
@@ -23 +24 @@
-@@ -786,7 +786,7 @@ rte_fpga_do_pr(struct rte_rawdev *rawdev, int port_id,
+@@ -780,7 +780,7 @@ rte_fpga_do_pr(struct rte_rawdev *rawdev, int port_id,
@@ -32 +33 @@
-@@ -818,6 +818,7 @@ rte_fpga_do_pr(struct rte_rawdev *rawdev, int port_id,
+@@ -812,6 +812,7 @@ rte_fpga_do_pr(struct rte_rawdev *rawdev, int port_id,
@@ -40 +41 @@
-@@ -835,8 +836,8 @@ rte_fpga_do_pr(struct rte_rawdev *rawdev, int port_id,
+@@ -829,8 +830,8 @@ rte_fpga_do_pr(struct rte_rawdev *rawdev, int port_id,

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'app/testpmd: do not allow dynamic change of core number' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (71 preceding siblings ...)
  2020-11-09 18:41     ` [dpdk-stable] patch 'raw/ifpga: use trusted buffer to free' " luca.boccassi
@ 2020-11-09 18:41     ` luca.boccassi
  2020-11-09 18:41     ` [dpdk-stable] patch 'net/hns3: fix configurations of port-level scheduling rate' " luca.boccassi
                       ` (8 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:41 UTC (permalink / raw)
  To: Zhenghua Zhou; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d7b6b8697739e82bca65380b43bf4c1975c6f589

Thanks.

Luca Boccassi

---
From d7b6b8697739e82bca65380b43bf4c1975c6f589 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 124a6b8c57..5f8905c06a 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2681,6 +2681,10 @@ set_fwd_lcores_mask(uint64_t lcoremask)
 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 "
 		       "lcores) - ignored\n",
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.923162038 +0000
+++ 0074-app-testpmd-do-not-allow-dynamic-change-of-core-numb.patch	2020-11-09 18:40:11.219312651 +0000
@@ -1 +1 @@
-From 653c6ed4a12ad40e476a8936b4f463e01acfbf78 Mon Sep 17 00:00:00 2001
+From d7b6b8697739e82bca65380b43bf4c1975c6f589 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 124a6b8c57..5f8905c06a 100644
@@ -28 +29 @@
-@@ -3504,6 +3504,10 @@ set_fwd_lcores_mask(uint64_t lcoremask)
+@@ -2681,6 +2681,10 @@ set_fwd_lcores_mask(uint64_t lcoremask)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix configurations of port-level scheduling rate' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (72 preceding siblings ...)
  2020-11-09 18:41     ` [dpdk-stable] patch 'app/testpmd: do not allow dynamic change of core number' " luca.boccassi
@ 2020-11-09 18:41     ` luca.boccassi
  2020-11-09 18:41     ` [dpdk-stable] patch 'app/testpmd: fix max Rx packet length for VLAN packet' " luca.boccassi
                       ` (7 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:41 UTC (permalink / raw)
  To: Huisong Li; +Cc: Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3f359e8ca94f8a552a1d412b4d088ac14bd6fe66

Thanks.

Luca Boccassi

---
From 3f359e8ca94f8a552a1d412b4d088ac14bd6fe66 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Mon, 2 Nov 2020 22:38:16 +0800
Subject: [PATCH] net/hns3: fix configurations of port-level scheduling rate

[ upstream commit d55f3d9c1a463098142c89e4dcf4d2291833b1c0 ]

Scheduling rate of port-level in hns3 PF driver configured to
hardware is obtained from firmware, which determines the
bandwidth capability of the port. The rate in firmware is
generally configured with the maximum value for network engine
supporting multiple rates, such as 10G and 25G. It may cause
the following issues:
1) When a 10G optical module is used on the network engine, scheduling
   rate of this port will also be configured to hardware with 25G.
   However, the MAC rate of this port is 10G. In this case, it is
   unreasonable that the port scheduling rate is different from the MAC
   rate.
2) If default speed in firmware is not the maximum value, the 25G port
   may not reach the capability of the port.

Therefore, we fix configurations of port-level scheduling rate
according to updating of MAC link speed.

Fixes: 59fad0f32135 ("net/hns3: support link update operation")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_dcb.c    | 2 +-
 drivers/net/hns3/hns3_dcb.h    | 1 +
 drivers/net/hns3/hns3_ethdev.c | 8 ++++++++
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c
index 8688de2a73..f7d21ca756 100644
--- a/drivers/net/hns3/hns3_dcb.c
+++ b/drivers/net/hns3/hns3_dcb.c
@@ -337,7 +337,7 @@ hns3_dcb_get_shapping_para(uint8_t ir_b, uint8_t ir_u, uint8_t ir_s,
 	return shapping_para;
 }
 
-static int
+int
 hns3_dcb_port_shaper_cfg(struct hns3_hw *hw)
 {
 	struct hns3_port_shapping_cmd *shap_cfg_cmd;
diff --git a/drivers/net/hns3/hns3_dcb.h b/drivers/net/hns3/hns3_dcb.h
index 1d6fe5dfdf..fe67d3a466 100644
--- a/drivers/net/hns3/hns3_dcb.h
+++ b/drivers/net/hns3/hns3_dcb.h
@@ -174,5 +174,6 @@ void hns3_set_rss_size(struct hns3_hw *hw, uint16_t nb_rx_q);
 void hns3_tc_queue_mapping_cfg(struct hns3_hw *hw, uint16_t nb_queue);
 
 int hns3_dcb_cfg_update(struct hns3_adapter *hns);
+int hns3_dcb_port_shaper_cfg(struct hns3_hw *hw);
 
 #endif /* _HNS3_DCB_H_ */
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index af43a4473c..f2702e0c5e 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -4054,6 +4054,7 @@ static int
 hns3_cfg_mac_speed_dup(struct hns3_hw *hw, uint32_t speed, uint8_t duplex)
 {
 	struct hns3_mac *mac = &hw->mac;
+	uint32_t cur_speed = mac->link_speed;
 	int ret;
 
 	duplex = hns3_check_speed_dup(duplex, speed);
@@ -4065,6 +4066,13 @@ hns3_cfg_mac_speed_dup(struct hns3_hw *hw, uint32_t speed, uint8_t duplex)
 		return ret;
 
 	mac->link_speed = speed;
+	ret = hns3_dcb_port_shaper_cfg(hw);
+	if (ret) {
+		hns3_err(hw, "failed to configure port shaper, ret = %d.", ret);
+		mac->link_speed = cur_speed;
+		return ret;
+	}
+
 	mac->link_duplex = duplex;
 
 	return 0;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.957320580 +0000
+++ 0075-net-hns3-fix-configurations-of-port-level-scheduling.patch	2020-11-09 18:40:11.223312714 +0000
@@ -1 +1 @@
-From d55f3d9c1a463098142c89e4dcf4d2291833b1c0 Mon Sep 17 00:00:00 2001
+From 3f359e8ca94f8a552a1d412b4d088ac14bd6fe66 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d55f3d9c1a463098142c89e4dcf4d2291833b1c0 ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -35 +36 @@
-index 27ae01423b..ae8d8268d2 100644
+index 8688de2a73..f7d21ca756 100644
@@ -38 +39 @@
-@@ -336,7 +336,7 @@ hns3_dcb_get_shapping_para(uint8_t ir_b, uint8_t ir_u, uint8_t ir_s,
+@@ -337,7 +337,7 @@ hns3_dcb_get_shapping_para(uint8_t ir_b, uint8_t ir_u, uint8_t ir_s,
@@ -48 +49 @@
-index 39ff332675..7ab90933f3 100644
+index 1d6fe5dfdf..fe67d3a466 100644
@@ -51,2 +52,2 @@
-@@ -204,5 +204,6 @@ int hns3_queue_to_tc_mapping(struct hns3_hw *hw, uint16_t nb_rx_q,
- 			     uint16_t nb_tx_q);
+@@ -174,5 +174,6 @@ void hns3_set_rss_size(struct hns3_hw *hw, uint16_t nb_rx_q);
+ void hns3_tc_queue_mapping_cfg(struct hns3_hw *hw, uint16_t nb_queue);
@@ -59 +60 @@
-index 6b4be769bf..1e382f12a5 100644
+index af43a4473c..f2702e0c5e 100644
@@ -62 +63 @@
-@@ -4332,6 +4332,7 @@ static int
+@@ -4054,6 +4054,7 @@ static int
@@ -70 +71 @@
-@@ -4343,6 +4344,13 @@ hns3_cfg_mac_speed_dup(struct hns3_hw *hw, uint32_t speed, uint8_t duplex)
+@@ -4065,6 +4066,13 @@ hns3_cfg_mac_speed_dup(struct hns3_hw *hw, uint32_t speed, uint8_t duplex)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'app/testpmd: fix max Rx packet length for VLAN packet' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (73 preceding siblings ...)
  2020-11-09 18:41     ` [dpdk-stable] patch 'net/hns3: fix configurations of port-level scheduling rate' " luca.boccassi
@ 2020-11-09 18:41     ` luca.boccassi
  2020-11-09 18:41     ` [dpdk-stable] patch 'ethdev: fix data type for port id' " luca.boccassi
                       ` (6 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:41 UTC (permalink / raw)
  To: Steve Yang; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/28c5e8536cf640da738de6bcf388e4f4825eb53e

Thanks.

Luca Boccassi

---
From 28c5e8536cf640da738de6bcf388e4f4825eb53e Mon Sep 17 00:00:00 2001
From: Steve Yang <stevex.yang@intel.com>
Date: Mon, 2 Nov 2020 08:52:33 +0000
Subject: [PATCH] app/testpmd: fix max Rx packet length for VLAN packet

[ upstream commit f6870a7ed6b3fde94fb936256515bfc53bdc5015 ]

When the max Rx packet length is smaller than the sum of MTU size and
ether overhead size, it should be enlarged, otherwise the VLAN packets
will be dropped.

Fixes: 35b2d13fd6fd ("net: add rte prefix to ether defines")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/testpmd.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 7f59cb02d1..cb4c365cb1 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1301,6 +1301,7 @@ init_config(void)
 	struct rte_gro_param gro_param;
 	uint32_t gso_types;
 	uint16_t data_size;
+	uint16_t overhead_len;
 	bool warning = 0;
 	int k;
 	int ret;
@@ -1337,6 +1338,28 @@ init_config(void)
 			rte_exit(EXIT_FAILURE,
 				 "rte_eth_dev_info_get() failed\n");
 
+		/* Update the max_rx_pkt_len to have MTU as RTE_ETHER_MTU */
+		if (port->dev_info.max_rx_pktlen && port->dev_info.max_mtu)
+			overhead_len = port->dev_info.max_rx_pktlen -
+				port->dev_info.max_mtu;
+		else
+			overhead_len = RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;
+
+		port->dev_conf.rxmode.max_rx_pkt_len =
+						RTE_ETHER_MTU + overhead_len;
+
+		/*
+		 * This is workaround to avoid resize max rx packet len.
+		 * Ethdev assumes jumbo frame size must be greater than
+		 * RTE_ETHER_MAX_LEN, and will resize 'max_rx_pkt_len' to
+		 * default value when it is greater than RTE_ETHER_MAX_LEN
+		 * for normal frame.
+		 */
+		if (port->dev_conf.rxmode.max_rx_pkt_len > RTE_ETHER_MAX_LEN) {
+			port->dev_conf.rxmode.offloads |=
+						DEV_RX_OFFLOAD_JUMBO_FRAME;
+		}
+
 		if (!(port->dev_info.tx_offload_capa &
 		      DEV_TX_OFFLOAD_MBUF_FAST_FREE))
 			port->dev_conf.txmode.offloads &=
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:13.994081892 +0000
+++ 0076-app-testpmd-fix-max-Rx-packet-length-for-VLAN-packet.patch	2020-11-09 18:40:11.227312776 +0000
@@ -1 +1 @@
-From f6870a7ed6b3fde94fb936256515bfc53bdc5015 Mon Sep 17 00:00:00 2001
+From 28c5e8536cf640da738de6bcf388e4f4825eb53e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f6870a7ed6b3fde94fb936256515bfc53bdc5015 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 33fc0fddf5..c263121a9a 100644
+index 7f59cb02d1..cb4c365cb1 100644
@@ -23 +24 @@
-@@ -1421,6 +1421,7 @@ init_config(void)
+@@ -1301,6 +1301,7 @@ init_config(void)
@@ -31 +32 @@
-@@ -1457,6 +1458,28 @@ init_config(void)
+@@ -1337,6 +1338,28 @@ init_config(void)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'ethdev: fix data type for port id' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (74 preceding siblings ...)
  2020-11-09 18:41     ` [dpdk-stable] patch 'app/testpmd: fix max Rx packet length for VLAN packet' " luca.boccassi
@ 2020-11-09 18:41     ` luca.boccassi
  2020-11-09 18:41     ` [dpdk-stable] patch 'net/hinic/base: support two or more AEQS for chip' " luca.boccassi
                       ` (5 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:41 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Ajit Khaparde, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5c1c95c7ff54e8a7f073c31151d97fbc40151bf1

Thanks.

Luca Boccassi

---
From 5c1c95c7ff54e8a7f073c31151d97fbc40151bf1 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 d74429a9e7..e7d786c5b4 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -408,7 +408,9 @@ is_allocated(const struct rte_eth_dev *ethdev)
 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++) {
 		if (rte_eth_devices[i].data != NULL &&
@@ -437,7 +439,7 @@ rte_eth_dev_allocated(const char *name)
 static uint16_t
 rte_eth_dev_find_free_port(void)
 {
-	unsigned i;
+	uint16_t i;
 
 	for (i = 0; i < RTE_MAX_ETHPORTS; i++) {
 		/* Using shared name field to find a free port. */
@@ -800,7 +802,7 @@ rte_eth_dev_get_name_by_port(uint16_t port_id, char *name)
 int
 rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
 {
-	uint32_t pid;
+	uint16_t pid;
 
 	if (name == NULL) {
 		RTE_ETHDEV_LOG(ERR, "Null pointer is specified\n");
@@ -3954,7 +3956,7 @@ 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++)
 		TAILQ_INIT(&rte_eth_devices[i].link_intr_cbs);
@@ -3967,7 +3969,7 @@ 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;
 
 	if (!cb_fn)
@@ -4030,7 +4032,7 @@ rte_eth_dev_callback_unregister(uint16_t port_id,
 	int ret;
 	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;
 
 	if (!cb_fn)
@@ -5097,7 +5099,7 @@ static struct rte_eth_dev_switch {
 int
 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.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:14.027482358 +0000
+++ 0077-ethdev-fix-data-type-for-port-id.patch	2020-11-09 18:40:11.227312776 +0000
@@ -1 +1 @@
-From 4bb02a6f5b7f11aafde1be7bfd08b6e81997b916 Mon Sep 17 00:00:00 2001
+From 5c1c95c7ff54e8a7f073c31151d97fbc40151bf1 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 d74429a9e7..e7d786c5b4 100644
@@ -31 +32 @@
-@@ -411,7 +411,9 @@ eth_dev_is_allocated(const struct rte_eth_dev *ethdev)
+@@ -408,7 +408,9 @@ is_allocated(const struct rte_eth_dev *ethdev)
@@ -33 +34 @@
- eth_dev_allocated(const char *name)
+ _rte_eth_dev_allocated(const char *name)
@@ -42 +43 @@
-@@ -440,7 +442,7 @@ rte_eth_dev_allocated(const char *name)
+@@ -437,7 +439,7 @@ rte_eth_dev_allocated(const char *name)
@@ -44 +45 @@
- eth_dev_find_free_port(void)
+ rte_eth_dev_find_free_port(void)
@@ -51 +52 @@
-@@ -816,7 +818,7 @@ rte_eth_dev_get_name_by_port(uint16_t port_id, char *name)
+@@ -800,7 +802,7 @@ rte_eth_dev_get_name_by_port(uint16_t port_id, char *name)
@@ -60 +61 @@
-@@ -4293,7 +4295,7 @@ rte_eth_mirror_rule_reset(uint16_t port_id, uint8_t rule_id)
+@@ -3954,7 +3956,7 @@ rte_eth_mirror_rule_reset(uint16_t port_id, uint8_t rule_id)
@@ -69 +70 @@
-@@ -4306,7 +4308,7 @@ rte_eth_dev_callback_register(uint16_t port_id,
+@@ -3967,7 +3969,7 @@ rte_eth_dev_callback_register(uint16_t port_id,
@@ -78 +79 @@
-@@ -4369,7 +4371,7 @@ rte_eth_dev_callback_unregister(uint16_t port_id,
+@@ -4030,7 +4032,7 @@ rte_eth_dev_callback_unregister(uint16_t port_id,
@@ -87 +88 @@
-@@ -5426,7 +5428,7 @@ static struct rte_eth_dev_switch {
+@@ -5097,7 +5099,7 @@ static struct rte_eth_dev_switch {

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/hinic/base: support two or more AEQS for chip' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (75 preceding siblings ...)
  2020-11-09 18:41     ` [dpdk-stable] patch 'ethdev: fix data type for port id' " luca.boccassi
@ 2020-11-09 18:41     ` luca.boccassi
  2020-11-09 18:41     ` [dpdk-stable] patch 'net/hinic/base: fix log info for PF command channel' " luca.boccassi
                       ` (4 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:41 UTC (permalink / raw)
  To: Guoyang Zhou; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d579dd24997d349203f43064caed20f521bf6380

Thanks.

Luca Boccassi

---
From d579dd24997d349203f43064caed20f521bf6380 Mon Sep 17 00:00:00 2001
From: Guoyang Zhou <zhouguoyang@huawei.com>
Date: Wed, 4 Nov 2020 10:03:19 +0800
Subject: [PATCH] net/hinic/base: support two or more AEQS for chip

[ upstream commit 17ff26b6302416a1b97d566fd744bf28488c76a8 ]

For device initialize, driver only supports four aeqs before,
and now driver can supports two or more aeqs from chip
config file.

Fixes: 611faa5f46cc ("fix various typos found by Lintian")

Signed-off-by: Guoyang Zhou <zhouguoyang@huawei.com>
---
 drivers/net/hinic/base/hinic_pmd_eqs.c  |  8 ++--
 drivers/net/hinic/base/hinic_pmd_eqs.h  |  4 ++
 drivers/net/hinic/base/hinic_pmd_mbox.c | 60 +++++++++++++++++++++----
 drivers/net/hinic/base/hinic_pmd_mbox.h |  5 +--
 4 files changed, 60 insertions(+), 17 deletions(-)

diff --git a/drivers/net/hinic/base/hinic_pmd_eqs.c b/drivers/net/hinic/base/hinic_pmd_eqs.c
index 79e1b20bca..fecb653401 100644
--- a/drivers/net/hinic/base/hinic_pmd_eqs.c
+++ b/drivers/net/hinic/base/hinic_pmd_eqs.c
@@ -470,10 +470,10 @@ int hinic_comm_aeqs_init(struct hinic_hwdev *hwdev)
 	struct irq_info aeq_irqs[HINIC_MAX_AEQS];
 
 	num_aeqs = HINIC_HWIF_NUM_AEQS(hwdev->hwif);
-	if (num_aeqs < HINIC_MAX_AEQS) {
-		PMD_DRV_LOG(ERR, "Warning: PMD need %d AEQs, Chip have %d",
-			HINIC_MAX_AEQS, num_aeqs);
-		return HINIC_ERROR;
+	if (num_aeqs < HINIC_MIN_AEQS) {
+		PMD_DRV_LOG(ERR, "PMD need %d AEQs, Chip has %d\n",
+				HINIC_MIN_AEQS, num_aeqs);
+		return -EINVAL;
 	}
 
 	memset(aeq_irqs, 0, sizeof(aeq_irqs));
diff --git a/drivers/net/hinic/base/hinic_pmd_eqs.h b/drivers/net/hinic/base/hinic_pmd_eqs.h
index 16046ecde3..5e6dc3914b 100644
--- a/drivers/net/hinic/base/hinic_pmd_eqs.h
+++ b/drivers/net/hinic/base/hinic_pmd_eqs.h
@@ -9,6 +9,10 @@
 
 #define HINIC_AEQN_START		0
 #define HINIC_MAX_AEQS			4
+#define HINIC_MIN_AEQS			2
+#define HINIC_AEQN_0			0
+#define HINIC_AEQN_1			1
+#define HINIC_AEQN_2			2
 
 #define HINIC_EQ_MAX_PAGES		8
 
diff --git a/drivers/net/hinic/base/hinic_pmd_mbox.c b/drivers/net/hinic/base/hinic_pmd_mbox.c
index cfe91ddbad..ab99cfb5ad 100644
--- a/drivers/net/hinic/base/hinic_pmd_mbox.c
+++ b/drivers/net/hinic/base/hinic_pmd_mbox.c
@@ -298,15 +298,52 @@ mbox_copy_send_data(struct hinic_send_mbox *mbox, void *seg, u16 seg_len)
 				mbox->data + MBOX_HEADER_SZ + i * sizeof(u32));
 }
 
+static int mbox_msg_ack_aeqn(struct hinic_hwdev *hwdev)
+{
+	u16 aeq_num = HINIC_HWIF_NUM_AEQS(hwdev->hwif);
+	int msg_ack_aeqn;
+
+	if (aeq_num >= HINIC_MAX_AEQS - 1) {
+		msg_ack_aeqn = HINIC_AEQN_2;
+	} else if (aeq_num == HINIC_MIN_AEQS) {
+		/* This is used for ovs */
+		msg_ack_aeqn = HINIC_AEQN_1;
+	} else {
+		PMD_DRV_LOG(ERR, "Warning: Invalid aeq num: %d\n", aeq_num);
+		msg_ack_aeqn = -1;
+	}
+
+	return msg_ack_aeqn;
+}
+
+static u16 mbox_msg_dst_aeqn(struct hinic_hwdev *hwdev,
+			enum hinic_hwif_direction_type seq_dir)
+{
+	u16 dst_aeqn;
+
+	if (seq_dir == HINIC_HWIF_DIRECT_SEND)
+		dst_aeqn = HINIC_AEQN_0;
+	else
+		dst_aeqn = mbox_msg_ack_aeqn(hwdev);
+
+	return dst_aeqn;
+}
+
+static int mbox_seg_ack_aeqn(struct hinic_hwdev *hwdev)
+{
+	return mbox_msg_ack_aeqn(hwdev);
+}
+
 static void write_mbox_msg_attr(struct hinic_mbox_func_to_func *func_to_func,
-			u16 dst_func, u16 dst_aeqn,
+			u16 dst_func, u16 dst_aeqn, u16 seg_ack_aeqn,
 			__rte_unused u16 seg_len, int poll)
 {
 	u32 mbox_int, mbox_ctrl;
 
 	mbox_int = HINIC_MBOX_INT_SET(dst_func, DST_FUNC) |
 		HINIC_MBOX_INT_SET(dst_aeqn, DST_AEQN) |
-		HINIC_MBOX_INT_SET(HINIC_MBOX_RSP_AEQN, SRC_RESP_AEQN) |
+		/* N/A in polling mode */
+		HINIC_MBOX_INT_SET(seg_ack_aeqn, SRC_RESP_AEQN) |
 		HINIC_MBOX_INT_SET(NO_DMA_ATTRIBUTE_VAL, STAT_DMA) |
 		HINIC_MBOX_INT_SET(ALIGN(MBOX_SIZE, MBOX_SEG_LEN_ALIGN) >> 2,
 					TX_SIZE) |
@@ -552,19 +589,21 @@ static int send_mbox_seg(struct hinic_mbox_func_to_func *func_to_func,
 	struct hinic_send_mbox *send_mbox = &func_to_func->send_mbox;
 	struct hinic_hwdev *hwdev = func_to_func->hwdev;
 	u16 seq_dir = HINIC_MBOX_HEADER_GET(header, DIRECTION);
-	u16 dst_aeqn = (seq_dir == HINIC_HWIF_DIRECT_SEND) ?
-				HINIC_MBOX_RECV_AEQN : HINIC_MBOX_RSP_AEQN;
+	u16 dst_aeqn, seg_ack_aeqn;
 	u16 err_code, wb_status = 0;
 	u32 cnt = 0;
 
+	dst_aeqn = mbox_msg_dst_aeqn(hwdev, seq_dir);
+	seg_ack_aeqn = mbox_seg_ack_aeqn(hwdev);
+
 	clear_mbox_status(send_mbox);
 
 	mbox_copy_header(send_mbox, &header);
 
 	mbox_copy_send_data(send_mbox, seg, seg_len);
 
-	write_mbox_msg_attr(func_to_func, dst_func, dst_aeqn, seg_len,
-			    MBOX_SEND_MSG_POLL);
+	write_mbox_msg_attr(func_to_func, dst_func, dst_aeqn, seg_ack_aeqn,
+				seg_len, MBOX_SEND_MSG_POLL);
 
 	rte_wmb();
 
@@ -698,7 +737,7 @@ static int hinic_mbox_to_func(struct hinic_mbox_func_to_func *func_to_func,
 		goto send_err;
 
 	time = msecs_to_jiffies(timeout ? timeout : HINIC_MBOX_COMP_TIME_MS);
-	err = hinic_aeq_poll_msg(func_to_func->rsp_aeq, time, NULL);
+	err = hinic_aeq_poll_msg(func_to_func->ack_aeq, time, NULL);
 	if (err) {
 		set_mbox_to_func_event(func_to_func, EVENT_TIMEOUT);
 		PMD_DRV_LOG(ERR, "Send mailbox message time out");
@@ -921,13 +960,16 @@ void hinic_comm_func_to_func_free(struct hinic_hwdev *hwdev)
 int hinic_comm_func_to_func_init(struct hinic_hwdev *hwdev)
 {
 	int rc;
+	u16 msg_ack_aeqn;
 
 	rc = hinic_func_to_func_init(hwdev);
 	if (rc)
 		return rc;
 
-	hwdev->func_to_func->rsp_aeq = &hwdev->aeqs->aeq[HINIC_MBOX_RSP_AEQN];
-	hwdev->func_to_func->recv_aeq = &hwdev->aeqs->aeq[HINIC_MBOX_RECV_AEQN];
+	msg_ack_aeqn = mbox_msg_ack_aeqn(hwdev);
+
+	hwdev->func_to_func->ack_aeq = &hwdev->aeqs->aeq[msg_ack_aeqn];
+	hwdev->func_to_func->recv_aeq = &hwdev->aeqs->aeq[HINIC_AEQN_0];
 
 	return 0;
 }
diff --git a/drivers/net/hinic/base/hinic_pmd_mbox.h b/drivers/net/hinic/base/hinic_pmd_mbox.h
index bf7b4906dc..dc08b99f47 100644
--- a/drivers/net/hinic/base/hinic_pmd_mbox.h
+++ b/drivers/net/hinic/base/hinic_pmd_mbox.h
@@ -5,9 +5,6 @@
 #ifndef _HINIC_PMD_MBOX_H_
 #define _HINIC_PMD_MBOX_H_
 
-#define HINIC_MBOX_RECV_AEQN		0
-#define HINIC_MBOX_RSP_AEQN		2
-
 #define HINIC_MBOX_PF_SEND_ERR		0x1
 #define HINIC_MBOX_PF_BUSY_ACTIVE_FW	0x2
 #define HINIC_MBOX_VF_CMD_ERROR		0x3
@@ -69,7 +66,7 @@ struct hinic_mbox_func_to_func {
 	struct hinic_recv_mbox mbox_resp[HINIC_MAX_FUNCTIONS];
 	struct hinic_recv_mbox mbox_send[HINIC_MAX_FUNCTIONS];
 
-	struct hinic_eq *rsp_aeq;
+	struct hinic_eq *ack_aeq;
 	struct hinic_eq *recv_aeq;
 
 	u8 send_msg_id;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:14.061603966 +0000
+++ 0078-net-hinic-base-support-two-or-more-AEQS-for-chip.patch	2020-11-09 18:40:11.231312838 +0000
@@ -1 +1 @@
-From 17ff26b6302416a1b97d566fd744bf28488c76a8 Mon Sep 17 00:00:00 2001
+From d579dd24997d349203f43064caed20f521bf6380 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 17ff26b6302416a1b97d566fd744bf28488c76a8 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -56 +57 @@
-index ab1106a37d..ff44c25a85 100644
+index cfe91ddbad..ab99cfb5ad 100644
@@ -59 +60 @@
-@@ -297,15 +297,52 @@ mbox_copy_send_data(struct hinic_send_mbox *mbox, void *seg, u16 seg_len)
+@@ -298,15 +298,52 @@ mbox_copy_send_data(struct hinic_send_mbox *mbox, void *seg, u16 seg_len)
@@ -114 +115 @@
-@@ -551,19 +588,21 @@ static int send_mbox_seg(struct hinic_mbox_func_to_func *func_to_func,
+@@ -552,19 +589,21 @@ static int send_mbox_seg(struct hinic_mbox_func_to_func *func_to_func,
@@ -140 +141 @@
-@@ -697,7 +736,7 @@ static int hinic_mbox_to_func(struct hinic_mbox_func_to_func *func_to_func,
+@@ -698,7 +737,7 @@ static int hinic_mbox_to_func(struct hinic_mbox_func_to_func *func_to_func,
@@ -149 +150 @@
-@@ -920,13 +959,16 @@ void hinic_comm_func_to_func_free(struct hinic_hwdev *hwdev)
+@@ -921,13 +960,16 @@ void hinic_comm_func_to_func_free(struct hinic_hwdev *hwdev)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/hinic/base: fix log info for PF command channel' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (76 preceding siblings ...)
  2020-11-09 18:41     ` [dpdk-stable] patch 'net/hinic/base: support two or more AEQS for chip' " luca.boccassi
@ 2020-11-09 18:41     ` luca.boccassi
  2020-11-09 18:41     ` [dpdk-stable] patch 'fix spellings that Lintian complains about' " luca.boccassi
                       ` (3 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:41 UTC (permalink / raw)
  To: Guoyang Zhou; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b89d88303019c9fcb655de23c78b657411845253

Thanks.

Luca Boccassi

---
From b89d88303019c9fcb655de23c78b657411845253 Mon Sep 17 00:00:00 2001
From: Guoyang Zhou <zhouguoyang@huawei.com>
Date: Wed, 4 Nov 2020 10:03:20 +0800
Subject: [PATCH] net/hinic/base: fix log info for PF command channel

[ upstream commit 1e4593db1d58e01c29d79259f5d98148e635963e ]

When PF command channel is error, the variables in the log has been
cleared, which is not printed yet.

Fixes: 214164a6bf7f ("net/hinic/base: remove unused function parameters")

Signed-off-by: Guoyang Zhou <zhouguoyang@huawei.com>
---
 drivers/net/hinic/base/hinic_pmd_mgmt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hinic/base/hinic_pmd_mgmt.c b/drivers/net/hinic/base/hinic_pmd_mgmt.c
index a57036d531..8bff353da8 100644
--- a/drivers/net/hinic/base/hinic_pmd_mgmt.c
+++ b/drivers/net/hinic/base/hinic_pmd_mgmt.c
@@ -614,16 +614,18 @@ static int recv_mgmt_msg_handler(struct hinic_msg_pf_to_mgmt *pf_to_mgmt,
 	u8 *dest_msg;
 	u8 seq_id, seq_len;
 	u32 msg_buf_max = MAX_PF_MGMT_BUF_SIZE;
+	u8 front_id;
 
 	seq_id = HINIC_MSG_HEADER_GET(msg_header, SEQID);
 	seq_len = HINIC_MSG_HEADER_GET(msg_header, SEG_LEN);
+	front_id = recv_msg->sed_id;
 
 	if (!check_mgmt_seq_id_and_seg_len(recv_msg, seq_id, seq_len)) {
 		PMD_DRV_LOG(ERR,
 			"Mgmt msg sequence and segment check fail, "
 			"func id: 0x%x, front id: 0x%x, current id: 0x%x, seg len: 0x%x",
 			hinic_global_func_id(pf_to_mgmt->hwdev),
-			recv_msg->sed_id, seq_id, seq_len);
+			front_id, seq_id, seq_len);
 		return HINIC_ERROR;
 	}
 
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:14.093509377 +0000
+++ 0079-net-hinic-base-fix-log-info-for-PF-command-channel.patch	2020-11-09 18:40:11.231312838 +0000
@@ -1 +1 @@
-From 1e4593db1d58e01c29d79259f5d98148e635963e Mon Sep 17 00:00:00 2001
+From b89d88303019c9fcb655de23c78b657411845253 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1e4593db1d58e01c29d79259f5d98148e635963e ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index babb93a204..fb31bc8581 100644
+index a57036d531..8bff353da8 100644
@@ -33 +34 @@
- 			"Mgmt msg sequence and segment check failed, "
+ 			"Mgmt msg sequence and segment check fail, "

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'fix spellings that Lintian complains about' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (77 preceding siblings ...)
  2020-11-09 18:41     ` [dpdk-stable] patch 'net/hinic/base: fix log info for PF command channel' " luca.boccassi
@ 2020-11-09 18:41     ` luca.boccassi
  2020-11-09 18:41     ` [dpdk-stable] patch 'mbuf: fix dynamic fields and flags with multiprocess' " luca.boccassi
                       ` (2 subsequent siblings)
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:41 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/50eb4f840a7ba0488cae324238fb3ac89dfcbae9

Thanks.

Luca Boccassi

---
From 50eb4f840a7ba0488cae324238fb3ac89dfcbae9 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/hns3/hns3_ethdev.h                    | 2 +-
 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 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 6e9173abd4..e0a04f8744 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -145,7 +145,7 @@ 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;
 	uint8_t link_duplex  : 1; /* ETH_LINK_[HALF/FULL]_DUPLEX */
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 4cdffe9127..f6a47d9a92 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -263,7 +263,7 @@ i40evf_read_pfmsg(struct rte_eth_dev *dev, struct i40evf_arq_msg_info *data)
 		case VIRTCHNL_EVENT_RESET_IMPENDING:
 			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:
 			vf->dev_closed = true;
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
@@ -784,7 +784,7 @@ s32 ixgbe_acquire_swfw_sync_X540(struct ixgbe_hw *hw, u32 mask)
 	 * bits in the SW_FW_SYNC register.
 	 */
 	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;
 	}
 	swfw_sync = IXGBE_READ_REG(hw, IXGBE_SWFW_SYNC_BY_MAC(hw));
diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
index bce3dab68c..6a976ce5e8 100644
--- a/drivers/net/netvsc/hn_rndis.c
+++ b/drivers/net/netvsc/hn_rndis.c
@@ -276,7 +276,7 @@ static int hn_nvs_send_rndis_ctrl(struct vmbus_channel *chan,
 	sg.len  = reqlen;
 
 	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 e60257e190..6633d6b42e 100644
--- a/drivers/net/qede/base/ecore_sriov.c
+++ b/drivers/net/qede/base/ecore_sriov.c
@@ -4075,7 +4075,7 @@ ecore_iov_execute_vf_flr_cleanup(struct ecore_hwfn *p_hwfn,
 		rc = ecore_iov_enable_vf_access(p_hwfn, p_ptt, p_vf);
 		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 acddefa33d..79b8446f8e 100644
--- a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
+++ b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
@@ -39,7 +39,7 @@ 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.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:14.124550272 +0000
+++ 0080-fix-spellings-that-Lintian-complains-about.patch	2020-11-09 18:40:11.239312963 +0000
@@ -1 +1 @@
-From e8cff6142a2768983bb7950e5f2b0cc00dd59f33 Mon Sep 17 00:00:00 2001
+From 50eb4f840a7ba0488cae324238fb3ac89dfcbae9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e8cff6142a2768983bb7950e5f2b0cc00dd59f33 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -17 +17,0 @@
- app/test-fib/main.c                               | 4 ++--
@@ -24 +24 @@
- 7 files changed, 8 insertions(+), 8 deletions(-)
+ 6 files changed, 6 insertions(+), 6 deletions(-)
@@ -26,17 +25,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
-@@ -629,10 +629,10 @@ print_usage(void)
- 		"[-s <shuffle randomly generated routes>]\n"
- 		"[-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"
- 		"defaults are: dir for ipv4 and trie for ipv6\n"
@@ -44 +27 @@
-index 63e0c2fb36..4c40df1cbb 100644
+index 6e9173abd4..e0a04f8744 100644
@@ -47 +30 @@
-@@ -169,7 +169,7 @@ enum hns3_media_type {
+@@ -145,7 +145,7 @@ enum hns3_media_type {
@@ -57 +40 @@
-index 6e6eef5a6a..c26b036b85 100644
+index 4cdffe9127..f6a47d9a92 100644
@@ -60 +43 @@
-@@ -260,7 +260,7 @@ i40evf_read_pfmsg(struct rte_eth_dev *dev, struct i40evf_arq_msg_info *data)
+@@ -263,7 +263,7 @@ i40evf_read_pfmsg(struct rte_eth_dev *dev, struct i40evf_arq_msg_info *data)
@@ -70 +53 @@
-index 4cea16a817..8efde4645a 100644
+index d65f47c181..d91633a2da 100644
@@ -83 +66 @@
-index 66d1966f29..1ce260c89b 100644
+index bce3dab68c..6a976ce5e8 100644
@@ -96 +79 @@
-index dac4cbee86..ed8cc695fe 100644
+index e60257e190..6633d6b42e 100644
@@ -99 +82 @@
-@@ -4077,7 +4077,7 @@ ecore_iov_execute_vf_flr_cleanup(struct ecore_hwfn *p_hwfn,
+@@ -4075,7 +4075,7 @@ ecore_iov_execute_vf_flr_cleanup(struct ecore_hwfn *p_hwfn,

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'mbuf: fix dynamic fields and flags with multiprocess' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (78 preceding siblings ...)
  2020-11-09 18:41     ` [dpdk-stable] patch 'fix spellings that Lintian complains about' " luca.boccassi
@ 2020-11-09 18:41     ` luca.boccassi
  2020-11-09 18:41     ` [dpdk-stable] patch 'doc: fix typo in KNI guide' " luca.boccassi
  2020-11-09 18:41     ` [dpdk-stable] patch 'doc: remove obsolete deprecation notice for power library' " luca.boccassi
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:41 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/64244303057f6f428189c64d46ec4aebcf82a1e8

Thanks.

Luca Boccassi

---
From 64244303057f6f428189c64d46ec4aebcf82a1e8 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 4 Nov 2020 08:20:00 -0800
Subject: [PATCH] mbuf: fix dynamic fields and flags with multiprocess

[ upstream commit 0429a2e1a445a424b2982f3ce4b3fb34a7d1b796 ]

The dynamic flag management is broken if rte_mbuf_dynflag_lookup()
is done in a secondary process because the local pointer to
the memzone is not ever initialized.

Fix it by using the same checks as dynfield_register().
I.e if shared memory zone has not been looked up already,
then discover it.

Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_mbuf/rte_mbuf_dyn.c | 30 +++++++++++-------------------
 1 file changed, 11 insertions(+), 19 deletions(-)

diff --git a/lib/librte_mbuf/rte_mbuf_dyn.c b/lib/librte_mbuf/rte_mbuf_dyn.c
index f071651acf..5762008b7e 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.c
+++ b/lib/librte_mbuf/rte_mbuf_dyn.c
@@ -172,7 +172,7 @@ __mbuf_dynfield_lookup(const char *name)
 			break;
 	}
 
-	if (te == NULL) {
+	if (te == NULL || mbuf_dynfield == NULL) {
 		rte_errno = ENOENT;
 		return NULL;
 	}
@@ -185,19 +185,15 @@ rte_mbuf_dynfield_lookup(const char *name, struct rte_mbuf_dynfield *params)
 {
 	struct mbuf_dynfield_elt *mbuf_dynfield;
 
-	if (shm == NULL) {
-		rte_errno = ENOENT;
-		return -1;
-	}
-
 	rte_mcfg_tailq_read_lock();
-	mbuf_dynfield = __mbuf_dynfield_lookup(name);
+	if (shm == NULL && init_shared_mem() < 0)
+		mbuf_dynfield = NULL;
+	else
+		mbuf_dynfield = __mbuf_dynfield_lookup(name);
 	rte_mcfg_tailq_read_unlock();
 
-	if (mbuf_dynfield == NULL) {
-		rte_errno = ENOENT;
+	if (mbuf_dynfield == NULL)
 		return -1;
-	}
 
 	if (params != NULL)
 		memcpy(params, &mbuf_dynfield->params, sizeof(*params));
@@ -384,19 +380,15 @@ rte_mbuf_dynflag_lookup(const char *name,
 {
 	struct mbuf_dynflag_elt *mbuf_dynflag;
 
-	if (shm == NULL) {
-		rte_errno = ENOENT;
-		return -1;
-	}
-
 	rte_mcfg_tailq_read_lock();
-	mbuf_dynflag = __mbuf_dynflag_lookup(name);
+	if (shm == NULL && init_shared_mem() < 0)
+		mbuf_dynflag = NULL;
+	else
+		mbuf_dynflag = __mbuf_dynflag_lookup(name);
 	rte_mcfg_tailq_read_unlock();
 
-	if (mbuf_dynflag == NULL) {
-		rte_errno = ENOENT;
+	if (mbuf_dynflag == NULL)
 		return -1;
-	}
 
 	if (params != NULL)
 		memcpy(params, &mbuf_dynflag->params, sizeof(*params));
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:14.164615957 +0000
+++ 0081-mbuf-fix-dynamic-fields-and-flags-with-multiprocess.patch	2020-11-09 18:40:11.239312963 +0000
@@ -1 +1 @@
-From 0429a2e1a445a424b2982f3ce4b3fb34a7d1b796 Mon Sep 17 00:00:00 2001
+From 64244303057f6f428189c64d46ec4aebcf82a1e8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0429a2e1a445a424b2982f3ce4b3fb34a7d1b796 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index e10f4fb125..fd3e019a22 100644
+index f071651acf..5762008b7e 100644
@@ -27 +28 @@
-@@ -174,7 +174,7 @@ __mbuf_dynfield_lookup(const char *name)
+@@ -172,7 +172,7 @@ __mbuf_dynfield_lookup(const char *name)
@@ -36 +37 @@
-@@ -187,19 +187,15 @@ rte_mbuf_dynfield_lookup(const char *name, struct rte_mbuf_dynfield *params)
+@@ -185,19 +185,15 @@ rte_mbuf_dynfield_lookup(const char *name, struct rte_mbuf_dynfield *params)
@@ -61 +62 @@
-@@ -386,19 +382,15 @@ rte_mbuf_dynflag_lookup(const char *name,
+@@ -384,19 +380,15 @@ rte_mbuf_dynflag_lookup(const char *name,

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'doc: fix typo in KNI guide' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (79 preceding siblings ...)
  2020-11-09 18:41     ` [dpdk-stable] patch 'mbuf: fix dynamic fields and flags with multiprocess' " luca.boccassi
@ 2020-11-09 18:41     ` luca.boccassi
  2020-11-09 18:41     ` [dpdk-stable] patch 'doc: remove obsolete deprecation notice for power library' " luca.boccassi
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:41 UTC (permalink / raw)
  To: Ciara Power; +Cc: John McNamara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/fb2180f9f25cc504ab26d2fba7bceed4ba26cbdb

Thanks.

Luca Boccassi

---
From fb2180f9f25cc504ab26d2fba7bceed4ba26cbdb 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 32d09ccf82..f5904f4d1b 100644
--- a/doc/guides/prog_guide/kernel_nic_interface.rst
+++ b/doc/guides/prog_guide/kernel_nic_interface.rst
@@ -178,7 +178,7 @@ 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
 ``rte_kni_alloc()`` function.
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:14.194499904 +0000
+++ 0082-doc-fix-typo-in-KNI-guide.patch	2020-11-09 18:40:11.243313025 +0000
@@ -1 +1 @@
-From cbd2f21ab76b5aa8d7c7967b37062cfb57d8002b Mon Sep 17 00:00:00 2001
+From fb2180f9f25cc504ab26d2fba7bceed4ba26cbdb 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 32d09ccf82..f5904f4d1b 100644

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'doc: remove obsolete deprecation notice for power library' has been queued to stable release 19.11.6
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
                       ` (80 preceding siblings ...)
  2020-11-09 18:41     ` [dpdk-stable] patch 'doc: fix typo in KNI guide' " luca.boccassi
@ 2020-11-09 18:41     ` luca.boccassi
  81 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:41 UTC (permalink / raw)
  To: David Hunt; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/43baac4112f15c2df90258293267c6b360b63cda

Thanks.

Luca Boccassi

---
From 43baac4112f15c2df90258293267c6b360b63cda Mon Sep 17 00:00:00 2001
From: David Hunt <david.hunt@intel.com>
Date: Wed, 4 Nov 2020 09:28:10 +0000
Subject: [PATCH] doc: remove obsolete deprecation notice for power library

[ upstream commit f348642d6f0d7da89bf6e156ff15a8f89c1db5c6 ]

Remove notice announcing an already-implemented change.

In 19.05, rte_power_set_env was changed to return -1 in cases where
the environment was already set up, and for the same release, a
deprecation notice was added.
This patch removes that notice.

The API change was tested by calling rte_power_set_env twice. The first
call succeeded, and the second call failed, as expected.

Fixes: 5a5f3178d4a8 ("power: return error when environment already set")

Signed-off-by: David Hunt <david.hunt@intel.com>
---
 doc/guides/rel_notes/deprecation.rst | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index c2e1298342..58109590cc 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -75,8 +75,3 @@ Deprecation Notices
 
 * metrics: The function ``rte_metrics_init`` will have a non-void return
   in order to notify errors instead of calling ``rte_exit``.
-
-* power: ``rte_power_set_env`` function will no longer return 0 on attempt
-  to set new power environment if power environment was already initialized.
-  In this case the function will return -1 unless the environment is unset first
-  (using ``rte_power_unset_env``). Other function usage scenarios will not change.
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:40:14.224778884 +0000
+++ 0083-doc-remove-obsolete-deprecation-notice-for-power-lib.patch	2020-11-09 18:40:11.243313025 +0000
@@ -1 +1 @@
-From f348642d6f0d7da89bf6e156ff15a8f89c1db5c6 Mon Sep 17 00:00:00 2001
+From 43baac4112f15c2df90258293267c6b360b63cda Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f348642d6f0d7da89bf6e156ff15a8f89c1db5c6 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 759232966e..f3258eb3f7 100644
+index c2e1298342..58109590cc 100644
@@ -28 +29,2 @@
-@@ -127,11 +127,6 @@ Deprecation Notices
+@@ -75,8 +75,3 @@ Deprecation Notices
+ 
@@ -31 +33 @@
- 
+-
@@ -36,4 +37,0 @@
--
- * cmdline: ``cmdline`` structure will be made opaque to hide platform-specific
-   content. On Linux and FreeBSD, supported prior to DPDK 20.11,
-   original structure will be kept until DPDK 21.11.

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'eal: fix MCS lock and ticketlock headers install' has been queued to stable release 19.11.6
  2020-10-28 10:46 ` [dpdk-stable] patch 'config: add Graviton2(arm64) defconfig' " luca.boccassi
  2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
@ 2020-11-09 18:50   ` luca.boccassi
  2020-11-09 18:50     ` [dpdk-stable] patch 'app/testpmd: revert max Rx packet length adjustment' " luca.boccassi
  1 sibling, 1 reply; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:50 UTC (permalink / raw)
  To: Olivier Matz; +Cc: David Marchand, David Christensen, Ruifeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/af1fc63d2e3c1634355415d2c73aadfa82b89e0b

Thanks.

Luca Boccassi

---
From af1fc63d2e3c1634355415d2c73aadfa82b89e0b Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Wed, 4 Nov 2020 18:03:33 +0100
Subject: [PATCH] eal: fix MCS lock and ticketlock headers install

[ upstream commit f8e90bcc1d407a191435cffb1b6b5b0a8ff01c92 ]

Add missing arch-specific headers in meson.build.

Fixes: 2173f3333b61 ("mcslock: add MCS queued lock implementation")
Fixes: ca49b92079df ("ticketlock: enable generic ticketlock on all arch")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 lib/librte_eal/common/include/arch/arm/meson.build    | 2 ++
 lib/librte_eal/common/include/arch/ppc_64/meson.build | 2 ++
 lib/librte_eal/common/include/arch/x86/meson.build    | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/lib/librte_eal/common/include/arch/arm/meson.build b/lib/librte_eal/common/include/arch/arm/meson.build
index 77893fa359..faa3d84f67 100644
--- a/lib/librte_eal/common/include/arch/arm/meson.build
+++ b/lib/librte_eal/common/include/arch/arm/meson.build
@@ -14,6 +14,7 @@ install_headers(
 	'rte_cycles.h',
 	'rte_io_64.h',
 	'rte_io.h',
+	'rte_mcslock.h',
 	'rte_memcpy_32.h',
 	'rte_memcpy_64.h',
 	'rte_memcpy.h',
@@ -25,5 +26,6 @@ install_headers(
 	'rte_prefetch.h',
 	'rte_rwlock.h',
 	'rte_spinlock.h',
+	'rte_ticketlock.h',
 	'rte_vect.h',
 	subdir: get_option('include_subdir_arch'))
diff --git a/lib/librte_eal/common/include/arch/ppc_64/meson.build b/lib/librte_eal/common/include/arch/ppc_64/meson.build
index 7949c86258..5d3ebafa26 100644
--- a/lib/librte_eal/common/include/arch/ppc_64/meson.build
+++ b/lib/librte_eal/common/include/arch/ppc_64/meson.build
@@ -8,10 +8,12 @@ install_headers(
 	'rte_cpuflags.h',
 	'rte_cycles.h',
 	'rte_io.h',
+	'rte_mcslock.h',
 	'rte_memcpy.h',
 	'rte_pause.h',
 	'rte_prefetch.h',
 	'rte_rwlock.h',
 	'rte_spinlock.h',
+	'rte_ticketlock.h',
 	'rte_vect.h',
 	subdir: get_option('include_subdir_arch'))
diff --git a/lib/librte_eal/common/include/arch/x86/meson.build b/lib/librte_eal/common/include/arch/x86/meson.build
index bc8ffea1ee..806cfad042 100644
--- a/lib/librte_eal/common/include/arch/x86/meson.build
+++ b/lib/librte_eal/common/include/arch/x86/meson.build
@@ -11,11 +11,13 @@ install_headers(
 	'rte_cpuflags.h',
 	'rte_cycles.h',
 	'rte_io.h',
+	'rte_mcslock.h',
 	'rte_memcpy.h',
 	'rte_prefetch.h',
 	'rte_pause.h',
 	'rte_rtm.h',
 	'rte_rwlock.h',
 	'rte_spinlock.h',
+	'rte_ticketlock.h',
 	'rte_vect.h',
 	subdir: get_option('include_subdir_arch'))
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:49:40.610209615 +0000
+++ 0001-eal-fix-MCS-lock-and-ticketlock-headers-install.patch	2020-11-09 18:49:40.572079346 +0000
@@ -1 +1 @@
-From f8e90bcc1d407a191435cffb1b6b5b0a8ff01c92 Mon Sep 17 00:00:00 2001
+From af1fc63d2e3c1634355415d2c73aadfa82b89e0b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f8e90bcc1d407a191435cffb1b6b5b0a8ff01c92 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -17,3 +18,3 @@
- lib/librte_eal/arm/include/meson.build | 2 ++
- lib/librte_eal/ppc/include/meson.build | 2 ++
- lib/librte_eal/x86/include/meson.build | 2 ++
+ lib/librte_eal/common/include/arch/arm/meson.build    | 2 ++
+ lib/librte_eal/common/include/arch/ppc_64/meson.build | 2 ++
+ lib/librte_eal/common/include/arch/x86/meson.build    | 2 ++
@@ -22,5 +23,5 @@
-diff --git a/lib/librte_eal/arm/include/meson.build b/lib/librte_eal/arm/include/meson.build
-index c6a9f70d73..770766de1a 100644
---- a/lib/librte_eal/arm/include/meson.build
-+++ b/lib/librte_eal/arm/include/meson.build
-@@ -14,6 +14,7 @@ arch_headers = files(
+diff --git a/lib/librte_eal/common/include/arch/arm/meson.build b/lib/librte_eal/common/include/arch/arm/meson.build
+index 77893fa359..faa3d84f67 100644
+--- a/lib/librte_eal/common/include/arch/arm/meson.build
++++ b/lib/librte_eal/common/include/arch/arm/meson.build
+@@ -14,6 +14,7 @@ install_headers(
@@ -34 +35 @@
-@@ -26,6 +27,7 @@ arch_headers = files(
+@@ -25,5 +26,6 @@ install_headers(
@@ -40,7 +41,6 @@
- )
- install_headers(arch_headers, subdir: get_option('include_subdir_arch'))
-diff --git a/lib/librte_eal/ppc/include/meson.build b/lib/librte_eal/ppc/include/meson.build
-index 0873b2aecb..dae40ede54 100644
---- a/lib/librte_eal/ppc/include/meson.build
-+++ b/lib/librte_eal/ppc/include/meson.build
-@@ -8,12 +8,14 @@ arch_headers = files(
+ 	subdir: get_option('include_subdir_arch'))
+diff --git a/lib/librte_eal/common/include/arch/ppc_64/meson.build b/lib/librte_eal/common/include/arch/ppc_64/meson.build
+index 7949c86258..5d3ebafa26 100644
+--- a/lib/librte_eal/common/include/arch/ppc_64/meson.build
++++ b/lib/librte_eal/common/include/arch/ppc_64/meson.build
+@@ -8,10 +8,12 @@ install_headers(
@@ -53 +52,0 @@
- 	'rte_power_intrinsics.h',
@@ -59,7 +58,6 @@
- )
- install_headers(arch_headers, subdir: get_option('include_subdir_arch'))
-diff --git a/lib/librte_eal/x86/include/meson.build b/lib/librte_eal/x86/include/meson.build
-index 091fb647dc..549cc21a42 100644
---- a/lib/librte_eal/x86/include/meson.build
-+++ b/lib/librte_eal/x86/include/meson.build
-@@ -11,6 +11,7 @@ arch_headers = files(
+ 	subdir: get_option('include_subdir_arch'))
+diff --git a/lib/librte_eal/common/include/arch/x86/meson.build b/lib/librte_eal/common/include/arch/x86/meson.build
+index bc8ffea1ee..806cfad042 100644
+--- a/lib/librte_eal/common/include/arch/x86/meson.build
++++ b/lib/librte_eal/common/include/arch/x86/meson.build
+@@ -11,11 +11,13 @@ install_headers(
@@ -70,0 +69 @@
+ 	'rte_prefetch.h',
@@ -72,2 +70,0 @@
- 	'rte_power_intrinsics.h',
-@@ -18,6 +19,7 @@ arch_headers = files(
@@ -79,2 +76 @@
- )
- install_headers(arch_headers, subdir: get_option('include_subdir_arch'))
+ 	subdir: get_option('include_subdir_arch'))

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'app/testpmd: revert max Rx packet length adjustment' has been queued to stable release 19.11.6
  2020-11-09 18:50   ` [dpdk-stable] patch 'eal: fix MCS lock and ticketlock headers install' " luca.boccassi
@ 2020-11-09 18:50     ` luca.boccassi
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
  0 siblings, 1 reply; 374+ messages in thread
From: luca.boccassi @ 2020-11-09 18:50 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Andrew Rybchenko, Lance Richardson, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/11/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/93be79055bd21dc8909186107db7d2e4ccaba8bd

Thanks.

Luca Boccassi

---
From 93be79055bd21dc8909186107db7d2e4ccaba8bd Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Thu, 5 Nov 2020 18:05:41 +0100
Subject: [PATCH] app/testpmd: revert max Rx packet length adjustment

[ upstream commit 13e0b599acfd7ec7d92a48c827be03bdc491429b ]

The fix of max_rx_pkt_len for allowing VLAN packets in all cases
was breaking configuration of some drivers. Example with virtio:

	Ethdev port_id=0 max_rx_pkt_len 11229 > max valid value 9728
	Fail to configure port 0

Trying to fix the logic was revealing other issues in some drivers.
That's why it is decided to revert.

The workaround for the original issue would be
to set the MTU explicitly from the application
with rte_eth_dev_set_mtu().
See RFC: https://patches.dpdk.org/patch/83756/

Fixes: f6870a7ed6b3 ("app/testpmd: fix max Rx packet length for VLAN packet")

Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/testpmd.c | 23 -----------------------
 1 file changed, 23 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index cb4c365cb1..7f59cb02d1 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1301,7 +1301,6 @@ init_config(void)
 	struct rte_gro_param gro_param;
 	uint32_t gso_types;
 	uint16_t data_size;
-	uint16_t overhead_len;
 	bool warning = 0;
 	int k;
 	int ret;
@@ -1338,28 +1337,6 @@ init_config(void)
 			rte_exit(EXIT_FAILURE,
 				 "rte_eth_dev_info_get() failed\n");
 
-		/* Update the max_rx_pkt_len to have MTU as RTE_ETHER_MTU */
-		if (port->dev_info.max_rx_pktlen && port->dev_info.max_mtu)
-			overhead_len = port->dev_info.max_rx_pktlen -
-				port->dev_info.max_mtu;
-		else
-			overhead_len = RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;
-
-		port->dev_conf.rxmode.max_rx_pkt_len =
-						RTE_ETHER_MTU + overhead_len;
-
-		/*
-		 * This is workaround to avoid resize max rx packet len.
-		 * Ethdev assumes jumbo frame size must be greater than
-		 * RTE_ETHER_MAX_LEN, and will resize 'max_rx_pkt_len' to
-		 * default value when it is greater than RTE_ETHER_MAX_LEN
-		 * for normal frame.
-		 */
-		if (port->dev_conf.rxmode.max_rx_pkt_len > RTE_ETHER_MAX_LEN) {
-			port->dev_conf.rxmode.offloads |=
-						DEV_RX_OFFLOAD_JUMBO_FRAME;
-		}
-
 		if (!(port->dev_info.tx_offload_capa &
 		      DEV_TX_OFFLOAD_MBUF_FAST_FREE))
 			port->dev_conf.txmode.offloads &=
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-09 18:49:40.643685401 +0000
+++ 0002-app-testpmd-revert-max-Rx-packet-length-adjustment.patch	2020-11-09 18:49:40.576079407 +0000
@@ -1 +1 @@
-From 13e0b599acfd7ec7d92a48c827be03bdc491429b Mon Sep 17 00:00:00 2001
+From 93be79055bd21dc8909186107db7d2e4ccaba8bd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 13e0b599acfd7ec7d92a48c827be03bdc491429b ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -32 +33 @@
-index c263121a9a..33fc0fddf5 100644
+index cb4c365cb1..7f59cb02d1 100644
@@ -35 +36 @@
-@@ -1421,7 +1421,6 @@ init_config(void)
+@@ -1301,7 +1301,6 @@ init_config(void)
@@ -43 +44 @@
-@@ -1458,28 +1457,6 @@ init_config(void)
+@@ -1338,28 +1337,6 @@ init_config(void)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* Re: [dpdk-stable] patch 'gso: fix mbuf freeing responsibility' has been queued to stable release 19.11.6
  2020-11-09 18:40     ` [dpdk-stable] patch 'gso: fix mbuf freeing responsibility' " luca.boccassi
@ 2020-11-09 22:39       ` Ananyev, Konstantin
  2020-11-10 10:31         ` Luca Boccassi
  0 siblings, 1 reply; 374+ messages in thread
From: Ananyev, Konstantin @ 2020-11-09 22:39 UTC (permalink / raw)
  To: luca.boccassi, Yi Yang; +Cc: Hu, Jiayu, dpdk stable

Hi Luca,


> Hi,
> 
> FYI, your patch has been queued to stable release 19.11.6
> 
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 11/11/20. So please
> shout if anyone has objections.

Not sure it has to be backported to 19.11 LTS.
Yes it fixes a problem, but it also introduces a functional change.
AFAIK, we have to avoid it with LTS patches.
Konstantin


> 
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to 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/bluca/dpdk-stable
> 
> This queued commit can be viewed at:
> https://github.com/bluca/dpdk-stable/commit/6dce2ff12e8191ffd4d23e1ab9322f2d042f6e5b
> 
> Thanks.
> 
> Luca Boccassi
> 
> ---
> From 6dce2ff12e8191ffd4d23e1ab9322f2d042f6e5b Mon Sep 17 00:00:00 2001
> From: Yi Yang <yangyi01@inspur.com>
> Date: Mon, 26 Oct 2020 14:47:13 +0800
> Subject: [PATCH] gso: fix mbuf freeing responsibility
> 
> [ upstream commit c0d002aed98d6d1d38d6bb318a5bd2ed5cdc01b1 ]
> 
> rte_gso_segment decreased refcnt of pkt by one, but
> it is wrong if pkt is external mbuf, pkt won't be
> freed because of incorrect refcnt, the result is
> application can't allocate mbuf from mempool because
> mbufs in mempool are run out of.
> 
> One correct way is application should call
> rte_pktmbuf_free after calling rte_gso_segment to free
> pkt explicitly. rte_gso_segment must not handle it, this
> should be responsibility of application.
> 
> This commit changed rte_gso_segment in functional behavior
> and return value, so the application must take appropriate
> actions according to return values, "ret < 0" means it
> should free and drop 'pkt', "ret == 0" means 'pkt' isn't
> GSOed but 'pkt' can be transmitted as a normal packet,
> "ret > 0" means 'pkt' has been GSOed into two or multiple
> segments, it should use "pkts_out" to transmit these
> segments. The application must free 'pkt' after call
> rte_gso_segment when return value isn't equal to 0.
> 
> Fixes: 119583797b6a ("gso: support TCP/IPv4 GSO")
> 
> Signed-off-by: Yi Yang <yangyi01@inspur.com>
> Acked-by: Jiayu Hu <jiayu.hu@intel.com>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> ---
>  app/test-pmd/csumonly.c                           | 12 ++++++++++--
>  .../generic_segmentation_offload_lib.rst          |  7 +++++--
>  drivers/net/tap/rte_eth_tap.c                     | 12 ++++++++++--
>  lib/librte_gso/gso_tcp4.c                         |  6 ++----
>  lib/librte_gso/gso_tunnel_tcp4.c                  | 14 +++++---------
>  lib/librte_gso/gso_udp4.c                         |  6 ++----
>  lib/librte_gso/rte_gso.c                          | 15 +++------------
>  lib/librte_gso/rte_gso.h                          |  8 ++++++--
>  8 files changed, 43 insertions(+), 37 deletions(-)
> 
> diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
> index 7b92ab1195..d0eef8b51c 100644
> --- a/app/test-pmd/csumonly.c
> +++ b/app/test-pmd/csumonly.c
> @@ -1050,9 +1050,17 @@ tunnel_update:
>  			ret = rte_gso_segment(pkts_burst[i], gso_ctx,
>  					&gso_segments[nb_segments],
>  					GSO_MAX_PKT_BURST - nb_segments);
> -			if (ret >= 0)
> +			if (ret >= 1) {
> +				/* pkts_burst[i] can be freed safely here. */
> +				rte_pktmbuf_free(pkts_burst[i]);
>  				nb_segments += ret;
> -			else {
> +			} else if (ret == 0) {
> +				/* 0 means it can be transmitted directly
> +				 * without gso.
> +				 */
> +				gso_segments[nb_segments] = pkts_burst[i];
> +				nb_segments += 1;
> +			} else {
>  				TESTPMD_LOG(DEBUG, "Unable to segment packet");
>  				rte_pktmbuf_free(pkts_burst[i]);
>  			}
> diff --git a/doc/guides/prog_guide/generic_segmentation_offload_lib.rst b/doc/guides/prog_guide/generic_segmentation_offload_lib.rst
> index 205cb8a866..ad91c6e5fc 100644
> --- a/doc/guides/prog_guide/generic_segmentation_offload_lib.rst
> +++ b/doc/guides/prog_guide/generic_segmentation_offload_lib.rst
> @@ -25,8 +25,9 @@ Bearing that in mind, the GSO library enables DPDK applications to segment
>  packets in software. Note however, that GSO is implemented as a standalone
>  library, and not via a 'fallback' mechanism (i.e. for when TSO is unsupported
>  in the underlying hardware); that is, applications must explicitly invoke the
> -GSO library to segment packets. The size of GSO segments ``(segsz)`` is
> -configurable by the application.
> +GSO library to segment packets, they also must call ``rte_pktmbuf_free()``
> +to free mbuf GSO segments attached after calling ``rte_gso_segment()``.
> +The size of GSO segments (``segsz``) is configurable by the application.
> 
>  Limitations
>  -----------
> @@ -233,6 +234,8 @@ To segment an outgoing packet, an application must:
> 
>  #. Invoke the GSO segmentation API, ``rte_gso_segment()``.
> 
> +#. Call ``rte_pktmbuf_free()`` to free mbuf ``rte_gso_segment()`` segments.
> +
>  #. If required, update the L3 and L4 checksums of the newly-created segments.
>     For tunneled packets, the outer IPv4 headers' checksums should also be
>     updated. Alternatively, the application may offload checksum calculation
> diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
> index cfbd579cd6..1e2f21d96f 100644
> --- a/drivers/net/tap/rte_eth_tap.c
> +++ b/drivers/net/tap/rte_eth_tap.c
> @@ -713,8 +713,16 @@ pmd_tx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
>  			if (num_tso_mbufs < 0)
>  				break;
> 
> -			mbuf = gso_mbufs;
> -			num_mbufs = num_tso_mbufs;
> +			if (num_tso_mbufs >= 1) {
> +				mbuf = gso_mbufs;
> +				num_mbufs = num_tso_mbufs;
> +			} else {
> +				/* 0 means it can be transmitted directly
> +				 * without gso.
> +				 */
> +				mbuf = &mbuf_in;
> +				num_mbufs = 1;
> +			}
>  		} else {
>  			/* stats.errs will be incremented */
>  			if (rte_pktmbuf_pkt_len(mbuf_in) > max_size)
> diff --git a/lib/librte_gso/gso_tcp4.c b/lib/librte_gso/gso_tcp4.c
> index ade172ac73..d31feaff95 100644
> --- a/lib/librte_gso/gso_tcp4.c
> +++ b/lib/librte_gso/gso_tcp4.c
> @@ -50,15 +50,13 @@ gso_tcp4_segment(struct rte_mbuf *pkt,
>  			pkt->l2_len);
>  	frag_off = rte_be_to_cpu_16(ipv4_hdr->fragment_offset);
>  	if (unlikely(IS_FRAGMENTED(frag_off))) {
> -		pkts_out[0] = pkt;
> -		return 1;
> +		return 0;
>  	}
> 
>  	/* Don't process the packet without data */
>  	hdr_offset = pkt->l2_len + pkt->l3_len + pkt->l4_len;
>  	if (unlikely(hdr_offset >= pkt->pkt_len)) {
> -		pkts_out[0] = pkt;
> -		return 1;
> +		return 0;
>  	}
> 
>  	pyld_unit_size = gso_size - hdr_offset;
> diff --git a/lib/librte_gso/gso_tunnel_tcp4.c b/lib/librte_gso/gso_tunnel_tcp4.c
> index e0384c26d0..166aace73a 100644
> --- a/lib/librte_gso/gso_tunnel_tcp4.c
> +++ b/lib/librte_gso/gso_tunnel_tcp4.c
> @@ -62,7 +62,7 @@ gso_tunnel_tcp4_segment(struct rte_mbuf *pkt,
>  {
>  	struct rte_ipv4_hdr *inner_ipv4_hdr;
>  	uint16_t pyld_unit_size, hdr_offset, frag_off;
> -	int ret = 1;
> +	int ret;
> 
>  	hdr_offset = pkt->outer_l2_len + pkt->outer_l3_len + pkt->l2_len;
>  	inner_ipv4_hdr = (struct rte_ipv4_hdr *)(rte_pktmbuf_mtod(pkt, char *) +
> @@ -73,25 +73,21 @@ gso_tunnel_tcp4_segment(struct rte_mbuf *pkt,
>  	 */
>  	frag_off = rte_be_to_cpu_16(inner_ipv4_hdr->fragment_offset);
>  	if (unlikely(IS_FRAGMENTED(frag_off))) {
> -		pkts_out[0] = pkt;
> -		return 1;
> +		return 0;
>  	}
> 
>  	hdr_offset += pkt->l3_len + pkt->l4_len;
>  	/* Don't process the packet without data */
>  	if (hdr_offset >= pkt->pkt_len) {
> -		pkts_out[0] = pkt;
> -		return 1;
> +		return 0;
>  	}
>  	pyld_unit_size = gso_size - hdr_offset;
> 
>  	/* Segment the payload */
>  	ret = gso_do_segment(pkt, hdr_offset, pyld_unit_size, direct_pool,
>  			indirect_pool, pkts_out, nb_pkts_out);
> -	if (ret <= 1)
> -		return ret;
> -
> -	update_tunnel_ipv4_tcp_headers(pkt, ipid_delta, pkts_out, ret);
> +	if (ret > 1)
> +		update_tunnel_ipv4_tcp_headers(pkt, ipid_delta, pkts_out, ret);
> 
>  	return ret;
>  }
> diff --git a/lib/librte_gso/gso_udp4.c b/lib/librte_gso/gso_udp4.c
> index 6fa68f243a..5d0186aa24 100644
> --- a/lib/librte_gso/gso_udp4.c
> +++ b/lib/librte_gso/gso_udp4.c
> @@ -52,8 +52,7 @@ gso_udp4_segment(struct rte_mbuf *pkt,
>  			pkt->l2_len);
>  	frag_off = rte_be_to_cpu_16(ipv4_hdr->fragment_offset);
>  	if (unlikely(IS_FRAGMENTED(frag_off))) {
> -		pkts_out[0] = pkt;
> -		return 1;
> +		return 0;
>  	}
> 
>  	/*
> @@ -65,8 +64,7 @@ gso_udp4_segment(struct rte_mbuf *pkt,
> 
>  	/* Don't process the packet without data. */
>  	if (unlikely(hdr_offset + pkt->l4_len >= pkt->pkt_len)) {
> -		pkts_out[0] = pkt;
> -		return 1;
> +		return 0;
>  	}
> 
>  	/* pyld_unit_size must be a multiple of 8 because frag_off
> diff --git a/lib/librte_gso/rte_gso.c b/lib/librte_gso/rte_gso.c
> index 751b5b625e..896350ebc8 100644
> --- a/lib/librte_gso/rte_gso.c
> +++ b/lib/librte_gso/rte_gso.c
> @@ -30,7 +30,6 @@ rte_gso_segment(struct rte_mbuf *pkt,
>  		uint16_t nb_pkts_out)
>  {
>  	struct rte_mempool *direct_pool, *indirect_pool;
> -	struct rte_mbuf *pkt_seg;
>  	uint64_t ol_flags;
>  	uint16_t gso_size;
>  	uint8_t ipid_delta;
> @@ -44,8 +43,7 @@ rte_gso_segment(struct rte_mbuf *pkt,
> 
>  	if (gso_ctx->gso_size >= pkt->pkt_len) {
>  		pkt->ol_flags &= (~(PKT_TX_TCP_SEG | PKT_TX_UDP_SEG));
> -		pkts_out[0] = pkt;
> -		return 1;
> +		return 0;
>  	}
> 
>  	direct_pool = gso_ctx->direct_pool;
> @@ -75,18 +73,11 @@ rte_gso_segment(struct rte_mbuf *pkt,
>  				indirect_pool, pkts_out, nb_pkts_out);
>  	} else {
>  		/* unsupported packet, skip */
> -		pkts_out[0] = pkt;
>  		RTE_LOG(DEBUG, GSO, "Unsupported packet type\n");
> -		return 1;
> +		ret = 0;
>  	}
> 
> -	if (ret > 1) {
> -		pkt_seg = pkt;
> -		while (pkt_seg) {
> -			rte_mbuf_refcnt_update(pkt_seg, -1);
> -			pkt_seg = pkt_seg->next;
> -		}
> -	} else if (ret < 0) {
> +	if (ret < 0) {
>  		/* Revert the ol_flags in the event of failure. */
>  		pkt->ol_flags = ol_flags;
>  	}
> diff --git a/lib/librte_gso/rte_gso.h b/lib/librte_gso/rte_gso.h
> index 3aab297f44..d93ee8e5b1 100644
> --- a/lib/librte_gso/rte_gso.h
> +++ b/lib/librte_gso/rte_gso.h
> @@ -89,8 +89,11 @@ struct rte_gso_ctx {
>   * the GSO segments are sent to should support transmission of multi-segment
>   * packets.
>   *
> - * If the input packet is GSO'd, its mbuf refcnt reduces by 1. Therefore,
> - * when all GSO segments are freed, the input packet is freed automatically.
> + * If the input packet is GSO'd, all the indirect segments are attached to the
> + * input packet.
> + *
> + * rte_gso_segment() will not free the input packet no matter whether it is
> + * GSO'd or not, the application should free it after calling rte_gso_segment().
>   *
>   * If the memory space in pkts_out or MBUF pools is insufficient, this
>   * function fails, and it returns (-1) * errno. Otherwise, GSO succeeds,
> @@ -109,6 +112,7 @@ struct rte_gso_ctx {
>   *
>   * @return
>   *  - The number of GSO segments filled in pkts_out on success.
> + *  - Return 0 if it does not need to be GSO'd.
>   *  - Return -ENOMEM if run out of memory in MBUF pools.
>   *  - Return -EINVAL for invalid parameters.
>   */
> --
> 2.27.0
> 
> ---
>   Diff of the applied patch vs upstream commit (please double-check if non-empty:
> ---
> --- -	2020-11-09 18:40:12.168193728 +0000
> +++ 0024-gso-fix-mbuf-freeing-responsibility.patch	2020-11-09 18:40:11.103310846 +0000
> @@ -1 +1 @@
> -From c0d002aed98d6d1d38d6bb318a5bd2ed5cdc01b1 Mon Sep 17 00:00:00 2001
> +From 6dce2ff12e8191ffd4d23e1ab9322f2d042f6e5b Mon Sep 17 00:00:00 2001
> @@ -5,0 +6,2 @@
> +[ upstream commit c0d002aed98d6d1d38d6bb318a5bd2ed5cdc01b1 ]
> +
> @@ -28 +29,0 @@
> -Cc: stable@dpdk.org
> @@ -36 +36,0 @@
> - doc/guides/rel_notes/release_20_11.rst            |  6 ++++++
> @@ -43 +43 @@
> - 9 files changed, 49 insertions(+), 37 deletions(-)
> + 8 files changed, 43 insertions(+), 37 deletions(-)
> @@ -46 +46 @@
> -index 3d7d244d1e..d813d4fae0 100644
> +index 7b92ab1195..d0eef8b51c 100644
> @@ -49 +49 @@
> -@@ -1080,9 +1080,17 @@ tunnel_update:
> +@@ -1050,9 +1050,17 @@ tunnel_update:
> @@ -94,17 +93,0 @@
> -diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
> -index 7c8246d1b3..1524f61915 100644
> ---- a/doc/guides/rel_notes/release_20_11.rst
> -+++ b/doc/guides/rel_notes/release_20_11.rst
> -@@ -569,6 +569,12 @@ API Changes
> -
> - * bpf: ``RTE_BPF_XTYPE_NUM`` has been dropped from ``rte_bpf_xtype``.
> -
> -+* gso: Changed ``rte_gso_segment`` behaviour and return value:
> -+
> -+  * ``pkt`` is not saved to ``pkts_out[0]`` if not GSOed.
> -+  * Return 0 instead of 1 for the above case.
> -+  * ``pkt`` is not freed, no matter whether it is GSOed, leaving to the caller.
> -+
> - * acl: ``RTE_ACL_CLASSIFY_NUM`` enum value has been removed.
> -   This enum value was not used inside DPDK, while it prevented to add new
> -   classify algorithms without causing an ABI breakage.
> @@ -112 +95 @@
> -index 81c688471d..2f8abb12c5 100644
> +index cfbd579cd6..1e2f21d96f 100644
> @@ -115 +98 @@
> -@@ -751,8 +751,16 @@ pmd_tx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
> +@@ -713,8 +713,16 @@ pmd_tx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* Re: [dpdk-stable] patch 'gso: fix mbuf freeing responsibility' has been queued to stable release 19.11.6
  2020-11-09 22:39       ` Ananyev, Konstantin
@ 2020-11-10 10:31         ` Luca Boccassi
  0 siblings, 0 replies; 374+ messages in thread
From: Luca Boccassi @ 2020-11-10 10:31 UTC (permalink / raw)
  To: Ananyev, Konstantin, Yi Yang; +Cc: Hu, Jiayu, dpdk stable

On Mon, 2020-11-09 at 22:39 +0000, Ananyev, Konstantin wrote:
> Hi Luca,
> 
> 
> > Hi,
> > 
> > FYI, your patch has been queued to stable release 19.11.6
> > 
> > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> > It will be pushed if I get no objections before 11/11/20. So please
> > shout if anyone has objections.
> 
> Not sure it has to be backported to 19.11 LTS.
> Yes it fixes a problem, but it also introduces a functional change.
> AFAIK, we have to avoid it with LTS patches.
> Konstantin

Ok, removed.

> > Also note that after the patch there's a diff of the upstream commit vs the
> > patch applied to the branch. This will indicate if there was any rebasing
> > needed to apply to 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/bluca/dpdk-stable
> > 
> > This queued commit can be viewed at:
> > https://github.com/bluca/dpdk-stable/commit/6dce2ff12e8191ffd4d23e1ab9322f2d042f6e5b
> > 
> > Thanks.
> > 
> > Luca Boccassi
> > 
> > ---
> > From 6dce2ff12e8191ffd4d23e1ab9322f2d042f6e5b Mon Sep 17 00:00:00 2001
> > From: Yi Yang <yangyi01@inspur.com>
> > Date: Mon, 26 Oct 2020 14:47:13 +0800
> > Subject: [PATCH] gso: fix mbuf freeing responsibility
> > 
> > [ upstream commit c0d002aed98d6d1d38d6bb318a5bd2ed5cdc01b1 ]
> > 
> > rte_gso_segment decreased refcnt of pkt by one, but
> > it is wrong if pkt is external mbuf, pkt won't be
> > freed because of incorrect refcnt, the result is
> > application can't allocate mbuf from mempool because
> > mbufs in mempool are run out of.
> > 
> > One correct way is application should call
> > rte_pktmbuf_free after calling rte_gso_segment to free
> > pkt explicitly. rte_gso_segment must not handle it, this
> > should be responsibility of application.
> > 
> > This commit changed rte_gso_segment in functional behavior
> > and return value, so the application must take appropriate
> > actions according to return values, "ret < 0" means it
> > should free and drop 'pkt', "ret == 0" means 'pkt' isn't
> > GSOed but 'pkt' can be transmitted as a normal packet,
> > "ret > 0" means 'pkt' has been GSOed into two or multiple
> > segments, it should use "pkts_out" to transmit these
> > segments. The application must free 'pkt' after call
> > rte_gso_segment when return value isn't equal to 0.
> > 
> > Fixes: 119583797b6a ("gso: support TCP/IPv4 GSO")
> > 
> > Signed-off-by: Yi Yang <yangyi01@inspur.com>
> > Acked-by: Jiayu Hu <jiayu.hu@intel.com>
> > Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> > ---
> >  app/test-pmd/csumonly.c                           | 12 ++++++++++--
> >  .../generic_segmentation_offload_lib.rst          |  7 +++++--
> >  drivers/net/tap/rte_eth_tap.c                     | 12 ++++++++++--
> >  lib/librte_gso/gso_tcp4.c                         |  6 ++----
> >  lib/librte_gso/gso_tunnel_tcp4.c                  | 14 +++++---------
> >  lib/librte_gso/gso_udp4.c                         |  6 ++----
> >  lib/librte_gso/rte_gso.c                          | 15 +++------------
> >  lib/librte_gso/rte_gso.h                          |  8 ++++++--
> >  8 files changed, 43 insertions(+), 37 deletions(-)
> > 
> > diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
> > index 7b92ab1195..d0eef8b51c 100644
> > --- a/app/test-pmd/csumonly.c
> > +++ b/app/test-pmd/csumonly.c
> > @@ -1050,9 +1050,17 @@ tunnel_update:
> >  			ret = rte_gso_segment(pkts_burst[i], gso_ctx,
> >  					&gso_segments[nb_segments],
> >  					GSO_MAX_PKT_BURST - nb_segments);
> > -			if (ret >= 0)
> > +			if (ret >= 1) {
> > +				/* pkts_burst[i] can be freed safely here. */
> > +				rte_pktmbuf_free(pkts_burst[i]);
> >  				nb_segments += ret;
> > -			else {
> > +			} else if (ret == 0) {
> > +				/* 0 means it can be transmitted directly
> > +				 * without gso.
> > +				 */
> > +				gso_segments[nb_segments] = pkts_burst[i];
> > +				nb_segments += 1;
> > +			} else {
> >  				TESTPMD_LOG(DEBUG, "Unable to segment packet");
> >  				rte_pktmbuf_free(pkts_burst[i]);
> >  			}
> > diff --git a/doc/guides/prog_guide/generic_segmentation_offload_lib.rst b/doc/guides/prog_guide/generic_segmentation_offload_lib.rst
> > index 205cb8a866..ad91c6e5fc 100644
> > --- a/doc/guides/prog_guide/generic_segmentation_offload_lib.rst
> > +++ b/doc/guides/prog_guide/generic_segmentation_offload_lib.rst
> > @@ -25,8 +25,9 @@ Bearing that in mind, the GSO library enables DPDK applications to segment
> >  packets in software. Note however, that GSO is implemented as a standalone
> >  library, and not via a 'fallback' mechanism (i.e. for when TSO is unsupported
> >  in the underlying hardware); that is, applications must explicitly invoke the
> > -GSO library to segment packets. The size of GSO segments ``(segsz)`` is
> > -configurable by the application.
> > +GSO library to segment packets, they also must call ``rte_pktmbuf_free()``
> > +to free mbuf GSO segments attached after calling ``rte_gso_segment()``.
> > +The size of GSO segments (``segsz``) is configurable by the application.
> > 
> >  Limitations
> >  -----------
> > @@ -233,6 +234,8 @@ To segment an outgoing packet, an application must:
> > 
> >  #. Invoke the GSO segmentation API, ``rte_gso_segment()``.
> > 
> > +#. Call ``rte_pktmbuf_free()`` to free mbuf ``rte_gso_segment()`` segments.
> > +
> >  #. If required, update the L3 and L4 checksums of the newly-created segments.
> >     For tunneled packets, the outer IPv4 headers' checksums should also be
> >     updated. Alternatively, the application may offload checksum calculation
> > diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
> > index cfbd579cd6..1e2f21d96f 100644
> > --- a/drivers/net/tap/rte_eth_tap.c
> > +++ b/drivers/net/tap/rte_eth_tap.c
> > @@ -713,8 +713,16 @@ pmd_tx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
> >  			if (num_tso_mbufs < 0)
> >  				break;
> > 
> > -			mbuf = gso_mbufs;
> > -			num_mbufs = num_tso_mbufs;
> > +			if (num_tso_mbufs >= 1) {
> > +				mbuf = gso_mbufs;
> > +				num_mbufs = num_tso_mbufs;
> > +			} else {
> > +				/* 0 means it can be transmitted directly
> > +				 * without gso.
> > +				 */
> > +				mbuf = &mbuf_in;
> > +				num_mbufs = 1;
> > +			}
> >  		} else {
> >  			/* stats.errs will be incremented */
> >  			if (rte_pktmbuf_pkt_len(mbuf_in) > max_size)
> > diff --git a/lib/librte_gso/gso_tcp4.c b/lib/librte_gso/gso_tcp4.c
> > index ade172ac73..d31feaff95 100644
> > --- a/lib/librte_gso/gso_tcp4.c
> > +++ b/lib/librte_gso/gso_tcp4.c
> > @@ -50,15 +50,13 @@ gso_tcp4_segment(struct rte_mbuf *pkt,
> >  			pkt->l2_len);
> >  	frag_off = rte_be_to_cpu_16(ipv4_hdr->fragment_offset);
> >  	if (unlikely(IS_FRAGMENTED(frag_off))) {
> > -		pkts_out[0] = pkt;
> > -		return 1;
> > +		return 0;
> >  	}
> > 
> >  	/* Don't process the packet without data */
> >  	hdr_offset = pkt->l2_len + pkt->l3_len + pkt->l4_len;
> >  	if (unlikely(hdr_offset >= pkt->pkt_len)) {
> > -		pkts_out[0] = pkt;
> > -		return 1;
> > +		return 0;
> >  	}
> > 
> >  	pyld_unit_size = gso_size - hdr_offset;
> > diff --git a/lib/librte_gso/gso_tunnel_tcp4.c b/lib/librte_gso/gso_tunnel_tcp4.c
> > index e0384c26d0..166aace73a 100644
> > --- a/lib/librte_gso/gso_tunnel_tcp4.c
> > +++ b/lib/librte_gso/gso_tunnel_tcp4.c
> > @@ -62,7 +62,7 @@ gso_tunnel_tcp4_segment(struct rte_mbuf *pkt,
> >  {
> >  	struct rte_ipv4_hdr *inner_ipv4_hdr;
> >  	uint16_t pyld_unit_size, hdr_offset, frag_off;
> > -	int ret = 1;
> > +	int ret;
> > 
> >  	hdr_offset = pkt->outer_l2_len + pkt->outer_l3_len + pkt->l2_len;
> >  	inner_ipv4_hdr = (struct rte_ipv4_hdr *)(rte_pktmbuf_mtod(pkt, char *) +
> > @@ -73,25 +73,21 @@ gso_tunnel_tcp4_segment(struct rte_mbuf *pkt,
> >  	 */
> >  	frag_off = rte_be_to_cpu_16(inner_ipv4_hdr->fragment_offset);
> >  	if (unlikely(IS_FRAGMENTED(frag_off))) {
> > -		pkts_out[0] = pkt;
> > -		return 1;
> > +		return 0;
> >  	}
> > 
> >  	hdr_offset += pkt->l3_len + pkt->l4_len;
> >  	/* Don't process the packet without data */
> >  	if (hdr_offset >= pkt->pkt_len) {
> > -		pkts_out[0] = pkt;
> > -		return 1;
> > +		return 0;
> >  	}
> >  	pyld_unit_size = gso_size - hdr_offset;
> > 
> >  	/* Segment the payload */
> >  	ret = gso_do_segment(pkt, hdr_offset, pyld_unit_size, direct_pool,
> >  			indirect_pool, pkts_out, nb_pkts_out);
> > -	if (ret <= 1)
> > -		return ret;
> > -
> > -	update_tunnel_ipv4_tcp_headers(pkt, ipid_delta, pkts_out, ret);
> > +	if (ret > 1)
> > +		update_tunnel_ipv4_tcp_headers(pkt, ipid_delta, pkts_out, ret);
> > 
> >  	return ret;
> >  }
> > diff --git a/lib/librte_gso/gso_udp4.c b/lib/librte_gso/gso_udp4.c
> > index 6fa68f243a..5d0186aa24 100644
> > --- a/lib/librte_gso/gso_udp4.c
> > +++ b/lib/librte_gso/gso_udp4.c
> > @@ -52,8 +52,7 @@ gso_udp4_segment(struct rte_mbuf *pkt,
> >  			pkt->l2_len);
> >  	frag_off = rte_be_to_cpu_16(ipv4_hdr->fragment_offset);
> >  	if (unlikely(IS_FRAGMENTED(frag_off))) {
> > -		pkts_out[0] = pkt;
> > -		return 1;
> > +		return 0;
> >  	}
> > 
> >  	/*
> > @@ -65,8 +64,7 @@ gso_udp4_segment(struct rte_mbuf *pkt,
> > 
> >  	/* Don't process the packet without data. */
> >  	if (unlikely(hdr_offset + pkt->l4_len >= pkt->pkt_len)) {
> > -		pkts_out[0] = pkt;
> > -		return 1;
> > +		return 0;
> >  	}
> > 
> >  	/* pyld_unit_size must be a multiple of 8 because frag_off
> > diff --git a/lib/librte_gso/rte_gso.c b/lib/librte_gso/rte_gso.c
> > index 751b5b625e..896350ebc8 100644
> > --- a/lib/librte_gso/rte_gso.c
> > +++ b/lib/librte_gso/rte_gso.c
> > @@ -30,7 +30,6 @@ rte_gso_segment(struct rte_mbuf *pkt,
> >  		uint16_t nb_pkts_out)
> >  {
> >  	struct rte_mempool *direct_pool, *indirect_pool;
> > -	struct rte_mbuf *pkt_seg;
> >  	uint64_t ol_flags;
> >  	uint16_t gso_size;
> >  	uint8_t ipid_delta;
> > @@ -44,8 +43,7 @@ rte_gso_segment(struct rte_mbuf *pkt,
> > 
> >  	if (gso_ctx->gso_size >= pkt->pkt_len) {
> >  		pkt->ol_flags &= (~(PKT_TX_TCP_SEG | PKT_TX_UDP_SEG));
> > -		pkts_out[0] = pkt;
> > -		return 1;
> > +		return 0;
> >  	}
> > 
> >  	direct_pool = gso_ctx->direct_pool;
> > @@ -75,18 +73,11 @@ rte_gso_segment(struct rte_mbuf *pkt,
> >  				indirect_pool, pkts_out, nb_pkts_out);
> >  	} else {
> >  		/* unsupported packet, skip */
> > -		pkts_out[0] = pkt;
> >  		RTE_LOG(DEBUG, GSO, "Unsupported packet type\n");
> > -		return 1;
> > +		ret = 0;
> >  	}
> > 
> > -	if (ret > 1) {
> > -		pkt_seg = pkt;
> > -		while (pkt_seg) {
> > -			rte_mbuf_refcnt_update(pkt_seg, -1);
> > -			pkt_seg = pkt_seg->next;
> > -		}
> > -	} else if (ret < 0) {
> > +	if (ret < 0) {
> >  		/* Revert the ol_flags in the event of failure. */
> >  		pkt->ol_flags = ol_flags;
> >  	}
> > diff --git a/lib/librte_gso/rte_gso.h b/lib/librte_gso/rte_gso.h
> > index 3aab297f44..d93ee8e5b1 100644
> > --- a/lib/librte_gso/rte_gso.h
> > +++ b/lib/librte_gso/rte_gso.h
> > @@ -89,8 +89,11 @@ struct rte_gso_ctx {
> >   * the GSO segments are sent to should support transmission of multi-segment
> >   * packets.
> >   *
> > - * If the input packet is GSO'd, its mbuf refcnt reduces by 1. Therefore,
> > - * when all GSO segments are freed, the input packet is freed automatically.
> > + * If the input packet is GSO'd, all the indirect segments are attached to the
> > + * input packet.
> > + *
> > + * rte_gso_segment() will not free the input packet no matter whether it is
> > + * GSO'd or not, the application should free it after calling rte_gso_segment().
> >   *
> >   * If the memory space in pkts_out or MBUF pools is insufficient, this
> >   * function fails, and it returns (-1) * errno. Otherwise, GSO succeeds,
> > @@ -109,6 +112,7 @@ struct rte_gso_ctx {
> >   *
> >   * @return
> >   *  - The number of GSO segments filled in pkts_out on success.
> > + *  - Return 0 if it does not need to be GSO'd.
> >   *  - Return -ENOMEM if run out of memory in MBUF pools.
> >   *  - Return -EINVAL for invalid parameters.
> >   */
> > --
> > 2.27.0
> > 
> > ---
> >   Diff of the applied patch vs upstream commit (please double-check if non-empty:
> > ---
> > --- -	2020-11-09 18:40:12.168193728 +0000
> > +++ 0024-gso-fix-mbuf-freeing-responsibility.patch	2020-11-09 18:40:11.103310846 +0000
> > @@ -1 +1 @@
> > -From c0d002aed98d6d1d38d6bb318a5bd2ed5cdc01b1 Mon Sep 17 00:00:00 2001
> > +From 6dce2ff12e8191ffd4d23e1ab9322f2d042f6e5b Mon Sep 17 00:00:00 2001
> > @@ -5,0 +6,2 @@
> > +[ upstream commit c0d002aed98d6d1d38d6bb318a5bd2ed5cdc01b1 ]
> > +
> > @@ -28 +29,0 @@
> > -Cc: stable@dpdk.org
> > @@ -36 +36,0 @@
> > - doc/guides/rel_notes/release_20_11.rst            |  6 ++++++
> > @@ -43 +43 @@
> > - 9 files changed, 49 insertions(+), 37 deletions(-)
> > + 8 files changed, 43 insertions(+), 37 deletions(-)
> > @@ -46 +46 @@
> > -index 3d7d244d1e..d813d4fae0 100644
> > +index 7b92ab1195..d0eef8b51c 100644
> > @@ -49 +49 @@
> > -@@ -1080,9 +1080,17 @@ tunnel_update:
> > +@@ -1050,9 +1050,17 @@ tunnel_update:
> > @@ -94,17 +93,0 @@
> > -diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
> > -index 7c8246d1b3..1524f61915 100644
> > ---- a/doc/guides/rel_notes/release_20_11.rst
> > -+++ b/doc/guides/rel_notes/release_20_11.rst
> > -@@ -569,6 +569,12 @@ API Changes
> > -
> > - * bpf: ``RTE_BPF_XTYPE_NUM`` has been dropped from ``rte_bpf_xtype``.
> > -
> > -+* gso: Changed ``rte_gso_segment`` behaviour and return value:
> > -+
> > -+  * ``pkt`` is not saved to ``pkts_out[0]`` if not GSOed.
> > -+  * Return 0 instead of 1 for the above case.
> > -+  * ``pkt`` is not freed, no matter whether it is GSOed, leaving to the caller.
> > -+
> > - * acl: ``RTE_ACL_CLASSIFY_NUM`` enum value has been removed.
> > -   This enum value was not used inside DPDK, while it prevented to add new
> > -   classify algorithms without causing an ABI breakage.
> > @@ -112 +95 @@
> > -index 81c688471d..2f8abb12c5 100644
> > +index cfbd579cd6..1e2f21d96f 100644
> > @@ -115 +98 @@
> > -@@ -751,8 +751,16 @@ pmd_tx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
> > +@@ -713,8 +713,16 @@ pmd_tx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)


^ permalink raw reply	[flat|nested] 374+ messages in thread

* Re: [dpdk-stable] [EXT] patch 'crypto/octeontx2: fix multi-process' has been queued to stable release 19.11.6
  2020-11-09 18:40     ` [dpdk-stable] patch 'crypto/octeontx2: fix multi-process' " luca.boccassi
@ 2020-11-10 10:59       ` Ankur Dwivedi
  2020-11-10 11:06         ` Luca Boccassi
  0 siblings, 1 reply; 374+ messages in thread
From: Ankur Dwivedi @ 2020-11-10 10:59 UTC (permalink / raw)
  To: luca.boccassi; +Cc: Anoob Joseph, dpdk stable

Hi Luca,

Please find my reply inline.

Thanks
Ankur

>-----Original Message-----
>From: luca.boccassi@gmail.com <luca.boccassi@gmail.com>
>Sent: Tuesday, November 10, 2020 12:10 AM
>To: Ankur Dwivedi <adwivedi@marvell.com>
>Cc: Anoob Joseph <anoobj@marvell.com>; dpdk stable <stable@dpdk.org>
>Subject: [EXT] patch 'crypto/octeontx2: fix multi-process' has been queued to
>stable release 19.11.6
>
>External Email
>
>----------------------------------------------------------------------
>Hi,
>
>FYI, your patch has been queued to stable release 19.11.6
>
>Note it hasn't been pushed to
>https://urldefense.proofpoint.com/v2/url?u=http-
>3A__dpdk.org_browse_dpdk-
>2Dstable&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=ILjiNF3GF25y6QdHZUx
>Ml6JrStU0MIuCtO5dMzn3Ybk&m=WJuhF88JRLbzAE2KFDm7fq_VKrRhCBfJ1zW
>9-e8Y9Fs&s=mj0L_xoCfGbVaKeVCZRgKMCSRJvL_VQRL9Ukk60Oyk4&e=  yet.
>It will be pushed if I get no objections before 11/11/20. So please shout if
>anyone has objections.
>
>Also note that after the patch there's a diff of the upstream commit vs the
>patch applied to the branch. This will indicate if there was any rebasing
>needed to apply to 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://urldefense.proofpoint.com/v2/url?u=https-
>3A__github.com_bluca_dpdk-
>2Dstable&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=ILjiNF3GF25y6QdHZUx
>Ml6JrStU0MIuCtO5dMzn3Ybk&m=WJuhF88JRLbzAE2KFDm7fq_VKrRhCBfJ1zW
>9-e8Y9Fs&s=7RDdv-ig0gf-Ik31WdzFV8mldqC7ejjFz7eIIlkpPAo&e=
>
>This queued commit can be viewed at:
>https://urldefense.proofpoint.com/v2/url?u=https-
>3A__github.com_bluca_dpdk-
>2Dstable_commit_3415ca530b2ea4acdbc15b3c6eb4c4f4177a09dc&d=DwIDAg
>&c=nKjWec2b6R0mOyPaz7xtfQ&r=ILjiNF3GF25y6QdHZUxMl6JrStU0MIuCtO5d
>Mzn3Ybk&m=WJuhF88JRLbzAE2KFDm7fq_VKrRhCBfJ1zW9-
>e8Y9Fs&s=pEl2YmNRFwnSh57DYLWRaNYvL4ZiOMv_zTkzBlAsRo4&e=
>
>Thanks.
>
>Luca Boccassi
>
>---
>From 3415ca530b2ea4acdbc15b3c6eb4c4f4177a09dc Mon Sep 17 00:00:00
>2001
>From: Ankur Dwivedi <adwivedi@marvell.com>
>Date: Thu, 22 Oct 2020 13:20:00 +0530
>Subject: [PATCH] crypto/octeontx2: fix multi-process
>
>[ upstream commit 9fd11c1583c9b3249f49755b3216a79698e94700 ]
>
>During crypto device probe few functions should be called only for the
>primary process. This patch fixes this issue.
>
>Fixes: 818d138bcce9 ("crypto/octeontx2: add init sequence in probe")
>
>Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
>Reviewed-by: Anoob Joseph <anoobj@marvell.com>
>---
> drivers/crypto/octeontx2/otx2_cryptodev.c     | 49 +++++++++++--------
> drivers/crypto/octeontx2/otx2_cryptodev.h     |  2 +
> drivers/crypto/octeontx2/otx2_cryptodev_ops.c | 13 +++--
> 3 files changed, 40 insertions(+), 24 deletions(-)
>
>diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c
>b/drivers/crypto/octeontx2/otx2_cryptodev.c
>index 417eda6de6..2323de1f60 100644
>--- a/drivers/crypto/octeontx2/otx2_cryptodev.c
>+++ b/drivers/crypto/octeontx2/otx2_cryptodev.c
>@@ -70,31 +70,34 @@ otx2_cpt_pci_probe(struct rte_pci_driver *pci_drv
>__rte_unused,
>
> 	otx2_dev = &vf->otx2_dev;
>
>-	/* Initialize the base otx2_dev object */
>-	ret = otx2_dev_init(pci_dev, otx2_dev);
>-	if (ret) {
>-		CPT_LOG_ERR("Could not initialize otx2_dev");
>-		goto pmd_destroy;
>-	}
>+	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
>+		/* Initialize the base otx2_dev object */
>+		ret = otx2_dev_init(pci_dev, otx2_dev);
>+		if (ret) {
>+			CPT_LOG_ERR("Could not initialize otx2_dev");
>+			goto pmd_destroy;
>+		}
>
>-	/* Get number of queues available on the device */
>-	ret = otx2_cpt_available_queues_get(dev, &nb_queues);
>-	if (ret) {
>-		CPT_LOG_ERR("Could not determine the number of queues
>available");
>-		goto otx2_dev_fini;
>-	}
>+		/* Get number of queues available on the device */
>+		ret = otx2_cpt_available_queues_get(dev, &nb_queues);
>+		if (ret) {
>+			CPT_LOG_ERR("Could not determine the number of
>queues available");
>+			goto otx2_dev_fini;
>+		}
>
>-	/* Don't exceed the limits set per VF */
>-	nb_queues = RTE_MIN(nb_queues,
>OTX2_CPT_MAX_QUEUES_PER_VF);
>+		/* Don't exceed the limits set per VF */
>+		nb_queues = RTE_MIN(nb_queues,
>OTX2_CPT_MAX_QUEUES_PER_VF);
>
>-	if (nb_queues == 0) {
>-		CPT_LOG_ERR("No free queues available on the device");
>-		goto otx2_dev_fini;
>-	}
>+		if (nb_queues == 0) {
>+			CPT_LOG_ERR("No free queues available on the
>device");
>+			goto otx2_dev_fini;
>+		}
>
>-	vf->max_queues = nb_queues;
>+		vf->max_queues = nb_queues;
>
>-	CPT_LOG_INFO("Max queues supported by device: %d", vf-
>>max_queues);
>+		CPT_LOG_INFO("Max queues supported by device: %d",
>+				vf->max_queues);
>+	}
>
> 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
> 			     RTE_CRYPTODEV_FF_HW_ACCELERATED | @@ -
>105,10 +108,14 @@ otx2_cpt_pci_probe(struct rte_pci_driver *pci_drv
>__rte_unused,
> 			     RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO |
> 			     RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT;
>
>+	if (rte_eal_process_type() == RTE_PROC_SECONDARY)
>+		otx2_cpt_set_enqdeq_fns(dev);
>+
> 	return 0;
>
> otx2_dev_fini:
>-	otx2_dev_fini(pci_dev, otx2_dev);
>+	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
[Ankur] For 19.11 branch the above if check is not required as the otx2_dev_fini label is reached only by the primary process. For 20.11 branch the above if check was required but for 19.11 branch it is not required. So if its possible can you remove the if check during merging?
>+		otx2_dev_fini(pci_dev, otx2_dev);
> pmd_destroy:
> 	rte_cryptodev_pmd_destroy(dev);
> exit:
>diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.h
>b/drivers/crypto/octeontx2/otx2_cryptodev.h
>index c0aa661b3b..17c0bee661 100644
>--- a/drivers/crypto/octeontx2/otx2_cryptodev.h
>+++ b/drivers/crypto/octeontx2/otx2_cryptodev.h
>@@ -40,4 +40,6 @@ extern int otx2_cpt_logtype;
>  */
> extern uint8_t otx2_cryptodev_driver_id;
>
>+void otx2_cpt_set_enqdeq_fns(struct rte_cryptodev *dev);
>+
> #endif /* _OTX2_CRYPTODEV_H_ */
>diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
>b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
>index af4bbccd7d..292aff1928 100644
>--- a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
>+++ b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
>@@ -813,6 +813,15 @@ otx2_cpt_dequeue_burst(void *qptr, struct
>rte_crypto_op **ops, uint16_t nb_ops)
> 	return nb_completed;
> }
>
>+void
>+otx2_cpt_set_enqdeq_fns(struct rte_cryptodev *dev) {
>+	dev->enqueue_burst = otx2_cpt_enqueue_burst;
>+	dev->dequeue_burst = otx2_cpt_dequeue_burst;
>+
>+	rte_mb();
>+}
>+
> /* PMD ops */
>
> static int
>@@ -862,10 +871,8 @@ otx2_cpt_dev_config(struct rte_cryptodev *dev,
> 		goto queues_detach;
> 	}
>
>-	dev->enqueue_burst = otx2_cpt_enqueue_burst;
>-	dev->dequeue_burst = otx2_cpt_dequeue_burst;
>+	otx2_cpt_set_enqdeq_fns(dev);
>
>-	rte_mb();
> 	return 0;
>
> queues_detach:
>--
>2.27.0
>
>---
>  Diff of the applied patch vs upstream commit (please double-check if non-
>empty:
>---
>--- -	2020-11-09 18:40:11.932938032 +0000
>+++ 0018-crypto-octeontx2-fix-multi-process.patch	2020-11-09
>18:40:11.091310660 +0000
>@@ -1 +1 @@
>-From 9fd11c1583c9b3249f49755b3216a79698e94700 Mon Sep 17 00:00:00
>2001
>+From 3415ca530b2ea4acdbc15b3c6eb4c4f4177a09dc Mon Sep 17 00:00:00
>2001
>@@ -5,0 +6,2 @@
>+[ upstream commit 9fd11c1583c9b3249f49755b3216a79698e94700 ]
>+
>@@ -10 +11,0 @@
>-Cc: stable@dpdk.org
>@@ -15 +16 @@
>- drivers/crypto/octeontx2/otx2_cryptodev.c     | 57 +++++++++++--------
>+ drivers/crypto/octeontx2/otx2_cryptodev.c     | 49 +++++++++++--------
>@@ -17,2 +18,2 @@
>- drivers/crypto/octeontx2/otx2_cryptodev_ops.c | 13 ++++-
>- 3 files changed, 44 insertions(+), 28 deletions(-)
>+ drivers/crypto/octeontx2/otx2_cryptodev_ops.c | 13 +++--
>+ 3 files changed, 40 insertions(+), 24 deletions(-)
>@@ -21 +22 @@
>-index 02d2fd83bd..1de04f4a66 100644
>+index 417eda6de6..2323de1f60 100644
>@@ -24 +25 @@
>-@@ -70,36 +70,39 @@ otx2_cpt_pci_probe(struct rte_pci_driver *pci_drv
>__rte_unused,
>+@@ -70,31 +70,34 @@ otx2_cpt_pci_probe(struct rte_pci_driver *pci_drv
>+__rte_unused,
>@@ -74,0 +76 @@
>++	}
>@@ -76,15 +78,5 @@
>--	ret = otx2_cpt_hardware_caps_get(dev, vf->hw_caps);
>--	if (ret) {
>--		CPT_LOG_ERR("Could not determine hardware capabilities");
>--		goto otx2_dev_fini;
>-+		ret = otx2_cpt_hardware_caps_get(dev, vf->hw_caps);
>-+		if (ret) {
>-+			CPT_LOG_ERR("Could not determine hardware
>capabilities");
>-+			goto otx2_dev_fini;
>-+		}
>- 	}
>-
>- 	otx2_crypto_capabilities_init(vf->hw_caps);
>-@@ -121,10 +124,14 @@ otx2_cpt_pci_probe(struct rte_pci_driver *pci_drv
>__rte_unused,
>- 			     RTE_CRYPTODEV_FF_SYM_SESSIONLESS |
>- 			     RTE_CRYPTODEV_FF_SECURITY;
>+ 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
>+ 			     RTE_CRYPTODEV_FF_HW_ACCELERATED | @@ -
>105,10 +108,14 @@
>+otx2_cpt_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
>+ 			     RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO |
>+ 			     RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT;
>@@ -105 +97 @@
>-index 7b1b648639..febb4ee74d 100644
>+index c0aa661b3b..17c0bee661 100644
>@@ -108 +100 @@
>-@@ -51,4 +51,6 @@ extern int otx2_cpt_logtype;
>+@@ -40,4 +40,6 @@ extern int otx2_cpt_logtype;
>@@ -116 +108 @@
>-index 790af02dc6..be37d3cac1 100644
>+index af4bbccd7d..292aff1928 100644
>@@ -119 +111 @@
>-@@ -1019,6 +1019,15 @@ otx2_cpt_dequeue_burst(void *qptr, struct
>rte_crypto_op **ops, uint16_t nb_ops)
>+@@ -813,6 +813,15 @@ otx2_cpt_dequeue_burst(void *qptr, struct
>+rte_crypto_op **ops, uint16_t nb_ops)
>@@ -135,2 +127,2 @@
>-@@ -1081,10 +1090,8 @@ otx2_cpt_dev_config(struct rte_cryptodev *dev,
>- 		goto intr_unregister;
>+@@ -862,10 +871,8 @@ otx2_cpt_dev_config(struct rte_cryptodev *dev,
>+ 		goto queues_detach;
>@@ -146 +138 @@
>- intr_unregister:
>+ queues_detach:

^ permalink raw reply	[flat|nested] 374+ messages in thread

* Re: [dpdk-stable] [EXT] patch 'crypto/octeontx2: fix multi-process' has been queued to stable release 19.11.6
  2020-11-10 10:59       ` [dpdk-stable] [EXT] " Ankur Dwivedi
@ 2020-11-10 11:06         ` Luca Boccassi
  2020-11-10 11:34           ` Ankur Dwivedi
  0 siblings, 1 reply; 374+ messages in thread
From: Luca Boccassi @ 2020-11-10 11:06 UTC (permalink / raw)
  To: Ankur Dwivedi; +Cc: Anoob Joseph, dpdk stable

On Tue, 2020-11-10 at 10:59 +0000, Ankur Dwivedi wrote:
> Hi Luca,
> 
> Please find my reply inline.
> 
> Thanks
> Ankur
> 
> > -----Original Message-----
> > From: luca.boccassi@gmail.com <luca.boccassi@gmail.com>
> > Sent: Tuesday, November 10, 2020 12:10 AM
> > To: Ankur Dwivedi <adwivedi@marvell.com>
> > Cc: Anoob Joseph <anoobj@marvell.com>; dpdk stable <stable@dpdk.org>
> > Subject: [EXT] patch 'crypto/octeontx2: fix multi-process' has been queued to
> > stable release 19.11.6
> > 
> > External Email
> > 
> > ----------------------------------------------------------------------
> > Hi,
> > 
> > FYI, your patch has been queued to stable release 19.11.6
> > 
> > Note it hasn't been pushed to
> > https://urldefense.proofpoint.com/v2/url?u=http-
> > 3A__dpdk.org_browse_dpdk-
> > 2Dstable&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=ILjiNF3GF25y6QdHZUx
> > Ml6JrStU0MIuCtO5dMzn3Ybk&m=WJuhF88JRLbzAE2KFDm7fq_VKrRhCBfJ1zW
> > 9-e8Y9Fs&s=mj0L_xoCfGbVaKeVCZRgKMCSRJvL_VQRL9Ukk60Oyk4&e=  yet.
> > It will be pushed if I get no objections before 11/11/20. So please shout if
> > anyone has objections.
> > 
> > Also note that after the patch there's a diff of the upstream commit vs the
> > patch applied to the branch. This will indicate if there was any rebasing
> > needed to apply to 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://urldefense.proofpoint.com/v2/url?u=https-
> > 3A__github.com_bluca_dpdk-
> > 2Dstable&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=ILjiNF3GF25y6QdHZUx
> > Ml6JrStU0MIuCtO5dMzn3Ybk&m=WJuhF88JRLbzAE2KFDm7fq_VKrRhCBfJ1zW
> > 9-e8Y9Fs&s=7RDdv-ig0gf-Ik31WdzFV8mldqC7ejjFz7eIIlkpPAo&e=
> > 
> > This queued commit can be viewed at:
> > https://urldefense.proofpoint.com/v2/url?u=https-
> > 3A__github.com_bluca_dpdk-
> > 2Dstable_commit_3415ca530b2ea4acdbc15b3c6eb4c4f4177a09dc&d=DwIDAg
> > &c=nKjWec2b6R0mOyPaz7xtfQ&r=ILjiNF3GF25y6QdHZUxMl6JrStU0MIuCtO5d
> > Mzn3Ybk&m=WJuhF88JRLbzAE2KFDm7fq_VKrRhCBfJ1zW9-
> > e8Y9Fs&s=pEl2YmNRFwnSh57DYLWRaNYvL4ZiOMv_zTkzBlAsRo4&e=
> > 
> > Thanks.
> > 
> > Luca Boccassi
> > 
> > ---
> > From 3415ca530b2ea4acdbc15b3c6eb4c4f4177a09dc Mon Sep 17 00:00:00
> > 2001
> > From: Ankur Dwivedi <adwivedi@marvell.com>
> > Date: Thu, 22 Oct 2020 13:20:00 +0530
> > Subject: [PATCH] crypto/octeontx2: fix multi-process
> > 
> > [ upstream commit 9fd11c1583c9b3249f49755b3216a79698e94700 ]
> > 
> > During crypto device probe few functions should be called only for the
> > primary process. This patch fixes this issue.
> > 
> > Fixes: 818d138bcce9 ("crypto/octeontx2: add init sequence in probe")
> > 
> > Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
> > Reviewed-by: Anoob Joseph <anoobj@marvell.com>
> > ---
> > drivers/crypto/octeontx2/otx2_cryptodev.c     | 49 +++++++++++--------
> > drivers/crypto/octeontx2/otx2_cryptodev.h     |  2 +
> > drivers/crypto/octeontx2/otx2_cryptodev_ops.c | 13 +++--
> > 3 files changed, 40 insertions(+), 24 deletions(-)
> > 
> > diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c
> > b/drivers/crypto/octeontx2/otx2_cryptodev.c
> > index 417eda6de6..2323de1f60 100644
> > --- a/drivers/crypto/octeontx2/otx2_cryptodev.c
> > +++ b/drivers/crypto/octeontx2/otx2_cryptodev.c
> > @@ -70,31 +70,34 @@ otx2_cpt_pci_probe(struct rte_pci_driver *pci_drv
> > __rte_unused,
> > 
> > 	otx2_dev = &vf->otx2_dev;
> > 
> > -	/* Initialize the base otx2_dev object */
> > -	ret = otx2_dev_init(pci_dev, otx2_dev);
> > -	if (ret) {
> > -		CPT_LOG_ERR("Could not initialize otx2_dev");
> > -		goto pmd_destroy;
> > -	}
> > +	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
> > +		/* Initialize the base otx2_dev object */
> > +		ret = otx2_dev_init(pci_dev, otx2_dev);
> > +		if (ret) {
> > +			CPT_LOG_ERR("Could not initialize otx2_dev");
> > +			goto pmd_destroy;
> > +		}
> > 
> > -	/* Get number of queues available on the device */
> > -	ret = otx2_cpt_available_queues_get(dev, &nb_queues);
> > -	if (ret) {
> > -		CPT_LOG_ERR("Could not determine the number of queues
> > available");
> > -		goto otx2_dev_fini;
> > -	}
> > +		/* Get number of queues available on the device */
> > +		ret = otx2_cpt_available_queues_get(dev, &nb_queues);
> > +		if (ret) {
> > +			CPT_LOG_ERR("Could not determine the number of
> > queues available");
> > +			goto otx2_dev_fini;
> > +		}
> > 
> > -	/* Don't exceed the limits set per VF */
> > -	nb_queues = RTE_MIN(nb_queues,
> > OTX2_CPT_MAX_QUEUES_PER_VF);
> > +		/* Don't exceed the limits set per VF */
> > +		nb_queues = RTE_MIN(nb_queues,
> > OTX2_CPT_MAX_QUEUES_PER_VF);
> > 
> > -	if (nb_queues == 0) {
> > -		CPT_LOG_ERR("No free queues available on the device");
> > -		goto otx2_dev_fini;
> > -	}
> > +		if (nb_queues == 0) {
> > +			CPT_LOG_ERR("No free queues available on the
> > device");
> > +			goto otx2_dev_fini;
> > +		}
> > 
> > -	vf->max_queues = nb_queues;
> > +		vf->max_queues = nb_queues;
> > 
> > -	CPT_LOG_INFO("Max queues supported by device: %d", vf-
> > > max_queues);
> > +		CPT_LOG_INFO("Max queues supported by device: %d",
> > +				vf->max_queues);
> > +	}
> > 
> > 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
> > 			     RTE_CRYPTODEV_FF_HW_ACCELERATED | @@ -
> > 105,10 +108,14 @@ otx2_cpt_pci_probe(struct rte_pci_driver *pci_drv
> > __rte_unused,
> > 			     RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO |
> > 			     RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT;
> > 
> > +	if (rte_eal_process_type() == RTE_PROC_SECONDARY)
> > +		otx2_cpt_set_enqdeq_fns(dev);
> > +
> > 	return 0;
> > 
> > otx2_dev_fini:
> > -	otx2_dev_fini(pci_dev, otx2_dev);
> > +	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
> [Ankur] For 19.11 branch the above if check is not required as the otx2_dev_fini label is reached only by the primary process. For 20.11 branch the above if check was required but for 19.11 branch it is not required. So if its possible can you remove the if check during merging?

As a generic process, I try to keep the diff from mainline as minimal
as possible, as it makes the backporting process much simpler and
smoother - more patches apply without changes.

Unless there's a specific reason to remove this (eg: it would break
something if it's left in) I'd leave it as is.

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 374+ messages in thread

* Re: [dpdk-stable] [EXT] patch 'crypto/octeontx2: fix multi-process' has been queued to stable release 19.11.6
  2020-11-10 11:06         ` Luca Boccassi
@ 2020-11-10 11:34           ` Ankur Dwivedi
  0 siblings, 0 replies; 374+ messages in thread
From: Ankur Dwivedi @ 2020-11-10 11:34 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: Anoob Joseph, dpdk stable



>-----Original Message-----
>From: Luca Boccassi <bluca@debian.org>
>Sent: Tuesday, November 10, 2020 4:37 PM
>To: Ankur Dwivedi <adwivedi@marvell.com>
>Cc: Anoob Joseph <anoobj@marvell.com>; dpdk stable <stable@dpdk.org>
>Subject: Re: [EXT] patch 'crypto/octeontx2: fix multi-process' has been queued
>to stable release 19.11.6
>
>On Tue, 2020-11-10 at 10:59 +0000, Ankur Dwivedi wrote:
>> Hi Luca,
>>
>> Please find my reply inline.
>>
>> Thanks
>> Ankur
>>
>> > -----Original Message-----
>> > From: luca.boccassi@gmail.com <luca.boccassi@gmail.com>
>> > Sent: Tuesday, November 10, 2020 12:10 AM
>> > To: Ankur Dwivedi <adwivedi@marvell.com>
>> > Cc: Anoob Joseph <anoobj@marvell.com>; dpdk stable
><stable@dpdk.org>
>> > Subject: [EXT] patch 'crypto/octeontx2: fix multi-process' has been
>> > queued to stable release 19.11.6
>> >
>> > External Email
>> >
>> > --------------------------------------------------------------------
>> > --
>> > Hi,
>> >
>> > FYI, your patch has been queued to stable release 19.11.6
>> >
>> > Note it hasn't been pushed to
>> > https://urldefense.proofpoint.com/v2/url?u=http-
>> > 3A__dpdk.org_browse_dpdk-
>> >
>2Dstable&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=ILjiNF3GF25y6QdHZUx
>> >
>Ml6JrStU0MIuCtO5dMzn3Ybk&m=WJuhF88JRLbzAE2KFDm7fq_VKrRhCBfJ1zW
>> > 9-e8Y9Fs&s=mj0L_xoCfGbVaKeVCZRgKMCSRJvL_VQRL9Ukk60Oyk4&e=
>yet.
>> > It will be pushed if I get no objections before 11/11/20. So please
>> > shout if anyone has objections.
>> >
>> > Also note that after the patch there's a diff of the upstream commit
>> > vs the patch applied to the branch. This will indicate if there was
>> > any rebasing needed to apply to 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://urldefense.proofpoint.com/v2/url?u=https-
>> > 3A__github.com_bluca_dpdk-
>> >
>2Dstable&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=ILjiNF3GF25y6QdHZUx
>> >
>Ml6JrStU0MIuCtO5dMzn3Ybk&m=WJuhF88JRLbzAE2KFDm7fq_VKrRhCBfJ1zW
>> > 9-e8Y9Fs&s=7RDdv-ig0gf-Ik31WdzFV8mldqC7ejjFz7eIIlkpPAo&e=
>> >
>> > This queued commit can be viewed at:
>> > https://urldefense.proofpoint.com/v2/url?u=https-
>> > 3A__github.com_bluca_dpdk-
>> >
>2Dstable_commit_3415ca530b2ea4acdbc15b3c6eb4c4f4177a09dc&d=DwIDAg
>> >
>&c=nKjWec2b6R0mOyPaz7xtfQ&r=ILjiNF3GF25y6QdHZUxMl6JrStU0MIuCtO5d
>> > Mzn3Ybk&m=WJuhF88JRLbzAE2KFDm7fq_VKrRhCBfJ1zW9-
>> > e8Y9Fs&s=pEl2YmNRFwnSh57DYLWRaNYvL4ZiOMv_zTkzBlAsRo4&e=
>> >
>> > Thanks.
>> >
>> > Luca Boccassi
>> >
>> > ---
>> > From 3415ca530b2ea4acdbc15b3c6eb4c4f4177a09dc Mon Sep 17 00:00:00
>> > 2001
>> > From: Ankur Dwivedi <adwivedi@marvell.com>
>> > Date: Thu, 22 Oct 2020 13:20:00 +0530
>> > Subject: [PATCH] crypto/octeontx2: fix multi-process
>> >
>> > [ upstream commit 9fd11c1583c9b3249f49755b3216a79698e94700 ]
>> >
>> > During crypto device probe few functions should be called only for
>> > the primary process. This patch fixes this issue.
>> >
>> > Fixes: 818d138bcce9 ("crypto/octeontx2: add init sequence in probe")
>> >
>> > Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
>> > Reviewed-by: Anoob Joseph <anoobj@marvell.com>
>> > ---
>> > drivers/crypto/octeontx2/otx2_cryptodev.c     | 49 +++++++++++--------
>> > drivers/crypto/octeontx2/otx2_cryptodev.h     |  2 +
>> > drivers/crypto/octeontx2/otx2_cryptodev_ops.c | 13 +++--
>> > 3 files changed, 40 insertions(+), 24 deletions(-)
>> >
>> > diff --git a/drivers/crypto/octeontx2/otx2_cryptodev.c
>> > b/drivers/crypto/octeontx2/otx2_cryptodev.c
>> > index 417eda6de6..2323de1f60 100644
>> > --- a/drivers/crypto/octeontx2/otx2_cryptodev.c
>> > +++ b/drivers/crypto/octeontx2/otx2_cryptodev.c
>> > @@ -70,31 +70,34 @@ otx2_cpt_pci_probe(struct rte_pci_driver
>> > *pci_drv __rte_unused,
>> >
>> > 	otx2_dev = &vf->otx2_dev;
>> >
>> > -	/* Initialize the base otx2_dev object */
>> > -	ret = otx2_dev_init(pci_dev, otx2_dev);
>> > -	if (ret) {
>> > -		CPT_LOG_ERR("Could not initialize otx2_dev");
>> > -		goto pmd_destroy;
>> > -	}
>> > +	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
>> > +		/* Initialize the base otx2_dev object */
>> > +		ret = otx2_dev_init(pci_dev, otx2_dev);
>> > +		if (ret) {
>> > +			CPT_LOG_ERR("Could not initialize otx2_dev");
>> > +			goto pmd_destroy;
>> > +		}
>> >
>> > -	/* Get number of queues available on the device */
>> > -	ret = otx2_cpt_available_queues_get(dev, &nb_queues);
>> > -	if (ret) {
>> > -		CPT_LOG_ERR("Could not determine the number of queues
>> > available");
>> > -		goto otx2_dev_fini;
>> > -	}
>> > +		/* Get number of queues available on the device */
>> > +		ret = otx2_cpt_available_queues_get(dev, &nb_queues);
>> > +		if (ret) {
>> > +			CPT_LOG_ERR("Could not determine the number of
>> > queues available");
>> > +			goto otx2_dev_fini;
>> > +		}
>> >
>> > -	/* Don't exceed the limits set per VF */
>> > -	nb_queues = RTE_MIN(nb_queues,
>> > OTX2_CPT_MAX_QUEUES_PER_VF);
>> > +		/* Don't exceed the limits set per VF */
>> > +		nb_queues = RTE_MIN(nb_queues,
>> > OTX2_CPT_MAX_QUEUES_PER_VF);
>> >
>> > -	if (nb_queues == 0) {
>> > -		CPT_LOG_ERR("No free queues available on the device");
>> > -		goto otx2_dev_fini;
>> > -	}
>> > +		if (nb_queues == 0) {
>> > +			CPT_LOG_ERR("No free queues available on the
>> > device");
>> > +			goto otx2_dev_fini;
>> > +		}
>> >
>> > -	vf->max_queues = nb_queues;
>> > +		vf->max_queues = nb_queues;
>> >
>> > -	CPT_LOG_INFO("Max queues supported by device: %d", vf-
>> > > max_queues);
>> > +		CPT_LOG_INFO("Max queues supported by device: %d",
>> > +				vf->max_queues);
>> > +	}
>> >
>> > 	dev->feature_flags = RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO |
>> > 			     RTE_CRYPTODEV_FF_HW_ACCELERATED | @@ -
>> > 105,10 +108,14 @@ otx2_cpt_pci_probe(struct rte_pci_driver *pci_drv
>> > __rte_unused,
>> > 			     RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO |
>> > 			     RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT;
>> >
>> > +	if (rte_eal_process_type() == RTE_PROC_SECONDARY)
>> > +		otx2_cpt_set_enqdeq_fns(dev);
>> > +
>> > 	return 0;
>> >
>> > otx2_dev_fini:
>> > -	otx2_dev_fini(pci_dev, otx2_dev);
>> > +	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
>> [Ankur] For 19.11 branch the above if check is not required as the
>otx2_dev_fini label is reached only by the primary process. For 20.11 branch
>the above if check was required but for 19.11 branch it is not required. So if its
>possible can you remove the if check during merging?
>
>As a generic process, I try to keep the diff from mainline as minimal as
>possible, as it makes the backporting process much simpler and smoother -
>more patches apply without changes.
Thanks for the information.
>
>Unless there's a specific reason to remove this (eg: it would break something if
>it's left in) I'd leave it as is.
No it does not break anything.  You can leave it as is.

Regards,
Ankur
>
>--
>Kind regards,
>Luca Boccassi

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'devtools: fix build test config inheritance from env' has been queued to stable release 19.11.6
  2020-11-09 18:50     ` [dpdk-stable] patch 'app/testpmd: revert max Rx packet length adjustment' " luca.boccassi
@ 2020-11-17 11:13       ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'devtools: fix x86-default build test install " luca.boccassi
                           ` (40 more replies)
  0 siblings, 41 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Bruce Richardson, Ferruh Yigit, Jerin Jacob, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4c3e7055205a0c7dd873b82e2dfa7b33555f69d0

Thanks.

Luca Boccassi

---
From 4c3e7055205a0c7dd873b82e2dfa7b33555f69d0 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Mon, 9 Nov 2020 22:00:08 +0100
Subject: [PATCH] devtools: fix build test config inheritance from env

[ upstream commit a655cbd5bebd23804446c6e4a8f6815e74a5f2f7 ]

The variables DPDK_MESON_OPTIONS, PATH, PKG_CONFIG_PATH,
CPPFLAGS, CFLAGS and LDFLAGS can be customized in the config file
loaded by devtools/load-devel-config at each build.
The configuration can be adjusted per target thanks to the value set
in the DPDK_TARGET variable.

PKG_CONFIG_PATH is specific to each target, so it must be empty
before configuring each build from the file according to DPDK_TARGET.
Inheriting a default PKG_CONFIG_PATH for all targets does not make sense
and is prone to confusion.

DPDK_MESON_OPTIONS might take a global initial value from environment
to customize a build test from the shell. Example:
	DPDK_MESON_OPTIONS="b_lto=true"
Some target-specific options can be added in the configuration file:
	DPDK_MESON_OPTIONS="$DPDK_MESON_OPTIONS kernel_dir=$MYKERNEL"

Fixes: 272236741258 ("devtools: load target-specific compilation environment")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 devtools/test-meson-builds.sh | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index a76811e79f..0971fe59c4 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -38,20 +38,21 @@ else
 fi
 
 default_path=$PATH
-default_pkgpath=$PKG_CONFIG_PATH
 default_cppflags=$CPPFLAGS
 default_cflags=$CFLAGS
 default_ldflags=$LDFLAGS
+default_meson_options=$DPDK_MESON_OPTIONS
 
 load_env () # <target compiler>
 {
 	targetcc=$1
+	# reset variables before target-specific config
 	export PATH=$default_path
-	export PKG_CONFIG_PATH=$default_pkgpath
+	unset PKG_CONFIG_PATH # global default makes no sense
 	export CPPFLAGS=$default_cppflags
 	export CFLAGS=$default_cflags
 	export LDFLAGS=$default_ldflags
-	unset DPDK_MESON_OPTIONS
+	export DPDK_MESON_OPTIONS=$default_meson_options
 	command -v $targetcc >/dev/null 2>&1 || return 1
 	DPDK_TARGET=$($targetcc -v 2>&1 | sed -n 's,^Target: ,,p')
 	. $srcdir/devtools/load-devel-config
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.024420700 +0000
+++ 0001-devtools-fix-build-test-config-inheritance-from-env.patch	2020-11-17 11:13:12.857115320 +0000
@@ -1 +1 @@
-From a655cbd5bebd23804446c6e4a8f6815e74a5f2f7 Mon Sep 17 00:00:00 2001
+From 4c3e7055205a0c7dd873b82e2dfa7b33555f69d0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a655cbd5bebd23804446c6e4a8f6815e74a5f2f7 ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -32,2 +33,2 @@
- devtools/test-meson-builds.sh | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
+ devtools/test-meson-builds.sh | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
@@ -36 +37 @@
-index 0c95d1cc98..f32b5784f4 100755
+index a76811e79f..0971fe59c4 100755
@@ -39 +40 @@
-@@ -38,10 +38,10 @@ else
+@@ -38,20 +38,21 @@ else
@@ -49,3 +49,0 @@
- check_cc_flags () # <flag to check> <flag2> ...
- {
-@@ -52,12 +52,14 @@ check_cc_flags () # <flag to check> <flag2> ...
@@ -64,4 +62,3 @@
-+	# set target hint for use in the loaded config file
- 	if [ -n "$target_override" ] ; then
- 		DPDK_TARGET=$target_override
- 	elif command -v $targetcc >/dev/null 2>&1 ; then
+ 	command -v $targetcc >/dev/null 2>&1 || return 1
+ 	DPDK_TARGET=$($targetcc -v 2>&1 | sed -n 's,^Target: ,,p')
+ 	. $srcdir/devtools/load-devel-config

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'devtools: fix x86-default build test install env' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'examples: fix flattening directory layout on install' " luca.boccassi
                           ` (39 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/936f6422d6812938de88b5084140b34e0b6bb314

Thanks.

Luca Boccassi

---
From 936f6422d6812938de88b5084140b34e0b6bb314 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 12 Nov 2020 14:38:43 +0100
Subject: [PATCH] devtools: fix x86-default build test install env

[ upstream commit 252e92eec4f3ba97884bf9424a607a07729c7c33 ]

The x86-default environment was loaded after installing this target.
I did not see any problem with it, yet we should load corresponding
environment before installing a target.

Fixes: bd253daa7717 ("devtools: fix test of ninja install")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 devtools/test-meson-builds.sh | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh
index 0971fe59c4..8678a3d824 100755
--- a/devtools/test-meson-builds.sh
+++ b/devtools/test-meson-builds.sh
@@ -135,14 +135,12 @@ done
 
 # Test installation of the x86-default target, to be used for checking
 # the sample apps build using the pkg-config file for cflags and libs
+load_env cc
 build_path=$(readlink -f $builds_dir/build-x86-default)
 export DESTDIR=$build_path/install-root
 $ninja_cmd -C $build_path install
-
-load_env cc
 pc_file=$(find $DESTDIR -name libdpdk.pc)
 export PKG_CONFIG_PATH=$(dirname $pc_file):$PKG_CONFIG_PATH
-
 # if pkg-config defines the necessary flags, test building some examples
 if pkg-config --define-prefix libdpdk >/dev/null 2>&1; then
 	export PKGCONF="pkg-config --define-prefix"
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.090520100 +0000
+++ 0002-devtools-fix-x86-default-build-test-install-env.patch	2020-11-17 11:13:12.857115320 +0000
@@ -1 +1 @@
-From 252e92eec4f3ba97884bf9424a607a07729c7c33 Mon Sep 17 00:00:00 2001
+From 936f6422d6812938de88b5084140b34e0b6bb314 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 252e92eec4f3ba97884bf9424a607a07729c7c33 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index f1ef8eaeb6..af750b3f3a 100755
+index 0971fe59c4..8678a3d824 100755
@@ -22 +23 @@
-@@ -255,17 +255,15 @@ done
+@@ -135,14 +135,12 @@ done
@@ -28,5 +29,2 @@
- export DESTDIR=$build_path/install
- # No need to reinstall if ABI checks are enabled
- if [ -z "$DPDK_ABI_REF_VERSION" ]; then
- 	install_target $build_path $DESTDIR
- fi
+ export DESTDIR=$build_path/install-root
+ $ninja_cmd -C $build_path install

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'examples: fix flattening directory layout on install' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'devtools: fix x86-default build test install " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'examples/l2fwd-keepalive: skip meson build if no librt' " luca.boccassi
                           ` (38 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/44b8800491dd3b28d752995188f158e95e7d24fb

Thanks.

Luca Boccassi

---
From 44b8800491dd3b28d752995188f158e95e7d24fb Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 12 Nov 2020 09:41:39 +0000
Subject: [PATCH] examples: fix flattening directory layout on install

[ upstream commit e5b95003f1df2ac65cbd11e642b1d6a91bd1058a ]

By installing the examples one-by-one in a loop in the examples
meson.build file we effectively flattened out the structure of the examples
folder and omitted some common and shared subfolders that were never
directly built.  Instead, we can remove the loop and just have the whole
"examples" folder installed as-is in a single statement, preserving its
directory structure, and thereby fixing the build of a number of the
examples.

Fixes: 2daf565f91b5 ("examples: install as part of ninja install")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/meson.build | 7 -------
 meson.build          | 3 +++
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/examples/meson.build b/examples/meson.build
index ec6bd5a080..eeeb217ada 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -46,13 +46,6 @@ all_examples = [
 	'vm_power_manager/guest_cli',
 	'vmdq', 'vmdq_dcb',
 ]
-# install all example code on install - irrespective of whether the example in
-# question is to be built as part of this build or not.
-foreach ex:all_examples
-	install_subdir(ex,
-			install_dir: get_option('datadir') + '/dpdk/examples',
-			exclude_files: 'meson.build')
-endforeach
 
 if get_option('examples') == ''
 	subdir_done()
diff --git a/meson.build b/meson.build
index 41b1beb980..00949de995 100644
--- a/meson.build
+++ b/meson.build
@@ -48,6 +48,9 @@ subdir('doc')
 # build any examples explicitly requested - useful for developers - and
 # install any example code into the appropriate install path
 subdir('examples')
+install_subdir('examples',
+	install_dir: get_option('datadir') + '/dpdk',
+	exclude_files: 'meson.build')
 
 # build kernel modules if enabled
 if get_option('enable_kmods')
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.129238801 +0000
+++ 0003-examples-fix-flattening-directory-layout-on-install.patch	2020-11-17 11:13:12.861115401 +0000
@@ -1 +1 @@
-From e5b95003f1df2ac65cbd11e642b1d6a91bd1058a Mon Sep 17 00:00:00 2001
+From 44b8800491dd3b28d752995188f158e95e7d24fb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e5b95003f1df2ac65cbd11e642b1d6a91bd1058a ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index f179955325..46ec80919e 100644
+index ec6bd5a080..eeeb217ada 100644
@@ -27 +28 @@
-@@ -47,13 +47,6 @@ all_examples = [
+@@ -46,13 +46,6 @@ all_examples = [
@@ -42 +43 @@
-index 61d9a4f5fa..45d974cd2c 100644
+index 41b1beb980..00949de995 100644
@@ -45 +46 @@
-@@ -59,6 +59,9 @@ subdir('doc')
+@@ -48,6 +48,9 @@ subdir('doc')

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'examples/l2fwd-keepalive: skip meson build if no librt' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'devtools: fix x86-default build test install " luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'examples: fix flattening directory layout on install' " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'devtools: fix directory filter in forbidden token check' " luca.boccassi
                           ` (37 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/298d935b92572c57f0c410969823c88fb9235d54

Thanks.

Luca Boccassi

---
From 298d935b92572c57f0c410969823c88fb9235d54 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 12 Nov 2020 09:41:40 +0000
Subject: [PATCH] examples/l2fwd-keepalive: skip meson build if no librt

[ upstream commit b334236abd8dfeea625525de548b35b40cb68c3b ]

When librt is not present on a system, processing the meson.build file
for this example application causes an error. Make the library
non-mandatory and just mark the example as unbuildable if it is
not present.

Fixes: 89f0711f9ddf ("examples: build some samples with meson")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/l2fwd-keepalive/meson.build | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/examples/l2fwd-keepalive/meson.build b/examples/l2fwd-keepalive/meson.build
index 6f7b007e1e..aecc8d9fc9 100644
--- a/examples/l2fwd-keepalive/meson.build
+++ b/examples/l2fwd-keepalive/meson.build
@@ -6,7 +6,13 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
-ext_deps += cc.find_library('rt')
+librt = cc.find_library('rt', required: false)
+if not librt.found()
+	build = false
+	subdir_done()
+endif
+
+ext_deps += librt
 deps += 'timer'
 sources = files(
 	'main.c', 'shm.c'
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.166107706 +0000
+++ 0004-examples-l2fwd-keepalive-skip-meson-build-if-no-libr.patch	2020-11-17 11:13:12.861115401 +0000
@@ -1 +1 @@
-From b334236abd8dfeea625525de548b35b40cb68c3b Mon Sep 17 00:00:00 2001
+From 298d935b92572c57f0c410969823c88fb9235d54 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b334236abd8dfeea625525de548b35b40cb68c3b ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index d678a8ddd0..a56d679675 100644
+index 6f7b007e1e..aecc8d9fc9 100644
@@ -23 +24,2 @@
-@@ -7,7 +7,13 @@
+@@ -6,7 +6,13 @@
+ # To build this example as a standalone application with an already-installed
@@ -26 +27,0 @@
- allow_experimental_apis = true

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'devtools: fix directory filter in forbidden token check' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (2 preceding siblings ...)
  2020-11-17 11:13         ` [dpdk-stable] patch 'examples/l2fwd-keepalive: skip meson build if no librt' " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'eal/arm: fix clang build of native target' " luca.boccassi
                           ` (36 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/89831d141886a00a4dd65803f1812bc18e639e5e

Thanks.

Luca Boccassi

---
From 89831d141886a00a4dd65803f1812bc18e639e5e Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 10 Nov 2020 16:40:05 +0100
Subject: [PATCH] devtools: fix directory filter in forbidden token check

[ upstream commit cb2587644ee65c0956a66529644a5d001d920824 ]

checkpatches.sh current complains on a patch [1] adding
ALLOW_EXPERIMENTAL_API in an example while this check is for app, lib
and drivers directories:

Warning in examples/ethtool/ethtool-app/Makefile:
Using experimental build flag for in-tree compilation

The regexp on entering files concerned by this filter is incorrect.
In the [1] case, the file full name is matched against "app" rather than
"+++ b/app".

1: https://patchwork.dpdk.org/patch/83902/

Fixes: 7413e7f2aeb3 ("devtools: alert on new calls to exit from libs")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 devtools/check-forbidden-tokens.awk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/devtools/check-forbidden-tokens.awk b/devtools/check-forbidden-tokens.awk
index f86cbe8dc1..61ba707c9b 100755
--- a/devtools/check-forbidden-tokens.awk
+++ b/devtools/check-forbidden-tokens.awk
@@ -54,7 +54,7 @@ BEGIN {
 	}
 	for (i in deny_folders) {
 		re = "^\\+\\+\\+ b/" deny_folders[i];
-		if ($0 ~ deny_folders[i]) {
+		if ($0 ~ re) {
 			in_file = 1
 			last_file = $0
 		}
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.208084172 +0000
+++ 0005-devtools-fix-directory-filter-in-forbidden-token-che.patch	2020-11-17 11:13:12.865115481 +0000
@@ -1 +1 @@
-From cb2587644ee65c0956a66529644a5d001d920824 Mon Sep 17 00:00:00 2001
+From 89831d141886a00a4dd65803f1812bc18e639e5e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cb2587644ee65c0956a66529644a5d001d920824 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'eal/arm: fix clang build of native target' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (3 preceding siblings ...)
  2020-11-17 11:13         ` [dpdk-stable] patch 'devtools: fix directory filter in forbidden token check' " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'examples/qos_sched: fix usage string' " luca.boccassi
                           ` (35 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Jerin Jacob, Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0a45b22ec2e68dde4f5493b44ea964f09a69d2ac

Thanks.

Luca Boccassi

---
From 0a45b22ec2e68dde4f5493b44ea964f09a69d2ac Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Thu, 12 Nov 2020 18:31:57 +0800
Subject: [PATCH] eal/arm: fix clang build of native target

[ upstream commit 8fce34cd0a6a55c965c222ab4de37615dea63621 ]

When doing Clang build with '-mcpu=native' on N1 platform, build failed
with:
../lib/librte_eal/arm/include/rte_atomic_64.h:76:39:
	error: instruction requires: lse
__ATOMIC128_CAS_OP(__cas_128_release, "caspl")

This is because native detection for Neoverse N1 was added in Clang-11.
Prior version of Clang's assembler doesn't know LSE support on hardware.
Fixed this for Clang earlier than version 11 by specifying architecture
for assembler.
Referred to [1] for this fix.

Fixes: 7e2c3e17fe2c ("eal/arm64: add 128-bit atomic compare exchange")

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e0d5896bd356cd577f9710a02d7a474cdf58426b

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 lib/librte_eal/common/include/arch/arm/rte_atomic_64.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h b/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h
index 859ae129d8..07d0ce91d8 100644
--- a/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h
+++ b/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h
@@ -47,6 +47,8 @@ extern "C" {
 /*------------------------ 128 bit atomic operations -------------------------*/
 
 #if defined(__ARM_FEATURE_ATOMICS) || defined(RTE_ARM_FEATURE_ATOMICS)
+#define __LSE_PREAMBLE	".arch armv8-a+lse\n"
+
 #define __ATOMIC128_CAS_OP(cas_op_name, op_string)                          \
 static __rte_noinline rte_int128_t                                          \
 cas_op_name(rte_int128_t *dst, rte_int128_t old, rte_int128_t updated)      \
@@ -60,6 +62,7 @@ cas_op_name(rte_int128_t *dst, rte_int128_t old, rte_int128_t updated)      \
 	register uint64_t x2 __asm("x2") = (uint64_t)updated.val[0];        \
 	register uint64_t x3 __asm("x3") = (uint64_t)updated.val[1];        \
 	asm volatile(                                                       \
+		__LSE_PREAMBLE						    \
 		op_string " %[old0], %[old1], %[upd0], %[upd1], [%[dst]]"   \
 		: [old0] "+r" (x0),                                         \
 		[old1] "+r" (x1)                                            \
@@ -77,6 +80,7 @@ __ATOMIC128_CAS_OP(__cas_128_acquire, "caspa")
 __ATOMIC128_CAS_OP(__cas_128_release, "caspl")
 __ATOMIC128_CAS_OP(__cas_128_acq_rel, "caspal")
 
+#undef __LSE_PREAMBLE
 #undef __ATOMIC128_CAS_OP
 
 #endif
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.246655084 +0000
+++ 0006-eal-arm-fix-clang-build-of-native-target.patch	2020-11-17 11:13:12.869115562 +0000
@@ -1 +1 @@
-From 8fce34cd0a6a55c965c222ab4de37615dea63621 Mon Sep 17 00:00:00 2001
+From 0a45b22ec2e68dde4f5493b44ea964f09a69d2ac Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8fce34cd0a6a55c965c222ab4de37615dea63621 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
- lib/librte_eal/arm/include/rte_atomic_64.h | 4 ++++
+ lib/librte_eal/common/include/arch/arm/rte_atomic_64.h | 4 ++++
@@ -30,5 +31,5 @@
-diff --git a/lib/librte_eal/arm/include/rte_atomic_64.h b/lib/librte_eal/arm/include/rte_atomic_64.h
-index 2cef88629c..7fcd174661 100644
---- a/lib/librte_eal/arm/include/rte_atomic_64.h
-+++ b/lib/librte_eal/arm/include/rte_atomic_64.h
-@@ -46,6 +46,8 @@ rte_atomic_thread_fence(int memorder)
+diff --git a/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h b/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h
+index 859ae129d8..07d0ce91d8 100644
+--- a/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h
++++ b/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h
+@@ -47,6 +47,8 @@ extern "C" {
@@ -43 +44 @@
-@@ -59,6 +61,7 @@ cas_op_name(rte_int128_t *dst, rte_int128_t old, rte_int128_t updated)      \
+@@ -60,6 +62,7 @@ cas_op_name(rte_int128_t *dst, rte_int128_t old, rte_int128_t updated)      \
@@ -51 +52 @@
-@@ -76,6 +79,7 @@ __ATOMIC128_CAS_OP(__cas_128_acquire, "caspa")
+@@ -77,6 +80,7 @@ __ATOMIC128_CAS_OP(__cas_128_acquire, "caspa")

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'examples/qos_sched: fix usage string' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (4 preceding siblings ...)
  2020-11-17 11:13         ` [dpdk-stable] patch 'eal/arm: fix clang build of native target' " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'build: fix install on Windows' " luca.boccassi
                           ` (34 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: Ibtisam Tariq; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/987acad0a9ec6414e6147e5cdc575e18f4c416e8

Thanks.

Luca Boccassi

---
From 987acad0a9ec6414e6147e5cdc575e18f4c416e8 Mon Sep 17 00:00:00 2001
From: Ibtisam Tariq <ibtisam.tariq@emumba.com>
Date: Mon, 2 Nov 2020 11:43:03 +0000
Subject: [PATCH] examples/qos_sched: fix usage string

[ upstream commit fc48d8a5b296daacd47cacb25db6f9f6ca82ccd0 ]

The short option written for interactive mode is --i in usage of
this qos_sched example. Actually, it is -i.

Fixes: cfd5c971e5e ("examples/qos_sched: add stats")

Signed-off-by: Ibtisam Tariq <ibtisam.tariq@emumba.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 examples/qos_sched/args.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c
index 7431b29816..2727fd4f27 100644
--- a/examples/qos_sched/args.c
+++ b/examples/qos_sched/args.c
@@ -39,7 +39,7 @@ static const char usage[] =
 	"           multiple pfc can be configured in command line                      \n"
 	"                                                                               \n"
 	"Application optional parameters:                                               \n"
-        "    --i     : run in interactive mode (default value is %u)                    \n"
+	"    -i      : run in interactive mode (default value is %u)                    \n"
 	"    --mst I : master core index (default value is %u)                          \n"
 	"    --rsz \"A, B, C\" :   Ring sizes                                           \n"
 	"           A = Size (in number of buffer descriptors) of each of the NIC RX    \n"
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.285506796 +0000
+++ 0007-examples-qos_sched-fix-usage-string.patch	2020-11-17 11:13:12.869115562 +0000
@@ -1 +1 @@
-From fc48d8a5b296daacd47cacb25db6f9f6ca82ccd0 Mon Sep 17 00:00:00 2001
+From 987acad0a9ec6414e6147e5cdc575e18f4c416e8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fc48d8a5b296daacd47cacb25db6f9f6ca82ccd0 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index c627196230..c369ba9b4d 100644
+index 7431b29816..2727fd4f27 100644
@@ -28 +29 @@
- 	"    --mnc I : main core index (default value is %u)                            \n"
+ 	"    --mst I : master core index (default value is %u)                          \n"

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'build: fix install on Windows' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (5 preceding siblings ...)
  2020-11-17 11:13         ` [dpdk-stable] patch 'examples/qos_sched: fix usage string' " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'build: fix MS linker flag with meson 0.54' " luca.boccassi
                           ` (33 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: Nick Connolly; +Cc: Ranjit Menon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ae832279c15934966871ebfda706e73dbb69dbf1

Thanks.

Luca Boccassi

---
From ae832279c15934966871ebfda706e73dbb69dbf1 Mon Sep 17 00:00:00 2001
From: Nick Connolly <nick.connolly@mayadata.io>
Date: Sat, 31 Oct 2020 06:56:50 +0000
Subject: [PATCH] build: fix install on Windows

[ upstream commit 5c7d86948764f9cec832bf3c618e0cceb06ac512 ]

Don't run symlink-drivers-solibs.sh as part of 'install' because
Windows doesn't support shell scripts.

Fixes: 82ba4416dd87 ("build: add module definition files for Windows")

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Tested-by: Ranjit Menon <ranjit.menon@intel.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
---
 config/meson.build | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index 9afd05b95e..fca0461d67 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -54,9 +54,11 @@ eal_pmd_path = join_paths(get_option('prefix'), driver_install_path)
 # driver .so files often depend upon the bus drivers for their connect bus,
 # e.g. ixgbe depends on librte_bus_pci. This means that the bus drivers need
 # to be in the library path, so symlink the drivers from the main lib directory.
-meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
-		get_option('libdir'),
-		pmd_subdir_opt)
+if not is_windows
+	meson.add_install_script('../buildtools/symlink-drivers-solibs.sh',
+			get_option('libdir'),
+			pmd_subdir_opt)
+endif
 
 # set the machine type and cflags for it
 if meson.is_cross_build()
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.324166393 +0000
+++ 0008-build-fix-install-on-Windows.patch	2020-11-17 11:13:12.869115562 +0000
@@ -1 +1 @@
-From 5c7d86948764f9cec832bf3c618e0cceb06ac512 Mon Sep 17 00:00:00 2001
+From ae832279c15934966871ebfda706e73dbb69dbf1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5c7d86948764f9cec832bf3c618e0cceb06ac512 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 258b01d068..a29693b883 100644
+index 9afd05b95e..fca0461d67 100644
@@ -23 +24 @@
-@@ -57,9 +57,11 @@ eal_pmd_path = join_paths(get_option('prefix'), driver_install_path)
+@@ -54,9 +54,11 @@ eal_pmd_path = join_paths(get_option('prefix'), driver_install_path)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'build: fix MS linker flag with meson 0.54' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (6 preceding siblings ...)
  2020-11-17 11:13         ` [dpdk-stable] patch 'build: fix install on Windows' " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'usertools: fix CPU layout script to be PEP8 compliant' " luca.boccassi
                           ` (32 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: Nick Connolly; +Cc: Ranjit Menon, Khoa To, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4162bc31e4b5de70a235a3f75cb3e11ff167f916

Thanks.

Luca Boccassi

---
From 4162bc31e4b5de70a235a3f75cb3e11ff167f916 Mon Sep 17 00:00:00 2001
From: Nick Connolly <nick.connolly@mayadata.io>
Date: Sat, 31 Oct 2020 06:44:55 +0000
Subject: [PATCH] build: fix MS linker flag with meson 0.54

[ upstream commit 52a7cb0ad03a032ff33766cb1dc8553c17634ca6 ]

Meson versions >= 0.54.0 include support for handling /implib
with msvc link. Specifying it explicitly causes failures when
linking against the dll. Tested using Link 14.27.29112.0 and
Clang 11.0.0.

There were a number of changes to the way that import libraries
are handled between 0.47.1 and 0.54.0. Only make the change
for >= 0.54.0, leaving the behaviour unchanged for earlier
versions.

Fixes: 77cca7ccec13 ("build: fix drivers library path on Windows")

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Tested-by: Ranjit Menon <ranjit.menon@intel.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
Acked-by: Khoa To <khot@microsoft.com>
---
 drivers/meson.build | 6 ++++--
 lib/meson.build     | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/meson.build b/drivers/meson.build
index 330b14636d..696079680b 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -160,8 +160,10 @@ foreach class:dpdk_driver_classes
 			lk_deps = [version_map, def_file]
 			if is_windows
 				if is_ms_linker
-					lk_args = ['-Wl,/def:' + def_file.full_path(),
-						'-Wl,/implib:drivers\\' + implib]
+					lk_args = ['-Wl,/def:' + def_file.full_path()]
+					if meson.version().version_compare('<0.54.0')
+						lk_args += ['-Wl,/implib:drivers\\' + implib]
+					endif
 				else
 					lk_args = []
 				endif
diff --git a/lib/meson.build b/lib/meson.build
index bf938a392a..b60396428c 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -150,8 +150,10 @@ foreach l:libraries
 				output: 'rte_@0@_exports.def'.format(name))
 
 			if is_ms_linker
-				lk_args = ['-Wl,/def:' + def_file.full_path(),
-					'-Wl,/implib:lib\\' + implib]
+				lk_args = ['-Wl,/def:' + def_file.full_path()]
+				if meson.version().version_compare('<0.54.0')
+					lk_args += ['-Wl,/implib:lib\\' + implib]
+				endif
 			else
 				lk_args = ['-Wl,--version-script=' + version_map]
 			endif
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.364489004 +0000
+++ 0009-build-fix-MS-linker-flag-with-meson-0.54.patch	2020-11-17 11:13:12.873115642 +0000
@@ -1 +1 @@
-From 52a7cb0ad03a032ff33766cb1dc8553c17634ca6 Mon Sep 17 00:00:00 2001
+From 4162bc31e4b5de70a235a3f75cb3e11ff167f916 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 52a7cb0ad03a032ff33766cb1dc8553c17634ca6 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 4bb7e92183..6b50f7238d 100644
+index 330b14636d..696079680b 100644
@@ -32,2 +33,2 @@
-@@ -186,8 +186,10 @@ foreach subpath:subdirs
- 			lk_deps = [version_map, def_file, mingw_map]
+@@ -160,8 +160,10 @@ foreach class:dpdk_driver_classes
+ 			lk_deps = [version_map, def_file]
@@ -43 +44 @@
- 					lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
+ 					lk_args = []
@@ -46 +47 @@
-index 1bb019720c..ed00f89146 100644
+index bf938a392a..b60396428c 100644
@@ -49,2 +50,2 @@
-@@ -157,8 +157,10 @@ foreach l:libraries
- 				output: '@0@_mingw.map'.format(libname))
+@@ -150,8 +150,10 @@ foreach l:libraries
+ 				output: 'rte_@0@_exports.def'.format(name))
@@ -60,2 +61,2 @@
- 				if is_windows
- 					lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
+ 				lk_args = ['-Wl,--version-script=' + version_map]
+ 			endif

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'usertools: fix CPU layout script to be PEP8 compliant' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (7 preceding siblings ...)
  2020-11-17 11:13         ` [dpdk-stable] patch 'build: fix MS linker flag with meson 0.54' " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'gro: fix packet type detection with IPv6 tunnel' " luca.boccassi
                           ` (31 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: Ciara Power; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/42df599aa85490c1727692b4d7ad5d8b3d8e22b9

Thanks.

Luca Boccassi

---
From 42df599aa85490c1727692b4d7ad5d8b3d8e22b9 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Fri, 6 Nov 2020 12:40:53 +0000
Subject: [PATCH] usertools: fix CPU layout script to be PEP8 compliant

[ upstream commit b0dcd610529487ed6661351a735a35af5d03a222 ]

The pycodestyle tool flagged the following issues, which are now fixed.

$ pycodestyle cpu_layout.py
  cpu_layout.py:18:5: E722 do not use bare 'except'
  cpu_layout.py:62:14: E231 missing whitespace after ','

Fixes: deb87e6777c0 ("usertools: use sysfs for CPU layout")
Fixes: c9208f1dc967 ("usertools: fix CPU layout with python 3")

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 usertools/cpu_layout.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/usertools/cpu_layout.py b/usertools/cpu_layout.py
index 6f129b1db8..39b268752a 100755
--- a/usertools/cpu_layout.py
+++ b/usertools/cpu_layout.py
@@ -22,8 +22,6 @@ for cpu in xrange(max_cpus + 1):
         fd = open("{}/cpu{}/topology/core_id".format(base_path, cpu))
     except IOError:
         continue
-    except:
-        break
     core = int(fd.read())
     fd.close()
     fd = open("{}/cpu{}/topology/physical_package_id".format(base_path, cpu))
@@ -66,7 +64,7 @@ print(output)
 for c in cores:
     output = "Core %s" % str(c).ljust(max_core_id_len)
     for s in sockets:
-        if (s,c) in core_map:
+        if (s, c) in core_map:
             output += " " + str(core_map[(s, c)]).ljust(max_core_map_len)
         else:
             output += " " * (max_core_map_len + 1)
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.406915293 +0000
+++ 0010-usertools-fix-CPU-layout-script-to-be-PEP8-compliant.patch	2020-11-17 11:13:12.873115642 +0000
@@ -1 +1 @@
-From b0dcd610529487ed6661351a735a35af5d03a222 Mon Sep 17 00:00:00 2001
+From 42df599aa85490c1727692b4d7ad5d8b3d8e22b9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b0dcd610529487ed6661351a735a35af5d03a222 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index cc39638213..891b9238fa 100755
+index 6f129b1db8..39b268752a 100755
@@ -25 +26 @@
-@@ -15,8 +15,6 @@ for cpu in range(max_cpus + 1):
+@@ -22,8 +22,6 @@ for cpu in xrange(max_cpus + 1):
@@ -34 +35 @@
-@@ -59,7 +57,7 @@ print(output)
+@@ -66,7 +64,7 @@ print(output)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'gro: fix packet type detection with IPv6 tunnel' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (8 preceding siblings ...)
  2020-11-17 11:13         ` [dpdk-stable] patch 'usertools: fix CPU layout script to be PEP8 compliant' " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'config: enable packet prefetching with Meson' " luca.boccassi
                           ` (30 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: Yi Yang; +Cc: Jiayu Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c36d11b5560e6bd64afcf66eb4b096c8844e6c31

Thanks.

Luca Boccassi

---
From c36d11b5560e6bd64afcf66eb4b096c8844e6c31 Mon Sep 17 00:00:00 2001
From: Yi Yang <yangyi01@inspur.com>
Date: Thu, 5 Nov 2020 10:54:44 +0800
Subject: [PATCH] gro: fix packet type detection with IPv6 tunnel

[ upstream commit b605df71beaac34f2af0df7eb9e759ca0c80acf3 ]

For VxLAN packets, GRO will mistakenly reassemble them
if inner L3 is IPv6, inner L4 is TCP or UDP, and outer L3
is IPv4 because the value of IS_IPV4_VXLAN_TCP4/UDP4_PKT
is true for them.

This fix makes sure IS_IPV4_TCP_PKT, IS_IPV4_UDP_PKT,
IS_IPV4_VXLAN_TCP4_PKT and IS_IPV4_VXLAN_UDP4_PKT can make
decision precisely.

Fixes: e2d811063673 ("gro: support VXLAN UDP/IPv4")
Fixes: 1ca5e6740852 ("gro: support UDP/IPv4")
Fixes: 9e0b9d2ec0f4 ("gro: support VxLAN GRO")
Fixes: 0d2cbe59b719 ("lib/gro: support TCP/IPv4")

Signed-off-by: Yi Yang <yangyi01@inspur.com>
Acked-by: Jiayu Hu <jiayu.hu@intel.com>
---
 lib/librte_gro/rte_gro.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/lib/librte_gro/rte_gro.c b/lib/librte_gro/rte_gro.c
index 6618f4d32d..24e413d8ea 100644
--- a/lib/librte_gro/rte_gro.c
+++ b/lib/librte_gro/rte_gro.c
@@ -27,18 +27,21 @@ static gro_tbl_pkt_count_fn tbl_pkt_count_fn[RTE_GRO_TYPE_MAX_NUM] = {
 			NULL};
 
 #define IS_IPV4_TCP_PKT(ptype) (RTE_ETH_IS_IPV4_HDR(ptype) && \
-		((ptype & RTE_PTYPE_L4_TCP) == RTE_PTYPE_L4_TCP))
+		((ptype & RTE_PTYPE_L4_TCP) == RTE_PTYPE_L4_TCP) && \
+		(RTE_ETH_IS_TUNNEL_PKT(ptype) == 0))
 
 #define IS_IPV4_VXLAN_TCP4_PKT(ptype) (RTE_ETH_IS_IPV4_HDR(ptype) && \
 		((ptype & RTE_PTYPE_L4_UDP) == RTE_PTYPE_L4_UDP) && \
 		((ptype & RTE_PTYPE_TUNNEL_VXLAN) == \
 		 RTE_PTYPE_TUNNEL_VXLAN) && \
-		 ((ptype & RTE_PTYPE_INNER_L4_TCP) == \
-		  RTE_PTYPE_INNER_L4_TCP) && \
-		  (((ptype & RTE_PTYPE_INNER_L3_MASK) & \
-		    (RTE_PTYPE_INNER_L3_IPV4 | \
-		     RTE_PTYPE_INNER_L3_IPV4_EXT | \
-		     RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN)) != 0))
+		((ptype & RTE_PTYPE_INNER_L4_TCP) == \
+		 RTE_PTYPE_INNER_L4_TCP) && \
+		(((ptype & RTE_PTYPE_INNER_L3_MASK) == \
+		  RTE_PTYPE_INNER_L3_IPV4) || \
+		 ((ptype & RTE_PTYPE_INNER_L3_MASK) == \
+		  RTE_PTYPE_INNER_L3_IPV4_EXT) || \
+		 ((ptype & RTE_PTYPE_INNER_L3_MASK) == \
+		  RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN)))
 
 /*
  * GRO context structure. It keeps the table structures, which are
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.444499406 +0000
+++ 0011-gro-fix-packet-type-detection-with-IPv6-tunnel.patch	2020-11-17 11:13:12.873115642 +0000
@@ -1 +1 @@
-From b605df71beaac34f2af0df7eb9e759ca0c80acf3 Mon Sep 17 00:00:00 2001
+From c36d11b5560e6bd64afcf66eb4b096c8844e6c31 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b605df71beaac34f2af0df7eb9e759ca0c80acf3 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -24,2 +25,2 @@
- lib/librte_gro/rte_gro.c | 34 ++++++++++++++++++++--------------
- 1 file changed, 20 insertions(+), 14 deletions(-)
+ lib/librte_gro/rte_gro.c | 17 ++++++++++-------
+ 1 file changed, 10 insertions(+), 7 deletions(-)
@@ -28 +29 @@
-index e56bd20dbd..8ca4da67e9 100644
+index 6618f4d32d..24e413d8ea 100644
@@ -31 +32 @@
-@@ -32,32 +32,38 @@ static gro_tbl_pkt_count_fn tbl_pkt_count_fn[RTE_GRO_TYPE_MAX_NUM] = {
+@@ -27,18 +27,21 @@ static gro_tbl_pkt_count_fn tbl_pkt_count_fn[RTE_GRO_TYPE_MAX_NUM] = {
@@ -39,5 +39,0 @@
- #define IS_IPV4_UDP_PKT(ptype) (RTE_ETH_IS_IPV4_HDR(ptype) && \
--		((ptype & RTE_PTYPE_L4_UDP) == RTE_PTYPE_L4_UDP))
-+		((ptype & RTE_PTYPE_L4_UDP) == RTE_PTYPE_L4_UDP) && \
-+		(RTE_ETH_IS_TUNNEL_PKT(ptype) == 0))
- 
@@ -56,19 +51,0 @@
-+		(((ptype & RTE_PTYPE_INNER_L3_MASK) == \
-+		  RTE_PTYPE_INNER_L3_IPV4) || \
-+		 ((ptype & RTE_PTYPE_INNER_L3_MASK) == \
-+		  RTE_PTYPE_INNER_L3_IPV4_EXT) || \
-+		 ((ptype & RTE_PTYPE_INNER_L3_MASK) == \
-+		  RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN)))
- 
- #define IS_IPV4_VXLAN_UDP4_PKT(ptype) (RTE_ETH_IS_IPV4_HDR(ptype) && \
- 		((ptype & RTE_PTYPE_L4_UDP) == RTE_PTYPE_L4_UDP) && \
- 		((ptype & RTE_PTYPE_TUNNEL_VXLAN) == \
- 		 RTE_PTYPE_TUNNEL_VXLAN) && \
--		 ((ptype & RTE_PTYPE_INNER_L4_UDP) == \
--		  RTE_PTYPE_INNER_L4_UDP) && \
--		  (((ptype & RTE_PTYPE_INNER_L3_MASK) & \
--		    (RTE_PTYPE_INNER_L3_IPV4 | \
--		     RTE_PTYPE_INNER_L3_IPV4_EXT | \
--		     RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN)) != 0))
-+		((ptype & RTE_PTYPE_INNER_L4_UDP) == \
-+		 RTE_PTYPE_INNER_L4_UDP) && \

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'config: enable packet prefetching with Meson' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (9 preceding siblings ...)
  2020-11-17 11:13         ` [dpdk-stable] patch 'gro: fix packet type detection with IPv6 tunnel' " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'net/bnxt: remove useless prefetches' " luca.boccassi
                           ` (29 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Marvin Liu, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/a382ea6c50bf1d321532a4ae8ce40968d7be718a

Thanks.

Luca Boccassi

---
From a382ea6c50bf1d321532a4ae8ce40968d7be718a Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Fri, 13 Nov 2020 15:52:12 +0100
Subject: [PATCH] config: enable packet prefetching with Meson

[ upstream commit 048a2aa3f30c90c7f9339a17bfd1e663e379625f ]

With Make build system, RTE_PMD_PACKET_PREFETCH was enabled
by default. It got lost when transitioning to Meson build
system.

In order to avoid performance changes, this patch enables
packet prefetching in rte_config.h.

Fixes: 9314afb68a53 ("drivers: add infrastructure for meson build")

Reported-by: Marvin Liu <yong.liu@intel.com>
Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 config/rte_config.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/config/rte_config.h b/config/rte_config.h
index 765251a25a..0f9dae3ba2 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -99,6 +99,9 @@
 
 /****** driver defines ********/
 
+/* Packet prefetching in PMDs */
+#define RTE_PMD_PACKET_PREFETCH 1
+
 /* QuickAssist device */
 /* Max. number of QuickAssist devices which can be attached */
 #define RTE_PMD_QAT_MAX_PCI_DEVICES 48
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.487365613 +0000
+++ 0012-config-enable-packet-prefetching-with-Meson.patch	2020-11-17 11:13:12.877115723 +0000
@@ -1 +1 @@
-From 048a2aa3f30c90c7f9339a17bfd1e663e379625f Mon Sep 17 00:00:00 2001
+From a382ea6c50bf1d321532a4ae8ce40968d7be718a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 048a2aa3f30c90c7f9339a17bfd1e663e379625f ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 25219f04af..a0b5160ff2 100644
+index 765251a25a..0f9dae3ba2 100644
@@ -27 +28 @@
-@@ -103,6 +103,9 @@
+@@ -99,6 +99,9 @@

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/bnxt: remove useless prefetches' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (10 preceding siblings ...)
  2020-11-17 11:13         ` [dpdk-stable] patch 'config: enable packet prefetching with Meson' " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'net/ring: fix typo in log message' " luca.boccassi
                           ` (28 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Lance Richardson, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/59e5c312456c883711f0f629beb818779b6912a7

Thanks.

Luca Boccassi

---
From 59e5c312456c883711f0f629beb818779b6912a7 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 4 Nov 2020 09:03:10 -0800
Subject: [PATCH] net/bnxt: remove useless prefetches

[ upstream commit 1ef8c6290c86caef6cc588c8737450383a59338a ]

Prefetching only helps performance if it is done several 100
instructions before the actual use. The purpose of the prefetch
is to read ahead, it doesn't help if the next instruction
will block.

The code in the bnxt driver was doing these unnecessary prefetches.

Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 136f0a2742..5271d02366 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -301,7 +301,6 @@ static inline struct rte_mbuf *bnxt_tpa_end(
 	mbuf = tpa_info->mbuf;
 	RTE_ASSERT(mbuf != NULL);
 
-	rte_prefetch0(mbuf);
 	if (agg_bufs) {
 		bnxt_rx_pages(rxq, mbuf, raw_cp_cons, agg_bufs, tpa_info);
 	}
@@ -475,8 +474,6 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
 	if (mbuf == NULL)
 		return -EBUSY;
 
-	rte_prefetch0(mbuf);
-
 	mbuf->data_off = RTE_PKTMBUF_HEADROOM;
 	mbuf->nb_segs = 1;
 	mbuf->next = NULL;
@@ -625,7 +622,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 	/* Handle RX burst request */
 	while (1) {
 		cons = RING_CMP(cpr->cp_ring_struct, raw_cons);
-		rte_prefetch0(&cpr->cp_desc_ring[cons]);
 		rxcmp = (struct rx_pkt_cmpl *)&cpr->cp_desc_ring[cons];
 
 		if (!CMP_VALID(rxcmp, raw_cons, cpr->cp_ring_struct))
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.527322715 +0000
+++ 0013-net-bnxt-remove-useless-prefetches.patch	2020-11-17 11:13:12.877115723 +0000
@@ -1 +1 @@
-From 1ef8c6290c86caef6cc588c8737450383a59338a Mon Sep 17 00:00:00 2001
+From 59e5c312456c883711f0f629beb818779b6912a7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1ef8c6290c86caef6cc588c8737450383a59338a ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index e375b31ed8..fdbe6f71ea 100644
+index 136f0a2742..5271d02366 100644
@@ -27 +28 @@
-@@ -306,7 +306,6 @@ static inline struct rte_mbuf *bnxt_tpa_end(
+@@ -301,7 +301,6 @@ static inline struct rte_mbuf *bnxt_tpa_end(
@@ -35 +36 @@
-@@ -734,8 +733,6 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
+@@ -475,8 +474,6 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
@@ -44 +45 @@
-@@ -867,7 +864,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -625,7 +622,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/ring: fix typo in log message' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (11 preceding siblings ...)
  2020-11-17 11:13         ` [dpdk-stable] patch 'net/bnxt: remove useless prefetches' " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'net/mlx5: fix switch port id when representor in bonding' " luca.boccassi
                           ` (27 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1fd99ff7c432e94e3592b7d5281b0059df37b92d

Thanks.

Luca Boccassi

---
From 1fd99ff7c432e94e3592b7d5281b0059df37b92d Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Wed, 4 Nov 2020 18:01:25 +0100
Subject: [PATCH] net/ring: fix typo in log message

[ upstream commit f1b910746547b25a8e65dc770b452744e21a0ffd ]

Add a missing space.

Fixes: 869bf6d222bb ("net/ring: fix coding style")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/ring/rte_eth_ring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index f35f54e78d..cae959b76c 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -593,7 +593,7 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev)
 
 		if (!kvlist) {
 			PMD_LOG(INFO,
-				"Ignoring unsupported parameters when creatingrings-backed ethernet device");
+				"Ignoring unsupported parameters when creating rings-backed ethernet device");
 			ret = eth_dev_ring_create(name, dev, rte_socket_id(),
 						  DEV_CREATE, &eth_dev);
 			if (ret == -1) {
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.567210211 +0000
+++ 0014-net-ring-fix-typo-in-log-message.patch	2020-11-17 11:13:12.881115803 +0000
@@ -1 +1 @@
-From f1b910746547b25a8e65dc770b452744e21a0ffd Mon Sep 17 00:00:00 2001
+From 1fd99ff7c432e94e3592b7d5281b0059df37b92d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f1b910746547b25a8e65dc770b452744e21a0ffd ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index d6115abdd5..41402a5159 100644
+index f35f54e78d..cae959b76c 100644
@@ -21 +22 @@
-@@ -629,7 +629,7 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev)
+@@ -593,7 +593,7 @@ rte_pmd_ring_probe(struct rte_vdev_device *dev)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix switch port id when representor in bonding' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (12 preceding siblings ...)
  2020-11-17 11:13         ` [dpdk-stable] patch 'net/ring: fix typo in log message' " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'net/mlx5: fix Rx queue completion index consistency' " luca.boccassi
                           ` (26 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: Dong Zhou; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b056b956bb62564d08f8451664bbc47932865f8f

Thanks.

Luca Boccassi

---
From b056b956bb62564d08f8451664bbc47932865f8f Mon Sep 17 00:00:00 2001
From: Dong Zhou <dongzhou@nvidia.com>
Date: Wed, 4 Nov 2020 08:04:55 +0200
Subject: [PATCH] net/mlx5: fix switch port id when representor in bonding

[ upstream commit cdbdcd46a2b915c0781ecb2f48f412237daf03da ]

In the bonding configurations the port switch id for representors was
composed of pf index in bonding as the 1 MSB and the representor's index
as the remaining 15 LSBs. The special corner case for the host PF
representor on BF setups with representor id 0xFFFF was missed as well.

The new switch port id consists of 4 MSBs for the pf bonding index and
the remaining 12 LSBs for the representor index. The switch port id
ranges for each type of representors are as follows:

Uplink representor(AKA master): 0xFFFF
Host PF representor: 0x<pf_bond>FFF
VF representor: 0x<pf_bond>[0-FFE]

Fixes: bee57a0a3565 ("net/mlx5: update switch port id in bonding configuration")

Signed-off-by: Dong Zhou <dongzhou@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_defs.h   |  2 +-
 drivers/net/mlx5/mlx5_ethdev.c | 12 ++++++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_defs.h b/drivers/net/mlx5/mlx5_defs.h
index 418e744d65..2836099b75 100644
--- a/drivers/net/mlx5/mlx5_defs.h
+++ b/drivers/net/mlx5/mlx5_defs.h
@@ -61,7 +61,7 @@
 
 /* Switch port ID parameters for bonding configurations. */
 #define MLX5_PORT_ID_BONDING_PF_MASK 0xf
-#define MLX5_PORT_ID_BONDING_PF_SHIFT 0xf
+#define MLX5_PORT_ID_BONDING_PF_SHIFT 12
 
 /* Alarm timeout. */
 #define MLX5_ALARM_TIMEOUT_US 100000
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index a6a091259e..efcc69ca44 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -646,14 +646,22 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
 			 * representors (more than 4K) or PFs (more than 15)
 			 * this approach must be reconsidered.
 			 */
-			if ((info->switch_info.port_id >>
-				MLX5_PORT_ID_BONDING_PF_SHIFT) ||
+			/* Switch port ID for VF representors: 0 - 0xFFE */
+			if ((info->switch_info.port_id != 0xffff &&
+				info->switch_info.port_id >=
+				((1 << MLX5_PORT_ID_BONDING_PF_SHIFT) - 1)) ||
 			    priv->pf_bond > MLX5_PORT_ID_BONDING_PF_MASK) {
 				DRV_LOG(ERR, "can't update switch port ID"
 					     " for bonding device");
 				assert(false);
 				return -ENODEV;
 			}
+			/*
+			 * Switch port ID for Host PF representor
+			 * (representor_id is -1) , set to 0xFFF
+			 */
+			if (info->switch_info.port_id == 0xffff)
+				info->switch_info.port_id = 0xfff;
 			info->switch_info.port_id |=
 				priv->pf_bond << MLX5_PORT_ID_BONDING_PF_SHIFT;
 		}
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.606868936 +0000
+++ 0015-net-mlx5-fix-switch-port-id-when-representor-in-bond.patch	2020-11-17 11:13:12.885115884 +0000
@@ -1 +1 @@
-From cdbdcd46a2b915c0781ecb2f48f412237daf03da Mon Sep 17 00:00:00 2001
+From b056b956bb62564d08f8451664bbc47932865f8f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cdbdcd46a2b915c0781ecb2f48f412237daf03da ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 3c34234152..aa55db3750 100644
+index 418e744d65..2836099b75 100644
@@ -33 +34 @@
-@@ -50,7 +50,7 @@
+@@ -61,7 +61,7 @@
@@ -43 +44 @@
-index ee97480dcb..a3910cf922 100644
+index a6a091259e..efcc69ca44 100644
@@ -46 +47 @@
-@@ -338,14 +338,22 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
+@@ -646,14 +646,22 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
@@ -59 +60 @@
- 				MLX5_ASSERT(false);
+ 				assert(false);

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix Rx queue completion index consistency' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (13 preceding siblings ...)
  2020-11-17 11:13         ` [dpdk-stable] patch 'net/mlx5: fix switch port id when representor in bonding' " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'examples/vhost_crypto: add new line character in usage' " luca.boccassi
                           ` (25 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c8b25df21ec9ed4c79ca43a85a851a15184cc989

Thanks.

Luca Boccassi

---
From c8b25df21ec9ed4c79ca43a85a851a15184cc989 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Fri, 6 Nov 2020 17:16:10 +0000
Subject: [PATCH] net/mlx5: fix Rx queue completion index consistency

[ upstream commit 70d83ebbbb2554bcab78bfe7f5b102635278bc76 ]

The Rx queue completion consumer index got temporary
wrong value pointing to the midst of the compressed CQE
session. If application crashed at the moment the next
queue restart caused handling wrong CQEs pointed by index
and losing consuming index synchronization, that made
reliable queue restart impossible.

Fixes: 88c0733535d6 ("net/mlx5: extend Rx completion with error handling")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index fb4fe94235..9f4a04122c 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1125,6 +1125,7 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
 		} else {
 			int ret;
 			int8_t op_own;
+			uint32_t cq_ci;
 
 			ret = check_cqe(cqe, cqe_n, rxq->cq_ci);
 			if (unlikely(ret != MLX5_CQE_STATUS_SW_OWN)) {
@@ -1138,14 +1139,19 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
 					return 0;
 				}
 			}
-			++rxq->cq_ci;
+			/*
+			 * Introduce the local variable to have queue cq_ci
+			 * index in queue structure always consistent with
+			 * actual CQE boundary (not pointing to the middle
+			 * of compressed CQE session).
+			 */
+			cq_ci = rxq->cq_ci + 1;
 			op_own = cqe->op_own;
 			if (MLX5_CQE_FORMAT(op_own) == MLX5_COMPRESSED) {
 				volatile struct mlx5_mini_cqe8 (*mc)[8] =
 					(volatile struct mlx5_mini_cqe8 (*)[8])
 					(uintptr_t)(&(*rxq->cqes)
-						[rxq->cq_ci &
-						 cqe_cnt].pkt_info);
+						[cq_ci & cqe_cnt].pkt_info);
 
 				/* Fix endianness. */
 				zip->cqe_cnt = rte_be_to_cpu_32(cqe->byte_cnt);
@@ -1158,10 +1164,9 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
 				 * 7 CQEs after the initial CQE instead of 8
 				 * for subsequent ones.
 				 */
-				zip->ca = rxq->cq_ci;
+				zip->ca = cq_ci;
 				zip->na = zip->ca + 7;
 				/* Compute the next non compressed CQE. */
-				--rxq->cq_ci;
 				zip->cq_ci = rxq->cq_ci + zip->cqe_cnt;
 				/* Get packet size to return. */
 				len = rte_be_to_cpu_32((*mc)[0].byte_cnt);
@@ -1176,6 +1181,7 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
 					++idx;
 				}
 			} else {
+				rxq->cq_ci = cq_ci;
 				len = rte_be_to_cpu_32(cqe->byte_cnt);
 			}
 		}
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.651445451 +0000
+++ 0016-net-mlx5-fix-Rx-queue-completion-index-consistency.patch	2020-11-17 11:13:12.893116045 +0000
@@ -1 +1 @@
-From 70d83ebbbb2554bcab78bfe7f5b102635278bc76 Mon Sep 17 00:00:00 2001
+From c8b25df21ec9ed4c79ca43a85a851a15184cc989 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 70d83ebbbb2554bcab78bfe7f5b102635278bc76 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -19 +19,0 @@
- drivers/net/mlx5/mlx5_rxq.c  |  2 +-
@@ -21 +21 @@
- 2 files changed, 12 insertions(+), 6 deletions(-)
+ 1 file changed, 11 insertions(+), 5 deletions(-)
@@ -23,13 +22,0 @@
-diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
-index c04746afb1..f299fbc8a5 100644
---- a/drivers/net/mlx5/mlx5_rxq.c
-+++ b/drivers/net/mlx5/mlx5_rxq.c
-@@ -622,7 +622,7 @@ mlx5_rx_queue_start_primary(struct rte_eth_dev *dev, uint16_t idx)
- 	rte_io_wmb();
- 	*rxq->cq_db = rte_cpu_to_be_32(rxq->cq_ci);
- 	rte_io_wmb();
--	/* Reset RQ consumer before moving queue ro READY state. */
-+	/* Reset RQ consumer before moving queue to READY state. */
- 	*rxq->rq_db = rte_cpu_to_be_32(0);
- 	rte_io_wmb();
- 	ret = priv->obj_ops.rxq_obj_modify(rxq_ctrl->obj, MLX5_RXQ_MOD_RST2RDY);
@@ -37 +24 @@
-index 402e7d1c3f..a5829f00de 100644
+index fb4fe94235..9f4a04122c 100644
@@ -40 +27 @@
-@@ -1181,6 +1181,7 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
+@@ -1125,6 +1125,7 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
@@ -48 +35 @@
-@@ -1194,14 +1195,19 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
+@@ -1138,14 +1139,19 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
@@ -71 +58 @@
-@@ -1214,10 +1220,9 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
+@@ -1158,10 +1164,9 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
@@ -82,2 +69,2 @@
- 				len = rte_be_to_cpu_32((*mc)[0].byte_cnt &
-@@ -1233,6 +1238,7 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,
+ 				len = rte_be_to_cpu_32((*mc)[0].byte_cnt);
+@@ -1176,6 +1181,7 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe,

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'examples/vhost_crypto: add new line character in usage' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (14 preceding siblings ...)
  2020-11-17 11:13         ` [dpdk-stable] patch 'net/mlx5: fix Rx queue completion index consistency' " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'vhost: fix virtqueue initialization' " luca.boccassi
                           ` (24 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: Ibtisam Tariq; +Cc: David Marchand, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/61814eac0483ff200b876c99bab96e2973b70743

Thanks.

Luca Boccassi

---
From 61814eac0483ff200b876c99bab96e2973b70743 Mon Sep 17 00:00:00 2001
From: Ibtisam Tariq <ibtisam.tariq@emumba.com>
Date: Mon, 2 Nov 2020 11:38:25 +0000
Subject: [PATCH] examples/vhost_crypto: add new line character in usage

[ upstream commit 854dbee2ac990002bbf7a19c65aa7385e589f6d9 ]

Add new line character(\n) in the usage of vhost_crypto example for
better readability

Fixes: 709521f4c2cd ("examples/vhost_crypto: support multi-core")

Signed-off-by: Ibtisam Tariq <ibtisam.tariq@emumba.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 examples/vhost_crypto/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c
index 11b022e813..405d16966d 100644
--- a/examples/vhost_crypto/main.c
+++ b/examples/vhost_crypto/main.c
@@ -195,7 +195,7 @@ vhost_crypto_usage(const char *prgname)
 {
 	printf("%s [EAL options] --\n"
 		"  --%s <lcore>,SOCKET-FILE-PATH\n"
-		"  --%s (lcore,cdev_id,queue_id)[,(lcore,cdev_id,queue_id)]"
+		"  --%s (lcore,cdev_id,queue_id)[,(lcore,cdev_id,queue_id)]\n"
 		"  --%s: zero copy\n"
 		"  --%s: guest polling\n",
 		prgname, SOCKET_FILE_KEYWORD, CONFIG_KEYWORD,
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.699975407 +0000
+++ 0017-examples-vhost_crypto-add-new-line-character-in-usag.patch	2020-11-17 11:13:12.893116045 +0000
@@ -1 +1 @@
-From 854dbee2ac990002bbf7a19c65aa7385e589f6d9 Mon Sep 17 00:00:00 2001
+From 61814eac0483ff200b876c99bab96e2973b70743 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 854dbee2ac990002bbf7a19c65aa7385e589f6d9 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 11ad491597..29c8f7228d 100644
+index 11b022e813..405d16966d 100644

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'vhost: fix virtqueue initialization' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (15 preceding siblings ...)
  2020-11-17 11:13         ` [dpdk-stable] patch 'examples/vhost_crypto: add new line character in usage' " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'net/hns3: check PCI config space write' " luca.boccassi
                           ` (23 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Yu Jiang, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/18b6f15777b951d359a04d4470e81b99fd44af20

Thanks.

Luca Boccassi

---
From 18b6f15777b951d359a04d4470e81b99fd44af20 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Fri, 6 Nov 2020 15:47:44 +0100
Subject: [PATCH] vhost: fix virtqueue initialization

[ upstream commit 7804bbd13aa583e3a28b08557f7a98fcbe7fc8a8 ]

This patches fixes virtqueue initialization issue causing
segfault or file descriptor being closed unexpectedly.

The wrong index was passed to init_vring_queue() by
alloc_vring_queue() when a hole in the virtqueue array was
met.

Fixes: 8acd7c213353 ("vhost: fix virtqueues metadata allocation")

Reported-by: Yu Jiang <yux.jiang@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Tested-by: Yu Jiang <yux.jiang@intel.com>
---
 lib/librte_vhost/vhost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index 9f3eadeba6..3dd278f8f8 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -575,7 +575,7 @@ alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx)
 		}
 
 		dev->virtqueue[i] = vq;
-		init_vring_queue(dev, vring_idx);
+		init_vring_queue(dev, i);
 		rte_spinlock_init(&vq->access_lock);
 		vq->avail_wrap_counter = 1;
 		vq->used_wrap_counter = 1;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.738213425 +0000
+++ 0018-vhost-fix-virtqueue-initialization.patch	2020-11-17 11:13:12.897116126 +0000
@@ -1 +1 @@
-From 7804bbd13aa583e3a28b08557f7a98fcbe7fc8a8 Mon Sep 17 00:00:00 2001
+From 18b6f15777b951d359a04d4470e81b99fd44af20 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7804bbd13aa583e3a28b08557f7a98fcbe7fc8a8 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 8a151a9c1d..b83cf639eb 100644
+index 9f3eadeba6..3dd278f8f8 100644
@@ -28 +29 @@
-@@ -605,7 +605,7 @@ alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx)
+@@ -575,7 +575,7 @@ alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/hns3: check PCI config space write' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (16 preceding siblings ...)
  2020-11-17 11:13         ` [dpdk-stable] patch 'vhost: fix virtqueue initialization' " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'net/i40e: add C++ include guard' " luca.boccassi
                           ` (22 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: Lijun Ou; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/99ce983148f897470afccb3bed09b0b2e036b9f3

Thanks.

Luca Boccassi

---
From 99ce983148f897470afccb3bed09b0b2e036b9f3 Mon Sep 17 00:00:00 2001
From: Lijun Ou <oulijun@huawei.com>
Date: Mon, 9 Nov 2020 22:29:00 +0800
Subject: [PATCH] net/hns3: check PCI config space write

[ upstream commit 6dd32ded17d85eec8c15f4635b668528520256c4 ]

Here adds a check for the return value when calling
rte_pci_write_config.

Coverity issue: 363714
Fixes: cea37e513329 ("net/hns3: fix FLR reset")

Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index b61616090b..4359b2efdb 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -167,8 +167,12 @@ hns3vf_enable_msix(const struct rte_pci_device *device, bool op)
 			control |= PCI_MSIX_FLAGS_ENABLE;
 		else
 			control &= ~PCI_MSIX_FLAGS_ENABLE;
-		rte_pci_write_config(device, &control, sizeof(control),
-				     (pos + PCI_MSIX_FLAGS));
+		ret = rte_pci_write_config(device, &control, sizeof(control),
+					  (pos + PCI_MSIX_FLAGS));
+		if (ret < 0) {
+			PMD_INIT_LOG(ERR, "failed to write PCI offset 0x%x",
+				    (pos + PCI_MSIX_FLAGS));
+		}
 		return 0;
 	}
 	return -1;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.777693290 +0000
+++ 0019-net-hns3-check-PCI-config-space-write.patch	2020-11-17 11:13:12.901116206 +0000
@@ -1 +1 @@
-From 6dd32ded17d85eec8c15f4635b668528520256c4 Mon Sep 17 00:00:00 2001
+From 99ce983148f897470afccb3bed09b0b2e036b9f3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6dd32ded17d85eec8c15f4635b668528520256c4 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 6f71cd6606..1535f26713 100644
+index b61616090b..4359b2efdb 100644
@@ -22 +23 @@
-@@ -148,8 +148,12 @@ hns3vf_enable_msix(const struct rte_pci_device *device, bool op)
+@@ -167,8 +167,12 @@ hns3vf_enable_msix(const struct rte_pci_device *device, bool op)
@@ -36 +37 @@
- 	return -ENXIO;
+ 	return -1;

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/i40e: add C++ include guard' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (17 preceding siblings ...)
  2020-11-17 11:13         ` [dpdk-stable] patch 'net/hns3: check PCI config space write' " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'net/i40e: fix build for log format specifier' " luca.boccassi
                           ` (21 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: Prateek Agarwal; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0c3a01ce6e06486ca3a7498da04f9be4ca78da64

Thanks.

Luca Boccassi

---
From 0c3a01ce6e06486ca3a7498da04f9be4ca78da64 Mon Sep 17 00:00:00 2001
From: Prateek Agarwal <prateekag@cse.iitb.ac.in>
Date: Sat, 7 Nov 2020 14:30:38 +0530
Subject: [PATCH] net/i40e: add C++ include guard

[ upstream commit 876589e07ed3ce36b6390ebf41615a8a74557cca ]

Add extern "C" in rte_pmd_i40e.h when be compiled with CPP.

Fixes: 17e906a1ea9c ("net/i40e: support link status notification")

Signed-off-by: Prateek Agarwal <prateekag@cse.iitb.ac.in>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/rte_pmd_i40e.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/i40e/rte_pmd_i40e.h b/drivers/net/i40e/rte_pmd_i40e.h
index 4920f701d3..9929171541 100644
--- a/drivers/net/i40e/rte_pmd_i40e.h
+++ b/drivers/net/i40e/rte_pmd_i40e.h
@@ -14,6 +14,10 @@
  *
  */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <rte_compat.h>
 #include <rte_ethdev.h>
 #include <rte_ether.h>
@@ -1081,4 +1085,8 @@ __rte_experimental
 int
 rte_pmd_i40e_set_switch_dev(uint16_t port_id, struct rte_eth_dev *switch_dev);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _PMD_I40E_H_ */
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.822573725 +0000
+++ 0020-net-i40e-add-C-include-guard.patch	2020-11-17 11:13:12.901116206 +0000
@@ -1 +1 @@
-From 876589e07ed3ce36b6390ebf41615a8a74557cca Mon Sep 17 00:00:00 2001
+From 0c3a01ce6e06486ca3a7498da04f9be4ca78da64 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 876589e07ed3ce36b6390ebf41615a8a74557cca ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index fc3560c28c..4cb21c3713 100644
+index 4920f701d3..9929171541 100644
@@ -32 +33 @@
-@@ -1130,4 +1134,8 @@ __rte_experimental
+@@ -1081,4 +1085,8 @@ __rte_experimental

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/i40e: fix build for log format specifier' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (18 preceding siblings ...)
  2020-11-17 11:13         ` [dpdk-stable] patch 'net/i40e: add C++ include guard' " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'net/iavf: fix releasing mbufs' " luca.boccassi
                           ` (20 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8e6f80d1ce8c31a6d4fbb584f3edf9419fcc81e8

Thanks.

Luca Boccassi

---
From 8e6f80d1ce8c31a6d4fbb584f3edf9419fcc81e8 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 10 Nov 2020 17:54:57 +0000
Subject: [PATCH] net/i40e: fix build for log format specifier

[ upstream commit c2f4dc6d60098a4596cdf5cee34fbeb8fab74410 ]

Build error:
i40e_common.c: In function "i40e_parse_discover_capabilities":
../drivers/net/i40e/base/../i40e_logs.h:43:50:
    error: format "%llX" expects argument of type "long long unsigned
           int", but argument 7 has type "u64" {aka "long unsigned int"
           [-Werror=format=]
   43 |  rte_log(RTE_LOG_ ## level, i40e_logtype_driver, "%s(): " fmt, \
      |                                                  ^~~~~~~~
.../i40e_osdep.h:87:3: note: in expansion of macro "PMD_DRV_LOG_RAW"
   87 |   PMD_DRV_LOG_RAW(DEBUG, "i40e %02x.%x " s,       \
      |   ^~~~~~~~~~~~~~~
.../base/i40e_common.c:4100:4: note: in expansion of macro "i40e_debug"
 4100 |    i40e_debug(hw, I40E_DEBUG_INIT,
      |    ^~~~~~~~~~

There are multiple build error because of same reason, all fixed.

Using 'PRIX64' to fix the build error.

Fixes: 889bc9f0cd3a ("i40e/base: unify the capability function")
Fixes: 9b1041574cd4 ("i40e/base: enhance polling of NVM semaphore")
Fixes: 8db9e2a1b232 ("i40e: base driver")
Fixes: 3b7271f3958a ("i40e/base: catch NVM write semaphore timeout and retry")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 drivers/net/i40e/base/i40e_common.c | 4 +++-
 drivers/net/i40e/base/i40e_nvm.c    | 8 +++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index f179306e2e..50812eb80e 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2,6 +2,8 @@
  * Copyright(c) 2001-2020 Intel Corporation
  */
 
+#include <inttypes.h>
+
 #include "i40e_type.h"
 #include "i40e_adminq.h"
 #include "i40e_prototype.h"
@@ -3990,7 +3992,7 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
 			p->wr_csr_prot = (u64)number;
 			p->wr_csr_prot |= (u64)logical_id << 32;
 			i40e_debug(hw, I40E_DEBUG_INIT,
-				   "HW Capability: wr_csr_prot = 0x%llX\n\n",
+				   "HW Capability: wr_csr_prot = 0x%" PRIX64 "\n\n",
 				   (p->wr_csr_prot & 0xffff));
 			break;
 		case I40E_AQ_CAP_ID_NVM_MGMT:
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index d87a6e56ff..16aebd077f 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -2,6 +2,8 @@
  * Copyright(c) 2001-2020 Intel Corporation
  */
 
+#include <inttypes.h>
+
 #include "i40e_prototype.h"
 
 /**
@@ -77,7 +79,7 @@ enum i40e_status_code i40e_acquire_nvm(struct i40e_hw *hw,
 
 	if (ret_code)
 		i40e_debug(hw, I40E_DEBUG_NVM,
-			   "NVM acquire type %d failed time_left=%llu ret=%d aq_err=%d\n",
+			   "NVM acquire type %d failed time_left=%" PRIu64 " ret=%d aq_err=%d\n",
 			   access, time_left, ret_code, hw->aq.asq_last_status);
 
 	if (ret_code && time_left) {
@@ -99,7 +101,7 @@ enum i40e_status_code i40e_acquire_nvm(struct i40e_hw *hw,
 		if (ret_code != I40E_SUCCESS) {
 			hw->nvm.hw_semaphore_timeout = 0;
 			i40e_debug(hw, I40E_DEBUG_NVM,
-				   "NVM acquire timed out, wait %llu ms before trying again. status=%d aq_err=%d\n",
+				   "NVM acquire timed out, wait %" PRIu64 " ms before trying again. status=%d aq_err=%d\n",
 				   time_left, ret_code, hw->aq.asq_last_status);
 		}
 	}
@@ -1203,7 +1205,7 @@ retry:
 		gtime = rd32(hw, I40E_GLVFGEN_TIMER);
 		if (gtime >= hw->nvm.hw_semaphore_timeout) {
 			i40e_debug(hw, I40E_DEBUG_ALL,
-				   "NVMUPD: write semaphore expired (%d >= %lld), retrying\n",
+				   "NVMUPD: write semaphore expired (%d >= %" PRIu64 "), retrying\n",
 				   gtime, hw->nvm.hw_semaphore_timeout);
 			i40e_release_nvm(hw);
 			status = i40e_acquire_nvm(hw, I40E_RESOURCE_WRITE);
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.862959933 +0000
+++ 0021-net-i40e-fix-build-for-log-format-specifier.patch	2020-11-17 11:13:12.913116448 +0000
@@ -1 +1 @@
-From c2f4dc6d60098a4596cdf5cee34fbeb8fab74410 Mon Sep 17 00:00:00 2001
+From 8e6f80d1ce8c31a6d4fbb584f3edf9419fcc81e8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c2f4dc6d60098a4596cdf5cee34fbeb8fab74410 ]
+
@@ -29 +30,0 @@
-Cc: stable@dpdk.org
@@ -39 +40 @@
-index 8e3db0756c..e20bb9ac35 100644
+index f179306e2e..50812eb80e 100644
@@ -51 +52 @@
-@@ -4098,7 +4100,7 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
+@@ -3990,7 +3992,7 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
@@ -59 +60 @@
- 		case I40E_AQ_CAP_ID_DIS_UNUSED_PORTS:
+ 		case I40E_AQ_CAP_ID_NVM_MGMT:
@@ -61 +62 @@
-index 6466d86486..561ed21136 100644
+index d87a6e56ff..16aebd077f 100644
@@ -91 +92 @@
-@@ -1300,7 +1302,7 @@ retry:
+@@ -1203,7 +1205,7 @@ retry:

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/iavf: fix releasing mbufs' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (19 preceding siblings ...)
  2020-11-17 11:13         ` [dpdk-stable] patch 'net/i40e: fix build for log format specifier' " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'net/mlx5: fix missing meter packet' " luca.boccassi
                           ` (19 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: Ting Xu; +Cc: Jingjing Wu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/abf41510fca7349ecc03c412b9919427604d2f38

Thanks.

Luca Boccassi

---
From abf41510fca7349ecc03c412b9919427604d2f38 Mon Sep 17 00:00:00 2001
From: Ting Xu <ting.xu@intel.com>
Date: Wed, 11 Nov 2020 11:06:51 +0800
Subject: [PATCH] net/iavf: fix releasing mbufs

[ upstream commit 36b8b062885f2b6576818a1c18ffaacb4dccefa5 ]

In the function _iavf_rx_queue_release_mbufs_vec to release rx mbufs,
rxq->rxrearm_nb is given the value of rx descriptor number at last.
However, since the process to release and allocate mbufs lacks the
initialization of rxrearm_nb, if we try to release mbufs next time, it
will return without releasing directly. In this patch, rxrearm_nb is
initialized to be zero in rx queue reset.

Fixes: 319c421f3890 ("net/avf: enable SSE Rx Tx")

Signed-off-by: Ting Xu <ting.xu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 6aafc72e24..9672666567 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -167,6 +167,7 @@ reset_rx_queue(struct iavf_rx_queue *rxq)
 	rxq->nb_rx_hold = 0;
 	rxq->pkt_first_seg = NULL;
 	rxq->pkt_last_seg = NULL;
+	rxq->rxrearm_nb = 0;
 }
 
 static inline void
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.916973222 +0000
+++ 0022-net-iavf-fix-releasing-mbufs.patch	2020-11-17 11:13:12.917116528 +0000
@@ -1 +1 @@
-From 36b8b062885f2b6576818a1c18ffaacb4dccefa5 Mon Sep 17 00:00:00 2001
+From abf41510fca7349ecc03c412b9919427604d2f38 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 36b8b062885f2b6576818a1c18ffaacb4dccefa5 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index baac5d65c8..8f43208c80 100644
+index 6aafc72e24..9672666567 100644
@@ -26 +27 @@
-@@ -194,6 +194,7 @@ reset_rx_queue(struct iavf_rx_queue *rxq)
+@@ -167,6 +167,7 @@ reset_rx_queue(struct iavf_rx_queue *rxq)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix missing meter packet' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (20 preceding siblings ...)
  2020-11-17 11:13         ` [dpdk-stable] patch 'net/iavf: fix releasing mbufs' " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'net/af_xdp: fix pointer storage size' " luca.boccassi
                           ` (18 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: Xueming Li; +Cc: Suanming Mou, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/bfaad169296d556ef4b46e96f92c68e4755b16c4

Thanks.

Luca Boccassi

---
From bfaad169296d556ef4b46e96f92c68e4755b16c4 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Tue, 3 Nov 2020 11:01:39 +0000
Subject: [PATCH] net/mlx5: fix missing meter packet

[ upstream commit c3ba8ecb767f0d34c792c82a92c378195f3530b4 ]

For transfer flow with meter, packet was passed without applying flow
action. The group level was multiplied by 10 for group level 65531.

This patch fixes this issue by correcting suffix table group level
calculation.

Fixes: 3e8f3e51fd93 ("net/mlx5: fix meter table definitions")

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 2f76d162cf..d2e4f446f4 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -607,9 +607,9 @@ struct mlx5_flow_tbl_resource {
 #define MLX5_FLOW_MREG_ACT_TABLE_GROUP (MLX5_MAX_TABLES - 1)
 #define MLX5_FLOW_MREG_CP_TABLE_GROUP (MLX5_MAX_TABLES - 2)
 /* Tables for metering splits should be added here. */
-#define MLX5_MAX_TABLES_EXTERNAL (MLX5_MAX_TABLES - 3)
-#define MLX5_FLOW_TABLE_LEVEL_METER (MLX5_MAX_TABLES - 4)
 #define MLX5_FLOW_TABLE_LEVEL_SUFFIX (MLX5_MAX_TABLES - 3)
+#define MLX5_FLOW_TABLE_LEVEL_METER (MLX5_MAX_TABLES - 4)
+#define MLX5_MAX_TABLES_EXTERNAL MLX5_FLOW_TABLE_LEVEL_METER
 #define MLX5_MAX_TABLES_FDB UINT16_MAX
 
 #define MLX5_DBR_SIZE RTE_CACHE_LINE_SIZE
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.959413587 +0000
+++ 0023-net-mlx5-fix-missing-meter-packet.patch	2020-11-17 11:13:12.917116528 +0000
@@ -1 +1 @@
-From c3ba8ecb767f0d34c792c82a92c378195f3530b4 Mon Sep 17 00:00:00 2001
+From bfaad169296d556ef4b46e96f92c68e4755b16c4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c3ba8ecb767f0d34c792c82a92c378195f3530b4 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 9a87800112..ed791c8565 100644
+index 2f76d162cf..d2e4f446f4 100644
@@ -26 +27 @@
-@@ -611,9 +611,9 @@ struct mlx5_flow_tbl_resource {
+@@ -607,9 +607,9 @@ struct mlx5_flow_tbl_resource {
@@ -36 +36,0 @@
- #define MLX5_FLOW_TABLE_FACTOR 10
@@ -37,0 +38 @@
+ #define MLX5_DBR_SIZE RTE_CACHE_LINE_SIZE

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/af_xdp: fix pointer storage size' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (21 preceding siblings ...)
  2020-11-17 11:13         ` [dpdk-stable] patch 'net/mlx5: fix missing meter packet' " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:13         ` [dpdk-stable] patch 'net/iavf: fix performance drop after port reset' " luca.boccassi
                           ` (17 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Ciara Loftus, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4fe71cc7c8eefecced26044eacc335519cb252de

Thanks.

Luca Boccassi

---
From 4fe71cc7c8eefecced26044eacc335519cb252de Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Mon, 9 Nov 2020 13:30:05 +0000
Subject: [PATCH] net/af_xdp: fix pointer storage size
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 470b5c23adf2f4ec5aaece93c711048d84cd3eab ]

'uint64_t' is used to hold the pointer, for 32-bits build this
assumption is wrong and giving following build error:

rte_eth_af_xdp.c: In function ‘xdp_umem_configure’:
rte_eth_af_xdp.c:970:15:
    error: cast to pointer from integer of different size
           [-Werror=int-to-pointer-cast]
  970 |   base_addr = (void *)get_base_addr(mb_pool, &align);
      |               ^

Replacing the 'uint64_t' return type of the 'get_base_addr()' to the
'uintptr_t'.
Although not sure if the overall logic supports the 32-bits, using
'uintptr_t' should be safe both for 64/32 bits.

Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Ciara Loftus <ciara.loftus@intel.com>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 6fab9aab78..e0089212bd 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -744,13 +744,13 @@ eth_link_update(struct rte_eth_dev *dev __rte_unused,
 }
 
 #if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG)
-static inline uint64_t get_base_addr(struct rte_mempool *mp, uint64_t *align)
+static inline uintptr_t get_base_addr(struct rte_mempool *mp, uint64_t *align)
 {
 	struct rte_mempool_memhdr *memhdr;
-	uint64_t memhdr_addr, aligned_addr;
+	uintptr_t memhdr_addr, aligned_addr;
 
 	memhdr = STAILQ_FIRST(&mp->mem_list);
-	memhdr_addr = (uint64_t)memhdr->addr;
+	memhdr_addr = (uintptr_t)memhdr->addr;
 	aligned_addr = memhdr_addr & ~(getpagesize() - 1);
 	*align = memhdr_addr - aligned_addr;
 
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:14.000012945 +0000
+++ 0024-net-af_xdp-fix-pointer-storage-size.patch	2020-11-17 11:13:12.921116609 +0000
@@ -1 +1 @@
-From 470b5c23adf2f4ec5aaece93c711048d84cd3eab Mon Sep 17 00:00:00 2001
+From 4fe71cc7c8eefecced26044eacc335519cb252de Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 470b5c23adf2f4ec5aaece93c711048d84cd3eab ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
-index 4076ff797c..2c7892bd7e 100644
+index 6fab9aab78..e0089212bd 100644
@@ -37 +38 @@
-@@ -910,13 +910,13 @@ eth_link_update(struct rte_eth_dev *dev __rte_unused,
+@@ -744,13 +744,13 @@ eth_link_update(struct rte_eth_dev *dev __rte_unused,

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/iavf: fix performance drop after port reset' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (22 preceding siblings ...)
  2020-11-17 11:13         ` [dpdk-stable] patch 'net/af_xdp: fix pointer storage size' " luca.boccassi
@ 2020-11-17 11:13         ` luca.boccassi
  2020-11-17 11:14         ` [dpdk-stable] patch 'net/hinic/base: add message check for command channel' " luca.boccassi
                           ` (16 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:13 UTC (permalink / raw)
  To: Leyi Rong; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/ba72266c10ae7e8b9bf9ecbc9fc807b1ae7e861b

Thanks.

Luca Boccassi

---
From ba72266c10ae7e8b9bf9ecbc9fc807b1ae7e861b Mon Sep 17 00:00:00 2001
From: Leyi Rong <leyi.rong@intel.com>
Date: Thu, 12 Nov 2020 13:51:54 +0800
Subject: [PATCH] net/iavf: fix performance drop after port reset

[ upstream commit 63b7be7870c1eef53808f796f815b9b34ba36325 ]

Needs to reset rxq->rxrearm_start to 0 when reset_rx_queue(),
otherwise, the random value of rxrearm_start will cause performance drop
due to L3 contested accesses.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")

Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 9672666567..ae43eb49a6 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -168,6 +168,7 @@ reset_rx_queue(struct iavf_rx_queue *rxq)
 	rxq->pkt_first_seg = NULL;
 	rxq->pkt_last_seg = NULL;
 	rxq->rxrearm_nb = 0;
+	rxq->rxrearm_start = 0;
 }
 
 static inline void
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:14.041004865 +0000
+++ 0025-net-iavf-fix-performance-drop-after-port-reset.patch	2020-11-17 11:13:12.921116609 +0000
@@ -1 +1 @@
-From 63b7be7870c1eef53808f796f815b9b34ba36325 Mon Sep 17 00:00:00 2001
+From ba72266c10ae7e8b9bf9ecbc9fc807b1ae7e861b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 63b7be7870c1eef53808f796f815b9b34ba36325 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 8f43208c80..21d508b3f4 100644
+index 9672666567..ae43eb49a6 100644
@@ -23 +24 @@
-@@ -195,6 +195,7 @@ reset_rx_queue(struct iavf_rx_queue *rxq)
+@@ -168,6 +168,7 @@ reset_rx_queue(struct iavf_rx_queue *rxq)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/hinic/base: add message check for command channel' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (23 preceding siblings ...)
  2020-11-17 11:13         ` [dpdk-stable] patch 'net/iavf: fix performance drop after port reset' " luca.boccassi
@ 2020-11-17 11:14         ` luca.boccassi
  2020-11-17 11:14         ` [dpdk-stable] patch 'net/ixgbe: remove redundant MAC flag check' " luca.boccassi
                           ` (15 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:14 UTC (permalink / raw)
  To: Guoyang Zhou; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c76a71e256f83dc23d6544efcb640fe4cb5b1c14

Thanks.

Luca Boccassi

---
From c76a71e256f83dc23d6544efcb640fe4cb5b1c14 Mon Sep 17 00:00:00 2001
From: Guoyang Zhou <zhouguoyang@huawei.com>
Date: Wed, 11 Nov 2020 14:33:37 +0800
Subject: [PATCH] net/hinic/base: add message check for command channel

[ upstream commit cb99500de915040339f294b6ad2fc8edb4085b19 ]

In the command channel, a message may has several fragments,
and the several fragments should have same message id. To
prevent problems, this check is added.

Fixes: 1e4593db1d58 ("net/hinic/base: fix log info for PF command channel")

Signed-off-by: Guoyang Zhou <zhouguoyang@huawei.com>
---
 drivers/net/hinic/base/hinic_pmd_mbox.c | 28 +++++++++++++++++--------
 drivers/net/hinic/base/hinic_pmd_mbox.h |  2 +-
 drivers/net/hinic/base/hinic_pmd_mgmt.c | 23 ++++++++++++--------
 drivers/net/hinic/base/hinic_pmd_mgmt.h |  2 +-
 4 files changed, 35 insertions(+), 20 deletions(-)

diff --git a/drivers/net/hinic/base/hinic_pmd_mbox.c b/drivers/net/hinic/base/hinic_pmd_mbox.c
index ab99cfb5ad..fb7d16dc6a 100644
--- a/drivers/net/hinic/base/hinic_pmd_mbox.c
+++ b/drivers/net/hinic/base/hinic_pmd_mbox.c
@@ -241,20 +241,22 @@ static void recv_func_mbox_handler(struct hinic_mbox_func_to_func *func_to_func,
 }
 
 static bool check_mbox_seq_id_and_seg_len(struct hinic_recv_mbox *recv_mbox,
-					  u8 seq_id, u8 seg_len)
+					  u8 seq_id, u8 seg_len, u8 msg_id)
 {
 	if (seq_id > HINIC_SEQ_ID_MAX_VAL || seg_len > HINIC_MSG_SEG_LEN)
 		return false;
 
 	if (seq_id == 0) {
-		recv_mbox->sed_id = seq_id;
+		recv_mbox->seq_id = seq_id;
+		recv_mbox->msg_info.msg_id = msg_id;
 	} else {
-		if (seq_id != recv_mbox->sed_id + 1) {
-			recv_mbox->sed_id = 0;
+		if ((seq_id != recv_mbox->seq_id + 1) ||
+			msg_id != recv_mbox->msg_info.msg_id) {
+			recv_mbox->seq_id = 0;
 			return false;
 		}
 
-		recv_mbox->sed_id = seq_id;
+		recv_mbox->seq_id = seq_id;
 	}
 
 	return true;
@@ -478,16 +480,24 @@ static int recv_mbox_handler(struct hinic_mbox_func_to_func *func_to_func,
 	u16 src_func_idx;
 	enum hinic_hwif_direction_type direction;
 	u8 seq_id, seg_len;
+	u8 msg_id;
+	u8 front_id;
 
 	seq_id = HINIC_MBOX_HEADER_GET(mbox_header, SEQID);
 	seg_len = HINIC_MBOX_HEADER_GET(mbox_header, SEG_LEN);
 	direction = HINIC_MBOX_HEADER_GET(mbox_header, DIRECTION);
 	src_func_idx = HINIC_MBOX_HEADER_GET(mbox_header, SRC_GLB_FUNC_IDX);
+	msg_id = HINIC_MBOX_HEADER_GET(mbox_header, MSG_ID);
+	front_id = recv_mbox->seq_id;
 
-	if (!check_mbox_seq_id_and_seg_len(recv_mbox, seq_id, seg_len)) {
+	if (!check_mbox_seq_id_and_seg_len(recv_mbox, seq_id, seg_len,
+		msg_id)) {
 		PMD_DRV_LOG(ERR,
-			"Mailbox sequence and segment check failed, src func id: 0x%x, front id: 0x%x, current id: 0x%x, seg len: 0x%x\n",
-			src_func_idx, recv_mbox->sed_id, seq_id, seg_len);
+			"Mailbox sequence and segment check failed, src func id: 0x%x, "
+			"front id: 0x%x, current id: 0x%x, seg len: 0x%x "
+			"front msg_id: %d, cur msg_id: %d",
+			src_func_idx, front_id, seq_id, seg_len,
+			recv_mbox->msg_info.msg_id, msg_id);
 		return HINIC_ERROR;
 	}
 
@@ -497,7 +507,7 @@ static int recv_mbox_handler(struct hinic_mbox_func_to_func *func_to_func,
 	if (!HINIC_MBOX_HEADER_GET(mbox_header, LAST))
 		return HINIC_ERROR;
 
-	recv_mbox->sed_id = 0;
+	recv_mbox->seq_id = 0;
 	recv_mbox->cmd = HINIC_MBOX_HEADER_GET(mbox_header, CMD);
 	recv_mbox->mod = HINIC_MBOX_HEADER_GET(mbox_header, MODULE);
 	recv_mbox->mbox_len = HINIC_MBOX_HEADER_GET(mbox_header, MSG_LEN);
diff --git a/drivers/net/hinic/base/hinic_pmd_mbox.h b/drivers/net/hinic/base/hinic_pmd_mbox.h
index dc08b99f47..b17f0df1db 100644
--- a/drivers/net/hinic/base/hinic_pmd_mbox.h
+++ b/drivers/net/hinic/base/hinic_pmd_mbox.h
@@ -39,7 +39,7 @@ struct hinic_recv_mbox {
 	void *buf_out;
 	enum hinic_mbox_ack_type ack_type;
 	struct mbox_msg_info msg_info;
-	u8 sed_id;
+	u8 seq_id;
 };
 
 struct hinic_send_mbox {
diff --git a/drivers/net/hinic/base/hinic_pmd_mgmt.c b/drivers/net/hinic/base/hinic_pmd_mgmt.c
index 8bff353da8..d5fd16f235 100644
--- a/drivers/net/hinic/base/hinic_pmd_mgmt.c
+++ b/drivers/net/hinic/base/hinic_pmd_mgmt.c
@@ -529,19 +529,21 @@ int hinic_msg_to_mgmt_no_ack(void *hwdev, enum hinic_mod_type mod, u8 cmd,
 }
 
 static bool check_mgmt_seq_id_and_seg_len(struct hinic_recv_msg *recv_msg,
-					  u8 seq_id, u8 seg_len)
+					  u8 seq_id, u8 seg_len, u16 msg_id)
 {
 	if (seq_id > HINIC_SEQ_ID_MAX_VAL || seg_len > HINIC_MSG_SEG_LEN)
 		return false;
 
 	if (seq_id == 0) {
-		recv_msg->sed_id = seq_id;
+		recv_msg->seq_id = seq_id;
+		recv_msg->msg_id = msg_id;
 	} else {
-		if (seq_id != recv_msg->sed_id + 1) {
-			recv_msg->sed_id = 0;
+		if ((seq_id != recv_msg->seq_id + 1) ||
+			msg_id != recv_msg->msg_id) {
+			recv_msg->seq_id = 0;
 			return false;
 		}
-		recv_msg->sed_id = seq_id;
+		recv_msg->seq_id = seq_id;
 	}
 
 	return true;
@@ -615,17 +617,20 @@ static int recv_mgmt_msg_handler(struct hinic_msg_pf_to_mgmt *pf_to_mgmt,
 	u8 seq_id, seq_len;
 	u32 msg_buf_max = MAX_PF_MGMT_BUF_SIZE;
 	u8 front_id;
+	u16 msg_id;
 
 	seq_id = HINIC_MSG_HEADER_GET(msg_header, SEQID);
 	seq_len = HINIC_MSG_HEADER_GET(msg_header, SEG_LEN);
-	front_id = recv_msg->sed_id;
+	front_id = recv_msg->seq_id;
+	msg_id = HINIC_MSG_HEADER_GET(msg_header, MSG_ID);
 
-	if (!check_mgmt_seq_id_and_seg_len(recv_msg, seq_id, seq_len)) {
+	if (!check_mgmt_seq_id_and_seg_len(recv_msg, seq_id, seq_len, msg_id)) {
 		PMD_DRV_LOG(ERR,
 			"Mgmt msg sequence and segment check fail, "
-			"func id: 0x%x, front id: 0x%x, current id: 0x%x, seg len: 0x%x",
+			"func id: 0x%x, front id: 0x%x, current id: 0x%x, seg len: 0x%x "
+			"front msg_id: %d, cur msg_id: %d",
 			hinic_global_func_id(pf_to_mgmt->hwdev),
-			front_id, seq_id, seq_len);
+			front_id, seq_id, seq_len, recv_msg->msg_id, msg_id);
 		return HINIC_ERROR;
 	}
 
diff --git a/drivers/net/hinic/base/hinic_pmd_mgmt.h b/drivers/net/hinic/base/hinic_pmd_mgmt.h
index 0f32865106..5099a3a8d6 100644
--- a/drivers/net/hinic/base/hinic_pmd_mgmt.h
+++ b/drivers/net/hinic/base/hinic_pmd_mgmt.h
@@ -69,7 +69,7 @@ struct hinic_recv_msg {
 	u8			cmd;
 	u16			msg_id;
 	int			async_mgmt_to_pf;
-	u8			sed_id;
+	u8			seq_id;
 };
 
 #define HINIC_COMM_SELF_CMD_MAX 8
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:14.079125476 +0000
+++ 0026-net-hinic-base-add-message-check-for-command-channel.patch	2020-11-17 11:13:12.925116690 +0000
@@ -1 +1 @@
-From cb99500de915040339f294b6ad2fc8edb4085b19 Mon Sep 17 00:00:00 2001
+From c76a71e256f83dc23d6544efcb640fe4cb5b1c14 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cb99500de915040339f294b6ad2fc8edb4085b19 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index ff44c25a85..92a7cc1a11 100644
+index ab99cfb5ad..fb7d16dc6a 100644
@@ -25 +26 @@
-@@ -240,20 +240,22 @@ static void recv_func_mbox_handler(struct hinic_mbox_func_to_func *func_to_func,
+@@ -241,20 +241,22 @@ static void recv_func_mbox_handler(struct hinic_mbox_func_to_func *func_to_func,
@@ -53 +54 @@
-@@ -477,16 +479,24 @@ static int recv_mbox_handler(struct hinic_mbox_func_to_func *func_to_func,
+@@ -478,16 +480,24 @@ static int recv_mbox_handler(struct hinic_mbox_func_to_func *func_to_func,
@@ -81 +82 @@
-@@ -496,7 +506,7 @@ static int recv_mbox_handler(struct hinic_mbox_func_to_func *func_to_func,
+@@ -497,7 +507,7 @@ static int recv_mbox_handler(struct hinic_mbox_func_to_func *func_to_func,
@@ -104 +105 @@
-index fb31bc8581..9b399502de 100644
+index 8bff353da8..d5fd16f235 100644
@@ -149 +150 @@
- 			"Mgmt msg sequence and segment check failed, "
+ 			"Mgmt msg sequence and segment check fail, "

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/ixgbe: remove redundant MAC flag check' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (24 preceding siblings ...)
  2020-11-17 11:14         ` [dpdk-stable] patch 'net/hinic/base: add message check for command channel' " luca.boccassi
@ 2020-11-17 11:14         ` luca.boccassi
  2020-11-17 11:14         ` [dpdk-stable] patch 'vhost: fix error path when setting memory tables' " luca.boccassi
                           ` (14 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:14 UTC (permalink / raw)
  To: Haiyue Wang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2eeeb5240669e0669dcc2f6dc437af489564e8dd

Thanks.

Luca Boccassi

---
From 2eeeb5240669e0669dcc2f6dc437af489564e8dd Mon Sep 17 00:00:00 2001
From: Haiyue Wang <haiyue.wang@intel.com>
Date: Thu, 12 Nov 2020 10:00:06 +0800
Subject: [PATCH] net/ixgbe: remove redundant MAC flag check

[ upstream commit 5db5d3b72e7cd5c6c986ef72924eb9069c842063 ]

The flag of RTE_ETHTYPE_FLAGS_MAC has been checked twice, so remove the
first error message "Not supported by ethertype filter" which is not so
specific, and keep the error message "mac compare is unsupported" which
aligns to the definition of RTE_ETHTYPE_FLAGS_MAC.

Fixes: eb3539fc8550 ("net/ixgbe: parse ethertype filter")

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ixgbe/ixgbe_flow.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index b2a2bfc02f..faf67f1dfe 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -870,15 +870,6 @@ ixgbe_parse_ethertype_filter(struct rte_eth_dev *dev,
 	if (ret)
 		return ret;
 
-	/* Ixgbe doesn't support MAC address. */
-	if (filter->flags & RTE_ETHTYPE_FLAGS_MAC) {
-		memset(filter, 0, sizeof(struct rte_eth_ethertype_filter));
-		rte_flow_error_set(error, EINVAL,
-			RTE_FLOW_ERROR_TYPE_ITEM,
-			NULL, "Not supported by ethertype filter");
-		return -rte_errno;
-	}
-
 	if (filter->queue >= dev->data->nb_rx_queues) {
 		memset(filter, 0, sizeof(struct rte_eth_ethertype_filter));
 		rte_flow_error_set(error, EINVAL,
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:14.123322061 +0000
+++ 0027-net-ixgbe-remove-redundant-MAC-flag-check.patch	2020-11-17 11:13:12.929116770 +0000
@@ -1 +1 @@
-From 5db5d3b72e7cd5c6c986ef72924eb9069c842063 Mon Sep 17 00:00:00 2001
+From 2eeeb5240669e0669dcc2f6dc437af489564e8dd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5db5d3b72e7cd5c6c986ef72924eb9069c842063 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index dff04c462c..39f6ed73f6 100644
+index b2a2bfc02f..faf67f1dfe 100644

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'vhost: fix error path when setting memory tables' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (25 preceding siblings ...)
  2020-11-17 11:14         ` [dpdk-stable] patch 'net/ixgbe: remove redundant MAC flag check' " luca.boccassi
@ 2020-11-17 11:14         ` luca.boccassi
  2020-11-17 11:14         ` [dpdk-stable] patch 'vhost: fix fd leak in dirty logging setup' " luca.boccassi
                           ` (13 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:14 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Xuan Ding, Chenbo Xia, Xueming Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/f650e9c222af91a4f639a2b2dd94a1c96700e8f4

Thanks.

Luca Boccassi

---
From f650e9c222af91a4f639a2b2dd94a1c96700e8f4 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Thu, 12 Nov 2020 18:10:27 +0100
Subject: [PATCH] vhost: fix error path when setting memory tables

[ upstream commit 726a14eb83a594011aba5e09159b47f12bc1bad0 ]

If an error is encountered before the memory regions are
parsed, the file descriptors for these shared buffers are
leaked.

This patch fixes this by closing the message file descriptors
on error, taking care of avoiding double closing of the file
descriptors. guest_pages is also freed, even though it was not
leaked as its pointer was not overridden on subsequent function
calls.

Fixes: 8f972312b8f4 ("vhost: support vhost-user")

Reported-by: Xuan Ding <xuan.ding@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Xueming Li <xuemingl@nvidia.com>
---
 lib/librte_vhost/vhost_user.c | 60 ++++++++++++++++++++++-------------
 1 file changed, 38 insertions(+), 22 deletions(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 647f0e9cde..f8366c9be2 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -97,8 +97,15 @@ close_msg_fds(struct VhostUserMsg *msg)
 {
 	int i;
 
-	for (i = 0; i < msg->fd_num; i++)
-		close(msg->fds[i]);
+	for (i = 0; i < msg->fd_num; i++) {
+		int fd = msg->fds[i];
+
+		if (fd == -1)
+			continue;
+
+		msg->fds[i] = -1;
+		close(fd);
+	}
 }
 
 /*
@@ -1032,7 +1039,6 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
 	uint64_t alignment;
 	uint32_t i;
 	int populate;
-	int fd;
 
 	if (validate_msg_fds(msg, memory->nregions) != 0)
 		return RTE_VHOST_MSG_RESULT_ERR;
@@ -1040,7 +1046,7 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
 	if (memory->nregions > VHOST_MEMORY_MAX_NREGIONS) {
 		RTE_LOG(ERR, VHOST_CONFIG,
 			"too many memory regions (%u)\n", memory->nregions);
-		return RTE_VHOST_MSG_RESULT_ERR;
+		goto close_msg_fds;
 	}
 
 	if (dev->mem && !vhost_memory_changed(memory, dev->mem)) {
@@ -1073,7 +1079,7 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
 				"(%d) failed to allocate memory "
 				"for dev->guest_pages\n",
 				dev->vid);
-			return RTE_VHOST_MSG_RESULT_ERR;
+			goto close_msg_fds;
 		}
 	}
 
@@ -1083,18 +1089,23 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
 		RTE_LOG(ERR, VHOST_CONFIG,
 			"(%d) failed to allocate memory for dev->mem\n",
 			dev->vid);
-		return RTE_VHOST_MSG_RESULT_ERR;
+		goto free_guest_pages;
 	}
 	dev->mem->nregions = memory->nregions;
 
 	for (i = 0; i < memory->nregions; i++) {
-		fd  = msg->fds[i];
 		reg = &dev->mem->regions[i];
 
 		reg->guest_phys_addr = memory->regions[i].guest_phys_addr;
 		reg->guest_user_addr = memory->regions[i].userspace_addr;
 		reg->size            = memory->regions[i].memory_size;
-		reg->fd              = fd;
+		reg->fd              = msg->fds[i];
+
+		/*
+		 * Assign invalid file descriptor value to avoid double
+		 * closing on error path.
+		 */
+		msg->fds[i] = -1;
 
 		mmap_offset = memory->regions[i].mmap_offset;
 
@@ -1104,7 +1115,7 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
 				"mmap_offset (%#"PRIx64") and memory_size "
 				"(%#"PRIx64") overflow\n",
 				mmap_offset, reg->size);
-			goto err_mmap;
+			goto free_mem_table;
 		}
 
 		mmap_size = reg->size + mmap_offset;
@@ -1117,11 +1128,11 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
 		 * to avoid failure, make sure in caller to keep length
 		 * aligned.
 		 */
-		alignment = get_blk_size(fd);
+		alignment = get_blk_size(reg->fd);
 		if (alignment == (uint64_t)-1) {
 			RTE_LOG(ERR, VHOST_CONFIG,
 				"couldn't get hugepage size through fstat\n");
-			goto err_mmap;
+			goto free_mem_table;
 		}
 		mmap_size = RTE_ALIGN_CEIL(mmap_size, alignment);
 		if (mmap_size == 0) {
@@ -1137,17 +1148,17 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
 			RTE_LOG(ERR, VHOST_CONFIG, "mmap size (0x%" PRIx64 ") "
 					"or alignment (0x%" PRIx64 ") is invalid\n",
 					reg->size + mmap_offset, alignment);
-			goto err_mmap;
+			goto free_mem_table;
 		}
 
 		populate = (dev->dequeue_zero_copy) ? MAP_POPULATE : 0;
 		mmap_addr = mmap(NULL, mmap_size, PROT_READ | PROT_WRITE,
-				 MAP_SHARED | populate, fd, 0);
+				 MAP_SHARED | populate, reg->fd, 0);
 
 		if (mmap_addr == MAP_FAILED) {
 			RTE_LOG(ERR, VHOST_CONFIG,
 				"mmap region %u failed.\n", i);
-			goto err_mmap;
+			goto free_mem_table;
 		}
 
 		reg->mmap_addr = mmap_addr;
@@ -1160,7 +1171,7 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
 				RTE_LOG(ERR, VHOST_CONFIG,
 					"adding guest pages to region %u failed.\n",
 					i);
-				goto err_mmap;
+				goto free_mem_table;
 			}
 
 		RTE_LOG(INFO, VHOST_CONFIG,
@@ -1203,17 +1214,17 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
 		if (read_vhost_message(main_fd, &ack_msg) <= 0) {
 			RTE_LOG(ERR, VHOST_CONFIG,
 				"Failed to read qemu ack on postcopy set-mem-table\n");
-			goto err_mmap;
+			goto free_mem_table;
 		}
 
 		if (validate_msg_fds(&ack_msg, 0) != 0)
-			goto err_mmap;
+			goto free_mem_table;
 
 		if (ack_msg.request.master != VHOST_USER_SET_MEM_TABLE) {
 			RTE_LOG(ERR, VHOST_CONFIG,
 				"Bad qemu ack on postcopy set-mem-table (%d)\n",
 				ack_msg.request.master);
-			goto err_mmap;
+			goto free_mem_table;
 		}
 
 		/* Now userfault register and we can use the memory */
@@ -1237,7 +1248,7 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
 					"Failed to register ufd for region %d: (ufd = %d) %s\n",
 					i, dev->postcopy_ufd,
 					strerror(errno));
-				goto err_mmap;
+				goto free_mem_table;
 			}
 			RTE_LOG(INFO, VHOST_CONFIG,
 				"\t userfaultfd registered for range : "
@@ -1246,7 +1257,7 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
 				(uint64_t)reg_struct.range.start +
 				(uint64_t)reg_struct.range.len - 1);
 #else
-			goto err_mmap;
+			goto free_mem_table;
 #endif
 		}
 	}
@@ -1265,7 +1276,7 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
 			dev = translate_ring_addresses(dev, i);
 			if (!dev) {
 				dev = *pdev;
-				goto err_mmap;
+				goto free_mem_table;
 			}
 
 			*pdev = dev;
@@ -1276,10 +1287,15 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
 
 	return RTE_VHOST_MSG_RESULT_OK;
 
-err_mmap:
+free_mem_table:
 	free_mem_region(dev);
 	rte_free(dev->mem);
 	dev->mem = NULL;
+free_guest_pages:
+	rte_free(dev->guest_pages);
+	dev->guest_pages = NULL;
+close_msg_fds:
+	close_msg_fds(msg);
 	return RTE_VHOST_MSG_RESULT_ERR;
 }
 
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:14.165782941 +0000
+++ 0028-vhost-fix-error-path-when-setting-memory-tables.patch	2020-11-17 11:13:12.933116851 +0000
@@ -1 +1 @@
-From 726a14eb83a594011aba5e09159b47f12bc1bad0 Mon Sep 17 00:00:00 2001
+From f650e9c222af91a4f639a2b2dd94a1c96700e8f4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 726a14eb83a594011aba5e09159b47f12bc1bad0 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 8a8726f8b8..3898c93d1f 100644
+index 647f0e9cde..f8366c9be2 100644
@@ -31 +32 @@
-@@ -99,8 +99,15 @@ close_msg_fds(struct VhostUserMsg *msg)
+@@ -97,8 +97,15 @@ close_msg_fds(struct VhostUserMsg *msg)
@@ -49 +50 @@
-@@ -1004,7 +1011,6 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
+@@ -1032,7 +1039,6 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
@@ -57 +58 @@
-@@ -1012,7 +1018,7 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
+@@ -1040,7 +1046,7 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
@@ -59 +60 @@
- 		VHOST_LOG_CONFIG(ERR,
+ 		RTE_LOG(ERR, VHOST_CONFIG,
@@ -66 +67 @@
-@@ -1054,7 +1060,7 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
+@@ -1073,7 +1079,7 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
@@ -75,2 +76,2 @@
-@@ -1064,18 +1070,23 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
- 		VHOST_LOG_CONFIG(ERR,
+@@ -1083,18 +1089,23 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
+ 		RTE_LOG(ERR, VHOST_CONFIG,
@@ -102 +103 @@
-@@ -1085,7 +1096,7 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
+@@ -1104,7 +1115,7 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
@@ -111 +112 @@
-@@ -1098,11 +1109,11 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
+@@ -1117,11 +1128,11 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
@@ -118 +119 @@
- 			VHOST_LOG_CONFIG(ERR,
+ 			RTE_LOG(ERR, VHOST_CONFIG,
@@ -125,2 +126,2 @@
-@@ -1118,17 +1129,17 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
- 			VHOST_LOG_CONFIG(ERR, "mmap size (0x%" PRIx64 ") "
+@@ -1137,17 +1148,17 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
+ 			RTE_LOG(ERR, VHOST_CONFIG, "mmap size (0x%" PRIx64 ") "
@@ -133 +134 @@
- 		populate = dev->async_copy ? MAP_POPULATE : 0;
+ 		populate = (dev->dequeue_zero_copy) ? MAP_POPULATE : 0;
@@ -139 +140 @@
- 			VHOST_LOG_CONFIG(ERR,
+ 			RTE_LOG(ERR, VHOST_CONFIG,
@@ -146,2 +147,2 @@
-@@ -1141,7 +1152,7 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
- 				VHOST_LOG_CONFIG(ERR,
+@@ -1160,7 +1171,7 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
+ 				RTE_LOG(ERR, VHOST_CONFIG,
@@ -154,2 +155,2 @@
- 		VHOST_LOG_CONFIG(INFO,
-@@ -1184,17 +1195,17 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
+ 		RTE_LOG(INFO, VHOST_CONFIG,
+@@ -1203,17 +1214,17 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
@@ -157 +158 @@
- 			VHOST_LOG_CONFIG(ERR,
+ 			RTE_LOG(ERR, VHOST_CONFIG,
@@ -168 +169 @@
- 			VHOST_LOG_CONFIG(ERR,
+ 			RTE_LOG(ERR, VHOST_CONFIG,
@@ -176 +177 @@
-@@ -1218,7 +1229,7 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
+@@ -1237,7 +1248,7 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
@@ -183 +184 @@
- 			VHOST_LOG_CONFIG(INFO,
+ 			RTE_LOG(INFO, VHOST_CONFIG,
@@ -185 +186 @@
-@@ -1227,7 +1238,7 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
+@@ -1246,7 +1257,7 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
@@ -194 +195 @@
-@@ -1249,7 +1260,7 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
+@@ -1265,7 +1276,7 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
@@ -203 +204 @@
-@@ -1260,10 +1271,15 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,
+@@ -1276,10 +1287,15 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'vhost: fix fd leak in dirty logging setup' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (26 preceding siblings ...)
  2020-11-17 11:14         ` [dpdk-stable] patch 'vhost: fix error path when setting memory tables' " luca.boccassi
@ 2020-11-17 11:14         ` luca.boccassi
  2020-11-17 11:14         ` [dpdk-stable] patch 'vhost: fix fd leak in kick " luca.boccassi
                           ` (12 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:14 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Xuan Ding, Chenbo Xia, Xueming Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/98e192abb017789d216e138dd6e6f09548b5e24a

Thanks.

Luca Boccassi

---
From 98e192abb017789d216e138dd6e6f09548b5e24a Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Thu, 12 Nov 2020 18:10:28 +0100
Subject: [PATCH] vhost: fix fd leak in dirty logging setup

[ upstream commit 6dc3f119ce7310e4e473e5759885ac773dbb12ef ]

This patch fixes a file descriptor leak which happens
in the error path of vhost_user_set_log_base().

Fixes: 4796ad63ba1f ("examples/vhost: import userspace vhost application")

Reported-by: Xuan Ding <xuan.ding@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Xueming Li <xuemingl@nvidia.com>
---
 lib/librte_vhost/vhost_user.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index f8366c9be2..4647ba64f0 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -2088,7 +2088,7 @@ vhost_user_set_log_base(struct virtio_net **pdev, struct VhostUserMsg *msg,
 		RTE_LOG(ERR, VHOST_CONFIG,
 			"invalid log base msg size: %"PRId32" != %d\n",
 			msg->size, (int)sizeof(VhostUserLog));
-		return RTE_VHOST_MSG_RESULT_ERR;
+		goto close_msg_fds;
 	}
 
 	size = msg->payload.log.mmap_size;
@@ -2099,7 +2099,7 @@ vhost_user_set_log_base(struct virtio_net **pdev, struct VhostUserMsg *msg,
 		RTE_LOG(ERR, VHOST_CONFIG,
 			"log offset %#"PRIx64" and log size %#"PRIx64" overflow\n",
 			off, size);
-		return RTE_VHOST_MSG_RESULT_ERR;
+		goto close_msg_fds;
 	}
 
 	RTE_LOG(INFO, VHOST_CONFIG,
@@ -2136,6 +2136,10 @@ vhost_user_set_log_base(struct virtio_net **pdev, struct VhostUserMsg *msg,
 	msg->fd_num = 0;
 
 	return RTE_VHOST_MSG_RESULT_REPLY;
+
+close_msg_fds:
+	close_msg_fds(msg);
+	return RTE_VHOST_MSG_RESULT_ERR;
 }
 
 static int vhost_user_set_log_fd(struct virtio_net **pdev __rte_unused,
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:14.210330472 +0000
+++ 0029-vhost-fix-fd-leak-in-dirty-logging-setup.patch	2020-11-17 11:13:12.937116931 +0000
@@ -1 +1 @@
-From 6dc3f119ce7310e4e473e5759885ac773dbb12ef Mon Sep 17 00:00:00 2001
+From 98e192abb017789d216e138dd6e6f09548b5e24a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6dc3f119ce7310e4e473e5759885ac773dbb12ef ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 3898c93d1f..23c115f994 100644
+index f8366c9be2..4647ba64f0 100644
@@ -24,2 +25,2 @@
-@@ -2086,7 +2086,7 @@ vhost_user_set_log_base(struct virtio_net **pdev, struct VhostUserMsg *msg,
- 		VHOST_LOG_CONFIG(ERR,
+@@ -2088,7 +2088,7 @@ vhost_user_set_log_base(struct virtio_net **pdev, struct VhostUserMsg *msg,
+ 		RTE_LOG(ERR, VHOST_CONFIG,
@@ -33,2 +34,2 @@
-@@ -2097,7 +2097,7 @@ vhost_user_set_log_base(struct virtio_net **pdev, struct VhostUserMsg *msg,
- 		VHOST_LOG_CONFIG(ERR,
+@@ -2099,7 +2099,7 @@ vhost_user_set_log_base(struct virtio_net **pdev, struct VhostUserMsg *msg,
+ 		RTE_LOG(ERR, VHOST_CONFIG,
@@ -41,2 +42,2 @@
- 	VHOST_LOG_CONFIG(INFO,
-@@ -2134,6 +2134,10 @@ vhost_user_set_log_base(struct virtio_net **pdev, struct VhostUserMsg *msg,
+ 	RTE_LOG(INFO, VHOST_CONFIG,
+@@ -2136,6 +2136,10 @@ vhost_user_set_log_base(struct virtio_net **pdev, struct VhostUserMsg *msg,

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'vhost: fix fd leak in kick setup' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (27 preceding siblings ...)
  2020-11-17 11:14         ` [dpdk-stable] patch 'vhost: fix fd leak in dirty logging setup' " luca.boccassi
@ 2020-11-17 11:14         ` luca.boccassi
  2020-11-17 11:14         ` [dpdk-stable] patch 'app/testpmd: fix MTU after device configure' " luca.boccassi
                           ` (11 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:14 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Chenbo Xia, Xueming Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/4089c1d4be34ed396c4c99eac15d2d1bb8b465d4

Thanks.

Luca Boccassi

---
From 4089c1d4be34ed396c4c99eac15d2d1bb8b465d4 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Thu, 12 Nov 2020 18:10:29 +0100
Subject: [PATCH] vhost: fix fd leak in kick setup

[ upstream commit bc900f86aa943006b9f97f3297aeed5ef3caaf5e ]

This patch fixes a file descriptor leak which happens
in the error path of vhost_user_set_vring_kick().

Fixes: 4796ad63ba1f ("examples/vhost: import userspace vhost application")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Xueming Li <xuemingl@nvidia.com>
---
 lib/librte_vhost/vhost_user.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 4647ba64f0..dc1e312d84 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1844,8 +1844,12 @@ vhost_user_set_vring_kick(struct virtio_net **pdev, struct VhostUserMsg *msg,
 
 	/* Interpret ring addresses only when ring is started. */
 	dev = translate_ring_addresses(dev, file.index);
-	if (!dev)
+	if (!dev) {
+		if (file.fd != VIRTIO_INVALID_EVENTFD)
+			close(file.fd);
+
 		return RTE_VHOST_MSG_RESULT_ERR;
+	}
 
 	*pdev = dev;
 
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:14.251629916 +0000
+++ 0030-vhost-fix-fd-leak-in-kick-setup.patch	2020-11-17 11:13:12.937116931 +0000
@@ -1 +1 @@
-From bc900f86aa943006b9f97f3297aeed5ef3caaf5e Mon Sep 17 00:00:00 2001
+From 4089c1d4be34ed396c4c99eac15d2d1bb8b465d4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bc900f86aa943006b9f97f3297aeed5ef3caaf5e ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 23c115f994..45c8ac09da 100644
+index 4647ba64f0..dc1e312d84 100644
@@ -23 +24 @@
-@@ -1858,8 +1858,12 @@ vhost_user_set_vring_kick(struct virtio_net **pdev, struct VhostUserMsg *msg,
+@@ -1844,8 +1844,12 @@ vhost_user_set_vring_kick(struct virtio_net **pdev, struct VhostUserMsg *msg,

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'app/testpmd: fix MTU after device configure' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (28 preceding siblings ...)
  2020-11-17 11:14         ` [dpdk-stable] patch 'vhost: fix fd leak in kick " luca.boccassi
@ 2020-11-17 11:14         ` luca.boccassi
  2020-11-17 11:14         ` [dpdk-stable] patch 'net/bnxt: fix doorbell barrier location' " luca.boccassi
                           ` (10 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:14 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Qi Zhang, Andrew Rybchenko, Igor Romanov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3c70f73579e1da8b53853f2c8379eaeb997ae40e

Thanks.

Luca Boccassi

---
From 3c70f73579e1da8b53853f2c8379eaeb997ae40e Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Fri, 13 Nov 2020 11:44:00 +0000
Subject: [PATCH] app/testpmd: fix MTU after device configure

[ upstream commit 1c21ee95cf5298fe7b6a8b7d8a997ff3c402a08f ]

In 'rte_eth_dev_configure()', if 'DEV_RX_OFFLOAD_JUMBO_FRAME' is not set
the max frame size is limited to 'RTE_ETHER_MAX_LEN' (1518).
This is mistake because for the PMDs that has frame size bigger than
"RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN" (18 bytes), the MTU becomes
less than 1500, causing a valid frame with 1500 bytes payload to be
dropped.

Since 'rte_eth_dev_set_mtu()' works as expected, it is called after
'rte_eth_dev_configure()' to fix the MTU.
It may look redundant to set MTU after 'rte_eth_dev_configure()', both
with default values, but it is not, the resulting MTU config can be
different in the device based on frame overhead of the PMD.

And instead of setting the MTU to default value, it is first get via
'rte_eth_dev_get_mtu()' and set again, this is to cover cases MTU
changed from testpmd command line.

'rte_eth_dev_set_mtu()', '-ENOTSUP' error is ignored to prevent
irrelevant warning messages for the virtual PMDs.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Tested-by: Igor Romanov <igor.romanov@oktetlabs.ru>
---
 app/test-pmd/testpmd.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 8d3b7b2a3b..7b08bd2f59 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2334,6 +2334,8 @@ start_port(portid_t pid)
 		}
 
 		if (port->need_reconfig > 0) {
+			uint16_t mtu = RTE_ETHER_MTU;
+
 			port->need_reconfig = 0;
 
 			if (flow_isolate_all) {
@@ -2367,6 +2369,23 @@ start_port(portid_t pid)
 				port->need_reconfig = 1;
 				return -1;
 			}
+
+			/*
+			 * Workaround for rte_eth_dev_configure(), max_rx_pkt_len
+			 * set MTU wrong for the PMDs that have frame overhead
+			 * bigger than RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN.
+			 * For a PMD that has 26 bytes overhead, rte_eth_dev_configure()
+			 * can set MTU to max 1492, not to expected 1500 bytes.
+			 * Using rte_eth_dev_set_mtu() to be able to set MTU correctly,
+			 * default MTU value is 1500.
+			 */
+			diag = rte_eth_dev_get_mtu(pi, &mtu);
+			if (diag)
+				printf("Failed to get MTU for port %d\n", pi);
+			diag = rte_eth_dev_set_mtu(pi, mtu);
+			if (diag != 0 && diag != -ENOTSUP)
+				printf("Failed to set MTU to %u for port %d\n",
+						mtu, pi);
 		}
 		if (port->need_reconfig_queues > 0) {
 			port->need_reconfig_queues = 0;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:14.293311684 +0000
+++ 0031-app-testpmd-fix-MTU-after-device-configure.patch	2020-11-17 11:13:12.941117012 +0000
@@ -1 +1 @@
-From 1c21ee95cf5298fe7b6a8b7d8a997ff3c402a08f Mon Sep 17 00:00:00 2001
+From 3c70f73579e1da8b53853f2c8379eaeb997ae40e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1c21ee95cf5298fe7b6a8b7d8a997ff3c402a08f ]
+
@@ -27 +28,0 @@
-Cc: stable@dpdk.org
@@ -38 +39 @@
-index 33fc0fddf5..48e9647fc7 100644
+index 8d3b7b2a3b..7b08bd2f59 100644
@@ -41 +42 @@
-@@ -2537,6 +2537,8 @@ start_port(portid_t pid)
+@@ -2334,6 +2334,8 @@ start_port(portid_t pid)
@@ -50 +51 @@
-@@ -2570,6 +2572,23 @@ start_port(portid_t pid)
+@@ -2367,6 +2369,23 @@ start_port(portid_t pid)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/bnxt: fix doorbell barrier location' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (29 preceding siblings ...)
  2020-11-17 11:14         ` [dpdk-stable] patch 'app/testpmd: fix MTU after device configure' " luca.boccassi
@ 2020-11-17 11:14         ` luca.boccassi
  2020-11-17 11:14         ` [dpdk-stable] patch 'net/mlx5: validate MPLSoGRE with GRE key' " luca.boccassi
                           ` (9 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:14 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/facbbcff2416df315c05f082a861d233aa457f83

Thanks.

Luca Boccassi

---
From facbbcff2416df315c05f082a861d233aa457f83 Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Fri, 13 Nov 2020 11:04:45 -0500
Subject: [PATCH] net/bnxt: fix doorbell barrier location

[ upstream commit d1816ceae5a8e483ae3764e800571b57e1dfa960 ]

Simplify some doorbell functions now that rte_cio_wmb() has been
eliminated and rte_io_wmb() is equivalent for Arm.

Fix a performance degradation on x86 platforms caused by a
previous Arm performance fix by moving the compiler barrier
closer to the I/O write.

Fixes: f0f5d844d138 ("eal: remove deprecated coherent IO memory barriers")
Fixes: bfc1d45875e2 ("net/bnxt: fix performance for Arm")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ring.h | 37 +++++++++++++++++++-----------------
 1 file changed, 20 insertions(+), 17 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ring.h b/drivers/net/bnxt/bnxt_ring.h
index f8442edb66..0a4685d167 100644
--- a/drivers/net/bnxt/bnxt_ring.h
+++ b/drivers/net/bnxt/bnxt_ring.h
@@ -82,12 +82,10 @@ void bnxt_free_rxtx_nq_ring(struct bnxt *bp);
 
 static inline void bnxt_db_write(struct bnxt_db_info *db, uint32_t idx)
 {
-	rte_cio_wmb();
-
 	if (db->db_64)
-		rte_write64_relaxed(db->db_key64 | idx, db->doorbell);
+		rte_write64(db->db_key64 | idx, db->doorbell);
 	else
-		rte_write32_relaxed(db->db_key32 | idx, db->doorbell);
+		rte_write32(db->db_key32 | idx, db->doorbell);
 }
 
 /* Ring an NQ doorbell and disable interrupts for the ring. */
@@ -96,10 +94,9 @@ static inline void bnxt_db_nq(struct bnxt_cp_ring_info *cpr)
 	if (unlikely(!cpr->cp_db.db_64))
 		return;
 
-	rte_cio_wmb();
-	rte_write64_relaxed(cpr->cp_db.db_key64 | DBR_TYPE_NQ |
-			    RING_CMP(cpr->cp_ring_struct, cpr->cp_raw_cons),
-			    cpr->cp_db.doorbell);
+	rte_write64(cpr->cp_db.db_key64 | DBR_TYPE_NQ |
+		    RING_CMP(cpr->cp_ring_struct, cpr->cp_raw_cons),
+		    cpr->cp_db.doorbell);
 }
 
 /* Ring an NQ doorbell and enable interrupts for the ring. */
@@ -108,10 +105,9 @@ static inline void bnxt_db_nq_arm(struct bnxt_cp_ring_info *cpr)
 	if (unlikely(!cpr->cp_db.db_64))
 		return;
 
-	rte_cio_wmb();
-	rte_write64_relaxed(cpr->cp_db.db_key64 | DBR_TYPE_NQ_ARM |
-			    RING_CMP(cpr->cp_ring_struct, cpr->cp_raw_cons),
-			    cpr->cp_db.doorbell);
+	rte_write64(cpr->cp_db.db_key64 | DBR_TYPE_NQ_ARM |
+		    RING_CMP(cpr->cp_ring_struct, cpr->cp_raw_cons),
+		    cpr->cp_db.doorbell);
 }
 
 static inline void bnxt_db_cq(struct bnxt_cp_ring_info *cpr)
@@ -119,11 +115,18 @@ static inline void bnxt_db_cq(struct bnxt_cp_ring_info *cpr)
 	struct bnxt_db_info *db = &cpr->cp_db;
 	uint32_t idx = RING_CMP(cpr->cp_ring_struct, cpr->cp_raw_cons);
 
-	rte_compiler_barrier();
-	if (db->db_64)
-		rte_write64_relaxed(db->db_key64 | idx, db->doorbell);
-	else
-		B_CP_DIS_DB(cpr, cpr->cp_raw_cons);
+	if (db->db_64) {
+		uint64_t key_idx = db->db_key64 | idx;
+		void *doorbell = db->doorbell;
+
+		rte_compiler_barrier();
+		rte_write64_relaxed(key_idx, doorbell);
+	} else {
+		uint32_t cp_raw_cons = cpr->cp_raw_cons;
+
+		rte_compiler_barrier();
+		B_CP_DIS_DB(cpr, cp_raw_cons);
+	}
 }
 
 #endif
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:14.339609646 +0000
+++ 0032-net-bnxt-fix-doorbell-barrier-location.patch	2020-11-17 11:13:12.941117012 +0000
@@ -1 +1 @@
-From d1816ceae5a8e483ae3764e800571b57e1dfa960 Mon Sep 17 00:00:00 2001
+From facbbcff2416df315c05f082a861d233aa457f83 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d1816ceae5a8e483ae3764e800571b57e1dfa960 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 3d81f610c1..0a4685d167 100644
+index f8442edb66..0a4685d167 100644
@@ -31 +32 @@
--	rte_io_wmb();
+-	rte_cio_wmb();
@@ -46 +47 @@
--	rte_io_wmb();
+-	rte_cio_wmb();
@@ -60 +61 @@
--	rte_io_wmb();
+-	rte_cio_wmb();

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/mlx5: validate MPLSoGRE with GRE key' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (30 preceding siblings ...)
  2020-11-17 11:14         ` [dpdk-stable] patch 'net/bnxt: fix doorbell barrier location' " luca.boccassi
@ 2020-11-17 11:14         ` luca.boccassi
  2020-11-17 11:14         ` [dpdk-stable] patch 'doc: fix typo in ipsec-secgw guide' " luca.boccassi
                           ` (8 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:14 UTC (permalink / raw)
  To: Xiaoyu Min; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d40489b5b9eb5b6e777a38b47ed5e8f55b19a1c3

Thanks.

Luca Boccassi

---
From d40489b5b9eb5b6e777a38b47ed5e8f55b19a1c3 Mon Sep 17 00:00:00 2001
From: Xiaoyu Min <jackmin@nvidia.com>
Date: Tue, 10 Nov 2020 19:59:53 +0800
Subject: [PATCH] net/mlx5: validate MPLSoGRE with GRE key

[ upstream commit 6f921f61d481cc83df12e698c37dff8b5d1809da ]

Currently PMD only accept flow which item_mpls directly follow item_gre,
means to match the GRE header without GRE optional field key in MPLSoGRE
encapsulation.

However, for the MPLSoGRE, the GRE header could have the optional field
(i.e, key) according to the RFC. So PMD need to accept this.

Add MLX5_FLOW_LAYER_GRE_KEY into allowed prev_layer to fix

Fixes: a7a0365565a4 ("net/mlx5: match GRE key and present bits")

Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 3868b1cf55..b05dbaf9a1 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2209,7 +2209,8 @@ mlx5_flow_validate_item_mpls(struct rte_eth_dev *dev __rte_unused,
 	/* MPLS over IP, UDP, GRE is allowed */
 	if (!(prev_layer & (MLX5_FLOW_LAYER_OUTER_L3 |
 			    MLX5_FLOW_LAYER_OUTER_L4_UDP |
-			    MLX5_FLOW_LAYER_GRE)))
+			    MLX5_FLOW_LAYER_GRE |
+			    MLX5_FLOW_LAYER_GRE_KEY)))
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ITEM, item,
 					  "protocol filtering not compatible"
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:14.378446717 +0000
+++ 0033-net-mlx5-validate-MPLSoGRE-with-GRE-key.patch	2020-11-17 11:13:12.949117172 +0000
@@ -1 +1 @@
-From 6f921f61d481cc83df12e698c37dff8b5d1809da Mon Sep 17 00:00:00 2001
+From d40489b5b9eb5b6e777a38b47ed5e8f55b19a1c3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6f921f61d481cc83df12e698c37dff8b5d1809da ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 0ee34001a0..53a8a75cc0 100644
+index 3868b1cf55..b05dbaf9a1 100644
@@ -28 +29 @@
-@@ -2746,7 +2746,8 @@ mlx5_flow_validate_item_mpls(struct rte_eth_dev *dev __rte_unused,
+@@ -2209,7 +2209,8 @@ mlx5_flow_validate_item_mpls(struct rte_eth_dev *dev __rte_unused,

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'doc: fix typo in ipsec-secgw guide' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (31 preceding siblings ...)
  2020-11-17 11:14         ` [dpdk-stable] patch 'net/mlx5: validate MPLSoGRE with GRE key' " luca.boccassi
@ 2020-11-17 11:14         ` luca.boccassi
  2020-11-17 11:14         ` [dpdk-stable] patch 'app/eventdev: check timer adadpters number' " luca.boccassi
                           ` (7 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:14 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/14834a34529ea0b36547aa76438965bd1ee8c229

Thanks.

Luca Boccassi

---
From 14834a34529ea0b36547aa76438965bd1ee8c229 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 5 Nov 2020 09:36:17 +0100
Subject: [PATCH] doc: fix typo in ipsec-secgw guide

[ upstream commit 376ba686ad99acf536263999f7cb67d9a9134346 ]

Fixes: 02dc5b7d58c7 ("doc: update ipsec-secgw guide and release notes")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 doc/guides/sample_app_ug/ipsec_secgw.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/guides/sample_app_ug/ipsec_secgw.rst b/doc/guides/sample_app_ug/ipsec_secgw.rst
index d6d8d44686..eb1a57a98f 100644
--- a/doc/guides/sample_app_ug/ipsec_secgw.rst
+++ b/doc/guides/sample_app_ug/ipsec_secgw.rst
@@ -92,7 +92,7 @@ The application has a number of command line options::
 
    ./build/ipsec-secgw [EAL options] --
                         -p PORTMASK -P -u PORTMASK -j FRAMESIZE
-                        -l -w REPLAY_WINOW_SIZE -e -a
+                        -l -w REPLAY_WINDOW_SIZE -e -a
                         --config (port,queue,lcore)[,(port,queue,lcore]
                         --single-sa SAIDX
                         --rxoffload MASK
@@ -122,7 +122,7 @@ Where:
 
 *   ``-l``: enables code-path that uses librte_ipsec.
 
-*   ``-w REPLAY_WINOW_SIZE``: specifies the IPsec sequence number replay window
+*   ``-w REPLAY_WINDOW_SIZE``: specifies the IPsec sequence number replay window
     size for each Security Association (available only with librte_ipsec
     code path).
 
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:14.427169134 +0000
+++ 0034-doc-fix-typo-in-ipsec-secgw-guide.patch	2020-11-17 11:13:12.949117172 +0000
@@ -1 +1 @@
-From 376ba686ad99acf536263999f7cb67d9a9134346 Mon Sep 17 00:00:00 2001
+From 14834a34529ea0b36547aa76438965bd1ee8c229 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 376ba686ad99acf536263999f7cb67d9a9134346 ]
+
@@ -7 +8,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
-index 1f37dccf8b..fccf6b423c 100644
+index d6d8d44686..eb1a57a98f 100644
@@ -18 +19 @@
-@@ -125,7 +125,7 @@ The application has a number of command line options::
+@@ -92,7 +92,7 @@ The application has a number of command line options::
@@ -20 +21 @@
-    ./<build_dir>/examples/dpdk-ipsec-secgw [EAL options] --
+    ./build/ipsec-secgw [EAL options] --
@@ -24,4 +25,4 @@
-                         -c SAD_CACHE_SIZE
-                         -s NUMBER_OF_MBUFS_IN_PACKET_POOL
-                         -f CONFIG_FILE_PATH
-@@ -161,7 +161,7 @@ Where:
+                         --config (port,queue,lcore)[,(port,queue,lcore]
+                         --single-sa SAIDX
+                         --rxoffload MASK
+@@ -122,7 +122,7 @@ Where:

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'app/eventdev: check timer adadpters number' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (32 preceding siblings ...)
  2020-11-17 11:14         ` [dpdk-stable] patch 'doc: fix typo in ipsec-secgw guide' " luca.boccassi
@ 2020-11-17 11:14         ` luca.boccassi
  2020-11-17 11:14         ` [dpdk-stable] patch 'examples/fips_validation: fix build with pkg-config' " luca.boccassi
                           ` (6 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:14 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/82091c3e07e67ea0e7db4983c5a1cc4a2c41107a

Thanks.

Luca Boccassi

---
From 82091c3e07e67ea0e7db4983c5a1cc4a2c41107a Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Thu, 12 Nov 2020 23:13:29 +0530
Subject: [PATCH] app/eventdev: check timer adadpters number

[ upstream commit 15c19f36f59ed56b87ab4eb192a859bf273dbccc ]

Fix SEGFAULT when nb_timer_adapters command line parameter is
set to 0.

Fixes: 98c6292105d4 ("app/eventdev: add options for event timer adapter")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 app/test-eventdev/evt_options.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/app/test-eventdev/evt_options.c b/app/test-eventdev/evt_options.c
index c60b61a904..4f4800d99d 100644
--- a/app/test-eventdev/evt_options.c
+++ b/app/test-eventdev/evt_options.c
@@ -197,6 +197,10 @@ evt_parse_nb_timer_adptrs(struct evt_options *opt, const char *arg)
 	int ret;
 
 	ret = parser_read_uint8(&(opt->nb_timer_adptrs), arg);
+	if (opt->nb_timer_adptrs <= 0) {
+		evt_err("Number of timer adapters cannot be <= 0");
+		return -EINVAL;
+	}
 
 	return ret;
 }
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:14.466432833 +0000
+++ 0035-app-eventdev-check-timer-adadpters-number.patch	2020-11-17 11:13:12.953117254 +0000
@@ -1 +1 @@
-From 15c19f36f59ed56b87ab4eb192a859bf273dbccc Mon Sep 17 00:00:00 2001
+From 82091c3e07e67ea0e7db4983c5a1cc4a2c41107a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 15c19f36f59ed56b87ab4eb192a859bf273dbccc ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 6994ac453c..0d04ea9f8d 100644
+index c60b61a904..4f4800d99d 100644

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'examples/fips_validation: fix build with pkg-config' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (33 preceding siblings ...)
  2020-11-17 11:14         ` [dpdk-stable] patch 'app/eventdev: check timer adadpters number' " luca.boccassi
@ 2020-11-17 11:14         ` luca.boccassi
  2020-11-17 11:14         ` [dpdk-stable] patch 'examples/kni: " luca.boccassi
                           ` (5 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:14 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/94c343710dab3f4961797f0250765771f7571bd5

Thanks.

Luca Boccassi

---
From 94c343710dab3f4961797f0250765771f7571bd5 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Sat, 14 Nov 2020 10:05:23 +0100
Subject: [PATCH] examples/fips_validation: fix build with pkg-config

[ upstream commit 0525677c81f2b8116d48929bf218258d55e09313 ]

When this example started using rte_cryptodev_sym_session_pool_create,
the part for pkg-config builds was not updated.

Fixes: 261bbff75e34 ("examples: use separate crypto session mempools")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/fips_validation/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/examples/fips_validation/Makefile b/examples/fips_validation/Makefile
index 8aac600d56..5bcf1872c4 100644
--- a/examples/fips_validation/Makefile
+++ b/examples/fips_validation/Makefile
@@ -33,6 +33,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:14.504452366 +0000
+++ 0036-examples-fips_validation-fix-build-with-pkg-config.patch	2020-11-17 11:13:12.953117254 +0000
@@ -1 +1 @@
-From 0525677c81f2b8116d48929bf218258d55e09313 Mon Sep 17 00:00:00 2001
+From 94c343710dab3f4961797f0250765771f7571bd5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0525677c81f2b8116d48929bf218258d55e09313 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 7ba9bcfea6..8f82a4c6c5 100644
+index 8aac600d56..5bcf1872c4 100644
@@ -22 +23 @@
-@@ -36,6 +36,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
+@@ -33,6 +33,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'examples/kni: fix build with pkg-config' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (34 preceding siblings ...)
  2020-11-17 11:14         ` [dpdk-stable] patch 'examples/fips_validation: fix build with pkg-config' " luca.boccassi
@ 2020-11-17 11:14         ` luca.boccassi
  2020-11-17 11:14         ` [dpdk-stable] patch 'examples/l2fwd-crypto: " luca.boccassi
                           ` (4 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:14 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8a08b390f358454f343774222e34d38350030699

Thanks.

Luca Boccassi

---
From 8a08b390f358454f343774222e34d38350030699 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Sat, 14 Nov 2020 10:05:25 +0100
Subject: [PATCH] examples/kni: fix build with pkg-config

[ upstream commit 58a0648bd33c3cb7ff6e746c639e0613fda4b9b0 ]

rm -f build/kni build/kni-static build/kni-shared
test -d build && rmdir -p build || true
[...]
/usr/bin/ld: /tmp/cc72ssnK.o: undefined reference to symbol
'pthread_join@@GLIBC_2.2.5'

This example explicitly call pthread API and should be linked against
the pthread library.

Fixes: 724beb913b44 ("examples/kni: monitor and update link state continually")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/kni/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/examples/kni/Makefile b/examples/kni/Makefile
index 8fcb67c619..10b42891da 100644
--- a/examples/kni/Makefile
+++ b/examples/kni/Makefile
@@ -25,6 +25,8 @@ CFLAGS += -DALLOW_EXPERIMENTAL_API
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+LDFLAGS += -pthread
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:14.542381978 +0000
+++ 0037-examples-kni-fix-build-with-pkg-config.patch	2020-11-17 11:13:12.953117254 +0000
@@ -1 +1 @@
-From 58a0648bd33c3cb7ff6e746c639e0613fda4b9b0 Mon Sep 17 00:00:00 2001
+From 8a08b390f358454f343774222e34d38350030699 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 58a0648bd33c3cb7ff6e746c639e0613fda4b9b0 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index fa9fa85319..bbf3bcae12 100644
+index 8fcb67c619..10b42891da 100644
@@ -28 +29 @@
-@@ -27,6 +27,8 @@ CFLAGS += -DALLOW_EXPERIMENTAL_API
+@@ -25,6 +25,8 @@ CFLAGS += -DALLOW_EXPERIMENTAL_API

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'examples/l2fwd-crypto: fix build with pkg-config' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (35 preceding siblings ...)
  2020-11-17 11:14         ` [dpdk-stable] patch 'examples/kni: " luca.boccassi
@ 2020-11-17 11:14         ` luca.boccassi
  2020-11-17 11:14         ` [dpdk-stable] patch 'examples/ntb: fix clean target' " luca.boccassi
                           ` (3 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:14 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/763e52f711e57a227f90f4c9ff15ff5a149fbdcf

Thanks.

Luca Boccassi

---
From 763e52f711e57a227f90f4c9ff15ff5a149fbdcf Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Sat, 14 Nov 2020 10:05:26 +0100
Subject: [PATCH] examples/l2fwd-crypto: fix build with pkg-config

[ upstream commit bcd3004381b09adaa1ab7ceb9c0592e640fb210c ]

Two issues fixed here.

First add the experimental flag.
Then fix a link issue with the crypto scheduler driver:
/usr/bin/ld: /tmp/cchr7aHA.o: in function `main':
main.c:(.text.startup+0x1673): undefined reference to
`rte_cryptodev_scheduler_workers_get'
collect2: error: ld returned 1 exit status

Fixes: e3bcb99a5e13 ("examples/l2fwd-crypto: limit number of sessions")
Fixes: 261bbff75e34 ("examples: use separate crypto session mempools")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 examples/l2fwd-crypto/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/examples/l2fwd-crypto/Makefile b/examples/l2fwd-crypto/Makefile
index cdbb91a1e6..cafe778fc6 100644
--- a/examples/l2fwd-crypto/Makefile
+++ b/examples/l2fwd-crypto/Makefile
@@ -24,6 +24,12 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+CONFIG_DEFINES = $(shell $(CC) $(CFLAGS) -dM -E - < /dev/null)
+ifneq ($(findstring RTE_CRYPTO_SCHEDULER,$(CONFIG_DEFINES)),)
+LDFLAGS_SHARED += -lrte_crypto_scheduler
+endif
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:14.579518452 +0000
+++ 0038-examples-l2fwd-crypto-fix-build-with-pkg-config.patch	2020-11-17 11:13:12.953117254 +0000
@@ -1 +1 @@
-From bcd3004381b09adaa1ab7ceb9c0592e640fb210c Mon Sep 17 00:00:00 2001
+From 763e52f711e57a227f90f4c9ff15ff5a149fbdcf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bcd3004381b09adaa1ab7ceb9c0592e640fb210c ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 4953ee2b95..7731eccd03 100644
+index cdbb91a1e6..cafe778fc6 100644
@@ -28 +29 @@
-@@ -26,6 +26,12 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
+@@ -24,6 +24,12 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'examples/ntb: fix clean target' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (36 preceding siblings ...)
  2020-11-17 11:14         ` [dpdk-stable] patch 'examples/l2fwd-crypto: " luca.boccassi
@ 2020-11-17 11:14         ` luca.boccassi
  2020-11-17 11:14         ` [dpdk-stable] patch 'examples/performance-thread: fix build with pkg-config' " luca.boccassi
                           ` (2 subsequent siblings)
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:14 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, Xiaoyun Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9ea2f2c7593fc25a160a81ec7a850424d2009b9c

Thanks.

Luca Boccassi

---
From 9ea2f2c7593fc25a160a81ec7a850424d2009b9c Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Sat, 14 Nov 2020 10:05:29 +0100
Subject: [PATCH] examples/ntb: fix clean target

[ upstream commit 9bb2997cb7a9e9fa286c13fabe392e544b95158b ]

When introducing this example, the cleanup from commit 7e9562a107f1
("examples: fix make clean when using pkg-config") was missed.

Fixes: c5eebf85badc ("examples/ntb: add example for NTB")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 examples/ntb/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/ntb/Makefile b/examples/ntb/Makefile
index e36a4f9bfa..f41ccfac27 100644
--- a/examples/ntb/Makefile
+++ b/examples/ntb/Makefile
@@ -40,7 +40,7 @@ build:
 .PHONY: clean
 clean:
 	rm -f build/$(APP) build/$(APP)-static build/$(APP)-shared
-	rmdir --ignore-fail-on-non-empty build
+	test -d build && rmdir -p build || true
 
 else # Build using legacy build system
 
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:14.615008865 +0000
+++ 0039-examples-ntb-fix-clean-target.patch	2020-11-17 11:13:12.953117254 +0000
@@ -1 +1 @@
-From 9bb2997cb7a9e9fa286c13fabe392e544b95158b Mon Sep 17 00:00:00 2001
+From 9ea2f2c7593fc25a160a81ec7a850424d2009b9c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9bb2997cb7a9e9fa286c13fabe392e544b95158b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 4675570fd2..d35dabc471 100644
+index e36a4f9bfa..f41ccfac27 100644
@@ -23 +24 @@
-@@ -42,4 +42,4 @@ build:
+@@ -40,7 +40,7 @@ build:
@@ -28,0 +30,3 @@
+ 
+ else # Build using legacy build system
+ 

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'examples/performance-thread: fix build with pkg-config' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (37 preceding siblings ...)
  2020-11-17 11:14         ` [dpdk-stable] patch 'examples/ntb: fix clean target' " luca.boccassi
@ 2020-11-17 11:14         ` luca.boccassi
  2020-11-17 11:14         ` [dpdk-stable] patch 'examples/vhost_blk: " luca.boccassi
  2020-11-17 11:14         ` [dpdk-stable] patch 'examples/rxtx_callbacks: " luca.boccassi
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:14 UTC (permalink / raw)
  To: David Marchand; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/03dd4aa40129b095a267068f3dbff77d24a06cb9

Thanks.

Luca Boccassi

---
From 03dd4aa40129b095a267068f3dbff77d24a06cb9 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Sat, 14 Nov 2020 10:05:30 +0100
Subject: [PATCH] examples/performance-thread: fix build with pkg-config
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit e0216ac509558b2b95d34f5b4df604e0e4d0bf1e ]

main.c: In function ‘lthread_tx’:
main.c:2091:25: error: implicit declaration of function ‘sched_getcpu’;
 did you mean ‘sched_getparam’? [-Werror=implicit-function-declaration]
 2091 |  tx_conf->conf.cpu_id = sched_getcpu();
      |                         ^~~~~~~~~~~~
      |                         sched_getparam
cc1: all warnings being treated as errors

Explicitly pass _GNU_SOURCE and include missing header (rather than
rely on automagic inclusion from other system headers).

Fixes: d48415e1fee3 ("examples/performance-thread: add l3fwd-thread app")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 examples/performance-thread/l3fwd-thread/main.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
index c527bb0c79..96fbdcdde2 100644
--- a/examples/performance-thread/l3fwd-thread/main.c
+++ b/examples/performance-thread/l3fwd-thread/main.c
@@ -2,6 +2,10 @@
  * Copyright(c) 2010-2016 Intel Corporation
  */
 
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdint.h>
@@ -12,6 +16,7 @@
 #include <stdarg.h>
 #include <errno.h>
 #include <getopt.h>
+#include <sched.h>
 
 #include <rte_common.h>
 #include <rte_vect.h>
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:14.650133262 +0000
+++ 0040-examples-performance-thread-fix-build-with-pkg-confi.patch	2020-11-17 11:13:12.957117334 +0000
@@ -1 +1 @@
-From e0216ac509558b2b95d34f5b4df604e0e4d0bf1e Mon Sep 17 00:00:00 2001
+From 03dd4aa40129b095a267068f3dbff77d24a06cb9 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit e0216ac509558b2b95d34f5b4df604e0e4d0bf1e ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 7bf61db6be..4d82fb82ef 100644
+index c527bb0c79..96fbdcdde2 100644

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'examples/vhost_blk: fix build with pkg-config' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (38 preceding siblings ...)
  2020-11-17 11:14         ` [dpdk-stable] patch 'examples/performance-thread: fix build with pkg-config' " luca.boccassi
@ 2020-11-17 11:14         ` luca.boccassi
  2020-11-17 11:14         ` [dpdk-stable] patch 'examples/rxtx_callbacks: " luca.boccassi
  40 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:14 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/882655e21ef763cff199b8b411081dee999779fe

Thanks.

Luca Boccassi

---
From 882655e21ef763cff199b8b411081dee999779fe Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Sat, 14 Nov 2020 10:05:31 +0100
Subject: [PATCH] examples/vhost_blk: fix build with pkg-config
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 9c3586a6436d4df4bc12ad01d1c5130d24b09bd6 ]

vhost_blk.c: In function ‘ctrlr_worker’:
vhost_blk.c:543:2: warning: implicit declaration of function ‘CPU_ZERO’
[-Wimplicit-function-declaration]
  543 |  CPU_ZERO(&cpuset);
      |  ^~~~~~~~
vhost_blk.c:544:2: warning: implicit declaration of function ‘CPU_SET’
[-Wimplicit-function-declaration]
  544 |  CPU_SET(0, &cpuset);
      |  ^~~~~~~
vhost_blk.c:545:2: warning: implicit declaration of function
‘pthread_setaffinity_np’ [-Wimplicit-function-declaration]
  545 |  pthread_setaffinity_np(thread, sizeof(cpu_set_t), &cpuset);
      |  ^~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld: /tmp/cczpiMWH.o: in function `ctrlr_worker':
vhost_blk.c:(.text+0x1076): undefined reference to `CPU_ZERO'
/usr/bin/ld: vhost_blk.c:(.text+0x1082): undefined reference to
`CPU_SET'
collect2: error: ld returned 1 exit status
gmake: *** [Makefile:34: build/vhost-blk-shared] Error 1

Explicitly pass _GNU_SOURCE and include missing headers (rather than
rely on automagic inclusion from other system headers).

Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/vhost_blk/vhost_blk.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c
index 32c88628c4..d0c30a9c6f 100644
--- a/examples/vhost_blk/vhost_blk.c
+++ b/examples/vhost_blk/vhost_blk.c
@@ -2,6 +2,12 @@
  * Copyright(c) 2010-2019 Intel Corporation
  */
 
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#include <pthread.h>
+#include <sched.h>
+
 #include <stdint.h>
 #include <unistd.h>
 #include <stdbool.h>
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:14.689168393 +0000
+++ 0041-examples-vhost_blk-fix-build-with-pkg-config.patch	2020-11-17 11:13:12.961117415 +0000
@@ -1 +1 @@
-From 9c3586a6436d4df4bc12ad01d1c5130d24b09bd6 Mon Sep 17 00:00:00 2001
+From 882655e21ef763cff199b8b411081dee999779fe Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 9c3586a6436d4df4bc12ad01d1c5130d24b09bd6 ]
+
@@ -33 +34,0 @@
-Cc: stable@dpdk.org
@@ -42 +43 @@
-index 8f5d61a589..bb293d492f 100644
+index 32c88628c4..d0c30a9c6f 100644

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'examples/rxtx_callbacks: fix build with pkg-config' has been queued to stable release 19.11.6
  2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
                           ` (39 preceding siblings ...)
  2020-11-17 11:14         ` [dpdk-stable] patch 'examples/vhost_blk: " luca.boccassi
@ 2020-11-17 11:14         ` luca.boccassi
  2020-11-25  9:02           ` [dpdk-stable] patch 'doc: fix rule file parameters in l3fwd-acl guide' " luca.boccassi
  40 siblings, 1 reply; 374+ messages in thread
From: luca.boccassi @ 2020-11-17 11:14 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/19/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e670d84f711a1126acbab207cbfa0a4cc0c558d7

Thanks.

Luca Boccassi

---
From e670d84f711a1126acbab207cbfa0a4cc0c558d7 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Sat, 14 Nov 2020 10:05:32 +0100
Subject: [PATCH] examples/rxtx_callbacks: fix build with pkg-config

[ upstream commit 090693344b38ac720a2a5a9bf3f8a0b1c29bfbdf ]

This example is missing the experimental flag since it uses an
experimental API.

Fixes: cd1dadeb9b2a ("examples/rxtx_callbacks: support HW timestamp")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/rxtx_callbacks/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/examples/rxtx_callbacks/Makefile b/examples/rxtx_callbacks/Makefile
index 10e5f14d5c..eecdcada3e 100644
--- a/examples/rxtx_callbacks/Makefile
+++ b/examples/rxtx_callbacks/Makefile
@@ -24,6 +24,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
 LDFLAGS_STATIC = $(shell $(PKGCONF) --static --libs libdpdk)
 
+CFLAGS += -DALLOW_EXPERIMENTAL_API
+
 build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build
 	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
 
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:14.729826154 +0000
+++ 0042-examples-rxtx_callbacks-fix-build-with-pkg-config.patch	2020-11-17 11:13:12.961117415 +0000
@@ -1 +1 @@
-From 090693344b38ac720a2a5a9bf3f8a0b1c29bfbdf Mon Sep 17 00:00:00 2001
+From e670d84f711a1126acbab207cbfa0a4cc0c558d7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 090693344b38ac720a2a5a9bf3f8a0b1c29bfbdf ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index bac3015d34..a618cdf751 100644
+index 10e5f14d5c..eecdcada3e 100644
@@ -22 +23 @@
-@@ -26,6 +26,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
+@@ -24,6 +24,8 @@ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'doc: fix rule file parameters in l3fwd-acl guide' has been queued to stable release 19.11.6
  2020-11-17 11:14         ` [dpdk-stable] patch 'examples/rxtx_callbacks: " luca.boccassi
@ 2020-11-25  9:02           ` luca.boccassi
  2020-11-25  9:02             ` [dpdk-stable] patch 'net/mlx5: fix Rx packet padding config via DevX' " luca.boccassi
                               ` (14 more replies)
  0 siblings, 15 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-25  9:02 UTC (permalink / raw)
  To: Ibtisam Tariq; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/26/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5e5d941091b1b22589abbb9f70ba787510b8507f

Thanks.

Luca Boccassi

---
From 5e5d941091b1b22589abbb9f70ba787510b8507f Mon Sep 17 00:00:00 2001
From: Ibtisam Tariq <ibtisam.tariq@emumba.com>
Date: Mon, 2 Nov 2020 11:19:15 +0000
Subject: [PATCH] doc: fix rule file parameters in l3fwd-acl guide

[ upstream commit 1995c2c1b99afe89be8b532d2fde0d3619446f3c ]

Add "--" and remove extra spaces in l3fwd-acl commands.

Fixes: d0dff9ba445e ("doc: sample application user guide")

Signed-off-by: Ibtisam Tariq <ibtisam.tariq@emumba.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 doc/guides/sample_app_ug/l3_forward_access_ctrl.rst | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/guides/sample_app_ug/l3_forward_access_ctrl.rst b/doc/guides/sample_app_ug/l3_forward_access_ctrl.rst
index a44fbcd52c..4e58c6c612 100644
--- a/doc/guides/sample_app_ug/l3_forward_access_ctrl.rst
+++ b/doc/guides/sample_app_ug/l3_forward_access_ctrl.rst
@@ -236,7 +236,7 @@ The application has a number of command line options:
 
 ..  code-block:: console
 
-    ./build/l3fwd-acl [EAL options] -- -p PORTMASK [-P] --config(port,queue,lcore)[,(port,queue,lcore)] --rule_ipv4 FILENAME rule_ipv6 FILENAME [--scalar] [--enable-jumbo [--max-pkt-len PKTLEN]] [--no-numa]
+    ./build/l3fwd-acl [EAL options] -- -p PORTMASK [-P] --config(port,queue,lcore)[,(port,queue,lcore)] --rule_ipv4 FILENAME --rule_ipv6 FILENAME [--scalar] [--enable-jumbo [--max-pkt-len PKTLEN]] [--no-numa]
 
 
 where,
@@ -268,7 +268,7 @@ To enable L3 forwarding between two ports, assuming that both ports are in the s
 
 ..  code-block:: console
 
-    ./build/l3fwd-acl -l 1,2 -n 4 -- -p 0x3 --config="(0,0,1),(1,0,2)" --rule_ipv4="./rule_ipv4.db" -- rule_ipv6="./rule_ipv6.db" --scalar
+    ./build/l3fwd-acl -l 1,2 -n 4 -- -p 0x3 --config="(0,0,1),(1,0,2)" --rule_ipv4="./rule_ipv4.db" --rule_ipv6="./rule_ipv6.db" --scalar
 
 In this command:
 
@@ -290,9 +290,9 @@ In this command:
     |          |            |           |                                     |
     +----------+------------+-----------+-------------------------------------+
 
-*   The --rule_ipv4 option specifies the reading of IPv4 rules sets from the ./ rule_ipv4.db file.
+*   The --rule_ipv4 option specifies the reading of IPv4 rules sets from the rule_ipv4.db file.
 
-*   The --rule_ipv6 option specifies the reading of IPv6 rules sets from the ./ rule_ipv6.db file.
+*   The --rule_ipv6 option specifies the reading of IPv6 rules sets from the rule_ipv6.db file.
 
 *   The --scalar option specifies the performing of rule lookup with a scalar function.
 
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-24 16:50:36.604487570 +0000
+++ 0001-doc-fix-rule-file-parameters-in-l3fwd-acl-guide.patch	2020-11-24 16:50:36.529495469 +0000
@@ -1 +1 @@
-From 1995c2c1b99afe89be8b532d2fde0d3619446f3c Mon Sep 17 00:00:00 2001
+From 5e5d941091b1b22589abbb9f70ba787510b8507f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1995c2c1b99afe89be8b532d2fde0d3619446f3c ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index eee5d81850..2cf6e4556f 100644
+index a44fbcd52c..4e58c6c612 100644
@@ -25,2 +26,2 @@
--    ./<build_dir>/examples/dpdk-l3fwd-acl [EAL options] -- -p PORTMASK [-P] --config(port,queue,lcore)[,(port,queue,lcore)] --rule_ipv4 FILENAME rule_ipv6 FILENAME [--alg=<val>] [--enable-jumbo [--max-pkt-len PKTLEN]] [--no-numa] [--eth-dest=X,MM:MM:MM:MM:MM:MM]
-+    ./<build_dir>/examples/dpdk-l3fwd-acl [EAL options] -- -p PORTMASK [-P] --config(port,queue,lcore)[,(port,queue,lcore)] --rule_ipv4 FILENAME --rule_ipv6 FILENAME [--alg=<val>] [--enable-jumbo [--max-pkt-len PKTLEN]] [--no-numa] [--eth-dest=X,MM:MM:MM:MM:MM:MM]
+-    ./build/l3fwd-acl [EAL options] -- -p PORTMASK [-P] --config(port,queue,lcore)[,(port,queue,lcore)] --rule_ipv4 FILENAME rule_ipv6 FILENAME [--scalar] [--enable-jumbo [--max-pkt-len PKTLEN]] [--no-numa]
++    ./build/l3fwd-acl [EAL options] -- -p PORTMASK [-P] --config(port,queue,lcore)[,(port,queue,lcore)] --rule_ipv4 FILENAME --rule_ipv6 FILENAME [--scalar] [--enable-jumbo [--max-pkt-len PKTLEN]] [--no-numa]
@@ -30 +31 @@
-@@ -271,7 +271,7 @@ To enable L3 forwarding between two ports, assuming that both ports are in the s
+@@ -268,7 +268,7 @@ To enable L3 forwarding between two ports, assuming that both ports are in the s
@@ -34,2 +35,2 @@
--    ./<build_dir>/examples/dpdk-l3fwd-acl -l 1,2 -n 4 -- -p 0x3 --config="(0,0,1),(1,0,2)" --rule_ipv4="./rule_ipv4.db" -- rule_ipv6="./rule_ipv6.db" --alg=scalar
-+    ./<build_dir>/examples/dpdk-l3fwd-acl -l 1,2 -n 4 -- -p 0x3 --config="(0,0,1),(1,0,2)" --rule_ipv4="rule_ipv4.db" --rule_ipv6="rule_ipv6.db" --alg=scalar
+-    ./build/l3fwd-acl -l 1,2 -n 4 -- -p 0x3 --config="(0,0,1),(1,0,2)" --rule_ipv4="./rule_ipv4.db" -- rule_ipv6="./rule_ipv6.db" --scalar
++    ./build/l3fwd-acl -l 1,2 -n 4 -- -p 0x3 --config="(0,0,1),(1,0,2)" --rule_ipv4="./rule_ipv4.db" --rule_ipv6="./rule_ipv6.db" --scalar
@@ -39 +40 @@
-@@ -293,9 +293,9 @@ In this command:
+@@ -290,9 +290,9 @@ In this command:
@@ -49 +50 @@
- *   The --alg=scalar option specifies the performing of rule lookup with a scalar function.
+ *   The --scalar option specifies the performing of rule lookup with a scalar function.

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix Rx packet padding config via DevX' has been queued to stable release 19.11.6
  2020-11-25  9:02           ` [dpdk-stable] patch 'doc: fix rule file parameters in l3fwd-acl guide' " luca.boccassi
@ 2020-11-25  9:02             ` luca.boccassi
  2020-11-25  9:02             ` [dpdk-stable] patch 'net/mlx5: fix RSS queue type validation' " luca.boccassi
                               ` (13 subsequent siblings)
  14 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-25  9:02 UTC (permalink / raw)
  To: Alexander Kozyrev; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/26/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7d36191470aad626b69ad3751fbeb86c18ede3a7

Thanks.

Luca Boccassi

---
From 7d36191470aad626b69ad3751fbeb86c18ede3a7 Mon Sep 17 00:00:00 2001
From: Alexander Kozyrev <akozyrev@nvidia.com>
Date: Sun, 15 Nov 2020 14:25:34 +0000
Subject: [PATCH] net/mlx5: fix Rx packet padding config via DevX

[ upstream commit ff2deada2ed8e1659e8774c42638657aaf77dc5b ]

Received packets can be aligned to the size of the cache line on
PCI transactions. This could improve performance by avoiding
partial cache line writes in exchange for increased PCI bandwidth.

This feature is supposed to be controlled by the rxq_pkt_pad_en
devarg and it is true for an RxQ created via the Verbs API.
But in the DevX API case, it is erroneously controlled by the
rxq_cqe_pad_en devarg instead, which is in charge of the CQE
padding instead and should not control the RxQ creation.

Fix DevX RxQ creation by using the proper configuration flag for
Rx packet padding that is being set by the rxq_pkt_pad_en devarg.

Fixes: dc9ceff73c99 ("net/mlx5: create advanced RxQ via DevX")

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 5a11325430..f3c2d99c15 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -1153,7 +1153,7 @@ static void
 mlx5_devx_wq_attr_fill(struct mlx5_priv *priv, struct mlx5_rxq_ctrl *rxq_ctrl,
 		       struct mlx5_devx_wq_attr *wq_attr)
 {
-	wq_attr->end_padding_mode = priv->config.cqe_pad ?
+	wq_attr->end_padding_mode = priv->config.hw_padding ?
 					MLX5_WQ_END_PAD_MODE_ALIGN :
 					MLX5_WQ_END_PAD_MODE_NONE;
 	wq_attr->pd = priv->sh->pdn;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-24 16:50:36.630541342 +0000
+++ 0002-net-mlx5-fix-Rx-packet-padding-config-via-DevX.patch	2020-11-24 16:50:36.533495553 +0000
@@ -1 +1 @@
-From ff2deada2ed8e1659e8774c42638657aaf77dc5b Mon Sep 17 00:00:00 2001
+From 7d36191470aad626b69ad3751fbeb86c18ede3a7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ff2deada2ed8e1659e8774c42638657aaf77dc5b ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
- drivers/net/mlx5/mlx5_devx.c | 2 +-
+ drivers/net/mlx5/mlx5_rxq.c | 2 +-
@@ -28,5 +29,5 @@
-diff --git a/drivers/net/mlx5/mlx5_devx.c b/drivers/net/mlx5/mlx5_devx.c
-index e9ceda5caf..34044fcb0c 100644
---- a/drivers/net/mlx5/mlx5_devx.c
-+++ b/drivers/net/mlx5/mlx5_devx.c
-@@ -294,7 +294,7 @@ static void
+diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
+index 5a11325430..f3c2d99c15 100644
+--- a/drivers/net/mlx5/mlx5_rxq.c
++++ b/drivers/net/mlx5/mlx5_rxq.c
+@@ -1153,7 +1153,7 @@ static void

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix RSS queue type validation' has been queued to stable release 19.11.6
  2020-11-25  9:02           ` [dpdk-stable] patch 'doc: fix rule file parameters in l3fwd-acl guide' " luca.boccassi
  2020-11-25  9:02             ` [dpdk-stable] patch 'net/mlx5: fix Rx packet padding config via DevX' " luca.boccassi
@ 2020-11-25  9:02             ` luca.boccassi
  2020-11-25  9:02             ` [dpdk-stable] patch 'net/mlx5: fix Rx queue count calculation' " luca.boccassi
                               ` (12 subsequent siblings)
  14 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-25  9:02 UTC (permalink / raw)
  To: Xiaoyu Min; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/26/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/5dddc14e74efb55760af7dced98dc45a4d7ddd5a

Thanks.

Luca Boccassi

---
From 5dddc14e74efb55760af7dced98dc45a4d7ddd5a Mon Sep 17 00:00:00 2001
From: Xiaoyu Min <jackmin@nvidia.com>
Date: Mon, 16 Nov 2020 10:07:59 +0800
Subject: [PATCH] net/mlx5: fix RSS queue type validation

[ upstream commit 765633655c76292cf24cee3641e7f87e96a3e0d6 ]

When the RSS queues' types are not uniformed, i.e, mixed with normal Rx
queue and hairpin queue, PMD accept this flow after commit[1] instead of
rejecting it.

This because commit[1] creates Rx queue object as DevX type via DevX API
instead of IBV type via Verbs, in which the latter will check the queues'
type when creating Verbs ind table but the former doesn't check when
creating DevX ind table.

However, in any case, logically PMD should check whether the input
configuration of RSS action is reasonable or not, which should
include queues' type check as well as the others.

So add the check of RSS queues' type in validation function to fix issue.

[1]:
commit 6deb19e1b2d2 ("net/mlx5: separate Rx queue object creations")

Fixes: 63bd16292c3a ("net/mlx5: support RSS on hairpin")

Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index b05dbaf9a1..b2e457faec 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1121,6 +1121,7 @@ mlx5_flow_validate_action_rss(const struct rte_flow_action *action,
 	struct mlx5_priv *priv = dev->data->dev_private;
 	const struct rte_flow_action_rss *rss = action->conf;
 	int tunnel = !!(item_flags & MLX5_FLOW_LAYER_TUNNEL);
+	enum mlx5_rxq_type rxq_type = MLX5_RXQ_TYPE_UNDEFINED;
 	unsigned int i;
 
 	if (action_flags & MLX5_FLOW_FATE_ACTIONS)
@@ -1179,6 +1180,8 @@ mlx5_flow_validate_action_rss(const struct rte_flow_action *action,
 					  RTE_FLOW_ERROR_TYPE_ACTION_CONF,
 					  NULL, "No queues configured");
 	for (i = 0; i != rss->queue_num; ++i) {
+		struct mlx5_rxq_ctrl *rxq_ctrl;
+
 		if (rss->queue[i] >= priv->rxqs_n)
 			return rte_flow_error_set
 				(error, EINVAL,
@@ -1188,6 +1191,15 @@ mlx5_flow_validate_action_rss(const struct rte_flow_action *action,
 			return rte_flow_error_set
 				(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION_CONF,
 				 &rss->queue[i], "queue is not configured");
+		rxq_ctrl = container_of((*priv->rxqs)[rss->queue[i]],
+					struct mlx5_rxq_ctrl, rxq);
+		if (i == 0)
+			rxq_type = rxq_ctrl->type;
+		if (rxq_type != rxq_ctrl->type)
+			return rte_flow_error_set
+				(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION_CONF,
+				 &rss->queue[i],
+				 "combining hairpin and regular RSS queues is not supported");
 	}
 	if (attr->egress)
 		return rte_flow_error_set(error, ENOTSUP,
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-24 16:50:36.667402998 +0000
+++ 0003-net-mlx5-fix-RSS-queue-type-validation.patch	2020-11-24 16:50:36.541495723 +0000
@@ -1 +1 @@
-From 765633655c76292cf24cee3641e7f87e96a3e0d6 Mon Sep 17 00:00:00 2001
+From 5dddc14e74efb55760af7dced98dc45a4d7ddd5a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 765633655c76292cf24cee3641e7f87e96a3e0d6 ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
-index c4071cd939..ad891d6758 100644
+index b05dbaf9a1..b2e457faec 100644
@@ -37,2 +38 @@
-@@ -1411,6 +1411,7 @@ mlx5_validate_action_rss(struct rte_eth_dev *dev,
- {
+@@ -1121,6 +1121,7 @@ mlx5_flow_validate_action_rss(const struct rte_flow_action *action,
@@ -40,0 +41 @@
+ 	int tunnel = !!(item_flags & MLX5_FLOW_LAYER_TUNNEL);
@@ -44,2 +45,2 @@
- 	if (rss->func != RTE_ETH_HASH_FUNCTION_DEFAULT &&
-@@ -1476,6 +1477,8 @@ mlx5_validate_action_rss(struct rte_eth_dev *dev,
+ 	if (action_flags & MLX5_FLOW_FATE_ACTIONS)
+@@ -1179,6 +1180,8 @@ mlx5_flow_validate_action_rss(const struct rte_flow_action *action,
@@ -54 +55 @@
-@@ -1485,6 +1488,15 @@ mlx5_validate_action_rss(struct rte_eth_dev *dev,
+@@ -1188,6 +1191,15 @@ mlx5_flow_validate_action_rss(const struct rte_flow_action *action,
@@ -68,2 +69,2 @@
- 	return 0;
- }
+ 	if (attr->egress)
+ 		return rte_flow_error_set(error, ENOTSUP,

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix Rx queue count calculation' has been queued to stable release 19.11.6
  2020-11-25  9:02           ` [dpdk-stable] patch 'doc: fix rule file parameters in l3fwd-acl guide' " luca.boccassi
  2020-11-25  9:02             ` [dpdk-stable] patch 'net/mlx5: fix Rx packet padding config via DevX' " luca.boccassi
  2020-11-25  9:02             ` [dpdk-stable] patch 'net/mlx5: fix RSS queue type validation' " luca.boccassi
@ 2020-11-25  9:02             ` luca.boccassi
  2020-11-25  9:02             ` [dpdk-stable] patch 'net/mlx5: fix Rx descriptor status' " luca.boccassi
                               ` (11 subsequent siblings)
  14 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-25  9:02 UTC (permalink / raw)
  To: Maxime Leroy; +Cc: Nelio Laranjeiro, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/26/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/0134408f53261d7dca1d7f37d47925e7bcf6f87f

Thanks.

Luca Boccassi

---
From 0134408f53261d7dca1d7f37d47925e7bcf6f87f Mon Sep 17 00:00:00 2001
From: Maxime Leroy <maxime.leroy@6wind.com>
Date: Tue, 17 Nov 2020 12:26:46 +0100
Subject: [PATCH] net/mlx5: fix Rx queue count calculation

[ upstream commit 9ae9720d7f0c12f877df9214f7cbedae546d4020 ]

The commit d2d57605522d ("net/mlx5: fix Rx queue count calculation") is
incorrect because the count calculation is wrong for the next cqe:

Example:

 Compressed Set of packets 1  |   Compressed Set of packets 2
C | a | e0 | e1 | e2 | e3 | e4 | e5 | C | a | e0

There are 2 compressed set of packets in the first queue. For the first
set, n is computed correctly.

But for the second, n is not computed properly. Because the zip context
is for the first set. The  second set is not yet decompressed, so
there are no context.

To fix the issue, we should only use the zip context for the first CQEs
series.

Fixes: d2d57605522d ("net/mlx5: fix Rx queue count calculation")

Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 9f4a04122c..6e5605d37e 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -468,11 +468,18 @@ rx_queue_count(struct mlx5_rxq_data *rxq)
 {
 	struct rxq_zip *zip = &rxq->zip;
 	volatile struct mlx5_cqe *cqe;
-	unsigned int cq_ci = rxq->cq_ci;
 	const unsigned int cqe_n = (1 << rxq->cqe_n);
 	const unsigned int cqe_cnt = cqe_n - 1;
-	unsigned int used = 0;
+	unsigned int cq_ci, used;
 
+	/* if we are processing a compressed cqe */
+	if (zip->ai) {
+		used = zip->cqe_cnt - zip->ai;
+		cq_ci = zip->cq_ci;
+	} else {
+		used = 0;
+		cq_ci = rxq->cq_ci;
+	}
 	cqe = &(*rxq->cqes)[cq_ci & cqe_cnt];
 	while (check_cqe(cqe, cqe_n, cq_ci) != MLX5_CQE_STATUS_HW_OWN) {
 		int8_t op_own;
@@ -480,10 +487,7 @@ rx_queue_count(struct mlx5_rxq_data *rxq)
 
 		op_own = cqe->op_own;
 		if (MLX5_CQE_FORMAT(op_own) == MLX5_COMPRESSED)
-			if (unlikely(zip->ai))
-				n = zip->cqe_cnt - zip->ai;
-			else
-				n = rte_be_to_cpu_32(cqe->byte_cnt);
+			n = rte_be_to_cpu_32(cqe->byte_cnt);
 		else
 			n = 1;
 		cq_ci += n;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-24 16:50:36.717569005 +0000
+++ 0004-net-mlx5-fix-Rx-queue-count-calculation.patch	2020-11-24 16:50:36.549495892 +0000
@@ -1 +1 @@
-From 9ae9720d7f0c12f877df9214f7cbedae546d4020 Mon Sep 17 00:00:00 2001
+From 0134408f53261d7dca1d7f37d47925e7bcf6f87f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9ae9720d7f0c12f877df9214f7cbedae546d4020 ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -35 +36 @@
-index 844a1c633d..2733dcd3ff 100644
+index 9f4a04122c..6e5605d37e 100644
@@ -38 +39 @@
-@@ -462,11 +462,18 @@ rx_queue_count(struct mlx5_rxq_data *rxq)
+@@ -468,11 +468,18 @@ rx_queue_count(struct mlx5_rxq_data *rxq)
@@ -59 +60 @@
-@@ -474,10 +481,7 @@ rx_queue_count(struct mlx5_rxq_data *rxq)
+@@ -480,10 +487,7 @@ rx_queue_count(struct mlx5_rxq_data *rxq)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix Rx descriptor status' has been queued to stable release 19.11.6
  2020-11-25  9:02           ` [dpdk-stable] patch 'doc: fix rule file parameters in l3fwd-acl guide' " luca.boccassi
                               ` (2 preceding siblings ...)
  2020-11-25  9:02             ` [dpdk-stable] patch 'net/mlx5: fix Rx queue count calculation' " luca.boccassi
@ 2020-11-25  9:02             ` luca.boccassi
  2020-11-25  9:02             ` [dpdk-stable] patch 'net/mlx5: fix raw encap/decap limit' " luca.boccassi
                               ` (10 subsequent siblings)
  14 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-25  9:02 UTC (permalink / raw)
  To: Didier Pallard; +Cc: Maxime Leroy, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/26/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/db0b497bd529dd264d7a4a2a7f5b6ab14ed5610a

Thanks.

Luca Boccassi

---
From db0b497bd529dd264d7a4a2a7f5b6ab14ed5610a Mon Sep 17 00:00:00 2001
From: Didier Pallard <didier.pallard@6wind.com>
Date: Tue, 17 Nov 2020 12:26:47 +0100
Subject: [PATCH] net/mlx5: fix Rx descriptor status

[ upstream commit 7c085d3a4a06b60cd04a408d7edf4e9382172a42 ]

Three bugs in rx_queue_count function:
- One entry may contain several segments, so 'used' must be multiplied
  by number of segments per entry to properly reflect the queue usage.
- The number of cqes is equals to (1U << rxq->elts_n) - 1 in SPRQ mode.
  The range returned by rx_queue_count should be the number of entries
  used in queue, so it ranges from 0 to max number of entries
  in queue, not this number minus one.
- For MPRQ mode, we need to take into account of the number of strd.

Fixes: 8788fec1f269 ("net/mlx5: implement descriptor status API")

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 6e5605d37e..ac5c1868a0 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -469,6 +469,9 @@ rx_queue_count(struct mlx5_rxq_data *rxq)
 	struct rxq_zip *zip = &rxq->zip;
 	volatile struct mlx5_cqe *cqe;
 	const unsigned int cqe_n = (1 << rxq->cqe_n);
+	const unsigned int sges_n = (1 << rxq->sges_n);
+	const unsigned int elts_n = (1 << rxq->elts_n);
+	const unsigned int strd_n = (1 << rxq->strd_num_n);
 	const unsigned int cqe_cnt = cqe_n - 1;
 	unsigned int cq_ci, used;
 
@@ -494,7 +497,7 @@ rx_queue_count(struct mlx5_rxq_data *rxq)
 		used += n;
 		cqe = &(*rxq->cqes)[cq_ci & cqe_cnt];
 	}
-	used = RTE_MIN(used, cqe_n);
+	used = RTE_MIN(used * sges_n, elts_n * strd_n);
 	return used;
 }
 
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-24 16:50:36.763174488 +0000
+++ 0005-net-mlx5-fix-Rx-descriptor-status.patch	2020-11-24 16:50:36.553495977 +0000
@@ -1 +1 @@
-From 7c085d3a4a06b60cd04a408d7edf4e9382172a42 Mon Sep 17 00:00:00 2001
+From db0b497bd529dd264d7a4a2a7f5b6ab14ed5610a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7c085d3a4a06b60cd04a408d7edf4e9382172a42 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 2733dcd3ff..2ecf901fb1 100644
+index 6e5605d37e..ac5c1868a0 100644
@@ -29 +30 @@
-@@ -463,6 +463,9 @@ rx_queue_count(struct mlx5_rxq_data *rxq)
+@@ -469,6 +469,9 @@ rx_queue_count(struct mlx5_rxq_data *rxq)
@@ -39 +40 @@
-@@ -488,7 +491,7 @@ rx_queue_count(struct mlx5_rxq_data *rxq)
+@@ -494,7 +497,7 @@ rx_queue_count(struct mlx5_rxq_data *rxq)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix raw encap/decap limit' has been queued to stable release 19.11.6
  2020-11-25  9:02           ` [dpdk-stable] patch 'doc: fix rule file parameters in l3fwd-acl guide' " luca.boccassi
                               ` (3 preceding siblings ...)
  2020-11-25  9:02             ` [dpdk-stable] patch 'net/mlx5: fix Rx descriptor status' " luca.boccassi
@ 2020-11-25  9:02             ` luca.boccassi
  2020-11-25  9:02             ` [dpdk-stable] patch 'common/mlx5: fix name for ConnectX VF device ID' " luca.boccassi
                               ` (9 subsequent siblings)
  14 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-25  9:02 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Ori Kam, Suanming Mou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/26/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/14364aebfadbb5783acb1479214ce0d3a26d3fc1

Thanks.

Luca Boccassi

---
From 14364aebfadbb5783acb1479214ce0d3a26d3fc1 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 18 Nov 2020 07:37:30 +0000
Subject: [PATCH] net/mlx5: fix raw encap/decap limit

[ upstream commit f9210259cac7836f78893dc6b0aede8664c1077e ]

The MLX5_ENCAPSULATION_DECISION_SIZE constant is used
to check the raw encap/decap actions for the raw header
size. The header is constructed of the rte_xxx_hdr
structures instead of rte items. Hence, constant
must be defined with rte_xxx_hdr structure sizes.

Fixes: 50f576d657d7 ("net/mlx5: fix VLAN actions in meter")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Suanming Mou <suanmingm@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index f8046119ec..4300e62fad 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -327,8 +327,8 @@ enum mlx5_feature_name {
 #define MLX5_GENEVE_OPT_LEN_0 14
 #define MLX5_GENEVE_OPT_LEN_1 63
 
-#define MLX5_ENCAPSULATION_DECISION_SIZE (sizeof(struct rte_flow_item_eth) + \
-					  sizeof(struct rte_flow_item_ipv4))
+#define MLX5_ENCAPSULATION_DECISION_SIZE (sizeof(struct rte_ether_hdr) + \
+					  sizeof(struct rte_ipv4_hdr))
 
 /* Software header modify action numbers of a flow. */
 #define MLX5_ACT_NUM_MDF_IPV4		1
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-24 16:50:36.814988409 +0000
+++ 0006-net-mlx5-fix-raw-encap-decap-limit.patch	2020-11-24 16:50:36.557496061 +0000
@@ -1 +1 @@
-From f9210259cac7836f78893dc6b0aede8664c1077e Mon Sep 17 00:00:00 2001
+From 14364aebfadbb5783acb1479214ce0d3a26d3fc1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f9210259cac7836f78893dc6b0aede8664c1077e ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index afddcfc12c..1c3c6abea2 100644
+index f8046119ec..4300e62fad 100644
@@ -26 +27 @@
-@@ -345,8 +345,8 @@ enum mlx5_feature_name {
+@@ -327,8 +327,8 @@ enum mlx5_feature_name {
@@ -35,2 +36,2 @@
- /* IPv4 fragment_offset field contains relevant data in bits 2 to 15. */
- #define MLX5_IPV4_FRAG_OFFSET_MASK \
+ /* Software header modify action numbers of a flow. */
+ #define MLX5_ACT_NUM_MDF_IPV4		1

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'common/mlx5: fix name for ConnectX VF device ID' has been queued to stable release 19.11.6
  2020-11-25  9:02           ` [dpdk-stable] patch 'doc: fix rule file parameters in l3fwd-acl guide' " luca.boccassi
                               ` (4 preceding siblings ...)
  2020-11-25  9:02             ` [dpdk-stable] patch 'net/mlx5: fix raw encap/decap limit' " luca.boccassi
@ 2020-11-25  9:02             ` luca.boccassi
  2020-11-25  9:02             ` [dpdk-stable] patch 'app/testpmd: revert setting MTU explicitly after configure' " luca.boccassi
                               ` (8 subsequent siblings)
  14 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-25  9:02 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/26/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6de0c15edd6b76efd780ac5998ebcc4cdb0cf166

Thanks.

Luca Boccassi

---
From 6de0c15edd6b76efd780ac5998ebcc4cdb0cf166 Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@nvidia.com>
Date: Thu, 19 Nov 2020 10:06:10 +0200
Subject: [PATCH] common/mlx5: fix name for ConnectX VF device ID

[ upstream commit 3ea12cad7165facd6bc8c4fa1cbc734ccbc71d2b ]

Starting ConnectX-6 Dx, the VF device ID is generic
and not per chip.

https://pci-ids.ucw.cz/v2.2/pci.ids
101e  ConnectX Family mlx5Gen Virtual Function

This means that all will have the same VF device ID.

Fixes: 5fc66630bed5 ("net/mlx5: add ConnectX6-DX device ID")

Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5.c | 4 ++--
 drivers/net/mlx5/mlx5.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index f2327903eb..36e69379fa 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -3389,7 +3389,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	case PCI_DEVICE_ID_MELLANOX_CONNECTX5EXVF:
 	case PCI_DEVICE_ID_MELLANOX_CONNECTX5BFVF:
 	case PCI_DEVICE_ID_MELLANOX_CONNECTX6VF:
-	case PCI_DEVICE_ID_MELLANOX_CONNECTX6DXVF:
+	case PCI_DEVICE_ID_MELLANOX_CONNECTXVF:
 		dev_config.vf = 1;
 		break;
 	default:
@@ -3572,7 +3572,7 @@ static const struct rte_pci_id mlx5_pci_id_map[] = {
 	},
 	{
 		RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX,
-				PCI_DEVICE_ID_MELLANOX_CONNECTX6DXVF)
+				PCI_DEVICE_ID_MELLANOX_CONNECTXVF)
 	},
 	{
 		.vendor_id = 0
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index d2e4f446f4..206c8e9fa8 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -57,7 +57,7 @@ enum {
 	PCI_DEVICE_ID_MELLANOX_CONNECTX6 = 0x101b,
 	PCI_DEVICE_ID_MELLANOX_CONNECTX6VF = 0x101c,
 	PCI_DEVICE_ID_MELLANOX_CONNECTX6DX = 0x101d,
-	PCI_DEVICE_ID_MELLANOX_CONNECTX6DXVF = 0x101e,
+	PCI_DEVICE_ID_MELLANOX_CONNECTXVF = 0x101e,
 };
 
 /* Request types for IPC. */
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-24 16:50:36.858866071 +0000
+++ 0007-common-mlx5-fix-name-for-ConnectX-VF-device-ID.patch	2020-11-24 16:50:36.561496146 +0000
@@ -1 +1 @@
-From 3ea12cad7165facd6bc8c4fa1cbc734ccbc71d2b Mon Sep 17 00:00:00 2001
+From 6de0c15edd6b76efd780ac5998ebcc4cdb0cf166 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3ea12cad7165facd6bc8c4fa1cbc734ccbc71d2b ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -20,24 +21,9 @@
- drivers/common/mlx5/mlx5_common.h | 2 +-
- drivers/net/mlx5/linux/mlx5_os.c  | 2 +-
- drivers/net/mlx5/mlx5.c           | 2 +-
- drivers/vdpa/mlx5/mlx5_vdpa.c     | 2 +-
- 4 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/common/mlx5/mlx5_common.h b/drivers/common/mlx5/mlx5_common.h
-index 10a0851794..a484b74b9c 100644
---- a/drivers/common/mlx5/mlx5_common.h
-+++ b/drivers/common/mlx5/mlx5_common.h
-@@ -131,7 +131,7 @@ enum {
- 	PCI_DEVICE_ID_MELLANOX_CONNECTX6 = 0x101b,
- 	PCI_DEVICE_ID_MELLANOX_CONNECTX6VF = 0x101c,
- 	PCI_DEVICE_ID_MELLANOX_CONNECTX6DX = 0x101d,
--	PCI_DEVICE_ID_MELLANOX_CONNECTX6DXVF = 0x101e,
-+	PCI_DEVICE_ID_MELLANOX_CONNECTXVF = 0x101e,
- 	PCI_DEVICE_ID_MELLANOX_CONNECTX6DXBF = 0xa2d6,
- 	PCI_DEVICE_ID_MELLANOX_CONNECTX6LX = 0x101f,
- 	PCI_DEVICE_ID_MELLANOX_CONNECTX7 = 0x1021,
-diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
-index 00f793bc57..5a6ae790a7 100644
---- a/drivers/net/mlx5/linux/mlx5_os.c
-+++ b/drivers/net/mlx5/linux/mlx5_os.c
-@@ -2113,7 +2113,7 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+ drivers/net/mlx5/mlx5.c | 4 ++--
+ drivers/net/mlx5/mlx5.h | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
+index f2327903eb..36e69379fa 100644
+--- a/drivers/net/mlx5/mlx5.c
++++ b/drivers/net/mlx5/mlx5.c
+@@ -3389,7 +3389,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
@@ -49 +35 @@
- 		dev_config_vf = 1;
+ 		dev_config.vf = 1;
@@ -52,5 +38 @@
-diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
-index ede5fd44ab..db7e8d708c 100644
---- a/drivers/net/mlx5/mlx5.c
-+++ b/drivers/net/mlx5/mlx5.c
-@@ -2035,7 +2035,7 @@ static const struct rte_pci_id mlx5_pci_id_map[] = {
+@@ -3572,7 +3572,7 @@ static const struct rte_pci_id mlx5_pci_id_map[] = {
@@ -64,14 +46,14 @@
- 		RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX,
-diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c
-index 1502abdc89..b64f364eb7 100644
---- a/drivers/vdpa/mlx5/mlx5_vdpa.c
-+++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
-@@ -824,7 +824,7 @@ static const struct rte_pci_id mlx5_vdpa_pci_id_map[] = {
- 	},
- 	{
- 		RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX,
--				PCI_DEVICE_ID_MELLANOX_CONNECTX6DXVF)
-+				PCI_DEVICE_ID_MELLANOX_CONNECTXVF)
- 	},
- 	{
- 		RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX,
+ 		.vendor_id = 0
+diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
+index d2e4f446f4..206c8e9fa8 100644
+--- a/drivers/net/mlx5/mlx5.h
++++ b/drivers/net/mlx5/mlx5.h
+@@ -57,7 +57,7 @@ enum {
+ 	PCI_DEVICE_ID_MELLANOX_CONNECTX6 = 0x101b,
+ 	PCI_DEVICE_ID_MELLANOX_CONNECTX6VF = 0x101c,
+ 	PCI_DEVICE_ID_MELLANOX_CONNECTX6DX = 0x101d,
+-	PCI_DEVICE_ID_MELLANOX_CONNECTX6DXVF = 0x101e,
++	PCI_DEVICE_ID_MELLANOX_CONNECTXVF = 0x101e,
+ };
+ 
+ /* Request types for IPC. */

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'app/testpmd: revert setting MTU explicitly after configure' has been queued to stable release 19.11.6
  2020-11-25  9:02           ` [dpdk-stable] patch 'doc: fix rule file parameters in l3fwd-acl guide' " luca.boccassi
                               ` (5 preceding siblings ...)
  2020-11-25  9:02             ` [dpdk-stable] patch 'common/mlx5: fix name for ConnectX VF device ID' " luca.boccassi
@ 2020-11-25  9:02             ` luca.boccassi
  2020-11-25  9:02             ` [dpdk-stable] patch 'net/hns3: fix crash with multi-TC' " luca.boccassi
                               ` (7 subsequent siblings)
  14 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-25  9:02 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Bo Chen, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/26/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/bdc1ebe7a0f4f8cd646f2f8e3851c1c5976aaa65

Thanks.

Luca Boccassi

---
From bdc1ebe7a0f4f8cd646f2f8e3851c1c5976aaa65 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Mon, 16 Nov 2020 19:03:54 +0000
Subject: [PATCH] app/testpmd: revert setting MTU explicitly after configure

[ upstream commit 56f0534311d4c61c63e2455169749ae440278122 ]

Setting MTU after each 'rte_eth_dev_configure()' prevents using
"--max-pkt-len=N" parameter and "port config all max-pkt-len #" command

This is breaking DTS scatter test case which is using
"--max-pkt-len=9000" testpmd parameter.

Reverting workaround to recover the DTS testcase.

Fixes: 1c21ee95cf52 ("app/testpmd: fix MTU after device configure")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: Bo Chen <box.c.chen@intel.com>
---
 app/test-pmd/testpmd.c | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 7b08bd2f59..8d3b7b2a3b 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2334,8 +2334,6 @@ start_port(portid_t pid)
 		}
 
 		if (port->need_reconfig > 0) {
-			uint16_t mtu = RTE_ETHER_MTU;
-
 			port->need_reconfig = 0;
 
 			if (flow_isolate_all) {
@@ -2369,23 +2367,6 @@ start_port(portid_t pid)
 				port->need_reconfig = 1;
 				return -1;
 			}
-
-			/*
-			 * Workaround for rte_eth_dev_configure(), max_rx_pkt_len
-			 * set MTU wrong for the PMDs that have frame overhead
-			 * bigger than RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN.
-			 * For a PMD that has 26 bytes overhead, rte_eth_dev_configure()
-			 * can set MTU to max 1492, not to expected 1500 bytes.
-			 * Using rte_eth_dev_set_mtu() to be able to set MTU correctly,
-			 * default MTU value is 1500.
-			 */
-			diag = rte_eth_dev_get_mtu(pi, &mtu);
-			if (diag)
-				printf("Failed to get MTU for port %d\n", pi);
-			diag = rte_eth_dev_set_mtu(pi, mtu);
-			if (diag != 0 && diag != -ENOTSUP)
-				printf("Failed to set MTU to %u for port %d\n",
-						mtu, pi);
 		}
 		if (port->need_reconfig_queues > 0) {
 			port->need_reconfig_queues = 0;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-24 16:50:36.909093974 +0000
+++ 0008-app-testpmd-revert-setting-MTU-explicitly-after-conf.patch	2020-11-24 16:50:36.565496231 +0000
@@ -1 +1 @@
-From 56f0534311d4c61c63e2455169749ae440278122 Mon Sep 17 00:00:00 2001
+From bdc1ebe7a0f4f8cd646f2f8e3851c1c5976aaa65 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 56f0534311d4c61c63e2455169749ae440278122 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 48e9647fc7..33fc0fddf5 100644
+index 7b08bd2f59..8d3b7b2a3b 100644
@@ -27 +28 @@
-@@ -2537,8 +2537,6 @@ start_port(portid_t pid)
+@@ -2334,8 +2334,6 @@ start_port(portid_t pid)
@@ -36 +37 @@
-@@ -2572,23 +2570,6 @@ start_port(portid_t pid)
+@@ -2369,23 +2367,6 @@ start_port(portid_t pid)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix crash with multi-TC' has been queued to stable release 19.11.6
  2020-11-25  9:02           ` [dpdk-stable] patch 'doc: fix rule file parameters in l3fwd-acl guide' " luca.boccassi
                               ` (6 preceding siblings ...)
  2020-11-25  9:02             ` [dpdk-stable] patch 'app/testpmd: revert setting MTU explicitly after configure' " luca.boccassi
@ 2020-11-25  9:02             ` luca.boccassi
  2020-11-25  9:02             ` [dpdk-stable] patch 'event/octeontx2: unlink queues during port release' " luca.boccassi
                               ` (6 subsequent siblings)
  14 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-25  9:02 UTC (permalink / raw)
  To: Huisong Li; +Cc: Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/26/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/aac4e6358e85bc07029b236d419a9258e358e103

Thanks.

Luca Boccassi

---
From aac4e6358e85bc07029b236d419a9258e358e103 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Fri, 20 Nov 2020 19:27:33 +0800
Subject: [PATCH] net/hns3: fix crash with multi-TC

[ upstream commit 1c359bae182fc64b30fda3777a6c8f8cad7823ab ]

The HW and SW DCB configurations need to be updated only
after the DCB configuration information changed. But the
change of tx/rx queue number is ignored. If user decreases
the number of tx queue after configuring multi-TC, the queue
mapping information in hns3_tc_queue_info can not be updated.
And then accessing the released queue resource in
"hns3_init_tx_ring_tc" will trigger a segment fault.

Fixes: 62e3ccc2b94c ("net/hns3: support flow control")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_dcb.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c
index f7d21ca756..62d8930c15 100644
--- a/drivers/net/hns3/hns3_dcb.c
+++ b/drivers/net/hns3/hns3_dcb.c
@@ -1258,6 +1258,8 @@ hns3_dcb_cfg_validate(struct hns3_adapter *hns, uint8_t *tc, bool *changed)
 {
 	struct rte_eth_dcb_rx_conf *dcb_rx_conf;
 	struct hns3_hw *hw = &hns->hw;
+	uint16_t nb_rx_q = hw->data->nb_rx_queues;
+	uint16_t nb_tx_q = hw->data->nb_tx_queues;
 	uint8_t max_tc = 0;
 	uint8_t pfc_en;
 	int i;
@@ -1283,6 +1285,10 @@ hns3_dcb_cfg_validate(struct hns3_adapter *hns, uint8_t *tc, bool *changed)
 	pfc_en = RTE_LEN2MASK((uint8_t)dcb_rx_conf->nb_tcs, uint8_t);
 	if (hw->dcb_info.pfc_en != pfc_en)
 		*changed = true;
+
+	/* tx/rx queue number is reconfigured. */
+	if (nb_rx_q != hw->used_rx_queues || nb_tx_q != hw->used_tx_queues)
+		*changed = true;
 }
 
 static void
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-24 16:50:36.949566441 +0000
+++ 0009-net-hns3-fix-crash-with-multi-TC.patch	2020-11-24 16:50:36.565496231 +0000
@@ -1 +1 @@
-From 1c359bae182fc64b30fda3777a6c8f8cad7823ab Mon Sep 17 00:00:00 2001
+From aac4e6358e85bc07029b236d419a9258e358e103 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1c359bae182fc64b30fda3777a6c8f8cad7823ab ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index ab02c87628..fb501795f0 100644
+index f7d21ca756..62d8930c15 100644
@@ -27 +28 @@
-@@ -1351,6 +1351,8 @@ hns3_dcb_cfg_validate(struct hns3_adapter *hns, uint8_t *tc, bool *changed)
+@@ -1258,6 +1258,8 @@ hns3_dcb_cfg_validate(struct hns3_adapter *hns, uint8_t *tc, bool *changed)
@@ -36 +37 @@
-@@ -1376,6 +1378,10 @@ hns3_dcb_cfg_validate(struct hns3_adapter *hns, uint8_t *tc, bool *changed)
+@@ -1283,6 +1285,10 @@ hns3_dcb_cfg_validate(struct hns3_adapter *hns, uint8_t *tc, bool *changed)
@@ -46 +47 @@
- static int
+ static void

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'event/octeontx2: unlink queues during port release' has been queued to stable release 19.11.6
  2020-11-25  9:02           ` [dpdk-stable] patch 'doc: fix rule file parameters in l3fwd-acl guide' " luca.boccassi
                               ` (7 preceding siblings ...)
  2020-11-25  9:02             ` [dpdk-stable] patch 'net/hns3: fix crash with multi-TC' " luca.boccassi
@ 2020-11-25  9:02             ` luca.boccassi
  2020-11-25  9:02             ` [dpdk-stable] patch 'compress/isal: check allocation in queue setup' " luca.boccassi
                               ` (5 subsequent siblings)
  14 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-25  9:02 UTC (permalink / raw)
  To: Shijith Thotton; +Cc: Pavan Nikhilesh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/26/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/fac23bf6f0a0c631f17cd71762f3b79a51d56c95

Thanks.

Luca Boccassi

---
From fac23bf6f0a0c631f17cd71762f3b79a51d56c95 Mon Sep 17 00:00:00 2001
From: Shijith Thotton <sthotton@marvell.com>
Date: Thu, 19 Nov 2020 14:16:11 +0530
Subject: [PATCH] event/octeontx2: unlink queues during port release

[ upstream commit 8e6663b8c145a3dcbd7b298b93682814973c7fcd ]

Unlinking queues from port should be done during port release. Doing it
during device re-configuration could result in segfault as ports array
is re-allocated based on new number of ports.

Fixes: f7ac8b66b23c ("event/octeontx2: support linking queues to ports")

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 drivers/event/octeontx2/otx2_evdev.c | 100 ++++++++++++++++-----------
 drivers/event/octeontx2/otx2_evdev.h |  12 ++++
 2 files changed, 72 insertions(+), 40 deletions(-)

diff --git a/drivers/event/octeontx2/otx2_evdev.c b/drivers/event/octeontx2/otx2_evdev.c
index f7766812bb..5bdf23c362 100644
--- a/drivers/event/octeontx2/otx2_evdev.c
+++ b/drivers/event/octeontx2/otx2_evdev.c
@@ -648,7 +648,36 @@ sso_lf_cfg(struct otx2_sso_evdev *dev, struct otx2_mbox *mbox,
 static void
 otx2_sso_port_release(void *port)
 {
-	rte_free(port);
+	struct otx2_ssogws_cookie *gws_cookie = ssogws_get_cookie(port);
+	struct otx2_sso_evdev *dev;
+	int i;
+
+	if (!gws_cookie->configured)
+		goto free;
+
+	dev = sso_pmd_priv(gws_cookie->event_dev);
+	if (dev->dual_ws) {
+		struct otx2_ssogws_dual *ws = port;
+
+		for (i = 0; i < dev->nb_event_queues; i++) {
+			sso_port_link_modify((struct otx2_ssogws *)
+					     &ws->ws_state[0], i, false);
+			sso_port_link_modify((struct otx2_ssogws *)
+					     &ws->ws_state[1], i, false);
+		}
+		memset(ws, 0, sizeof(*ws));
+	} else {
+		struct otx2_ssogws *ws = port;
+
+		for (i = 0; i < dev->nb_event_queues; i++)
+			sso_port_link_modify(ws, i, false);
+		memset(ws, 0, sizeof(*ws));
+	}
+
+	memset(gws_cookie, 0, sizeof(*gws_cookie));
+
+free:
+	rte_free(gws_cookie);
 }
 
 static void
@@ -658,33 +687,6 @@ otx2_sso_queue_release(struct rte_eventdev *event_dev, uint8_t queue_id)
 	RTE_SET_USED(queue_id);
 }
 
-static void
-sso_clr_links(const struct rte_eventdev *event_dev)
-{
-	struct otx2_sso_evdev *dev = sso_pmd_priv(event_dev);
-	int i, j;
-
-	for (i = 0; i < dev->nb_event_ports; i++) {
-		if (dev->dual_ws) {
-			struct otx2_ssogws_dual *ws;
-
-			ws = event_dev->data->ports[i];
-			for (j = 0; j < dev->nb_event_queues; j++) {
-				sso_port_link_modify((struct otx2_ssogws *)
-						&ws->ws_state[0], j, false);
-				sso_port_link_modify((struct otx2_ssogws *)
-						&ws->ws_state[1], j, false);
-			}
-		} else {
-			struct otx2_ssogws *ws;
-
-			ws = event_dev->data->ports[i];
-			for (j = 0; j < dev->nb_event_queues; j++)
-				sso_port_link_modify(ws, j, false);
-		}
-	}
-}
-
 static void
 sso_restore_links(const struct rte_eventdev *event_dev)
 {
@@ -762,6 +764,7 @@ sso_configure_dual_ports(const struct rte_eventdev *event_dev)
 	}
 
 	for (i = 0; i < dev->nb_event_ports; i++) {
+		struct otx2_ssogws_cookie *gws_cookie;
 		struct otx2_ssogws_dual *ws;
 		uintptr_t base;
 
@@ -770,14 +773,20 @@ sso_configure_dual_ports(const struct rte_eventdev *event_dev)
 		} else {
 			/* Allocate event port memory */
 			ws = rte_zmalloc_socket("otx2_sso_ws",
-					sizeof(struct otx2_ssogws_dual),
+					sizeof(struct otx2_ssogws_dual) +
+					RTE_CACHE_LINE_SIZE,
 					RTE_CACHE_LINE_SIZE,
 					event_dev->data->socket_id);
-		}
-		if (ws == NULL) {
-			otx2_err("Failed to alloc memory for port=%d", i);
-			rc = -ENOMEM;
-			break;
+			if (ws == NULL) {
+				otx2_err("Failed to alloc memory for port=%d",
+					 i);
+				rc = -ENOMEM;
+				break;
+			}
+
+			/* First cache line is reserved for cookie */
+			ws = (struct otx2_ssogws_dual *)
+				((uint8_t *)ws + RTE_CACHE_LINE_SIZE);
 		}
 
 		ws->port = i;
@@ -789,6 +798,10 @@ sso_configure_dual_ports(const struct rte_eventdev *event_dev)
 		sso_set_port_ops((struct otx2_ssogws *)&ws->ws_state[1], base);
 		vws++;
 
+		gws_cookie = ssogws_get_cookie(ws);
+		gws_cookie->event_dev = event_dev;
+		gws_cookie->configured = 1;
+
 		event_dev->data->ports[i] = ws;
 	}
 
@@ -825,19 +838,21 @@ sso_configure_ports(const struct rte_eventdev *event_dev)
 	}
 
 	for (i = 0; i < nb_lf; i++) {
+		struct otx2_ssogws_cookie *gws_cookie;
 		struct otx2_ssogws *ws;
 		uintptr_t base;
 
 		/* Free memory prior to re-allocation if needed */
 		if (event_dev->data->ports[i] != NULL) {
 			ws = event_dev->data->ports[i];
-			rte_free(ws);
+			rte_free(ssogws_get_cookie(ws));
 			ws = NULL;
 		}
 
 		/* Allocate event port memory */
 		ws = rte_zmalloc_socket("otx2_sso_ws",
-					sizeof(struct otx2_ssogws),
+					sizeof(struct otx2_ssogws) +
+					RTE_CACHE_LINE_SIZE,
 					RTE_CACHE_LINE_SIZE,
 					event_dev->data->socket_id);
 		if (ws == NULL) {
@@ -846,10 +861,18 @@ sso_configure_ports(const struct rte_eventdev *event_dev)
 			break;
 		}
 
+		/* First cache line is reserved for cookie */
+		ws = (struct otx2_ssogws *)
+			((uint8_t *)ws + RTE_CACHE_LINE_SIZE);
+
 		ws->port = i;
 		base = dev->bar2 + (RVU_BLOCK_ADDR_SSOW << 20 | i << 12);
 		sso_set_port_ops(ws, base);
 
+		gws_cookie = ssogws_get_cookie(ws);
+		gws_cookie->event_dev = event_dev;
+		gws_cookie->configured = 1;
+
 		event_dev->data->ports[i] = ws;
 	}
 
@@ -1058,11 +1081,8 @@ otx2_sso_configure(const struct rte_eventdev *event_dev)
 		return -EINVAL;
 	}
 
-	if (dev->configured) {
+	if (dev->configured)
 		sso_unregister_irqs(event_dev);
-		/* Clear any prior port-queue mapping. */
-		sso_clr_links(event_dev);
-	}
 
 	if (dev->nb_event_queues) {
 		/* Finit any previous queues. */
diff --git a/drivers/event/octeontx2/otx2_evdev.h b/drivers/event/octeontx2/otx2_evdev.h
index ef523dc9da..e134ea5ea3 100644
--- a/drivers/event/octeontx2/otx2_evdev.h
+++ b/drivers/event/octeontx2/otx2_evdev.h
@@ -212,6 +212,18 @@ sso_pmd_priv(const struct rte_eventdev *event_dev)
 	return event_dev->data->dev_private;
 }
 
+struct otx2_ssogws_cookie {
+	const struct rte_eventdev *event_dev;
+	bool configured;
+};
+
+static inline struct otx2_ssogws_cookie *
+ssogws_get_cookie(void *ws)
+{
+	return (struct otx2_ssogws_cookie *)
+		((uint8_t *)ws - RTE_CACHE_LINE_SIZE);
+}
+
 static const union mbuf_initializer mbuf_init = {
 	.fields = {
 		.data_off = RTE_PKTMBUF_HEADROOM,
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-24 16:50:36.988893850 +0000
+++ 0010-event-octeontx2-unlink-queues-during-port-release.patch	2020-11-24 16:50:36.569496315 +0000
@@ -1 +1 @@
-From 8e6663b8c145a3dcbd7b298b93682814973c7fcd Mon Sep 17 00:00:00 2001
+From fac23bf6f0a0c631f17cd71762f3b79a51d56c95 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8e6663b8c145a3dcbd7b298b93682814973c7fcd ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -16,4 +17,3 @@
- drivers/event/octeontx2/otx2_evdev.c       | 100 ++++++++++++---------
- drivers/event/octeontx2/otx2_evdev.h       |  12 +++
- drivers/event/octeontx2/otx2_evdev_adptr.c |  24 +++--
- 3 files changed, 89 insertions(+), 47 deletions(-)
+ drivers/event/octeontx2/otx2_evdev.c | 100 ++++++++++++++++-----------
+ drivers/event/octeontx2/otx2_evdev.h |  12 ++++
+ 2 files changed, 72 insertions(+), 40 deletions(-)
@@ -22 +22 @@
-index c1a5916cd2..0fe014c24a 100644
+index f7766812bb..5bdf23c362 100644
@@ -25 +25 @@
-@@ -689,7 +689,36 @@ sso_lf_cfg(struct otx2_sso_evdev *dev, struct otx2_mbox *mbox,
+@@ -648,7 +648,36 @@ sso_lf_cfg(struct otx2_sso_evdev *dev, struct otx2_mbox *mbox,
@@ -63 +63 @@
-@@ -699,33 +728,6 @@ otx2_sso_queue_release(struct rte_eventdev *event_dev, uint8_t queue_id)
+@@ -658,33 +687,6 @@ otx2_sso_queue_release(struct rte_eventdev *event_dev, uint8_t queue_id)
@@ -97 +97 @@
-@@ -803,6 +805,7 @@ sso_configure_dual_ports(const struct rte_eventdev *event_dev)
+@@ -762,6 +764,7 @@ sso_configure_dual_ports(const struct rte_eventdev *event_dev)
@@ -105 +105 @@
-@@ -811,14 +814,20 @@ sso_configure_dual_ports(const struct rte_eventdev *event_dev)
+@@ -770,14 +773,20 @@ sso_configure_dual_ports(const struct rte_eventdev *event_dev)
@@ -132 +132 @@
-@@ -830,6 +839,10 @@ sso_configure_dual_ports(const struct rte_eventdev *event_dev)
+@@ -789,6 +798,10 @@ sso_configure_dual_ports(const struct rte_eventdev *event_dev)
@@ -143 +143 @@
-@@ -866,19 +879,21 @@ sso_configure_ports(const struct rte_eventdev *event_dev)
+@@ -825,19 +838,21 @@ sso_configure_ports(const struct rte_eventdev *event_dev)
@@ -167 +167 @@
-@@ -887,10 +902,18 @@ sso_configure_ports(const struct rte_eventdev *event_dev)
+@@ -846,10 +861,18 @@ sso_configure_ports(const struct rte_eventdev *event_dev)
@@ -186 +186 @@
-@@ -1099,11 +1122,8 @@ otx2_sso_configure(const struct rte_eventdev *event_dev)
+@@ -1058,11 +1081,8 @@ otx2_sso_configure(const struct rte_eventdev *event_dev)
@@ -200 +200 @@
-index d0f5b3fcf0..0513cb81c9 100644
+index ef523dc9da..e134ea5ea3 100644
@@ -203 +203 @@
-@@ -217,6 +217,18 @@ sso_pmd_priv(const struct rte_eventdev *event_dev)
+@@ -212,6 +212,18 @@ sso_pmd_priv(const struct rte_eventdev *event_dev)
@@ -222,55 +221,0 @@
-diff --git a/drivers/event/octeontx2/otx2_evdev_adptr.c b/drivers/event/octeontx2/otx2_evdev_adptr.c
-index 0a5d7924ad..d69f269df6 100644
---- a/drivers/event/octeontx2/otx2_evdev_adptr.c
-+++ b/drivers/event/octeontx2/otx2_evdev_adptr.c
-@@ -453,9 +453,10 @@ sso_add_tx_queue_data(const struct rte_eventdev *event_dev,
- 			struct otx2_ssogws_dual *dws;
- 
- 			old_dws = event_dev->data->ports[i];
--			dws = rte_realloc_socket(old_dws,
-+			dws = rte_realloc_socket(ssogws_get_cookie(old_dws),
- 						 sizeof(struct otx2_ssogws_dual)
--						 + (sizeof(uint64_t) *
-+						 + RTE_CACHE_LINE_SIZE +
-+						 (sizeof(uint64_t) *
- 						    (dev->max_port_id + 1) *
- 						    RTE_MAX_QUEUES_PER_PORT),
- 						 RTE_CACHE_LINE_SIZE,
-@@ -463,6 +464,10 @@ sso_add_tx_queue_data(const struct rte_eventdev *event_dev,
- 			if (dws == NULL)
- 				return -ENOMEM;
- 
-+			/* First cache line is reserved for cookie */
-+			dws = (struct otx2_ssogws_dual *)
-+				((uint8_t *)dws + RTE_CACHE_LINE_SIZE);
-+
- 			((uint64_t (*)[RTE_MAX_QUEUES_PER_PORT]
- 			 )&dws->tx_adptr_data)[eth_port_id][tx_queue_id] =
- 				(uint64_t)txq;
-@@ -472,16 +477,21 @@ sso_add_tx_queue_data(const struct rte_eventdev *event_dev,
- 			struct otx2_ssogws *ws;
- 
- 			old_ws = event_dev->data->ports[i];
--			ws = rte_realloc_socket(old_ws,
--						sizeof(struct otx2_ssogws_dual)
--						+ (sizeof(uint64_t) *
--						   (dev->max_port_id + 1) *
--						   RTE_MAX_QUEUES_PER_PORT),
-+			ws = rte_realloc_socket(ssogws_get_cookie(old_ws),
-+						sizeof(struct otx2_ssogws) +
-+						RTE_CACHE_LINE_SIZE +
-+						(sizeof(uint64_t) *
-+						 (dev->max_port_id + 1) *
-+						 RTE_MAX_QUEUES_PER_PORT),
- 						RTE_CACHE_LINE_SIZE,
- 						event_dev->data->socket_id);
- 			if (ws == NULL)
- 				return -ENOMEM;
- 
-+			/* First cache line is reserved for cookie */
-+			ws = (struct otx2_ssogws *)
-+				((uint8_t *)ws + RTE_CACHE_LINE_SIZE);
-+
- 			((uint64_t (*)[RTE_MAX_QUEUES_PER_PORT]
- 			 )&ws->tx_adptr_data)[eth_port_id][tx_queue_id] =
- 				(uint64_t)txq;

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'compress/isal: check allocation in queue setup' has been queued to stable release 19.11.6
  2020-11-25  9:02           ` [dpdk-stable] patch 'doc: fix rule file parameters in l3fwd-acl guide' " luca.boccassi
                               ` (8 preceding siblings ...)
  2020-11-25  9:02             ` [dpdk-stable] patch 'event/octeontx2: unlink queues during port release' " luca.boccassi
@ 2020-11-25  9:02             ` luca.boccassi
  2020-11-25  9:02             ` [dpdk-stable] patch 'examples/l3fwd-power: check packet types after start' " luca.boccassi
                               ` (4 subsequent siblings)
  14 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-25  9:02 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Lee Daly, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/26/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3c163ed8106a391cf04fc865d4a5088ce3f25bb6

Thanks.

Luca Boccassi

---
From 3c163ed8106a391cf04fc865d4a5088ce3f25bb6 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Mon, 2 Nov 2020 19:36:24 +0800
Subject: [PATCH] compress/isal: check allocation in queue setup

[ upstream commit e816f5ede5acb09f0eb6bf7c42837c4a0d9f77f2 ]

The function rte_zmalloc() could return NULL, the return value
need to be checked.

Fixes: dc49e6aa4879 ("compress/isal: add ISA-L compression functionality")
Fixes: 7bf4f0630af6 ("compress/isal: add ISA-L decomp functionality")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Lee Daly <lee.daly@intel.com>
---
 drivers/compress/isal/isal_compress_pmd_ops.c | 20 ++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/drivers/compress/isal/isal_compress_pmd_ops.c b/drivers/compress/isal/isal_compress_pmd_ops.c
index 31c4559915..7d03749da3 100644
--- a/drivers/compress/isal/isal_compress_pmd_ops.c
+++ b/drivers/compress/isal/isal_compress_pmd_ops.c
@@ -249,16 +249,27 @@ isal_comp_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
 	qp->stream = rte_zmalloc_socket("Isa-l compression stream ",
 			sizeof(struct isal_zstream),  RTE_CACHE_LINE_SIZE,
 			socket_id);
-
+	if (qp->stream == NULL) {
+		ISAL_PMD_LOG(ERR, "Failed to allocate compression stream memory");
+		goto qp_setup_cleanup;
+	}
 	/* Initialize memory for compression level buffer */
 	qp->stream->level_buf = rte_zmalloc_socket("Isa-l compression lev_buf",
 			ISAL_DEF_LVL3_DEFAULT, RTE_CACHE_LINE_SIZE,
 			socket_id);
+	if (qp->stream->level_buf == NULL) {
+		ISAL_PMD_LOG(ERR, "Failed to allocate compression level_buf memory");
+		goto qp_setup_cleanup;
+	}
 
 	/* Initialize memory for decompression state structure */
 	qp->state = rte_zmalloc_socket("Isa-l decompression state",
 			sizeof(struct inflate_state), RTE_CACHE_LINE_SIZE,
 			socket_id);
+	if (qp->state == NULL) {
+		ISAL_PMD_LOG(ERR, "Failed to allocate decompression state memory");
+		goto qp_setup_cleanup;
+	}
 
 	qp->id = qp_id;
 	dev->data->queue_pairs[qp_id] = qp;
@@ -284,8 +295,11 @@ isal_comp_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
 	return 0;
 
 qp_setup_cleanup:
-	if (qp)
-		rte_free(qp);
+	if (qp->stream)
+		rte_free(qp->stream->level_buf);
+	rte_free(qp->stream);
+	rte_free(qp->state);
+	rte_free(qp);
 
 	return -1;
 }
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-24 16:50:37.031972475 +0000
+++ 0011-compress-isal-check-allocation-in-queue-setup.patch	2020-11-24 16:50:36.569496315 +0000
@@ -1 +1 @@
-From e816f5ede5acb09f0eb6bf7c42837c4a0d9f77f2 Mon Sep 17 00:00:00 2001
+From 3c163ed8106a391cf04fc865d4a5088ce3f25bb6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e816f5ede5acb09f0eb6bf7c42837c4a0d9f77f2 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'examples/l3fwd-power: check packet types after start' has been queued to stable release 19.11.6
  2020-11-25  9:02           ` [dpdk-stable] patch 'doc: fix rule file parameters in l3fwd-acl guide' " luca.boccassi
                               ` (9 preceding siblings ...)
  2020-11-25  9:02             ` [dpdk-stable] patch 'compress/isal: check allocation in queue setup' " luca.boccassi
@ 2020-11-25  9:02             ` luca.boccassi
  2020-11-25  9:02             ` [dpdk-stable] patch 'net/mlx5: fix representor interrupts handler' " luca.boccassi
                               ` (3 subsequent siblings)
  14 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-25  9:02 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/26/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b015138d9a73e355cda98840fe70da888cf1531b

Thanks.

Luca Boccassi

---
From b015138d9a73e355cda98840fe70da888cf1531b Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Tue, 17 Nov 2020 20:49:39 +0200
Subject: [PATCH] examples/l3fwd-power: check packet types after start

[ upstream commit 6184a02223722b929ae99dff2ba967626448dd63 ]

l3fwd-power uses `--parse-ptype' parameter to query egress packets
type.  Before that feature is enabled l3fwd-power verifies PMD ability
to advertise supported packet types with
rte_eth_dev_get_supported_ptypes().

The above ethdev function API contains this note:
"
Better to invoke this API after the device is already started or rx burst
function is decided, to obtain correct supported ptypes.
"

The patch updates code for PMDs that register supported types after
dev_start.

Fixes: 82bea4661626 ("examples/l3fwd-power: add --parse-ptype option")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
---
 examples/l3fwd-power/main.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index aa6ff2627b..7fe5cbf577 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -2445,9 +2445,7 @@ main(int argc, char **argv)
 				if (add_cb_parse_ptype(portid, queueid) < 0)
 					rte_exit(EXIT_FAILURE,
 						 "Fail to add ptype cb\n");
-			} else if (!check_ptype(portid))
-				rte_exit(EXIT_FAILURE,
-					 "PMD can not provide needed ptypes\n");
+			}
 		}
 	}
 
@@ -2478,6 +2476,11 @@ main(int argc, char **argv)
 		}
 		/* initialize spinlock for each port */
 		rte_spinlock_init(&(locks[portid]));
+
+		if (!parse_ptype)
+			if (!check_ptype(portid))
+				rte_exit(EXIT_FAILURE,
+					"PMD can not provide needed ptypes\n");
 	}
 
 	check_all_ports_link_status(enabled_port_mask);
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-24 16:50:37.069013320 +0000
+++ 0012-examples-l3fwd-power-check-packet-types-after-start.patch	2020-11-24 16:50:36.569496315 +0000
@@ -1 +1 @@
-From 6184a02223722b929ae99dff2ba967626448dd63 Mon Sep 17 00:00:00 2001
+From b015138d9a73e355cda98840fe70da888cf1531b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6184a02223722b929ae99dff2ba967626448dd63 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
-index 2874285c4e..995a3b6ad7 100644
+index aa6ff2627b..7fe5cbf577 100644
@@ -32 +33 @@
-@@ -2707,9 +2707,7 @@ main(int argc, char **argv)
+@@ -2445,9 +2445,7 @@ main(int argc, char **argv)
@@ -43 +44 @@
-@@ -2740,6 +2738,11 @@ main(int argc, char **argv)
+@@ -2478,6 +2476,11 @@ main(int argc, char **argv)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix representor interrupts handler' has been queued to stable release 19.11.6
  2020-11-25  9:02           ` [dpdk-stable] patch 'doc: fix rule file parameters in l3fwd-acl guide' " luca.boccassi
                               ` (10 preceding siblings ...)
  2020-11-25  9:02             ` [dpdk-stable] patch 'examples/l3fwd-power: check packet types after start' " luca.boccassi
@ 2020-11-25  9:02             ` luca.boccassi
  2020-11-25  9:02             ` [dpdk-stable] patch 'malloc: fix style in free list index computation' " luca.boccassi
                               ` (2 subsequent siblings)
  14 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-25  9:02 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/26/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/08e7b069e6c72c91f93305cdd89459af8fbd4ca4

Thanks.

Luca Boccassi

---
From 08e7b069e6c72c91f93305cdd89459af8fbd4ca4 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Tue, 17 Nov 2020 20:49:40 +0200
Subject: [PATCH] net/mlx5: fix representor interrupts handler

[ upstream commit 5882bde88da28b82f138676544ca9e807a9124f5 ]

Representor is a port in DPDK that is connected to a VF in such a way
that assuming there are no offload flows, each packet that is sent
from the VF will be received by the corresponding representor. While
each packet that is sent to a representor will be received by the VF.
This is very useful in case of SRIOV mode, where the first packet that
is sent by the VF will be received by the DPDK application which will
decide if this flow should be offloaded to the E-Switch.

Representor shares interrupts handler with host PF over the PCI
address. Therefore, after PF completes its interrupts handler
initialization, no additional actions required for representor.

Fixes: 26c08b979d26 ("net/mlx5: add port representor awareness")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index f3c2d99c15..104687db39 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -723,6 +723,9 @@ mlx5_rx_intr_vec_enable(struct rte_eth_dev *dev)
 	unsigned int count = 0;
 	struct rte_intr_handle *intr_handle = dev->intr_handle;
 
+	/* Representor shares dev->intr_handle with PF. */
+	if (priv->representor)
+		return 0;
 	if (!dev->data->dev_conf.intr_conf.rxq)
 		return 0;
 	mlx5_rx_intr_vec_disable(dev);
@@ -800,6 +803,9 @@ mlx5_rx_intr_vec_disable(struct rte_eth_dev *dev)
 	unsigned int rxqs_n = priv->rxqs_n;
 	unsigned int n = RTE_MIN(rxqs_n, (uint32_t)RTE_MAX_RXTX_INTR_VEC_ID);
 
+	/* Representor shares dev->intr_handle with PF. */
+	if (priv->representor)
+		return;
 	if (!dev->data->dev_conf.intr_conf.rxq)
 		return;
 	if (!intr_handle->intr_vec)
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-24 16:50:37.108119220 +0000
+++ 0013-net-mlx5-fix-representor-interrupts-handler.patch	2020-11-24 16:50:36.573496401 +0000
@@ -1 +1 @@
-From 5882bde88da28b82f138676544ca9e807a9124f5 Mon Sep 17 00:00:00 2001
+From 08e7b069e6c72c91f93305cdd89459af8fbd4ca4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5882bde88da28b82f138676544ca9e807a9124f5 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index f298327005..da7a8b3cd7 100644
+index f3c2d99c15..104687db39 100644
@@ -31 +32 @@
-@@ -902,6 +902,9 @@ mlx5_rx_intr_vec_enable(struct rte_eth_dev *dev)
+@@ -723,6 +723,9 @@ mlx5_rx_intr_vec_enable(struct rte_eth_dev *dev)
@@ -41 +42 @@
-@@ -982,6 +985,9 @@ mlx5_rx_intr_vec_disable(struct rte_eth_dev *dev)
+@@ -800,6 +803,9 @@ mlx5_rx_intr_vec_disable(struct rte_eth_dev *dev)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'malloc: fix style in free list index computation' has been queued to stable release 19.11.6
  2020-11-25  9:02           ` [dpdk-stable] patch 'doc: fix rule file parameters in l3fwd-acl guide' " luca.boccassi
                               ` (11 preceding siblings ...)
  2020-11-25  9:02             ` [dpdk-stable] patch 'net/mlx5: fix representor interrupts handler' " luca.boccassi
@ 2020-11-25  9:02             ` luca.boccassi
  2020-11-25  9:02             ` [dpdk-stable] patch 'build: fix gcc warning requiring Wformat' " luca.boccassi
  2020-11-25  9:02             ` [dpdk-stable] patch 'usertools: fix pmdinfo parsing' " luca.boccassi
  14 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-25  9:02 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/26/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6cd180318fe67a6d9fc0d0eb307f38d1a254374b

Thanks.

Luca Boccassi

---
From 6cd180318fe67a6d9fc0d0eb307f38d1a254374b Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Thu, 12 Nov 2020 17:31:15 +0800
Subject: [PATCH] malloc: fix style in free list index computation

[ upstream commit a99d2521a3b8e33c34eb8fdf5719c0e8f0cf07a7 ]

Cleanup code style issue reported by kernel checkpatch. As follows:
  * ERROR:CODE_INDENT: code indent should use tabs where possible
  * ERROR:SPACING: spaces required around that '?' (ctx:VxE)
  * WARNING:INDENTED_LABEL: labels should not be indented

Fixes: b0489e7bca2f ("malloc: fix linear complexity")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/malloc_elem.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/common/malloc_elem.c b/lib/librte_eal/common/malloc_elem.c
index 51cdfc5d59..a0f2d22774 100644
--- a/lib/librte_eal/common/malloc_elem.c
+++ b/lib/librte_eal/common/malloc_elem.c
@@ -382,14 +382,14 @@ malloc_elem_free_list_index(size_t size)
 		return 0;
 
 	/* Find next power of 2 >= size. */
-	log2 = sizeof(size) * 8 - __builtin_clzl(size-1);
+	log2 = sizeof(size) * 8 - __builtin_clzl(size - 1);
 
 	/* Compute freelist index, based on log2(size). */
 	index = (log2 - MALLOC_MINSIZE_LOG2 + MALLOC_LOG2_INCREMENT - 1) /
-	        MALLOC_LOG2_INCREMENT;
+			MALLOC_LOG2_INCREMENT;
 
-	return index <= RTE_HEAP_NUM_FREELISTS-1?
-	        index: RTE_HEAP_NUM_FREELISTS-1;
+	return index <= RTE_HEAP_NUM_FREELISTS - 1 ?
+			index : RTE_HEAP_NUM_FREELISTS - 1;
 }
 
 /*
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-24 16:50:37.146359551 +0000
+++ 0014-malloc-fix-style-in-free-list-index-computation.patch	2020-11-24 16:50:36.577496485 +0000
@@ -1 +1 @@
-From a99d2521a3b8e33c34eb8fdf5719c0e8f0cf07a7 Mon Sep 17 00:00:00 2001
+From 6cd180318fe67a6d9fc0d0eb307f38d1a254374b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a99d2521a3b8e33c34eb8fdf5719c0e8f0cf07a7 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index c70112f84d..c2c9461f1d 100644
+index 51cdfc5d59..a0f2d22774 100644
@@ -24 +25 @@
-@@ -391,14 +391,14 @@ malloc_elem_free_list_index(size_t size)
+@@ -382,14 +382,14 @@ malloc_elem_free_list_index(size_t size)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'build: fix gcc warning requiring Wformat' has been queued to stable release 19.11.6
  2020-11-25  9:02           ` [dpdk-stable] patch 'doc: fix rule file parameters in l3fwd-acl guide' " luca.boccassi
                               ` (12 preceding siblings ...)
  2020-11-25  9:02             ` [dpdk-stable] patch 'malloc: fix style in free list index computation' " luca.boccassi
@ 2020-11-25  9:02             ` luca.boccassi
  2020-11-25  9:02             ` [dpdk-stable] patch 'usertools: fix pmdinfo parsing' " luca.boccassi
  14 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-25  9:02 UTC (permalink / raw)
  To: Conor Walsh; +Cc: Lingli Chen, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/26/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/dd2c4e336023676ec665e94af942ac993d5a7532

Thanks.

Luca Boccassi

---
From dd2c4e336023676ec665e94af942ac993d5a7532 Mon Sep 17 00:00:00 2001
From: Conor Walsh <conor.walsh@intel.com>
Date: Thu, 19 Nov 2020 10:16:59 +0000
Subject: [PATCH] build: fix gcc warning requiring Wformat

[ upstream commit 654e893436649ca6a876b0bd0f30b4357edc4462 ]

On some CentOS/RHEL systems using gcc 8.3.1 to compile dpdk, gcc shows a
warning on every build step saying that -Wformat-nonliteral and
-Wformat-security warnings will be ignored unless -Wformat is
also specified as a compiler flag. When the build is run with -werror
the build will fail due to these warnings.

Exact warning returned:
cc1: error: -Wformat-nonliteral ignored without -Wformat
[-Werror=format-nonliteral]
cc1: error: -Wformat-security ignored without -Wformat
[-Werror=format-security]
cc1: all warnings being treated as errors

This patch adds the -Wformat flag to config/meson.build. The warning id
181 has also been suppressed in icc as icc was showing false positives
with -Wformat enabled.

Fixes: 524a0d5d66b9 ("build: enable extra warnings with meson")

Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Tested-by: Lingli Chen <linglix.chen@intel.com>
---
 config/meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/config/meson.build b/config/meson.build
index fca0461d67..bab00f1489 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -183,6 +183,7 @@ warning_flags = [
 	# additional warnings in alphabetical order
 	'-Wcast-qual',
 	'-Wdeprecated',
+	'-Wformat',
 	'-Wformat-nonliteral',
 	'-Wformat-security',
 	'-Wmissing-declarations',
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-24 16:50:37.183903447 +0000
+++ 0015-build-fix-gcc-warning-requiring-Wformat.patch	2020-11-24 16:50:36.577496485 +0000
@@ -1 +1 @@
-From 654e893436649ca6a876b0bd0f30b4357edc4462 Mon Sep 17 00:00:00 2001
+From dd2c4e336023676ec665e94af942ac993d5a7532 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 654e893436649ca6a876b0bd0f30b4357edc4462 ]
+
@@ -24 +25,0 @@
-Cc: stable@dpdk.org
@@ -29,2 +30,2 @@
- config/meson.build | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
+ config/meson.build | 1 +
+ 1 file changed, 1 insertion(+)
@@ -33 +34 @@
-index a29693b883..c02802c18e 100644
+index fca0461d67..bab00f1489 100644
@@ -36 +37 @@
-@@ -194,6 +194,7 @@ warning_flags = [
+@@ -183,6 +183,7 @@ warning_flags = [
@@ -44,9 +44,0 @@
-@@ -220,7 +221,7 @@ if not dpdk_conf.get('RTE_ARCH_64')
- 	warning_flags += '-Wno-pointer-to-int-cast'
- endif
- if cc.get_id() == 'intel'
--	warning_ids = [188, 2203, 2279, 2557, 3179, 3656]
-+	warning_ids = [181, 188, 2203, 2279, 2557, 3179, 3656]
- 	foreach i:warning_ids
- 		warning_flags += '-diag-disable=@0@'.format(i)
- 	endforeach

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'usertools: fix pmdinfo parsing' has been queued to stable release 19.11.6
  2020-11-25  9:02           ` [dpdk-stable] patch 'doc: fix rule file parameters in l3fwd-acl guide' " luca.boccassi
                               ` (13 preceding siblings ...)
  2020-11-25  9:02             ` [dpdk-stable] patch 'build: fix gcc warning requiring Wformat' " luca.boccassi
@ 2020-11-25  9:02             ` luca.boccassi
  14 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-25  9:02 UTC (permalink / raw)
  To: Julien Massonneau; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/26/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/2aebe817793e60aaa7fea8186ab827e98b8d3651

Thanks.

Luca Boccassi

---
From 2aebe817793e60aaa7fea8186ab827e98b8d3651 Mon Sep 17 00:00:00 2001
From: Julien Massonneau <julien.massonneau@6wind.com>
Date: Thu, 19 Nov 2020 10:44:01 +0100
Subject: [PATCH] usertools: fix pmdinfo parsing
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 3515fa1e5ecbe0099cb886b81ba77058d1a2d397 ]

In the display_pmd_info_strings function, the script parses the section
until to find a byte between 32 and 127, and get all data
until a byte equals to 0.
After, it searches "PMD_INFO_STRING" in the data and passes the whole
string in the parse_pmd_info_string function, which split the string
with "=" and convert it in python dict with json.loads().

But the string may contain a "=" before "PMD_INFO_STRING",
so it is not correctly split and will lead to an error
(json.decoder.JSONDecodeError).

Example of a string encountered that leads to an error:

"Ag%=C£°ÐÊ+Ë®{0´wË-£0òjB·;¾¬úPMD_INFO_STRING= {"name" :
"net_octeontx", "params" : "nr_port=<int> ", "pci_ids" : []}"

Fixes: c67c9a5c646a ("tools: query binaries for HW and other support information")

Signed-off-by: Julien Massonneau <julien.massonneau@6wind.com>
---
 usertools/dpdk-pmdinfo.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usertools/dpdk-pmdinfo.py b/usertools/dpdk-pmdinfo.py
index 12f20735e0..27e1cad328 100755
--- a/usertools/dpdk-pmdinfo.py
+++ b/usertools/dpdk-pmdinfo.py
@@ -352,7 +352,7 @@ class ReadElf(object):
             mystring = force_unicode(data[dataptr:endptr])
             rc = mystring.find("PMD_INFO_STRING")
             if (rc != -1):
-                self.parse_pmd_info_string(mystring)
+                self.parse_pmd_info_string(mystring[rc:])
 
             dataptr = endptr
 
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-24 16:50:37.223769666 +0000
+++ 0016-usertools-fix-pmdinfo-parsing.patch	2020-11-24 16:50:36.577496485 +0000
@@ -1 +1 @@
-From 3515fa1e5ecbe0099cb886b81ba77058d1a2d397 Mon Sep 17 00:00:00 2001
+From 2aebe817793e60aaa7fea8186ab827e98b8d3651 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 3515fa1e5ecbe0099cb886b81ba77058d1a2d397 ]
+
@@ -26 +27,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
-index b4e8a48cde..3381aa616c 100755
+index 12f20735e0..27e1cad328 100755
@@ -37 +38 @@
-@@ -346,7 +346,7 @@ class ReadElf(object):
+@@ -352,7 +352,7 @@ class ReadElf(object):
@@ -40 +41 @@
-             if rc != -1:
+             if (rc != -1):

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'mcslock: fix hang in weak memory model' has been queued to stable release 19.11.6
  2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
                   ` (205 preceding siblings ...)
  2020-10-28 10:46 ` [dpdk-stable] patch 'config: add Graviton2(arm64) defconfig' " luca.boccassi
@ 2020-11-30 11:50 ` luca.boccassi
  2020-11-30 11:50   ` [dpdk-stable] patch 'net/hinic/base: remove queue number limitation' " luca.boccassi
                     ` (7 more replies)
  206 siblings, 8 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-30 11:50 UTC (permalink / raw)
  To: Diogo Behrens; +Cc: Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/02/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/22023fd68b0f0fff0c4a2fefcd3c33b5a941a5d7

Thanks.

Luca Boccassi

---
From 22023fd68b0f0fff0c4a2fefcd3c33b5a941a5d7 Mon Sep 17 00:00:00 2001
From: Diogo Behrens <diogo.behrens@huawei.com>
Date: Wed, 26 Aug 2020 11:20:02 +0200
Subject: [PATCH] mcslock: fix hang in weak memory model

[ upstream commit 021b698eb56e48009d74d818bea5a9bdad4f54fa ]

The initialization me->locked=1 in lock() must happen before
next->locked=0 in unlock(), otherwise a thread may hang forever,
waiting me->locked become 0. On weak memory systems (such as ARMv8),
the current implementation allows me->locked=1 to be reordered with
announcing the node (pred->next=me) and, consequently, to be
reordered with next->locked=0 in unlock().

This fix adds a release barrier to pred->next=me, forcing
me->locked=1 to happen before this operation.

Fixes: 2173f3333b61 ("mcslock: add MCS queued lock implementation")

Signed-off-by: Diogo Behrens <diogo.behrens@huawei.com>
Acked-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 lib/librte_eal/common/include/generic/rte_mcslock.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/include/generic/rte_mcslock.h b/lib/librte_eal/common/include/generic/rte_mcslock.h
index 2bef28351c..ce553f5475 100644
--- a/lib/librte_eal/common/include/generic/rte_mcslock.h
+++ b/lib/librte_eal/common/include/generic/rte_mcslock.h
@@ -68,7 +68,14 @@ rte_mcslock_lock(rte_mcslock_t **msl, rte_mcslock_t *me)
 		 */
 		return;
 	}
-	__atomic_store_n(&prev->next, me, __ATOMIC_RELAXED);
+	/* The store to me->next above should also complete before the node is
+	 * visible to predecessor thread releasing the lock. Hence, the store
+	 * prev->next also requires release semantics. Note that, for example,
+	 * on ARM, the release semantics in the exchange operation is not
+	 * strong as a release fence and is not sufficient to enforce the
+	 * desired order here.
+	 */
+	__atomic_store_n(&prev->next, me, __ATOMIC_RELEASE);
 
 	/* The while-load of me->locked should not move above the previous
 	 * store to prev->next. Otherwise it will cause a deadlock. Need a
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-30 11:49:30.431485317 +0000
+++ 0001-mcslock-fix-hang-in-weak-memory-model.patch	2020-11-30 11:49:30.382271364 +0000
@@ -1 +1 @@
-From 021b698eb56e48009d74d818bea5a9bdad4f54fa Mon Sep 17 00:00:00 2001
+From 22023fd68b0f0fff0c4a2fefcd3c33b5a941a5d7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 021b698eb56e48009d74d818bea5a9bdad4f54fa ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
- lib/librte_eal/include/generic/rte_mcslock.h | 9 ++++++++-
+ lib/librte_eal/common/include/generic/rte_mcslock.h | 9 ++++++++-
@@ -25,5 +26,5 @@
-diff --git a/lib/librte_eal/include/generic/rte_mcslock.h b/lib/librte_eal/include/generic/rte_mcslock.h
-index 78b0df295e..d370bef17a 100644
---- a/lib/librte_eal/include/generic/rte_mcslock.h
-+++ b/lib/librte_eal/include/generic/rte_mcslock.h
-@@ -64,7 +64,14 @@ rte_mcslock_lock(rte_mcslock_t **msl, rte_mcslock_t *me)
+diff --git a/lib/librte_eal/common/include/generic/rte_mcslock.h b/lib/librte_eal/common/include/generic/rte_mcslock.h
+index 2bef28351c..ce553f5475 100644
+--- a/lib/librte_eal/common/include/generic/rte_mcslock.h
++++ b/lib/librte_eal/common/include/generic/rte_mcslock.h
+@@ -68,7 +68,14 @@ rte_mcslock_lock(rte_mcslock_t **msl, rte_mcslock_t *me)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/hinic/base: remove queue number limitation' has been queued to stable release 19.11.6
  2020-11-30 11:50 ` [dpdk-stable] patch 'mcslock: fix hang in weak memory model' " luca.boccassi
@ 2020-11-30 11:50   ` luca.boccassi
  2020-11-30 11:50   ` [dpdk-stable] patch 'net/hinic: remove optical module operation' " luca.boccassi
                     ` (6 subsequent siblings)
  7 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-30 11:50 UTC (permalink / raw)
  To: Guoyang Zhou; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/02/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6767e3c2cdbd4cde34f649aaff355de06003a912

Thanks.

Luca Boccassi

---
From 6767e3c2cdbd4cde34f649aaff355de06003a912 Mon Sep 17 00:00:00 2001
From: Guoyang Zhou <zhouguoyang@huawei.com>
Date: Tue, 24 Nov 2020 14:45:33 +0800
Subject: [PATCH] net/hinic/base: remove queue number limitation

[ upstream commit acf4aeafcef7baf187d980041ab9b23aa56733c1 ]

The maximum number of queues on the chip can be any value greater
than 0, it does not have to be the power of two, if it does not be
fixed, dpdk initialization may be failed with OVS mode firmware.

Fixes: 828d3e15a9dc ("net/hinic/base: support context and work queue")

Signed-off-by: Guoyang Zhou <zhouguoyang@huawei.com>
---
 drivers/net/hinic/base/hinic_pmd_nicio.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/net/hinic/base/hinic_pmd_nicio.c b/drivers/net/hinic/base/hinic_pmd_nicio.c
index 1ce065c6f7..9d9f2a7a56 100644
--- a/drivers/net/hinic/base/hinic_pmd_nicio.c
+++ b/drivers/net/hinic/base/hinic_pmd_nicio.c
@@ -763,11 +763,6 @@ static int hinic_alloc_nicio(struct hinic_hwdev *hwdev)
 	int err;
 
 	max_qps = hinic_func_max_qnum(hwdev);
-	if ((max_qps & (max_qps - 1))) {
-		PMD_DRV_LOG(ERR, "wrong number of max_qps: %d",
-			max_qps);
-		return -EINVAL;
-	}
 
 	nic_io->max_qps = max_qps;
 	nic_io->num_qps = max_qps;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-30 11:49:30.459743934 +0000
+++ 0002-net-hinic-base-remove-queue-number-limitation.patch	2020-11-30 11:49:30.386271440 +0000
@@ -1 +1 @@
-From acf4aeafcef7baf187d980041ab9b23aa56733c1 Mon Sep 17 00:00:00 2001
+From 6767e3c2cdbd4cde34f649aaff355de06003a912 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit acf4aeafcef7baf187d980041ab9b23aa56733c1 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 2736305156..162308b02f 100644
+index 1ce065c6f7..9d9f2a7a56 100644
@@ -22 +23 @@
-@@ -758,11 +758,6 @@ static int hinic_alloc_nicio(struct hinic_hwdev *hwdev)
+@@ -763,11 +763,6 @@ static int hinic_alloc_nicio(struct hinic_hwdev *hwdev)
@@ -27 +28 @@
--		PMD_DRV_LOG(ERR, "Wrong number of max_qps: %d",
+-		PMD_DRV_LOG(ERR, "wrong number of max_qps: %d",

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'net/hinic: remove optical module operation' has been queued to stable release 19.11.6
  2020-11-30 11:50 ` [dpdk-stable] patch 'mcslock: fix hang in weak memory model' " luca.boccassi
  2020-11-30 11:50   ` [dpdk-stable] patch 'net/hinic/base: remove queue number limitation' " luca.boccassi
@ 2020-11-30 11:50   ` luca.boccassi
  2020-11-30 11:50   ` [dpdk-stable] patch 'doc: fix grammar' " luca.boccassi
                     ` (5 subsequent siblings)
  7 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-30 11:50 UTC (permalink / raw)
  To: Guoyang Zhou; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/02/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6a421d88cce65d4bb3d0aac76df6572ede3e972c

Thanks.

Luca Boccassi

---
From 6a421d88cce65d4bb3d0aac76df6572ede3e972c Mon Sep 17 00:00:00 2001
From: Guoyang Zhou <zhouguoyang@huawei.com>
Date: Tue, 24 Nov 2020 14:45:34 +0800
Subject: [PATCH] net/hinic: remove optical module operation

[ upstream commit c07912fe9fb81700d48a691f67978b3ca1c56d45 ]

Remove the operation of optical modules in the link function, because
when device binds from dpdk to kernel, it will be linked failed. This
function does not take effect in cable mode, therefore, optimization
is required.

Fixes: 54ac33869932 ("net/hinic: set link down and up")

Signed-off-by: Guoyang Zhou <zhouguoyang@huawei.com>
---
 drivers/net/hinic/base/hinic_pmd_niccfg.c | 38 -----------------------
 drivers/net/hinic/base/hinic_pmd_niccfg.h |  2 --
 drivers/net/hinic/hinic_pmd_ethdev.c      | 14 ---------
 3 files changed, 54 deletions(-)

diff --git a/drivers/net/hinic/base/hinic_pmd_niccfg.c b/drivers/net/hinic/base/hinic_pmd_niccfg.c
index ad81fdde48..610f56d617 100644
--- a/drivers/net/hinic/base/hinic_pmd_niccfg.c
+++ b/drivers/net/hinic/base/hinic_pmd_niccfg.c
@@ -1647,44 +1647,6 @@ int hinic_get_link_mode(void *hwdev, u32 *supported, u32 *advertised)
 	return 0;
 }
 
-/**
- * hinic_set_xsfp_tx_status - Enable or disable the fiber in
- * tx direction when set link up or down.
- *
- * @param hwdev
- *   The hardware interface of a nic device.
- * @param enable
- *   Enable or Disable.
- *
- * @return
- *   0 on success.
- *   negative error value otherwise.
- */
-int hinic_set_xsfp_tx_status(void *hwdev, bool enable)
-{
-	struct hinic_set_xsfp_status xsfp_status;
-	u16 out_size = sizeof(struct hinic_set_xsfp_status);
-	int err;
-
-	memset(&xsfp_status, 0, sizeof(xsfp_status));
-	xsfp_status.mgmt_msg_head.resp_aeq_num = HINIC_AEQ1;
-	xsfp_status.port_id = hinic_global_func_id(hwdev);
-	xsfp_status.xsfp_tx_dis = ((enable == 0) ? 1 : 0);
-
-	err = l2nic_msg_to_mgmt_sync(hwdev, HINIC_PORT_CMD_SET_XSFP_STATUS,
-		&xsfp_status, sizeof(struct hinic_set_xsfp_status),
-		&xsfp_status, &out_size);
-	if (err || !out_size || xsfp_status.mgmt_msg_head.status) {
-		PMD_DRV_LOG(ERR,
-			"Failed to %s port xsfp status, err: %d, status: 0x%x, out size: 0x%x\n",
-			enable ? "Disable" : "Enable", err,
-			xsfp_status.mgmt_msg_head.status, out_size);
-		return -EFAULT;
-	}
-
-	return 0;
-}
-
 /**
  * hinic_flush_qp_res - Flush tx && rx chip resources in case of set vport
  * fake failed when device start.
diff --git a/drivers/net/hinic/base/hinic_pmd_niccfg.h b/drivers/net/hinic/base/hinic_pmd_niccfg.h
index b9e037ec2d..bf39b0272b 100644
--- a/drivers/net/hinic/base/hinic_pmd_niccfg.h
+++ b/drivers/net/hinic/base/hinic_pmd_niccfg.h
@@ -827,8 +827,6 @@ int hinic_set_link_status_follow(void *hwdev,
 
 int hinic_get_link_mode(void *hwdev, u32 *supported, u32 *advertised);
 
-int hinic_set_xsfp_tx_status(void *hwdev, bool enable);
-
 int hinic_flush_qp_res(void *hwdev);
 
 int hinic_init_function_table(void *hwdev, u16 rx_buf_sz);
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index 270e5791b8..a0499da7d4 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -941,13 +941,6 @@ static int hinic_dev_set_link_up(struct rte_eth_dev *dev)
 	struct hinic_nic_dev *nic_dev = HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV(dev);
 	int ret;
 
-	ret = hinic_set_xsfp_tx_status(nic_dev->hwdev, true);
-	if (ret) {
-		PMD_DRV_LOG(ERR, "Enable port tx xsfp failed, dev_name: %s, port_id: %d",
-			    nic_dev->proc_dev_name, dev->data->port_id);
-		return ret;
-	}
-
 	/* link status follow phy port status, up will open pma */
 	ret = hinic_set_port_enable(nic_dev->hwdev, true);
 	if (ret)
@@ -971,13 +964,6 @@ static int hinic_dev_set_link_down(struct rte_eth_dev *dev)
 	struct hinic_nic_dev *nic_dev = HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV(dev);
 	int ret;
 
-	ret = hinic_set_xsfp_tx_status(nic_dev->hwdev, false);
-	if (ret) {
-		PMD_DRV_LOG(ERR, "Disable port tx xsfp failed, dev_name: %s, port_id: %d",
-			    nic_dev->proc_dev_name, dev->data->port_id);
-		return ret;
-	}
-
 	/* link status follow phy port status, up will close pma */
 	ret = hinic_set_port_enable(nic_dev->hwdev, false);
 	if (ret)
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-30 11:49:30.489491046 +0000
+++ 0003-net-hinic-remove-optical-module-operation.patch	2020-11-30 11:49:30.394271593 +0000
@@ -1 +1 @@
-From c07912fe9fb81700d48a691f67978b3ca1c56d45 Mon Sep 17 00:00:00 2001
+From 6a421d88cce65d4bb3d0aac76df6572ede3e972c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c07912fe9fb81700d48a691f67978b3ca1c56d45 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index be6445d719..8c08d63286 100644
+index ad81fdde48..610f56d617 100644
@@ -25 +26 @@
-@@ -1658,44 +1658,6 @@ int hinic_get_link_mode(void *hwdev, u32 *supported, u32 *advertised)
+@@ -1647,44 +1647,6 @@ int hinic_get_link_mode(void *hwdev, u32 *supported, u32 *advertised)
@@ -61 +62 @@
--		return -EIO;
+-		return -EFAULT;
@@ -71 +72 @@
-index 73b16b4d69..04cd374ca6 100644
+index b9e037ec2d..bf39b0272b 100644
@@ -74 +75 @@
-@@ -909,8 +909,6 @@ int hinic_set_link_status_follow(void *hwdev,
+@@ -827,8 +827,6 @@ int hinic_set_link_status_follow(void *hwdev,
@@ -84 +85 @@
-index 378f2c810b..62642354cf 100644
+index 270e5791b8..a0499da7d4 100644
@@ -87 +88 @@
-@@ -939,13 +939,6 @@ static int hinic_dev_set_link_up(struct rte_eth_dev *dev)
+@@ -941,13 +941,6 @@ static int hinic_dev_set_link_up(struct rte_eth_dev *dev)
@@ -101 +102 @@
-@@ -969,13 +962,6 @@ static int hinic_dev_set_link_down(struct rte_eth_dev *dev)
+@@ -971,13 +964,6 @@ static int hinic_dev_set_link_down(struct rte_eth_dev *dev)

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'doc: fix grammar' has been queued to stable release 19.11.6
  2020-11-30 11:50 ` [dpdk-stable] patch 'mcslock: fix hang in weak memory model' " luca.boccassi
  2020-11-30 11:50   ` [dpdk-stable] patch 'net/hinic/base: remove queue number limitation' " luca.boccassi
  2020-11-30 11:50   ` [dpdk-stable] patch 'net/hinic: remove optical module operation' " luca.boccassi
@ 2020-11-30 11:50   ` luca.boccassi
  2020-11-30 11:50   ` [dpdk-stable] patch 'doc: add SPDX license tag header to Intel performance guide' " luca.boccassi
                     ` (4 subsequent siblings)
  7 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-30 11:50 UTC (permalink / raw)
  To: Sarosh Arif; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/02/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/d91d1aa17e33d647bc582336ada1d3538e395cb9

Thanks.

Luca Boccassi

---
From d91d1aa17e33d647bc582336ada1d3538e395cb9 Mon Sep 17 00:00:00 2001
From: Sarosh Arif <sarosh.arif@emumba.com>
Date: Wed, 16 Sep 2020 16:14:38 +0500
Subject: [PATCH] doc: fix grammar

[ upstream commit c053d9e9629b2337093dfd344eb904f0aff703bd ]

This patch corrects a grammatical error by changing 'an DPDK' to 'a DPDK',
so that the sentences can become grammatically accurate.

Fixes: 2e486e26328c ("doc: remove Intel references from linux guide")
Fixes: 48624fd96e7c ("doc: remove Intel references from prog guide")
Fixes: e0c7c4731957 ("doc: remove Intel references from sample apps guide")

Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 doc/guides/linux_gsg/build_sample_apps.rst        | 4 ++--
 doc/guides/linux_gsg/enable_func.rst              | 2 +-
 doc/guides/linux_gsg/linux_drivers.rst            | 2 +-
 doc/guides/linux_gsg/sys_reqs.rst                 | 2 +-
 doc/guides/prog_guide/multi_proc_support.rst      | 2 +-
 doc/guides/sample_app_ug/l3_forward_power_man.rst | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/doc/guides/linux_gsg/build_sample_apps.rst b/doc/guides/linux_gsg/build_sample_apps.rst
index 2f606535c3..2c2f5faec5 100644
--- a/doc/guides/linux_gsg/build_sample_apps.rst
+++ b/doc/guides/linux_gsg/build_sample_apps.rst
@@ -4,7 +4,7 @@
 Compiling and Running Sample Applications
 =========================================
 
-The chapter describes how to compile and run applications in an DPDK environment.
+The chapter describes how to compile and run applications in a DPDK environment.
 It also provides a pointer to where sample applications are stored.
 
 .. note::
@@ -185,7 +185,7 @@ Each bit of the mask corresponds to the equivalent logical core number as report
 Since these logical core numbers, and their mapping to specific cores on specific NUMA sockets, can vary from platform to platform,
 it is recommended that the core layout for each platform be considered when choosing the coremask/corelist to use in each case.
 
-On initialization of the EAL layer by an DPDK application, the logical cores to be used and their socket location are displayed.
+On initialization of the EAL layer by a DPDK application, the logical cores to be used and their socket location are displayed.
 This information can also be determined for all cores on the system by examining the ``/proc/cpuinfo`` file, for example, by running cat ``/proc/cpuinfo``.
 The physical id attribute listed for each processor indicates the CPU socket to which it belongs.
 This can be useful when using other processors to understand the mapping of the logical cores to the sockets.
diff --git a/doc/guides/linux_gsg/enable_func.rst b/doc/guides/linux_gsg/enable_func.rst
index b2bda80bb7..ad11bc9e4e 100644
--- a/doc/guides/linux_gsg/enable_func.rst
+++ b/doc/guides/linux_gsg/enable_func.rst
@@ -112,7 +112,7 @@ In addition, C3 and C6 should be enabled as well for power management. The path
 Using Linux Core Isolation to Reduce Context Switches
 -----------------------------------------------------
 
-While the threads used by an DPDK application are pinned to logical cores on the system,
+While the threads used by a DPDK application are pinned to logical cores on the system,
 it is possible for the Linux scheduler to run other tasks on those cores also.
 To help prevent additional workloads from running on those cores,
 it is possible to use the ``isolcpus`` Linux kernel parameter to isolate them from the general Linux scheduler.
diff --git a/doc/guides/linux_gsg/linux_drivers.rst b/doc/guides/linux_gsg/linux_drivers.rst
index e0816f996e..96817e78cd 100644
--- a/doc/guides/linux_gsg/linux_drivers.rst
+++ b/doc/guides/linux_gsg/linux_drivers.rst
@@ -120,7 +120,7 @@ Binding and Unbinding Network Ports to/from the Kernel Modules
     PMDs Which use the bifurcated driver should not be unbind from their kernel drivers. this section is for PMDs which use the UIO or VFIO drivers.
 
 As of release 1.4, DPDK applications no longer automatically unbind all supported network ports from the kernel driver in use.
-Instead, in case the PMD being used use the UIO or VFIO drivers, all ports that are to be used by an DPDK application must be bound to the
+Instead, in case the PMD being used use the UIO or VFIO drivers, all ports that are to be used by a DPDK application must be bound to the
 ``uio_pci_generic``, ``igb_uio`` or ``vfio-pci`` module before the application is run.
 For such PMDs, any network ports under Linux* control will be ignored and cannot be used by the application.
 
diff --git a/doc/guides/linux_gsg/sys_reqs.rst b/doc/guides/linux_gsg/sys_reqs.rst
index 7c47ec04ce..cf760a6c67 100644
--- a/doc/guides/linux_gsg/sys_reqs.rst
+++ b/doc/guides/linux_gsg/sys_reqs.rst
@@ -107,7 +107,7 @@ e.g. :doc:`../nics/index`
 Running DPDK Applications
 -------------------------
 
-To run an DPDK application, some customization may be required on the target machine.
+To run a DPDK application, some customization may be required on the target machine.
 
 System Software
 ~~~~~~~~~~~~~~~
diff --git a/doc/guides/prog_guide/multi_proc_support.rst b/doc/guides/prog_guide/multi_proc_support.rst
index a84083b96c..1a4a9e2d4d 100644
--- a/doc/guides/prog_guide/multi_proc_support.rst
+++ b/doc/guides/prog_guide/multi_proc_support.rst
@@ -75,7 +75,7 @@ and point to the same objects, in both processes.
 
 
 The EAL also supports an auto-detection mode (set by EAL ``--proc-type=auto`` flag ),
-whereby an DPDK process is started as a secondary instance if a primary instance is already running.
+whereby a DPDK process is started as a secondary instance if a primary instance is already running.
 
 Deployment Models
 -----------------
diff --git a/doc/guides/sample_app_ug/l3_forward_power_man.rst b/doc/guides/sample_app_ug/l3_forward_power_man.rst
index 6ec24f4ad8..dbdaa743dd 100644
--- a/doc/guides/sample_app_ug/l3_forward_power_man.rst
+++ b/doc/guides/sample_app_ug/l3_forward_power_man.rst
@@ -49,7 +49,7 @@ to set the CPUFreq governor and set the frequency of specific cores.
 
 This application includes a P-state power management algorithm to generate a frequency hint to be sent to CPUFreq.
 The algorithm uses the number of received and available Rx packets on recent polls to make a heuristic decision to scale frequency up/down.
-Specifically, some thresholds are checked to see whether a specific core running an DPDK polling thread needs to increase frequency
+Specifically, some thresholds are checked to see whether a specific core running a DPDK polling thread needs to increase frequency
 a step up based on the near to full trend of polled Rx queues.
 Also, it decreases frequency a step if packet processed per loop is far less than the expected threshold
 or the thread's sleeping time exceeds a threshold.
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-30 11:49:30.523523444 +0000
+++ 0004-doc-fix-grammar.patch	2020-11-30 11:49:30.398271670 +0000
@@ -1 +1 @@
-From c053d9e9629b2337093dfd344eb904f0aff703bd Mon Sep 17 00:00:00 2001
+From d91d1aa17e33d647bc582336ada1d3538e395cb9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c053d9e9629b2337093dfd344eb904f0aff703bd ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 043a1dcee1..994db4b6a0 100644
+index 2f606535c3..2c2f5faec5 100644
@@ -30,2 +31,2 @@
- Running Sample Applications
- ===========================
+ Compiling and Running Sample Applications
+ =========================================
@@ -38 +39 @@
-@@ -136,7 +136,7 @@ Each bit of the mask corresponds to the equivalent logical core number as report
+@@ -185,7 +185,7 @@ Each bit of the mask corresponds to the equivalent logical core number as report
@@ -48 +49 @@
-index aab32252ea..a2339a877b 100644
+index b2bda80bb7..ad11bc9e4e 100644
@@ -51 +52 @@
-@@ -114,7 +114,7 @@ In addition, C3 and C6 should be enabled as well for power management. The path
+@@ -112,7 +112,7 @@ In addition, C3 and C6 should be enabled as well for power management. The path
@@ -61 +62 @@
-index ef8798569a..2d750b4c33 100644
+index e0816f996e..96817e78cd 100644
@@ -64 +65 @@
-@@ -148,7 +148,7 @@ Binding and Unbinding Network Ports to/from the Kernel Modules
+@@ -120,7 +120,7 @@ Binding and Unbinding Network Ports to/from the Kernel Modules
@@ -74 +75 @@
-index 6ecdc04aa9..dadb23fc89 100644
+index 7c47ec04ce..cf760a6c67 100644
@@ -77 +78 @@
-@@ -97,7 +97,7 @@ e.g. :doc:`../nics/index`
+@@ -107,7 +107,7 @@ e.g. :doc:`../nics/index`
@@ -87 +88 @@
-index 57fd7425a1..6b0ac30c5b 100644
+index a84083b96c..1a4a9e2d4d 100644
@@ -100 +101 @@
-index 831f2bf58f..85a78a5c1e 100644
+index 6ec24f4ad8..dbdaa743dd 100644

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'doc: add SPDX license tag header to Intel performance guide' has been queued to stable release 19.11.6
  2020-11-30 11:50 ` [dpdk-stable] patch 'mcslock: fix hang in weak memory model' " luca.boccassi
                     ` (2 preceding siblings ...)
  2020-11-30 11:50   ` [dpdk-stable] patch 'doc: fix grammar' " luca.boccassi
@ 2020-11-30 11:50   ` luca.boccassi
  2020-11-30 11:50   ` [dpdk-stable] patch 'kni: fix build on RHEL 8.3' " luca.boccassi
                     ` (3 subsequent siblings)
  7 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-30 11:50 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Hemant Agrawal, John McNamara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/02/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6b973506ab5518a7834b24ae8ac9ea8dbc534754

Thanks.

Luca Boccassi

---
From 6b973506ab5518a7834b24ae8ac9ea8dbc534754 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Sun, 15 Nov 2020 18:22:02 -0800
Subject: [PATCH] doc: add SPDX license tag header to Intel performance guide

[ upstream commit a0abf7052257ee21b1b9c6066f721e3b954aa181 ]

This document never had any license or copyright on this file, add one.

Fixes: b932ebcb2664 ("doc: add NIC performance guide on Linux IA")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
---
 doc/guides/linux_gsg/nic_perf_intel_platform.rst | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/doc/guides/linux_gsg/nic_perf_intel_platform.rst b/doc/guides/linux_gsg/nic_perf_intel_platform.rst
index 1dabbce244..b70a151bcc 100644
--- a/doc/guides/linux_gsg/nic_perf_intel_platform.rst
+++ b/doc/guides/linux_gsg/nic_perf_intel_platform.rst
@@ -1,3 +1,6 @@
+..  SPDX-License-Identifier: BSD-3-Clause
+    Copyright(c) 2015 Intel Corporation.
+
 How to get best performance with NICs on Intel platforms
 ========================================================
 
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-30 11:49:30.555028866 +0000
+++ 0005-doc-add-SPDX-license-tag-header-to-Intel-performance.patch	2020-11-30 11:49:30.398271670 +0000
@@ -1 +1 @@
-From a0abf7052257ee21b1b9c6066f721e3b954aa181 Mon Sep 17 00:00:00 2001
+From 6b973506ab5518a7834b24ae8ac9ea8dbc534754 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a0abf7052257ee21b1b9c6066f721e3b954aa181 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 08be5d58b9..dbfaf4e350 100644
+index 1dabbce244..b70a151bcc 100644

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'kni: fix build on RHEL 8.3' has been queued to stable release 19.11.6
  2020-11-30 11:50 ` [dpdk-stable] patch 'mcslock: fix hang in weak memory model' " luca.boccassi
                     ` (3 preceding siblings ...)
  2020-11-30 11:50   ` [dpdk-stable] patch 'doc: add SPDX license tag header to Intel performance guide' " luca.boccassi
@ 2020-11-30 11:50   ` luca.boccassi
  2020-11-30 11:50   ` [dpdk-stable] patch 'doc: clarify instructions on running as non-root' " luca.boccassi
                     ` (2 subsequent siblings)
  7 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-30 11:50 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Christophe Grosse, David Marchand, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/02/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/71aab0b2d49cf18c0320753734615c618c03f347

Thanks.

Luca Boccassi

---
From 71aab0b2d49cf18c0320753734615c618c03f347 Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Thu, 26 Nov 2020 15:23:45 +0100
Subject: [PATCH] kni: fix build on RHEL 8.3

[ upstream commit 95e0871929bfd9891545c9cbfe97119cb72390ba ]

Like what was done for mainline kernel in commit 38ad54f3bc76 ("kni: fix
build with Linux 5.6"), a new parameter 'txqueue' has to be added to
'ndo_tx_timeout' ndo on RHEL 8.3 kernel.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Christophe Grosse <christophe.grosse@6wind.com>
Tested-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 kernel/linux/kni/compat.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h
index d515b27669..5f65640d5e 100644
--- a/kernel/linux/kni/compat.h
+++ b/kernel/linux/kni/compat.h
@@ -131,7 +131,9 @@
 #define HAVE_IOVA_TO_KVA_MAPPING_SUPPORT
 #endif
 
-#if KERNEL_VERSION(5, 6, 0) <= LINUX_VERSION_CODE
+#if KERNEL_VERSION(5, 6, 0) <= LINUX_VERSION_CODE || \
+	(defined(RHEL_RELEASE_CODE) && \
+	 RHEL_RELEASE_VERSION(8, 3) <= RHEL_RELEASE_CODE)
 #define HAVE_TX_TIMEOUT_TXQUEUE
 #endif
 
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-30 11:49:30.584253718 +0000
+++ 0006-kni-fix-build-on-RHEL-8.3.patch	2020-11-30 11:49:30.402271747 +0000
@@ -1 +1 @@
-From 95e0871929bfd9891545c9cbfe97119cb72390ba Mon Sep 17 00:00:00 2001
+From 71aab0b2d49cf18c0320753734615c618c03f347 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 95e0871929bfd9891545c9cbfe97119cb72390ba ]
+
@@ -9,2 +10,0 @@
-
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'doc: clarify instructions on running as non-root' has been queued to stable release 19.11.6
  2020-11-30 11:50 ` [dpdk-stable] patch 'mcslock: fix hang in weak memory model' " luca.boccassi
                     ` (4 preceding siblings ...)
  2020-11-30 11:50   ` [dpdk-stable] patch 'kni: fix build on RHEL 8.3' " luca.boccassi
@ 2020-11-30 11:50   ` luca.boccassi
  2020-11-30 11:50   ` [dpdk-stable] patch 'doc: update information on using hugepages' " luca.boccassi
  2020-11-30 11:50   ` [dpdk-stable] patch 'eal/arm: fix build with gcc optimization level 0' " luca.boccassi
  7 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-30 11:50 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Ferruh Yigit, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/02/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9e8ce064b77555f61c8684820f82d325f05f4311

Thanks.

Luca Boccassi

---
From 9e8ce064b77555f61c8684820f82d325f05f4311 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Thu, 19 Nov 2020 10:52:44 +0000
Subject: [PATCH] doc: clarify instructions on running as non-root

[ upstream commit 3c3a861ce07e507dadda56091bc39cb92c3ae928 ]

The current instructions are slightly out of date when it comes to
providing information about setting up the system for using DPDK as
non-root, so update them.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/linux_gsg/enable_func.rst | 58 ++++++++++++++++++++--------
 1 file changed, 41 insertions(+), 17 deletions(-)

diff --git a/doc/guides/linux_gsg/enable_func.rst b/doc/guides/linux_gsg/enable_func.rst
index ad11bc9e4e..459a952ce3 100644
--- a/doc/guides/linux_gsg/enable_func.rst
+++ b/doc/guides/linux_gsg/enable_func.rst
@@ -58,22 +58,51 @@ The application can then determine what action to take, if any, if the HPET is n
     if any, and on what is available on the system at runtime.
 
 Running DPDK Applications Without Root Privileges
---------------------------------------------------------
+-------------------------------------------------
+
+In order to run DPDK as non-root, the following Linux filesystem objects'
+permissions should be adjusted to ensure that the Linux account being used to
+run the DPDK application has access to them:
+
+*   All directories which serve as hugepage mount points, for example, ``/dev/hugepages``
+
+*   If the HPET is to be used,  ``/dev/hpet``
+
+When running as non-root user, there may be some additional resource limits
+that are imposed by the system. Specifically, the following resource limits may
+need to be adjusted in order to ensure normal DPDK operation:
+
+* RLIMIT_LOCKS (number of file locks that can be held by a process)
+
+* RLIMIT_NOFILE (number of open file descriptors that can be held open by a process)
+
+* RLIMIT_MEMLOCK (amount of pinned pages the process is allowed to have)
+
+The above limits can usually be adjusted by editing
+``/etc/security/limits.conf`` file, and rebooting.
+
+Additionally, depending on which kernel driver is in use, the relevant
+resources also should be accessible by the user running the DPDK application.
+
+For ``vfio-pci`` kernel driver, the following Linux file system objects'
+permissions should be adjusted:
+
+* The VFIO device file, ``/dev/vfio/vfio``
+
+* The directories under ``/dev/vfio`` that correspond to IOMMU group numbers of
+  devices intended to be used by DPDK, for example, ``/dev/vfio/50``
 
 .. note::
 
-    The instructions below will allow running DPDK as non-root with older
-    Linux kernel versions. However, since version 4.0, the kernel does not allow
-    unprivileged processes to read the physical address information from
-    the pagemaps file, making it impossible for those processes to use HW
-    devices which require physical addresses
+    The instructions below will allow running DPDK with ``igb_uio`` or
+    ``uio_pci_generic`` drivers as non-root with older Linux kernel versions.
+    However, since version 4.0, the kernel does not allow unprivileged processes
+    to read the physical address information from the pagemaps file, making it
+    impossible for those processes to be used by non-privileged users. In such
+    cases, using the VFIO driver is recommended.
 
-Although applications using the DPDK use network ports and other hardware resources directly,
-with a number of small permission adjustments it is possible to run these applications as a user other than "root".
-To do so, the ownership, or permissions, on the following Linux file system objects should be adjusted to ensure that
-the Linux user account being used to run the DPDK application has access to them:
-
-*   All directories which serve as hugepage mount points, for example,   ``/mnt/huge``
+For ``igb_uio`` or ``uio_pci_generic`` kernel drivers, the following Linux file
+system objects' permissions should be adjusted:
 
 *   The userspace-io device files in  ``/dev``, for example,  ``/dev/uio0``, ``/dev/uio1``, and so on
 
@@ -82,11 +111,6 @@ the Linux user account being used to run the DPDK application has access to them
        /sys/class/uio/uio0/device/config
        /sys/class/uio/uio0/device/resource*
 
-*   If the HPET is to be used,  ``/dev/hpet``
-
-.. note::
-
-    On some Linux installations, ``/dev/hugepages``  is also a hugepage mount point created by default.
 
 Power Management and Power Saving Functionality
 -----------------------------------------------
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-30 11:49:30.611719769 +0000
+++ 0007-doc-clarify-instructions-on-running-as-non-root.patch	2020-11-30 11:49:30.402271747 +0000
@@ -1 +1 @@
-From 3c3a861ce07e507dadda56091bc39cb92c3ae928 Mon Sep 17 00:00:00 2001
+From 9e8ce064b77555f61c8684820f82d325f05f4311 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3c3a861ce07e507dadda56091bc39cb92c3ae928 ]
+
@@ -10,2 +11,0 @@
-Cc: stable@dpdk.org
-
@@ -20 +20 @@
-index a2339a877b..45fd53ba36 100644
+index ad11bc9e4e..459a952ce3 100644
@@ -23 +23 @@
-@@ -60,22 +60,51 @@ The application can then determine what action to take, if any, if the HPET is n
+@@ -58,22 +58,51 @@ The application can then determine what action to take, if any, if the HPET is n
@@ -87 +87 @@
-@@ -84,11 +113,6 @@ the Linux user account being used to run the DPDK application has access to them
+@@ -82,11 +111,6 @@ the Linux user account being used to run the DPDK application has access to them

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'doc: update information on using hugepages' has been queued to stable release 19.11.6
  2020-11-30 11:50 ` [dpdk-stable] patch 'mcslock: fix hang in weak memory model' " luca.boccassi
                     ` (5 preceding siblings ...)
  2020-11-30 11:50   ` [dpdk-stable] patch 'doc: clarify instructions on running as non-root' " luca.boccassi
@ 2020-11-30 11:50   ` luca.boccassi
  2020-11-30 11:50   ` [dpdk-stable] patch 'eal/arm: fix build with gcc optimization level 0' " luca.boccassi
  7 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-30 11:50 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/02/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/cb3c1c1f2f969661e27536c607cb090bb126ca55

Thanks.

Luca Boccassi

---
From cb3c1c1f2f969661e27536c607cb090bb126ca55 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Thu, 19 Nov 2020 10:52:45 +0000
Subject: [PATCH] doc: update information on using hugepages

[ upstream commit 8397cac725e43562df3ce7d230aa3b4390b64b10 ]

Current information regarding hugepage usage is a little out of date.
Update it to include information on in-memory mode, as well as on
default mountpoints provided by systemd.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 doc/guides/linux_gsg/sys_reqs.rst | 74 ++++++++++++++++++++-----------
 1 file changed, 48 insertions(+), 26 deletions(-)

diff --git a/doc/guides/linux_gsg/sys_reqs.rst b/doc/guides/linux_gsg/sys_reqs.rst
index cf760a6c67..0af0b22813 100644
--- a/doc/guides/linux_gsg/sys_reqs.rst
+++ b/doc/guides/linux_gsg/sys_reqs.rst
@@ -157,8 +157,36 @@ Without hugepages, high TLB miss rates would occur with the standard 4k page siz
 Reserving Hugepages for DPDK Use
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-The allocation of hugepages should be done at boot time or as soon as possible after system boot
-to prevent memory from being fragmented in physical memory.
+The reservation of hugepages can be performed at run time.
+This is done by echoing the number of hugepages required
+to a ``nr_hugepages`` file in the ``/sys/kernel/`` directory
+corresponding to a specific page size (in Kilobytes).
+For a single-node system, the command to use is as follows
+(assuming that 1024 of 2MB pages are required)::
+
+    echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
+
+On a NUMA machine, the above command will usually divide the number of hugepages
+equally across all NUMA nodes (assuming there is enough memory on all NUMA nodes).
+However, pages can also be reserved explicitly on individual NUMA nodes
+using a ``nr_hugepages`` file in the ``/sys/devices/`` directory::
+
+    echo 1024 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
+    echo 1024 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
+
+.. note::
+
+    Some kernel versions may not allow reserving 1 GB hugepages at run time,
+    so reserving them at boot time may be the only option.
+    Please see below for instructions.
+
+**Alternative:**
+
+In the general case, reserving hugepages at run time is perfectly fine,
+but in use cases where having lots of physically contiguous memory is required,
+it is preferable to reserve hugepages at boot time,
+as that will help in preventing physical memory from becoming heavily fragmented.
+
 To reserve hugepages at boot time, a parameter is passed to the Linux kernel on the kernel command line.
 
 For 2 MB pages, just pass the hugepages option to the kernel. For example, to reserve 1024 pages of 2 MB, use::
@@ -187,35 +215,29 @@ the number of hugepages reserved at boot time is generally divided equally betwe
 
 See the Documentation/admin-guide/kernel-parameters.txt file in your Linux source tree for further details of these and other kernel options.
 
-**Alternative:**
-
-For 2 MB pages, there is also the option of allocating hugepages after the system has booted.
-This is done by echoing the number of hugepages required to a nr_hugepages file in the ``/sys/devices/`` directory.
-For a single-node system, the command to use is as follows (assuming that 1024 pages are required)::
-
-    echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
-
-On a NUMA machine, pages should be allocated explicitly on separate nodes::
-
-    echo 1024 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
-    echo 1024 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
-
-.. note::
-
-    For 1G pages, it is not possible to reserve the hugepage memory after the system has booted.
-
 Using Hugepages with the DPDK
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-Once the hugepage memory is reserved, to make the memory available for DPDK use, perform the following steps::
+If secondary process support is not required, DPDK is able to use hugepages
+without any configuration by using "in-memory" mode.
+Please see :doc:`linux_eal_parameters` for more details.
+
+If secondary process support is required,
+mount points for hugepages need to be created.
+On modern Linux distributions, a default mount point for hugepages
+is provided by the system and is located at ``/dev/hugepages``.
+This mount point will use the default hugepage size
+set by the kernel parameters as described above.
+
+However, in order to use hugepage sizes other than the default, it is necessary
+to manually create mount points for those hugepage sizes (e.g. 1GB pages).
+
+To make the hugepages of size 1GB available for DPDK use,
+following steps must be performed::
 
     mkdir /mnt/huge
-    mount -t hugetlbfs nodev /mnt/huge
+    mount -t hugetlbfs pagesize=1GB /mnt/huge
 
 The mount point can be made permanent across reboots, by adding the following line to the ``/etc/fstab`` file::
 
-    nodev /mnt/huge hugetlbfs defaults 0 0
-
-For 1GB pages, the page size must be specified as a mount option::
-
-    nodev /mnt/huge_1GB hugetlbfs pagesize=1GB 0 0
+    nodev /mnt/huge hugetlbfs pagesize=1GB 0 0
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-30 11:49:30.640823023 +0000
+++ 0008-doc-update-information-on-using-hugepages.patch	2020-11-30 11:49:30.402271747 +0000
@@ -1 +1 @@
-From 8397cac725e43562df3ce7d230aa3b4390b64b10 Mon Sep 17 00:00:00 2001
+From cb3c1c1f2f969661e27536c607cb090bb126ca55 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8397cac725e43562df3ce7d230aa3b4390b64b10 ]
+
@@ -10,2 +11,0 @@
-Cc: stable@dpdk.org
-
@@ -19 +19 @@
-index e074faf514..be714adf22 100644
+index cf760a6c67..0af0b22813 100644
@@ -22 +22 @@
-@@ -158,8 +158,36 @@ Without hugepages, high TLB miss rates would occur with the standard 4k page siz
+@@ -157,8 +157,36 @@ Without hugepages, high TLB miss rates would occur with the standard 4k page siz
@@ -61 +61 @@
-@@ -188,35 +216,29 @@ the number of hugepages reserved at boot time is generally divided equally betwe
+@@ -187,35 +215,29 @@ the number of hugepages reserved at boot time is generally divided equally betwe

^ permalink raw reply	[flat|nested] 374+ messages in thread

* [dpdk-stable] patch 'eal/arm: fix build with gcc optimization level 0' has been queued to stable release 19.11.6
  2020-11-30 11:50 ` [dpdk-stable] patch 'mcslock: fix hang in weak memory model' " luca.boccassi
                     ` (6 preceding siblings ...)
  2020-11-30 11:50   ` [dpdk-stable] patch 'doc: update information on using hugepages' " luca.boccassi
@ 2020-11-30 11:50   ` luca.boccassi
  7 siblings, 0 replies; 374+ messages in thread
From: luca.boccassi @ 2020-11-30 11:50 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: Feifei Wang, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/02/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to 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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3b2bbd4988be1d3531b80bdf3d50fd358e52c1cc

Thanks.

Luca Boccassi

---
From 3b2bbd4988be1d3531b80bdf3d50fd358e52c1cc Mon Sep 17 00:00:00 2001
From: Ruifeng Wang <ruifeng.wang@arm.com>
Date: Fri, 27 Nov 2020 16:09:02 +0800
Subject: [PATCH] eal/arm: fix build with gcc optimization level 0

[ upstream commit d123fd111a161cd4f320ffb551a832cc4ce8c3ab ]

GCC build with '-O0' on platforms with RTE_ARM_FEATURE_ATOMICS set
failed for:
 ../lib/librte_efd/rte_efd.c
 Assembler messages:
3866: Error: selected processor does not support `crc32cb w0,w0,w1'
3890: Error: selected processor does not support `crc32ch w0,w0,w1'
3914: Error: selected processor does not support `crc32cw w0,w0,w1'
3938: Error: selected processor does not support `crc32cx w0,w0,x1'

This was caused by an architecture specifier added for Clang.
Unlike Clang, GCC considers each inline assembly block to be dependent
and therefore, the architecture specifier impacts assemble of some
blocks require certain extension support.

Removed the architecture for GCC to fix the issue.

Fixes: 8fce34cd0a6a ("eal/arm: fix clang build of native target")

Reported-by: Feifei Wang <feifei.wang2@arm.com>
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 lib/librte_eal/common/include/arch/arm/rte_atomic_64.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h b/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h
index 07d0ce91d8..8da989dcca 100644
--- a/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h
+++ b/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h
@@ -47,7 +47,11 @@ extern "C" {
 /*------------------------ 128 bit atomic operations -------------------------*/
 
 #if defined(__ARM_FEATURE_ATOMICS) || defined(RTE_ARM_FEATURE_ATOMICS)
+#if defined(RTE_CC_CLANG)
 #define __LSE_PREAMBLE	".arch armv8-a+lse\n"
+#else
+#define __LSE_PREAMBLE	""
+#endif
 
 #define __ATOMIC128_CAS_OP(cas_op_name, op_string)                          \
 static __rte_noinline rte_int128_t                                          \
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-30 11:49:30.668991102 +0000
+++ 0009-eal-arm-fix-build-with-gcc-optimization-level-0.patch	2020-11-30 11:49:30.402271747 +0000
@@ -1 +1 @@
-From d123fd111a161cd4f320ffb551a832cc4ce8c3ab Mon Sep 17 00:00:00 2001
+From 3b2bbd4988be1d3531b80bdf3d50fd358e52c1cc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d123fd111a161cd4f320ffb551a832cc4ce8c3ab ]
+
@@ -23 +24,0 @@
-Cc: stable@dpdk.org
@@ -29 +30 @@
- lib/librte_eal/arm/include/rte_atomic_64.h | 4 ++++
+ lib/librte_eal/common/include/arch/arm/rte_atomic_64.h | 4 ++++
@@ -32,5 +33,5 @@
-diff --git a/lib/librte_eal/arm/include/rte_atomic_64.h b/lib/librte_eal/arm/include/rte_atomic_64.h
-index 7fcd174661..467d32a455 100644
---- a/lib/librte_eal/arm/include/rte_atomic_64.h
-+++ b/lib/librte_eal/arm/include/rte_atomic_64.h
-@@ -46,7 +46,11 @@ rte_atomic_thread_fence(int memorder)
+diff --git a/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h b/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h
+index 07d0ce91d8..8da989dcca 100644
+--- a/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h
++++ b/lib/librte_eal/common/include/arch/arm/rte_atomic_64.h
+@@ -47,7 +47,11 @@ extern "C" {

^ permalink raw reply	[flat|nested] 374+ messages in thread

end of thread, other threads:[~2020-11-30 11:50 UTC | newest]

Thread overview: 374+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-28 10:42 [dpdk-stable] patch 'eal/linux: change udev debug message' has been queued to stable release 19.11.6 luca.boccassi
2020-10-28 10:42 ` [dpdk-stable] patch 'bus/pci: remove duplicate declaration' " luca.boccassi
2020-10-28 10:42 ` [dpdk-stable] patch 'net/failsafe: fix double space in warning log' " luca.boccassi
2020-10-28 10:42 ` [dpdk-stable] patch 'net/netvsc: fix multiple channel Rx' " luca.boccassi
2020-10-28 10:42 ` [dpdk-stable] patch 'net/netvsc: fix stale value after free' " luca.boccassi
2020-10-28 10:42 ` [dpdk-stable] patch 'net/hinic: fix negative array index read' " luca.boccassi
2020-10-28 10:42 ` [dpdk-stable] patch 'net/mlx5: remove unused includes' " luca.boccassi
2020-10-28 10:42 ` [dpdk-stable] patch 'net/mlx5: remove unused log macros' " luca.boccassi
2020-10-28 10:42 ` [dpdk-stable] patch 'net/af_xdp: change return value from Rx to unsigned' " luca.boccassi
2020-10-28 10:42 ` [dpdk-stable] patch 'net/bnxt: add memory allocation check in VF info init' " luca.boccassi
2020-10-28 10:42 ` [dpdk-stable] patch 'net/bnxt: fix endianness while setting L4 destination port' " luca.boccassi
2020-10-28 10:42 ` [dpdk-stable] patch 'net/bnxt: fix LRO configuration' " luca.boccassi
2020-10-28 10:42 ` [dpdk-stable] patch 'net/bnxt: fix structure variable initialization' " luca.boccassi
2020-10-28 10:42 ` [dpdk-stable] patch 'net/bnxt: fix crash in vector mode Tx' " luca.boccassi
2020-10-28 10:42 ` [dpdk-stable] patch 'net/bnxt: fix L2 filter allocation' " luca.boccassi
2020-10-28 10:42 ` [dpdk-stable] patch 'bus/dpaa: remove logically dead code' " luca.boccassi
2020-10-28 10:42 ` [dpdk-stable] patch 'net/hns3: fix default MAC address from firmware' " luca.boccassi
2020-10-28 10:42 ` [dpdk-stable] patch 'net/hns3: fix some incomplete command structures' " luca.boccassi
2020-10-28 10:42 ` [dpdk-stable] patch 'net/i40e: fix link status' " luca.boccassi
2020-10-28 10:42 ` [dpdk-stable] patch 'net/iavf: fix scattered Rx enabling' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/iavf: fix port start during configuration restore' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/iavf: fix setting of MAC address' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/iavf: downgrade error log' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: fix out of bounds access' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/ice: fix flow validation for unsupported patterns' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'ethdev: remove redundant license text' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/iavf: fix command after PF reset' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/ice/base: fix issues around move nodes' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/i40e/base: fix function header arguments' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/i40e/base: fix Rx only for unicast promisc on VLAN' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/tap: free mempool when closing' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/dpaa2: fix misuse of interface index' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/pfe: " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/dpaa: fix port ID type in API' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/cxgbe: fix duplicate MAC addresses in MPS TCAM' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/mlx5: fix RSS RETA reset on start' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/nfp: expand device info get' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'app/testpmd: fix name of bitrate library in meson build' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: fix queue offload capability' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/mlx5: fix hairpin dependency on destination DevX TIR' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/i40e: fix recreating flexible flow director rule' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/ice: fix ptype parsing' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'bus/dpaa: fix fd check before close' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/bnxt: fix checking VNIC in shutdown path' " luca.boccassi
2020-10-29  6:29   ` Somnath Kotur
2020-10-28 10:43 ` [dpdk-stable] patch 'net/bnxt: add separate mutex for FW health check' " luca.boccassi
2020-10-29  6:30   ` Somnath Kotur
2020-10-28 10:43 ` [dpdk-stable] patch 'gso: fix payload unit size for UDP' " luca.boccassi
2020-10-29  4:45   ` [dpdk-stable] 答复: " Yi Yang -云服务集团
2020-10-29 11:10     ` Luca Boccassi
2020-10-29 11:29       ` Kevin Traynor
2020-10-30  0:26         ` [dpdk-stable] 答复: " Yi Yang -云服务集团
2020-10-30  9:31           ` Kevin Traynor
2020-10-30  0:32       ` [dpdk-stable] 答复: [gmail.com代发]Re: " Yi Yang -云服务集团
2020-10-28 10:43 ` [dpdk-stable] patch 'net/cxgbe: fix crash when accessing empty Tx mbuf list' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'doc: improve multiport PF in nfp guide' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/sfc/base: fix tunnel configuration' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'vhost: fix IOTLB mempool single-consumer flag' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/af_xdp: fix umem size' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/iavf: fix iterator for RSS LUT' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/netvsc: fix rndis packet addresses' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/enic: ignore VLAN inner type when it is zero' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/enic: generate VXLAN src port if it is zero in template' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'test/ring: fix number of single element enqueue/dequeue' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'maintainers: update Mellanox emails' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'kni: fix build with Linux 5.9' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'stack: reload head when pop fails' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'stack: fix uninitialized variable' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/hinic: fix Rx nombuf stats' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/hinic/base: get default cos from chip' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/hinic/base: fix clock definition with glibc version' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/qede: fix milliseconds sleep macro' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/ena/base: use min/max macros with type conversion' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/ena/base: specify delay operations' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/ena/base: fix release of wait event' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/af_xdp: avoid deadlock due to empty fill queue' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/i40e: fix byte counters' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/bnxt: fix link status during device recovery' " luca.boccassi
2020-10-29  9:22   ` Kalesh Anakkur Purayil
2020-10-28 10:43 ` [dpdk-stable] patch 'net/ixgbe: fix VF reset HW error handling' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/bnxt: fix shift operation' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/bnxt: fix drop enable in get Rx queue info' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/bnxt: fix queue get " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: fix deleting default VLAN from PF' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: skip VF register access when PF in FLR' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: fix config when creating RSS rule after flush' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: fix flow RSS queue number 0' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: fix flushing RSS rule' " luca.boccassi
2020-10-28 10:43 ` [dpdk-stable] patch 'net/hns3: fix configuring device with RSS enabled' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'net/hns3: fix storing RSS info when creating flow action' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'mempool/octeontx: fix aura to pool mapping' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'net/octeontx2: fix multi segment mode for jumbo packets' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'net/fm10k: fix memory leak when thresh check fails' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'app/testpmd: fix port id check in Tx VLAN command' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'app/testpmd: fix VLAN configuration on failure' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'app/testpmd: remove restriction on Tx segments set' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'app/testpmd: fix packet header in txonly mode' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'app/testpmd: fix descriptor id check' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'app/testpmd: fix displaying Rx/Tx queues information' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'net/qede: fix dereference before null check' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'net/sfc: fix RSS hash flag when offload is disabled' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'net/sfc: fix RSS hash offload if queue action is used' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'drivers/net: fix port id size' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'app: fix ethdev " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'doc: " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'examples/vhost_blk: check driver start failure' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'net/virtio: fix packed ring indirect descricptors setup' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'vdpa/ifc: fix build with recent kernels' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'vfio: fix group descriptor check' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'bus/fslmc: fix VFIO " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'bus/pci: fix memory leak when unmapping VFIO resource' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'bus/pci: fix leak on VFIO mapping error' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'doc: fix formatting of notes in meson guide' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'rcu: avoid literal suffix warning in C++ mode' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'mem: fix allocation in container with SELinux' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'examples/vm_power: fix 32-bit build' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'bus/fslmc: fix dpio close' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'bus/fslmc: fix atomic queues on NXP LX2 platform' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'raw/skeleton: reset test statistics' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'raw/skeleton: allow closing already closed device' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'port: remove useless assignment' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'power: fix current frequency index' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'timer: add limitation note for sync stop and reset' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'app/testpmd: fix build with gcc 11' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'pmdinfogen: " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'raw/ioat: fix missing close function' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'examples/ioat: fix stats print' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'net/hns3: fix error type when validating RSS flow action' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'net/hns3: fix flow error type' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'net/hns3: check PCI config space reads' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'net/mlx5: fix meter table definitions' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'net/mlx5: fix Rx queue count calculation' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'net/qede: fix getting link details' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'ethdev: fix RSS flow expansion in case of mismatch' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'net/mlx5: remove unused variable in Tx queue creation' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'net/bnxt: fix link update' " luca.boccassi
2020-10-29  9:24   ` Kalesh Anakkur Purayil
2020-10-28 10:44 ` [dpdk-stable] patch 'common/mlx5: fix PCI address lookup' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'net/fm10k: fix memory leak when Tx thresh check fails' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'net/iavf: fix flow flush after PF reset' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'raw/dpaa2_qdma: fix " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'eal: fix doxygen for EAL cleanup' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'build: skip detecting libpcap via pcap-config' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'doc: fix diagram in dpaa2 guide' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'net: check segment pointer in raw checksum processing' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'net/virtio: check raw checksum failure' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'mem: fix allocation failure on non-NUMA kernel' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'acl: fix x86 build for compiler without AVX2' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'doc: fix missing classify methods in ACL guide' " luca.boccassi
2020-10-28 10:44 ` [dpdk-stable] patch 'table: fix hash for 32-bit' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'crypto/octeontx2: fix session-less mode' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'app/test-sad: fix uninitialized variable' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'test/crypto: fix device number' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'crypto/dpaa_sec: fix a null pointer dereference' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'app/bbdev: fix test vector symlink' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'baseband/fpga_lte_fec: fix crash with debug' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'test/crypto: fix stats test' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'crypto/armv8: fix mempool object returning' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'cryptodev: fix parameter parsing' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'examples/fips_validation: fix buffer overflow' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'examples/fips_validation: fix version compatibility' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix stats query without queue pair' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'crypto/aesni_mb: fix CCM digest size check' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'crypto/aesni_mb: fix GCM " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'test/event_crypto_adapter: fix configuration' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'eventdev: check allocation in Tx adapter' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'event/dpaa2: fix dereference before null check' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'eventdev: fix adapter leak in error path' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'test/event: fix function arguments for crypto adapter' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'eal/x86: fix memcpy AVX-512 enablement' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'vhost: fix external mbuf creation' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'vhost: fix virtio-net header length with packed ring' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'net/dpaa2: fix build with timesync functions' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'net/netvsc: fix Tx queue leak in error path' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'net/bonding: fix possible unbalanced packet receiving' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'net/bonding: fix Rx queue conversion' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'net/pcap: fix input only Rx' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'net/memif: do not update local copy of tail in Tx' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'net/memif: relax load of ring tail for M2S ring' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'net/memif: relax load of ring head " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'net/memif: relax load of ring head for S2M " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'net/af_xdp: use strlcpy instead of strncpy' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'net/octeontx2: fix RSS flow create' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'net/octeontx2: remove useless check before free' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'net/pcap: fix crash on exit for infinite Rx' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'net/failsafe: fix state synchro cleanup' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'net/ring: check internal arguments' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'doc: fix EF10 Rx mode name in sfc guide' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'doc: fix typo in pcap " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'net/bnx2x: add QLogic vendor id for BCM57840' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'ethdev: fix memory ordering for callback functions' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix handshake synchronization' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix handshake deadlock' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix buffer use after free' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: handle worker shutdown in burst mode' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: fix shutdown of busy worker' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix return pkt calls in single mode' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: fix freeing mbufs' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: fix lcores statistics' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: collect return mbufs' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix API documentation' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: fix race conditions on shutdown' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix scalar matching' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix flushing in flight packets' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'distributor: fix clearing returns buffer' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: ensure all packets are delivered' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: fix quitting workers in burst mode' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'test/distributor: fix mbuf leak on failure' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'crypto/caam_jr: fix device tree parsing for SEC_ERA' " luca.boccassi
2020-10-28 10:45 ` [dpdk-stable] patch 'doc: add SPDX license tag header to meson guide' " luca.boccassi
2020-10-28 10:46 ` [dpdk-stable] patch 'app: fix missing dependencies' " luca.boccassi
2020-10-28 10:46 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix missing dependency' " luca.boccassi
2020-10-28 10:46 ` [dpdk-stable] patch 'ipc: fix spelling in log and comment' " luca.boccassi
2020-10-28 10:46 ` [dpdk-stable] patch 'bus/pci: remove unused scan by address' " luca.boccassi
2020-10-28 10:46 ` [dpdk-stable] patch 'eal/linux: fix memory leak in uevent handling' " luca.boccassi
2020-10-28 10:46 ` [dpdk-stable] patch 'crypto/scheduler: fix header install with meson' " luca.boccassi
2020-10-28 10:46 ` [dpdk-stable] patch 'config: add Graviton2(arm64) defconfig' " luca.boccassi
2020-11-09 18:39   ` [dpdk-stable] patch 'efd: fix tailq entry leak in error path' " luca.boccassi
2020-11-09 18:39     ` [dpdk-stable] patch 'net/softnic: use POSIX network address conversion' " luca.boccassi
2020-11-09 18:39     ` [dpdk-stable] patch 'examples/ip_pipeline: " luca.boccassi
2020-11-09 18:39     ` [dpdk-stable] patch 'examples/ipsec-secgw: " luca.boccassi
2020-11-09 18:39     ` [dpdk-stable] patch 'eal: fix leak on device event callback unregister' " luca.boccassi
2020-11-09 18:39     ` [dpdk-stable] patch 'mem: fix config name in error logs' " luca.boccassi
2020-11-09 18:39     ` [dpdk-stable] patch 'examples/ip_pipeline: fix external build' " luca.boccassi
2020-11-09 18:39     ` [dpdk-stable] patch 'examples/vm_power: fix build on Ubuntu 20.04' " luca.boccassi
2020-11-09 18:39     ` [dpdk-stable] patch 'examples/multi_process: " luca.boccassi
2020-11-09 18:39     ` [dpdk-stable] patch 'test/rcu: fix build with low core count' " luca.boccassi
2020-11-09 18:39     ` [dpdk-stable] patch 'examples/performance-thread: " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'test/mbuf: skip field registration at busy offset' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'mbuf: fix typo in dynamic field convention note' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'event/dpaa2: remove dead code from self test' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'crypto/scheduler: remove unused internal seqn' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'doc: remove notice about AES-GCM IV and J0' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'baseband/turbo_sw: fix memory leak in error path' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'crypto/octeontx2: fix multi-process' " luca.boccassi
2020-11-10 10:59       ` [dpdk-stable] [EXT] " Ankur Dwivedi
2020-11-10 11:06         ` Luca Boccassi
2020-11-10 11:34           ` Ankur Dwivedi
2020-11-09 18:40     ` [dpdk-stable] patch 'examples/fips_validation: fix missed version line' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'crypto/dpaa2_sec: remove dead code' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'common/qat: add missing kmod dependency info' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'crypto/octeontx: fix out-of-place support' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'crypto/octeontx2: " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'gso: fix mbuf freeing responsibility' " luca.boccassi
2020-11-09 22:39       ` Ananyev, Konstantin
2020-11-10 10:31         ` Luca Boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/iavf: fix unchecked Tx cleanup error' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'app/testpmd: fix bonding xmit balance policy command' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/bnxt: fix queue release' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/bnxt: fix xstats by id' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/mlx5: fix xstats reset reinitialization' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/mlx5: fix port shared data reference count' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/i40e: fix virtual channel conflict' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/ixgbe: check switch domain allocation result' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/i40e: fix QinQ flow pattern to allow non full mask' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/ixgbe: fix vector Rx' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/i40e: " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/ice: " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/fm10k: " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/iavf: " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/vhost: fix xstats after clearing stats' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'vhost: fix virtqueues metadata allocation' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'vhost: validate index in available entries API' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'vhost: validate index in guest notification " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'vhost: validate index in live-migration " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'vhost: validate index in inflight " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/ena: remove unused macro' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/mvpp2: fix memory leak in error path' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/netvsc: allocate contiguous physical memory for RNDIS' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'app/testpmd: fix RSS key for flow API RSS rule' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'raw/ifpga/base: fix interrupt handler instance usage' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'raw/ifpga/base: handle unsupported interrupt type' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'raw/ifpga/base: fix return of IRQ unregister' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/ice: update writeback policy to reduce latency' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/bnxt: fix boolean operator usage' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/i40e: fix flow director for eth + VLAN pattern' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/ice: fix Rx offload flags in SSE path' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'ethdev: move non-offload capabilities' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/ice/base: fix parameter name in comment' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/bnxt: increase size of Rx CQ' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/bnxt: fix resetting mbuf data offset' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/bnxt: fix Rx performance by removing spinlock' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/mlx: do not enforce RSS hash offload' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/vdev_netvsc: fix device probing error flow' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/hns3: fix RSS max queue id allowed in multi-TC' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/hns3: fix data type to store queue number' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/hns3: check setting VF PCI bus return value' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/enic: fix header sizes when copying flow patterns' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/ena: fix getting xstats global stats offset' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/ena: fix setting Rx checksum flags in mbuf' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/ena/base: align IO CQ allocation to 4K' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'net/thunderx: fix memory leak on rbdr desc ring failure' " luca.boccassi
2020-11-09 18:40     ` [dpdk-stable] patch 'common/mlx5: fix DevX SQ object creation' " luca.boccassi
2020-11-09 18:41     ` [dpdk-stable] patch 'raw/ifpga: terminate string filled by readlink with null' " luca.boccassi
2020-11-09 18:41     ` [dpdk-stable] patch 'raw/ifpga: use trusted buffer to free' " luca.boccassi
2020-11-09 18:41     ` [dpdk-stable] patch 'app/testpmd: do not allow dynamic change of core number' " luca.boccassi
2020-11-09 18:41     ` [dpdk-stable] patch 'net/hns3: fix configurations of port-level scheduling rate' " luca.boccassi
2020-11-09 18:41     ` [dpdk-stable] patch 'app/testpmd: fix max Rx packet length for VLAN packet' " luca.boccassi
2020-11-09 18:41     ` [dpdk-stable] patch 'ethdev: fix data type for port id' " luca.boccassi
2020-11-09 18:41     ` [dpdk-stable] patch 'net/hinic/base: support two or more AEQS for chip' " luca.boccassi
2020-11-09 18:41     ` [dpdk-stable] patch 'net/hinic/base: fix log info for PF command channel' " luca.boccassi
2020-11-09 18:41     ` [dpdk-stable] patch 'fix spellings that Lintian complains about' " luca.boccassi
2020-11-09 18:41     ` [dpdk-stable] patch 'mbuf: fix dynamic fields and flags with multiprocess' " luca.boccassi
2020-11-09 18:41     ` [dpdk-stable] patch 'doc: fix typo in KNI guide' " luca.boccassi
2020-11-09 18:41     ` [dpdk-stable] patch 'doc: remove obsolete deprecation notice for power library' " luca.boccassi
2020-11-09 18:50   ` [dpdk-stable] patch 'eal: fix MCS lock and ticketlock headers install' " luca.boccassi
2020-11-09 18:50     ` [dpdk-stable] patch 'app/testpmd: revert max Rx packet length adjustment' " luca.boccassi
2020-11-17 11:13       ` [dpdk-stable] patch 'devtools: fix build test config inheritance from env' " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'devtools: fix x86-default build test install " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'examples: fix flattening directory layout on install' " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'examples/l2fwd-keepalive: skip meson build if no librt' " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'devtools: fix directory filter in forbidden token check' " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'eal/arm: fix clang build of native target' " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'examples/qos_sched: fix usage string' " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'build: fix install on Windows' " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'build: fix MS linker flag with meson 0.54' " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'usertools: fix CPU layout script to be PEP8 compliant' " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'gro: fix packet type detection with IPv6 tunnel' " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'config: enable packet prefetching with Meson' " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'net/bnxt: remove useless prefetches' " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'net/ring: fix typo in log message' " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'net/mlx5: fix switch port id when representor in bonding' " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'net/mlx5: fix Rx queue completion index consistency' " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'examples/vhost_crypto: add new line character in usage' " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'vhost: fix virtqueue initialization' " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'net/hns3: check PCI config space write' " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'net/i40e: add C++ include guard' " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'net/i40e: fix build for log format specifier' " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'net/iavf: fix releasing mbufs' " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'net/mlx5: fix missing meter packet' " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'net/af_xdp: fix pointer storage size' " luca.boccassi
2020-11-17 11:13         ` [dpdk-stable] patch 'net/iavf: fix performance drop after port reset' " luca.boccassi
2020-11-17 11:14         ` [dpdk-stable] patch 'net/hinic/base: add message check for command channel' " luca.boccassi
2020-11-17 11:14         ` [dpdk-stable] patch 'net/ixgbe: remove redundant MAC flag check' " luca.boccassi
2020-11-17 11:14         ` [dpdk-stable] patch 'vhost: fix error path when setting memory tables' " luca.boccassi
2020-11-17 11:14         ` [dpdk-stable] patch 'vhost: fix fd leak in dirty logging setup' " luca.boccassi
2020-11-17 11:14         ` [dpdk-stable] patch 'vhost: fix fd leak in kick " luca.boccassi
2020-11-17 11:14         ` [dpdk-stable] patch 'app/testpmd: fix MTU after device configure' " luca.boccassi
2020-11-17 11:14         ` [dpdk-stable] patch 'net/bnxt: fix doorbell barrier location' " luca.boccassi
2020-11-17 11:14         ` [dpdk-stable] patch 'net/mlx5: validate MPLSoGRE with GRE key' " luca.boccassi
2020-11-17 11:14         ` [dpdk-stable] patch 'doc: fix typo in ipsec-secgw guide' " luca.boccassi
2020-11-17 11:14         ` [dpdk-stable] patch 'app/eventdev: check timer adadpters number' " luca.boccassi
2020-11-17 11:14         ` [dpdk-stable] patch 'examples/fips_validation: fix build with pkg-config' " luca.boccassi
2020-11-17 11:14         ` [dpdk-stable] patch 'examples/kni: " luca.boccassi
2020-11-17 11:14         ` [dpdk-stable] patch 'examples/l2fwd-crypto: " luca.boccassi
2020-11-17 11:14         ` [dpdk-stable] patch 'examples/ntb: fix clean target' " luca.boccassi
2020-11-17 11:14         ` [dpdk-stable] patch 'examples/performance-thread: fix build with pkg-config' " luca.boccassi
2020-11-17 11:14         ` [dpdk-stable] patch 'examples/vhost_blk: " luca.boccassi
2020-11-17 11:14         ` [dpdk-stable] patch 'examples/rxtx_callbacks: " luca.boccassi
2020-11-25  9:02           ` [dpdk-stable] patch 'doc: fix rule file parameters in l3fwd-acl guide' " luca.boccassi
2020-11-25  9:02             ` [dpdk-stable] patch 'net/mlx5: fix Rx packet padding config via DevX' " luca.boccassi
2020-11-25  9:02             ` [dpdk-stable] patch 'net/mlx5: fix RSS queue type validation' " luca.boccassi
2020-11-25  9:02             ` [dpdk-stable] patch 'net/mlx5: fix Rx queue count calculation' " luca.boccassi
2020-11-25  9:02             ` [dpdk-stable] patch 'net/mlx5: fix Rx descriptor status' " luca.boccassi
2020-11-25  9:02             ` [dpdk-stable] patch 'net/mlx5: fix raw encap/decap limit' " luca.boccassi
2020-11-25  9:02             ` [dpdk-stable] patch 'common/mlx5: fix name for ConnectX VF device ID' " luca.boccassi
2020-11-25  9:02             ` [dpdk-stable] patch 'app/testpmd: revert setting MTU explicitly after configure' " luca.boccassi
2020-11-25  9:02             ` [dpdk-stable] patch 'net/hns3: fix crash with multi-TC' " luca.boccassi
2020-11-25  9:02             ` [dpdk-stable] patch 'event/octeontx2: unlink queues during port release' " luca.boccassi
2020-11-25  9:02             ` [dpdk-stable] patch 'compress/isal: check allocation in queue setup' " luca.boccassi
2020-11-25  9:02             ` [dpdk-stable] patch 'examples/l3fwd-power: check packet types after start' " luca.boccassi
2020-11-25  9:02             ` [dpdk-stable] patch 'net/mlx5: fix representor interrupts handler' " luca.boccassi
2020-11-25  9:02             ` [dpdk-stable] patch 'malloc: fix style in free list index computation' " luca.boccassi
2020-11-25  9:02             ` [dpdk-stable] patch 'build: fix gcc warning requiring Wformat' " luca.boccassi
2020-11-25  9:02             ` [dpdk-stable] patch 'usertools: fix pmdinfo parsing' " luca.boccassi
2020-11-30 11:50 ` [dpdk-stable] patch 'mcslock: fix hang in weak memory model' " luca.boccassi
2020-11-30 11:50   ` [dpdk-stable] patch 'net/hinic/base: remove queue number limitation' " luca.boccassi
2020-11-30 11:50   ` [dpdk-stable] patch 'net/hinic: remove optical module operation' " luca.boccassi
2020-11-30 11:50   ` [dpdk-stable] patch 'doc: fix grammar' " luca.boccassi
2020-11-30 11:50   ` [dpdk-stable] patch 'doc: add SPDX license tag header to Intel performance guide' " luca.boccassi
2020-11-30 11:50   ` [dpdk-stable] patch 'kni: fix build on RHEL 8.3' " luca.boccassi
2020-11-30 11:50   ` [dpdk-stable] patch 'doc: clarify instructions on running as non-root' " luca.boccassi
2020-11-30 11:50   ` [dpdk-stable] patch 'doc: update information on using hugepages' " luca.boccassi
2020-11-30 11:50   ` [dpdk-stable] patch 'eal/arm: fix build with gcc optimization level 0' " luca.boccassi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).