patches for DPDK stable branches
 help / color / 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
                   ` (205 more replies)
  0 siblings, 206 replies; 365+ 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] 365+ 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
                   ` (204 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (203 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (202 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (201 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (200 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (199 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (198 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (197 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (196 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (195 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (194 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (193 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (192 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (191 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (190 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (189 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (188 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (187 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (186 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (185 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (184 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (183 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (182 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (181 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (180 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (179 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (178 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (177 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (176 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (175 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (174 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (173 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (172 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (171 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (170 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (169 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (168 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (167 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (166 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (165 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (164 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (163 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (162 subsequent siblings)
  205 siblings, 1 reply; 365+ 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] 365+ 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
                   ` (161 subsequent siblings)
  205 siblings, 1 reply; 365+ 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] 365+ 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
                   ` (160 subsequent siblings)
  205 siblings, 1 reply; 365+ 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] 365+ 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
                   ` (159 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (158 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (157 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (156 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (155 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (154 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (153 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (152 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (151 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (150 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (149 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (148 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (147 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (146 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (145 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (144 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (143 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (142 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (141 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (140 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (139 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (138 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (137 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (136 subsequent siblings)
  205 siblings, 1 reply; 365+ 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] 365+ 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
                   ` (135 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (134 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (133 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (132 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (131 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (130 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (129 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (128 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (127 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (126 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (125 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (124 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (123 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (122 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (121 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (120 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (119 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (118 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (117 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (116 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (115 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (114 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (113 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (112 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (111 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (110 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (109 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (108 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (107 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (106 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (105 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (104 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (103 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (102 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (101 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (100 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (99 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (98 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (97 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (96 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (95 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (94 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (93 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (92 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (91 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (90 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (89 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (88 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (87 subsequent siblings)
  205 siblings, 0 replies; 365+ 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] 365+ 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
                   ` (86 subsequent siblings)
  205 siblings, 0 replies; 365+ 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,