patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2
@ 2021-05-10 15:59 Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'test/mem: fix page size for external memory' " Xueming Li
                   ` (227 more replies)
  0 siblings, 228 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Nithin Dabilpuram
  Cc: Luca Boccassi, Anatoly Burakov, David Christensen, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7f904ea0c6725fabfe16812f3d36d250ec3981c2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7f904ea0c6725fabfe16812f3d36d250ec3981c2 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Fri, 15 Jan 2021 13:02:42 +0530
Subject: [PATCH] vfio: fix DMA mapping granularity for IOVA as VA
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit c13ca4e81cac591904c893a65ffbbf446af0268a ]

Partial unmapping is not supported for VFIO IOMMU type1
by kernel. Though kernel gives return as zero, the unmapped size
returned will not be same as expected. So check for
returned unmap size and return error.

For IOVA as PA, DMA mapping is already at memseg size
granularity. Do the same even for IOVA as VA mode as
DMA map/unmap triggered by heap allocations,
maintain granularity of memseg page size so that heap
expansion and contraction does not have this issue.

For user requested DMA map/unmap disallow partial unmapping
for VFIO type1.

Fixes: 73a639085938 ("vfio: allow to map other memory regions")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: David Christensen <drc@linux.vnet.ibm.com>
---
 lib/librte_eal/linux/eal_vfio.c | 34 +++++++++++++++++++++++++++------
 lib/librte_eal/linux/eal_vfio.h |  1 +
 2 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/lib/librte_eal/linux/eal_vfio.c b/lib/librte_eal/linux/eal_vfio.c
index 64b134d530..b15b75882b 100644
--- a/lib/librte_eal/linux/eal_vfio.c
+++ b/lib/librte_eal/linux/eal_vfio.c
@@ -70,6 +70,7 @@ static const struct vfio_iommu_type iommu_types[] = {
 	{
 		.type_id = RTE_VFIO_TYPE1,
 		.name = "Type 1",
+		.partial_unmap = false,
 		.dma_map_func = &vfio_type1_dma_map,
 		.dma_user_map_func = &vfio_type1_dma_mem_map
 	},
@@ -77,6 +78,7 @@ static const struct vfio_iommu_type iommu_types[] = {
 	{
 		.type_id = RTE_VFIO_SPAPR,
 		.name = "sPAPR",
+		.partial_unmap = true,
 		.dma_map_func = &vfio_spapr_dma_map,
 		.dma_user_map_func = &vfio_spapr_dma_mem_map
 	},
@@ -84,6 +86,7 @@ static const struct vfio_iommu_type iommu_types[] = {
 	{
 		.type_id = RTE_VFIO_NOIOMMU,
 		.name = "No-IOMMU",
+		.partial_unmap = true,
 		.dma_map_func = &vfio_noiommu_dma_map,
 		.dma_user_map_func = &vfio_noiommu_dma_mem_map
 	},
@@ -526,12 +529,19 @@ vfio_mem_event_callback(enum rte_mem_event type, const void *addr, size_t len,
 	/* for IOVA as VA mode, no need to care for IOVA addresses */
 	if (rte_eal_iova_mode() == RTE_IOVA_VA && msl->external == 0) {
 		uint64_t vfio_va = (uint64_t)(uintptr_t)addr;
-		if (type == RTE_MEM_EVENT_ALLOC)
-			vfio_dma_mem_map(default_vfio_cfg, vfio_va, vfio_va,
-					len, 1);
-		else
-			vfio_dma_mem_map(default_vfio_cfg, vfio_va, vfio_va,
-					len, 0);
+		uint64_t page_sz = msl->page_sz;
+
+		/* Maintain granularity of DMA map/unmap to memseg size */
+		for (; cur_len < len; cur_len += page_sz) {
+			if (type == RTE_MEM_EVENT_ALLOC)
+				vfio_dma_mem_map(default_vfio_cfg, vfio_va,
+						 vfio_va, page_sz, 1);
+			else
+				vfio_dma_mem_map(default_vfio_cfg, vfio_va,
+						 vfio_va, page_sz, 0);
+			vfio_va += page_sz;
+		}
+
 		return;
 	}
 
@@ -1348,6 +1358,12 @@ vfio_type1_dma_mem_map(int vfio_container_fd, uint64_t vaddr, uint64_t iova,
 			RTE_LOG(ERR, EAL, "  cannot clear DMA remapping, error %i (%s)\n",
 					errno, strerror(errno));
 			return -1;
+		} else if (dma_unmap.size != len) {
+			RTE_LOG(ERR, EAL, "  unexpected size %"PRIu64" of DMA "
+				"remapping cleared instead of %"PRIu64"\n",
+				(uint64_t)dma_unmap.size, len);
+			rte_errno = EIO;
+			return -1;
 		}
 	}
 
@@ -1823,6 +1839,12 @@ container_dma_unmap(struct vfio_config *vfio_cfg, uint64_t vaddr, uint64_t iova,
 		/* we're partially unmapping a previously mapped region, so we
 		 * need to split entry into two.
 		 */
+		if (!vfio_cfg->vfio_iommu_type->partial_unmap) {
+			RTE_LOG(DEBUG, EAL, "DMA partial unmap unsupported\n");
+			rte_errno = ENOTSUP;
+			ret = -1;
+			goto out;
+		}
 		if (user_mem_maps->n_maps == VFIO_MAX_USER_MEM_MAPS) {
 			RTE_LOG(ERR, EAL, "Not enough space to store partial mapping\n");
 			rte_errno = ENOMEM;
diff --git a/lib/librte_eal/linux/eal_vfio.h b/lib/librte_eal/linux/eal_vfio.h
index cb2d35fb12..6ebaca6a0c 100644
--- a/lib/librte_eal/linux/eal_vfio.h
+++ b/lib/librte_eal/linux/eal_vfio.h
@@ -113,6 +113,7 @@ typedef int (*vfio_dma_user_func_t)(int fd, uint64_t vaddr, uint64_t iova,
 struct vfio_iommu_type {
 	int type_id;
 	const char *name;
+	bool partial_unmap;
 	vfio_dma_user_func_t dma_user_map_func;
 	vfio_dma_func_t dma_map_func;
 };
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:26.774717800 +0800
+++ 0002-vfio-fix-DMA-mapping-granularity-for-IOVA-as-VA.patch	2021-05-10 23:59:26.310000000 +0800
@@ -1 +1 @@
-From c13ca4e81cac591904c893a65ffbbf446af0268a Mon Sep 17 00:00:00 2001
+From 7f904ea0c6725fabfe16812f3d36d250ec3981c2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit c13ca4e81cac591904c893a65ffbbf446af0268a ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'test/mem: fix page size for external memory' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'power: remove duplicated symbols from map file' " Xueming Li
                   ` (226 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: Luca Boccassi, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e41a908c66b456ca1b97af64ea78a9f5a79fc878

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e41a908c66b456ca1b97af64ea78a9f5a79fc878 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Fri, 15 Jan 2021 13:02:43 +0530
Subject: [PATCH] test/mem: fix page size for external memory
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 52db57db0536bf20cbb50464ca4c18b0c9fde4e4 ]

Currently external memory test uses 4K page size.
VFIO DMA mapping works only with system page granularity.

Earlier it was working because all the contiguous mappings
were coalesced and mapped in one-go which ended up becoming
a lot bigger page. Now that VFIO DMA mappings both in IOVA as VA
and IOVA as PA mode, are being done at memseg list granularity,
we need to use system page size.

Fixes: b270daa43b3d ("test: support external memory")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 app/test/test_external_mem.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test/test_external_mem.c b/app/test/test_external_mem.c
index 7eb81f6448..5edf88b9f6 100644
--- a/app/test/test_external_mem.c
+++ b/app/test/test_external_mem.c
@@ -13,6 +13,7 @@
 #include <rte_common.h>
 #include <rte_debug.h>
 #include <rte_eal.h>
+#include <rte_eal_paging.h>
 #include <rte_errno.h>
 #include <rte_malloc.h>
 #include <rte_ring.h>
@@ -532,8 +533,8 @@ fail:
 static int
 test_external_mem(void)
 {
+	size_t pgsz = rte_mem_page_size();
 	size_t len = EXTERNAL_MEM_SZ;
-	size_t pgsz = RTE_PGSIZE_4K;
 	rte_iova_t iova[len / pgsz];
 	void *addr;
 	int ret, n_pages;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:26.801750300 +0800
+++ 0003-test-mem-fix-page-size-for-external-memory.patch	2021-05-10 23:59:26.310000000 +0800
@@ -1 +1 @@
-From 52db57db0536bf20cbb50464ca4c18b0c9fde4e4 Mon Sep 17 00:00:00 2001
+From e41a908c66b456ca1b97af64ea78a9f5a79fc878 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 52db57db0536bf20cbb50464ca4c18b0c9fde4e4 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'power: remove duplicated symbols from map file' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'test/mem: fix page size for external memory' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'vfio: fix API description' " Xueming Li
                   ` (225 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Luca Boccassi, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b8bde7fa4b1a6303ce7a017031885ea4e72d83e5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b8bde7fa4b1a6303ce7a017031885ea4e72d83e5 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Thu, 25 Feb 2021 10:54:49 +0000
Subject: [PATCH] power: remove duplicated symbols from map file
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit e79b0efd989a077d0193e7dbf47f966f65d0c9dc ]

This is causing build error, like:
https://travis-ci.com/github/ovsrobot/dpdk/jobs/482121104

Also '@internal' marker removed from doxygen comment, since public API
should not be internal.
Experimental tag removed from 'rte_power_guest_channel_send_msg()'

Fixes: 4d3892dcd77b ("power: make channel message functions public")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_power/rte_power_guest_channel.h | 8 --------
 lib/librte_power/version.map               | 2 --
 2 files changed, 10 deletions(-)

diff --git a/lib/librte_power/rte_power_guest_channel.h b/lib/librte_power/rte_power_guest_channel.h
index ed4fbfdcd3..b5de1bd243 100644
--- a/lib/librte_power/rte_power_guest_channel.h
+++ b/lib/librte_power/rte_power_guest_channel.h
@@ -119,11 +119,6 @@ struct rte_power_channel_packet_caps_list {
 };
 
 /**
- * @internal
- *
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
  * Send a message contained in pkt over the Virtio-Serial to the host endpoint.
  *
  * @param pkt
@@ -136,13 +131,10 @@ struct rte_power_channel_packet_caps_list {
  *  - 0 on success.
  *  - Negative on error.
  */
-__rte_experimental
 int rte_power_guest_channel_send_msg(struct rte_power_channel_packet *pkt,
 			unsigned int lcore_id);
 
 /**
- * @internal
- *
  * @warning
  * @b EXPERIMENTAL: this API may change without prior notice.
  *
diff --git a/lib/librte_power/version.map b/lib/librte_power/version.map
index 13f0af3b2d..7e7baafbf1 100644
--- a/lib/librte_power/version.map
+++ b/lib/librte_power/version.map
@@ -36,6 +36,4 @@ EXPERIMENTAL {
 	rte_power_poll_stat_update;
 
 	# added in 21.02
-	rte_power_guest_channel_receive_msg;
-	rte_power_guest_channel_send_msg;
 };
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:26.828154600 +0800
+++ 0004-power-remove-duplicated-symbols-from-map-file.patch	2021-05-10 23:59:26.310000000 +0800
@@ -1 +1 @@
-From e79b0efd989a077d0193e7dbf47f966f65d0c9dc Mon Sep 17 00:00:00 2001
+From b8bde7fa4b1a6303ce7a017031885ea4e72d83e5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit e79b0efd989a077d0193e7dbf47f966f65d0c9dc ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -54 +56 @@
-index 3ba9390241..b004e3e4a9 100644
+index 13f0af3b2d..7e7baafbf1 100644
@@ -57 +59,3 @@
-@@ -38,6 +38,4 @@ EXPERIMENTAL {
+@@ -36,6 +36,4 @@ EXPERIMENTAL {
+ 	rte_power_poll_stat_update;
+ 
@@ -59,2 +62,0 @@
- 	rte_power_ethdev_pmgmt_queue_disable;
- 	rte_power_ethdev_pmgmt_queue_enable;

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

* [dpdk-stable] patch 'vfio: fix API description' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'test/mem: fix page size for external memory' " Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'power: remove duplicated symbols from map file' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'fbarray: fix log message on truncation error' " Xueming Li
                   ` (224 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Luca Boccassi, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/db950ecec21d4a82f57657e45bf7e2aa9daf2e57

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From db950ecec21d4a82f57657e45bf7e2aa9daf2e57 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Sat, 6 Jun 2020 17:17:20 +0800
Subject: [PATCH] vfio: fix API description
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 8d63961fc7137cab823f85a50ee82779792f21e4 ]

Fix few comments and add detailed comments for return value.

Fixes: 279b581c897d ("vfio: expose functions")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/include/rte_vfio.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/librte_eal/include/rte_vfio.h b/lib/librte_eal/include/rte_vfio.h
index 20ed8c45a9..e7a87454be 100644
--- a/lib/librte_eal/include/rte_vfio.h
+++ b/lib/librte_eal/include/rte_vfio.h
@@ -156,7 +156,7 @@ int rte_vfio_enable(const char *modname);
  *   kernel module name.
  *
  * @return
- *   !0 if true.
+ *   1 if true.
  *   0 otherwise.
  */
 int rte_vfio_is_enabled(const char *modname);
@@ -168,8 +168,9 @@ int rte_vfio_is_enabled(const char *modname);
  * an error on BSD.
  *
  * @return
- *   !0 if true.
- *   0 otherwise.
+ *   1 if true.
+ *   0 if false.
+ *   <0 for errors.
  */
 int rte_vfio_noiommu_is_enabled(void);
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:26.853353700 +0800
+++ 0005-vfio-fix-API-description.patch	2021-05-10 23:59:26.310000000 +0800
@@ -1 +1 @@
-From 8d63961fc7137cab823f85a50ee82779792f21e4 Mon Sep 17 00:00:00 2001
+From db950ecec21d4a82f57657e45bf7e2aa9daf2e57 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 8d63961fc7137cab823f85a50ee82779792f21e4 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'fbarray: fix log message on truncation error' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (2 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'vfio: fix API description' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/failsafe: fix RSS hash offload reporting' " Xueming Li
                   ` (223 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Luca Boccassi, Andrew Boyer, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4f140c14a27906881c4644b5afdeda83146ea9fd

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4f140c14a27906881c4644b5afdeda83146ea9fd Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Fri, 19 Feb 2021 17:54:45 +0000
Subject: [PATCH] fbarray: fix log message on truncation error
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 2a2ebeab9e3309ab332baefdbcc1caa7e62ecc82 ]

When file truncation fails, the log message attempts to print a path of
file we failed to truncate, but this path was never set to anything and,
what's worse, was uninitialized. Fix it by passing path from the caller.

Coverity issue: 366122
Fixes: c44d09811b40 ("eal: add shared indexed file-backed array")

Reported-by: Andrew Boyer <aboyer@pensando.io>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_eal/common/eal_common_fbarray.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_fbarray.c b/lib/librte_eal/common/eal_common_fbarray.c
index d974f3dab7..592ec58594 100644
--- a/lib/librte_eal/common/eal_common_fbarray.c
+++ b/lib/librte_eal/common/eal_common_fbarray.c
@@ -81,9 +81,8 @@ get_used_mask(void *data, unsigned int elt_sz, unsigned int len)
 }
 
 static int
-resize_and_map(int fd, void *addr, size_t len)
+resize_and_map(int fd, const char *path, void *addr, size_t len)
 {
-	char path[PATH_MAX];
 	void *map_addr;
 
 	if (eal_file_truncate(fd, len)) {
@@ -792,7 +791,7 @@ rte_fbarray_init(struct rte_fbarray *arr, const char *name, unsigned int len,
 		if (eal_file_lock(fd, EAL_FLOCK_SHARED, EAL_FLOCK_RETURN))
 			goto fail;
 
-		if (resize_and_map(fd, data, mmap_len))
+		if (resize_and_map(fd, path, data, mmap_len))
 			goto fail;
 	}
 	ma->addr = data;
@@ -895,7 +894,7 @@ rte_fbarray_attach(struct rte_fbarray *arr)
 	if (eal_file_lock(fd, EAL_FLOCK_SHARED, EAL_FLOCK_RETURN))
 		goto fail;
 
-	if (resize_and_map(fd, data, mmap_len))
+	if (resize_and_map(fd, path, data, mmap_len))
 		goto fail;
 
 	/* store our new memory area */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:26.877953200 +0800
+++ 0006-fbarray-fix-log-message-on-truncation-error.patch	2021-05-10 23:59:26.310000000 +0800
@@ -1 +1 @@
-From 2a2ebeab9e3309ab332baefdbcc1caa7e62ecc82 Mon Sep 17 00:00:00 2001
+From 4f140c14a27906881c4644b5afdeda83146ea9fd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 2a2ebeab9e3309ab332baefdbcc1caa7e62ecc82 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/failsafe: fix RSS hash offload reporting' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (3 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'fbarray: fix log message on truncation error' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/failsafe: report minimum and maximum MTU' " Xueming Li
                   ` (222 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Luca Boccassi, Gaetan Rivet, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9da42b8f936faaa9daec7ad4872785f789b78273

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9da42b8f936faaa9daec7ad4872785f789b78273 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Date: Tue, 22 Dec 2020 11:00:04 +0300
Subject: [PATCH] net/failsafe: fix RSS hash offload reporting
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit f971b7d3013d53a5d911b8c5cf51ab55946253b0 ]

If sub-devices support RSS hash offload, the offload should be
reported by the failsafe device since handling is transparent
from failsafe point of view.

Fixes: 5d308972954c ("ethdev: add mbuf RSS update as an offload")

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Gaetan Rivet <grive@u256.net>
---
 drivers/net/failsafe/failsafe_ops.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c
index 492047f587..9946b696f3 100644
--- a/drivers/net/failsafe/failsafe_ops.c
+++ b/drivers/net/failsafe/failsafe_ops.c
@@ -1192,7 +1192,8 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
 		DEV_RX_OFFLOAD_SCATTER |
 		DEV_RX_OFFLOAD_TIMESTAMP |
-		DEV_RX_OFFLOAD_SECURITY;
+		DEV_RX_OFFLOAD_SECURITY |
+		DEV_RX_OFFLOAD_RSS_HASH;
 
 	infos->rx_queue_offload_capa =
 		DEV_RX_OFFLOAD_VLAN_STRIP |
@@ -1209,7 +1210,8 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
 		DEV_RX_OFFLOAD_SCATTER |
 		DEV_RX_OFFLOAD_TIMESTAMP |
-		DEV_RX_OFFLOAD_SECURITY;
+		DEV_RX_OFFLOAD_SECURITY |
+		DEV_RX_OFFLOAD_RSS_HASH;
 
 	infos->tx_offload_capa =
 		DEV_TX_OFFLOAD_MULTI_SEGS |
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:26.902135100 +0800
+++ 0007-net-failsafe-fix-RSS-hash-offload-reporting.patch	2021-05-10 23:59:26.310000000 +0800
@@ -1 +1 @@
-From f971b7d3013d53a5d911b8c5cf51ab55946253b0 Mon Sep 17 00:00:00 2001
+From 9da42b8f936faaa9daec7ad4872785f789b78273 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit f971b7d3013d53a5d911b8c5cf51ab55946253b0 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 2b6ca9080d..966cfd2dba 100644
+index 492047f587..9946b696f3 100644

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

* [dpdk-stable] patch 'net/failsafe: report minimum and maximum MTU' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (4 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/failsafe: fix RSS hash offload reporting' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/mlx5: fix external buffer pool registration for Rx queue' " Xueming Li
                   ` (221 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Luca Boccassi, Gaetan Rivet, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7fe1e5cdb90fef782d2752ba1992edaf65fc49f4

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7fe1e5cdb90fef782d2752ba1992edaf65fc49f4 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Date: Tue, 22 Dec 2020 11:51:49 +0300
Subject: [PATCH] net/failsafe: report minimum and maximum MTU
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit c0396a48b526eb3d38c941a7e7d63d360a789d16 ]

Take minimum and maximum MTU values for subdevices and
report maximum of minimums and minimum of maximums.

Fixes: ad97ceece12c ("ethdev: add min/max MTU to device info")

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Gaetan Rivet <grive@u256.net>
---
 drivers/net/failsafe/failsafe_ops.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c
index 9946b696f3..c9c38258a9 100644
--- a/drivers/net/failsafe/failsafe_ops.c
+++ b/drivers/net/failsafe/failsafe_ops.c
@@ -1095,6 +1095,8 @@ static void
 fs_dev_merge_info(struct rte_eth_dev_info *info,
 		  const struct rte_eth_dev_info *sinfo)
 {
+	info->min_mtu = RTE_MAX(info->min_mtu, sinfo->min_mtu);
+	info->max_mtu = RTE_MIN(info->max_mtu, sinfo->max_mtu);
 	info->max_rx_pktlen = RTE_MIN(info->max_rx_pktlen, sinfo->max_rx_pktlen);
 	info->max_rx_queues = RTE_MIN(info->max_rx_queues, sinfo->max_rx_queues);
 	info->max_tx_queues = RTE_MIN(info->max_tx_queues, sinfo->max_tx_queues);
@@ -1163,6 +1165,8 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
 	int ret;
 
 	/* Use maximum upper bounds by default */
+	infos->min_mtu = RTE_ETHER_MIN_MTU;
+	infos->max_mtu = UINT16_MAX;
 	infos->max_rx_pktlen = UINT32_MAX;
 	infos->max_rx_queues = RTE_MAX_QUEUES_PER_PORT;
 	infos->max_tx_queues = RTE_MAX_QUEUES_PER_PORT;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:26.924478600 +0800
+++ 0008-net-failsafe-report-minimum-and-maximum-MTU.patch	2021-05-10 23:59:26.310000000 +0800
@@ -1 +1 @@
-From c0396a48b526eb3d38c941a7e7d63d360a789d16 Mon Sep 17 00:00:00 2001
+From 7fe1e5cdb90fef782d2752ba1992edaf65fc49f4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit c0396a48b526eb3d38c941a7e7d63d360a789d16 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 966cfd2dba..1343777d61 100644
+index 9946b696f3..c9c38258a9 100644

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

* [dpdk-stable] patch 'net/mlx5: fix external buffer pool registration for Rx queue' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (5 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/failsafe: report minimum and maximum MTU' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'common/mlx5: fix DevX read output buffer size' " Xueming Li
                   ` (220 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/23b584d6cc854fad62237b03899e494adc6526d5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 23b584d6cc854fad62237b03899e494adc6526d5 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Fri, 12 Feb 2021 13:06:30 +0200
Subject: [PATCH] net/mlx5: fix external buffer pool registration for Rx queue
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit a9ae33fbbc2d8d51542abf71d0a73887c17f39b5 ]

On Rx queue creation the mlx5 PMD registers the data buffers of the
specified pools for DMA operations. It scans the mem_list of the pools
and creates the MRs (DMA related NIC objects) for the chunks found.
If the pool is created with rte_pktmbuf_pool_create_extbuf() and
refers to the external attached buffers (whose are in the area of
application responsibility and it should explicitly register the
data buffer memory for DMA with rte_dev_dma_map() call) the chunks
contain the mbuf structures only, w/o any built-in data buffers.
Hence, DMA with mlx5 NIC never happens to this area and there is
no need to create MRs for these ones.

The extra not needed MRs were created for the pools with external
buffers causing MR cache load and performance was slightly affected.
The patch checks the mbuf pool type and skips MR creation for the
pools with external buffers.

Fixes: bdb8e5b1ea7b ("net/mlx5: allow allocated mbuf with external buffer")

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

diff --git a/drivers/net/mlx5/mlx5_mr.c b/drivers/net/mlx5/mlx5_mr.c
index 8b20ee3f83..da4e91fc24 100644
--- a/drivers/net/mlx5/mlx5_mr.c
+++ b/drivers/net/mlx5/mlx5_mr.c
@@ -535,7 +535,18 @@ mlx5_mr_update_mp(struct rte_eth_dev *dev, struct mlx5_mr_ctrl *mr_ctrl,
 		.mr_ctrl = mr_ctrl,
 		.ret = 0,
 	};
+	uint32_t flags = rte_pktmbuf_priv_flags(mp);
 
+	if (flags & RTE_PKTMBUF_POOL_F_PINNED_EXT_BUF) {
+		/*
+		 * The pinned external buffer should be registered for DMA
+		 * operations by application. The mem_list of the pool contains
+		 * the list of chunks with mbuf structures w/o built-in data
+		 * buffers and DMA actually does not happen there, no need
+		 * to create MR for these chunks.
+		 */
+		return 0;
+	}
 	DRV_LOG(DEBUG, "Port %u Rx queue registering mp %s "
 		       "having %u chunks.", dev->data->port_id,
 		       mp->name, mp->nb_mem_chunks);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:26.943978500 +0800
+++ 0009-net-mlx5-fix-external-buffer-pool-registration-for-R.patch	2021-05-10 23:59:26.310000000 +0800
@@ -1 +1 @@
-From a9ae33fbbc2d8d51542abf71d0a73887c17f39b5 Mon Sep 17 00:00:00 2001
+From 23b584d6cc854fad62237b03899e494adc6526d5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit a9ae33fbbc2d8d51542abf71d0a73887c17f39b5 ]
@@ -23 +25,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'common/mlx5: fix DevX read output buffer size' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (6 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/mlx5: fix external buffer pool registration for Rx queue' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/mlx5: fix metadata item validation for ingress flows' " Xueming Li
                   ` (219 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Dekel Peled; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8d2066d2ec530f74951f54f53b7b48847117681e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8d2066d2ec530f74951f54f53b7b48847117681e Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@nvidia.com>
Date: Thu, 18 Feb 2021 18:18:05 +0200
Subject: [PATCH] common/mlx5: fix DevX read output buffer size
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit dd9e9d5491858bee49914c4fa574cc8e15640905 ]

Previous patch included a glue function call, with wrong size
calculation for an output buffer.
This patch fixes the issue, using the correct size calculation.

Fixes: bb7ef9a96281 ("common/mlx5: add register access DevX routine")

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index eafee65f22..4485a9cd5e 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -53,8 +53,8 @@ mlx5_devx_cmd_register_read(void *ctx, uint16_t reg_id, uint32_t arg,
 	MLX5_SET(access_register_in, in, register_id, reg_id);
 	MLX5_SET(access_register_in, in, argument, arg);
 	rc = mlx5_glue->devx_general_cmd(ctx, in, sizeof(in), out,
-					 MLX5_ST_SZ_DW(access_register_out) *
-					 sizeof(uint32_t) + dw_cnt);
+					 MLX5_ST_SZ_BYTES(access_register_out) +
+					 sizeof(uint32_t) * dw_cnt);
 	if (rc)
 		goto error;
 	status = MLX5_GET(access_register_out, out, status);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:26.964338500 +0800
+++ 0010-common-mlx5-fix-DevX-read-output-buffer-size.patch	2021-05-10 23:59:26.310000000 +0800
@@ -1 +1 @@
-From dd9e9d5491858bee49914c4fa574cc8e15640905 Mon Sep 17 00:00:00 2001
+From 8d2066d2ec530f74951f54f53b7b48847117681e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit dd9e9d5491858bee49914c4fa574cc8e15640905 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index cc70c794e7..0185d57036 100644
+index eafee65f22..4485a9cd5e 100644

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

* [dpdk-stable] patch 'net/mlx5: fix metadata item validation for ingress flows' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (7 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'common/mlx5: fix DevX read output buffer size' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'bus/fslmc: fix random portal hangs with qbman 5.0' " Xueming Li
                   ` (218 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/58200ed66af5bfec99190f6e9eba6ffa4031c733

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 58200ed66af5bfec99190f6e9eba6ffa4031c733 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 10 Feb 2021 11:30:51 +0200
Subject: [PATCH] net/mlx5: fix metadata item validation for ingress flows
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit aa1c17f1d8202a1a6e64e813103cdbe6b357b0ba ]

In legacy metadata mode the metadata register B is engaged to
handle the metadata item. In the ingress domain the hardware
supports the register setting only, the match on register B
is not supported.

Due to this limitation only the SET_META action can be supported
for the ingress flows, the META item should be rejected on
flow validation.

Fixes: 5f3541724e08 ("net/mlx5: fix flow META item validation")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 3fdc3ffe16..353a8df24c 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1450,13 +1450,20 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,
 					  "isn't supported");
 		if (reg != REG_A)
 			nic_mask.data = priv->sh->dv_meta_mask;
-	} else if (attr->transfer) {
-		return rte_flow_error_set(error, ENOTSUP,
+	} else {
+		if (attr->transfer)
+			return rte_flow_error_set(error, ENOTSUP,
 					RTE_FLOW_ERROR_TYPE_ITEM, item,
 					"extended metadata feature "
 					"should be enabled when "
 					"meta item is requested "
 					"with e-switch mode ");
+		if (attr->ingress)
+			return rte_flow_error_set(error, ENOTSUP,
+					RTE_FLOW_ERROR_TYPE_ITEM, item,
+					"match on metadata for ingress "
+					"is not supported in legacy "
+					"metadata mode");
 	}
 	if (!mask)
 		mask = &rte_flow_item_meta_mask;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:26.985944800 +0800
+++ 0011-net-mlx5-fix-metadata-item-validation-for-ingress-fl.patch	2021-05-10 23:59:26.320000000 +0800
@@ -1 +1 @@
-From aa1c17f1d8202a1a6e64e813103cdbe6b357b0ba Mon Sep 17 00:00:00 2001
+From 58200ed66af5bfec99190f6e9eba6ffa4031c733 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit aa1c17f1d8202a1a6e64e813103cdbe6b357b0ba ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index a44291a3c9..1a74d5ac2b 100644
+index 3fdc3ffe16..353a8df24c 100644
@@ -27 +29 @@
-@@ -1960,13 +1960,20 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,
+@@ -1450,13 +1450,20 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,

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

* [dpdk-stable] patch 'bus/fslmc: fix random portal hangs with qbman 5.0' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (8 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/mlx5: fix metadata item validation for ingress flows' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'bus/dpaa: fix statistics reading' " Xueming Li
                   ` (217 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Youri Querry; +Cc: Luca Boccassi, Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1965f4ee95941d134ce4f5751ee16fb37bfd9198

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1965f4ee95941d134ce4f5751ee16fb37bfd9198 Mon Sep 17 00:00:00 2001
From: Youri Querry <youri.querry_1@nxp.com>
Date: Wed, 24 Feb 2021 18:12:49 +0530
Subject: [PATCH] bus/fslmc: fix random portal hangs with qbman 5.0
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit a675f35d784115bb2a746daa94b6b5ab6305298f ]

Random portal hangs observed on device with QBMAN 5.0

This fixes few random packet hang issues in event mode.
Few things fixed it.
1. Generally, pi == ci, no need for extra checks.
2. The proper initializations in init with ci

Fixes: 1b49352f41be ("bus/fslmc: rename portal pi index to consumer index")

Signed-off-by: Youri Querry <youri.querry_1@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/qbman/qbman_portal.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/drivers/bus/fslmc/qbman/qbman_portal.c b/drivers/bus/fslmc/qbman/qbman_portal.c
index 77c9d508c4..aedcad9258 100644
--- a/drivers/bus/fslmc/qbman/qbman_portal.c
+++ b/drivers/bus/fslmc/qbman/qbman_portal.c
@@ -339,17 +339,9 @@ struct qbman_swp *qbman_swp_init(const struct qbman_swp_desc *d)
 	eqcr_pi = qbman_cinh_read(&p->sys, QBMAN_CINH_SWP_EQCR_PI);
 	p->eqcr.pi = eqcr_pi & p->eqcr.pi_ci_mask;
 	p->eqcr.pi_vb = eqcr_pi & QB_VALID_BIT;
-	if ((p->desc.qman_version & QMAN_REV_MASK) >= QMAN_REV_5000
-			&& (d->cena_access_mode == qman_cena_fastest_access))
-		p->eqcr.ci = qbman_cinh_read(&p->sys, QBMAN_CINH_SWP_EQCR_PI)
-					     & p->eqcr.pi_ci_mask;
-	else
-		p->eqcr.ci = qbman_cinh_read(&p->sys, QBMAN_CINH_SWP_EQCR_CI)
-					     & p->eqcr.pi_ci_mask;
-	p->eqcr.available = p->eqcr.pi_ring_size -
-				qm_cyc_diff(p->eqcr.pi_ring_size,
-				p->eqcr.ci & (p->eqcr.pi_ci_mask<<1),
-				p->eqcr.pi & (p->eqcr.pi_ci_mask<<1));
+	p->eqcr.ci = qbman_cinh_read(&p->sys, QBMAN_CINH_SWP_EQCR_CI)
+			& p->eqcr.pi_ci_mask;
+	p->eqcr.available = p->eqcr.pi_ring_size;
 
 	portal_idx_map[p->desc.idx] = p;
 	return p;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.013875500 +0800
+++ 0012-bus-fslmc-fix-random-portal-hangs-with-qbman-5.0.patch	2021-05-10 23:59:26.320000000 +0800
@@ -1 +1 @@
-From a675f35d784115bb2a746daa94b6b5ab6305298f Mon Sep 17 00:00:00 2001
+From 1965f4ee95941d134ce4f5751ee16fb37bfd9198 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit a675f35d784115bb2a746daa94b6b5ab6305298f ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'bus/dpaa: fix statistics reading' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (9 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'bus/fslmc: fix random portal hangs with qbman 5.0' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/dpaa2: fix getting link status' " Xueming Li
                   ` (216 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Nipun Gupta; +Cc: Luca Boccassi, Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e518710835e10174e0dfe74ebcce73507046a0c6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e518710835e10174e0dfe74ebcce73507046a0c6 Mon Sep 17 00:00:00 2001
From: Nipun Gupta <nipun.gupta@nxp.com>
Date: Wed, 24 Feb 2021 18:12:50 +0530
Subject: [PATCH] bus/dpaa: fix statistics reading
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit e62a3f4183f14a91f0dd63e9ea39e749406b5653 ]

Reading of word un-aligned values after reading word aligned
values lead to corruption of memory.
This patch make changes such that word aligned access is made,
before making an un-aligned access

Fixes: 6d6b4f49a155 ("bus/dpaa: add FMAN hardware operations")

Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/dpaa/base/fman/fman_hw.c | 33 ++++++++++++++--------------
 1 file changed, 16 insertions(+), 17 deletions(-)

diff --git a/drivers/bus/dpaa/base/fman/fman_hw.c b/drivers/bus/dpaa/base/fman/fman_hw.c
index 4ab49f7853..af9bac76c2 100644
--- a/drivers/bus/dpaa/base/fman/fman_hw.c
+++ b/drivers/bus/dpaa/base/fman/fman_hw.c
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  *
- * Copyright 2017 NXP
+ * Copyright 2017,2020 NXP
  *
  */
 
@@ -219,20 +219,20 @@ fman_if_stats_get(struct fman_if *p, struct rte_eth_stats *stats)
 	struct memac_regs *regs = m->ccsr_map;
 
 	/* read recved packet count */
-	stats->ipackets = ((u64)in_be32(&regs->rfrm_u)) << 32 |
-			in_be32(&regs->rfrm_l);
-	stats->ibytes = ((u64)in_be32(&regs->roct_u)) << 32 |
-			in_be32(&regs->roct_l);
-	stats->ierrors = ((u64)in_be32(&regs->rerr_u)) << 32 |
-			in_be32(&regs->rerr_l);
+	stats->ipackets = (u64)in_be32(&regs->rfrm_l) |
+			((u64)in_be32(&regs->rfrm_u)) << 32;
+	stats->ibytes = (u64)in_be32(&regs->roct_l) |
+			((u64)in_be32(&regs->roct_u)) << 32;
+	stats->ierrors = (u64)in_be32(&regs->rerr_l) |
+			((u64)in_be32(&regs->rerr_u)) << 32;
 
 	/* read xmited packet count */
-	stats->opackets = ((u64)in_be32(&regs->tfrm_u)) << 32 |
-			in_be32(&regs->tfrm_l);
-	stats->obytes = ((u64)in_be32(&regs->toct_u)) << 32 |
-			in_be32(&regs->toct_l);
-	stats->oerrors = ((u64)in_be32(&regs->terr_u)) << 32 |
-			in_be32(&regs->terr_l);
+	stats->opackets = (u64)in_be32(&regs->tfrm_l) |
+			((u64)in_be32(&regs->tfrm_u)) << 32;
+	stats->obytes = (u64)in_be32(&regs->toct_l) |
+			((u64)in_be32(&regs->toct_u)) << 32;
+	stats->oerrors = (u64)in_be32(&regs->terr_l) |
+			((u64)in_be32(&regs->terr_u)) << 32;
 }
 
 void
@@ -244,10 +244,9 @@ fman_if_stats_get_all(struct fman_if *p, uint64_t *value, int n)
 	uint64_t base_offset = offsetof(struct memac_regs, reoct_l);
 
 	for (i = 0; i < n; i++)
-		value[i] = ((u64)in_be32((char *)regs
-				+ base_offset + 8 * i + 4)) << 32 |
-				((u64)in_be32((char *)regs
-				+ base_offset + 8 * i));
+		value[i] = (((u64)in_be32((char *)regs + base_offset + 8 * i) |
+				(u64)in_be32((char *)regs + base_offset +
+				8 * i + 4)) << 32);
 }
 
 void
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.037765100 +0800
+++ 0013-bus-dpaa-fix-statistics-reading.patch	2021-05-10 23:59:26.330000000 +0800
@@ -1 +1 @@
-From e62a3f4183f14a91f0dd63e9ea39e749406b5653 Mon Sep 17 00:00:00 2001
+From e518710835e10174e0dfe74ebcce73507046a0c6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit e62a3f4183f14a91f0dd63e9ea39e749406b5653 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/dpaa2: fix getting link status' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (10 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'bus/dpaa: fix statistics reading' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/dpaa: " Xueming Li
                   ` (215 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Rohit Raj; +Cc: Luca Boccassi, Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d287fda7da82a6224290ac9b3548d34d43593b32

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d287fda7da82a6224290ac9b3548d34d43593b32 Mon Sep 17 00:00:00 2001
From: Rohit Raj <rohit.raj@nxp.com>
Date: Wed, 24 Feb 2021 18:12:51 +0530
Subject: [PATCH] net/dpaa2: fix getting link status
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit eadcfd95ffde80b679b757d060f889f683c96266 ]

According to DPDK Documentation, rte_eth_link_get API can wait up to 9
seconds for auto-negotiation to finish and then returns link status.

In current implementation of rte_eth_link_get API in DPAA2 drivers, it
was not waiting for auto negotiation to finish and was returning link
status DOWN
It can cause issues with DPDK applications which relies on
rte_eth_link_get API for link status and does not support link status
interrupt.
Similar kind of issue was seen in TRex Application.

This patch fixes this bug by adding wait for up to 9 seconds for auto
negotiation to finish.

Fixes: c56c86ff87c1 ("net/dpaa2: update link status")

Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa2/dpaa2_ethdev.c | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 6f38da3cce..5c1a12b841 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -31,6 +31,8 @@
 
 #define DRIVER_LOOPBACK_MODE "drv_loopback"
 #define DRIVER_NO_PREFETCH_MODE "drv_no_prefetch"
+#define CHECK_INTERVAL         100  /* 100ms */
+#define MAX_REPEAT_TIME        90   /* 9s (90 * 100ms) in total */
 
 /* Supported Rx offloads */
 static uint64_t dev_rx_offloads_sup =
@@ -1805,23 +1807,32 @@ error:
 /* return 0 means link status changed, -1 means not changed */
 static int
 dpaa2_dev_link_update(struct rte_eth_dev *dev,
-			int wait_to_complete __rte_unused)
+		      int wait_to_complete)
 {
 	int ret;
 	struct dpaa2_dev_priv *priv = dev->data->dev_private;
 	struct fsl_mc_io *dpni = (struct fsl_mc_io *)dev->process_private;
 	struct rte_eth_link link;
 	struct dpni_link_state state = {0};
+	uint8_t count;
 
 	if (dpni == NULL) {
 		DPAA2_PMD_ERR("dpni is NULL");
 		return 0;
 	}
 
-	ret = dpni_get_link_state(dpni, CMD_PRI_LOW, priv->token, &state);
-	if (ret < 0) {
-		DPAA2_PMD_DEBUG("error: dpni_get_link_state %d", ret);
-		return -1;
+	for (count = 0; count <= MAX_REPEAT_TIME; count++) {
+		ret = dpni_get_link_state(dpni, CMD_PRI_LOW, priv->token,
+					  &state);
+		if (ret < 0) {
+			DPAA2_PMD_DEBUG("error: dpni_get_link_state %d", ret);
+			return -1;
+		}
+		if (state.up == ETH_LINK_DOWN &&
+		    wait_to_complete)
+			rte_delay_ms(CHECK_INTERVAL);
+		else
+			break;
 	}
 
 	memset(&link, 0, sizeof(struct rte_eth_link));
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.058958500 +0800
+++ 0014-net-dpaa2-fix-getting-link-status.patch	2021-05-10 23:59:26.330000000 +0800
@@ -1 +1 @@
-From eadcfd95ffde80b679b757d060f889f683c96266 Mon Sep 17 00:00:00 2001
+From d287fda7da82a6224290ac9b3548d34d43593b32 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit eadcfd95ffde80b679b757d060f889f683c96266 ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -30 +32 @@
-index 38774e255b..a81c73438e 100644
+index 6f38da3cce..5c1a12b841 100644

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

* [dpdk-stable] patch 'net/dpaa: fix getting link status' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (11 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/dpaa2: fix getting link status' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/ionic: fix completion type in lif init' " Xueming Li
                   ` (214 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Rohit Raj; +Cc: Luca Boccassi, Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c725e11eb3b131f59dcabca5c9056831ef257473

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c725e11eb3b131f59dcabca5c9056831ef257473 Mon Sep 17 00:00:00 2001
From: Rohit Raj <rohit.raj@nxp.com>
Date: Wed, 24 Feb 2021 18:12:52 +0530
Subject: [PATCH] net/dpaa: fix getting link status
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 89b9bb08dd7f742a7ba20d1812b4fe1b4ddf5008 ]

According to DPDK Documentation, rte_eth_link_get API can wait up to 9
seconds for auto-negotiation to finish and then returns link status.

In current implementation of rte_eth_link_get API in DPAA drivers, it
was not waiting for auto negotiation to finish and was returning link
status DOWN
It can cause issues with DPDK applications which relies
on rte_eth_link_get API for link statusand does not support link status
interrupt.

This patch fixes this bug by adding wait for up to 9 seconds for auto
negotiation to finish.

Fixes: 2aa10990a8dd ("bus/dpaa: enable link state interrupt")

Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 0c87c136d7..79e39451b3 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -49,6 +49,9 @@
 #include <process.h>
 #include <fmlib/fm_ext.h>
 
+#define CHECK_INTERVAL         100  /* 100ms */
+#define MAX_REPEAT_TIME        90   /* 9s (90 * 100ms) in total */
+
 /* Supported Rx offloads */
 static uint64_t dev_rx_offloads_sup =
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
@@ -669,23 +672,30 @@ dpaa_dev_tx_burst_mode_get(struct rte_eth_dev *dev,
 }
 
 static int dpaa_eth_link_update(struct rte_eth_dev *dev,
-				int wait_to_complete __rte_unused)
+				int wait_to_complete)
 {
 	struct dpaa_if *dpaa_intf = dev->data->dev_private;
 	struct rte_eth_link *link = &dev->data->dev_link;
 	struct fman_if *fif = dev->process_private;
 	struct __fman_if *__fif = container_of(fif, struct __fman_if, __if);
 	int ret, ioctl_version;
+	uint8_t count;
 
 	PMD_INIT_FUNC_TRACE();
 
 	ioctl_version = dpaa_get_ioctl_version_number();
 
-
 	if (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) {
-		ret = dpaa_get_link_status(__fif->node_name, link);
-		if (ret)
-			return ret;
+		for (count = 0; count <= MAX_REPEAT_TIME; count++) {
+			ret = dpaa_get_link_status(__fif->node_name, link);
+			if (ret)
+				return ret;
+			if (link->link_status == ETH_LINK_DOWN &&
+			    wait_to_complete)
+				rte_delay_ms(CHECK_INTERVAL);
+			else
+				break;
+		}
 	} else {
 		link->link_status = dpaa_intf->valid;
 	}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.082257900 +0800
+++ 0015-net-dpaa-fix-getting-link-status.patch	2021-05-10 23:59:26.330000000 +0800
@@ -1 +1 @@
-From 89b9bb08dd7f742a7ba20d1812b4fe1b4ddf5008 Mon Sep 17 00:00:00 2001
+From c725e11eb3b131f59dcabca5c9056831ef257473 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 89b9bb08dd7f742a7ba20d1812b4fe1b4ddf5008 ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
-index d643514de6..c59873dd8a 100644
+index 0c87c136d7..79e39451b3 100644

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

* [dpdk-stable] patch 'net/ionic: fix completion type in lif init' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (12 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/dpaa: " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'app/testpmd: remove unnecessary UDP tunnel check' " Xueming Li
                   ` (213 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Andrew Boyer; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7a866f25e6aa059dca294bb85f5bf07c3b9b584e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7a866f25e6aa059dca294bb85f5bf07c3b9b584e Mon Sep 17 00:00:00 2001
From: Andrew Boyer <aboyer@pensando.io>
Date: Tue, 16 Feb 2021 12:35:40 -0800
Subject: [PATCH] net/ionic: fix completion type in lif init
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 656bfc9a4e3d377ebf160132242d1bb2b5f9b8b2 ]

The completion type was wrong.
Don't check the completion if the wait timed out.

Fixes: 669c8de67c88 ("net/ionic: support basic LIF")

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
---
 drivers/net/ionic/ionic_lif.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c
index 5894f3505a..33a5977ced 100644
--- a/drivers/net/ionic/ionic_lif.c
+++ b/drivers/net/ionic/ionic_lif.c
@@ -1470,17 +1470,18 @@ int
 ionic_lif_init(struct ionic_lif *lif)
 {
 	struct ionic_dev *idev = &lif->adapter->idev;
-	struct ionic_q_init_comp comp;
+	struct ionic_lif_init_comp comp;
 	int err;
 
 	memset(&lif->stats_base, 0, sizeof(lif->stats_base));
 
 	ionic_dev_cmd_lif_init(idev, lif->index, lif->info_pa);
 	err = ionic_dev_cmd_wait_check(idev, IONIC_DEVCMD_TIMEOUT);
-	ionic_dev_cmd_comp(idev, &comp);
 	if (err)
 		return err;
 
+	ionic_dev_cmd_comp(idev, &comp);
+
 	lif->hw_index = comp.hw_index;
 
 	err = ionic_lif_adminq_init(lif);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.106608800 +0800
+++ 0016-net-ionic-fix-completion-type-in-lif-init.patch	2021-05-10 23:59:26.330000000 +0800
@@ -1 +1 @@
-From 656bfc9a4e3d377ebf160132242d1bb2b5f9b8b2 Mon Sep 17 00:00:00 2001
+From 7a866f25e6aa059dca294bb85f5bf07c3b9b584e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 656bfc9a4e3d377ebf160132242d1bb2b5f9b8b2 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index b8023e0632..cd220abee2 100644
+index 5894f3505a..33a5977ced 100644
@@ -21 +23 @@
-@@ -1605,17 +1605,18 @@ int
+@@ -1470,17 +1470,18 @@ int
@@ -31 +33 @@
- 	ionic_dev_cmd_lif_init(idev, lif->info_pa);
+ 	ionic_dev_cmd_lif_init(idev, lif->index, lif->info_pa);
@@ -39 +41 @@
- 	lif->hw_index = rte_cpu_to_le_16(comp.hw_index);
+ 	lif->hw_index = comp.hw_index;

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

* [dpdk-stable] patch 'app/testpmd: remove unnecessary UDP tunnel check' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (13 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/ionic: fix completion type in lif init' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/sfc: fix buffer size for flow parse' " Xueming Li
                   ` (212 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Xiaoyun Li; +Cc: Luca Boccassi, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/40072bc599a16c519197ff29f7f7bd7e32c5d351

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 40072bc599a16c519197ff29f7f7bd7e32c5d351 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Thu, 18 Feb 2021 11:06:10 +0800
Subject: [PATCH] app/testpmd: remove unnecessary UDP tunnel check
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 9d32f448ea0096185d0bbc5582c8b57f090c88a6 ]

cmd_tunnel_udp_config checked 'cmd' to set prot_type but this cmd is
only for rx_vxlan_port. The unnecessary cmd check will cause uninit
coverity issue. So remove it and rename 'cmd' to 'rx_vxlan_port'.

Coverity issue: 366155
Fixes: bd948f20d609 ("app/testpmd: VXLAN packet identification")

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/cmdline.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 2b9dd3e1f4..fa2a0c78e6 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -9096,7 +9096,7 @@ cmdline_parse_inst_t cmd_vf_rate_limit = {
 
 /* *** CONFIGURE TUNNEL UDP PORT *** */
 struct cmd_tunnel_udp_config {
-	cmdline_fixed_string_t cmd;
+	cmdline_fixed_string_t rx_vxlan_port;
 	cmdline_fixed_string_t what;
 	uint16_t udp_port;
 	portid_t port_id;
@@ -9112,9 +9112,7 @@ cmd_tunnel_udp_config_parsed(void *parsed_result,
 	int ret;
 
 	tunnel_udp.udp_port = res->udp_port;
-
-	if (!strcmp(res->cmd, "rx_vxlan_port"))
-		tunnel_udp.prot_type = RTE_TUNNEL_TYPE_VXLAN;
+	tunnel_udp.prot_type = RTE_TUNNEL_TYPE_VXLAN;
 
 	if (!strcmp(res->what, "add"))
 		ret = rte_eth_dev_udp_tunnel_port_add(res->port_id,
@@ -9127,9 +9125,9 @@ cmd_tunnel_udp_config_parsed(void *parsed_result,
 		printf("udp tunneling add error: (%s)\n", strerror(-ret));
 }
 
-cmdline_parse_token_string_t cmd_tunnel_udp_config_cmd =
+cmdline_parse_token_string_t cmd_tunnel_udp_config_rx_vxlan_port =
 	TOKEN_STRING_INITIALIZER(struct cmd_tunnel_udp_config,
-				cmd, "rx_vxlan_port");
+				rx_vxlan_port, "rx_vxlan_port");
 cmdline_parse_token_string_t cmd_tunnel_udp_config_what =
 	TOKEN_STRING_INITIALIZER(struct cmd_tunnel_udp_config,
 				what, "add#rm");
@@ -9146,7 +9144,7 @@ cmdline_parse_inst_t cmd_tunnel_udp_config = {
 	.help_str = "rx_vxlan_port add|rm <udp_port> <port_id>: "
 		"Add/Remove a tunneling UDP port filter",
 	.tokens = {
-		(void *)&cmd_tunnel_udp_config_cmd,
+		(void *)&cmd_tunnel_udp_config_rx_vxlan_port,
 		(void *)&cmd_tunnel_udp_config_what,
 		(void *)&cmd_tunnel_udp_config_udp_port,
 		(void *)&cmd_tunnel_udp_config_port_id,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.130425900 +0800
+++ 0017-app-testpmd-remove-unnecessary-UDP-tunnel-check.patch	2021-05-10 23:59:26.340000000 +0800
@@ -1 +1 @@
-From 9d32f448ea0096185d0bbc5582c8b57f090c88a6 Mon Sep 17 00:00:00 2001
+From 40072bc599a16c519197ff29f7f7bd7e32c5d351 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 9d32f448ea0096185d0bbc5582c8b57f090c88a6 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 65d03b0ffb..14110eb2e4 100644
+index 2b9dd3e1f4..fa2a0c78e6 100644
@@ -24 +26 @@
-@@ -9097,7 +9097,7 @@ cmdline_parse_inst_t cmd_vf_rate_limit = {
+@@ -9096,7 +9096,7 @@ cmdline_parse_inst_t cmd_vf_rate_limit = {
@@ -33 +35 @@
-@@ -9113,9 +9113,7 @@ cmd_tunnel_udp_config_parsed(void *parsed_result,
+@@ -9112,9 +9112,7 @@ cmd_tunnel_udp_config_parsed(void *parsed_result,
@@ -44 +46 @@
-@@ -9128,9 +9126,9 @@ cmd_tunnel_udp_config_parsed(void *parsed_result,
+@@ -9127,9 +9125,9 @@ cmd_tunnel_udp_config_parsed(void *parsed_result,
@@ -56 +58 @@
-@@ -9147,7 +9145,7 @@ cmdline_parse_inst_t cmd_tunnel_udp_config = {
+@@ -9146,7 +9144,7 @@ cmdline_parse_inst_t cmd_tunnel_udp_config = {

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

* [dpdk-stable] patch 'net/sfc: fix buffer size for flow parse' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (14 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'app/testpmd: remove unnecessary UDP tunnel check' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/af_xdp: fix error handling during Rx queue setup' " Xueming Li
                   ` (211 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Ivan Malov; +Cc: Luca Boccassi, Andrew Rybchenko, Andy Moreton, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/32ae43ccb7f2fb0717cff7e741aadc9e2a9725ad

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 32ae43ccb7f2fb0717cff7e741aadc9e2a9725ad Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Fri, 26 Feb 2021 17:10:23 +0300
Subject: [PATCH] net/sfc: fix buffer size for flow parse
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 05cc6e33961b41df6cdc37fd429e06c28c78a84e ]

Pass the size of the buffer where the item's mask
is stored and not the indirection pointer size.

Coverity issue: 363735
Fixes: dadff137931c ("net/sfc: support encap flow items in transfer rules")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
 drivers/net/sfc/sfc_mae.c | 20 +++++++++-----------
 drivers/net/sfc/sfc_mae.h |  3 ++-
 2 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index 4ddfef5563..15c5c39758 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -1395,7 +1395,6 @@ sfc_mae_rule_parse_item_tunnel(const struct rte_flow_item *item,
 	uint8_t supp_mask[sizeof(uint64_t)];
 	const uint8_t *spec = NULL;
 	const uint8_t *mask = NULL;
-	const void *def_mask;
 	int rc;
 
 	/*
@@ -1417,12 +1416,11 @@ sfc_mae_rule_parse_item_tunnel(const struct rte_flow_item *item,
 	 * sfc_mae_rule_encap_parse_init(). Default mask
 	 * was also picked by that helper. Use it here.
 	 */
-	def_mask = ctx_mae->tunnel_def_mask;
-
 	rc = sfc_flow_parse_init(item,
 				 (const void **)&spec, (const void **)&mask,
-				 (const void *)&supp_mask, def_mask,
-				 sizeof(def_mask), error);
+				 (const void *)&supp_mask,
+				 ctx_mae->tunnel_def_mask,
+				 ctx_mae->tunnel_def_mask_size,  error);
 	if (rc != 0)
 		return rc;
 
@@ -1656,20 +1654,20 @@ sfc_mae_rule_encap_parse_init(struct sfc_adapter *sa,
 		case RTE_FLOW_ITEM_TYPE_VXLAN:
 			ctx->encap_type = EFX_TUNNEL_PROTOCOL_VXLAN;
 			ctx->tunnel_def_mask = &rte_flow_item_vxlan_mask;
-			RTE_BUILD_BUG_ON(sizeof(ctx->tunnel_def_mask) !=
-					 sizeof(rte_flow_item_vxlan_mask));
+			ctx->tunnel_def_mask_size =
+				sizeof(rte_flow_item_vxlan_mask);
 			break;
 		case RTE_FLOW_ITEM_TYPE_GENEVE:
 			ctx->encap_type = EFX_TUNNEL_PROTOCOL_GENEVE;
 			ctx->tunnel_def_mask = &rte_flow_item_geneve_mask;
-			RTE_BUILD_BUG_ON(sizeof(ctx->tunnel_def_mask) !=
-					 sizeof(rte_flow_item_geneve_mask));
+			ctx->tunnel_def_mask_size =
+				sizeof(rte_flow_item_geneve_mask);
 			break;
 		case RTE_FLOW_ITEM_TYPE_NVGRE:
 			ctx->encap_type = EFX_TUNNEL_PROTOCOL_NVGRE;
 			ctx->tunnel_def_mask = &rte_flow_item_nvgre_mask;
-			RTE_BUILD_BUG_ON(sizeof(ctx->tunnel_def_mask) !=
-					 sizeof(rte_flow_item_nvgre_mask));
+			ctx->tunnel_def_mask_size =
+				sizeof(rte_flow_item_nvgre_mask);
 			break;
 		case RTE_FLOW_ITEM_TYPE_END:
 			break;
diff --git a/drivers/net/sfc/sfc_mae.h b/drivers/net/sfc/sfc_mae.h
index 53ddead979..bf432638c1 100644
--- a/drivers/net/sfc/sfc_mae.h
+++ b/drivers/net/sfc/sfc_mae.h
@@ -179,7 +179,8 @@ struct sfc_mae_parse_ctx {
 	 * which part of the pattern is being parsed.
 	 */
 	const efx_mae_field_id_t	*field_ids_remap;
-	/* This points to a tunnel-specific default mask. */
+	/* These two fields correspond to the tunnel-specific default mask. */
+	size_t				tunnel_def_mask_size;
 	const void			*tunnel_def_mask;
 	bool				match_mport_set;
 	struct sfc_mae_pattern_data	pattern_data;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.163305100 +0800
+++ 0018-net-sfc-fix-buffer-size-for-flow-parse.patch	2021-05-10 23:59:26.340000000 +0800
@@ -1 +1 @@
-From 05cc6e33961b41df6cdc37fd429e06c28c78a84e Mon Sep 17 00:00:00 2001
+From 32ae43ccb7f2fb0717cff7e741aadc9e2a9725ad Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 05cc6e33961b41df6cdc37fd429e06c28c78a84e ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/af_xdp: fix error handling during Rx queue setup' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (15 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/sfc: fix buffer size for flow parse' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/pcap: fix format string' " Xueming Li
                   ` (210 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Ciara Loftus; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/40313397da9b14ce38354e781976c2b0a25e00f6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 40313397da9b14ce38354e781976c2b0a25e00f6 Mon Sep 17 00:00:00 2001
From: Ciara Loftus <ciara.loftus@intel.com>
Date: Mon, 1 Mar 2021 10:34:13 +0000
Subject: [PATCH] net/af_xdp: fix error handling during Rx queue setup
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 831268022300cfbc338f65d43b8f685e50011c86 ]

Prior to this commit, if rte_pktmbuf_alloc_bullk failed during rx queue
setup the error was not returned to the user and they may incorrectly
assume that the rx queue had been successfully set up. This commit ensures
that the error is returned to the user.

Bugzilla ID: 643
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 | 3 ++-
 1 file changed, 2 insertions(+), 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 7fc70df713..3885fb7c78 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -1148,7 +1148,8 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
 	}
 
 #if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG)
-	if (rte_pktmbuf_alloc_bulk(rxq->umem->mb_pool, fq_bufs, reserve_size)) {
+	ret = rte_pktmbuf_alloc_bulk(rxq->umem->mb_pool, fq_bufs, reserve_size);
+	if (ret) {
 		AF_XDP_LOG(DEBUG, "Failed to get enough buffers for fq.\n");
 		goto err;
 	}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.189219400 +0800
+++ 0019-net-af_xdp-fix-error-handling-during-Rx-queue-setup.patch	2021-05-10 23:59:26.340000000 +0800
@@ -1 +1 @@
-From 831268022300cfbc338f65d43b8f685e50011c86 Mon Sep 17 00:00:00 2001
+From 40313397da9b14ce38354e781976c2b0a25e00f6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 831268022300cfbc338f65d43b8f685e50011c86 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index b8d5ad0d91..3957227bf0 100644
+index 7fc70df713..3885fb7c78 100644
@@ -24 +26 @@
-@@ -1145,7 +1145,8 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
+@@ -1148,7 +1148,8 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,

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

* [dpdk-stable] patch 'net/pcap: fix format string' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (16 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/af_xdp: fix error handling during Rx queue setup' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/mlx5: fix hashed list size for tunnel flow groups' " Xueming Li
                   ` (209 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Luca Boccassi, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/cf30b35eb3758dfb71c0de82627ff47713085b52

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cf30b35eb3758dfb71c0de82627ff47713085b52 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Sun, 14 Feb 2021 05:16:12 +0300
Subject: [PATCH] net/pcap: fix format string
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 198aba383316162e98c6e0c3c53c525ddca0b071 ]

Use PRIu32 for uint32_t (found by -Wformat with Clang on Windows).

Fixes: a3f5252e5cbd ("net/pcap: enable infinitely Rx a pcap file")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/pcap/rte_eth_pcap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 40f4fa9021..14a0072d86 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -827,7 +827,7 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
 
 		pcap_pkt_count = count_packets_in_pcap(pcap, pcap_q);
 
-		snprintf(ring_name, sizeof(ring_name), "PCAP_RING%" PRIu16,
+		snprintf(ring_name, sizeof(ring_name), "PCAP_RING%" PRIu32,
 				ring_number);
 
 		pcap_q->pkts = rte_ring_create(ring_name,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.213834300 +0800
+++ 0020-net-pcap-fix-format-string.patch	2021-05-10 23:59:26.340000000 +0800
@@ -1 +1 @@
-From 198aba383316162e98c6e0c3c53c525ddca0b071 Mon Sep 17 00:00:00 2001
+From cf30b35eb3758dfb71c0de82627ff47713085b52 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 198aba383316162e98c6e0c3c53c525ddca0b071 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 38b1fe2f77..2766745a71 100644
+index 40f4fa9021..14a0072d86 100644
@@ -21 +23 @@
-@@ -893,7 +893,7 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -827,7 +827,7 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/mlx5: fix hashed list size for tunnel flow groups' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (17 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/pcap: fix format string' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/mlx5: fix UAR allocation diagnostics messages' " Xueming Li
                   ` (208 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1cac75b516d87568beb9d946a6f8700f422b9d86

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1cac75b516d87568beb9d946a6f8700f422b9d86 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 24 Feb 2021 10:15:14 +0200
Subject: [PATCH] net/mlx5: fix hashed list size for tunnel flow groups
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit c86e5b90125890f950892e890e8859d87d63140b ]

The hashed list size must be the power of 2, otherwise the
adjustment is applied and the warning message is emitted.
This patch provides the correct list size to eliminate the
warning.

Fixes: 4ec6360de37d ("net/mlx5: implement tunnel offload")

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

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index cda3ca557c..34dd33ba38 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -7648,7 +7648,8 @@ int mlx5_alloc_tunnel_hub(struct mlx5_dev_ctx_shared *sh)
 		return -ENOMEM;
 	LIST_INIT(&thub->tunnels);
 	rte_spinlock_init(&thub->sl);
-	thub->groups = mlx5_hlist_create("flow groups", MLX5_MAX_TABLES, 0,
+	thub->groups = mlx5_hlist_create("flow groups",
+					 rte_align32pow2(MLX5_MAX_TABLES), 0,
 					 0, mlx5_flow_tunnel_grp2tbl_create_cb,
 					 NULL,
 					 mlx5_flow_tunnel_grp2tbl_remove_cb);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.236769700 +0800
+++ 0021-net-mlx5-fix-hashed-list-size-for-tunnel-flow-groups.patch	2021-05-10 23:59:26.340000000 +0800
@@ -1 +1 @@
-From c86e5b90125890f950892e890e8859d87d63140b Mon Sep 17 00:00:00 2001
+From 1cac75b516d87568beb9d946a6f8700f422b9d86 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit c86e5b90125890f950892e890e8859d87d63140b ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 632f46dfde..ab5be3dacc 100644
+index cda3ca557c..34dd33ba38 100644
@@ -24 +26 @@
-@@ -7940,7 +7940,8 @@ int mlx5_alloc_tunnel_hub(struct mlx5_dev_ctx_shared *sh)
+@@ -7648,7 +7648,8 @@ int mlx5_alloc_tunnel_hub(struct mlx5_dev_ctx_shared *sh)
@@ -32 +34 @@
- 					 mlx5_flow_tunnel_grp2tbl_match_cb,
+ 					 NULL,

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

* [dpdk-stable] patch 'net/mlx5: fix UAR allocation diagnostics messages' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (18 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/mlx5: fix hashed list size for tunnel flow groups' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/pcap: fix file descriptor leak on close' " Xueming Li
                   ` (207 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/82f21305c4abbc39a8e3cece20919aacd061d01d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 82f21305c4abbc39a8e3cece20919aacd061d01d Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 24 Feb 2021 10:17:35 +0200
Subject: [PATCH] net/mlx5: fix UAR allocation diagnostics messages
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 09d196c0a0797813c0c608f303c9ebbe58656fbe ]

Depending on kernel capabilities and rdma-core version the mapping
of UAR (User Access Region) of desired memory caching type (non-cached
or write combining) might fail. The PMD implements the flexible
strategy of UAR mapping, alternating the type of caching to succeed.
During this process the failure diagnostics messages are emitted.
These messages are merely diagnostics ones and the logging level
should be adjusted to DEBUG.

Fixes: a0bfe9d56f74 ("net/mlx5: fix UAR memory mapping type")

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

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index bdb446d2d2..b8f31497b2 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -767,7 +767,7 @@ mlx5_alloc_rxtx_uars(struct mlx5_dev_ctx_shared *sh,
 			 * the UAR mapping type into account on UAR setup
 			 * on queue creation.
 			 */
-			DRV_LOG(WARNING, "Failed to allocate Tx DevX UAR (BF)");
+			DRV_LOG(DEBUG, "Failed to allocate Tx DevX UAR (BF)");
 			uar_mapping = MLX5DV_UAR_ALLOC_TYPE_NC;
 			sh->tx_uar = mlx5_glue->devx_alloc_uar
 							(sh->ctx, uar_mapping);
@@ -780,7 +780,7 @@ mlx5_alloc_rxtx_uars(struct mlx5_dev_ctx_shared *sh,
 			 * If Verbs/kernel does not support "Non-Cached"
 			 * try the "Write-Combining".
 			 */
-			DRV_LOG(WARNING, "Failed to allocate Tx DevX UAR (NC)");
+			DRV_LOG(DEBUG, "Failed to allocate Tx DevX UAR (NC)");
 			uar_mapping = MLX5DV_UAR_ALLOC_TYPE_BF;
 			sh->tx_uar = mlx5_glue->devx_alloc_uar
 							(sh->ctx, uar_mapping);
@@ -799,7 +799,7 @@ mlx5_alloc_rxtx_uars(struct mlx5_dev_ctx_shared *sh,
 		 * IB device context, on context closure all UARs
 		 * will be freed, should be no memory/object leakage.
 		 */
-		DRV_LOG(WARNING, "Retrying to allocate Tx DevX UAR");
+		DRV_LOG(DEBUG, "Retrying to allocate Tx DevX UAR");
 		sh->tx_uar = NULL;
 	}
 	/* Check whether we finally succeeded with valid UAR allocation. */
@@ -820,7 +820,7 @@ mlx5_alloc_rxtx_uars(struct mlx5_dev_ctx_shared *sh,
 			 * should be no datapath noticeable impact,
 			 * can try "Non-Cached" mapping safely.
 			 */
-			DRV_LOG(WARNING, "Failed to allocate Rx DevX UAR (BF)");
+			DRV_LOG(DEBUG, "Failed to allocate Rx DevX UAR (BF)");
 			uar_mapping = MLX5DV_UAR_ALLOC_TYPE_NC;
 			sh->devx_rx_uar = mlx5_glue->devx_alloc_uar
 							(sh->ctx, uar_mapping);
@@ -839,7 +839,7 @@ mlx5_alloc_rxtx_uars(struct mlx5_dev_ctx_shared *sh,
 		 * IB device context, on context closure all UARs
 		 * will be freed, should be no memory/object leakage.
 		 */
-		DRV_LOG(WARNING, "Retrying to allocate Rx DevX UAR");
+		DRV_LOG(DEBUG, "Retrying to allocate Rx DevX UAR");
 		sh->devx_rx_uar = NULL;
 	}
 	/* Check whether we finally succeeded with valid UAR allocation. */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.261623800 +0800
+++ 0022-net-mlx5-fix-UAR-allocation-diagnostics-messages.patch	2021-05-10 23:59:26.350000000 +0800
@@ -1 +1 @@
-From 09d196c0a0797813c0c608f303c9ebbe58656fbe Mon Sep 17 00:00:00 2001
+From 82f21305c4abbc39a8e3cece20919aacd061d01d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 09d196c0a0797813c0c608f303c9ebbe58656fbe ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index aae2ef9af7..4ee0005a5c 100644
+index bdb446d2d2..b8f31497b2 100644
@@ -27 +29 @@
-@@ -768,7 +768,7 @@ mlx5_alloc_rxtx_uars(struct mlx5_dev_ctx_shared *sh,
+@@ -767,7 +767,7 @@ mlx5_alloc_rxtx_uars(struct mlx5_dev_ctx_shared *sh,
@@ -36 +38 @@
-@@ -781,7 +781,7 @@ mlx5_alloc_rxtx_uars(struct mlx5_dev_ctx_shared *sh,
+@@ -780,7 +780,7 @@ mlx5_alloc_rxtx_uars(struct mlx5_dev_ctx_shared *sh,
@@ -45 +47 @@
-@@ -800,7 +800,7 @@ mlx5_alloc_rxtx_uars(struct mlx5_dev_ctx_shared *sh,
+@@ -799,7 +799,7 @@ mlx5_alloc_rxtx_uars(struct mlx5_dev_ctx_shared *sh,
@@ -54 +56 @@
-@@ -821,7 +821,7 @@ mlx5_alloc_rxtx_uars(struct mlx5_dev_ctx_shared *sh,
+@@ -820,7 +820,7 @@ mlx5_alloc_rxtx_uars(struct mlx5_dev_ctx_shared *sh,
@@ -63 +65 @@
-@@ -840,7 +840,7 @@ mlx5_alloc_rxtx_uars(struct mlx5_dev_ctx_shared *sh,
+@@ -839,7 +839,7 @@ mlx5_alloc_rxtx_uars(struct mlx5_dev_ctx_shared *sh,

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

* [dpdk-stable] patch 'net/pcap: fix file descriptor leak on close' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (19 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/mlx5: fix UAR allocation diagnostics messages' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'common/mlx5/linux: add glue function to query WQ' " Xueming Li
                   ` (206 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Tengfei Zhang; +Cc: Luca Boccassi, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/44e87e7c102af00f688992b09487b1dd33c47506

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 44e87e7c102af00f688992b09487b1dd33c47506 Mon Sep 17 00:00:00 2001
From: Tengfei Zhang <zypscode@outlook.com>
Date: Tue, 2 Mar 2021 16:51:30 +0000
Subject: [PATCH] net/pcap: fix file descriptor leak on close
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit e412a138db918019cbd883132f81860951515a9b ]

pcap fd was opend when vdev probed,
but not closed when vdev removed.

Fixes: c956caa6eabf ("pcap: support port hotplug")

Signed-off-by: Tengfei Zhang <zypscode@outlook.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/pcap/rte_eth_pcap.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 14a0072d86..da4dfe799e 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -621,9 +621,11 @@ eth_dev_stop(struct rte_eth_dev *dev)
 
 	/* Special iface case. Single pcap is open and shared between tx/rx. */
 	if (internals->single_iface) {
-		pcap_close(pp->tx_pcap[0]);
-		pp->tx_pcap[0] = NULL;
-		pp->rx_pcap[0] = NULL;
+		if (pp->tx_pcap[0] != NULL) {
+			pcap_close(pp->tx_pcap[0]);
+			pp->tx_pcap[0] = NULL;
+			pp->rx_pcap[0] = NULL;
+		}
 		goto status_down;
 	}
 
@@ -755,6 +757,8 @@ eth_dev_close(struct rte_eth_dev *dev)
 	PMD_LOG(INFO, "Closing pcap ethdev on NUMA socket %d",
 			rte_socket_id());
 
+	eth_dev_stop(dev);
+
 	rte_free(dev->process_private);
 
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.284370200 +0800
+++ 0023-net-pcap-fix-file-descriptor-leak-on-close.patch	2021-05-10 23:59:26.350000000 +0800
@@ -1 +1 @@
-From e412a138db918019cbd883132f81860951515a9b Mon Sep 17 00:00:00 2001
+From 44e87e7c102af00f688992b09487b1dd33c47506 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit e412a138db918019cbd883132f81860951515a9b ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 2766745a71..28a5027315 100644
+index 14a0072d86..da4dfe799e 100644
@@ -22 +24,2 @@
-@@ -682,9 +682,11 @@ eth_dev_stop(struct rte_eth_dev *dev)
+@@ -621,9 +621,11 @@ eth_dev_stop(struct rte_eth_dev *dev)
+ 
@@ -25 +27,0 @@
- 		queue_missed_stat_on_stop_update(dev, 0);
@@ -37 +39 @@
-@@ -821,6 +823,8 @@ eth_dev_close(struct rte_eth_dev *dev)
+@@ -755,6 +757,8 @@ eth_dev_close(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'common/mlx5/linux: add glue function to query WQ' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (20 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/pcap: fix file descriptor leak on close' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'common/mlx5: add DevX command " Xueming Li
                   ` (205 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Matan Azrad; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/fba807cae93d7b42aa0bdae5e92d1bb9f604d376

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fba807cae93d7b42aa0bdae5e92d1bb9f604d376 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@nvidia.com>
Date: Thu, 25 Feb 2021 10:44:58 +0000
Subject: [PATCH] common/mlx5/linux: add glue function to query WQ
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 75a9a73ddbdd3e7581078752aadb1c980617e739 ]

When Rx queue is created by VERBS API ibv_create_wq there is a dedicated
rdma-core API to query an information about this WQ(Work Queue).

VERBS WQ querying is needed for PMD cases which combine VERBS objects
with DevX objects.

Next feature to use this glue function is the HW queue counters.

Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/common/mlx5/linux/mlx5_glue.c | 18 ++++++++++++++++++
 drivers/common/mlx5/linux/mlx5_glue.h |  2 ++
 2 files changed, 20 insertions(+)

diff --git a/drivers/common/mlx5/linux/mlx5_glue.c b/drivers/common/mlx5/linux/mlx5_glue.c
index 8146c79287..964f7e74ef 100644
--- a/drivers/common/mlx5/linux/mlx5_glue.c
+++ b/drivers/common/mlx5/linux/mlx5_glue.c
@@ -1067,6 +1067,23 @@ mlx5_glue_devx_qp_query(struct ibv_qp *qp,
 #endif
 }
 
+static int
+mlx5_glue_devx_wq_query(struct ibv_wq *wq, const void *in, size_t inlen,
+			void *out, size_t outlen)
+{
+#ifdef HAVE_IBV_DEVX_QP
+	return mlx5dv_devx_wq_query(wq, in, inlen, out, outlen);
+#else
+	(void)wq;
+	(void)in;
+	(void)inlen;
+	(void)out;
+	(void)outlen;
+	errno = ENOTSUP;
+	return errno;
+#endif
+}
+
 static int
 mlx5_glue_devx_port_query(struct ibv_context *ctx,
 			  uint32_t port_num,
@@ -1403,6 +1420,7 @@ const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue) {
 	.devx_umem_reg = mlx5_glue_devx_umem_reg,
 	.devx_umem_dereg = mlx5_glue_devx_umem_dereg,
 	.devx_qp_query = mlx5_glue_devx_qp_query,
+	.devx_wq_query = mlx5_glue_devx_wq_query,
 	.devx_port_query = mlx5_glue_devx_port_query,
 	.dr_dump_domain = mlx5_glue_dr_dump_domain,
 	.dr_reclaim_domain_memory = mlx5_glue_dr_reclaim_domain_memory,
diff --git a/drivers/common/mlx5/linux/mlx5_glue.h b/drivers/common/mlx5/linux/mlx5_glue.h
index 8be446a902..9e385be957 100644
--- a/drivers/common/mlx5/linux/mlx5_glue.h
+++ b/drivers/common/mlx5/linux/mlx5_glue.h
@@ -307,6 +307,8 @@ struct mlx5_glue {
 	int (*devx_qp_query)(struct ibv_qp *qp,
 			     const void *in, size_t inlen,
 			     void *out, size_t outlen);
+	int (*devx_wq_query)(struct ibv_wq *wq, const void *in, size_t inlen,
+			     void *out, size_t outlen);
 	int (*devx_port_query)(struct ibv_context *ctx,
 			       uint32_t port_num,
 			       struct mlx5dv_devx_port *mlx5_devx_port);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.308924500 +0800
+++ 0024-common-mlx5-linux-add-glue-function-to-query-WQ.patch	2021-05-10 23:59:26.350000000 +0800
@@ -1 +1 @@
-From 75a9a73ddbdd3e7581078752aadb1c980617e739 Mon Sep 17 00:00:00 2001
+From fba807cae93d7b42aa0bdae5e92d1bb9f604d376 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 75a9a73ddbdd3e7581078752aadb1c980617e739 ]
@@ -13,2 +15,0 @@
-
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'common/mlx5: add DevX command to query WQ' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (21 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'common/mlx5/linux: add glue function to query WQ' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'common/mlx5: add DevX commands for queue counters' " Xueming Li
                   ` (204 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Matan Azrad; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6e06d42907bd796d133b217fc523156b984777cf

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6e06d42907bd796d133b217fc523156b984777cf Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@nvidia.com>
Date: Thu, 25 Feb 2021 10:44:59 +0000
Subject: [PATCH] common/mlx5: add DevX command to query WQ
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 542689e92e668c2d734829145996da15de3d0c97 ]

Add a DevX command to query Rx queues attributes created by VERBS.

Currently support only counter_set_id attribute.

This counter ID is managed by the kernel driver and being assigned to
any queue created by the kernel.

Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 28 ++++++++++++++++++++++++++++
 drivers/common/mlx5/mlx5_devx_cmds.h |  3 +++
 drivers/common/mlx5/mlx5_prm.h       | 19 +++++++++++++++++++
 drivers/common/mlx5/version.map      |  1 +
 4 files changed, 51 insertions(+)

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index 4485a9cd5e..c10be482f3 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -2049,3 +2049,31 @@ mlx5_devx_cmd_create_flow_hit_aso_obj(void *ctx, uint32_t pd)
 	flow_hit_aso_obj->id = MLX5_GET(general_obj_out_cmd_hdr, out, obj_id);
 	return flow_hit_aso_obj;
 }
+
+int
+mlx5_devx_cmd_wq_query(void *wq, uint32_t *counter_set_id)
+{
+#ifdef HAVE_IBV_FLOW_DV_SUPPORT
+	uint32_t in[MLX5_ST_SZ_DW(query_rq_in)] = {0};
+	uint32_t out[MLX5_ST_SZ_DW(query_rq_out)] = {0};
+	int rc;
+	void *rq_ctx;
+
+	MLX5_SET(query_rq_in, in, opcode, MLX5_CMD_OP_QUERY_RQ);
+	MLX5_SET(query_rq_in, in, rqn, ((struct ibv_wq *)wq)->wq_num);
+	rc = mlx5_glue->devx_wq_query(wq, in, sizeof(in), out, sizeof(out));
+	if (rc) {
+		rte_errno = errno;
+		DRV_LOG(ERR, "Failed to query WQ counter set ID using DevX - "
+			"rc = %d, errno = %d.", rc, errno);
+		return -rc;
+	};
+	rq_ctx = MLX5_ADDR_OF(query_rq_out, out, rq_context);
+	*counter_set_id = MLX5_GET(rqc, rq_ctx, counter_set_id);
+	return 0;
+#else
+	(void)wq;
+	(void)counter_set_id;
+	return -ENOTSUP;
+#endif
+}
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index 78202eba9d..3fef39654c 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -502,4 +502,7 @@ __rte_internal
 struct mlx5_devx_obj *mlx5_devx_cmd_create_flow_hit_aso_obj(void *ctx,
 							    uint32_t pd);
 
+
+__rte_internal
+int mlx5_devx_cmd_wq_query(void *wq, uint32_t *counter_set_id);
 #endif /* RTE_PMD_MLX5_DEVX_CMDS_H_ */
diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index 00b425ac85..6638f46ec6 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -851,6 +851,7 @@ enum {
 	MLX5_CMD_OP_MODIFY_SQ = 0X905,
 	MLX5_CMD_OP_CREATE_RQ = 0x908,
 	MLX5_CMD_OP_MODIFY_RQ = 0x909,
+	MLX5_CMD_OP_QUERY_RQ = 0x90b,
 	MLX5_CMD_OP_CREATE_TIS = 0x912,
 	MLX5_CMD_OP_QUERY_TIS = 0x915,
 	MLX5_CMD_OP_CREATE_RQT = 0x916,
@@ -1810,6 +1811,24 @@ struct mlx5_ifc_modify_rq_out_bits {
 	u8 reserved_at_40[0x40];
 };
 
+struct mlx5_ifc_query_rq_out_bits {
+	u8 status[0x8];
+	u8 reserved_at_8[0x18];
+	u8 syndrome[0x20];
+	u8 reserved_at_40[0xc0];
+	struct mlx5_ifc_rqc_bits rq_context;
+};
+
+struct mlx5_ifc_query_rq_in_bits {
+	u8 opcode[0x10];
+	u8 reserved_at_10[0x10];
+	u8 reserved_at_20[0x10];
+	u8 op_mod[0x10];
+	u8 reserved_at_40[0x8];
+	u8 rqn[0x18];
+	u8 reserved_at_60[0x20];
+};
+
 struct mlx5_ifc_create_tis_out_bits {
 	u8 status[0x8];
 	u8 reserved_at_8[0x18];
diff --git a/drivers/common/mlx5/version.map b/drivers/common/mlx5/version.map
index 17dd11f635..709b2c708e 100644
--- a/drivers/common/mlx5/version.map
+++ b/drivers/common/mlx5/version.map
@@ -39,6 +39,7 @@ INTERNAL {
 	mlx5_devx_cmd_query_virtio_q_counters;
 	mlx5_devx_cmd_query_virtq;
 	mlx5_devx_cmd_register_read;
+	mlx5_devx_cmd_wq_query;
 	mlx5_devx_get_out_command_status;
 	mlx5_devx_alloc_uar;
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.331139500 +0800
+++ 0025-common-mlx5-add-DevX-command-to-query-WQ.patch	2021-05-10 23:59:26.350000000 +0800
@@ -1 +1 @@
-From 542689e92e668c2d734829145996da15de3d0c97 Mon Sep 17 00:00:00 2001
+From 6e06d42907bd796d133b217fc523156b984777cf Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 542689e92e668c2d734829145996da15de3d0c97 ]
@@ -13,2 +15,0 @@
-Cc: stable@dpdk.org
-
@@ -25 +26 @@
-index 0185d57036..2dcc1ff551 100644
+index 4485a9cd5e..c10be482f3 100644
@@ -28,2 +29,3 @@
-@@ -2165,3 +2165,31 @@ mlx5_devx_cmd_create_geneve_tlv_option(void *ctx,
- 	return geneve_tlv_opt_obj;
+@@ -2049,3 +2049,31 @@ mlx5_devx_cmd_create_flow_hit_aso_obj(void *ctx, uint32_t pd)
+ 	flow_hit_aso_obj->id = MLX5_GET(general_obj_out_cmd_hdr, out, obj_id);
+ 	return flow_hit_aso_obj;
@@ -31 +33 @@
- 
++
@@ -59 +60,0 @@
-+
@@ -61 +62 @@
-index 9dcd917c39..f01d5a8802 100644
+index 78202eba9d..3fef39654c 100644
@@ -64 +65,3 @@
-@@ -539,4 +539,7 @@ struct mlx5_devx_obj *mlx5_devx_cmd_create_flow_hit_aso_obj(void *ctx,
+@@ -502,4 +502,7 @@ __rte_internal
+ struct mlx5_devx_obj *mlx5_devx_cmd_create_flow_hit_aso_obj(void *ctx,
+ 							    uint32_t pd);
@@ -66,2 +68,0 @@
- __rte_internal
- struct mlx5_devx_obj *mlx5_devx_cmd_alloc_pd(void *ctx);
@@ -73 +74 @@
-index de721aa177..f8327158fd 100644
+index 00b425ac85..6638f46ec6 100644
@@ -76 +77 @@
-@@ -911,6 +911,7 @@ enum {
+@@ -851,6 +851,7 @@ enum {
@@ -84 +85 @@
-@@ -1890,6 +1891,24 @@ struct mlx5_ifc_modify_rq_out_bits {
+@@ -1810,6 +1811,24 @@ struct mlx5_ifc_modify_rq_out_bits {
@@ -110 +111 @@
-index 244b9c7339..edd6c0e757 100644
+index 17dd11f635..709b2c708e 100644
@@ -113 +114 @@
-@@ -41,6 +41,7 @@ INTERNAL {
+@@ -39,6 +39,7 @@ INTERNAL {

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

* [dpdk-stable] patch 'common/mlx5: add DevX commands for queue counters' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (22 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'common/mlx5: add DevX command " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/hns3: fix device capabilities for copper media type' " Xueming Li
                   ` (203 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Matan Azrad; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4371d3b12b9da53687df7501e9f727422188cbae

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4371d3b12b9da53687df7501e9f727422188cbae Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@nvidia.com>
Date: Thu, 25 Feb 2021 10:45:00 +0000
Subject: [PATCH] common/mlx5: add DevX commands for queue counters
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 750e48c7d8c39531c6e0a3aab0f2e11f02af19b4 ]

A queue counter set is an HW object that can be assigned to any RQ\QP
and it counts HW events on the assigned QPs\RQs.

Add DevX API to allocate and query queue counter set object.

The only used counter event is the "out of buffer" where the queue
drops packets when no SW buffer is available to receive it.

Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 73 +++++++++++++++++++++++++
 drivers/common/mlx5/mlx5_devx_cmds.h |  6 +++
 drivers/common/mlx5/mlx5_prm.h       | 81 ++++++++++++++++++++++++++++
 drivers/common/mlx5/version.map      |  4 +-
 4 files changed, 163 insertions(+), 1 deletion(-)

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index c10be482f3..e3196f86f9 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -2077,3 +2077,76 @@ mlx5_devx_cmd_wq_query(void *wq, uint32_t *counter_set_id)
 	return -ENOTSUP;
 #endif
 }
+
+/*
+ * Allocate queue counters via devx interface.
+ *
+ * @param[in] ctx
+ *   Context returned from mlx5 open_device() glue function.
+ *
+ * @return
+ *   Pointer to counter object on success, a NULL value otherwise and
+ *   rte_errno is set.
+ */
+struct mlx5_devx_obj *
+mlx5_devx_cmd_queue_counter_alloc(void *ctx)
+{
+	struct mlx5_devx_obj *dcs = mlx5_malloc(MLX5_MEM_ZERO, sizeof(*dcs), 0,
+						SOCKET_ID_ANY);
+	uint32_t in[MLX5_ST_SZ_DW(alloc_q_counter_in)]   = {0};
+	uint32_t out[MLX5_ST_SZ_DW(alloc_q_counter_out)] = {0};
+
+	if (!dcs) {
+		rte_errno = ENOMEM;
+		return NULL;
+	}
+	MLX5_SET(alloc_q_counter_in, in, opcode, MLX5_CMD_OP_ALLOC_Q_COUNTER);
+	dcs->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in), out,
+					      sizeof(out));
+	if (!dcs->obj) {
+		DRV_LOG(DEBUG, "Can't allocate q counter set by DevX - error "
+			"%d.", errno);
+		rte_errno = errno;
+		mlx5_free(dcs);
+		return NULL;
+	}
+	dcs->id = MLX5_GET(alloc_q_counter_out, out, counter_set_id);
+	return dcs;
+}
+
+/**
+ * Query queue counters values.
+ *
+ * @param[in] dcs
+ *   devx object of the queue counter set.
+ * @param[in] clear
+ *   Whether hardware should clear the counters after the query or not.
+ *  @param[out] out_of_buffers
+ *   Number of dropped occurred due to lack of WQE for the associated QPs/RQs.
+ *
+ * @return
+ *   0 on success, a negative value otherwise.
+ */
+int
+mlx5_devx_cmd_queue_counter_query(struct mlx5_devx_obj *dcs, int clear,
+				  uint32_t *out_of_buffers)
+{
+	uint32_t out[MLX5_ST_SZ_BYTES(query_q_counter_out)] = {0};
+	uint32_t in[MLX5_ST_SZ_DW(query_q_counter_in)] = {0};
+	int rc;
+
+	MLX5_SET(query_q_counter_in, in, opcode,
+		 MLX5_CMD_OP_QUERY_Q_COUNTER);
+	MLX5_SET(query_q_counter_in, in, op_mod, 0);
+	MLX5_SET(query_q_counter_in, in, counter_set_id, dcs->id);
+	MLX5_SET(query_q_counter_in, in, clear, !!clear);
+	rc = mlx5_glue->devx_obj_query(dcs->obj, in, sizeof(in), out,
+				       sizeof(out));
+	if (rc) {
+		DRV_LOG(ERR, "Failed to query devx q counter set - rc %d", rc);
+		rte_errno = rc;
+		return -rc;
+	}
+	*out_of_buffers = MLX5_GET(query_q_counter_out, out, out_of_buffer);
+	return 0;
+}
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index 3fef39654c..a9aa8a3ebf 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -505,4 +505,10 @@ struct mlx5_devx_obj *mlx5_devx_cmd_create_flow_hit_aso_obj(void *ctx,
 
 __rte_internal
 int mlx5_devx_cmd_wq_query(void *wq, uint32_t *counter_set_id);
+
+__rte_internal
+struct mlx5_devx_obj *mlx5_devx_cmd_queue_counter_alloc(void *ctx);
+__rte_internal
+int mlx5_devx_cmd_queue_counter_query(struct mlx5_devx_obj *dcs, int clear,
+				      uint32_t *out_of_buffers);
 #endif /* RTE_PMD_MLX5_DEVX_CMDS_H_ */
diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index 6638f46ec6..cce55c8ddd 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -843,6 +843,8 @@ enum {
 	MLX5_CMD_OP_SUSPEND_QP = 0x50F,
 	MLX5_CMD_OP_RESUME_QP = 0x510,
 	MLX5_CMD_OP_QUERY_NIC_VPORT_CONTEXT = 0x754,
+	MLX5_CMD_OP_ALLOC_Q_COUNTER = 0x771,
+	MLX5_CMD_OP_QUERY_Q_COUNTER = 0x773,
 	MLX5_CMD_OP_ACCESS_REGISTER = 0x805,
 	MLX5_CMD_OP_ALLOC_TRANSPORT_DOMAIN = 0x816,
 	MLX5_CMD_OP_CREATE_TIR = 0x900,
@@ -3034,6 +3036,85 @@ struct mlx5_ifc_query_regexp_register_out_bits {
 	u8 register_data[0x20];
 };
 
+/* Queue counters. */
+struct mlx5_ifc_alloc_q_counter_out_bits {
+	u8 status[0x8];
+	u8 reserved_at_8[0x18];
+	u8 syndrome[0x20];
+	u8 reserved_at_40[0x18];
+	u8 counter_set_id[0x8];
+	u8 reserved_at_60[0x20];
+};
+
+struct mlx5_ifc_alloc_q_counter_in_bits {
+	u8 opcode[0x10];
+	u8 uid[0x10];
+	u8 reserved_at_20[0x10];
+	u8 op_mod[0x10];
+	u8 reserved_at_40[0x40];
+};
+
+struct mlx5_ifc_query_q_counter_out_bits {
+	u8 status[0x8];
+	u8 reserved_at_8[0x18];
+	u8 syndrome[0x20];
+	u8 reserved_at_40[0x40];
+	u8 rx_write_requests[0x20];
+	u8 reserved_at_a0[0x20];
+	u8 rx_read_requests[0x20];
+	u8 reserved_at_e0[0x20];
+	u8 rx_atomic_requests[0x20];
+	u8 reserved_at_120[0x20];
+	u8 rx_dct_connect[0x20];
+	u8 reserved_at_160[0x20];
+	u8 out_of_buffer[0x20];
+	u8 reserved_at_1a0[0x20];
+	u8 out_of_sequence[0x20];
+	u8 reserved_at_1e0[0x20];
+	u8 duplicate_request[0x20];
+	u8 reserved_at_220[0x20];
+	u8 rnr_nak_retry_err[0x20];
+	u8 reserved_at_260[0x20];
+	u8 packet_seq_err[0x20];
+	u8 reserved_at_2a0[0x20];
+	u8 implied_nak_seq_err[0x20];
+	u8 reserved_at_2e0[0x20];
+	u8 local_ack_timeout_err[0x20];
+	u8 reserved_at_320[0xa0];
+	u8 resp_local_length_error[0x20];
+	u8 req_local_length_error[0x20];
+	u8 resp_local_qp_error[0x20];
+	u8 local_operation_error[0x20];
+	u8 resp_local_protection[0x20];
+	u8 req_local_protection[0x20];
+	u8 resp_cqe_error[0x20];
+	u8 req_cqe_error[0x20];
+	u8 req_mw_binding[0x20];
+	u8 req_bad_response[0x20];
+	u8 req_remote_invalid_request[0x20];
+	u8 resp_remote_invalid_request[0x20];
+	u8 req_remote_access_errors[0x20];
+	u8 resp_remote_access_errors[0x20];
+	u8 req_remote_operation_errors[0x20];
+	u8 req_transport_retries_exceeded[0x20];
+	u8 cq_overflow[0x20];
+	u8 resp_cqe_flush_error[0x20];
+	u8 req_cqe_flush_error[0x20];
+	u8 reserved_at_620[0x1e0];
+};
+
+struct mlx5_ifc_query_q_counter_in_bits {
+	u8 opcode[0x10];
+	u8 uid[0x10];
+	u8 reserved_at_20[0x10];
+	u8 op_mod[0x10];
+	u8 reserved_at_40[0x80];
+	u8 clear[0x1];
+	u8 reserved_at_c1[0x1f];
+	u8 reserved_at_e0[0x18];
+	u8 counter_set_id[0x8];
+};
+
 /* CQE format mask. */
 #define MLX5E_CQE_FORMAT_MASK 0xc
 
diff --git a/drivers/common/mlx5/version.map b/drivers/common/mlx5/version.map
index 709b2c708e..fd6019bd2b 100644
--- a/drivers/common/mlx5/version.map
+++ b/drivers/common/mlx5/version.map
@@ -21,7 +21,7 @@ INTERNAL {
 	mlx5_devx_cmd_create_tis;
 	mlx5_devx_cmd_create_virtio_q_counters;
 	mlx5_devx_cmd_create_virtq;
-        mlx5_devx_cmd_create_flow_hit_aso_obj;
+	mlx5_devx_cmd_create_flow_hit_aso_obj;
 	mlx5_devx_cmd_destroy;
 	mlx5_devx_cmd_flow_counter_alloc;
 	mlx5_devx_cmd_flow_counter_query;
@@ -38,6 +38,8 @@ INTERNAL {
 	mlx5_devx_cmd_query_parse_samples;
 	mlx5_devx_cmd_query_virtio_q_counters;
 	mlx5_devx_cmd_query_virtq;
+	mlx5_devx_cmd_queue_counter_alloc;
+	mlx5_devx_cmd_queue_counter_query;
 	mlx5_devx_cmd_register_read;
 	mlx5_devx_cmd_wq_query;
 	mlx5_devx_get_out_command_status;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.358582500 +0800
+++ 0026-common-mlx5-add-DevX-commands-for-queue-counters.patch	2021-05-10 23:59:26.350000000 +0800
@@ -1 +1 @@
-From 750e48c7d8c39531c6e0a3aab0f2e11f02af19b4 Mon Sep 17 00:00:00 2001
+From 4371d3b12b9da53687df7501e9f727422188cbae Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 750e48c7d8c39531c6e0a3aab0f2e11f02af19b4 ]
@@ -14,2 +16,0 @@
-Cc: stable@dpdk.org
-
@@ -19 +20 @@
- drivers/common/mlx5/mlx5_devx_cmds.c | 72 +++++++++++++++++++++++++
+ drivers/common/mlx5/mlx5_devx_cmds.c | 73 +++++++++++++++++++++++++
@@ -23 +24 @@
- 4 files changed, 162 insertions(+), 1 deletion(-)
+ 4 files changed, 163 insertions(+), 1 deletion(-)
@@ -26 +27 @@
-index 2dcc1ff551..0060c37fc0 100644
+index c10be482f3..e3196f86f9 100644
@@ -29 +30,2 @@
-@@ -2193,3 +2193,75 @@ mlx5_devx_cmd_wq_query(void *wq, uint32_t *counter_set_id)
+@@ -2077,3 +2077,76 @@ mlx5_devx_cmd_wq_query(void *wq, uint32_t *counter_set_id)
+ 	return -ENOTSUP;
@@ -32 +34 @@
- 
++
@@ -106 +108 @@
-index f01d5a8802..bc66d28e83 100644
+index 3fef39654c..a9aa8a3ebf 100644
@@ -109 +111 @@
-@@ -542,4 +542,10 @@ struct mlx5_devx_obj *mlx5_devx_cmd_alloc_pd(void *ctx);
+@@ -505,4 +505,10 @@ struct mlx5_devx_obj *mlx5_devx_cmd_create_flow_hit_aso_obj(void *ctx,
@@ -121 +123 @@
-index f8327158fd..01a039f1f7 100644
+index 6638f46ec6..cce55c8ddd 100644
@@ -124 +126 @@
-@@ -901,6 +901,8 @@ enum {
+@@ -843,6 +843,8 @@ enum {
@@ -130,2 +131,0 @@
- 	MLX5_CMD_OP_ALLOC_PD = 0x800,
- 	MLX5_CMD_OP_DEALLOC_PD = 0x801,
@@ -133 +133,3 @@
-@@ -3213,6 +3215,85 @@ struct mlx5_ifc_query_regexp_register_out_bits {
+ 	MLX5_CMD_OP_ALLOC_TRANSPORT_DOMAIN = 0x816,
+ 	MLX5_CMD_OP_CREATE_TIR = 0x900,
+@@ -3034,6 +3036,85 @@ struct mlx5_ifc_query_regexp_register_out_bits {
@@ -220 +222 @@
-index edd6c0e757..91f3fa5779 100644
+index 709b2c708e..fd6019bd2b 100644
@@ -223 +225 @@
-@@ -22,7 +22,7 @@ INTERNAL {
+@@ -21,7 +21,7 @@ INTERNAL {
@@ -229 +230,0 @@
- 	mlx5_devx_cmd_create_geneve_tlv_option;
@@ -232 +233,2 @@
-@@ -40,6 +40,8 @@ INTERNAL {
+ 	mlx5_devx_cmd_flow_counter_query;
+@@ -38,6 +38,8 @@ INTERNAL {

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

* [dpdk-stable] patch 'net/hns3: fix device capabilities for copper media type' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (23 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'common/mlx5: add DevX commands for queue counters' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/hns3: fix HW buffer size on MTU update' " Xueming Li
                   ` (202 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e4e0a6505d77bec24938065bc77ecd0a74e02ae8

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e4e0a6505d77bec24938065bc77ecd0a74e02ae8 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Thu, 4 Mar 2021 15:44:47 +0800
Subject: [PATCH] net/hns3: fix device capabilities for copper media type
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 68ed5ee49de7f6e3a57c5ecca812b3bbcced6bbf ]

The configuration operation for PHY is implemented by firmware. And
a capability flag will be report to driver, which means the firmware
supports the PHY driver.  However, the current implementation only
supports obtaining the capability bit, but some basic functions of
copper ports in driver, such as, the query of link status and link
info, are not supported.

Therefore, it is necessary for driver to set the copper capability
bit to zero when the firmware supports the configuration of the PHY.

Fixes: 438752358158 ("net/hns3: get device capability from firmware")
Fixes: 95e50325864c ("net/hns3: support copper media type")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
---
 drivers/net/hns3/hns3_cmd.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c
index 76d16a5a92..7f115d37ef 100644
--- a/drivers/net/hns3/hns3_cmd.c
+++ b/drivers/net/hns3/hns3_cmd.c
@@ -424,8 +424,14 @@ static void hns3_parse_capability(struct hns3_hw *hw,
 		hns3_set_bit(hw->capability, HNS3_DEV_SUPPORT_PTP_B, 1);
 	if (hns3_get_bit(caps, HNS3_CAPS_TX_PUSH_B))
 		hns3_set_bit(hw->capability, HNS3_DEV_SUPPORT_TX_PUSH_B, 1);
+	/*
+	 * Currently, the query of link status and link info on copper ports
+	 * are not supported. So it is necessary for driver to set the copper
+	 * capability bit to zero when the firmware supports the configuration
+	 * of the PHY.
+	 */
 	if (hns3_get_bit(caps, HNS3_CAPS_PHY_IMP_B))
-		hns3_set_bit(hw->capability, HNS3_DEV_SUPPORT_COPPER_B, 1);
+		hns3_set_bit(hw->capability, HNS3_DEV_SUPPORT_COPPER_B, 0);
 	if (hns3_get_bit(caps, HNS3_CAPS_TQP_TXRX_INDEP_B))
 		hns3_set_bit(hw->capability, HNS3_DEV_SUPPORT_INDEP_TXRX_B, 1);
 	if (hns3_get_bit(caps, HNS3_CAPS_STASH_B))
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.383658500 +0800
+++ 0027-net-hns3-fix-device-capabilities-for-copper-media-ty.patch	2021-05-10 23:59:26.350000000 +0800
@@ -1 +1 @@
-From 68ed5ee49de7f6e3a57c5ecca812b3bbcced6bbf Mon Sep 17 00:00:00 2001
+From e4e0a6505d77bec24938065bc77ecd0a74e02ae8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 68ed5ee49de7f6e3a57c5ecca812b3bbcced6bbf ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index 32cd56b478..ec34615558 100644
+index 76d16a5a92..7f115d37ef 100644
@@ -29 +31 @@
-@@ -423,8 +423,14 @@ static void hns3_parse_capability(struct hns3_hw *hw,
+@@ -424,8 +424,14 @@ static void hns3_parse_capability(struct hns3_hw *hw,

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

* [dpdk-stable] patch 'net/hns3: fix HW buffer size on MTU update' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (24 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/hns3: fix device capabilities for copper media type' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/hns3: remove unused parameter markers' " Xueming Li
                   ` (201 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Luca Boccassi, Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3997b852411f2022478b2b32e1916f9a555a68b8

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3997b852411f2022478b2b32e1916f9a555a68b8 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Thu, 4 Mar 2021 15:44:50 +0800
Subject: [PATCH] net/hns3: fix HW buffer size on MTU update
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 25fb790f7868f8eee96f7f051a834dec01b8a369 ]

After MTU changed, the buffer used to store packets in HW should be
reallocated. And buffer size is allocated based on the maximum frame
size in the PF struct. However, the value of maximum frame size  is
not updated in time when MTU is changed. This would lead to a packet
loss for not enough buffer.

This patch update the maximum frame size before reallocating the HW
buffer. And a rollback operation is added to avoid the side effects
of buffer reallocation failures.

Fixes: 1f5ca0b460cd ("net/hns3: support some device operations")
Fixes: d51867db65c1 ("net/hns3: add initialization")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index ba7d6e38a2..8f4ce58c0b 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2435,17 +2435,33 @@ hns3_set_mac_mtu(struct hns3_hw *hw, uint16_t new_mps)
 static int
 hns3_config_mtu(struct hns3_hw *hw, uint16_t mps)
 {
+	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
+	uint16_t original_mps = hns->pf.mps;
+	int err;
 	int ret;
 
 	ret = hns3_set_mac_mtu(hw, mps);
 	if (ret) {
-		hns3_err(hw, "Failed to set mtu, ret = %d", ret);
+		hns3_err(hw, "failed to set mtu, ret = %d", ret);
 		return ret;
 	}
 
+	hns->pf.mps = mps;
 	ret = hns3_buffer_alloc(hw);
-	if (ret)
-		hns3_err(hw, "Failed to allocate buffer, ret = %d", ret);
+	if (ret) {
+		hns3_err(hw, "failed to allocate buffer, ret = %d", ret);
+		goto rollback;
+	}
+
+	return 0;
+
+rollback:
+	err = hns3_set_mac_mtu(hw, original_mps);
+	if (err) {
+		hns3_err(hw, "fail to rollback MTU, err = %d", err);
+		return ret;
+	}
+	hns->pf.mps = original_mps;
 
 	return ret;
 }
@@ -2480,7 +2496,7 @@ hns3_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 			 dev->data->port_id, mtu, ret);
 		return ret;
 	}
-	hns->pf.mps = (uint16_t)frame_size;
+
 	if (is_jumbo_frame)
 		dev->data->dev_conf.rxmode.offloads |=
 						DEV_RX_OFFLOAD_JUMBO_FRAME;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.408646500 +0800
+++ 0028-net-hns3-fix-HW-buffer-size-on-MTU-update.patch	2021-05-10 23:59:26.350000000 +0800
@@ -1 +1 @@
-From 25fb790f7868f8eee96f7f051a834dec01b8a369 Mon Sep 17 00:00:00 2001
+From 3997b852411f2022478b2b32e1916f9a555a68b8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 25fb790f7868f8eee96f7f051a834dec01b8a369 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index b3fd331fe4..21c3c59cdd 100644
+index ba7d6e38a2..8f4ce58c0b 100644
@@ -30 +32 @@
-@@ -2460,17 +2460,33 @@ hns3_set_mac_mtu(struct hns3_hw *hw, uint16_t new_mps)
+@@ -2435,17 +2435,33 @@ hns3_set_mac_mtu(struct hns3_hw *hw, uint16_t new_mps)
@@ -67 +69 @@
-@@ -2505,7 +2521,7 @@ hns3_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -2480,7 +2496,7 @@ hns3_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)

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

* [dpdk-stable] patch 'net/hns3: remove unused parameter markers' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (25 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/hns3: fix HW buffer size on MTU update' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/bonding: fix LACP system address check' " Xueming Li
                   ` (200 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Lijun Ou, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/19922dfa9e13c872fdd60e2baca9cddec879f44d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 19922dfa9e13c872fdd60e2baca9cddec879f44d Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Thu, 4 Mar 2021 15:44:51 +0800
Subject: [PATCH] net/hns3: remove unused parameter markers
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit e5081655405784a387127ed99c231565585d9302 ]

All input parameters in the "hns3_dev_xstats_get_by_id" API are used,
so the rte_unused flag of some variables should be deleted.

Fixes: 3213d584b698 ("net/hns3: fix xstats with id and names")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 drivers/net/hns3/hns3_stats.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_stats.h b/drivers/net/hns3/hns3_stats.h
index 9fcd5f9bbf..09b81b131a 100644
--- a/drivers/net/hns3/hns3_stats.h
+++ b/drivers/net/hns3/hns3_stats.h
@@ -140,8 +140,8 @@ int hns3_dev_xstats_get_names(struct rte_eth_dev *dev,
 			      struct rte_eth_xstat_name *xstats_names,
 			      __rte_unused unsigned int size);
 int hns3_dev_xstats_get_by_id(struct rte_eth_dev *dev,
-			      __rte_unused const uint64_t *ids,
-			      __rte_unused uint64_t *values,
+			      const uint64_t *ids,
+			      uint64_t *values,
 			      uint32_t size);
 int hns3_dev_xstats_get_names_by_id(struct rte_eth_dev *dev,
 				    struct rte_eth_xstat_name *xstats_names,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.435535500 +0800
+++ 0029-net-hns3-remove-unused-parameter-markers.patch	2021-05-10 23:59:26.350000000 +0800
@@ -1 +1 @@
-From e5081655405784a387127ed99c231565585d9302 Mon Sep 17 00:00:00 2001
+From 19922dfa9e13c872fdd60e2baca9cddec879f44d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit e5081655405784a387127ed99c231565585d9302 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 01b4f36dc4..70a9c5bcd5 100644
+index 9fcd5f9bbf..09b81b131a 100644
@@ -22 +24 @@
-@@ -156,8 +156,8 @@ int hns3_dev_xstats_get_names(struct rte_eth_dev *dev,
+@@ -140,8 +140,8 @@ int hns3_dev_xstats_get_names(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/bonding: fix LACP system address check' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (26 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/hns3: remove unused parameter markers' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/txgbe: remove unused functions' " Xueming Li
                   ` (199 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Vadim Podovinnikov; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/96cc541d1115b9ce2df3cf6c83e513c88766e040

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 96cc541d1115b9ce2df3cf6c83e513c88766e040 Mon Sep 17 00:00:00 2001
From: Vadim Podovinnikov <podovinnikov@protei.ru>
Date: Wed, 17 Feb 2021 16:26:55 +0000
Subject: [PATCH] net/bonding: fix LACP system address check
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit fad80ab3698e7f7d3e9c2a28c371da6a17fbc477 ]

In bond (LACP) we have several NICs (ports), when we have negotiation
with peer about what port we prefer, we send information about what
system we preferred in partner system name field. Peer also sends us
what partner system name it prefer.

When we receive a message from it we must compare its preferred system
name with our system name, but not with our port mac address

In my test I have several problems with that:
1. If master port (mac address same as system address) shuts down (I
   have two ports) I loose connection
2. If secondary port (mac address not same as system address) receives
   message before master port, my connection is not established.

Fixes: 56cbc0817399 ("net/bonding: fix LACP negotiation")

Signed-off-by: Vadim Podovinnikov <podovinnikov@protei.ru>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 5fe004e551..128754f459 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -804,19 +804,34 @@ rx_machine_update(struct bond_dev_private *internals, uint16_t slave_id,
 		struct rte_mbuf *lacp_pkt) {
 	struct lacpdu_header *lacp;
 	struct lacpdu_actor_partner_params *partner;
+	struct port *port, *agg;
 
 	if (lacp_pkt != NULL) {
 		lacp = rte_pktmbuf_mtod(lacp_pkt, struct lacpdu_header *);
 		RTE_ASSERT(lacp->lacpdu.subtype == SLOW_SUBTYPE_LACP);
 
 		partner = &lacp->lacpdu.partner;
+		port = &bond_mode_8023ad_ports[slave_id];
+		agg = &bond_mode_8023ad_ports[port->aggregator_port_id];
+
 		if (rte_is_zero_ether_addr(&partner->port_params.system) ||
 			rte_is_same_ether_addr(&partner->port_params.system,
-			&internals->mode4.mac_addr)) {
+				&agg->actor.system)) {
 			/* This LACP frame is sending to the bonding port
 			 * so pass it to rx_machine.
 			 */
 			rx_machine(internals, slave_id, &lacp->lacpdu);
+		} else {
+			char preferred_system_name[RTE_ETHER_ADDR_FMT_SIZE];
+			char self_system_name[RTE_ETHER_ADDR_FMT_SIZE];
+
+			rte_ether_format_addr(preferred_system_name,
+				RTE_ETHER_ADDR_FMT_SIZE, &partner->port_params.system);
+			rte_ether_format_addr(self_system_name,
+				RTE_ETHER_ADDR_FMT_SIZE, &agg->actor.system);
+			MODE4_DEBUG("preferred partner system %s "
+				"is not equal with self system: %s\n",
+				preferred_system_name, self_system_name);
 		}
 		rte_pktmbuf_free(lacp_pkt);
 	} else
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.458009500 +0800
+++ 0030-net-bonding-fix-LACP-system-address-check.patch	2021-05-10 23:59:26.360000000 +0800
@@ -1 +1 @@
-From fad80ab3698e7f7d3e9c2a28c371da6a17fbc477 Mon Sep 17 00:00:00 2001
+From 96cc541d1115b9ce2df3cf6c83e513c88766e040 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit fad80ab3698e7f7d3e9c2a28c371da6a17fbc477 ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/txgbe: remove unused functions' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (27 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/bonding: fix LACP system address check' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/txgbe: fix Rx missed packet counter' " Xueming Li
                   ` (198 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/991c44b257506f3dbd66e180cfa7ba32f1efaf67

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 991c44b257506f3dbd66e180cfa7ba32f1efaf67 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Fri, 5 Mar 2021 10:14:35 +0800
Subject: [PATCH] net/txgbe: remove unused functions
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 9f1b1fbbdd483836f30004ce5db3b99080ebf718 ]

Remove unused functions for EEPROM read and write.

Fixes: 35c90ecccfd4 ("net/txgbe: add EEPROM functions")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/base/txgbe_eeprom.c | 76 +--------------------------
 drivers/net/txgbe/base/txgbe_eeprom.h |  2 -
 2 files changed, 2 insertions(+), 76 deletions(-)

diff --git a/drivers/net/txgbe/base/txgbe_eeprom.c b/drivers/net/txgbe/base/txgbe_eeprom.c
index 72cd3ff307..bcbf3503c8 100644
--- a/drivers/net/txgbe/base/txgbe_eeprom.c
+++ b/drivers/net/txgbe/base/txgbe_eeprom.c
@@ -193,7 +193,7 @@ s32 txgbe_ee_read16(struct txgbe_hw *hw, u32 offset,
 }
 
 /**
- *  txgbe_ee_read_buffer- Read EEPROM word(s) using hostif
+ *  txgbe_ee_readw_buffer- Read EEPROM word(s) using hostif
  *  @hw: pointer to hardware structure
  *  @offset: offset of  word in the EEPROM to read
  *  @words: number of words
@@ -274,42 +274,6 @@ s32 txgbe_ee_read32(struct txgbe_hw *hw, u32 addr, u32 *data)
 	return err;
 }
 
-/**
- *  txgbe_ee_read_buffer - Read EEPROM byte(s) using hostif
- *  @hw: pointer to hardware structure
- *  @addr: offset of bytes in the EEPROM to read
- *  @len: number of bytes
- *  @data: byte(s) read from the EEPROM
- *
- *  Reads a 8 bit byte(s) from the EEPROM using the hostif.
- **/
-s32 txgbe_ee_read_buffer(struct txgbe_hw *hw,
-				     u32 addr, u32 len, void *data)
-{
-	const u32 mask = TXGBE_MNGSEM_SWMBX | TXGBE_MNGSEM_SWFLASH;
-	u8 *buf = (u8 *)data;
-	int err;
-
-	err = hw->mac.acquire_swfw_sync(hw, mask);
-	if (err)
-		return err;
-
-	while (len) {
-		u32 seg = (len <= TXGBE_PMMBX_DATA_SIZE
-				? len : TXGBE_PMMBX_DATA_SIZE);
-
-		err = txgbe_hic_sr_read(hw, addr, buf, seg);
-		if (err)
-			break;
-
-		len -= seg;
-		buf += seg;
-	}
-
-	hw->mac.release_swfw_sync(hw, mask);
-	return err;
-}
-
 /**
  *  txgbe_ee_write - Write EEPROM word using hostif
  *  @hw: pointer to hardware structure
@@ -339,7 +303,7 @@ s32 txgbe_ee_write16(struct txgbe_hw *hw, u32 offset,
 }
 
 /**
- *  txgbe_ee_write_buffer - Write EEPROM word(s) using hostif
+ *  txgbe_ee_writew_buffer - Write EEPROM word(s) using hostif
  *  @hw: pointer to hardware structure
  *  @offset: offset of  word in the EEPROM to write
  *  @words: number of words
@@ -420,42 +384,6 @@ s32 txgbe_ee_write32(struct txgbe_hw *hw, u32 addr, u32 data)
 	return err;
 }
 
-/**
- *  txgbe_ee_write_buffer - Write EEPROM byte(s) using hostif
- *  @hw: pointer to hardware structure
- *  @addr: offset of bytes in the EEPROM to write
- *  @len: number of bytes
- *  @data: word(s) write to the EEPROM
- *
- *  Write a 8 bit byte(s) to the EEPROM using the hostif.
- **/
-s32 txgbe_ee_write_buffer(struct txgbe_hw *hw,
-				      u32 addr, u32 len, void *data)
-{
-	const u32 mask = TXGBE_MNGSEM_SWMBX | TXGBE_MNGSEM_SWFLASH;
-	u8 *buf = (u8 *)data;
-	int err;
-
-	err = hw->mac.acquire_swfw_sync(hw, mask);
-	if (err)
-		return err;
-
-	while (len) {
-		u32 seg = (len <= TXGBE_PMMBX_DATA_SIZE
-				? len : TXGBE_PMMBX_DATA_SIZE);
-
-		err = txgbe_hic_sr_write(hw, addr, buf, seg);
-		if (err)
-			break;
-
-		len -= seg;
-		buf += seg;
-	}
-
-	hw->mac.release_swfw_sync(hw, mask);
-	return err;
-}
-
 /**
  *  txgbe_calc_eeprom_checksum - Calculates and returns the checksum
  *  @hw: pointer to hardware structure
diff --git a/drivers/net/txgbe/base/txgbe_eeprom.h b/drivers/net/txgbe/base/txgbe_eeprom.h
index d0e142dba5..78b8af978b 100644
--- a/drivers/net/txgbe/base/txgbe_eeprom.h
+++ b/drivers/net/txgbe/base/txgbe_eeprom.h
@@ -51,14 +51,12 @@ s32 txgbe_ee_readw_sw(struct txgbe_hw *hw, u32 offset, u16 *data);
 s32 txgbe_ee_readw_buffer(struct txgbe_hw *hw, u32 offset, u32 words,
 				void *data);
 s32 txgbe_ee_read32(struct txgbe_hw *hw, u32 addr, u32 *data);
-s32 txgbe_ee_read_buffer(struct txgbe_hw *hw, u32 addr, u32 len, void *data);
 
 s32 txgbe_ee_write16(struct txgbe_hw *hw, u32 offset, u16 data);
 s32 txgbe_ee_writew_sw(struct txgbe_hw *hw, u32 offset, u16 data);
 s32 txgbe_ee_writew_buffer(struct txgbe_hw *hw, u32 offset, u32 words,
 				void *data);
 s32 txgbe_ee_write32(struct txgbe_hw *hw, u32 addr, u32 data);
-s32 txgbe_ee_write_buffer(struct txgbe_hw *hw, u32 addr, u32 len, void *data);
 
 
 #endif /* _TXGBE_EEPROM_H_ */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.480772900 +0800
+++ 0031-net-txgbe-remove-unused-functions.patch	2021-05-10 23:59:26.360000000 +0800
@@ -1 +1 @@
-From 9f1b1fbbdd483836f30004ce5db3b99080ebf718 Mon Sep 17 00:00:00 2001
+From 991c44b257506f3dbd66e180cfa7ba32f1efaf67 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 9f1b1fbbdd483836f30004ce5db3b99080ebf718 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/txgbe: fix Rx missed packet counter' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (28 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/txgbe: remove unused functions' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/txgbe: update packet type' " Xueming Li
                   ` (197 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4d4ae30d079595fceae005624f66f96fb630fda0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4d4ae30d079595fceae005624f66f96fb630fda0 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Fri, 5 Mar 2021 10:14:36 +0800
Subject: [PATCH] net/txgbe: fix Rx missed packet counter
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit fa702fde0c3670bf0a206d9e074046274233c516 ]

Add the Rx dropped packet counter into stats->imissed, to ensure the
stats correct.

Fixes: c9bb590d4295 ("net/txgbe: support device statistics")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/base/txgbe_type.h | 1 +
 drivers/net/txgbe/txgbe_ethdev.c    | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/txgbe/base/txgbe_type.h b/drivers/net/txgbe/base/txgbe_type.h
index b322a2cac8..4e9a7deb12 100644
--- a/drivers/net/txgbe/base/txgbe_type.h
+++ b/drivers/net/txgbe/base/txgbe_type.h
@@ -284,6 +284,7 @@ struct txgbe_hw_stats {
 	u64 rx_management_packets;
 	u64 tx_management_packets;
 	u64 rx_management_dropped;
+	u64 rx_dma_drop;
 	u64 rx_drop_packets;
 
 	/* Basic Error */
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index f8dffe1f12..63bae511ef 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -1881,6 +1881,7 @@ txgbe_read_stats_registers(struct txgbe_hw *hw,
 
 	hw_stats->rx_bytes += rd64(hw, TXGBE_DMARXOCTL);
 	hw_stats->tx_bytes += rd64(hw, TXGBE_DMATXOCTL);
+	hw_stats->rx_dma_drop += rd32(hw, TXGBE_DMARXDROP);
 	hw_stats->rx_drop_packets += rd32(hw, TXGBE_PBRXDROP);
 
 	/* MAC Stats */
@@ -2029,7 +2030,8 @@ txgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	}
 
 	/* Rx Errors */
-	stats->imissed  = hw_stats->rx_total_missed_packets;
+	stats->imissed  = hw_stats->rx_total_missed_packets +
+			  hw_stats->rx_dma_drop;
 	stats->ierrors  = hw_stats->rx_crc_errors +
 			  hw_stats->rx_mac_short_packet_dropped +
 			  hw_stats->rx_length_errors +
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.505093800 +0800
+++ 0032-net-txgbe-fix-Rx-missed-packet-counter.patch	2021-05-10 23:59:26.360000000 +0800
@@ -1 +1 @@
-From fa702fde0c3670bf0a206d9e074046274233c516 Mon Sep 17 00:00:00 2001
+From 4d4ae30d079595fceae005624f66f96fb630fda0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit fa702fde0c3670bf0a206d9e074046274233c516 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index ef8358ae37..2c8a3866a7 100644
+index b322a2cac8..4e9a7deb12 100644
@@ -22 +24 @@
-@@ -353,6 +353,7 @@ struct txgbe_hw_stats {
+@@ -284,6 +284,7 @@ struct txgbe_hw_stats {
@@ -31 +33 @@
-index 90137d0ceb..1ab8d2cded 100644
+index f8dffe1f12..63bae511ef 100644
@@ -34 +36 @@
-@@ -2080,6 +2080,7 @@ txgbe_read_stats_registers(struct txgbe_hw *hw,
+@@ -1881,6 +1881,7 @@ txgbe_read_stats_registers(struct txgbe_hw *hw,
@@ -42 +44 @@
-@@ -2228,7 +2229,8 @@ txgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -2029,7 +2030,8 @@ txgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)

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

* [dpdk-stable] patch 'net/txgbe: update packet type' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (29 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/txgbe: fix Rx missed packet counter' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/ice: fix VLAN filter with PF' " Xueming Li
                   ` (196 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/58fc7f65f2ce721e274f74709d0be7623de5244e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 58fc7f65f2ce721e274f74709d0be7623de5244e Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Fri, 5 Mar 2021 10:14:37 +0800
Subject: [PATCH] net/txgbe: update packet type
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 893b78035463f9d2eb35ea02ad7049312e2f855e ]

Update the packet type lookup table according to the HW design.
Fix the bug that inner L3 and L4 type can not be parsed when
QINQ insert in tunnel packet.

Fixes: 9e30b88f60b2 ("net/txgbe: support packet type")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ptypes.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/txgbe/txgbe_ptypes.c b/drivers/net/txgbe/txgbe_ptypes.c
index cd160ebbaf..7009f20821 100644
--- a/drivers/net/txgbe/txgbe_ptypes.c
+++ b/drivers/net/txgbe/txgbe_ptypes.c
@@ -50,6 +50,7 @@
 static u32 txgbe_ptype_lookup[TXGBE_PTID_MAX] __rte_cache_aligned = {
 	/* L2:0-3 L3:4-7 L4:8-11 TUN:12-15 EL2:16-19 EL3:20-23 EL2:24-27 */
 	/* L2: ETH */
+	TPTE(0x10, ETHER,          NONE, NONE, NONE, NONE, NONE, NONE),
 	TPTE(0x11, ETHER,          NONE, NONE, NONE, NONE, NONE, NONE),
 	TPTE(0x12, ETHER_TIMESYNC, NONE, NONE, NONE, NONE, NONE, NONE),
 	TPTE(0x13, ETHER_FIP,      NONE, NONE, NONE, NONE, NONE, NONE),
@@ -67,6 +68,7 @@ static u32 txgbe_ptype_lookup[TXGBE_PTID_MAX] __rte_cache_aligned = {
 	TPTE(0x1E, ETHER_FILTER,   NONE, NONE, NONE, NONE, NONE, NONE),
 	TPTE(0x1F, ETHER_FILTER,   NONE, NONE, NONE, NONE, NONE, NONE),
 	/* L3: IP */
+	TPTE(0x20, ETHER, IPV4, NONFRAG, NONE, NONE, NONE, NONE),
 	TPTE(0x21, ETHER, IPV4, FRAG,    NONE, NONE, NONE, NONE),
 	TPTE(0x22, ETHER, IPV4, NONFRAG, NONE, NONE, NONE, NONE),
 	TPTE(0x23, ETHER, IPV4, UDP,     NONE, NONE, NONE, NONE),
@@ -339,7 +341,7 @@ txgbe_encode_ptype_tunnel(u32 ptype)
 		break;
 	case RTE_PTYPE_INNER_L2_ETHER_QINQ:
 		ptid |= TXGBE_PTID_TUN_EIGMV;
-		return ptid;
+		break;
 	default:
 		break;
 	}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.528868400 +0800
+++ 0033-net-txgbe-update-packet-type.patch	2021-05-10 23:59:26.360000000 +0800
@@ -1 +1 @@
-From 893b78035463f9d2eb35ea02ad7049312e2f855e Mon Sep 17 00:00:00 2001
+From 58fc7f65f2ce721e274f74709d0be7623de5244e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 893b78035463f9d2eb35ea02ad7049312e2f855e ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/ice: fix VLAN filter with PF' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (30 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/txgbe: update packet type' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/igc: remove MTU setting limitation' " Xueming Li
                   ` (195 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Luca Boccassi, Zhimin Huang, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f27ac1c00932691e806d55dc66be578bd57cf7fc

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f27ac1c00932691e806d55dc66be578bd57cf7fc Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Fri, 19 Feb 2021 13:13:46 +0800
Subject: [PATCH] net/ice: fix VLAN filter with PF
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit da996000e8ea513ee47e3e01f0f4e709e66cec07 ]

The macro flag DEV_RX_OFFLOAD_VLAN_FILTER is used to enable/disable
Rx VLAN filter, but not Tx VLAN filter. Therefore, Tx VLAN filter
should not be enabled/disabled in function ice_vsi_config_vlan_filter
called after checking DEV_RX_OFFLOAD_VLAN_FILTER flag.

In addition, the kernel driver doesn't enable/disable the TX VLAN
filter in the similar function ice_cfg_vlan_pruning.

This patch removes the setting about the TX VLAN filter in function
ice_vsi_config_vlan_filter.

Fixes: e0dcf94a0d7f ("net/ice: support VLAN ops")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Tested-by: Zhimin Huang <zhiminx.huang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 70e5f74b2f..d789650652 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -4039,20 +4039,16 @@ ice_vsi_config_vlan_filter(struct ice_vsi *vsi, bool on)
 {
 	struct ice_hw *hw = ICE_VSI_TO_HW(vsi);
 	struct ice_vsi_ctx ctxt;
-	uint8_t sec_flags, sw_flags2;
+	uint8_t sw_flags2;
 	int ret = 0;
 
-	sec_flags = ICE_AQ_VSI_SEC_TX_VLAN_PRUNE_ENA <<
-		    ICE_AQ_VSI_SEC_TX_PRUNE_ENA_S;
 	sw_flags2 = ICE_AQ_VSI_SW_FLAG_RX_VLAN_PRUNE_ENA;
 
-	if (on) {
-		vsi->info.sec_flags |= sec_flags;
+	if (on)
 		vsi->info.sw_flags2 |= sw_flags2;
-	} else {
-		vsi->info.sec_flags &= ~sec_flags;
+	else
 		vsi->info.sw_flags2 &= ~sw_flags2;
-	}
+
 	vsi->info.sw_id = hw->port_info->sw_id;
 	(void)rte_memcpy(&ctxt.info, &vsi->info, sizeof(vsi->info));
 	ctxt.info.valid_sections =
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.551984200 +0800
+++ 0034-net-ice-fix-VLAN-filter-with-PF.patch	2021-05-10 23:59:26.360000000 +0800
@@ -1 +1 @@
-From da996000e8ea513ee47e3e01f0f4e709e66cec07 Mon Sep 17 00:00:00 2001
+From f27ac1c00932691e806d55dc66be578bd57cf7fc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit da996000e8ea513ee47e3e01f0f4e709e66cec07 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index dfd99ace94..8999d441ac 100644
+index 70e5f74b2f..d789650652 100644
@@ -31 +33 @@
-@@ -4011,20 +4011,16 @@ ice_vsi_config_vlan_filter(struct ice_vsi *vsi, bool on)
+@@ -4039,20 +4039,16 @@ ice_vsi_config_vlan_filter(struct ice_vsi *vsi, bool on)

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

* [dpdk-stable] patch 'net/igc: remove MTU setting limitation' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (31 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/ice: fix VLAN filter with PF' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/e1000: " Xueming Li
                   ` (194 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Dapeng Yu; +Cc: Luca Boccassi, Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f9b6f0ca8b382686cf390db90e0bd95036e3ed6c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f9b6f0ca8b382686cf390db90e0bd95036e3ed6c Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Fri, 19 Feb 2021 18:01:07 +0800
Subject: [PATCH] net/igc: remove MTU setting limitation
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 5db232fa5aed20f7b1b2eeed19c17a97259c1261 ]

Currently, if requested MTU is bigger than mbuf size and scattered
receive is not enabled, setting MTU to that value fails.

This patch allows setting this special MTU when device is stopped,
because scattered_rx will be re-configured during next port start
and driver may enable scattered receive according new MTU value.

After this patch, driver may select different receive function
automatically after MTU set, according MTU values selected.

Fixes: a5aeb2b9e225 ("net/igc: support Rx and Tx")

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/igc/igc_ethdev.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
index 802212fc57..75e114b9ca 100644
--- a/drivers/net/igc/igc_ethdev.c
+++ b/drivers/net/igc/igc_ethdev.c
@@ -1590,12 +1590,14 @@ eth_igc_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 		return -EINVAL;
 
 	/*
-	 * refuse mtu that requires the support of scattered packets when
-	 * this feature has not been enabled before.
+	 * If device is started, refuse mtu that requires the support of
+	 * scattered packets when this feature has not been enabled before.
 	 */
-	if (!dev->data->scattered_rx &&
-	    frame_size > dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM)
+	if (dev->data->dev_started && !dev->data->scattered_rx &&
+	    frame_size > dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM) {
+		PMD_INIT_LOG(ERR, "Stop port first.");
 		return -EINVAL;
+	}
 
 	rctl = IGC_READ_REG(hw, IGC_RCTL);
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.577615200 +0800
+++ 0035-net-igc-remove-MTU-setting-limitation.patch	2021-05-10 23:59:26.360000000 +0800
@@ -1 +1 @@
-From 5db232fa5aed20f7b1b2eeed19c17a97259c1261 Mon Sep 17 00:00:00 2001
+From f9b6f0ca8b382686cf390db90e0bd95036e3ed6c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 5db232fa5aed20f7b1b2eeed19c17a97259c1261 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index dbaa7a83e5..0ea6e2a045 100644
+index 802212fc57..75e114b9ca 100644

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

* [dpdk-stable] patch 'net/e1000: remove MTU setting limitation' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (32 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/igc: remove MTU setting limitation' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/ice/base: fix payload indicator on ptype' " Xueming Li
                   ` (193 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Dapeng Yu; +Cc: Luca Boccassi, Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e3486cbde8ea2bb1c791c9711e28820ce75a0e7d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e3486cbde8ea2bb1c791c9711e28820ce75a0e7d Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Fri, 19 Feb 2021 18:03:23 +0800
Subject: [PATCH] net/e1000: remove MTU setting limitation
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 0984d196be2a92eb6e2e0b926fdb4a06a1d7d823 ]

Currently, if requested MTU is bigger than mbuf size and scattered
receive is not enabled, setting MTU to that value fails.

This patch allows setting this special MTU when device is stopped,
because scattered_rx will be re-configured during next port start
and driver may enable scattered receive according new MTU value.

After this patch, driver may select different receive function
automatically after MTU set, according MTU values selected.

Fixes: 59d0ecdbf0e1 ("ethdev: MTU accessors")

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/e1000/em_ethdev.c  | 12 ++++++++----
 drivers/net/e1000/igb_ethdev.c | 12 ++++++++----
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 2036c6e917..f116063876 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -1805,11 +1805,15 @@ eth_em_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 	if (mtu < RTE_ETHER_MIN_MTU || frame_size > dev_info.max_rx_pktlen)
 		return -EINVAL;
 
-	/* refuse mtu that requires the support of scattered packets when this
-	 * feature has not been enabled before. */
-	if (!dev->data->scattered_rx &&
-	    frame_size > dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM)
+	/*
+	 * If device is started, refuse mtu that requires the support of
+	 * scattered packets when this feature has not been enabled before.
+	 */
+	if (dev->data->dev_started && !dev->data->scattered_rx &&
+	    frame_size > dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM) {
+		PMD_INIT_LOG(ERR, "Stop port first.");
 		return -EINVAL;
+	}
 
 	hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	rctl = E1000_READ_REG(hw, E1000_RCTL);
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 5bcc67d75f..669af23103 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -4394,11 +4394,15 @@ eth_igb_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 			frame_size > dev_info.max_rx_pktlen)
 		return -EINVAL;
 
-	/* refuse mtu that requires the support of scattered packets when this
-	 * feature has not been enabled before. */
-	if (!dev->data->scattered_rx &&
-	    frame_size > dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM)
+	/*
+	 * If device is started, refuse mtu that requires the support of
+	 * scattered packets when this feature has not been enabled before.
+	 */
+	if (dev->data->dev_started && !dev->data->scattered_rx &&
+	    frame_size > dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM) {
+		PMD_INIT_LOG(ERR, "Stop port first.");
 		return -EINVAL;
+	}
 
 	rctl = E1000_READ_REG(hw, E1000_RCTL);
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.600968100 +0800
+++ 0036-net-e1000-remove-MTU-setting-limitation.patch	2021-05-10 23:59:26.370000000 +0800
@@ -1 +1 @@
-From 0984d196be2a92eb6e2e0b926fdb4a06a1d7d823 Mon Sep 17 00:00:00 2001
+From e3486cbde8ea2bb1c791c9711e28820ce75a0e7d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 0984d196be2a92eb6e2e0b926fdb4a06a1d7d823 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index 9b8c4a7de5..3c6f643c19 100644
+index 2036c6e917..f116063876 100644
@@ -51 +53 @@
-index 5323504e98..1716d6b904 100644
+index 5bcc67d75f..669af23103 100644

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

* [dpdk-stable] patch 'net/ice/base: fix payload indicator on ptype' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (33 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/e1000: " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/ice/base: fix uninitialized struct' " Xueming Li
                   ` (192 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Luca Boccassi, Jacob Keller, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d4ef2f169e4d922a62efc272fbf491a368004fc2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d4ef2f169e4d922a62efc272fbf491a368004fc2 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 2 Mar 2021 15:23:52 +0800
Subject: [PATCH] net/ice/base: fix payload indicator on ptype
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 50fb95cb66d0dc993e98500a8384eb366b0d7b52 ]

The entry for PTYPE 90 indicates that the payload is layer 3. This does
not match the specification in the datasheet which indicates the packet
is a MAC, IPv6, UDP packet, with a payload in layer 4.

Fix the lookup table to match the data sheet.

Fixes: 64e9587d5629 ("net/ice/base: add structures for Rx/Tx queues")

Signed-off-by: Jacob Keller <jacob.e.keller@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_lan_tx_rx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_lan_tx_rx.h b/drivers/net/ice/base/ice_lan_tx_rx.h
index ec0c9f3ab0..7039cc8d92 100644
--- a/drivers/net/ice/base/ice_lan_tx_rx.h
+++ b/drivers/net/ice/base/ice_lan_tx_rx.h
@@ -1353,7 +1353,7 @@ static const struct ice_rx_ptype_decoded ice_ptype_lkup[] = {
 	/* Non Tunneled IPv6 */
 	ICE_PTT(88, IP, IPV6, FRG, NONE, NONE, NOF, NONE, PAY3),
 	ICE_PTT(89, IP, IPV6, NOF, NONE, NONE, NOF, NONE, PAY3),
-	ICE_PTT(90, IP, IPV6, NOF, NONE, NONE, NOF, UDP,  PAY3),
+	ICE_PTT(90, IP, IPV6, NOF, NONE, NONE, NOF, UDP,  PAY4),
 	ICE_PTT_UNUSED_ENTRY(91),
 	ICE_PTT(92, IP, IPV6, NOF, NONE, NONE, NOF, TCP,  PAY4),
 	ICE_PTT(93, IP, IPV6, NOF, NONE, NONE, NOF, SCTP, PAY4),
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.627007900 +0800
+++ 0037-net-ice-base-fix-payload-indicator-on-ptype.patch	2021-05-10 23:59:26.370000000 +0800
@@ -1 +1 @@
-From 50fb95cb66d0dc993e98500a8384eb366b0d7b52 Mon Sep 17 00:00:00 2001
+From d4ef2f169e4d922a62efc272fbf491a368004fc2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 50fb95cb66d0dc993e98500a8384eb366b0d7b52 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 107826acd0..e0e79cad95 100644
+index ec0c9f3ab0..7039cc8d92 100644

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

* [dpdk-stable] patch 'net/ice/base: fix uninitialized struct' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (34 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/ice/base: fix payload indicator on ptype' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/ice/base: cleanup filter list on error' " Xueming Li
                   ` (191 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Luca Boccassi, Jesse Brandeburg, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8d88d38931c2d0b5c7b38d1121a0f7f8ef79cf7c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8d88d38931c2d0b5c7b38d1121a0f7f8ef79cf7c Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 2 Mar 2021 15:23:56 +0800
Subject: [PATCH] net/ice/base: fix uninitialized struct
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 739dee1f22d9d2d537fe5d38bb90ba29606e0196 ]

One of the structs being used for ACL counter rules was allocated on
the stack and left uninitialized.  Rather than depending on
undefined behavior around the .amount member during rule removal,
just leave a comment and initialize the struct to zero, as this is a
slow path call anyway. This bug could have caused silent failures
during counter removal.

Fixes: f3202a097f12 ("net/ice/base: add ACL module")

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_flow.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index 1b36c2b897..548d998546 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -1732,9 +1732,14 @@ ice_flow_acl_free_act_cntr(struct ice_hw *hw, struct ice_flow_action *acts,
 		if (acts[i].type == ICE_FLOW_ACT_CNTR_PKT ||
 		    acts[i].type == ICE_FLOW_ACT_CNTR_BYTES ||
 		    acts[i].type == ICE_FLOW_ACT_CNTR_PKT_BYTES) {
-			struct ice_acl_cntrs cntrs;
+			struct ice_acl_cntrs cntrs = { 0 };
 			enum ice_status status;
 
+			/* amount is unused in the dealloc path but the common
+			 * parameter check routine wants a value set, as zero
+			 * is invalid for the check. Just set it.
+			 */
+			cntrs.amount = 1;
 			cntrs.bank = 0; /* Only bank0 for the moment */
 			cntrs.first_cntr =
 					LE16_TO_CPU(acts[i].data.acl_act.value);
@@ -2333,7 +2338,7 @@ ice_flow_acl_check_actions(struct ice_hw *hw, struct ice_flow_action *acts,
 		if (acts[i].type == ICE_FLOW_ACT_CNTR_PKT ||
 		    acts[i].type == ICE_FLOW_ACT_CNTR_BYTES ||
 		    acts[i].type == ICE_FLOW_ACT_CNTR_PKT_BYTES) {
-			struct ice_acl_cntrs cntrs;
+			struct ice_acl_cntrs cntrs = { 0 };
 			enum ice_status status;
 
 			cntrs.amount = 1;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.650212400 +0800
+++ 0038-net-ice-base-fix-uninitialized-struct.patch	2021-05-10 23:59:26.370000000 +0800
@@ -1 +1 @@
-From 739dee1f22d9d2d537fe5d38bb90ba29606e0196 Mon Sep 17 00:00:00 2001
+From 8d88d38931c2d0b5c7b38d1121a0f7f8ef79cf7c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 739dee1f22d9d2d537fe5d38bb90ba29606e0196 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index a081fbe5a4..d123206fc6 100644
+index 1b36c2b897..548d998546 100644
@@ -27 +29 @@
-@@ -1795,9 +1795,14 @@ ice_flow_acl_free_act_cntr(struct ice_hw *hw, struct ice_flow_action *acts,
+@@ -1732,9 +1732,14 @@ ice_flow_acl_free_act_cntr(struct ice_hw *hw, struct ice_flow_action *acts,
@@ -43 +45 @@
-@@ -2396,7 +2401,7 @@ ice_flow_acl_check_actions(struct ice_hw *hw, struct ice_flow_action *acts,
+@@ -2333,7 +2338,7 @@ ice_flow_acl_check_actions(struct ice_hw *hw, struct ice_flow_action *acts,

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

* [dpdk-stable] patch 'net/ice/base: cleanup filter list on error' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (35 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/ice/base: fix uninitialized struct' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/i40evf: fix packet loss for X722' " Xueming Li
                   ` (190 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Luca Boccassi, Robert Malz, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/0d32ae0c6f43fe3a954bc3016b80fecc0e132125

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0d32ae0c6f43fe3a954bc3016b80fecc0e132125 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Tue, 2 Mar 2021 15:23:57 +0800
Subject: [PATCH] net/ice/base: cleanup filter list on error
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 34ede45188c318e451ef98183814cc4555208f46 ]

When ice_remove_vsi_lkup_fltr is called, by calling
ice_add_to_vsi_fltr_list local copy of vsi filter list
is created. If any issues during creation of vsi filter
list occurs it up for the caller to free already
allocated memory. This patch ensures proper memory
deallocation in these cases.

Fixes: c7dd15931183 ("net/ice/base: add virtual switch code")

Signed-off-by: Robert Malz <robertx.malz@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_switch.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 247c3acb67..e6ea04183f 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -5602,7 +5602,7 @@ ice_remove_vsi_lkup_fltr(struct ice_hw *hw, u16 vsi_handle,
 					  &remove_list_head);
 	ice_release_lock(rule_lock);
 	if (status)
-		return;
+		goto free_fltr_list;
 
 	switch (lkup) {
 	case ICE_SW_LKUP_MAC:
@@ -5630,6 +5630,7 @@ ice_remove_vsi_lkup_fltr(struct ice_hw *hw, u16 vsi_handle,
 		break;
 	}
 
+free_fltr_list:
 	LIST_FOR_EACH_ENTRY_SAFE(fm_entry, tmp, &remove_list_head,
 				 ice_fltr_list_entry, list_entry) {
 		LIST_DEL(&fm_entry->list_entry);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.676447800 +0800
+++ 0039-net-ice-base-cleanup-filter-list-on-error.patch	2021-05-10 23:59:26.380000000 +0800
@@ -1 +1 @@
-From 34ede45188c318e451ef98183814cc4555208f46 Mon Sep 17 00:00:00 2001
+From 0d32ae0c6f43fe3a954bc3016b80fecc0e132125 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 34ede45188c318e451ef98183814cc4555208f46 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 2d0dd4b28c..3dc764266b 100644
+index 247c3acb67..e6ea04183f 100644
@@ -27 +29 @@
-@@ -6078,7 +6078,7 @@ ice_remove_vsi_lkup_fltr(struct ice_hw *hw, u16 vsi_handle,
+@@ -5602,7 +5602,7 @@ ice_remove_vsi_lkup_fltr(struct ice_hw *hw, u16 vsi_handle,
@@ -36 +38 @@
-@@ -6106,6 +6106,7 @@ ice_remove_vsi_lkup_fltr(struct ice_hw *hw, u16 vsi_handle,
+@@ -5630,6 +5630,7 @@ ice_remove_vsi_lkup_fltr(struct ice_hw *hw, u16 vsi_handle,

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

* [dpdk-stable] patch 'net/i40evf: fix packet loss for X722' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (36 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/ice/base: cleanup filter list on error' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/i40e: fix IPv4 fragment offload' " Xueming Li
                   ` (189 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Luca Boccassi, Hengjian Zhang, Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/94610393111ac87f41e5ee6550a843b743b172d2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 94610393111ac87f41e5ee6550a843b743b172d2 Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Wed, 24 Feb 2021 10:09:00 +0800
Subject: [PATCH] net/i40evf: fix packet loss for X722
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit c45bd78e07e9d4b5ffc29748b9b7d4127293597a ]

When Tx queue number is more than Rx queue number, and RSS is
enabled, there'll be packet loss with X722.
The root cause is the lookup table is not configured correctly,
since it uses VF's queue pair number but not Rx queue number.

Fixes: 2da3ba746795 ("net/i40e: fix VF runtime queues RSS config")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Hengjian Zhang <hengjianx.zhang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index bca8cb80e4..62acad702d 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2745,7 +2745,7 @@ i40evf_config_rss(struct i40e_vf *vf)
 		}
 
 		for (i = 0; i < rss_lut_size; i++)
-			lut_info[i] = i % vf->num_queue_pairs;
+			lut_info[i] = i % num;
 
 		ret = i40evf_set_rss_lut(&vf->vsi, lut_info,
 					 rss_lut_size);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.704359600 +0800
+++ 0040-net-i40evf-fix-packet-loss-for-X722.patch	2021-05-10 23:59:26.380000000 +0800
@@ -1 +1 @@
-From c45bd78e07e9d4b5ffc29748b9b7d4127293597a Mon Sep 17 00:00:00 2001
+From 94610393111ac87f41e5ee6550a843b743b172d2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit c45bd78e07e9d4b5ffc29748b9b7d4127293597a ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 2909b4d894..0c9bd8d2c6 100644
+index bca8cb80e4..62acad702d 100644
@@ -25 +27 @@
-@@ -2746,7 +2746,7 @@ i40evf_config_rss(struct i40e_vf *vf)
+@@ -2745,7 +2745,7 @@ i40evf_config_rss(struct i40e_vf *vf)

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

* [dpdk-stable] patch 'net/i40e: fix IPv4 fragment offload' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (37 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/i40evf: fix packet loss for X722' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/mlx5: fix Rx segmented packets on mbuf starvation' " Xueming Li
                   ` (188 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Xiaoyun Li; +Cc: Luca Boccassi, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d0de930b7b5cd26106ad1660628283acf20af2b3

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d0de930b7b5cd26106ad1660628283acf20af2b3 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Tue, 2 Mar 2021 15:03:20 +0800
Subject: [PATCH] net/i40e: fix IPv4 fragment offload
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 10127dbacf7c041a1b67b9e962635b31184bd604 ]

IPv4 fragment_offset mask was required to be 0 no matter what the
spec value was. But zero mask means not caring about fragment_offset
field then both non-frag and frag packets should hit the rule.

But the actual fragment rules should be like the following:
Only non-fragment packets can hit Rule 1:
Rule 1: mask=0x3fff, spec=0
Only fragment packets can hit rule 2:
Rule 2: mask=0x3fff, spec=0x8, last=0x2000

This patch allows the above rules.

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

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_flow.c | 87 ++++++++++++++++++++++++++++++++----
 1 file changed, 78 insertions(+), 9 deletions(-)

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index bbd666b7a0..5bef8c76a7 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2433,7 +2433,7 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 	const struct rte_flow_item *item = pattern;
 	const struct rte_flow_item_eth *eth_spec, *eth_mask;
 	const struct rte_flow_item_vlan *vlan_spec, *vlan_mask;
-	const struct rte_flow_item_ipv4 *ipv4_spec, *ipv4_mask;
+	const struct rte_flow_item_ipv4 *ipv4_spec, *ipv4_last, *ipv4_mask;
 	const struct rte_flow_item_ipv6 *ipv6_spec, *ipv6_mask;
 	const struct rte_flow_item_tcp *tcp_spec, *tcp_mask;
 	const struct rte_flow_item_udp *udp_spec, *udp_mask;
@@ -2446,7 +2446,6 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 
 	uint8_t pctype = 0;
 	uint64_t input_set = I40E_INSET_NONE;
-	uint16_t frag_off;
 	enum rte_flow_item_type item_type;
 	enum rte_flow_item_type next_type;
 	enum rte_flow_item_type l3 = RTE_FLOW_ITEM_TYPE_END;
@@ -2472,7 +2471,7 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 	memset(len_arr, 0, sizeof(len_arr));
 	filter->input.flow_ext.customized_pctype = false;
 	for (; item->type != RTE_FLOW_ITEM_TYPE_END; item++) {
-		if (item->last) {
+		if (item->last && item->type != RTE_FLOW_ITEM_TYPE_IPV4) {
 			rte_flow_error_set(error, EINVAL,
 					   RTE_FLOW_ERROR_TYPE_ITEM,
 					   item,
@@ -2611,15 +2610,40 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 			l3 = RTE_FLOW_ITEM_TYPE_IPV4;
 			ipv4_spec = item->spec;
 			ipv4_mask = item->mask;
+			ipv4_last = item->last;
 			pctype = I40E_FILTER_PCTYPE_NONF_IPV4_OTHER;
 			layer_idx = I40E_FLXPLD_L3_IDX;
 
+			if (ipv4_last) {
+				if (!ipv4_spec || !ipv4_mask || !outer_ip) {
+					rte_flow_error_set(error, EINVAL,
+						RTE_FLOW_ERROR_TYPE_ITEM,
+						item,
+						"Not support range");
+					return -rte_errno;
+				}
+				/* Only fragment_offset supports range */
+				if (ipv4_last->hdr.version_ihl ||
+				    ipv4_last->hdr.type_of_service ||
+				    ipv4_last->hdr.total_length ||
+				    ipv4_last->hdr.packet_id ||
+				    ipv4_last->hdr.time_to_live ||
+				    ipv4_last->hdr.next_proto_id ||
+				    ipv4_last->hdr.hdr_checksum ||
+				    ipv4_last->hdr.src_addr ||
+				    ipv4_last->hdr.dst_addr) {
+					rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Not support range");
+					return -rte_errno;
+				}
+			}
 			if (ipv4_spec && ipv4_mask && outer_ip) {
 				/* Check IPv4 mask and update input set */
 				if (ipv4_mask->hdr.version_ihl ||
 				    ipv4_mask->hdr.total_length ||
 				    ipv4_mask->hdr.packet_id ||
-				    ipv4_mask->hdr.fragment_offset ||
 				    ipv4_mask->hdr.hdr_checksum) {
 					rte_flow_error_set(error, EINVAL,
 						   RTE_FLOW_ERROR_TYPE_ITEM,
@@ -2640,11 +2664,56 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 					input_set |= I40E_INSET_IPV4_PROTO;
 
 				/* Check if it is fragment. */
-				frag_off = ipv4_spec->hdr.fragment_offset;
-				frag_off = rte_be_to_cpu_16(frag_off);
-				if (frag_off & RTE_IPV4_HDR_OFFSET_MASK ||
-				    frag_off & RTE_IPV4_HDR_MF_FLAG)
-					pctype = I40E_FILTER_PCTYPE_FRAG_IPV4;
+				uint16_t frag_mask =
+					ipv4_mask->hdr.fragment_offset;
+				uint16_t frag_spec =
+					ipv4_spec->hdr.fragment_offset;
+				uint16_t frag_last = 0;
+				if (ipv4_last)
+					frag_last =
+					ipv4_last->hdr.fragment_offset;
+				if (frag_mask) {
+					frag_mask = rte_be_to_cpu_16(frag_mask);
+					frag_spec = rte_be_to_cpu_16(frag_spec);
+					frag_last = rte_be_to_cpu_16(frag_last);
+					/* frag_off mask has to be 0x3fff */
+					if (frag_mask !=
+					    (RTE_IPV4_HDR_OFFSET_MASK |
+					    RTE_IPV4_HDR_MF_FLAG)) {
+						rte_flow_error_set(error,
+						   EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid IPv4 fragment_offset mask");
+						return -rte_errno;
+					}
+					/*
+					 * non-frag rule:
+					 * mask=0x3fff,spec=0
+					 * frag rule:
+					 * mask=0x3fff,spec=0x8,last=0x2000
+					 */
+					if (frag_spec ==
+					    (1 << RTE_IPV4_HDR_FO_SHIFT) &&
+					    frag_last == RTE_IPV4_HDR_MF_FLAG) {
+						pctype =
+						  I40E_FILTER_PCTYPE_FRAG_IPV4;
+					} else if (frag_spec || frag_last) {
+						rte_flow_error_set(error,
+						   EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid IPv4 fragment_offset rule");
+						return -rte_errno;
+					}
+				} else if (frag_spec || frag_last) {
+					rte_flow_error_set(error,
+						EINVAL,
+						RTE_FLOW_ERROR_TYPE_ITEM,
+						item,
+						"Invalid fragment_offset");
+					return -rte_errno;
+				}
 
 				if (input_set & (I40E_INSET_DMAC | I40E_INSET_SMAC)) {
 					if (input_set & (I40E_INSET_IPV4_SRC |
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.728231900 +0800
+++ 0041-net-i40e-fix-IPv4-fragment-offload.patch	2021-05-10 23:59:26.380000000 +0800
@@ -1 +1 @@
-From 10127dbacf7c041a1b67b9e962635b31184bd604 Mon Sep 17 00:00:00 2001
+From d0de930b7b5cd26106ad1660628283acf20af2b3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 10127dbacf7c041a1b67b9e962635b31184bd604 ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 4d44282312..3e514d5f38 100644
+index bbd666b7a0..5bef8c76a7 100644

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

* [dpdk-stable] patch 'net/mlx5: fix Rx segmented packets on mbuf starvation' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (38 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/i40e: fix IPv4 fragment offload' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/octeontx2: fix VLAN filter' " Xueming Li
                   ` (187 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Jiawei Zhu; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6f1a03c53ef11381577d7f9c8216c9ec4da7fb63

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6f1a03c53ef11381577d7f9c8216c9ec4da7fb63 Mon Sep 17 00:00:00 2001
From: Jiawei Zhu <zhujiawei12@huawei.com>
Date: Mon, 1 Mar 2021 12:19:50 -0500
Subject: [PATCH] net/mlx5: fix Rx segmented packets on mbuf starvation
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit c9678e49feef4e423ebd917c7670fee238f4c2bb ]

The issue occurred if mbuf starvation happened
in the middle of segmented packet reception.
In such a situation, after release the segments of
packet being received, code did not advance the
consumer index to the next stride. This caused
the receiving of the wrong segmented packet data.

The possible error scenario:
- we assume segs_n is 4 and we are receiving 4
  segments of multi-segment packet.
- we fail to allocate mbuf while receiving the 3rd segment,
  and this frees the mbufs of the packet chain we have built.
  There are the 1st and 2nd segments in the chain.
- the 1st and the 2nd segments of this stride of Rx queue
  are filled up (in elts array) with the new allocated
  mbufs and their data are random (the 3rd and 4th
  segments still contain the valid data of the packet though).
- on the next iteration of stride processing we get
  the wrong two segments of the multi-segment packet.

Hence, we should skip these mbufs in the stride and
we should advance the consumer index on loop exit.

Fixes: 15a756b63734 ("net/mlx5: fix possible NULL dereference in Rx path")

Signed-off-by: Jiawei Zhu <zhujiawei12@huawei.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index d12d746c2f..fac823ba64 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1430,6 +1430,9 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 				rte_mbuf_raw_free(pkt);
 				pkt = rep;
 			}
+			rq_ci >>= sges_n;
+			++rq_ci;
+			rq_ci <<= sges_n;
 			break;
 		}
 		if (!pkt) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.754244800 +0800
+++ 0042-net-mlx5-fix-Rx-segmented-packets-on-mbuf-starvation.patch	2021-05-10 23:59:26.380000000 +0800
@@ -1 +1 @@
-From c9678e49feef4e423ebd917c7670fee238f4c2bb Mon Sep 17 00:00:00 2001
+From 6f1a03c53ef11381577d7f9c8216c9ec4da7fb63 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit c9678e49feef4e423ebd917c7670fee238f4c2bb ]
@@ -30 +32,0 @@
-Cc: stable@dpdk.org
@@ -39 +41 @@
-index 2e4b87c3e5..e3ce9fd224 100644
+index d12d746c2f..fac823ba64 100644
@@ -42 +44 @@
-@@ -1480,6 +1480,9 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
+@@ -1430,6 +1430,9 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)

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

* [dpdk-stable] patch 'net/octeontx2: fix VLAN filter' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (39 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/mlx5: fix Rx segmented packets on mbuf starvation' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'build: exclude meson files from examples installation' " Xueming Li
                   ` (186 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Satheesh Paul; +Cc: Luca Boccassi, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b66b37a2b5305fa4a601c8a1829a51d19f368163

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b66b37a2b5305fa4a601c8a1829a51d19f368163 Mon Sep 17 00:00:00 2001
From: Satheesh Paul <psatheesh@marvell.com>
Date: Tue, 9 Feb 2021 15:31:13 +0530
Subject: [PATCH] net/octeontx2: fix VLAN filter
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit c8238116ece889fe356c54930bca791091ab1938 ]

This patch fixes incorrect MCAM key preparation when creating
MCAM entry to allow VLAN IDs after vlan filtering is enabled on port.

Fixes: ba1b3b081edf ("net/octeontx2: support VLAN offloads")

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/net/octeontx2/otx2_vlan.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/octeontx2/otx2_vlan.c b/drivers/net/octeontx2/otx2_vlan.c
index 7357b06695..f5161e17a1 100644
--- a/drivers/net/octeontx2/otx2_vlan.c
+++ b/drivers/net/octeontx2/otx2_vlan.c
@@ -306,12 +306,12 @@ nix_vlan_mcam_config(struct rte_eth_dev *eth_dev,
 			(0xF & ~(NPC_LT_LB_CTAG ^ NPC_LT_LB_STAG_QINQ))
 							<< mkex->lb_lt_offset;
 
-		mcam_data = ((uint32_t)vlan_id << 16);
-		mcam_mask = (BIT_ULL(16) - 1) << 16;
+		mcam_data = (uint16_t)vlan_id;
+		mcam_mask = (BIT_ULL(16) - 1);
 		otx2_mbox_memcpy(key_data + mkex->lb_xtract.key_off,
-				     &mcam_data, mkex->lb_xtract.len + 1);
+				     &mcam_data, mkex->lb_xtract.len);
 		otx2_mbox_memcpy(key_mask + mkex->lb_xtract.key_off,
-				     &mcam_mask, mkex->lb_xtract.len + 1);
+				     &mcam_mask, mkex->lb_xtract.len);
 	}
 
 	/* Adds LB STAG flag to MCAM KW */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.781918600 +0800
+++ 0043-net-octeontx2-fix-VLAN-filter.patch	2021-05-10 23:59:26.380000000 +0800
@@ -1 +1 @@
-From c8238116ece889fe356c54930bca791091ab1938 Mon Sep 17 00:00:00 2001
+From b66b37a2b5305fa4a601c8a1829a51d19f368163 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit c8238116ece889fe356c54930bca791091ab1938 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'build: exclude meson files from examples installation' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (40 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/octeontx2: fix VLAN filter' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'log/linux: make default output stderr' " Xueming Li
                   ` (185 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f59f4e98e4981473bfb8a1922a9753b25141d4d5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f59f4e98e4981473bfb8a1922a9753b25141d4d5 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Fri, 12 Mar 2021 14:56:05 +0000
Subject: [PATCH] build: exclude meson files from examples installation
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 5d20515e0c260377fcd23fab785070c4391cc59d ]

The meson.build files in each example directory is simply to support
building the example as part of the main SDK build, and these should not
be installed with the example's source code and makefile. The exclude of
"meson.build" only filters out the top-level examples/meson.build file,
not the file in each subdirectory.

To fix this, we can build up the list of files to exclude based off the
list of all examples. With this change "find examples/ -name meson.build"
returns no hits when run on an installed instance.

Fixes: e5b95003f1df ("examples: fix flattening directory layout on install")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/meson.build | 6 ++++++
 meson.build          | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/examples/meson.build b/examples/meson.build
index b9ab24223f..3fe08d4ca5 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -48,6 +48,12 @@ all_examples = [
 	'vmdq', 'vmdq_dcb',
 ]
 
+# on install, skip copying all meson.build files
+ex_file_excludes = ['meson.build']
+foreach ex:all_examples
+	ex_file_excludes += [ex + '/meson.build']
+endforeach
+
 if get_option('examples') == ''
 	subdir_done()
 endif
diff --git a/meson.build b/meson.build
index 45d974cd2c..8e051f7f4e 100644
--- a/meson.build
+++ b/meson.build
@@ -61,7 +61,7 @@ subdir('doc')
 subdir('examples')
 install_subdir('examples',
 	install_dir: get_option('datadir') + '/dpdk',
-	exclude_files: 'meson.build')
+	exclude_files: ex_file_excludes)
 
 # build kernel modules if enabled
 if get_option('enable_kmods')
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.806503100 +0800
+++ 0044-build-exclude-meson-files-from-examples-installation.patch	2021-05-10 23:59:26.390000000 +0800
@@ -1 +1 @@
-From 5d20515e0c260377fcd23fab785070c4391cc59d Mon Sep 17 00:00:00 2001
+From f59f4e98e4981473bfb8a1922a9753b25141d4d5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 5d20515e0c260377fcd23fab785070c4391cc59d ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -43 +45 @@
-index fcc4d4c900..7778e18200 100644
+index 45d974cd2c..8e051f7f4e 100644

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

* [dpdk-stable] patch 'log/linux: make default output stderr' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (41 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'build: exclude meson files from examples installation' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'eal/windows: add missing SPDX license tag' " Xueming Li
                   ` (184 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Luca Boccassi, Alexandre Ferrieux, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d43987787c0257694974864963d8b420ee4f89dd

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d43987787c0257694974864963d8b420ee4f89dd Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 9 Feb 2021 15:06:20 +0000
Subject: [PATCH] log/linux: make default output stderr
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 5988725d0efeb7021670986aafeb3ff3d87839e1 ]

In Linux by default DPDK log goes to stdout, as well as syslog.

It is possible for an application to change the library output stream
via 'rte_openlog_stream()' API, to set it to stderr, it can be used as:
rte_openlog_stream(stderr);

But still updating the default log output to 'stderr'.

Bugzilla ID: 8
Fixes: af75078fece3 ("first public release")

Reported-by: Alexandre Ferrieux <alexandre.ferrieux@orange.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/linux/eal_log.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/librte_eal/linux/eal_log.c b/lib/librte_eal/linux/eal_log.c
index 43c8460bfb..2095df74c5 100644
--- a/lib/librte_eal/linux/eal_log.c
+++ b/lib/librte_eal/linux/eal_log.c
@@ -27,9 +27,9 @@ console_log_write(__rte_unused void *c, const char *buf, size_t size)
 {
 	ssize_t ret;
 
-	/* write on stdout */
-	ret = fwrite(buf, 1, size, stdout);
-	fflush(stdout);
+	/* write on stderr */
+	ret = fwrite(buf, 1, size, stderr);
+	fflush(stderr);
 
 	/* Syslog error levels are from 0 to 7, so subtract 1 to convert */
 	syslog(rte_log_cur_msg_loglevel() - 1, "%.*s", (int)size, buf);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.829381300 +0800
+++ 0045-log-linux-make-default-output-stderr.patch	2021-05-10 23:59:26.390000000 +0800
@@ -1 +1 @@
-From 5988725d0efeb7021670986aafeb3ff3d87839e1 Mon Sep 17 00:00:00 2001
+From d43987787c0257694974864963d8b420ee4f89dd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 5988725d0efeb7021670986aafeb3ff3d87839e1 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'eal/windows: add missing SPDX license tag' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (42 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'log/linux: make default output stderr' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'eal/windows: fix default thread priority' " Xueming Li
                   ` (183 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Dmitry Kozlyuk
  Cc: Luca Boccassi, Stephen Hemminger, Nick Connolly, Ranjit Menon,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/87af5c7023060a70f7efd4ce74224a68bd0fb710

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 87af5c7023060a70f7efd4ce74224a68bd0fb710 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Sat, 27 Feb 2021 23:32:01 +0300
Subject: [PATCH] eal/windows: add missing SPDX license tag
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit e863fe3a13da89787fdf3b5c590101a3c0f10af6 ]

Fixes: c08bd191b13d ("eal/windows: initialize hugepage info")

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Nick Connolly <nick.connolly@mayadata.io>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
---
 lib/librte_eal/windows/eal_hugepages.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_eal/windows/eal_hugepages.c b/lib/librte_eal/windows/eal_hugepages.c
index 44dae985e5..83a3d0ffc6 100644
--- a/lib/librte_eal/windows/eal_hugepages.c
+++ b/lib/librte_eal/windows/eal_hugepages.c
@@ -1,3 +1,7 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2020 Dmitry Kozlyuk
+ */
+
 #include <rte_errno.h>
 #include <rte_log.h>
 #include <rte_memory.h>
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.851504300 +0800
+++ 0046-eal-windows-add-missing-SPDX-license-tag.patch	2021-05-10 23:59:26.390000000 +0800
@@ -1 +1 @@
-From e863fe3a13da89787fdf3b5c590101a3c0f10af6 Mon Sep 17 00:00:00 2001
+From 87af5c7023060a70f7efd4ce74224a68bd0fb710 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit e863fe3a13da89787fdf3b5c590101a3c0f10af6 ]
@@ -7 +9,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'eal/windows: fix default thread priority' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (43 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'eal/windows: add missing SPDX license tag' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'bus/pci: skip probing some Windows NDIS devices' " Xueming Li
                   ` (182 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Tal Shnaiderman; +Cc: Luca Boccassi, Odi Assli, Dmitry Kozlyuk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d68bec0b176c41aac146c1a943f6a324fcbf8ad6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d68bec0b176c41aac146c1a943f6a324fcbf8ad6 Mon Sep 17 00:00:00 2001
From: Tal Shnaiderman <talshn@nvidia.com>
Date: Thu, 18 Feb 2021 13:40:58 +0200
Subject: [PATCH] eal/windows: fix default thread priority
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 16afcbfa30e9c2831264fb349457a4228fa687c8 ]

The hard-coded thread priority for Windows threads in EAL
is REALTIME_PRIORITY_CLASS/THREAD_PRIORITY_TIME_CRITICAL.

This results in issues with DPDK threads causing OS thread starvation
and eventually a bugcheck.

The fix reduce the thread priority to
NORMAL_PRIORITY_CLASS/THREAD_PRIORITY_NORMAL.

Bugzilla ID: 600
Fixes: 53ffd9f080f ("eal/windows: add minimum viable code")

Reported-by: Odi Assli <odia@nvidia.com>
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 lib/librte_eal/windows/eal_thread.c      | 4 ++--
 lib/librte_eal/windows/include/pthread.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/windows/eal_thread.c b/lib/librte_eal/windows/eal_thread.c
index 908e726d16..9c3f6d69fd 100644
--- a/lib/librte_eal/windows/eal_thread.c
+++ b/lib/librte_eal/windows/eal_thread.c
@@ -134,8 +134,8 @@ eal_thread_create(pthread_t *thread)
 	if (!th)
 		return -1;
 
-	SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS);
-	SetThreadPriority(th, THREAD_PRIORITY_TIME_CRITICAL);
+	SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS);
+	SetThreadPriority(th, THREAD_PRIORITY_NORMAL);
 
 	return 0;
 }
diff --git a/lib/librte_eal/windows/include/pthread.h b/lib/librte_eal/windows/include/pthread.h
index fb11a07ce6..9aeab1fa70 100644
--- a/lib/librte_eal/windows/include/pthread.h
+++ b/lib/librte_eal/windows/include/pthread.h
@@ -137,8 +137,8 @@ pthread_create(void *threadid, const void *threadattr, void *threadfunc,
 	hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)threadfunc,
 		args, 0, (LPDWORD)threadid);
 	if (hThread) {
-		SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS);
-		SetThreadPriority(hThread, THREAD_PRIORITY_TIME_CRITICAL);
+		SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS);
+		SetThreadPriority(hThread, THREAD_PRIORITY_NORMAL);
 	}
 	return ((hThread != NULL) ? 0 : E_FAIL);
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.874876400 +0800
+++ 0047-eal-windows-fix-default-thread-priority.patch	2021-05-10 23:59:26.390000000 +0800
@@ -1 +1 @@
-From 16afcbfa30e9c2831264fb349457a4228fa687c8 Mon Sep 17 00:00:00 2001
+From d68bec0b176c41aac146c1a943f6a324fcbf8ad6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 16afcbfa30e9c2831264fb349457a4228fa687c8 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'bus/pci: skip probing some Windows NDIS devices' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (44 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'eal/windows: fix default thread priority' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'bus/pci: fix Windows kernel driver categories' " Xueming Li
                   ` (181 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Pallavi Kadam
  Cc: Luca Boccassi, Dmitry Kozlyuk, Ranjit Menon, Tal Shnaiderman,
	Narcisa Vasile, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/75c0d71c9f47c541375815b9b02d9185e32b10e1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 75c0d71c9f47c541375815b9b02d9185e32b10e1 Mon Sep 17 00:00:00 2001
From: Pallavi Kadam <pallavi.kadam@intel.com>
Date: Wed, 10 Feb 2021 12:36:54 -0800
Subject: [PATCH] bus/pci: skip probing some Windows NDIS devices
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit de04405b336ed01e234db39fc211b4592b79c2b3 ]

Implement rte_pci_map_device() to distinguish between the devices bound
to netuio and NDIS devices.
Only return success for the netuio devices.

Fixes: c76ec01b4591 ("bus/pci: support netuio on Windows")

Suggested-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>
Tested-by: Narcisa Vasile <navasile@linux.microsoft.com>
---
 drivers/bus/pci/windows/pci.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c
index f662584528..00e7849b05 100644
--- a/drivers/bus/pci/windows/pci.c
+++ b/drivers/bus/pci/windows/pci.c
@@ -23,20 +23,22 @@ DEFINE_DEVPROPKEY(DEVPKEY_Device_Numa_Node, 0x540b947e, 0x8b40, 0x45bc,
  * the registry hive for PCI devices.
  */
 
-/* The functions below are not implemented on Windows,
+/* Some of the functions below are not implemented on Windows,
  * but need to be defined for compilation purposes
  */
 
 /* Map pci device */
 int
-rte_pci_map_device(struct rte_pci_device *dev __rte_unused)
+rte_pci_map_device(struct rte_pci_device *dev)
 {
-	/* This function is not implemented on Windows.
-	 * We really should short-circuit the call to these functions by
-	 * clearing the RTE_PCI_DRV_NEED_MAPPING flag
-	 * in the rte_pci_driver flags.
+	/* Only return success for devices bound to netuio.
+	 * Devices that are bound to netuio are mapped at
+	 * the bus probing stage.
 	 */
-	return 0;
+	if (dev->kdrv == RTE_PCI_KDRV_NIC_UIO)
+		return 0;
+	else
+		return -1;
 }
 
 /* Unmap pci device */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.897172400 +0800
+++ 0048-bus-pci-skip-probing-some-Windows-NDIS-devices.patch	2021-05-10 23:59:26.390000000 +0800
@@ -1 +1 @@
-From de04405b336ed01e234db39fc211b4592b79c2b3 Mon Sep 17 00:00:00 2001
+From 75c0d71c9f47c541375815b9b02d9185e32b10e1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit de04405b336ed01e234db39fc211b4592b79c2b3 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'bus/pci: fix Windows kernel driver categories' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (45 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'bus/pci: skip probing some Windows NDIS devices' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net: fix comment in IPv6 header' " Xueming Li
                   ` (180 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Luca Boccassi, Dmitry Kozlyuk, Tal Shnaiderman, Ranjit Menon,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a7e79f5d2c09aa51a4826d583e908db3f8340eb6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a7e79f5d2c09aa51a4826d583e908db3f8340eb6 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Tue, 16 Mar 2021 23:09:38 +0100
Subject: [PATCH] bus/pci: fix Windows kernel driver categories
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 41e026c1b3fd07ee6520e3d5d4ec0787d0dac300 ]

In Windows probing, the value RTE_PCI_KDRV_NONE was used
instead of RTE_PCI_KDRV_UNKNOWN.
This value covers the mlx case where the kernel driver is in place,
offering a bifurcated mode to the userspace driver.
When the kernel driver is listed as unknown,
there is no special treatment in DPDK probing, contrary to UIO modes.

The value RTE_PCI_KDRV_NIC_UIO (FreeBSD) was re-used
instead of having a new RTE_PCI_KDRV_NET_UIO for Windows NetUIO.
While adding the new value RTE_PCI_KDRV_NET_UIO
(at the end for ABI compatibility),
the enum of kernel driver categories is annotated.

Fixes: b762221ac24f ("bus/pci: support Windows with bifurcated drivers")
Fixes: c76ec01b4591 ("bus/pci: support netuio on Windows")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
---
 drivers/bus/pci/rte_bus_pci.h | 13 +++++++------
 drivers/bus/pci/windows/pci.c | 14 +++++++-------
 2 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/drivers/bus/pci/rte_bus_pci.h b/drivers/bus/pci/rte_bus_pci.h
index fdda046515..876abddefb 100644
--- a/drivers/bus/pci/rte_bus_pci.h
+++ b/drivers/bus/pci/rte_bus_pci.h
@@ -52,12 +52,13 @@ TAILQ_HEAD(rte_pci_driver_list, rte_pci_driver);
 struct rte_devargs;
 
 enum rte_pci_kernel_driver {
-	RTE_PCI_KDRV_UNKNOWN = 0,
-	RTE_PCI_KDRV_IGB_UIO,
-	RTE_PCI_KDRV_VFIO,
-	RTE_PCI_KDRV_UIO_GENERIC,
-	RTE_PCI_KDRV_NIC_UIO,
-	RTE_PCI_KDRV_NONE,
+	RTE_PCI_KDRV_UNKNOWN = 0,  /* may be misc UIO or bifurcated driver */
+	RTE_PCI_KDRV_IGB_UIO,      /* igb_uio for Linux */
+	RTE_PCI_KDRV_VFIO,         /* VFIO for Linux */
+	RTE_PCI_KDRV_UIO_GENERIC,  /* uio_pci_generic for Linux */
+	RTE_PCI_KDRV_NIC_UIO,      /* nic_uio for FreeBSD */
+	RTE_PCI_KDRV_NONE,         /* no attached driver */
+	RTE_PCI_KDRV_NET_UIO,      /* NetUIO for Windows */
 };
 
 /**
diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c
index 00e7849b05..ad9d65efd8 100644
--- a/drivers/bus/pci/windows/pci.c
+++ b/drivers/bus/pci/windows/pci.c
@@ -35,7 +35,7 @@ rte_pci_map_device(struct rte_pci_device *dev)
 	 * Devices that are bound to netuio are mapped at
 	 * the bus probing stage.
 	 */
-	if (dev->kdrv == RTE_PCI_KDRV_NIC_UIO)
+	if (dev->kdrv == RTE_PCI_KDRV_NET_UIO)
 		return 0;
 	else
 		return -1;
@@ -204,14 +204,14 @@ get_device_resource_info(HDEVINFO dev_info,
 	int ret;
 
 	switch (dev->kdrv) {
-	case RTE_PCI_KDRV_NONE:
-		/* mem_resource - Unneeded for RTE_PCI_KDRV_NONE */
+	case RTE_PCI_KDRV_UNKNOWN:
+		/* bifurcated driver case - mem_resource is unneeded */
 		dev->mem_resource[0].phys_addr = 0;
 		dev->mem_resource[0].len = 0;
 		dev->mem_resource[0].addr = NULL;
 		break;
-	case RTE_PCI_KDRV_NIC_UIO:
-		/* get device info from netuio kernel driver */
+	case RTE_PCI_KDRV_NET_UIO:
+		/* get device info from NetUIO kernel driver */
 		ret = get_netuio_device_info(dev_info, dev_info_data, dev);
 		if (ret != 0) {
 			RTE_LOG(DEBUG, EAL,
@@ -302,9 +302,9 @@ set_kernel_driver_type(PSP_DEVINFO_DATA device_info_data,
 {
 	/* set kernel driver type based on device class */
 	if (IsEqualGUID(&(device_info_data->ClassGuid), &GUID_DEVCLASS_NETUIO))
-		dev->kdrv = RTE_PCI_KDRV_NIC_UIO;
+		dev->kdrv = RTE_PCI_KDRV_NET_UIO;
 	else
-		dev->kdrv = RTE_PCI_KDRV_NONE;
+		dev->kdrv = RTE_PCI_KDRV_UNKNOWN;
 }
 
 static int
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.919961300 +0800
+++ 0049-bus-pci-fix-Windows-kernel-driver-categories.patch	2021-05-10 23:59:26.390000000 +0800
@@ -1 +1 @@
-From 41e026c1b3fd07ee6520e3d5d4ec0787d0dac300 Mon Sep 17 00:00:00 2001
+From a7e79f5d2c09aa51a4826d583e908db3f8340eb6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 41e026c1b3fd07ee6520e3d5d4ec0787d0dac300 ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -57 +59 @@
-index 8f906097f4..d39a7748b8 100644
+index 00e7849b05..ad9d65efd8 100644
@@ -60 +62 @@
-@@ -38,7 +38,7 @@ rte_pci_map_device(struct rte_pci_device *dev)
+@@ -35,7 +35,7 @@ rte_pci_map_device(struct rte_pci_device *dev)
@@ -69 +71 @@
-@@ -207,14 +207,14 @@ get_device_resource_info(HDEVINFO dev_info,
+@@ -204,14 +204,14 @@ get_device_resource_info(HDEVINFO dev_info,
@@ -88 +90 @@
-@@ -323,9 +323,9 @@ set_kernel_driver_type(PSP_DEVINFO_DATA device_info_data,
+@@ -302,9 +302,9 @@ set_kernel_driver_type(PSP_DEVINFO_DATA device_info_data,

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

* [dpdk-stable] patch 'net: fix comment in IPv6 header' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (46 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'bus/pci: fix Windows kernel driver categories' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/bnxt: remove unused macro' " Xueming Li
                   ` (179 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Ivan Malov; +Cc: Luca Boccassi, Andrew Rybchenko, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7c078fd0e9edbe5b196b8e3963aad9862776cef0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7c078fd0e9edbe5b196b8e3963aad9862776cef0 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Mon, 8 Mar 2021 09:51:04 +0300
Subject: [PATCH] net: fix comment in IPv6 header
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 24f8b2d896328785038400046773a1e412360627 ]

The comment got it wrong. The payload length field
does not include the fixed IPv6 header size.

Fixes: 7eca7f7fd09d ("net: add missing endianness annotations")
Fixes: af75078fece3 ("first public release")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_net/rte_ip.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
index 212ff2c4fd..b59c4d67a3 100644
--- a/lib/librte_net/rte_ip.h
+++ b/lib/librte_net/rte_ip.h
@@ -384,7 +384,7 @@ rte_ipv4_udptcp_cksum(const struct rte_ipv4_hdr *ipv4_hdr, const void *l4_hdr)
  */
 struct rte_ipv6_hdr {
 	rte_be32_t vtc_flow;	/**< IP version, traffic class & flow label. */
-	rte_be16_t payload_len;	/**< IP packet length - includes header size */
+	rte_be16_t payload_len;	/**< IP payload size, including ext. headers */
 	uint8_t  proto;		/**< Protocol, next header. */
 	uint8_t  hop_limits;	/**< Hop limits. */
 	uint8_t  src_addr[16];	/**< IP address of source host. */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.942235300 +0800
+++ 0050-net-fix-comment-in-IPv6-header.patch	2021-05-10 23:59:26.390000000 +0800
@@ -1 +1 @@
-From 24f8b2d896328785038400046773a1e412360627 Mon Sep 17 00:00:00 2001
+From 7c078fd0e9edbe5b196b8e3963aad9862776cef0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 24f8b2d896328785038400046773a1e412360627 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/bnxt: remove unused macro' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (47 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net: fix comment in IPv6 header' " Xueming Li
@ 2021-05-10 15:59 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix VNIC configuration' " Xueming Li
                   ` (178 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 15:59 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Luca Boccassi, Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/262c0649f5290cc9acb813b739f69538604c6997

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 262c0649f5290cc9acb813b739f69538604c6997 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 24 Feb 2021 21:25:43 +0530
Subject: [PATCH] net/bnxt: remove unused macro
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit a7bc5e04be47f4d0850a83bec971fcec2785fee4 ]

remove HWRM_SEQ_ID_INVALID macro.

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

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_hwrm.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index 23ca6ab515..c2bcb7dd63 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -14,7 +14,6 @@ struct bnxt_filter_info;
 struct bnxt_cp_ring_info;
 struct hwrm_func_qstats_output;
 
-#define HWRM_SEQ_ID_INVALID -1U
 /* Convert Bit field location to value */
 #define ASYNC_CMPL_EVENT_ID_LINK_STATUS_CHANGE	\
 	(1 << HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.964029500 +0800
+++ 0051-net-bnxt-remove-unused-macro.patch	2021-05-10 23:59:26.390000000 +0800
@@ -1 +1 @@
-From a7bc5e04be47f4d0850a83bec971fcec2785fee4 Mon Sep 17 00:00:00 2001
+From 262c0649f5290cc9acb813b739f69538604c6997 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit a7bc5e04be47f4d0850a83bec971fcec2785fee4 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index a9d9fcb294..449cb911e5 100644
+index 23ca6ab515..c2bcb7dd63 100644

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

* [dpdk-stable] patch 'net/bnxt: fix VNIC configuration' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (48 preceding siblings ...)
  2021-05-10 15:59 ` [dpdk-stable] patch 'net/bnxt: remove unused macro' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix queues per VNIC' " Xueming Li
                   ` (177 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Luca Boccassi, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/74451465f7baf3f25f8018dca59c07dea30b1f87

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 74451465f7baf3f25f8018dca59c07dea30b1f87 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 24 Feb 2021 21:25:44 +0530
Subject: [PATCH] net/bnxt: fix VNIC configuration
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit fc886d04bcf49ce2c623cfbbf3d4991aef5fb8ce ]

PMD should not set any flags to receive RoCE traffic while
configuring the vnic. Since the PMD does not support RoCE
some of the flags and code is unused. Clean it up.

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

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_hwrm.c | 10 ----------
 drivers/net/bnxt/bnxt_vnic.h |  2 --
 2 files changed, 12 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 344895843b..3dce024744 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1999,12 +1999,6 @@ config_mru:
 	if (vnic->bd_stall)
 		req.flags |=
 		    rte_cpu_to_le_32(HWRM_VNIC_CFG_INPUT_FLAGS_BD_STALL_MODE);
-	if (vnic->roce_dual)
-		req.flags |= rte_cpu_to_le_32(
-			HWRM_VNIC_QCFG_OUTPUT_FLAGS_ROCE_DUAL_VNIC_MODE);
-	if (vnic->roce_only)
-		req.flags |= rte_cpu_to_le_32(
-			HWRM_VNIC_QCFG_OUTPUT_FLAGS_ROCE_ONLY_VNIC_MODE);
 	if (vnic->rss_dflt_cr)
 		req.flags |= rte_cpu_to_le_32(
 			HWRM_VNIC_QCFG_OUTPUT_FLAGS_RSS_DFLT_CR_MODE);
@@ -2052,10 +2046,6 @@ int bnxt_hwrm_vnic_qcfg(struct bnxt *bp, struct bnxt_vnic_info *vnic,
 			HWRM_VNIC_QCFG_OUTPUT_FLAGS_VLAN_STRIP_MODE;
 	vnic->bd_stall = rte_le_to_cpu_32(resp->flags) &
 			HWRM_VNIC_QCFG_OUTPUT_FLAGS_BD_STALL_MODE;
-	vnic->roce_dual = rte_le_to_cpu_32(resp->flags) &
-			HWRM_VNIC_QCFG_OUTPUT_FLAGS_ROCE_DUAL_VNIC_MODE;
-	vnic->roce_only = rte_le_to_cpu_32(resp->flags) &
-			HWRM_VNIC_QCFG_OUTPUT_FLAGS_ROCE_ONLY_VNIC_MODE;
 	vnic->rss_dflt_cr = rte_le_to_cpu_32(resp->flags) &
 			HWRM_VNIC_QCFG_OUTPUT_FLAGS_RSS_DFLT_CR_MODE;
 
diff --git a/drivers/net/bnxt/bnxt_vnic.h b/drivers/net/bnxt/bnxt_vnic.h
index 2a6f05d9e4..f173a02f97 100644
--- a/drivers/net/bnxt/bnxt_vnic.h
+++ b/drivers/net/bnxt/bnxt_vnic.h
@@ -52,8 +52,6 @@ struct bnxt_vnic_info {
 	bool		vlan_strip;
 	bool		func_default;
 	bool		bd_stall;
-	bool		roce_dual;
-	bool		roce_only;
 	bool		rss_dflt_cr;
 
 	STAILQ_HEAD(, bnxt_filter_info)	filter;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:27.987246300 +0800
+++ 0052-net-bnxt-fix-VNIC-configuration.patch	2021-05-10 23:59:26.390000000 +0800
@@ -1 +1 @@
-From fc886d04bcf49ce2c623cfbbf3d4991aef5fb8ce Mon Sep 17 00:00:00 2001
+From 74451465f7baf3f25f8018dca59c07dea30b1f87 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit fc886d04bcf49ce2c623cfbbf3d4991aef5fb8ce ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index cb8baa8776..5366fe72ca 100644
+index 344895843b..3dce024744 100644
@@ -24 +26 @@
-@@ -2013,12 +2013,6 @@ config_mru:
+@@ -1999,12 +1999,6 @@ config_mru:
@@ -37 +39 @@
-@@ -2066,10 +2060,6 @@ int bnxt_hwrm_vnic_qcfg(struct bnxt *bp, struct bnxt_vnic_info *vnic,
+@@ -2052,10 +2046,6 @@ int bnxt_hwrm_vnic_qcfg(struct bnxt *bp, struct bnxt_vnic_info *vnic,
@@ -49 +51 @@
-index 917b909284..00a664c8b8 100644
+index 2a6f05d9e4..f173a02f97 100644

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

* [dpdk-stable] patch 'net/bnxt: fix queues per VNIC' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (49 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix VNIC configuration' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix firmware fatal error handling' " Xueming Li
                   ` (176 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Venkat Duvvuru
  Cc: Luca Boccassi, Somnath Kotur, Kalesh AP, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/86e9785dbda478aab5649df93e59cc3ad9e388f6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 86e9785dbda478aab5649df93e59cc3ad9e388f6 Mon Sep 17 00:00:00 2001
From: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Date: Wed, 24 Feb 2021 21:25:46 +0530
Subject: [PATCH] net/bnxt: fix queues per VNIC
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit c23190303efd6884eaeeda7afe23c2a158f4c1ee ]

Update queues per VNIC in single queue mode.
bp->rx_num_qs_per_vnic is not initialized in the single queue mode.
As a result of this when an interface is reconfigured to single
queue mode from an existing multiqueue mode, bp->rx_num_qs_per_vnic
is not updated to the value of 1. Hence, the driver will try to
access more than one queue resulting in a crash.

This patch fixes it by initializing bp->rx_num_qs_per_vnic in the
single queue mode as well.

Fixes: 36024b2e7fe5 ("net/bnxt: allow dynamic creation of VNIC")

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

diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 8637559370..95a3fc91db 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -106,7 +106,6 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
 
 	pools = RTE_MIN(pools, bp->rx_cp_nr_rings);
 	nb_q_per_grp = bp->rx_cp_nr_rings / pools;
-	bp->rx_num_qs_per_vnic = nb_q_per_grp;
 	PMD_DRV_LOG(DEBUG, "pools = %u nb_q_per_grp = %u\n",
 		    pools, nb_q_per_grp);
 	start_grp_id = 0;
@@ -165,6 +164,8 @@ skip_filter_allocation:
 	}
 
 out:
+	bp->rx_num_qs_per_vnic = nb_q_per_grp;
+
 	if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) {
 		struct rte_eth_rss_conf *rss = &dev_conf->rx_adv_conf.rss_conf;
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.012200600 +0800
+++ 0053-net-bnxt-fix-queues-per-VNIC.patch	2021-05-10 23:59:26.390000000 +0800
@@ -1 +1 @@
-From c23190303efd6884eaeeda7afe23c2a158f4c1ee Mon Sep 17 00:00:00 2001
+From 86e9785dbda478aab5649df93e59cc3ad9e388f6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit c23190303efd6884eaeeda7afe23c2a158f4c1ee ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index f46b10c1c5..53a9b52a46 100644
+index 8637559370..95a3fc91db 100644

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

* [dpdk-stable] patch 'net/bnxt: fix firmware fatal error handling' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (50 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix queues per VNIC' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix FW readiness check during recovery' " Xueming Li
                   ` (175 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Luca Boccassi, Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3fd1f9e8ec81d6469633e7298d119542b129e60d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3fd1f9e8ec81d6469633e7298d119542b129e60d Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 24 Feb 2021 21:25:51 +0530
Subject: [PATCH] net/bnxt: fix firmware fatal error handling
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 94131e4ab74728da994d5179052bb30c3c76910c ]

During some fatal firmware error conditions, the PCI config space
register 0x2e which normally contains the subsystem ID will become
0xffff. This register will revert back to the normal value after
the chip has completed core reset. If we detect this condition,
we can poll this config register immediately for the value to revert.
Because we use config read cycles to poll this register, there is no
possibility of Master Abort if we happen to read it during core reset.
This speeds up recovery significantly as we don't have to wait for the
conservative min_time before polling to see if the firmware has come
out of reset. As soon as this register changes value we can proceed
to re-initialize the device.

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 | 56 ++++++++++++++++++++++++++++++++--
 drivers/net/bnxt/bnxt_util.h   |  2 ++
 2 files changed, 56 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 3aa346d45c..f0de861798 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3682,6 +3682,32 @@ static void bnxt_dev_cleanup(struct bnxt *bp)
 	bnxt_uninit_resources(bp, true);
 }
 
+static int
+bnxt_check_fw_reset_done(struct bnxt *bp)
+{
+	int timeout = bp->fw_reset_max_msecs;
+	uint16_t val = 0;
+	int rc;
+
+	do {
+		rc = rte_pci_read_config(bp->pdev, &val, sizeof(val), PCI_SUBSYSTEM_ID_OFFSET);
+		if (rc < 0) {
+			PMD_DRV_LOG(ERR, "Failed to read PCI offset 0x%x", PCI_SUBSYSTEM_ID_OFFSET);
+			return rc;
+		}
+		if (val != 0xffff)
+			break;
+		rte_delay_ms(1);
+	} while (timeout--);
+
+	if (val == 0xffff) {
+		PMD_DRV_LOG(ERR, "Firmware reset aborted, PCI config space invalid\n");
+		return -1;
+	}
+
+	return 0;
+}
+
 static int bnxt_restore_vlan_filters(struct bnxt *bp)
 {
 	struct rte_eth_dev *dev = bp->eth_dev;
@@ -3778,6 +3804,13 @@ static void bnxt_dev_recover(void *arg)
 	int timeout = bp->fw_reset_max_msecs;
 	int rc = 0;
 
+
+	if (!bp->fw_reset_min_msecs) {
+		rc = bnxt_check_fw_reset_done(bp);
+		if (rc)
+			goto err;
+	}
+
 	/* Clear Error flag so that device re-init should happen */
 	bp->flags &= ~BNXT_FLAG_FATAL_ERROR;
 
@@ -3826,14 +3859,33 @@ err:
 void bnxt_dev_reset_and_resume(void *arg)
 {
 	struct bnxt *bp = arg;
+	uint32_t us = US_PER_MS * bp->fw_reset_min_msecs;
+	uint16_t val = 0;
 	int rc;
 
 	bnxt_dev_cleanup(bp);
 
 	bnxt_wait_for_device_shutdown(bp);
 
-	rc = rte_eal_alarm_set(US_PER_MS * bp->fw_reset_min_msecs,
-			       bnxt_dev_recover, (void *)bp);
+	/* During some fatal firmware error conditions, the PCI config space
+	 * register 0x2e which normally contains the subsystem ID will become
+	 * 0xffff. This register will revert back to the normal value after
+	 * the chip has completed core reset. If we detect this condition,
+	 * we can poll this config register immediately for the value to revert.
+	 */
+	if (bp->flags & BNXT_FLAG_FATAL_ERROR) {
+		rc = rte_pci_read_config(bp->pdev, &val, sizeof(val), PCI_SUBSYSTEM_ID_OFFSET);
+		if (rc < 0) {
+			PMD_DRV_LOG(ERR, "Failed to read PCI offset 0x%x", PCI_SUBSYSTEM_ID_OFFSET);
+			return;
+		}
+		if (val == 0xffff) {
+			bp->fw_reset_min_msecs = 0;
+			us = 1;
+		}
+	}
+
+	rc = rte_eal_alarm_set(us, bnxt_dev_recover, (void *)bp);
 	if (rc)
 		PMD_DRV_LOG(ERR, "Error setting recovery alarm");
 }
diff --git a/drivers/net/bnxt/bnxt_util.h b/drivers/net/bnxt/bnxt_util.h
index a15b3a1a95..68665196c3 100644
--- a/drivers/net/bnxt/bnxt_util.h
+++ b/drivers/net/bnxt/bnxt_util.h
@@ -10,6 +10,8 @@
 #define BIT(n)	(1UL << (n))
 #endif /* BIT */
 
+#define PCI_SUBSYSTEM_ID_OFFSET	0x2e
+
 int bnxt_check_zero_bytes(const uint8_t *bytes, int len);
 void bnxt_eth_hw_addr_random(uint8_t *mac_addr);
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.035049600 +0800
+++ 0054-net-bnxt-fix-firmware-fatal-error-handling.patch	2021-05-10 23:59:26.400000000 +0800
@@ -1 +1 @@
-From 94131e4ab74728da994d5179052bb30c3c76910c Mon Sep 17 00:00:00 2001
+From 3fd1f9e8ec81d6469633e7298d119542b129e60d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 94131e4ab74728da994d5179052bb30c3c76910c ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -30 +32 @@
-index 9e0ec46403..67ff800da5 100644
+index 3aa346d45c..f0de861798 100644
@@ -33 +35 @@
-@@ -3743,6 +3743,32 @@ static void bnxt_dev_cleanup(struct bnxt *bp)
+@@ -3682,6 +3682,32 @@ static void bnxt_dev_cleanup(struct bnxt *bp)
@@ -66 +68,2 @@
-@@ -3840,6 +3866,13 @@ static void bnxt_dev_recover(void *arg)
+@@ -3778,6 +3804,13 @@ static void bnxt_dev_recover(void *arg)
+ 	int timeout = bp->fw_reset_max_msecs;
@@ -69 +71,0 @@
- 	pthread_mutex_lock(&bp->err_recovery_lock);
@@ -80 +82 @@
-@@ -3891,14 +3924,33 @@ err:
+@@ -3826,14 +3859,33 @@ err:
@@ -117 +119 @@
-index 8de55e1038..64e97eed15 100644
+index a15b3a1a95..68665196c3 100644

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

* [dpdk-stable] patch 'net/bnxt: fix FW readiness check during recovery' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (51 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix firmware fatal error handling' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix device readiness check' " Xueming Li
                   ` (174 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Luca Boccassi, Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2d5c16160536ea53e820a758a71b6e3150d97f45

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2d5c16160536ea53e820a758a71b6e3150d97f45 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 24 Feb 2021 21:25:52 +0530
Subject: [PATCH] net/bnxt: fix FW readiness check during recovery
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 6a4f7139cbce7345e45d9e75d4e28ad1b1218486 ]

Moved fw readiness check to a new routine bnxt_check_fw_ready().

During error recovery, driver needs to wait for fw readiness.
For that, it uses bnxt_hwrm_ver_get() function now and that
function does parsing of the VER_GET response as well.

Added a new lightweight function bnxt_hwrm_poll_ver_get() for polling
the firmware readiness which issues VER_GET and checks for success
without processing the command response.

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

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_ethdev.c | 33 +++++++++++++++++++++------------
 drivers/net/bnxt/bnxt_hwrm.c   | 23 +++++++++++++++++++++++
 drivers/net/bnxt/bnxt_hwrm.h   |  1 +
 3 files changed, 45 insertions(+), 12 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index f0de861798..f247603edb 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3798,10 +3798,28 @@ static int bnxt_restore_filters(struct bnxt *bp)
 	return ret;
 }
 
+static int bnxt_check_fw_ready(struct bnxt *bp)
+{
+	int timeout = bp->fw_reset_max_msecs;
+	int rc = 0;
+
+	do {
+		rc = bnxt_hwrm_poll_ver_get(bp);
+		if (rc == 0)
+			break;
+		rte_delay_ms(BNXT_FW_READY_WAIT_INTERVAL);
+		timeout -= BNXT_FW_READY_WAIT_INTERVAL;
+	} while (rc && timeout > 0);
+
+	if (rc)
+		PMD_DRV_LOG(ERR, "FW is not Ready after reset\n");
+
+	return rc;
+}
+
 static void bnxt_dev_recover(void *arg)
 {
 	struct bnxt *bp = arg;
-	int timeout = bp->fw_reset_max_msecs;
 	int rc = 0;
 
 
@@ -3814,18 +3832,9 @@ static void bnxt_dev_recover(void *arg)
 	/* Clear Error flag so that device re-init should happen */
 	bp->flags &= ~BNXT_FLAG_FATAL_ERROR;
 
-	do {
-		rc = bnxt_hwrm_ver_get(bp, SHORT_HWRM_CMD_TIMEOUT);
-		if (rc == 0)
-			break;
-		rte_delay_ms(BNXT_FW_READY_WAIT_INTERVAL);
-		timeout -= BNXT_FW_READY_WAIT_INTERVAL;
-	} while (rc && timeout);
-
-	if (rc) {
-		PMD_DRV_LOG(ERR, "FW is not Ready after reset\n");
+	rc = bnxt_check_fw_ready(bp);
+	if (rc)
 		goto err;
-	}
 
 	rc = bnxt_init_resources(bp, true);
 	if (rc) {
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 3dce024744..2477237b39 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -5811,3 +5811,26 @@ int bnxt_hwrm_cfa_pair_free(struct bnxt *bp, struct bnxt_representor *rep_bp)
 		    rep_bp->vf_id);
 	return rc;
 }
+
+
+int bnxt_hwrm_poll_ver_get(struct bnxt *bp)
+{
+	struct hwrm_ver_get_input req = {.req_type = 0 };
+	struct hwrm_ver_get_output *resp = bp->hwrm_cmd_resp_addr;
+	int rc = 0;
+
+	bp->max_req_len = HWRM_MAX_REQ_LEN;
+	bp->hwrm_cmd_timeout = SHORT_HWRM_CMD_TIMEOUT;
+
+	HWRM_PREP(&req, HWRM_VER_GET, BNXT_USE_CHIMP_MB);
+	req.hwrm_intf_maj = HWRM_VERSION_MAJOR;
+	req.hwrm_intf_min = HWRM_VERSION_MINOR;
+	req.hwrm_intf_upd = HWRM_VERSION_UPDATE;
+
+	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
+
+	HWRM_CHECK_RESULT_SILENT();
+	HWRM_UNLOCK();
+
+	return rc;
+}
\ No newline at end of file
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index c2bcb7dd63..11b3b1cea1 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -301,4 +301,5 @@ int bnxt_hwrm_first_vf_id_query(struct bnxt *bp, uint16_t fid,
 				uint16_t *first_vf_id);
 int bnxt_hwrm_cfa_pair_alloc(struct bnxt *bp, struct bnxt_representor *rep);
 int bnxt_hwrm_cfa_pair_free(struct bnxt *bp, struct bnxt_representor *rep);
+int bnxt_hwrm_poll_ver_get(struct bnxt *bp);
 #endif
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.060118000 +0800
+++ 0055-net-bnxt-fix-FW-readiness-check-during-recovery.patch	2021-05-10 23:59:26.400000000 +0800
@@ -1 +1 @@
-From 6a4f7139cbce7345e45d9e75d4e28ad1b1218486 Mon Sep 17 00:00:00 2001
+From 2d5c16160536ea53e820a758a71b6e3150d97f45 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 6a4f7139cbce7345e45d9e75d4e28ad1b1218486 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
- drivers/net/bnxt/bnxt_hwrm.c   | 22 ++++++++++++++++++++++
+ drivers/net/bnxt/bnxt_hwrm.c   | 23 +++++++++++++++++++++++
@@ -26 +28 @@
- 3 files changed, 44 insertions(+), 12 deletions(-)
+ 3 files changed, 45 insertions(+), 12 deletions(-)
@@ -29 +31 @@
-index 67ff800da5..af146451a5 100644
+index f0de861798..f247603edb 100644
@@ -32 +34 @@
-@@ -3859,10 +3859,28 @@ static int bnxt_restore_filters(struct bnxt *bp)
+@@ -3798,10 +3798,28 @@ static int bnxt_restore_filters(struct bnxt *bp)
@@ -61,2 +63,2 @@
- 	pthread_mutex_lock(&bp->err_recovery_lock);
-@@ -3876,18 +3894,9 @@ static void bnxt_dev_recover(void *arg)
+ 
+@@ -3814,18 +3832,9 @@ static void bnxt_dev_recover(void *arg)
@@ -84 +86 @@
-index 9142119954..0b5318e238 100644
+index 3dce024744..2477237b39 100644
@@ -87,2 +89,2 @@
-@@ -5913,3 +5913,25 @@ int bnxt_hwrm_fw_echo_reply(struct bnxt *bp, uint32_t echo_req_data1,
- 
+@@ -5811,3 +5811,26 @@ int bnxt_hwrm_cfa_pair_free(struct bnxt *bp, struct bnxt_representor *rep_bp)
+ 		    rep_bp->vf_id);
@@ -91,0 +94 @@
++
@@ -112,0 +116 @@
+\ No newline at end of file
@@ -114 +118 @@
-index c47c2498e9..785e321bfd 100644
+index c2bcb7dd63..11b3b1cea1 100644
@@ -117,4 +121,4 @@
-@@ -304,4 +304,5 @@ int bnxt_hwrm_cfa_pair_free(struct bnxt *bp, struct bnxt_representor *rep);
- int bnxt_hwrm_cfa_adv_flow_mgmt_qcaps(struct bnxt *bp);
- int bnxt_hwrm_fw_echo_reply(struct bnxt *bp, uint32_t echo_req_data1,
- 			    uint32_t echo_req_data2);
+@@ -301,4 +301,5 @@ int bnxt_hwrm_first_vf_id_query(struct bnxt *bp, uint16_t fid,
+ 				uint16_t *first_vf_id);
+ int bnxt_hwrm_cfa_pair_alloc(struct bnxt *bp, struct bnxt_representor *rep);
+ int bnxt_hwrm_cfa_pair_free(struct bnxt *bp, struct bnxt_representor *rep);

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

* [dpdk-stable] patch 'net/bnxt: fix device readiness check' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (52 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix FW readiness check during recovery' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix VF info allocation' " Xueming Li
                   ` (173 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Kalesh AP
  Cc: Luca Boccassi, Somnath Kotur, Randy Schacher, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3d051e75a45ae60f8e49fb8d2de70e1a92c53bc3

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3d051e75a45ae60f8e49fb8d2de70e1a92c53bc3 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 4 Mar 2021 14:37:27 +0530
Subject: [PATCH] net/bnxt: fix device readiness check
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 3972281f47b2cc0cf844698885f0e6b4228c0975 ]

Fix HWRM_VER_GET command to handle DEV_NOT_RDY state.

Driver should fail probe if the device is not ready.
Conversely, the HWRM_VER_GET poll after reset can safely
retry until the existing timeout is exceeded.

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

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

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 2477237b39..a27ecfac7e 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1096,6 +1096,11 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
 	else
 		HWRM_CHECK_RESULT();
 
+	if (resp->flags & HWRM_VER_GET_OUTPUT_FLAGS_DEV_NOT_RDY) {
+		rc = -EAGAIN;
+		goto error;
+	}
+
 	PMD_DRV_LOG(INFO, "%d.%d.%d:%d.%d.%d.%d\n",
 		resp->hwrm_intf_maj_8b, resp->hwrm_intf_min_8b,
 		resp->hwrm_intf_upd_8b, resp->hwrm_fw_maj_8b,
@@ -5830,6 +5835,10 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp)
 	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
 
 	HWRM_CHECK_RESULT_SILENT();
+
+	if (resp->flags & HWRM_VER_GET_OUTPUT_FLAGS_DEV_NOT_RDY)
+		rc = -EAGAIN;
+
 	HWRM_UNLOCK();
 
 	return rc;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.089413000 +0800
+++ 0056-net-bnxt-fix-device-readiness-check.patch	2021-05-10 23:59:26.400000000 +0800
@@ -1 +1 @@
-From 3972281f47b2cc0cf844698885f0e6b4228c0975 Mon Sep 17 00:00:00 2001
+From 3d051e75a45ae60f8e49fb8d2de70e1a92c53bc3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 3972281f47b2cc0cf844698885f0e6b4228c0975 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 02b0a214ca..5ef0845e8c 100644
+index 2477237b39..a27ecfac7e 100644
@@ -27 +29 @@
-@@ -1217,6 +1217,11 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
+@@ -1096,6 +1096,11 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
@@ -39 +41 @@
-@@ -6045,6 +6050,10 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp)
+@@ -5830,6 +5835,10 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp)

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

* [dpdk-stable] patch 'net/bnxt: fix VF info allocation' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (53 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix device readiness check' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix HWRM and FW incompatibility handling' " Xueming Li
                   ` (172 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Luca Boccassi, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/274ff8673a91b76981f5e6dbcd88211c8c3f3bf4

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 274ff8673a91b76981f5e6dbcd88211c8c3f3bf4 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 4 Mar 2021 14:37:28 +0530
Subject: [PATCH] net/bnxt: fix VF info allocation
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 01406837bf49950fa3a3fdd9d62eb7e0819383e4 ]

1. Renamed bnxt_hwrm_alloc_vf_info()/bnxt_hwrm_free_vf_info to
   bnxt_alloc_vf_info()/bnxt_free_vf_info as it does not
   issue any HWRM command to fw.
2. Fix missing unlock when memory allocation fails.

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

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

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index f247603edb..1c7a4d76ed 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1460,7 +1460,7 @@ static void bnxt_drv_uninit(struct bnxt *bp)
 	rte_memzone_free((const struct rte_memzone *)bp->rx_mem_zone);
 	bp->rx_mem_zone = NULL;
 
-	bnxt_hwrm_free_vf_info(bp);
+	bnxt_free_vf_info(bp);
 
 	rte_free(bp->grp_info);
 	bp->grp_info = NULL;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index a27ecfac7e..b520846e07 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -673,10 +673,13 @@ static int bnxt_hwrm_ptp_qcfg(struct bnxt *bp)
 	return 0;
 }
 
-void bnxt_hwrm_free_vf_info(struct bnxt *bp)
+void bnxt_free_vf_info(struct bnxt *bp)
 {
 	int i;
 
+	if (bp->pf->vf_info == NULL)
+		return;
+
 	for (i = 0; i < bp->pf->max_vfs; i++) {
 		rte_free(bp->pf->vf_info[i].vlan_table);
 		bp->pf->vf_info[i].vlan_table = NULL;
@@ -687,6 +690,50 @@ void bnxt_hwrm_free_vf_info(struct bnxt *bp)
 	bp->pf->vf_info = NULL;
 }
 
+static int bnxt_alloc_vf_info(struct bnxt *bp, uint16_t max_vfs)
+{
+	struct bnxt_child_vf_info *vf_info = bp->pf->vf_info;
+	int i;
+
+	if (vf_info)
+		bnxt_free_vf_info(bp);
+
+	vf_info = rte_zmalloc("bnxt_vf_info", sizeof(*vf_info) * max_vfs, 0);
+	if (vf_info == NULL) {
+		PMD_DRV_LOG(ERR, "Failed to alloc vf info\n");
+		return -ENOMEM;
+	}
+
+	bp->pf->max_vfs = max_vfs;
+	for (i = 0; i < max_vfs; i++) {
+		vf_info[i].fid = bp->pf->first_vf_id + i;
+		vf_info[i].vlan_table = rte_zmalloc("VF VLAN table",
+						    getpagesize(), getpagesize());
+		if (vf_info[i].vlan_table == NULL) {
+			PMD_DRV_LOG(ERR, "Failed to alloc VLAN table for VF %d\n", i);
+			goto err;
+		}
+		rte_mem_lock_page(vf_info[i].vlan_table);
+
+		vf_info[i].vlan_as_table = rte_zmalloc("VF VLAN AS table",
+						       getpagesize(), getpagesize());
+		if (vf_info[i].vlan_as_table == NULL) {
+			PMD_DRV_LOG(ERR, "Failed to alloc VLAN AS table for VF %d\n", i);
+			goto err;
+		}
+		rte_mem_lock_page(vf_info[i].vlan_as_table);
+
+		STAILQ_INIT(&vf_info[i].filter);
+	}
+
+	bp->pf->vf_info = vf_info;
+
+	return 0;
+err:
+	bnxt_free_vf_info(bp);
+	return -ENOMEM;
+}
+
 static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
 {
 	int rc = 0;
@@ -694,7 +741,6 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
 	struct hwrm_func_qcaps_output *resp = bp->hwrm_cmd_resp_addr;
 	uint16_t new_max_vfs;
 	uint32_t flags;
-	int i;
 
 	HWRM_PREP(&req, HWRM_FUNC_QCAPS, BNXT_USE_CHIMP_MB);
 
@@ -712,43 +758,9 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
 		bp->pf->total_vfs = rte_le_to_cpu_16(resp->max_vfs);
 		new_max_vfs = bp->pdev->max_vfs;
 		if (new_max_vfs != bp->pf->max_vfs) {
-			if (bp->pf->vf_info)
-				bnxt_hwrm_free_vf_info(bp);
-			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");
-				HWRM_UNLOCK();
-				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;
-				bp->pf->vf_info[i].vlan_table =
-					rte_zmalloc("VF VLAN table",
-						    getpagesize(),
-						    getpagesize());
-				if (bp->pf->vf_info[i].vlan_table == NULL)
-					PMD_DRV_LOG(ERR,
-					"Fail to alloc VLAN table for VF %d\n",
-					i);
-				else
-					rte_mem_lock_page(
-						bp->pf->vf_info[i].vlan_table);
-				bp->pf->vf_info[i].vlan_as_table =
-					rte_zmalloc("VF VLAN AS table",
-						    getpagesize(),
-						    getpagesize());
-				if (bp->pf->vf_info[i].vlan_as_table == NULL)
-					PMD_DRV_LOG(ERR,
-					"Alloc VLAN AS table for VF %d fail\n",
-					i);
-				else
-					rte_mem_lock_page(
-					      bp->pf->vf_info[i].vlan_as_table);
-				STAILQ_INIT(&bp->pf->vf_info[i].filter);
-			}
+			rc = bnxt_alloc_vf_info(bp, new_max_vfs);
+			if (rc)
+				goto unlock;
 		}
 	}
 
@@ -807,6 +819,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
 	if (flags & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_LINK_ADMIN_STATUS_SUPPORTED)
 		bp->fw_cap |= BNXT_FW_CAP_LINK_ADMIN;
 
+unlock:
 	HWRM_UNLOCK();
 
 	return rc;
@@ -817,6 +830,9 @@ int bnxt_hwrm_func_qcaps(struct bnxt *bp)
 	int rc;
 
 	rc = __bnxt_hwrm_func_qcaps(bp);
+	if (rc == -ENOMEM)
+		return rc;
+
 	if (!rc && bp->hwrm_spec_code >= HWRM_SPEC_CODE_1_8_3) {
 		rc = bnxt_alloc_ctx_mem(bp);
 		if (rc)
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index 11b3b1cea1..473e1f5395 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -296,7 +296,7 @@ int bnxt_hwrm_port_phy_qcaps(struct bnxt *bp);
 int bnxt_hwrm_oem_cmd(struct bnxt *bp, uint32_t entry_num);
 int bnxt_clear_one_vnic_filter(struct bnxt *bp,
 			       struct bnxt_filter_info *filter);
-void bnxt_hwrm_free_vf_info(struct bnxt *bp);
+void bnxt_free_vf_info(struct bnxt *bp);
 int bnxt_hwrm_first_vf_id_query(struct bnxt *bp, uint16_t fid,
 				uint16_t *first_vf_id);
 int bnxt_hwrm_cfa_pair_alloc(struct bnxt *bp, struct bnxt_representor *rep);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.114374700 +0800
+++ 0057-net-bnxt-fix-VF-info-allocation.patch	2021-05-10 23:59:26.410000000 +0800
@@ -1 +1 @@
-From 01406837bf49950fa3a3fdd9d62eb7e0819383e4 Mon Sep 17 00:00:00 2001
+From 274ff8673a91b76981f5e6dbcd88211c8c3f3bf4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 01406837bf49950fa3a3fdd9d62eb7e0819383e4 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index fae23a5c85..b561ff5520 100644
+index f247603edb..1c7a4d76ed 100644
@@ -26 +28 @@
-@@ -1557,7 +1557,7 @@ static void bnxt_drv_uninit(struct bnxt *bp)
+@@ -1460,7 +1460,7 @@ static void bnxt_drv_uninit(struct bnxt *bp)
@@ -36 +38 @@
-index 5ef0845e8c..c16edc8956 100644
+index a27ecfac7e..b520846e07 100644
@@ -39 +41 @@
-@@ -788,10 +788,13 @@ static int bnxt_hwrm_ptp_qcfg(struct bnxt *bp)
+@@ -673,10 +673,13 @@ static int bnxt_hwrm_ptp_qcfg(struct bnxt *bp)
@@ -54 +56 @@
-@@ -802,6 +805,50 @@ void bnxt_hwrm_free_vf_info(struct bnxt *bp)
+@@ -687,6 +690,50 @@ void bnxt_hwrm_free_vf_info(struct bnxt *bp)
@@ -105 +107 @@
-@@ -809,7 +856,6 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
+@@ -694,7 +741,6 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
@@ -113 +115 @@
-@@ -827,43 +873,9 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
+@@ -712,43 +758,9 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
@@ -160 +162 @@
-@@ -922,6 +934,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
+@@ -807,6 +819,7 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
@@ -168 +170 @@
-@@ -932,6 +945,9 @@ int bnxt_hwrm_func_qcaps(struct bnxt *bp)
+@@ -817,6 +830,9 @@ int bnxt_hwrm_func_qcaps(struct bnxt *bp)
@@ -179 +181 @@
-index 3d05acfe48..0c2e32ccbf 100644
+index 11b3b1cea1..473e1f5395 100644
@@ -182 +184 @@
-@@ -297,7 +297,7 @@ int bnxt_hwrm_port_phy_qcaps(struct bnxt *bp);
+@@ -296,7 +296,7 @@ int bnxt_hwrm_port_phy_qcaps(struct bnxt *bp);

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

* [dpdk-stable] patch 'net/bnxt: fix HWRM and FW incompatibility handling' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (54 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix VF info allocation' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: mute some failure logs' " Xueming Li
                   ` (171 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Luca Boccassi, Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/15d81d5f9e333b737ef499608aa0ef6fe794db36

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 15d81d5f9e333b737ef499608aa0ef6fe794db36 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 10 Mar 2021 13:20:53 +0530
Subject: [PATCH] net/bnxt: fix HWRM and FW incompatibility handling
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit b0764e7c207b0932ecd73655d8f7aa015e6733f4 ]

Fix to return an error when the HWRM version that the driver
is compiled against is incompatible with the FW that is actually
running on the card. This is determined based on the req length
indicated by FW against the value supported in the HWRM.

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

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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index b520846e07..abfb4b289d 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1150,6 +1150,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
 	if (bp->max_req_len > resp->max_req_win_len) {
 		PMD_DRV_LOG(ERR, "Unsupported request length\n");
 		rc = -EINVAL;
+		goto error;
 	}
 	bp->max_req_len = rte_le_to_cpu_16(resp->max_req_win_len);
 	bp->hwrm_max_ext_req_len = rte_le_to_cpu_16(resp->max_ext_req_len);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.142548700 +0800
+++ 0058-net-bnxt-fix-HWRM-and-FW-incompatibility-handling.patch	2021-05-10 23:59:26.410000000 +0800
@@ -1 +1 @@
-From b0764e7c207b0932ecd73655d8f7aa015e6733f4 Mon Sep 17 00:00:00 2001
+From 15d81d5f9e333b737ef499608aa0ef6fe794db36 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit b0764e7c207b0932ecd73655d8f7aa015e6733f4 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index c16edc8956..3de5c7e3a1 100644
+index b520846e07..abfb4b289d 100644
@@ -25 +27 @@
-@@ -1271,6 +1271,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
+@@ -1150,6 +1150,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
@@ -31,2 +33,2 @@
- 
- 	bp->chip_num = rte_le_to_cpu_16(resp->chip_num);
+ 	bp->max_req_len = rte_le_to_cpu_16(resp->max_req_win_len);
+ 	bp->hwrm_max_ext_req_len = rte_le_to_cpu_16(resp->max_ext_req_len);

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

* [dpdk-stable] patch 'net/bnxt: mute some failure logs' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (55 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix HWRM and FW incompatibility handling' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix xstats get' " Xueming Li
                   ` (170 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Luca Boccassi, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f061789e7cce480726087a2315053be6e30795b7

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f061789e7cce480726087a2315053be6e30795b7 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Wed, 10 Mar 2021 13:20:54 +0530
Subject: [PATCH] net/bnxt: mute some failure logs
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 3740259eae2dcf0903d7e8a08909a22486be3744 ]

In the init path, driver ignores few of the HWRM command failures.
There is no need to log the error message in those cases.

Fixes: 3fb93bc7c349 ("net/bnxt: initialize parent PF information")
Fixes: 4e3f887bec4b ("net/bnxt: support HWRM port PHY qcaps")

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

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index abfb4b289d..284699b2dc 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1417,7 +1417,7 @@ int bnxt_hwrm_port_phy_qcaps(struct bnxt *bp)
 
 	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
 
-	HWRM_CHECK_RESULT();
+	HWRM_CHECK_RESULT_SILENT();
 
 	bp->port_cnt = resp->port_cnt;
 	if (resp->supported_speeds_auto_mode)
@@ -3245,7 +3245,7 @@ int bnxt_hwrm_parent_pf_qcfg(struct bnxt *bp)
 
 	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
 
-	HWRM_CHECK_RESULT();
+	HWRM_CHECK_RESULT_SILENT();
 
 	memcpy(bp->parent->mac_addr, resp->mac_address, RTE_ETHER_ADDR_LEN);
 	bp->parent->vnic = rte_le_to_cpu_16(resp->dflt_vnic_id);
@@ -3254,7 +3254,7 @@ int bnxt_hwrm_parent_pf_qcfg(struct bnxt *bp)
 
 	/* FIXME: Temporary workaround - remove when firmware issue is fixed. */
 	if (bp->parent->vnic == 0) {
-		PMD_DRV_LOG(ERR, "Error: parent VNIC unavailable.\n");
+		PMD_DRV_LOG(DEBUG, "parent VNIC unavailable.\n");
 		/* Use hard-coded values appropriate for current Wh+ fw. */
 		if (bp->parent->fid == 2)
 			bp->parent->vnic = 0x100;
@@ -4258,7 +4258,7 @@ int bnxt_hwrm_port_led_qcaps(struct bnxt *bp)
 	req.port_id = bp->pf->port_id;
 	rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
 
-	HWRM_CHECK_RESULT();
+	HWRM_CHECK_RESULT_SILENT();
 
 	if (resp->num_leds > 0 && resp->num_leds < BNXT_MAX_LED) {
 		unsigned int i;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.166586900 +0800
+++ 0059-net-bnxt-mute-some-failure-logs.patch	2021-05-10 23:59:26.410000000 +0800
@@ -1 +1 @@
-From 3740259eae2dcf0903d7e8a08909a22486be3744 Mon Sep 17 00:00:00 2001
+From f061789e7cce480726087a2315053be6e30795b7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 3740259eae2dcf0903d7e8a08909a22486be3744 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 3de5c7e3a1..e3a07314f8 100644
+index abfb4b289d..284699b2dc 100644
@@ -23 +25 @@
-@@ -1542,7 +1542,7 @@ int bnxt_hwrm_port_phy_qcaps(struct bnxt *bp)
+@@ -1417,7 +1417,7 @@ int bnxt_hwrm_port_phy_qcaps(struct bnxt *bp)
@@ -32 +34 @@
-@@ -3385,7 +3385,7 @@ int bnxt_hwrm_parent_pf_qcfg(struct bnxt *bp)
+@@ -3245,7 +3245,7 @@ int bnxt_hwrm_parent_pf_qcfg(struct bnxt *bp)
@@ -41 +43 @@
-@@ -3394,7 +3394,7 @@ int bnxt_hwrm_parent_pf_qcfg(struct bnxt *bp)
+@@ -3254,7 +3254,7 @@ int bnxt_hwrm_parent_pf_qcfg(struct bnxt *bp)
@@ -50 +52 @@
-@@ -4398,7 +4398,7 @@ int bnxt_hwrm_port_led_qcaps(struct bnxt *bp)
+@@ -4258,7 +4258,7 @@ int bnxt_hwrm_port_led_qcaps(struct bnxt *bp)

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

* [dpdk-stable] patch 'net/bnxt: fix xstats get' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (56 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: mute some failure logs' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix Rx and Tx timestamps' " Xueming Li
                   ` (169 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Somnath Kotur
  Cc: Luca Boccassi, Kalesh AP, Lance Richardson, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7c69b27093769ef70926f1735fb00c007925b837

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7c69b27093769ef70926f1735fb00c007925b837 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Fri, 12 Mar 2021 10:51:08 +0530
Subject: [PATCH] net/bnxt: fix xstats get
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit eac4fc71cdaa6b68dbd0e4129e5751c712501693 ]

Fix to return count in xstats get op in all cases.
Driver was returning 0 if the 'xstats' parameter being passed to
xstats_get_op was NULL. This won't work on some applications that
rely on a valid count being passed even in this case so that it can
allocate memory accordingly followed by a reissue of the xstats_get_op
to get the actual stats populated by the driver.

Fixes: 063e59ddd28e ("net/bnxt: fix crash in xstats get")

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

diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index 3c9715f5fa..0cf3ee77e3 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -594,10 +594,15 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
 	if (rc)
 		return rc;
 
-	if (xstats == NULL)
-		return 0;
+	stat_count = RTE_DIM(bnxt_rx_stats_strings) +
+		RTE_DIM(bnxt_tx_stats_strings) +
+		RTE_DIM(bnxt_func_stats_strings) +
+		RTE_DIM(bnxt_rx_ext_stats_strings) +
+		RTE_DIM(bnxt_tx_ext_stats_strings) +
+		bnxt_flow_stats_cnt(bp);
 
-	memset(xstats, 0, sizeof(*xstats));
+	if (n < stat_count || xstats == NULL)
+		return stat_count;
 
 	bnxt_hwrm_func_qstats(bp, 0xffff, NULL, &func_qstats);
 	bnxt_hwrm_port_qstats(bp);
@@ -609,17 +614,7 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
 					(bp->fw_tx_port_stats_ext_size /
 					 stat_size));
 
-	count = RTE_DIM(bnxt_rx_stats_strings) +
-		RTE_DIM(bnxt_tx_stats_strings) +
-		RTE_DIM(bnxt_func_stats_strings) +
-		RTE_DIM(bnxt_rx_ext_stats_strings) +
-		RTE_DIM(bnxt_tx_ext_stats_strings) +
-		bnxt_flow_stats_cnt(bp);
-
-	stat_count = count;
-
-	if (n < count)
-		return count;
+	memset(xstats, 0, sizeof(*xstats));
 
 	count = 0;
 	for (i = 0; i < RTE_DIM(bnxt_rx_stats_strings); i++) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.190193600 +0800
+++ 0060-net-bnxt-fix-xstats-get.patch	2021-05-10 23:59:26.410000000 +0800
@@ -1 +1 @@
-From eac4fc71cdaa6b68dbd0e4129e5751c712501693 Mon Sep 17 00:00:00 2001
+From 7c69b27093769ef70926f1735fb00c007925b837 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit eac4fc71cdaa6b68dbd0e4129e5751c712501693 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 01d90dee8d..bb4b2eee19 100644
+index 3c9715f5fa..0cf3ee77e3 100644

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

* [dpdk-stable] patch 'net/bnxt: fix Rx and Tx timestamps' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (57 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix xstats get' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'app/testpmd: check MAC address query' " Xueming Li
                   ` (168 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Luca Boccassi, Lance Richardson, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/211541b614705b5ff5c259af204b315a7664eb0f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 211541b614705b5ff5c259af204b315a7664eb0f Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Fri, 12 Mar 2021 10:51:09 +0530
Subject: [PATCH] net/bnxt: fix Rx and Tx timestamps
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 71f5872dd131983932cbfeb5f71345c53473fa81 ]

timesync adjust and write_time APIs needed to account for the Rx and Tx
timestamp counters as well. Fix it since it was not done earlier.

Fixes: b11cceb83a34 ("net/bnxt: support timesync")

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

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 1c7a4d76ed..9252352416 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3227,6 +3227,8 @@ bnxt_timesync_write_time(struct rte_eth_dev *dev, const struct timespec *ts)
 	ns = rte_timespec_to_ns(ts);
 	/* Set the timecounters to a new value. */
 	ptp->tc.nsec = ns;
+	ptp->tx_tstamp_tc.nsec = ns;
+	ptp->rx_tstamp_tc.nsec = ns;
 
 	return 0;
 }
@@ -3373,6 +3375,8 @@ bnxt_timesync_adjust_time(struct rte_eth_dev *dev, int64_t delta)
 		return 0;
 
 	ptp->tc.nsec += delta;
+	ptp->tx_tstamp_tc.nsec += delta;
+	ptp->rx_tstamp_tc.nsec += delta;
 
 	return 0;
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.214746100 +0800
+++ 0061-net-bnxt-fix-Rx-and-Tx-timestamps.patch	2021-05-10 23:59:26.410000000 +0800
@@ -1 +1 @@
-From 71f5872dd131983932cbfeb5f71345c53473fa81 Mon Sep 17 00:00:00 2001
+From 211541b614705b5ff5c259af204b315a7664eb0f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 71f5872dd131983932cbfeb5f71345c53473fa81 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 7124f48013..6cc6af0a66 100644
+index 1c7a4d76ed..9252352416 100644
@@ -23 +25 @@
-@@ -3428,6 +3428,8 @@ bnxt_timesync_write_time(struct rte_eth_dev *dev, const struct timespec *ts)
+@@ -3227,6 +3227,8 @@ bnxt_timesync_write_time(struct rte_eth_dev *dev, const struct timespec *ts)
@@ -32 +34 @@
-@@ -3578,6 +3580,8 @@ bnxt_timesync_adjust_time(struct rte_eth_dev *dev, int64_t delta)
+@@ -3373,6 +3375,8 @@ bnxt_timesync_adjust_time(struct rte_eth_dev *dev, int64_t delta)

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

* [dpdk-stable] patch 'app/testpmd: check MAC address query' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (58 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix Rx and Tx timestamps' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/ice: check some functions return' " Xueming Li
                   ` (167 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Luca Boccassi, Xiaoyun Li, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9a7fd13201b9e6a874713ff5fa05db26f49f0ba6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9a7fd13201b9e6a874713ff5fa05db26f49f0ba6 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 16 Mar 2021 12:21:36 +0530
Subject: [PATCH] app/testpmd: check MAC address query
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 2382a607599ec1e44594bd74175fc8ffcc260a47 ]

This patch checks return value for rte_eth_dev_info_get() in show_macs().

Coverity issue: 353629
Fixes: e1d44d0ad623 ("app/testpmd: show MAC addresses added to a port")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 app/test-pmd/config.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index dab8afe5dd..336d3e59b1 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -5219,7 +5219,8 @@ show_macs(portid_t port_id)
 
 	dev = &rte_eth_devices[port_id];
 
-	rte_eth_dev_info_get(port_id, &dev_info);
+	if (eth_dev_info_get_print_err(port_id, &dev_info))
+		return;
 
 	for (i = 0; i < dev_info.max_mac_addrs; i++) {
 		addr = &dev->data->mac_addrs[i];
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.240979900 +0800
+++ 0062-app-testpmd-check-MAC-address-query.patch	2021-05-10 23:59:26.410000000 +0800
@@ -1 +1 @@
-From 2382a607599ec1e44594bd74175fc8ffcc260a47 Mon Sep 17 00:00:00 2001
+From 9a7fd13201b9e6a874713ff5fa05db26f49f0ba6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 2382a607599ec1e44594bd74175fc8ffcc260a47 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 576d5acab5..4ce75a8e73 100644
+index dab8afe5dd..336d3e59b1 100644
@@ -23 +25 @@
-@@ -4930,7 +4930,8 @@ show_macs(portid_t port_id)
+@@ -5219,7 +5219,8 @@ show_macs(portid_t port_id)

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

* [dpdk-stable] patch 'net/ice: check some functions return' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (59 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'app/testpmd: check MAC address query' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'common/mlx5: add timestamp format support to DevX' " Xueming Li
                   ` (166 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Wenjun Wu; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/604068df872c511a76b059e7d006a1e200b4a810

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 604068df872c511a76b059e7d006a1e200b4a810 Mon Sep 17 00:00:00 2001
From: Wenjun Wu <wenjun1.wu@intel.com>
Date: Fri, 26 Feb 2021 15:22:00 +0800
Subject: [PATCH] net/ice: check some functions return
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 32667f5b48a371cd65c35d26c61ea293745e1b44 ]

Fix unchecked return values reported by coverity.

Coverity issue: 349907
Fixes: 03a05924dad0 ("net/ice: support device-specific DDP package loading")

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index d789650652..626ebfac5b 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -1768,8 +1768,14 @@ ice_pkg_file_search_path(struct rte_pci_device *pci_dev, char *pkg_file)
 	pos = rte_pci_find_ext_capability(pci_dev, RTE_PCI_EXT_CAP_ID_DSN);
 
 	if (pos) {
-		rte_pci_read_config(pci_dev, &dsn_low, 4, pos + 4);
-		rte_pci_read_config(pci_dev, &dsn_high, 4, pos + 8);
+		if (rte_pci_read_config(pci_dev, &dsn_low, 4, pos + 4) < 0) {
+			PMD_INIT_LOG(ERR, "Failed to read pci config space\n");
+			return -1;
+		}
+		if (rte_pci_read_config(pci_dev, &dsn_high, 4, pos + 8) < 0) {
+			PMD_INIT_LOG(ERR, "Failed to read pci config space\n");
+			return -1;
+		}
 		snprintf(opt_ddp_filename, ICE_MAX_PKG_FILENAME_SIZE,
 			 "ice-%08x%08x.pkg", dsn_high, dsn_low);
 	} else {
@@ -1831,7 +1837,11 @@ static int ice_load_pkg(struct rte_eth_dev *dev)
 	struct ice_adapter *ad =
 		ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 
-	ice_pkg_file_search_path(pci_dev, pkg_file);
+	err = ice_pkg_file_search_path(pci_dev, pkg_file);
+	if (err) {
+		PMD_INIT_LOG(ERR, "failed to search file path\n");
+		return err;
+	}
 
 	file = fopen(pkg_file, "rb");
 	if (!file)  {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.264165500 +0800
+++ 0063-net-ice-check-some-functions-return.patch	2021-05-10 23:59:26.420000000 +0800
@@ -1 +1 @@
-From 32667f5b48a371cd65c35d26c61ea293745e1b44 Mon Sep 17 00:00:00 2001
+From 604068df872c511a76b059e7d006a1e200b4a810 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 32667f5b48a371cd65c35d26c61ea293745e1b44 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 8999d441ac..9c9b84a938 100644
+index d789650652..626ebfac5b 100644
@@ -21 +23 @@
-@@ -1663,8 +1663,14 @@ ice_pkg_file_search_path(struct rte_pci_device *pci_dev, char *pkg_file)
+@@ -1768,8 +1768,14 @@ ice_pkg_file_search_path(struct rte_pci_device *pci_dev, char *pkg_file)
@@ -38 +40 @@
-@@ -1727,7 +1733,11 @@ static int ice_load_pkg(struct rte_eth_dev *dev)
+@@ -1831,7 +1837,11 @@ static int ice_load_pkg(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'common/mlx5: add timestamp format support to DevX' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (60 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/ice: check some functions return' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'vdpa/mlx5: support timestamp format' " Xueming Li
                   ` (165 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Luca Boccassi, Matan Azrad, Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7ddf9eaed91f90263a427efd69a4373db73469fa

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7ddf9eaed91f90263a427efd69a4373db73469fa Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Sun, 14 Mar 2021 12:12:58 +0000
Subject: [PATCH] common/mlx5: add timestamp format support to DevX
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 569ffbc9815bce27b4dbc68f05f02714fb8e1688 ]

This patch handles the NIC-supported timestamp formats via DevX.
Two different timestamp formats can be provided potentially.
The free-running format provides opaque values captured from
the internal clock counter fed by some independent oscillator.
The free-running frequency is not pre-defined and should be
queried from the NIC. The real-time timestamps are expressed
in nanoseconds, captured from the dedicated UTC counter, that
can be adjusted on the fly and synchronized with some external
reference clock.

Depending on the version and configuration the hardware might
support either FR (free-running) or RT (real-time) timestamps,
per queue basis.

The commit provides the querying information about the supported
timestamp formats and provides the means to configure ones
at queue creation time.

Fixes: e2b4925ef7c1 ("net/mlx5: support Direct Rules E-Switch")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 drivers/common/mlx5/mlx5_devx_cmds.c | 35 ++++++++++++++++--
 drivers/common/mlx5/mlx5_devx_cmds.h |  7 ++++
 drivers/common/mlx5/mlx5_prm.h       | 55 ++++++++++++++++++++++++++--
 3 files changed, 90 insertions(+), 7 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index e3196f86f9..ee1a3ddbaf 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -714,6 +714,9 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
 				      device_frequency_khz);
 	attr->scatter_fcs_w_decap_disable =
 		MLX5_GET(cmd_hca_cap, hcattr, scatter_fcs_w_decap_disable);
+	attr->roce = MLX5_GET(cmd_hca_cap, hcattr, roce);
+	attr->rq_ts_format = MLX5_GET(cmd_hca_cap, hcattr, rq_ts_format);
+	attr->sq_ts_format = MLX5_GET(cmd_hca_cap, hcattr, sq_ts_format);
 	attr->regex = MLX5_GET(cmd_hca_cap, hcattr, regexp);
 	attr->regexp_num_of_engines = MLX5_GET(cmd_hca_cap, hcattr,
 					       regexp_num_of_engines);
@@ -839,9 +842,32 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
 	attr->tunnel_stateless_gtp = MLX5_GET
 					(per_protocol_networking_offload_caps,
 					 hcattr, tunnel_stateless_gtp);
-	if (attr->wqe_inline_mode != MLX5_CAP_INLINE_MODE_VPORT_CONTEXT)
-		return 0;
-	if (attr->eth_virt) {
+	/* Query HCA attribute for ROCE. */
+	if (attr->roce) {
+		memset(in, 0, sizeof(in));
+		memset(out, 0, sizeof(out));
+		MLX5_SET(query_hca_cap_in, in, opcode,
+			 MLX5_CMD_OP_QUERY_HCA_CAP);
+		MLX5_SET(query_hca_cap_in, in, op_mod,
+			 MLX5_GET_HCA_CAP_OP_MOD_ROCE |
+			 MLX5_HCA_CAP_OPMOD_GET_CUR);
+		rc = mlx5_glue->devx_general_cmd(ctx, in, sizeof(in),
+						 out, sizeof(out));
+		if (rc)
+			goto error;
+		status = MLX5_GET(query_hca_cap_out, out, status);
+		syndrome = MLX5_GET(query_hca_cap_out, out, syndrome);
+		if (status) {
+			DRV_LOG(DEBUG,
+				"Failed to query devx HCA ROCE capabilities, "
+				"status %x, syndrome = %x", status, syndrome);
+			return -1;
+		}
+		hcattr = MLX5_ADDR_OF(query_hca_cap_out, out, capability);
+		attr->qp_ts_format = MLX5_GET(roce_caps, hcattr, qp_ts_format);
+	}
+	if (attr->eth_virt &&
+	    attr->wqe_inline_mode == MLX5_CAP_INLINE_MODE_VPORT_CONTEXT) {
 		rc = mlx5_devx_cmd_query_nic_vport_context(ctx, 0, attr);
 		if (rc) {
 			attr->eth_virt = 0;
@@ -982,6 +1008,7 @@ mlx5_devx_cmd_create_rq(void *ctx,
 	MLX5_SET(rqc, rq_ctx, cqn, rq_attr->cqn);
 	MLX5_SET(rqc, rq_ctx, counter_set_id, rq_attr->counter_set_id);
 	MLX5_SET(rqc, rq_ctx, rmpn, rq_attr->rmpn);
+	MLX5_SET(sqc, rq_ctx, ts_format, rq_attr->ts_format);
 	wq_ctx = MLX5_ADDR_OF(rqc, rq_ctx, wq);
 	wq_attr = &rq_attr->wq_attr;
 	devx_cmd_fill_wq_data(wq_ctx, wq_attr);
@@ -1354,6 +1381,7 @@ mlx5_devx_cmd_create_sq(void *ctx,
 		 sq_attr->packet_pacing_rate_limit_index);
 	MLX5_SET(sqc, sq_ctx, tis_lst_sz, sq_attr->tis_lst_sz);
 	MLX5_SET(sqc, sq_ctx, tis_num_0, sq_attr->tis_num);
+	MLX5_SET(sqc, sq_ctx, ts_format, sq_attr->ts_format);
 	wq_ctx = MLX5_ADDR_OF(sqc, sq_ctx, wq);
 	wq_attr = &sq_attr->wq_attr;
 	devx_cmd_fill_wq_data(wq_ctx, wq_attr);
@@ -1800,6 +1828,7 @@ mlx5_devx_cmd_create_qp(void *ctx,
 	MLX5_SET(create_qp_in, in, opcode, MLX5_CMD_OP_CREATE_QP);
 	MLX5_SET(qpc, qpc, st, MLX5_QP_ST_RC);
 	MLX5_SET(qpc, qpc, pd, attr->pd);
+	MLX5_SET(qpc, qpc, ts_format, attr->ts_format);
 	if (attr->uar_index) {
 		MLX5_SET(qpc, qpc, pm_state, MLX5_QP_PM_MIGRATED);
 		MLX5_SET(qpc, qpc, uar_page, attr->uar_index);
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index a9aa8a3ebf..541f526194 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -112,6 +112,10 @@ struct mlx5_hca_attr {
 	uint32_t dev_freq_khz; /* Timestamp counter frequency, kHz. */
 	uint32_t scatter_fcs_w_decap_disable:1;
 	uint32_t flow_hit_aso:1; /* General obj type FLOW_HIT_ASO supported. */
+	uint32_t roce:1;
+	uint32_t rq_ts_format:2;
+	uint32_t sq_ts_format:2;
+	uint32_t qp_ts_format:2;
 	uint32_t regex:1;
 	uint32_t regexp_num_of_engines;
 	uint32_t log_max_ft_sampler_num:8;
@@ -161,6 +165,7 @@ struct mlx5_devx_create_rq_attr {
 	uint32_t state:4;
 	uint32_t flush_in_error_en:1;
 	uint32_t hairpin:1;
+	uint32_t ts_format:2;
 	uint32_t user_index:24;
 	uint32_t cqn:24;
 	uint32_t counter_set_id:8;
@@ -244,6 +249,7 @@ struct mlx5_devx_create_sq_attr {
 	uint32_t hairpin:1;
 	uint32_t non_wire:1;
 	uint32_t static_sq_wq:1;
+	uint32_t ts_format:2;
 	uint32_t user_index:24;
 	uint32_t cqn:24;
 	uint32_t packet_pacing_rate_limit_index:16;
@@ -324,6 +330,7 @@ struct mlx5_devx_qp_attr {
 	uint32_t rq_size:17; /* Must be power of 2. */
 	uint32_t log_rq_stride:3;
 	uint32_t sq_size:17; /* Must be power of 2. */
+	uint32_t ts_format:2;
 	uint32_t dbr_umem_valid:1;
 	uint32_t dbr_umem_id;
 	uint64_t dbr_address;
diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index cce55c8ddd..4792835200 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -1056,6 +1056,7 @@ enum {
 	MLX5_GET_HCA_CAP_OP_MOD_GENERAL_DEVICE = 0x0 << 1,
 	MLX5_GET_HCA_CAP_OP_MOD_ETHERNET_OFFLOAD_CAPS = 0x1 << 1,
 	MLX5_GET_HCA_CAP_OP_MOD_QOS_CAP = 0xc << 1,
+	MLX5_GET_HCA_CAP_OP_MOD_ROCE = 0x4 << 1,
 	MLX5_GET_HCA_CAP_OP_MOD_NIC_FLOW_TABLE = 0x7 << 1,
 	MLX5_GET_HCA_CAP_OP_MOD_VDPA_EMULATION = 0x13 << 1,
 };
@@ -1091,6 +1092,20 @@ enum {
 	MLX5_INLINE_MODE_INNER_TCP_UDP,
 };
 
+/* The supported timestamp formats reported in HCA attributes. */
+enum {
+	MLX5_HCA_CAP_TIMESTAMP_FORMAT_FR = 0x0,
+	MLX5_HCA_CAP_TIMESTAMP_FORMAT_RT = 0x1,
+	MLX5_HCA_CAP_TIMESTAMP_FORMAT_FR_RT = 0x2,
+};
+
+/* The timestamp format attributes to configure queues (RQ/SQ/QP). */
+enum {
+	MLX5_QPC_TIMESTAMP_FORMAT_FREE_RUNNING = 0x0,
+	MLX5_QPC_TIMESTAMP_FORMAT_DEFAULT      = 0x1,
+	MLX5_QPC_TIMESTAMP_FORMAT_REAL_TIME    = 0x2,
+};
+
 /* HCA bit masks indicating which Flex parser protocols are already enabled. */
 #define MLX5_HCA_FLEX_IPV4_OVER_VXLAN_ENABLED (1UL << 0)
 #define MLX5_HCA_FLEX_IPV6_OVER_VXLAN_ENABLED (1UL << 1)
@@ -1353,7 +1368,9 @@ struct mlx5_ifc_cmd_hca_cap_bits {
 	u8 reserved_at_3f8[0x3];
 	u8 log_max_current_uc_list[0x5];
 	u8 general_obj_types[0x40];
-	u8 reserved_at_440[0x20];
+	u8 sq_ts_format[0x2];
+	u8 rq_ts_format[0x2];
+	u8 reserved_at_444[0x1C];
 	u8 reserved_at_460[0x10];
 	u8 max_num_eqs[0x10];
 	u8 reserved_at_480[0x3];
@@ -1543,6 +1560,12 @@ struct mlx5_ifc_flow_table_prop_layout_bits {
 	u8 reserved_at_c0[0x140];
 };
 
+struct mlx5_ifc_roce_caps_bits {
+	u8 reserved_0[0x1e];
+	u8 qp_ts_format[0x2];
+	u8 reserved_at_20[0x7e0];
+};
+
 struct mlx5_ifc_flow_table_nic_cap_bits {
 	u8	   reserved_at_0[0x200];
 	struct mlx5_ifc_flow_table_prop_layout_bits flow_table_properties;
@@ -1555,6 +1578,7 @@ union mlx5_ifc_hca_cap_union_bits {
 	struct mlx5_ifc_qos_cap_bits qos_cap;
 	struct mlx5_ifc_virtio_emulation_cap_bits vdpa_caps;
 	struct mlx5_ifc_flow_table_nic_cap_bits flow_table_nic_cap;
+	struct mlx5_ifc_roce_caps_bits roce_caps;
 	u8 reserved_at_0[0x8000];
 };
 
@@ -1771,7 +1795,9 @@ struct mlx5_ifc_rqc_bits {
 	u8 reserved_at_c[0x1];
 	u8 flush_in_error_en[0x1];
 	u8 hairpin[0x1];
-	u8 reserved_at_f[0x11];
+	u8 reserved_at_f[0xB];
+	u8 ts_format[0x02];
+	u8 reserved_at_1c[0x4];
 	u8 reserved_at_20[0x8];
 	u8 user_index[0x18];
 	u8 reserved_at_40[0x8];
@@ -2077,7 +2103,9 @@ struct mlx5_ifc_sqc_bits {
 	u8 hairpin[0x1];
 	u8 non_wire[0x1];
 	u8 static_sq_wq[0x1];
-	u8 reserved_at_11[0xf];
+	u8 reserved_at_11[0x9];
+	u8 ts_format[0x02];
+	u8 reserved_at_1c[0x4];
 	u8 reserved_at_20[0x8];
 	u8 user_index[0x18];
 	u8 reserved_at_40[0x8];
@@ -2539,7 +2567,9 @@ struct mlx5_ifc_qpc_bits {
 	u8 log_rq_stride[0x3];
 	u8 no_sq[0x1];
 	u8 log_sq_size[0x4];
-	u8 reserved_at_55[0x6];
+	u8 reserved_at_55[0x3];
+	u8 ts_format[0x2];
+	u8 reserved_at_5a[0x1];
 	u8 rlky[0x1];
 	u8 ulp_stateless_offload_mode[0x4];
 	u8 counter_set_id[0x8];
@@ -3261,4 +3291,21 @@ mlx5_flow_mark_get(uint32_t val)
 #endif
 }
 
+/**
+ * Convert a timestamp format to configure settings in the queue context.
+ *
+ * @param val
+ *   timestamp format supported by the queue.
+ *
+ * @return
+ *   Converted timstamp format settings.
+ */
+static inline uint32_t
+mlx5_ts_format_conv(uint32_t ts_format)
+{
+	return ts_format == MLX5_HCA_CAP_TIMESTAMP_FORMAT_FR ?
+			MLX5_QPC_TIMESTAMP_FORMAT_FREE_RUNNING :
+			MLX5_QPC_TIMESTAMP_FORMAT_DEFAULT;
+}
+
 #endif /* RTE_PMD_MLX5_PRM_H_ */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.290389000 +0800
+++ 0064-common-mlx5-add-timestamp-format-support-to-DevX.patch	2021-05-10 23:59:26.420000000 +0800
@@ -1 +1 @@
-From 569ffbc9815bce27b4dbc68f05f02714fb8e1688 Mon Sep 17 00:00:00 2001
+From 7ddf9eaed91f90263a427efd69a4373db73469fa Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 569ffbc9815bce27b4dbc68f05f02714fb8e1688 ]
@@ -25 +27,0 @@
-Cc: stable@dpdk.org
@@ -37 +39 @@
-index 8df14f5b7d..c90e020643 100644
+index e3196f86f9..ee1a3ddbaf 100644
@@ -40 +42 @@
-@@ -715,6 +715,9 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
+@@ -714,6 +714,9 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
@@ -50,2 +52,2 @@
-@@ -859,9 +862,32 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
- 	attr->rss_ind_tbl_cap = MLX5_GET
+@@ -839,9 +842,32 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
+ 	attr->tunnel_stateless_gtp = MLX5_GET
@@ -53 +55 @@
- 					 hcattr, rss_ind_tbl_cap);
+ 					 hcattr, tunnel_stateless_gtp);
@@ -86 +88 @@
-@@ -1004,6 +1030,7 @@ mlx5_devx_cmd_create_rq(void *ctx,
+@@ -982,6 +1008,7 @@ mlx5_devx_cmd_create_rq(void *ctx,
@@ -94 +96 @@
-@@ -1376,6 +1403,7 @@ mlx5_devx_cmd_create_sq(void *ctx,
+@@ -1354,6 +1381,7 @@ mlx5_devx_cmd_create_sq(void *ctx,
@@ -102 +104 @@
-@@ -1825,6 +1853,7 @@ mlx5_devx_cmd_create_qp(void *ctx,
+@@ -1800,6 +1828,7 @@ mlx5_devx_cmd_create_qp(void *ctx,
@@ -111 +113 @@
-index bc66d28e83..2826c0b2c6 100644
+index a9aa8a3ebf..541f526194 100644
@@ -114 +116 @@
-@@ -121,6 +121,10 @@ struct mlx5_hca_attr {
+@@ -112,6 +112,10 @@ struct mlx5_hca_attr {
@@ -123 +124,0 @@
- 	uint32_t reg_c_preserve:1;
@@ -125 +126,2 @@
-@@ -188,6 +192,7 @@ struct mlx5_devx_create_rq_attr {
+ 	uint32_t log_max_ft_sampler_num:8;
+@@ -161,6 +165,7 @@ struct mlx5_devx_create_rq_attr {
@@ -133 +135 @@
-@@ -271,6 +276,7 @@ struct mlx5_devx_create_sq_attr {
+@@ -244,6 +249,7 @@ struct mlx5_devx_create_sq_attr {
@@ -141 +143 @@
-@@ -354,6 +360,7 @@ struct mlx5_devx_qp_attr {
+@@ -324,6 +330,7 @@ struct mlx5_devx_qp_attr {
@@ -150 +152 @@
-index 01a039f1f7..0ef0574f92 100644
+index cce55c8ddd..4792835200 100644
@@ -153 +155 @@
-@@ -1116,6 +1116,7 @@ enum {
+@@ -1056,6 +1056,7 @@ enum {
@@ -161 +163 @@
-@@ -1153,6 +1154,20 @@ enum {
+@@ -1091,6 +1092,20 @@ enum {
@@ -182 +184 @@
-@@ -1431,7 +1446,9 @@ struct mlx5_ifc_cmd_hca_cap_bits {
+@@ -1353,7 +1368,9 @@ struct mlx5_ifc_cmd_hca_cap_bits {
@@ -193 +195 @@
-@@ -1623,6 +1640,12 @@ struct mlx5_ifc_flow_table_prop_layout_bits {
+@@ -1543,6 +1560,12 @@ struct mlx5_ifc_flow_table_prop_layout_bits {
@@ -206 +208 @@
-@@ -1635,6 +1658,7 @@ union mlx5_ifc_hca_cap_union_bits {
+@@ -1555,6 +1578,7 @@ union mlx5_ifc_hca_cap_union_bits {
@@ -214 +216 @@
-@@ -1851,7 +1875,9 @@ struct mlx5_ifc_rqc_bits {
+@@ -1771,7 +1795,9 @@ struct mlx5_ifc_rqc_bits {
@@ -225 +227 @@
-@@ -2157,7 +2183,9 @@ struct mlx5_ifc_sqc_bits {
+@@ -2077,7 +2103,9 @@ struct mlx5_ifc_sqc_bits {
@@ -236 +238 @@
-@@ -2684,7 +2712,9 @@ struct mlx5_ifc_qpc_bits {
+@@ -2539,7 +2567,9 @@ struct mlx5_ifc_qpc_bits {
@@ -247 +249 @@
-@@ -3440,4 +3470,21 @@ mlx5_flow_mark_get(uint32_t val)
+@@ -3261,4 +3291,21 @@ mlx5_flow_mark_get(uint32_t val)

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

* [dpdk-stable] patch 'vdpa/mlx5: support timestamp format' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (61 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'common/mlx5: add timestamp format support to DevX' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/mlx5: fix Rx metadata leftovers' " Xueming Li
                   ` (164 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Luca Boccassi, Matan Azrad, Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/cd5184145e57822667e7b1bb534ebe28e9b90413

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cd5184145e57822667e7b1bb534ebe28e9b90413 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Sun, 14 Mar 2021 12:13:00 +0000
Subject: [PATCH] vdpa/mlx5: support timestamp format
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 044423c4db97ca1911d0dcd06bc21f3fe84ed8c7 ]

This patch adds support for the timestamp format settings for
the receive and send queues. If the firmware version x.30.1000
or above is installed and the NIC timestamps are configured
with the real-time format, the default zero values for newly
added fields cause the queue creation to fail.

The patch queries the timestamp formats supported by the hardware
and sets the configuration values in queue context accordingly.

Fixes: 95276abaaf0a ("vdpa/mlx5: introduce Mellanox vDPA driver")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa.c       | 1 +
 drivers/vdpa/mlx5/mlx5_vdpa.h       | 1 +
 drivers/vdpa/mlx5/mlx5_vdpa_event.c | 2 ++
 3 files changed, 4 insertions(+)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c
index 0b2f1ab68e..228f5f59d2 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
@@ -735,6 +735,7 @@ mlx5_vdpa_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	priv->caps = attr.vdpa;
 	priv->log_max_rqt_size = attr.log_max_rqt_size;
 	priv->num_lag_ports = attr.num_lag_ports;
+	priv->qp_ts_format = attr.qp_ts_format;
 	if (attr.num_lag_ports == 0)
 		priv->num_lag_ports = 1;
 	priv->ctx = ctx;
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.h b/drivers/vdpa/mlx5/mlx5_vdpa.h
index d039ada65b..fefc7cfdad 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa.h
+++ b/drivers/vdpa/mlx5/mlx5_vdpa.h
@@ -154,6 +154,7 @@ struct mlx5_vdpa_priv {
 	struct mlx5_devx_obj *tiss[16]; /* TIS list for each LAG port. */
 	uint16_t nr_virtqs;
 	uint8_t num_lag_ports;
+	uint8_t qp_ts_format;
 	uint64_t features; /* Negotiated features. */
 	uint16_t log_max_rqt_size;
 	struct mlx5_vdpa_steer steer;
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_event.c b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
index 3aeaeb893f..266cd8e57c 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_event.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
@@ -659,6 +659,7 @@ mlx5_vdpa_event_qp_create(struct mlx5_vdpa_priv *priv, uint16_t desc_n,
 	if (mlx5_vdpa_cq_create(priv, log_desc_n, callfd, &eqp->cq))
 		return -1;
 	attr.pd = priv->pdn;
+	attr.ts_format = mlx5_ts_format_conv(priv->qp_ts_format);
 	eqp->fw_qp = mlx5_devx_cmd_create_qp(priv->ctx, &attr);
 	if (!eqp->fw_qp) {
 		DRV_LOG(ERR, "Failed to create FW QP(%u).", rte_errno);
@@ -689,6 +690,7 @@ mlx5_vdpa_event_qp_create(struct mlx5_vdpa_priv *priv, uint16_t desc_n,
 	attr.wq_umem_offset = 0;
 	attr.dbr_umem_id = eqp->umem_obj->umem_id;
 	attr.dbr_address = (1 << log_desc_n) * MLX5_WSEG_SIZE;
+	attr.ts_format = mlx5_ts_format_conv(priv->qp_ts_format);
 	eqp->sw_qp = mlx5_devx_cmd_create_qp(priv->ctx, &attr);
 	if (!eqp->sw_qp) {
 		DRV_LOG(ERR, "Failed to create SW QP(%u).", rte_errno);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.316498500 +0800
+++ 0065-vdpa-mlx5-support-timestamp-format.patch	2021-05-10 23:59:26.420000000 +0800
@@ -1 +1 @@
-From 044423c4db97ca1911d0dcd06bc21f3fe84ed8c7 Mon Sep 17 00:00:00 2001
+From cd5184145e57822667e7b1bb534ebe28e9b90413 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 044423c4db97ca1911d0dcd06bc21f3fe84ed8c7 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 5755a68ec4..898e50f807 100644
+index 0b2f1ab68e..228f5f59d2 100644
@@ -31 +33 @@
-@@ -745,6 +745,7 @@ mlx5_vdpa_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+@@ -735,6 +735,7 @@ mlx5_vdpa_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
@@ -40 +42 @@
-index 98c71aad4c..d93b430c97 100644
+index d039ada65b..fefc7cfdad 100644
@@ -43 +45 @@
-@@ -152,6 +152,7 @@ struct mlx5_vdpa_priv {
+@@ -154,6 +154,7 @@ struct mlx5_vdpa_priv {
@@ -52 +54 @@
-index 86adc864f5..7cf2c76e70 100644
+index 3aeaeb893f..266cd8e57c 100644
@@ -55 +57 @@
-@@ -662,6 +662,7 @@ mlx5_vdpa_event_qp_create(struct mlx5_vdpa_priv *priv, uint16_t desc_n,
+@@ -659,6 +659,7 @@ mlx5_vdpa_event_qp_create(struct mlx5_vdpa_priv *priv, uint16_t desc_n,
@@ -63 +65 @@
-@@ -692,6 +693,7 @@ mlx5_vdpa_event_qp_create(struct mlx5_vdpa_priv *priv, uint16_t desc_n,
+@@ -689,6 +690,7 @@ mlx5_vdpa_event_qp_create(struct mlx5_vdpa_priv *priv, uint16_t desc_n,

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

* [dpdk-stable] patch 'net/mlx5: fix Rx metadata leftovers' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (62 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'vdpa/mlx5: support timestamp format' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'eal: fix comment of OS-specific header files' " Xueming Li
                   ` (163 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/cf10220946182bfd96e5670a2a1ba0f20c58a977

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cf10220946182bfd96e5670a2a1ba0f20c58a977 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Sun, 7 Mar 2021 11:45:47 +0000
Subject: [PATCH] net/mlx5: fix Rx metadata leftovers
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 4eefb20faacab6eae03c860c5d622603f7499ff4 ]

The Rx metadata might use the metadata register C0 to keep the
values. The same register C0 might be used by kernel for source
vport value handling, kernel uses upper half of the register,
leaving the lower half for application usage.

In the extended metadata mode 1 (dv_xmeta_en devarg is
assigned with value 1) the metadata width is 16 bits only,
the Rx datapath code fetched the entire 32-bit value of the
metadata register and presented one to application. The patch
provides data masking depending on the chosen metadata mode.

Fixes: 6c55b622a956 ("net/mlx5: set dynamic flow metadata in Rx queues")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c             |  4 ++++
 drivers/net/mlx5/mlx5_rxtx.c             | 13 +++++++++----
 drivers/net/mlx5/mlx5_rxtx.h             |  1 +
 drivers/net/mlx5/mlx5_rxtx_vec_altivec.h | 11 ++++++-----
 drivers/net/mlx5/mlx5_rxtx_vec_neon.h    | 13 +++++++++----
 drivers/net/mlx5/mlx5_rxtx_vec_sse.h     |  9 +++++----
 6 files changed, 34 insertions(+), 17 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 34dd33ba38..39be15bcd4 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1220,10 +1220,14 @@ mlx5_flow_rxq_dynf_metadata_set(struct rte_eth_dev *dev)
 			data->dynf_meta = 0;
 			data->flow_meta_mask = 0;
 			data->flow_meta_offset = -1;
+			data->flow_meta_port_mask = 0;
 		} else {
 			data->dynf_meta = 1;
 			data->flow_meta_mask = rte_flow_dynf_metadata_mask;
 			data->flow_meta_offset = rte_flow_dynf_metadata_offs;
+			data->flow_meta_port_mask = (uint32_t)~0;
+			if (priv->config.dv_xmeta_en == MLX5_XMETA_MODE_META16)
+				data->flow_meta_port_mask >>= 16;
 		}
 	}
 }
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index fac823ba64..c765314068 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1338,10 +1338,15 @@ rxq_cq_to_mbuf(struct mlx5_rxq_data *rxq, struct rte_mbuf *pkt,
 			}
 		}
 	}
-	if (rxq->dynf_meta && cqe->flow_table_metadata) {
-		pkt->ol_flags |= rxq->flow_meta_mask;
-		*RTE_MBUF_DYNFIELD(pkt, rxq->flow_meta_offset, uint32_t *) =
-			cqe->flow_table_metadata;
+	if (rxq->dynf_meta) {
+		uint32_t meta = cqe->flow_table_metadata &
+				rxq->flow_meta_port_mask;
+
+		if (meta) {
+			pkt->ol_flags |= rxq->flow_meta_mask;
+			*RTE_MBUF_DYNFIELD(pkt, rxq->flow_meta_offset,
+						uint32_t *) = meta;
+		}
 	}
 	if (rxq->csum)
 		pkt->ol_flags |= rxq_cq_to_ol_flags(cqe);
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index c57ccc32ed..7c3c4c0099 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -168,6 +168,7 @@ struct mlx5_rxq_data {
 	uint64_t timestamp_rx_flag; /* Dynamic mbuf flag for timestamp. */
 	uint64_t flow_meta_mask;
 	int32_t flow_meta_offset;
+	uint32_t flow_meta_port_mask;
 	uint32_t rxseg_n; /* Number of split segment descriptions. */
 	struct mlx5_eth_rxseg rxseg[MLX5_MAX_RXQ_NSEG];
 	/* Buffer split segment descriptions - sizes, offsets, pools. */
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
index 48b677e40d..2d1154b624 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
@@ -1221,22 +1221,23 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
 		if (rxq->dynf_meta) {
 			uint64_t flag = rxq->flow_meta_mask;
 			int32_t offs = rxq->flow_meta_offset;
-			uint32_t metadata;
+			uint32_t metadata, mask;
 
+			mask = rxq->flow_meta_port_mask;
 			/* This code is subject for futher optimization. */
-			metadata = cq[pos].flow_table_metadata;
+			metadata = cq[pos].flow_table_metadata & mask;
 			*RTE_MBUF_DYNFIELD(pkts[pos], offs, uint32_t *) =
 								metadata;
 			pkts[pos]->ol_flags |= metadata ? flag : 0ULL;
-			metadata = cq[pos + 1].flow_table_metadata;
+			metadata = cq[pos + 1].flow_table_metadata & mask;
 			*RTE_MBUF_DYNFIELD(pkts[pos + 1], offs, uint32_t *) =
 								metadata;
 			pkts[pos + 1]->ol_flags |= metadata ? flag : 0ULL;
-			metadata = cq[pos + 2].flow_table_metadata;
+			metadata = cq[pos + 2].flow_table_metadata & mask;
 			*RTE_MBUF_DYNFIELD(pkts[pos + 2], offs, uint32_t *) =
 								metadata;
 			pkts[pos + 2]->ol_flags |= metadata ? flag : 0ULL;
-			metadata = cq[pos + 3].flow_table_metadata;
+			metadata = cq[pos + 3].flow_table_metadata & mask;
 			*RTE_MBUF_DYNFIELD(pkts[pos + 3], offs, uint32_t *) =
 								metadata;
 			pkts[pos + 3]->ol_flags |= metadata ? flag : 0ULL;
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
index 4c067d8801..2234fbe6b2 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
@@ -832,19 +832,24 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
 		if (rxq->dynf_meta) {
 			/* This code is subject for futher optimization. */
 			int32_t offs = rxq->flow_meta_offset;
+			uint32_t mask = rxq->flow_meta_port_mask;
 
 			*RTE_MBUF_DYNFIELD(pkts[pos], offs, uint32_t *) =
 				container_of(p0, struct mlx5_cqe,
-					     pkt_info)->flow_table_metadata;
+					     pkt_info)->flow_table_metadata &
+					     mask;
 			*RTE_MBUF_DYNFIELD(pkts[pos + 1], offs, uint32_t *) =
 				container_of(p1, struct mlx5_cqe,
-					     pkt_info)->flow_table_metadata;
+					     pkt_info)->flow_table_metadata &
+					     mask;
 			*RTE_MBUF_DYNFIELD(pkts[pos + 2], offs, uint32_t *) =
 				container_of(p2, struct mlx5_cqe,
-					     pkt_info)->flow_table_metadata;
+					     pkt_info)->flow_table_metadata &
+					     mask;
 			*RTE_MBUF_DYNFIELD(pkts[pos + 3], offs, uint32_t *) =
 				container_of(p3, struct mlx5_cqe,
-					     pkt_info)->flow_table_metadata;
+					     pkt_info)->flow_table_metadata &
+					     mask;
 			if (*RTE_MBUF_DYNFIELD(pkts[pos], offs, uint32_t *))
 				elts[pos]->ol_flags |= rxq->flow_meta_mask;
 			if (*RTE_MBUF_DYNFIELD(pkts[pos + 1], offs, uint32_t *))
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
index 0b3f240e10..c508a7a4f2 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
@@ -768,15 +768,16 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
 		if (rxq->dynf_meta) {
 			/* This code is subject for futher optimization. */
 			int32_t offs = rxq->flow_meta_offset;
+			uint32_t mask = rxq->flow_meta_port_mask;
 
 			*RTE_MBUF_DYNFIELD(pkts[pos], offs, uint32_t *) =
-				cq[pos].flow_table_metadata;
+				cq[pos].flow_table_metadata & mask;
 			*RTE_MBUF_DYNFIELD(pkts[pos + 1], offs, uint32_t *) =
-				cq[pos + p1].flow_table_metadata;
+				cq[pos + p1].flow_table_metadata  & mask;
 			*RTE_MBUF_DYNFIELD(pkts[pos + 2], offs, uint32_t *) =
-				cq[pos + p2].flow_table_metadata;
+				cq[pos + p2].flow_table_metadata & mask;
 			*RTE_MBUF_DYNFIELD(pkts[pos + 3], offs, uint32_t *) =
-				cq[pos + p3].flow_table_metadata;
+				cq[pos + p3].flow_table_metadata & mask;
 			if (*RTE_MBUF_DYNFIELD(pkts[pos], offs, uint32_t *))
 				pkts[pos]->ol_flags |= rxq->flow_meta_mask;
 			if (*RTE_MBUF_DYNFIELD(pkts[pos + 1], offs, uint32_t *))
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.342106500 +0800
+++ 0066-net-mlx5-fix-Rx-metadata-leftovers.patch	2021-05-10 23:59:26.420000000 +0800
@@ -1 +1 @@
-From 4eefb20faacab6eae03c860c5d622603f7499ff4 Mon Sep 17 00:00:00 2001
+From cf10220946182bfd96e5670a2a1ba0f20c58a977 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 4eefb20faacab6eae03c860c5d622603f7499ff4 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -32 +34 @@
-index 773f3e63f4..d46fc333d1 100644
+index 34dd33ba38..39be15bcd4 100644
@@ -35 +37 @@
-@@ -1267,10 +1267,14 @@ mlx5_flow_rxq_dynf_metadata_set(struct rte_eth_dev *dev)
+@@ -1220,10 +1220,14 @@ mlx5_flow_rxq_dynf_metadata_set(struct rte_eth_dev *dev)
@@ -51 +53 @@
-index e3ce9fd224..c76b9951bc 100644
+index fac823ba64..c765314068 100644
@@ -54 +56 @@
-@@ -1388,10 +1388,15 @@ rxq_cq_to_mbuf(struct mlx5_rxq_data *rxq, struct rte_mbuf *pkt,
+@@ -1338,10 +1338,15 @@ rxq_cq_to_mbuf(struct mlx5_rxq_data *rxq, struct rte_mbuf *pkt,
@@ -75 +77 @@
-index 0fd98af9d1..4f0fda0dec 100644
+index c57ccc32ed..7c3c4c0099 100644

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

* [dpdk-stable] patch 'eal: fix comment of OS-specific header files' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (63 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/mlx5: fix Rx metadata leftovers' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'buildtools: fix build with busybox' " Xueming Li
                   ` (162 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Luca Boccassi, Andrew Rybchenko, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/838da3686658edfbb33d842ff48e3cac17474aa9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 838da3686658edfbb33d842ff48e3cac17474aa9 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Thu, 25 Feb 2021 00:16:22 +0100
Subject: [PATCH] eal: fix comment of OS-specific header files
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit bfb42c3777a82717bfc8da0169a932fe344f22b5 ]

The same comment is on top of each rte_os.h file.
It is reworded to remove the mention of "future releases".

Fixes: 428eb983f5f7 ("eal: add OS specific header file")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_eal/freebsd/include/rte_os.h | 5 ++---
 lib/librte_eal/linux/include/rte_os.h   | 5 ++---
 lib/librte_eal/windows/include/rte_os.h | 5 ++---
 3 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/lib/librte_eal/freebsd/include/rte_os.h b/lib/librte_eal/freebsd/include/rte_os.h
index eeb750cd81..c16f2a30e9 100644
--- a/lib/librte_eal/freebsd/include/rte_os.h
+++ b/lib/librte_eal/freebsd/include/rte_os.h
@@ -6,9 +6,8 @@
 #define _RTE_OS_H_
 
 /**
- * This is header should contain any function/macro definition
- * which are not supported natively or named differently in the
- * freebsd OS. Functions will be added in future releases.
+ * This header should contain any definition
+ * which is not supported natively or named differently in FreeBSD.
  */
 
 #include <pthread_np.h>
diff --git a/lib/librte_eal/linux/include/rte_os.h b/lib/librte_eal/linux/include/rte_os.h
index 218d4fa86e..390b87b3a1 100644
--- a/lib/librte_eal/linux/include/rte_os.h
+++ b/lib/librte_eal/linux/include/rte_os.h
@@ -6,9 +6,8 @@
 #define _RTE_OS_H_
 
 /**
- * This is header should contain any function/macro definition
- * which are not supported natively or named differently in the
- * linux OS. Functions will be added in future releases.
+ * This header should contain any definition
+ * which is not supported natively or named differently in Linux.
  */
 
 #include <sched.h>
diff --git a/lib/librte_eal/windows/include/rte_os.h b/lib/librte_eal/windows/include/rte_os.h
index 7ef38ff06c..f0512f20a6 100644
--- a/lib/librte_eal/windows/include/rte_os.h
+++ b/lib/librte_eal/windows/include/rte_os.h
@@ -6,9 +6,8 @@
 #define _RTE_OS_H_
 
 /**
- * This is header should contain any function/macro definition
- * which are not supported natively or named differently in the
- * Windows OS. It must not include Windows-specific headers.
+ * This header should contain any definition
+ * which is not supported natively or named differently in Windows.
  */
 
 #include <stdarg.h>
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.373485800 +0800
+++ 0067-eal-fix-comment-of-OS-specific-header-files.patch	2021-05-10 23:59:26.420000000 +0800
@@ -1 +1 @@
-From bfb42c3777a82717bfc8da0169a932fe344f22b5 Mon Sep 17 00:00:00 2001
+From 838da3686658edfbb33d842ff48e3cac17474aa9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit bfb42c3777a82717bfc8da0169a932fe344f22b5 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'buildtools: fix build with busybox' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (64 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'eal: fix comment of OS-specific header files' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'build: detect execinfo library on Linux' " Xueming Li
                   ` (161 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Luca Boccassi, Bruce Richardson, Andrew Rybchenko,
	David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1555f48f85eebdd5ad37bc2c8b776396cd70c8a2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1555f48f85eebdd5ad37bc2c8b776396cd70c8a2 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Wed, 24 Feb 2021 23:47:56 +0100
Subject: [PATCH] buildtools: fix build with busybox
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit e1ab26df4862143b81719957977988271505198a ]

If using busybox for mktemp and awk (as in Alpine),
some bugs prevent the script from running:

1/ It seems busybox mktemp requires the pattern to have at least
6 X and no other suffix.
The same has been fixed for other scripts in the past:
commit 3771edc35438 ("buildtools: fix build for some mktemp")

2/ It seems busybox awk does not accept the regex ^.*{
except if the opening curly brace is escaped.

Fixes: 4c82473412e8 ("build: add internal tag check")
Fixes: 68b1f1cda5b4 ("build: check AVX512 rather than binutils version")
Fixes: 3290ac14eb94 ("buildtools: detect discrepancies for experimental symbols")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 buildtools/binutils-avx512-check.sh | 2 +-
 buildtools/check-symbols.sh         | 2 +-
 buildtools/map-list-symbol.sh       | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/buildtools/binutils-avx512-check.sh b/buildtools/binutils-avx512-check.sh
index a7e068140f..2a833b64b7 100755
--- a/buildtools/binutils-avx512-check.sh
+++ b/buildtools/binutils-avx512-check.sh
@@ -3,7 +3,7 @@
 # Copyright(c) 2020 Intel Corporation
 
 AS=${AS:-as}
-OBJFILE=$(mktemp -t dpdk.binutils-check.XXXXXX.o)
+OBJFILE=$(mktemp -t dpdk.binutils-check.XXXXXX)
 trap 'rm -f "$OBJFILE"' EXIT
 # from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90028
 GATHER_PARAMS='0x8(,%ymm1,1),%ymm0{%k2}'
diff --git a/buildtools/check-symbols.sh b/buildtools/check-symbols.sh
index e407553a34..83b3a0182f 100755
--- a/buildtools/check-symbols.sh
+++ b/buildtools/check-symbols.sh
@@ -18,7 +18,7 @@ then
 	exit 0
 fi
 
-DUMPFILE=$(mktemp -t dpdk.${0##*/}.XXX.objdump)
+DUMPFILE=$(mktemp -t dpdk.${0##*/}.objdump.XXXXXX)
 trap 'rm -f "$DUMPFILE"' EXIT
 objdump -t $OBJFILE >$DUMPFILE
 
diff --git a/buildtools/map-list-symbol.sh b/buildtools/map-list-symbol.sh
index 5509b4a7fa..3bf9bd66f8 100755
--- a/buildtools/map-list-symbol.sh
+++ b/buildtools/map-list-symbol.sh
@@ -44,7 +44,7 @@ for file in $@; do
 			ret = 1;
 		}
 	}
-	/^.*{/ {
+	/^.*\{/ {
 		if ("'$section'" == "all" || $1 == "'$section'") {
 			current_section = $1;
 		}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.398459600 +0800
+++ 0068-buildtools-fix-build-with-busybox.patch	2021-05-10 23:59:26.420000000 +0800
@@ -1 +1 @@
-From e1ab26df4862143b81719957977988271505198a Mon Sep 17 00:00:00 2001
+From 1555f48f85eebdd5ad37bc2c8b776396cd70c8a2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit e1ab26df4862143b81719957977988271505198a ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'build: detect execinfo library on Linux' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (65 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'buildtools: fix build with busybox' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'build: remove redundant _GNU_SOURCE definitions' " Xueming Li
                   ` (160 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Luca Boccassi, Bruce Richardson, Andrew Rybchenko,
	David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/14702af2e52c0f1046fdb1e0006f09f1fb584b75

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 14702af2e52c0f1046fdb1e0006f09f1fb584b75 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Thu, 25 Feb 2021 02:49:19 +0100
Subject: [PATCH] build: detect execinfo library on Linux
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 1cd512b2f5325c971c5bfdd7715debded986df27 ]

The library execinfo and its header file can be installed on Alpine Linux
where the backtrace feature is not part of musl libc:
	apk add libexecinfo-dev

As a consequence, this library should not be restricted to BSD only.

At the same time, the library and header are detected once and added
globally to be linked with any application, internal or external.

Fixes: 9065b1fac65f ("build: fix dependency on execinfo for BSD meson builds")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 app/meson.build      | 4 ----
 app/test/meson.build | 1 -
 config/meson.build   | 9 ++++++---
 examples/meson.build | 4 +---
 4 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index 87fc195dbf..50a53dbde8 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -21,9 +21,6 @@ apps = [
 	'test-regex',
 	'test-sad']
 
-# for BSD only
-lib_execinfo = cc.find_library('execinfo', required: false)
-
 default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
 default_ldflags = []
 if get_option('default_library') == 'static' and not is_windows
@@ -53,7 +50,6 @@ foreach app:apps
 			dep_objs += get_variable(get_option('default_library')
 				 + '_rte_' + d)
 		endforeach
-		dep_objs += lib_execinfo
 
 		link_libs = []
 		if get_option('default_library') == 'static'
diff --git a/app/test/meson.build b/app/test/meson.build
index bdbc619476..3fdd22de7e 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -424,7 +424,6 @@ foreach d:test_deps
 	def_lib = get_option('default_library')
 	test_dep_objs += get_variable(def_lib + '_rte_' + d)
 endforeach
-test_dep_objs += cc.find_library('execinfo', required: false)
 
 link_libs = []
 if get_option('default_library') == 'static'
diff --git a/config/meson.build b/config/meson.build
index 2f150de3b8..5b7439aefb 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -125,11 +125,8 @@ if cc.find_library('m', required : false).found()
 	dpdk_extra_ldflags += '-lm'
 endif
 
-# for linux link against dl, for bsd execinfo
 if is_linux
 	link_lib = 'dl'
-elif is_freebsd
-	link_lib = 'execinfo'
 else
 	link_lib = ''
 endif
@@ -159,6 +156,12 @@ if fdt_dep.found() and cc.has_header('fdt.h')
 	dpdk_extra_ldflags += '-lfdt'
 endif
 
+libexecinfo = cc.find_library('libexecinfo', required: false)
+if libexecinfo.found() and cc.has_header('execinfo.h')
+	add_project_link_arguments('-lexecinfo', language: 'c')
+	dpdk_extra_ldflags += '-lexecinfo'
+endif
+
 # check for libbsd
 libbsd = dependency('libbsd', required: false, method: 'pkg-config')
 if libbsd.found()
diff --git a/examples/meson.build b/examples/meson.build
index 3fe08d4ca5..d065a6a08b 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -6,8 +6,6 @@ if get_option('default_library') == 'static'
 	link_whole_libs = dpdk_static_libraries + dpdk_drivers
 endif
 
-execinfo = cc.find_library('execinfo', required: false)
-
 # list of all example apps. Keep 1-3 per line, in alphabetical order.
 all_examples = [
 	'bbdev_app', 'bond',
@@ -82,7 +80,7 @@ foreach example: examples
 	cflags = default_cflags
 	ldflags = default_ldflags
 
-	ext_deps = [execinfo]
+	ext_deps = []
 	includes = [include_directories(example)]
 	deps = ['eal', 'mempool', 'net', 'mbuf', 'ethdev', 'cmdline']
 	subdir(example)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.419493400 +0800
+++ 0069-build-detect-execinfo-library-on-Linux.patch	2021-05-10 23:59:26.430000000 +0800
@@ -1 +1 @@
-From 1cd512b2f5325c971c5bfdd7715debded986df27 Mon Sep 17 00:00:00 2001
+From 14702af2e52c0f1046fdb1e0006f09f1fb584b75 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 1cd512b2f5325c971c5bfdd7715debded986df27 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -52 +54 @@
-index 561e493a29..099895fc87 100644
+index bdbc619476..3fdd22de7e 100644
@@ -55 +57 @@
-@@ -426,7 +426,6 @@ foreach d:test_deps
+@@ -424,7 +424,6 @@ foreach d:test_deps
@@ -64 +66 @@
-index 3cf560b8a3..66a2edcc47 100644
+index 2f150de3b8..5b7439aefb 100644
@@ -79 +81 @@
-@@ -166,6 +163,12 @@ if fdt_dep.found() and cc.has_header('fdt.h')
+@@ -159,6 +156,12 @@ if fdt_dep.found() and cc.has_header('fdt.h')

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

* [dpdk-stable] patch 'build: remove redundant _GNU_SOURCE definitions' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (66 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'build: detect execinfo library on Linux' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'eal: fix build with musl' " Xueming Li
                   ` (159 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Luca Boccassi, Andrew Rybchenko, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9c3bb2603c1c964ce8fa3740e9d39ac0cf3ff4ce

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9c3bb2603c1c964ce8fa3740e9d39ac0cf3ff4ce Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Thu, 25 Feb 2021 09:45:06 +0100
Subject: [PATCH] build: remove redundant _GNU_SOURCE definitions
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit e0ae50c6876e899540f6116f8b4f5e5e3dec445f ]

The feature macro _GNU_SOURCE is defined globally,
but there was some remaining useless settings.

The internal definition in config/meson.build is kept,
all other internal definitions of _GNU_SOURCE are removed,
except in examples, which can be built as external applications.
Note: external applications do not inherit of _GNU_SOURCE.

Fixes: 5d7b673d5fd6 ("mk: build with _GNU_SOURCE defined by default")
Fixes: 28188cee2aa0 ("build: enable BSD features visibility for FreeBSD")
Fixes: e6cdc54cc0ef ("net/mlx5: add socket server for external tools")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 app/test/meson.build                     | 2 --
 drivers/bus/fslmc/qbman/include/compat.h | 3 ---
 drivers/common/dpaax/compat.h            | 4 ----
 drivers/common/dpaax/meson.build         | 1 -
 drivers/net/memif/rte_eth_memif.h        | 4 ----
 drivers/net/mlx5/linux/mlx5_socket.c     | 4 ----
 6 files changed, 18 deletions(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index 3fdd22de7e..49fbb5e18e 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -396,8 +396,6 @@ if cc.has_argument('-Wno-format-truncation')
     cflags += '-Wno-format-truncation'
 endif
 
-# specify -D_GNU_SOURCE unconditionally
-cflags += '-D_GNU_SOURCE'
 # Strict-aliasing rules are violated by uint8_t[] to context size casts.
 cflags += '-fno-strict-aliasing'
 
diff --git a/drivers/bus/fslmc/qbman/include/compat.h b/drivers/bus/fslmc/qbman/include/compat.h
index 1ddd69e127..a4471a80af 100644
--- a/drivers/bus/fslmc/qbman/include/compat.h
+++ b/drivers/bus/fslmc/qbman/include/compat.h
@@ -8,9 +8,6 @@
 #ifndef HEADER_COMPAT_H
 #define HEADER_COMPAT_H
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
 #include <stdio.h>
 #include <stdint.h>
 #include <stdlib.h>
diff --git a/drivers/common/dpaax/compat.h b/drivers/common/dpaax/compat.h
index 1a5f36e99e..c69e76ab96 100644
--- a/drivers/common/dpaax/compat.h
+++ b/drivers/common/dpaax/compat.h
@@ -10,10 +10,6 @@
 #define __COMPAT_H
 
 #include <sched.h>
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
 #include <stdint.h>
 #include <stdlib.h>
 #include <stddef.h>
diff --git a/drivers/common/dpaax/meson.build b/drivers/common/dpaax/meson.build
index 4535482701..b7f177a62e 100644
--- a/drivers/common/dpaax/meson.build
+++ b/drivers/common/dpaax/meson.build
@@ -10,7 +10,6 @@ sources = files('dpaax_iova_table.c', 'dpaa_of.c', 'caamflib.c')
 
 includes += include_directories('caamflib')
 
-cflags += ['-D_GNU_SOURCE']
 if cc.has_argument('-Wno-cast-qual')
 	cflags += '-Wno-cast-qual'
 endif
diff --git a/drivers/net/memif/rte_eth_memif.h b/drivers/net/memif/rte_eth_memif.h
index 765a7e5998..7e5c15341e 100644
--- a/drivers/net/memif/rte_eth_memif.h
+++ b/drivers/net/memif/rte_eth_memif.h
@@ -5,10 +5,6 @@
 #ifndef _RTE_ETH_MEMIF_H_
 #define _RTE_ETH_MEMIF_H_
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif				/* GNU_SOURCE */
-
 #include <sys/queue.h>
 
 #include <rte_ethdev_driver.h>
diff --git a/drivers/net/mlx5/linux/mlx5_socket.c b/drivers/net/mlx5/linux/mlx5_socket.c
index 1938453980..b1f41bc102 100644
--- a/drivers/net/mlx5/linux/mlx5_socket.c
+++ b/drivers/net/mlx5/linux/mlx5_socket.c
@@ -2,10 +2,6 @@
  * Copyright 2019 Mellanox Technologies, Ltd
  */
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/un.h>
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.443423200 +0800
+++ 0070-build-remove-redundant-_GNU_SOURCE-definitions.patch	2021-05-10 23:59:26.430000000 +0800
@@ -1 +1 @@
-From e0ae50c6876e899540f6116f8b4f5e5e3dec445f Mon Sep 17 00:00:00 2001
+From 9c3bb2603c1c964ce8fa3740e9d39ac0cf3ff4ce Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit e0ae50c6876e899540f6116f8b4f5e5e3dec445f ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -32 +34 @@
-index 099895fc87..76eaaea457 100644
+index 3fdd22de7e..49fbb5e18e 100644
@@ -35 +37 @@
-@@ -398,8 +398,6 @@ if cc.has_argument('-Wno-format-truncation')
+@@ -396,8 +396,6 @@ if cc.has_argument('-Wno-format-truncation')
@@ -86 +88 @@
-index 24321d3a39..2038bda742 100644
+index 765a7e5998..7e5c15341e 100644
@@ -99 +101 @@
- #include <ethdev_driver.h>
+ #include <rte_ethdev_driver.h>

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

* [dpdk-stable] patch 'eal: fix build with musl' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (67 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'build: remove redundant _GNU_SOURCE definitions' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'common/dpaax/caamflib: " Xueming Li
                   ` (158 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Luca Boccassi, Natanael Copa, Andrew Rybchenko, David Marchand,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/efa745cbb2c3ceed88aec922fb75e386d4e6554b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From efa745cbb2c3ceed88aec922fb75e386d4e6554b Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Thu, 25 Feb 2021 00:21:58 +0100
Subject: [PATCH] eal: fix build with musl
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit e0473c6d5b18560dd11fd4d7ebc81dea6774f33e ]

In musl libc, cpu_set_t is defined only if _GNU_SOURCE is defined.
In case _GNU_SOURCE is undefined, as in eal_common_errno.c,
it was not possible to include rte_os.h which uses cpu_set_t.

This limitation is removed: if CPU_SETSIZE is not defined,
cpu_set_t related definitions and functions are skipped.
Note: such definitions are unneeded in eal_common_errno.c.

Applications which do not define _GNU_SOURCE may miss cpu_set_t related
features on musl. Such case is detected by RTE_HAS_CPUSET being
undefined,
so functions which depend on rte_cpuset_t will be unavailable.

A missing include of fcntl.h is also added.

Bugzilla ID: 35
Fixes: 11b57c698005 ("eal: fix error string function")
Fixes: 176bb37ca6f3 ("eal: introduce internal wrappers for file
operations")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 doc/api/doxy-api.conf.in                | 3 ++-
 lib/librte_eal/freebsd/include/rte_os.h | 1 +
 lib/librte_eal/include/rte_lcore.h      | 8 ++++++++
 lib/librte_eal/linux/include/rte_os.h   | 3 +++
 lib/librte_eal/unix/eal_file.c          | 1 +
 lib/librte_eal/windows/include/sched.h  | 1 +
 lib/librte_telemetry/rte_telemetry.h    | 4 ++++
 7 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/doc/api/doxy-api.conf.in b/doc/api/doxy-api.conf.in
index 5c883b613b..a536bcb493 100644
--- a/doc/api/doxy-api.conf.in
+++ b/doc/api/doxy-api.conf.in
@@ -80,7 +80,8 @@ INPUT                   += @API_EXAMPLES@
 FILE_PATTERNS           = rte_*.h \
                           cmdline.h
 PREDEFINED              = __DOXYGEN__ \
-			   VFIO_PRESENT \
+                          RTE_HAS_CPUSET \
+                          VFIO_PRESENT \
                           __attribute__(x)=
 
 OPTIMIZE_OUTPUT_FOR_C   = YES
diff --git a/lib/librte_eal/freebsd/include/rte_os.h b/lib/librte_eal/freebsd/include/rte_os.h
index c16f2a30e9..627f0483ab 100644
--- a/lib/librte_eal/freebsd/include/rte_os.h
+++ b/lib/librte_eal/freebsd/include/rte_os.h
@@ -13,6 +13,7 @@
 #include <pthread_np.h>
 
 typedef cpuset_t rte_cpuset_t;
+#define RTE_HAS_CPUSET
 #define RTE_CPU_AND(dst, src1, src2) do \
 { \
 	cpuset_t tmp; \
diff --git a/lib/librte_eal/include/rte_lcore.h b/lib/librte_eal/include/rte_lcore.h
index 48b87e253a..a55fd7496d 100644
--- a/lib/librte_eal/include/rte_lcore.h
+++ b/lib/librte_eal/include/rte_lcore.h
@@ -185,6 +185,8 @@ __rte_experimental
 int
 rte_lcore_to_cpu_id(int lcore_id);
 
+#ifdef RTE_HAS_CPUSET
+
 /**
  * @warning
  * @b EXPERIMENTAL: this API may change without prior notice.
@@ -199,6 +201,8 @@ __rte_experimental
 rte_cpuset_t
 rte_lcore_cpuset(unsigned int lcore_id);
 
+#endif /* RTE_HAS_CPUSET */
+
 /**
  * Test if an lcore is enabled.
  *
@@ -357,6 +361,8 @@ __rte_experimental
 void
 rte_lcore_dump(FILE *f);
 
+#ifdef RTE_HAS_CPUSET
+
 /**
  * Set core affinity of the current thread.
  * Support both EAL and non-EAL thread and update TLS.
@@ -378,6 +384,8 @@ int rte_thread_set_affinity(rte_cpuset_t *cpusetp);
  */
 void rte_thread_get_affinity(rte_cpuset_t *cpusetp);
 
+#endif /* RTE_HAS_CPUSET */
+
 /**
  * Set thread names.
  *
diff --git a/lib/librte_eal/linux/include/rte_os.h b/lib/librte_eal/linux/include/rte_os.h
index 390b87b3a1..1618b4df22 100644
--- a/lib/librte_eal/linux/include/rte_os.h
+++ b/lib/librte_eal/linux/include/rte_os.h
@@ -12,7 +12,9 @@
 
 #include <sched.h>
 
+#ifdef CPU_SETSIZE /* may require _GNU_SOURCE */
 typedef cpu_set_t rte_cpuset_t;
+#define RTE_HAS_CPUSET
 #define RTE_CPU_AND(dst, src1, src2) CPU_AND(dst, src1, src2)
 #define RTE_CPU_OR(dst, src1, src2) CPU_OR(dst, src1, src2)
 #define RTE_CPU_FILL(set) do \
@@ -28,5 +30,6 @@ typedef cpu_set_t rte_cpuset_t;
 	RTE_CPU_FILL(&tmp); \
 	CPU_XOR(dst, &tmp, src); \
 } while (0)
+#endif
 
 #endif /* _RTE_OS_H_ */
diff --git a/lib/librte_eal/unix/eal_file.c b/lib/librte_eal/unix/eal_file.c
index 1b26475ba4..ec554e0096 100644
--- a/lib/librte_eal/unix/eal_file.c
+++ b/lib/librte_eal/unix/eal_file.c
@@ -4,6 +4,7 @@
 
 #include <sys/file.h>
 #include <sys/mman.h>
+#include <fcntl.h>
 #include <unistd.h>
 
 #include <rte_errno.h>
diff --git a/lib/librte_eal/windows/include/sched.h b/lib/librte_eal/windows/include/sched.h
index fbe07f742c..ff572b5dcb 100644
--- a/lib/librte_eal/windows/include/sched.h
+++ b/lib/librte_eal/windows/include/sched.h
@@ -28,6 +28,7 @@ extern "C" {
 typedef struct _rte_cpuset_s {
 	long long _bits[_NUM_SETS(CPU_SETSIZE)];
 } rte_cpuset_t;
+#define RTE_HAS_CPUSET
 
 #define CPU_SET(b, s) ((s)->_bits[_WHICH_SET(b)] |= (1LL << _WHICH_BIT(b)))
 
diff --git a/lib/librte_telemetry/rte_telemetry.h b/lib/librte_telemetry/rte_telemetry.h
index 76172222c9..9cd6d0cd4c 100644
--- a/lib/librte_telemetry/rte_telemetry.h
+++ b/lib/librte_telemetry/rte_telemetry.h
@@ -292,6 +292,8 @@ __rte_experimental
 int
 rte_telemetry_register_cmd(const char *cmd, telemetry_cb fn, const char *help);
 
+#ifdef RTE_HAS_CPUSET
+
 /**
  * @internal
  * Initialize Telemetry.
@@ -314,6 +316,8 @@ int
 rte_telemetry_init(const char *runtime_dir, rte_cpuset_t *cpuset,
 		const char **err_str);
 
+#endif /* RTE_HAS_CPUSET */
+
 /**
  * Get a pointer to a container with memory allocated. The container is to be
  * used embedded within an existing telemetry dict/array.
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.467229800 +0800
+++ 0071-eal-fix-build-with-musl.patch	2021-05-10 23:59:26.430000000 +0800
@@ -1 +1 @@
-From e0473c6d5b18560dd11fd4d7ebc81dea6774f33e Mon Sep 17 00:00:00 2001
+From efa745cbb2c3ceed88aec922fb75e386d4e6554b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit e0473c6d5b18560dd11fd4d7ebc81dea6774f33e ]
@@ -15 +18,2 @@
-features on musl. Such case is detected by RTE_HAS_CPUSET being undefined,
+features on musl. Such case is detected by RTE_HAS_CPUSET being
+undefined,
@@ -22,2 +26,2 @@
-Fixes: 176bb37ca6f3 ("eal: introduce internal wrappers for file operations")
-Cc: stable@dpdk.org
+Fixes: 176bb37ca6f3 ("eal: introduce internal wrappers for file
+operations")
@@ -32,2 +36 @@
- lib/librte_eal/include/rte_lcore.h      | 4 ++++
- lib/librte_eal/include/rte_thread.h     | 4 ++++
+ lib/librte_eal/include/rte_lcore.h      | 8 ++++++++
@@ -38 +41 @@
- 8 files changed, 20 insertions(+), 1 deletion(-)
+ 7 files changed, 20 insertions(+), 1 deletion(-)
@@ -41 +44 @@
-index 5eb31508fd..b3c5cdfeca 100644
+index 5c883b613b..a536bcb493 100644
@@ -44 +47 @@
-@@ -81,7 +81,8 @@ INPUT                   += @API_EXAMPLES@
+@@ -80,7 +80,8 @@ INPUT                   += @API_EXAMPLES@
@@ -67 +70 @@
-index 0fe0bd839c..1550b75da0 100644
+index 48b87e253a..a55fd7496d 100644
@@ -70 +73 @@
-@@ -186,6 +186,8 @@ __rte_experimental
+@@ -185,6 +185,8 @@ __rte_experimental
@@ -79 +82 @@
-@@ -200,6 +202,8 @@ __rte_experimental
+@@ -199,6 +201,8 @@ __rte_experimental
@@ -88,7 +91,3 @@
-diff --git a/lib/librte_eal/include/rte_thread.h b/lib/librte_eal/include/rte_thread.h
-index e640ea1857..ac5a89b1ad 100644
---- a/lib/librte_eal/include/rte_thread.h
-+++ b/lib/librte_eal/include/rte_thread.h
-@@ -25,6 +25,8 @@ extern "C" {
-  */
- typedef struct eal_tls_key *rte_tls_key;
+@@ -357,6 +361,8 @@ __rte_experimental
+ void
+ rte_lcore_dump(FILE *f);
@@ -101 +100 @@
-@@ -46,6 +48,8 @@ int rte_thread_set_affinity(rte_cpuset_t *cpusetp);
+@@ -378,6 +384,8 @@ int rte_thread_set_affinity(rte_cpuset_t *cpusetp);
@@ -108,2 +107,2 @@
-  * Create a TLS data key visible to all threads in the process.
-  * the created key is later used to get/set a value.
+  * Set thread names.
+  *
@@ -156 +155 @@
-index f7c8534b82..027b048d78 100644
+index 76172222c9..9cd6d0cd4c 100644
@@ -169 +168 @@
- rte_telemetry_init(const char *runtime_dir, const char *rte_version, rte_cpuset_t *cpuset,
+ rte_telemetry_init(const char *runtime_dir, rte_cpuset_t *cpuset,

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

* [dpdk-stable] patch 'common/dpaax/caamflib: fix build with musl' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (68 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'eal: fix build with musl' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'bus/dpaa: fix 64-bit arch detection' " Xueming Li
                   ` (157 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Natanael Copa
  Cc: Luca Boccassi, Hemant Agrawal, Thomas Monjalon, Andrew Rybchenko,
	David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a4553bb9d242788592ce492eab69711b5d2926b6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a4553bb9d242788592ce492eab69711b5d2926b6 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu, 5 Nov 2020 22:17:14 +0100
Subject: [PATCH] common/dpaax/caamflib: fix build with musl
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 8bf3ff3c37ec1786470dfa7b8056e3304bbba14f ]

The swab16/swab32/swab64 are Linux specific and not GNU libc specific.
Keep the check for __GLIBC__ just in case other GNU systems depends on
this (Hurd or GNU/kFreeBSD).

This fixes a build error with musl libc.

Fixes: 04711d41a872 ("crypto/dpaa2_sec: add run-time assembler for descriptor")

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 drivers/common/dpaax/caamflib/compat.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/common/dpaax/caamflib/compat.h b/drivers/common/dpaax/caamflib/compat.h
index 36ee4b5335..c1a693498d 100644
--- a/drivers/common/dpaax/caamflib/compat.h
+++ b/drivers/common/dpaax/caamflib/compat.h
@@ -11,7 +11,7 @@
 #include <stdint.h>
 #include <errno.h>
 
-#ifdef __GLIBC__
+#ifdef RTE_EXEC_ENV_LINUX
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -24,7 +24,7 @@
 #error "Undefined endianness"
 #endif
 
-#else
+#else /* !RTE_EXEC_ENV_LINUX */
 #error Environment not supported!
 #endif
 
@@ -40,7 +40,7 @@
 #define __maybe_unused __rte_unused
 #endif
 
-#if defined(__GLIBC__) && !defined(pr_debug)
+#if !defined(pr_debug)
 #if !defined(SUPPRESS_PRINTS) && defined(RTA_DEBUG)
 #define pr_debug(fmt, ...) \
 	RTE_LOG(DEBUG, PMD, "%s(): " fmt "\n", __func__, ##__VA_ARGS__)
@@ -49,7 +49,7 @@
 #endif
 #endif /* pr_debug */
 
-#if defined(__GLIBC__) && !defined(pr_err)
+#if !defined(pr_err)
 #if !defined(SUPPRESS_PRINTS)
 #define pr_err(fmt, ...) \
 	RTE_LOG(ERR, PMD, "%s(): " fmt "\n", __func__, ##__VA_ARGS__)
@@ -58,7 +58,7 @@
 #endif
 #endif /* pr_err */
 
-#if defined(__GLIBC__) && !defined(pr_warn)
+#if !defined(pr_warn)
 #if !defined(SUPPRESS_PRINTS)
 #define pr_warn(fmt, ...) \
 	RTE_LOG(WARNING, PMD, "%s(): " fmt "\n", __func__, ##__VA_ARGS__)
@@ -101,7 +101,7 @@
 #endif
 
 /* Use Linux naming convention */
-#ifdef __GLIBC__
+#if defined(RTE_EXEC_ENV_LINUX) || defined(__GLIBC__)
 	#define swab16(x) rte_bswap16(x)
 	#define swab32(x) rte_bswap32(x)
 	#define swab64(x) rte_bswap64(x)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.491346400 +0800
+++ 0072-common-dpaax-caamflib-fix-build-with-musl.patch	2021-05-10 23:59:26.430000000 +0800
@@ -1 +1 @@
-From 8bf3ff3c37ec1786470dfa7b8056e3304bbba14f Mon Sep 17 00:00:00 2001
+From a4553bb9d242788592ce492eab69711b5d2926b6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 8bf3ff3c37ec1786470dfa7b8056e3304bbba14f ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'bus/dpaa: fix 64-bit arch detection' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (69 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'common/dpaax/caamflib: " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'bus/dpaa: fix build with musl' " Xueming Li
                   ` (156 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Natanael Copa
  Cc: Luca Boccassi, Hemant Agrawal, Andrew Rybchenko, David Marchand,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a01c94a0c3b1ecbd48a3cfd1e04e760d8fa9707a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a01c94a0c3b1ecbd48a3cfd1e04e760d8fa9707a Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu, 5 Nov 2020 22:17:13 +0100
Subject: [PATCH] bus/dpaa: fix 64-bit arch detection
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit a4ab65e75beecbebafdca91aa6aac1f091b4460c ]

There is no standard saying that __WORDSIZE should be defined or in
what include it should be defined. Use RTE_ARCH_64 instead.

This solves a warning when building with musl libc:

 warning: "__WORDSIZE" is not defined, evaluates to 0 [-Wundef]

Fixes: 847ee3bd0d1f ("bus/dpaa: support FMAN frame queue lookup")

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 drivers/bus/dpaa/include/fsl_qman.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/dpaa/include/fsl_qman.h b/drivers/bus/dpaa/include/fsl_qman.h
index 10212f0fd5..7ef2f3b2e3 100644
--- a/drivers/bus/dpaa/include/fsl_qman.h
+++ b/drivers/bus/dpaa/include/fsl_qman.h
@@ -16,7 +16,7 @@ extern "C" {
 #include <rte_eventdev.h>
 
 /* FQ lookups (turn this on for 64bit user-space) */
-#if (__WORDSIZE == 64)
+#ifdef RTE_ARCH_64
 #define CONFIG_FSL_QMAN_FQ_LOOKUP
 /* if FQ lookups are supported, this controls the number of initialised,
  * s/w-consumed FQs that can be supported at any one time.
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.514480000 +0800
+++ 0073-bus-dpaa-fix-64-bit-arch-detection.patch	2021-05-10 23:59:26.430000000 +0800
@@ -1 +1 @@
-From a4ab65e75beecbebafdca91aa6aac1f091b4460c Mon Sep 17 00:00:00 2001
+From a01c94a0c3b1ecbd48a3cfd1e04e760d8fa9707a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit a4ab65e75beecbebafdca91aa6aac1f091b4460c ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'bus/dpaa: fix build with musl' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (70 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'bus/dpaa: fix 64-bit arch detection' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/cxgbe: remove use of uint type' " Xueming Li
                   ` (155 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Natanael Copa
  Cc: Luca Boccassi, Thomas Monjalon, Andrew Rybchenko, David Marchand,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/fc4664ada56f15a73045f6222247522c17d3a53f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fc4664ada56f15a73045f6222247522c17d3a53f Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu, 5 Nov 2020 22:17:12 +0100
Subject: [PATCH] bus/dpaa: fix build with musl
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit e9fd4b87f08d4da01ea9bde075f02e702b65a784 ]

The header files argp.h and error.h do not exist in musl libc.

Fix build with musl libc by using err(3) instead of
the GNU-specific error(3).

We could have used the identical errx("...: %s", strerror(ret))` but
strerror(3) is not thread-safe and the strerror_r variant has two
incompatible versions, one GNU specific and one XSI-compliant.
Avoid the mess by letting "err" use the thread-local errno.

This also fixes error message for kzmalloc failures which previously
would always have given "Unknown error -1", since that is what
strerror(-1) returns. Let "err" use the proper error message from errno
which is set by kzalloc.

Fixes: 9d32ef0f5d61 ("bus/dpaa: support creating dynamic HW portal")
Fixes: f09ede6c8fd1 ("bus/dpaa: add BMAN driver core")
Fixes: 5b22cf744689 ("bus/dpaa: introducing FMan configurations")
Fixes: 39f373cf015a ("bus/dpaa: add compatibility and helper macros")

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 drivers/bus/dpaa/base/fman/netcfg_layer.c |  4 ++--
 drivers/bus/dpaa/base/qbman/bman_driver.c | 13 +++++++++----
 drivers/bus/dpaa/base/qbman/qman_driver.c | 17 ++++++++++++-----
 drivers/bus/dpaa/include/netcfg.h         |  1 -
 drivers/common/dpaax/compat.h             |  1 -
 5 files changed, 23 insertions(+), 13 deletions(-)

diff --git a/drivers/bus/dpaa/base/fman/netcfg_layer.c b/drivers/bus/dpaa/base/fman/netcfg_layer.c
index b7009f2299..120deb0bb6 100644
--- a/drivers/bus/dpaa/base/fman/netcfg_layer.c
+++ b/drivers/bus/dpaa/base/fman/netcfg_layer.c
@@ -8,7 +8,7 @@
 #include <dpaa_of.h>
 #include <net/if.h>
 #include <sys/ioctl.h>
-#include <error.h>
+#include <err.h>
 #include <net/if_arp.h>
 #include <assert.h>
 #include <unistd.h>
@@ -90,7 +90,7 @@ netcfg_acquire(void)
 	 */
 	skfd = socket(AF_PACKET, SOCK_RAW, 0);
 	if (unlikely(skfd < 0)) {
-		error(0, errno, "%s(): open(SOCK_RAW)", __func__);
+		err(0, "%s(): open(SOCK_RAW)", __func__);
 		return NULL;
 	}
 
diff --git a/drivers/bus/dpaa/base/qbman/bman_driver.c b/drivers/bus/dpaa/base/qbman/bman_driver.c
index 750b756b93..ee35e03da1 100644
--- a/drivers/bus/dpaa/base/qbman/bman_driver.c
+++ b/drivers/bus/dpaa/base/qbman/bman_driver.c
@@ -11,6 +11,7 @@
 #include <process.h>
 #include "bman_priv.h"
 #include <sys/ioctl.h>
+#include <err.h>
 
 /*
  * Global variables of the max portal/pool number this bman version supported
@@ -40,7 +41,8 @@ static int fsl_bman_portal_init(uint32_t idx, int is_shared)
 	ret = pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t),
 				     &cpuset);
 	if (ret) {
-		error(0, ret, "pthread_getaffinity_np()");
+		errno = ret;
+		err(0, "pthread_getaffinity_np()");
 		return ret;
 	}
 	pcfg.cpu = -1;
@@ -60,7 +62,8 @@ static int fsl_bman_portal_init(uint32_t idx, int is_shared)
 	map.index = idx;
 	ret = process_portal_map(&map);
 	if (ret) {
-		error(0, ret, "process_portal_map()");
+		errno = ret;
+		err(0, "process_portal_map()");
 		return ret;
 	}
 	/* Make the portal's cache-[enabled|inhibited] regions */
@@ -104,8 +107,10 @@ static int fsl_bman_portal_finish(void)
 	cfg = bman_destroy_affine_portal();
 	DPAA_BUG_ON(cfg != &pcfg);
 	ret = process_portal_unmap(&map.addr);
-	if (ret)
-		error(0, ret, "process_portal_unmap()");
+	if (ret) {
+		errno = ret;
+		err(0, "process_portal_unmap()");
+	}
 	return ret;
 }
 
diff --git a/drivers/bus/dpaa/base/qbman/qman_driver.c b/drivers/bus/dpaa/base/qbman/qman_driver.c
index 6d9aaff164..dfbafe581a 100644
--- a/drivers/bus/dpaa/base/qbman/qman_driver.c
+++ b/drivers/bus/dpaa/base/qbman/qman_driver.c
@@ -9,6 +9,8 @@
 #include <process.h>
 #include "qman_priv.h"
 #include <sys/ioctl.h>
+#include <err.h>
+
 #include <rte_branch_prediction.h>
 
 /* Global variable containing revision id (even on non-control plane systems
@@ -50,7 +52,8 @@ static int fsl_qman_portal_init(uint32_t index, int is_shared)
 	map.index = index;
 	ret = process_portal_map(&map);
 	if (ret) {
-		error(0, ret, "process_portal_map()");
+		errno = ret;
+		err(0, "process_portal_map()");
 		return ret;
 	}
 	qpcfg.channel = map.channel;
@@ -96,8 +99,10 @@ static int fsl_qman_portal_finish(void)
 	cfg = qman_destroy_affine_portal(NULL);
 	DPAA_BUG_ON(cfg != &qpcfg);
 	ret = process_portal_unmap(&map.addr);
-	if (ret)
-		error(0, ret, "process_portal_unmap()");
+	if (ret) {
+		errno = ret;
+		err(0, "process_portal_unmap()");
+	}
 	return ret;
 }
 
@@ -146,7 +151,8 @@ struct qman_portal *fsl_qman_fq_portal_create(int *fd)
 
 	q_pcfg = kzalloc((sizeof(struct qm_portal_config)), 0);
 	if (!q_pcfg) {
-		error(0, -1, "q_pcfg kzalloc failed");
+		/* kzalloc sets errno */
+		err(0, "q_pcfg kzalloc failed");
 		return NULL;
 	}
 
@@ -155,7 +161,8 @@ struct qman_portal *fsl_qman_fq_portal_create(int *fd)
 	q_map.index = QBMAN_ANY_PORTAL_IDX;
 	ret = process_portal_map(&q_map);
 	if (ret) {
-		error(0, ret, "process_portal_map()");
+		errno = ret;
+		err(0, "process_portal_map()");
 		kfree(q_pcfg);
 		return NULL;
 	}
diff --git a/drivers/bus/dpaa/include/netcfg.h b/drivers/bus/dpaa/include/netcfg.h
index d7d1befd24..bb18a34e3d 100644
--- a/drivers/bus/dpaa/include/netcfg.h
+++ b/drivers/bus/dpaa/include/netcfg.h
@@ -9,7 +9,6 @@
 #define __NETCFG_H
 
 #include <fman.h>
-#include <argp.h>
 
 /* Configuration information related to a specific ethernet port */
 struct fm_eth_port_cfg {
diff --git a/drivers/common/dpaax/compat.h b/drivers/common/dpaax/compat.h
index c69e76ab96..7166f8cceb 100644
--- a/drivers/common/dpaax/compat.h
+++ b/drivers/common/dpaax/compat.h
@@ -30,7 +30,6 @@
 #include <assert.h>
 #include <dirent.h>
 #include <inttypes.h>
-#include <error.h>
 #include <rte_byteorder.h>
 #include <rte_atomic.h>
 #include <rte_spinlock.h>
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.538785500 +0800
+++ 0074-bus-dpaa-fix-build-with-musl.patch	2021-05-10 23:59:26.430000000 +0800
@@ -1 +1 @@
-From e9fd4b87f08d4da01ea9bde075f02e702b65a784 Mon Sep 17 00:00:00 2001
+From fc4664ada56f15a73045f6222247522c17d3a53f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit e9fd4b87f08d4da01ea9bde075f02e702b65a784 ]
@@ -25 +27,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/cxgbe: remove use of uint type' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (71 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'bus/dpaa: fix build with musl' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/igc: " Xueming Li
                   ` (154 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Natanael Copa
  Cc: Luca Boccassi, Morten Brørup, Andrew Rybchenko,
	David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6bee873fbb8eeb24a43eb5992c42ec9643c62db1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6bee873fbb8eeb24a43eb5992c42ec9643c62db1 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu, 5 Nov 2020 22:17:10 +0100
Subject: [PATCH] net/cxgbe: remove use of uint type
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 3d100ccb2e16087f1ba0ba09274ee1b40b6f0e15 ]

Improve portability by replacing non-standard 'uint' with 'unsigned int'.

This solves the build error with musl libc:

In file included from ../drivers/net/cxgbe/cxgbe.h:9,
                 from ../drivers/net/cxgbe/cxgbe_ethdev.c:37:
../drivers/net/cxgbe/base/common.h:201:4: error: unknown type name 'uint'
  201 |    uint synmapen:1; /* SYN Map Enable */
      |    ^~~~

Fixes: bfcb257d3014 ("net/cxgbe: enable RSS for VF")

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/cxgbe/base/common.h | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/net/cxgbe/base/common.h b/drivers/net/cxgbe/base/common.h
index 8fe8e2a36b..60ba14d044 100644
--- a/drivers/net/cxgbe/base/common.h
+++ b/drivers/net/cxgbe/base/common.h
@@ -201,15 +201,15 @@ struct rss_params {
 	unsigned int mode;			/* RSS mode */
 	union {
 		struct {
-			uint synmapen:1;	/* SYN Map Enable */
-			uint syn4tupenipv6:1;	/* en 4-tuple IPv6 SYNs hash */
-			uint syn2tupenipv6:1;	/* en 2-tuple IPv6 SYNs hash */
-			uint syn4tupenipv4:1;	/* en 4-tuple IPv4 SYNs hash */
-			uint syn2tupenipv4:1;	/* en 2-tuple IPv4 SYNs hash */
-			uint ofdmapen:1;	/* Offload Map Enable */
-			uint tnlmapen:1;	/* Tunnel Map Enable */
-			uint tnlalllookup:1;	/* Tunnel All Lookup */
-			uint hashtoeplitz:1;	/* use Toeplitz hash */
+			unsigned int synmapen:1;      /* SYN Map Enable */
+			unsigned int syn4tupenipv6:1; /* en 4-tuple IPv6 SYNs hash */
+			unsigned int syn2tupenipv6:1; /* en 2-tuple IPv6 SYNs hash */
+			unsigned int syn4tupenipv4:1; /* en 4-tuple IPv4 SYNs hash */
+			unsigned int syn2tupenipv4:1; /* en 2-tuple IPv4 SYNs hash */
+			unsigned int ofdmapen:1;      /* Offload Map Enable */
+			unsigned int tnlmapen:1;      /* Tunnel Map Enable */
+			unsigned int tnlalllookup:1;  /* Tunnel All Lookup */
+			unsigned int hashtoeplitz:1;  /* use Toeplitz hash */
 		} basicvirtual;
 	} u;
 };
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.560741600 +0800
+++ 0075-net-cxgbe-remove-use-of-uint-type.patch	2021-05-10 23:59:26.430000000 +0800
@@ -1 +1 @@
-From 3d100ccb2e16087f1ba0ba09274ee1b40b6f0e15 Mon Sep 17 00:00:00 2001
+From 6bee873fbb8eeb24a43eb5992c42ec9643c62db1 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 3d100ccb2e16087f1ba0ba09274ee1b40b6f0e15 ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -31 +33 @@
-index 202a2f4baf..ab100d784c 100644
+index 8fe8e2a36b..60ba14d044 100644
@@ -34 +36 @@
-@@ -189,15 +189,15 @@ struct rss_params {
+@@ -201,15 +201,15 @@ struct rss_params {

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

* [dpdk-stable] patch 'net/igc: remove use of uint type' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (72 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/cxgbe: remove use of uint type' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'event/dlb: fix header includes for musl' " Xueming Li
                   ` (153 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Luca Boccassi, David Marchand, Haiyue Wang, Andrew Rybchenko,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c8f64e248df92516f13441425381354d5c218d89

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c8f64e248df92516f13441425381354d5c218d89 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Thu, 25 Feb 2021 10:45:09 +0100
Subject: [PATCH] net/igc: remove use of uint type
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit f17c5d7abd91a4c70a8ca82f885e2f930980d22d ]

Improve portability (especially with musl libc)
by replacing the non-standard type 'uint' with 'size_t'.

Fixes: 746664d546fb ("net/igc: support flow API")

Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/igc/igc_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/igc/igc_flow.c b/drivers/net/igc/igc_flow.c
index 1bb64d323c..66053060af 100644
--- a/drivers/net/igc/igc_flow.c
+++ b/drivers/net/igc/igc_flow.c
@@ -656,7 +656,7 @@ igc_parse_action_rss(struct rte_eth_dev *dev,
  * Return the pointer of the flow, or NULL for failed
  **/
 static inline struct rte_flow *
-igc_alloc_flow(const void *filter, enum igc_filter_type type, uint inbytes)
+igc_alloc_flow(const void *filter, enum igc_filter_type type, size_t inbytes)
 {
 	/* allocate memory, 8 bytes boundary aligned */
 	struct rte_flow *flow = rte_malloc("igc flow filter",
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.583312500 +0800
+++ 0076-net-igc-remove-use-of-uint-type.patch	2021-05-10 23:59:26.430000000 +0800
@@ -1 +1 @@
-From f17c5d7abd91a4c70a8ca82f885e2f930980d22d Mon Sep 17 00:00:00 2001
+From c8f64e248df92516f13441425381354d5c218d89 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit f17c5d7abd91a4c70a8ca82f885e2f930980d22d ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'event/dlb: fix header includes for musl' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (73 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/igc: " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'app/testpmd: fix build with " Xueming Li
                   ` (152 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Luca Boccassi, Andrew Rybchenko, David Marchand,
	Timothy McDaniel, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/0999e13c7ac17186daac17054441838a79acbb98

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0999e13c7ac17186daac17054441838a79acbb98 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Fri, 19 Mar 2021 10:20:42 +0100
Subject: [PATCH] event/dlb: fix header includes for musl
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 29420808d05b4e17a52f860bc4d507d689a95efc ]

The header file fcntl.h should not be included from sys/ directory
as done in dlb drivers, it is an error with musl libc.

Fixes: 19980083fd57 ("event/dlb: add eventdev probe")
Fixes: 5433956d5185 ("event/dlb2: add eventdev probe")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
Acked-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
---
 drivers/event/dlb/dlb.c         | 2 +-
 drivers/event/dlb/pf/dlb_pf.c   | 3 ++-
 drivers/event/dlb2/dlb2.c       | 2 +-
 drivers/event/dlb2/pf/dlb2_pf.c | 3 ++-
 4 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/event/dlb/dlb.c b/drivers/event/dlb/dlb.c
index e2d5d43da7..35f4777750 100644
--- a/drivers/event/dlb/dlb.c
+++ b/drivers/event/dlb/dlb.c
@@ -10,7 +10,7 @@
 #include <stdint.h>
 #include <stdio.h>
 #include <string.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
 #include <sys/mman.h>
 #include <unistd.h>
 
diff --git a/drivers/event/dlb/pf/dlb_pf.c b/drivers/event/dlb/pf/dlb_pf.c
index 3aeef6f91d..876c68e51d 100644
--- a/drivers/event/dlb/pf/dlb_pf.c
+++ b/drivers/event/dlb/pf/dlb_pf.c
@@ -6,12 +6,13 @@
 #include <stdbool.h>
 #include <stdio.h>
 #include <sys/mman.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
 #include <sys/time.h>
 #include <errno.h>
 #include <assert.h>
 #include <unistd.h>
 #include <string.h>
+
 #include <rte_debug.h>
 #include <rte_log.h>
 #include <rte_dev.h>
diff --git a/drivers/event/dlb2/dlb2.c b/drivers/event/dlb2/dlb2.c
index 86724863f2..b0ace0e6a1 100644
--- a/drivers/event/dlb2/dlb2.c
+++ b/drivers/event/dlb2/dlb2.c
@@ -11,7 +11,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <sys/mman.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
 
 #include <rte_common.h>
 #include <rte_config.h>
diff --git a/drivers/event/dlb2/pf/dlb2_pf.c b/drivers/event/dlb2/pf/dlb2_pf.c
index 632c4e099f..eed789a38d 100644
--- a/drivers/event/dlb2/pf/dlb2_pf.c
+++ b/drivers/event/dlb2/pf/dlb2_pf.c
@@ -6,12 +6,13 @@
 #include <stdbool.h>
 #include <stdio.h>
 #include <sys/mman.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
 #include <sys/time.h>
 #include <errno.h>
 #include <assert.h>
 #include <unistd.h>
 #include <string.h>
+
 #include <rte_debug.h>
 #include <rte_log.h>
 #include <rte_dev.h>
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.607629400 +0800
+++ 0077-event-dlb-fix-header-includes-for-musl.patch	2021-05-10 23:59:26.430000000 +0800
@@ -1 +1 @@
-From 29420808d05b4e17a52f860bc4d507d689a95efc Mon Sep 17 00:00:00 2001
+From 0999e13c7ac17186daac17054441838a79acbb98 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 29420808d05b4e17a52f860bc4d507d689a95efc ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 1174ab3d2b..60084ced3b 100644
+index e2d5d43da7..35f4777750 100644
@@ -38 +40 @@
-index 2f7e30abbd..5445c2d57d 100644
+index 3aeef6f91d..876c68e51d 100644
@@ -57 +59 @@
-index b28ec58bfb..fb5ff012a4 100644
+index 86724863f2..b0ace0e6a1 100644
@@ -70 +72 @@
-index 1142da5b25..cfb22efe8a 100644
+index 632c4e099f..eed789a38d 100644

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

* [dpdk-stable] patch 'app/testpmd: fix build with musl' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (74 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'event/dlb: fix header includes for musl' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'examples/bbdev: fix header include for " Xueming Li
                   ` (151 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Natanael Copa
  Cc: Luca Boccassi, Morten Brørup, Thomas Monjalon,
	Andrew Rybchenko, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ba7c3d6befb03931531112f69105c880370f497e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ba7c3d6befb03931531112f69105c880370f497e Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu, 5 Nov 2020 22:17:09 +0100
Subject: [PATCH] app/testpmd: fix build with musl
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 3529e8f3a5e62919c6528457c68f0c5c26cfdada ]

1/ Improve portability by avoiding use of non-standard 'uint'.
Use uint8_t for hash_key_len as rss_key_len is a uint8_t type.
This solves following build error when building with musl libc:
    app/test-pmd/testpmd.h:813:29: error: unknown type name 'uint'

2/ In musl libc, stdout is of type (FILE * const).
Because of the const qualifier, a dark magic cast
must be achieved through uintptr_t.

Fixes: 8205e241b2b0 ("app/testpmd: add missing type to RSS hash commands")
Fixes: e977e4199a8d ("app/testpmd: add commands to load/unload BPF filters")

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 app/test-pmd/bpf_cmd.c | 2 +-
 app/test-pmd/config.c  | 2 +-
 app/test-pmd/testpmd.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/bpf_cmd.c b/app/test-pmd/bpf_cmd.c
index 066619e115..6980291f07 100644
--- a/app/test-pmd/bpf_cmd.c
+++ b/app/test-pmd/bpf_cmd.c
@@ -20,7 +20,7 @@ static const struct rte_bpf_xsym bpf_xsym[] = {
 		.name = RTE_STR(stdout),
 		.type = RTE_BPF_XTYPE_VAR,
 		.var = {
-			.val = &stdout,
+			.val = (void *)(uintptr_t)&stdout,
 			.desc = {
 				.type = RTE_BPF_ARG_PTR,
 				.size = sizeof(stdout),
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 336d3e59b1..5f147ec711 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2963,7 +2963,7 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)
 
 void
 port_rss_hash_key_update(portid_t port_id, char rss_type[], uint8_t *hash_key,
-			 uint hash_key_len)
+			 uint8_t hash_key_len)
 {
 	struct rte_eth_rss_conf rss_conf;
 	int diag;
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 2f8f5a92e4..1c276f4644 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -934,7 +934,7 @@ int set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate,
 
 void port_rss_hash_conf_show(portid_t port_id, int show_rss_key);
 void port_rss_hash_key_update(portid_t port_id, char rss_type[],
-			      uint8_t *hash_key, uint hash_key_len);
+			      uint8_t *hash_key, uint8_t hash_key_len);
 int rx_queue_id_is_invalid(queueid_t rxq_id);
 int tx_queue_id_is_invalid(queueid_t txq_id);
 void setup_gro(const char *onoff, portid_t port_id);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.633442500 +0800
+++ 0078-app-testpmd-fix-build-with-musl.patch	2021-05-10 23:59:26.440000000 +0800
@@ -1 +1 @@
-From 3529e8f3a5e62919c6528457c68f0c5c26cfdada Mon Sep 17 00:00:00 2001
+From ba7c3d6befb03931531112f69105c880370f497e Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 3529e8f3a5e62919c6528457c68f0c5c26cfdada ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -47 +49 @@
-index 4ce75a8e73..ef0b9784d0 100644
+index 336d3e59b1..5f147ec711 100644
@@ -50 +52 @@
-@@ -2674,7 +2674,7 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)
+@@ -2963,7 +2963,7 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)
@@ -60 +62 @@
-index af40859170..a87ccb0f0f 100644
+index 2f8f5a92e4..1c276f4644 100644
@@ -63 +65 @@
-@@ -936,7 +936,7 @@ int set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate,
+@@ -934,7 +934,7 @@ int set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate,

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

* [dpdk-stable] patch 'examples/bbdev: fix header include for musl' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (75 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'app/testpmd: fix build with " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'table: fix actions with different data size' " Xueming Li
                   ` (150 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Luca Boccassi, Andrew Rybchenko, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/19bb5235f09feb00737f40d07ce50ab137085dad

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 19bb5235f09feb00737f40d07ce50ab137085dad Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Thu, 25 Feb 2021 09:43:35 +0100
Subject: [PATCH] examples/bbdev: fix header include for musl
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 960f28b2a3b39c143191bd3a5424245fc7dc4cf8 ]

The header file unistd.h should not be included from sys/ directory,
it is an error with musl libc.

Fixes: 1ffee690eaa1 ("examples/bbdev: add sample app")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 examples/bbdev_app/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
index 2e170caf84..20cfd327fb 100644
--- a/examples/bbdev_app/main.c
+++ b/examples/bbdev_app/main.c
@@ -8,7 +8,7 @@
 #include <stdint.h>
 #include <inttypes.h>
 #include <sys/types.h>
-#include <sys/unistd.h>
+#include <unistd.h>
 #include <sys/queue.h>
 #include <stdarg.h>
 #include <ctype.h>
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.659445300 +0800
+++ 0079-examples-bbdev-fix-header-include-for-musl.patch	2021-05-10 23:59:26.440000000 +0800
@@ -1 +1 @@
-From 960f28b2a3b39c143191bd3a5424245fc7dc4cf8 Mon Sep 17 00:00:00 2001
+From 19bb5235f09feb00737f40d07ce50ab137085dad Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 960f28b2a3b39c143191bd3a5424245fc7dc4cf8 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'table: fix actions with different data size' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (76 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'examples/bbdev: fix header include for " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'examples/packet_ordering: fix port configuration' " Xueming Li
                   ` (149 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Cristian Dumitrescu; +Cc: Luca Boccassi, Churchill Khangar, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/67becbfe57c061ec63b785afdbb9bc5f593dffb5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 67becbfe57c061ec63b785afdbb9bc5f593dffb5 Mon Sep 17 00:00:00 2001
From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Date: Wed, 17 Mar 2021 11:42:07 +0000
Subject: [PATCH] table: fix actions with different data size
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 75a09af1b4171f14b15ea3c4bdf5595cb4c4bba5 ]

The table layer provisions an action_id and action_data_size data
bytes for each table key. This action_data_size is a maximal amount,
as some actions (depending on action_id) can require zero or less data
bytes than the maximal action_data_size. This fix allows for actions
with different data sizes to co-exist within the same table.

Fixes: d0a00966618b ("table: add exact match SWX table")

Signed-off-by: Churchill Khangar <churchill.khangar@intel.com>
Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 lib/librte_table/rte_swx_table_em.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/lib/librte_table/rte_swx_table_em.c b/lib/librte_table/rte_swx_table_em.c
index 5f67223060..788e25f6b9 100644
--- a/lib/librte_table/rte_swx_table_em.c
+++ b/lib/librte_table/rte_swx_table_em.c
@@ -337,7 +337,7 @@ bkt_key_install(struct table *t,
 	/* Key data. */
 	bkt_data = table_key_data(t, bkt_key_id);
 	bkt_data[0] = input->action_id;
-	if (t->params.action_data_size)
+	if (t->params.action_data_size && input->action_data)
 		memcpy(&bkt_data[1],
 		       input->action_data,
 		       t->params.action_data_size);
@@ -358,7 +358,7 @@ bkt_key_data_update(struct table *t,
 	/* Key data. */
 	bkt_data = table_key_data(t, bkt_key_id);
 	bkt_data[0] = input->action_id;
-	if (t->params.action_data_size)
+	if (t->params.action_data_size && input->action_data)
 		memcpy(&bkt_data[1],
 		       input->action_data,
 		       t->params.action_data_size);
@@ -485,8 +485,6 @@ table_add(void *table, struct rte_swx_table_entry *entry)
 	CHECK(t, EINVAL);
 	CHECK(entry, EINVAL);
 	CHECK(entry->key, EINVAL);
-	CHECK((!t->params.action_data_size && !entry->action_data) ||
-	      (t->params.action_data_size && entry->action_data), EINVAL);
 
 	input_sig = hash(entry->key, t->key_mask, t->key_size, 0);
 	bkt_id = input_sig & (t->n_buckets - 1);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.684211100 +0800
+++ 0080-table-fix-actions-with-different-data-size.patch	2021-05-10 23:59:26.440000000 +0800
@@ -1 +1 @@
-From 75a09af1b4171f14b15ea3c4bdf5595cb4c4bba5 Mon Sep 17 00:00:00 2001
+From 67becbfe57c061ec63b785afdbb9bc5f593dffb5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 75a09af1b4171f14b15ea3c4bdf5595cb4c4bba5 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'examples/packet_ordering: fix port configuration' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (77 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'table: fix actions with different data size' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'pipeline: fix instruction translation' " Xueming Li
                   ` (148 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Dapeng Yu; +Cc: Luca Boccassi, Reshma Pattan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a8c9a82b541be6ef71e74bf308a9534946cd68e8

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a8c9a82b541be6ef71e74bf308a9534946cd68e8 Mon Sep 17 00:00:00 2001
From: Dapeng Yu <dapengx.yu@intel.com>
Date: Fri, 19 Mar 2021 15:11:18 +0800
Subject: [PATCH] examples/packet_ordering: fix port configuration
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit c99f115bbd9d56630fc5a8d404443e0761684832 ]

A global ethernet port configuration is assigned to local variable
because in this way the local variable may be updated as required. But
this local variable is not used as input of rte_eth_dev_configure() in
original implementation, and cause that fast mbuf free feature cannot
be enabled on port.

This patch use this local variable as input of rte_eth_dev_configure().

Fixes: 6833f919f56b ("examples/packet_ordering: convert to new ethdev offloads API")

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
---
 examples/packet_ordering/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c
index 4bea1982d5..963b11d6de 100644
--- a/examples/packet_ordering/main.c
+++ b/examples/packet_ordering/main.c
@@ -290,7 +290,7 @@ configure_eth_port(uint16_t port_id)
 	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE)
 		port_conf.txmode.offloads |=
 			DEV_TX_OFFLOAD_MBUF_FAST_FREE;
-	ret = rte_eth_dev_configure(port_id, rxRings, txRings, &port_conf_default);
+	ret = rte_eth_dev_configure(port_id, rxRings, txRings, &port_conf);
 	if (ret != 0)
 		return ret;
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.706922800 +0800
+++ 0081-examples-packet_ordering-fix-port-configuration.patch	2021-05-10 23:59:26.440000000 +0800
@@ -1 +1 @@
-From c99f115bbd9d56630fc5a8d404443e0761684832 Mon Sep 17 00:00:00 2001
+From a8c9a82b541be6ef71e74bf308a9534946cd68e8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit c99f115bbd9d56630fc5a8d404443e0761684832 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index ff670747fd..bcbda05f5e 100644
+index 4bea1982d5..963b11d6de 100644
@@ -27 +29 @@
-@@ -297,7 +297,7 @@ configure_eth_port(uint16_t port_id)
+@@ -290,7 +290,7 @@ configure_eth_port(uint16_t port_id)

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

* [dpdk-stable] patch 'pipeline: fix instruction translation' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (78 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'examples/packet_ordering: fix port configuration' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'test: fix autotest handling of skipped tests' " Xueming Li
                   ` (147 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Cristian Dumitrescu; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7c0c4418262554b90f8b5a8ce0ea034703f19a39

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7c0c4418262554b90f8b5a8ce0ea034703f19a39 Mon Sep 17 00:00:00 2001
From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Date: Wed, 24 Mar 2021 11:36:03 +0000
Subject: [PATCH] pipeline: fix instruction translation
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit d366a48f467a973c7453ef1729e97a9d46a380ef ]

The SWX pipeline instructions work with operands of different types:
header fields (h.header.field), packet meta-data (m.field), extern
object mailbox field (e.obj.field), extern function (f.field), action
data read from table entries (t.field), or immediate values; hence the
HMEFTI acronym.

For some pipeline instructions (add/sub, srl/shr, jmplt/jmpgt), only
the H, M and I cases were handled, while the E, F and T cases were
disregarded. This is what we fix here.

Fixes: baf7999303d0 ("pipeline: introduce SWX add instruction")
Fixes: c88c62943818 ("pipeline: introduce SWX subtract instruction")
Fixes: b09ba6d0a3c2 ("pipeline: introduce SWX SHL instruction")
Fixes: e0f51638b715 ("pipeline: introduce SWX SHR instruction")
Fixes: b3947e25bed4 ("pipeline: introduce SWX jump and return instructions")

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 lib/librte_pipeline/rte_swx_pipeline.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/lib/librte_pipeline/rte_swx_pipeline.c b/lib/librte_pipeline/rte_swx_pipeline.c
index eaaed7a0a9..bc619ca533 100644
--- a/lib/librte_pipeline/rte_swx_pipeline.c
+++ b/lib/librte_pipeline/rte_swx_pipeline.c
@@ -3475,9 +3475,9 @@ instr_alu_add_translate(struct rte_swx_pipeline *p,
 	fsrc = struct_field_parse(p, action, src, &src_struct_id);
 	if (fsrc) {
 		instr->type = INSTR_ALU_ADD;
-		if (dst[0] == 'h' && src[0] == 'm')
+		if (dst[0] == 'h' && src[0] != 'h')
 			instr->type = INSTR_ALU_ADD_HM;
-		if (dst[0] == 'm' && src[0] == 'h')
+		if (dst[0] != 'h' && src[0] == 'h')
 			instr->type = INSTR_ALU_ADD_MH;
 		if (dst[0] == 'h' && src[0] == 'h')
 			instr->type = INSTR_ALU_ADD_HH;
@@ -3528,9 +3528,9 @@ instr_alu_sub_translate(struct rte_swx_pipeline *p,
 	fsrc = struct_field_parse(p, action, src, &src_struct_id);
 	if (fsrc) {
 		instr->type = INSTR_ALU_SUB;
-		if (dst[0] == 'h' && src[0] == 'm')
+		if (dst[0] == 'h' && src[0] != 'h')
 			instr->type = INSTR_ALU_SUB_HM;
-		if (dst[0] == 'm' && src[0] == 'h')
+		if (dst[0] != 'h' && src[0] == 'h')
 			instr->type = INSTR_ALU_SUB_MH;
 		if (dst[0] == 'h' && src[0] == 'h')
 			instr->type = INSTR_ALU_SUB_HH;
@@ -3658,9 +3658,9 @@ instr_alu_shl_translate(struct rte_swx_pipeline *p,
 	fsrc = struct_field_parse(p, action, src, &src_struct_id);
 	if (fsrc) {
 		instr->type = INSTR_ALU_SHL;
-		if (dst[0] == 'h' && src[0] == 'm')
+		if (dst[0] == 'h' && src[0] != 'h')
 			instr->type = INSTR_ALU_SHL_HM;
-		if (dst[0] == 'm' && src[0] == 'h')
+		if (dst[0] != 'h' && src[0] == 'h')
 			instr->type = INSTR_ALU_SHL_MH;
 		if (dst[0] == 'h' && src[0] == 'h')
 			instr->type = INSTR_ALU_SHL_HH;
@@ -3711,9 +3711,9 @@ instr_alu_shr_translate(struct rte_swx_pipeline *p,
 	fsrc = struct_field_parse(p, action, src, &src_struct_id);
 	if (fsrc) {
 		instr->type = INSTR_ALU_SHR;
-		if (dst[0] == 'h' && src[0] == 'm')
+		if (dst[0] == 'h' && src[0] != 'h')
 			instr->type = INSTR_ALU_SHR_HM;
-		if (dst[0] == 'm' && src[0] == 'h')
+		if (dst[0] != 'h' && src[0] == 'h')
 			instr->type = INSTR_ALU_SHR_MH;
 		if (dst[0] == 'h' && src[0] == 'h')
 			instr->type = INSTR_ALU_SHR_HH;
@@ -4906,9 +4906,9 @@ instr_jmp_lt_translate(struct rte_swx_pipeline *p,
 	fb = struct_field_parse(p, action, b, &b_struct_id);
 	if (fb) {
 		instr->type = INSTR_JMP_LT;
-		if (a[0] == 'h' && b[0] == 'm')
+		if (a[0] == 'h' && b[0] != 'h')
 			instr->type = INSTR_JMP_LT_HM;
-		if (a[0] == 'm' && b[0] == 'h')
+		if (a[0] != 'h' && b[0] == 'h')
 			instr->type = INSTR_JMP_LT_MH;
 		if (a[0] == 'h' && b[0] == 'h')
 			instr->type = INSTR_JMP_LT_HH;
@@ -4963,9 +4963,9 @@ instr_jmp_gt_translate(struct rte_swx_pipeline *p,
 	fb = struct_field_parse(p, action, b, &b_struct_id);
 	if (fb) {
 		instr->type = INSTR_JMP_GT;
-		if (a[0] == 'h' && b[0] == 'm')
+		if (a[0] == 'h' && b[0] != 'h')
 			instr->type = INSTR_JMP_GT_HM;
-		if (a[0] == 'm' && b[0] == 'h')
+		if (a[0] != 'h' && b[0] == 'h')
 			instr->type = INSTR_JMP_GT_MH;
 		if (a[0] == 'h' && b[0] == 'h')
 			instr->type = INSTR_JMP_GT_HH;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.729110900 +0800
+++ 0082-pipeline-fix-instruction-translation.patch	2021-05-10 23:59:26.440000000 +0800
@@ -1 +1 @@
-From d366a48f467a973c7453ef1729e97a9d46a380ef Mon Sep 17 00:00:00 2001
+From 7c0c4418262554b90f8b5a8ce0ea034703f19a39 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit d366a48f467a973c7453ef1729e97a9d46a380ef ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'test: fix autotest handling of skipped tests' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (79 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'pipeline: fix instruction translation' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/ark: update packet director initial state' " Xueming Li
                   ` (146 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Thinh Tran; +Cc: Luca Boccassi, David Christensen, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d1b41662e0674d590f8170e4cd27d1820284a075

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d1b41662e0674d590f8170e4cd27d1820284a075 Mon Sep 17 00:00:00 2001
From: Thinh Tran <thinhtr@linux.vnet.ibm.com>
Date: Mon, 2 Mar 2020 15:41:32 -0500
Subject: [PATCH] test: fix autotest handling of skipped tests
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit c8c3cfd699a117cf8c070059a606ea12ab030cbb ]

- When running the default configuration of autotest of the make test
  it'd take 900 seconds (15 minutes) for the script TIMEOUT and marks
  Failed for a specific device test that is not supported on the
  system under test.
- Adding the checking for those tests, print out as "Skipped [Not Run]"
  quickly return and continue for next test

Fixes: da0af48a67a5 ("test: add skipped return result")

Signed-off-by: Thinh Tran <thinhtr@linux.vnet.ibm.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
---
 app/test/autotest_test_funcs.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/test/autotest_test_funcs.py b/app/test/autotest_test_funcs.py
index 0811066cb0..6c717bddb4 100644
--- a/app/test/autotest_test_funcs.py
+++ b/app/test/autotest_test_funcs.py
@@ -13,13 +13,16 @@ import pexpect
 def default_autotest(child, test_name):
     child.sendline(test_name)
     result = child.expect(["Test OK", "Test Failed",
-                           "Command not found", pexpect.TIMEOUT], timeout=900)
+                           "Command not found", pexpect.TIMEOUT,
+                           "Test Skipped"], timeout=900)
     if result == 1:
         return -1, "Fail"
     elif result == 2:
         return -1, "Fail [Not found]"
     elif result == 3:
         return -1, "Fail [Timeout]"
+    elif result == 4:
+        return 0, "Skipped [Not Run]"
     return 0, "Success"
 
 # autotest used to run dump commands
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.755222300 +0800
+++ 0083-test-fix-autotest-handling-of-skipped-tests.patch	2021-05-10 23:59:26.440000000 +0800
@@ -1 +1 @@
-From c8c3cfd699a117cf8c070059a606ea12ab030cbb Mon Sep 17 00:00:00 2001
+From d1b41662e0674d590f8170e4cd27d1820284a075 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit c8c3cfd699a117cf8c070059a606ea12ab030cbb ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/ark: update packet director initial state' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (80 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'test: fix autotest handling of skipped tests' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/ark: refactor Rx buffer recovery' " Xueming Li
                   ` (145 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Ed Czeck; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f6beb20cd91f62f127c71ba5499dfaacc0ad0027

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f6beb20cd91f62f127c71ba5499dfaacc0ad0027 Mon Sep 17 00:00:00 2001
From: Ed Czeck <ed.czeck@atomicrules.com>
Date: Thu, 18 Mar 2021 13:36:55 -0400
Subject: [PATCH] net/ark: update packet director initial state
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 3b4f34f6b6071524a3de6a1db316eca65b4804ca ]

Fixes: b33ccdb17f55 ("net/ark: provide API for hardware modules MPU RQP and pktdir")

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
---
 drivers/net/ark/ark_ethdev.c | 1 +
 drivers/net/ark/ark_pktdir.c | 2 +-
 drivers/net/ark/ark_pktdir.h | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index a658993512..0156eeb66e 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -321,6 +321,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 	ark->rqpacing =
 		(struct ark_rqpace_t *)(ark->bar0 + ARK_RCPACING_BASE);
 	ark->started = 0;
+	ark->pkt_dir_v = ARK_PKT_DIR_INIT_VAL;
 
 	ARK_PMD_LOG(INFO, "Sys Ctrl Const = 0x%x  HW Commit_ID: %08x\n",
 		      ark->sysctrl.t32[4],
diff --git a/drivers/net/ark/ark_pktdir.c b/drivers/net/ark/ark_pktdir.c
index 25e1218310..dbfd2924bd 100644
--- a/drivers/net/ark/ark_pktdir.c
+++ b/drivers/net/ark/ark_pktdir.c
@@ -22,7 +22,7 @@ ark_pktdir_init(void *base)
 		return inst;
 	}
 	inst->regs = (struct ark_pkt_dir_regs *)base;
-	inst->regs->ctrl = 0x00110110;	/* POR state */
+	inst->regs->ctrl = ARK_PKT_DIR_INIT_VAL; /* POR state */
 	return inst;
 }
 
diff --git a/drivers/net/ark/ark_pktdir.h b/drivers/net/ark/ark_pktdir.h
index 4afd128f95..b5577cebb3 100644
--- a/drivers/net/ark/ark_pktdir.h
+++ b/drivers/net/ark/ark_pktdir.h
@@ -7,7 +7,7 @@
 
 #include <stdint.h>
 
-#define ARK_PKTDIR_BASE_ADR  0xa0000
+#define ARK_PKT_DIR_INIT_VAL 0x0110
 
 typedef void *ark_pkt_dir_t;
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.777676000 +0800
+++ 0084-net-ark-update-packet-director-initial-state.patch	2021-05-10 23:59:26.440000000 +0800
@@ -1 +1 @@
-From 3b4f34f6b6071524a3de6a1db316eca65b4804ca Mon Sep 17 00:00:00 2001
+From f6beb20cd91f62f127c71ba5499dfaacc0ad0027 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 3b4f34f6b6071524a3de6a1db316eca65b4804ca ]
@@ -7 +9,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
-index ef650a4658..477e1de02d 100644
+index a658993512..0156eeb66e 100644

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

* [dpdk-stable] patch 'net/ark: refactor Rx buffer recovery' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (81 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/ark: update packet director initial state' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'common/sfc_efx: remove GENEVE from supported tunnels' " Xueming Li
                   ` (144 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Ed Czeck; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b22415b70a6c93f459ec48c25f7384da71e380fd

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b22415b70a6c93f459ec48c25f7384da71e380fd Mon Sep 17 00:00:00 2001
From: Ed Czeck <ed.czeck@atomicrules.com>
Date: Thu, 18 Mar 2021 13:36:56 -0400
Subject: [PATCH] net/ark: refactor Rx buffer recovery
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 31d7dded033fc061950312253919237dde07ac63 ]

Allocate mbufs for Rx path in bulk of at least 64 buffers
to improve performance. Allow recovery even without
a Rx operation to support lack of buffers in pool.

Fixes: be410a861598 ("net/ark: add recovery for lack of mbufs")

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
---
 drivers/net/ark/ark_ethdev_rx.c | 49 ++++++++-------------------------
 1 file changed, 11 insertions(+), 38 deletions(-)

diff --git a/drivers/net/ark/ark_ethdev_rx.c b/drivers/net/ark/ark_ethdev_rx.c
index d29d3db783..8e55b851a2 100644
--- a/drivers/net/ark/ark_ethdev_rx.c
+++ b/drivers/net/ark/ark_ethdev_rx.c
@@ -26,9 +26,6 @@ static uint32_t eth_ark_rx_jumbo(struct ark_rx_queue *queue,
 				 struct rte_mbuf *mbuf0,
 				 uint32_t cons_index);
 static inline int eth_ark_rx_seed_mbufs(struct ark_rx_queue *queue);
-static int eth_ark_rx_seed_recovery(struct ark_rx_queue *queue,
-				    uint32_t *pnb,
-				    struct rte_mbuf **mbufs);
 
 /* ************************************************************************* */
 struct ark_rx_queue {
@@ -54,7 +51,7 @@ struct ark_rx_queue {
 	/* The queue Index is used within the dpdk device structures */
 	uint16_t queue_index;
 
-	uint32_t last_cons;
+	uint32_t unused;
 
 	/* separate cache line */
 	/* second cache line - fields only used in slow path */
@@ -105,9 +102,8 @@ static inline void
 eth_ark_rx_update_cons_index(struct ark_rx_queue *queue, uint32_t cons_index)
 {
 	queue->cons_index = cons_index;
-	eth_ark_rx_seed_mbufs(queue);
-	if (((cons_index - queue->last_cons) >= 64U)) {
-		queue->last_cons = cons_index;
+	if ((cons_index + queue->queue_size - queue->seed_index) >= 64U) {
+		eth_ark_rx_seed_mbufs(queue);
 		ark_mpu_set_producer(queue->mpu, queue->seed_index);
 	}
 }
@@ -321,9 +317,7 @@ eth_ark_recv_pkts(void *rx_queue,
 			break;
 	}
 
-	if (unlikely(nb != 0))
-		/* report next free to FPGA */
-		eth_ark_rx_update_cons_index(queue, cons_index);
+	eth_ark_rx_update_cons_index(queue, cons_index);
 
 	return nb;
 }
@@ -458,11 +452,13 @@ eth_ark_rx_seed_mbufs(struct ark_rx_queue *queue)
 	int status = rte_pktmbuf_alloc_bulk(queue->mb_pool, mbufs, nb);
 
 	if (unlikely(status != 0)) {
-		/* Try to recover from lack of mbufs in pool */
-		status = eth_ark_rx_seed_recovery(queue, &nb, mbufs);
-		if (unlikely(status != 0)) {
-			return -1;
-		}
+		ARK_PMD_LOG(NOTICE,
+			    "Could not allocate %u mbufs from pool"
+			    " for RX queue %u;"
+			    " %u free buffers remaining in queue\n",
+			    nb, queue->queue_index,
+			    queue->seed_index - queue->cons_index);
+		return -1;
 	}
 
 	if (ARK_DEBUG_CORE) {		/* DEBUG */
@@ -511,29 +507,6 @@ eth_ark_rx_seed_mbufs(struct ark_rx_queue *queue)
 	return 0;
 }
 
-int
-eth_ark_rx_seed_recovery(struct ark_rx_queue *queue,
-			 uint32_t *pnb,
-			 struct rte_mbuf **mbufs)
-{
-	int status = -1;
-
-	/* Ignore small allocation failures */
-	if (*pnb <= 64)
-		return -1;
-
-	*pnb = 64U;
-	status = rte_pktmbuf_alloc_bulk(queue->mb_pool, mbufs, *pnb);
-	if (status != 0) {
-		ARK_PMD_LOG(NOTICE,
-			    "ARK: Could not allocate %u mbufs from pool for RX queue %u;"
-			    " %u free buffers remaining in queue\n",
-			    *pnb, queue->queue_index,
-			    queue->seed_index - queue->cons_index);
-	}
-	return status;
-}
-
 void
 eth_ark_rx_dump_queue(struct rte_eth_dev *dev, uint16_t queue_id,
 		      const char *msg)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.800876700 +0800
+++ 0085-net-ark-refactor-Rx-buffer-recovery.patch	2021-05-10 23:59:26.440000000 +0800
@@ -1 +1 @@
-From 31d7dded033fc061950312253919237dde07ac63 Mon Sep 17 00:00:00 2001
+From b22415b70a6c93f459ec48c25f7384da71e380fd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 31d7dded033fc061950312253919237dde07ac63 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'common/sfc_efx: remove GENEVE from supported tunnels' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (82 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/ark: refactor Rx buffer recovery' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'app/testpmd: fix NVGRE encap configuration' " Xueming Li
                   ` (143 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/516cebd9dd83ebc6ec2a70b97d8859cdd1683cc2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 516cebd9dd83ebc6ec2a70b97d8859cdd1683cc2 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Date: Thu, 11 Mar 2021 15:25:39 +0300
Subject: [PATCH] common/sfc_efx: remove GENEVE from supported tunnels
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit db4a78b53f1f4969c52b774915466f65bfa01139 ]

The first GA of the SN1022 does not support Geneve.

Fixes: d874d2a149ed ("common/sfc_efx/base: support UDP tunnel operations for EF100")

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/common/sfc_efx/base/rhead_nic.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/common/sfc_efx/base/rhead_nic.c b/drivers/common/sfc_efx/base/rhead_nic.c
index 92bc6fdfae..27ce1d6674 100644
--- a/drivers/common/sfc_efx/base/rhead_nic.c
+++ b/drivers/common/sfc_efx/base/rhead_nic.c
@@ -28,7 +28,6 @@ rhead_board_cfg(
 	 */
 	encp->enc_tunnel_encapsulations_supported =
 	    (1u << EFX_TUNNEL_PROTOCOL_VXLAN) |
-	    (1u << EFX_TUNNEL_PROTOCOL_GENEVE) |
 	    (1u << EFX_TUNNEL_PROTOCOL_NVGRE);
 
 	/*
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.823911900 +0800
+++ 0086-common-sfc_efx-remove-GENEVE-from-supported-tunnels.patch	2021-05-10 23:59:26.440000000 +0800
@@ -1 +1 @@
-From db4a78b53f1f4969c52b774915466f65bfa01139 Mon Sep 17 00:00:00 2001
+From 516cebd9dd83ebc6ec2a70b97d8859cdd1683cc2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit db4a78b53f1f4969c52b774915466f65bfa01139 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
-index ce087debd7..f2c18c1dcc 100644
+index 92bc6fdfae..27ce1d6674 100644

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

* [dpdk-stable] patch 'app/testpmd: fix NVGRE encap configuration' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (83 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'common/sfc_efx: remove GENEVE from supported tunnels' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix Tx timestamp init' " Xueming Li
                   ` (142 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Jiawei Wang; +Cc: Luca Boccassi, Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/763cb5c708a1ccbae67442ddb6b18e3768204947

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 763cb5c708a1ccbae67442ddb6b18e3768204947 Mon Sep 17 00:00:00 2001
From: Jiawei Wang <jiaweiw@nvidia.com>
Date: Tue, 16 Mar 2021 06:18:27 +0200
Subject: [PATCH] app/testpmd: fix NVGRE encap configuration
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 9b0da816bdec98c0d6c5d17ccdd337bdbafc3f75 ]

For NVGRE protocol, the default value of 'c_k_s_rsvd0_ver'
must be 0x2000, and protocol type must be 0x6558 in the NVGRE
header.

This patch updates these two configurations while parsing the nvgre
encap.

Fixes: dcd962fc6b4e ("app/testpmd: add NVGRE encap/decap")

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 app/test-pmd/cmdline_flow.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index de80924e7c..c67ac71505 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -5203,6 +5203,8 @@ parse_vc_action_nvgre_encap(struct context *ctx, const struct token *token,
 		       .src_addr = nvgre_encap_conf.ipv4_src,
 		       .dst_addr = nvgre_encap_conf.ipv4_dst,
 		},
+		.item_nvgre.c_k_s_rsvd0_ver = RTE_BE16(0x2000),
+		.item_nvgre.protocol = RTE_BE16(RTE_ETHER_TYPE_TEB),
 		.item_nvgre.flow_id = 0,
 	};
 	memcpy(action_nvgre_encap_data->item_eth.dst.addr_bytes,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.846247000 +0800
+++ 0087-app-testpmd-fix-NVGRE-encap-configuration.patch	2021-05-10 23:59:26.450000000 +0800
@@ -1 +1 @@
-From 9b0da816bdec98c0d6c5d17ccdd337bdbafc3f75 Mon Sep 17 00:00:00 2001
+From 763cb5c708a1ccbae67442ddb6b18e3768204947 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 9b0da816bdec98c0d6c5d17ccdd337bdbafc3f75 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 49d9f9c043..2c40c6996e 100644
+index de80924e7c..c67ac71505 100644
@@ -26 +28 @@
-@@ -5439,6 +5439,8 @@ parse_vc_action_nvgre_encap(struct context *ctx, const struct token *token,
+@@ -5203,6 +5203,8 @@ parse_vc_action_nvgre_encap(struct context *ctx, const struct token *token,

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

* [dpdk-stable] patch 'net/bnxt: fix Tx timestamp init' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (84 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'app/testpmd: fix NVGRE encap configuration' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix PCI write check' " Xueming Li
                   ` (141 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Somnath Kotur
  Cc: Luca Boccassi, Kalesh AP, Lance Richardson, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2b68ea0468f2d983ebdd9563b2fb846ae343c5c0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2b68ea0468f2d983ebdd9563b2fb846ae343c5c0 Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Tue, 16 Mar 2021 11:10:48 +0530
Subject: [PATCH] net/bnxt: fix Tx timestamp init
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit aa764bae8d66856caad976c5e7d4b415c3158179 ]

Fix to read the sequence ID register to get Tx timestamp.
Reading the sequence ID register is necessary for the HW FIFO to
advance and thereby get the correct value of the timestamp on Tx side.
This patch fixes that.

Fixes: b11cceb83a34 ("net/bnxt: support timesync")

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

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 9252352416..780bbe72da 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3176,6 +3176,7 @@ static int bnxt_get_tx_ts(struct bnxt *bp, uint64_t *ts)
 				ptp->tx_mapped_regs[BNXT_PTP_TX_TS_L]));
 	*ts |= (uint64_t)rte_le_to_cpu_32(rte_read32((uint8_t *)bp->bar0 +
 				ptp->tx_mapped_regs[BNXT_PTP_TX_TS_H])) << 32;
+	rte_read32((uint8_t *)bp->bar0 + ptp->tx_mapped_regs[BNXT_PTP_TX_SEQ]);
 
 	return 0;
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.874008500 +0800
+++ 0088-net-bnxt-fix-Tx-timestamp-init.patch	2021-05-10 23:59:26.450000000 +0800
@@ -1 +1 @@
-From aa764bae8d66856caad976c5e7d4b415c3158179 Mon Sep 17 00:00:00 2001
+From 2b68ea0468f2d983ebdd9563b2fb846ae343c5c0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit aa764bae8d66856caad976c5e7d4b415c3158179 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index f1dd40591f..57a409c0b7 100644
+index 9252352416..780bbe72da 100644
@@ -26 +28 @@
-@@ -3377,6 +3377,7 @@ static int bnxt_get_tx_ts(struct bnxt *bp, uint64_t *ts)
+@@ -3176,6 +3176,7 @@ static int bnxt_get_tx_ts(struct bnxt *bp, uint64_t *ts)

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

* [dpdk-stable] patch 'net/bnxt: fix PCI write check' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (85 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix Tx timestamp init' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix RSS context cleanup' " Xueming Li
                   ` (140 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Luca Boccassi, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/832c6464ce64a23d13031893868b46a9e4424590

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 832c6464ce64a23d13031893868b46a9e4424590 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 16 Mar 2021 11:11:25 +0530
Subject: [PATCH] net/bnxt: fix PCI write check
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit fcf953791c5c72a22741969071265b74d647c08f ]

CID 363716 (#1 of 1): Unchecked return value (CHECKED_RETURN)
check_return: Calling rte_pci_write_config without checking
return value (as is done elsewhere 46 out of 49 times).

Coverity issue: 363716
Fixes: be14720def9c ("net/bnxt: support FW reset")

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

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 780bbe72da..f0de380271 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3656,13 +3656,19 @@ static void bnxt_write_fw_reset_reg(struct bnxt *bp, uint32_t index)
 	uint32_t val = info->reset_reg_val[index];
 	uint32_t reg = info->reset_reg[index];
 	uint32_t type, offset;
+	int ret;
 
 	type = BNXT_FW_STATUS_REG_TYPE(reg);
 	offset = BNXT_FW_STATUS_REG_OFF(reg);
 
 	switch (type) {
 	case BNXT_FW_STATUS_REG_TYPE_CFG:
-		rte_pci_write_config(bp->pdev, &val, sizeof(val), offset);
+		ret = rte_pci_write_config(bp->pdev, &val, sizeof(val), offset);
+		if (ret < 0) {
+			PMD_DRV_LOG(ERR, "Failed to write %#x at PCI offset %#x",
+				    val, offset);
+			return;
+		}
 		break;
 	case BNXT_FW_STATUS_REG_TYPE_GRC:
 		offset = bnxt_map_reset_regs(bp, offset);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.900942400 +0800
+++ 0089-net-bnxt-fix-PCI-write-check.patch	2021-05-10 23:59:26.450000000 +0800
@@ -1 +1 @@
-From fcf953791c5c72a22741969071265b74d647c08f Mon Sep 17 00:00:00 2001
+From 832c6464ce64a23d13031893868b46a9e4424590 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit fcf953791c5c72a22741969071265b74d647c08f ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 57a409c0b7..1997783a7d 100644
+index 780bbe72da..f0de380271 100644
@@ -24 +26 @@
-@@ -3861,13 +3861,19 @@ static void bnxt_write_fw_reset_reg(struct bnxt *bp, uint32_t index)
+@@ -3656,13 +3656,19 @@ static void bnxt_write_fw_reset_reg(struct bnxt *bp, uint32_t index)

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

* [dpdk-stable] patch 'net/bnxt: fix RSS context cleanup' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (86 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix PCI write check' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix link state operations' " Xueming Li
                   ` (139 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/88f2faa23cb3c3fd054f9b283eae65b6e2f98ee0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 88f2faa23cb3c3fd054f9b283eae65b6e2f98ee0 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Mon, 15 Mar 2021 22:42:40 -0700
Subject: [PATCH] net/bnxt: fix RSS context cleanup
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 670ab553841b2f2bbf59667465855b0869eea86b ]

The PMD is allocating an extra RSS context with each port start.
But it is freeing only one RSS context during port stop. So at some point
we run out of RSS contexts when we do multiple port stop/start sequences.
bnxt_hwrm_vnic_ctx_alloc() is called by bnxt_setup_one_vnic(), but
bnxt_hwrm_vnic_ctx_free() is not called in the corresponding
bnxt_free_one_vnic().

Fix this by calling bnxt_hwrm_vnic_ctx_free() in bnxt_free_one_vnic().

Fixes: 7fe5668d2ea3 ("net/bnxt: support VLAN filter and strip")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index f0de380271..86c36e46d9 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2425,6 +2425,10 @@ static int bnxt_free_one_vnic(struct bnxt *bp, uint16_t vnic_id)
 	}
 	bnxt_del_dflt_mac_filter(bp, vnic);
 
+	rc = bnxt_hwrm_vnic_ctx_free(bp, vnic);
+	if (rc)
+		return rc;
+
 	rc = bnxt_hwrm_vnic_free(bp, vnic);
 	if (rc)
 		return rc;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.927055800 +0800
+++ 0090-net-bnxt-fix-RSS-context-cleanup.patch	2021-05-10 23:59:26.450000000 +0800
@@ -1 +1 @@
-From 670ab553841b2f2bbf59667465855b0869eea86b Mon Sep 17 00:00:00 2001
+From 88f2faa23cb3c3fd054f9b283eae65b6e2f98ee0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 670ab553841b2f2bbf59667465855b0869eea86b ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 1997783a7d..ff92f999db 100644
+index f0de380271..86c36e46d9 100644
@@ -27 +29 @@
-@@ -2531,6 +2531,10 @@ static int bnxt_free_one_vnic(struct bnxt *bp, uint16_t vnic_id)
+@@ -2425,6 +2425,10 @@ static int bnxt_free_one_vnic(struct bnxt *bp, uint16_t vnic_id)

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

* [dpdk-stable] patch 'net/bnxt: fix link state operations' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (87 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix RSS context cleanup' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix timesync when PTP is not supported' " Xueming Li
                   ` (138 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Luca Boccassi, Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/23f07e5fdcd49a5c46124cc840de4eca6586a661

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 23f07e5fdcd49a5c46124cc840de4eca6586a661 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 18 Mar 2021 15:05:22 +0530
Subject: [PATCH] net/bnxt: fix link state operations
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 586d9da38aaa19bfe2e804c4038c3d0ec0a3ef99 ]

VFs does not have the privilege to change link configuration.
But the driver silently returns success to these ethdev callbacks
without actually issuing the HWRM command to bring the link up/down.

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

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

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 86c36e46d9..d70e37ca60 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1261,6 +1261,9 @@ static int bnxt_dev_set_link_up_op(struct rte_eth_dev *eth_dev)
 	struct bnxt *bp = eth_dev->data->dev_private;
 	int rc = 0;
 
+	if (!BNXT_SINGLE_PF(bp))
+		return -ENOTSUP;
+
 	if (!bp->link_info->link_up)
 		rc = bnxt_set_hwrm_link_config(bp, true);
 	if (!rc)
@@ -1274,6 +1277,9 @@ static int bnxt_dev_set_link_down_op(struct rte_eth_dev *eth_dev)
 {
 	struct bnxt *bp = eth_dev->data->dev_private;
 
+	if (!BNXT_SINGLE_PF(bp))
+		return -ENOTSUP;
+
 	eth_dev->data->dev_link.link_status = 0;
 	bnxt_set_hwrm_link_config(bp, false);
 	bp->link_info->link_up = 0;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.952326300 +0800
+++ 0091-net-bnxt-fix-link-state-operations.patch	2021-05-10 23:59:26.450000000 +0800
@@ -1 +1 @@
-From 586d9da38aaa19bfe2e804c4038c3d0ec0a3ef99 Mon Sep 17 00:00:00 2001
+From 23f07e5fdcd49a5c46124cc840de4eca6586a661 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 586d9da38aaa19bfe2e804c4038c3d0ec0a3ef99 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index ff92f999db..4bdc8223d3 100644
+index 86c36e46d9..d70e37ca60 100644
@@ -24 +26 @@
-@@ -1268,6 +1268,9 @@ static int bnxt_dev_set_link_up_op(struct rte_eth_dev *eth_dev)
+@@ -1261,6 +1261,9 @@ static int bnxt_dev_set_link_up_op(struct rte_eth_dev *eth_dev)
@@ -34 +36 @@
-@@ -1281,6 +1284,9 @@ static int bnxt_dev_set_link_down_op(struct rte_eth_dev *eth_dev)
+@@ -1274,6 +1277,9 @@ static int bnxt_dev_set_link_down_op(struct rte_eth_dev *eth_dev)

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

* [dpdk-stable] patch 'net/bnxt: fix timesync when PTP is not supported' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (88 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix link state operations' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix Rx buffer posting' " Xueming Li
                   ` (137 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Luca Boccassi, Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6260a81282190cf7e019ada470ea062a321f302c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6260a81282190cf7e019ada470ea062a321f302c Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 18 Mar 2021 15:05:23 +0530
Subject: [PATCH] net/bnxt: fix timesync when PTP is not supported
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit ab15dd5a1c4d563e80b10e42e39c4d2f010fa389 ]

Fixed to return error when PTP support is not supported on the port.
Also, removed an unnecessary check inside bnxt_get_rx_ts().

Fixes: b11cceb83a34 ("net/bnxt: support timesync")

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_ethdev.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index d70e37ca60..b719cd74c4 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3198,9 +3198,6 @@ static int bnxt_get_rx_ts(struct bnxt *bp, uint64_t *ts)
 	uint16_t port_id;
 	uint32_t fifo;
 
-	if (!ptp)
-		return -ENODEV;
-
 	fifo = rte_le_to_cpu_32(rte_read32((uint8_t *)bp->bar0 +
 				ptp->rx_mapped_regs[BNXT_PTP_RX_FIFO]));
 	if (!(fifo & BNXT_PTP_RX_FIFO_PENDING))
@@ -3233,7 +3230,7 @@ bnxt_timesync_write_time(struct rte_eth_dev *dev, const struct timespec *ts)
 	struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
 
 	if (!ptp)
-		return 0;
+		return -ENOTSUP;
 
 	ns = rte_timespec_to_ns(ts);
 	/* Set the timecounters to a new value. */
@@ -3253,7 +3250,7 @@ bnxt_timesync_read_time(struct rte_eth_dev *dev, struct timespec *ts)
 	int rc = 0;
 
 	if (!ptp)
-		return 0;
+		return -ENOTSUP;
 
 	if (BNXT_CHIP_THOR(bp))
 		rc = bnxt_hwrm_port_ts_query(bp, BNXT_PTP_FLAGS_CURRENT_TIME,
@@ -3275,7 +3272,7 @@ bnxt_timesync_enable(struct rte_eth_dev *dev)
 	int rc;
 
 	if (!ptp)
-		return 0;
+		return -ENOTSUP;
 
 	ptp->rx_filter = 1;
 	ptp->tx_tstamp_en = 1;
@@ -3314,7 +3311,7 @@ bnxt_timesync_disable(struct rte_eth_dev *dev)
 	struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
 
 	if (!ptp)
-		return 0;
+		return -ENOTSUP;
 
 	ptp->rx_filter = 0;
 	ptp->tx_tstamp_en = 0;
@@ -3339,7 +3336,7 @@ bnxt_timesync_read_rx_timestamp(struct rte_eth_dev *dev,
 	uint64_t ns;
 
 	if (!ptp)
-		return 0;
+		return -ENOTSUP;
 
 	if (BNXT_CHIP_THOR(bp))
 		rx_tstamp_cycles = ptp->rx_timestamp;
@@ -3362,7 +3359,7 @@ bnxt_timesync_read_tx_timestamp(struct rte_eth_dev *dev,
 	int rc = 0;
 
 	if (!ptp)
-		return 0;
+		return -ENOTSUP;
 
 	if (BNXT_CHIP_THOR(bp))
 		rc = bnxt_hwrm_port_ts_query(bp, BNXT_PTP_FLAGS_PATH_TX,
@@ -3383,7 +3380,7 @@ bnxt_timesync_adjust_time(struct rte_eth_dev *dev, int64_t delta)
 	struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
 
 	if (!ptp)
-		return 0;
+		return -ENOTSUP;
 
 	ptp->tc.nsec += delta;
 	ptp->tx_tstamp_tc.nsec += delta;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:28.978051400 +0800
+++ 0092-net-bnxt-fix-timesync-when-PTP-is-not-supported.patch	2021-05-10 23:59:26.460000000 +0800
@@ -1 +1 @@
-From ab15dd5a1c4d563e80b10e42e39c4d2f010fa389 Mon Sep 17 00:00:00 2001
+From 6260a81282190cf7e019ada470ea062a321f302c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit ab15dd5a1c4d563e80b10e42e39c4d2f010fa389 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 4bdc8223d3..646cc94bd8 100644
+index d70e37ca60..b719cd74c4 100644
@@ -23 +25 @@
-@@ -3399,9 +3399,6 @@ static int bnxt_get_rx_ts(struct bnxt *bp, uint64_t *ts)
+@@ -3198,9 +3198,6 @@ static int bnxt_get_rx_ts(struct bnxt *bp, uint64_t *ts)
@@ -33 +35 @@
-@@ -3434,7 +3431,7 @@ bnxt_timesync_write_time(struct rte_eth_dev *dev, const struct timespec *ts)
+@@ -3233,7 +3230,7 @@ bnxt_timesync_write_time(struct rte_eth_dev *dev, const struct timespec *ts)
@@ -42 +44 @@
-@@ -3454,7 +3451,7 @@ bnxt_timesync_read_time(struct rte_eth_dev *dev, struct timespec *ts)
+@@ -3253,7 +3250,7 @@ bnxt_timesync_read_time(struct rte_eth_dev *dev, struct timespec *ts)
@@ -49 +51 @@
- 	if (BNXT_CHIP_P5(bp))
+ 	if (BNXT_CHIP_THOR(bp))
@@ -51 +53 @@
-@@ -3476,7 +3473,7 @@ bnxt_timesync_enable(struct rte_eth_dev *dev)
+@@ -3275,7 +3272,7 @@ bnxt_timesync_enable(struct rte_eth_dev *dev)
@@ -60 +62 @@
-@@ -3517,7 +3514,7 @@ bnxt_timesync_disable(struct rte_eth_dev *dev)
+@@ -3314,7 +3311,7 @@ bnxt_timesync_disable(struct rte_eth_dev *dev)
@@ -69 +71 @@
-@@ -3544,7 +3541,7 @@ bnxt_timesync_read_rx_timestamp(struct rte_eth_dev *dev,
+@@ -3339,7 +3336,7 @@ bnxt_timesync_read_rx_timestamp(struct rte_eth_dev *dev,
@@ -76 +78 @@
- 	if (BNXT_CHIP_P5(bp))
+ 	if (BNXT_CHIP_THOR(bp))
@@ -78 +80 @@
-@@ -3567,7 +3564,7 @@ bnxt_timesync_read_tx_timestamp(struct rte_eth_dev *dev,
+@@ -3362,7 +3359,7 @@ bnxt_timesync_read_tx_timestamp(struct rte_eth_dev *dev,
@@ -85 +87 @@
- 	if (BNXT_CHIP_P5(bp))
+ 	if (BNXT_CHIP_THOR(bp))
@@ -87 +89 @@
-@@ -3588,7 +3585,7 @@ bnxt_timesync_adjust_time(struct rte_eth_dev *dev, int64_t delta)
+@@ -3383,7 +3380,7 @@ bnxt_timesync_adjust_time(struct rte_eth_dev *dev, int64_t delta)

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

* [dpdk-stable] patch 'net/bnxt: fix Rx buffer posting' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (89 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix timesync when PTP is not supported' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix Tx length hint threshold' " Xueming Li
                   ` (136 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Luca Boccassi, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b21daacf9276ae68625a2cf80ba02ba8ef831221

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b21daacf9276ae68625a2cf80ba02ba8ef831221 Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Thu, 18 Mar 2021 15:52:13 -0400
Subject: [PATCH] net/bnxt: fix Rx buffer posting
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit bb4f70d275045647db78df48aa1f2456c37cf5fd ]

Remove early buffer posting logic from burst receive loop to address
several issues:
   - Posting receive descriptors without first posting completion
     entries risks overflowing the completion queue.
   - Posting receive descriptors without updating rx_raw_prod
     creates the possibility that the receive descriptor doorbell
     can be written twice with the same value.
   - Having this logic in the inner descriptor processing loop
     can impact performance.

Fixes: 637e34befd9c ("net/bnxt: optimize Rx processing")
Fixes: 04067844a3e9 ("net/bnxt: reduce CQ queue size without aggregation ring")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 3 ---
 drivers/net/bnxt/bnxt_rxr.h | 2 --
 2 files changed, 5 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index b28b7fb561..34de09fdc8 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -938,9 +938,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 		raw_cons = NEXT_RAW_CMP(raw_cons);
 		if (nb_rx_pkts == nb_pkts || nb_rep_rx_pkts == nb_pkts || evt)
 			break;
-		/* Post some Rx buf early in case of larger burst processing */
-		if (nb_rx_pkts == BNXT_RX_POST_THRESH)
-			bnxt_db_write(&rxr->rx_db, rxr->rx_prod);
 	}
 
 	cpr->cp_raw_cons = raw_cons;
diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
index 46c34e6e16..be5afcc8d1 100644
--- a/drivers/net/bnxt/bnxt_rxr.h
+++ b/drivers/net/bnxt/bnxt_rxr.h
@@ -37,8 +37,6 @@ static inline uint16_t bnxt_tpa_start_agg_id(struct bnxt *bp,
 #define BNXT_TPA_END_AGG_ID_TH(cmp) \
 	rte_le_to_cpu_16((cmp)->agg_id)
 
-#define BNXT_RX_POST_THRESH	32
-
 /* Number of descriptors to process per inner loop in vector mode. */
 #define RTE_BNXT_DESCS_PER_LOOP		4U
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.005180600 +0800
+++ 0093-net-bnxt-fix-Rx-buffer-posting.patch	2021-05-10 23:59:26.460000000 +0800
@@ -1 +1 @@
-From bb4f70d275045647db78df48aa1f2456c37cf5fd Mon Sep 17 00:00:00 2001
+From b21daacf9276ae68625a2cf80ba02ba8ef831221 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit bb4f70d275045647db78df48aa1f2456c37cf5fd ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index c72545ada7..7179c6cb30 100644
+index b28b7fb561..34de09fdc8 100644
@@ -31 +33 @@
-@@ -1018,9 +1018,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -938,9 +938,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -37 +39 @@
--			bnxt_db_write(&rxr->rx_db, rxr->rx_raw_prod);
+-			bnxt_db_write(&rxr->rx_db, rxr->rx_prod);
@@ -42 +44 @@
-index a6fdd7767a..b43256e03e 100644
+index 46c34e6e16..be5afcc8d1 100644
@@ -45,3 +47,3 @@
-@@ -41,8 +41,6 @@ static inline uint16_t bnxt_tpa_start_agg_id(struct bnxt *bp,
- 	(((cmp)->agg_bufs_v1 & RX_PKT_CMPL_AGG_BUFS_MASK) >> \
- 		RX_PKT_CMPL_AGG_BUFS_SFT)
+@@ -37,8 +37,6 @@ static inline uint16_t bnxt_tpa_start_agg_id(struct bnxt *bp,
+ #define BNXT_TPA_END_AGG_ID_TH(cmp) \
+ 	rte_le_to_cpu_16((cmp)->agg_id)

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

* [dpdk-stable] patch 'net/bnxt: fix Tx length hint threshold' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (90 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix Rx buffer posting' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix handling of null flow mask' " Xueming Li
                   ` (135 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Luca Boccassi, Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/28e5e8b72203a1176329734c8934eb93865e763b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 28e5e8b72203a1176329734c8934eb93865e763b Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Thu, 18 Mar 2021 15:52:29 -0400
Subject: [PATCH] net/bnxt: fix Tx length hint threshold
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 74f2172177a0556348f312b2d88d9ad5f5e298cc ]

Use correct threshold when selecting "greater than or equal to
2K" length hint.

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

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

diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c
index fb358d6f14..0cf6ece786 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -178,7 +178,7 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
 	txbd->flags_type |= TX_BD_SHORT_FLAGS_COAL_NOW;
 	txbd->flags_type |= TX_BD_LONG_FLAGS_NO_CMPL;
 	txbd->len = tx_pkt->data_len;
-	if (tx_pkt->pkt_len >= 2014)
+	if (tx_pkt->pkt_len >= 2048)
 		txbd->flags_type |= TX_BD_LONG_FLAGS_LHINT_GTE2K;
 	else
 		txbd->flags_type |= lhint_arr[tx_pkt->pkt_len >> 9];
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.027796700 +0800
+++ 0094-net-bnxt-fix-Tx-length-hint-threshold.patch	2021-05-10 23:59:26.460000000 +0800
@@ -1 +1 @@
-From 74f2172177a0556348f312b2d88d9ad5f5e298cc Mon Sep 17 00:00:00 2001
+From 28e5e8b72203a1176329734c8934eb93865e763b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 74f2172177a0556348f312b2d88d9ad5f5e298cc ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 65355fb040..27459960de 100644
+index fb358d6f14..0cf6ece786 100644
@@ -23 +25 @@
-@@ -187,7 +187,7 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
+@@ -178,7 +178,7 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,

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

* [dpdk-stable] patch 'net/bnxt: fix handling of null flow mask' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (91 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix Tx length hint threshold' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: check kvargs parsing' " Xueming Li
                   ` (134 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Luca Boccassi, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b1f8911ea3a32a31b91aaa15a81c60c32e06c0ec

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b1f8911ea3a32a31b91aaa15a81c60c32e06c0ec Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Thu, 18 Mar 2021 15:52:51 -0400
Subject: [PATCH] net/bnxt: fix handling of null flow mask
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit dea1afc71ffce08fccef2d49f09f6ad874c433c5 ]

When the mask field of an rte_flow pattern item is NULL,
the default mask for that item type should be used.

Fixes: 5ef3b79fdfe6 ("net/bnxt: support flow filter ops")

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

diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 127d51c45b..514a5ed433 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -188,11 +188,15 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
 				PMD_DRV_LOG(DEBUG, "Parse inner header\n");
 			break;
 		case RTE_FLOW_ITEM_TYPE_ETH:
-			if (!item->spec || !item->mask)
+			if (!item->spec)
 				break;
 
 			eth_spec = item->spec;
-			eth_mask = item->mask;
+
+			if (item->mask)
+				eth_mask = item->mask;
+			else
+				eth_mask = &rte_flow_item_eth_mask;
 
 			/* Source MAC address mask cannot be partially set.
 			 * Should be All 0's or all 1's.
@@ -281,7 +285,12 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
 			break;
 		case RTE_FLOW_ITEM_TYPE_VLAN:
 			vlan_spec = item->spec;
-			vlan_mask = item->mask;
+
+			if (item->mask)
+				vlan_mask = item->mask;
+			else
+				vlan_mask = &rte_flow_item_vlan_mask;
+
 			if (en & en_ethertype) {
 				rte_flow_error_set(error, EINVAL,
 						   RTE_FLOW_ERROR_TYPE_ITEM,
@@ -324,11 +333,15 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
 		case RTE_FLOW_ITEM_TYPE_IPV4:
 			/* If mask is not involved, we could use EM filters. */
 			ipv4_spec = item->spec;
-			ipv4_mask = item->mask;
 
-			if (!item->spec || !item->mask)
+			if (!item->spec)
 				break;
 
+			if (item->mask)
+				ipv4_mask = item->mask;
+			else
+				ipv4_mask = &rte_flow_item_ipv4_mask;
+
 			/* Only IP DST and SRC fields are maskable. */
 			if (ipv4_mask->hdr.version_ihl ||
 			    ipv4_mask->hdr.type_of_service ||
@@ -385,11 +398,15 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
 			break;
 		case RTE_FLOW_ITEM_TYPE_IPV6:
 			ipv6_spec = item->spec;
-			ipv6_mask = item->mask;
 
-			if (!item->spec || !item->mask)
+			if (!item->spec)
 				break;
 
+			if (item->mask)
+				ipv6_mask = item->mask;
+			else
+				ipv6_mask = &rte_flow_item_ipv6_mask;
+
 			/* Only IP DST and SRC fields are maskable. */
 			if (ipv6_mask->hdr.vtc_flow ||
 			    ipv6_mask->hdr.payload_len ||
@@ -437,11 +454,15 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
 			break;
 		case RTE_FLOW_ITEM_TYPE_TCP:
 			tcp_spec = item->spec;
-			tcp_mask = item->mask;
 
-			if (!item->spec || !item->mask)
+			if (!item->spec)
 				break;
 
+			if (item->mask)
+				tcp_mask = item->mask;
+			else
+				tcp_mask = &rte_flow_item_tcp_mask;
+
 			/* Check TCP mask. Only DST & SRC ports are maskable */
 			if (tcp_mask->hdr.sent_seq ||
 			    tcp_mask->hdr.recv_ack ||
@@ -482,11 +503,15 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
 			break;
 		case RTE_FLOW_ITEM_TYPE_UDP:
 			udp_spec = item->spec;
-			udp_mask = item->mask;
 
-			if (!item->spec || !item->mask)
+			if (!item->spec)
 				break;
 
+			if (item->mask)
+				udp_mask = item->mask;
+			else
+				udp_mask = &rte_flow_item_udp_mask;
+
 			if (udp_mask->hdr.dgram_len ||
 			    udp_mask->hdr.dgram_cksum) {
 				rte_flow_error_set(error,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.052612700 +0800
+++ 0095-net-bnxt-fix-handling-of-null-flow-mask.patch	2021-05-10 23:59:26.460000000 +0800
@@ -1 +1 @@
-From dea1afc71ffce08fccef2d49f09f6ad874c433c5 Mon Sep 17 00:00:00 2001
+From b1f8911ea3a32a31b91aaa15a81c60c32e06c0ec Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit dea1afc71ffce08fccef2d49f09f6ad874c433c5 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index a8f5d91fc4..e3906b4779 100644
+index 127d51c45b..514a5ed433 100644

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

* [dpdk-stable] patch 'net/bnxt: check kvargs parsing' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (92 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix handling of null flow mask' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix memory allocation for command response' " Xueming Li
                   ` (133 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Luca Boccassi, Lance Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/34972cfd96876dba2932ccf2565d5a9a88fd7fc1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 34972cfd96876dba2932ccf2565d5a9a88fd7fc1 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Tue, 16 Mar 2021 18:08:40 -0700
Subject: [PATCH] net/bnxt: check kvargs parsing
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 29ce7059e8e7307ac27ff94e7a46035f38d3f97e ]

Check return value of rte_kvargs_process()

Coverity issue: 357765
Fixes: ba404aacc5cf ("net/bnxt: set maximum flow count")
Fixes: 02a95625fe9c ("net/bnxt: add flow stats in extended stats")
Fixes: 7b0940653720 ("net/bnxt: support host memory based TruFlow")

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

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index b719cd74c4..e97a3ab8f6 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -5239,40 +5239,49 @@ bnxt_parse_devarg_rep_fc_f2r(__rte_unused const char *key,
 	return 0;
 }
 
-static void
+static int
 bnxt_parse_dev_args(struct bnxt *bp, struct rte_devargs *devargs)
 {
 	struct rte_kvargs *kvlist;
+	int ret;
 
 	if (devargs == NULL)
-		return;
+		return 0;
 
 	kvlist = rte_kvargs_parse(devargs->args, bnxt_dev_args);
 	if (kvlist == NULL)
-		return;
+		return -EINVAL;
 
 	/*
 	 * Handler for "truflow" devarg.
 	 * Invoked as for ex: "-a 0000:00:0d.0,host-based-truflow=1"
 	 */
-	rte_kvargs_process(kvlist, BNXT_DEVARG_TRUFLOW,
-			   bnxt_parse_devarg_truflow, bp);
+	ret = rte_kvargs_process(kvlist, BNXT_DEVARG_TRUFLOW,
+				 bnxt_parse_devarg_truflow, bp);
+	if (ret)
+		goto err;
 
 	/*
 	 * Handler for "flow_xstat" devarg.
 	 * Invoked as for ex: "-a 0000:00:0d.0,flow_xstat=1"
 	 */
-	rte_kvargs_process(kvlist, BNXT_DEVARG_FLOW_XSTAT,
-			   bnxt_parse_devarg_flow_xstat, bp);
+	ret = rte_kvargs_process(kvlist, BNXT_DEVARG_FLOW_XSTAT,
+				 bnxt_parse_devarg_flow_xstat, bp);
+	if (ret)
+		goto err;
 
 	/*
 	 * Handler for "max_num_kflows" devarg.
 	 * Invoked as for ex: "-a 000:00:0d.0,max_num_kflows=32"
 	 */
-	rte_kvargs_process(kvlist, BNXT_DEVARG_MAX_NUM_KFLOWS,
-			   bnxt_parse_devarg_max_num_kflows, bp);
+	ret = rte_kvargs_process(kvlist, BNXT_DEVARG_MAX_NUM_KFLOWS,
+				 bnxt_parse_devarg_max_num_kflows, bp);
+	if (ret)
+		goto err;
 
+err:
 	rte_kvargs_free(kvlist);
+	return ret;
 }
 
 static int bnxt_alloc_switch_domain(struct bnxt *bp)
@@ -5407,7 +5416,9 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
 	bp = eth_dev->data->dev_private;
 
 	/* Parse dev arguments passed on when starting the DPDK application. */
-	bnxt_parse_dev_args(bp, pci_dev->device.devargs);
+	rc = bnxt_parse_dev_args(bp, pci_dev->device.devargs);
+	if (rc)
+		goto error_free;
 
 	rc = bnxt_drv_init(eth_dev);
 	if (rc)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.077460000 +0800
+++ 0096-net-bnxt-check-kvargs-parsing.patch	2021-05-10 23:59:26.460000000 +0800
@@ -1 +1 @@
-From 29ce7059e8e7307ac27ff94e7a46035f38d3f97e Mon Sep 17 00:00:00 2001
+From 34972cfd96876dba2932ccf2565d5a9a88fd7fc1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 29ce7059e8e7307ac27ff94e7a46035f38d3f97e ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 646cc94bd8..372475231d 100644
+index b719cd74c4..e97a3ab8f6 100644
@@ -24 +26 @@
-@@ -5484,40 +5484,49 @@ bnxt_parse_devarg_rep_fc_f2r(__rte_unused const char *key,
+@@ -5239,40 +5239,49 @@ bnxt_parse_devarg_rep_fc_f2r(__rte_unused const char *key,
@@ -83 +85 @@
-@@ -5652,7 +5661,9 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
+@@ -5407,7 +5416,9 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)

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

* [dpdk-stable] patch 'net/bnxt: fix memory allocation for command response' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (93 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: check kvargs parsing' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/qede: reduce log verbosity' " Xueming Li
                   ` (132 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Kalesh AP
  Cc: Luca Boccassi, Somnath Kotur, Ajit Khaparde, Lance Richardson,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/75f780af8b8e931756c5943d38a6789525e4e078

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 75f780af8b8e931756c5943d38a6789525e4e078 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Sat, 20 Mar 2021 12:19:17 +0530
Subject: [PATCH] net/bnxt: fix memory allocation for command response
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 4f1d8fdc3f4234857c1e78af564fcfd92f602f70 ]

Driver re-allocates memory for the command response buffer
when the installed firmware version is newer (and has a larger
max response length) than the version of HWRM that was used to
build the PMD.

This change helps to avoid the re-allocation by allocating the
memory for the command response buffer with PAGE_SIZE.

Coverity issue: 366256, 366204, 366180
Fixes: b7778e8a1c00 ("net/bnxt: refactor to properly allocate resources for PF/VF")

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>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c |  2 +-
 drivers/net/bnxt/bnxt_hwrm.c   | 27 ++++-----------------------
 2 files changed, 5 insertions(+), 24 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index e97a3ab8f6..85c711b71f 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -5363,7 +5363,7 @@ static int bnxt_drv_init(struct rte_eth_dev *eth_dev)
 	rc = bnxt_alloc_hwrm_resources(bp);
 	if (rc) {
 		PMD_DRV_LOG(ERR,
-			    "Failed to allocate hwrm resource rc: %x\n", rc);
+			    "Failed to allocate response buffer rc: %x\n", rc);
 		return rc;
 	}
 	rc = bnxt_alloc_leds_info(bp);
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 284699b2dc..2e2460b71a 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1160,28 +1160,8 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
 	max_resp_len = rte_le_to_cpu_16(resp->max_resp_len);
 	dev_caps_cfg = rte_le_to_cpu_32(resp->dev_caps_cfg);
 
-	if (bp->max_resp_len != max_resp_len) {
-		sprintf(type, "bnxt_hwrm_" PCI_PRI_FMT,
-			bp->pdev->addr.domain, bp->pdev->addr.bus,
-			bp->pdev->addr.devid, bp->pdev->addr.function);
-
-		rte_free(bp->hwrm_cmd_resp_addr);
-
-		bp->hwrm_cmd_resp_addr = rte_malloc(type, max_resp_len, 0);
-		if (bp->hwrm_cmd_resp_addr == NULL) {
-			rc = -ENOMEM;
-			goto error;
-		}
-		bp->hwrm_cmd_resp_dma_addr =
-			rte_malloc_virt2iova(bp->hwrm_cmd_resp_addr);
-		if (bp->hwrm_cmd_resp_dma_addr == RTE_BAD_IOVA) {
-			PMD_DRV_LOG(ERR,
-			"Unable to map response buffer to physical memory.\n");
-			rc = -ENOMEM;
-			goto error;
-		}
-		bp->max_resp_len = max_resp_len;
-	}
+	RTE_VERIFY(max_resp_len <= bp->max_resp_len);
+	bp->max_resp_len = max_resp_len;
 
 	if ((dev_caps_cfg &
 		HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_SHORT_CMD_SUPPORTED) &&
@@ -2667,7 +2647,7 @@ int bnxt_alloc_hwrm_resources(struct bnxt *bp)
 
 	sprintf(type, "bnxt_hwrm_" PCI_PRI_FMT, pdev->addr.domain,
 		pdev->addr.bus, pdev->addr.devid, pdev->addr.function);
-	bp->max_resp_len = HWRM_MAX_RESP_LEN;
+	bp->max_resp_len = BNXT_PAGE_SIZE;
 	bp->hwrm_cmd_resp_addr = rte_malloc(type, bp->max_resp_len, 0);
 	if (bp->hwrm_cmd_resp_addr == NULL)
 		return -ENOMEM;
@@ -5842,6 +5822,7 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp)
 	int rc = 0;
 
 	bp->max_req_len = HWRM_MAX_REQ_LEN;
+	bp->max_resp_len = BNXT_PAGE_SIZE;
 	bp->hwrm_cmd_timeout = SHORT_HWRM_CMD_TIMEOUT;
 
 	HWRM_PREP(&req, HWRM_VER_GET, BNXT_USE_CHIMP_MB);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.103375900 +0800
+++ 0097-net-bnxt-fix-memory-allocation-for-command-response.patch	2021-05-10 23:59:26.460000000 +0800
@@ -1 +1 @@
-From 4f1d8fdc3f4234857c1e78af564fcfd92f602f70 Mon Sep 17 00:00:00 2001
+From 75f780af8b8e931756c5943d38a6789525e4e078 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 4f1d8fdc3f4234857c1e78af564fcfd92f602f70 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 372475231d..ed2ae45757 100644
+index e97a3ab8f6..85c711b71f 100644
@@ -31 +33 @@
-@@ -5608,7 +5608,7 @@ static int bnxt_drv_init(struct rte_eth_dev *eth_dev)
+@@ -5363,7 +5363,7 @@ static int bnxt_drv_init(struct rte_eth_dev *eth_dev)
@@ -41 +43 @@
-index e3a07314f8..6a70b6e663 100644
+index 284699b2dc..2e2460b71a 100644
@@ -44 +46 @@
-@@ -1284,28 +1284,8 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
+@@ -1160,28 +1160,8 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
@@ -75 +77 @@
-@@ -2804,7 +2784,7 @@ int bnxt_alloc_hwrm_resources(struct bnxt *bp)
+@@ -2667,7 +2647,7 @@ int bnxt_alloc_hwrm_resources(struct bnxt *bp)
@@ -84 +86 @@
-@@ -6057,6 +6037,7 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp)
+@@ -5842,6 +5822,7 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp)

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

* [dpdk-stable] patch 'net/qede: reduce log verbosity' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (94 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix memory allocation for command response' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/qede: accept bigger RSS table' " Xueming Li
                   ` (131 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Igor Russkikh
  Cc: Luca Boccassi, Devendra Singh Rawat, Rasesh Mody, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/50650a3ab2d51e38d2f3d276d9c256c529bb999f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 50650a3ab2d51e38d2f3d276d9c256c529bb999f Mon Sep 17 00:00:00 2001
From: Igor Russkikh <irusskikh@marvell.com>
Date: Fri, 19 Mar 2021 10:46:55 +0100
Subject: [PATCH] net/qede: reduce log verbosity
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 218d54849f0707347d6956f8f1c97017c6b6ac08 ]

On some hardware units it was found this trace is flooding the output,
making any dpdk interactive usage kind of problematic.

It is only informational, without any consequences handling, so reducing
it to verbose from explicit notice level.

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

diff --git a/drivers/net/qede/base/ecore_int.c b/drivers/net/qede/base/ecore_int.c
index 4207b1853e..2c4aac9418 100644
--- a/drivers/net/qede/base/ecore_int.c
+++ b/drivers/net/qede/base/ecore_int.c
@@ -928,7 +928,7 @@ static void ecore_int_attn_print(struct ecore_hwfn *p_hwfn,
 				 bool b_clear)
 {
 	/* @DPDK */
-	DP_NOTICE(p_hwfn->p_dev, false, "[block_id %d type %d]\n", id, type);
+	DP_VERBOSE(p_hwfn, ECORE_MSG_INTR, "[block_id %d type %d]\n", id, type);
 }
 
 /**
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.130401100 +0800
+++ 0098-net-qede-reduce-log-verbosity.patch	2021-05-10 23:59:26.460000000 +0800
@@ -1 +1 @@
-From 218d54849f0707347d6956f8f1c97017c6b6ac08 Mon Sep 17 00:00:00 2001
+From 50650a3ab2d51e38d2f3d276d9c256c529bb999f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 218d54849f0707347d6956f8f1c97017c6b6ac08 ]
@@ -11,2 +13,0 @@
-
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/qede: accept bigger RSS table' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (95 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/qede: reduce log verbosity' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/i40e: fix input set field mask' " Xueming Li
                   ` (130 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Igor Russkikh; +Cc: Luca Boccassi, Rasesh Mody, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/74fc31b48fc26dc40080d207fbf577bd53191028

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 74fc31b48fc26dc40080d207fbf577bd53191028 Mon Sep 17 00:00:00 2001
From: Igor Russkikh <irusskikh@marvell.com>
Date: Fri, 19 Mar 2021 10:46:56 +0100
Subject: [PATCH] net/qede: accept bigger RSS table
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 6ceb7ab83f168fa6b8e90e4bd5a1392de1a48c70 ]

Some dpdk applications blindly pass fixed side RSS hash tables,
and do not check driver/device capabilities.

Moreover, many other drivers do not do such a strong check as well.

Fix it by making qede accept any size rss_key. For larger key
tables we just crop it with notice trace message.

Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
---
 drivers/net/qede/qede_ethdev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index ab5f5b1065..bfd38a9772 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -2139,8 +2139,10 @@ int qede_rss_hash_update(struct rte_eth_dev *eth_dev,
 		/* RSS hash key */
 		if (key) {
 			if (len > (ECORE_RSS_KEY_SIZE * sizeof(uint32_t))) {
-				DP_ERR(edev, "RSS key length exceeds limit\n");
-				return -EINVAL;
+				len = ECORE_RSS_KEY_SIZE * sizeof(uint32_t);
+				DP_NOTICE(edev, false,
+					  "RSS key length too big, trimmed to %d\n",
+					  len);
 			}
 			DP_INFO(edev, "Applying user supplied hash key\n");
 			rss_params.update_rss_key = 1;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.154364800 +0800
+++ 0099-net-qede-accept-bigger-RSS-table.patch	2021-05-10 23:59:26.460000000 +0800
@@ -1 +1 @@
-From 6ceb7ab83f168fa6b8e90e4bd5a1392de1a48c70 Mon Sep 17 00:00:00 2001
+From 74fc31b48fc26dc40080d207fbf577bd53191028 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 6ceb7ab83f168fa6b8e90e4bd5a1392de1a48c70 ]
@@ -13,2 +15,0 @@
-
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/i40e: fix input set field mask' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (96 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/qede: accept bigger RSS table' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/ice: fix RSS hash update' " Xueming Li
                   ` (129 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Luca Boccassi, Lingli Chen, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/fe1461f8b60c40b33d611c81cf90e2c91c0b136e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fe1461f8b60c40b33d611c81cf90e2c91c0b136e Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Mon, 1 Mar 2021 15:06:07 +0800
Subject: [PATCH] net/i40e: fix input set field mask
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 2a2fd19d46e598a6816be8f81aa62ec372fd495d ]

The absolute field offsets of IPv4 or IPv6 header are related to
hardware configuration. The X710 and X722 have different hardware
configurations, and users can even modify the hardware configuration.
Therefore, The default values cannot be used when calculating mask
offset.

The following flows can be created on X722 NIC, but the packet will
not enter the queue 3:
  flow create 0 ingress pattern eth / ipv4 proto is 255  / end
  actions queue index 3 / end
  pkt = Ether()/IP(ttl=63, proto=255)/Raw('X'*40)

  flow create 0 ingress pattern eth / ipv4 tos is 50 / udp / end
  actions queue index 3 / end
  pkt = Ether()/IP(tos=50)/UDP()/Raw('X'*40)

  flow create 0 ingress pattern eth / ipv6 tc is 12 / udp / end
  actions queue index 3 / end
  pkt = Ether()/IPv6(tc=12,hlim=34,fl=0x98765)/UDP()/Raw('X'*40)

  flow create 0 ingress pattern eth / ipv6 hop is 34 / end actions
  queue index 3 / end
  pkt = Ether()/IPv6(tc=12,hlim=34,fl=0x98765)/Raw('X'*40)

This patch read the field offsets from the NIC and return the mask
register value.

Fixes: 98f055707685 ("i40e: configure input fields for RSS or flow director")
Fixes: 92cf7f8ec082 ("i40e: allow filtering on more IP header fields")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Tested-by: Lingli Chen <linglix.chen@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 158 +++++++++++++++++++++++++--------
 drivers/net/i40e/i40e_ethdev.h |   4 +-
 drivers/net/i40e/i40e_flow.c   |   2 +-
 3 files changed, 125 insertions(+), 39 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index ef4f28fe53..572bd96471 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -202,12 +202,12 @@
 #define I40E_TRANSLATE_INSET 0
 #define I40E_TRANSLATE_REG   1
 
-#define I40E_INSET_IPV4_TOS_MASK        0x0009FF00UL
-#define I40E_INSET_IPv4_TTL_MASK        0x000D00FFUL
-#define I40E_INSET_IPV4_PROTO_MASK      0x000DFF00UL
-#define I40E_INSET_IPV6_TC_MASK         0x0009F00FUL
-#define I40E_INSET_IPV6_HOP_LIMIT_MASK  0x000CFF00UL
-#define I40E_INSET_IPV6_NEXT_HDR_MASK   0x000C00FFUL
+#define I40E_INSET_IPV4_TOS_MASK        0x0000FF00UL
+#define I40E_INSET_IPV4_TTL_MASK        0x000000FFUL
+#define I40E_INSET_IPV4_PROTO_MASK      0x0000FF00UL
+#define I40E_INSET_IPV6_TC_MASK         0x0000F00FUL
+#define I40E_INSET_IPV6_HOP_LIMIT_MASK  0x0000FF00UL
+#define I40E_INSET_IPV6_NEXT_HDR_MASK   0x000000FFUL
 
 /* PCI offset for querying capability */
 #define PCI_DEV_CAP_REG            0xA4
@@ -220,6 +220,25 @@
 /* Bit mask of Extended Tag enable/disable */
 #define PCI_DEV_CTRL_EXT_TAG_MASK  (1 << PCI_DEV_CTRL_EXT_TAG_SHIFT)
 
+#define I40E_GLQF_PIT_IPV4_START	2
+#define I40E_GLQF_PIT_IPV4_COUNT	2
+#define I40E_GLQF_PIT_IPV6_START	4
+#define I40E_GLQF_PIT_IPV6_COUNT	2
+
+#define I40E_GLQF_PIT_SOURCE_OFF_GET(a)	\
+				(((a) & I40E_GLQF_PIT_SOURCE_OFF_MASK) >> \
+				 I40E_GLQF_PIT_SOURCE_OFF_SHIFT)
+
+#define I40E_GLQF_PIT_DEST_OFF_GET(a) \
+				(((a) & I40E_GLQF_PIT_DEST_OFF_MASK) >> \
+				 I40E_GLQF_PIT_DEST_OFF_SHIFT)
+
+#define I40E_GLQF_PIT_FSIZE_GET(a)	(((a) & I40E_GLQF_PIT_FSIZE_MASK) >> \
+					 I40E_GLQF_PIT_FSIZE_SHIFT)
+
+#define I40E_GLQF_PIT_BUILD(off, mask)	(((off) << 16) | (mask))
+#define I40E_FDIR_FIELD_OFFSET(a)	((a) >> 1)
+
 static int eth_i40e_dev_init(struct rte_eth_dev *eth_dev, void *init_params);
 static int eth_i40e_dev_uninit(struct rte_eth_dev *eth_dev);
 static int i40e_dev_configure(struct rte_eth_dev *dev);
@@ -9487,49 +9506,116 @@ i40e_translate_input_set_reg(enum i40e_mac_type type, uint64_t input)
 	return val;
 }
 
+static int
+i40e_get_inset_field_offset(struct i40e_hw *hw, uint32_t pit_reg_start,
+			    uint32_t pit_reg_count, uint32_t hdr_off)
+{
+	const uint32_t pit_reg_end = pit_reg_start + pit_reg_count;
+	uint32_t field_off = I40E_FDIR_FIELD_OFFSET(hdr_off);
+	uint32_t i, reg_val, src_off, count;
+
+	for (i = pit_reg_start; i < pit_reg_end; i++) {
+		reg_val = i40e_read_rx_ctl(hw, I40E_GLQF_PIT(i));
+
+		src_off = I40E_GLQF_PIT_SOURCE_OFF_GET(reg_val);
+		count = I40E_GLQF_PIT_FSIZE_GET(reg_val);
+
+		if (src_off <= field_off && (src_off + count) > field_off)
+			break;
+	}
+
+	if (i >= pit_reg_end) {
+		PMD_DRV_LOG(ERR,
+			    "Hardware GLQF_PIT configuration does not support this field mask");
+		return -1;
+	}
+
+	return I40E_GLQF_PIT_DEST_OFF_GET(reg_val) + field_off - src_off;
+}
+
 int
-i40e_generate_inset_mask_reg(uint64_t inset, uint32_t *mask, uint8_t nb_elem)
+i40e_generate_inset_mask_reg(struct i40e_hw *hw, uint64_t inset,
+			     uint32_t *mask, uint8_t nb_elem)
 {
-	uint8_t i, idx = 0;
-	uint64_t inset_need_mask = inset;
+	static const uint64_t mask_inset[] = {
+		I40E_INSET_IPV4_PROTO | I40E_INSET_IPV4_TTL,
+		I40E_INSET_IPV6_NEXT_HDR | I40E_INSET_IPV6_HOP_LIMIT };
 
 	static const struct {
 		uint64_t inset;
 		uint32_t mask;
-	} inset_mask_map[] = {
-		{I40E_INSET_IPV4_TOS, I40E_INSET_IPV4_TOS_MASK},
-		{I40E_INSET_IPV4_PROTO | I40E_INSET_IPV4_TTL, 0},
-		{I40E_INSET_IPV4_PROTO, I40E_INSET_IPV4_PROTO_MASK},
-		{I40E_INSET_IPV4_TTL, I40E_INSET_IPv4_TTL_MASK},
-		{I40E_INSET_IPV6_TC, I40E_INSET_IPV6_TC_MASK},
-		{I40E_INSET_IPV6_NEXT_HDR | I40E_INSET_IPV6_HOP_LIMIT, 0},
-		{I40E_INSET_IPV6_NEXT_HDR, I40E_INSET_IPV6_NEXT_HDR_MASK},
-		{I40E_INSET_IPV6_HOP_LIMIT, I40E_INSET_IPV6_HOP_LIMIT_MASK},
+		uint32_t offset;
+	} inset_mask_offset_map[] = {
+		{ I40E_INSET_IPV4_TOS, I40E_INSET_IPV4_TOS_MASK,
+		  offsetof(struct rte_ipv4_hdr, type_of_service) },
+
+		{ I40E_INSET_IPV4_PROTO, I40E_INSET_IPV4_PROTO_MASK,
+		  offsetof(struct rte_ipv4_hdr, next_proto_id) },
+
+		{ I40E_INSET_IPV4_TTL, I40E_INSET_IPV4_TTL_MASK,
+		  offsetof(struct rte_ipv4_hdr, time_to_live) },
+
+		{ I40E_INSET_IPV6_TC, I40E_INSET_IPV6_TC_MASK,
+		  offsetof(struct rte_ipv6_hdr, vtc_flow) },
+
+		{ I40E_INSET_IPV6_NEXT_HDR, I40E_INSET_IPV6_NEXT_HDR_MASK,
+		  offsetof(struct rte_ipv6_hdr, proto) },
+
+		{ I40E_INSET_IPV6_HOP_LIMIT, I40E_INSET_IPV6_HOP_LIMIT_MASK,
+		  offsetof(struct rte_ipv6_hdr, hop_limits) },
 	};
 
-	if (!inset || !mask || !nb_elem)
+	uint32_t i;
+	int idx = 0;
+
+	assert(mask);
+	if (!inset)
 		return 0;
 
-	for (i = 0, idx = 0; i < RTE_DIM(inset_mask_map); i++) {
+	for (i = 0; i < RTE_DIM(mask_inset); i++) {
 		/* Clear the inset bit, if no MASK is required,
 		 * for example proto + ttl
 		 */
-		if ((inset & inset_mask_map[i].inset) ==
-		     inset_mask_map[i].inset && inset_mask_map[i].mask == 0)
-			inset_need_mask &= ~inset_mask_map[i].inset;
-		if (!inset_need_mask)
-			return 0;
+		if ((mask_inset[i] & inset) == mask_inset[i]) {
+			inset &= ~mask_inset[i];
+			if (!inset)
+				return 0;
+		}
 	}
-	for (i = 0, idx = 0; i < RTE_DIM(inset_mask_map); i++) {
-		if ((inset_need_mask & inset_mask_map[i].inset) ==
-		    inset_mask_map[i].inset) {
-			if (idx >= nb_elem) {
-				PMD_DRV_LOG(ERR, "exceed maximal number of bitmasks");
-				return -EINVAL;
-			}
-			mask[idx] = inset_mask_map[i].mask;
-			idx++;
+
+	for (i = 0; i < RTE_DIM(inset_mask_offset_map); i++) {
+		uint32_t pit_start, pit_count;
+		int offset;
+
+		if (!(inset_mask_offset_map[i].inset & inset))
+			continue;
+
+		if (inset_mask_offset_map[i].inset &
+		    (I40E_INSET_IPV4_TOS | I40E_INSET_IPV4_PROTO |
+		     I40E_INSET_IPV4_TTL)) {
+			pit_start = I40E_GLQF_PIT_IPV4_START;
+			pit_count = I40E_GLQF_PIT_IPV4_COUNT;
+		} else {
+			pit_start = I40E_GLQF_PIT_IPV6_START;
+			pit_count = I40E_GLQF_PIT_IPV6_COUNT;
+		}
+
+		offset = i40e_get_inset_field_offset(hw, pit_start, pit_count,
+				inset_mask_offset_map[i].offset);
+
+		if (offset < 0)
+			return -EINVAL;
+
+		if (idx >= nb_elem) {
+			PMD_DRV_LOG(ERR,
+				    "Configuration of inset mask out of range %u",
+				    nb_elem);
+			return -ERANGE;
 		}
+
+		mask[idx] = I40E_GLQF_PIT_BUILD((uint32_t)offset,
+						inset_mask_offset_map[i].mask);
+		idx++;
 	}
 
 	return idx;
@@ -9583,7 +9669,7 @@ i40e_filter_input_set_init(struct i40e_pf *pf)
 
 		input_set = i40e_get_default_input_set(pctype);
 
-		num = i40e_generate_inset_mask_reg(input_set, mask_reg,
+		num = i40e_generate_inset_mask_reg(hw, input_set, mask_reg,
 						   I40E_INSET_MASK_NUM_REG);
 		if (num < 0)
 			return;
@@ -9688,7 +9774,7 @@ i40e_hash_filter_inset_select(struct i40e_hw *hw,
 		inset_reg |= i40e_read_rx_ctl(hw, I40E_GLQF_HASH_INSET(0, pctype));
 		input_set |= pf->hash_input_set[pctype];
 	}
-	num = i40e_generate_inset_mask_reg(input_set, mask_reg,
+	num = i40e_generate_inset_mask_reg(hw, input_set, mask_reg,
 					   I40E_INSET_MASK_NUM_REG);
 	if (num < 0)
 		return -EINVAL;
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index 20d051db8b..7d203a7816 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -1439,8 +1439,8 @@ bool is_i40evf_supported(struct rte_eth_dev *dev);
 
 int i40e_validate_input_set(enum i40e_filter_pctype pctype,
 			    enum rte_filter_type filter, uint64_t inset);
-int i40e_generate_inset_mask_reg(uint64_t inset, uint32_t *mask,
-				 uint8_t nb_elem);
+int i40e_generate_inset_mask_reg(struct i40e_hw *hw, uint64_t inset,
+				 uint32_t *mask, uint8_t nb_elem);
 uint64_t i40e_translate_input_set_reg(enum i40e_mac_type type, uint64_t input);
 void i40e_check_write_reg(struct i40e_hw *hw, uint32_t addr, uint32_t val);
 void i40e_check_write_global_reg(struct i40e_hw *hw,
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 5bef8c76a7..15c6464703 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2269,7 +2269,7 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
 	    !memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t)))
 		return 0;
 
-	num = i40e_generate_inset_mask_reg(input_set, mask_reg,
+	num = i40e_generate_inset_mask_reg(hw, input_set, mask_reg,
 					   I40E_INSET_MASK_NUM_REG);
 	if (num < 0)
 		return -EINVAL;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.178202700 +0800
+++ 0100-net-i40e-fix-input-set-field-mask.patch	2021-05-10 23:59:26.480000000 +0800
@@ -1 +1 @@
-From 2a2fd19d46e598a6816be8f81aa62ec372fd495d Mon Sep 17 00:00:00 2001
+From fe1461f8b60c40b33d611c81cf90e2c91c0b136e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 2a2fd19d46e598a6816be8f81aa62ec372fd495d ]
@@ -35 +37,0 @@
-Cc: stable@dpdk.org
@@ -46 +48 @@
-index 9b86bcdc69..09a1402a3f 100644
+index ef4f28fe53..572bd96471 100644
@@ -94 +96 @@
-@@ -9424,49 +9443,116 @@ i40e_translate_input_set_reg(enum i40e_mac_type type, uint64_t input)
+@@ -9487,49 +9506,116 @@ i40e_translate_input_set_reg(enum i40e_mac_type type, uint64_t input)
@@ -239 +241 @@
-@@ -9520,7 +9606,7 @@ i40e_filter_input_set_init(struct i40e_pf *pf)
+@@ -9583,7 +9669,7 @@ i40e_filter_input_set_init(struct i40e_pf *pf)
@@ -248 +250 @@
-@@ -9600,7 +9686,7 @@ i40e_set_hash_inset(struct i40e_hw *hw, uint64_t input_set,
+@@ -9688,7 +9774,7 @@ i40e_hash_filter_inset_select(struct i40e_hw *hw,
@@ -258 +260 @@
-index 1e8f5d3a87..faf6896fbc 100644
+index 20d051db8b..7d203a7816 100644
@@ -261,2 +263,2 @@
-@@ -1458,8 +1458,8 @@ void i40e_set_symmetric_hash_enable_per_port(struct i40e_hw *hw,
- 					     uint8_t enable);
+@@ -1439,8 +1439,8 @@ bool is_i40evf_supported(struct rte_eth_dev *dev);
+ 
@@ -273 +275 @@
-index 3e514d5f38..1ee8959e56 100644
+index 5bef8c76a7..15c6464703 100644

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

* [dpdk-stable] patch 'net/ice: fix RSS hash update' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (97 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/i40e: fix input set field mask' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/ice/base: fix memory allocation for MAC addresses' " Xueming Li
                   ` (128 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Wenjun Wu; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7b7af2fd73148dc8e98f870676aa4d8d4548b923

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7b7af2fd73148dc8e98f870676aa4d8d4548b923 Mon Sep 17 00:00:00 2001
From: Wenjun Wu <wenjun1.wu@intel.com>
Date: Fri, 5 Mar 2021 14:03:24 +0800
Subject: [PATCH] net/ice: fix RSS hash update
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 962fa026889d83f5f0a6880a98d050e0c3e0f6b9 ]

This patch change judgment statements to disable RSS for pf
when users need to disable RSS or RSS hash function configured
is not supported.

Fixes: 4717a12cfaf1 ("net/ice: initialize and update RSS based on user config")

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 626ebfac5b..f4874632cd 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -4394,8 +4394,10 @@ ice_rss_hash_update(struct rte_eth_dev *dev,
 	if (status)
 		return status;
 
-	if (rss_conf->rss_hf == 0)
+	if (rss_conf->rss_hf == 0) {
+		pf->rss_hf = 0;
 		return 0;
+	}
 
 	/* RSS hash configuration */
 	ice_rss_hash_set(pf, rss_conf->rss_hf);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.209223900 +0800
+++ 0101-net-ice-fix-RSS-hash-update.patch	2021-05-10 23:59:26.480000000 +0800
@@ -1 +1 @@
-From 962fa026889d83f5f0a6880a98d050e0c3e0f6b9 Mon Sep 17 00:00:00 2001
+From 7b7af2fd73148dc8e98f870676aa4d8d4548b923 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 962fa026889d83f5f0a6880a98d050e0c3e0f6b9 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 9c9b84a938..5a1190d50e 100644
+index 626ebfac5b..f4874632cd 100644
@@ -23 +25 @@
-@@ -4457,8 +4457,10 @@ ice_rss_hash_update(struct rte_eth_dev *dev,
+@@ -4394,8 +4394,10 @@ ice_rss_hash_update(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/ice/base: fix memory allocation for MAC addresses' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (98 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/ice: fix RSS hash update' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/mlx5: fix flow actions index in cache' " Xueming Li
                   ` (127 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Luca Boccassi, Ferruh Yigit, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/162f87fce1d311e9a3d6556c583fa3aa7db0cf2f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 162f87fce1d311e9a3d6556c583fa3aa7db0cf2f Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Wed, 17 Mar 2021 14:02:19 +0800
Subject: [PATCH] net/ice/base: fix memory allocation for MAC addresses
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 78b52e3878c6496748cba2028f8cb9080435cb46 ]

Not enough memory be allocated for dev->data->mac_address which
cause out of bound memory access when iterate all mac addresses by
dev_info.max_mac_addrs.

Fixes: f9cf4f864150 ("net/ice: support device initialization")

Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index f4874632cd..b6d940c2ff 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -805,7 +805,7 @@ ice_init_mac_address(struct rte_eth_dev *dev)
 		(struct rte_ether_addr *)hw->port_info[0].mac.perm_addr);
 
 	dev->data->mac_addrs =
-		rte_zmalloc(NULL, sizeof(struct rte_ether_addr), 0);
+		rte_zmalloc(NULL, sizeof(struct rte_ether_addr) * ICE_NUM_MACADDR_MAX, 0);
 	if (!dev->data->mac_addrs) {
 		PMD_INIT_LOG(ERR,
 			     "Failed to allocate memory to store mac address");
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.235470400 +0800
+++ 0102-net-ice-base-fix-memory-allocation-for-MAC-addresses.patch	2021-05-10 23:59:26.480000000 +0800
@@ -1 +1 @@
-From 78b52e3878c6496748cba2028f8cb9080435cb46 Mon Sep 17 00:00:00 2001
+From 162f87fce1d311e9a3d6556c583fa3aa7db0cf2f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 78b52e3878c6496748cba2028f8cb9080435cb46 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 5a1190d50e..3e85e5f629 100644
+index f4874632cd..b6d940c2ff 100644
@@ -24 +26 @@
-@@ -809,7 +809,7 @@ ice_init_mac_address(struct rte_eth_dev *dev)
+@@ -805,7 +805,7 @@ ice_init_mac_address(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/mlx5: fix flow actions index in cache' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (99 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/ice/base: fix memory allocation for MAC addresses' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-12  1:54   ` Li Zhang
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/mlx5: support RSS expansion for IPv6 GRE' " Xueming Li
                   ` (126 subsequent siblings)
  227 siblings, 1 reply; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Li Zhang; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/229101313919b163516238b0d858dba9ff12a654

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 229101313919b163516238b0d858dba9ff12a654 Mon Sep 17 00:00:00 2001
From: Li Zhang <lizh@nvidia.com>
Date: Tue, 16 Mar 2021 14:05:17 +0200
Subject: [PATCH] net/mlx5: fix flow actions index in cache
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit d406aba8f1e8568c1bf0b1aad1d5756cead5df21 ]

When using port id or push VLAN action index to find
the action in cache, it will fail to find actions.
The root cause is the index is not saved in cache when
creating the port id action or push vlan action.
To fix these issues, update the index in cache when creating.

Fixes: 0fd5f82aaa07 ("net/mlx5: make port ID action cache thread safe")
Fixes: 3422af2af2e4 ("net/mlx5: make push VLAN action cache thread safe")

Signed-off-by: Li Zhang <lizh@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 353a8df24c..347c3a1c13 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -3039,6 +3039,7 @@ flow_dv_port_id_create_cb(struct mlx5_cache_list *list,
 				   "cannot create action");
 		return NULL;
 	}
+	cache->idx = idx;
 	return &cache->entry;
 }
 
@@ -3130,6 +3131,7 @@ flow_dv_push_vlan_create_cb(struct mlx5_cache_list *list,
 				   "cannot create push vlan action");
 		return NULL;
 	}
+	cache->idx = idx;
 	return &cache->entry;
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.260567300 +0800
+++ 0103-net-mlx5-fix-flow-actions-index-in-cache.patch	2021-05-10 23:59:26.480000000 +0800
@@ -1 +1 @@
-From d406aba8f1e8568c1bf0b1aad1d5756cead5df21 Mon Sep 17 00:00:00 2001
+From 229101313919b163516238b0d858dba9ff12a654 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit d406aba8f1e8568c1bf0b1aad1d5756cead5df21 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 1a74d5ac2b..23e5849783 100644
+index 353a8df24c..347c3a1c13 100644
@@ -26 +28 @@
-@@ -3612,6 +3612,7 @@ flow_dv_port_id_create_cb(struct mlx5_cache_list *list,
+@@ -3039,6 +3039,7 @@ flow_dv_port_id_create_cb(struct mlx5_cache_list *list,
@@ -34 +36 @@
-@@ -3703,6 +3704,7 @@ flow_dv_push_vlan_create_cb(struct mlx5_cache_list *list,
+@@ -3130,6 +3131,7 @@ flow_dv_push_vlan_create_cb(struct mlx5_cache_list *list,

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

* [dpdk-stable] patch 'net/mlx5: support RSS expansion for IPv6 GRE' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (100 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/mlx5: fix flow actions index in cache' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/hns3: fix reporting undefined speed' " Xueming Li
                   ` (125 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Xiaoyu Min; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/530d228d3e4a360b996440ed118d6dcae3a34f96

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 530d228d3e4a360b996440ed118d6dcae3a34f96 Mon Sep 17 00:00:00 2001
From: Xiaoyu Min <jackmin@nvidia.com>
Date: Thu, 18 Mar 2021 11:03:57 +0000
Subject: [PATCH] net/mlx5: support RSS expansion for IPv6 GRE
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 048f0d45e3420cc3569f60e2d9b5ee447ae34fd1 ]

Currently RSS expansion only support IPv4 as GRE payload or
delivery protocol (RFC2784). IPv6 as GRE payload or delivery protocol
(RFC7676) is not supported.

This patch add RSS expansion for RFC7676 so PMD can expand flow item
correctly.

Fixes: f4b901a46aec ("net/mlx5: add flow GRE item")

Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 39be15bcd4..d574ad78c7 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -499,7 +499,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 			(MLX5_EXPANSION_OUTER_IPV6_UDP,
 			 MLX5_EXPANSION_OUTER_IPV6_TCP,
 			 MLX5_EXPANSION_IPV4,
-			 MLX5_EXPANSION_IPV6),
+			 MLX5_EXPANSION_IPV6,
+			 MLX5_EXPANSION_GRE),
 		.type = RTE_FLOW_ITEM_TYPE_IPV6,
 		.rss_types = ETH_RSS_IPV6 | ETH_RSS_FRAG_IPV6 |
 			ETH_RSS_NONFRAG_IPV6_OTHER,
@@ -527,7 +528,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 		.type = RTE_FLOW_ITEM_TYPE_VXLAN_GPE,
 	},
 	[MLX5_EXPANSION_GRE] = {
-		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4),
+		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,
+						  MLX5_EXPANSION_IPV6),
 		.type = RTE_FLOW_ITEM_TYPE_GRE,
 	},
 	[MLX5_EXPANSION_MPLS] = {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.290714200 +0800
+++ 0104-net-mlx5-support-RSS-expansion-for-IPv6-GRE.patch	2021-05-10 23:59:26.490000000 +0800
@@ -1 +1 @@
-From 048f0d45e3420cc3569f60e2d9b5ee447ae34fd1 Mon Sep 17 00:00:00 2001
+From 530d228d3e4a360b996440ed118d6dcae3a34f96 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 048f0d45e3420cc3569f60e2d9b5ee447ae34fd1 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index d46fc333d1..de4e4a374a 100644
+index 39be15bcd4..d574ad78c7 100644

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

* [dpdk-stable] patch 'net/hns3: fix reporting undefined speed' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (101 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/mlx5: support RSS expansion for IPv6 GRE' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/hns3: fix processing Tx offload flags' " Xueming Li
                   ` (124 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e29b92b99820f2873b218da9c6403221f907e830

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e29b92b99820f2873b218da9c6403221f907e830 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 23 Mar 2021 21:45:51 +0800
Subject: [PATCH] net/hns3: fix reporting undefined speed
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit b6579e3db794be36637a66e009199a1e7451e995 ]

There may be a case in future that the speed obtained from firmware
is undefined (such as, 400G or other rate), and link status of device is
up. At this case, PMD driver will reports 100Mbps to the user in the
"hns3_dev_link_update" API, which is unreasonable. Besides, if the
speed from firmware is zero, driver should report zero instead of
100Mbps.

Fixes: 59fad0f32135 ("net/hns3: support link update operation")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    | 5 ++++-
 drivers/net/hns3/hns3_ethdev_vf.c | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 8f4ce58c0b..d8158cc56e 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2658,7 +2658,10 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev,
 		new_link.link_speed = mac->link_speed;
 		break;
 	default:
-		new_link.link_speed = ETH_SPEED_NUM_100M;
+		if (mac->link_status)
+			new_link.link_speed = ETH_SPEED_NUM_UNKNOWN;
+		else
+			new_link.link_speed = ETH_SPEED_NUM_NONE;
 		break;
 	}
 
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 9c84740d7b..366a1afa7d 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -2072,7 +2072,10 @@ hns3vf_dev_link_update(struct rte_eth_dev *eth_dev,
 		new_link.link_speed = mac->link_speed;
 		break;
 	default:
-		new_link.link_speed = ETH_SPEED_NUM_100M;
+		if (mac->link_status)
+			new_link.link_speed = ETH_SPEED_NUM_UNKNOWN;
+		else
+			new_link.link_speed = ETH_SPEED_NUM_NONE;
 		break;
 	}
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.317427100 +0800
+++ 0105-net-hns3-fix-reporting-undefined-speed.patch	2021-05-10 23:59:26.490000000 +0800
@@ -1 +1 @@
-From b6579e3db794be36637a66e009199a1e7451e995 Mon Sep 17 00:00:00 2001
+From e29b92b99820f2873b218da9c6403221f907e830 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit b6579e3db794be36637a66e009199a1e7451e995 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index d392f6d109..73b96c18d1 100644
+index 8f4ce58c0b..d8158cc56e 100644
@@ -27 +29 @@
-@@ -2725,7 +2725,10 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev,
+@@ -2658,7 +2658,10 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev,
@@ -40 +42 @@
-index 30788f5c32..6c3ddcc50e 100644
+index 9c84740d7b..366a1afa7d 100644
@@ -43 +45 @@
-@@ -2123,7 +2123,10 @@ hns3vf_dev_link_update(struct rte_eth_dev *eth_dev,
+@@ -2072,7 +2072,10 @@ hns3vf_dev_link_update(struct rte_eth_dev *eth_dev,

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

* [dpdk-stable] patch 'net/hns3: fix processing Tx offload flags' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (102 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/hns3: fix reporting undefined speed' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/hns3: fix Tx checksum for UDP packets with special port' " Xueming Li
                   ` (123 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a7bf8336a2d7fed8e654a86dc99ef96bdec03294

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a7bf8336a2d7fed8e654a86dc99ef96bdec03294 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Tue, 23 Mar 2021 21:45:53 +0800
Subject: [PATCH] net/hns3: fix processing Tx offload flags
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit a1d0caa92c7fe43cef7a9f6ac4772e0eecd4a011 ]

Currently, if the PKT_TX_TCP_SEG and PKT_TX_TCP_CKSUM offload flags set
in the same time, hns3 PMD can not process the descriptors correctly.

This patch fixes it by adding the processing of this situation.

Fixes: fb6eb9009f41 ("net/hns3: fix Tx checksum with fixed header length")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 896567c791..77038ffe00 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -3083,6 +3083,7 @@ hns3_parse_l4_cksum_params(struct rte_mbuf *m, uint32_t *type_cs_vlan_tso_len)
 	uint32_t tmp;
 	/* Enable L4 checksum offloads */
 	switch (ol_flags & (PKT_TX_L4_MASK | PKT_TX_TCP_SEG)) {
+	case PKT_TX_TCP_CKSUM | PKT_TX_TCP_SEG:
 	case PKT_TX_TCP_CKSUM:
 	case PKT_TX_TCP_SEG:
 		tmp = *type_cs_vlan_tso_len;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.343421400 +0800
+++ 0106-net-hns3-fix-processing-Tx-offload-flags.patch	2021-05-10 23:59:26.490000000 +0800
@@ -1 +1 @@
-From a1d0caa92c7fe43cef7a9f6ac4772e0eecd4a011 Mon Sep 17 00:00:00 2001
+From a7bf8336a2d7fed8e654a86dc99ef96bdec03294 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit a1d0caa92c7fe43cef7a9f6ac4772e0eecd4a011 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index feeb702281..ff9cb158d7 100644
+index 896567c791..77038ffe00 100644
@@ -24 +26 @@
-@@ -3291,6 +3291,7 @@ hns3_parse_l4_cksum_params(struct rte_mbuf *m, uint32_t *type_cs_vlan_tso_len)
+@@ -3083,6 +3083,7 @@ hns3_parse_l4_cksum_params(struct rte_mbuf *m, uint32_t *type_cs_vlan_tso_len)

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

* [dpdk-stable] patch 'net/hns3: fix Tx checksum for UDP packets with special port' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (103 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/hns3: fix processing Tx offload flags' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/hns3: fix link update when failed to get link info' " Xueming Li
                   ` (122 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7537fafbc7da45d976cb2327b0dcb3706164d254

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7537fafbc7da45d976cb2327b0dcb3706164d254 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Tue, 23 Mar 2021 21:45:54 +0800
Subject: [PATCH] net/hns3: fix Tx checksum for UDP packets with special port
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 8f01e2f847569e8c21f0628389a6e6a8a1c44a31 ]

For Kunpeng920 network engine, UDP packets with destination port 6081,
4789 or 4790 will be identified as tunnel packets. If the UDP CKSUM
offload is set in the mbuf, and the TX tunnel mask is not set, the
CKSUM of these packets will be wrong. In this case, the upper layer
user may not identify the packet as a tunnel packet, and processes it
as non-tunnel packet, and expect to offload the outer UDP CKSUM, so
they may not fill the outer L2/L3 length to mbuf. However, the HW
identifies these packet as tunnel packets and therefore offload the
inner UDP CKSUM. As a result, the inner and outer UDP CKSUM are
incorrect. And for non-tunnel UDP packets with preceding special
destination port will also exist similar checksum error.

For the new generation Kunpeng930 network engine, the above errata
have been fixed. Therefore, the concept of udp_cksum_mode is
introduced. There are two udp_cksum_mode for hns3 PMD,
HNS3_SPECIAL_PORT_HW_CKSUM_MODE means HW could solve the above
problem. And in HNS3_SPECIAL_PORT_SW_CKSUM_MODE, hns3 PMD will check
packets in the Tx prepare and perform the UDP CKSUM for such packets
to avoid a checksum error.

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

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c |  2 +
 drivers/net/hns3/hns3_ethdev.h | 19 ++++++++++
 drivers/net/hns3/hns3_rxtx.c   | 68 ++++++++++++++++++++++++++++++++++
 drivers/net/hns3/hns3_rxtx.h   | 16 ++++++++
 4 files changed, 105 insertions(+)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index d8158cc56e..ab4fb2519a 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -3061,6 +3061,7 @@ hns3_get_capability(struct hns3_hw *hw)
 		hw->min_tx_pkt_len = HNS3_HIP08_MIN_TX_PKT_LEN;
 		pf->tqp_config_mode = HNS3_FIXED_MAX_TQP_NUM_MODE;
 		hw->rss_info.ipv6_sctp_offload_supported = false;
+		hw->udp_cksum_mode = HNS3_SPECIAL_PORT_SW_CKSUM_MODE;
 		return 0;
 	}
 
@@ -3079,6 +3080,7 @@ hns3_get_capability(struct hns3_hw *hw)
 	hw->min_tx_pkt_len = HNS3_HIP09_MIN_TX_PKT_LEN;
 	pf->tqp_config_mode = HNS3_FLEX_MAX_TQP_NUM_MODE;
 	hw->rss_info.ipv6_sctp_offload_supported = true;
+	hw->udp_cksum_mode = HNS3_SPECIAL_PORT_HW_CKSUM_MODE;
 
 	return 0;
 }
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 4c40df1cbb..f9f0e705f6 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -43,6 +43,9 @@
 #define HNS3_UNLIMIT_PROMISC_MODE       0
 #define HNS3_LIMIT_PROMISC_MODE         1
 
+#define HNS3_SPECIAL_PORT_SW_CKSUM_MODE         0
+#define HNS3_SPECIAL_PORT_HW_CKSUM_MODE         1
+
 #define HNS3_UC_MACADDR_NUM		128
 #define HNS3_VF_UC_MACADDR_NUM		48
 #define HNS3_MC_MACADDR_NUM		128
@@ -535,6 +538,22 @@ struct hns3_hw {
 	 */
 	uint8_t promisc_mode;
 	uint8_t max_non_tso_bd_num; /* max BD number of one non-TSO packet */
+	/*
+	 * udp checksum mode.
+	 * value range:
+	 *      HNS3_SPECIAL_PORT_HW_CKSUM_MODE/HNS3_SPECIAL_PORT_SW_CKSUM_MODE
+	 *
+	 *  - HNS3_SPECIAL_PORT_SW_CKSUM_MODE
+	 *     In this mode, HW can not do checksum for special UDP port like
+	 *     4789, 4790, 6081 for non-tunnel UDP packets and UDP tunnel
+	 *     packets without the PKT_TX_TUNEL_MASK in the mbuf. So, PMD need
+	 *     do the checksum for these packets to avoid a checksum error.
+	 *
+	 *  - HNS3_SPECIAL_PORT_HW_CKSUM_MODE
+	 *     In this mode, HW does not have the preceding problems and can
+	 *     directly calculate the checksum of these UDP packets.
+	 */
+	uint8_t udp_cksum_mode;
 
 	struct hns3_port_base_vlan_config port_base_vlan_cfg;
 	/*
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 77038ffe00..2714f28f1d 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -5,6 +5,7 @@
 #include <rte_bus_pci.h>
 #include <rte_common.h>
 #include <rte_cycles.h>
+#include <rte_geneve.h>
 #include <rte_vxlan.h>
 #include <rte_ethdev_driver.h>
 #include <rte_io.h>
@@ -2640,6 +2641,7 @@ hns3_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
 					     HNS3_RING_TX_TAIL_REG);
 	txq->min_tx_pkt_len = hw->min_tx_pkt_len;
 	txq->tso_mode = hw->tso_mode;
+	txq->udp_cksum_mode = hw->udp_cksum_mode;
 	txq->over_length_pkt_cnt = 0;
 	txq->exceed_limit_bd_pkt_cnt = 0;
 	txq->exceed_limit_bd_reassem_fail = 0;
@@ -3293,6 +3295,69 @@ hns3_vld_vlan_chk(struct hns3_tx_queue *txq, struct rte_mbuf *m)
 }
 #endif
 
+static uint16_t
+hns3_udp_cksum_help(struct rte_mbuf *m)
+{
+	uint64_t ol_flags = m->ol_flags;
+	uint16_t cksum = 0;
+	uint32_t l4_len;
+
+	if (ol_flags & PKT_TX_IPV4) {
+		struct rte_ipv4_hdr *ipv4_hdr = rte_pktmbuf_mtod_offset(m,
+				struct rte_ipv4_hdr *, m->l2_len);
+		l4_len = rte_be_to_cpu_16(ipv4_hdr->total_length) - m->l3_len;
+	} else {
+		struct rte_ipv6_hdr *ipv6_hdr = rte_pktmbuf_mtod_offset(m,
+				struct rte_ipv6_hdr *, m->l2_len);
+		l4_len = rte_be_to_cpu_16(ipv6_hdr->payload_len);
+	}
+
+	rte_raw_cksum_mbuf(m, m->l2_len + m->l3_len, l4_len, &cksum);
+
+	cksum = ~cksum;
+	/*
+	 * RFC 768:If the computed checksum is zero for UDP, it is transmitted
+	 * as all ones
+	 */
+	if (cksum == 0)
+		cksum = 0xffff;
+
+	return (uint16_t)cksum;
+}
+
+static bool
+hns3_validate_tunnel_cksum(struct hns3_tx_queue *tx_queue, struct rte_mbuf *m)
+{
+	uint64_t ol_flags = m->ol_flags;
+	struct rte_udp_hdr *udp_hdr;
+	uint16_t dst_port;
+
+	if (tx_queue->udp_cksum_mode == HNS3_SPECIAL_PORT_HW_CKSUM_MODE ||
+	    ol_flags & PKT_TX_TUNNEL_MASK ||
+	    (ol_flags & PKT_TX_L4_MASK) != PKT_TX_UDP_CKSUM)
+		return true;
+	/*
+	 * A UDP packet with the same dst_port as VXLAN\VXLAN_GPE\GENEVE will
+	 * be recognized as a tunnel packet in HW. In this case, if UDP CKSUM
+	 * offload is set and the tunnel mask has not been set, the CKSUM will
+	 * be wrong since the header length is wrong and driver should complete
+	 * the CKSUM to avoid CKSUM error.
+	 */
+	udp_hdr = rte_pktmbuf_mtod_offset(m, struct rte_udp_hdr *,
+						m->l2_len + m->l3_len);
+	dst_port = rte_be_to_cpu_16(udp_hdr->dst_port);
+	switch (dst_port) {
+	case RTE_VXLAN_DEFAULT_PORT:
+	case RTE_VXLAN_GPE_DEFAULT_PORT:
+	case RTE_GENEVE_DEFAULT_PORT:
+		udp_hdr->dgram_cksum = hns3_udp_cksum_help(m);
+		m->ol_flags = ol_flags & ~PKT_TX_L4_MASK;
+		return false;
+	default:
+		return true;
+	}
+}
+
 static int
 hns3_prep_pkt_proc(struct hns3_tx_queue *tx_queue, struct rte_mbuf *m)
 {
@@ -3337,6 +3402,9 @@ hns3_prep_pkt_proc(struct hns3_tx_queue *tx_queue, struct rte_mbuf *m)
 		return ret;
 	}
 
+	if (!hns3_validate_tunnel_cksum(tx_queue, m))
+		return 0;
+
 	hns3_outer_header_cksum_prepare(m);
 
 	return 0;
diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h
index 5650a97c3a..f7c60adc2e 100644
--- a/drivers/net/hns3/hns3_rxtx.h
+++ b/drivers/net/hns3/hns3_rxtx.h
@@ -387,6 +387,22 @@ struct hns3_tx_queue {
 	 *     not need to recalculate it.
 	 */
 	uint8_t tso_mode;
+	/*
+	 * udp checksum mode.
+	 * value range:
+	 *      HNS3_SPECIAL_PORT_HW_CKSUM_MODE/HNS3_SPECIAL_PORT_SW_CKSUM_MODE
+	 *
+	 *  - HNS3_SPECIAL_PORT_SW_CKSUM_MODE
+	 *     In this mode, HW can not do checksum for special UDP port like
+	 *     4789, 4790, 6081 for non-tunnel UDP packets and UDP tunnel
+	 *     packets without the PKT_TX_TUNEL_MASK in the mbuf. So, PMD need
+	 *     do the checksum for these packets to avoid a checksum error.
+	 *
+	 *  - HNS3_SPECIAL_PORT_HW_CKSUM_MODE
+	 *     In this mode, HW does not have the preceding problems and can
+	 *     directly calculate the checksum of these UDP packets.
+	 */
+	uint8_t udp_cksum_mode;
 	/*
 	 * The minimum length of the packet supported by hardware in the Tx
 	 * direction.
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.369384800 +0800
+++ 0107-net-hns3-fix-Tx-checksum-for-UDP-packets-with-specia.patch	2021-05-10 23:59:26.500000000 +0800
@@ -1 +1 @@
-From 8f01e2f847569e8c21f0628389a6e6a8a1c44a31 Mon Sep 17 00:00:00 2001
+From 7537fafbc7da45d976cb2327b0dcb3706164d254 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 8f01e2f847569e8c21f0628389a6e6a8a1c44a31 ]
@@ -27 +29,0 @@
-Cc: stable@dpdk.org
@@ -39 +41 @@
-index 73b96c18d1..9a57cc6b62 100644
+index d8158cc56e..ab4fb2519a 100644
@@ -42 +44 @@
-@@ -3129,6 +3129,7 @@ hns3_get_capability(struct hns3_hw *hw)
+@@ -3061,6 +3061,7 @@ hns3_get_capability(struct hns3_hw *hw)
@@ -50 +52 @@
-@@ -3148,6 +3149,7 @@ hns3_get_capability(struct hns3_hw *hw)
+@@ -3079,6 +3080,7 @@ hns3_get_capability(struct hns3_hw *hw)
@@ -59 +61 @@
-index d9cd96fa8a..ac255a3ff9 100644
+index 4c40df1cbb..f9f0e705f6 100644
@@ -62 +64 @@
-@@ -47,6 +47,9 @@
+@@ -43,6 +43,9 @@
@@ -72,3 +74,3 @@
-@@ -567,6 +570,22 @@ struct hns3_hw {
- 	uint8_t drop_stats_mode;
- 
+@@ -535,6 +538,22 @@ struct hns3_hw {
+ 	 */
+ 	uint8_t promisc_mode;
@@ -96 +98 @@
-index ff9cb158d7..5bb35e14a1 100644
+index 77038ffe00..2714f28f1d 100644
@@ -105 +107 @@
- #include <ethdev_driver.h>
+ #include <rte_ethdev_driver.h>
@@ -107 +109 @@
-@@ -2845,6 +2846,7 @@ hns3_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
+@@ -2640,6 +2641,7 @@ hns3_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t nb_desc,
@@ -112,4 +114,4 @@
- 	memset(&txq->basic_stats, 0, sizeof(struct hns3_tx_basic_stats));
- 	memset(&txq->dfx_stats, 0, sizeof(struct hns3_tx_dfx_stats));
- 
-@@ -3548,6 +3550,69 @@ hns3_vld_vlan_chk(struct hns3_tx_queue *txq, struct rte_mbuf *m)
+ 	txq->over_length_pkt_cnt = 0;
+ 	txq->exceed_limit_bd_pkt_cnt = 0;
+ 	txq->exceed_limit_bd_reassem_fail = 0;
+@@ -3293,6 +3295,69 @@ hns3_vld_vlan_chk(struct hns3_tx_queue *txq, struct rte_mbuf *m)
@@ -185 +187 @@
-@@ -3592,6 +3657,9 @@ hns3_prep_pkt_proc(struct hns3_tx_queue *tx_queue, struct rte_mbuf *m)
+@@ -3337,6 +3402,9 @@ hns3_prep_pkt_proc(struct hns3_tx_queue *tx_queue, struct rte_mbuf *m)
@@ -196 +198 @@
-index f9b30485fe..6689397605 100644
+index 5650a97c3a..f7c60adc2e 100644
@@ -199 +201 @@
-@@ -464,6 +464,22 @@ struct hns3_tx_queue {
+@@ -387,6 +387,22 @@ struct hns3_tx_queue {

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

* [dpdk-stable] patch 'net/hns3: fix link update when failed to get link info' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (104 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/hns3: fix Tx checksum for UDP packets with special port' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/hns3: fix long task queue pairs reset time' " Xueming Li
                   ` (121 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/15b6974306cc12c09731e313f9b0f2be369fc84b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 15b6974306cc12c09731e313f9b0f2be369fc84b Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 23 Mar 2021 21:45:55 +0800
Subject: [PATCH] net/hns3: fix link update when failed to get link info
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 398ee80192b1d44026bcf02a27dd62a6d3df236d ]

In the "hns3_dev_link_update" API, the link information of the port is
obtained first, and then 'dev_link' in dev->data is updated. When the
driver is resetting or fails to obtain link info, the current driver
still reports the previous link info to the user. This may cause that
the dev->data->dev_link may be inconsistent with the hw link status.

Therefore, the link status consistency between the hardware, driver,
and framework can be ensured in this interface regardless of whether
the driver is normal or abnormal.

Fixes: 109e4dd1bd7a ("net/hns3: get link state change through mailbox")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 55 +++++++++++++++++++++++-----------
 1 file changed, 38 insertions(+), 17 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index ab4fb2519a..ba26230829 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2631,20 +2631,22 @@ hns3_fw_version_get(struct rte_eth_dev *eth_dev, char *fw_version,
 }
 
 static int
-hns3_dev_link_update(struct rte_eth_dev *eth_dev,
-		     __rte_unused int wait_to_complete)
+hns3_update_port_link_info(struct rte_eth_dev *eth_dev)
 {
-	struct hns3_adapter *hns = eth_dev->data->dev_private;
-	struct hns3_hw *hw = &hns->hw;
-	struct hns3_mac *mac = &hw->mac;
-	struct rte_eth_link new_link;
+	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
 
-	if (!hns3_is_reset_pending(hns)) {
-		hns3_update_link_status(hw);
-		hns3_update_link_info(eth_dev);
-	}
+	(void)hns3_update_link_status(hw);
+
+	return hns3_update_link_info(eth_dev);
+}
+
+static void
+hns3_setup_linkstatus(struct rte_eth_dev *eth_dev,
+		      struct rte_eth_link *new_link)
+{
+	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
+	struct hns3_mac *mac = &hw->mac;
 
-	memset(&new_link, 0, sizeof(new_link));
 	switch (mac->link_speed) {
 	case ETH_SPEED_NUM_10M:
 	case ETH_SPEED_NUM_100M:
@@ -2655,20 +2657,39 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev,
 	case ETH_SPEED_NUM_50G:
 	case ETH_SPEED_NUM_100G:
 	case ETH_SPEED_NUM_200G:
-		new_link.link_speed = mac->link_speed;
+		new_link->link_speed = mac->link_speed;
 		break;
 	default:
 		if (mac->link_status)
-			new_link.link_speed = ETH_SPEED_NUM_UNKNOWN;
+			new_link->link_speed = ETH_SPEED_NUM_UNKNOWN;
 		else
-			new_link.link_speed = ETH_SPEED_NUM_NONE;
+			new_link->link_speed = ETH_SPEED_NUM_NONE;
 		break;
 	}
 
-	new_link.link_duplex = mac->link_duplex;
-	new_link.link_status = mac->link_status ? ETH_LINK_UP : ETH_LINK_DOWN;
-	new_link.link_autoneg =
+	new_link->link_duplex = mac->link_duplex;
+	new_link->link_status = mac->link_status ? ETH_LINK_UP : ETH_LINK_DOWN;
+	new_link->link_autoneg =
 	    !(eth_dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED);
+}
+
+static int
+hns3_dev_link_update(struct rte_eth_dev *eth_dev,
+		     __rte_unused int wait_to_complete)
+{
+	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
+	struct hns3_mac *mac = &hw->mac;
+	struct rte_eth_link new_link;
+	int ret;
+
+	ret = hns3_update_port_link_info(eth_dev);
+	if (ret) {
+		mac->link_status = ETH_LINK_DOWN;
+		hns3_err(hw, "failed to get port link info, ret = %d.", ret);
+	}
+
+	memset(&new_link, 0, sizeof(new_link));
+	hns3_setup_linkstatus(eth_dev, &new_link);
 
 	return rte_eth_linkstatus_set(eth_dev, &new_link);
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.399467100 +0800
+++ 0108-net-hns3-fix-link-update-when-failed-to-get-link-inf.patch	2021-05-10 23:59:26.500000000 +0800
@@ -1 +1 @@
-From 398ee80192b1d44026bcf02a27dd62a6d3df236d Mon Sep 17 00:00:00 2001
+From 15b6974306cc12c09731e313f9b0f2be369fc84b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 398ee80192b1d44026bcf02a27dd62a6d3df236d ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index 9a57cc6b62..9c718082b0 100644
+index ab4fb2519a..ba26230829 100644
@@ -29 +31 @@
-@@ -2698,20 +2698,22 @@ hns3_fw_version_get(struct rte_eth_dev *eth_dev, char *fw_version,
+@@ -2631,20 +2631,22 @@ hns3_fw_version_get(struct rte_eth_dev *eth_dev, char *fw_version,
@@ -63 +65 @@
-@@ -2722,20 +2724,39 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev,
+@@ -2655,20 +2657,39 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev,

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

* [dpdk-stable] patch 'net/hns3: fix long task queue pairs reset time' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (105 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/hns3: fix link update when failed to get link info' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/hinic: fix crash in secondary process' " Xueming Li
                   ` (120 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a1b0bff2d5ac0df4c74ff05afaa97eeef799510b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a1b0bff2d5ac0df4c74ff05afaa97eeef799510b Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Tue, 23 Mar 2021 21:45:56 +0800
Subject: [PATCH] net/hns3: fix long task queue pairs reset time
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 6911e7c22c61a7071a534b198f79dc4c6d525445 ]

Currently, the queue reset process needs to be performed one by one,
which is inefficient. However, the queues reset in the same function is
almost at the same stage. To optimize the queue reset process, a new
function has been added to the firmware command HNS3_OPC_CFG_RST_TRIGGER
to reset all queues in the same function at a time. And the related
queue reset MBX message is adjusted in the same way too.

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

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_cmd.h  |   8 ++-
 drivers/net/hns3/hns3_rxtx.c | 125 ++++++++++++++++++++++++++++++-----
 2 files changed, 114 insertions(+), 19 deletions(-)

diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h
index 20c373590f..2d0bab000e 100644
--- a/drivers/net/hns3/hns3_cmd.h
+++ b/drivers/net/hns3/hns3_cmd.h
@@ -856,10 +856,16 @@ struct hns3_reset_tqp_queue_cmd {
 
 #define HNS3_CFG_RESET_MAC_B		3
 #define HNS3_CFG_RESET_FUNC_B		7
+#define HNS3_CFG_RESET_RCB_B		1
 struct hns3_reset_cmd {
 	uint8_t mac_func_reset;
 	uint8_t fun_reset_vfid;
-	uint8_t rsv[22];
+	uint8_t fun_reset_rcb;
+	uint8_t rsv1;
+	uint16_t fun_reset_rcb_vqid_start;
+	uint16_t fun_reset_rcb_vqid_num;
+	uint8_t fun_reset_rcb_return_status;
+	uint8_t rsv2[15];
 };
 
 #define HNS3_QUERY_DEV_SPECS_BD_NUM		4
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 2714f28f1d..6ba83f421c 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -629,10 +629,6 @@ hns3pf_reset_tqp(struct hns3_hw *hw, uint16_t queue_id)
 	uint64_t end;
 	int ret;
 
-	ret = hns3_tqp_enable(hw, queue_id, false);
-	if (ret)
-		return ret;
-
 	/*
 	 * In current version VF is not supported when PF is driven by DPDK
 	 * driver, all task queue pairs are mapped to PF function, so PF's queue
@@ -679,11 +675,6 @@ hns3vf_reset_tqp(struct hns3_hw *hw, uint16_t queue_id)
 	uint8_t msg_data[2];
 	int ret;
 
-	/* Disable VF's queue before send queue reset msg to PF */
-	ret = hns3_tqp_enable(hw, queue_id, false);
-	if (ret)
-		return ret;
-
 	memcpy(msg_data, &queue_id, sizeof(uint16_t));
 
 	ret = hns3_send_mbx_msg(hw, HNS3_MBX_QUEUE_RESET, 0, msg_data,
@@ -695,14 +686,105 @@ hns3vf_reset_tqp(struct hns3_hw *hw, uint16_t queue_id)
 }
 
 static int
-hns3_reset_tqp(struct hns3_adapter *hns, uint16_t queue_id)
+hns3_reset_rcb_cmd(struct hns3_hw *hw, uint8_t *reset_status)
 {
-	struct hns3_hw *hw = &hns->hw;
+	struct hns3_reset_cmd *req;
+	struct hns3_cmd_desc desc;
+	int ret;
 
-	if (hns->is_vf)
-		return hns3vf_reset_tqp(hw, queue_id);
-	else
-		return hns3pf_reset_tqp(hw, queue_id);
+	hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_CFG_RST_TRIGGER, false);
+	req = (struct hns3_reset_cmd *)desc.data;
+	hns3_set_bit(req->mac_func_reset, HNS3_CFG_RESET_RCB_B, 1);
+
+	/*
+	 * The start qid should be the global qid of the first tqp of the
+	 * function which should be reset in this port. Since our PF not
+	 * support take over of VFs, so we only need to reset function 0,
+	 * and its start qid is always 0.
+	 */
+	req->fun_reset_rcb_vqid_start = rte_cpu_to_le_16(0);
+	req->fun_reset_rcb_vqid_num = rte_cpu_to_le_16(hw->cfg_max_queues);
+
+	ret = hns3_cmd_send(hw, &desc, 1);
+	if (ret) {
+		hns3_err(hw, "fail to send rcb reset cmd, ret = %d.", ret);
+		return ret;
+	}
+
+	*reset_status = req->fun_reset_rcb_return_status;
+	return 0;
+}
+
+static int
+hns3pf_reset_all_tqps(struct hns3_hw *hw)
+{
+#define HNS3_RESET_RCB_NOT_SUPPORT	0U
+#define HNS3_RESET_ALL_TQP_SUCCESS	1U
+	uint8_t reset_status;
+	int ret;
+	int i;
+
+	ret = hns3_reset_rcb_cmd(hw, &reset_status);
+	if (ret)
+		return ret;
+
+	/*
+	 * If the firmware version is low, it may not support the rcb reset
+	 * which means reset all the tqps at a time. In this case, we should
+	 * reset tqps one by one.
+	 */
+	if (reset_status == HNS3_RESET_RCB_NOT_SUPPORT) {
+		for (i = 0; i < hw->cfg_max_queues; i++) {
+			ret = hns3pf_reset_tqp(hw, i);
+			if (ret) {
+				hns3_err(hw,
+				  "fail to reset tqp, queue_id = %d, ret = %d.",
+				  i, ret);
+				return ret;
+			}
+		}
+	} else if (reset_status != HNS3_RESET_ALL_TQP_SUCCESS) {
+		hns3_err(hw, "fail to reset all tqps, reset_status = %u.",
+				reset_status);
+		return -EIO;
+	}
+
+	return 0;
+}
+
+static int
+hns3vf_reset_all_tqps(struct hns3_hw *hw)
+{
+#define HNS3VF_RESET_ALL_TQP_DONE	1U
+	uint8_t reset_status;
+	uint8_t msg_data[2];
+	int ret;
+	int i;
+
+	memset(msg_data, 0, sizeof(uint16_t));
+	ret = hns3_send_mbx_msg(hw, HNS3_MBX_QUEUE_RESET, 0, msg_data,
+				sizeof(msg_data), true, &reset_status,
+				sizeof(reset_status));
+	if (ret) {
+		hns3_err(hw, "fail to send rcb reset mbx, ret = %d.", ret);
+		return ret;
+	}
+
+	if (reset_status == HNS3VF_RESET_ALL_TQP_DONE)
+		return 0;
+
+	/*
+	 * If the firmware version or kernel PF version is low, it may not
+	 * support the rcb reset which means reset all the tqps at a time.
+	 * In this case, we should reset tqps one by one.
+	 */
+	for (i = 1; i < hw->cfg_max_queues; i++) {
+		ret = hns3vf_reset_tqp(hw, i);
+		if (ret)
+			return ret;
+	}
+
+	return 0;
 }
 
 int
@@ -711,14 +793,21 @@ hns3_reset_all_tqps(struct hns3_adapter *hns)
 	struct hns3_hw *hw = &hns->hw;
 	int ret, i;
 
+	/* Disable all queues before reset all queues */
 	for (i = 0; i < hw->cfg_max_queues; i++) {
-		ret = hns3_reset_tqp(hns, i);
+		ret = hns3_tqp_enable(hw, i, false);
 		if (ret) {
-			hns3_err(hw, "Failed to reset No.%d queue: %d", i, ret);
+			hns3_err(hw,
+			    "fail to disable tqps before tqps reset, ret = %d.",
+			    ret);
 			return ret;
 		}
 	}
-	return 0;
+
+	if (hns->is_vf)
+		return hns3vf_reset_all_tqps(hw);
+	else
+		return hns3pf_reset_all_tqps(hw);
 }
 
 static int
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.424338600 +0800
+++ 0109-net-hns3-fix-long-task-queue-pairs-reset-time.patch	2021-05-10 23:59:26.500000000 +0800
@@ -1 +1 @@
-From 6911e7c22c61a7071a534b198f79dc4c6d525445 Mon Sep 17 00:00:00 2001
+From a1b0bff2d5ac0df4c74ff05afaa97eeef799510b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 6911e7c22c61a7071a534b198f79dc4c6d525445 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index e704d0c40b..30aca82d32 100644
+index 20c373590f..2d0bab000e 100644
@@ -27 +29 @@
-@@ -933,10 +933,16 @@ struct hns3_reset_tqp_queue_cmd {
+@@ -856,10 +856,16 @@ struct hns3_reset_tqp_queue_cmd {
@@ -46 +48 @@
-index 5bb35e14a1..ce5d852773 100644
+index 2714f28f1d..6ba83f421c 100644

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

* [dpdk-stable] patch 'net/hinic: fix crash in secondary process' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (106 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/hns3: fix long task queue pairs reset time' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/sfc: fix error path inconsistency' " Xueming Li
                   ` (119 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Guoyang Zhou; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/de81fe259ae6738425d3f761028ec8fe96f70f8c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From de81fe259ae6738425d3f761028ec8fe96f70f8c Mon Sep 17 00:00:00 2001
From: Guoyang Zhou <zhouguoyang@huawei.com>
Date: Tue, 23 Mar 2021 21:17:51 +0800
Subject: [PATCH] net/hinic: fix crash in secondary process
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 4c670dfaa417bc5604c9c58b505a74e2725acdb2 ]

Some apps, such as fstack, will use secondary process to access the
memory of eth_dev_ops, and they want to get the info of dev, but hinic
driver does not initialized it when in secondary process.

Fixes: 66f64dd6dc86 ("net/hinic: fix secondary process")

Signed-off-by: Guoyang Zhou <zhouguoyang@huawei.com>
---
 drivers/net/hinic/base/hinic_compat.h | 25 ++++++++-----------------
 drivers/net/hinic/hinic_pmd_ethdev.c  |  5 +++++
 2 files changed, 13 insertions(+), 17 deletions(-)

diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h
index 6dd210ec06..aea332046e 100644
--- a/drivers/net/hinic/base/hinic_compat.h
+++ b/drivers/net/hinic/base/hinic_compat.h
@@ -171,6 +171,7 @@ static inline u32 readl(const volatile void *addr)
 #else
 #define CLOCK_TYPE CLOCK_MONOTONIC
 #endif
+#define HINIC_MUTEX_TIMEOUT  10
 
 static inline unsigned long clock_gettime_ms(void)
 {
@@ -225,24 +226,14 @@ static inline int hinic_mutex_destroy(pthread_mutex_t *pthreadmutex)
 static inline int hinic_mutex_lock(pthread_mutex_t *pthreadmutex)
 {
 	int err;
+	struct timespec tout;
 
-	err = pthread_mutex_lock(pthreadmutex);
-	if (!err) {
-		return err;
-	} else if (err == EOWNERDEAD) {
-		PMD_DRV_LOG(ERR, "Mutex lock failed. (ErrorNo=%d)", errno);
-#if defined(__GLIBC__)
-#if __GLIBC_PREREQ(2, 12)
-		(void)pthread_mutex_consistent(pthreadmutex);
-#else
-		(void)pthread_mutex_consistent_np(pthreadmutex);
-#endif
-#else
-		(void)pthread_mutex_consistent(pthreadmutex);
-#endif
-	} else {
-		PMD_DRV_LOG(ERR, "Mutex lock failed. (ErrorNo=%d)", errno);
-	}
+	(void)clock_gettime(CLOCK_TYPE, &tout);
+
+	tout.tv_sec += HINIC_MUTEX_TIMEOUT;
+	err = pthread_mutex_timedlock(pthreadmutex, &tout);
+	if (err)
+		PMD_DRV_LOG(ERR, "Mutex lock failed. (ErrorNo=%d)", err);
 
 	return err;
 }
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index 5a2c171099..f1b3ba3927 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -3085,6 +3085,10 @@ static const struct eth_dev_ops hinic_pmd_vf_ops = {
 	.filter_ctrl                   = hinic_dev_filter_ctrl,
 };
 
+static const struct eth_dev_ops hinic_dev_sec_ops = {
+	.dev_infos_get                 = hinic_dev_infos_get,
+};
+
 static int hinic_func_init(struct rte_eth_dev *eth_dev)
 {
 	struct rte_pci_device *pci_dev;
@@ -3099,6 +3103,7 @@ static int hinic_func_init(struct rte_eth_dev *eth_dev)
 
 	/* EAL is SECONDARY and eth_dev is already created */
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+		eth_dev->dev_ops = &hinic_dev_sec_ops;
 		PMD_DRV_LOG(INFO, "Initialize %s in secondary process",
 			    eth_dev->data->name);
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.447945000 +0800
+++ 0110-net-hinic-fix-crash-in-secondary-process.patch	2021-05-10 23:59:26.500000000 +0800
@@ -1 +1 @@
-From 4c670dfaa417bc5604c9c58b505a74e2725acdb2 Mon Sep 17 00:00:00 2001
+From de81fe259ae6738425d3f761028ec8fe96f70f8c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 4c670dfaa417bc5604c9c58b505a74e2725acdb2 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -64 +66 @@
-index 2352dd1615..b5a36a863b 100644
+index 5a2c171099..f1b3ba3927 100644
@@ -67,2 +69,2 @@
-@@ -3063,6 +3063,10 @@ static const struct eth_dev_ops hinic_pmd_vf_ops = {
- 	.flow_ops_get                  = hinic_dev_flow_ops_get,
+@@ -3085,6 +3085,10 @@ static const struct eth_dev_ops hinic_pmd_vf_ops = {
+ 	.filter_ctrl                   = hinic_dev_filter_ctrl,
@@ -78 +80 @@
-@@ -3077,6 +3081,7 @@ static int hinic_func_init(struct rte_eth_dev *eth_dev)
+@@ -3099,6 +3103,7 @@ static int hinic_func_init(struct rte_eth_dev *eth_dev)

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

* [dpdk-stable] patch 'net/sfc: fix error path inconsistency' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (107 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/hinic: fix crash in secondary process' " Xueming Li
@ 2021-05-10 16:00 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'app/testpmd: fix Tx/Rx descriptor query error log' " Xueming Li
                   ` (118 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:00 UTC (permalink / raw)
  To: Ivan Malov; +Cc: Luca Boccassi, Andrew Rybchenko, Andy Moreton, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/cd33dd08a7ac1e8b910786dbef0275e306a5d03c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cd33dd08a7ac1e8b910786dbef0275e306a5d03c Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Fri, 26 Mar 2021 12:39:27 +0300
Subject: [PATCH] net/sfc: fix error path inconsistency
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 85a9c42499fa97b9bee12a95a8477d34cec277ec ]

At the fail label, there's a statement to set general errno and
error message. However, before the label is reached, a custom
error message can be set by the code which parses actions.
This custom (action-specific) message, when present,
must not be replaced by the general one.

Fixes: 662286ae61d2 ("net/sfc: add actions parsing stub to MAE backend")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
 drivers/net/sfc/sfc_mae.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index 15c5c39758..42d1612302 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -2101,6 +2101,8 @@ sfc_mae_rule_parse_actions(struct sfc_adapter *sa,
 	efx_mae_actions_t *spec;
 	int rc;
 
+	rte_errno = 0;
+
 	if (actions == NULL) {
 		return rte_flow_error_set(error, EINVAL,
 				RTE_FLOW_ERROR_TYPE_ACTION_NUM, NULL,
@@ -2144,7 +2146,7 @@ fail_rule_parse_action:
 	efx_mae_action_set_spec_fini(sa->nic, spec);
 
 fail_action_set_spec_init:
-	if (rc > 0) {
+	if (rc > 0 && rte_errno == 0) {
 		rc = rte_flow_error_set(error, rc,
 			RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
 			NULL, "Failed to process the action");
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.473198200 +0800
+++ 0111-net-sfc-fix-error-path-inconsistency.patch	2021-05-10 23:59:26.500000000 +0800
@@ -1 +1 @@
-From 85a9c42499fa97b9bee12a95a8477d34cec277ec Mon Sep 17 00:00:00 2001
+From cd33dd08a7ac1e8b910786dbef0275e306a5d03c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 85a9c42499fa97b9bee12a95a8477d34cec277ec ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 8afa093414..4dafe3dcd9 100644
+index 15c5c39758..42d1612302 100644
@@ -26 +28 @@
-@@ -2634,6 +2634,8 @@ sfc_mae_rule_parse_actions(struct sfc_adapter *sa,
+@@ -2101,6 +2101,8 @@ sfc_mae_rule_parse_actions(struct sfc_adapter *sa,
@@ -35 +37 @@
-@@ -2690,7 +2692,7 @@ fail_rule_parse_action:
+@@ -2144,7 +2146,7 @@ fail_rule_parse_action:

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

* [dpdk-stable] patch 'app/testpmd: fix Tx/Rx descriptor query error log' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (108 preceding siblings ...)
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/sfc: fix error path inconsistency' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/i40e: fix parsing packet type for NEON' " Xueming Li
                   ` (117 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Hongbo Zheng; +Cc: Luca Boccassi, Min Hu, Xiaoyun Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/38824647ed54b9a9226b8595cea2d306c1cd207e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 38824647ed54b9a9226b8595cea2d306c1cd207e Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3@huawei.com>
Date: Mon, 29 Mar 2021 14:46:43 +0800
Subject: [PATCH] app/testpmd: fix Tx/Rx descriptor query error log
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 0e8f3489940aae7a29112b0de745bb5205239c83 ]

This patch adds more err info for Tx/Rx descriptor query command.

Fixes: fae9aa717d6c ("app/testpmd: support checking descriptor status")

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 app/test-pmd/cmdline.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index fa2a0c78e6..58b591b292 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -16613,7 +16613,8 @@ cmd_show_rx_tx_desc_status_parsed(void *parsed_result,
 		rc = rte_eth_rx_descriptor_status(res->cmd_pid, res->cmd_qid,
 					     res->cmd_did);
 		if (rc < 0) {
-			printf("Invalid queueid = %d\n", res->cmd_qid);
+			printf("Invalid input: queue id = %d, desc id = %d\n",
+			       res->cmd_qid, res->cmd_did);
 			return;
 		}
 		if (rc == RTE_ETH_RX_DESC_AVAIL)
@@ -16626,7 +16627,8 @@ cmd_show_rx_tx_desc_status_parsed(void *parsed_result,
 		rc = rte_eth_tx_descriptor_status(res->cmd_pid, res->cmd_qid,
 					     res->cmd_did);
 		if (rc < 0) {
-			printf("Invalid queueid = %d\n", res->cmd_qid);
+			printf("Invalid input: queue id = %d, desc id = %d\n",
+			       res->cmd_qid, res->cmd_did);
 			return;
 		}
 		if (rc == RTE_ETH_TX_DESC_FULL)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.496985100 +0800
+++ 0112-app-testpmd-fix-Tx-Rx-descriptor-query-error-log.patch	2021-05-10 23:59:26.510000000 +0800
@@ -1 +1 @@
-From 0e8f3489940aae7a29112b0de745bb5205239c83 Mon Sep 17 00:00:00 2001
+From 38824647ed54b9a9226b8595cea2d306c1cd207e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 0e8f3489940aae7a29112b0de745bb5205239c83 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 14110eb2e4..f44116b087 100644
+index fa2a0c78e6..58b591b292 100644
@@ -22 +24 @@
-@@ -16629,7 +16629,8 @@ cmd_show_rx_tx_desc_status_parsed(void *parsed_result,
+@@ -16613,7 +16613,8 @@ cmd_show_rx_tx_desc_status_parsed(void *parsed_result,
@@ -32 +34 @@
-@@ -16642,7 +16643,8 @@ cmd_show_rx_tx_desc_status_parsed(void *parsed_result,
+@@ -16626,7 +16627,8 @@ cmd_show_rx_tx_desc_status_parsed(void *parsed_result,

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

* [dpdk-stable] patch 'net/i40e: fix parsing packet type for NEON' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (109 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'app/testpmd: fix Tx/Rx descriptor query error log' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/iavf: fix packet length parsing in AVX512' " Xueming Li
                   ` (116 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Feifei Wang; +Cc: Luca Boccassi, Ruifeng Wang, Kathleen Capella, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7f8de7322818b057d8c0dd24ebbd2ef8ab6b9a39

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7f8de7322818b057d8c0dd24ebbd2ef8ab6b9a39 Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Wed, 10 Mar 2021 10:40:29 +0800
Subject: [PATCH] net/i40e: fix parsing packet type for NEON
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 31d7c6f7d424c533b0a4dd9b4408b814ac7852f1 ]

In i40e NEON vector Rx path, the packet descs processing is incorrect.
This caused wrong packet type been filled in mbuf.

To fix this, when shifting the pktlen field to be 16-bit aligned, it
only needs to process the high 16bit of the packet descs instead of
the high 32bit.

Test Results:
Architecture: arm64
NIC: XL710
Driver: i40e
Package: Ether()/IP()/

Without this patch:
desc_to_ptype_v: ptype = 7 (error)

With this patch:
desc_to_ptype_v: ptype = 23 (correct)

Fixes: ae0eb310f253 ("net/i40e: implement vector PMD for ARM")

Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Tested-by: Kathleen Capella <kathleen.capella@arm.com>
---
 drivers/net/i40e/i40e_rxtx_vec_neon.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c
index f094de69ae..edb202a51a 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_neon.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c
@@ -310,10 +310,16 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *__rte_restrict rxq,
 		/* pkt 3,4 shift the pktlen field to be 16-bit aligned*/
 		uint32x4_t len3 = vshlq_u32(vreinterpretq_u32_u64(descs[3]),
 					    len_shl);
-		descs[3] = vreinterpretq_u64_u32(len3);
+		descs[3] = vreinterpretq_u64_u16(vsetq_lane_u16
+				(vgetq_lane_u16(vreinterpretq_u16_u32(len3), 7),
+				 vreinterpretq_u16_u64(descs[3]),
+				 7));
 		uint32x4_t len2 = vshlq_u32(vreinterpretq_u32_u64(descs[2]),
 					    len_shl);
-		descs[2] = vreinterpretq_u64_u32(len2);
+		descs[2] = vreinterpretq_u64_u16(vsetq_lane_u16
+				(vgetq_lane_u16(vreinterpretq_u16_u32(len2), 7),
+				 vreinterpretq_u16_u64(descs[2]),
+				 7));
 
 		/* D.1 pkt 3,4 convert format from desc to pktmbuf */
 		pkt_mb4 = vqtbl1q_u8(vreinterpretq_u8_u64(descs[3]), shuf_msk);
@@ -341,10 +347,16 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *__rte_restrict rxq,
 		/* pkt 1,2 shift the pktlen field to be 16-bit aligned*/
 		uint32x4_t len1 = vshlq_u32(vreinterpretq_u32_u64(descs[1]),
 					    len_shl);
-		descs[1] = vreinterpretq_u64_u32(len1);
+		descs[1] = vreinterpretq_u64_u16(vsetq_lane_u16
+				(vgetq_lane_u16(vreinterpretq_u16_u32(len1), 7),
+				 vreinterpretq_u16_u64(descs[1]),
+				 7));
 		uint32x4_t len0 = vshlq_u32(vreinterpretq_u32_u64(descs[0]),
 					    len_shl);
-		descs[0] = vreinterpretq_u64_u32(len0);
+		descs[0] = vreinterpretq_u64_u16(vsetq_lane_u16
+				(vgetq_lane_u16(vreinterpretq_u16_u32(len0), 7),
+				 vreinterpretq_u16_u64(descs[0]),
+				 7));
 
 		/* D.1 pkt 1,2 convert format from desc to pktmbuf */
 		pkt_mb2 = vqtbl1q_u8(vreinterpretq_u8_u64(descs[1]), shuf_msk);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.529515200 +0800
+++ 0113-net-i40e-fix-parsing-packet-type-for-NEON.patch	2021-05-10 23:59:26.510000000 +0800
@@ -1 +1 @@
-From 31d7c6f7d424c533b0a4dd9b4408b814ac7852f1 Mon Sep 17 00:00:00 2001
+From 7f8de7322818b057d8c0dd24ebbd2ef8ab6b9a39 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 31d7c6f7d424c533b0a4dd9b4408b814ac7852f1 ]
@@ -26 +28,0 @@
-Cc: stable@dpdk.org
@@ -36 +38 @@
-index da16dfc386..1f5539bda8 100644
+index f094de69ae..edb202a51a 100644

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

* [dpdk-stable] patch 'net/iavf: fix packet length parsing in AVX512' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (110 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/i40e: fix parsing packet type for NEON' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/i40e: announce request queue capability in PF' " Xueming Li
                   ` (115 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Leyi Rong; +Cc: Luca Boccassi, David Coyle, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ddb17b5462d5b54579e201ef3530abe0f1f0f7b1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ddb17b5462d5b54579e201ef3530abe0f1f0f7b1 Mon Sep 17 00:00:00 2001
From: Leyi Rong <leyi.rong@intel.com>
Date: Wed, 17 Mar 2021 17:17:56 +0800
Subject: [PATCH] net/iavf: fix packet length parsing in AVX512
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit fecbc64cb3647531062a8b97bd62a98bee05e773 ]

Fix pkt_len parsing when DEV_RX_OFFLOAD_KEEP_CRC is set in AVX512 path.

Fixes: 31737f2b66fb ("net/iavf: enable AVX512 for legacy Rx")
Fixes: 6df587028e57 ("net/iavf: enable AVX512 for flexible Rx")

Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Tested-by: David Coyle <david.coyle@intel.com>
---
 drivers/net/iavf/iavf_rxtx_vec_avx512.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx512.c b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
index 584d12ea36..4aae99031e 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx512.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
@@ -380,7 +380,7 @@ _iavf_recv_raw_pkts_vec_avx512(struct iavf_rx_queue *rxq,
 								len4_7);
 		__m512i mb4_7 = _mm512_shuffle_epi8(desc4_7, shuf_msk);
 
-		mb4_7 = _mm512_add_epi16(mb4_7, crc_adjust);
+		mb4_7 = _mm512_add_epi32(mb4_7, crc_adjust);
 		/**
 		 * to get packet types, shift 64-bit values down 30 bits
 		 * and so ptype is in lower 8-bits in each
@@ -411,7 +411,7 @@ _iavf_recv_raw_pkts_vec_avx512(struct iavf_rx_queue *rxq,
 								len0_3);
 		__m512i mb0_3 = _mm512_shuffle_epi8(desc0_3, shuf_msk);
 
-		mb0_3 = _mm512_add_epi16(mb0_3, crc_adjust);
+		mb0_3 = _mm512_add_epi32(mb0_3, crc_adjust);
 		/* get the packet types */
 		const __m512i ptypes0_3 = _mm512_srli_epi64(desc0_3, 30);
 		const __m256i ptypes2_3 = _mm512_extracti64x4_epi64(ptypes0_3, 1);
@@ -869,7 +869,7 @@ _iavf_recv_raw_pkts_vec_avx512_flex_rxd(struct iavf_rx_queue *rxq,
 		 */
 		__m512i mb4_7 = _mm512_shuffle_epi8(raw_desc4_7, shuf_msk);
 
-		mb4_7 = _mm512_add_epi16(mb4_7, crc_adjust);
+		mb4_7 = _mm512_add_epi32(mb4_7, crc_adjust);
 		/**
 		 * to get packet types, ptype is located in bit16-25
 		 * of each 128bits
@@ -898,7 +898,7 @@ _iavf_recv_raw_pkts_vec_avx512_flex_rxd(struct iavf_rx_queue *rxq,
 		 */
 		__m512i mb0_3 = _mm512_shuffle_epi8(raw_desc0_3, shuf_msk);
 
-		mb0_3 = _mm512_add_epi16(mb0_3, crc_adjust);
+		mb0_3 = _mm512_add_epi32(mb0_3, crc_adjust);
 		/**
 		 * to get packet types, ptype is located in bit16-25
 		 * of each 128bits
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.551805700 +0800
+++ 0114-net-iavf-fix-packet-length-parsing-in-AVX512.patch	2021-05-10 23:59:26.510000000 +0800
@@ -1 +1 @@
-From fecbc64cb3647531062a8b97bd62a98bee05e773 Mon Sep 17 00:00:00 2001
+From ddb17b5462d5b54579e201ef3530abe0f1f0f7b1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit fecbc64cb3647531062a8b97bd62a98bee05e773 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 5cb4c7cda6..67184ae3f4 100644
+index 584d12ea36..4aae99031e 100644

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

* [dpdk-stable] patch 'net/i40e: announce request queue capability in PF' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (111 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/iavf: fix packet length parsing in AVX512' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/igc: fix Rx RSS hash offload capability' " Xueming Li
                   ` (114 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Robin Zhang; +Cc: Luca Boccassi, Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8235f3fdfd945291e053643528014c21eec0d257

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8235f3fdfd945291e053643528014c21eec0d257 Mon Sep 17 00:00:00 2001
From: Robin Zhang <robinx.zhang@intel.com>
Date: Fri, 12 Mar 2021 08:52:09 +0000
Subject: [PATCH] net/i40e: announce request queue capability in PF
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 918e90b96039cd05f9271a2d80d9c000b42f5c44 ]

A new feature requesting additional queues from PF is added in iavf;
before sending VIRTCHNL_OP_REQUEST_QUEUES op code, the offload
capability flag VIRTCHNL_VF_OFFLOAD_REQ_QUEUES will be checked.

And due to DPDK PF is still used by some cases, add this offload
capability flag in i40e PF.

Fixes: cbdbd360f77f ("net/i40e: support AVF basic interface")

Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
Acked-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/net/i40e/i40e_pf.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
index 65d649b627..d6f5698342 100644
--- a/drivers/net/i40e/i40e_pf.c
+++ b/drivers/net/i40e/i40e_pf.c
@@ -333,6 +333,10 @@ i40e_pf_host_process_cmd_get_vf_resource(struct i40e_pf_vf *vf, uint8_t *msg,
 
 	vf_res->vf_cap_flags = vf->request_caps &
 				   I40E_VIRTCHNL_OFFLOAD_CAPS;
+
+	if (vf->request_caps & VIRTCHNL_VF_OFFLOAD_REQ_QUEUES)
+		vf_res->vf_cap_flags |= VIRTCHNL_VF_OFFLOAD_REQ_QUEUES;
+
 	/* For X722, it supports write back on ITR
 	 * without binding queue to interrupt vector.
 	 */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.575039800 +0800
+++ 0115-net-i40e-announce-request-queue-capability-in-PF.patch	2021-05-10 23:59:26.510000000 +0800
@@ -1 +1 @@
-From 918e90b96039cd05f9271a2d80d9c000b42f5c44 Mon Sep 17 00:00:00 2001
+From 8235f3fdfd945291e053643528014c21eec0d257 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 918e90b96039cd05f9271a2d80d9c000b42f5c44 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index f3d6d899f6..9804ed4253 100644
+index 65d649b627..d6f5698342 100644

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

* [dpdk-stable] patch 'net/igc: fix Rx RSS hash offload capability' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (112 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/i40e: announce request queue capability in PF' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/iavf: fix TSO max segment size' " Xueming Li
                   ` (113 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/eefc6b16bcd4d801b51b62678cb8a94a64d56f61

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From eefc6b16bcd4d801b51b62678cb8a94a64d56f61 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Thu, 25 Mar 2021 09:51:50 +0800
Subject: [PATCH] net/igc: fix Rx RSS hash offload capability
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 47319fb41b067ecda53c256b43d8490957d30dd0 ]

Add DEV_RX_OFFLOAD_RSS_HASH flag to the PMD's Rx offload capabilities
for it supports RSS hash delivery.

Fixes: 4f09bc55ac3d ("net/igc: implement device base operations")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/igc/igc_ethdev.c | 3 +++
 drivers/net/igc/igc_ethdev.h | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
index 75e114b9ca..2d9bbb835d 100644
--- a/drivers/net/igc/igc_ethdev.c
+++ b/drivers/net/igc/igc_ethdev.c
@@ -341,6 +341,9 @@ eth_igc_configure(struct rte_eth_dev *dev)
 
 	PMD_INIT_FUNC_TRACE();
 
+	if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)
+		dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
+
 	ret  = igc_check_mq_mode(dev);
 	if (ret != 0)
 		return ret;
diff --git a/drivers/net/igc/igc_ethdev.h b/drivers/net/igc/igc_ethdev.h
index a09debfb40..6f658a0e83 100644
--- a/drivers/net/igc/igc_ethdev.h
+++ b/drivers/net/igc/igc_ethdev.h
@@ -67,7 +67,8 @@ extern "C" {
 	DEV_RX_OFFLOAD_SCTP_CKSUM  | \
 	DEV_RX_OFFLOAD_JUMBO_FRAME | \
 	DEV_RX_OFFLOAD_KEEP_CRC    | \
-	DEV_RX_OFFLOAD_SCATTER)
+	DEV_RX_OFFLOAD_SCATTER     | \
+	DEV_RX_OFFLOAD_RSS_HASH)
 
 #define IGC_TX_OFFLOAD_ALL	(    \
 	DEV_TX_OFFLOAD_VLAN_INSERT | \
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.598248000 +0800
+++ 0116-net-igc-fix-Rx-RSS-hash-offload-capability.patch	2021-05-10 23:59:26.510000000 +0800
@@ -1 +1 @@
-From 47319fb41b067ecda53c256b43d8490957d30dd0 Mon Sep 17 00:00:00 2001
+From eefc6b16bcd4d801b51b62678cb8a94a64d56f61 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 47319fb41b067ecda53c256b43d8490957d30dd0 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 56d1024af6..17dd8bf8c6 100644
+index 75e114b9ca..2d9bbb835d 100644

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

* [dpdk-stable] patch 'net/iavf: fix TSO max segment size' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (113 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/igc: fix Rx RSS hash offload capability' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/ixgbe: fix RSS RETA being reset after port start' " Xueming Li
                   ` (112 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Luca Boccassi, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/843b7caa8efd8ef584519fc0acc2d608a1185630

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 843b7caa8efd8ef584519fc0acc2d608a1185630 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 1 Mar 2021 15:57:14 +0800
Subject: [PATCH] net/iavf: fix TSO max segment size
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 6d05fc905df216b78e4e3db935927a53a638c6d0 ]

According to Intel® AVF spec
(https://www.intel.com/content/dam/
www/public/us/en/documents/product-specifications/
ethernet-adaptive-virtual-function-hardware-spec.pdf)
section 2.2.2.3:
The max segment size(MSS) of TSO should not be set lower than 88.

Fixes: a2b29a7733ef ("net/avf: enable basic Rx Tx")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/iavf/iavf_rxtx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h
index d4b4935be6..6bf6a44b77 100644
--- a/drivers/net/iavf/iavf_rxtx.h
+++ b/drivers/net/iavf/iavf_rxtx.h
@@ -34,7 +34,7 @@
 #define DEFAULT_TX_RS_THRESH     32
 #define DEFAULT_TX_FREE_THRESH   32
 
-#define IAVF_MIN_TSO_MSS          256
+#define IAVF_MIN_TSO_MSS          88
 #define IAVF_MAX_TSO_MSS          9668
 #define IAVF_TSO_MAX_SEG          UINT8_MAX
 #define IAVF_TX_MAX_MTU_SEG       8
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.623566200 +0800
+++ 0117-net-iavf-fix-TSO-max-segment-size.patch	2021-05-10 23:59:26.510000000 +0800
@@ -1 +1 @@
-From 6d05fc905df216b78e4e3db935927a53a638c6d0 Mon Sep 17 00:00:00 2001
+From 843b7caa8efd8ef584519fc0acc2d608a1185630 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 6d05fc905df216b78e4e3db935927a53a638c6d0 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index 5377459eae..4fbd847034 100644
+index d4b4935be6..6bf6a44b77 100644

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

* [dpdk-stable] patch 'net/ixgbe: fix RSS RETA being reset after port start' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (114 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/iavf: fix TSO max segment size' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/mlx5: fix using flow tunnel before null check' " Xueming Li
                   ` (111 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Murphy Yang; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7f55ac318c25cfaa6459faaaffdc1b33d0a05e10

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7f55ac318c25cfaa6459faaaffdc1b33d0a05e10 Mon Sep 17 00:00:00 2001
From: Murphy Yang <murphyx.yang@intel.com>
Date: Mon, 29 Mar 2021 08:28:45 +0000
Subject: [PATCH] net/ixgbe: fix RSS RETA being reset after port start
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 8b628c22b38f7a81b6cba677aaabd140d8583ae5 ]

If one calls ‘rte_eth_dev_rss_reta_update’ with ixgbe before starting
the device (but after setting everything else), then RSS RETA
configuration will be zero after starting the device.

This patch gives a notification if the port not started.

Bugzilla ID: 664
Fixes: 249358424eab ("ixgbe: RSS RETA configuration")

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index fa0f5afd03..6195c7f025 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -5007,11 +5007,19 @@ ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev,
 	uint32_t reta, r;
 	uint16_t idx, shift;
 	struct ixgbe_adapter *adapter = dev->data->dev_private;
+	struct rte_eth_dev_data *dev_data = dev->data;
 	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	uint32_t reta_reg;
 
 	PMD_INIT_FUNC_TRACE();
 
+	if (!dev_data->dev_started) {
+		PMD_DRV_LOG(ERR,
+			"port %d must be started before rss reta update",
+			 dev_data->port_id);
+		return -EIO;
+	}
+
 	if (!ixgbe_rss_update_sp(hw->mac.type)) {
 		PMD_DRV_LOG(ERR, "RSS reta update is not supported on this "
 			"NIC.");
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.645793200 +0800
+++ 0118-net-ixgbe-fix-RSS-RETA-being-reset-after-port-start.patch	2021-05-10 23:59:26.520000000 +0800
@@ -1 +1 @@
-From 8b628c22b38f7a81b6cba677aaabd140d8583ae5 Mon Sep 17 00:00:00 2001
+From 7f55ac318c25cfaa6459faaaffdc1b33d0a05e10 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 8b628c22b38f7a81b6cba677aaabd140d8583ae5 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index be9c438c10..31faff066c 100644
+index fa0f5afd03..6195c7f025 100644
@@ -29 +31 @@
-@@ -5013,11 +5013,19 @@ ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev,
+@@ -5007,11 +5007,19 @@ ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/mlx5: fix using flow tunnel before null check' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (115 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/ixgbe: fix RSS RETA being reset after port start' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'vdpa/ifc: check PCI config read' " Xueming Li
                   ` (110 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f90c6e9d4139a54551d6487b72ec851cdf5fabfa

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f90c6e9d4139a54551d6487b72ec851cdf5fabfa Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Sat, 27 Mar 2021 10:44:09 +0800
Subject: [PATCH] net/mlx5: fix using flow tunnel before null check
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit ed9726ce83eb7562b3dcfaf0ee10647ed816ae4a ]

Coverity flags that 'ctx->tunnel' variable is used before
it's checked for NULL. This patch fixes this issue.

Coverity issue: 366201
Fixes: 868d2e342cf3 ("net/mlx5: fix tunnel offload hub multi-thread protection")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index d574ad78c7..2fe810c6b5 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -7609,10 +7609,11 @@ static void get_tunnel_miss(struct rte_eth_dev *dev, void *x)
 
 	rte_spinlock_unlock(&thub->sl);
 	ctx->tunnel = mlx5_flow_tunnel_allocate(dev, ctx->app_tunnel);
-	ctx->tunnel->refctn = 1;
 	rte_spinlock_lock(&thub->sl);
-	if (ctx->tunnel)
+	if (ctx->tunnel) {
+		ctx->tunnel->refctn = 1;
 		LIST_INSERT_HEAD(&thub->tunnels, ctx->tunnel, chain);
+	}
 }
 
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.674522700 +0800
+++ 0119-net-mlx5-fix-using-flow-tunnel-before-null-check.patch	2021-05-10 23:59:26.520000000 +0800
@@ -1 +1 @@
-From ed9726ce83eb7562b3dcfaf0ee10647ed816ae4a Mon Sep 17 00:00:00 2001
+From f90c6e9d4139a54551d6487b72ec851cdf5fabfa Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit ed9726ce83eb7562b3dcfaf0ee10647ed816ae4a ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 7ab7f63264..c347f8130e 100644
+index d574ad78c7..2fe810c6b5 100644
@@ -23 +25 @@
-@@ -7881,10 +7881,11 @@ static void get_tunnel_miss(struct rte_eth_dev *dev, void *x)
+@@ -7609,10 +7609,11 @@ static void get_tunnel_miss(struct rte_eth_dev *dev, void *x)

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

* [dpdk-stable] patch 'vdpa/ifc: check PCI config read' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (116 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/mlx5: fix using flow tunnel before null check' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'examples/vhost: check memory table query' " Xueming Li
                   ` (109 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Xiao Wang; +Cc: Luca Boccassi, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/42457347e2ae00cfb7625cd91284d29802cbce28

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 42457347e2ae00cfb7625cd91284d29802cbce28 Mon Sep 17 00:00:00 2001
From: Xiao Wang <xiao.w.wang@intel.com>
Date: Tue, 9 Mar 2021 16:43:15 +0800
Subject: [PATCH] vdpa/ifc: check PCI config read
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 629d75653bc584a2927a87566bf00beea661f91b ]

The return value of rte_pci_read_config should be checked.

Coverity issue: 302860
Fixes: a3f8150eac6d ("net/ifcvf: add ifcvf vDPA driver")

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 drivers/vdpa/ifc/base/ifcvf.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/vdpa/ifc/base/ifcvf.c b/drivers/vdpa/ifc/base/ifcvf.c
index 3c0b2dff66..721cb1da8a 100644
--- a/drivers/vdpa/ifc/base/ifcvf.c
+++ b/drivers/vdpa/ifc/base/ifcvf.c
@@ -65,8 +65,13 @@ ifcvf_init_hw(struct ifcvf_hw *hw, PCI_DEV *dev)
 			hw->common_cfg = get_cap_addr(hw, &cap);
 			break;
 		case IFCVF_PCI_CAP_NOTIFY_CFG:
-			PCI_READ_CONFIG_DWORD(dev, &hw->notify_off_multiplier,
+			ret = PCI_READ_CONFIG_DWORD(dev,
+					&hw->notify_off_multiplier,
 					pos + sizeof(cap));
+			if (ret < 0) {
+				DEBUGOUT("failed to read notify_off_multiplier\n");
+				return -1;
+			}
 			hw->notify_base = get_cap_addr(hw, &cap);
 			hw->notify_region = cap.bar;
 			break;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.702475700 +0800
+++ 0120-vdpa-ifc-check-PCI-config-read.patch	2021-05-10 23:59:26.520000000 +0800
@@ -1 +1 @@
-From 629d75653bc584a2927a87566bf00beea661f91b Mon Sep 17 00:00:00 2001
+From 42457347e2ae00cfb7625cd91284d29802cbce28 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 629d75653bc584a2927a87566bf00beea661f91b ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'examples/vhost: check memory table query' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (117 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'vdpa/ifc: check PCI config read' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'vhost: fix split ring potential buffer overflow' " Xueming Li
                   ` (108 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Chenbo Xia; +Cc: Luca Boccassi, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1716e668784eb5d2e42bd7d2489990c09c49998b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1716e668784eb5d2e42bd7d2489990c09c49998b Mon Sep 17 00:00:00 2001
From: Chenbo Xia <chenbo.xia@intel.com>
Date: Fri, 19 Feb 2021 10:40:11 +0800
Subject: [PATCH] examples/vhost: check memory table query
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 1739f814258cf7f4e25d55710918fa0ecc4d828e ]

This patch fixes unchecked return value for rte_vhost_get_mem_table(),
which is reported by coverity.

Coverity issue: 364233
Fixes: ca059fa5e290 ("examples/vhost: demonstrate the new generic APIs")

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

diff --git a/examples/vhost/virtio_net.c b/examples/vhost/virtio_net.c
index 8ea6b36d59..28e4b00960 100644
--- a/examples/vhost/virtio_net.c
+++ b/examples/vhost/virtio_net.c
@@ -23,6 +23,7 @@ vs_vhost_net_setup(struct vhost_dev *dev)
 	uint16_t i;
 	int vid = dev->vid;
 	struct vhost_queue *queue;
+	int ret;
 
 	RTE_LOG(INFO, VHOST_CONFIG,
 		"setting builtin vhost-user net driver\n");
@@ -33,7 +34,12 @@ vs_vhost_net_setup(struct vhost_dev *dev)
 	else
 		dev->hdr_len = sizeof(struct virtio_net_hdr);
 
-	rte_vhost_get_mem_table(vid, &dev->mem);
+	ret = rte_vhost_get_mem_table(vid, &dev->mem);
+	if (ret < 0) {
+		RTE_LOG(ERR, VHOST_CONFIG, "Failed to get "
+			"VM memory layout for device(%d)\n", vid);
+		return;
+	}
 
 	dev->nr_vrings = rte_vhost_get_vring_num(vid);
 	for (i = 0; i < dev->nr_vrings; i++) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.725083200 +0800
+++ 0121-examples-vhost-check-memory-table-query.patch	2021-05-10 23:59:26.520000000 +0800
@@ -1 +1 @@
-From 1739f814258cf7f4e25d55710918fa0ecc4d828e Mon Sep 17 00:00:00 2001
+From 1716e668784eb5d2e42bd7d2489990c09c49998b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 1739f814258cf7f4e25d55710918fa0ecc4d828e ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 64bf3d19ff..9064fc3a82 100644
+index 8ea6b36d59..28e4b00960 100644

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

* [dpdk-stable] patch 'vhost: fix split ring potential buffer overflow' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (118 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'examples/vhost: check memory table query' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'vhost: fix packed " Xueming Li
                   ` (107 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Marvin Liu; +Cc: Luca Boccassi, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/25d53e1eb8d8b88503e606361900fac7215edf52

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 25d53e1eb8d8b88503e606361900fac7215edf52 Mon Sep 17 00:00:00 2001
From: Marvin Liu <yong.liu@intel.com>
Date: Wed, 31 Mar 2021 14:49:37 +0800
Subject: [PATCH] vhost: fix split ring potential buffer overflow
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 134228ca39ef0cfe325bc5f1d0df38c733ec9752 ]

In vhost datapath, descriptor's length are mostly used in two coherent
operations. First step is used for address translation, second step is
used for memory transaction from guest to host. But the interval between
two steps will give a window for malicious guest, in which can change
descriptor length after vhost calculated buffer size. Thus may lead to
buffer overflow in vhost side. This potential risk can be eliminated by
accessing the descriptor length once.

Fixes: 1be4ebb1c464 ("vhost: support indirect descriptor in mergeable Rx")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/virtio_net.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 55bfc161b5..891a089f75 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -571,10 +571,11 @@ fill_vec_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 			return -1;
 		}
 
-		len += descs[idx].len;
+		dlen = descs[idx].len;
+		len += dlen;
 
 		if (unlikely(map_one_desc(dev, vq, buf_vec, &vec_id,
-						descs[idx].addr, descs[idx].len,
+						descs[idx].addr, dlen,
 						perm))) {
 			free_ind_table(idesc);
 			return -1;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.748036400 +0800
+++ 0122-vhost-fix-split-ring-potential-buffer-overflow.patch	2021-05-10 23:59:26.520000000 +0800
@@ -1 +1 @@
-From 134228ca39ef0cfe325bc5f1d0df38c733ec9752 Mon Sep 17 00:00:00 2001
+From 25d53e1eb8d8b88503e606361900fac7215edf52 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 134228ca39ef0cfe325bc5f1d0df38c733ec9752 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 3d8e29df09..852b4ec9f5 100644
+index 55bfc161b5..891a089f75 100644
@@ -27 +29 @@
-@@ -548,10 +548,11 @@ fill_vec_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -571,10 +571,11 @@ fill_vec_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,

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

* [dpdk-stable] patch 'vhost: fix packed ring potential buffer overflow' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (119 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'vhost: fix split ring potential buffer overflow' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'vhost: fix batch dequeue " Xueming Li
                   ` (106 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Marvin Liu; +Cc: Luca Boccassi, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/358cba78c0bb02a9e0a1692d5735f633bafdae1b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 358cba78c0bb02a9e0a1692d5735f633bafdae1b Mon Sep 17 00:00:00 2001
From: Marvin Liu <yong.liu@intel.com>
Date: Wed, 31 Mar 2021 14:49:38 +0800
Subject: [PATCH] vhost: fix packed ring potential buffer overflow
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 93ed2f49dec5bee1dfc221c8644c22b351496776 ]

Similar as split ring, the multiple accesses of descriptor length will
lead to potential risk. One-time access of descriptor length can
eliminate this risk.

Fixes: 2f3225a7d69b ("vhost: add vector filling support for packed ring")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/virtio_net.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 891a089f75..8baabe75ec 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -692,9 +692,10 @@ fill_vec_buf_packed_indirect(struct virtio_net *dev,
 			return -1;
 		}
 
-		*len += descs[i].len;
+		dlen = descs[i].len;
+		*len += dlen;
 		if (unlikely(map_one_desc(dev, vq, buf_vec, &vec_id,
-						descs[i].addr, descs[i].len,
+						descs[i].addr, dlen,
 						perm)))
 			return -1;
 	}
@@ -715,6 +716,7 @@ fill_vec_buf_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,
 	bool wrap_counter = vq->avail_wrap_counter;
 	struct vring_packed_desc *descs = vq->desc_packed;
 	uint16_t vec_id = *vec_idx;
+	uint64_t dlen;
 
 	if (avail_idx < vq->last_avail_idx)
 		wrap_counter ^= 1;
@@ -747,11 +749,12 @@ fill_vec_buf_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,
 							len, perm) < 0))
 				return -1;
 		} else {
-			*len += descs[avail_idx].len;
+			dlen = descs[avail_idx].len;
+			*len += dlen;
 
 			if (unlikely(map_one_desc(dev, vq, buf_vec, &vec_id,
 							descs[avail_idx].addr,
-							descs[avail_idx].len,
+							dlen,
 							perm)))
 				return -1;
 		}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.772858700 +0800
+++ 0123-vhost-fix-packed-ring-potential-buffer-overflow.patch	2021-05-10 23:59:26.520000000 +0800
@@ -1 +1 @@
-From 93ed2f49dec5bee1dfc221c8644c22b351496776 Mon Sep 17 00:00:00 2001
+From 358cba78c0bb02a9e0a1692d5735f633bafdae1b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 93ed2f49dec5bee1dfc221c8644c22b351496776 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 852b4ec9f5..d07b30ed7f 100644
+index 891a089f75..8baabe75ec 100644
@@ -23 +25 @@
-@@ -669,9 +669,10 @@ fill_vec_buf_packed_indirect(struct virtio_net *dev,
+@@ -692,9 +692,10 @@ fill_vec_buf_packed_indirect(struct virtio_net *dev,
@@ -36 +38 @@
-@@ -692,6 +693,7 @@ fill_vec_buf_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -715,6 +716,7 @@ fill_vec_buf_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,
@@ -44 +46 @@
-@@ -724,11 +726,12 @@ fill_vec_buf_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -747,11 +749,12 @@ fill_vec_buf_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,

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

* [dpdk-stable] patch 'vhost: fix batch dequeue potential buffer overflow' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (120 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'vhost: fix packed " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'examples/vhost_crypto: remove unused short option' " Xueming Li
                   ` (105 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Marvin Liu; +Cc: Luca Boccassi, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/429dd550359c68bdf5821ab08601f15ca2b41a80

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 429dd550359c68bdf5821ab08601f15ca2b41a80 Mon Sep 17 00:00:00 2001
From: Marvin Liu <yong.liu@intel.com>
Date: Wed, 31 Mar 2021 14:49:39 +0800
Subject: [PATCH] vhost: fix batch dequeue potential buffer overflow
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit af584d21bf66047e36ad3b9ccdcfd83ecdccd5db ]

Similar as single dequeue, the multiple accesses of descriptor length
will lead to potential risk. One-time access of descriptor length can
eliminate this risk.

Fixes: 75ed51697820 ("vhost: add packed ring batch dequeue")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/virtio_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 8baabe75ec..bd92f45886 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -2287,7 +2287,7 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev,
 	}
 
 	vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) {
-		pkts[i]->pkt_len = descs[avail_idx + i].len - buf_offset;
+		pkts[i]->pkt_len = lens[i] - buf_offset;
 		pkts[i]->data_len = pkts[i]->pkt_len;
 		ids[i] = descs[avail_idx + i].id;
 	}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.796271800 +0800
+++ 0124-vhost-fix-batch-dequeue-potential-buffer-overflow.patch	2021-05-10 23:59:26.520000000 +0800
@@ -1 +1 @@
-From af584d21bf66047e36ad3b9ccdcfd83ecdccd5db Mon Sep 17 00:00:00 2001
+From 429dd550359c68bdf5821ab08601f15ca2b41a80 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit af584d21bf66047e36ad3b9ccdcfd83ecdccd5db ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index d07b30ed7f..7f621fb6dd 100644
+index 8baabe75ec..bd92f45886 100644
@@ -23 +25 @@
-@@ -2318,7 +2318,7 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev,
+@@ -2287,7 +2287,7 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev,

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

* [dpdk-stable] patch 'examples/vhost_crypto: remove unused short option' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (121 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'vhost: fix batch dequeue " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'vdpa/mlx5: fix virtq cleaning' " Xueming Li
                   ` (104 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Ibtisam Tariq; +Cc: Luca Boccassi, Fan Zhang, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/42ed69a37be4cf7626cc4b4a9186337122c802cb

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 42ed69a37be4cf7626cc4b4a9186337122c802cb Mon Sep 17 00:00:00 2001
From: Ibtisam Tariq <ibtisam.tariq@emumba.com>
Date: Thu, 4 Feb 2021 08:05:42 +0000
Subject: [PATCH] examples/vhost_crypto: remove unused short option
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit dd0946f975bac65ab680adcd389295cc56ad78e1 ]

Short option "s" was passed to getopt_long function, while there was
no condition on this option.

Fixes: f5188211c721 ("examples/vhost_crypto: add sample application")

Signed-off-by: Ibtisam Tariq <ibtisam.tariq@emumba.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 examples/vhost_crypto/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c
index 29c8f7228d..66bde38c0e 100644
--- a/examples/vhost_crypto/main.c
+++ b/examples/vhost_crypto/main.c
@@ -219,7 +219,7 @@ vhost_crypto_parse_args(int argc, char **argv)
 
 	argvopt = argv;
 
-	while ((opt = getopt_long(argc, argvopt, "s:",
+	while ((opt = getopt_long(argc, argvopt, "",
 				  lgopts, &option_index)) != EOF) {
 
 		switch (opt) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.820759300 +0800
+++ 0125-examples-vhost_crypto-remove-unused-short-option.patch	2021-05-10 23:59:26.520000000 +0800
@@ -1 +1 @@
-From dd0946f975bac65ab680adcd389295cc56ad78e1 Mon Sep 17 00:00:00 2001
+From 42ed69a37be4cf7626cc4b4a9186337122c802cb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit dd0946f975bac65ab680adcd389295cc56ad78e1 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index efae997815..7ed38fedf2 100644
+index 29c8f7228d..66bde38c0e 100644
@@ -23 +25 @@
-@@ -229,7 +229,7 @@ vhost_crypto_parse_args(int argc, char **argv)
+@@ -219,7 +219,7 @@ vhost_crypto_parse_args(int argc, char **argv)
@@ -31 +33 @@
- 		if (opt == '?') {
+ 		switch (opt) {

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

* [dpdk-stable] patch 'vdpa/mlx5: fix virtq cleaning' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (122 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'examples/vhost_crypto: remove unused short option' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'doc: fix sphinx rtd theme import in GHA' " Xueming Li
                   ` (103 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Matan Azrad; +Cc: Luca Boccassi, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8d3f8b347f6c8c47b99d549db7875e15c975ba57

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8d3f8b347f6c8c47b99d549db7875e15c975ba57 Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@nvidia.com>
Date: Mon, 1 Mar 2021 10:41:31 +0000
Subject: [PATCH] vdpa/mlx5: fix virtq cleaning
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 846ec2ea75adc6ce00ad79485fca5d9943ebecaa ]

The HW virtq object can be destroyed either when the device is closed or
when the state of the virtq becomes disabled.

Some parameters of the virtq should continue to be managed when the
virtq state is changed but all of them must be initialized when the
device is closed.

Wrongly, the enable parameter stayed on when the device is closed what
might cause creation of invalid virtq in the next time a device is
assigned to the driver.

Clean all the virtqs memory when the device is closed.

Fixes: c47d6e83334e ("vdpa/mlx5: support queue update")

Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
index 3e882e4000..87704c782b 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_virtq.c
@@ -103,13 +103,8 @@ mlx5_vdpa_virtqs_release(struct mlx5_vdpa_priv *priv)
 	for (i = 0; i < priv->nr_virtqs; i++) {
 		virtq = &priv->virtqs[i];
 		mlx5_vdpa_virtq_unset(virtq);
-		if (virtq->counters) {
+		if (virtq->counters)
 			claim_zero(mlx5_devx_cmd_destroy(virtq->counters));
-			virtq->counters = NULL;
-			memset(&virtq->reset, 0, sizeof(virtq->reset));
-		}
-		memset(virtq->err_time, 0, sizeof(virtq->err_time));
-		virtq->n_retry = 0;
 	}
 	for (i = 0; i < priv->num_lag_ports; i++) {
 		if (priv->tiss[i]) {
@@ -126,6 +121,7 @@ mlx5_vdpa_virtqs_release(struct mlx5_vdpa_priv *priv)
 		priv->virtq_db_addr = NULL;
 	}
 	priv->features = 0;
+	memset(priv->virtqs, 0, sizeof(*virtq) * priv->nr_virtqs);
 	priv->nr_virtqs = 0;
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.844863400 +0800
+++ 0126-vdpa-mlx5-fix-virtq-cleaning.patch	2021-05-10 23:59:26.520000000 +0800
@@ -1 +1 @@
-From 846ec2ea75adc6ce00ad79485fca5d9943ebecaa Mon Sep 17 00:00:00 2001
+From 8d3f8b347f6c8c47b99d549db7875e15c975ba57 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 846ec2ea75adc6ce00ad79485fca5d9943ebecaa ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +32 @@
-index ef2642a656..024c5c4180 100644
+index 3e882e4000..87704c782b 100644

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

* [dpdk-stable] patch 'doc: fix sphinx rtd theme import in GHA' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (123 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'vdpa/mlx5: fix virtq cleaning' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'power: do not skip saving original P-state governor' " Xueming Li
                   ` (102 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: David Marchand; +Cc: Luca Boccassi, Aaron Conole, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/43708086402eedf6efc9294148dc4f15d3762e17

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 43708086402eedf6efc9294148dc4f15d3762e17 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 1 Apr 2021 21:58:42 +0200
Subject: [PATCH] doc: fix sphinx rtd theme import in GHA
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit aa9cb78f66c53728593c1f65f69f2bbc7ca4a4a9 ]

If the rtd theme is available, passing it by name is enough to select
it. Sphinx itself recognises the "sphinx_rtd_theme" name as a special
case and tries to find its path automatically.

On the other hand, passing a html_theme_path makes sphinx parse all
themes availables in this path, which in some environment (like GHA) is
/usr/share and makes sphinx error on the first zipfile it finds (in GHA,
some Azure CLI thingy) that has no sphinx theme in it.

Fixes: 46562be65094 ("doc: import sphinx rtd theme when available")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
 doc/guides/conf.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index aceeb62a4f..ec59aeae7e 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -20,7 +20,6 @@ try:
     import sphinx_rtd_theme
 
     html_theme = "sphinx_rtd_theme"
-    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
 except:
     print('Install the sphinx ReadTheDocs theme for improved html documentation '
           'layout: https://sphinx-rtd-theme.readthedocs.io/',
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.869206600 +0800
+++ 0127-doc-fix-sphinx-rtd-theme-import-in-GHA.patch	2021-05-10 23:59:26.520000000 +0800
@@ -1 +1 @@
-From aa9cb78f66c53728593c1f65f69f2bbc7ca4a4a9 Mon Sep 17 00:00:00 2001
+From 43708086402eedf6efc9294148dc4f15d3762e17 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit aa9cb78f66c53728593c1f65f69f2bbc7ca4a4a9 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'power: do not skip saving original P-state governor' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (124 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'doc: fix sphinx rtd theme import in GHA' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'mem: fix freeing segments in --huge-unlink mode' " Xueming Li
                   ` (101 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Luca Boccassi, Reshma Pattan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8ee0fdee90d5f1b0ac9f398a6dd9ae872f44fa03

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8ee0fdee90d5f1b0ac9f398a6dd9ae872f44fa03 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Fri, 2 Apr 2021 09:26:45 +0000
Subject: [PATCH] power: do not skip saving original P-state governor
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 190f38773acffc5cc822f4347b38ce04257cd044 ]

Currently, when we set the pstate governor to "performance", we check if
it is already set to this value, and if it is, we skip setting it.

However, we never save this value anywhere, so that next time we come
back and request the governor to be set to its original value, the
original value is empty.

Fix it by saving the original pstate governor first. While we're at it,
replace `strlcpy` with `rte_strscpy`.

Fixes: e6c6dc0f96c8 ("power: add p-state driver compatibility")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
---
 lib/librte_power/power_pstate_cpufreq.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/librte_power/power_pstate_cpufreq.c b/lib/librte_power/power_pstate_cpufreq.c
index edf6328e5f..dff9857713 100644
--- a/lib/librte_power/power_pstate_cpufreq.c
+++ b/lib/librte_power/power_pstate_cpufreq.c
@@ -350,6 +350,9 @@ power_set_governor_performance(struct pstate_power_info *pi)
 	/* Strip off terminating '\n' */
 	strtok(buf, "\n");
 
+	/* Save the original governor */
+	rte_strscpy(pi->governor_ori, buf, sizeof(pi->governor_ori));
+
 	/* Check if current governor is performance */
 	if (strncmp(buf, POWER_GOVERNOR_PERF,
 			sizeof(POWER_GOVERNOR_PERF)) == 0) {
@@ -358,8 +361,6 @@ power_set_governor_performance(struct pstate_power_info *pi)
 				"already performance\n", pi->lcore_id);
 		goto out;
 	}
-	/* Save the original governor */
-	strlcpy(pi->governor_ori, buf, sizeof(pi->governor_ori));
 
 	/* Write 'performance' to the governor */
 	val = fseek(f, 0, SEEK_SET);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.890837800 +0800
+++ 0128-power-do-not-skip-saving-original-P-state-governor.patch	2021-05-10 23:59:26.520000000 +0800
@@ -1 +1 @@
-From 190f38773acffc5cc822f4347b38ce04257cd044 Mon Sep 17 00:00:00 2001
+From 8ee0fdee90d5f1b0ac9f398a6dd9ae872f44fa03 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 190f38773acffc5cc822f4347b38ce04257cd044 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index c4639e4b8a..1cb0e4d917 100644
+index edf6328e5f..dff9857713 100644
@@ -29 +31 @@
-@@ -382,6 +382,9 @@ power_set_governor_performance(struct pstate_power_info *pi)
+@@ -350,6 +350,9 @@ power_set_governor_performance(struct pstate_power_info *pi)
@@ -39 +41 @@
-@@ -390,8 +393,6 @@ power_set_governor_performance(struct pstate_power_info *pi)
+@@ -358,8 +361,6 @@ power_set_governor_performance(struct pstate_power_info *pi)

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

* [dpdk-stable] patch 'mem: fix freeing segments in --huge-unlink mode' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (125 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'power: do not skip saving original P-state governor' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'service: clean references to removed symbol' " Xueming Li
                   ` (100 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Roy Shterman; +Cc: Luca Boccassi, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e0a41b8c471b32fc855bcd016d97bbb935fd36b0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e0a41b8c471b32fc855bcd016d97bbb935fd36b0 Mon Sep 17 00:00:00 2001
From: Roy Shterman <roy.shterman@vastdata.com>
Date: Mon, 22 Feb 2021 12:41:31 +0200
Subject: [PATCH] mem: fix freeing segments in --huge-unlink mode
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit edf20bd8a55192616e4a0f26c346b55ddbac1d81 ]

When using huge_unlink we unlink the segment right
after allocation. Although we unlink the file we keep
the fd in fd_list so file still exist just the path deleted.
When freeing the hugepage we need to close the fd and assign
it with (-1) in fd_list for the page to be released.

The current flow fails rte_malloc in the following flow when working
with --huge-unlink option:
1. alloc_seg() for segment A -
    We allocate a segment, unlink the path to the segment
    and keep the file descriptor in fd_list.
2. free_seg() for segment A -
    We clear the segment metadata and return - without closing fd
    or assigning (-1) in fd list.
3. alloc_seg() for segment A again -
    We find segment A as available, try to allocate it,
    find the old fd in fd_list try to unlink it
    as part of alloc_seg() but failed because path doesn't exist.

The impact of such error is falsely failing rte_malloc()
although we have hugepages available.

Fixes: d435aad37da7 ("mem: support --huge-unlink mode")

Signed-off-by: Roy Shterman <roy.shterman@vastdata.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/linux/eal_memalloc.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/lib/librte_eal/linux/eal_memalloc.c b/lib/librte_eal/linux/eal_memalloc.c
index 6dc1b2baec..c590d60430 100644
--- a/lib/librte_eal/linux/eal_memalloc.c
+++ b/lib/librte_eal/linux/eal_memalloc.c
@@ -709,7 +709,6 @@ free_seg(struct rte_memseg *ms, struct hugepage_info *hi,
 	uint64_t map_offset;
 	char path[PATH_MAX];
 	int fd, ret = 0;
-	bool exit_early;
 	const struct internal_config *internal_conf =
 		eal_get_internal_configuration();
 
@@ -725,17 +724,8 @@ free_seg(struct rte_memseg *ms, struct hugepage_info *hi,
 
 	eal_mem_set_dump(ms->addr, ms->len, false);
 
-	exit_early = false;
-
 	/* if we're using anonymous hugepages, nothing to be done */
-	if (internal_conf->in_memory && !memfd_create_supported)
-		exit_early = true;
-
-	/* if we've already unlinked the page, nothing needs to be done */
-	if (!internal_conf->in_memory && internal_conf->hugepage_unlink)
-		exit_early = true;
-
-	if (exit_early) {
+	if (internal_conf->in_memory && !memfd_create_supported) {
 		memset(ms, 0, sizeof(*ms));
 		return 0;
 	}
@@ -761,7 +751,7 @@ free_seg(struct rte_memseg *ms, struct hugepage_info *hi,
 		/* if we're able to take out a write lock, we're the last one
 		 * holding onto this page.
 		 */
-		if (!internal_conf->in_memory) {
+		if (!internal_conf->in_memory && !internal_conf->hugepage_unlink) {
 			ret = lock(fd, LOCK_EX);
 			if (ret >= 0) {
 				/* no one else is using this page */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.914004700 +0800
+++ 0129-mem-fix-freeing-segments-in-huge-unlink-mode.patch	2021-05-10 23:59:26.530000000 +0800
@@ -1 +1 @@
-From edf20bd8a55192616e4a0f26c346b55ddbac1d81 Mon Sep 17 00:00:00 2001
+From e0a41b8c471b32fc855bcd016d97bbb935fd36b0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit edf20bd8a55192616e4a0f26c346b55ddbac1d81 ]
@@ -29 +31,0 @@
-Cc: stable@dpdk.org
@@ -38 +40 @@
-index 00e2662c15..0ec8542283 100644
+index 6dc1b2baec..c590d60430 100644

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

* [dpdk-stable] patch 'service: clean references to removed symbol' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (126 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'mem: fix freeing segments in --huge-unlink mode' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'drivers: fix log level after loading' " Xueming Li
                   ` (99 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: David Marchand
  Cc: Luca Boccassi, Harry van Haaren, Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6baf95a98d58ba1c37fa05bd03ce93036f7dfde9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6baf95a98d58ba1c37fa05bd03ce93036f7dfde9 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 7 Apr 2021 11:06:56 +0200
Subject: [PATCH] service: clean references to removed symbol
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 60e0e75b615fc94b8538a5334dffc0935864438c ]

rte_service_get_id() was removed in v17.11 but the API description
still referenced it and a version node was still present in EAL map.

Fixes: 8edc9aaaf217 ("service: use id in get by name function")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_eal/include/rte_service.h | 5 +----
 lib/librte_eal/version.map           | 1 -
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/lib/librte_eal/include/rte_service.h b/lib/librte_eal/include/rte_service.h
index ca9950d091..c7d037d862 100644
--- a/lib/librte_eal/include/rte_service.h
+++ b/lib/librte_eal/include/rte_service.h
@@ -47,10 +47,7 @@ extern "C" {
 #define RTE_SERVICE_CAP_MT_SAFE (1 << 0)
 
 /**
- *  Return the number of services registered.
- *
- * The number of services registered can be passed to *rte_service_get_by_id*,
- * enabling the application to retrieve the specification of each service.
+ * Return the number of services registered.
  *
  * @return The number of services registered.
  */
diff --git a/lib/librte_eal/version.map b/lib/librte_eal/version.map
index 354c068f31..1eeb5f3371 100644
--- a/lib/librte_eal/version.map
+++ b/lib/librte_eal/version.map
@@ -159,7 +159,6 @@ DPDK_21 {
 	rte_service_component_unregister;
 	rte_service_dump;
 	rte_service_finalize;
-	rte_service_get_by_id;
 	rte_service_get_by_name;
 	rte_service_get_count;
 	rte_service_get_name;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.938345700 +0800
+++ 0130-service-clean-references-to-removed-symbol.patch	2021-05-10 23:59:26.530000000 +0800
@@ -1 +1 @@
-From 60e0e75b615fc94b8538a5334dffc0935864438c Mon Sep 17 00:00:00 2001
+From 6baf95a98d58ba1c37fa05bd03ce93036f7dfde9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 60e0e75b615fc94b8538a5334dffc0935864438c ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -37 +39 @@
-index fc305c1c71..7a307e3cc9 100644
+index 354c068f31..1eeb5f3371 100644

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

* [dpdk-stable] patch 'drivers: fix log level after loading' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (127 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'service: clean references to removed symbol' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'test: proceed if timer subsystem already initialized' " Xueming Li
                   ` (98 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Luca Boccassi, David Marchand, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/92805a55dad81d908062f91bab14207b006e2d5b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 92805a55dad81d908062f91bab14207b006e2d5b Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Tue, 6 Apr 2021 15:22:03 +0200
Subject: [PATCH] drivers: fix log level after loading
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 3be42081bae707c4ad53e62a01a4af82151b8019 ]

When compiled as a shared object, and loaded at runtime as a plugin,
the drivers should get the log level set earlier at EAL init
by the user through --log-level option.

The function for applying the log level setting is
rte_log_register_type_and_pick_level().
It is called by most drivers via RTE_LOG_REGISTER().

The drivers common/mlx5, bcmfs and e1000 were missing,
so the user-specified log level was not applied when
those drivers were loaded as plugins.
The macro RTE_LOG_REGISTER() is used for those drivers.

The unnecessary protection for double registration
is removed from e1000.

Fixes: 9c99878aa1b1 ("log: introduce logtype register macro")
Fixes: c8e79da7c676 ("crypto/bcmfs: introduce BCMFS driver")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/common/mlx5/mlx5_common.c |  9 +-----
 drivers/crypto/bcmfs/bcmfs_logs.c | 17 ++---------
 drivers/net/e1000/e1000_logs.c    | 49 ++++---------------------------
 drivers/net/e1000/em_ethdev.c     |  6 ----
 drivers/net/e1000/igb_ethdev.c    |  6 ----
 5 files changed, 8 insertions(+), 79 deletions(-)

diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c
index 044513223c..4a0992ac8d 100644
--- a/drivers/common/mlx5/mlx5_common.c
+++ b/drivers/common/mlx5/mlx5_common.c
@@ -16,8 +16,6 @@
 #include "mlx5_malloc.h"
 #include "mlx5_common_pci.h"
 
-int mlx5_common_logtype;
-
 uint8_t haswell_broadwell_cpu;
 
 /* In case this is an x86_64 intel processor to check if
@@ -43,12 +41,7 @@ static inline void mlx5_cpu_id(unsigned int level,
 }
 #endif
 
-RTE_INIT_PRIO(mlx5_log_init, LOG)
-{
-	mlx5_common_logtype = rte_log_register("pmd.common.mlx5");
-	if (mlx5_common_logtype >= 0)
-		rte_log_set_level(mlx5_common_logtype, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(mlx5_common_logtype, pmd.common.mlx5, NOTICE)
 
 static bool mlx5_common_initialized;
 
diff --git a/drivers/crypto/bcmfs/bcmfs_logs.c b/drivers/crypto/bcmfs/bcmfs_logs.c
index 86f4ff3b53..701da9ecf3 100644
--- a/drivers/crypto/bcmfs/bcmfs_logs.c
+++ b/drivers/crypto/bcmfs/bcmfs_logs.c
@@ -8,9 +8,6 @@
 
 #include "bcmfs_logs.h"
 
-int bcmfs_conf_logtype;
-int bcmfs_dp_logtype;
-
 int
 bcmfs_hexdump_log(uint32_t level, uint32_t logtype, const char *title,
 		const void *buf, unsigned int len)
@@ -24,15 +21,5 @@ bcmfs_hexdump_log(uint32_t level, uint32_t logtype, const char *title,
 	return 0;
 }
 
-RTE_INIT(bcmfs_device_init_log)
-{
-	/* Configuration and general logs */
-	bcmfs_conf_logtype = rte_log_register("pmd.bcmfs_config");
-	if (bcmfs_conf_logtype >= 0)
-		rte_log_set_level(bcmfs_conf_logtype, RTE_LOG_NOTICE);
-
-	/* data-path logs */
-	bcmfs_dp_logtype = rte_log_register("pmd.bcmfs_fp");
-	if (bcmfs_dp_logtype >= 0)
-		rte_log_set_level(bcmfs_dp_logtype, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(bcmfs_conf_logtype, pmd.bcmfs_config, NOTICE)
+RTE_LOG_REGISTER(bcmfs_dp_logtype, pmd.bcmfs_fp, NOTICE)
diff --git a/drivers/net/e1000/e1000_logs.c b/drivers/net/e1000/e1000_logs.c
index 231f5c03ef..d9b8a4672f 100644
--- a/drivers/net/e1000/e1000_logs.c
+++ b/drivers/net/e1000/e1000_logs.c
@@ -4,53 +4,14 @@
 
 #include "e1000_logs.h"
 
-/* declared as extern in e1000_logs.h */
-int e1000_logtype_init;
-int e1000_logtype_driver;
-
-#ifdef RTE_LIBRTE_E1000_DEBUG_RX
-int e1000_logtype_rx;
-#endif
-#ifdef RTE_LIBRTE_E1000_DEBUG_TX
-int e1000_logtype_tx;
-#endif
-#ifdef RTE_LIBRTE_E1000_DEBUG_TX_FREE
-int e1000_logtype_tx_free;
-#endif
-
-/* avoids double registering of logs if EM and IGB drivers are in use */
-static int e1000_log_initialized;
-
-void
-e1000_igb_init_log(void)
-{
-	if (e1000_log_initialized)
-		return;
-
-	e1000_logtype_init = rte_log_register("pmd.net.e1000.init");
-	if (e1000_logtype_init >= 0)
-		rte_log_set_level(e1000_logtype_init, RTE_LOG_NOTICE);
-	e1000_logtype_driver = rte_log_register("pmd.net.e1000.driver");
-	if (e1000_logtype_driver >= 0)
-		rte_log_set_level(e1000_logtype_driver, RTE_LOG_NOTICE);
-
+RTE_LOG_REGISTER(e1000_logtype_init, pmd.net.e1000.init, NOTICE)
+RTE_LOG_REGISTER(e1000_logtype_driver, pmd.net.e1000.driver, NOTICE)
 #ifdef RTE_LIBRTE_E1000_DEBUG_RX
-	e1000_logtype_rx = rte_log_register("pmd.net.e1000.rx");
-	if (e1000_logtype_rx >= 0)
-		rte_log_set_level(e1000_logtype_rx, RTE_LOG_DEBUG);
+RTE_LOG_REGISTER(e1000_logtype_rx, pmd.net.e1000.rx, DEBUG)
 #endif
-
 #ifdef RTE_LIBRTE_E1000_DEBUG_TX
-	e1000_logtype_tx = rte_log_register("pmd.net.e1000.tx");
-	if (e1000_logtype_tx >= 0)
-		rte_log_set_level(e1000_logtype_tx, RTE_LOG_DEBUG);
+RTE_LOG_REGISTER(e1000_logtype_tx, pmd.net.e1000.tx, DEBUG)
 #endif
-
 #ifdef RTE_LIBRTE_E1000_DEBUG_TX_FREE
-	e1000_logtype_tx_free = rte_log_register("pmd.net.e1000.tx_free");
-	if (e1000_logtype_tx_free >= 0)
-		rte_log_set_level(e1000_logtype_tx_free, RTE_LOG_DEBUG);
+RTE_LOG_REGISTER(e1000_logtype_tx_free, pmd.net.e1000.tx_free, DEBUG)
 #endif
-
-	e1000_log_initialized = 1;
-}
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index f116063876..35be2d5aa5 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -1850,9 +1850,3 @@ eth_em_set_mc_addr_list(struct rte_eth_dev *dev,
 RTE_PMD_REGISTER_PCI(net_e1000_em, rte_em_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_e1000_em, pci_id_em_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_e1000_em, "* igb_uio | uio_pci_generic | vfio-pci");
-
-/* see e1000_logs.c */
-RTE_INIT(igb_init_log)
-{
-	e1000_igb_init_log();
-}
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 669af23103..2337d5f767 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -5438,9 +5438,3 @@ RTE_PMD_REGISTER_KMOD_DEP(net_e1000_igb, "* igb_uio | uio_pci_generic | vfio-pci
 RTE_PMD_REGISTER_PCI(net_e1000_igb_vf, rte_igbvf_pmd);
 RTE_PMD_REGISTER_PCI_TABLE(net_e1000_igb_vf, pci_id_igbvf_map);
 RTE_PMD_REGISTER_KMOD_DEP(net_e1000_igb_vf, "* igb_uio | vfio-pci");
-
-/* see e1000_logs.c */
-RTE_INIT(e1000_init_log)
-{
-	e1000_igb_init_log();
-}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.961099100 +0800
+++ 0131-drivers-fix-log-level-after-loading.patch	2021-05-10 23:59:26.530000000 +0800
@@ -1 +1 @@
-From 3be42081bae707c4ad53e62a01a4af82151b8019 Mon Sep 17 00:00:00 2001
+From 92805a55dad81d908062f91bab14207b006e2d5b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 3be42081bae707c4ad53e62a01a4af82151b8019 ]
@@ -24 +26,0 @@
-Cc: stable@dpdk.org
@@ -38 +40 @@
-index c26a2cfa30..f92f05bda5 100644
+index 044513223c..4a0992ac8d 100644
@@ -41,2 +43,2 @@
-@@ -14,8 +14,6 @@
- #include "mlx5_common_utils.h"
+@@ -16,8 +16,6 @@
+ #include "mlx5_malloc.h"
@@ -50 +52 @@
-@@ -41,12 +39,7 @@ static inline void mlx5_cpu_id(unsigned int level,
+@@ -43,12 +41,7 @@ static inline void mlx5_cpu_id(unsigned int level,
@@ -160 +162 @@
-index 3c6f643c19..3e7ccdbf09 100644
+index f116063876..35be2d5aa5 100644
@@ -174 +176 @@
-index 17ee6e91a0..a1a72339ba 100644
+index 669af23103..2337d5f767 100644
@@ -177 +179 @@
-@@ -5421,9 +5421,3 @@ RTE_PMD_REGISTER_KMOD_DEP(net_e1000_igb, "* igb_uio | uio_pci_generic | vfio-pci
+@@ -5438,9 +5438,3 @@ RTE_PMD_REGISTER_KMOD_DEP(net_e1000_igb, "* igb_uio | uio_pci_generic | vfio-pci

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

* [dpdk-stable] patch 'test: proceed if timer subsystem already initialized' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (128 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'drivers: fix log level after loading' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'eal: fix evaluation of log level option' " Xueming Li
                   ` (97 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Stanislaw Kardach; +Cc: Luca Boccassi, Michal Krawczyk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4fc1996894bf0d712abfe42550da8d191c91cc01

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4fc1996894bf0d712abfe42550da8d191c91cc01 Mon Sep 17 00:00:00 2001
From: Stanislaw Kardach <kda@semihalf.com>
Date: Fri, 26 Mar 2021 11:47:59 +0100
Subject: [PATCH] test: proceed if timer subsystem already initialized
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 3dd7d693ff73dac58999ed7ea6b27d0adc8dc6bc ]

rte_timer_subsystem_init() may return -EALREADY if the timer subsystem
was already initialized. This can happen i.e. in PMD code (see
eth_ena_dev_init). This is not an error, rather a notification as the
initialization function simply returns without any action taken.

Fixes: 50247fe03fe0 ("test/timer: exercise new APIs in secondary process")

Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
---
 app/test/test.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/app/test/test.c b/app/test/test.c
index 624dd48042..864523ed61 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -134,8 +134,13 @@ main(int argc, char **argv)
 		goto out;
 	}
 
+	argv += ret;
+
+	prgname = argv[0];
+
 #ifdef RTE_LIB_TIMER
-	if (rte_timer_subsystem_init() < 0) {
+	ret = rte_timer_subsystem_init();
+	if (ret < 0 && ret != -EALREADY) {
 		ret = -1;
 		goto out;
 	}
@@ -146,10 +151,6 @@ main(int argc, char **argv)
 		goto out;
 	}
 
-	argv += ret;
-
-	prgname = argv[0];
-
 	recursive_call = getenv(RECURSIVE_ENV_VAR);
 	if (recursive_call != NULL) {
 		ret = do_recursive_call();
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:29.988227600 +0800
+++ 0132-test-proceed-if-timer-subsystem-already-initialized.patch	2021-05-10 23:59:26.530000000 +0800
@@ -1 +1 @@
-From 3dd7d693ff73dac58999ed7ea6b27d0adc8dc6bc Mon Sep 17 00:00:00 2001
+From 4fc1996894bf0d712abfe42550da8d191c91cc01 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 3dd7d693ff73dac58999ed7ea6b27d0adc8dc6bc ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'eal: fix evaluation of log level option' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (129 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'test: proceed if timer subsystem already initialized' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'app/regex: fix usage text' " Xueming Li
                   ` (96 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: David Marchand
  Cc: Luca Boccassi, Thomas Monjalon, Lukasz Wojciechowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3ad213dfa731dc1fb5370c14f8cbac80993d42d3

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3ad213dfa731dc1fb5370c14f8cbac80993d42d3 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Fri, 9 Apr 2021 13:04:53 +0200
Subject: [PATCH] eal: fix evaluation of log level option
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 3e08081637ca082a8b58d5db2a11836dbe4e3e8c ]

--log-level option is handled early, no need to reevaluate it later in
EAL init.

Before:
$ echo quit | ./build/app/test/dpdk-test --no-huge -m 512 \
  --log-level=lib.eal:debug \
  --log-level=lib.ethdev:debug --log-level=lib.ethdev:info \
  |& grep -i log.level

EAL: lib.eal log level changed from info to debug
EAL: lib.ethdev log level changed from info to debug
EAL: lib.ethdev log level changed from debug to info
EAL: lib.ethdev log level changed from info to debug
EAL: lib.ethdev log level changed from debug to info
EAL: lib.telemetry log level changed from disabled to warning

After:
$ echo quit | ./build/app/test/dpdk-test --no-huge -m 512 \
  --log-level=lib.eal:debug \
  --log-level=lib.ethdev:debug --log-level=lib.ethdev:info \
  |& grep -i log.level

EAL: lib.eal log level changed from info to debug
EAL: lib.ethdev log level changed from info to debug
EAL: lib.ethdev log level changed from debug to info
EAL: lib.telemetry log level changed from disabled to warning

Fixes: 6c7216eefd63 ("eal: fix log level of early messages")
Fixes: 1c806ae5c3ac ("eal/windows: support command line options parsing")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Tested-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
---
 lib/librte_eal/freebsd/eal.c | 4 ++++
 lib/librte_eal/linux/eal.c   | 4 ++++
 lib/librte_eal/windows/eal.c | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c
index 51478358c7..77b42de416 100644
--- a/lib/librte_eal/freebsd/eal.c
+++ b/lib/librte_eal/freebsd/eal.c
@@ -521,6 +521,10 @@ eal_parse_args(int argc, char **argv)
 			goto out;
 		}
 
+		/* eal_log_level_parse() already handled this option */
+		if (opt == OPT_LOG_LEVEL_NUM)
+			continue;
+
 		ret = eal_parse_common_option(opt, optarg, internal_conf);
 		/* common parser is not happy */
 		if (ret < 0) {
diff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c
index 32b48c3de9..2ccbad7b08 100644
--- a/lib/librte_eal/linux/eal.c
+++ b/lib/librte_eal/linux/eal.c
@@ -704,6 +704,10 @@ eal_parse_args(int argc, char **argv)
 			goto out;
 		}
 
+		/* eal_log_level_parse() already handled this option */
+		if (opt == OPT_LOG_LEVEL_NUM)
+			continue;
+
 		ret = eal_parse_common_option(opt, optarg, internal_conf);
 		/* common parser is not happy */
 		if (ret < 0) {
diff --git a/lib/librte_eal/windows/eal.c b/lib/librte_eal/windows/eal.c
index 1e5f6576f0..78ac4adaeb 100644
--- a/lib/librte_eal/windows/eal.c
+++ b/lib/librte_eal/windows/eal.c
@@ -149,6 +149,10 @@ eal_parse_args(int argc, char **argv)
 			return -1;
 		}
 
+		/* eal_log_level_parse() already handled this option */
+		if (opt == OPT_LOG_LEVEL_NUM)
+			continue;
+
 		ret = eal_parse_common_option(opt, optarg, internal_conf);
 		/* common parser is not happy */
 		if (ret < 0) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.011520100 +0800
+++ 0133-eal-fix-evaluation-of-log-level-option.patch	2021-05-10 23:59:26.530000000 +0800
@@ -1 +1 @@
-From 3e08081637ca082a8b58d5db2a11836dbe4e3e8c Mon Sep 17 00:00:00 2001
+From 3ad213dfa731dc1fb5370c14f8cbac80993d42d3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 3e08081637ca082a8b58d5db2a11836dbe4e3e8c ]
@@ -35 +37,0 @@
-Cc: stable@dpdk.org
@@ -48 +50 @@
-index 5544701f20..f4d1676754 100644
+index 51478358c7..77b42de416 100644
@@ -63 +65 @@
-index baeead3301..ba19fc6347 100644
+index 32b48c3de9..2ccbad7b08 100644
@@ -66 +68 @@
-@@ -705,6 +705,10 @@ eal_parse_args(int argc, char **argv)
+@@ -704,6 +704,10 @@ eal_parse_args(int argc, char **argv)
@@ -78 +80 @@
-index 68a1fd1d21..41be20d89f 100644
+index 1e5f6576f0..78ac4adaeb 100644
@@ -81 +83 @@
-@@ -150,6 +150,10 @@ eal_parse_args(int argc, char **argv)
+@@ -149,6 +149,10 @@ eal_parse_args(int argc, char **argv)

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

* [dpdk-stable] patch 'app/regex: fix usage text' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (130 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'eal: fix evaluation of log level option' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'app/testpmd: " Xueming Li
                   ` (95 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Luca Boccassi, Ori Kam, Bruce Richardson, Andrew Rybchenko,
	David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7b581788eec45529377f6f9a645d93bf664cd8a0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7b581788eec45529377f6f9a645d93bf664cd8a0 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Mon, 5 Apr 2021 21:33:24 +0200
Subject: [PATCH] app/regex: fix usage text
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit e0512833d4acc6d037fa0ce8d453584618b98019 ]

The usage syntax help includes the program name which was fake.
It is replaced with the real name from argv.

Fixes: de06137cb295 ("app/regex: add RegEx test application")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 app/test-regex/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test-regex/main.c b/app/test-regex/main.c
index ac6152dea7..17ff392b1c 100644
--- a/app/test-regex/main.c
+++ b/app/test-regex/main.c
@@ -105,11 +105,11 @@ args_parse(int argc, char **argv, char *rules_file, char *data_file,
 			*nb_iterations = atoi(optarg);
 			break;
 		case ARG_HELP:
-			usage("RegEx test app");
+			usage(argv[0]);
 			break;
 		default:
 			fprintf(stderr, "Invalid option: %s\n", argv[optind]);
-			usage("RegEx test app");
+			usage(argv[0]);
 			rte_exit(EXIT_FAILURE, "Invalid option\n");
 			break;
 		}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.036958000 +0800
+++ 0134-app-regex-fix-usage-text.patch	2021-05-10 23:59:26.530000000 +0800
@@ -1 +1 @@
-From e0512833d4acc6d037fa0ce8d453584618b98019 Mon Sep 17 00:00:00 2001
+From 7b581788eec45529377f6f9a645d93bf664cd8a0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit e0512833d4acc6d037fa0ce8d453584618b98019 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 18a22db533..8e665df73c 100644
+index ac6152dea7..17ff392b1c 100644
@@ -25,2 +27,2 @@
-@@ -159,10 +159,10 @@ args_parse(int argc, char **argv, char *rules_file, char *data_file,
- 			*nb_segs = atoi(optarg);
+@@ -105,11 +105,11 @@ args_parse(int argc, char **argv, char *rules_file, char *data_file,
+ 			*nb_iterations = atoi(optarg);
@@ -32,0 +35 @@
+ 			fprintf(stderr, "Invalid option: %s\n", argv[optind]);
@@ -35 +38 @@
- 			rte_exit(EXIT_FAILURE, "Invalid option: %s\n", argv[optind]);
+ 			rte_exit(EXIT_FAILURE, "Invalid option\n");

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

* [dpdk-stable] patch 'app/testpmd: fix usage text' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (131 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'app/regex: fix usage text' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'eal: fix race in control thread creation' " Xueming Li
                   ` (94 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Luca Boccassi, Ajit Khaparde, Bruce Richardson, Andrew Rybchenko,
	Xiaoyun Li, Jens Freimann, Bing Zhao, David Marchand,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5a324f3e4d37108b640bbc0281b2edcf2ece3db3

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5a324f3e4d37108b640bbc0281b2edcf2ece3db3 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Mon, 5 Apr 2021 21:33:25 +0200
Subject: [PATCH] app/testpmd: fix usage text
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit c6d527a1c8bdee9435ce150670acf1657234c0c1 ]

The options help text was including an incomplete and redundant
summary of the options before explaining each. The summary is dropped.

The details of the option --hairpin-mode had an extra space,
breaking the alignment with the next line.

There were some mismatches between options in the usage text
	sed -rn 's/.*\(" *--([a-z-]*)[=: ].*/\1/p' app/test-pmd/parameters.c
and the options declared in lgopts array
	sed -rn 's/.*\{.*"(.*)",.*,.*,.*},.*/\1/p' app/test-pmd/parameters.c
The misses were:
	--no-numa
	--enable-scatter
	--tx-ip
	--tx-udp
	--noisy-lkup-num-reads-writes
The option --ports was not implemented.

Fixes: 01817b10d27c ("app/testpmd: change hairpin queues setup")
Fixes: 3c156061b938 ("app/testpmd: add noisy neighbour forwarding mode")
Fixes: bf5b2126bf44 ("app/testpmd: add ability to set Tx IP and UDP parameters")
Fixes: 0499793854f5 ("app/testpmd: add scatter enabling option")
Fixes: 999b2ee0fe45 ("app/testpmd: enable NUMA support by default")
Fixes: af75078fece3 ("first public release")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Reviewed-by: Bing Zhao <bingz@nvidia.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 app/test-pmd/parameters.c | 35 ++++++++---------------------------
 1 file changed, 8 insertions(+), 27 deletions(-)

diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index df5eb10d84..b2935f96be 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -49,29 +49,7 @@
 static void
 usage(char* progname)
 {
-	printf("usage: %s [EAL options] -- "
-#ifdef RTE_LIB_CMDLINE
-	       "[--interactive|-i] "
-	       "[--cmdline-file=FILENAME] "
-#endif
-	       "[--help|-h] | [--auto-start|-a] | ["
-	       "--tx-first | --stats-period=PERIOD | "
-	       "--coremask=COREMASK --portmask=PORTMASK --numa "
-	       "--portlist=PORTLIST "
-	       "--mbuf-size= | --total-num-mbufs= | "
-	       "--nb-cores= | --nb-ports= | "
-#ifdef RTE_LIB_CMDLINE
-	       "--eth-peers-configfile= | "
-	       "--eth-peer=X,M:M:M:M:M:M | "
-	       "--tx-ip=SRC,DST | --tx-udp=PORT | "
-#endif
-	       "--pkt-filter-mode= |"
-	       "--rss-ip | --rss-udp | --rss-level-inner | --rss-level-outer |"
-	       "--rxpt= | --rxht= | --rxwt= |"
-	       " --rxfreet= | --txpt= | --txht= | --txwt= | --txfreet= | "
-	       "--txrst= | --tx-offloads= | | --rx-offloads= | "
-	       "--vxlan-gpe-port= | --geneve-parsed-port= | "
-	       "--record-core-cycles | --record-burst-stats]\n",
+	printf("\nUsage: %s [EAL options] -- [testpmd options]\n\n",
 	       progname);
 #ifdef RTE_LIB_CMDLINE
 	printf("  --interactive: run in interactive mode.\n");
@@ -97,6 +75,7 @@ usage(char* progname)
 	printf("  --portlist=PORTLIST: list of forwarding ports\n");
 	printf("  --numa: enable NUMA-aware allocation of RX/TX rings and of "
 	       "RX memory buffers (mbufs).\n");
+	printf("  --no-numa: disable NUMA-aware allocation.\n");
 	printf("  --port-numa-config=(port,socket)[,(port,socket)]: "
 	       "specify the socket on which the memory pool "
 	       "used by the port will be allocated.\n");
@@ -136,6 +115,7 @@ usage(char* progname)
 	       "monitoring on forwarding lcore id N.\n");
 #endif
 	printf("  --disable-crc-strip: disable CRC stripping by hardware.\n");
+	printf("  --enable-scatter: enable scattered Rx.\n");
 	printf("  --enable-lro: enable large receive offload.\n");
 	printf("  --enable-rx-cksum: enable rx hardware checksum offload.\n");
 	printf("  --enable-rx-timestamp: enable rx hardware timestamp offload.\n");
@@ -183,6 +163,8 @@ usage(char* progname)
 	printf("  --txpkts=X[,Y]*: set TX segment sizes"
 		" or total packet length.\n");
 	printf("  --txonly-multi-flow: generate multiple flows in txonly mode\n");
+	printf("  --tx-ip=src,dst: IP addresses in Tx-only mode\n");
+	printf("  --tx-udp=src[,dst]: UDP ports in Tx-only mode\n");
 	printf("  --disable-link-check: disable check on link status when "
 	       "starting/stopping ports.\n");
 	printf("  --disable-device-start: do not automatically start port\n");
@@ -213,14 +195,14 @@ usage(char* progname)
 	printf("  --noisy-lkup-memory=N: allocate N MB of VNF memory\n");
 	printf("  --noisy-lkup-num-writes=N: do N random writes per packet\n");
 	printf("  --noisy-lkup-num-reads=N: do N random reads per packet\n");
-	printf("  --noisy-lkup-num-writes=N: do N random reads and writes per packet\n");
+	printf("  --noisy-lkup-num-reads-writes=N: do N random reads and writes per packet\n");
 	printf("  --no-iova-contig: mempool memory can be IOVA non contiguous. "
 	       "valid only with --mp-alloc=anon\n");
 	printf("  --rx-mq-mode=0xX: hexadecimal bitmask of RX mq mode can be "
 	       "enabled\n");
 	printf("  --record-core-cycles: enable measurement of CPU cycles.\n");
 	printf("  --record-burst-stats: enable display of RX and TX bursts.\n");
-	printf("  --hairpin-mode=0xXX: bitmask set the hairpin port mode.\n "
+	printf("  --hairpin-mode=0xXX: bitmask set the hairpin port mode.\n"
 	       "    0x10 - explicit Tx rule, 0x02 - hairpin ports paired\n"
 	       "    0x01 - hairpin ports loop, 0x00 - hairpin port self\n");
 }
@@ -510,7 +492,6 @@ launch_args_parse(int argc, char** argv)
 #endif
 		{ "tx-first",			0, 0, 0 },
 		{ "stats-period",		1, 0, 0 },
-		{ "ports",			1, 0, 0 },
 		{ "nb-cores",			1, 0, 0 },
 		{ "nb-ports",			1, 0, 0 },
 		{ "coremask",			1, 0, 0 },
@@ -518,7 +499,7 @@ launch_args_parse(int argc, char** argv)
 		{ "portlist",			1, 0, 0 },
 		{ "numa",			0, 0, 0 },
 		{ "no-numa",			0, 0, 0 },
-		{ "mp-anon",			0, 0, 0 },
+		{ "mp-anon",			0, 0, 0 }, /* deprecated */
 		{ "port-numa-config",           1, 0, 0 },
 		{ "ring-numa-config",           1, 0, 0 },
 		{ "socket-num",			1, 0, 0 },
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.059323800 +0800
+++ 0135-app-testpmd-fix-usage-text.patch	2021-05-10 23:59:26.530000000 +0800
@@ -1 +1 @@
-From c6d527a1c8bdee9435ce150670acf1657234c0c1 Mon Sep 17 00:00:00 2001
+From 5a324f3e4d37108b640bbc0281b2edcf2ece3db3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit c6d527a1c8bdee9435ce150670acf1657234c0c1 ]
@@ -30 +32,0 @@
-Cc: stable@dpdk.org
@@ -45 +47 @@
-index b7d4ef76b0..f3954c1c63 100644
+index df5eb10d84..b2935f96be 100644
@@ -95 +97 @@
-@@ -184,6 +164,8 @@ usage(char* progname)
+@@ -183,6 +163,8 @@ usage(char* progname)
@@ -101 +102,0 @@
- 	printf("  --eth-link-speed: force link speed.\n");
@@ -104 +105,2 @@
-@@ -215,14 +197,14 @@ usage(char* progname)
+ 	printf("  --disable-device-start: do not automatically start port\n");
+@@ -213,14 +195,14 @@ usage(char* progname)
@@ -121 +123 @@
-@@ -549,7 +531,6 @@ launch_args_parse(int argc, char** argv)
+@@ -510,7 +492,6 @@ launch_args_parse(int argc, char** argv)
@@ -129 +131 @@
-@@ -557,7 +538,7 @@ launch_args_parse(int argc, char** argv)
+@@ -518,7 +499,7 @@ launch_args_parse(int argc, char** argv)

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

* [dpdk-stable] patch 'eal: fix race in control thread creation' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (132 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'app/testpmd: " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'eal: fix hang " Xueming Li
                   ` (93 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Luc Pelletier
  Cc: Luca Boccassi, Olivier Matz, Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ea6d0d656192ccdc0220dd3f17d7abebe9a5e3f9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ea6d0d656192ccdc0220dd3f17d7abebe9a5e3f9 Mon Sep 17 00:00:00 2001
From: Luc Pelletier <lucp.at.work@gmail.com>
Date: Wed, 7 Apr 2021 16:16:04 -0400
Subject: [PATCH] eal: fix race in control thread creation
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 34cc55cce6b180a6c3ee3fcf70a0fd56927f240d ]

The creation of control threads uses a pthread barrier for
synchronization. This patch fixes a race condition where the pthread
barrier could get destroyed while one of the threads has not yet
returned from the pthread_barrier_wait function, which could result in
undefined behaviour.

Fixes: 3a0d465d4c53 ("eal: fix use-after-free on control thread creation")

Signed-off-by: Luc Pelletier <lucp.at.work@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 lib/librte_eal/common/eal_common_thread.c | 49 +++++++++++++----------
 1 file changed, 27 insertions(+), 22 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_thread.c b/lib/librte_eal/common/eal_common_thread.c
index 73a055902a..3347e91bf2 100644
--- a/lib/librte_eal/common/eal_common_thread.c
+++ b/lib/librte_eal/common/eal_common_thread.c
@@ -170,11 +170,19 @@ struct rte_thread_ctrl_params {
 	void *(*start_routine)(void *);
 	void *arg;
 	pthread_barrier_t configured;
+	unsigned int refcnt;
 };
 
+static void ctrl_params_free(struct rte_thread_ctrl_params *params)
+{
+	if (__atomic_sub_fetch(&params->refcnt, 1, __ATOMIC_ACQ_REL) == 0) {
+		pthread_barrier_destroy(&params->configured);
+		free(params);
+	}
+}
+
 static void *ctrl_thread_init(void *arg)
 {
-	int ret;
 	struct internal_config *internal_conf =
 		eal_get_internal_configuration();
 	rte_cpuset_t *cpuset = &internal_conf->ctrl_cpuset;
@@ -184,11 +192,8 @@ static void *ctrl_thread_init(void *arg)
 
 	__rte_thread_init(rte_lcore_id(), cpuset);
 
-	ret = pthread_barrier_wait(&params->configured);
-	if (ret == PTHREAD_BARRIER_SERIAL_THREAD) {
-		pthread_barrier_destroy(&params->configured);
-		free(params);
-	}
+	pthread_barrier_wait(&params->configured);
+	ctrl_params_free(params);
 
 	return start_routine(routine_arg);
 }
@@ -210,15 +215,18 @@ rte_ctrl_thread_create(pthread_t *thread, const char *name,
 
 	params->start_routine = start_routine;
 	params->arg = arg;
+	params->refcnt = 2;
 
-	pthread_barrier_init(&params->configured, NULL, 2);
-
-	ret = pthread_create(thread, attr, ctrl_thread_init, (void *)params);
+	ret = pthread_barrier_init(&params->configured, NULL, 2);
 	if (ret != 0) {
 		free(params);
 		return -ret;
 	}
 
+	ret = pthread_create(thread, attr, ctrl_thread_init, (void *)params);
+	if (ret != 0)
+		goto fail;
+
 	if (name != NULL) {
 		ret = rte_thread_setname(*thread, name);
 		if (ret < 0)
@@ -227,25 +235,22 @@ rte_ctrl_thread_create(pthread_t *thread, const char *name,
 	}
 
 	ret = pthread_setaffinity_np(*thread, sizeof(*cpuset), cpuset);
-	if (ret)
-		goto fail;
+	if (ret != 0)
+		goto fail_cancel;
 
-	ret = pthread_barrier_wait(&params->configured);
-	if (ret == PTHREAD_BARRIER_SERIAL_THREAD) {
-		pthread_barrier_destroy(&params->configured);
-		free(params);
-	}
+	pthread_barrier_wait(&params->configured);
+	ctrl_params_free(params);
 
 	return 0;
 
-fail:
-	if (PTHREAD_BARRIER_SERIAL_THREAD ==
-	    pthread_barrier_wait(&params->configured)) {
-		pthread_barrier_destroy(&params->configured);
-		free(params);
-	}
+fail_cancel:
 	pthread_cancel(*thread);
 	pthread_join(*thread, NULL);
+
+fail:
+	pthread_barrier_destroy(&params->configured);
+	free(params);
+
 	return -ret;
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.083675200 +0800
+++ 0136-eal-fix-race-in-control-thread-creation.patch	2021-05-10 23:59:26.530000000 +0800
@@ -1 +1 @@
-From 34cc55cce6b180a6c3ee3fcf70a0fd56927f240d Mon Sep 17 00:00:00 2001
+From ea6d0d656192ccdc0220dd3f17d7abebe9a5e3f9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 34cc55cce6b180a6c3ee3fcf70a0fd56927f240d ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'eal: fix hang in control thread creation' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (133 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'eal: fix race in control thread creation' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: fix MTU config complexity' " Xueming Li
                   ` (92 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Luc Pelletier
  Cc: Luca Boccassi, Olivier Matz, Honnappa Nagarahalli, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1324beafbae000e862df621c2378fa3b2631f98c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1324beafbae000e862df621c2378fa3b2631f98c Mon Sep 17 00:00:00 2001
From: Luc Pelletier <lucp.at.work@gmail.com>
Date: Wed, 7 Apr 2021 16:16:06 -0400
Subject: [PATCH] eal: fix hang in control thread creation
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit af68c1d699be6c369e296b775bdbf13ae18b79cc ]

The affinity of a control thread is set after it has been launched. If
setting the affinity fails, pthread_cancel is called followed by a call
to pthread_join, which can hang forever if the thread's start routine
doesn't call a pthread cancellation point.

This patch modifies the logic so that the control thread exits
gracefully if the affinity cannot be set successfully and removes the
call to pthread_cancel.

Fixes: 6383d2642b62 ("eal: set name when creating a control thread")

Signed-off-by: Luc Pelletier <lucp.at.work@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
---
 lib/librte_eal/common/eal_common_thread.c | 29 +++++++++++++----------
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_thread.c b/lib/librte_eal/common/eal_common_thread.c
index 3347e91bf2..03dbcd9e86 100644
--- a/lib/librte_eal/common/eal_common_thread.c
+++ b/lib/librte_eal/common/eal_common_thread.c
@@ -187,14 +187,18 @@ static void *ctrl_thread_init(void *arg)
 		eal_get_internal_configuration();
 	rte_cpuset_t *cpuset = &internal_conf->ctrl_cpuset;
 	struct rte_thread_ctrl_params *params = arg;
-	void *(*start_routine)(void *) = params->start_routine;
+	void *(*start_routine)(void *);
 	void *routine_arg = params->arg;
 
 	__rte_thread_init(rte_lcore_id(), cpuset);
 
 	pthread_barrier_wait(&params->configured);
+	start_routine = params->start_routine;
 	ctrl_params_free(params);
 
+	if (start_routine == NULL)
+		return NULL;
+
 	return start_routine(routine_arg);
 }
 
@@ -218,14 +222,12 @@ rte_ctrl_thread_create(pthread_t *thread, const char *name,
 	params->refcnt = 2;
 
 	ret = pthread_barrier_init(&params->configured, NULL, 2);
-	if (ret != 0) {
-		free(params);
-		return -ret;
-	}
+	if (ret != 0)
+		goto fail_no_barrier;
 
 	ret = pthread_create(thread, attr, ctrl_thread_init, (void *)params);
 	if (ret != 0)
-		goto fail;
+		goto fail_with_barrier;
 
 	if (name != NULL) {
 		ret = rte_thread_setname(*thread, name);
@@ -236,19 +238,22 @@ rte_ctrl_thread_create(pthread_t *thread, const char *name,
 
 	ret = pthread_setaffinity_np(*thread, sizeof(*cpuset), cpuset);
 	if (ret != 0)
-		goto fail_cancel;
+		params->start_routine = NULL;
 
 	pthread_barrier_wait(&params->configured);
 	ctrl_params_free(params);
 
-	return 0;
+	if (ret != 0)
+		/* start_routine has been set to NULL above; */
+		/* ctrl thread will exit immediately */
+		pthread_join(*thread, NULL);
 
-fail_cancel:
-	pthread_cancel(*thread);
-	pthread_join(*thread, NULL);
+	return -ret;
 
-fail:
+fail_with_barrier:
 	pthread_barrier_destroy(&params->configured);
+
+fail_no_barrier:
 	free(params);
 
 	return -ret;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.107955900 +0800
+++ 0137-eal-fix-hang-in-control-thread-creation.patch	2021-05-10 23:59:26.530000000 +0800
@@ -1 +1 @@
-From af68c1d699be6c369e296b775bdbf13ae18b79cc Mon Sep 17 00:00:00 2001
+From 1324beafbae000e862df621c2378fa3b2631f98c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit af68c1d699be6c369e296b775bdbf13ae18b79cc ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/hns3: fix MTU config complexity' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (134 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'eal: fix hang " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: update HiSilicon copyright syntax' " Xueming Li
                   ` (91 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/fdd1a587627de72b4366222437191b0fda56f9c1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fdd1a587627de72b4366222437191b0fda56f9c1 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Thu, 1 Apr 2021 21:38:03 +0800
Subject: [PATCH] net/hns3: fix MTU config complexity
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit d81d78eb86d50732ba98a8b255d19c2f6292521c ]

This patch fixed cyclomatic complexity about MTU
in device configure process.

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

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 62 +++++++++++++++++++++-------------
 1 file changed, 38 insertions(+), 24 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index ba26230829..a4c6440768 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2302,6 +2302,41 @@ hns3_init_ring_with_vector(struct hns3_hw *hw)
 	return 0;
 }
 
+static int
+hns3_refresh_mtu(struct rte_eth_dev *dev, struct rte_eth_conf *conf)
+{
+	struct hns3_adapter *hns = dev->data->dev_private;
+	struct hns3_hw *hw = &hns->hw;
+	uint32_t max_rx_pkt_len;
+	uint16_t mtu;
+	int ret;
+
+	if (!(conf->rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME))
+		return 0;
+
+	/*
+	 * If jumbo frames are enabled, MTU needs to be refreshed
+	 * according to the maximum RX packet length.
+	 */
+	max_rx_pkt_len = conf->rxmode.max_rx_pkt_len;
+	if (max_rx_pkt_len > HNS3_MAX_FRAME_LEN ||
+	    max_rx_pkt_len <= HNS3_DEFAULT_FRAME_LEN) {
+		hns3_err(hw, "maximum Rx packet length must be greater than %u "
+			 "and no more than %u when jumbo frame enabled.",
+			 (uint16_t)HNS3_DEFAULT_FRAME_LEN,
+			 (uint16_t)HNS3_MAX_FRAME_LEN);
+		return -EINVAL;
+	}
+
+	mtu = (uint16_t)HNS3_PKTLEN_TO_MTU(max_rx_pkt_len);
+	ret = hns3_dev_mtu_set(dev, mtu);
+	if (ret)
+		return ret;
+	dev->data->mtu = mtu;
+
+	return 0;
+}
+
 static int
 hns3_dev_configure(struct rte_eth_dev *dev)
 {
@@ -2313,8 +2348,6 @@ hns3_dev_configure(struct rte_eth_dev *dev)
 	uint16_t nb_rx_q = dev->data->nb_rx_queues;
 	uint16_t nb_tx_q = dev->data->nb_tx_queues;
 	struct rte_eth_rss_conf rss_conf;
-	uint32_t max_rx_pkt_len;
-	uint16_t mtu;
 	bool gro_en;
 	int ret;
 
@@ -2367,28 +2400,9 @@ hns3_dev_configure(struct rte_eth_dev *dev)
 			goto cfg_err;
 	}
 
-	/*
-	 * If jumbo frames are enabled, MTU needs to be refreshed
-	 * according to the maximum RX packet length.
-	 */
-	if (conf->rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
-		max_rx_pkt_len = conf->rxmode.max_rx_pkt_len;
-		if (max_rx_pkt_len > HNS3_MAX_FRAME_LEN ||
-		    max_rx_pkt_len <= HNS3_DEFAULT_FRAME_LEN) {
-			hns3_err(hw, "maximum Rx packet length must be greater "
-				 "than %u and less than %u when jumbo frame enabled.",
-				 (uint16_t)HNS3_DEFAULT_FRAME_LEN,
-				 (uint16_t)HNS3_MAX_FRAME_LEN);
-			ret = -EINVAL;
-			goto cfg_err;
-		}
-
-		mtu = (uint16_t)HNS3_PKTLEN_TO_MTU(max_rx_pkt_len);
-		ret = hns3_dev_mtu_set(dev, mtu);
-		if (ret)
-			goto cfg_err;
-		dev->data->mtu = mtu;
-	}
+	ret = hns3_refresh_mtu(dev, conf);
+	if (ret)
+		goto cfg_err;
 
 	ret = hns3_dev_configure_vlan(dev);
 	if (ret)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.130931400 +0800
+++ 0138-net-hns3-fix-MTU-config-complexity.patch	2021-05-10 23:59:26.530000000 +0800
@@ -1 +1 @@
-From d81d78eb86d50732ba98a8b255d19c2f6292521c Mon Sep 17 00:00:00 2001
+From fdd1a587627de72b4366222437191b0fda56f9c1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit d81d78eb86d50732ba98a8b255d19c2f6292521c ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 9c718082b0..b07996928b 100644
+index ba26230829..a4c6440768 100644
@@ -21 +23 @@
-@@ -2372,6 +2372,41 @@ hns3_init_ring_with_vector(struct hns3_hw *hw)
+@@ -2302,6 +2302,41 @@ hns3_init_ring_with_vector(struct hns3_hw *hw)
@@ -63 +65 @@
-@@ -2382,8 +2417,6 @@ hns3_dev_configure(struct rte_eth_dev *dev)
+@@ -2313,8 +2348,6 @@ hns3_dev_configure(struct rte_eth_dev *dev)
@@ -72 +74 @@
-@@ -2431,28 +2464,9 @@ hns3_dev_configure(struct rte_eth_dev *dev)
+@@ -2367,28 +2400,9 @@ hns3_dev_configure(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/hns3: update HiSilicon copyright syntax' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (135 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: fix MTU config complexity' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/ena: fix releasing Tx ring mbufs' " Xueming Li
                   ` (90 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7151983d32f65971637e38359ada3c5c09942e81

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7151983d32f65971637e38359ada3c5c09942e81 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Tue, 6 Apr 2021 08:57:36 +0800
Subject: [PATCH] net/hns3: update HiSilicon copyright syntax
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit fa485faca236bd0ac834b6ad7c36f5050305482e ]

According to the suggestion of our legal department,
to standardize the copyright license of our code to
avoid potential copyright risks, we make a unified
modification to the "Hisilicon", which was nonstandard,
in the main modules we maintain.

We change it to "HiSilicon", which is consistent with
the terms used on the following official website:
https://www.hisilicon.com/en/terms-of-use.

Fixes: 565829db8b8f ("net/hns3: add build and doc infrastructure")
Fixes: 952ebacce4f2 ("net/hns3: support SVE Rx")
Fixes: e31f123db06b ("net/hns3: support NEON Tx")
Fixes: c09c7847d892 ("net/hns3: support traffic management")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_cmd.c           | 2 +-
 drivers/net/hns3/hns3_cmd.h           | 2 +-
 drivers/net/hns3/hns3_dcb.c           | 2 +-
 drivers/net/hns3/hns3_dcb.h           | 2 +-
 drivers/net/hns3/hns3_ethdev.c        | 2 +-
 drivers/net/hns3/hns3_ethdev.h        | 2 +-
 drivers/net/hns3/hns3_ethdev_vf.c     | 2 +-
 drivers/net/hns3/hns3_fdir.c          | 2 +-
 drivers/net/hns3/hns3_fdir.h          | 2 +-
 drivers/net/hns3/hns3_flow.c          | 2 +-
 drivers/net/hns3/hns3_intr.c          | 2 +-
 drivers/net/hns3/hns3_intr.h          | 2 +-
 drivers/net/hns3/hns3_logs.h          | 2 +-
 drivers/net/hns3/hns3_mbx.c           | 2 +-
 drivers/net/hns3/hns3_mbx.h           | 2 +-
 drivers/net/hns3/hns3_mp.c            | 2 +-
 drivers/net/hns3/hns3_mp.h            | 2 +-
 drivers/net/hns3/hns3_regs.c          | 2 +-
 drivers/net/hns3/hns3_regs.h          | 2 +-
 drivers/net/hns3/hns3_rss.c           | 2 +-
 drivers/net/hns3/hns3_rss.h           | 2 +-
 drivers/net/hns3/hns3_rxtx.c          | 2 +-
 drivers/net/hns3/hns3_rxtx.h          | 2 +-
 drivers/net/hns3/hns3_rxtx_vec.c      | 2 +-
 drivers/net/hns3/hns3_rxtx_vec.h      | 2 +-
 drivers/net/hns3/hns3_rxtx_vec_neon.h | 2 +-
 drivers/net/hns3/hns3_rxtx_vec_sve.c  | 2 +-
 drivers/net/hns3/hns3_stats.c         | 2 +-
 drivers/net/hns3/hns3_stats.h         | 2 +-
 29 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c
index 7f115d37ef..3741adc828 100644
--- a/drivers/net/hns3/hns3_cmd.c
+++ b/drivers/net/hns3/hns3_cmd.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #include <rte_ethdev_pci.h>
diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h
index 2d0bab000e..c254f2d0bf 100644
--- a/drivers/net/hns3/hns3_cmd.h
+++ b/drivers/net/hns3/hns3_cmd.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #ifndef _HNS3_CMD_H_
diff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c
index ab77acd948..af084bd9f4 100644
--- a/drivers/net/hns3/hns3_dcb.c
+++ b/drivers/net/hns3/hns3_dcb.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #include <rte_io.h>
diff --git a/drivers/net/hns3/hns3_dcb.h b/drivers/net/hns3/hns3_dcb.h
index fee23d9b4c..811e5304cf 100644
--- a/drivers/net/hns3/hns3_dcb.h
+++ b/drivers/net/hns3/hns3_dcb.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #ifndef _HNS3_DCB_H_
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index a4c6440768..35ac92b7d1 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #include <rte_alarm.h>
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index f9f0e705f6..5b17a74bb2 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #ifndef _HNS3_ETHDEV_H_
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 366a1afa7d..ed0f716f71 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #include <linux/pci_regs.h>
diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
index 857cc94c98..118aa88264 100644
--- a/drivers/net/hns3/hns3_fdir.c
+++ b/drivers/net/hns3/hns3_fdir.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #include <rte_ethdev_driver.h>
diff --git a/drivers/net/hns3/hns3_fdir.h b/drivers/net/hns3/hns3_fdir.h
index a5760a3ccf..b77745f221 100644
--- a/drivers/net/hns3/hns3_fdir.h
+++ b/drivers/net/hns3/hns3_fdir.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #ifndef _HNS3_FDIR_H_
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 8e4519a425..25b16b3277 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #include <rte_flow_driver.h>
diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c
index 99c500dba3..bebfe131cc 100644
--- a/drivers/net/hns3/hns3_intr.c
+++ b/drivers/net/hns3/hns3_intr.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #include <rte_alarm.h>
diff --git a/drivers/net/hns3/hns3_intr.h b/drivers/net/hns3/hns3_intr.h
index 19de1aa2d8..593d55720b 100644
--- a/drivers/net/hns3/hns3_intr.h
+++ b/drivers/net/hns3/hns3_intr.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #ifndef _HNS3_INTR_H_
diff --git a/drivers/net/hns3/hns3_logs.h b/drivers/net/hns3/hns3_logs.h
index f3fc7b51d6..aa135db982 100644
--- a/drivers/net/hns3/hns3_logs.h
+++ b/drivers/net/hns3/hns3_logs.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #ifndef _HNS3_LOGS_H_
diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
index d2a5db8aab..7f47c55f29 100644
--- a/drivers/net/hns3/hns3_mbx.c
+++ b/drivers/net/hns3/hns3_mbx.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #include <rte_ethdev_driver.h>
diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h
index 7f7ade13fa..7f5fdd24f4 100644
--- a/drivers/net/hns3/hns3_mbx.h
+++ b/drivers/net/hns3/hns3_mbx.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #ifndef _HNS3_MBX_H_
diff --git a/drivers/net/hns3/hns3_mp.c b/drivers/net/hns3/hns3_mp.c
index ed2567a8ff..b2916fd788 100644
--- a/drivers/net/hns3/hns3_mp.c
+++ b/drivers/net/hns3/hns3_mp.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #include <rte_eal.h>
diff --git a/drivers/net/hns3/hns3_mp.h b/drivers/net/hns3/hns3_mp.h
index 036546ae11..60ef2315db 100644
--- a/drivers/net/hns3/hns3_mp.h
+++ b/drivers/net/hns3/hns3_mp.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #ifndef _HNS3_MP_H_
diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index 8afe132585..3d2e66a594 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #include <rte_ethdev_pci.h>
diff --git a/drivers/net/hns3/hns3_regs.h b/drivers/net/hns3/hns3_regs.h
index 39fc5d1b18..6522e1ce0e 100644
--- a/drivers/net/hns3/hns3_regs.h
+++ b/drivers/net/hns3/hns3_regs.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #ifndef _HNS3_REGS_H_
diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index 7bd7745859..b42b36d5ba 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #include <rte_ethdev.h>
diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h
index 798c5c62df..d626fedeb8 100644
--- a/drivers/net/hns3/hns3_rss.h
+++ b/drivers/net/hns3/hns3_rss.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #ifndef _HNS3_RSS_H_
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 6ba83f421c..d31f74b28f 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #include <rte_bus_pci.h>
diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h
index f7c60adc2e..6440d55e30 100644
--- a/drivers/net/hns3/hns3_rxtx.h
+++ b/drivers/net/hns3/hns3_rxtx.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #ifndef _HNS3_RXTX_H_
diff --git a/drivers/net/hns3/hns3_rxtx_vec.c b/drivers/net/hns3/hns3_rxtx_vec.c
index a26c83d146..d9b6814320 100644
--- a/drivers/net/hns3/hns3_rxtx_vec.c
+++ b/drivers/net/hns3/hns3_rxtx_vec.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2020 Hisilicon Limited.
+ * Copyright(c) 2020 HiSilicon Limited.
  */
 
 #include <rte_io.h>
diff --git a/drivers/net/hns3/hns3_rxtx_vec.h b/drivers/net/hns3/hns3_rxtx_vec.h
index 35d99032f4..08a3b3c539 100644
--- a/drivers/net/hns3/hns3_rxtx_vec.h
+++ b/drivers/net/hns3/hns3_rxtx_vec.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2020 Hisilicon Limited.
+ * Copyright(c) 2020 HiSilicon Limited.
  */
 
 #ifndef _HNS3_RXTX_VEC_H_
diff --git a/drivers/net/hns3/hns3_rxtx_vec_neon.h b/drivers/net/hns3/hns3_rxtx_vec_neon.h
index 54addbf240..e37072dd7c 100644
--- a/drivers/net/hns3/hns3_rxtx_vec_neon.h
+++ b/drivers/net/hns3/hns3_rxtx_vec_neon.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2020 Hisilicon Limited.
+ * Copyright(c) 2020 HiSilicon Limited.
  */
 
 #ifndef _HNS3_RXTX_VEC_NEON_H_
diff --git a/drivers/net/hns3/hns3_rxtx_vec_sve.c b/drivers/net/hns3/hns3_rxtx_vec_sve.c
index 8c2c8f6108..c53cb9e630 100644
--- a/drivers/net/hns3/hns3_rxtx_vec_sve.c
+++ b/drivers/net/hns3/hns3_rxtx_vec_sve.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2020 Hisilicon Limited.
+ * Copyright(c) 2020 HiSilicon Limited.
  */
 
 #include <arm_sve.h>
diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c
index 48ab6a38bb..796ab99297 100644
--- a/drivers/net/hns3/hns3_stats.c
+++ b/drivers/net/hns3/hns3_stats.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #include <rte_ethdev.h>
diff --git a/drivers/net/hns3/hns3_stats.h b/drivers/net/hns3/hns3_stats.h
index 09b81b131a..684fdca4a1 100644
--- a/drivers/net/hns3/hns3_stats.h
+++ b/drivers/net/hns3/hns3_stats.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 Hisilicon Limited.
+ * Copyright(c) 2018-2019 HiSilicon Limited.
  */
 
 #ifndef _HNS3_STATS_H_
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.157590800 +0800
+++ 0139-net-hns3-update-HiSilicon-copyright-syntax.patch	2021-05-10 23:59:26.540000000 +0800
@@ -1 +1 @@
-From fa485faca236bd0ac834b6ad7c36f5050305482e Mon Sep 17 00:00:00 2001
+From 7151983d32f65971637e38359ada3c5c09942e81 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit fa485faca236bd0ac834b6ad7c36f5050305482e ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -53,3 +55 @@
- drivers/net/hns3/hns3_tm.c            | 2 +-
- drivers/net/hns3/hns3_tm.h            | 2 +-
- 31 files changed, 31 insertions(+), 31 deletions(-)
+ 29 files changed, 29 insertions(+), 29 deletions(-)
@@ -58 +58 @@
-index 03f8048f27..1087178373 100644
+index 7f115d37ef..3741adc828 100644
@@ -67 +67 @@
- #include <ethdev_pci.h>
+ #include <rte_ethdev_pci.h>
@@ -69 +69 @@
-index 5d1fb67644..9ca25295b2 100644
+index 2d0bab000e..c254f2d0bf 100644
@@ -80 +80 @@
-index ebfc24044f..3fcec8220e 100644
+index ab77acd948..af084bd9f4 100644
@@ -91 +91 @@
-index 0d25d3b7ab..9c60ab948a 100644
+index fee23d9b4c..811e5304cf 100644
@@ -102 +102 @@
-index f695db3784..a9e2e93528 100644
+index a4c6440768..35ac92b7d1 100644
@@ -113 +113 @@
-index d23239d2e1..d666b1a1e9 100644
+index f9f0e705f6..5b17a74bb2 100644
@@ -124 +124 @@
-index 6c3ddcc50e..a677cc809f 100644
+index 366a1afa7d..ed0f716f71 100644
@@ -135 +135 @@
-index 896540df78..658f6a6fc1 100644
+index 857cc94c98..118aa88264 100644
@@ -144 +144 @@
- #include <ethdev_driver.h>
+ #include <rte_ethdev_driver.h>
@@ -157 +157 @@
-index 0c4e91109c..366a301fe8 100644
+index 8e4519a425..25b16b3277 100644
@@ -168 +168 @@
-index c259f2e4a5..c8d61376cf 100644
+index 99c500dba3..bebfe131cc 100644
@@ -179 +179 @@
-index c569a9de37..e10e0941ff 100644
+index 19de1aa2d8..593d55720b 100644
@@ -201 +201 @@
-index 61d15845e7..597a2d1299 100644
+index d2a5db8aab..7f47c55f29 100644
@@ -210 +210 @@
- #include <ethdev_driver.h>
+ #include <rte_ethdev_driver.h>
@@ -223 +223 @@
-index 3342a781ad..cfee30f77f 100644
+index ed2567a8ff..b2916fd788 100644
@@ -245 +245 @@
-index 4022bb990d..d53c132b1e 100644
+index 8afe132585..3d2e66a594 100644
@@ -254 +254 @@
- #include <ethdev_pci.h>
+ #include <rte_ethdev_pci.h>
@@ -256 +256 @@
-index c9e10be6b3..7f05f8be79 100644
+index 39fc5d1b18..6522e1ce0e 100644
@@ -267 +267 @@
-index 858e31a234..226ec25150 100644
+index 7bd7745859..b42b36d5ba 100644
@@ -278 +278 @@
-index 94668ed6d5..da2375e2ee 100644
+index 798c5c62df..d626fedeb8 100644
@@ -289 +289 @@
-index 70cd2c2306..64a0cd4f25 100644
+index 6ba83f421c..d31f74b28f 100644
@@ -300 +300 @@
-index eebbebf8c2..cfe6cadaf5 100644
+index f7c60adc2e..6440d55e30 100644
@@ -311 +311 @@
-index 030bfdb627..60018ea3fb 100644
+index a26c83d146..d9b6814320 100644
@@ -333 +333 @@
-index 68f098f2f5..b27fce85f8 100644
+index 54addbf240..e37072dd7c 100644
@@ -344 +344 @@
-index 40fe6f743f..ef3a756195 100644
+index 8c2c8f6108..c53cb9e630 100644
@@ -355 +355 @@
-index 1af689ff09..fdada8ba3c 100644
+index 48ab6a38bb..796ab99297 100644
@@ -366 +366 @@
-index 273be4246f..88ac4cd500 100644
+index 09b81b131a..684fdca4a1 100644
@@ -376,22 +375,0 @@
-diff --git a/drivers/net/hns3/hns3_tm.c b/drivers/net/hns3/hns3_tm.c
-index bcae57aefa..15e00b6e9c 100644
---- a/drivers/net/hns3/hns3_tm.c
-+++ b/drivers/net/hns3/hns3_tm.c
-@@ -1,5 +1,5 @@
- /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2020-2020 Hisilicon Limited.
-+ * Copyright(c) 2020-2020 HiSilicon Limited.
-  */
- 
- #include <rte_malloc.h>
-diff --git a/drivers/net/hns3/hns3_tm.h b/drivers/net/hns3/hns3_tm.h
-index d8de3e49ed..9ccbb22682 100644
---- a/drivers/net/hns3/hns3_tm.h
-+++ b/drivers/net/hns3/hns3_tm.h
-@@ -1,5 +1,5 @@
- /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2020-2020 Hisilicon Limited.
-+ * Copyright(c) 2020-2020 HiSilicon Limited.
-  */
- 
- #ifndef _HNS3_TM_H_

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

* [dpdk-stable] patch 'net/ena: fix releasing Tx ring mbufs' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (136 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: update HiSilicon copyright syntax' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/igc: fix Rx error counter for bad length' " Xueming Li
                   ` (89 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: David Harton; +Cc: Luca Boccassi, Michal Krawczyk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/13e3e5e93c0ffb14cf0fba04733b642940fc1ef2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 13e3e5e93c0ffb14cf0fba04733b642940fc1ef2 Mon Sep 17 00:00:00 2001
From: David Harton <dharton@cisco.com>
Date: Mon, 5 Apr 2021 20:27:19 -0400
Subject: [PATCH] net/ena: fix releasing Tx ring mbufs
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 3c8bc29fd07006338e3460b03655a772cd36a9e7 ]

When ena_tx_queue_release_bufs() frees the mbufs it does not clear
the mbuf pointers.  So, when the device starts and stops multiple
times it can cause the application to receive duplicate mbufs for
two different packets.  Fix the issue by clearing the mbuf pointer.

Also, while tracking down the "double free" issue the ena calls to
allocate and free mbufs in bulk were migrated to the mbuf based APIs
so the common mbuf alloc/free routines are exercised.

Fixes: 79405ee17585 ("net/ena: fix out of order completion")
Fixes: 1173fca25af9 ("ena: add polling-mode driver")

Signed-off-by: David Harton <dharton@cisco.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
---
 drivers/net/ena/ena_ethdev.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 8baec80040..1b34c2aefa 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -767,8 +767,10 @@ static void ena_tx_queue_release_bufs(struct ena_ring *ring)
 	for (i = 0; i < ring->ring_size; ++i) {
 		struct ena_tx_buffer *tx_buf = &ring->tx_buffer_info[i];
 
-		if (tx_buf->mbuf)
+		if (tx_buf->mbuf) {
 			rte_pktmbuf_free(tx_buf->mbuf);
+			tx_buf->mbuf = NULL;
+		}
 	}
 }
 
@@ -1457,7 +1459,7 @@ static int ena_populate_rx_queue(struct ena_ring *rxq, unsigned int count)
 		"bad ring state\n");
 
 	/* get resources for incoming packets */
-	rc = rte_mempool_get_bulk(rxq->mb_pool, (void **)mbufs, count);
+	rc = rte_pktmbuf_alloc_bulk(rxq->mb_pool, mbufs, count);
 	if (unlikely(rc < 0)) {
 		rte_atomic64_inc(&rxq->adapter->drv_stats->rx_nombuf);
 		++rxq->rx_stats.mbuf_alloc_fail;
@@ -1486,8 +1488,7 @@ static int ena_populate_rx_queue(struct ena_ring *rxq, unsigned int count)
 	if (unlikely(i < count)) {
 		PMD_DRV_LOG(WARNING, "refilled rx qid %d with only %d "
 			"buffers (from %d)\n", rxq->id, i, count);
-		rte_mempool_put_bulk(rxq->mb_pool, (void **)(&mbufs[i]),
-				     count - i);
+		rte_pktmbuf_free_bulk(&mbufs[i], count - i);
 		++rxq->rx_stats.refill_partial;
 	}
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.194043500 +0800
+++ 0140-net-ena-fix-releasing-Tx-ring-mbufs.patch	2021-05-10 23:59:26.550000000 +0800
@@ -1 +1 @@
-From 3c8bc29fd07006338e3460b03655a772cd36a9e7 Mon Sep 17 00:00:00 2001
+From 13e3e5e93c0ffb14cf0fba04733b642940fc1ef2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 3c8bc29fd07006338e3460b03655a772cd36a9e7 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index 9aa51c9dcf..f60e843b7f 100644
+index 8baec80040..1b34c2aefa 100644

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

* [dpdk-stable] patch 'net/igc: fix Rx error counter for bad length' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (137 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/ena: fix releasing Tx ring mbufs' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/e1000: " Xueming Li
                   ` (88 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/fa6df61bf20ad0017eb598eaccd6df10fa8498ac

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fa6df61bf20ad0017eb598eaccd6df10fa8498ac Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Thu, 1 Apr 2021 13:20:43 +0800
Subject: [PATCH] net/igc: fix Rx error counter for bad length
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit c69abf624a3c84aa6b1cdfe953dcab9ff35deac2 ]

When the size of a packet in Rx channel is less than the minimum
or greater than the maximum, the packet will be simultaneously
counted by RLEC(Receive Length Error Count) and
RUC(Receive Under Size Count)/ROC(Receive Oversize Count) registers.

This patch fixes the issue of counting a length error packet twice
when counting the total number of received error packets.

Fixes: e6defdfddc3b ("net/igc: enable statistics")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/igc/igc_ethdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
index 2d9bbb835d..a1152f9deb 100644
--- a/drivers/net/igc/igc_ethdev.c
+++ b/drivers/net/igc/igc_ethdev.c
@@ -1904,8 +1904,7 @@ eth_igc_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats)
 
 	/* Rx Errors */
 	rte_stats->imissed = stats->mpc;
-	rte_stats->ierrors = stats->crcerrs +
-			stats->rlec + stats->ruc + stats->roc +
+	rte_stats->ierrors = stats->crcerrs + stats->rlec +
 			stats->rxerrc + stats->algnerrc;
 
 	/* Tx Errors */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.220166800 +0800
+++ 0141-net-igc-fix-Rx-error-counter-for-bad-length.patch	2021-05-10 23:59:26.550000000 +0800
@@ -1 +1 @@
-From c69abf624a3c84aa6b1cdfe953dcab9ff35deac2 Mon Sep 17 00:00:00 2001
+From fa6df61bf20ad0017eb598eaccd6df10fa8498ac Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit c69abf624a3c84aa6b1cdfe953dcab9ff35deac2 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 17dd8bf8c6..31c99dca09 100644
+index 2d9bbb835d..a1152f9deb 100644

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

* [dpdk-stable] patch 'net/e1000: fix Rx error counter for bad length' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (138 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/igc: fix Rx error counter for bad length' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'doc: update recommended versions for i40e' " Xueming Li
                   ` (87 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b1fab4dc0d5c372e21b2e497d50414ded0bac30e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b1fab4dc0d5c372e21b2e497d50414ded0bac30e Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Thu, 1 Apr 2021 13:21:32 +0800
Subject: [PATCH] net/e1000: fix Rx error counter for bad length
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 7b0a60dd394969fb17409519fd673e61b05f284e ]

When the size of a packet in Rx channel is less than the minimum
or greater than the maximum, the packet will be simultaneously
counted by RLEC(Receive Length Error Count) and
RUC(Receive Under Size Count)/ROC(Receive Oversize Count) registers.

This patch fixes the issue of counting a length error packet twice
when counting the total number of received error packets.

Fixes: 70bdb18657da ("ethdev: add Rx error counters for missed, badcrc and badlen packets")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/e1000/em_ethdev.c  | 3 +--
 drivers/net/e1000/igb_ethdev.c | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 35be2d5aa5..b5244d06cf 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -975,8 +975,7 @@ eth_em_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats)
 
 	/* Rx Errors */
 	rte_stats->imissed = stats->mpc;
-	rte_stats->ierrors = stats->crcerrs +
-	                     stats->rlec + stats->ruc + stats->roc +
+	rte_stats->ierrors = stats->crcerrs + stats->rlec +
 	                     stats->rxerrc + stats->algnerrc + stats->cexterr;
 
 	/* Tx Errors */
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 2337d5f767..7857be10cb 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -1827,8 +1827,7 @@ eth_igb_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats)
 
 	/* Rx Errors */
 	rte_stats->imissed = stats->mpc;
-	rte_stats->ierrors = stats->crcerrs +
-	                     stats->rlec + stats->ruc + stats->roc +
+	rte_stats->ierrors = stats->crcerrs + stats->rlec +
 	                     stats->rxerrc + stats->algnerrc + stats->cexterr;
 
 	/* Tx Errors */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.244156400 +0800
+++ 0142-net-e1000-fix-Rx-error-counter-for-bad-length.patch	2021-05-10 23:59:26.550000000 +0800
@@ -1 +1 @@
-From 7b0a60dd394969fb17409519fd673e61b05f284e Mon Sep 17 00:00:00 2001
+From b1fab4dc0d5c372e21b2e497d50414ded0bac30e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 7b0a60dd394969fb17409519fd673e61b05f284e ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 3e7ccdbf09..a0ca371b02 100644
+index 35be2d5aa5..b5244d06cf 100644
@@ -39 +41 @@
-index a1a72339ba..25218da240 100644
+index 2337d5f767..7857be10cb 100644
@@ -42 +44 @@
-@@ -1825,8 +1825,7 @@ eth_igb_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats)
+@@ -1827,8 +1827,7 @@ eth_igb_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats)

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

* [dpdk-stable] patch 'doc: update recommended versions for i40e' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (139 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/e1000: " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/i40e: fix flow director config after flow validate' " Xueming Li
                   ` (86 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Robin Zhang; +Cc: Luca Boccassi, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5a4a7bb83069401b416f3ad95ce05a940239d0a0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5a4a7bb83069401b416f3ad95ce05a940239d0a0 Mon Sep 17 00:00:00 2001
From: Robin Zhang <robinx.zhang@intel.com>
Date: Tue, 30 Mar 2021 08:44:23 +0000
Subject: [PATCH] doc: update recommended versions for i40e
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 13489381ccb11199e8e2029095db6bb829c5ab5e ]

Kernel driver 2.13.10 is removed, so update recommended matching list
for i40e.

Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 doc/guides/nics/i40e.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst
index 64f20e7dab..15febba941 100644
--- a/doc/guides/nics/i40e.rst
+++ b/doc/guides/nics/i40e.rst
@@ -88,7 +88,7 @@ For X710/XL710/XXV710,
    +--------------+-----------------------+------------------+
    | DPDK version | Kernel driver version | Firmware version |
    +==============+=======================+==================+
-   |    20.11     |         2.13.10       |       8.00       |
+   |    20.11     |         2.14.13       |       8.00       |
    +--------------+-----------------------+------------------+
    |    20.08     |         2.12.6        |       7.30       |
    +--------------+-----------------------+------------------+
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.268808700 +0800
+++ 0143-doc-update-recommended-versions-for-i40e.patch	2021-05-10 23:59:26.550000000 +0800
@@ -1 +1 @@
-From 13489381ccb11199e8e2029095db6bb829c5ab5e Mon Sep 17 00:00:00 2001
+From 5a4a7bb83069401b416f3ad95ce05a940239d0a0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 13489381ccb11199e8e2029095db6bb829c5ab5e ]
@@ -9,2 +11,0 @@
-Cc: stable@dpdk.org
-
@@ -18 +19 @@
-index d86212db1a..07841dca24 100644
+index 64f20e7dab..15febba941 100644
@@ -21,3 +22 @@
-@@ -102,7 +102,7 @@ For X710/XL710/XXV710,
-    +==============+=======================+==================+
-    |    21.02     |         2.14.13       |       8.00       |
+@@ -88,7 +88,7 @@ For X710/XL710/XXV710,
@@ -24,0 +24,2 @@
+    | DPDK version | Kernel driver version | Firmware version |
+    +==============+=======================+==================+

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

* [dpdk-stable] patch 'net/i40e: fix flow director config after flow validate' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (140 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'doc: update recommended versions for i40e' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/mlx5: fix shared inner RSS' " Xueming Li
                   ` (85 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Murphy Yang; +Cc: Luca Boccassi, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/81c1c91037262fd6e44e23cd86035a0987500761

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 81c1c91037262fd6e44e23cd86035a0987500761 Mon Sep 17 00:00:00 2001
From: Murphy Yang <murphyx.yang@intel.com>
Date: Thu, 1 Apr 2021 03:23:32 +0000
Subject: [PATCH] net/i40e: fix flow director config after flow validate
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 4a072ad434426ebfb5a6120858a971b54e7d2204 ]

The configuration of FDIR input set should not be set
during flow validate. It should be set when flow create.

Fixes: fe5d0e85b713 ("net/i40e: fix flow director flex configuration")
Fixes: 15018d79f0be ("net/i40e: add FDIR support for GTP-C and GTP-U")

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev.h |  1 +
 drivers/net/i40e/i40e_fdir.c   | 88 +++++++++++++++++++++++++++++++
 drivers/net/i40e/i40e_flow.c   | 94 +++-------------------------------
 3 files changed, 96 insertions(+), 87 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index 7d203a7816..aeabe5a205 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -629,6 +629,7 @@ struct i40e_fdir_flow_ext {
 	uint8_t raw_id;
 	uint8_t is_vf;   /* 1 for VF, 0 for port dev */
 	uint16_t dst_id; /* VF ID, available when is_vf is 1*/
+	uint64_t input_set;
 	bool inner_ip;   /* If there is inner ip */
 	enum i40e_fdir_ip_type iip_type; /* ip type for inner ip */
 	enum i40e_fdir_ip_type oip_type; /* ip type for outer ip */
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index f5defcf585..37d988d21c 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -1588,6 +1588,83 @@ i40e_flow_set_fdir_flex_msk(struct i40e_pf *pf,
 	pf->fdir.flex_mask_flag[pctype] = 1;
 }
 
+static int
+i40e_flow_set_fdir_inset(struct i40e_pf *pf,
+			 enum i40e_filter_pctype pctype,
+			 uint64_t input_set)
+{
+	uint32_t mask_reg[I40E_INSET_MASK_NUM_REG] = {0};
+	struct i40e_hw *hw = I40E_PF_TO_HW(pf);
+	uint64_t inset_reg = 0;
+	int i, num;
+
+	/* Check if the input set is valid */
+	if (i40e_validate_input_set(pctype, RTE_ETH_FILTER_FDIR,
+				    input_set) != 0) {
+		PMD_DRV_LOG(ERR, "Invalid input set");
+		return -EINVAL;
+	}
+
+	/* Check if the configuration is conflicted */
+	if (pf->fdir.inset_flag[pctype] &&
+	    memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t)))
+		return -1;
+
+	if (pf->fdir.inset_flag[pctype] &&
+	    !memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t)))
+		return 0;
+
+	num = i40e_generate_inset_mask_reg(hw, input_set, mask_reg,
+						 I40E_INSET_MASK_NUM_REG);
+	if (num < 0)
+		return -EINVAL;
+
+	if (pf->support_multi_driver) {
+		for (i = 0; i < num; i++)
+			if (i40e_read_rx_ctl(hw,
+					I40E_GLQF_FD_MSK(i, pctype)) !=
+					mask_reg[i]) {
+				PMD_DRV_LOG(ERR, "Input set setting is not"
+						" supported with"
+						" `support-multi-driver`"
+						" enabled!");
+				return -EPERM;
+			}
+		for (i = num; i < I40E_INSET_MASK_NUM_REG; i++)
+			if (i40e_read_rx_ctl(hw,
+					I40E_GLQF_FD_MSK(i, pctype)) != 0) {
+				PMD_DRV_LOG(ERR, "Input set setting is not"
+						" supported with"
+						" `support-multi-driver`"
+						" enabled!");
+				return -EPERM;
+			}
+
+	} else {
+		for (i = 0; i < num; i++)
+			i40e_check_write_reg(hw, I40E_GLQF_FD_MSK(i, pctype),
+				mask_reg[i]);
+		/*clear unused mask registers of the pctype */
+		for (i = num; i < I40E_INSET_MASK_NUM_REG; i++)
+			i40e_check_write_reg(hw,
+					I40E_GLQF_FD_MSK(i, pctype), 0);
+	}
+
+	inset_reg |= i40e_translate_input_set_reg(hw->mac.type, input_set);
+
+	i40e_check_write_reg(hw, I40E_PRTQF_FD_INSET(pctype, 0),
+			     (uint32_t)(inset_reg & UINT32_MAX));
+	i40e_check_write_reg(hw, I40E_PRTQF_FD_INSET(pctype, 1),
+			     (uint32_t)((inset_reg >>
+					 I40E_32_BIT_WIDTH) & UINT32_MAX));
+
+	I40E_WRITE_FLUSH(hw);
+
+	pf->fdir.input_set[pctype] = input_set;
+	pf->fdir.inset_flag[pctype] = 1;
+	return 0;
+}
+
 static inline unsigned char *
 i40e_find_available_buffer(struct rte_eth_dev *dev)
 {
@@ -1686,6 +1763,17 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
 
 	if (add) {
 		if (filter->input.flow_ext.is_flex_flow) {
+			ret = i40e_flow_set_fdir_inset(pf, pctype,
+					filter->input.flow_ext.input_set);
+			if (ret == -1) {
+				PMD_DRV_LOG(ERR, "Conflict with the"
+					    " first rule's input set.");
+				return -EINVAL;
+			} else if (ret == -EINVAL) {
+				PMD_DRV_LOG(ERR, "Invalid pattern mask.");
+				return -EINVAL;
+			}
+
 			for (i = 0; i < filter->input.flow_ext.raw_id; i++) {
 				layer_idx = filter->input.flow_ext.layer_idx;
 				field_idx = layer_idx * I40E_MAX_FLXPLD_FIED + i;
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 15c6464703..19bdce0195 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2243,82 +2243,6 @@ i40e_flow_check_raw_item(const struct rte_flow_item *item,
 	return 0;
 }
 
-static int
-i40e_flow_set_fdir_inset(struct i40e_pf *pf,
-			 enum i40e_filter_pctype pctype,
-			 uint64_t input_set)
-{
-	struct i40e_hw *hw = I40E_PF_TO_HW(pf);
-	uint64_t inset_reg = 0;
-	uint32_t mask_reg[I40E_INSET_MASK_NUM_REG] = {0};
-	int i, num;
-
-	/* Check if the input set is valid */
-	if (i40e_validate_input_set(pctype, RTE_ETH_FILTER_FDIR,
-				    input_set) != 0) {
-		PMD_DRV_LOG(ERR, "Invalid input set");
-		return -EINVAL;
-	}
-
-	/* Check if the configuration is conflicted */
-	if (pf->fdir.inset_flag[pctype] &&
-	    memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t)))
-		return -1;
-
-	if (pf->fdir.inset_flag[pctype] &&
-	    !memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t)))
-		return 0;
-
-	num = i40e_generate_inset_mask_reg(hw, input_set, mask_reg,
-					   I40E_INSET_MASK_NUM_REG);
-	if (num < 0)
-		return -EINVAL;
-
-	if (pf->support_multi_driver) {
-		for (i = 0; i < num; i++)
-			if (i40e_read_rx_ctl(hw,
-					I40E_GLQF_FD_MSK(i, pctype)) !=
-					mask_reg[i]) {
-				PMD_DRV_LOG(ERR, "Input set setting is not"
-						" supported with"
-						" `support-multi-driver`"
-						" enabled!");
-				return -EPERM;
-			}
-		for (i = num; i < I40E_INSET_MASK_NUM_REG; i++)
-			if (i40e_read_rx_ctl(hw,
-					I40E_GLQF_FD_MSK(i, pctype)) != 0) {
-				PMD_DRV_LOG(ERR, "Input set setting is not"
-						" supported with"
-						" `support-multi-driver`"
-						" enabled!");
-				return -EPERM;
-			}
-
-	} else {
-		for (i = 0; i < num; i++)
-			i40e_check_write_reg(hw, I40E_GLQF_FD_MSK(i, pctype),
-				mask_reg[i]);
-		/*clear unused mask registers of the pctype */
-		for (i = num; i < I40E_INSET_MASK_NUM_REG; i++)
-			i40e_check_write_reg(hw,
-					I40E_GLQF_FD_MSK(i, pctype), 0);
-	}
-
-	inset_reg |= i40e_translate_input_set_reg(hw->mac.type, input_set);
-
-	i40e_check_write_reg(hw, I40E_PRTQF_FD_INSET(pctype, 0),
-			     (uint32_t)(inset_reg & UINT32_MAX));
-	i40e_check_write_reg(hw, I40E_PRTQF_FD_INSET(pctype, 1),
-			     (uint32_t)((inset_reg >>
-					 I40E_32_BIT_WIDTH) & UINT32_MAX));
-
-	I40E_WRITE_FLUSH(hw);
-
-	pf->fdir.input_set[pctype] = input_set;
-	pf->fdir.inset_flag[pctype] = 1;
-	return 0;
-}
 
 static uint8_t
 i40e_flow_fdir_get_pctype_value(struct i40e_pf *pf,
@@ -3212,18 +3136,14 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 
 	/* If customized pctype is not used, set fdir configuration.*/
 	if (!filter->input.flow_ext.customized_pctype) {
-		ret = i40e_flow_set_fdir_inset(pf, pctype, input_set);
-		if (ret == -1) {
-			rte_flow_error_set(error, EINVAL,
-					   RTE_FLOW_ERROR_TYPE_ITEM, item,
-					   "Conflict with the first rule's input set.");
-			return -rte_errno;
-		} else if (ret == -EINVAL) {
-			rte_flow_error_set(error, EINVAL,
-					   RTE_FLOW_ERROR_TYPE_ITEM, item,
-					   "Invalid pattern mask.");
-			return -rte_errno;
+		/* Check if the input set is valid */
+		if (i40e_validate_input_set(pctype, RTE_ETH_FILTER_FDIR,
+						input_set) != 0) {
+			PMD_DRV_LOG(ERR, "Invalid input set");
+			return -EINVAL;
 		}
+
+		filter->input.flow_ext.input_set = input_set;
 	}
 
 	filter->input.pctype = pctype;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.291577100 +0800
+++ 0144-net-i40e-fix-flow-director-config-after-flow-validat.patch	2021-05-10 23:59:26.550000000 +0800
@@ -1 +1 @@
-From 4a072ad434426ebfb5a6120858a971b54e7d2204 Mon Sep 17 00:00:00 2001
+From 81c1c91037262fd6e44e23cd86035a0987500761 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 4a072ad434426ebfb5a6120858a971b54e7d2204 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index faf6896fbc..cdf1c2fe1f 100644
+index 7d203a7816..aeabe5a205 100644
@@ -25 +27 @@
-@@ -631,6 +631,7 @@ struct i40e_fdir_flow_ext {
+@@ -629,6 +629,7 @@ struct i40e_fdir_flow_ext {
@@ -34 +36 @@
-index c572d003cb..da089baa4d 100644
+index f5defcf585..37d988d21c 100644
@@ -140 +142 @@
-index 1ee8959e56..2cc9ad9ef7 100644
+index 15c6464703..19bdce0195 100644

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

* [dpdk-stable] patch 'net/mlx5: fix shared inner RSS' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (141 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/i40e: fix flow director config after flow validate' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/mlx5: fix missing shared RSS hash types' " Xueming Li
                   ` (84 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Xiaoyu Min; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/43af55f5bfb54bd8b66e07728dc769c2ca12644c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 43af55f5bfb54bd8b66e07728dc769c2ca12644c Mon Sep 17 00:00:00 2001
From: Xiaoyu Min <jackmin@nvidia.com>
Date: Fri, 26 Mar 2021 13:20:20 +0800
Subject: [PATCH] net/mlx5: fix shared inner RSS
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit b27bbe81579202409de8bb5ca307f9e10d5bb9e2 ]

The shared RSS action use the _tunnel_ information which is derived
from flow items to decide whether need to do inner RSS or not.
However, inner RSS should be decided by RSS level (>1) in configuration
and then to create TIR with 'IBV_RX_HASH_INNER' hash bit set.

Also, for one shared RSS action there is only one set of TIRs -
outer or inner could be so the unnecessary set of TIRs are removed
in order to reduce resource.

Fixes: d2046c09aa64 ("net/mlx5: support shared action for RSS")

Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.h    |  2 --
 drivers/net/mlx5/mlx5_flow_dv.c | 48 +++++++++++++++------------------
 2 files changed, 22 insertions(+), 28 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 91f48923c0..76c0208a85 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -1082,8 +1082,6 @@ struct mlx5_shared_action_rss {
 	/**< Hash RX queues (hrxq, hrxq_tunnel fields) indirection table. */
 	uint32_t hrxq[MLX5_RSS_HASH_FIELDS_LEN];
 	/**< Hash RX queue indexes mapped to mlx5_rss_hash_fields */
-	uint32_t hrxq_tunnel[MLX5_RSS_HASH_FIELDS_LEN];
-	/**< Hash RX queue indexes for tunneled RSS */
 	rte_spinlock_t action_rss_sl; /**< Shared RSS action spinlock. */
 };
 
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 347c3a1c13..8e64b82e10 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -10675,10 +10675,9 @@ flow_dv_translate(struct rte_eth_dev *dev,
 static int
 __flow_dv_action_rss_hrxq_set(struct mlx5_shared_action_rss *action,
 			      const uint64_t hash_fields,
-			      const int tunnel,
 			      uint32_t hrxq_idx)
 {
-	uint32_t *hrxqs = tunnel ? action->hrxq : action->hrxq_tunnel;
+	uint32_t *hrxqs = action->hrxq;
 
 	switch (hash_fields & ~IBV_RX_HASH_INNER) {
 	case MLX5_RSS_HASH_IPV4:
@@ -10725,14 +10724,12 @@ __flow_dv_action_rss_hrxq_set(struct mlx5_shared_action_rss *action,
  */
 static uint32_t
 __flow_dv_action_rss_hrxq_lookup(struct rte_eth_dev *dev, uint32_t idx,
-				 const uint64_t hash_fields,
-				 const int tunnel)
+				 const uint64_t hash_fields)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
 	struct mlx5_shared_action_rss *shared_rss =
 	    mlx5_ipool_get(priv->sh->ipool[MLX5_IPOOL_RSS_SHARED_ACTIONS], idx);
-	const uint32_t *hrxqs = tunnel ? shared_rss->hrxq :
-							shared_rss->hrxq_tunnel;
+	const uint32_t *hrxqs = shared_rss->hrxq;
 
 	switch (hash_fields & ~IBV_RX_HASH_INNER) {
 	case MLX5_RSS_HASH_IPV4:
@@ -10821,9 +10818,7 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
 
 			hrxq_idx = __flow_dv_action_rss_hrxq_lookup(dev,
 						rss_desc->shared_rss,
-						dev_flow->hash_fields,
-						!!(dh->layers &
-						MLX5_FLOW_LAYER_TUNNEL));
+						dev_flow->hash_fields);
 			if (hrxq_idx)
 				hrxq = mlx5_ipool_get
 					(priv->sh->ipool[MLX5_IPOOL_HRXQ],
@@ -11415,8 +11410,7 @@ static int
 __flow_dv_action_rss_hrxqs_release(struct rte_eth_dev *dev,
 				 struct mlx5_shared_action_rss *shared_rss)
 {
-	return __flow_dv_hrxqs_release(dev, &shared_rss->hrxq) +
-		__flow_dv_hrxqs_release(dev, &shared_rss->hrxq_tunnel);
+	return __flow_dv_hrxqs_release(dev, &shared_rss->hrxq);
 }
 
 /**
@@ -11462,23 +11456,25 @@ __flow_dv_action_rss_setup(struct rte_eth_dev *dev,
 	for (i = 0; i < MLX5_RSS_HASH_FIELDS_LEN; i++) {
 		uint32_t hrxq_idx;
 		uint64_t hash_fields = mlx5_rss_hash_fields[i];
-		int tunnel;
+		int tunnel = 0;
 
-		for (tunnel = 0; tunnel < 2; tunnel++) {
-			rss_desc.tunnel = tunnel;
-			rss_desc.hash_fields = hash_fields;
-			hrxq_idx = mlx5_hrxq_get(dev, &rss_desc);
-			if (!hrxq_idx) {
-				rte_flow_error_set
-					(error, rte_errno,
-					 RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
-					 "cannot get hash queue");
-				goto error_hrxq_new;
-			}
-			err = __flow_dv_action_rss_hrxq_set
-				(shared_rss, hash_fields, tunnel, hrxq_idx);
-			MLX5_ASSERT(!err);
+		if (shared_rss->origin.level > 1) {
+			hash_fields |= IBV_RX_HASH_INNER;
+			tunnel = 1;
+		}
+		rss_desc.tunnel = tunnel;
+		rss_desc.hash_fields = hash_fields;
+		hrxq_idx = mlx5_hrxq_get(dev, &rss_desc);
+		if (!hrxq_idx) {
+			rte_flow_error_set
+				(error, rte_errno,
+				 RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
+				 "cannot get hash queue");
+			goto error_hrxq_new;
 		}
+		err = __flow_dv_action_rss_hrxq_set
+			(shared_rss, hash_fields, hrxq_idx);
+		MLX5_ASSERT(!err);
 	}
 	return 0;
 error_hrxq_new:
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.319968600 +0800
+++ 0145-net-mlx5-fix-shared-inner-RSS.patch	2021-05-10 23:59:26.560000000 +0800
@@ -1 +1 @@
-From b27bbe81579202409de8bb5ca307f9e10d5bb9e2 Mon Sep 17 00:00:00 2001
+From 43af55f5bfb54bd8b66e07728dc769c2ca12644c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit b27bbe81579202409de8bb5ca307f9e10d5bb9e2 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index 8324e188e1..00b6cd97b9 100644
+index 91f48923c0..76c0208a85 100644
@@ -29 +31 @@
-@@ -1129,8 +1129,6 @@ struct mlx5_shared_action_rss {
+@@ -1082,8 +1082,6 @@ struct mlx5_shared_action_rss {
@@ -39 +41 @@
-index 223a7d0e36..264dd69a72 100644
+index 347c3a1c13..8e64b82e10 100644
@@ -42 +44 @@
-@@ -11895,10 +11895,9 @@ flow_dv_translate(struct rte_eth_dev *dev,
+@@ -10675,10 +10675,9 @@ flow_dv_translate(struct rte_eth_dev *dev,
@@ -54 +56 @@
-@@ -11945,14 +11944,12 @@ __flow_dv_action_rss_hrxq_set(struct mlx5_shared_action_rss *action,
+@@ -10725,14 +10724,12 @@ __flow_dv_action_rss_hrxq_set(struct mlx5_shared_action_rss *action,
@@ -71 +73 @@
-@@ -12041,9 +12038,7 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
+@@ -10821,9 +10818,7 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
@@ -82 +84 @@
-@@ -12654,8 +12649,7 @@ static int
+@@ -11415,8 +11410,7 @@ static int
@@ -92 +94 @@
-@@ -12701,23 +12695,25 @@ __flow_dv_action_rss_setup(struct rte_eth_dev *dev,
+@@ -11462,23 +11456,25 @@ __flow_dv_action_rss_setup(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/mlx5: fix missing shared RSS hash types' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (142 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/mlx5: fix shared inner RSS' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/mlx5: fix drop action for Direct Rules/Verbs' " Xueming Li
                   ` (83 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Xiaoyu Min; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b52bd28182d1f0de600a322dec7910c4caf44ecb

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b52bd28182d1f0de600a322dec7910c4caf44ecb Mon Sep 17 00:00:00 2001
From: Xiaoyu Min <jackmin@nvidia.com>
Date: Fri, 26 Mar 2021 13:20:21 +0800
Subject: [PATCH] net/mlx5: fix missing shared RSS hash types
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 212d17b6a65063f3a6d176c539158847d5aee7d5 ]

Shared RSS action create all supported RSS hash combination
in advance and lookup the right hash TIR when flow is actually
applied by comparing hash field value.

Unfortunately some hash combination is missed, for example,
UDP/TCP dest port only, L3-src-only, etc.

This patch add the missing hash combination.

In order to reduce the usage of pre-created TIRs and because
for one L3+L4 combination only one IBV hash type is possible,
for example, either IBV_RX_HASH_SRC_PORT_UDP or IBV_RX_HASH_DST_PORT_UDP
or both of them could be set so they can share same slot in
mlx5_rss_hash_fields, means only one TIR will be created.

Fixes: d2046c09aa64 ("net/mlx5: support shared action for RSS")

Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.h    |  20 +++++
 drivers/net/mlx5/mlx5_flow_dv.c | 128 ++++++++++++++++++++++++++++++++
 2 files changed, 148 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 76c0208a85..293c60f5b4 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -1059,6 +1059,26 @@ struct rte_flow {
 #define MLX5_RSS_HASH_IPV6_UDP \
 	(MLX5_RSS_HASH_IPV6 | \
 	 IBV_RX_HASH_SRC_PORT_UDP | IBV_RX_HASH_DST_PORT_UDP)
+#define MLX5_RSS_HASH_IPV4_SRC_ONLY IBV_RX_HASH_SRC_IPV4
+#define MLX5_RSS_HASH_IPV4_DST_ONLY IBV_RX_HASH_DST_IPV4
+#define MLX5_RSS_HASH_IPV6_SRC_ONLY IBV_RX_HASH_SRC_IPV6
+#define MLX5_RSS_HASH_IPV6_DST_ONLY IBV_RX_HASH_DST_IPV6
+#define MLX5_RSS_HASH_IPV4_UDP_SRC_ONLY \
+	(MLX5_RSS_HASH_IPV4 | IBV_RX_HASH_SRC_PORT_UDP)
+#define MLX5_RSS_HASH_IPV4_UDP_DST_ONLY \
+	(MLX5_RSS_HASH_IPV4 | IBV_RX_HASH_DST_PORT_UDP)
+#define MLX5_RSS_HASH_IPV6_UDP_SRC_ONLY \
+	(MLX5_RSS_HASH_IPV6 | IBV_RX_HASH_SRC_PORT_UDP)
+#define MLX5_RSS_HASH_IPV6_UDP_DST_ONLY \
+	(MLX5_RSS_HASH_IPV6 | IBV_RX_HASH_DST_PORT_UDP)
+#define MLX5_RSS_HASH_IPV4_TCP_SRC_ONLY \
+	(MLX5_RSS_HASH_IPV4 | IBV_RX_HASH_SRC_PORT_TCP)
+#define MLX5_RSS_HASH_IPV4_TCP_DST_ONLY \
+	(MLX5_RSS_HASH_IPV4 | IBV_RX_HASH_DST_PORT_TCP)
+#define MLX5_RSS_HASH_IPV6_TCP_SRC_ONLY \
+	(MLX5_RSS_HASH_IPV6 | IBV_RX_HASH_SRC_PORT_TCP)
+#define MLX5_RSS_HASH_IPV6_TCP_DST_ONLY \
+	(MLX5_RSS_HASH_IPV6 | IBV_RX_HASH_DST_PORT_TCP)
 #define MLX5_RSS_HASH_NONE 0ULL
 
 /* array of valid combinations of RX Hash fields for RSS */
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 8e64b82e10..94550e5a73 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -10681,21 +10681,45 @@ __flow_dv_action_rss_hrxq_set(struct mlx5_shared_action_rss *action,
 
 	switch (hash_fields & ~IBV_RX_HASH_INNER) {
 	case MLX5_RSS_HASH_IPV4:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV4_DST_ONLY:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV4_SRC_ONLY:
 		hrxqs[0] = hrxq_idx;
 		return 0;
 	case MLX5_RSS_HASH_IPV4_TCP:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV4_TCP_DST_ONLY:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV4_TCP_SRC_ONLY:
 		hrxqs[1] = hrxq_idx;
 		return 0;
 	case MLX5_RSS_HASH_IPV4_UDP:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV4_UDP_DST_ONLY:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV4_UDP_SRC_ONLY:
 		hrxqs[2] = hrxq_idx;
 		return 0;
 	case MLX5_RSS_HASH_IPV6:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV6_DST_ONLY:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV6_SRC_ONLY:
 		hrxqs[3] = hrxq_idx;
 		return 0;
 	case MLX5_RSS_HASH_IPV6_TCP:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV6_TCP_DST_ONLY:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV6_TCP_SRC_ONLY:
 		hrxqs[4] = hrxq_idx;
 		return 0;
 	case MLX5_RSS_HASH_IPV6_UDP:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV6_UDP_DST_ONLY:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV6_UDP_SRC_ONLY:
 		hrxqs[5] = hrxq_idx;
 		return 0;
 	case MLX5_RSS_HASH_NONE:
@@ -10733,22 +10757,47 @@ __flow_dv_action_rss_hrxq_lookup(struct rte_eth_dev *dev, uint32_t idx,
 
 	switch (hash_fields & ~IBV_RX_HASH_INNER) {
 	case MLX5_RSS_HASH_IPV4:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV4_DST_ONLY:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV4_SRC_ONLY:
 		return hrxqs[0];
 	case MLX5_RSS_HASH_IPV4_TCP:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV4_TCP_DST_ONLY:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV4_TCP_SRC_ONLY:
 		return hrxqs[1];
 	case MLX5_RSS_HASH_IPV4_UDP:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV4_UDP_DST_ONLY:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV4_UDP_SRC_ONLY:
 		return hrxqs[2];
 	case MLX5_RSS_HASH_IPV6:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV6_DST_ONLY:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV6_SRC_ONLY:
 		return hrxqs[3];
 	case MLX5_RSS_HASH_IPV6_TCP:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV6_TCP_DST_ONLY:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV6_TCP_SRC_ONLY:
 		return hrxqs[4];
 	case MLX5_RSS_HASH_IPV6_UDP:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV6_UDP_DST_ONLY:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV6_UDP_SRC_ONLY:
 		return hrxqs[5];
 	case MLX5_RSS_HASH_NONE:
 		return hrxqs[6];
 	default:
 		return 0;
 	}
+
 }
 
 /**
@@ -11413,6 +11462,84 @@ __flow_dv_action_rss_hrxqs_release(struct rte_eth_dev *dev,
 	return __flow_dv_hrxqs_release(dev, &shared_rss->hrxq);
 }
 
+/**
+ * Adjust L3/L4 hash value of pre-created shared RSS hrxq according to
+ * user input.
+ *
+ * Only one hash value is available for one L3+L4 combination:
+ * for example:
+ * MLX5_RSS_HASH_IPV4, MLX5_RSS_HASH_IPV4_SRC_ONLY, and
+ * MLX5_RSS_HASH_IPV4_DST_ONLY are mutually exclusive so they can share
+ * same slot in mlx5_rss_hash_fields.
+ *
+ * @param[in] rss
+ *   Pointer to the shared action RSS conf.
+ * @param[in, out] hash_field
+ *   hash_field variable needed to be adjusted.
+ *
+ * @return
+ *   void
+ */
+static void
+__flow_dv_action_rss_l34_hash_adjust(struct mlx5_shared_action_rss *rss,
+				     uint64_t *hash_field)
+{
+	uint64_t rss_types = rss->origin.types;
+
+	switch (*hash_field & ~IBV_RX_HASH_INNER) {
+	case MLX5_RSS_HASH_IPV4:
+		if (rss_types & MLX5_IPV4_LAYER_TYPES) {
+			*hash_field &= ~MLX5_RSS_HASH_IPV4;
+			if (rss_types & ETH_RSS_L3_DST_ONLY)
+				*hash_field |= IBV_RX_HASH_DST_IPV4;
+			else if (rss_types & ETH_RSS_L3_SRC_ONLY)
+				*hash_field |= IBV_RX_HASH_SRC_IPV4;
+			else
+				*hash_field |= MLX5_RSS_HASH_IPV4;
+		}
+		return;
+	case MLX5_RSS_HASH_IPV6:
+		if (rss_types & MLX5_IPV6_LAYER_TYPES) {
+			*hash_field &= ~MLX5_RSS_HASH_IPV6;
+			if (rss_types & ETH_RSS_L3_DST_ONLY)
+				*hash_field |= IBV_RX_HASH_DST_IPV6;
+			else if (rss_types & ETH_RSS_L3_SRC_ONLY)
+				*hash_field |= IBV_RX_HASH_SRC_IPV6;
+			else
+				*hash_field |= MLX5_RSS_HASH_IPV6;
+		}
+		return;
+	case MLX5_RSS_HASH_IPV4_UDP:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV6_UDP:
+		if (rss_types & ETH_RSS_UDP) {
+			*hash_field &= ~MLX5_UDP_IBV_RX_HASH;
+			if (rss_types & ETH_RSS_L4_DST_ONLY)
+				*hash_field |= IBV_RX_HASH_DST_PORT_UDP;
+			else if (rss_types & ETH_RSS_L4_SRC_ONLY)
+				*hash_field |= IBV_RX_HASH_SRC_PORT_UDP;
+			else
+				*hash_field |= MLX5_UDP_IBV_RX_HASH;
+		}
+		return;
+	case MLX5_RSS_HASH_IPV4_TCP:
+		/* fall-through. */
+	case MLX5_RSS_HASH_IPV6_TCP:
+		if (rss_types & ETH_RSS_TCP) {
+			*hash_field &= ~MLX5_TCP_IBV_RX_HASH;
+			if (rss_types & ETH_RSS_L4_DST_ONLY)
+				*hash_field |= IBV_RX_HASH_DST_PORT_TCP;
+			else if (rss_types & ETH_RSS_L4_SRC_ONLY)
+				*hash_field |= IBV_RX_HASH_SRC_PORT_TCP;
+			else
+				*hash_field |= MLX5_TCP_IBV_RX_HASH;
+		}
+		return;
+	default:
+		return;
+	}
+}
+
 /**
  * Setup shared RSS action.
  * Prepare set of hash RX queue objects sufficient to handle all valid
@@ -11458,6 +11585,7 @@ __flow_dv_action_rss_setup(struct rte_eth_dev *dev,
 		uint64_t hash_fields = mlx5_rss_hash_fields[i];
 		int tunnel = 0;
 
+		__flow_dv_action_rss_l34_hash_adjust(shared_rss, &hash_fields);
 		if (shared_rss->origin.level > 1) {
 			hash_fields |= IBV_RX_HASH_INNER;
 			tunnel = 1;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.349032800 +0800
+++ 0146-net-mlx5-fix-missing-shared-RSS-hash-types.patch	2021-05-10 23:59:26.560000000 +0800
@@ -1 +1 @@
-From 212d17b6a65063f3a6d176c539158847d5aee7d5 Mon Sep 17 00:00:00 2001
+From b52bd28182d1f0de600a322dec7910c4caf44ecb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 212d17b6a65063f3a6d176c539158847d5aee7d5 ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -32 +34 @@
-index 00b6cd97b9..ec673c29ab 100644
+index 76c0208a85..293c60f5b4 100644
@@ -35 +37 @@
-@@ -1106,6 +1106,26 @@ struct rte_flow {
+@@ -1059,6 +1059,26 @@ struct rte_flow {
@@ -63 +65 @@
-index 264dd69a72..533dadf07b 100644
+index 8e64b82e10..94550e5a73 100644
@@ -66 +68 @@
-@@ -11901,21 +11901,45 @@ __flow_dv_action_rss_hrxq_set(struct mlx5_shared_action_rss *action,
+@@ -10681,21 +10681,45 @@ __flow_dv_action_rss_hrxq_set(struct mlx5_shared_action_rss *action,
@@ -112 +114 @@
-@@ -11953,22 +11977,47 @@ __flow_dv_action_rss_hrxq_lookup(struct rte_eth_dev *dev, uint32_t idx,
+@@ -10733,22 +10757,47 @@ __flow_dv_action_rss_hrxq_lookup(struct rte_eth_dev *dev, uint32_t idx,
@@ -160 +162 @@
-@@ -12652,6 +12701,84 @@ __flow_dv_action_rss_hrxqs_release(struct rte_eth_dev *dev,
+@@ -11413,6 +11462,84 @@ __flow_dv_action_rss_hrxqs_release(struct rte_eth_dev *dev,
@@ -245 +247 @@
-@@ -12697,6 +12824,7 @@ __flow_dv_action_rss_setup(struct rte_eth_dev *dev,
+@@ -11458,6 +11585,7 @@ __flow_dv_action_rss_setup(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/mlx5: fix drop action for Direct Rules/Verbs' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (143 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/mlx5: fix missing shared RSS hash types' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/bnxt: fix double free in port start failure' " Xueming Li
                   ` (82 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f30dc57e7857c39d34d1255a589f11ee499b9d17

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f30dc57e7857c39d34d1255a589f11ee499b9d17 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Mon, 5 Apr 2021 09:59:01 +0000
Subject: [PATCH] net/mlx5: fix drop action for Direct Rules/Verbs
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit da845ae9d7c1499cbf76e766604cc981ddd9eb17 ]

There are multiple branches in rdma-core library backing
the rte flows:
  - Verbs
  - Direct Verbs (DV)
  - Direct Rules (DR)

The Verbs API always requires the specifying the queue even
if there is the drop action in the flow, though the kernel
optimizes out the actual queue usage for the flows containing
the drop action. The PMD handles the dedicated Rx queue to
provide Verbs API compatibility.

The DV/DR API does not require explicit specifying the queue
at the flow creation, but PMD still specified the dedicated
drop queue as action. It performed the packet forwarding to
the dummy queue (that was not polled at all) causing the
steering pipeline resources usage and degrading the overall
packet processing rate. For example, with inserted flow to
drop all the ingress packets the statistics reported only
15Mpps of 64B packets were received over 100Gbps line.

Since the Direct Rule API for E-Switch was introduced the
rdma-core supports the dedicated drop action, that is recognized
both for DV and DR and can be used for the entire device in
unified fashion, regardless of steering domain. The similar drop
action was introduced for E-Switch, the usage of this one can be
extended for other steering domains, not for E-Switch's one only.

This patch:
  - renames esw_drop_action to dr_drop_action to emphasize
    the global nature of the variable (not only E-Switch domain)
  - specifies this global drop action instead of dedicated
    drop queue for the DR/DV flows

Fixes: 34fa7c0268e7 ("net/mlx5: add drop action to Direct Verbs E-Switch")
Fixes: 65b3cd0dc39b ("net/mlx5: create global drop action")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 24 +++++++++++++++++-------
 drivers/net/mlx5/mlx5.h          |  2 +-
 drivers/net/mlx5/mlx5_flow_dv.c  | 13 +++++++++++--
 3 files changed, 29 insertions(+), 10 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 91001473b0..fb385460e5 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -319,7 +319,17 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
 			goto error;
 		}
 		sh->fdb_domain = domain;
-		sh->esw_drop_action = mlx5_glue->dr_create_flow_action_drop();
+	}
+	/*
+	 * The drop action is just some dummy placeholder in rdma-core. It
+	 * does not belong to domains and has no any attributes, and, can be
+	 * shared by the entire device.
+	 */
+	sh->dr_drop_action = mlx5_glue->dr_create_flow_action_drop();
+	if (!sh->dr_drop_action) {
+		DRV_LOG(ERR, "FDB mlx5dv_dr_create_flow_action_drop");
+		err = errno;
+		goto error;
 	}
 #endif
 	if (!sh->tunnel_hub)
@@ -355,9 +365,9 @@ error:
 		mlx5_glue->dr_destroy_domain(sh->fdb_domain);
 		sh->fdb_domain = NULL;
 	}
-	if (sh->esw_drop_action) {
-		mlx5_glue->destroy_flow_action(sh->esw_drop_action);
-		sh->esw_drop_action = NULL;
+	if (sh->dr_drop_action) {
+		mlx5_glue->destroy_flow_action(sh->dr_drop_action);
+		sh->dr_drop_action = NULL;
 	}
 	if (sh->pop_vlan_action) {
 		mlx5_glue->destroy_flow_action(sh->pop_vlan_action);
@@ -412,9 +422,9 @@ mlx5_os_free_shared_dr(struct mlx5_priv *priv)
 		mlx5_glue->dr_destroy_domain(sh->fdb_domain);
 		sh->fdb_domain = NULL;
 	}
-	if (sh->esw_drop_action) {
-		mlx5_glue->destroy_flow_action(sh->esw_drop_action);
-		sh->esw_drop_action = NULL;
+	if (sh->dr_drop_action) {
+		mlx5_glue->destroy_flow_action(sh->dr_drop_action);
+		sh->dr_drop_action = NULL;
 	}
 #endif
 	if (sh->pop_vlan_action) {
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 9bf1bf3146..97f8a016b4 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -719,7 +719,7 @@ struct mlx5_dev_ctx_shared {
 	struct mlx5_hlist *flow_tbls;
 	struct mlx5_flow_tunnel_hub *tunnel_hub;
 	/* Direct Rules tables for FDB, NIC TX+RX */
-	void *esw_drop_action; /* Pointer to DR E-Switch drop action. */
+	void *dr_drop_action; /* Pointer to DR drop action, any domain. */
 	void *pop_vlan_action; /* Pointer to DR pop VLAN action. */
 	struct mlx5_hlist *encaps_decaps; /* Encap/decap action hash list. */
 	struct mlx5_hlist *modify_cmds;
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 94550e5a73..b1c8a95e8a 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -10839,11 +10839,19 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
 		n = dv->actions_n;
 		if (dh->fate_action == MLX5_FLOW_FATE_DROP) {
 			if (dv->transfer) {
-				dv->actions[n++] = priv->sh->esw_drop_action;
+				MLX5_ASSERT(priv->sh->dr_drop_action);
+				dv->actions[n++] = priv->sh->dr_drop_action;
 			} else {
+#ifdef HAVE_MLX5DV_DR
+				/* DR supports drop action placeholder. */
+				MLX5_ASSERT(priv->sh->dr_drop_action);
+				dv->actions[n++] = priv->sh->dr_drop_action;
+#else
+				/* For DV we use the explicit drop queue. */
 				MLX5_ASSERT(priv->drop_queue.hrxq);
 				dv->actions[n++] =
 						priv->drop_queue.hrxq->action;
+#endif
 			}
 		} else if ((dh->fate_action == MLX5_FLOW_FATE_QUEUE &&
 			   !dv_h->rix_sample && !dv_h->rix_dest_array)) {
@@ -12610,7 +12618,8 @@ mlx5_flow_dv_discover_counter_offset_support(struct rte_eth_dev *dev)
 						    &actions[0]);
 	if (ret)
 		goto err;
-	actions[1] = priv->drop_queue.hrxq->action;
+	actions[1] = sh->dr_drop_action ? sh->dr_drop_action :
+					  priv->drop_queue.hrxq->action;
 	dv_attr.match_criteria_enable = flow_dv_matcher_enable(mask.buf);
 	ret = mlx5_flow_os_create_flow_matcher(sh->ctx, &dv_attr, tbl->obj,
 					       &matcher);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.377593400 +0800
+++ 0147-net-mlx5-fix-drop-action-for-Direct-Rules-Verbs.patch	2021-05-10 23:59:26.570000000 +0800
@@ -1 +1 @@
-From da845ae9d7c1499cbf76e766604cc981ddd9eb17 Mon Sep 17 00:00:00 2001
+From f30dc57e7857c39d34d1255a589f11ee499b9d17 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit da845ae9d7c1499cbf76e766604cc981ddd9eb17 ]
@@ -42 +44,0 @@
-Cc: stable@dpdk.org
@@ -53 +55 @@
-index 2d5bcab4cf..6ac334263e 100644
+index 91001473b0..fb385460e5 100644
@@ -56 +58 @@
-@@ -325,7 +325,17 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
+@@ -319,7 +319,17 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv)
@@ -75 +77 @@
-@@ -361,9 +371,9 @@ error:
+@@ -355,9 +365,9 @@ error:
@@ -88 +90 @@
-@@ -418,9 +428,9 @@ mlx5_os_free_shared_dr(struct mlx5_priv *priv)
+@@ -412,9 +422,9 @@ mlx5_os_free_shared_dr(struct mlx5_priv *priv)
@@ -102 +104 @@
-index 6faba4fbb1..0f69f9d125 100644
+index 9bf1bf3146..97f8a016b4 100644
@@ -105 +107 @@
-@@ -729,7 +729,7 @@ struct mlx5_dev_ctx_shared {
+@@ -719,7 +719,7 @@ struct mlx5_dev_ctx_shared {
@@ -115 +117 @@
-index 533dadf07b..691595942f 100644
+index 94550e5a73..b1c8a95e8a 100644
@@ -118 +120 @@
-@@ -12059,11 +12059,19 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
+@@ -10839,11 +10839,19 @@ flow_dv_apply(struct rte_eth_dev *dev, struct rte_flow *flow,
@@ -139 +141 @@
-@@ -13849,7 +13857,8 @@ mlx5_flow_dv_discover_counter_offset_support(struct rte_eth_dev *dev)
+@@ -12610,7 +12618,8 @@ mlx5_flow_dv_discover_counter_offset_support(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/bnxt: fix double free in port start failure' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (144 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/mlx5: fix drop action for Direct Rules/Verbs' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/bnxt: fix configuring LRO' " Xueming Li
                   ` (81 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Luca Boccassi, Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/bc53c25124f8af291c79cb315c95fad9202b8963

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bc53c25124f8af291c79cb315c95fad9202b8963 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 1 Apr 2021 08:23:34 +0530
Subject: [PATCH] net/bnxt: fix double free in port start failure
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 39a03b401e4a72a118bae60c5834be2b6913098e ]

During port start when bnxt_start_nic() fails, it tries to free
"intr_handle->intr_vec" but the variable is not set to NULL after that.
If port start fails, driver invokes bnxt_dev_stop() which will lead
to a double free of "intr_handle->intr_vec".

Fix it by removing the call to free "intr_handle->intr_vec" in the
bnxt_start_nic() failure path as it is anyway doing in bnxt_dev_stop().

Fixes: 9d276b439aaf ("net/bnxt: fix error handling in device start")

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 | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 85c711b71f..e5fe1a687c 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -797,7 +797,7 @@ skip_cosq_cfg:
 			PMD_DRV_LOG(ERR, "Failed to allocate %d rx_queues"
 				" intr_vec", bp->eth_dev->data->nb_rx_queues);
 			rc = -ENOMEM;
-			goto err_disable;
+			goto err_out;
 		}
 		PMD_DRV_LOG(DEBUG, "intr_handle->intr_vec = %p "
 			"intr_handle->nb_efd = %d intr_handle->max_intr = %d\n",
@@ -817,12 +817,12 @@ skip_cosq_cfg:
 #ifndef RTE_EXEC_ENV_FREEBSD
 	/* In FreeBSD OS, nic_uio driver does not support interrupts */
 	if (rc)
-		goto err_free;
+		goto err_out;
 #endif
 
 	rc = bnxt_update_phy_setting(bp);
 	if (rc)
-		goto err_free;
+		goto err_out;
 
 	bp->mark_table = rte_zmalloc("bnxt_mark_table", BNXT_MARK_TABLE_SZ, 0);
 	if (!bp->mark_table)
@@ -830,10 +830,6 @@ skip_cosq_cfg:
 
 	return 0;
 
-err_free:
-	rte_free(intr_handle->intr_vec);
-err_disable:
-	rte_intr_efd_disable(intr_handle);
 err_out:
 	/* Some of the error status returned by FW may not be from errno.h */
 	if (rc > 0)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.408784000 +0800
+++ 0148-net-bnxt-fix-double-free-in-port-start-failure.patch	2021-05-10 23:59:26.570000000 +0800
@@ -1 +1 @@
-From 39a03b401e4a72a118bae60c5834be2b6913098e Mon Sep 17 00:00:00 2001
+From bc53c25124f8af291c79cb315c95fad9202b8963 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 39a03b401e4a72a118bae60c5834be2b6913098e ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index d346f96d7a..02fe00036b 100644
+index 85c711b71f..e5fe1a687c 100644
@@ -28 +30 @@
-@@ -793,7 +793,7 @@ skip_cosq_cfg:
+@@ -797,7 +797,7 @@ skip_cosq_cfg:
@@ -37 +39 @@
-@@ -813,12 +813,12 @@ skip_cosq_cfg:
+@@ -817,12 +817,12 @@ skip_cosq_cfg:
@@ -52 +54 @@
-@@ -826,10 +826,6 @@ skip_cosq_cfg:
+@@ -830,10 +830,6 @@ skip_cosq_cfg:

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

* [dpdk-stable] patch 'net/bnxt: fix configuring LRO' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (145 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/bnxt: fix double free in port start failure' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'vhost: fix initialization of temporary header' " Xueming Li
                   ` (80 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Luca Boccassi, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d43a7f6be8e601e4bbd70c88e01a7c447398e192

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d43a7f6be8e601e4bbd70c88e01a7c447398e192 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Fri, 2 Apr 2021 08:55:51 +0530
Subject: [PATCH] net/bnxt: fix configuring LRO
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit e73fb98b69dffacb2c74e45807096ec597b88cae ]

While configuring LRO, driver should check the return value
of bnxt_hwrm_vnic_tpa_cfg() HWRM command and return error
when the FW command fails.

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

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

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index e5fe1a687c..4a3b429dcf 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -489,10 +489,11 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
 
 	bnxt_hwrm_vnic_plcmode_cfg(bp, vnic);
 
-	if (rx_offloads & DEV_RX_OFFLOAD_TCP_LRO)
-		bnxt_hwrm_vnic_tpa_cfg(bp, vnic, 1);
-	else
-		bnxt_hwrm_vnic_tpa_cfg(bp, vnic, 0);
+	rc = bnxt_hwrm_vnic_tpa_cfg(bp, vnic,
+				    (rx_offloads & DEV_RX_OFFLOAD_TCP_LRO) ?
+				    true : false);
+	if (rc)
+		goto err_out;
 
 	return 0;
 err_out:
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.434595300 +0800
+++ 0149-net-bnxt-fix-configuring-LRO.patch	2021-05-10 23:59:26.570000000 +0800
@@ -1 +1 @@
-From e73fb98b69dffacb2c74e45807096ec597b88cae Mon Sep 17 00:00:00 2001
+From d43a7f6be8e601e4bbd70c88e01a7c447398e192 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit e73fb98b69dffacb2c74e45807096ec597b88cae ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 02fe00036b..20ca57eae5 100644
+index e5fe1a687c..4a3b429dcf 100644
@@ -23 +25 @@
-@@ -479,10 +479,11 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
+@@ -489,10 +489,11 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)

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

* [dpdk-stable] patch 'vhost: fix initialization of temporary header' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (146 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/bnxt: fix configuring LRO' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'vhost: fix initialization of async " Xueming Li
                   ` (79 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Marvin Liu; +Cc: Luca Boccassi, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/de93dc0502072017149f5c91c8a6e71e88a729e0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From de93dc0502072017149f5c91c8a6e71e88a729e0 Mon Sep 17 00:00:00 2001
From: Marvin Liu <yong.liu@intel.com>
Date: Wed, 7 Apr 2021 11:25:15 +0800
Subject: [PATCH] vhost: fix initialization of temporary header
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 5b784a2d80abddd5d554b1eef534e8047b1d2e5a ]

This patch fixs coverity issue by adding initialization step before
using temporary virtio header.

Coverity issue: 366181
Fixes: fb3815cc614d ("vhost: handle virtually non-contiguous buffers in Rx-mrg")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/virtio_net.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index bd92f45886..4b7c437764 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -835,9 +835,10 @@ copy_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq,
 
 	hdr_mbuf = m;
 	hdr_addr = buf_addr;
-	if (unlikely(buf_len < dev->vhost_hlen))
+	if (unlikely(buf_len < dev->vhost_hlen)) {
+		memset(&tmp_hdr, 0, sizeof(struct virtio_net_hdr_mrg_rxbuf));
 		hdr = &tmp_hdr;
-	else
+	} else
 		hdr = (struct virtio_net_hdr_mrg_rxbuf *)(uintptr_t)hdr_addr;
 
 	VHOST_LOG_DATA(DEBUG, "(%d) RX: num merge buffers %d\n",
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.458963200 +0800
+++ 0150-vhost-fix-initialization-of-temporary-header.patch	2021-05-10 23:59:26.570000000 +0800
@@ -1 +1 @@
-From 5b784a2d80abddd5d554b1eef534e8047b1d2e5a Mon Sep 17 00:00:00 2001
+From de93dc0502072017149f5c91c8a6e71e88a729e0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 5b784a2d80abddd5d554b1eef534e8047b1d2e5a ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 7f621fb6dd..48b013a9b4 100644
+index bd92f45886..4b7c437764 100644
@@ -23 +25 @@
-@@ -812,9 +812,10 @@ copy_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -835,9 +835,10 @@ copy_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq,

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

* [dpdk-stable] patch 'vhost: fix initialization of async temporary header' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (147 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'vhost: fix initialization of temporary header' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'ethdev: validate input in module EEPROM dump' " Xueming Li
                   ` (78 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Marvin Liu; +Cc: Luca Boccassi, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ec4d4d10f36fde449a9826d4a9d3bff33e1bbc5f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ec4d4d10f36fde449a9826d4a9d3bff33e1bbc5f Mon Sep 17 00:00:00 2001
From: Marvin Liu <yong.liu@intel.com>
Date: Wed, 7 Apr 2021 11:25:16 +0800
Subject: [PATCH] vhost: fix initialization of async temporary header
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 98da5545be5180843e61a4dacdc0612b3ae64da4 ]

This patch fixes coverity issue in async enqueue function by adding
initialization step before using temporary virtio header.

Coverity issue: 366123
Fixes: cd6760da1076 ("vhost: introduce async enqueue for split ring")

Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 lib/librte_vhost/virtio_net.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 4b7c437764..f2392e77eb 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -1009,9 +1009,10 @@ async_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq,
 
 	hdr_mbuf = m;
 	hdr_addr = buf_addr;
-	if (unlikely(buf_len < dev->vhost_hlen))
+	if (unlikely(buf_len < dev->vhost_hlen)) {
+		memset(&tmp_hdr, 0, sizeof(struct virtio_net_hdr_mrg_rxbuf));
 		hdr = &tmp_hdr;
-	else
+	} else
 		hdr = (struct virtio_net_hdr_mrg_rxbuf *)(uintptr_t)hdr_addr;
 
 	VHOST_LOG_DATA(DEBUG, "(%d) RX: num merge buffers %d\n",
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.482388000 +0800
+++ 0151-vhost-fix-initialization-of-async-temporary-header.patch	2021-05-10 23:59:26.570000000 +0800
@@ -1 +1 @@
-From 98da5545be5180843e61a4dacdc0612b3ae64da4 Mon Sep 17 00:00:00 2001
+From ec4d4d10f36fde449a9826d4a9d3bff33e1bbc5f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 98da5545be5180843e61a4dacdc0612b3ae64da4 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 48b013a9b4..ff39878609 100644
+index 4b7c437764..f2392e77eb 100644
@@ -23 +25 @@
-@@ -986,9 +986,10 @@ async_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -1009,9 +1009,10 @@ async_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq,

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

* [dpdk-stable] patch 'ethdev: validate input in module EEPROM dump' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (148 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'vhost: fix initialization of async " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'ethdev: validate input in register info' " Xueming Li
                   ` (77 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2e6638d89797271f386dacc49d50349b81fc96cd

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2e6638d89797271f386dacc49d50349b81fc96cd Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Fri, 2 Apr 2021 10:58:48 +0800
Subject: [PATCH] ethdev: validate input in module EEPROM dump
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit e2bd08d569d9821131d8e245446d24eaed145f21 ]

The validity verification of input parameters should be performed at
API layer, not in the PMD.

Fixes: 3a18c44b45df ("ethdev: add access to EEPROM")
Fixes: 40ff8b305ab8 ("net/e1000: add module EEPROM callbacks for e1000")
Fixes: f2088e785cca ("net/i40e: fix dereference before check when getting EEPROM")
Fixes: b74d0cd43e37 ("net/ixgbe: add module EEPROM callbacks for ixgbe")
Fixes: 8a6a09f853a0 ("net/mlx5: support reading module EEPROM data")
Fixes: 58f6f93c34c1 ("net/octeontx2: add module EEPROM dump")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/e1000/igb_ethdev.c          | 3 ---
 drivers/net/i40e/i40e_ethdev.c          | 3 ---
 drivers/net/ixgbe/ixgbe_ethdev.c        | 3 ---
 drivers/net/mlx5/linux/mlx5_ethdev_os.c | 4 ++--
 drivers/net/octeontx2/otx2_ethdev_ops.c | 3 +--
 lib/librte_ethdev/rte_ethdev.c          | 4 ++++
 lib/librte_ethdev/rte_ethdev.h          | 2 ++
 7 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 7857be10cb..f3c76bac9b 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -5135,9 +5135,6 @@ eth_igb_get_module_eeprom(struct rte_eth_dev *dev,
 	u16 first_word, last_word;
 	int i = 0;
 
-	if (info->length == 0)
-		return -EINVAL;
-
 	first_word = info->offset >> 1;
 	last_word = (info->offset + info->length - 1) >> 1;
 
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 572bd96471..104f121436 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -11765,9 +11765,6 @@ static int i40e_get_module_eeprom(struct rte_eth_dev *dev,
 	uint32_t value = 0;
 	uint32_t i;
 
-	if (!info || !info->length || !info->data)
-		return -EINVAL;
-
 	if (hw->phy.link_info.module_type[0] == I40E_MODULE_TYPE_SFP)
 		is_sfp = true;
 
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 6195c7f025..d1d7b312b1 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -7340,9 +7340,6 @@ ixgbe_get_module_eeprom(struct rte_eth_dev *dev,
 	uint8_t *data = info->data;
 	uint32_t i = 0;
 
-	if (info->length == 0)
-		return -EINVAL;
-
 	for (i = info->offset; i < info->offset + info->length; i++) {
 		if (i < RTE_ETH_MODULE_SFF_8079_LEN)
 			status = hw->phy.ops.read_i2c_eeprom(hw, i, &databyte);
diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index e36a78091c..f641cb936e 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -1169,7 +1169,7 @@ mlx5_get_module_info(struct rte_eth_dev *dev,
 	};
 	int ret = 0;
 
-	if (!dev || !modinfo) {
+	if (!dev) {
 		DRV_LOG(WARNING, "missing argument, cannot get module info");
 		rte_errno = EINVAL;
 		return -rte_errno;
@@ -1203,7 +1203,7 @@ int mlx5_get_module_eeprom(struct rte_eth_dev *dev,
 	struct ifreq ifr;
 	int ret = 0;
 
-	if (!dev || !info) {
+	if (!dev) {
 		DRV_LOG(WARNING, "missing argument, cannot get module eeprom");
 		rte_errno = EINVAL;
 		return -rte_errno;
diff --git a/drivers/net/octeontx2/otx2_ethdev_ops.c b/drivers/net/octeontx2/otx2_ethdev_ops.c
index 963cc285ed..919754130c 100644
--- a/drivers/net/octeontx2/otx2_ethdev_ops.c
+++ b/drivers/net/octeontx2/otx2_ethdev_ops.c
@@ -533,8 +533,7 @@ otx2_nix_get_module_eeprom(struct rte_eth_dev *eth_dev,
 	struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
 	struct cgx_fw_data *rsp;
 
-	if (!info->data || !info->length ||
-	    (info->offset + info->length > SFP_EEPROM_SIZE))
+	if (info->offset + info->length > SFP_EEPROM_SIZE)
 		return -EINVAL;
 
 	rsp = nix_get_fwdata(dev);
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index ecd46ac01f..8e34c874ac 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -5307,6 +5307,8 @@ rte_eth_dev_get_module_info(uint16_t port_id,
 	struct rte_eth_dev *dev;
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
+	if (modinfo == NULL)
+		return -EINVAL;
 
 	dev = &rte_eth_devices[port_id];
 	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->get_module_info, -ENOTSUP);
@@ -5320,6 +5322,8 @@ rte_eth_dev_get_module_eeprom(uint16_t port_id,
 	struct rte_eth_dev *dev;
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
+	if (info == NULL || info->data == NULL || info->length == 0)
+		return -EINVAL;
 
 	dev = &rte_eth_devices[port_id];
 	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->get_module_eeprom, -ENOTSUP);
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index f5f8919186..760214efb8 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -4414,6 +4414,7 @@ int rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
  * @return
  *   - (0) if successful.
  *   - (-ENOTSUP) if hardware doesn't support.
+ *   - (-EINVAL) if bad parameter.
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EIO) if device is removed.
  *   - others depends on the specific operations implementation.
@@ -4438,6 +4439,7 @@ rte_eth_dev_get_module_info(uint16_t port_id,
  *   - (0) if successful.
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-ENODEV) if *port_id* invalid.
+ *   - (-EINVAL) if bad parameter.
  *   - (-EIO) if device is removed.
  *   - others depends on the specific operations implementation.
  */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.506929700 +0800
+++ 0152-ethdev-validate-input-in-module-EEPROM-dump.patch	2021-05-10 23:59:26.590000000 +0800
@@ -1 +1 @@
-From e2bd08d569d9821131d8e245446d24eaed145f21 Mon Sep 17 00:00:00 2001
+From 2e6638d89797271f386dacc49d50349b81fc96cd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit e2bd08d569d9821131d8e245446d24eaed145f21 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -31 +33 @@
-index 25218da240..7d6d04abcb 100644
+index 7857be10cb..f3c76bac9b 100644
@@ -34 +36 @@
-@@ -5118,9 +5118,6 @@ eth_igb_get_module_eeprom(struct rte_eth_dev *dev,
+@@ -5135,9 +5135,6 @@ eth_igb_get_module_eeprom(struct rte_eth_dev *dev,
@@ -45 +47 @@
-index 2076717324..c03e4a0a4b 100644
+index 572bd96471..104f121436 100644
@@ -48 +50 @@
-@@ -11659,9 +11659,6 @@ static int i40e_get_module_eeprom(struct rte_eth_dev *dev,
+@@ -11765,9 +11765,6 @@ static int i40e_get_module_eeprom(struct rte_eth_dev *dev,
@@ -59 +61 @@
-index 2d308be48a..4ee709b17f 100644
+index 6195c7f025..d1d7b312b1 100644
@@ -62 +64 @@
-@@ -7330,9 +7330,6 @@ ixgbe_get_module_eeprom(struct rte_eth_dev *dev,
+@@ -7340,9 +7340,6 @@ ixgbe_get_module_eeprom(struct rte_eth_dev *dev,
@@ -73 +75 @@
-index 4365c55b81..ddc1371aa9 100644
+index e36a78091c..f641cb936e 100644
@@ -76 +78 @@
-@@ -1193,7 +1193,7 @@ mlx5_get_module_info(struct rte_eth_dev *dev,
+@@ -1169,7 +1169,7 @@ mlx5_get_module_info(struct rte_eth_dev *dev,
@@ -85 +87 @@
-@@ -1227,7 +1227,7 @@ int mlx5_get_module_eeprom(struct rte_eth_dev *dev,
+@@ -1203,7 +1203,7 @@ int mlx5_get_module_eeprom(struct rte_eth_dev *dev,
@@ -95 +97 @@
-index 9e3f80937d..6f0cdc5854 100644
+index 963cc285ed..919754130c 100644
@@ -98 +100 @@
-@@ -520,8 +520,7 @@ otx2_nix_get_module_eeprom(struct rte_eth_dev *eth_dev,
+@@ -533,8 +533,7 @@ otx2_nix_get_module_eeprom(struct rte_eth_dev *eth_dev,
@@ -109 +111 @@
-index 3059aa55b3..bb195abe70 100644
+index ecd46ac01f..8e34c874ac 100644
@@ -112 +114 @@
-@@ -5335,6 +5335,8 @@ rte_eth_dev_get_module_info(uint16_t port_id,
+@@ -5307,6 +5307,8 @@ rte_eth_dev_get_module_info(uint16_t port_id,
@@ -121 +123 @@
-@@ -5348,6 +5350,8 @@ rte_eth_dev_get_module_eeprom(uint16_t port_id,
+@@ -5320,6 +5322,8 @@ rte_eth_dev_get_module_eeprom(uint16_t port_id,
@@ -131 +133 @@
-index 6c7c72890f..f5bbc10b68 100644
+index f5f8919186..760214efb8 100644
@@ -134 +136,2 @@
-@@ -4471,6 +4471,7 @@ int rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
+@@ -4414,6 +4414,7 @@ int rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
+  * @return
@@ -137 +139,0 @@
-  *   - (-ENODEV) if *port_id* invalid.
@@ -138,0 +141 @@
+  *   - (-ENODEV) if *port_id* invalid.
@@ -141,3 +144 @@
-  */
-@@ -4493,6 +4494,7 @@ rte_eth_dev_get_module_info(uint16_t port_id,
-  * @return
+@@ -4438,6 +4439,7 @@ rte_eth_dev_get_module_info(uint16_t port_id,
@@ -146 +146,0 @@
-+ *   - (-EINVAL) if bad parameter.
@@ -147,0 +148 @@
++ *   - (-EINVAL) if bad parameter.
@@ -149,0 +151 @@
+  */

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

* [dpdk-stable] patch 'ethdev: validate input in register info' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (149 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'ethdev: validate input in module EEPROM dump' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'ethdev: validate input in EEPROM " Xueming Li
                   ` (76 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/963fcacd9561f8f666878d7128228c3822b0ea9a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 963fcacd9561f8f666878d7128228c3822b0ea9a Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Fri, 2 Apr 2021 10:58:49 +0800
Subject: [PATCH] ethdev: validate input in register info
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 94af45f4005ee0c3152db45a3669bec5238a3c10 ]

This patch adds validity check of input pointer in regs dump API.

Fixes: 7a3f27cbf59b ("ethdev: add access to specific device info")
Fixes: 936eda25e8da ("net/hns3: support dump register")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/hns3/hns3_regs.c   | 5 -----
 lib/librte_ethdev/rte_ethdev.c | 2 ++
 lib/librte_ethdev/rte_ethdev.h | 1 +
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index 3d2e66a594..d725f14001 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -322,11 +322,6 @@ hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)
 	uint32_t *data;
 	int ret;
 
-	if (regs == NULL) {
-		hns3_err(hw, "the input parameter regs is NULL!");
-		return -EINVAL;
-	}
-
 	ret = hns3_get_regs_length(hw, &length);
 	if (ret)
 		return ret;
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 8e34c874ac..3e3a5bd8cf 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -5258,6 +5258,8 @@ rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info)
 	struct rte_eth_dev *dev;
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
+	if (info == NULL)
+		return -EINVAL;
 
 	dev = &rte_eth_devices[port_id];
 	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->get_reg, -ENOTSUP);
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 760214efb8..1cd1ef9d54 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -4395,6 +4395,7 @@ int rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
  * @return
  *   - (0) if successful.
  *   - (-ENOTSUP) if hardware doesn't support.
+ *   - (-EINVAL) if bad parameter.
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EIO) if device is removed.
  *   - others depends on the specific operations implementation.
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.546710300 +0800
+++ 0153-ethdev-validate-input-in-register-info.patch	2021-05-10 23:59:26.590000000 +0800
@@ -1 +1 @@
-From 94af45f4005ee0c3152db45a3669bec5238a3c10 Mon Sep 17 00:00:00 2001
+From 963fcacd9561f8f666878d7128228c3822b0ea9a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 94af45f4005ee0c3152db45a3669bec5238a3c10 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index d53c132b1e..5d15613c67 100644
+index 3d2e66a594..d725f14001 100644
@@ -25 +27 @@
-@@ -484,11 +484,6 @@ hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)
+@@ -322,11 +322,6 @@ hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)
@@ -38 +40 @@
-index bb195abe70..3fe200d508 100644
+index 8e34c874ac..3e3a5bd8cf 100644
@@ -41 +43 @@
-@@ -5286,6 +5286,8 @@ rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info)
+@@ -5258,6 +5258,8 @@ rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info)
@@ -51 +53 @@
-index f5bbc10b68..1ad7cda27d 100644
+index 760214efb8..1cd1ef9d54 100644
@@ -54 +56 @@
-@@ -4403,6 +4403,7 @@ int rte_eth_get_monitor_addr(uint16_t port_id, uint16_t queue_id,
+@@ -4395,6 +4395,7 @@ int rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);

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

* [dpdk-stable] patch 'ethdev: validate input in EEPROM info' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (150 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'ethdev: validate input in register info' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: fix copyright date' " Xueming Li
                   ` (75 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a096b11ef5d59f17380a8b97a4d6cfe92d114356

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a096b11ef5d59f17380a8b97a4d6cfe92d114356 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Fri, 2 Apr 2021 10:58:50 +0800
Subject: [PATCH] ethdev: validate input in EEPROM info
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 18239da4ac2155582d91d4ccb8ed8b2193193534 ]

This patch adds validity check of input pointer in EEPROM dump API.

Fixes: 7a3f27cbf59b ("ethdev: add access to specific device info")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_ethdev/rte_ethdev.c | 4 ++++
 lib/librte_ethdev/rte_ethdev.h | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 3e3a5bd8cf..8a3c999010 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -5284,6 +5284,8 @@ rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
 	struct rte_eth_dev *dev;
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
+	if (info == NULL)
+		return -EINVAL;
 
 	dev = &rte_eth_devices[port_id];
 	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->get_eeprom, -ENOTSUP);
@@ -5296,6 +5298,8 @@ rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
 	struct rte_eth_dev *dev;
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
+	if (info == NULL)
+		return -EINVAL;
 
 	dev = &rte_eth_devices[port_id];
 	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->set_eeprom, -ENOTSUP);
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 1cd1ef9d54..3ec7e9a6b3 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -4348,6 +4348,7 @@ int rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_t queue_id,
  *   - (0) if successful.
  *   - (-ENOTSUP) if hardware doesn't support.
  *   - (-ENODEV) if *port_id* invalid.
+ *   - (-EINVAL) if bad parameter.
  *   - (-EIO) if device is removed.
  *   - others depends on the specific operations implementation.
  */
@@ -4378,6 +4379,7 @@ int rte_eth_dev_get_eeprom_length(uint16_t port_id);
  * @return
  *   - (0) if successful.
  *   - (-ENOTSUP) if hardware doesn't support.
+ *   - (-EINVAL) if bad parameter.
  *   - (-ENODEV) if *port_id* invalid.
  *   - (-EIO) if device is removed.
  *   - others depends on the specific operations implementation.
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.573855000 +0800
+++ 0154-ethdev-validate-input-in-EEPROM-info.patch	2021-05-10 23:59:26.590000000 +0800
@@ -1 +1 @@
-From 18239da4ac2155582d91d4ccb8ed8b2193193534 Mon Sep 17 00:00:00 2001
+From a096b11ef5d59f17380a8b97a4d6cfe92d114356 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 18239da4ac2155582d91d4ccb8ed8b2193193534 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 3fe200d508..6b5cfd696d 100644
+index 3e3a5bd8cf..8a3c999010 100644
@@ -23 +25 @@
-@@ -5312,6 +5312,8 @@ rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
+@@ -5284,6 +5284,8 @@ rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
@@ -32 +34 @@
-@@ -5324,6 +5326,8 @@ rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
+@@ -5296,6 +5298,8 @@ rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
@@ -42 +44 @@
-index 1ad7cda27d..3b773b6dd0 100644
+index 1cd1ef9d54..3ec7e9a6b3 100644
@@ -45,2 +47 @@
-@@ -4435,6 +4435,7 @@ int rte_eth_dev_get_eeprom_length(uint16_t port_id);
-  * @return
+@@ -4348,6 +4348,7 @@ int rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_t queue_id,
@@ -49 +49,0 @@
-+ *   - (-EINVAL) if bad parameter.
@@ -50,0 +51 @@
++ *   - (-EINVAL) if bad parameter.
@@ -53 +54,3 @@
-@@ -4453,6 +4454,7 @@ int rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
+  */
+@@ -4378,6 +4379,7 @@ int rte_eth_dev_get_eeprom_length(uint16_t port_id);
+  * @return
@@ -56 +58,0 @@
-  *   - (-ENODEV) if *port_id* invalid.
@@ -57,0 +60 @@
+  *   - (-ENODEV) if *port_id* invalid.
@@ -60 +62,0 @@
-  */

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

* [dpdk-stable] patch 'net/hns3: fix copyright date' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (151 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'ethdev: validate input in EEPROM " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: fix FLR miss detection' " Xueming Li
                   ` (74 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/539f3b7802018aa9b1538fc05b53a627f8c08dac

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 539f3b7802018aa9b1538fc05b53a627f8c08dac Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Wed, 7 Apr 2021 17:19:13 +0800
Subject: [PATCH] net/hns3: fix copyright date
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 53e6f86cf550a75fb1d55a76f411e214e783d14d ]

This patch updates copyright date for hns3 PMD files.

Fixes: 565829db8b8f ("net/hns3: add build and doc infrastructure")
Fixes: 952ebacce4f2 ("net/hns3: support SVE Rx")
Fixes: e31f123db06b ("net/hns3: support NEON Tx")
Fixes: c09c7847d892 ("net/hns3: support traffic management")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_cmd.c           | 2 +-
 drivers/net/hns3/hns3_cmd.h           | 2 +-
 drivers/net/hns3/hns3_dcb.c           | 2 +-
 drivers/net/hns3/hns3_dcb.h           | 2 +-
 drivers/net/hns3/hns3_ethdev.c        | 2 +-
 drivers/net/hns3/hns3_ethdev.h        | 2 +-
 drivers/net/hns3/hns3_ethdev_vf.c     | 2 +-
 drivers/net/hns3/hns3_fdir.c          | 2 +-
 drivers/net/hns3/hns3_fdir.h          | 2 +-
 drivers/net/hns3/hns3_flow.c          | 2 +-
 drivers/net/hns3/hns3_intr.c          | 2 +-
 drivers/net/hns3/hns3_intr.h          | 2 +-
 drivers/net/hns3/hns3_logs.h          | 2 +-
 drivers/net/hns3/hns3_mbx.c           | 2 +-
 drivers/net/hns3/hns3_mbx.h           | 2 +-
 drivers/net/hns3/hns3_mp.c            | 2 +-
 drivers/net/hns3/hns3_mp.h            | 2 +-
 drivers/net/hns3/hns3_regs.c          | 2 +-
 drivers/net/hns3/hns3_regs.h          | 2 +-
 drivers/net/hns3/hns3_rss.c           | 2 +-
 drivers/net/hns3/hns3_rss.h           | 2 +-
 drivers/net/hns3/hns3_rxtx.c          | 2 +-
 drivers/net/hns3/hns3_rxtx.h          | 2 +-
 drivers/net/hns3/hns3_rxtx_vec.c      | 2 +-
 drivers/net/hns3/hns3_rxtx_vec.h      | 2 +-
 drivers/net/hns3/hns3_rxtx_vec_neon.h | 2 +-
 drivers/net/hns3/hns3_rxtx_vec_sve.c  | 2 +-
 drivers/net/hns3/hns3_stats.c         | 2 +-
 drivers/net/hns3/hns3_stats.h         | 2 +-
 drivers/net/hns3/meson.build          | 2 +-
 30 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c
index 3741adc828..5f6bdbd42f 100644
--- a/drivers/net/hns3/hns3_cmd.c
+++ b/drivers/net/hns3/hns3_cmd.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #include <rte_ethdev_pci.h>
diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h
index c254f2d0bf..c6fc6c401a 100644
--- a/drivers/net/hns3/hns3_cmd.h
+++ b/drivers/net/hns3/hns3_cmd.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #ifndef _HNS3_CMD_H_
diff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c
index af084bd9f4..f7ad2a5e4c 100644
--- a/drivers/net/hns3/hns3_dcb.c
+++ b/drivers/net/hns3/hns3_dcb.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #include <rte_io.h>
diff --git a/drivers/net/hns3/hns3_dcb.h b/drivers/net/hns3/hns3_dcb.h
index 811e5304cf..49e5ba70a5 100644
--- a/drivers/net/hns3/hns3_dcb.h
+++ b/drivers/net/hns3/hns3_dcb.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #ifndef _HNS3_DCB_H_
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 35ac92b7d1..6acee8d46d 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #include <rte_alarm.h>
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 5b17a74bb2..d61198bb87 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #ifndef _HNS3_ETHDEV_H_
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index ed0f716f71..b608f370d4 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #include <linux/pci_regs.h>
diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
index 118aa88264..c4a0983e74 100644
--- a/drivers/net/hns3/hns3_fdir.c
+++ b/drivers/net/hns3/hns3_fdir.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #include <rte_ethdev_driver.h>
diff --git a/drivers/net/hns3/hns3_fdir.h b/drivers/net/hns3/hns3_fdir.h
index b77745f221..266d37cc6c 100644
--- a/drivers/net/hns3/hns3_fdir.h
+++ b/drivers/net/hns3/hns3_fdir.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #ifndef _HNS3_FDIR_H_
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 25b16b3277..af0aa72482 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #include <rte_flow_driver.h>
diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c
index bebfe131cc..dce9f36e6d 100644
--- a/drivers/net/hns3/hns3_intr.c
+++ b/drivers/net/hns3/hns3_intr.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #include <rte_alarm.h>
diff --git a/drivers/net/hns3/hns3_intr.h b/drivers/net/hns3/hns3_intr.h
index 593d55720b..d87d3ce1d7 100644
--- a/drivers/net/hns3/hns3_intr.h
+++ b/drivers/net/hns3/hns3_intr.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #ifndef _HNS3_INTR_H_
diff --git a/drivers/net/hns3/hns3_logs.h b/drivers/net/hns3/hns3_logs.h
index aa135db982..072a53bd69 100644
--- a/drivers/net/hns3/hns3_logs.h
+++ b/drivers/net/hns3/hns3_logs.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #ifndef _HNS3_LOGS_H_
diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
index 7f47c55f29..82b634c365 100644
--- a/drivers/net/hns3/hns3_mbx.c
+++ b/drivers/net/hns3/hns3_mbx.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #include <rte_ethdev_driver.h>
diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h
index 7f5fdd24f4..5714eb1f78 100644
--- a/drivers/net/hns3/hns3_mbx.h
+++ b/drivers/net/hns3/hns3_mbx.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #ifndef _HNS3_MBX_H_
diff --git a/drivers/net/hns3/hns3_mp.c b/drivers/net/hns3/hns3_mp.c
index b2916fd788..568ddc2a3c 100644
--- a/drivers/net/hns3/hns3_mp.c
+++ b/drivers/net/hns3/hns3_mp.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #include <rte_eal.h>
diff --git a/drivers/net/hns3/hns3_mp.h b/drivers/net/hns3/hns3_mp.h
index 60ef2315db..1a73598dc4 100644
--- a/drivers/net/hns3/hns3_mp.h
+++ b/drivers/net/hns3/hns3_mp.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #ifndef _HNS3_MP_H_
diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index d725f14001..4a3fb34814 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #include <rte_ethdev_pci.h>
diff --git a/drivers/net/hns3/hns3_regs.h b/drivers/net/hns3/hns3_regs.h
index 6522e1ce0e..cfdd208c7b 100644
--- a/drivers/net/hns3/hns3_regs.h
+++ b/drivers/net/hns3/hns3_regs.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #ifndef _HNS3_REGS_H_
diff --git a/drivers/net/hns3/hns3_rss.c b/drivers/net/hns3/hns3_rss.c
index b42b36d5ba..6726c19afe 100644
--- a/drivers/net/hns3/hns3_rss.c
+++ b/drivers/net/hns3/hns3_rss.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #include <rte_ethdev.h>
diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h
index d626fedeb8..3975cade62 100644
--- a/drivers/net/hns3/hns3_rss.h
+++ b/drivers/net/hns3/hns3_rss.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #ifndef _HNS3_RSS_H_
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index d31f74b28f..4537db952f 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #include <rte_bus_pci.h>
diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h
index 6440d55e30..cd40ac605a 100644
--- a/drivers/net/hns3/hns3_rxtx.h
+++ b/drivers/net/hns3/hns3_rxtx.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #ifndef _HNS3_RXTX_H_
diff --git a/drivers/net/hns3/hns3_rxtx_vec.c b/drivers/net/hns3/hns3_rxtx_vec.c
index d9b6814320..b8ce0ee670 100644
--- a/drivers/net/hns3/hns3_rxtx_vec.c
+++ b/drivers/net/hns3/hns3_rxtx_vec.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2020 HiSilicon Limited.
+ * Copyright(c) 2020-2021 HiSilicon Limited.
  */
 
 #include <rte_io.h>
diff --git a/drivers/net/hns3/hns3_rxtx_vec.h b/drivers/net/hns3/hns3_rxtx_vec.h
index 08a3b3c539..2baf085b95 100644
--- a/drivers/net/hns3/hns3_rxtx_vec.h
+++ b/drivers/net/hns3/hns3_rxtx_vec.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2020 HiSilicon Limited.
+ * Copyright(c) 2020-2021 HiSilicon Limited.
  */
 
 #ifndef _HNS3_RXTX_VEC_H_
diff --git a/drivers/net/hns3/hns3_rxtx_vec_neon.h b/drivers/net/hns3/hns3_rxtx_vec_neon.h
index e37072dd7c..4e94c7aa94 100644
--- a/drivers/net/hns3/hns3_rxtx_vec_neon.h
+++ b/drivers/net/hns3/hns3_rxtx_vec_neon.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2020 HiSilicon Limited.
+ * Copyright(c) 2020-2021 HiSilicon Limited.
  */
 
 #ifndef _HNS3_RXTX_VEC_NEON_H_
diff --git a/drivers/net/hns3/hns3_rxtx_vec_sve.c b/drivers/net/hns3/hns3_rxtx_vec_sve.c
index c53cb9e630..1a28fe0a86 100644
--- a/drivers/net/hns3/hns3_rxtx_vec_sve.c
+++ b/drivers/net/hns3/hns3_rxtx_vec_sve.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2020 HiSilicon Limited.
+ * Copyright(c) 2020-2021 HiSilicon Limited.
  */
 
 #include <arm_sve.h>
diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c
index 796ab99297..5b7b0c2f10 100644
--- a/drivers/net/hns3/hns3_stats.c
+++ b/drivers/net/hns3/hns3_stats.c
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #include <rte_ethdev.h>
diff --git a/drivers/net/hns3/hns3_stats.h b/drivers/net/hns3/hns3_stats.h
index 684fdca4a1..7b9b502a6b 100644
--- a/drivers/net/hns3/hns3_stats.h
+++ b/drivers/net/hns3/hns3_stats.h
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2018-2019 HiSilicon Limited.
+ * Copyright(c) 2018-2021 HiSilicon Limited.
  */
 
 #ifndef _HNS3_STATS_H_
diff --git a/drivers/net/hns3/meson.build b/drivers/net/hns3/meson.build
index 5674d986ba..09034871e7 100644
--- a/drivers/net/hns3/meson.build
+++ b/drivers/net/hns3/meson.build
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2018-2019 Hisilicon Limited
+# Copyright(c) 2018-2021 Hisilicon Limited
 
 if not is_linux
 	build = false
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.599913600 +0800
+++ 0155-net-hns3-fix-copyright-date.patch	2021-05-10 23:59:26.600000000 +0800
@@ -1 +1 @@
-From 53e6f86cf550a75fb1d55a76f411e214e783d14d Mon Sep 17 00:00:00 2001
+From 539f3b7802018aa9b1538fc05b53a627f8c08dac Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 53e6f86cf550a75fb1d55a76f411e214e783d14d ]
@@ -44,2 +46,0 @@
- drivers/net/hns3/hns3_tm.c            | 2 +-
- drivers/net/hns3/hns3_tm.h            | 2 +-
@@ -47 +48 @@
- 32 files changed, 32 insertions(+), 32 deletions(-)
+ 30 files changed, 30 insertions(+), 30 deletions(-)
@@ -50 +51 @@
-index 1087178373..22453b0832 100644
+index 3741adc828..5f6bdbd42f 100644
@@ -59 +60 @@
- #include <ethdev_pci.h>
+ #include <rte_ethdev_pci.h>
@@ -61 +62 @@
-index 9ca25295b2..9958fde128 100644
+index c254f2d0bf..c6fc6c401a 100644
@@ -72 +73 @@
-index 3fcec8220e..096afe8d0c 100644
+index af084bd9f4..f7ad2a5e4c 100644
@@ -83 +84 @@
-index 9c60ab948a..cd8d0b7bc8 100644
+index 811e5304cf..49e5ba70a5 100644
@@ -94 +95 @@
-index ca59a807bb..fad9fab7a7 100644
+index 35ac92b7d1..6acee8d46d 100644
@@ -105 +106 @@
-index d666b1a1e9..16226f1c13 100644
+index 5b17a74bb2..d61198bb87 100644
@@ -116 +117 @@
-index a677cc809f..638be859de 100644
+index ed0f716f71..b608f370d4 100644
@@ -127 +128 @@
-index 658f6a6fc1..603cc82d90 100644
+index 118aa88264..c4a0983e74 100644
@@ -136 +137 @@
- #include <ethdev_driver.h>
+ #include <rte_ethdev_driver.h>
@@ -149 +150 @@
-index 366a301fe8..711eed3f54 100644
+index 25b16b3277..af0aa72482 100644
@@ -160 +161 @@
-index c8d61376cf..39a16a0e91 100644
+index bebfe131cc..dce9f36e6d 100644
@@ -171 +172 @@
-index e10e0941ff..31f42be27f 100644
+index 593d55720b..d87d3ce1d7 100644
@@ -193 +194 @@
-index 597a2d1299..0b11e89d66 100644
+index 7f47c55f29..82b634c365 100644
@@ -202 +203 @@
- #include <ethdev_driver.h>
+ #include <rte_ethdev_driver.h>
@@ -215 +216 @@
-index cfee30f77f..ac0b5a0235 100644
+index b2916fd788..568ddc2a3c 100644
@@ -237 +238 @@
-index 5d15613c67..7edd9b023b 100644
+index d725f14001..4a3fb34814 100644
@@ -246 +247 @@
- #include <ethdev_pci.h>
+ #include <rte_ethdev_pci.h>
@@ -248 +249 @@
-index 7f05f8be79..5812eb39db 100644
+index 6522e1ce0e..cfdd208c7b 100644
@@ -259 +260 @@
-index 226ec25150..3a81e90e09 100644
+index b42b36d5ba..6726c19afe 100644
@@ -270 +271 @@
-index da2375e2ee..996083b88b 100644
+index d626fedeb8..3975cade62 100644
@@ -281 +282 @@
-index 64a0cd4f25..2b80ba4c11 100644
+index d31f74b28f..4537db952f 100644
@@ -292 +293 @@
-index cfe6cadaf5..e39d18d21b 100644
+index 6440d55e30..cd40ac605a 100644
@@ -303 +304 @@
-index 60018ea3fb..08a86e004a 100644
+index d9b6814320..b8ce0ee670 100644
@@ -325 +326 @@
-index b27fce85f8..14d6fb07b1 100644
+index e37072dd7c..4e94c7aa94 100644
@@ -336 +337 @@
-index ef3a756195..2eaf692801 100644
+index c53cb9e630..1a28fe0a86 100644
@@ -347 +348 @@
-index fdada8ba3c..3afef4a04b 100644
+index 796ab99297..5b7b0c2f10 100644
@@ -358 +359 @@
-index 88ac4cd500..de5c40d6b5 100644
+index 684fdca4a1..7b9b502a6b 100644
@@ -368,22 +368,0 @@
-diff --git a/drivers/net/hns3/hns3_tm.c b/drivers/net/hns3/hns3_tm.c
-index 15e00b6e9c..165d1fb90e 100644
---- a/drivers/net/hns3/hns3_tm.c
-+++ b/drivers/net/hns3/hns3_tm.c
-@@ -1,5 +1,5 @@
- /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2020-2020 HiSilicon Limited.
-+ * Copyright(c) 2020-2021 HiSilicon Limited.
-  */
- 
- #include <rte_malloc.h>
-diff --git a/drivers/net/hns3/hns3_tm.h b/drivers/net/hns3/hns3_tm.h
-index 9ccbb22682..1f1f8c9a69 100644
---- a/drivers/net/hns3/hns3_tm.h
-+++ b/drivers/net/hns3/hns3_tm.h
-@@ -1,5 +1,5 @@
- /* SPDX-License-Identifier: BSD-3-Clause
-- * Copyright(c) 2020-2020 HiSilicon Limited.
-+ * Copyright(c) 2020-2021 HiSilicon Limited.
-  */
- 
- #ifndef _HNS3_TM_H_
@@ -391 +370 @@
-index 6d78c334a5..dc0baf7678 100644
+index 5674d986ba..09034871e7 100644

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

* [dpdk-stable] patch 'net/hns3: fix FLR miss detection' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (152 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: fix copyright date' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: fix rollback after setting PVID failure' " Xueming Li
                   ` (73 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Hongbo Zheng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c718e751f438a527020ebbb44ab941be23153cc0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c718e751f438a527020ebbb44ab941be23153cc0 Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3@huawei.com>
Date: Wed, 31 Mar 2021 18:01:37 +0800
Subject: [PATCH] net/hns3: fix FLR miss detection
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 32040ae365735f94253ce317b4b01e8bc4ea9c6b ]

When FLR occurs, the head pointer register of
the command queue will be cleared, resulting in
abnormal detection of the head pointer register
of the command queue. At present, FLR is detected
in this way, and the reset recovery process is
executed.

However, when FLR occurs, the header pointer
register of the command queue is not necessarily
abnormal. For example, when the driver runs
normally, the value of the header pointer register
of the command queue may also be 0, which will
lead to the miss detection of FLR.

Therefore, the judgment that whether the base
address register of command queue is 0 is added
to ensure that FLR not miss detection.

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

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_cmd.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c
index 5f6bdbd42f..8a48714a54 100644
--- a/drivers/net/hns3/hns3_cmd.c
+++ b/drivers/net/hns3/hns3_cmd.c
@@ -195,12 +195,14 @@ hns3_cmd_csq_clean(struct hns3_hw *hw)
 {
 	struct hns3_cmq_ring *csq = &hw->cmq.csq;
 	uint32_t head;
+	uint32_t addr;
 	int clean;
 
 	head = hns3_read_dev(hw, HNS3_CMDQ_TX_HEAD_REG);
-	if (!is_valid_csq_clean_head(csq, head)) {
-		hns3_err(hw, "wrong cmd head (%u, %u-%u)", head,
-			    csq->next_to_use, csq->next_to_clean);
+	addr = hns3_read_dev(hw, HNS3_CMDQ_TX_ADDR_L_REG);
+	if (!is_valid_csq_clean_head(csq, head) || addr == 0) {
+		hns3_err(hw, "wrong cmd addr(%0x) head (%u, %u-%u)", addr, head,
+			 csq->next_to_use, csq->next_to_clean);
 		if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
 			rte_atomic16_set(&hw->reset.disable_cmd, 1);
 			hns3_schedule_delayed_reset(HNS3_DEV_HW_TO_ADAPTER(hw));
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.637170500 +0800
+++ 0156-net-hns3-fix-FLR-miss-detection.patch	2021-05-10 23:59:26.600000000 +0800
@@ -1 +1 @@
-From 32040ae365735f94253ce317b4b01e8bc4ea9c6b Mon Sep 17 00:00:00 2001
+From c718e751f438a527020ebbb44ab941be23153cc0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 32040ae365735f94253ce317b4b01e8bc4ea9c6b ]
@@ -25 +27,0 @@
-Cc: stable@dpdk.org
@@ -34 +36 @@
-index 22453b0832..1d8ef7a812 100644
+index 5f6bdbd42f..8a48714a54 100644
@@ -53,2 +55,2 @@
- 			__atomic_store_n(&hw->reset.disable_cmd, 1,
- 					 __ATOMIC_RELAXED);
+ 			rte_atomic16_set(&hw->reset.disable_cmd, 1);
+ 			hns3_schedule_delayed_reset(HNS3_DEV_HW_TO_ADAPTER(hw));

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

* [dpdk-stable] patch 'net/hns3: fix rollback after setting PVID failure' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (153 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: fix FLR miss detection' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: fix flow control exception' " Xueming Li
                   ` (72 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/73db182cb0e16e646c58fa32df9ff19c24191b12

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 73db182cb0e16e646c58fa32df9ff19c24191b12 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Wed, 31 Mar 2021 18:01:38 +0800
Subject: [PATCH] net/hns3: fix rollback after setting PVID failure
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 39c4fe7042acaeea7a4dff0213ed3fd453a2c255 ]

Currently, three hardware operations are involved in setting the PVID.
If any operation fails, a failure will be returned. And there may be
residual hardware configurations because no rollback is performed.

This patch adds rollback operation for setting PVID to avoid residual
hardware configuration after the PVID fails to be configured.

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

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 6acee8d46d..b5a02dfc13 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -894,7 +894,7 @@ 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;
-	int ret;
+	int ret, err;
 
 	if (on == 0 && pvid != hw->port_base_vlan_cfg.pvid) {
 		if (hw->port_base_vlan_cfg.pvid != HNS3_INVALID_PVID)
@@ -917,7 +917,7 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
 	if (ret) {
 		hns3_err(hw, "failed to config rx vlan strip for pvid, "
 			 "ret = %d", ret);
-		return ret;
+		goto pvid_vlan_strip_fail;
 	}
 
 	if (pvid == HNS3_INVALID_PVID)
@@ -926,13 +926,27 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
 	if (ret) {
 		hns3_err(hw, "failed to update vlan filter entries, ret = %d",
 			 ret);
-		return ret;
+		goto vlan_filter_set_fail;
 	}
 
 out:
 	hw->port_base_vlan_cfg.state = port_base_vlan_state;
 	hw->port_base_vlan_cfg.pvid = on ? pvid : HNS3_INVALID_PVID;
 	return ret;
+
+vlan_filter_set_fail:
+	err = hns3_en_pvid_strip(hns, hw->port_base_vlan_cfg.state ==
+					HNS3_PORT_BASE_VLAN_ENABLE);
+	if (err)
+		hns3_err(hw, "fail to rollback pvid strip, ret = %d", err);
+
+pvid_vlan_strip_fail:
+	err = hns3_vlan_txvlan_cfg(hns, hw->port_base_vlan_cfg.state,
+					hw->port_base_vlan_cfg.pvid);
+	if (err)
+		hns3_err(hw, "fail to rollback txvlan status, ret = %d", err);
+
+	return ret;
 }
 
 static int
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.660632300 +0800
+++ 0157-net-hns3-fix-rollback-after-setting-PVID-failure.patch	2021-05-10 23:59:26.600000000 +0800
@@ -1 +1 @@
-From 39c4fe7042acaeea7a4dff0213ed3fd453a2c255 Mon Sep 17 00:00:00 2001
+From 73db182cb0e16e646c58fa32df9ff19c24191b12 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 39c4fe7042acaeea7a4dff0213ed3fd453a2c255 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index a4d17ed0f4..56b3032e6b 100644
+index 6acee8d46d..b5a02dfc13 100644
@@ -26 +28 @@
-@@ -981,7 +981,7 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
+@@ -894,7 +894,7 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
@@ -35 +37 @@
-@@ -1004,7 +1004,7 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
+@@ -917,7 +917,7 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
@@ -44 +46 @@
-@@ -1013,13 +1013,27 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
+@@ -926,13 +926,27 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)

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

* [dpdk-stable] patch 'net/hns3: fix flow control exception' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (154 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: fix rollback after setting PVID failure' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: fix flow counter value' " Xueming Li
                   ` (71 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/654aeb26190145635f321c44029d8a853f55a25b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 654aeb26190145635f321c44029d8a853f55a25b Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 31 Mar 2021 18:01:39 +0800
Subject: [PATCH] net/hns3: fix flow control exception
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit f1c555219fee71fe76cc53955cd0c052c88b2848 ]

In multi-TC scenarios, MAC pause is not supported. Otherwise, only
TC0 can trigger pause frames, and other TCs cannot trigger pause
frames. In this case, flow control does not meet the expectation.

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

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index b5a02dfc13..b90ee642d6 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5279,6 +5279,11 @@ hns3_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 		return -EOPNOTSUPP;
 	}
 
+	if (hw->num_tc > 1) {
+		hns3_err(hw, "in multi-TC scenarios, MAC pause is not supported.");
+		return -EOPNOTSUPP;
+	}
+
 	hns3_get_fc_mode(hw, fc_conf->mode);
 	if (hw->requested_mode == hw->current_mode &&
 	    pf->pause_time == fc_conf->pause_time)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.688855900 +0800
+++ 0158-net-hns3-fix-flow-control-exception.patch	2021-05-10 23:59:26.610000000 +0800
@@ -1 +1 @@
-From f1c555219fee71fe76cc53955cd0c052c88b2848 Mon Sep 17 00:00:00 2001
+From 654aeb26190145635f321c44029d8a853f55a25b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit f1c555219fee71fe76cc53955cd0c052c88b2848 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 56b3032e6b..2fa0bfa072 100644
+index b5a02dfc13..b90ee642d6 100644
@@ -23 +25 @@
-@@ -5554,6 +5554,11 @@ hns3_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -5279,6 +5279,11 @@ hns3_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)

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

* [dpdk-stable] patch 'net/hns3: fix flow counter value' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (155 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: fix flow control exception' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: fix VF mailbox head field' " Xueming Li
                   ` (70 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/bb24098f63cf85382dcd330468458060084a11c5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bb24098f63cf85382dcd330468458060084a11c5 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 31 Mar 2021 18:01:40 +0800
Subject: [PATCH] net/hns3: fix flow counter value
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit a06c3b0e9f0a4807ee8ac145f58284ec49f2f33d ]

User could create flow rules with specified counter by the action of
RTE_FLOW_ACTION_TYPE_COUNT, but the counter may retain the original
value when create.

This patch fix the bug by read the counter when creating the rule
because the counter is read-clear.

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

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index af0aa72482..ba77defb08 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -158,7 +158,10 @@ hns3_counter_new(struct rte_eth_dev *dev, uint32_t shared, uint32_t id,
 {
 	struct hns3_adapter *hns = dev->data->dev_private;
 	struct hns3_pf *pf = &hns->pf;
+	struct hns3_hw *hw = &hns->hw;
 	struct hns3_flow_counter *cnt;
+	uint64_t value;
+	int ret;
 
 	cnt = hns3_counter_lookup(dev, id);
 	if (cnt) {
@@ -171,6 +174,13 @@ hns3_counter_new(struct rte_eth_dev *dev, uint32_t shared, uint32_t id,
 		return 0;
 	}
 
+	/* Clear the counter by read ops because the counter is read-clear */
+	ret = hns3_get_count(hw, id, &value);
+	if (ret)
+		return rte_flow_error_set(error, EIO,
+					  RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
+					  "Clear counter failed!");
+
 	cnt = rte_zmalloc("hns3 counter", sizeof(*cnt), 0);
 	if (cnt == NULL)
 		return rte_flow_error_set(error, ENOMEM,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.715474700 +0800
+++ 0159-net-hns3-fix-flow-counter-value.patch	2021-05-10 23:59:26.610000000 +0800
@@ -1 +1 @@
-From a06c3b0e9f0a4807ee8ac145f58284ec49f2f33d Mon Sep 17 00:00:00 2001
+From bb24098f63cf85382dcd330468458060084a11c5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit a06c3b0e9f0a4807ee8ac145f58284ec49f2f33d ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 711eed3f54..098b191909 100644
+index af0aa72482..ba77defb08 100644

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

* [dpdk-stable] patch 'net/hns3: fix VF mailbox head field' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (156 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: fix flow counter value' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: support get device version when dump register' " Xueming Li
                   ` (69 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d0897ad2fbdc3e81fb3b2392dc8322dcb8567072

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d0897ad2fbdc3e81fb3b2392dc8322dcb8567072 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 31 Mar 2021 18:01:41 +0800
Subject: [PATCH] net/hns3: fix VF mailbox head field
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 38d5b71c27d6fd9324cbaeed972df382c2c7a34b ]

Currently, the VF mailbox synchronization communication is based on
three fields: head/tail/lost, when head equals tail plus lost, it
means the response is received successfully.

The head field indicates the number of requests that are successfully
sent. If the request sending fails, it should not be updated.

This patch fix the above bug by roll back updates when the sending
fails.

Fixes: 463e748964f5 ("net/hns3: support mailbox")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_mbx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
index 82b634c365..0327bc1526 100644
--- a/drivers/net/hns3/hns3_mbx.c
+++ b/drivers/net/hns3/hns3_mbx.c
@@ -171,6 +171,7 @@ hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,
 		hw->mbx_resp.head++;
 		ret = hns3_cmd_send(hw, &desc, 1);
 		if (ret) {
+			hw->mbx_resp.head--;
 			rte_spinlock_unlock(&hw->mbx_resp.lock);
 			hns3_err(hw, "VF failed(=%d) to send mbx message to PF",
 				 ret);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.739303500 +0800
+++ 0160-net-hns3-fix-VF-mailbox-head-field.patch	2021-05-10 23:59:26.610000000 +0800
@@ -1 +1 @@
-From 38d5b71c27d6fd9324cbaeed972df382c2c7a34b Mon Sep 17 00:00:00 2001
+From d0897ad2fbdc3e81fb3b2392dc8322dcb8567072 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 38d5b71c27d6fd9324cbaeed972df382c2c7a34b ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index 499285d7c2..8ea8998ac7 100644
+index 82b634c365..0327bc1526 100644
@@ -29 +31 @@
-@@ -142,6 +142,7 @@ hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,
+@@ -171,6 +171,7 @@ hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,

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

* [dpdk-stable] patch 'net/hns3: support get device version when dump register' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (157 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: fix VF mailbox head field' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: delete redundant blank line' " Xueming Li
                   ` (68 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7764ed833a2f4b79a8c85de973c1ff4461239edf

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7764ed833a2f4b79a8c85de973c1ff4461239edf Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 31 Mar 2021 18:01:42 +0800
Subject: [PATCH] net/hns3: support get device version when dump register
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 214917f66bf2852c7b758550fdcab1738cad8fa4 ]

Support get device version which is equal to the firmware version
when dump register.

Fixes: 936eda25e8da ("net/hns3: support dump register")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_regs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c
index 4a3fb34814..cbc377adee 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -337,6 +337,8 @@ hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)
 	if (regs->length && regs->length != length)
 		return -ENOTSUP;
 
+	regs->version = hw->fw_version;
+
 	/* fetching per-PF registers values from PF PCIe register space */
 	data += hns3_direct_access_regs(hw, data);
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.764079300 +0800
+++ 0161-net-hns3-support-get-device-version-when-dump-regist.patch	2021-05-10 23:59:26.610000000 +0800
@@ -1 +1 @@
-From 214917f66bf2852c7b758550fdcab1738cad8fa4 Mon Sep 17 00:00:00 2001
+From 7764ed833a2f4b79a8c85de973c1ff4461239edf Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 214917f66bf2852c7b758550fdcab1738cad8fa4 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 7edd9b023b..86a4cf74d5 100644
+index 4a3fb34814..cbc377adee 100644
@@ -22 +24 @@
-@@ -499,6 +499,8 @@ hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)
+@@ -337,6 +337,8 @@ hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)

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

* [dpdk-stable] patch 'net/hns3: delete redundant blank line' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (158 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: support get device version when dump register' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/enic: fix flow initialization error handling' " Xueming Li
                   ` (67 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Hongbo Zheng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/44bd01347fced9b605a355eb95a3d465323ff633

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 44bd01347fced9b605a355eb95a3d465323ff633 Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3@huawei.com>
Date: Wed, 31 Mar 2021 18:01:43 +0800
Subject: [PATCH] net/hns3: delete redundant blank line
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit d7e8b721fccc855b1d7a61e1e06d0d6921cf34fd ]

Delete redundant blank line in "hns3vf_check_event_cause" to
solve the static warning.

Fixes: a5475d61fa34 ("net/hns3: support VF")

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index b608f370d4..ac11befa16 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1067,7 +1067,6 @@ hns3vf_check_event_cause(struct hns3_adapter *hns, uint32_t *clearval)
 
 	/* Fetch the events from their corresponding regs */
 	cmdq_stat_reg = hns3_read_dev(hw, HNS3_VECTOR0_CMDQ_STAT_REG);
-
 	if (BIT(HNS3_VECTOR0_RST_INT_B) & cmdq_stat_reg) {
 		rst_ing_reg = hns3_read_dev(hw, HNS3_FUN_RST_ING);
 		hns3_warn(hw, "resetting reg: 0x%x", rst_ing_reg);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.788466200 +0800
+++ 0162-net-hns3-delete-redundant-blank-line.patch	2021-05-10 23:59:26.610000000 +0800
@@ -1 +1 @@
-From d7e8b721fccc855b1d7a61e1e06d0d6921cf34fd Mon Sep 17 00:00:00 2001
+From 44bd01347fced9b605a355eb95a3d465323ff633 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit d7e8b721fccc855b1d7a61e1e06d0d6921cf34fd ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index eb47ed320a..5f8a460f35 100644
+index b608f370d4..ac11befa16 100644
@@ -22 +24 @@
-@@ -1064,7 +1064,6 @@ hns3vf_check_event_cause(struct hns3_adapter *hns, uint32_t *clearval)
+@@ -1067,7 +1067,6 @@ hns3vf_check_event_cause(struct hns3_adapter *hns, uint32_t *clearval)

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

* [dpdk-stable] patch 'net/enic: fix flow initialization error handling' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (159 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: delete redundant blank line' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'app/flow-perf: fix encap/decap actions' " Xueming Li
                   ` (66 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: John Daley; +Cc: Luca Boccassi, Hyong Youb Kim, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2b03f8ca36f00d15271c3cf6939cc696402e482a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2b03f8ca36f00d15271c3cf6939cc696402e482a Mon Sep 17 00:00:00 2001
From: John Daley <johndale@cisco.com>
Date: Thu, 8 Apr 2021 16:06:31 -0700
Subject: [PATCH] net/enic: fix flow initialization error handling
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 5aa67931ec0ee1d335297a8c3fec5643a57c136b ]

Fix a rare case in rte_flow initialization where the action hash table
is not freed if allocating a NIC match table fails.

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

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

diff --git a/drivers/net/enic/enic_fm_flow.c b/drivers/net/enic/enic_fm_flow.c
index 86b91ed8b1..401076b726 100644
--- a/drivers/net/enic/enic_fm_flow.c
+++ b/drivers/net/enic/enic_fm_flow.c
@@ -2886,7 +2886,7 @@ enic_fm_init(struct enic *enic)
 	rc = enic_fm_init_actions(fm);
 	if (rc) {
 		ENICPMD_LOG(ERR, "cannot create action hash, error:%d", rc);
-		goto error_tables;
+		goto error_counters;
 	}
 	/*
 	 * One default exact match table for each direction. We hold onto
@@ -2895,7 +2895,7 @@ enic_fm_init(struct enic *enic)
 	rc = enic_fet_alloc(fm, 1, NULL, 128, &fm->default_ig_fet);
 	if (rc) {
 		ENICPMD_LOG(ERR, "cannot alloc default IG exact match table");
-		goto error_counters;
+		goto error_actions;
 	}
 	fm->default_ig_fet->ref = 1;
 	rc = enic_fet_alloc(fm, 0, NULL, 128, &fm->default_eg_fet);
@@ -2910,6 +2910,8 @@ enic_fm_init(struct enic *enic)
 
 error_ig_fet:
 	enic_fet_free(fm, fm->default_ig_fet);
+error_actions:
+	rte_hash_free(fm->action_hash);
 error_counters:
 	enic_fm_free_all_counters(fm);
 error_tables:
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.812473700 +0800
+++ 0163-net-enic-fix-flow-initialization-error-handling.patch	2021-05-10 23:59:26.610000000 +0800
@@ -1 +1 @@
-From 5aa67931ec0ee1d335297a8c3fec5643a57c136b Mon Sep 17 00:00:00 2001
+From 2b03f8ca36f00d15271c3cf6939cc696402e482a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 5aa67931ec0ee1d335297a8c3fec5643a57c136b ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 21d9b1cef7..cd364ee16b 100644
+index 86b91ed8b1..401076b726 100644
@@ -22 +24 @@
-@@ -2890,7 +2890,7 @@ enic_fm_init(struct enic *enic)
+@@ -2886,7 +2886,7 @@ enic_fm_init(struct enic *enic)
@@ -31 +33 @@
-@@ -2899,7 +2899,7 @@ enic_fm_init(struct enic *enic)
+@@ -2895,7 +2895,7 @@ enic_fm_init(struct enic *enic)
@@ -40 +42 @@
-@@ -2914,6 +2914,8 @@ enic_fm_init(struct enic *enic)
+@@ -2910,6 +2910,8 @@ enic_fm_init(struct enic *enic)

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

* [dpdk-stable] patch 'app/flow-perf: fix encap/decap actions' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (160 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'net/enic: fix flow initialization error handling' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'eal/windows: fix return codes of pthread shim layer' " Xueming Li
                   ` (65 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Wisam Jaddo; +Cc: Luca Boccassi, Alexander Kozyrev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2e83b42a993ff104f49282c3943847a876afc598

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2e83b42a993ff104f49282c3943847a876afc598 Mon Sep 17 00:00:00 2001
From: Wisam Jaddo <wisamm@nvidia.com>
Date: Sun, 14 Mar 2021 11:54:27 +0200
Subject: [PATCH] app/flow-perf: fix encap/decap actions
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 83f9be10f237890587fb7639484ea757c20fdad8 ]

When using decap actions it's been set to the data to decap
into the encap_data instead of decap_data, as a results we end
up with bad encap and decap data in many cases.

Fixes: 0c8f1f4ab90e ("app/flow-perf: support raw encap/decap actions")

Signed-off-by: Wisam Jaddo <wisamm@nvidia.com>
Acked-by: Alexander Kozyrev <akozyrev@nvidia.com>
---
 app/test-flow-perf/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c
index e2fc5b7f65..d25778fd44 100644
--- a/app/test-flow-perf/main.c
+++ b/app/test-flow-perf/main.c
@@ -693,7 +693,7 @@ args_parse(int argc, char **argv)
 					for (i = 0; i < RTE_DIM(flow_options); i++) {
 						if (strcmp(flow_options[i].str, token) == 0) {
 							printf("%s,", token);
-							encap_data |= flow_options[i].mask;
+							decap_data |= flow_options[i].mask;
 							break;
 						}
 						/* Reached last item with no match */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.835537700 +0800
+++ 0164-app-flow-perf-fix-encap-decap-actions.patch	2021-05-10 23:59:26.610000000 +0800
@@ -1 +1 @@
-From 83f9be10f237890587fb7639484ea757c20fdad8 Mon Sep 17 00:00:00 2001
+From 2e83b42a993ff104f49282c3943847a876afc598 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 83f9be10f237890587fb7639484ea757c20fdad8 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index e37a8b7f7a..8e229679df 100644
+index e2fc5b7f65..d25778fd44 100644
@@ -23 +25 @@
-@@ -728,7 +728,7 @@ args_parse(int argc, char **argv)
+@@ -693,7 +693,7 @@ args_parse(int argc, char **argv)

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

* [dpdk-stable] patch 'eal/windows: fix return codes of pthread shim layer' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (161 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'app/flow-perf: fix encap/decap actions' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'test/event: fix timeout accuracy' " Xueming Li
                   ` (64 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Tal Shnaiderman; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ba0aecb72a6ec252c3a8bcfb4ad7187a6e9f4733

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ba0aecb72a6ec252c3a8bcfb4ad7187a6e9f4733 Mon Sep 17 00:00:00 2001
From: Tal Shnaiderman <talshn@nvidia.com>
Date: Mon, 12 Apr 2021 13:37:44 +0300
Subject: [PATCH] eal/windows: fix return codes of pthread shim layer
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 13e06abc9d316a9e8931de996c160c0359857415 ]

The macro definitions of the following pthread functions
return incorrect values from the inner function return code.

While pthread_barrier_init(), pthread_barrier_destroy() and
pthread_cancel() return 0 in a case of success and non-zero (errno) value
otherwise the shimming functions InitializeSynchronizationBarrier,
DeleteSynchronizationBarrier and TerminateThread return FALSE (0)
in a case of failure and TRUE(1) in a case of success.

This issue was undetected as none of the functions return codes were
checked until such check was added in
commit 34cc55cce6b1 ("eal: fix race in control thread creation")
exposing the issue by failing pthread_barrier_init()
and rte_eal_init() on Windows as a result.

The fix aligned the return value of the 3 function with the expected
pthread API return values.

Fixes: e8428a9d89f1 ("eal/windows: add some basic functions and macros")

Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
---
 lib/librte_eal/common/eal_common_thread.c | 4 ++--
 lib/librte_eal/windows/include/pthread.h  | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_thread.c b/lib/librte_eal/common/eal_common_thread.c
index 03dbcd9e86..1a52f42a2b 100644
--- a/lib/librte_eal/common/eal_common_thread.c
+++ b/lib/librte_eal/common/eal_common_thread.c
@@ -176,7 +176,7 @@ struct rte_thread_ctrl_params {
 static void ctrl_params_free(struct rte_thread_ctrl_params *params)
 {
 	if (__atomic_sub_fetch(&params->refcnt, 1, __ATOMIC_ACQ_REL) == 0) {
-		pthread_barrier_destroy(&params->configured);
+		(void)pthread_barrier_destroy(&params->configured);
 		free(params);
 	}
 }
@@ -251,7 +251,7 @@ rte_ctrl_thread_create(pthread_t *thread, const char *name,
 	return -ret;
 
 fail_with_barrier:
-	pthread_barrier_destroy(&params->configured);
+	(void)pthread_barrier_destroy(&params->configured);
 
 fail_no_barrier:
 	free(params);
diff --git a/lib/librte_eal/windows/include/pthread.h b/lib/librte_eal/windows/include/pthread.h
index 9aeab1fa70..1939b0121c 100644
--- a/lib/librte_eal/windows/include/pthread.h
+++ b/lib/librte_eal/windows/include/pthread.h
@@ -35,12 +35,12 @@ typedef CRITICAL_SECTION pthread_mutex_t;
 typedef SYNCHRONIZATION_BARRIER pthread_barrier_t;
 
 #define pthread_barrier_init(barrier, attr, count) \
-	InitializeSynchronizationBarrier(barrier, count, -1)
+	!InitializeSynchronizationBarrier(barrier, count, -1)
 #define pthread_barrier_wait(barrier) EnterSynchronizationBarrier(barrier, \
 	SYNCHRONIZATION_BARRIER_FLAGS_BLOCK_ONLY)
 #define pthread_barrier_destroy(barrier) \
-	DeleteSynchronizationBarrier(barrier)
-#define pthread_cancel(thread) TerminateThread((HANDLE) thread, 0)
+	!DeleteSynchronizationBarrier(barrier)
+#define pthread_cancel(thread) !TerminateThread((HANDLE) thread, 0)
 
 /* pthread function overrides */
 #define pthread_self() \
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.859166400 +0800
+++ 0165-eal-windows-fix-return-codes-of-pthread-shim-layer.patch	2021-05-10 23:59:26.610000000 +0800
@@ -1 +1 @@
-From 13e06abc9d316a9e8931de996c160c0359857415 Mon Sep 17 00:00:00 2001
+From ba0aecb72a6ec252c3a8bcfb4ad7187a6e9f4733 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 13e06abc9d316a9e8931de996c160c0359857415 ]
@@ -25 +27,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'test/event: fix timeout accuracy' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (162 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'eal/windows: fix return codes of pthread shim layer' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'app/eventdev: " Xueming Li
                   ` (63 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Luca Boccassi, Erik Gabriel Carrillo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5b91f48bc810fc88113d573f0fbbf1acd4097972

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5b91f48bc810fc88113d573f0fbbf1acd4097972 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Sun, 7 Mar 2021 01:56:58 +0530
Subject: [PATCH] test/event: fix timeout accuracy
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 41f27795bb947c9aa1d02e0c8a2688af2a3197ba ]

Round timeout ticks when converting from nanoseconds, this prevents
loss of accuracy and deviation from requested timeout value.

Fixes: d1f3385d0076 ("test: add event timer adapter auto-test")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
---
 app/test/test_event_timer_adapter.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/test/test_event_timer_adapter.c b/app/test/test_event_timer_adapter.c
index ad3f4dcc20..b536ddef40 100644
--- a/app/test/test_event_timer_adapter.c
+++ b/app/test/test_event_timer_adapter.c
@@ -3,6 +3,8 @@
  * Copyright(c) 2017-2018 Intel Corporation.
  */
 
+#include <math.h>
+
 #include <rte_atomic.h>
 #include <rte_common.h>
 #include <rte_cycles.h>
@@ -46,7 +48,7 @@ static uint64_t global_info_bkt_tck_ns;
 static volatile uint8_t arm_done;
 
 #define CALC_TICKS(tks)					\
-	((tks * global_bkt_tck_ns) / global_info_bkt_tck_ns)
+	ceil((double)(tks * global_bkt_tck_ns) / global_info_bkt_tck_ns)
 
 
 static bool using_services;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.882798900 +0800
+++ 0166-test-event-fix-timeout-accuracy.patch	2021-05-10 23:59:26.610000000 +0800
@@ -1 +1 @@
-From 41f27795bb947c9aa1d02e0c8a2688af2a3197ba Mon Sep 17 00:00:00 2001
+From 5b91f48bc810fc88113d573f0fbbf1acd4097972 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 41f27795bb947c9aa1d02e0c8a2688af2a3197ba ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'app/eventdev: fix timeout accuracy' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (163 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'test/event: fix timeout accuracy' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'event/octeontx2: fix device reconfigure for single slot' " Xueming Li
                   ` (62 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Luca Boccassi, Erik Gabriel Carrillo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/dc7e8df00fad3c0e072401632b40798b69ca912a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From dc7e8df00fad3c0e072401632b40798b69ca912a Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Thu, 25 Feb 2021 17:31:43 +0530
Subject: [PATCH] app/eventdev: fix timeout accuracy
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 626b12a8d3bb018f7fc9e2eae356a375fb2d38dc ]

Round timeout ticks when converting from nanoseconds, this prevents
loss of accuracy and deviation from requested timeout value.

Fixes: d008f20bce23 ("app/eventdev: add event timer adapter as a producer")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Reviewed-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
---
 app/test-eventdev/test_perf_common.c | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c
index 955edb7526..2fe15ed447 100644
--- a/app/test-eventdev/test_perf_common.c
+++ b/app/test-eventdev/test_perf_common.c
@@ -2,6 +2,8 @@
  * Copyright(c) 2017 Cavium, Inc
  */
 
+#include <math.h>
+
 #include "test_perf_common.h"
 
 int
@@ -95,11 +97,13 @@ perf_event_timer_producer(void *arg)
 	uint64_t timeout_ticks = opt->expiry_nsec / opt->timer_tick_nsec;
 
 	memset(&tim, 0, sizeof(struct rte_event_timer));
-	timeout_ticks = opt->optm_timer_tick_nsec ?
-			(timeout_ticks * opt->timer_tick_nsec)
-			/ opt->optm_timer_tick_nsec : timeout_ticks;
+	timeout_ticks =
+		opt->optm_timer_tick_nsec
+			? ceil((double)(timeout_ticks * opt->timer_tick_nsec) /
+			       opt->optm_timer_tick_nsec)
+			: timeout_ticks;
 	timeout_ticks += timeout_ticks ? 0 : 1;
-	tim.ev.event_type =  RTE_EVENT_TYPE_TIMER;
+	tim.ev.event_type = RTE_EVENT_TYPE_TIMER;
 	tim.ev.op = RTE_EVENT_OP_NEW;
 	tim.ev.sched_type = t->opt->sched_type_list[0];
 	tim.ev.queue_id = p->queue_id;
@@ -159,11 +163,13 @@ perf_event_timer_producer_burst(void *arg)
 	uint64_t timeout_ticks = opt->expiry_nsec / opt->timer_tick_nsec;
 
 	memset(&tim, 0, sizeof(struct rte_event_timer));
-	timeout_ticks = opt->optm_timer_tick_nsec ?
-			(timeout_ticks * opt->timer_tick_nsec)
-			/ opt->optm_timer_tick_nsec : timeout_ticks;
+	timeout_ticks =
+		opt->optm_timer_tick_nsec
+			? ceil((double)(timeout_ticks * opt->timer_tick_nsec) /
+			       opt->optm_timer_tick_nsec)
+			: timeout_ticks;
 	timeout_ticks += timeout_ticks ? 0 : 1;
-	tim.ev.event_type =  RTE_EVENT_TYPE_TIMER;
+	tim.ev.event_type = RTE_EVENT_TYPE_TIMER;
 	tim.ev.op = RTE_EVENT_OP_NEW;
 	tim.ev.sched_type = t->opt->sched_type_list[0];
 	tim.ev.queue_id = p->queue_id;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.905146200 +0800
+++ 0167-app-eventdev-fix-timeout-accuracy.patch	2021-05-10 23:59:26.610000000 +0800
@@ -1 +1 @@
-From 626b12a8d3bb018f7fc9e2eae356a375fb2d38dc Mon Sep 17 00:00:00 2001
+From dc7e8df00fad3c0e072401632b40798b69ca912a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 626b12a8d3bb018f7fc9e2eae356a375fb2d38dc ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 34cded3739..cc100650c2 100644
+index 955edb7526..2fe15ed447 100644

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

* [dpdk-stable] patch 'event/octeontx2: fix device reconfigure for single slot' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (164 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'app/eventdev: " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'license: fix typos' " Xueming Li
                   ` (61 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Harman Kalra; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/eb30365e9ec6ee135884922052afdf8225247eaa

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From eb30365e9ec6ee135884922052afdf8225247eaa Mon Sep 17 00:00:00 2001
From: Harman Kalra <hkalra@marvell.com>
Date: Mon, 5 Apr 2021 21:54:15 +0530
Subject: [PATCH] event/octeontx2: fix device reconfigure for single slot
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 340d22cdd14802de3f80859a940dfa178b0de7ca ]

When device is re-configured, memory allocated for work slot is freed
and new memory is allocated. Due to this we may loose some important
configurations/mappings done with initial work slot memory.

For example, whenever rte_event_eth_tx_adapter_queue_add is called
some important meta i.e. txq handle is stored in work slot structure.
If device gets reconfigured after this tx adaptor add, txq to work
slot mapping will be lost resulting in seg fault during packet
processing, as txq handle could not be retrieved from work slot.

Fixes: 67b5f4686459 ("event/octeontx2: add port config functions")

Signed-off-by: Harman Kalra <hkalra@marvell.com>
---
 drivers/event/octeontx2/otx2_evdev.c | 34 +++++++++++++---------------
 1 file changed, 16 insertions(+), 18 deletions(-)

diff --git a/drivers/event/octeontx2/otx2_evdev.c b/drivers/event/octeontx2/otx2_evdev.c
index 0fe014c24a..3afb5a30e7 100644
--- a/drivers/event/octeontx2/otx2_evdev.c
+++ b/drivers/event/octeontx2/otx2_evdev.c
@@ -883,29 +883,27 @@ sso_configure_ports(const struct rte_eventdev *event_dev)
 		struct otx2_ssogws *ws;
 		uintptr_t base;
 
-		/* Free memory prior to re-allocation if needed */
 		if (event_dev->data->ports[i] != NULL) {
 			ws = event_dev->data->ports[i];
-			rte_free(ssogws_get_cookie(ws));
-			ws = NULL;
-		}
+		} else {
+			/* Allocate event port memory */
+			ws = rte_zmalloc_socket("otx2_sso_ws",
+						sizeof(struct otx2_ssogws) +
+						RTE_CACHE_LINE_SIZE,
+						RTE_CACHE_LINE_SIZE,
+						event_dev->data->socket_id);
+			if (ws == NULL) {
+				otx2_err("Failed to alloc memory for port=%d",
+					 i);
+				rc = -ENOMEM;
+				break;
+			}
 
-		/* Allocate event port memory */
-		ws = rte_zmalloc_socket("otx2_sso_ws",
-					sizeof(struct otx2_ssogws) +
-					RTE_CACHE_LINE_SIZE,
-					RTE_CACHE_LINE_SIZE,
-					event_dev->data->socket_id);
-		if (ws == NULL) {
-			otx2_err("Failed to alloc memory for port=%d", i);
-			rc = -ENOMEM;
-			break;
+			/* First cache line is reserved for cookie */
+			ws = (struct otx2_ssogws *)
+				((uint8_t *)ws + RTE_CACHE_LINE_SIZE);
 		}
 
-		/* First cache line is reserved for cookie */
-		ws = (struct otx2_ssogws *)
-			((uint8_t *)ws + RTE_CACHE_LINE_SIZE);
-
 		ws->port = i;
 		base = dev->bar2 + (RVU_BLOCK_ADDR_SSOW << 20 | i << 12);
 		sso_set_port_ops(ws, base);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.929227500 +0800
+++ 0168-event-octeontx2-fix-device-reconfigure-for-single-sl.patch	2021-05-10 23:59:26.610000000 +0800
@@ -1 +1 @@
-From 340d22cdd14802de3f80859a940dfa178b0de7ca Mon Sep 17 00:00:00 2001
+From eb30365e9ec6ee135884922052afdf8225247eaa Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 340d22cdd14802de3f80859a940dfa178b0de7ca ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 770a801c4e..cdadbb2b21 100644
+index 0fe014c24a..3afb5a30e7 100644
@@ -28 +30 @@
-@@ -885,29 +885,27 @@ sso_configure_ports(const struct rte_eventdev *event_dev)
+@@ -883,29 +883,27 @@ sso_configure_ports(const struct rte_eventdev *event_dev)

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

* [dpdk-stable] patch 'license: fix typos' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (165 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'event/octeontx2: fix device reconfigure for single slot' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'test/trace: fix race on collected perf data' " Xueming Li
                   ` (60 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Luca Boccassi, Stephen Hemminger, Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/cf45856b8bef50e990dac5ea61ec96be48b559c8

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cf45856b8bef50e990dac5ea61ec96be48b559c8 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Fri, 9 Apr 2021 16:53:56 +0100
Subject: [PATCH] license: fix typos
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit ff43cd79e395f0eb8c763ec7ab0338526ad201d8 ]

Fixes: a4862c9e1a98 ("license: introduce SPDX identifiers")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 license/README | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/license/README b/license/README
index 874abaf4cd..79dac86440 100644
--- a/license/README
+++ b/license/README
@@ -49,7 +49,7 @@ with SPDX-License-Identifiers.
 Any exception to the DPDK IP policies shall be approved by DPDK Tech Board and
 DPDK Governing Board. Steps for any exception approval:
 1. Mention the appropriate license identifier form SPDX. If the license is not
-   listed in SPDX Licenses. It is the submitters responsibiliity to get it
+   listed in SPDX Licenses. It is the submitters responsibility to get it
    first listed.
 2. Get the required approval from the DPDK Technical Board. Technical Board may
    advise the author to check alternate means first. If no other alternative
@@ -72,6 +72,6 @@ DPDK project supported licenses are:
 	URL: http://spdx.org/licenses/GPL-2.0.html#licenseText
 	DPDK License text: licenses/gpl-2.0.txt
 3. GNU Lesser General Public License v2.1
-	SPDX-License-Identifieri: LGPL-2.1
+	SPDX-License-Identifier: LGPL-2.1
 	URL: http://spdx.org/licenses/LGPL-2.1.html#licenseText
 	DPDK License text: licenses/lgpl-2.1.txt
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.954246100 +0800
+++ 0169-license-fix-typos.patch	2021-05-10 23:59:26.610000000 +0800
@@ -1 +1 @@
-From ff43cd79e395f0eb8c763ec7ab0338526ad201d8 Mon Sep 17 00:00:00 2001
+From cf45856b8bef50e990dac5ea61ec96be48b559c8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit ff43cd79e395f0eb8c763ec7ab0338526ad201d8 ]
@@ -7 +9,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'test/trace: fix race on collected perf data' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (166 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'license: fix typos' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:01 ` [dpdk-stable] patch 'raw/octeontx2_dma: assign PCI device in DPI VF' " Xueming Li
                   ` (59 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Feifei Wang
  Cc: Luca Boccassi, Honnappa Nagarahalli, Ruifeng Wang,
	Pavan Nikhilesh, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d2d434683d83eb9efc4b627e0ac55fc436d626b3

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d2d434683d83eb9efc4b627e0ac55fc436d626b3 Mon Sep 17 00:00:00 2001
From: Feifei Wang <feifei.wang2@arm.com>
Date: Wed, 10 Mar 2021 10:15:27 +0800
Subject: [PATCH] test/trace: fix race on collected perf data
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit dda66e716c0550ee8b218428a6d2129bd9c97740 ]

The measure_perf function should be executed after worker threads exit
to collect correct perf data. Otherwise, while workers are running, the
main thread may get incomplete data from workers.

In the meanwhile, remove unnecessary barrier in the test.
For signal variables "ldata.done" and "ldata.start", no operations
should keep the order that being executed after them. So the wmb after
them can be moved.

Fixes: 16a277a24c9f ("test/trace: add performance test cases")

Suggested-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 app/test/test_trace_perf.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/app/test/test_trace_perf.c b/app/test/test_trace_perf.c
index e1ad8e6f55..46ae7d8074 100644
--- a/app/test/test_trace_perf.c
+++ b/app/test/test_trace_perf.c
@@ -79,7 +79,6 @@ signal_workers_to_finish(struct test_data *data)
 
 	for (workers = 0; workers < data->nb_workers; workers++) {
 		data->ldata[workers].done = 1;
-		rte_smp_wmb();
 	}
 }
 
@@ -102,7 +101,6 @@ worker_fn_##func(void *arg) \
 { \
 	struct lcore_data *ldata = arg; \
 	ldata->started = 1; \
-	rte_smp_wmb(); \
 	__worker_##func(ldata); \
 	return 0; \
 }
@@ -137,11 +135,12 @@ run_test(const char *str, lcore_function_t f, struct test_data *data, size_t sz)
 
 	wait_till_workers_are_ready(data);
 	rte_delay_ms(100); /* Wait for some time to accumulate the stats */
-	measure_perf(str, data);
 	signal_workers_to_finish(data);
 
 	RTE_LCORE_FOREACH_WORKER(id)
 		rte_eal_wait_lcore(id);
+
+	measure_perf(str, data);
 }
 
 static int
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.976499800 +0800
+++ 0170-test-trace-fix-race-on-collected-perf-data.patch	2021-05-10 23:59:26.610000000 +0800
@@ -1 +1 @@
-From dda66e716c0550ee8b218428a6d2129bd9c97740 Mon Sep 17 00:00:00 2001
+From d2d434683d83eb9efc4b627e0ac55fc436d626b3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit dda66e716c0550ee8b218428a6d2129bd9c97740 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'raw/octeontx2_dma: assign PCI device in DPI VF' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (167 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'test/trace: fix race on collected perf data' " Xueming Li
@ 2021-05-10 16:01 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'eal: add C++ include guard for reciprocal header' " Xueming Li
                   ` (58 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:01 UTC (permalink / raw)
  To: Radha Mohan Chintakuntla; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/45b58e4ac4426b2eab23d3e8a7a9dd1ae65ff33c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 45b58e4ac4426b2eab23d3e8a7a9dd1ae65ff33c Mon Sep 17 00:00:00 2001
From: Radha Mohan Chintakuntla <radhac@marvell.com>
Date: Fri, 9 Apr 2021 01:06:27 -0700
Subject: [PATCH] raw/octeontx2_dma: assign PCI device in DPI VF
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 692c0e78a52e62c31ed44d31eb66dafd439e5446 ]

The PCI device address is being used for sending mailbox which was
introduced in previous commit which replaced the macros so that
multiple DPI blocks in the hardware can be supported.

This patch fixes a NULL pointer access by assigning the PCI device
structure to dpivf.

Fixes: 4495bd887d38 ("raw/octeontx2_dma: support multiple DPI blocks")

Signed-off-by: Radha Mohan Chintakuntla <radhac@marvell.com>
---
 drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c b/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
index efdba2779b..8c01f25ec7 100644
--- a/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
+++ b/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
@@ -389,6 +389,7 @@ otx2_dpi_rawdev_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	vf_id = ((pci_dev->addr.devid & 0x1F) << 3) |
 		 (pci_dev->addr.function & 0x7);
 	vf_id -= 1;
+	dpivf->dev = pci_dev;
 	dpivf->state = DPI_QUEUE_START;
 	dpivf->vf_id = vf_id;
 	dpivf->vf_bar0 = (uintptr_t)pci_dev->mem_resource[0].addr;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.999514900 +0800
+++ 0171-raw-octeontx2_dma-assign-PCI-device-in-DPI-VF.patch	2021-05-10 23:59:26.610000000 +0800
@@ -1 +1 @@
-From 692c0e78a52e62c31ed44d31eb66dafd439e5446 Mon Sep 17 00:00:00 2001
+From 45b58e4ac4426b2eab23d3e8a7a9dd1ae65ff33c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 692c0e78a52e62c31ed44d31eb66dafd439e5446 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'eal: add C++ include guard for reciprocal header' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (168 preceding siblings ...)
  2021-05-10 16:01 ` [dpdk-stable] patch 'raw/octeontx2_dma: assign PCI device in DPI VF' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'crypto/octeontx: fix session-less mode' " Xueming Li
                   ` (57 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Tyler Retzlaff; +Cc: Luca Boccassi, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9e520a5a7aad047b8d3bc479cbf0e88a3184dcd2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9e520a5a7aad047b8d3bc479cbf0e88a3184dcd2 Mon Sep 17 00:00:00 2001
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
Date: Wed, 17 Mar 2021 09:14:12 -0700
Subject: [PATCH] eal: add C++ include guard for reciprocal header
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit a6f88f7eb9ed077a02607cf9cd2b5101eda9f804 ]

Add missing extern "C" linkage for rte_reciprocal.h consistent with
other eal headers.

Fixes: ffe3ec811ef5 ("sched: introduce reciprocal divide")

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_eal/include/rte_reciprocal.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/librte_eal/include/rte_reciprocal.h b/lib/librte_eal/include/rte_reciprocal.h
index 735adb029b..fa1cb4854e 100644
--- a/lib/librte_eal/include/rte_reciprocal.h
+++ b/lib/librte_eal/include/rte_reciprocal.h
@@ -29,6 +29,10 @@
 
 #include <rte_common.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct rte_reciprocal {
 	uint32_t m;
 	uint8_t sh1, sh2;
@@ -89,4 +93,8 @@ rte_reciprocal_divide_u64(uint64_t a, const struct rte_reciprocal_u64 *R)
 struct rte_reciprocal rte_reciprocal_value(uint32_t d);
 struct rte_reciprocal_u64 rte_reciprocal_value_u64(uint64_t d);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _RTE_RECIPROCAL_H_ */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.024535500 +0800
+++ 0172-eal-add-C-include-guard-for-reciprocal-header.patch	2021-05-10 23:59:26.610000000 +0800
@@ -1 +1 @@
-From a6f88f7eb9ed077a02607cf9cd2b5101eda9f804 Mon Sep 17 00:00:00 2001
+From 9e520a5a7aad047b8d3bc479cbf0e88a3184dcd2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit a6f88f7eb9ed077a02607cf9cd2b5101eda9f804 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'crypto/octeontx: fix session-less mode' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (169 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'eal: add C++ include guard for reciprocal header' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'examples/l2fwd-crypto: skip masked devices' " Xueming Li
                   ` (56 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Ankur Dwivedi; +Cc: Luca Boccassi, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/96d2d64bf106285cebef6da4a3a6fba492ae2f21

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 96d2d64bf106285cebef6da4a3a6fba492ae2f21 Mon Sep 17 00:00:00 2001
From: Ankur Dwivedi <adwivedi@marvell.com>
Date: Mon, 1 Mar 2021 11:29:55 +0530
Subject: [PATCH] crypto/octeontx: fix session-less mode
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 8e177f149ec3c8ace46d225bb0bc69b7e099c7a4 ]

A temporary session is created for sessionless crypto operations.
rte_cryptodev_sym_session_create() should be used for creating the
temporary session as it initializes the session structure in the
correct way.

Fixes: caeba5062c39 ("crypto/octeontx: improve symmetric session-less path")

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 drivers/crypto/octeontx/otx_cryptodev_ops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c b/drivers/crypto/octeontx/otx_cryptodev_ops.c
index 0cf760b296..b74eb2694b 100644
--- a/drivers/crypto/octeontx/otx_cryptodev_ops.c
+++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c
@@ -577,8 +577,8 @@ otx_cpt_enq_single_sym_sessless(struct cpt_instance *instance,
 	int ret;
 
 	/* Create temporary session */
-
-	if (rte_mempool_get(instance->sess_mp, (void **)&sess))
+	sess = rte_cryptodev_sym_session_create(instance->sess_mp);
+	if (sess == NULL)
 		return -ENOMEM;
 
 	ret = sym_session_configure(driver_id, sym_op->xform, sess,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.046805500 +0800
+++ 0173-crypto-octeontx-fix-session-less-mode.patch	2021-05-10 23:59:26.610000000 +0800
@@ -1 +1 @@
-From 8e177f149ec3c8ace46d225bb0bc69b7e099c7a4 Mon Sep 17 00:00:00 2001
+From 96d2d64bf106285cebef6da4a3a6fba492ae2f21 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 8e177f149ec3c8ace46d225bb0bc69b7e099c7a4 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'examples/l2fwd-crypto: skip masked devices' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (170 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'crypto/octeontx: fix session-less mode' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix packet length while decryption' " Xueming Li
                   ` (55 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Apeksha Gupta; +Cc: Luca Boccassi, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9c07408cef235f7785fd06880d206e4106b1c2c7

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9c07408cef235f7785fd06880d206e4106b1c2c7 Mon Sep 17 00:00:00 2001
From: Apeksha Gupta <apeksha.gupta@nxp.com>
Date: Fri, 9 Apr 2021 18:39:14 +0530
Subject: [PATCH] examples/l2fwd-crypto: skip masked devices
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 58266cc91efbf45e24fee3a15e23816da6941501 ]

The devices which are masked by cryptodev mask should not be initialized
and skipped while traversing the device list.

Fixes: 6ae3fb9df66e ("examples/l2fwd-crypto: fix session mempool size")

Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 examples/l2fwd-crypto/main.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index a96cb94cc4..12bd1812f5 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -2251,6 +2251,12 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 		if (enabled_cdevs[cdev_id] == 0)
 			continue;
 
+		if (check_cryptodev_mask(options, cdev_id) < 0)
+			continue;
+
+		if (check_capabilities(options, cdev_id) < 0)
+			continue;
+
 		retval = rte_cryptodev_socket_id(cdev_id);
 
 		if (retval < 0) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.072339000 +0800
+++ 0174-examples-l2fwd-crypto-skip-masked-devices.patch	2021-05-10 23:59:26.610000000 +0800
@@ -1 +1 @@
-From 58266cc91efbf45e24fee3a15e23816da6941501 Mon Sep 17 00:00:00 2001
+From 9c07408cef235f7785fd06880d206e4106b1c2c7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 58266cc91efbf45e24fee3a15e23816da6941501 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 0ee3e1470a..1016ceb841 100644
+index a96cb94cc4..12bd1812f5 100644

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

* [dpdk-stable] patch 'examples/l2fwd-crypto: fix packet length while decryption' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (171 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'examples/l2fwd-crypto: skip masked devices' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'crypto/qat: fix offset for out-of-place scatter-gather' " Xueming Li
                   ` (54 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Rohit Raj; +Cc: Luca Boccassi, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ce88f40d2cef248653987021a49e156fd3ca7d57

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ce88f40d2cef248653987021a49e156fd3ca7d57 Mon Sep 17 00:00:00 2001
From: Rohit Raj <rohit.raj@nxp.com>
Date: Fri, 9 Apr 2021 18:44:59 +0530
Subject: [PATCH] examples/l2fwd-crypto: fix packet length while decryption
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 62c0b4484c455e9ba03d04dcf8403fef17e7d22d ]

There were some padding left when a packet gets decrypted. This
patch removes those padding.
This patch also removes the padding left after verifying auth of
the packet.

Fixes: e2cdfbd07c8a ("examples/l2fwd-crypto: fix port id type")

Signed-off-by: Rohit Raj <rohit.raj@nxp.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 examples/l2fwd-crypto/main.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 12bd1812f5..656b140368 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -616,12 +616,26 @@ l2fwd_simple_forward(struct rte_mbuf *m, uint16_t portid,
 		struct l2fwd_crypto_options *options)
 {
 	uint16_t dst_port;
+	uint32_t pad_len;
+	struct rte_ipv4_hdr *ip_hdr;
+	uint32_t ipdata_offset = sizeof(struct rte_ether_hdr);
 
+	ip_hdr = (struct rte_ipv4_hdr *)(rte_pktmbuf_mtod(m, char *) +
+					 ipdata_offset);
 	dst_port = l2fwd_dst_ports[portid];
 
 	if (options->mac_updating)
 		l2fwd_mac_updating(m, dst_port);
 
+	if (options->auth_xform.auth.op == RTE_CRYPTO_AUTH_OP_VERIFY)
+		rte_pktmbuf_trim(m, options->auth_xform.auth.digest_length);
+
+	if (options->cipher_xform.cipher.op == RTE_CRYPTO_CIPHER_OP_DECRYPT) {
+		pad_len = m->pkt_len - rte_be_to_cpu_16(ip_hdr->total_length) -
+			  ipdata_offset;
+		rte_pktmbuf_trim(m, pad_len);
+	}
+
 	l2fwd_send_packet(m, dst_port);
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.093932100 +0800
+++ 0175-examples-l2fwd-crypto-fix-packet-length-while-decryp.patch	2021-05-10 23:59:26.610000000 +0800
@@ -1 +1 @@
-From 62c0b4484c455e9ba03d04dcf8403fef17e7d22d Mon Sep 17 00:00:00 2001
+From ce88f40d2cef248653987021a49e156fd3ca7d57 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 62c0b4484c455e9ba03d04dcf8403fef17e7d22d ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 1016ceb841..23a398043e 100644
+index 12bd1812f5..656b140368 100644

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

* [dpdk-stable] patch 'crypto/qat: fix offset for out-of-place scatter-gather' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (172 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix packet length while decryption' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'buildtools: fix all drivers disabled on Windows' " Xueming Li
                   ` (53 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Arek Kusztal; +Cc: Luca Boccassi, Declan Doherty, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/acbb986965b95c99b805836b2f2ec0faf20576f4

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From acbb986965b95c99b805836b2f2ec0faf20576f4 Mon Sep 17 00:00:00 2001
From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Date: Thu, 18 Mar 2021 13:16:17 +0000
Subject: [PATCH] crypto/qat: fix offset for out-of-place scatter-gather
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 935da450b414610a3aa2855fb9bb0c6f105e59ba ]

This commit fixes problem with to small offset when both offsets
(auth, cipher) are non zero in digest encrypt case,
when using out-of-place and sgl.

Fixes: 40002f6c2a24 ("crypto/qat: extend support for digest-encrypted auth-cipher")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
 drivers/crypto/qat/qat_sym.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index 4b7676deb8..a6cd33be37 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -162,6 +162,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
 	uint8_t do_sgl = 0;
 	uint8_t in_place = 1;
 	int alignment_adjustment = 0;
+	int oop_shift = 0;
 	struct rte_crypto_op *op = (struct rte_crypto_op *)in_op;
 	struct qat_sym_op_cookie *cookie =
 				(struct qat_sym_op_cookie *)op_cookie;
@@ -472,6 +473,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
 			rte_pktmbuf_iova_offset(op->sym->m_src, min_ofs);
 		dst_buf_start =
 			rte_pktmbuf_iova_offset(op->sym->m_dst, min_ofs);
+		oop_shift = min_ofs;
 
 	} else {
 		/* In-place operation
@@ -532,7 +534,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
 		 /* First find the end of the data */
 		if (do_sgl) {
 			uint32_t remaining_off = auth_param->auth_off +
-				auth_param->auth_len + alignment_adjustment;
+				auth_param->auth_len + alignment_adjustment + oop_shift;
 			struct rte_mbuf *sgl_buf =
 				(in_place ?
 					op->sym->m_src : op->sym->m_dst);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.117792300 +0800
+++ 0176-crypto-qat-fix-offset-for-out-of-place-scatter-gathe.patch	2021-05-10 23:59:26.610000000 +0800
@@ -1 +1 @@
-From 935da450b414610a3aa2855fb9bb0c6f105e59ba Mon Sep 17 00:00:00 2001
+From acbb986965b95c99b805836b2f2ec0faf20576f4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 935da450b414610a3aa2855fb9bb0c6f105e59ba ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 2c0f5cd925..a1f5676c04 100644
+index 4b7676deb8..a6cd33be37 100644
@@ -23 +25 @@
-@@ -228,6 +228,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
+@@ -162,6 +162,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
@@ -31 +33 @@
-@@ -538,6 +539,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
+@@ -472,6 +473,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
@@ -39 +41 @@
-@@ -598,7 +600,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
+@@ -532,7 +534,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,

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

* [dpdk-stable] patch 'buildtools: fix all drivers disabled on Windows' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (173 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'crypto/qat: fix offset for out-of-place scatter-gather' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'test: fix TCP header initialization' " Xueming Li
                   ` (52 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Luca Boccassi, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3d8025a12158b9a34bfea44a4c6c19b686140cb3

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3d8025a12158b9a34bfea44a4c6c19b686140cb3 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Fri, 16 Apr 2021 23:48:52 +0300
Subject: [PATCH] buildtools: fix all drivers disabled on Windows
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 74299cc7591192cbc72e8f411dff0c7f3cfdf309 ]

buildtools/list-dir-globs.py printed paths with OS directory separator,
which is "/" on Unices and "\" on Windows, while Meson code always
expected "/". This resulted in all drivers being disabled on Windows.

Replace "\" with "/" in script output. Forward slash is a valid,
although non-default, separator on Windows, so no paths can be broken
by this substitution.

Fixes: ab9407c3addd ("build: allow using wildcards to disable drivers")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 buildtools/list-dir-globs.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/buildtools/list-dir-globs.py b/buildtools/list-dir-globs.py
index 80b5e801f2..f5f7d73485 100755
--- a/buildtools/list-dir-globs.py
+++ b/buildtools/list-dir-globs.py
@@ -16,4 +16,4 @@ root = os.path.join(os.getenv('MESON_SOURCE_ROOT', '.'),
 for path in sys.argv[1].split(','):
     for p in iglob(os.path.join(root, path)):
         if os.path.isdir(p):
-            print(os.path.relpath(p))
+            print(os.path.relpath(p).replace('\\', '/'))
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.140975900 +0800
+++ 0177-buildtools-fix-all-drivers-disabled-on-Windows.patch	2021-05-10 23:59:26.610000000 +0800
@@ -1 +1 @@
-From 74299cc7591192cbc72e8f411dff0c7f3cfdf309 Mon Sep 17 00:00:00 2001
+From 3d8025a12158b9a34bfea44a4c6c19b686140cb3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 74299cc7591192cbc72e8f411dff0c7f3cfdf309 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 911e267335..d824360d39 100755
+index 80b5e801f2..f5f7d73485 100755
@@ -27,6 +29,6 @@
-@@ -17,4 +17,4 @@ for path in sys.argv[1].split(','):
-     if path:
-         for p in iglob(os.path.join(root, path)):
-             if os.path.isdir(p):
--                print(os.path.relpath(p))
-+                print(os.path.relpath(p).replace('\\', '/'))
+@@ -16,4 +16,4 @@ root = os.path.join(os.getenv('MESON_SOURCE_ROOT', '.'),
+ for path in sys.argv[1].split(','):
+     for p in iglob(os.path.join(root, path)):
+         if os.path.isdir(p):
+-            print(os.path.relpath(p))
++            print(os.path.relpath(p).replace('\\', '/'))

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

* [dpdk-stable] patch 'test: fix TCP header initialization' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (174 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'buildtools: fix all drivers disabled on Windows' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix some packet types' " Xueming Li
                   ` (51 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Luca Boccassi, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/60065a5a61d44f9b10c8e80a6423214a6430ae3f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 60065a5a61d44f9b10c8e80a6423214a6430ae3f Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Tue, 30 Mar 2021 09:23:28 -0400
Subject: [PATCH] test: fix TCP header initialization
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 9fdba32788d4adbac196ba0bb9398ba8c2d0d4bc ]

Initialize TCP data offset field with TCP header length, this
field is used to derive L4 header length and by hardware to
validate a TCP header.

Fixes: 41f72ec94074 ("test: add packet burst generator functions")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test/packet_burst_generator.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index f203f9d09e..c05ea7ad51 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -117,6 +117,7 @@ initialize_tcp_header(struct rte_tcp_hdr *tcp_hdr, uint16_t src_port,
 	memset(tcp_hdr, 0, sizeof(struct rte_tcp_hdr));
 	tcp_hdr->src_port = rte_cpu_to_be_16(src_port);
 	tcp_hdr->dst_port = rte_cpu_to_be_16(dst_port);
+	tcp_hdr->data_off = (sizeof(struct rte_tcp_hdr) << 2) & 0xF0;
 
 	return pkt_len;
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.163852600 +0800
+++ 0178-test-fix-TCP-header-initialization.patch	2021-05-10 23:59:26.620000000 +0800
@@ -1 +1 @@
-From 9fdba32788d4adbac196ba0bb9398ba8c2d0d4bc Mon Sep 17 00:00:00 2001
+From 60065a5a61d44f9b10c8e80a6423214a6430ae3f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 9fdba32788d4adbac196ba0bb9398ba8c2d0d4bc ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/hns3: fix some packet types' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (175 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'test: fix TCP header initialization' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix timing in resetting queues' " Xueming Li
                   ` (50 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/94bb3ef9887a05f16277c5b020f449f2def69c07

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 94bb3ef9887a05f16277c5b020f449f2def69c07 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Sat, 10 Apr 2021 09:11:17 +0800
Subject: [PATCH] net/hns3: fix some packet types
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 1f303606e81737da2e6ac49f4da915ec32b3bacb ]

Currently, the packet type calculated by
vlan/ovlan/l3id/l4id/ol3id/ol4id fields have the following problems:
1) Identify error when exist VLAN strip which will lead to the data
   buffer has non VLAN header but mbuf's ptype have L2_ETHER_VLAN flag.
2) Some packet identifies error, eg: hardware report it's RARP or
   unknown packet, but ptype will marked with L2_ETHER .

So driver will calculate packet type only by l3id/l4id/ol3id/ol4id
fields.

Fixes: 0e98d5e6d9c3 ("net/hns3: fix packet type report in Rx")
Fixes: bba636698316 ("net/hns3: support Rx/Tx and related operations")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.h |  4 +--
 drivers/net/hns3/hns3_rxtx.c   | 60 ++++++++++------------------------
 drivers/net/hns3/hns3_rxtx.h   | 14 +++-----
 3 files changed, 24 insertions(+), 54 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index d61198bb87..b119b73ab3 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -678,12 +678,10 @@ struct hns3_mp_param {
 #define HNS3_OL4TBL_NUM	16
 
 struct hns3_ptype_table {
-	uint32_t l2l3table[HNS3_L2TBL_NUM][HNS3_L3TBL_NUM];
+	uint32_t l3table[HNS3_L3TBL_NUM];
 	uint32_t l4table[HNS3_L4TBL_NUM];
-	uint32_t inner_l2table[HNS3_L2TBL_NUM];
 	uint32_t inner_l3table[HNS3_L3TBL_NUM];
 	uint32_t inner_l4table[HNS3_L4TBL_NUM];
-	uint32_t ol2table[HNS3_OL2TBL_NUM];
 	uint32_t ol3table[HNS3_OL3TBL_NUM];
 	uint32_t ol4table[HNS3_OL4TBL_NUM];
 };
diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 4537db952f..4f67d73de4 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -2005,32 +2005,12 @@ hns3_dev_supported_ptypes_get(struct rte_eth_dev *dev)
 static void
 hns3_init_non_tunnel_ptype_tbl(struct hns3_ptype_table *tbl)
 {
-	tbl->l2l3table[0][0] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4;
-	tbl->l2l3table[0][1] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6;
-	tbl->l2l3table[0][2] = RTE_PTYPE_L2_ETHER_ARP;
-	tbl->l2l3table[0][3] = RTE_PTYPE_L2_ETHER;
-	tbl->l2l3table[0][4] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT;
-	tbl->l2l3table[0][5] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT;
-	tbl->l2l3table[0][6] = RTE_PTYPE_L2_ETHER_LLDP;
-	tbl->l2l3table[0][15] = RTE_PTYPE_L2_ETHER;
-
-	tbl->l2l3table[1][0] = RTE_PTYPE_L2_ETHER_VLAN | RTE_PTYPE_L3_IPV4;
-	tbl->l2l3table[1][1] = RTE_PTYPE_L2_ETHER_VLAN | RTE_PTYPE_L3_IPV6;
-	tbl->l2l3table[1][2] = RTE_PTYPE_L2_ETHER_ARP;
-	tbl->l2l3table[1][3] = RTE_PTYPE_L2_ETHER_VLAN;
-	tbl->l2l3table[1][4] = RTE_PTYPE_L2_ETHER_VLAN | RTE_PTYPE_L3_IPV4_EXT;
-	tbl->l2l3table[1][5] = RTE_PTYPE_L2_ETHER_VLAN | RTE_PTYPE_L3_IPV6_EXT;
-	tbl->l2l3table[1][6] = RTE_PTYPE_L2_ETHER_LLDP;
-	tbl->l2l3table[1][15] = RTE_PTYPE_L2_ETHER_VLAN;
-
-	tbl->l2l3table[2][0] = RTE_PTYPE_L2_ETHER_QINQ | RTE_PTYPE_L3_IPV4;
-	tbl->l2l3table[2][1] = RTE_PTYPE_L2_ETHER_QINQ | RTE_PTYPE_L3_IPV6;
-	tbl->l2l3table[2][2] = RTE_PTYPE_L2_ETHER_ARP;
-	tbl->l2l3table[2][3] = RTE_PTYPE_L2_ETHER_QINQ;
-	tbl->l2l3table[2][4] = RTE_PTYPE_L2_ETHER_QINQ | RTE_PTYPE_L3_IPV4_EXT;
-	tbl->l2l3table[2][5] = RTE_PTYPE_L2_ETHER_QINQ | RTE_PTYPE_L3_IPV6_EXT;
-	tbl->l2l3table[2][6] = RTE_PTYPE_L2_ETHER_LLDP;
-	tbl->l2l3table[2][15] = RTE_PTYPE_L2_ETHER_QINQ;
+	tbl->l3table[0] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4;
+	tbl->l3table[1] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6;
+	tbl->l3table[2] = RTE_PTYPE_L2_ETHER_ARP;
+	tbl->l3table[4] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT;
+	tbl->l3table[5] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT;
+	tbl->l3table[6] = RTE_PTYPE_L2_ETHER_LLDP;
 
 	tbl->l4table[0] = RTE_PTYPE_L4_UDP;
 	tbl->l4table[1] = RTE_PTYPE_L4_TCP;
@@ -2043,17 +2023,17 @@ hns3_init_non_tunnel_ptype_tbl(struct hns3_ptype_table *tbl)
 static void
 hns3_init_tunnel_ptype_tbl(struct hns3_ptype_table *tbl)
 {
-	tbl->inner_l2table[0] = RTE_PTYPE_INNER_L2_ETHER;
-	tbl->inner_l2table[1] = RTE_PTYPE_INNER_L2_ETHER_VLAN;
-	tbl->inner_l2table[2] = RTE_PTYPE_INNER_L2_ETHER_QINQ;
-
-	tbl->inner_l3table[0] = RTE_PTYPE_INNER_L3_IPV4;
-	tbl->inner_l3table[1] = RTE_PTYPE_INNER_L3_IPV6;
+	tbl->inner_l3table[0] = RTE_PTYPE_INNER_L2_ETHER |
+				RTE_PTYPE_INNER_L3_IPV4;
+	tbl->inner_l3table[1] = RTE_PTYPE_INNER_L2_ETHER |
+				RTE_PTYPE_INNER_L3_IPV6;
 	/* There is not a ptype for inner ARP/RARP */
 	tbl->inner_l3table[2] = RTE_PTYPE_UNKNOWN;
 	tbl->inner_l3table[3] = RTE_PTYPE_UNKNOWN;
-	tbl->inner_l3table[4] = RTE_PTYPE_INNER_L3_IPV4_EXT;
-	tbl->inner_l3table[5] = RTE_PTYPE_INNER_L3_IPV6_EXT;
+	tbl->inner_l3table[4] = RTE_PTYPE_INNER_L2_ETHER |
+				RTE_PTYPE_INNER_L3_IPV4_EXT;
+	tbl->inner_l3table[5] = RTE_PTYPE_INNER_L2_ETHER |
+				RTE_PTYPE_INNER_L3_IPV6_EXT;
 
 	tbl->inner_l4table[0] = RTE_PTYPE_INNER_L4_UDP;
 	tbl->inner_l4table[1] = RTE_PTYPE_INNER_L4_TCP;
@@ -2064,16 +2044,12 @@ hns3_init_tunnel_ptype_tbl(struct hns3_ptype_table *tbl)
 	tbl->inner_l4table[4] = RTE_PTYPE_UNKNOWN;
 	tbl->inner_l4table[5] = RTE_PTYPE_INNER_L4_ICMP;
 
-	tbl->ol2table[0] = RTE_PTYPE_L2_ETHER;
-	tbl->ol2table[1] = RTE_PTYPE_L2_ETHER_VLAN;
-	tbl->ol2table[2] = RTE_PTYPE_L2_ETHER_QINQ;
-
-	tbl->ol3table[0] = RTE_PTYPE_L3_IPV4;
-	tbl->ol3table[1] = RTE_PTYPE_L3_IPV6;
+	tbl->ol3table[0] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4;
+	tbl->ol3table[1] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6;
 	tbl->ol3table[2] = RTE_PTYPE_UNKNOWN;
 	tbl->ol3table[3] = RTE_PTYPE_UNKNOWN;
-	tbl->ol3table[4] = RTE_PTYPE_L3_IPV4_EXT;
-	tbl->ol3table[5] = RTE_PTYPE_L3_IPV6_EXT;
+	tbl->ol3table[4] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT;
+	tbl->ol3table[5] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT;
 
 	tbl->ol4table[0] = RTE_PTYPE_UNKNOWN;
 	tbl->ol4table[1] = RTE_PTYPE_TUNNEL_VXLAN;
diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h
index cd40ac605a..2a57c24f4a 100644
--- a/drivers/net/hns3/hns3_rxtx.h
+++ b/drivers/net/hns3/hns3_rxtx.h
@@ -596,25 +596,21 @@ hns3_rx_calc_ptype(struct hns3_rx_queue *rxq, const uint32_t l234_info,
 		   const uint32_t ol_info)
 {
 	const struct hns3_ptype_table * const ptype_tbl = rxq->ptype_tbl;
-	uint32_t l2id, l3id, l4id;
-	uint32_t ol3id, ol4id, ol2id;
+	uint32_t ol3id, ol4id;
+	uint32_t l3id, l4id;
 
 	ol4id = hns3_get_field(ol_info, HNS3_RXD_OL4ID_M, HNS3_RXD_OL4ID_S);
 	ol3id = hns3_get_field(ol_info, HNS3_RXD_OL3ID_M, HNS3_RXD_OL3ID_S);
-	ol2id = hns3_get_field(ol_info, HNS3_RXD_OVLAN_M, HNS3_RXD_OVLAN_S);
-	l2id = hns3_get_field(l234_info, HNS3_RXD_VLAN_M, HNS3_RXD_VLAN_S);
 	l3id = hns3_get_field(l234_info, HNS3_RXD_L3ID_M, HNS3_RXD_L3ID_S);
 	l4id = hns3_get_field(l234_info, HNS3_RXD_L4ID_M, HNS3_RXD_L4ID_S);
 
 	if (unlikely(ptype_tbl->ol4table[ol4id]))
-		return ptype_tbl->inner_l2table[l2id] |
-			ptype_tbl->inner_l3table[l3id] |
+		return ptype_tbl->inner_l3table[l3id] |
 			ptype_tbl->inner_l4table[l4id] |
 			ptype_tbl->ol3table[ol3id] |
-			ptype_tbl->ol4table[ol4id] | ptype_tbl->ol2table[ol2id];
+			ptype_tbl->ol4table[ol4id];
 	else
-		return ptype_tbl->l2l3table[l2id][l3id] |
-			ptype_tbl->l4table[l4id];
+		return ptype_tbl->l3table[l3id] | ptype_tbl->l4table[l4id];
 }
 
 void hns3_dev_rx_queue_release(void *queue);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.187186200 +0800
+++ 0179-net-hns3-fix-some-packet-types.patch	2021-05-10 23:59:26.620000000 +0800
@@ -1 +1 @@
-From 1f303606e81737da2e6ac49f4da915ec32b3bacb Mon Sep 17 00:00:00 2001
+From 94bb3ef9887a05f16277c5b020f449f2def69c07 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 1f303606e81737da2e6ac49f4da915ec32b3bacb ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -29 +31 @@
-index 1b06243146..72d718c94e 100644
+index d61198bb87..b119b73ab3 100644
@@ -32,4 +34,4 @@
-@@ -682,12 +682,10 @@ struct hns3_ptype_table {
- 	 * The next fields used to calc packet-type by the
- 	 * L3_ID/L4_ID/OL3_ID/OL4_ID from the Rx descriptor.
- 	 */
+@@ -678,12 +678,10 @@ struct hns3_mp_param {
+ #define HNS3_OL4TBL_NUM	16
+ 
+ struct hns3_ptype_table {
@@ -45 +47 @@
- 
+ };
@@ -47 +49 @@
-index 547d807ae1..1074d8a3a4 100644
+index 4537db952f..4f67d73de4 100644
@@ -50 +52 @@
-@@ -2003,32 +2003,12 @@ hns3_dev_supported_ptypes_get(struct rte_eth_dev *dev)
+@@ -2005,32 +2005,12 @@ hns3_dev_supported_ptypes_get(struct rte_eth_dev *dev)
@@ -89 +91 @@
-@@ -2041,17 +2021,17 @@ hns3_init_non_tunnel_ptype_tbl(struct hns3_ptype_table *tbl)
+@@ -2043,17 +2023,17 @@ hns3_init_non_tunnel_ptype_tbl(struct hns3_ptype_table *tbl)
@@ -115 +117 @@
-@@ -2062,16 +2042,12 @@ hns3_init_tunnel_ptype_tbl(struct hns3_ptype_table *tbl)
+@@ -2064,16 +2044,12 @@ hns3_init_tunnel_ptype_tbl(struct hns3_ptype_table *tbl)
@@ -137 +139 @@
-index e39d18d21b..10a6c64dba 100644
+index cd40ac605a..2a57c24f4a 100644
@@ -140 +142 @@
-@@ -635,8 +635,8 @@ hns3_rx_calc_ptype(struct hns3_rx_queue *rxq, const uint32_t l234_info,
+@@ -596,25 +596,21 @@ hns3_rx_calc_ptype(struct hns3_rx_queue *rxq, const uint32_t l234_info,
@@ -148,4 +149,0 @@
- 	uint32_t ptype;
- 
- 	if (rxq->ptype_en) {
-@@ -647,20 +647,16 @@ hns3_rx_calc_ptype(struct hns3_rx_queue *rxq, const uint32_t l234_info,

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

* [dpdk-stable] patch 'net/hns3: fix timing in resetting queues' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (176 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix some packet types' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix queue state when concurrent with reset' " Xueming Li
                   ` (49 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/da8413c234cd0cd487f5d4474875a49a555600c6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From da8413c234cd0cd487f5d4474875a49a555600c6 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Sat, 10 Apr 2021 09:11:18 +0800
Subject: [PATCH] net/hns3: fix timing in resetting queues
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit fde636caf49a96138602d3232af6ec5ac4f15538 ]

During the task queue pairs reset, the getimeofday is used to obtain the
timestamp to determine whether the command execution times out. But
gettimeofday is not monotonous, it can be modified by system
administrators, so the timing may not be accurate or even cause the loop
to wait consistently.
And actually, in this scenario, it is not necessary to obtain the
timestamp.

This patch removes the operation of obtaining the timestamp from the task
queue pairs reset function.

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

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 4f67d73de4..ba566cdba7 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -625,8 +625,8 @@ static int
 hns3pf_reset_tqp(struct hns3_hw *hw, uint16_t queue_id)
 {
 #define HNS3_TQP_RESET_TRY_MS	200
+	uint16_t wait_time = 0;
 	uint8_t reset_status;
-	uint64_t end;
 	int ret;
 
 	/*
@@ -639,17 +639,18 @@ hns3pf_reset_tqp(struct hns3_hw *hw, uint16_t queue_id)
 		hns3_err(hw, "Send reset tqp cmd fail, ret = %d", ret);
 		return ret;
 	}
-	end = get_timeofday_ms() + HNS3_TQP_RESET_TRY_MS;
+
 	do {
 		/* Wait for tqp hw reset */
 		rte_delay_ms(HNS3_POLL_RESPONE_MS);
+		wait_time += HNS3_POLL_RESPONE_MS;
 		ret = hns3_get_tqp_reset_status(hw, queue_id, &reset_status);
 		if (ret)
 			goto tqp_reset_fail;
 
 		if (reset_status)
 			break;
-	} while (get_timeofday_ms() < end);
+	} while (wait_time < HNS3_TQP_RESET_TRY_MS);
 
 	if (!reset_status) {
 		ret = -ETIMEDOUT;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.210349100 +0800
+++ 0180-net-hns3-fix-timing-in-resetting-queues.patch	2021-05-10 23:59:26.620000000 +0800
@@ -1 +1 @@
-From fde636caf49a96138602d3232af6ec5ac4f15538 Mon Sep 17 00:00:00 2001
+From da8413c234cd0cd487f5d4474875a49a555600c6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit fde636caf49a96138602d3232af6ec5ac4f15538 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index 1074d8a3a4..469d8de5df 100644
+index 4f67d73de4..ba566cdba7 100644

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

* [dpdk-stable] patch 'net/hns3: fix queue state when concurrent with reset' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (177 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix timing in resetting queues' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix configure FEC " Xueming Li
                   ` (48 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/33c960aad1e3dac5ea80c656d396871a1e2063b9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 33c960aad1e3dac5ea80c656d396871a1e2063b9 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Sat, 10 Apr 2021 09:11:19 +0800
Subject: [PATCH] net/hns3: fix queue state when concurrent with reset
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 18da3c854bb8105818dc23c36eecf3465596052a ]

At the end of the reset, the state of queues need to be restored
according to the states saved in the driver. If the start and stop
operations of the queues are concurrent at this time, it may cause the
final status to be uncertain.

This patch requires queues to acquire the hw lock before starting and
stopping. If the device is being restored due to reset at this time, it
will block until the reset is completed.

Fixes: fa29fe45a7b4 ("net/hns3: support queue start and stop")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index ba566cdba7..1a554313ba 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -3954,10 +3954,12 @@ hns3_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	if (!hns3_dev_indep_txrx_supported(hw))
 		return -ENOTSUP;
 
+	rte_spinlock_lock(&hw->lock);
 	ret = hns3_reset_queue(hw, rx_queue_id, HNS3_RING_TYPE_RX);
 	if (ret) {
 		hns3_err(hw, "fail to reset Rx queue %u, ret = %d.",
 			 rx_queue_id, ret);
+		rte_spinlock_unlock(&hw->lock);
 		return ret;
 	}
 
@@ -3965,11 +3967,13 @@ hns3_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	if (ret) {
 		hns3_err(hw, "fail to init Rx queue %u, ret = %d.",
 			 rx_queue_id, ret);
+		rte_spinlock_unlock(&hw->lock);
 		return ret;
 	}
 
 	hns3_enable_rxq(rxq, true);
 	dev->data->rx_queue_state[rx_queue_id] = RTE_ETH_QUEUE_STATE_STARTED;
+	rte_spinlock_unlock(&hw->lock);
 
 	return ret;
 }
@@ -3996,12 +4000,14 @@ hns3_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	if (!hns3_dev_indep_txrx_supported(hw))
 		return -ENOTSUP;
 
+	rte_spinlock_lock(&hw->lock);
 	hns3_enable_rxq(rxq, false);
 
 	hns3_rx_queue_release_mbufs(rxq);
 
 	hns3_reset_sw_rxq(rxq);
 	dev->data->rx_queue_state[rx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED;
+	rte_spinlock_unlock(&hw->lock);
 
 	return 0;
 }
@@ -4016,16 +4022,19 @@ hns3_dev_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)
 	if (!hns3_dev_indep_txrx_supported(hw))
 		return -ENOTSUP;
 
+	rte_spinlock_lock(&hw->lock);
 	ret = hns3_reset_queue(hw, tx_queue_id, HNS3_RING_TYPE_TX);
 	if (ret) {
 		hns3_err(hw, "fail to reset Tx queue %u, ret = %d.",
 			 tx_queue_id, ret);
+		rte_spinlock_unlock(&hw->lock);
 		return ret;
 	}
 
 	hns3_init_txq(txq);
 	hns3_enable_txq(txq, true);
 	dev->data->tx_queue_state[tx_queue_id] = RTE_ETH_QUEUE_STATE_STARTED;
+	rte_spinlock_unlock(&hw->lock);
 
 	return ret;
 }
@@ -4039,6 +4048,7 @@ hns3_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
 	if (!hns3_dev_indep_txrx_supported(hw))
 		return -ENOTSUP;
 
+	rte_spinlock_lock(&hw->lock);
 	hns3_enable_txq(txq, false);
 	hns3_tx_queue_release_mbufs(txq);
 	/*
@@ -4050,6 +4060,7 @@ hns3_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
 	 */
 	hns3_init_txq(txq);
 	dev->data->tx_queue_state[tx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED;
+	rte_spinlock_unlock(&hw->lock);
 
 	return 0;
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.235955600 +0800
+++ 0181-net-hns3-fix-queue-state-when-concurrent-with-reset.patch	2021-05-10 23:59:26.620000000 +0800
@@ -1 +1 @@
-From 18da3c854bb8105818dc23c36eecf3465596052a Mon Sep 17 00:00:00 2001
+From 33c960aad1e3dac5ea80c656d396871a1e2063b9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 18da3c854bb8105818dc23c36eecf3465596052a ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 469d8de5df..19adf001a9 100644
+index ba566cdba7..1a554313ba 100644
@@ -28 +30 @@
-@@ -4287,10 +4287,12 @@ hns3_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -3954,10 +3954,12 @@ hns3_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
@@ -41 +43 @@
-@@ -4298,11 +4300,13 @@ hns3_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -3965,11 +3967,13 @@ hns3_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id)
@@ -55 +57 @@
-@@ -4329,12 +4333,14 @@ hns3_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -3996,12 +4000,14 @@ hns3_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
@@ -70 +72 @@
-@@ -4349,16 +4355,19 @@ hns3_dev_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)
+@@ -4016,16 +4022,19 @@ hns3_dev_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)
@@ -90 +92 @@
-@@ -4372,6 +4381,7 @@ hns3_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
+@@ -4039,6 +4048,7 @@ hns3_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
@@ -98 +100 @@
-@@ -4383,6 +4393,7 @@ hns3_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
+@@ -4050,6 +4060,7 @@ hns3_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)

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

* [dpdk-stable] patch 'net/hns3: fix configure FEC when concurrent with reset' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (178 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix queue state when concurrent with reset' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'common/sfc_efx/base: fix indication of MAE encap support' " Xueming Li
                   ` (47 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/41111ae6237945405a1d8689eafc8e54cd815461

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 41111ae6237945405a1d8689eafc8e54cd815461 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Sat, 10 Apr 2021 09:11:20 +0800
Subject: [PATCH] net/hns3: fix configure FEC when concurrent with reset
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 6d360284dffe51f852fc373058bfb274b9b8982c ]

Currently, after the reset is complete, the PMD restores the FEC
according to the FEC configuration reserved in the driver. If there is a
concurrency between the FEC setup operation and the restore operation
after a reset, the FEC status of the last hardware may be unknown.

This patch adds the step of obtaining the lock when setting the FEC to
avoid concurrency between restore operation and setting operation.

Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index b90ee642d6..023b7d6912 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -6128,11 +6128,16 @@ hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)
 		return -EINVAL;
 	}
 
+	rte_spinlock_lock(&hw->lock);
 	ret = hns3_set_fec_hw(hw, mode);
-	if (ret)
+	if (ret) {
+		rte_spinlock_unlock(&hw->lock);
 		return ret;
+	}
 
 	pf->fec_mode = mode;
+	rte_spinlock_unlock(&hw->lock);
+
 	return 0;
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.260521800 +0800
+++ 0182-net-hns3-fix-configure-FEC-when-concurrent-with-rese.patch	2021-05-10 23:59:26.620000000 +0800
@@ -1 +1 @@
-From 6d360284dffe51f852fc373058bfb274b9b8982c Mon Sep 17 00:00:00 2001
+From 41111ae6237945405a1d8689eafc8e54cd815461 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 6d360284dffe51f852fc373058bfb274b9b8982c ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 53a0b545ce..846e5a27c2 100644
+index b90ee642d6..023b7d6912 100644
@@ -27 +29 @@
-@@ -6433,11 +6433,16 @@ hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)
+@@ -6128,11 +6128,16 @@ hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)

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

* [dpdk-stable] patch 'common/sfc_efx/base: fix indication of MAE encap support' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (179 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix configure FEC " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/e1000: fix max Rx packet size' " Xueming Li
                   ` (46 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Ivan Malov; +Cc: Luca Boccassi, Andrew Rybchenko, Andy Moreton, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9c9d25bce1908fc8da90e683063a6b044f04bf93

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9c9d25bce1908fc8da90e683063a6b044f04bf93 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Sat, 10 Apr 2021 03:51:43 +0300
Subject: [PATCH] common/sfc_efx/base: fix indication of MAE encap support
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 8076e40cde3b5230ac488aa44baa4dcf73993aca ]

The indication fields in the MCDI response are individual
bits, but the current code mistakenly compares the larger
dword with 1. This breaks encap. type discovery. Fix that.

Fixes: 891408c45a63 ("common/sfc_efx/base: indicate MAE support for encapsulation")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
 drivers/common/sfc_efx/base/efx_mae.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index 338a0013f9..56b9fadf86 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -47,17 +47,20 @@ efx_mae_get_capabilities(
 
 	maep->em_encap_types_supported = 0;
 
-	if (MCDI_OUT_DWORD(req, MAE_GET_CAPS_OUT_ENCAP_TYPE_VXLAN) == 1) {
+	if (MCDI_OUT_DWORD_FIELD(req, MAE_GET_CAPS_OUT_ENCAP_TYPES_SUPPORTED,
+	    MAE_GET_CAPS_OUT_ENCAP_TYPE_VXLAN) != 0) {
 		maep->em_encap_types_supported |=
 		    (1U << EFX_TUNNEL_PROTOCOL_VXLAN);
 	}
 
-	if (MCDI_OUT_DWORD(req, MAE_GET_CAPS_OUT_ENCAP_TYPE_GENEVE) == 1) {
+	if (MCDI_OUT_DWORD_FIELD(req, MAE_GET_CAPS_OUT_ENCAP_TYPES_SUPPORTED,
+	    MAE_GET_CAPS_OUT_ENCAP_TYPE_GENEVE) != 0) {
 		maep->em_encap_types_supported |=
 		    (1U << EFX_TUNNEL_PROTOCOL_GENEVE);
 	}
 
-	if (MCDI_OUT_DWORD(req, MAE_GET_CAPS_OUT_ENCAP_TYPE_NVGRE) == 1) {
+	if (MCDI_OUT_DWORD_FIELD(req, MAE_GET_CAPS_OUT_ENCAP_TYPES_SUPPORTED,
+	    MAE_GET_CAPS_OUT_ENCAP_TYPE_NVGRE) != 0) {
 		maep->em_encap_types_supported |=
 		    (1U << EFX_TUNNEL_PROTOCOL_NVGRE);
 	}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.285733200 +0800
+++ 0183-common-sfc_efx-base-fix-indication-of-MAE-encap-supp.patch	2021-05-10 23:59:26.620000000 +0800
@@ -1 +1 @@
-From 8076e40cde3b5230ac488aa44baa4dcf73993aca Mon Sep 17 00:00:00 2001
+From 9c9d25bce1908fc8da90e683063a6b044f04bf93 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 8076e40cde3b5230ac488aa44baa4dcf73993aca ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index e6156102d6..80fe155d0d 100644
+index 338a0013f9..56b9fadf86 100644
@@ -24 +26 @@
-@@ -46,17 +46,20 @@ efx_mae_get_capabilities(
+@@ -47,17 +47,20 @@ efx_mae_get_capabilities(

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

* [dpdk-stable] patch 'net/e1000: fix max Rx packet size' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (180 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'common/sfc_efx/base: fix indication of MAE encap support' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/ice: fix illegal access when removing MAC filter' " Xueming Li
                   ` (45 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Luca Boccassi, Lingli Chen, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ac002ace6e93353bc70ee7ee4dcb01a84d8c99e8

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ac002ace6e93353bc70ee7ee4dcb01a84d8c99e8 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Thu, 8 Apr 2021 15:41:02 +0800
Subject: [PATCH] net/e1000: fix max Rx packet size
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit ddbc8c16a97fd6662ecccf7e8431a9a3c7f43366 ]

According to E1000_ETH_OVERHEAD definition, max_rx_pkt_len contains
one VLAN tag size. Therefore when config RLPML register, if dual VLAN
not enabled there is no need to add VLAN tag size to max_rx_pkt_len,
otherwise only one another VLAN tag size should be added to.

Fixes: e51abef39382 ("igb: fix max RX packet size and support dual VLAN")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Tested-by: Lingli Chen <linglix.chen@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/e1000/igb_ethdev.c | 5 ++---
 drivers/net/e1000/igb_rxtx.c   | 9 ++++++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index f3c76bac9b..31927c5464 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -2688,8 +2688,7 @@ igb_vlan_hw_extend_disable(struct rte_eth_dev *dev)
 	/* Update maximum packet length */
 	if (dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME)
 		E1000_WRITE_REG(hw, E1000_RLPML,
-			dev->data->dev_conf.rxmode.max_rx_pkt_len +
-						VLAN_TAG_SIZE);
+				dev->data->dev_conf.rxmode.max_rx_pkt_len);
 }
 
 static void
@@ -2708,7 +2707,7 @@ igb_vlan_hw_extend_enable(struct rte_eth_dev *dev)
 	if (dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME)
 		E1000_WRITE_REG(hw, E1000_RLPML,
 			dev->data->dev_conf.rxmode.max_rx_pkt_len +
-						2 * VLAN_TAG_SIZE);
+						VLAN_TAG_SIZE);
 }
 
 static int
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index dd520cd82c..3bf13d1420 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -2343,15 +2343,18 @@ eth_igb_rx_init(struct rte_eth_dev *dev)
 	 * Configure support of jumbo frames, if any.
 	 */
 	if (dev->data->dev_conf.rxmode.offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
+		uint32_t max_len = dev->data->dev_conf.rxmode.max_rx_pkt_len;
+
 		rctl |= E1000_RCTL_LPE;
 
 		/*
 		 * Set maximum packet length by default, and might be updated
 		 * together with enabling/disabling dual VLAN.
 		 */
-		E1000_WRITE_REG(hw, E1000_RLPML,
-			dev->data->dev_conf.rxmode.max_rx_pkt_len +
-						VLAN_TAG_SIZE);
+		if (rxmode->offloads & DEV_RX_OFFLOAD_VLAN_EXTEND)
+			max_len += VLAN_TAG_SIZE;
+
+		E1000_WRITE_REG(hw, E1000_RLPML, max_len);
 	} else
 		rctl &= ~E1000_RCTL_LPE;
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.311953400 +0800
+++ 0184-net-e1000-fix-max-Rx-packet-size.patch	2021-05-10 23:59:26.630000000 +0800
@@ -1 +1 @@
-From ddbc8c16a97fd6662ecccf7e8431a9a3c7f43366 Mon Sep 17 00:00:00 2001
+From ac002ace6e93353bc70ee7ee4dcb01a84d8c99e8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit ddbc8c16a97fd6662ecccf7e8431a9a3c7f43366 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 7d6d04abcb..3fdffe3294 100644
+index f3c76bac9b..31927c5464 100644
@@ -26 +28 @@
-@@ -2686,8 +2686,7 @@ igb_vlan_hw_extend_disable(struct rte_eth_dev *dev)
+@@ -2688,8 +2688,7 @@ igb_vlan_hw_extend_disable(struct rte_eth_dev *dev)
@@ -36 +38 @@
-@@ -2706,7 +2705,7 @@ igb_vlan_hw_extend_enable(struct rte_eth_dev *dev)
+@@ -2708,7 +2707,7 @@ igb_vlan_hw_extend_enable(struct rte_eth_dev *dev)
@@ -46 +48 @@
-index 45da4ed9d2..278d5d2712 100644
+index dd520cd82c..3bf13d1420 100644

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

* [dpdk-stable] patch 'net/ice: fix illegal access when removing MAC filter' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (181 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/e1000: fix max Rx packet size' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/mlx5: fix redundant flow after RSS expansion' " Xueming Li
                   ` (44 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Wenwu Ma; +Cc: Luca Boccassi, Zhihong Peng, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1cb30b35c9061267146bbfd72e2a61c91f12a8b6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1cb30b35c9061267146bbfd72e2a61c91f12a8b6 Mon Sep 17 00:00:00 2001
From: Wenwu Ma <wenwux.ma@intel.com>
Date: Fri, 2 Apr 2021 13:52:47 +0000
Subject: [PATCH] net/ice: fix illegal access when removing MAC filter
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit f4b6eb2b91f38dc9ebc6c4e2b913fd1d25f14773 ]

When removing the mac filter in ice_remove_all_mac_vlan_filters(),
TAILQ_FOREACH_SAFE should be used instead of TAILQ_FOREACH,
Otherwise, it will result in a illegal pointer access.

Fixes: e0dcf94a0d7f ("net/ice: support VLAN ops")

Signed-off-by: Wenwu Ma <wenwux.ma@intel.com>
Tested-by: Zhihong Peng <zhihongx.peng@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index b6d940c2ff..7c20936123 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -10,6 +10,8 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
+#include <rte_tailq.h>
+
 #include "base/ice_sched.h"
 #include "base/ice_flow.h"
 #include "base/ice_dcb.h"
@@ -1088,12 +1090,13 @@ ice_remove_all_mac_vlan_filters(struct ice_vsi *vsi)
 {
 	struct ice_mac_filter *m_f;
 	struct ice_vlan_filter *v_f;
+	void *temp;
 	int ret = 0;
 
 	if (!vsi || !vsi->mac_num)
 		return -EINVAL;
 
-	TAILQ_FOREACH(m_f, &vsi->mac_list, next) {
+	TAILQ_FOREACH_SAFE(m_f, &vsi->mac_list, next, temp) {
 		ret = ice_remove_mac_filter(vsi, &m_f->mac_info.mac_addr);
 		if (ret != ICE_SUCCESS) {
 			ret = -EINVAL;
@@ -1104,7 +1107,7 @@ ice_remove_all_mac_vlan_filters(struct ice_vsi *vsi)
 	if (vsi->vlan_num == 0)
 		return 0;
 
-	TAILQ_FOREACH(v_f, &vsi->vlan_list, next) {
+	TAILQ_FOREACH_SAFE(v_f, &vsi->vlan_list, next, temp) {
 		ret = ice_remove_vlan_filter(vsi, v_f->vlan_info.vlan_id);
 		if (ret != ICE_SUCCESS) {
 			ret = -EINVAL;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.338774100 +0800
+++ 0185-net-ice-fix-illegal-access-when-removing-MAC-filter.patch	2021-05-10 23:59:26.630000000 +0800
@@ -1 +1 @@
-From f4b6eb2b91f38dc9ebc6c4e2b913fd1d25f14773 Mon Sep 17 00:00:00 2001
+From 1cb30b35c9061267146bbfd72e2a61c91f12a8b6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit f4b6eb2b91f38dc9ebc6c4e2b913fd1d25f14773 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index a1365131e0..84d1735255 100644
+index b6d940c2ff..7c20936123 100644
@@ -33 +35 @@
-@@ -1092,12 +1094,13 @@ ice_remove_all_mac_vlan_filters(struct ice_vsi *vsi)
+@@ -1088,12 +1090,13 @@ ice_remove_all_mac_vlan_filters(struct ice_vsi *vsi)
@@ -48 +50 @@
-@@ -1108,7 +1111,7 @@ ice_remove_all_mac_vlan_filters(struct ice_vsi *vsi)
+@@ -1104,7 +1107,7 @@ ice_remove_all_mac_vlan_filters(struct ice_vsi *vsi)
@@ -54 +56 @@
- 		ret = ice_remove_vlan_filter(vsi, &v_f->vlan_info.vlan);
+ 		ret = ice_remove_vlan_filter(vsi, v_f->vlan_info.vlan_id);

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

* [dpdk-stable] patch 'net/mlx5: fix redundant flow after RSS expansion' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (182 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/ice: fix illegal access when removing MAC filter' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/mlx4: fix RSS action with null hash key' " Xueming Li
                   ` (43 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Xiaoyu Min; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/fb455a8129a59c07719a6092aaaa96bfd310fadc

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fb455a8129a59c07719a6092aaaa96bfd310fadc Mon Sep 17 00:00:00 2001
From: Xiaoyu Min <jackmin@nvidia.com>
Date: Tue, 30 Mar 2021 21:40:32 +0800
Subject: [PATCH] net/mlx5: fix redundant flow after RSS expansion
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit c1d397a67eed3b9d7adce5e73c5352de040b3b65 ]

When RSS expand, if there is no expansion happened but completion
happened because user only input next protocol field instead of item
i.e, ether type == 0x8100 instead of VLAN, an extra flow is created with
missing item in order to filter traffic strictly.

However, after [1] and [2] the rte_flow_item_eth itself is enough to
filter out VLAN traffic, the VLAN item is not needed.

[1]: commit 09315fc83861 ("ethdev: add VLAN attributes to ethernet and VLAN items")
[2]: commit 86b59a1af671 ("net/mlx5: support VLAN matching fields")

This redundant flow will cause failure in some scenarios on group 0 due
to they are the same FTE.

Fixes: fc2dd8dd492f ("ethdev: fix expand RSS flows")

Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 2fe810c6b5..5c2712329b 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -385,22 +385,6 @@ mlx5_flow_expand_rss(struct mlx5_flow_expand_rss *buf, size_t size,
 		}
 		node = *next_node ? &graph[*next_node] : NULL;
 	};
-	/* no expanded flows but we have missed item, create one rule for it */
-	if (buf->entries == 1 && missed != 0) {
-		elt = 2;
-		lsize += elt * sizeof(*item) + user_pattern_size;
-		if (lsize <= size) {
-			buf->entry[buf->entries].priority = 1;
-			buf->entry[buf->entries].pattern = addr;
-			buf->entries++;
-			flow_items[0].type = missed_item.type;
-			flow_items[1].type = RTE_FLOW_ITEM_TYPE_END;
-			rte_memcpy(addr, buf->entry[0].pattern,
-				   user_pattern_size);
-			addr = (void *)(((uintptr_t)addr) + user_pattern_size);
-			rte_memcpy(addr, flow_items, elt * sizeof(*item));
-		}
-	}
 	return lsize;
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.366052200 +0800
+++ 0186-net-mlx5-fix-redundant-flow-after-RSS-expansion.patch	2021-05-10 23:59:26.630000000 +0800
@@ -1 +1 @@
-From c1d397a67eed3b9d7adce5e73c5352de040b3b65 Mon Sep 17 00:00:00 2001
+From fb455a8129a59c07719a6092aaaa96bfd310fadc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit c1d397a67eed3b9d7adce5e73c5352de040b3b65 ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -30 +32 @@
-index 0f1a9c5ed9..b34d2952b1 100644
+index 2fe810c6b5..5c2712329b 100644
@@ -33 +35 @@
-@@ -384,22 +384,6 @@ mlx5_flow_expand_rss(struct mlx5_flow_expand_rss *buf, size_t size,
+@@ -385,22 +385,6 @@ mlx5_flow_expand_rss(struct mlx5_flow_expand_rss *buf, size_t size,

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

* [dpdk-stable] patch 'net/mlx4: fix RSS action with null hash key' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (183 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/mlx5: fix redundant flow after RSS expansion' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/mlx5: fix resource release for mirror flow' " Xueming Li
                   ` (42 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/00d769c5184fd606e94aa06cc5e07bc4136aaeb6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 00d769c5184fd606e94aa06cc5e07bc4136aaeb6 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 7 Apr 2021 15:30:15 +0000
Subject: [PATCH] net/mlx4: fix RSS action with null hash key
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 4a750d29927e750b7197dc18fb9ebd9286324108 ]

If RSS action contains non zero hash key length and NULL
key buffer pointer the default hash key should be used.
The check for the NULL pointer this was missing in the mlx4
PMD causing crash, for example, in testpmd with command:

flow validate 0 ingress group 0
  pattern eth / ipv4 / end
  actions rss queues 0 end key_len 40 / end

Fixes: ac8d22de2394 ("ethdev: flatten RSS configuration in flow API")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx4/mlx4_flow.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c
index 2a86382db7..418e3c6bb0 100644
--- a/drivers/net/mlx4/mlx4_flow.c
+++ b/drivers/net/mlx4/mlx4_flow.c
@@ -791,7 +791,8 @@ fill:
 			rss = action->conf;
 			/* Default RSS configuration if none is provided. */
 			if (rss->key_len) {
-				rss_key = rss->key;
+				rss_key = rss->key ?
+					  rss->key : mlx4_rss_hash_key_default;
 				rss_key_len = rss->key_len;
 			} else {
 				rss_key = mlx4_rss_hash_key_default;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.392812600 +0800
+++ 0187-net-mlx4-fix-RSS-action-with-null-hash-key.patch	2021-05-10 23:59:26.630000000 +0800
@@ -1 +1 @@
-From 4a750d29927e750b7197dc18fb9ebd9286324108 Mon Sep 17 00:00:00 2001
+From 00d769c5184fd606e94aa06cc5e07bc4136aaeb6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 4a750d29927e750b7197dc18fb9ebd9286324108 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 43a65abcc0..71ea91b3fb 100644
+index 2a86382db7..418e3c6bb0 100644

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

* [dpdk-stable] patch 'net/mlx5: fix resource release for mirror flow' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (184 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/mlx4: fix RSS action with null hash key' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/ixgbe: fix Rx errors statistics for UDP checksum' " Xueming Li
                   ` (41 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Jiawei Wang
  Cc: Luca Boccassi, Suanming Mou, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8e59d734a21524c537a0109fa5460150a2ae8844

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8e59d734a21524c537a0109fa5460150a2ae8844 Mon Sep 17 00:00:00 2001
From: Jiawei Wang <jiaweiw@nvidia.com>
Date: Fri, 9 Apr 2021 15:33:28 +0300
Subject: [PATCH] net/mlx5: fix resource release for mirror flow
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit ca5eb60ecd5bcd9d4dfed6972ea991d7ead0e9a3 ]

The mlx5 PMD allocated the resources of the sample actions, and then
moved these ones to the destination actions array. The original indices
were not cleared and the resources were referenced twice in the
flow object - as the fate actions and in the destination actions array.

This causes the failure on flow destroy because PMD tried to release the
same objects twice.

The patch clears the original indices, add the missed checking for zero
and eliminates multiple object releasing.

Fixes: 00c10c22118a ("net/mlx5: update translate function for mirroring")

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Reviewed-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index b1c8a95e8a..a1d1579991 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -9024,20 +9024,8 @@ flow_dv_dest_array_create_cb(struct mlx5_cache_list *list __rte_unused,
 	return &cache_resource->entry;
 error:
 	for (idx = 0; idx < resource->num_of_dest; idx++) {
-		struct mlx5_flow_sub_actions_idx *act_res =
-					&cache_resource->sample_idx[idx];
-		if (act_res->rix_hrxq &&
-		    !mlx5_hrxq_release(dev,
-				act_res->rix_hrxq))
-			act_res->rix_hrxq = 0;
-		if (act_res->rix_encap_decap &&
-			!flow_dv_encap_decap_resource_release(dev,
-				act_res->rix_encap_decap))
-			act_res->rix_encap_decap = 0;
-		if (act_res->rix_port_id_action &&
-			!flow_dv_port_id_action_resource_release(dev,
-				act_res->rix_port_id_action))
-			act_res->rix_port_id_action = 0;
+		flow_dv_sample_sub_actions_release(dev,
+				&cache_resource->sample_idx[idx]);
 		if (dest_attr[idx])
 			mlx5_free(dest_attr[idx]);
 	}
@@ -9368,6 +9356,7 @@ flow_dv_create_action_sample(struct rte_eth_dev *dev,
 				dev_flow->handle->dvh.rix_encap_decap;
 			sample_act->dr_encap_action =
 				dev_flow->dv.encap_decap->action;
+			dev_flow->handle->dvh.rix_encap_decap = 0;
 		}
 		if (sample_act->action_flags & MLX5_FLOW_ACTION_PORT_ID) {
 			normal_idx++;
@@ -9375,6 +9364,7 @@ flow_dv_create_action_sample(struct rte_eth_dev *dev,
 				dev_flow->handle->rix_port_id_action;
 			sample_act->dr_port_id_action =
 				dev_flow->dv.port_id_action->action;
+			dev_flow->handle->rix_port_id_action = 0;
 		}
 		sample_act->actions_num = normal_idx;
 		/* update sample action resource into first index of array */
@@ -11193,7 +11183,8 @@ flow_dv_fate_resource_release(struct rte_eth_dev *dev,
 		return;
 	switch (handle->fate_action) {
 	case MLX5_FLOW_FATE_QUEUE:
-		mlx5_hrxq_release(dev, handle->rix_hrxq);
+		if (!handle->dvh.rix_sample && !handle->dvh.rix_dest_array)
+			mlx5_hrxq_release(dev, handle->rix_hrxq);
 		break;
 	case MLX5_FLOW_FATE_JUMP:
 		flow_dv_jump_tbl_resource_release(dev, handle);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.416433600 +0800
+++ 0188-net-mlx5-fix-resource-release-for-mirror-flow.patch	2021-05-10 23:59:26.640000000 +0800
@@ -1 +1 @@
-From ca5eb60ecd5bcd9d4dfed6972ea991d7ead0e9a3 Mon Sep 17 00:00:00 2001
+From 8e59d734a21524c537a0109fa5460150a2ae8844 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit ca5eb60ecd5bcd9d4dfed6972ea991d7ead0e9a3 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -24,2 +26,2 @@
- drivers/net/mlx5/mlx5_flow_dv.c | 25 ++++++-------------------
- 1 file changed, 6 insertions(+), 19 deletions(-)
+ drivers/net/mlx5/mlx5_flow_dv.c | 21 ++++++---------------
+ 1 file changed, 6 insertions(+), 15 deletions(-)
@@ -28 +30 @@
-index 4914c7085f..07a0ee5abb 100644
+index b1c8a95e8a..a1d1579991 100644
@@ -31 +33 @@
-@@ -10155,24 +10155,8 @@ flow_dv_dest_array_create_cb(struct mlx5_cache_list *list __rte_unused,
+@@ -9024,20 +9024,8 @@ flow_dv_dest_array_create_cb(struct mlx5_cache_list *list __rte_unused,
@@ -49,4 +50,0 @@
--		if (act_res->rix_jump &&
--			!flow_dv_jump_tbl_resource_release(dev,
--				act_res->rix_jump))
--			act_res->rix_jump = 0;
@@ -58 +56 @@
-@@ -10542,6 +10526,7 @@ flow_dv_create_action_sample(struct rte_eth_dev *dev,
+@@ -9368,6 +9356,7 @@ flow_dv_create_action_sample(struct rte_eth_dev *dev,
@@ -66 +64 @@
-@@ -10549,6 +10534,7 @@ flow_dv_create_action_sample(struct rte_eth_dev *dev,
+@@ -9375,6 +9364,7 @@ flow_dv_create_action_sample(struct rte_eth_dev *dev,
@@ -72,3 +70,3 @@
- 		if (sample_act->action_flags & MLX5_FLOW_ACTION_JUMP) {
- 			normal_idx++;
-@@ -12415,7 +12401,8 @@ flow_dv_fate_resource_release(struct rte_eth_dev *dev,
+ 		sample_act->actions_num = normal_idx;
+ 		/* update sample action resource into first index of array */
+@@ -11193,7 +11183,8 @@ flow_dv_fate_resource_release(struct rte_eth_dev *dev,
@@ -83 +81 @@
- 		flow_dv_jump_tbl_resource_release(dev, handle->rix_jump);
+ 		flow_dv_jump_tbl_resource_release(dev, handle);

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

* [dpdk-stable] patch 'net/ixgbe: fix Rx errors statistics for UDP checksum' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (185 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/mlx5: fix resource release for mirror flow' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'app/testpmd: fix bitmap of link speeds when force speed' " Xueming Li
                   ` (40 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Haiyue Wang; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/be168e4fec685623db1a1565120fdc07a4436eae

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From be168e4fec685623db1a1565120fdc07a4436eae Mon Sep 17 00:00:00 2001
From: Haiyue Wang <haiyue.wang@intel.com>
Date: Thu, 8 Apr 2021 14:30:00 +0800
Subject: [PATCH] net/ixgbe: fix Rx errors statistics for UDP checksum
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 2ee14c8905e9e39e2a5996b58fadd5403c808611 ]

Restrict the "remove l3_l4_xsum_errors from rx_errors" to 82599 only for
hardware errata.

Fixes: 256ff05a9cae ("ixgbe: fix Rx errors statistics for UDP checksum")

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index d1d7b312b1..718a665ca0 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -3338,6 +3338,13 @@ ixgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 			  hw_stats->fccrc +
 			  hw_stats->fclast;
 
+	/*
+	 * 82599 errata, UDP frames with a 0 checksum can be marked as checksum
+	 * errors.
+	 */
+	if (hw->mac.type != ixgbe_mac_82599EB)
+		stats->ierrors += hw_stats->xec;
+
 	/* Tx Errors */
 	stats->oerrors  = 0;
 	return 0;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.445764200 +0800
+++ 0189-net-ixgbe-fix-Rx-errors-statistics-for-UDP-checksum.patch	2021-05-10 23:59:26.640000000 +0800
@@ -1 +1 @@
-From 2ee14c8905e9e39e2a5996b58fadd5403c808611 Mon Sep 17 00:00:00 2001
+From be168e4fec685623db1a1565120fdc07a4436eae Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 2ee14c8905e9e39e2a5996b58fadd5403c808611 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 4ee709b17f..ff65145f55 100644
+index d1d7b312b1..718a665ca0 100644
@@ -22 +24 @@
-@@ -3344,6 +3344,13 @@ ixgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -3338,6 +3338,13 @@ ixgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)

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

* [dpdk-stable] patch 'app/testpmd: fix bitmap of link speeds when force speed' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (186 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/ixgbe: fix Rx errors statistics for UDP checksum' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'ethdev: update flow item GTP QFI definition' " Xueming Li
                   ` (39 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Huisong Li
  Cc: Luca Boccassi, Min Hu, Ferruh Yigit, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/42c05be1fe0ac2faab448812817117b4ec3a211a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 42c05be1fe0ac2faab448812817117b4ec3a211a Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 14 Apr 2021 11:02:05 +0800
Subject: [PATCH] app/testpmd: fix bitmap of link speeds when force speed
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 312312e928c71cb6b45aeaab2b421d059897dd07 ]

Currently, when the user sets force link speed through 'link_speeds',
bit(0) of 'link_speeds' is not set to 1(ETH_LINK_SPEED_FIXED),
which conflicts with the definition.

Fixes: 88fbedcd5e5a ("app/testpmd: move speed and duplex parsing in a function")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 app/test-pmd/cmdline.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 58b591b292..adaa61f94f 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1521,6 +1521,9 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)
 		}
 	}
 
+	if (*speed != ETH_LINK_SPEED_AUTONEG)
+		*speed |= ETH_LINK_SPEED_FIXED;
+
 	return 0;
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.473369700 +0800
+++ 0190-app-testpmd-fix-bitmap-of-link-speeds-when-force-spe.patch	2021-05-10 23:59:26.640000000 +0800
@@ -1 +1 @@
-From 312312e928c71cb6b45aeaab2b421d059897dd07 Mon Sep 17 00:00:00 2001
+From 42c05be1fe0ac2faab448812817117b4ec3a211a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 312312e928c71cb6b45aeaab2b421d059897dd07 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index ec98ccc652..5bf1497f2b 100644
+index 58b591b292..adaa61f94f 100644
@@ -25 +27 @@
-@@ -1525,6 +1525,9 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)
+@@ -1521,6 +1521,9 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)

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

* [dpdk-stable] patch 'ethdev: update flow item GTP QFI definition' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (187 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'app/testpmd: fix bitmap of link speeds when force speed' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/iavf: fix crash in AVX512' " Xueming Li
                   ` (38 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: Luca Boccassi, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5ecc163bf94f95ca73365d5d6b940dad3c425761

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5ecc163bf94f95ca73365d5d6b940dad3c425761 Mon Sep 17 00:00:00 2001
From: Raslan Darawsheh <rasland@nvidia.com>
Date: Tue, 23 Mar 2021 14:11:34 +0200
Subject: [PATCH] ethdev: update flow item GTP QFI definition
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 7d96f5717a693546933aff4f6623c94976150c5b ]

'qfi' field is 8 bits which represent single bit for
PPP (paging Policy Presence) single bit for RQI
(Reflective QoS Indicator) and 6 bits for QFI
(QoS Flow Identifier)
This is based on RFC 38415-g30
https://www.3gpp.org/ftp/Specs/archive/38_series/38.415/38415-g30.zip

Updated the doxygen comment and the mask for 'qfi'
to properly identify the full 8 bits of the field.

note: changing the default mask would cause different
patterns generated by testpmd.

Fixes: 346553db5bd1 ("ethdev: add GTP extension header to flow API")

Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 doc/guides/testpmd_app_ug/testpmd_funcs.rst | 3 ++-
 lib/librte_ethdev/rte_flow.h                | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 6a00245fc8..3187756892 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -3729,7 +3729,8 @@ This section lists supported pattern items and their attributes, if any.
 - ``gtp_psc``: match GTP PDU extension header with type 0x85.
 
   - ``pdu_type {unsigned}``: PDU type.
-  - ``qfi {unsigned}``: QoS flow identifier.
+
+  - ``qfi {unsigned}``: PPP, RQI and QoS flow identifier.
 
 - ``pppoes``, ``pppoed``: match PPPoE header.
 
diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
index 0977a78270..3ecf65e3ee 100644
--- a/lib/librte_ethdev/rte_flow.h
+++ b/lib/librte_ethdev/rte_flow.h
@@ -1385,14 +1385,14 @@ static const struct rte_flow_item_meta rte_flow_item_meta_mask = {
  */
 struct rte_flow_item_gtp_psc {
 	uint8_t pdu_type; /**< PDU type. */
-	uint8_t qfi; /**< QoS flow identifier. */
+	uint8_t qfi; /**< PPP, RQI, QoS flow identifier. */
 };
 
 /** Default mask for RTE_FLOW_ITEM_TYPE_GTP_PSC. */
 #ifndef __cplusplus
 static const struct rte_flow_item_gtp_psc
 rte_flow_item_gtp_psc_mask = {
-	.qfi = 0x3f,
+	.qfi = 0xff,
 };
 #endif
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.504402300 +0800
+++ 0191-ethdev-update-flow-item-GTP-QFI-definition.patch	2021-05-10 23:59:26.650000000 +0800
@@ -1 +1 @@
-From 7d96f5717a693546933aff4f6623c94976150c5b Mon Sep 17 00:00:00 2001
+From 5ecc163bf94f95ca73365d5d6b940dad3c425761 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 7d96f5717a693546933aff4f6623c94976150c5b ]
@@ -20 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +32 @@
-index 72667dedb1..711683fa11 100644
+index 6a00245fc8..3187756892 100644
@@ -33 +35 @@
-@@ -3767,7 +3767,8 @@ This section lists supported pattern items and their attributes, if any.
+@@ -3729,7 +3729,8 @@ This section lists supported pattern items and their attributes, if any.
@@ -44 +46 @@
-index 5eba79d26f..203c4cde9a 100644
+index 0977a78270..3ecf65e3ee 100644
@@ -47 +49 @@
-@@ -1423,14 +1423,14 @@ static const struct rte_flow_item_meta rte_flow_item_meta_mask = {
+@@ -1385,14 +1385,14 @@ static const struct rte_flow_item_meta rte_flow_item_meta_mask = {

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

* [dpdk-stable] patch 'net/iavf: fix crash in AVX512' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (188 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'ethdev: update flow item GTP QFI definition' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/ice: " Xueming Li
                   ` (37 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Wenzhuo Lu; +Cc: Luca Boccassi, David Coyle, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b59be07a7746d211f26e743df3e745d9882a04a7

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b59be07a7746d211f26e743df3e745d9882a04a7 Mon Sep 17 00:00:00 2001
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
Date: Wed, 14 Apr 2021 15:25:24 +0800
Subject: [PATCH] net/iavf: fix crash in AVX512
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 4eb3dcce7c5dacd57cfb9b6cfb3c1b52846ee9de ]

Fix segment fault when failing to get the memory from the pool.
If there's no memory in the default cache, fall back to the
previous process.

The previous AVX2 rearm function is changed to add some AVX512
instructions and changed to a callee of the AVX2 and AVX512
rearm functions.

Fixes: 31737f2b66fb ("net/iavf: enable AVX512 for legacy Rx")

Reported-by: David Coyle <david.coyle@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Tested-by: David Coyle <david.coyle@intel.com>
---
 drivers/net/iavf/iavf_rxtx_vec_avx2.c   | 120 +-------------
 drivers/net/iavf/iavf_rxtx_vec_avx512.c |   5 +-
 drivers/net/iavf/iavf_rxtx_vec_common.h | 203 ++++++++++++++++++++++++
 3 files changed, 209 insertions(+), 119 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx2.c b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
index 8f28afc8c5..4c8ed694df 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx2.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx2.c
@@ -10,126 +10,10 @@
 #pragma GCC diagnostic ignored "-Wcast-qual"
 #endif
 
-static inline void
+static __rte_always_inline void
 iavf_rxq_rearm(struct iavf_rx_queue *rxq)
 {
-	int i;
-	uint16_t rx_id;
-	volatile union iavf_rx_desc *rxdp;
-	struct rte_mbuf **rxp = &rxq->sw_ring[rxq->rxrearm_start];
-
-	rxdp = rxq->rx_ring + rxq->rxrearm_start;
-
-	/* Pull 'n' more MBUFs into the software ring */
-	if (rte_mempool_get_bulk(rxq->mp,
-				 (void *)rxp,
-				 IAVF_RXQ_REARM_THRESH) < 0) {
-		if (rxq->rxrearm_nb + IAVF_RXQ_REARM_THRESH >=
-		    rxq->nb_rx_desc) {
-			__m128i dma_addr0;
-
-			dma_addr0 = _mm_setzero_si128();
-			for (i = 0; i < IAVF_VPMD_DESCS_PER_LOOP; i++) {
-				rxp[i] = &rxq->fake_mbuf;
-				_mm_store_si128((__m128i *)&rxdp[i].read,
-						dma_addr0);
-			}
-		}
-		rte_eth_devices[rxq->port_id].data->rx_mbuf_alloc_failed +=
-			IAVF_RXQ_REARM_THRESH;
-		return;
-	}
-
-#ifndef RTE_LIBRTE_IAVF_16BYTE_RX_DESC
-	struct rte_mbuf *mb0, *mb1;
-	__m128i dma_addr0, dma_addr1;
-	__m128i hdr_room = _mm_set_epi64x(RTE_PKTMBUF_HEADROOM,
-			RTE_PKTMBUF_HEADROOM);
-	/* Initialize the mbufs in vector, process 2 mbufs in one loop */
-	for (i = 0; i < IAVF_RXQ_REARM_THRESH; i += 2, rxp += 2) {
-		__m128i vaddr0, vaddr1;
-
-		mb0 = rxp[0];
-		mb1 = rxp[1];
-
-		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
-		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
-				offsetof(struct rte_mbuf, buf_addr) + 8);
-		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
-		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
-
-		/* convert pa to dma_addr hdr/data */
-		dma_addr0 = _mm_unpackhi_epi64(vaddr0, vaddr0);
-		dma_addr1 = _mm_unpackhi_epi64(vaddr1, vaddr1);
-
-		/* add headroom to pa values */
-		dma_addr0 = _mm_add_epi64(dma_addr0, hdr_room);
-		dma_addr1 = _mm_add_epi64(dma_addr1, hdr_room);
-
-		/* flush desc with pa dma_addr */
-		_mm_store_si128((__m128i *)&rxdp++->read, dma_addr0);
-		_mm_store_si128((__m128i *)&rxdp++->read, dma_addr1);
-	}
-#else
-	struct rte_mbuf *mb0, *mb1, *mb2, *mb3;
-	__m256i dma_addr0_1, dma_addr2_3;
-	__m256i hdr_room = _mm256_set1_epi64x(RTE_PKTMBUF_HEADROOM);
-	/* Initialize the mbufs in vector, process 4 mbufs in one loop */
-	for (i = 0; i < IAVF_RXQ_REARM_THRESH;
-			i += 4, rxp += 4, rxdp += 4) {
-		__m128i vaddr0, vaddr1, vaddr2, vaddr3;
-		__m256i vaddr0_1, vaddr2_3;
-
-		mb0 = rxp[0];
-		mb1 = rxp[1];
-		mb2 = rxp[2];
-		mb3 = rxp[3];
-
-		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
-		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
-				offsetof(struct rte_mbuf, buf_addr) + 8);
-		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
-		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
-		vaddr2 = _mm_loadu_si128((__m128i *)&mb2->buf_addr);
-		vaddr3 = _mm_loadu_si128((__m128i *)&mb3->buf_addr);
-
-		/**
-		 * merge 0 & 1, by casting 0 to 256-bit and inserting 1
-		 * into the high lanes. Similarly for 2 & 3
-		 */
-		vaddr0_1 =
-			_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr0),
-						vaddr1, 1);
-		vaddr2_3 =
-			_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr2),
-						vaddr3, 1);
-
-		/* convert pa to dma_addr hdr/data */
-		dma_addr0_1 = _mm256_unpackhi_epi64(vaddr0_1, vaddr0_1);
-		dma_addr2_3 = _mm256_unpackhi_epi64(vaddr2_3, vaddr2_3);
-
-		/* add headroom to pa values */
-		dma_addr0_1 = _mm256_add_epi64(dma_addr0_1, hdr_room);
-		dma_addr2_3 = _mm256_add_epi64(dma_addr2_3, hdr_room);
-
-		/* flush desc with pa dma_addr */
-		_mm256_store_si256((__m256i *)&rxdp->read, dma_addr0_1);
-		_mm256_store_si256((__m256i *)&(rxdp + 2)->read, dma_addr2_3);
-	}
-
-#endif
-
-	rxq->rxrearm_start += IAVF_RXQ_REARM_THRESH;
-	if (rxq->rxrearm_start >= rxq->nb_rx_desc)
-		rxq->rxrearm_start = 0;
-
-	rxq->rxrearm_nb -= IAVF_RXQ_REARM_THRESH;
-
-	rx_id = (uint16_t)((rxq->rxrearm_start == 0) ?
-			     (rxq->nb_rx_desc - 1) : (rxq->rxrearm_start - 1));
-
-	/* Update the tail pointer on the NIC */
-	IAVF_PCI_REG_WRITE(rxq->qrx_tail, rx_id);
+	return iavf_rxq_rearm_common(rxq, false);
 }
 
 #define PKTLEN_SHIFT     10
diff --git a/drivers/net/iavf/iavf_rxtx_vec_avx512.c b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
index 4aae99031e..83072e3d50 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_avx512.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_avx512.c
@@ -13,7 +13,7 @@
 #define IAVF_DESCS_PER_LOOP_AVX 8
 #define PKTLEN_SHIFT 10
 
-static inline void
+static __rte_always_inline void
 iavf_rxq_rearm(struct iavf_rx_queue *rxq)
 {
 	int i;
@@ -25,6 +25,9 @@ iavf_rxq_rearm(struct iavf_rx_queue *rxq)
 
 	rxdp = rxq->rx_ring + rxq->rxrearm_start;
 
+	if (unlikely(!cache))
+		return iavf_rxq_rearm_common(rxq, true);
+
 	/* We need to pull 'n' more MBUFs into the software ring from mempool
 	 * We inline the mempool function here, so we can vectorize the copy
 	 * from the cache into the shadow ring.
diff --git a/drivers/net/iavf/iavf_rxtx_vec_common.h b/drivers/net/iavf/iavf_rxtx_vec_common.h
index 7ad1e0f68a..7629474508 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_common.h
+++ b/drivers/net/iavf/iavf_rxtx_vec_common.h
@@ -11,6 +11,10 @@
 #include "iavf.h"
 #include "iavf_rxtx.h"
 
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wcast-qual"
+#endif
+
 static inline uint16_t
 reassemble_packets(struct iavf_rx_queue *rxq, struct rte_mbuf **rx_bufs,
 		   uint16_t nb_bufs, uint8_t *split_flags)
@@ -276,4 +280,203 @@ iavf_tx_vec_dev_check_default(struct rte_eth_dev *dev)
 	return 0;
 }
 
+#ifdef CC_AVX2_SUPPORT
+static __rte_always_inline void
+iavf_rxq_rearm_common(struct iavf_rx_queue *rxq, __rte_unused bool avx512)
+{
+	int i;
+	uint16_t rx_id;
+	volatile union iavf_rx_desc *rxdp;
+	struct rte_mbuf **rxp = &rxq->sw_ring[rxq->rxrearm_start];
+
+	rxdp = rxq->rx_ring + rxq->rxrearm_start;
+
+	/* Pull 'n' more MBUFs into the software ring */
+	if (rte_mempool_get_bulk(rxq->mp,
+				 (void *)rxp,
+				 IAVF_RXQ_REARM_THRESH) < 0) {
+		if (rxq->rxrearm_nb + IAVF_RXQ_REARM_THRESH >=
+		    rxq->nb_rx_desc) {
+			__m128i dma_addr0;
+
+			dma_addr0 = _mm_setzero_si128();
+			for (i = 0; i < IAVF_VPMD_DESCS_PER_LOOP; i++) {
+				rxp[i] = &rxq->fake_mbuf;
+				_mm_store_si128((__m128i *)&rxdp[i].read,
+						dma_addr0);
+			}
+		}
+		rte_eth_devices[rxq->port_id].data->rx_mbuf_alloc_failed +=
+			IAVF_RXQ_REARM_THRESH;
+		return;
+	}
+
+#ifndef RTE_LIBRTE_IAVF_16BYTE_RX_DESC
+	struct rte_mbuf *mb0, *mb1;
+	__m128i dma_addr0, dma_addr1;
+	__m128i hdr_room = _mm_set_epi64x(RTE_PKTMBUF_HEADROOM,
+			RTE_PKTMBUF_HEADROOM);
+	/* Initialize the mbufs in vector, process 2 mbufs in one loop */
+	for (i = 0; i < IAVF_RXQ_REARM_THRESH; i += 2, rxp += 2) {
+		__m128i vaddr0, vaddr1;
+
+		mb0 = rxp[0];
+		mb1 = rxp[1];
+
+		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
+		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
+				offsetof(struct rte_mbuf, buf_addr) + 8);
+		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
+		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
+
+		/* convert pa to dma_addr hdr/data */
+		dma_addr0 = _mm_unpackhi_epi64(vaddr0, vaddr0);
+		dma_addr1 = _mm_unpackhi_epi64(vaddr1, vaddr1);
+
+		/* add headroom to pa values */
+		dma_addr0 = _mm_add_epi64(dma_addr0, hdr_room);
+		dma_addr1 = _mm_add_epi64(dma_addr1, hdr_room);
+
+		/* flush desc with pa dma_addr */
+		_mm_store_si128((__m128i *)&rxdp++->read, dma_addr0);
+		_mm_store_si128((__m128i *)&rxdp++->read, dma_addr1);
+	}
+#else
+#ifdef CC_AVX512_SUPPORT
+	if (avx512) {
+		struct rte_mbuf *mb0, *mb1, *mb2, *mb3;
+		struct rte_mbuf *mb4, *mb5, *mb6, *mb7;
+		__m512i dma_addr0_3, dma_addr4_7;
+		__m512i hdr_room = _mm512_set1_epi64(RTE_PKTMBUF_HEADROOM);
+		/* Initialize the mbufs in vector, process 8 mbufs in one loop */
+		for (i = 0; i < IAVF_RXQ_REARM_THRESH;
+				i += 8, rxp += 8, rxdp += 8) {
+			__m128i vaddr0, vaddr1, vaddr2, vaddr3;
+			__m128i vaddr4, vaddr5, vaddr6, vaddr7;
+			__m256i vaddr0_1, vaddr2_3;
+			__m256i vaddr4_5, vaddr6_7;
+			__m512i vaddr0_3, vaddr4_7;
+
+			mb0 = rxp[0];
+			mb1 = rxp[1];
+			mb2 = rxp[2];
+			mb3 = rxp[3];
+			mb4 = rxp[4];
+			mb5 = rxp[5];
+			mb6 = rxp[6];
+			mb7 = rxp[7];
+
+			/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
+			RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
+					offsetof(struct rte_mbuf, buf_addr) + 8);
+			vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
+			vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
+			vaddr2 = _mm_loadu_si128((__m128i *)&mb2->buf_addr);
+			vaddr3 = _mm_loadu_si128((__m128i *)&mb3->buf_addr);
+			vaddr4 = _mm_loadu_si128((__m128i *)&mb4->buf_addr);
+			vaddr5 = _mm_loadu_si128((__m128i *)&mb5->buf_addr);
+			vaddr6 = _mm_loadu_si128((__m128i *)&mb6->buf_addr);
+			vaddr7 = _mm_loadu_si128((__m128i *)&mb7->buf_addr);
+
+			/**
+			 * merge 0 & 1, by casting 0 to 256-bit and inserting 1
+			 * into the high lanes. Similarly for 2 & 3, and so on.
+			 */
+			vaddr0_1 =
+				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr0),
+							vaddr1, 1);
+			vaddr2_3 =
+				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr2),
+							vaddr3, 1);
+			vaddr4_5 =
+				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr4),
+							vaddr5, 1);
+			vaddr6_7 =
+				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr6),
+							vaddr7, 1);
+			vaddr0_3 =
+				_mm512_inserti64x4(_mm512_castsi256_si512(vaddr0_1),
+							vaddr2_3, 1);
+			vaddr4_7 =
+				_mm512_inserti64x4(_mm512_castsi256_si512(vaddr4_5),
+							vaddr6_7, 1);
+
+			/* convert pa to dma_addr hdr/data */
+			dma_addr0_3 = _mm512_unpackhi_epi64(vaddr0_3, vaddr0_3);
+			dma_addr4_7 = _mm512_unpackhi_epi64(vaddr4_7, vaddr4_7);
+
+			/* add headroom to pa values */
+			dma_addr0_3 = _mm512_add_epi64(dma_addr0_3, hdr_room);
+			dma_addr4_7 = _mm512_add_epi64(dma_addr4_7, hdr_room);
+
+			/* flush desc with pa dma_addr */
+			_mm512_store_si512((__m512i *)&rxdp->read, dma_addr0_3);
+			_mm512_store_si512((__m512i *)&(rxdp + 4)->read, dma_addr4_7);
+		}
+	} else
+#endif
+	{
+		struct rte_mbuf *mb0, *mb1, *mb2, *mb3;
+		__m256i dma_addr0_1, dma_addr2_3;
+		__m256i hdr_room = _mm256_set1_epi64x(RTE_PKTMBUF_HEADROOM);
+		/* Initialize the mbufs in vector, process 4 mbufs in one loop */
+		for (i = 0; i < IAVF_RXQ_REARM_THRESH;
+				i += 4, rxp += 4, rxdp += 4) {
+			__m128i vaddr0, vaddr1, vaddr2, vaddr3;
+			__m256i vaddr0_1, vaddr2_3;
+
+			mb0 = rxp[0];
+			mb1 = rxp[1];
+			mb2 = rxp[2];
+			mb3 = rxp[3];
+
+			/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
+			RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
+					offsetof(struct rte_mbuf, buf_addr) + 8);
+			vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
+			vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
+			vaddr2 = _mm_loadu_si128((__m128i *)&mb2->buf_addr);
+			vaddr3 = _mm_loadu_si128((__m128i *)&mb3->buf_addr);
+
+			/**
+			 * merge 0 & 1, by casting 0 to 256-bit and inserting 1
+			 * into the high lanes. Similarly for 2 & 3
+			 */
+			vaddr0_1 =
+				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr0),
+							vaddr1, 1);
+			vaddr2_3 =
+				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr2),
+							vaddr3, 1);
+
+			/* convert pa to dma_addr hdr/data */
+			dma_addr0_1 = _mm256_unpackhi_epi64(vaddr0_1, vaddr0_1);
+			dma_addr2_3 = _mm256_unpackhi_epi64(vaddr2_3, vaddr2_3);
+
+			/* add headroom to pa values */
+			dma_addr0_1 = _mm256_add_epi64(dma_addr0_1, hdr_room);
+			dma_addr2_3 = _mm256_add_epi64(dma_addr2_3, hdr_room);
+
+			/* flush desc with pa dma_addr */
+			_mm256_store_si256((__m256i *)&rxdp->read, dma_addr0_1);
+			_mm256_store_si256((__m256i *)&(rxdp + 2)->read, dma_addr2_3);
+		}
+	}
+
+#endif
+
+	rxq->rxrearm_start += IAVF_RXQ_REARM_THRESH;
+	if (rxq->rxrearm_start >= rxq->nb_rx_desc)
+		rxq->rxrearm_start = 0;
+
+	rxq->rxrearm_nb -= IAVF_RXQ_REARM_THRESH;
+
+	rx_id = (uint16_t)((rxq->rxrearm_start == 0) ?
+			     (rxq->nb_rx_desc - 1) : (rxq->rxrearm_start - 1));
+
+	/* Update the tail pointer on the NIC */
+	IAVF_PCI_REG_WRITE(rxq->qrx_tail, rx_id);
+}
+#endif
+
 #endif
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.530655000 +0800
+++ 0192-net-iavf-fix-crash-in-AVX512.patch	2021-05-10 23:59:26.650000000 +0800
@@ -1 +1 @@
-From 4eb3dcce7c5dacd57cfb9b6cfb3c1b52846ee9de Mon Sep 17 00:00:00 2001
+From b59be07a7746d211f26e743df3e745d9882a04a7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 4eb3dcce7c5dacd57cfb9b6cfb3c1b52846ee9de ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index cdb51397ff..f5646d6453 100644
+index 8f28afc8c5..4c8ed694df 100644
@@ -160 +162 @@
-index 67184ae3f4..385f44ec47 100644
+index 4aae99031e..83072e3d50 100644
@@ -183 +185 @@
-index 46a18732d3..816e16a937 100644
+index 7ad1e0f68a..7629474508 100644

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

* [dpdk-stable] patch 'net/ice: fix crash in AVX512' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (189 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/iavf: fix crash in AVX512' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix use of command status enumeration' " Xueming Li
                   ` (36 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Wenzhuo Lu; +Cc: Luca Boccassi, David Coyle, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a0cffe358de79e28b22072dbfc32ed7b84eb89b0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a0cffe358de79e28b22072dbfc32ed7b84eb89b0 Mon Sep 17 00:00:00 2001
From: Wenzhuo Lu <wenzhuo.lu@intel.com>
Date: Wed, 14 Apr 2021 15:25:25 +0800
Subject: [PATCH] net/ice: fix crash in AVX512
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 20daa1c978b7d34b447453b3f25483c700745456 ]

Fix segment fault when failing to get the memory from the pool.
If there's no memory in the default cache, fall back to the
previous process.

The previous AVX2 rearm function is changed to add some AVX512
instructions and changed to a callee of the AVX2 and AVX512
rearm functions.

Fixes: 7f85d5ebcfe1 ("net/ice: add AVX512 vector path")

Reported-by: David Coyle <david.coyle@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Tested-by: David Coyle <david.coyle@intel.com>
---
 drivers/net/ice/ice_rxtx_vec_avx2.c   | 120 +--------------
 drivers/net/ice/ice_rxtx_vec_avx512.c |   5 +-
 drivers/net/ice/ice_rxtx_vec_common.h | 203 ++++++++++++++++++++++++++
 drivers/net/ice/meson.build           |   2 +
 4 files changed, 211 insertions(+), 119 deletions(-)

diff --git a/drivers/net/ice/ice_rxtx_vec_avx2.c b/drivers/net/ice/ice_rxtx_vec_avx2.c
index 7838e17787..e4edcd38a9 100644
--- a/drivers/net/ice/ice_rxtx_vec_avx2.c
+++ b/drivers/net/ice/ice_rxtx_vec_avx2.c
@@ -10,126 +10,10 @@
 #pragma GCC diagnostic ignored "-Wcast-qual"
 #endif
 
-static inline void
+static __rte_always_inline void
 ice_rxq_rearm(struct ice_rx_queue *rxq)
 {
-	int i;
-	uint16_t rx_id;
-	volatile union ice_rx_flex_desc *rxdp;
-	struct ice_rx_entry *rxep = &rxq->sw_ring[rxq->rxrearm_start];
-
-	rxdp = rxq->rx_ring + rxq->rxrearm_start;
-
-	/* Pull 'n' more MBUFs into the software ring */
-	if (rte_mempool_get_bulk(rxq->mp,
-				 (void *)rxep,
-				 ICE_RXQ_REARM_THRESH) < 0) {
-		if (rxq->rxrearm_nb + ICE_RXQ_REARM_THRESH >=
-		    rxq->nb_rx_desc) {
-			__m128i dma_addr0;
-
-			dma_addr0 = _mm_setzero_si128();
-			for (i = 0; i < ICE_DESCS_PER_LOOP; i++) {
-				rxep[i].mbuf = &rxq->fake_mbuf;
-				_mm_store_si128((__m128i *)&rxdp[i].read,
-						dma_addr0);
-			}
-		}
-		rte_eth_devices[rxq->port_id].data->rx_mbuf_alloc_failed +=
-			ICE_RXQ_REARM_THRESH;
-		return;
-	}
-
-#ifndef RTE_LIBRTE_ICE_16BYTE_RX_DESC
-	struct rte_mbuf *mb0, *mb1;
-	__m128i dma_addr0, dma_addr1;
-	__m128i hdr_room = _mm_set_epi64x(RTE_PKTMBUF_HEADROOM,
-			RTE_PKTMBUF_HEADROOM);
-	/* Initialize the mbufs in vector, process 2 mbufs in one loop */
-	for (i = 0; i < ICE_RXQ_REARM_THRESH; i += 2, rxep += 2) {
-		__m128i vaddr0, vaddr1;
-
-		mb0 = rxep[0].mbuf;
-		mb1 = rxep[1].mbuf;
-
-		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
-		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
-				offsetof(struct rte_mbuf, buf_addr) + 8);
-		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
-		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
-
-		/* convert pa to dma_addr hdr/data */
-		dma_addr0 = _mm_unpackhi_epi64(vaddr0, vaddr0);
-		dma_addr1 = _mm_unpackhi_epi64(vaddr1, vaddr1);
-
-		/* add headroom to pa values */
-		dma_addr0 = _mm_add_epi64(dma_addr0, hdr_room);
-		dma_addr1 = _mm_add_epi64(dma_addr1, hdr_room);
-
-		/* flush desc with pa dma_addr */
-		_mm_store_si128((__m128i *)&rxdp++->read, dma_addr0);
-		_mm_store_si128((__m128i *)&rxdp++->read, dma_addr1);
-	}
-#else
-	struct rte_mbuf *mb0, *mb1, *mb2, *mb3;
-	__m256i dma_addr0_1, dma_addr2_3;
-	__m256i hdr_room = _mm256_set1_epi64x(RTE_PKTMBUF_HEADROOM);
-	/* Initialize the mbufs in vector, process 4 mbufs in one loop */
-	for (i = 0; i < ICE_RXQ_REARM_THRESH;
-			i += 4, rxep += 4, rxdp += 4) {
-		__m128i vaddr0, vaddr1, vaddr2, vaddr3;
-		__m256i vaddr0_1, vaddr2_3;
-
-		mb0 = rxep[0].mbuf;
-		mb1 = rxep[1].mbuf;
-		mb2 = rxep[2].mbuf;
-		mb3 = rxep[3].mbuf;
-
-		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
-		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
-				offsetof(struct rte_mbuf, buf_addr) + 8);
-		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
-		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
-		vaddr2 = _mm_loadu_si128((__m128i *)&mb2->buf_addr);
-		vaddr3 = _mm_loadu_si128((__m128i *)&mb3->buf_addr);
-
-		/**
-		 * merge 0 & 1, by casting 0 to 256-bit and inserting 1
-		 * into the high lanes. Similarly for 2 & 3
-		 */
-		vaddr0_1 =
-			_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr0),
-						vaddr1, 1);
-		vaddr2_3 =
-			_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr2),
-						vaddr3, 1);
-
-		/* convert pa to dma_addr hdr/data */
-		dma_addr0_1 = _mm256_unpackhi_epi64(vaddr0_1, vaddr0_1);
-		dma_addr2_3 = _mm256_unpackhi_epi64(vaddr2_3, vaddr2_3);
-
-		/* add headroom to pa values */
-		dma_addr0_1 = _mm256_add_epi64(dma_addr0_1, hdr_room);
-		dma_addr2_3 = _mm256_add_epi64(dma_addr2_3, hdr_room);
-
-		/* flush desc with pa dma_addr */
-		_mm256_store_si256((__m256i *)&rxdp->read, dma_addr0_1);
-		_mm256_store_si256((__m256i *)&(rxdp + 2)->read, dma_addr2_3);
-	}
-
-#endif
-
-	rxq->rxrearm_start += ICE_RXQ_REARM_THRESH;
-	if (rxq->rxrearm_start >= rxq->nb_rx_desc)
-		rxq->rxrearm_start = 0;
-
-	rxq->rxrearm_nb -= ICE_RXQ_REARM_THRESH;
-
-	rx_id = (uint16_t)((rxq->rxrearm_start == 0) ?
-			     (rxq->nb_rx_desc - 1) : (rxq->rxrearm_start - 1));
-
-	/* Update the tail pointer on the NIC */
-	ICE_PCI_REG_WC_WRITE(rxq->qrx_tail, rx_id);
+	return ice_rxq_rearm_common(rxq, false);
 }
 
 static inline __m256i
diff --git a/drivers/net/ice/ice_rxtx_vec_avx512.c b/drivers/net/ice/ice_rxtx_vec_avx512.c
index fd5d724329..533da22bc4 100644
--- a/drivers/net/ice/ice_rxtx_vec_avx512.c
+++ b/drivers/net/ice/ice_rxtx_vec_avx512.c
@@ -12,7 +12,7 @@
 
 #define ICE_DESCS_PER_LOOP_AVX 8
 
-static inline void
+static __rte_always_inline void
 ice_rxq_rearm(struct ice_rx_queue *rxq)
 {
 	int i;
@@ -24,6 +24,9 @@ ice_rxq_rearm(struct ice_rx_queue *rxq)
 
 	rxdp = rxq->rx_ring + rxq->rxrearm_start;
 
+	if (unlikely(!cache))
+		return ice_rxq_rearm_common(rxq, true);
+
 	/* We need to pull 'n' more MBUFs into the software ring */
 	if (cache->len < ICE_RXQ_REARM_THRESH) {
 		uint32_t req = ICE_RXQ_REARM_THRESH + (cache->size -
diff --git a/drivers/net/ice/ice_rxtx_vec_common.h b/drivers/net/ice/ice_rxtx_vec_common.h
index c09ac7f667..a5d76a2936 100644
--- a/drivers/net/ice/ice_rxtx_vec_common.h
+++ b/drivers/net/ice/ice_rxtx_vec_common.h
@@ -7,6 +7,10 @@
 
 #include "ice_rxtx.h"
 
+#ifndef __INTEL_COMPILER
+#pragma GCC diagnostic ignored "-Wcast-qual"
+#endif
+
 static inline uint16_t
 ice_rx_reassemble_packets(struct ice_rx_queue *rxq, struct rte_mbuf **rx_bufs,
 			  uint16_t nb_bufs, uint8_t *split_flags)
@@ -318,4 +322,203 @@ ice_tx_vec_dev_check_default(struct rte_eth_dev *dev)
 	return 0;
 }
 
+#ifdef CC_AVX2_SUPPORT
+static __rte_always_inline void
+ice_rxq_rearm_common(struct ice_rx_queue *rxq, __rte_unused bool avx512)
+{
+	int i;
+	uint16_t rx_id;
+	volatile union ice_rx_flex_desc *rxdp;
+	struct ice_rx_entry *rxep = &rxq->sw_ring[rxq->rxrearm_start];
+
+	rxdp = rxq->rx_ring + rxq->rxrearm_start;
+
+	/* Pull 'n' more MBUFs into the software ring */
+	if (rte_mempool_get_bulk(rxq->mp,
+				 (void *)rxep,
+				 ICE_RXQ_REARM_THRESH) < 0) {
+		if (rxq->rxrearm_nb + ICE_RXQ_REARM_THRESH >=
+		    rxq->nb_rx_desc) {
+			__m128i dma_addr0;
+
+			dma_addr0 = _mm_setzero_si128();
+			for (i = 0; i < ICE_DESCS_PER_LOOP; i++) {
+				rxep[i].mbuf = &rxq->fake_mbuf;
+				_mm_store_si128((__m128i *)&rxdp[i].read,
+						dma_addr0);
+			}
+		}
+		rte_eth_devices[rxq->port_id].data->rx_mbuf_alloc_failed +=
+			ICE_RXQ_REARM_THRESH;
+		return;
+	}
+
+#ifndef RTE_LIBRTE_ICE_16BYTE_RX_DESC
+	struct rte_mbuf *mb0, *mb1;
+	__m128i dma_addr0, dma_addr1;
+	__m128i hdr_room = _mm_set_epi64x(RTE_PKTMBUF_HEADROOM,
+			RTE_PKTMBUF_HEADROOM);
+	/* Initialize the mbufs in vector, process 2 mbufs in one loop */
+	for (i = 0; i < ICE_RXQ_REARM_THRESH; i += 2, rxep += 2) {
+		__m128i vaddr0, vaddr1;
+
+		mb0 = rxep[0].mbuf;
+		mb1 = rxep[1].mbuf;
+
+		/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
+		RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
+				offsetof(struct rte_mbuf, buf_addr) + 8);
+		vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
+		vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
+
+		/* convert pa to dma_addr hdr/data */
+		dma_addr0 = _mm_unpackhi_epi64(vaddr0, vaddr0);
+		dma_addr1 = _mm_unpackhi_epi64(vaddr1, vaddr1);
+
+		/* add headroom to pa values */
+		dma_addr0 = _mm_add_epi64(dma_addr0, hdr_room);
+		dma_addr1 = _mm_add_epi64(dma_addr1, hdr_room);
+
+		/* flush desc with pa dma_addr */
+		_mm_store_si128((__m128i *)&rxdp++->read, dma_addr0);
+		_mm_store_si128((__m128i *)&rxdp++->read, dma_addr1);
+	}
+#else
+#ifdef CC_AVX512_SUPPORT
+	if (avx512) {
+		struct rte_mbuf *mb0, *mb1, *mb2, *mb3;
+		struct rte_mbuf *mb4, *mb5, *mb6, *mb7;
+		__m512i dma_addr0_3, dma_addr4_7;
+		__m512i hdr_room = _mm512_set1_epi64(RTE_PKTMBUF_HEADROOM);
+		/* Initialize the mbufs in vector, process 8 mbufs in one loop */
+		for (i = 0; i < ICE_RXQ_REARM_THRESH;
+				i += 8, rxep += 8, rxdp += 8) {
+			__m128i vaddr0, vaddr1, vaddr2, vaddr3;
+			__m128i vaddr4, vaddr5, vaddr6, vaddr7;
+			__m256i vaddr0_1, vaddr2_3;
+			__m256i vaddr4_5, vaddr6_7;
+			__m512i vaddr0_3, vaddr4_7;
+
+			mb0 = rxep[0].mbuf;
+			mb1 = rxep[1].mbuf;
+			mb2 = rxep[2].mbuf;
+			mb3 = rxep[3].mbuf;
+			mb4 = rxep[4].mbuf;
+			mb5 = rxep[5].mbuf;
+			mb6 = rxep[6].mbuf;
+			mb7 = rxep[7].mbuf;
+
+			/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
+			RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
+					offsetof(struct rte_mbuf, buf_addr) + 8);
+			vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
+			vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
+			vaddr2 = _mm_loadu_si128((__m128i *)&mb2->buf_addr);
+			vaddr3 = _mm_loadu_si128((__m128i *)&mb3->buf_addr);
+			vaddr4 = _mm_loadu_si128((__m128i *)&mb4->buf_addr);
+			vaddr5 = _mm_loadu_si128((__m128i *)&mb5->buf_addr);
+			vaddr6 = _mm_loadu_si128((__m128i *)&mb6->buf_addr);
+			vaddr7 = _mm_loadu_si128((__m128i *)&mb7->buf_addr);
+
+			/**
+			 * merge 0 & 1, by casting 0 to 256-bit and inserting 1
+			 * into the high lanes. Similarly for 2 & 3, and so on.
+			 */
+			vaddr0_1 =
+				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr0),
+							vaddr1, 1);
+			vaddr2_3 =
+				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr2),
+							vaddr3, 1);
+			vaddr4_5 =
+				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr4),
+							vaddr5, 1);
+			vaddr6_7 =
+				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr6),
+							vaddr7, 1);
+			vaddr0_3 =
+				_mm512_inserti64x4(_mm512_castsi256_si512(vaddr0_1),
+							vaddr2_3, 1);
+			vaddr4_7 =
+				_mm512_inserti64x4(_mm512_castsi256_si512(vaddr4_5),
+							vaddr6_7, 1);
+
+			/* convert pa to dma_addr hdr/data */
+			dma_addr0_3 = _mm512_unpackhi_epi64(vaddr0_3, vaddr0_3);
+			dma_addr4_7 = _mm512_unpackhi_epi64(vaddr4_7, vaddr4_7);
+
+			/* add headroom to pa values */
+			dma_addr0_3 = _mm512_add_epi64(dma_addr0_3, hdr_room);
+			dma_addr4_7 = _mm512_add_epi64(dma_addr4_7, hdr_room);
+
+			/* flush desc with pa dma_addr */
+			_mm512_store_si512((__m512i *)&rxdp->read, dma_addr0_3);
+			_mm512_store_si512((__m512i *)&(rxdp + 4)->read, dma_addr4_7);
+		}
+	} else
+#endif
+	{
+		struct rte_mbuf *mb0, *mb1, *mb2, *mb3;
+		__m256i dma_addr0_1, dma_addr2_3;
+		__m256i hdr_room = _mm256_set1_epi64x(RTE_PKTMBUF_HEADROOM);
+		/* Initialize the mbufs in vector, process 4 mbufs in one loop */
+		for (i = 0; i < ICE_RXQ_REARM_THRESH;
+				i += 4, rxep += 4, rxdp += 4) {
+			__m128i vaddr0, vaddr1, vaddr2, vaddr3;
+			__m256i vaddr0_1, vaddr2_3;
+
+			mb0 = rxep[0].mbuf;
+			mb1 = rxep[1].mbuf;
+			mb2 = rxep[2].mbuf;
+			mb3 = rxep[3].mbuf;
+
+			/* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */
+			RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) !=
+					offsetof(struct rte_mbuf, buf_addr) + 8);
+			vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr);
+			vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr);
+			vaddr2 = _mm_loadu_si128((__m128i *)&mb2->buf_addr);
+			vaddr3 = _mm_loadu_si128((__m128i *)&mb3->buf_addr);
+
+			/**
+			 * merge 0 & 1, by casting 0 to 256-bit and inserting 1
+			 * into the high lanes. Similarly for 2 & 3
+			 */
+			vaddr0_1 =
+				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr0),
+							vaddr1, 1);
+			vaddr2_3 =
+				_mm256_inserti128_si256(_mm256_castsi128_si256(vaddr2),
+							vaddr3, 1);
+
+			/* convert pa to dma_addr hdr/data */
+			dma_addr0_1 = _mm256_unpackhi_epi64(vaddr0_1, vaddr0_1);
+			dma_addr2_3 = _mm256_unpackhi_epi64(vaddr2_3, vaddr2_3);
+
+			/* add headroom to pa values */
+			dma_addr0_1 = _mm256_add_epi64(dma_addr0_1, hdr_room);
+			dma_addr2_3 = _mm256_add_epi64(dma_addr2_3, hdr_room);
+
+			/* flush desc with pa dma_addr */
+			_mm256_store_si256((__m256i *)&rxdp->read, dma_addr0_1);
+			_mm256_store_si256((__m256i *)&(rxdp + 2)->read, dma_addr2_3);
+		}
+	}
+
+#endif
+
+	rxq->rxrearm_start += ICE_RXQ_REARM_THRESH;
+	if (rxq->rxrearm_start >= rxq->nb_rx_desc)
+		rxq->rxrearm_start = 0;
+
+	rxq->rxrearm_nb -= ICE_RXQ_REARM_THRESH;
+
+	rx_id = (uint16_t)((rxq->rxrearm_start == 0) ?
+			     (rxq->nb_rx_desc - 1) : (rxq->rxrearm_start - 1));
+
+	/* Update the tail pointer on the NIC */
+	ICE_PCI_REG_WC_WRITE(rxq->qrx_tail, rx_id);
+}
+#endif
+
 #endif
diff --git a/drivers/net/ice/meson.build b/drivers/net/ice/meson.build
index 7b291269dc..4638011cbc 100644
--- a/drivers/net/ice/meson.build
+++ b/drivers/net/ice/meson.build
@@ -24,8 +24,10 @@ if arch_subdir == 'x86'
 	# a. we have AVX supported in minimum instruction set baseline
 	# b. it's not minimum instruction set, but supported by compiler
 	if cc.get_define('__AVX2__', args: machine_args) != ''
+		cflags += ['-DCC_AVX2_SUPPORT']
 		sources += files('ice_rxtx_vec_avx2.c')
 	elif cc.has_argument('-mavx2')
+		cflags += ['-DCC_AVX2_SUPPORT']
 		ice_avx2_lib = static_library('ice_avx2_lib',
 				'ice_rxtx_vec_avx2.c',
 				dependencies: [static_rte_ethdev,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.555983600 +0800
+++ 0193-net-ice-fix-crash-in-AVX512.patch	2021-05-10 23:59:26.650000000 +0800
@@ -1 +1 @@
-From 20daa1c978b7d34b447453b3f25483c700745456 Mon Sep 17 00:00:00 2001
+From a0cffe358de79e28b22072dbfc32ed7b84eb89b0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 20daa1c978b7d34b447453b3f25483c700745456 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 25efd30e6b..83dcdf15d4 100644
+index 7838e17787..e4edcd38a9 100644
@@ -161 +163 @@
-index 0a3e8da024..a668b82232 100644
+index fd5d724329..533da22bc4 100644
@@ -403 +405 @@
-index 44ef64b4cf..b2d0b66219 100644
+index 7b291269dc..4638011cbc 100644
@@ -406 +408 @@
-@@ -28,8 +28,10 @@ if arch_subdir == 'x86'
+@@ -24,8 +24,10 @@ if arch_subdir == 'x86'

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

* [dpdk-stable] patch 'net/hns3: fix use of command status enumeration' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (190 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/ice: " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix missing outer L4 UDP flag for VXLAN' " Xueming Li
                   ` (35 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f20ccda35a7230052cd5a959c1fb27d46c40fe3b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f20ccda35a7230052cd5a959c1fb27d46c40fe3b Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Tue, 13 Apr 2021 19:50:04 +0800
Subject: [PATCH] net/hns3: fix use of command status enumeration
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit a32eaf435a53b26b9697fcb483612af7de514414 ]

The type of return value of hns3_cmd_send is int, some function declare
the return value as hns3_cmd_status.

This patch fix the incorrect use of the enum hns3_cmd_status.

Fixes: 737f30e1c3ab ("net/hns3: support command interface with firmware")
Fixes: 02a7b55657b2 ("net/hns3: support Rx interrupt")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_cmd.c    |  2 +-
 drivers/net/hns3/hns3_cmd.h    |  9 +--------
 drivers/net/hns3/hns3_ethdev.c | 12 ++++++------
 3 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c
index 8a48714a54..b45891a7ce 100644
--- a/drivers/net/hns3/hns3_cmd.c
+++ b/drivers/net/hns3/hns3_cmd.c
@@ -450,7 +450,7 @@ hns3_build_api_caps(void)
 	return rte_cpu_to_le_32(api_caps);
 }
 
-static enum hns3_cmd_status
+static int
 hns3_cmd_query_firmware_version_and_capability(struct hns3_hw *hw)
 {
 	struct hns3_query_version_cmd *resp;
diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h
index c6fc6c401a..37cb20a9f5 100644
--- a/drivers/net/hns3/hns3_cmd.h
+++ b/drivers/net/hns3/hns3_cmd.h
@@ -55,13 +55,6 @@ enum hns3_cmd_return_status {
 	HNS3_CMD_INVALID        = 11,
 };
 
-enum hns3_cmd_status {
-	HNS3_STATUS_SUCCESS     = 0,
-	HNS3_ERR_CSQ_FULL       = -1,
-	HNS3_ERR_CSQ_TIMEOUT    = -2,
-	HNS3_ERR_CSQ_ERROR      = -3,
-};
-
 struct hns3_misc_vector {
 	uint8_t *addr;
 	int vector_irq;
@@ -71,7 +64,7 @@ struct hns3_cmq {
 	struct hns3_cmq_ring csq;
 	struct hns3_cmq_ring crq;
 	uint16_t tx_timeout;
-	enum hns3_cmd_status last_status;
+	enum hns3_cmd_return_status last_status;
 };
 
 enum hns3_opcode_type {
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 023b7d6912..b4e666ebfb 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2223,11 +2223,11 @@ hns3_bind_ring_with_vector(struct hns3_hw *hw, uint16_t vector_id, bool en,
 	struct hns3_cmd_desc desc;
 	struct hns3_ctrl_vector_chain_cmd *req =
 		(struct hns3_ctrl_vector_chain_cmd *)desc.data;
-	enum hns3_cmd_status status;
 	enum hns3_opcode_type op;
 	uint16_t tqp_type_and_id = 0;
 	uint16_t type;
 	uint16_t gl;
+	int ret;
 
 	op = en ? HNS3_OPC_ADD_RING_TO_VECTOR : HNS3_OPC_DEL_RING_TO_VECTOR;
 	hns3_cmd_setup_basic_desc(&desc, op, false);
@@ -2250,11 +2250,11 @@ hns3_bind_ring_with_vector(struct hns3_hw *hw, uint16_t vector_id, bool en,
 		       gl);
 	req->tqp_type_and_id[0] = rte_cpu_to_le_16(tqp_type_and_id);
 	req->int_cause_num = 1;
-	status = hns3_cmd_send(hw, &desc, 1);
-	if (status) {
-		hns3_err(hw, "%s TQP %u fail, vector_id is %u, status is %d.",
-			 en ? "Map" : "Unmap", queue_id, vector_id, status);
-		return status;
+	ret = hns3_cmd_send(hw, &desc, 1);
+	if (ret) {
+		hns3_err(hw, "%s TQP %u fail, vector_id = %u, ret = %d.",
+			 en ? "Map" : "Unmap", queue_id, vector_id, ret);
+		return ret;
 	}
 
 	return 0;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.580683300 +0800
+++ 0194-net-hns3-fix-use-of-command-status-enumeration.patch	2021-05-10 23:59:26.650000000 +0800
@@ -1 +1 @@
-From a32eaf435a53b26b9697fcb483612af7de514414 Mon Sep 17 00:00:00 2001
+From f20ccda35a7230052cd5a959c1fb27d46c40fe3b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit a32eaf435a53b26b9697fcb483612af7de514414 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 1d8ef7a812..df167f1da2 100644
+index 8a48714a54..b45891a7ce 100644
@@ -37 +39 @@
-index 9958fde128..e88bf4a6e5 100644
+index c6fc6c401a..37cb20a9f5 100644
@@ -40,2 +42,2 @@
-@@ -56,13 +56,6 @@ enum hns3_cmd_return_status {
- 	HNS3_CMD_ROH_CHECK_FAIL = 12
+@@ -55,13 +55,6 @@ enum hns3_cmd_return_status {
+ 	HNS3_CMD_INVALID        = 11,
@@ -54 +56 @@
-@@ -72,7 +65,7 @@ struct hns3_cmq {
+@@ -71,7 +64,7 @@ struct hns3_cmq {
@@ -64 +66 @@
-index 846e5a27c2..05ccc2eeb4 100644
+index 023b7d6912..b4e666ebfb 100644
@@ -67 +69 @@
-@@ -2310,11 +2310,11 @@ hns3_bind_ring_with_vector(struct hns3_hw *hw, uint16_t vector_id, bool en,
+@@ -2223,11 +2223,11 @@ hns3_bind_ring_with_vector(struct hns3_hw *hw, uint16_t vector_id, bool en,
@@ -80 +82 @@
-@@ -2337,11 +2337,11 @@ hns3_bind_ring_with_vector(struct hns3_hw *hw, uint16_t vector_id, bool en,
+@@ -2250,11 +2250,11 @@ hns3_bind_ring_with_vector(struct hns3_hw *hw, uint16_t vector_id, bool en,

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

* [dpdk-stable] patch 'net/hns3: fix missing outer L4 UDP flag for VXLAN' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (191 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix use of command status enumeration' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: remove VLAN/QinQ ptypes from support list' " Xueming Li
                   ` (34 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/dc7d063415813e316381faa42db0fcefcafe85e5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From dc7d063415813e316381faa42db0fcefcafe85e5 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Tue, 13 Apr 2021 19:50:06 +0800
Subject: [PATCH] net/hns3: fix missing outer L4 UDP flag for VXLAN
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 7d6df32cf742107130efc3cff53849f3cb0ad262 ]

This patch adds RTE_PTYPE_L4_UDP flag when parsed tunnel vxlan packet.

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

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 1a554313ba..67f4ef5610 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -2053,7 +2053,7 @@ hns3_init_tunnel_ptype_tbl(struct hns3_ptype_table *tbl)
 	tbl->ol3table[5] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT;
 
 	tbl->ol4table[0] = RTE_PTYPE_UNKNOWN;
-	tbl->ol4table[1] = RTE_PTYPE_TUNNEL_VXLAN;
+	tbl->ol4table[1] = RTE_PTYPE_L4_UDP | RTE_PTYPE_TUNNEL_VXLAN;
 	tbl->ol4table[2] = RTE_PTYPE_TUNNEL_NVGRE;
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.607122500 +0800
+++ 0195-net-hns3-fix-missing-outer-L4-UDP-flag-for-VXLAN.patch	2021-05-10 23:59:26.650000000 +0800
@@ -1 +1 @@
-From 7d6df32cf742107130efc3cff53849f3cb0ad262 Mon Sep 17 00:00:00 2001
+From dc7d063415813e316381faa42db0fcefcafe85e5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 7d6df32cf742107130efc3cff53849f3cb0ad262 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 1c22f3412e..3d94f72bf5 100644
+index 1a554313ba..67f4ef5610 100644
@@ -21 +23 @@
-@@ -2051,7 +2051,7 @@ hns3_init_tunnel_ptype_tbl(struct hns3_ptype_table *tbl)
+@@ -2053,7 +2053,7 @@ hns3_init_tunnel_ptype_tbl(struct hns3_ptype_table *tbl)

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

* [dpdk-stable] patch 'net/hns3: remove VLAN/QinQ ptypes from support list' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (192 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix missing outer L4 UDP flag for VXLAN' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix flow control mode' " Xueming Li
                   ` (33 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/20a6184f88cf950c2c2652487cf916a55e88f4a0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 20a6184f88cf950c2c2652487cf916a55e88f4a0 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Tue, 13 Apr 2021 19:50:11 +0800
Subject: [PATCH] net/hns3: remove VLAN/QinQ ptypes from support list
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit e316530d79da684656d740b90d5ece07504445e7 ]

In the previous patch, driver will calculate packet type by ignoring
VLAN information because the packet type may calculate error when
exist VLAN and VLAN strip.

So here remove the following ptypes from support list:
1) RTE_PTYPE_L2_ETHER_VLAN
2) RTE_PTYPE_L2_ETHER_QINQ
3) RTE_PTYPE_INNER_L2_ETHER_VLAN
4) RTE_PTYPE_INNER_L2_ETHER_QINQ

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

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 67f4ef5610..547f1ceaf5 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -1964,8 +1964,6 @@ hns3_dev_supported_ptypes_get(struct rte_eth_dev *dev)
 {
 	static const uint32_t ptypes[] = {
 		RTE_PTYPE_L2_ETHER,
-		RTE_PTYPE_L2_ETHER_VLAN,
-		RTE_PTYPE_L2_ETHER_QINQ,
 		RTE_PTYPE_L2_ETHER_LLDP,
 		RTE_PTYPE_L2_ETHER_ARP,
 		RTE_PTYPE_L3_IPV4,
@@ -1979,8 +1977,6 @@ hns3_dev_supported_ptypes_get(struct rte_eth_dev *dev)
 		RTE_PTYPE_L4_UDP,
 		RTE_PTYPE_TUNNEL_GRE,
 		RTE_PTYPE_INNER_L2_ETHER,
-		RTE_PTYPE_INNER_L2_ETHER_VLAN,
-		RTE_PTYPE_INNER_L2_ETHER_QINQ,
 		RTE_PTYPE_INNER_L3_IPV4,
 		RTE_PTYPE_INNER_L3_IPV6,
 		RTE_PTYPE_INNER_L3_IPV4_EXT,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.632441600 +0800
+++ 0196-net-hns3-remove-VLAN-QinQ-ptypes-from-support-list.patch	2021-05-10 23:59:26.650000000 +0800
@@ -1 +1 @@
-From e316530d79da684656d740b90d5ece07504445e7 Mon Sep 17 00:00:00 2001
+From 20a6184f88cf950c2c2652487cf916a55e88f4a0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit e316530d79da684656d740b90d5ece07504445e7 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index bc3640d696..bec7fae1d1 100644
+index 67f4ef5610..547f1ceaf5 100644
@@ -29 +31 @@
-@@ -1962,8 +1962,6 @@ hns3_dev_supported_ptypes_get(struct rte_eth_dev *dev)
+@@ -1964,8 +1964,6 @@ hns3_dev_supported_ptypes_get(struct rte_eth_dev *dev)
@@ -38 +40 @@
-@@ -1977,8 +1975,6 @@ hns3_dev_supported_ptypes_get(struct rte_eth_dev *dev)
+@@ -1979,8 +1977,6 @@ hns3_dev_supported_ptypes_get(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/hns3: fix flow control mode' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (193 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: remove VLAN/QinQ ptypes from support list' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/i40e: fix lack of MAC type when set MAC address' " Xueming Li
                   ` (32 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6ac6d7e85275152d8545c7fc6e46b3cb04cad9b5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6ac6d7e85275152d8545c7fc6e46b3cb04cad9b5 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Tue, 13 Apr 2021 21:47:13 +0800
Subject: [PATCH] net/hns3: fix flow control mode
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit d4fdb71a0e7beb95b6e2c6ffe13fb159904317bf ]

Currently, hns3 driver doesn't support to flow control auto-negotiation.
The FC mode requested by user is the same as the current FC mode. It is
not necessary to maintain the current FC mode. We only report the current
FC mode based on actual flow control mode in hns3_flow_ctrl_get().

This patch removes this redundant field. In addition, "requested_mode" in
hns3_hw struct indicates the FC mode requested by user, and the name is
unreasonable. It needs to be modified to "requested_fc_mode".

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

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_dcb.c    | 23 ++++++++---------------
 drivers/net/hns3/hns3_ethdev.c | 28 ++++++++++------------------
 drivers/net/hns3/hns3_ethdev.h |  3 +--
 3 files changed, 19 insertions(+), 35 deletions(-)

diff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c
index f7ad2a5e4c..b395372aac 100644
--- a/drivers/net/hns3/hns3_dcb.c
+++ b/drivers/net/hns3/hns3_dcb.c
@@ -1196,7 +1196,7 @@ hns3_qs_bp_cfg(struct hns3_hw *hw, uint8_t tc, uint8_t grp_id, uint32_t bit_map)
 static void
 hns3_get_rx_tx_en_status(struct hns3_hw *hw, bool *tx_en, bool *rx_en)
 {
-	switch (hw->current_mode) {
+	switch (hw->requested_fc_mode) {
 	case HNS3_FC_NONE:
 		*tx_en = false;
 		*rx_en = false;
@@ -1373,7 +1373,7 @@ hns3_dcb_cfg_validate(struct hns3_adapter *hns, uint8_t *tc, bool *changed)
 	 * We ensure that dcb information can be reconfigured
 	 * after the hns3_priority_flow_ctrl_set function called.
 	 */
-	if (hw->current_mode != HNS3_FC_FULL)
+	if (hw->requested_fc_mode != HNS3_FC_FULL)
 		*changed = true;
 	pfc_en = RTE_LEN2MASK((uint8_t)dcb_rx_conf->nb_tcs, uint8_t);
 	if (hw->dcb_info.pfc_en != pfc_en)
@@ -1487,7 +1487,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
 	struct hns3_pf *pf = &hns->pf;
 	struct hns3_hw *hw = &hns->hw;
 	enum hns3_fc_status fc_status = hw->current_fc_status;
-	enum hns3_fc_mode current_mode = hw->current_mode;
+	enum hns3_fc_mode requested_fc_mode = hw->requested_fc_mode;
 	uint8_t hw_pfc_map = hw->dcb_info.hw_pfc_map;
 	int ret, status;
 
@@ -1517,7 +1517,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
 			return ret;
 
 		hw->current_fc_status = HNS3_FC_STATUS_PFC;
-		hw->current_mode = HNS3_FC_FULL;
+		hw->requested_fc_mode = HNS3_FC_FULL;
 		ret = hns3_dcb_pause_setup_hw(hw);
 		if (ret) {
 			hns3_err(hw, "setup pfc failed! ret = %d", ret);
@@ -1538,7 +1538,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
 	return 0;
 
 pfc_setup_fail:
-	hw->current_mode = current_mode;
+	hw->requested_fc_mode = requested_fc_mode;
 	hw->current_fc_status = fc_status;
 	hw->dcb_info.hw_pfc_map = hw_pfc_map;
 	status = hns3_buffer_alloc(hw);
@@ -1616,8 +1616,7 @@ hns3_dcb_init(struct hns3_hw *hw)
 	 * will be changed.
 	 */
 	if (hw->adapter_state == HNS3_NIC_UNINITIALIZED) {
-		hw->requested_mode = HNS3_FC_NONE;
-		hw->current_mode = hw->requested_mode;
+		hw->requested_fc_mode = HNS3_FC_NONE;
 		pf->pause_time = HNS3_DEFAULT_PAUSE_TRANS_TIME;
 		hw->current_fc_status = HNS3_FC_STATUS_NONE;
 
@@ -1718,7 +1717,6 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
 	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct hns3_pf *pf = HNS3_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	enum hns3_fc_status fc_status = hw->current_fc_status;
-	enum hns3_fc_mode current_mode = hw->current_mode;
 	uint8_t hw_pfc_map = hw->dcb_info.hw_pfc_map;
 	uint8_t pfc_en = hw->dcb_info.pfc_en;
 	uint8_t priority = pfc_conf->priority;
@@ -1726,7 +1724,6 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
 	int ret, status;
 
 	pf->pause_time = pfc_conf->fc.pause_time;
-	hw->current_mode = hw->requested_mode;
 	hw->current_fc_status = HNS3_FC_STATUS_PFC;
 	hw->dcb_info.pfc_en |= BIT(priority);
 	hw->dcb_info.hw_pfc_map =
@@ -1737,7 +1734,7 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
 
 	/*
 	 * The flow control mode of all UPs will be changed based on
-	 * current_mode coming from user.
+	 * requested_fc_mode coming from user.
 	 */
 	ret = hns3_dcb_pause_setup_hw(hw);
 	if (ret) {
@@ -1748,7 +1745,6 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
 	return 0;
 
 pfc_setup_fail:
-	hw->current_mode = current_mode;
 	hw->current_fc_status = fc_status;
 	pf->pause_time = pause_time;
 	hw->dcb_info.pfc_en = pfc_en;
@@ -1772,18 +1768,16 @@ hns3_fc_enable(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct hns3_pf *pf = HNS3_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	enum hns3_fc_status fc_status = hw->current_fc_status;
-	enum hns3_fc_mode current_mode = hw->current_mode;
 	uint16_t pause_time = pf->pause_time;
 	int ret;
 
 	pf->pause_time = fc_conf->pause_time;
-	hw->current_mode = hw->requested_mode;
 
 	/*
 	 * In fact, current_fc_status is HNS3_FC_STATUS_NONE when mode
 	 * of flow control is configured to be HNS3_FC_NONE.
 	 */
-	if (hw->current_mode == HNS3_FC_NONE)
+	if (hw->requested_fc_mode == HNS3_FC_NONE)
 		hw->current_fc_status = HNS3_FC_STATUS_NONE;
 	else
 		hw->current_fc_status = HNS3_FC_STATUS_MAC_PAUSE;
@@ -1797,7 +1791,6 @@ hns3_fc_enable(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 	return 0;
 
 setup_fc_fail:
-	hw->current_mode = current_mode;
 	hw->current_fc_status = fc_status;
 	pf->pause_time = pause_time;
 
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index b4e666ebfb..d63159f278 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5202,8 +5202,11 @@ hns3_flow_ctrl_get(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 
 	fc_conf->pause_time = pf->pause_time;
 
-	/* return fc current mode */
-	switch (hw->current_mode) {
+	/*
+	 * If fc auto-negotiation is not supported, the configured fc mode
+	 * from user is the current fc mode.
+	 */
+	switch (hw->requested_fc_mode) {
 	case HNS3_FC_FULL:
 		fc_conf->mode = RTE_FC_FULL;
 		break;
@@ -5227,19 +5230,19 @@ hns3_get_fc_mode(struct hns3_hw *hw, enum rte_eth_fc_mode mode)
 {
 	switch (mode) {
 	case RTE_FC_NONE:
-		hw->requested_mode = HNS3_FC_NONE;
+		hw->requested_fc_mode = HNS3_FC_NONE;
 		break;
 	case RTE_FC_RX_PAUSE:
-		hw->requested_mode = HNS3_FC_RX_PAUSE;
+		hw->requested_fc_mode = HNS3_FC_RX_PAUSE;
 		break;
 	case RTE_FC_TX_PAUSE:
-		hw->requested_mode = HNS3_FC_TX_PAUSE;
+		hw->requested_fc_mode = HNS3_FC_TX_PAUSE;
 		break;
 	case RTE_FC_FULL:
-		hw->requested_mode = HNS3_FC_FULL;
+		hw->requested_fc_mode = HNS3_FC_FULL;
 		break;
 	default:
-		hw->requested_mode = HNS3_FC_NONE;
+		hw->requested_fc_mode = HNS3_FC_NONE;
 		hns3_warn(hw, "fc_mode(%u) exceeds member scope and is "
 			  "configured to RTE_FC_NONE", mode);
 		break;
@@ -5250,7 +5253,6 @@ static int
 hns3_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 {
 	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	struct hns3_pf *pf = HNS3_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	int ret;
 
 	if (fc_conf->high_water || fc_conf->low_water ||
@@ -5285,9 +5287,6 @@ hns3_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 	}
 
 	hns3_get_fc_mode(hw, fc_conf->mode);
-	if (hw->requested_mode == hw->current_mode &&
-	    pf->pause_time == fc_conf->pause_time)
-		return 0;
 
 	rte_spinlock_lock(&hw->lock);
 	ret = hns3_fc_enable(dev, fc_conf);
@@ -5301,8 +5300,6 @@ hns3_priority_flow_ctrl_set(struct rte_eth_dev *dev,
 			    struct rte_eth_pfc_conf *pfc_conf)
 {
 	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	struct hns3_pf *pf = HNS3_DEV_PRIVATE_TO_PF(dev->data->dev_private);
-	uint8_t priority;
 	int ret;
 
 	if (!hns3_dev_dcb_supported(hw)) {
@@ -5337,12 +5334,7 @@ hns3_priority_flow_ctrl_set(struct rte_eth_dev *dev,
 		return -EOPNOTSUPP;
 	}
 
-	priority = pfc_conf->priority;
 	hns3_get_fc_mode(hw, pfc_conf->fc.mode);
-	if (hw->dcb_info.pfc_en & BIT(priority) &&
-	    hw->requested_mode == hw->current_mode &&
-	    pfc_conf->fc.pause_time == pf->pause_time)
-		return 0;
 
 	rte_spinlock_lock(&hw->lock);
 	ret = hns3_dcb_pfc_enable(dev, pfc_conf);
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index b119b73ab3..f58dd356ce 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -457,8 +457,7 @@ struct hns3_hw {
 
 	uint8_t num_tc;             /* Total number of enabled TCs */
 	uint8_t hw_tc_map;
-	enum hns3_fc_mode current_mode;
-	enum hns3_fc_mode requested_mode;
+	enum hns3_fc_mode requested_fc_mode; /* FC mode requested by user */
 	struct hns3_dcb_info dcb_info;
 	enum hns3_fc_status current_fc_status; /* current flow control status */
 	struct hns3_tc_queue_info tc_queue[HNS3_MAX_TC_NUM];
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.657675900 +0800
+++ 0197-net-hns3-fix-flow-control-mode.patch	2021-05-10 23:59:26.660000000 +0800
@@ -1 +1 @@
-From d4fdb71a0e7beb95b6e2c6ffe13fb159904317bf Mon Sep 17 00:00:00 2001
+From 6ac6d7e85275152d8545c7fc6e46b3cb04cad9b5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit d4fdb71a0e7beb95b6e2c6ffe13fb159904317bf ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index 096afe8d0c..30e59e80a6 100644
+index f7ad2a5e4c..b395372aac 100644
@@ -30 +32 @@
-@@ -1238,7 +1238,7 @@ hns3_qs_bp_cfg(struct hns3_hw *hw, uint8_t tc, uint8_t grp_id, uint32_t bit_map)
+@@ -1196,7 +1196,7 @@ hns3_qs_bp_cfg(struct hns3_hw *hw, uint8_t tc, uint8_t grp_id, uint32_t bit_map)
@@ -39 +41 @@
-@@ -1415,7 +1415,7 @@ hns3_dcb_cfg_validate(struct hns3_adapter *hns, uint8_t *tc, bool *changed)
+@@ -1373,7 +1373,7 @@ hns3_dcb_cfg_validate(struct hns3_adapter *hns, uint8_t *tc, bool *changed)
@@ -48 +50 @@
-@@ -1529,7 +1529,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
+@@ -1487,7 +1487,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
@@ -57 +59 @@
-@@ -1559,7 +1559,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
+@@ -1517,7 +1517,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
@@ -66 +68 @@
-@@ -1580,7 +1580,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
+@@ -1538,7 +1538,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
@@ -75 +77 @@
-@@ -1659,8 +1659,7 @@ hns3_dcb_init(struct hns3_hw *hw)
+@@ -1616,8 +1616,7 @@ hns3_dcb_init(struct hns3_hw *hw)
@@ -85 +87 @@
-@@ -1761,7 +1760,6 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
+@@ -1718,7 +1717,6 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
@@ -93 +95 @@
-@@ -1769,7 +1767,6 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
+@@ -1726,7 +1724,6 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
@@ -101 +103 @@
-@@ -1780,7 +1777,7 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
+@@ -1737,7 +1734,7 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
@@ -110 +112 @@
-@@ -1791,7 +1788,6 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
+@@ -1748,7 +1745,6 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
@@ -118 +120 @@
-@@ -1815,18 +1811,16 @@ hns3_fc_enable(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -1772,18 +1768,16 @@ hns3_fc_enable(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
@@ -138 +140 @@
-@@ -1840,7 +1834,6 @@ hns3_fc_enable(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -1797,7 +1791,6 @@ hns3_fc_enable(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
@@ -147 +149 @@
-index ee471173e6..cd6b159047 100644
+index b4e666ebfb..d63159f278 100644
@@ -150 +152 @@
-@@ -5496,8 +5496,11 @@ hns3_flow_ctrl_get(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -5202,8 +5202,11 @@ hns3_flow_ctrl_get(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
@@ -164 +166 @@
-@@ -5521,19 +5524,19 @@ hns3_get_fc_mode(struct hns3_hw *hw, enum rte_eth_fc_mode mode)
+@@ -5227,19 +5230,19 @@ hns3_get_fc_mode(struct hns3_hw *hw, enum rte_eth_fc_mode mode)
@@ -189 +191 @@
-@@ -5544,7 +5547,6 @@ static int
+@@ -5250,7 +5253,6 @@ static int
@@ -197 +199 @@
-@@ -5579,9 +5581,6 @@ hns3_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -5285,9 +5287,6 @@ hns3_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
@@ -207 +209 @@
-@@ -5595,8 +5594,6 @@ hns3_priority_flow_ctrl_set(struct rte_eth_dev *dev,
+@@ -5301,8 +5300,6 @@ hns3_priority_flow_ctrl_set(struct rte_eth_dev *dev,
@@ -216 +218 @@
-@@ -5631,12 +5628,7 @@ hns3_priority_flow_ctrl_set(struct rte_eth_dev *dev,
+@@ -5337,12 +5334,7 @@ hns3_priority_flow_ctrl_set(struct rte_eth_dev *dev,
@@ -230 +232 @@
-index 17d24690bd..39afae7b80 100644
+index b119b73ab3..f58dd356ce 100644
@@ -233 +235 @@
-@@ -469,8 +469,7 @@ struct hns3_hw {
+@@ -457,8 +457,7 @@ struct hns3_hw {

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

* [dpdk-stable] patch 'net/i40e: fix lack of MAC type when set MAC address' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (194 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix flow control mode' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/iavf: " Xueming Li
                   ` (31 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Robin Zhang; +Cc: Luca Boccassi, Yan Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/674d4cb4de001e4f58b45bc8b78241b9ee0e53f0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 674d4cb4de001e4f58b45bc8b78241b9ee0e53f0 Mon Sep 17 00:00:00 2001
From: Robin Zhang <robinx.zhang@intel.com>
Date: Fri, 19 Mar 2021 09:20:18 +0000
Subject: [PATCH] net/i40e: fix lack of MAC type when set MAC address
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 3f604ddf33cf69d9a9a7645e67a7e0b915e76b6a ]

Currently, there is no way for a VF driver to specify that it wants to
change its device/primary unicast MAC address. This makes it
difficult/impossible for the PF driver to track the VF's device/primary
unicast MAC address, which is used for VM/VF reboot and displaying on
the host. Fix this by using 2 bits of a pad byte in the
virtchnl_ether_addr structure so the VF can specify what type of MAC
it's adding/deleting.

Below are the values that should be used by all VF drivers going
forward.

VIRTCHNL_ETHER_ADDR_LEGACY(0):
- The type should only ever be 0 for legacy AVF drivers (i.e.
  drivers that don't support the new type bits). The PF drivers
  will track VF's device/primary unicast MAC using with best
  effort.

VIRTCHNL_ETHER_ADDR_PRIMARY(1):
- This type should only be used when the VF is changing their
  device/primary unicast MAC. It should be used for both delete
  and add cases related to the device/primary unicast MAC.

VIRTCHNL_ETHER_ADDR_EXTRA(2):
- This type should be used when the VF is adding and/or deleting
  MAC addresses that are not the device/primary unicast MAC. For
  example, extra unicast addresses and multicast addresses
  assuming the PF supports "extra" addresses at all.

If a PF is parsing the type field of the virtchnl_ether_addr, then it
should use the VIRTCHNL_ETHER_ADDR_TYPE_MASK to mask the first two bits
of the type field since 0, 1, and 2 are the only valid values.

For i40evf PMD, when set default MAC address, use type
VIRTCHNL_ETHER_ADDR_PRIMARY as this case is changing device/primary
unicast MAC. For other cases, such as adding or deleting extra unicast
addresses and multicast addresses, use type VIRTCHNL_ETHER_ADDR_EXTRA.

Fixes: 6d13ea8e8e49 ("net: add rte prefix to ether structures")
Fixes: caccf8b318ca ("ethdev: return diagnostic when setting MAC address")

Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
Tested-by: Yan Xia <yanx.xia@intel.com>
---
 drivers/net/i40e/base/virtchnl.h  | 29 +++++++++-
 drivers/net/i40e/i40e_ethdev_vf.c | 91 +++++++++++++++----------------
 2 files changed, 73 insertions(+), 47 deletions(-)

diff --git a/drivers/net/i40e/base/virtchnl.h b/drivers/net/i40e/base/virtchnl.h
index 9c64fd4690..648072f5bb 100644
--- a/drivers/net/i40e/base/virtchnl.h
+++ b/drivers/net/i40e/base/virtchnl.h
@@ -402,9 +402,36 @@ VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_queue_select);
  * PF removes the filters and returns status.
  */
 
+/* VIRTCHNL_ETHER_ADDR_LEGACY
+ * Prior to adding the @type member to virtchnl_ether_addr, there were 2 pad
+ * bytes. Moving forward all VF drivers should not set type to
+ * VIRTCHNL_ETHER_ADDR_LEGACY. This is only here to not break previous/legacy
+ * behavior. The control plane function (i.e. PF) can use a best effort method
+ * of tracking the primary/device unicast in this case, but there is no
+ * guarantee and functionality depends on the implementation of the PF.
+ */
+
+/* VIRTCHNL_ETHER_ADDR_PRIMARY
+ * All VF drivers should set @type to VIRTCHNL_ETHER_ADDR_PRIMARY for the
+ * primary/device unicast MAC address filter for VIRTCHNL_OP_ADD_ETH_ADDR and
+ * VIRTCHNL_OP_DEL_ETH_ADDR. This allows for the underlying control plane
+ * function (i.e. PF) to accurately track and use this MAC address for
+ * displaying on the host and for VM/function reset.
+ */
+
+/* VIRTCHNL_ETHER_ADDR_EXTRA
+ * All VF drivers should set @type to VIRTCHNL_ETHER_ADDR_EXTRA for any extra
+ * unicast and/or multicast filters that are being added/deleted via
+ * VIRTCHNL_OP_DEL_ETH_ADDR/VIRTCHNL_OP_ADD_ETH_ADDR respectively.
+ */
 struct virtchnl_ether_addr {
 	u8 addr[VIRTCHNL_ETH_LENGTH_OF_ADDRESS];
-	u8 pad[2];
+	u8 type;
+#define VIRTCHNL_ETHER_ADDR_LEGACY	0
+#define VIRTCHNL_ETHER_ADDR_PRIMARY	1
+#define VIRTCHNL_ETHER_ADDR_EXTRA	2
+#define VIRTCHNL_ETHER_ADDR_TYPE_MASK	3 /* first two bits of type are valid */
+	u8 pad;
 };
 
 VIRTCHNL_CHECK_STRUCT_LEN(8, virtchnl_ether_addr);
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 62acad702d..10cb68eb97 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -106,6 +106,9 @@ static int i40evf_dev_tx_queue_start(struct rte_eth_dev *dev,
 				     uint16_t tx_queue_id);
 static int i40evf_dev_tx_queue_stop(struct rte_eth_dev *dev,
 				    uint16_t tx_queue_id);
+static int i40evf_add_del_eth_addr(struct rte_eth_dev *dev,
+				   struct rte_ether_addr *addr,
+				   bool add, uint8_t type);
 static int i40evf_add_mac_addr(struct rte_eth_dev *dev,
 			       struct rte_ether_addr *addr,
 			       uint32_t index,
@@ -823,10 +826,9 @@ i40evf_stop_queues(struct rte_eth_dev *dev)
 }
 
 static int
-i40evf_add_mac_addr(struct rte_eth_dev *dev,
-		    struct rte_ether_addr *addr,
-		    __rte_unused uint32_t index,
-		    __rte_unused uint32_t pool)
+i40evf_add_del_eth_addr(struct rte_eth_dev *dev,
+			struct rte_ether_addr *addr,
+			bool add, uint8_t type)
 {
 	struct virtchnl_ether_addr_list *list;
 	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
@@ -835,83 +837,70 @@ i40evf_add_mac_addr(struct rte_eth_dev *dev,
 	int err;
 	struct vf_cmd_info args;
 
-	if (rte_is_zero_ether_addr(addr)) {
-		PMD_DRV_LOG(ERR, "Invalid mac:%x:%x:%x:%x:%x:%x",
-			    addr->addr_bytes[0], addr->addr_bytes[1],
-			    addr->addr_bytes[2], addr->addr_bytes[3],
-			    addr->addr_bytes[4], addr->addr_bytes[5]);
-		return I40E_ERR_INVALID_MAC_ADDR;
-	}
-
 	list = (struct virtchnl_ether_addr_list *)cmd_buffer;
 	list->vsi_id = vf->vsi_res->vsi_id;
 	list->num_elements = 1;
+	list->list[0].type = type;
 	rte_memcpy(list->list[0].addr, addr->addr_bytes,
 					sizeof(addr->addr_bytes));
 
-	args.ops = VIRTCHNL_OP_ADD_ETH_ADDR;
+	args.ops = add ? VIRTCHNL_OP_ADD_ETH_ADDR : VIRTCHNL_OP_DEL_ETH_ADDR;
 	args.in_args = cmd_buffer;
 	args.in_args_size = sizeof(cmd_buffer);
 	args.out_buffer = vf->aq_resp;
 	args.out_size = I40E_AQ_BUF_SZ;
 	err = i40evf_execute_vf_cmd(dev, &args);
 	if (err)
-		PMD_DRV_LOG(ERR, "fail to execute command "
-			    "OP_ADD_ETHER_ADDRESS");
-	else
-		vf->vsi.mac_num++;
-
+		PMD_DRV_LOG(ERR, "fail to execute command %s",
+			    add ? "OP_ADD_ETH_ADDR" :  "OP_DEL_ETH_ADDR");
 	return err;
 }
 
-static void
-i40evf_del_mac_addr_by_addr(struct rte_eth_dev *dev,
-			    struct rte_ether_addr *addr)
+static int
+i40evf_add_mac_addr(struct rte_eth_dev *dev,
+		    struct rte_ether_addr *addr,
+		    __rte_unused uint32_t index,
+		    __rte_unused uint32_t pool)
 {
-	struct virtchnl_ether_addr_list *list;
 	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
-	uint8_t cmd_buffer[sizeof(struct virtchnl_ether_addr_list) + \
-			sizeof(struct virtchnl_ether_addr)];
 	int err;
-	struct vf_cmd_info args;
 
-	if (i40e_validate_mac_addr(addr->addr_bytes) != I40E_SUCCESS) {
-		PMD_DRV_LOG(ERR, "Invalid mac:%x-%x-%x-%x-%x-%x",
+	if (rte_is_zero_ether_addr(addr)) {
+		PMD_DRV_LOG(ERR, "Invalid mac:%x:%x:%x:%x:%x:%x",
 			    addr->addr_bytes[0], addr->addr_bytes[1],
 			    addr->addr_bytes[2], addr->addr_bytes[3],
 			    addr->addr_bytes[4], addr->addr_bytes[5]);
-		return;
+		return I40E_ERR_INVALID_MAC_ADDR;
 	}
 
-	list = (struct virtchnl_ether_addr_list *)cmd_buffer;
-	list->vsi_id = vf->vsi_res->vsi_id;
-	list->num_elements = 1;
-	rte_memcpy(list->list[0].addr, addr->addr_bytes,
-			sizeof(addr->addr_bytes));
+	err = i40evf_add_del_eth_addr(dev, addr, TRUE, VIRTCHNL_ETHER_ADDR_EXTRA);
 
-	args.ops = VIRTCHNL_OP_DEL_ETH_ADDR;
-	args.in_args = cmd_buffer;
-	args.in_args_size = sizeof(cmd_buffer);
-	args.out_buffer = vf->aq_resp;
-	args.out_size = I40E_AQ_BUF_SZ;
-	err = i40evf_execute_vf_cmd(dev, &args);
 	if (err)
-		PMD_DRV_LOG(ERR, "fail to execute command "
-			    "OP_DEL_ETHER_ADDRESS");
+		PMD_DRV_LOG(ERR, "fail to add MAC address");
 	else
-		vf->vsi.mac_num--;
-	return;
+		vf->vsi.mac_num++;
+
+	return err;
 }
 
 static void
 i40evf_del_mac_addr(struct rte_eth_dev *dev, uint32_t index)
 {
+	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 	struct rte_eth_dev_data *data = dev->data;
 	struct rte_ether_addr *addr;
+	int err;
 
 	addr = &data->mac_addrs[index];
 
-	i40evf_del_mac_addr_by_addr(dev, addr);
+	err = i40evf_add_del_eth_addr(dev, addr, FALSE, VIRTCHNL_ETHER_ADDR_EXTRA);
+
+	if (err)
+		PMD_DRV_LOG(ERR, "fail to delete MAC address");
+	else
+		vf->vsi.mac_num--;
+
+	return;
 }
 
 static int
@@ -2092,6 +2081,7 @@ i40evf_add_del_all_mac_addr(struct rte_eth_dev *dev, bool add)
 				continue;
 			rte_memcpy(list->list[j].addr, addr->addr_bytes,
 					 sizeof(addr->addr_bytes));
+			list->list[j].type = VIRTCHNL_ETHER_ADDR_EXTRA;
 			PMD_DRV_LOG(DEBUG, "add/rm mac:%x:%x:%x:%x:%x:%x",
 				    addr->addr_bytes[0], addr->addr_bytes[1],
 				    addr->addr_bytes[2], addr->addr_bytes[3],
@@ -2852,15 +2842,23 @@ i40evf_set_default_mac_addr(struct rte_eth_dev *dev,
 			    struct rte_ether_addr *mac_addr)
 {
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct rte_ether_addr *old_addr;
+	int ret;
+
+	old_addr = (struct rte_ether_addr *)hw->mac.addr;
 
 	if (!rte_is_valid_assigned_ether_addr(mac_addr)) {
 		PMD_DRV_LOG(ERR, "Tried to set invalid MAC address.");
 		return -EINVAL;
 	}
 
-	i40evf_del_mac_addr_by_addr(dev, (struct rte_ether_addr *)hw->mac.addr);
+	if (rte_is_same_ether_addr(old_addr, mac_addr))
+		return 0;
+
+	i40evf_add_del_eth_addr(dev, old_addr, FALSE, VIRTCHNL_ETHER_ADDR_PRIMARY);
 
-	if (i40evf_add_mac_addr(dev, mac_addr, 0, 0) != 0)
+	ret = i40evf_add_del_eth_addr(dev, mac_addr, TRUE, VIRTCHNL_ETHER_ADDR_PRIMARY);
+	if (ret)
 		return -EIO;
 
 	rte_ether_addr_copy(mac_addr, (struct rte_ether_addr *)hw->mac.addr);
@@ -2904,6 +2902,7 @@ i40evf_add_del_mc_addr_list(struct rte_eth_dev *dev,
 
 		memcpy(list->list[i].addr, mc_addrs[i].addr_bytes,
 			sizeof(list->list[i].addr));
+		list->list[i].type = VIRTCHNL_ETHER_ADDR_EXTRA;
 	}
 
 	args.ops = add ? VIRTCHNL_OP_ADD_ETH_ADDR : VIRTCHNL_OP_DEL_ETH_ADDR;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.685376500 +0800
+++ 0198-net-i40e-fix-lack-of-MAC-type-when-set-MAC-address.patch	2021-05-10 23:59:26.660000000 +0800
@@ -1 +1 @@
-From 3f604ddf33cf69d9a9a7645e67a7e0b915e76b6a Mon Sep 17 00:00:00 2001
+From 674d4cb4de001e4f58b45bc8b78241b9ee0e53f0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 3f604ddf33cf69d9a9a7645e67a7e0b915e76b6a ]
@@ -45 +47,0 @@
-Cc: stable@dpdk.org
@@ -97 +99 @@
-index 0c9bd8d2c6..7548062934 100644
+index 62acad702d..10cb68eb97 100644
@@ -235 +237 @@
-@@ -2093,6 +2082,7 @@ i40evf_add_del_all_mac_addr(struct rte_eth_dev *dev, bool add)
+@@ -2092,6 +2081,7 @@ i40evf_add_del_all_mac_addr(struct rte_eth_dev *dev, bool add)
@@ -243 +245 @@
-@@ -2853,15 +2843,23 @@ i40evf_set_default_mac_addr(struct rte_eth_dev *dev,
+@@ -2852,15 +2842,23 @@ i40evf_set_default_mac_addr(struct rte_eth_dev *dev,
@@ -269 +271 @@
-@@ -2905,6 +2903,7 @@ i40evf_add_del_mc_addr_list(struct rte_eth_dev *dev,
+@@ -2904,6 +2902,7 @@ i40evf_add_del_mc_addr_list(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/iavf: fix lack of MAC type when set MAC address' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (195 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/i40e: fix lack of MAC type when set MAC address' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'eventdev: fix case to initiate crypto adapter service' " Xueming Li
                   ` (30 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Robin Zhang; +Cc: Luca Boccassi, Yan Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/86ec5aeef9e5e3b31124c89cf71d94e5aae9e38a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 86ec5aeef9e5e3b31124c89cf71d94e5aae9e38a Mon Sep 17 00:00:00 2001
From: Robin Zhang <robinx.zhang@intel.com>
Date: Fri, 19 Mar 2021 09:20:19 +0000
Subject: [PATCH] net/iavf: fix lack of MAC type when set MAC address
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit b335e7203475c82f79692171ce9add9f846d71ef ]

When set default MAC address, use type VIRTCHNL_ETHER_ADDR_PRIMARY as this
case is changing device/primary unicast MAC. For other cases, such as
adding or deleting extra unicast addresses and multicast addresses, use
type VIRTCHNL_ETHER_ADDR_EXTRA.

Fixes: cb25d4323fbf ("net/avf: enable MAC VLAN and promisc ops")

Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
Tested-by: Yan Xia <yanx.xia@intel.com>
---
 drivers/net/iavf/iavf.h        |  2 +-
 drivers/net/iavf/iavf_ethdev.c | 16 +++++++---------
 drivers/net/iavf/iavf_vchnl.c  |  5 ++++-
 3 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
index 3328bd9327..0196f74721 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
@@ -314,7 +314,7 @@ int iavf_query_stats(struct iavf_adapter *adapter,
 int iavf_config_promisc(struct iavf_adapter *adapter, bool enable_unicast,
 		       bool enable_multicast);
 int iavf_add_del_eth_addr(struct iavf_adapter *adapter,
-			 struct rte_ether_addr *addr, bool add);
+			 struct rte_ether_addr *addr, bool add, uint8_t type);
 int iavf_add_del_vlan(struct iavf_adapter *adapter, uint16_t vlanid, bool add);
 int iavf_fdir_add(struct iavf_adapter *adapter, struct iavf_fdir_conf *filter);
 int iavf_fdir_del(struct iavf_adapter *adapter, struct iavf_fdir_conf *filter);
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index ed69ba483e..649061d2ba 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -954,7 +954,7 @@ iavf_dev_add_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *addr,
 		return -EINVAL;
 	}
 
-	err = iavf_add_del_eth_addr(adapter, addr, true);
+	err = iavf_add_del_eth_addr(adapter, addr, true, VIRTCHNL_ETHER_ADDR_EXTRA);
 	if (err) {
 		PMD_DRV_LOG(ERR, "fail to add MAC address");
 		return -EIO;
@@ -976,7 +976,7 @@ iavf_dev_del_mac_addr(struct rte_eth_dev *dev, uint32_t index)
 
 	addr = &dev->data->mac_addrs[index];
 
-	err = iavf_add_del_eth_addr(adapter, addr, false);
+	err = iavf_add_del_eth_addr(adapter, addr, false, VIRTCHNL_ETHER_ADDR_EXTRA);
 	if (err)
 		PMD_DRV_LOG(ERR, "fail to delete MAC address");
 
@@ -1188,17 +1188,15 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
 	struct iavf_adapter *adapter =
 		IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 	struct iavf_hw *hw = IAVF_DEV_PRIVATE_TO_HW(adapter);
-	struct rte_ether_addr *perm_addr, *old_addr;
+	struct rte_ether_addr *old_addr;
 	int ret;
 
 	old_addr = (struct rte_ether_addr *)hw->mac.addr;
-	perm_addr = (struct rte_ether_addr *)hw->mac.perm_addr;
 
-	/* If the MAC address is configured by host, skip the setting */
-	if (rte_is_valid_assigned_ether_addr(perm_addr))
-		return -EPERM;
+	if (rte_is_same_ether_addr(old_addr, mac_addr))
+		return 0;
 
-	ret = iavf_add_del_eth_addr(adapter, old_addr, false);
+	ret = iavf_add_del_eth_addr(adapter, old_addr, false, VIRTCHNL_ETHER_ADDR_PRIMARY);
 	if (ret)
 		PMD_DRV_LOG(ERR, "Fail to delete old MAC:"
 			    " %02X:%02X:%02X:%02X:%02X:%02X",
@@ -1209,7 +1207,7 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
 			    old_addr->addr_bytes[4],
 			    old_addr->addr_bytes[5]);
 
-	ret = iavf_add_del_eth_addr(adapter, mac_addr, true);
+	ret = iavf_add_del_eth_addr(adapter, mac_addr, true, VIRTCHNL_ETHER_ADDR_PRIMARY);
 	if (ret)
 		PMD_DRV_LOG(ERR, "Fail to add new MAC:"
 			    " %02X:%02X:%02X:%02X:%02X:%02X",
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index c17ae06227..3d52a8c402 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -1016,6 +1016,7 @@ iavf_add_del_all_mac_addr(struct iavf_adapter *adapter, bool add)
 				continue;
 			rte_memcpy(list->list[j].addr, addr->addr_bytes,
 				   sizeof(addr->addr_bytes));
+			list->list[j].type = VIRTCHNL_ETHER_ADDR_EXTRA;
 			PMD_DRV_LOG(DEBUG, "add/rm mac:%x:%x:%x:%x:%x:%x",
 				    addr->addr_bytes[0], addr->addr_bytes[1],
 				    addr->addr_bytes[2], addr->addr_bytes[3],
@@ -1111,7 +1112,7 @@ iavf_config_promisc(struct iavf_adapter *adapter,
 
 int
 iavf_add_del_eth_addr(struct iavf_adapter *adapter, struct rte_ether_addr *addr,
-		     bool add)
+		     bool add, uint8_t type)
 {
 	struct virtchnl_ether_addr_list *list;
 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
@@ -1123,6 +1124,7 @@ iavf_add_del_eth_addr(struct iavf_adapter *adapter, struct rte_ether_addr *addr,
 	list = (struct virtchnl_ether_addr_list *)cmd_buffer;
 	list->vsi_id = vf->vsi_res->vsi_id;
 	list->num_elements = 1;
+	list->list[0].type = type;
 	rte_memcpy(list->list[0].addr, addr->addr_bytes,
 		   sizeof(addr->addr_bytes));
 
@@ -1377,6 +1379,7 @@ iavf_add_del_mc_addr_list(struct iavf_adapter *adapter,
 
 		memcpy(list->list[i].addr, mc_addrs[i].addr_bytes,
 			sizeof(list->list[i].addr));
+		list->list[i].type = VIRTCHNL_ETHER_ADDR_EXTRA;
 	}
 
 	args.ops = add ? VIRTCHNL_OP_ADD_ETH_ADDR : VIRTCHNL_OP_DEL_ETH_ADDR;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.709695600 +0800
+++ 0199-net-iavf-fix-lack-of-MAC-type-when-set-MAC-address.patch	2021-05-10 23:59:26.660000000 +0800
@@ -1 +1 @@
-From b335e7203475c82f79692171ce9add9f846d71ef Mon Sep 17 00:00:00 2001
+From 86ec5aeef9e5e3b31124c89cf71d94e5aae9e38a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit b335e7203475c82f79692171ce9add9f846d71ef ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index c934d2e614..d1ae5a3f0b 100644
+index 3328bd9327..0196f74721 100644
@@ -26 +28 @@
-@@ -328,7 +328,7 @@ int iavf_query_stats(struct iavf_adapter *adapter,
+@@ -314,7 +314,7 @@ int iavf_query_stats(struct iavf_adapter *adapter,
@@ -36 +38 @@
-index 51cad48069..8f25a21e85 100644
+index ed69ba483e..649061d2ba 100644
@@ -39 +41 @@
-@@ -997,7 +997,7 @@ iavf_dev_add_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *addr,
+@@ -954,7 +954,7 @@ iavf_dev_add_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *addr,
@@ -48 +50 @@
-@@ -1019,7 +1019,7 @@ iavf_dev_del_mac_addr(struct rte_eth_dev *dev, uint32_t index)
+@@ -976,7 +976,7 @@ iavf_dev_del_mac_addr(struct rte_eth_dev *dev, uint32_t index)
@@ -57 +59 @@
-@@ -1339,17 +1339,15 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
+@@ -1188,17 +1188,15 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
@@ -79 +81 @@
-@@ -1360,7 +1358,7 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
+@@ -1209,7 +1207,7 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
@@ -89 +91 @@
-index aae5b900bb..45096cbfae 100644
+index c17ae06227..3d52a8c402 100644
@@ -92 +94 @@
-@@ -1166,6 +1166,7 @@ iavf_add_del_all_mac_addr(struct iavf_adapter *adapter, bool add)
+@@ -1016,6 +1016,7 @@ iavf_add_del_all_mac_addr(struct iavf_adapter *adapter, bool add)
@@ -100 +102 @@
-@@ -1261,7 +1262,7 @@ iavf_config_promisc(struct iavf_adapter *adapter,
+@@ -1111,7 +1112,7 @@ iavf_config_promisc(struct iavf_adapter *adapter,
@@ -109 +111 @@
-@@ -1273,6 +1274,7 @@ iavf_add_del_eth_addr(struct iavf_adapter *adapter, struct rte_ether_addr *addr,
+@@ -1123,6 +1124,7 @@ iavf_add_del_eth_addr(struct iavf_adapter *adapter, struct rte_ether_addr *addr,
@@ -117 +119 @@
-@@ -1550,6 +1552,7 @@ iavf_add_del_mc_addr_list(struct iavf_adapter *adapter,
+@@ -1377,6 +1379,7 @@ iavf_add_del_mc_addr_list(struct iavf_adapter *adapter,

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

* [dpdk-stable] patch 'eventdev: fix case to initiate crypto adapter service' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (196 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/iavf: " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'vfio: fix duplicated user mem map' " Xueming Li
                   ` (29 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Shijith Thotton; +Cc: Luca Boccassi, Abhinandan Gujjar, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/879dc56ebd87fc03115de64dc6a6bbd63bfaeea1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 879dc56ebd87fc03115de64dc6a6bbd63bfaeea1 Mon Sep 17 00:00:00 2001
From: Shijith Thotton <sthotton@marvell.com>
Date: Mon, 12 Apr 2021 14:23:39 +0530
Subject: [PATCH] eventdev: fix case to initiate crypto adapter service
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit d69123d26620e729ea23a0e11166c3f5859bf6ce ]

Initiate software crypto adapter service, only if hardware capabilities
are not reported. In OP_FORWARD mode, software service is not required
to enqueue events if OP_FORWARD capability is supported by the PMD.

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

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
---
 lib/librte_eventdev/rte_event_crypto_adapter.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_eventdev/rte_event_crypto_adapter.c b/lib/librte_eventdev/rte_event_crypto_adapter.c
index b04312128a..ca58945a84 100644
--- a/lib/librte_eventdev/rte_event_crypto_adapter.c
+++ b/lib/librte_eventdev/rte_event_crypto_adapter.c
@@ -861,6 +861,7 @@ rte_event_crypto_adapter_queue_pair_add(uint8_t id,
 	 *          b. OP_NEW mode -> SW Dequeue
 	 */
 	if ((cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW &&
+	     !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) &&
 	     adapter->mode == RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD) ||
 	     (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW) &&
 	      !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) &&
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.733460400 +0800
+++ 0200-eventdev-fix-case-to-initiate-crypto-adapter-service.patch	2021-05-10 23:59:26.660000000 +0800
@@ -1 +1 @@
-From d69123d26620e729ea23a0e11166c3f5859bf6ce Mon Sep 17 00:00:00 2001
+From 879dc56ebd87fc03115de64dc6a6bbd63bfaeea1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit d69123d26620e729ea23a0e11166c3f5859bf6ce ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index d903cdd480..e1d38d383d 100644
+index b04312128a..ca58945a84 100644

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

* [dpdk-stable] patch 'vfio: fix duplicated user mem map' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (197 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'eventdev: fix case to initiate crypto adapter service' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'pipeline: fix endianness conversions' " Xueming Li
                   ` (28 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Luca Boccassi, Kevin Traynor, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6b76e06108341de9413374698ae4505a984fb470

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6b76e06108341de9413374698ae4505a984fb470 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Sat, 10 Apr 2021 17:37:57 +0800
Subject: [PATCH] vfio: fix duplicated user mem map
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 22677b0eef49ec30ef0facadee44b0084fc091ac ]

Currently, new user mem maps are checked if they are adjacent to
an existing mem map and if so, the mem map entries are merged.

It didn't check for duplicate mem maps, so if the API is called
with the same mem map multiple times, they will occupy multiple
mem map entries. This will reduce the amount of entries available
for unique mem maps.

So check for duplicate mem maps and merge them into one mem map
entry if any found.

Fixes: 0cbce3a167f1 ("vfio: skip DMA map failure if already mapped")

Suggested-by: Kevin Traynor <ktraynor@redhat.com>
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/linux/eal_vfio.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/librte_eal/linux/eal_vfio.c b/lib/librte_eal/linux/eal_vfio.c
index b15b75882b..c80777bc21 100644
--- a/lib/librte_eal/linux/eal_vfio.c
+++ b/lib/librte_eal/linux/eal_vfio.c
@@ -171,6 +171,10 @@ adjust_map(struct user_mem_map *src, struct user_mem_map *end,
 static int
 merge_map(struct user_mem_map *left, struct user_mem_map *right)
 {
+	/* merge the same maps into one */
+	if (memcmp(left, right, sizeof(struct user_mem_map)) == 0)
+		goto out;
+
 	if (left->addr + left->len != right->addr)
 		return 0;
 	if (left->iova + left->len != right->iova)
@@ -178,6 +182,7 @@ merge_map(struct user_mem_map *left, struct user_mem_map *right)
 
 	left->len += right->len;
 
+out:
 	memset(right, 0, sizeof(*right));
 
 	return 1;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.756170100 +0800
+++ 0201-vfio-fix-duplicated-user-mem-map.patch	2021-05-10 23:59:26.660000000 +0800
@@ -1 +1 @@
-From 22677b0eef49ec30ef0facadee44b0084fc091ac Mon Sep 17 00:00:00 2001
+From 6b76e06108341de9413374698ae4505a984fb470 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 22677b0eef49ec30ef0facadee44b0084fc091ac ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index fe25719991..25add2fa5d 100644
+index b15b75882b..c80777bc21 100644

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

* [dpdk-stable] patch 'pipeline: fix endianness conversions' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (198 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'vfio: fix duplicated user mem map' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'examples/ptpclient: remove wrong comment' " Xueming Li
                   ` (27 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Cristian Dumitrescu; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/51ca4146bb2d4ee81635868939fa764ac3d086a0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 51ca4146bb2d4ee81635868939fa764ac3d086a0 Mon Sep 17 00:00:00 2001
From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Date: Sat, 3 Apr 2021 01:17:09 +0100
Subject: [PATCH] pipeline: fix endianness conversions
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 48ad58964cc3e42f3e79b5f19b8deee59e240572 ]

The SWX pipeline instructions work with operands of different types:
header fields (h.header.field), packet meta-data (m.field), extern
object mailbox field (e.obj.field), extern function (f.field), action
data read from table entries (t.field), or immediate values; hence the
HMEFTI acronym. The H operands are stored in network byte order (NBO),
while the MEFT operands are stored in host byte order (HBO), hence the
need to operate endianness conversions.

Some of the endianness conversion macros were not working correctly
for some cases such as operands of different sizes, and they are fixed
now. Affected instructions: mov, and, or, xor, jmpeq, jmpneq.

Fixes: 7210349d5baa ("pipeline: add SWX move instruction")
Fixes: 650195cf965a ("pipeline: introduce SWX and instruction")
Fixes: 8f796198dcda ("pipeline: introduce SWX or instruction")
Fixes: b4e607f9fd5e ("pipeline: introduce SWX XOR instruction")
Fixes: b3947e25bed4 ("pipeline: introduce SWX jump and return instructions")

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 lib/librte_pipeline/rte_swx_pipeline.c | 470 ++++++++++++++++++++-----
 1 file changed, 382 insertions(+), 88 deletions(-)

diff --git a/lib/librte_pipeline/rte_swx_pipeline.c b/lib/librte_pipeline/rte_swx_pipeline.c
index bc619ca533..e4fbf1b1be 100644
--- a/lib/librte_pipeline/rte_swx_pipeline.c
+++ b/lib/librte_pipeline/rte_swx_pipeline.c
@@ -263,9 +263,11 @@ enum instruction_type {
 	 * dst = src
 	 * dst = HMEF, src = HMEFTI
 	 */
-	INSTR_MOV,   /* dst = MEF, src = MEFT */
-	INSTR_MOV_S, /* (dst, src) = (MEF, H) or (dst, src) = (H, MEFT) */
-	INSTR_MOV_I, /* dst = HMEF, src = I */
+	INSTR_MOV,    /* dst = MEF, src = MEFT */
+	INSTR_MOV_MH, /* dst = MEF, src = H */
+	INSTR_MOV_HM, /* dst = H, src = MEFT */
+	INSTR_MOV_HH, /* dst = H, src = H */
+	INSTR_MOV_I,  /* dst = HMEF, src = I */
 
 	/* dma h.header t.field
 	 * memcpy(h.header, t.field, sizeof(h.header))
@@ -319,25 +321,31 @@ enum instruction_type {
 	 * dst &= src
 	 * dst = HMEF, src = HMEFTI
 	 */
-	INSTR_ALU_AND,   /* dst = MEF, src = MEFT */
-	INSTR_ALU_AND_S, /* (dst, src) = (MEF, H) or (dst, src) = (H, MEFT) */
-	INSTR_ALU_AND_I, /* dst = HMEF, src = I */
+	INSTR_ALU_AND,    /* dst = MEF, src = MEFT */
+	INSTR_ALU_AND_MH, /* dst = MEF, src = H */
+	INSTR_ALU_AND_HM, /* dst = H, src = MEFT */
+	INSTR_ALU_AND_HH, /* dst = H, src = H */
+	INSTR_ALU_AND_I,  /* dst = HMEF, src = I */
 
 	/* or dst src
 	 * dst |= src
 	 * dst = HMEF, src = HMEFTI
 	 */
-	INSTR_ALU_OR,   /* dst = MEF, src = MEFT */
-	INSTR_ALU_OR_S, /* (dst, src) = (MEF, H) or (dst, src) = (H, MEFT) */
-	INSTR_ALU_OR_I, /* dst = HMEF, src = I */
+	INSTR_ALU_OR,    /* dst = MEF, src = MEFT */
+	INSTR_ALU_OR_MH, /* dst = MEF, src = H */
+	INSTR_ALU_OR_HM, /* dst = H, src = MEFT */
+	INSTR_ALU_OR_HH, /* dst = H, src = H */
+	INSTR_ALU_OR_I,  /* dst = HMEF, src = I */
 
 	/* xor dst src
 	 * dst ^= src
 	 * dst = HMEF, src = HMEFTI
 	 */
-	INSTR_ALU_XOR,   /* dst = MEF, src = MEFT */
-	INSTR_ALU_XOR_S, /* (dst, src) = (MEF, H) or (dst, src) = (H, MEFT) */
-	INSTR_ALU_XOR_I, /* dst = HMEF, src = I */
+	INSTR_ALU_XOR,    /* dst = MEF, src = MEFT */
+	INSTR_ALU_XOR_MH, /* dst = MEF, src = H */
+	INSTR_ALU_XOR_HM, /* dst = H, src = MEFT */
+	INSTR_ALU_XOR_HH, /* dst = H, src = H */
+	INSTR_ALU_XOR_I,  /* dst = HMEF, src = I */
 
 	/* shl dst src
 	 * dst <<= src
@@ -406,41 +414,45 @@ enum instruction_type {
 	INSTR_JMP_ACTION_MISS,
 
 	/* jmpeq LABEL a b
-	 * Jump is a is equal to b
+	 * Jump if a is equal to b
 	 * a = HMEFT, b = HMEFTI
 	 */
-	INSTR_JMP_EQ,   /* (a, b) = (MEFT, MEFT) or (a, b) = (H, H) */
-	INSTR_JMP_EQ_S, /* (a, b) = (MEFT, H) or (a, b) = (H, MEFT) */
-	INSTR_JMP_EQ_I, /* (a, b) = (MEFT, I) or (a, b) = (H, I) */
+	INSTR_JMP_EQ,    /* a = MEFT, b = MEFT */
+	INSTR_JMP_EQ_MH, /* a = MEFT, b = H */
+	INSTR_JMP_EQ_HM, /* a = H, b = MEFT */
+	INSTR_JMP_EQ_HH, /* a = H, b = H */
+	INSTR_JMP_EQ_I,  /* (a, b) = (MEFT, I) or (a, b) = (H, I) */
 
 	/* jmpneq LABEL a b
-	 * Jump is a is not equal to b
+	 * Jump if a is not equal to b
 	 * a = HMEFT, b = HMEFTI
 	 */
-	INSTR_JMP_NEQ,   /* (a, b) = (MEFT, MEFT) or (a, b) = (H, H) */
-	INSTR_JMP_NEQ_S, /* (a, b) = (MEFT, H) or (a, b) = (H, MEFT) */
-	INSTR_JMP_NEQ_I, /* (a, b) = (MEFT, I) or (a, b) = (H, I) */
+	INSTR_JMP_NEQ,    /* a = MEFT, b = MEFT */
+	INSTR_JMP_NEQ_MH, /* a = MEFT, b = H */
+	INSTR_JMP_NEQ_HM, /* a = H, b = MEFT */
+	INSTR_JMP_NEQ_HH, /* a = H, b = H */
+	INSTR_JMP_NEQ_I,  /* (a, b) = (MEFT, I) or (a, b) = (H, I) */
 
 	/* jmplt LABEL a b
 	 * Jump if a is less than b
 	 * a = HMEFT, b = HMEFTI
 	 */
-	INSTR_JMP_LT,    /* a = MEF, b = MEF */
-	INSTR_JMP_LT_MH, /* a = MEF, b = H */
-	INSTR_JMP_LT_HM, /* a = H, b = MEF */
+	INSTR_JMP_LT,    /* a = MEFT, b = MEFT */
+	INSTR_JMP_LT_MH, /* a = MEFT, b = H */
+	INSTR_JMP_LT_HM, /* a = H, b = MEFT */
 	INSTR_JMP_LT_HH, /* a = H, b = H */
-	INSTR_JMP_LT_MI, /* a = MEF, b = I */
+	INSTR_JMP_LT_MI, /* a = MEFT, b = I */
 	INSTR_JMP_LT_HI, /* a = H, b = I */
 
 	/* jmpgt LABEL a b
 	 * Jump if a is greater than b
 	 * a = HMEFT, b = HMEFTI
 	 */
-	INSTR_JMP_GT,    /* a = MEF, b = MEF */
-	INSTR_JMP_GT_MH, /* a = MEF, b = H */
-	INSTR_JMP_GT_HM, /* a = H, b = MEF */
+	INSTR_JMP_GT,    /* a = MEFT, b = MEFT */
+	INSTR_JMP_GT_MH, /* a = MEFT, b = H */
+	INSTR_JMP_GT_HM, /* a = H, b = MEFT */
 	INSTR_JMP_GT_HH, /* a = H, b = H */
-	INSTR_JMP_GT_MI, /* a = MEF, b = I */
+	INSTR_JMP_GT_MI, /* a = MEFT, b = I */
 	INSTR_JMP_GT_HI, /* a = H, b = I */
 
 	/* return
@@ -673,7 +685,7 @@ struct thread {
 
 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
 
-#define ALU_S(thread, ip, operator)  \
+#define ALU_MH(thread, ip, operator)  \
 {                                                                              \
 	uint8_t *dst_struct = (thread)->structs[(ip)->alu.dst.struct_id];      \
 	uint64_t *dst64_ptr = (uint64_t *)&dst_struct[(ip)->alu.dst.offset];   \
@@ -691,8 +703,6 @@ struct thread {
 	*dst64_ptr = (dst64 & ~dst64_mask) | (result & dst64_mask);            \
 }
 
-#define ALU_MH ALU_S
-
 #define ALU_HM(thread, ip, operator)  \
 {                                                                              \
 	uint8_t *dst_struct = (thread)->structs[(ip)->alu.dst.struct_id];      \
@@ -713,6 +723,25 @@ struct thread {
 	*dst64_ptr = (dst64 & ~dst64_mask) | result;                           \
 }
 
+#define ALU_HM_FAST(thread, ip, operator)  \
+{                                                                                 \
+	uint8_t *dst_struct = (thread)->structs[(ip)->alu.dst.struct_id];         \
+	uint64_t *dst64_ptr = (uint64_t *)&dst_struct[(ip)->alu.dst.offset];      \
+	uint64_t dst64 = *dst64_ptr;                                              \
+	uint64_t dst64_mask = UINT64_MAX >> (64 - (ip)->alu.dst.n_bits);          \
+	uint64_t dst = dst64 & dst64_mask;                                        \
+										  \
+	uint8_t *src_struct = (thread)->structs[(ip)->alu.src.struct_id];         \
+	uint64_t *src64_ptr = (uint64_t *)&src_struct[(ip)->alu.src.offset];      \
+	uint64_t src64 = *src64_ptr;                                              \
+	uint64_t src64_mask = UINT64_MAX >> (64 - (ip)->alu.src.n_bits);          \
+	uint64_t src = hton64(src64 & src64_mask) >> (64 - (ip)->alu.dst.n_bits); \
+										  \
+	uint64_t result = dst operator src;                                       \
+										  \
+	*dst64_ptr = (dst64 & ~dst64_mask) | result;                              \
+}
+
 #define ALU_HH(thread, ip, operator)  \
 {                                                                              \
 	uint8_t *dst_struct = (thread)->structs[(ip)->alu.dst.struct_id];      \
@@ -732,12 +761,31 @@ struct thread {
 	*dst64_ptr = (dst64 & ~dst64_mask) | result;                           \
 }
 
+#define ALU_HH_FAST(thread, ip, operator)  \
+{                                                                                             \
+	uint8_t *dst_struct = (thread)->structs[(ip)->alu.dst.struct_id];                     \
+	uint64_t *dst64_ptr = (uint64_t *)&dst_struct[(ip)->alu.dst.offset];                  \
+	uint64_t dst64 = *dst64_ptr;                                                          \
+	uint64_t dst64_mask = UINT64_MAX >> (64 - (ip)->alu.dst.n_bits);                      \
+	uint64_t dst = dst64 & dst64_mask;                                                    \
+											      \
+	uint8_t *src_struct = (thread)->structs[(ip)->alu.src.struct_id];                     \
+	uint64_t *src64_ptr = (uint64_t *)&src_struct[(ip)->alu.src.offset];                  \
+	uint64_t src64 = *src64_ptr;                                                          \
+	uint64_t src = (src64 << (64 - (ip)->alu.src.n_bits)) >> (64 - (ip)->alu.dst.n_bits); \
+											      \
+	uint64_t result = dst operator src;                                                   \
+											      \
+	*dst64_ptr = (dst64 & ~dst64_mask) | result;                                          \
+}
+
 #else
 
-#define ALU_S ALU
 #define ALU_MH ALU
 #define ALU_HM ALU
+#define ALU_HM_FAST ALU
 #define ALU_HH ALU
+#define ALU_HH_FAST ALU
 
 #endif
 
@@ -800,7 +848,7 @@ struct thread {
 
 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
 
-#define MOV_S(thread, ip)  \
+#define MOV_MH(thread, ip)  \
 {                                                                              \
 	uint8_t *dst_struct = (thread)->structs[(ip)->mov.dst.struct_id];      \
 	uint64_t *dst64_ptr = (uint64_t *)&dst_struct[(ip)->mov.dst.offset];   \
@@ -815,9 +863,44 @@ struct thread {
 	*dst64_ptr = (dst64 & ~dst64_mask) | (src & dst64_mask);               \
 }
 
+#define MOV_HM(thread, ip)  \
+{                                                                              \
+	uint8_t *dst_struct = (thread)->structs[(ip)->mov.dst.struct_id];      \
+	uint64_t *dst64_ptr = (uint64_t *)&dst_struct[(ip)->mov.dst.offset];   \
+	uint64_t dst64 = *dst64_ptr;                                           \
+	uint64_t dst64_mask = UINT64_MAX >> (64 - (ip)->mov.dst.n_bits);       \
+									       \
+	uint8_t *src_struct = (thread)->structs[(ip)->mov.src.struct_id];      \
+	uint64_t *src64_ptr = (uint64_t *)&src_struct[(ip)->mov.src.offset];   \
+	uint64_t src64 = *src64_ptr;                                           \
+	uint64_t src64_mask = UINT64_MAX >> (64 - (ip)->mov.src.n_bits);       \
+	uint64_t src = src64 & src64_mask;                                     \
+									       \
+	src = hton64(src) >> (64 - (ip)->mov.dst.n_bits);                      \
+	*dst64_ptr = (dst64 & ~dst64_mask) | src;                              \
+}
+
+#define MOV_HH(thread, ip)  \
+{                                                                              \
+	uint8_t *dst_struct = (thread)->structs[(ip)->mov.dst.struct_id];      \
+	uint64_t *dst64_ptr = (uint64_t *)&dst_struct[(ip)->mov.dst.offset];   \
+	uint64_t dst64 = *dst64_ptr;                                           \
+	uint64_t dst64_mask = UINT64_MAX >> (64 - (ip)->mov.dst.n_bits);       \
+									       \
+	uint8_t *src_struct = (thread)->structs[(ip)->mov.src.struct_id];      \
+	uint64_t *src64_ptr = (uint64_t *)&src_struct[(ip)->mov.src.offset];   \
+	uint64_t src64 = *src64_ptr;                                           \
+									       \
+	uint64_t src = src64 << (64 - (ip)->mov.src.n_bits);                   \
+	src = src >> (64 - (ip)->mov.dst.n_bits);                              \
+	*dst64_ptr = (dst64 & ~dst64_mask) | src;                              \
+}
+
 #else
 
-#define MOV_S MOV
+#define MOV_MH MOV
+#define MOV_HM MOV
+#define MOV_HH MOV
 
 #endif
 
@@ -852,7 +935,7 @@ struct thread {
 
 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
 
-#define JMP_CMP_S(thread, ip, operator)  \
+#define JMP_CMP_MH(thread, ip, operator)  \
 {                                                                              \
 	uint8_t *a_struct = (thread)->structs[(ip)->jmp.a.struct_id];          \
 	uint64_t *a64_ptr = (uint64_t *)&a_struct[(ip)->jmp.a.offset];         \
@@ -868,8 +951,6 @@ struct thread {
 	(thread)->ip = (a operator b) ? (ip)->jmp.ip : ((thread)->ip + 1);     \
 }
 
-#define JMP_CMP_MH JMP_CMP_S
-
 #define JMP_CMP_HM(thread, ip, operator)  \
 {                                                                              \
 	uint8_t *a_struct = (thread)->structs[(ip)->jmp.a.struct_id];          \
@@ -901,12 +982,27 @@ struct thread {
 	(thread)->ip = (a operator b) ? (ip)->jmp.ip : ((thread)->ip + 1);     \
 }
 
+#define JMP_CMP_HH_FAST(thread, ip, operator)  \
+{                                                                              \
+	uint8_t *a_struct = (thread)->structs[(ip)->jmp.a.struct_id];          \
+	uint64_t *a64_ptr = (uint64_t *)&a_struct[(ip)->jmp.a.offset];         \
+	uint64_t a64 = *a64_ptr;                                               \
+	uint64_t a = a64 << (64 - (ip)->jmp.a.n_bits);                         \
+									       \
+	uint8_t *b_struct = (thread)->structs[(ip)->jmp.b.struct_id];          \
+	uint64_t *b64_ptr = (uint64_t *)&b_struct[(ip)->jmp.b.offset];         \
+	uint64_t b64 = *b64_ptr;                                               \
+	uint64_t b = b64 << (64 - (ip)->jmp.b.n_bits);                         \
+									       \
+	(thread)->ip = (a operator b) ? (ip)->jmp.ip : ((thread)->ip + 1);     \
+}
+
 #else
 
-#define JMP_CMP_S JMP_CMP
 #define JMP_CMP_MH JMP_CMP
 #define JMP_CMP_HM JMP_CMP
 #define JMP_CMP_HH JMP_CMP
+#define JMP_CMP_HH_FAST JMP_CMP
 
 #endif
 
@@ -2280,10 +2376,14 @@ instruction_is_jmp(struct instruction *instr)
 	case INSTR_JMP_ACTION_HIT:
 	case INSTR_JMP_ACTION_MISS:
 	case INSTR_JMP_EQ:
-	case INSTR_JMP_EQ_S:
+	case INSTR_JMP_EQ_MH:
+	case INSTR_JMP_EQ_HM:
+	case INSTR_JMP_EQ_HH:
 	case INSTR_JMP_EQ_I:
 	case INSTR_JMP_NEQ:
-	case INSTR_JMP_NEQ_S:
+	case INSTR_JMP_NEQ_MH:
+	case INSTR_JMP_NEQ_HM:
+	case INSTR_JMP_NEQ_HH:
 	case INSTR_JMP_NEQ_I:
 	case INSTR_JMP_LT:
 	case INSTR_JMP_LT_MH:
@@ -3208,13 +3308,16 @@ instr_mov_translate(struct rte_swx_pipeline *p,
 	fdst = struct_field_parse(p, NULL, dst, &dst_struct_id);
 	CHECK(fdst, EINVAL);
 
-	/* MOV or MOV_S. */
+	/* MOV, MOV_MH, MOV_HM or MOV_HH. */
 	fsrc = struct_field_parse(p, action, src, &src_struct_id);
 	if (fsrc) {
 		instr->type = INSTR_MOV;
-		if ((dst[0] == 'h' && src[0] != 'h') ||
-		    (dst[0] != 'h' && src[0] == 'h'))
-			instr->type = INSTR_MOV_S;
+		if (dst[0] != 'h' && src[0] == 'h')
+			instr->type = INSTR_MOV_MH;
+		if (dst[0] == 'h' && src[0] != 'h')
+			instr->type = INSTR_MOV_HM;
+		if (dst[0] == 'h' && src[0] == 'h')
+			instr->type = INSTR_MOV_HH;
 
 		instr->mov.dst.struct_id = (uint8_t)dst_struct_id;
 		instr->mov.dst.n_bits = fdst->n_bits;
@@ -3256,15 +3359,45 @@ instr_mov_exec(struct rte_swx_pipeline *p)
 }
 
 static inline void
-instr_mov_s_exec(struct rte_swx_pipeline *p)
+instr_mov_mh_exec(struct rte_swx_pipeline *p)
 {
 	struct thread *t = &p->threads[p->thread_id];
 	struct instruction *ip = t->ip;
 
-	TRACE("[Thread %2u] mov (s)\n",
+	TRACE("[Thread %2u] mov (mh)\n",
 	      p->thread_id);
 
-	MOV_S(t, ip);
+	MOV_MH(t, ip);
+
+	/* Thread. */
+	thread_ip_inc(p);
+}
+
+static inline void
+instr_mov_hm_exec(struct rte_swx_pipeline *p)
+{
+	struct thread *t = &p->threads[p->thread_id];
+	struct instruction *ip = t->ip;
+
+	TRACE("[Thread %2u] mov (hm)\n",
+	      p->thread_id);
+
+	MOV_HM(t, ip);
+
+	/* Thread. */
+	thread_ip_inc(p);
+}
+
+static inline void
+instr_mov_hh_exec(struct rte_swx_pipeline *p)
+{
+	struct thread *t = &p->threads[p->thread_id];
+	struct instruction *ip = t->ip;
+
+	TRACE("[Thread %2u] mov (hh)\n",
+	      p->thread_id);
+
+	MOV_HH(t, ip);
 
 	/* Thread. */
 	thread_ip_inc(p);
@@ -3760,13 +3893,16 @@ instr_alu_and_translate(struct rte_swx_pipeline *p,
 	fdst = struct_field_parse(p, NULL, dst, &dst_struct_id);
 	CHECK(fdst, EINVAL);
 
-	/* AND or AND_S. */
+	/* AND, AND_MH, AND_HM, AND_HH. */
 	fsrc = struct_field_parse(p, action, src, &src_struct_id);
 	if (fsrc) {
 		instr->type = INSTR_ALU_AND;
-		if ((dst[0] == 'h' && src[0] != 'h') ||
-		    (dst[0] != 'h' && src[0] == 'h'))
-			instr->type = INSTR_ALU_AND_S;
+		if (dst[0] != 'h' && src[0] == 'h')
+			instr->type = INSTR_ALU_AND_MH;
+		if (dst[0] == 'h' && src[0] != 'h')
+			instr->type = INSTR_ALU_AND_HM;
+		if (dst[0] == 'h' && src[0] == 'h')
+			instr->type = INSTR_ALU_AND_HH;
 
 		instr->alu.dst.struct_id = (uint8_t)dst_struct_id;
 		instr->alu.dst.n_bits = fdst->n_bits;
@@ -3810,13 +3946,16 @@ instr_alu_or_translate(struct rte_swx_pipeline *p,
 	fdst = struct_field_parse(p, NULL, dst, &dst_struct_id);
 	CHECK(fdst, EINVAL);
 
-	/* OR or OR_S. */
+	/* OR, OR_MH, OR_HM, OR_HH. */
 	fsrc = struct_field_parse(p, action, src, &src_struct_id);
 	if (fsrc) {
 		instr->type = INSTR_ALU_OR;
-		if ((dst[0] == 'h' && src[0] != 'h') ||
-		    (dst[0] != 'h' && src[0] == 'h'))
-			instr->type = INSTR_ALU_OR_S;
+		if (dst[0] != 'h' && src[0] == 'h')
+			instr->type = INSTR_ALU_OR_MH;
+		if (dst[0] == 'h' && src[0] != 'h')
+			instr->type = INSTR_ALU_OR_HM;
+		if (dst[0] == 'h' && src[0] == 'h')
+			instr->type = INSTR_ALU_OR_HH;
 
 		instr->alu.dst.struct_id = (uint8_t)dst_struct_id;
 		instr->alu.dst.n_bits = fdst->n_bits;
@@ -3860,13 +3999,16 @@ instr_alu_xor_translate(struct rte_swx_pipeline *p,
 	fdst = struct_field_parse(p, NULL, dst, &dst_struct_id);
 	CHECK(fdst, EINVAL);
 
-	/* XOR or XOR_S. */
+	/* XOR, XOR_MH, XOR_HM, XOR_HH. */
 	fsrc = struct_field_parse(p, action, src, &src_struct_id);
 	if (fsrc) {
 		instr->type = INSTR_ALU_XOR;
-		if ((dst[0] == 'h' && src[0] != 'h') ||
-		    (dst[0] != 'h' && src[0] == 'h'))
-			instr->type = INSTR_ALU_XOR_S;
+		if (dst[0] != 'h' && src[0] == 'h')
+			instr->type = INSTR_ALU_XOR_MH;
+		if (dst[0] == 'h' && src[0] != 'h')
+			instr->type = INSTR_ALU_XOR_HM;
+		if (dst[0] == 'h' && src[0] == 'h')
+			instr->type = INSTR_ALU_XOR_HH;
 
 		instr->alu.dst.struct_id = (uint8_t)dst_struct_id;
 		instr->alu.dst.n_bits = fdst->n_bits;
@@ -4268,15 +4410,45 @@ instr_alu_and_exec(struct rte_swx_pipeline *p)
 }
 
 static inline void
-instr_alu_and_s_exec(struct rte_swx_pipeline *p)
+instr_alu_and_mh_exec(struct rte_swx_pipeline *p)
+{
+	struct thread *t = &p->threads[p->thread_id];
+	struct instruction *ip = t->ip;
+
+	TRACE("[Thread %2u] and (mh)\n", p->thread_id);
+
+	/* Structs. */
+	ALU_MH(t, ip, &);
+
+	/* Thread. */
+	thread_ip_inc(p);
+}
+
+static inline void
+instr_alu_and_hm_exec(struct rte_swx_pipeline *p)
+{
+	struct thread *t = &p->threads[p->thread_id];
+	struct instruction *ip = t->ip;
+
+	TRACE("[Thread %2u] and (hm)\n", p->thread_id);
+
+	/* Structs. */
+	ALU_HM_FAST(t, ip, &);
+
+	/* Thread. */
+	thread_ip_inc(p);
+}
+
+static inline void
+instr_alu_and_hh_exec(struct rte_swx_pipeline *p)
 {
 	struct thread *t = &p->threads[p->thread_id];
 	struct instruction *ip = t->ip;
 
-	TRACE("[Thread %2u] and (s)\n", p->thread_id);
+	TRACE("[Thread %2u] and (hh)\n", p->thread_id);
 
 	/* Structs. */
-	ALU_S(t, ip, &);
+	ALU_HH_FAST(t, ip, &);
 
 	/* Thread. */
 	thread_ip_inc(p);
@@ -4313,15 +4485,45 @@ instr_alu_or_exec(struct rte_swx_pipeline *p)
 }
 
 static inline void
-instr_alu_or_s_exec(struct rte_swx_pipeline *p)
+instr_alu_or_mh_exec(struct rte_swx_pipeline *p)
+{
+	struct thread *t = &p->threads[p->thread_id];
+	struct instruction *ip = t->ip;
+
+	TRACE("[Thread %2u] or (mh)\n", p->thread_id);
+
+	/* Structs. */
+	ALU_MH(t, ip, |);
+
+	/* Thread. */
+	thread_ip_inc(p);
+}
+
+static inline void
+instr_alu_or_hm_exec(struct rte_swx_pipeline *p)
+{
+	struct thread *t = &p->threads[p->thread_id];
+	struct instruction *ip = t->ip;
+
+	TRACE("[Thread %2u] or (hm)\n", p->thread_id);
+
+	/* Structs. */
+	ALU_HM_FAST(t, ip, |);
+
+	/* Thread. */
+	thread_ip_inc(p);
+}
+
+static inline void
+instr_alu_or_hh_exec(struct rte_swx_pipeline *p)
 {
 	struct thread *t = &p->threads[p->thread_id];
 	struct instruction *ip = t->ip;
 
-	TRACE("[Thread %2u] or (s)\n", p->thread_id);
+	TRACE("[Thread %2u] or (hh)\n", p->thread_id);
 
 	/* Structs. */
-	ALU_S(t, ip, |);
+	ALU_HH_FAST(t, ip, |);
 
 	/* Thread. */
 	thread_ip_inc(p);
@@ -4358,15 +4560,45 @@ instr_alu_xor_exec(struct rte_swx_pipeline *p)
 }
 
 static inline void
-instr_alu_xor_s_exec(struct rte_swx_pipeline *p)
+instr_alu_xor_mh_exec(struct rte_swx_pipeline *p)
+{
+	struct thread *t = &p->threads[p->thread_id];
+	struct instruction *ip = t->ip;
+
+	TRACE("[Thread %2u] xor (mh)\n", p->thread_id);
+
+	/* Structs. */
+	ALU_MH(t, ip, ^);
+
+	/* Thread. */
+	thread_ip_inc(p);
+}
+
+static inline void
+instr_alu_xor_hm_exec(struct rte_swx_pipeline *p)
 {
 	struct thread *t = &p->threads[p->thread_id];
 	struct instruction *ip = t->ip;
 
-	TRACE("[Thread %2u] xor (s)\n", p->thread_id);
+	TRACE("[Thread %2u] xor (hm)\n", p->thread_id);
 
 	/* Structs. */
-	ALU_S(t, ip, ^);
+	ALU_HM_FAST(t, ip, ^);
+
+	/* Thread. */
+	thread_ip_inc(p);
+}
+
+static inline void
+instr_alu_xor_hh_exec(struct rte_swx_pipeline *p)
+{
+	struct thread *t = &p->threads[p->thread_id];
+	struct instruction *ip = t->ip;
+
+	TRACE("[Thread %2u] xor (hh)\n", p->thread_id);
+
+	/* Structs. */
+	ALU_HH_FAST(t, ip, ^);
 
 	/* Thread. */
 	thread_ip_inc(p);
@@ -4794,13 +5026,16 @@ instr_jmp_eq_translate(struct rte_swx_pipeline *p,
 	fa = struct_field_parse(p, action, a, &a_struct_id);
 	CHECK(fa, EINVAL);
 
-	/* JMP_EQ or JMP_EQ_S. */
+	/* JMP_EQ, JMP_EQ_MH, JMP_EQ_HM, JMP_EQ_HH. */
 	fb = struct_field_parse(p, action, b, &b_struct_id);
 	if (fb) {
 		instr->type = INSTR_JMP_EQ;
-		if ((a[0] == 'h' && b[0] != 'h') ||
-		    (a[0] != 'h' && b[0] == 'h'))
-			instr->type = INSTR_JMP_EQ_S;
+		if (a[0] != 'h' && b[0] == 'h')
+			instr->type = INSTR_JMP_EQ_MH;
+		if (a[0] == 'h' && b[0] != 'h')
+			instr->type = INSTR_JMP_EQ_HM;
+		if (a[0] == 'h' && b[0] == 'h')
+			instr->type = INSTR_JMP_EQ_HH;
 		instr->jmp.ip = NULL; /* Resolved later. */
 
 		instr->jmp.a.struct_id = (uint8_t)a_struct_id;
@@ -4848,13 +5083,16 @@ instr_jmp_neq_translate(struct rte_swx_pipeline *p,
 	fa = struct_field_parse(p, action, a, &a_struct_id);
 	CHECK(fa, EINVAL);
 
-	/* JMP_NEQ or JMP_NEQ_S. */
+	/* JMP_NEQ, JMP_NEQ_MH, JMP_NEQ_HM, JMP_NEQ_HH. */
 	fb = struct_field_parse(p, action, b, &b_struct_id);
 	if (fb) {
 		instr->type = INSTR_JMP_NEQ;
-		if ((a[0] == 'h' && b[0] != 'h') ||
-		    (a[0] != 'h' && b[0] == 'h'))
-			instr->type = INSTR_JMP_NEQ_S;
+		if (a[0] != 'h' && b[0] == 'h')
+			instr->type = INSTR_JMP_NEQ_MH;
+		if (a[0] == 'h' && b[0] != 'h')
+			instr->type = INSTR_JMP_NEQ_HM;
+		if (a[0] == 'h' && b[0] == 'h')
+			instr->type = INSTR_JMP_NEQ_HH;
 		instr->jmp.ip = NULL; /* Resolved later. */
 
 		instr->jmp.a.struct_id = (uint8_t)a_struct_id;
@@ -5089,14 +5327,36 @@ instr_jmp_eq_exec(struct rte_swx_pipeline *p)
 }
 
 static inline void
-instr_jmp_eq_s_exec(struct rte_swx_pipeline *p)
+instr_jmp_eq_mh_exec(struct rte_swx_pipeline *p)
+{
+	struct thread *t = &p->threads[p->thread_id];
+	struct instruction *ip = t->ip;
+
+	TRACE("[Thread %2u] jmpeq (mh)\n", p->thread_id);
+
+	JMP_CMP_MH(t, ip, ==);
+}
+
+static inline void
+instr_jmp_eq_hm_exec(struct rte_swx_pipeline *p)
 {
 	struct thread *t = &p->threads[p->thread_id];
 	struct instruction *ip = t->ip;
 
-	TRACE("[Thread %2u] jmpeq (s)\n", p->thread_id);
+	TRACE("[Thread %2u] jmpeq (hm)\n", p->thread_id);
 
-	JMP_CMP_S(t, ip, ==);
+	JMP_CMP_HM(t, ip, ==);
+}
+
+static inline void
+instr_jmp_eq_hh_exec(struct rte_swx_pipeline *p)
+{
+	struct thread *t = &p->threads[p->thread_id];
+	struct instruction *ip = t->ip;
+
+	TRACE("[Thread %2u] jmpeq (hh)\n", p->thread_id);
+
+	JMP_CMP_HH_FAST(t, ip, ==);
 }
 
 static inline void
@@ -5122,14 +5382,36 @@ instr_jmp_neq_exec(struct rte_swx_pipeline *p)
 }
 
 static inline void
-instr_jmp_neq_s_exec(struct rte_swx_pipeline *p)
+instr_jmp_neq_mh_exec(struct rte_swx_pipeline *p)
+{
+	struct thread *t = &p->threads[p->thread_id];
+	struct instruction *ip = t->ip;
+
+	TRACE("[Thread %2u] jmpneq (mh)\n", p->thread_id);
+
+	JMP_CMP_MH(t, ip, !=);
+}
+
+static inline void
+instr_jmp_neq_hm_exec(struct rte_swx_pipeline *p)
+{
+	struct thread *t = &p->threads[p->thread_id];
+	struct instruction *ip = t->ip;
+
+	TRACE("[Thread %2u] jmpneq (hm)\n", p->thread_id);
+
+	JMP_CMP_HM(t, ip, !=);
+}
+
+static inline void
+instr_jmp_neq_hh_exec(struct rte_swx_pipeline *p)
 {
 	struct thread *t = &p->threads[p->thread_id];
 	struct instruction *ip = t->ip;
 
-	TRACE("[Thread %2u] jmpneq (s)\n", p->thread_id);
+	TRACE("[Thread %2u] jmpneq (hh)\n", p->thread_id);
 
-	JMP_CMP_S(t, ip, !=);
+	JMP_CMP_HH_FAST(t, ip, !=);
 }
 
 static inline void
@@ -6054,7 +6336,9 @@ static instr_exec_t instruction_table[] = {
 	[INSTR_HDR_INVALIDATE] = instr_hdr_invalidate_exec,
 
 	[INSTR_MOV] = instr_mov_exec,
-	[INSTR_MOV_S] = instr_mov_s_exec,
+	[INSTR_MOV_MH] = instr_mov_mh_exec,
+	[INSTR_MOV_HM] = instr_mov_hm_exec,
+	[INSTR_MOV_HH] = instr_mov_hh_exec,
 	[INSTR_MOV_I] = instr_mov_i_exec,
 
 	[INSTR_DMA_HT] = instr_dma_ht_exec,
@@ -6086,15 +6370,21 @@ static instr_exec_t instruction_table[] = {
 	[INSTR_ALU_CKSUB_FIELD] = instr_alu_cksub_field_exec,
 
 	[INSTR_ALU_AND] = instr_alu_and_exec,
-	[INSTR_ALU_AND_S] = instr_alu_and_s_exec,
+	[INSTR_ALU_AND_MH] = instr_alu_and_mh_exec,
+	[INSTR_ALU_AND_HM] = instr_alu_and_hm_exec,
+	[INSTR_ALU_AND_HH] = instr_alu_and_hh_exec,
 	[INSTR_ALU_AND_I] = instr_alu_and_i_exec,
 
 	[INSTR_ALU_OR] = instr_alu_or_exec,
-	[INSTR_ALU_OR_S] = instr_alu_or_s_exec,
+	[INSTR_ALU_OR_MH] = instr_alu_or_mh_exec,
+	[INSTR_ALU_OR_HM] = instr_alu_or_hm_exec,
+	[INSTR_ALU_OR_HH] = instr_alu_or_hh_exec,
 	[INSTR_ALU_OR_I] = instr_alu_or_i_exec,
 
 	[INSTR_ALU_XOR] = instr_alu_xor_exec,
-	[INSTR_ALU_XOR_S] = instr_alu_xor_s_exec,
+	[INSTR_ALU_XOR_MH] = instr_alu_xor_mh_exec,
+	[INSTR_ALU_XOR_HM] = instr_alu_xor_hm_exec,
+	[INSTR_ALU_XOR_HH] = instr_alu_xor_hh_exec,
 	[INSTR_ALU_XOR_I] = instr_alu_xor_i_exec,
 
 	[INSTR_ALU_SHL] = instr_alu_shl_exec,
@@ -6124,11 +6414,15 @@ static instr_exec_t instruction_table[] = {
 	[INSTR_JMP_ACTION_MISS] = instr_jmp_action_miss_exec,
 
 	[INSTR_JMP_EQ] = instr_jmp_eq_exec,
-	[INSTR_JMP_EQ_S] = instr_jmp_eq_s_exec,
+	[INSTR_JMP_EQ_MH] = instr_jmp_eq_mh_exec,
+	[INSTR_JMP_EQ_HM] = instr_jmp_eq_hm_exec,
+	[INSTR_JMP_EQ_HH] = instr_jmp_eq_hh_exec,
 	[INSTR_JMP_EQ_I] = instr_jmp_eq_i_exec,
 
 	[INSTR_JMP_NEQ] = instr_jmp_neq_exec,
-	[INSTR_JMP_NEQ_S] = instr_jmp_neq_s_exec,
+	[INSTR_JMP_NEQ_MH] = instr_jmp_neq_mh_exec,
+	[INSTR_JMP_NEQ_HM] = instr_jmp_neq_hm_exec,
+	[INSTR_JMP_NEQ_HH] = instr_jmp_neq_hh_exec,
 	[INSTR_JMP_NEQ_I] = instr_jmp_neq_i_exec,
 
 	[INSTR_JMP_LT] = instr_jmp_lt_exec,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.779773400 +0800
+++ 0202-pipeline-fix-endianness-conversions.patch	2021-05-10 23:59:26.670000000 +0800
@@ -1 +1 @@
-From 48ad58964cc3e42f3e79b5f19b8deee59e240572 Mon Sep 17 00:00:00 2001
+From 51ca4146bb2d4ee81635868939fa764ac3d086a0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 48ad58964cc3e42f3e79b5f19b8deee59e240572 ]
@@ -23 +25,0 @@
-Cc: stable@dpdk.org
@@ -31 +33 @@
-index 2956dde77f..e17b449939 100644
+index bc619ca533..e4fbf1b1be 100644
@@ -34 +36 @@
-@@ -318,9 +318,11 @@ enum instruction_type {
+@@ -263,9 +263,11 @@ enum instruction_type {
@@ -49 +51 @@
-@@ -374,25 +376,31 @@ enum instruction_type {
+@@ -319,25 +321,31 @@ enum instruction_type {
@@ -90 +92 @@
-@@ -533,41 +541,45 @@ enum instruction_type {
+@@ -406,41 +414,45 @@ enum instruction_type {
@@ -152 +154 @@
-@@ -901,7 +913,7 @@ struct thread {
+@@ -673,7 +685,7 @@ struct thread {
@@ -161 +163 @@
-@@ -919,8 +931,6 @@ struct thread {
+@@ -691,8 +703,6 @@ struct thread {
@@ -170 +172 @@
-@@ -941,6 +951,25 @@ struct thread {
+@@ -713,6 +723,25 @@ struct thread {
@@ -196 +198 @@
-@@ -960,12 +989,31 @@ struct thread {
+@@ -732,12 +761,31 @@ struct thread {
@@ -229 +231 @@
-@@ -1028,7 +1076,7 @@ struct thread {
+@@ -800,7 +848,7 @@ struct thread {
@@ -238 +240 @@
-@@ -1043,9 +1091,44 @@ struct thread {
+@@ -815,9 +863,44 @@ struct thread {
@@ -284 +286 @@
-@@ -1080,7 +1163,7 @@ struct thread {
+@@ -852,7 +935,7 @@ struct thread {
@@ -293 +295 @@
-@@ -1096,8 +1179,6 @@ struct thread {
+@@ -868,8 +951,6 @@ struct thread {
@@ -302 +304 @@
-@@ -1129,12 +1210,27 @@ struct thread {
+@@ -901,12 +982,27 @@ struct thread {
@@ -331 +333 @@
-@@ -2529,10 +2625,14 @@ instruction_is_jmp(struct instruction *instr)
+@@ -2280,10 +2376,14 @@ instruction_is_jmp(struct instruction *instr)
@@ -348 +350 @@
-@@ -3518,13 +3618,16 @@ instr_mov_translate(struct rte_swx_pipeline *p,
+@@ -3208,13 +3308,16 @@ instr_mov_translate(struct rte_swx_pipeline *p,
@@ -369 +371 @@
-@@ -3566,15 +3669,45 @@ instr_mov_exec(struct rte_swx_pipeline *p)
+@@ -3256,15 +3359,45 @@ instr_mov_exec(struct rte_swx_pipeline *p)
@@ -418 +420 @@
-@@ -4070,13 +4203,16 @@ instr_alu_and_translate(struct rte_swx_pipeline *p,
+@@ -3760,13 +3893,16 @@ instr_alu_and_translate(struct rte_swx_pipeline *p,
@@ -439 +441 @@
-@@ -4120,13 +4256,16 @@ instr_alu_or_translate(struct rte_swx_pipeline *p,
+@@ -3810,13 +3946,16 @@ instr_alu_or_translate(struct rte_swx_pipeline *p,
@@ -460 +462 @@
-@@ -4170,13 +4309,16 @@ instr_alu_xor_translate(struct rte_swx_pipeline *p,
+@@ -3860,13 +3999,16 @@ instr_alu_xor_translate(struct rte_swx_pipeline *p,
@@ -481 +483 @@
-@@ -4578,15 +4720,45 @@ instr_alu_and_exec(struct rte_swx_pipeline *p)
+@@ -4268,15 +4410,45 @@ instr_alu_and_exec(struct rte_swx_pipeline *p)
@@ -530 +532 @@
-@@ -4623,15 +4795,45 @@ instr_alu_or_exec(struct rte_swx_pipeline *p)
+@@ -4313,15 +4485,45 @@ instr_alu_or_exec(struct rte_swx_pipeline *p)
@@ -579 +581 @@
-@@ -4668,15 +4870,45 @@ instr_alu_xor_exec(struct rte_swx_pipeline *p)
+@@ -4358,15 +4560,45 @@ instr_alu_xor_exec(struct rte_swx_pipeline *p)
@@ -628 +630 @@
-@@ -6829,13 +7061,16 @@ instr_jmp_eq_translate(struct rte_swx_pipeline *p,
+@@ -4794,13 +5026,16 @@ instr_jmp_eq_translate(struct rte_swx_pipeline *p,
@@ -649 +651 @@
-@@ -6883,13 +7118,16 @@ instr_jmp_neq_translate(struct rte_swx_pipeline *p,
+@@ -4848,13 +5083,16 @@ instr_jmp_neq_translate(struct rte_swx_pipeline *p,
@@ -670 +672 @@
-@@ -7124,14 +7362,36 @@ instr_jmp_eq_exec(struct rte_swx_pipeline *p)
+@@ -5089,14 +5327,36 @@ instr_jmp_eq_exec(struct rte_swx_pipeline *p)
@@ -710 +712 @@
-@@ -7157,14 +7417,36 @@ instr_jmp_neq_exec(struct rte_swx_pipeline *p)
+@@ -5122,14 +5382,36 @@ instr_jmp_neq_exec(struct rte_swx_pipeline *p)
@@ -750 +752 @@
-@@ -8146,7 +8428,9 @@ static instr_exec_t instruction_table[] = {
+@@ -6054,7 +6336,9 @@ static instr_exec_t instruction_table[] = {
@@ -761 +763 @@
-@@ -8178,15 +8462,21 @@ static instr_exec_t instruction_table[] = {
+@@ -6086,15 +6370,21 @@ static instr_exec_t instruction_table[] = {
@@ -786 +788 @@
-@@ -8264,11 +8554,15 @@ static instr_exec_t instruction_table[] = {
+@@ -6124,11 +6414,15 @@ static instr_exec_t instruction_table[] = {

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

* [dpdk-stable] patch 'examples/ptpclient: remove wrong comment' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (199 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'pipeline: fix endianness conversions' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'examples/l3fwd: fix LPM IPv6 subnets' " Xueming Li
                   ` (26 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/512393d56e52da7d5916b129a272cac337ee06da

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 512393d56e52da7d5916b129a272cac337ee06da Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Sat, 27 Mar 2021 15:36:26 +0800
Subject: [PATCH] examples/ptpclient: remove wrong comment
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit e1d10a42f6e0e44b07ea7936f6704b93a8d2a1ef ]

This patch deletes the comments which are wrong and unnecessary.

Fixes: ab129e9065a5 ("examples/ptpclient: add minimal PTP client")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 examples/ptpclient/ptpclient.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c
index 09968cdfc7..5d4bdbd43f 100644
--- a/examples/ptpclient/ptpclient.c
+++ b/examples/ptpclient/ptpclient.c
@@ -603,10 +603,6 @@ lcore_main(void)
 	unsigned nb_rx;
 	struct rte_mbuf *m;
 
-	/*
-	 * Check that the port is on the same NUMA node as the polling thread
-	 * for best performance.
-	 */
 	printf("\nCore %u Waiting for SYNC packets. [Ctrl+C to quit]\n",
 			rte_lcore_id());
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.806518600 +0800
+++ 0203-examples-ptpclient-remove-wrong-comment.patch	2021-05-10 23:59:26.670000000 +0800
@@ -1 +1 @@
-From e1d10a42f6e0e44b07ea7936f6704b93a8d2a1ef Mon Sep 17 00:00:00 2001
+From 512393d56e52da7d5916b129a272cac337ee06da Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit e1d10a42f6e0e44b07ea7936f6704b93a8d2a1ef ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 33b297e37a..878d1a0b99 100644
+index 09968cdfc7..5d4bdbd43f 100644
@@ -21 +23 @@
-@@ -606,10 +606,6 @@ lcore_main(void)
+@@ -603,10 +603,6 @@ lcore_main(void)

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

* [dpdk-stable] patch 'examples/l3fwd: fix LPM IPv6 subnets' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (200 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'examples/ptpclient: remove wrong comment' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'test/cmdline: fix inputs array' " Xueming Li
                   ` (25 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Conor Walsh; +Cc: Luca Boccassi, Vladimir Medvedkin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c62ae18b64d06da73397b46d68fd4ad662021cbb

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c62ae18b64d06da73397b46d68fd4ad662021cbb Mon Sep 17 00:00:00 2001
From: Conor Walsh <conor.walsh@intel.com>
Date: Fri, 16 Apr 2021 17:19:37 +0000
Subject: [PATCH] examples/l3fwd: fix LPM IPv6 subnets
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 0c74a91ad6eb016cbc7bfd92d5aa414d04aa31ef ]

Any IP within the 2001:200::/48 subnet will match all the routes given
instead of 1 individual route and the application cannot
differentiate between them.
The change in this patch allows the ports to be individually matched using
smaller /64 ranges for each port. These smaller subnet ranges are still
within the 2001:200::/48 subnet range set aside for benchmarking
in RFC5180.
l3fwd will now use 2001:200:0:{0-7}::/64 where 0-7 is the port ID for IPv6.

Fixes: 37afe381bde4 ("examples/l3fwd: use reserved IP addresses")

Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Acked-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 examples/l3fwd/l3fwd_lpm.c | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c
index 3dcf1fef18..1cfaf36572 100644
--- a/examples/l3fwd/l3fwd_lpm.c
+++ b/examples/l3fwd/l3fwd_lpm.c
@@ -42,7 +42,10 @@ struct ipv6_l3fwd_lpm_route {
 	uint8_t  if_out;
 };
 
-/* 198.18.0.0/16 are set aside for RFC2544 benchmarking (RFC5735). */
+/*
+ * 198.18.0.0/16 are set aside for RFC2544 benchmarking (RFC5735).
+ * 198.18.{0-7}.0/24 = Port {0-7}
+ */
 static const struct ipv4_l3fwd_lpm_route ipv4_l3fwd_lpm_route_array[] = {
 	{RTE_IPV4(198, 18, 0, 0), 24, 0},
 	{RTE_IPV4(198, 18, 1, 0), 24, 1},
@@ -54,16 +57,19 @@ static const struct ipv4_l3fwd_lpm_route ipv4_l3fwd_lpm_route_array[] = {
 	{RTE_IPV4(198, 18, 7, 0), 24, 7},
 };
 
-/* 2001:0200::/48 is IANA reserved range for IPv6 benchmarking (RFC5180) */
+/*
+ * 2001:200::/48 is IANA reserved range for IPv6 benchmarking (RFC5180).
+ * 2001:200:0:{0-7}::/64 = Port {0-7}
+ */
 static const struct ipv6_l3fwd_lpm_route ipv6_l3fwd_lpm_route_array[] = {
-	{{32, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 48, 0},
-	{{32, 1, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, 48, 1},
-	{{32, 1, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0}, 48, 2},
-	{{32, 1, 2, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0}, 48, 3},
-	{{32, 1, 2, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0}, 48, 4},
-	{{32, 1, 2, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0}, 48, 5},
-	{{32, 1, 2, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0}, 48, 6},
-	{{32, 1, 2, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0}, 48, 7},
+	{{32, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 64, 0},
+	{{32, 1, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0}, 64, 1},
+	{{32, 1, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0}, 64, 2},
+	{{32, 1, 2, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0}, 64, 3},
+	{{32, 1, 2, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0}, 64, 4},
+	{{32, 1, 2, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0}, 64, 5},
+	{{32, 1, 2, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0}, 64, 6},
+	{{32, 1, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0}, 64, 7},
 };
 
 #define IPV4_L3FWD_LPM_MAX_RULES         1024
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.829346800 +0800
+++ 0204-examples-l3fwd-fix-LPM-IPv6-subnets.patch	2021-05-10 23:59:26.670000000 +0800
@@ -1 +1 @@
-From 0c74a91ad6eb016cbc7bfd92d5aa414d04aa31ef Mon Sep 17 00:00:00 2001
+From c62ae18b64d06da73397b46d68fd4ad662021cbb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 0c74a91ad6eb016cbc7bfd92d5aa414d04aa31ef ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 375746fef0..5af87dbd69 100644
+index 3dcf1fef18..1cfaf36572 100644

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

* [dpdk-stable] patch 'test/cmdline: fix inputs array' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (201 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'examples/l3fwd: fix LPM IPv6 subnets' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'test: check thread creation' " Xueming Li
                   ` (24 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7b3cbf53151074048c9c0c050d39748c843128e5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7b3cbf53151074048c9c0c050d39748c843128e5 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Tue, 20 Apr 2021 14:21:49 +0100
Subject: [PATCH] test/cmdline: fix inputs array
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 414245bbc527b6ff6da0dc0787c6e5c67556d9ec ]

clang 12 gives a warning about string concatenation in arrays.
In this case it looks like it was unintentional to concatenate
the strings. Separate with a comma.

$ clang --version
clang version 12.0.0 (Fedora 12.0.0-0.3.rc1.fc34)

../app/test/test_cmdline_ipaddr.c:259:3: warning:
suspicious concatenation of string literals in an array initialization;
did you mean to separate the elements with a comma?
[-Wstring-concatenation]
"random invalid text",
^
../app/test/test_cmdline_ipaddr.c:258:3: note:
place parentheses around the string literal to silence warning
"1234:1234:1234:1234:1234:1234:1234:1234:1234:1234:1234"
^

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
 app/test/test_cmdline_ipaddr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_cmdline_ipaddr.c b/app/test/test_cmdline_ipaddr.c
index b3f50d80d2..2a1ee120fc 100644
--- a/app/test/test_cmdline_ipaddr.c
+++ b/app/test/test_cmdline_ipaddr.c
@@ -255,7 +255,7 @@ const char * ipaddr_invalid_strs[] = {
 		/** misc **/
 
 		/* too long */
-		"1234:1234:1234:1234:1234:1234:1234:1234:1234:1234:1234"
+		"1234:1234:1234:1234:1234:1234:1234:1234:1234:1234:1234",
 		"random invalid text",
 		"",
 		"\0",
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.852560100 +0800
+++ 0205-test-cmdline-fix-inputs-array.patch	2021-05-10 23:59:26.670000000 +0800
@@ -1 +1 @@
-From 414245bbc527b6ff6da0dc0787c6e5c67556d9ec Mon Sep 17 00:00:00 2001
+From 7b3cbf53151074048c9c0c050d39748c843128e5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 414245bbc527b6ff6da0dc0787c6e5c67556d9ec ]

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

* [dpdk-stable] patch 'test: check thread creation' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (202 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'test/cmdline: fix inputs array' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'ip_frag: fix fragmenting IPv4 packet with header option' " Xueming Li
                   ` (23 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, Reshma Pattan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b6b219b87c190f46a78a7d932f027220d87a3aca

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b6b219b87c190f46a78a7d932f027220d87a3aca Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 16 Apr 2021 16:18:26 +0800
Subject: [PATCH] test: check thread creation
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit a20cb9d0275eb7f0618b4ef2448544056e1035df ]

There was a call for thread create function without result check.
Add result check and message print out after failure.

Fixes: 086eb64db39e ("test/pdump: add unit test for pdump library")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
---
 app/test/process.h | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/app/test/process.h b/app/test/process.h
index 27f1b1c0e6..a09a088477 100644
--- a/app/test/process.h
+++ b/app/test/process.h
@@ -48,6 +48,7 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
 #ifdef RTE_LIB_PDUMP
 #ifdef RTE_NET_RING
 	pthread_t thread;
+	int rc;
 #endif
 #endif
 
@@ -126,8 +127,13 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
 	/* parent process does a wait */
 #ifdef RTE_LIB_PDUMP
 #ifdef RTE_NET_RING
-	if ((strcmp(env_value, "run_pdump_server_tests") == 0))
-		pthread_create(&thread, NULL, &send_pkts, NULL);
+	if ((strcmp(env_value, "run_pdump_server_tests") == 0)) {
+		rc = pthread_create(&thread, NULL, &send_pkts, NULL);
+		if (rc != 0) {
+			rte_panic("Cannot start send pkts thread: %s\n",
+				  strerror(rc));
+		}
+	}
 #endif
 #endif
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.875205000 +0800
+++ 0206-test-check-thread-creation.patch	2021-05-10 23:59:26.670000000 +0800
@@ -1 +1 @@
-From a20cb9d0275eb7f0618b4ef2448544056e1035df Mon Sep 17 00:00:00 2001
+From b6b219b87c190f46a78a7d932f027220d87a3aca Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit a20cb9d0275eb7f0618b4ef2448544056e1035df ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'ip_frag: fix fragmenting IPv4 packet with header option' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (203 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'test: check thread creation' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'sched: fix traffic class oversubscription parameter' " Xueming Li
                   ` (22 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Pu Xu; +Cc: Luca Boccassi, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9ffa1fee2705937cc6259d2e15f5f10840eec68b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9ffa1fee2705937cc6259d2e15f5f10840eec68b Mon Sep 17 00:00:00 2001
From: Pu Xu <583493798@qq.com>
Date: Thu, 25 Mar 2021 19:11:30 +0800
Subject: [PATCH] ip_frag: fix fragmenting IPv4 packet with header option
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 1edf7a796ddc6b8b642153f0a434a3e44e2d4fe3 ]

When fragmenting IPv4 packet, the data offset should be calculated through
the IHL field in IP header rather than using sizeof(struct rte_ipv4_hdr).

Fixes: 4c38e5532a07 ("ip_frag: refactor IPv4 fragmentation into a proper library")

Signed-off-by: Pu Xu <583493798@qq.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_ip_frag/rte_ipv4_fragmentation.c | 34 +++++++++++++--------
 1 file changed, 21 insertions(+), 13 deletions(-)

diff --git a/lib/librte_ip_frag/rte_ipv4_fragmentation.c b/lib/librte_ip_frag/rte_ipv4_fragmentation.c
index e9de335ae2..2e7739d027 100644
--- a/lib/librte_ip_frag/rte_ipv4_fragmentation.c
+++ b/lib/librte_ip_frag/rte_ipv4_fragmentation.c
@@ -23,10 +23,10 @@
 #define	IPV4_HDR_FO_ALIGN			(1 << RTE_IPV4_HDR_FO_SHIFT)
 
 static inline void __fill_ipv4hdr_frag(struct rte_ipv4_hdr *dst,
-		const struct rte_ipv4_hdr *src, uint16_t len, uint16_t fofs,
-		uint16_t dofs, uint32_t mf)
+		const struct rte_ipv4_hdr *src, uint16_t header_len,
+		uint16_t len, uint16_t fofs, uint16_t dofs, uint32_t mf)
 {
-	rte_memcpy(dst, src, sizeof(*dst));
+	rte_memcpy(dst, src, header_len);
 	fofs = (uint16_t)(fofs + (dofs >> RTE_IPV4_HDR_FO_SHIFT));
 	fofs = (uint16_t)(fofs | mf << RTE_IPV4_HDR_MF_SHIFT);
 	dst->fragment_offset = rte_cpu_to_be_16(fofs);
@@ -74,7 +74,7 @@ rte_ipv4_fragment_packet(struct rte_mbuf *pkt_in,
 	struct rte_ipv4_hdr *in_hdr;
 	uint32_t out_pkt_pos, in_seg_data_pos;
 	uint32_t more_in_segs;
-	uint16_t fragment_offset, flag_offset, frag_size;
+	uint16_t fragment_offset, flag_offset, frag_size, header_len;
 	uint16_t frag_bytes_remaining;
 
 	/*
@@ -86,14 +86,22 @@ rte_ipv4_fragment_packet(struct rte_mbuf *pkt_in,
 	    unlikely(mtu_size < RTE_ETHER_MIN_MTU))
 		return -EINVAL;
 
+	in_hdr = rte_pktmbuf_mtod(pkt_in, struct rte_ipv4_hdr *);
+	header_len = (in_hdr->version_ihl & RTE_IPV4_HDR_IHL_MASK) *
+	    RTE_IPV4_IHL_MULTIPLIER;
+
+	/* Check IP header length */
+	if (unlikely(pkt_in->data_len < header_len) ||
+	    unlikely(mtu_size < header_len))
+		return -EINVAL;
+
 	/*
 	 * Ensure the IP payload length of all fragments is aligned to a
 	 * multiple of 8 bytes as per RFC791 section 2.3.
 	 */
-	frag_size = RTE_ALIGN_FLOOR((mtu_size - sizeof(struct rte_ipv4_hdr)),
+	frag_size = RTE_ALIGN_FLOOR((mtu_size - header_len),
 				    IPV4_HDR_FO_ALIGN);
 
-	in_hdr = rte_pktmbuf_mtod(pkt_in, struct rte_ipv4_hdr *);
 	flag_offset = rte_cpu_to_be_16(in_hdr->fragment_offset);
 
 	/* If Don't Fragment flag is set */
@@ -102,11 +110,11 @@ rte_ipv4_fragment_packet(struct rte_mbuf *pkt_in,
 
 	/* Check that pkts_out is big enough to hold all fragments */
 	if (unlikely(frag_size * nb_pkts_out <
-	    (uint16_t)(pkt_in->pkt_len - sizeof(struct rte_ipv4_hdr))))
+	    (uint16_t)(pkt_in->pkt_len - header_len)))
 		return -EINVAL;
 
 	in_seg = pkt_in;
-	in_seg_data_pos = sizeof(struct rte_ipv4_hdr);
+	in_seg_data_pos = header_len;
 	out_pkt_pos = 0;
 	fragment_offset = 0;
 
@@ -124,8 +132,8 @@ rte_ipv4_fragment_packet(struct rte_mbuf *pkt_in,
 		}
 
 		/* Reserve space for the IP header that will be built later */
-		out_pkt->data_len = sizeof(struct rte_ipv4_hdr);
-		out_pkt->pkt_len = sizeof(struct rte_ipv4_hdr);
+		out_pkt->data_len = header_len;
+		out_pkt->pkt_len = header_len;
 		frag_bytes_remaining = frag_size;
 
 		out_seg_prev = out_pkt;
@@ -176,14 +184,14 @@ rte_ipv4_fragment_packet(struct rte_mbuf *pkt_in,
 
 		out_hdr = rte_pktmbuf_mtod(out_pkt, struct rte_ipv4_hdr *);
 
-		__fill_ipv4hdr_frag(out_hdr, in_hdr,
+		__fill_ipv4hdr_frag(out_hdr, in_hdr, header_len,
 		    (uint16_t)out_pkt->pkt_len,
 		    flag_offset, fragment_offset, more_in_segs);
 
 		fragment_offset = (uint16_t)(fragment_offset +
-		    out_pkt->pkt_len - sizeof(struct rte_ipv4_hdr));
+		    out_pkt->pkt_len - header_len);
 
-		out_pkt->l3_len = sizeof(struct rte_ipv4_hdr);
+		out_pkt->l3_len = header_len;
 
 		/* Write the fragment to the output list */
 		pkts_out[out_pkt_pos] = out_pkt;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.898430100 +0800
+++ 0207-ip_frag-fix-fragmenting-IPv4-packet-with-header-opti.patch	2021-05-10 23:59:26.670000000 +0800
@@ -1 +1 @@
-From 1edf7a796ddc6b8b642153f0a434a3e44e2d4fe3 Mon Sep 17 00:00:00 2001
+From 9ffa1fee2705937cc6259d2e15f5f10840eec68b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 1edf7a796ddc6b8b642153f0a434a3e44e2d4fe3 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -15 +17 @@
- lib/ip_frag/rte_ipv4_fragmentation.c | 34 +++++++++++++++++-----------
+ lib/librte_ip_frag/rte_ipv4_fragmentation.c | 34 +++++++++++++--------
@@ -18 +20 @@
-diff --git a/lib/ip_frag/rte_ipv4_fragmentation.c b/lib/ip_frag/rte_ipv4_fragmentation.c
+diff --git a/lib/librte_ip_frag/rte_ipv4_fragmentation.c b/lib/librte_ip_frag/rte_ipv4_fragmentation.c
@@ -20,2 +22,2 @@
---- a/lib/ip_frag/rte_ipv4_fragmentation.c
-+++ b/lib/ip_frag/rte_ipv4_fragmentation.c
+--- a/lib/librte_ip_frag/rte_ipv4_fragmentation.c
++++ b/lib/librte_ip_frag/rte_ipv4_fragmentation.c

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

* [dpdk-stable] patch 'sched: fix traffic class oversubscription parameter' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (204 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'ip_frag: fix fragmenting IPv4 packet with header option' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'common/dpaax: fix possible null pointer access' " Xueming Li
                   ` (21 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Savinay Dharmappa; +Cc: Luca Boccassi, Jasvinder Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1bcde228269a6148f5a10480aa11edbf307c246b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1bcde228269a6148f5a10480aa11edbf307c246b Mon Sep 17 00:00:00 2001
From: Savinay Dharmappa <savinay.dharmappa@intel.com>
Date: Wed, 21 Apr 2021 07:50:01 +0100
Subject: [PATCH] sched: fix traffic class oversubscription parameter
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 3a91d2d138988e208b96a98a859fc3a0d9a9fe4d ]

This patch fixes the traffic class oversubscription watermark
value by initialising it with computed value of maximum watermark.

Fixes: ac6fcb841b0f ("sched: update subport rate dynamically")

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
 lib/librte_sched/rte_sched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c
index 7c56880681..cd87e688e4 100644
--- a/lib/librte_sched/rte_sched.c
+++ b/lib/librte_sched/rte_sched.c
@@ -1249,7 +1249,6 @@ rte_sched_subport_config(struct rte_sched_port *port,
 #ifdef RTE_SCHED_SUBPORT_TC_OV
 		/* TC oversubscription */
 		s->tc_ov_wm_min = port->mtu;
-		s->tc_ov_wm = s->tc_ov_wm_max;
 		s->tc_ov_period_id = 0;
 		s->tc_ov = 0;
 		s->tc_ov_n = 0;
@@ -1277,6 +1276,7 @@ rte_sched_subport_config(struct rte_sched_port *port,
 #ifdef RTE_SCHED_SUBPORT_TC_OV
 		s->tc_ov_wm_max = rte_sched_time_ms_to_bytes(profile->tc_period,
 							s->pipe_tc_be_rate_max);
+		s->tc_ov_wm = s->tc_ov_wm_max;
 #endif
 		s->profile = subport_profile_id;
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.920889700 +0800
+++ 0208-sched-fix-traffic-class-oversubscription-parameter.patch	2021-05-10 23:59:26.670000000 +0800
@@ -1 +1 @@
-From 3a91d2d138988e208b96a98a859fc3a0d9a9fe4d Mon Sep 17 00:00:00 2001
+From 1bcde228269a6148f5a10480aa11edbf307c246b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 3a91d2d138988e208b96a98a859fc3a0d9a9fe4d ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -15 +17 @@
- lib/sched/rte_sched.c | 2 +-
+ lib/librte_sched/rte_sched.c | 2 +-
@@ -18 +20 @@
-diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c
+diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c
@@ -20,2 +22,2 @@
---- a/lib/sched/rte_sched.c
-+++ b/lib/sched/rte_sched.c
+--- a/lib/librte_sched/rte_sched.c
++++ b/lib/librte_sched/rte_sched.c

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

* [dpdk-stable] patch 'common/dpaax: fix possible null pointer access' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (205 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'sched: fix traffic class oversubscription parameter' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'test/bpf: fix error message' " Xueming Li
                   ` (20 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/79273b13a09398477a35167adb8823f7d1a0c25a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 79273b13a09398477a35167adb8823f7d1a0c25a Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 21 Apr 2021 10:46:53 +0800
Subject: [PATCH] common/dpaax: fix possible null pointer access
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 611c394c18598185d3f6f330d0cdf6c26316cc9b ]

This patch fixes possible null pointer access when dump iova table.

Fixes: 2f3d633aa593 ("common/dpaax: add library for PA/VA translation table")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/common/dpaax/dpaax_iova_table.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
index 91bee65e7b..54f89e12ba 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -366,8 +366,10 @@ dpaax_iova_table_dump(void)
 	}
 
 	DPAAX_DEBUG(" === Start of PA->VA Translation Table ===");
-	if (dpaax_iova_table_p == NULL)
+	if (dpaax_iova_table_p == NULL) {
 		DPAAX_DEBUG("\tNULL");
+		return;
+	}
 
 	entry = dpaax_iova_table_p->entries;
 	for (i = 0; i < dpaax_iova_table_p->count; i++) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.944933100 +0800
+++ 0209-common-dpaax-fix-possible-null-pointer-access.patch	2021-05-10 23:59:26.670000000 +0800
@@ -1 +1 @@
-From 611c394c18598185d3f6f330d0cdf6c26316cc9b Mon Sep 17 00:00:00 2001
+From 79273b13a09398477a35167adb8823f7d1a0c25a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 611c394c18598185d3f6f330d0cdf6c26316cc9b ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'test/bpf: fix error message' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (206 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'common/dpaax: fix possible null pointer access' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'test/power: add delay before checking CPU frequency' " Xueming Li
                   ` (19 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/323d01cf8d9d8756d58aa58e02118cd9cf35f520

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 323d01cf8d9d8756d58aa58e02118cd9cf35f520 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Wed, 21 Apr 2021 19:36:53 +0800
Subject: [PATCH] test/bpf: fix error message
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 7eff355b6983872ce4d2817ea8017d21320489e1 ]

This patch fixed wrong error variable in logging message.

Fixes: 83633ba23076 ("test/bpf: fix few small issues")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 app/test/test_bpf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c
index 7c3de96c62..527c06b807 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -3207,7 +3207,7 @@ run_test(const struct bpf_test *tst)
 			printf("%s@%d: check_result(%s) failed, "
 				"error: %d(%s);\n",
 				__func__, __LINE__, tst->name,
-				rv, strerror(ret));
+				rv, strerror(rv));
 		}
 	}
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.971840700 +0800
+++ 0210-test-bpf-fix-error-message.patch	2021-05-10 23:59:26.670000000 +0800
@@ -1 +1 @@
-From 7eff355b6983872ce4d2817ea8017d21320489e1 Mon Sep 17 00:00:00 2001
+From 323d01cf8d9d8756d58aa58e02118cd9cf35f520 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 7eff355b6983872ce4d2817ea8017d21320489e1 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'test/power: add delay before checking CPU frequency' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (207 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'test/bpf: fix error message' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'test/power: round CPU frequency to check' " Xueming Li
                   ` (18 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Richael Zhuang; +Cc: Luca Boccassi, David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2266f65a23e33ca9487f6ba0cd92c43d8e7b8e1c
our

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2266f65a23e33ca9487f6ba0cd92c43d8e7b8e1c Mon Sep 17 00:00:00 2001
From: Richael Zhuang <richael.zhuang@arm.com>
Date: Thu, 15 Apr 2021 13:59:29 +0800
Subject: [PATCH] test/power: add delay before checking CPU frequency
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 00456850be40d8b663d1066763ddedffe4346585 ]

For some platforms the newly-set frequency may not be effective
immediately. If we didn't get the right value from cpuinfo_cur_freq
immediately, add 10ms delay each time before rechecking until
timeout.

From our test, for some arm platforms, it requires up to 700ms when
going from a minimum to a maximum frequency. And it's not the
driver/software issue.

Fixes: ed7c51a6a680 ("app/test: vm power management")

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-by: David Hunt <david.hunt@intel.com>
---
 app/test/test_power_cpufreq.c | 27 ++++++++++++++++++++++-----
 1 file changed, 22 insertions(+), 5 deletions(-)

diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c
index 731c6b4dc8..d47b3e0a1a 100644
--- a/app/test/test_power_cpufreq.c
+++ b/app/test/test_power_cpufreq.c
@@ -8,6 +8,7 @@
 #include <limits.h>
 #include <string.h>
 #include <inttypes.h>
+#include <rte_cycles.h>
 
 #include "test.h"
 
@@ -44,11 +45,13 @@ static int
 check_cur_freq(unsigned lcore_id, uint32_t idx)
 {
 #define TEST_POWER_CONVERT_TO_DECIMAL 10
+#define MAX_LOOP 100
 	FILE *f;
 	char fullpath[PATH_MAX];
 	char buf[BUFSIZ];
 	uint32_t cur_freq;
 	int ret = -1;
+	int i;
 
 	if (snprintf(fullpath, sizeof(fullpath),
 		TEST_POWER_SYSFILE_CUR_FREQ, lcore_id) < 0) {
@@ -58,13 +61,27 @@ check_cur_freq(unsigned lcore_id, uint32_t idx)
 	if (f == NULL) {
 		return 0;
 	}
-	if (fgets(buf, sizeof(buf), f) == NULL) {
-		goto fail_get_cur_freq;
+	for (i = 0; i < MAX_LOOP; i++) {
+		fflush(f);
+		if (fgets(buf, sizeof(buf), f) == NULL)
+			goto fail_all;
+
+		cur_freq = strtoul(buf, NULL, TEST_POWER_CONVERT_TO_DECIMAL);
+		ret = (freqs[idx] == cur_freq ? 0 : -1);
+
+		if (ret == 0)
+			break;
+
+		if (fseek(f, 0, SEEK_SET) < 0) {
+			printf("Fail to set file position indicator to 0\n");
+			goto fail_all;
+		}
+
+		/* wait for the value to be updated */
+		rte_delay_ms(10);
 	}
-	cur_freq = strtoul(buf, NULL, TEST_POWER_CONVERT_TO_DECIMAL);
-	ret = (freqs[idx] == cur_freq ? 0 : -1);
 
-fail_get_cur_freq:
+fail_all:
 	fclose(f);
 
 	return ret;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:31.994200400 +0800
+++ 0211-test-power-add-delay-before-checking-CPU-frequency.patch	2021-05-10 23:59:26.670000000 +0800
@@ -1 +1 @@
-From 00456850be40d8b663d1066763ddedffe4346585 Mon Sep 17 00:00:00 2001
+From 2266f65a23e33ca9487f6ba0cd92c43d8e7b8e1c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 00456850be40d8b663d1066763ddedffe4346585 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'test/power: round CPU frequency to check' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (208 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'test/power: add delay before checking CPU frequency' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'examples: add eal cleanup to examples' " Xueming Li
                   ` (17 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Richael Zhuang; +Cc: Luca Boccassi, David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8347ba1646e41c9ccb2a5addc30b8996f487c142

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8347ba1646e41c9ccb2a5addc30b8996f487c142 Mon Sep 17 00:00:00 2001
From: Richael Zhuang <richael.zhuang@arm.com>
Date: Thu, 15 Apr 2021 13:59:30 +0800
Subject: [PATCH] test/power: round CPU frequency to check
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 606a234c6d3607c93a0426bdccdbf9aaa2b8e5f6 ]

The value in "/sys/.../cpuinfo_cur_freq" may not be exactly the
same as what was set. For example, if "2400000" is written to
"/sys/.../cpufreq/scaling_setspeed" to set the frequency, then the
value in "/sys/.../cpuinfo_cur_freq" may be "2401222". So need to
round the value.

Fixes: ed7c51a6a680 ("app/test: vm power management")

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-by: David Hunt <david.hunt@intel.com>
---
 app/test/test_power_cpufreq.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c
index d47b3e0a1a..f753d24ac5 100644
--- a/app/test/test_power_cpufreq.c
+++ b/app/test/test_power_cpufreq.c
@@ -35,6 +35,10 @@ test_power_caps(void)
 #define TEST_POWER_LCORE_INVALID ((unsigned)RTE_MAX_LCORE)
 #define TEST_POWER_FREQS_NUM_MAX ((unsigned)RTE_MAX_LCORE_FREQS)
 
+/* macros used for rounding frequency to nearest 100000 */
+#define TEST_FREQ_ROUNDING_DELTA 50000
+#define TEST_ROUND_FREQ_TO_N_100000 100000
+
 #define TEST_POWER_SYSFILE_CUR_FREQ \
 	"/sys/devices/system/cpu/cpu%u/cpufreq/cpuinfo_cur_freq"
 
@@ -67,7 +71,17 @@ check_cur_freq(unsigned lcore_id, uint32_t idx)
 			goto fail_all;
 
 		cur_freq = strtoul(buf, NULL, TEST_POWER_CONVERT_TO_DECIMAL);
-		ret = (freqs[idx] == cur_freq ? 0 : -1);
+
+		/* convert the frequency to nearest 100000 value
+		 * Ex: if cur_freq=1396789 then freq_conv=1400000
+		 * Ex: if cur_freq=800030 then freq_conv=800000
+		 */
+		unsigned int freq_conv = 0;
+		freq_conv = (cur_freq + TEST_FREQ_ROUNDING_DELTA)
+					/ TEST_ROUND_FREQ_TO_N_100000;
+		freq_conv = freq_conv * TEST_ROUND_FREQ_TO_N_100000;
+
+		ret = (freqs[idx] == freq_conv ? 0 : -1);
 
 		if (ret == 0)
 			break;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:32.017043100 +0800
+++ 0212-test-power-round-CPU-frequency-to-check.patch	2021-05-10 23:59:26.670000000 +0800
@@ -1 +1 @@
-From 606a234c6d3607c93a0426bdccdbf9aaa2b8e5f6 Mon Sep 17 00:00:00 2001
+From 8347ba1646e41c9ccb2a5addc30b8996f487c142 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 606a234c6d3607c93a0426bdccdbf9aaa2b8e5f6 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'examples: add eal cleanup to examples' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (209 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'test/power: round CPU frequency to check' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'examples/ethtool: remove unused parsing' " Xueming Li
                   ` (16 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/aa94d640eb5174b0eb0af7ca658a5a76a6bb2d0c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From aa94d640eb5174b0eb0af7ca658a5a76a6bb2d0c Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Thu, 15 Apr 2021 10:26:03 +0800
Subject: [PATCH] examples: add eal cleanup to examples
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 10aa375704c148d9e90b5e984066d719f7465357 ]

According to the programming guide, the rte_eal_init should be used pairs
with rte_eal_cleanup.

This patch add rte_eal_cleanup to examples to encourage new users of
DPDK to use it.

Fixes: aec9c13c5257 ("eal: add function to release internal resources")
Fixes: 3d0fad56b74a ("examples/fips_validation: add crypto FIPS application")
Fixes: c8e6ceecebc1 ("examples/ioat: add new sample app for ioat driver")
Fixes: 4ff457986f76 ("examples/l2fwd-event: add default poll mode routines")
Fixes: 08bd1a174461 ("examples/l3fwd-graph: add graph-based l3fwd skeleton")
Fixes: c5eebf85badc ("examples/ntb: add example for NTB")
Fixes: b77f66002812 ("examples/pipeline: add new example application")
Fixes: edbed86d1cc3 ("examples/vdpa: introduce a new sample for vDPA")
Fixes: c19beb3f38cd ("examples/vhost_blk: introduce vhost storage sample")
Fixes: f5188211c721 ("examples/vhost_crypto: add sample application")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
---
 examples/bbdev_app/main.c                                  | 3 +++
 examples/bond/main.c                                       | 4 ++++
 examples/cmdline/main.c                                    | 3 +++
 examples/distributor/main.c                                | 3 +++
 examples/ethtool/ethtool-app/main.c                        | 3 +++
 examples/fips_validation/main.c                            | 3 +++
 examples/flow_classify/flow_classify.c                     | 3 +++
 examples/flow_filtering/main.c                             | 7 ++++++-
 examples/helloworld/main.c                                 | 4 ++++
 examples/ioat/ioatfwd.c                                    | 3 +++
 examples/ip_fragmentation/main.c                           | 3 +++
 examples/ip_reassembly/main.c                              | 3 +++
 examples/ipsec-secgw/ipsec-secgw.c                         | 3 +++
 examples/ipv4_multicast/main.c                             | 3 +++
 examples/kni/main.c                                        | 3 +++
 examples/l2fwd-cat/l2fwd-cat.c                             | 3 +++
 examples/l2fwd-crypto/main.c                               | 3 +++
 examples/l2fwd-event/main.c                                | 3 +++
 examples/l2fwd-jobstats/main.c                             | 3 +++
 examples/l2fwd-keepalive/main.c                            | 4 ++++
 examples/l2fwd/main.c                                      | 3 +++
 examples/l3fwd-acl/main.c                                  | 3 +++
 examples/l3fwd-graph/main.c                                | 3 +++
 examples/l3fwd/main.c                                      | 4 ++++
 examples/link_status_interrupt/main.c                      | 3 +++
 examples/multi_process/client_server_mp/mp_client/client.c | 3 +++
 examples/multi_process/client_server_mp/mp_server/main.c   | 4 ++++
 examples/multi_process/simple_mp/main.c                    | 4 ++++
 examples/multi_process/symmetric_mp/main.c                 | 3 +++
 examples/ntb/ntb_fwd.c                                     | 3 +++
 examples/packet_ordering/main.c                            | 4 ++++
 examples/performance-thread/l3fwd-thread/main.c            | 3 +++
 examples/performance-thread/pthread_shim/main.c            | 4 ++++
 examples/pipeline/main.c                                   | 3 +++
 examples/ptpclient/ptpclient.c                             | 3 +++
 examples/qos_meter/main.c                                  | 3 +++
 examples/qos_sched/main.c                                  | 3 +++
 examples/rxtx_callbacks/main.c                             | 4 ++++
 examples/server_node_efd/node/node.c                       | 3 +++
 examples/server_node_efd/server/main.c                     | 4 ++++
 examples/service_cores/main.c                              | 3 +++
 examples/skeleton/basicfwd.c                               | 3 +++
 examples/timer/main.c                                      | 3 +++
 examples/vdpa/main.c                                       | 3 +++
 examples/vhost/main.c                                      | 4 +++-
 examples/vhost_blk/vhost_blk.c                             | 3 +++
 examples/vhost_crypto/main.c                               | 3 +++
 examples/vm_power_manager/guest_cli/main.c                 | 3 +++
 examples/vm_power_manager/main.c                           | 3 +++
 examples/vmdq/main.c                                       | 3 +++
 examples/vmdq_dcb/main.c                                   | 3 +++
 51 files changed, 166 insertions(+), 2 deletions(-)

diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
index 20cfd327fb..5251db0b16 100644
--- a/examples/bbdev_app/main.c
+++ b/examples/bbdev_app/main.c
@@ -1195,5 +1195,8 @@ main(int argc, char **argv)
 		ret |= rte_eal_wait_lcore(lcore_id);
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return ret;
 }
diff --git a/examples/bond/main.c b/examples/bond/main.c
index 81a6fa976b..f48400e211 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -876,5 +876,9 @@ main(int argc, char *argv[])
 	prompt(NULL);
 
 	rte_delay_ms(100);
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/cmdline/main.c b/examples/cmdline/main.c
index bb79542452..94002f0582 100644
--- a/examples/cmdline/main.c
+++ b/examples/cmdline/main.c
@@ -36,5 +36,8 @@ int main(int argc, char **argv)
 	cmdline_interact(cl);
 	cmdline_stdin_exit(cl);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/distributor/main.c b/examples/distributor/main.c
index caa7c46cb1..1b1029660e 100644
--- a/examples/distributor/main.c
+++ b/examples/distributor/main.c
@@ -932,5 +932,8 @@ main(int argc, char *argv[])
 	rte_free(pd);
 	rte_free(pr);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/ethtool/ethtool-app/main.c b/examples/ethtool/ethtool-app/main.c
index c6023a1d41..21ed85c7d6 100644
--- a/examples/ethtool/ethtool-app/main.c
+++ b/examples/ethtool/ethtool-app/main.c
@@ -299,5 +299,8 @@ int main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index cad6bcb180..a7259173ec 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -483,6 +483,9 @@ exit:
 	fips_test_clear();
 	cryptodev_fips_validate_app_uninit();
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return ret;
 
 }
diff --git a/examples/flow_classify/flow_classify.c b/examples/flow_classify/flow_classify.c
index 335d7d2ad8..5c3e111cfa 100644
--- a/examples/flow_classify/flow_classify.c
+++ b/examples/flow_classify/flow_classify.c
@@ -853,5 +853,8 @@ main(int argc, char *argv[])
 	/* Call lcore_main on the main core only. */
 	lcore_main(cls_app);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c
index 93523d625b..932f49fa7f 100644
--- a/examples/flow_filtering/main.c
+++ b/examples/flow_filtering/main.c
@@ -259,5 +259,10 @@ main(int argc, char **argv)
 		rte_exit(EXIT_FAILURE, "error in creating flow");
 	}
 
-	return main_loop();
+	ret = main_loop();
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
+	return ret;
 }
diff --git a/examples/helloworld/main.c b/examples/helloworld/main.c
index 8a4cee60ff..ac72145c73 100644
--- a/examples/helloworld/main.c
+++ b/examples/helloworld/main.c
@@ -43,5 +43,9 @@ main(int argc, char **argv)
 	lcore_hello(NULL);
 
 	rte_eal_mp_wait_lcore();
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/ioat/ioatfwd.c b/examples/ioat/ioatfwd.c
index 6502e4531f..845301a6db 100644
--- a/examples/ioat/ioatfwd.c
+++ b/examples/ioat/ioatfwd.c
@@ -1011,6 +1011,9 @@ main(int argc, char **argv)
 			rte_ring_free(cfg.ports[i].rx_to_tx_ring);
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	printf("Bye...\n");
 	return 0;
 }
diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index 5a96841dfc..77a6a18d19 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -1075,5 +1075,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index 954a11512a..ce8882a458 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -1201,5 +1201,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 20d69ba813..1efcb5e635 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -3037,6 +3037,9 @@ main(int32_t argc, char **argv)
 		rte_eth_dev_close(portid);
 		printf(" Done\n");
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 	printf("Bye...\n");
 
 	return 0;
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index e18726a5d2..fd6207a18b 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -805,5 +805,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/kni/main.c b/examples/kni/main.c
index fe93b8618a..beabb3c848 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -1140,5 +1140,8 @@ main(int argc, char** argv)
 			kni_port_params_array[i] = NULL;
 		}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/l2fwd-cat/l2fwd-cat.c b/examples/l2fwd-cat/l2fwd-cat.c
index 2e632c5cb6..02288a3824 100644
--- a/examples/l2fwd-cat/l2fwd-cat.c
+++ b/examples/l2fwd-cat/l2fwd-cat.c
@@ -201,5 +201,8 @@ main(int argc, char *argv[])
 	/* Call lcore_main on the main core only. */
 	lcore_main();
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 656b140368..05f953e242 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -2825,5 +2825,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/l2fwd-event/main.c b/examples/l2fwd-event/main.c
index 444ee4e4db..0acfee4c92 100644
--- a/examples/l2fwd-event/main.c
+++ b/examples/l2fwd-event/main.c
@@ -716,6 +716,9 @@ main(int argc, char **argv)
 			printf(" Done\n");
 		}
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 	printf("Bye...\n");
 
 	return 0;
diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
index 1151769aa9..58a722669b 100644
--- a/examples/l2fwd-jobstats/main.c
+++ b/examples/l2fwd-jobstats/main.c
@@ -1022,5 +1022,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
index e4c2b27933..be6616288f 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -817,5 +817,9 @@ main(int argc, char **argv)
 
 	if (ka_shm != NULL)
 		rte_keepalive_shm_cleanup(ka_shm);
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index 3377b08322..ffb67bb901 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -903,6 +903,9 @@ main(int argc, char **argv)
 		rte_eth_dev_close(portid);
 		printf(" Done\n");
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 	printf("Bye...\n");
 
 	return ret;
diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c
index 961594f5fe..a449fc9f1b 100644
--- a/examples/l3fwd-acl/main.c
+++ b/examples/l3fwd-acl/main.c
@@ -2257,5 +2257,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c
index 127c5e8dab..75c2e0ef3f 100644
--- a/examples/l3fwd-graph/main.c
+++ b/examples/l3fwd-graph/main.c
@@ -1123,6 +1123,9 @@ main(int argc, char **argv)
 		rte_eth_dev_close(portid);
 		printf(" Done\n");
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 	printf("Bye...\n");
 
 	return ret;
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index bb49e5faff..ee156d13a6 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -1315,6 +1315,10 @@ main(int argc, char **argv)
 			printf(" Done\n");
 		}
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	printf("Bye...\n");
 
 	return ret;
diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
index f1653b4fb8..6cffd5a827 100644
--- a/examples/link_status_interrupt/main.c
+++ b/examples/link_status_interrupt/main.c
@@ -731,5 +731,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/multi_process/client_server_mp/mp_client/client.c b/examples/multi_process/client_server_mp/mp_client/client.c
index 361d90b54b..6d4c246816 100644
--- a/examples/multi_process/client_server_mp/mp_client/client.c
+++ b/examples/multi_process/client_server_mp/mp_client/client.c
@@ -268,4 +268,7 @@ main(int argc, char *argv[])
 
 		need_flush = 1;
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 }
diff --git a/examples/multi_process/client_server_mp/mp_server/main.c b/examples/multi_process/client_server_mp/mp_server/main.c
index b18e12dd4b..9bcee460fd 100644
--- a/examples/multi_process/client_server_mp/mp_server/main.c
+++ b/examples/multi_process/client_server_mp/mp_server/main.c
@@ -304,5 +304,9 @@ main(int argc, char *argv[])
 	rte_eal_mp_remote_launch(sleep_lcore, NULL, SKIP_MAIN);
 
 	do_packet_forwarding();
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/multi_process/simple_mp/main.c b/examples/multi_process/simple_mp/main.c
index 109b8bb45d..a05404f7ed 100644
--- a/examples/multi_process/simple_mp/main.c
+++ b/examples/multi_process/simple_mp/main.c
@@ -121,5 +121,9 @@ main(int argc, char **argv)
 	cmdline_stdin_exit(cl);
 
 	rte_eal_mp_wait_lcore();
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c
index ae7f5e0d50..79e5c61e40 100644
--- a/examples/multi_process/symmetric_mp/main.c
+++ b/examples/multi_process/symmetric_mp/main.c
@@ -472,5 +472,8 @@ main(int argc, char **argv)
 
 	rte_eal_mp_remote_launch(lcore_main, NULL, CALL_MAIN);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c
index 54b7f08964..e9a3887106 100644
--- a/examples/ntb/ntb_fwd.c
+++ b/examples/ntb/ntb_fwd.c
@@ -1498,5 +1498,8 @@ main(int argc, char **argv)
 		start_pkt_fwd();
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c
index 963b11d6de..66b5c888a9 100644
--- a/examples/packet_ordering/main.c
+++ b/examples/packet_ordering/main.c
@@ -776,5 +776,9 @@ main(int argc, char **argv)
 	}
 
 	print_stats();
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
index 4d82fb82ef..9830efb96f 100644
--- a/examples/performance-thread/l3fwd-thread/main.c
+++ b/examples/performance-thread/l3fwd-thread/main.c
@@ -3777,5 +3777,8 @@ main(int argc, char **argv)
 		}
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/performance-thread/pthread_shim/main.c b/examples/performance-thread/pthread_shim/main.c
index 23e3b5e311..241267fd9e 100644
--- a/examples/performance-thread/pthread_shim/main.c
+++ b/examples/performance-thread/pthread_shim/main.c
@@ -258,5 +258,9 @@ int main(int argc, char **argv)
 	RTE_LCORE_FOREACH_WORKER(lcore_id) {
 		rte_eal_wait_lcore(lcore_id);
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/pipeline/main.c b/examples/pipeline/main.c
index fb57ef31fe..8ea19f9dd5 100644
--- a/examples/pipeline/main.c
+++ b/examples/pipeline/main.c
@@ -190,4 +190,7 @@ main(int argc, char **argv)
 
 		conn_poll_for_msg(conn);
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 }
diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c
index 5d4bdbd43f..a8b1b85c6d 100644
--- a/examples/ptpclient/ptpclient.c
+++ b/examples/ptpclient/ptpclient.c
@@ -781,5 +781,8 @@ main(int argc, char *argv[])
 	/* Call lcore_main on the main core only. */
 	lcore_main();
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/qos_meter/main.c b/examples/qos_meter/main.c
index f2d9c28828..6e724f3783 100644
--- a/examples/qos_meter/main.c
+++ b/examples/qos_meter/main.c
@@ -460,5 +460,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/qos_sched/main.c b/examples/qos_sched/main.c
index a6071b991c..dc6a17a646 100644
--- a/examples/qos_sched/main.c
+++ b/examples/qos_sched/main.c
@@ -218,5 +218,8 @@ main(int argc, char **argv)
 		}
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/rxtx_callbacks/main.c b/examples/rxtx_callbacks/main.c
index 35c6c39807..b57b2fc6bc 100644
--- a/examples/rxtx_callbacks/main.c
+++ b/examples/rxtx_callbacks/main.c
@@ -338,5 +338,9 @@ main(int argc, char *argv[])
 
 	/* call lcore_main on main core only */
 	lcore_main();
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/server_node_efd/node/node.c b/examples/server_node_efd/node/node.c
index 67a55808bf..e68606e0ca 100644
--- a/examples/server_node_efd/node/node.c
+++ b/examples/server_node_efd/node/node.c
@@ -383,4 +383,7 @@ main(int argc, char *argv[])
 
 		need_flush = 1;
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 }
diff --git a/examples/server_node_efd/server/main.c b/examples/server_node_efd/server/main.c
index 4728960eaf..39b7b6370f 100644
--- a/examples/server_node_efd/server/main.c
+++ b/examples/server_node_efd/server/main.c
@@ -334,5 +334,9 @@ main(int argc, char *argv[])
 	rte_eal_mp_remote_launch(sleep_lcore, NULL, SKIP_MAIN);
 
 	do_packet_forwarding();
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/service_cores/main.c b/examples/service_cores/main.c
index c7c792810d..c5753cc52d 100644
--- a/examples/service_cores/main.c
+++ b/examples/service_cores/main.c
@@ -220,5 +220,8 @@ main(int argc, char **argv)
 			i = 0;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/skeleton/basicfwd.c b/examples/skeleton/basicfwd.c
index 4b2b6ab4ff..a31b2882ae 100644
--- a/examples/skeleton/basicfwd.c
+++ b/examples/skeleton/basicfwd.c
@@ -205,5 +205,8 @@ main(int argc, char *argv[])
 	/* Call lcore_main on the main core only. */
 	lcore_main();
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/timer/main.c b/examples/timer/main.c
index 5a57e48290..d67301e3c4 100644
--- a/examples/timer/main.c
+++ b/examples/timer/main.c
@@ -117,5 +117,8 @@ main(int argc, char **argv)
 	/* call it on main lcore too */
 	(void) lcore_mainloop(NULL);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/vdpa/main.c b/examples/vdpa/main.c
index 97e967b9a2..097a267b8c 100644
--- a/examples/vdpa/main.c
+++ b/examples/vdpa/main.c
@@ -576,5 +576,8 @@ main(int argc, char *argv[])
 		vdpa_sample_quit();
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 8d8c3038bf..dd1a936f23 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -1647,6 +1647,8 @@ main(int argc, char *argv[])
 	RTE_LCORE_FOREACH_WORKER(lcore_id)
 		rte_eal_wait_lcore(lcore_id);
 
-	return 0;
+	/* clean up the EAL */
+	rte_eal_cleanup();
 
+	return 0;
 }
diff --git a/examples/vhost_blk/vhost_blk.c b/examples/vhost_blk/vhost_blk.c
index bb293d492f..bdefd66f9e 100644
--- a/examples/vhost_blk/vhost_blk.c
+++ b/examples/vhost_blk/vhost_blk.c
@@ -893,5 +893,8 @@ int main(int argc, char *argv[])
 	while (1)
 		sleep(1);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c
index 66bde38c0e..1b01f6f089 100644
--- a/examples/vhost_crypto/main.c
+++ b/examples/vhost_crypto/main.c
@@ -455,6 +455,9 @@ free_resource(void)
 	}
 
 	memset(&options, 0, sizeof(options));
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 }
 
 int
diff --git a/examples/vm_power_manager/guest_cli/main.c b/examples/vm_power_manager/guest_cli/main.c
index 4e17f7fb90..b8fa65ef15 100644
--- a/examples/vm_power_manager/guest_cli/main.c
+++ b/examples/vm_power_manager/guest_cli/main.c
@@ -200,5 +200,8 @@ main(int argc, char **argv)
 	}
 	run_cli(NULL);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
index 799d7b9bc3..7d5bf68554 100644
--- a/examples/vm_power_manager/main.c
+++ b/examples/vm_power_manager/main.c
@@ -468,5 +468,8 @@ main(int argc, char **argv)
 
 	free(ci->cd);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c
index 3cb890fa2b..a19f7db739 100644
--- a/examples/vmdq/main.c
+++ b/examples/vmdq/main.c
@@ -659,5 +659,8 @@ main(int argc, char *argv[])
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/vmdq_dcb/main.c b/examples/vmdq_dcb/main.c
index 1a74364638..ba992802e9 100644
--- a/examples/vmdq_dcb/main.c
+++ b/examples/vmdq_dcb/main.c
@@ -707,5 +707,8 @@ main(int argc, char *argv[])
 	/* call on main too */
 	(void) lcore_main((void*)i);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:32.040745000 +0800
+++ 0213-examples-add-eal-cleanup-to-examples.patch	2021-05-10 23:59:26.690000000 +0800
@@ -1 +1 @@
-From 10aa375704c148d9e90b5e984066d719f7465357 Mon Sep 17 00:00:00 2001
+From aa94d640eb5174b0eb0af7ca658a5a76a6bb2d0c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 10aa375704c148d9e90b5e984066d719f7465357 ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -146 +148 @@
-index b73691dd23..c175fe6ac2 100644
+index cad6bcb180..a7259173ec 100644
@@ -149 +151 @@
-@@ -501,6 +501,9 @@ exit:
+@@ -483,6 +483,9 @@ exit:
@@ -173 +175 @@
-index bc28468f17..f1940bc88d 100644
+index 93523d625b..932f49fa7f 100644
@@ -176 +178 @@
-@@ -258,5 +258,10 @@ main(int argc, char **argv)
+@@ -259,5 +259,10 @@ main(int argc, char **argv)
@@ -243 +245 @@
-index 59971dc766..a9f9b5859b 100644
+index 20d69ba813..1efcb5e635 100644
@@ -246 +248 @@
-@@ -3076,6 +3076,9 @@ main(int32_t argc, char **argv)
+@@ -3037,6 +3037,9 @@ main(int32_t argc, char **argv)
@@ -296 +298 @@
-index a957df05db..4f51616492 100644
+index 656b140368..05f953e242 100644
@@ -299 +301 @@
-@@ -2835,5 +2835,8 @@ main(int argc, char **argv)
+@@ -2825,5 +2825,8 @@ main(int argc, char **argv)
@@ -350 +352 @@
-index be5bf7bc90..32d405e65a 100644
+index 3377b08322..ffb67bb901 100644
@@ -353 +355 @@
-@@ -902,6 +902,9 @@ main(int argc, char **argv)
+@@ -903,6 +903,9 @@ main(int argc, char **argv)
@@ -364 +366 @@
-index 4a17274379..a1f457b564 100644
+index 961594f5fe..a449fc9f1b 100644
@@ -367 +369 @@
-@@ -2258,5 +2258,8 @@ main(int argc, char **argv)
+@@ -2257,5 +2257,8 @@ main(int argc, char **argv)
@@ -391 +393 @@
-index 74413052b0..4cb800aa15 100644
+index bb49e5faff..ee156d13a6 100644
@@ -394 +396 @@
-@@ -1405,6 +1405,10 @@ main(int argc, char **argv)
+@@ -1315,6 +1315,10 @@ main(int argc, char **argv)
@@ -406 +408 @@
-index 8ca3586e05..d8ff5f133b 100644
+index f1653b4fb8..6cffd5a827 100644
@@ -409 +411 @@
-@@ -730,5 +730,8 @@ main(int argc, char **argv)
+@@ -731,5 +731,8 @@ main(int argc, char **argv)
@@ -485 +487 @@
-index bcbda05f5e..d2fe9f6b50 100644
+index 963b11d6de..66b5c888a9 100644
@@ -488 +490 @@
-@@ -783,5 +783,9 @@ main(int argc, char **argv)
+@@ -776,5 +776,9 @@ main(int argc, char **argv)
@@ -499 +501 @@
-index b16c19bc96..2f593abf26 100644
+index 4d82fb82ef..9830efb96f 100644
@@ -502 +504 @@
-@@ -3781,5 +3781,8 @@ main(int argc, char **argv)
+@@ -3777,5 +3777,8 @@ main(int argc, char **argv)
@@ -512 +514 @@
-index 4ce3622e47..257de50692 100644
+index 23e3b5e311..241267fd9e 100644
@@ -515 +517 @@
-@@ -263,5 +263,9 @@ int main(int argc, char **argv)
+@@ -258,5 +258,9 @@ int main(int argc, char **argv)
@@ -538 +540 @@
-index 878d1a0b99..173451eedc 100644
+index 5d4bdbd43f..a8b1b85c6d 100644
@@ -541 +543 @@
-@@ -784,5 +784,8 @@ main(int argc, char *argv[])
+@@ -781,5 +781,8 @@ main(int argc, char *argv[])
@@ -617 +619 @@
-index 0b3d8c8073..2b57a52b16 100644
+index c7c792810d..c5753cc52d 100644
@@ -669 +671 @@
-index 2ca7d98c58..ff48ba270d 100644
+index 8d8c3038bf..dd1a936f23 100644
@@ -672 +674 @@
-@@ -1781,6 +1781,8 @@ main(int argc, char *argv[])
+@@ -1647,6 +1647,8 @@ main(int argc, char *argv[])
@@ -683 +685 @@
-index 54f81b334d..fe2b4e4803 100644
+index bb293d492f..bdefd66f9e 100644
@@ -686 +688 @@
-@@ -907,5 +907,8 @@ int main(int argc, char *argv[])
+@@ -893,5 +893,8 @@ int main(int argc, char *argv[])
@@ -696 +698 @@
-index 7ed38fedf2..dea7dcbd07 100644
+index 66bde38c0e..1b01f6f089 100644
@@ -699 +701 @@
-@@ -469,6 +469,9 @@ free_resource(void)
+@@ -455,6 +455,9 @@ free_resource(void)

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

* [dpdk-stable] patch 'examples/ethtool: remove unused parsing' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (210 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'examples: add eal cleanup to examples' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'doc: fix HiSilicon copyright syntax' " Xueming Li
                   ` (15 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1eea3b7a27053e5a2c55daec1af9e75ef8f0d064

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1eea3b7a27053e5a2c55daec1af9e75ef8f0d064 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 21 Apr 2021 10:39:43 +0800
Subject: [PATCH] examples/ethtool: remove unused parsing
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 5be3505717269d6634a844bff3fc9339402b2690 ]

The new_mtu was assigned twice, the first assignment could be removed.

Fixes: bda68ab9d1e7 ("examples/ethtool: add user-space ethtool sample application")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 examples/ethtool/ethtool-app/ethapp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/examples/ethtool/ethtool-app/ethapp.c b/examples/ethtool/ethtool-app/ethapp.c
index e6c93e13a7..36a1c374f4 100644
--- a/examples/ethtool/ethtool-app/ethapp.c
+++ b/examples/ethtool/ethtool-app/ethapp.c
@@ -528,7 +528,6 @@ pcmd_mtu_callback(void *ptr_params,
 		printf("Error: Invalid port number %i\n", params->port);
 		return;
 	}
-	new_mtu = atoi(params->opt);
 	new_mtu = strtoul(params->opt, &ptr_parse_end, 10);
 	if (*ptr_parse_end != '\0' ||
 			new_mtu < RTE_ETHER_MIN_MTU ||
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:32.083828000 +0800
+++ 0214-examples-ethtool-remove-unused-parsing.patch	2021-05-10 23:59:26.690000000 +0800
@@ -1 +1 @@
-From 5be3505717269d6634a844bff3fc9339402b2690 Mon Sep 17 00:00:00 2001
+From 1eea3b7a27053e5a2c55daec1af9e75ef8f0d064 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 5be3505717269d6634a844bff3fc9339402b2690 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'doc: fix HiSilicon copyright syntax' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (211 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'examples/ethtool: remove unused parsing' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: remove unused macros' " Xueming Li
                   ` (14 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f81a67f4b8c112329d2d8bd321d47e507395202b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f81a67f4b8c112329d2d8bd321d47e507395202b Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Fri, 16 Apr 2021 18:34:29 +0800
Subject: [PATCH] doc: fix HiSilicon copyright syntax
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit be1650f734b7e478ce485587266e0f858c0cc21f ]

This patch fixes HiSilicon copyright syntax.

According to the suggestion of our legal department,
to standardize the copyright license of our code to
avoid potential copyright risks, we make a unified
modification to the "Hisilicon", which was nonstandard,
in the main modules we maintain.

We change it to "HiSilicon", which is consistent with
the terms used on the following official website:
https://www.hisilicon.com/en/terms-of-use.

Fixes: 565829db8b8f ("net/hns3: add build and doc infrastructure")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 doc/guides/nics/hns3.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/guides/nics/hns3.rst b/doc/guides/nics/hns3.rst
index 84bd7a3c92..9a0196bbcf 100644
--- a/doc/guides/nics/hns3.rst
+++ b/doc/guides/nics/hns3.rst
@@ -1,12 +1,12 @@
 ..  SPDX-License-Identifier: BSD-3-Clause
-    Copyright(c) 2018-2019 Hisilicon Limited.
+    Copyright(c) 2018-2019 HiSilicon Limited.
 
 HNS3 Poll Mode Driver
 ===============================
 
 The hns3 PMD (**librte_net_hns3**) provides poll mode driver support
-for the inbuilt Hisilicon Network Subsystem(HNS) network engine
-found in the Hisilicon Kunpeng 920 SoC.
+for the inbuilt HiSilicon Network Subsystem(HNS) network engine
+found in the HiSilicon Kunpeng 920 SoC.
 
 Features
 --------
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:32.106842900 +0800
+++ 0215-doc-fix-HiSilicon-copyright-syntax.patch	2021-05-10 23:59:26.690000000 +0800
@@ -1 +1 @@
-From be1650f734b7e478ce485587266e0f858c0cc21f Mon Sep 17 00:00:00 2001
+From f81a67f4b8c112329d2d8bd321d47e507395202b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit be1650f734b7e478ce485587266e0f858c0cc21f ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index 3366562968..20c7387996 100644
+index 84bd7a3c92..9a0196bbcf 100644

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

* [dpdk-stable] patch 'net/hns3: remove unused macros' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (212 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'doc: fix HiSilicon copyright syntax' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'doc: fix matching versions in ice guide' " Xueming Li
                   ` (13 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/bd0494c495a42195dca02b29724dff249b245796

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bd0494c495a42195dca02b29724dff249b245796 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Mon, 19 Apr 2021 16:13:31 +0800
Subject: [PATCH] net/hns3: remove unused macros
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 81b129d4190f351776067f9e37f82f6f671e93c1 ]

'HNS3_RXD_TSIND_S' and 'HNS3_RXD_TSIND_M' is unused, which should
be deleted.

This patch fixed it.

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

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h
index 2a57c24f4a..01514e2afd 100644
--- a/drivers/net/hns3/hns3_rxtx.h
+++ b/drivers/net/hns3/hns3_rxtx.h
@@ -102,8 +102,6 @@
 #define HNS3_RXD_LUM_B				9
 #define HNS3_RXD_CRCP_B				10
 #define HNS3_RXD_L3L4P_B			11
-#define HNS3_RXD_TSIND_S			12
-#define HNS3_RXD_TSIND_M			(0x7 << HNS3_RXD_TSIND_S)
 #define HNS3_RXD_LKBK_B				15
 #define HNS3_RXD_GRO_SIZE_S			16
 #define HNS3_RXD_GRO_SIZE_M			(0x3fff << HNS3_RXD_GRO_SIZE_S)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:32.130597900 +0800
+++ 0216-net-hns3-remove-unused-macros.patch	2021-05-10 23:59:26.690000000 +0800
@@ -1 +1 @@
-From 81b129d4190f351776067f9e37f82f6f671e93c1 Mon Sep 17 00:00:00 2001
+From bd0494c495a42195dca02b29724dff249b245796 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 81b129d4190f351776067f9e37f82f6f671e93c1 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index ad85d0da94..696f34756f 100644
+index 2a57c24f4a..01514e2afd 100644
@@ -23 +25 @@
-@@ -104,8 +104,6 @@
+@@ -102,8 +102,6 @@
@@ -29,2 +30,0 @@
- 
- #define HNS3_RXD_TS_VLD_B			14
@@ -31,0 +32,2 @@
+ #define HNS3_RXD_GRO_SIZE_S			16
+ #define HNS3_RXD_GRO_SIZE_M			(0x3fff << HNS3_RXD_GRO_SIZE_S)

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

* [dpdk-stable] patch 'doc: fix matching versions in ice guide' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (213 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: remove unused macros' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: remove redundant mailbox response' " Xueming Li
                   ` (12 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5c61f0e991f7f0da02476ec1e11ec6f764edc667

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5c61f0e991f7f0da02476ec1e11ec6f764edc667 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Wed, 24 Mar 2021 21:02:49 +0800
Subject: [PATCH] doc: fix matching versions in ice guide
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit d63dab349afcd559e1f9a170bd32f546ad41b9a6 ]

Fixed matching kernel driver version for DPDK 20.11.

Fixes: e89aebf3b597 ("doc: update ice user guide")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 doc/guides/nics/ice.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/nics/ice.rst b/doc/guides/nics/ice.rst
index ccda26f82f..7b5a1bf157 100644
--- a/doc/guides/nics/ice.rst
+++ b/doc/guides/nics/ice.rst
@@ -37,7 +37,7 @@ The detailed information can refer to chapter Tested Platforms/Tested NICs in re
    +-----------+---------------+-----------------+-----------+-----------+
    |    DPDK   | Kernel Driver | OS Default DDP  | COMMS DDP | Firmware  |
    +===========+===============+=================+===========+===========+
-   |    20.11  |     1.3.0     |      1.3.20     |  1.3.24   |    2.3    |
+   |    20.11  |     1.3.2     |      1.3.20     |  1.3.24   |    2.3    |
    +-----------+---------------+-----------------+-----------+-----------+
 
 Pre-Installation Configuration
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:32.153532400 +0800
+++ 0217-doc-fix-matching-versions-in-ice-guide.patch	2021-05-10 23:59:26.690000000 +0800
@@ -1 +1 @@
-From d63dab349afcd559e1f9a170bd32f546ad41b9a6 Mon Sep 17 00:00:00 2001
+From 5c61f0e991f7f0da02476ec1e11ec6f764edc667 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit d63dab349afcd559e1f9a170bd32f546ad41b9a6 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
-index 8d40d17417..ebfc24a4e8 100644
+index ccda26f82f..7b5a1bf157 100644
@@ -20 +22 @@
-@@ -51,7 +51,7 @@ The detailed information can refer to chapter Tested Platforms/Tested NICs in re
+@@ -37,7 +37,7 @@ The detailed information can refer to chapter Tested Platforms/Tested NICs in re

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

* [dpdk-stable] patch 'net/hns3: remove redundant mailbox response' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (214 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'doc: fix matching versions in ice guide' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix DCB mode check' " Xueming Li
                   ` (11 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2782c994db516427c52240bdeef260fe7d8b46be

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2782c994db516427c52240bdeef260fe7d8b46be Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Sat, 17 Apr 2021 17:54:55 +0800
Subject: [PATCH] net/hns3: remove redundant mailbox response
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 17ff95283fa10c6f296e9008558555ead6d8a3a2 ]

Some mbx messages do not need to reply with data. In this case,
it is no need to set the response data address and the response
length.

This patch removes these redundant codes from mbx messages that do
not need be replied.

Fixes: a5475d61fa34 ("net/hns3: support VF")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index ac11befa16..78e7a1bba3 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1455,13 +1455,12 @@ hns3vf_set_tc_queue_mapping(struct hns3_adapter *hns, uint16_t nb_rx_q,
 static void
 hns3vf_request_link_info(struct hns3_hw *hw)
 {
-	uint8_t resp_msg;
 	int ret;
 
 	if (rte_atomic16_read(&hw->reset.resetting))
 		return;
 	ret = hns3_send_mbx_msg(hw, HNS3_MBX_GET_LINK_STATUS, 0, NULL, 0, false,
-				&resp_msg, sizeof(resp_msg));
+				NULL, 0);
 	if (ret)
 		hns3_err(hw, "Failed to fetch link status from PF: %d", ret);
 }
@@ -1657,11 +1656,10 @@ hns3vf_keep_alive_handler(void *param)
 	struct rte_eth_dev *eth_dev = (struct rte_eth_dev *)param;
 	struct hns3_adapter *hns = eth_dev->data->dev_private;
 	struct hns3_hw *hw = &hns->hw;
-	uint8_t respmsg;
 	int ret;
 
 	ret = hns3_send_mbx_msg(hw, HNS3_MBX_KEEP_ALIVE, 0, NULL, 0,
-				false, &respmsg, sizeof(uint8_t));
+				false, NULL, 0);
 	if (ret)
 		hns3_err(hw, "VF sends keeping alive cmd failed(=%d)",
 			 ret);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:32.175922900 +0800
+++ 0218-net-hns3-remove-redundant-mailbox-response.patch	2021-05-10 23:59:26.690000000 +0800
@@ -1 +1 @@
-From 17ff95283fa10c6f296e9008558555ead6d8a3a2 Mon Sep 17 00:00:00 2001
+From 2782c994db516427c52240bdeef260fe7d8b46be Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 17ff95283fa10c6f296e9008558555ead6d8a3a2 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index e65f3c1173..065d3181c5 100644
+index ac11befa16..78e7a1bba3 100644
@@ -26 +28,2 @@
-@@ -1511,7 +1511,6 @@ static void
+@@ -1455,13 +1455,12 @@ hns3vf_set_tc_queue_mapping(struct hns3_adapter *hns, uint16_t nb_rx_q,
+ static void
@@ -29 +31,0 @@
- 	struct hns3_vf *vf = HNS3_DEV_HW_TO_VF(hw);
@@ -31 +32,0 @@
- 	bool send_req;
@@ -34 +35 @@
-@@ -1524,7 +1523,7 @@ hns3vf_request_link_info(struct hns3_hw *hw)
+ 	if (rte_atomic16_read(&hw->reset.resetting))
@@ -36 +36,0 @@
- 
@@ -40,4 +40,4 @@
- 	if (ret) {
- 		hns3_err(hw, "failed to fetch link status, ret = %d", ret);
- 		return;
-@@ -1756,11 +1755,10 @@ hns3vf_keep_alive_handler(void *param)
+ 	if (ret)
+ 		hns3_err(hw, "Failed to fetch link status from PF: %d", ret);
+ }
+@@ -1657,11 +1656,10 @@ hns3vf_keep_alive_handler(void *param)

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

* [dpdk-stable] patch 'net/hns3: fix DCB mode check' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (215 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: remove redundant mailbox response' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix VMDq " Xueming Li
                   ` (10 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/cdffbfb77ff108503b741479e6d74ae55ad1df84

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cdffbfb77ff108503b741479e6d74ae55ad1df84 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Sat, 17 Apr 2021 17:54:56 +0800
Subject: [PATCH] net/hns3: fix DCB mode check
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit edba2e32cbfd3747391031188c6a060ec8e70465 ]

Currently, "ONLY DCB" and "DCB+RSS" mode are both supported by HNS3
PF driver. But the driver verifies only the "DCB+RSS" multiple queues
mode.

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

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index d63159f278..986e5ef91d 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2154,7 +2154,7 @@ hns3_check_mq_mode(struct rte_eth_dev *dev)
 		return -EINVAL;
 	}
 
-	if (rx_mq_mode == ETH_MQ_RX_DCB_RSS) {
+	if (rx_mq_mode & ETH_MQ_RX_DCB_FLAG) {
 		if (dcb_rx_conf->nb_tcs > pf->tc_max) {
 			hns3_err(hw, "nb_tcs(%u) > max_tc(%u) driver supported.",
 				 dcb_rx_conf->nb_tcs, pf->tc_max);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:32.200676500 +0800
+++ 0219-net-hns3-fix-DCB-mode-check.patch	2021-05-10 23:59:26.690000000 +0800
@@ -1 +1 @@
-From edba2e32cbfd3747391031188c6a060ec8e70465 Mon Sep 17 00:00:00 2001
+From cdffbfb77ff108503b741479e6d74ae55ad1df84 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit edba2e32cbfd3747391031188c6a060ec8e70465 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index eb9a340e69..f5dfa47ac1 100644
+index d63159f278..986e5ef91d 100644
@@ -23 +25 @@
-@@ -2239,7 +2239,7 @@ hns3_check_mq_mode(struct rte_eth_dev *dev)
+@@ -2154,7 +2154,7 @@ hns3_check_mq_mode(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/hns3: fix VMDq mode check' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (216 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix DCB mode check' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix flow director lock' " Xueming Li
                   ` (9 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5eaa5abcd8d54b049a2136c16d17d1aa5b4d36f6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5eaa5abcd8d54b049a2136c16d17d1aa5b4d36f6 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Sat, 17 Apr 2021 17:54:57 +0800
Subject: [PATCH] net/hns3: fix VMDq mode check
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit ffd6b0b18b48d8d1b19d2567c58a0650e8d15df8 ]

HNS3 PF driver only supports RSS, DCB or NONE multiple queues mode.
Currently, driver doesn't verify the VMDq multi-queue mode completely.
This patch fixes the verification for VMDq mode.

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

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 27 +++++++++++----------------
 1 file changed, 11 insertions(+), 16 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 986e5ef91d..570e5fa6a6 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2137,23 +2137,16 @@ hns3_check_mq_mode(struct rte_eth_dev *dev)
 	int max_tc = 0;
 	int i;
 
-	dcb_rx_conf = &dev->data->dev_conf.rx_adv_conf.dcb_rx_conf;
-	dcb_tx_conf = &dev->data->dev_conf.tx_adv_conf.dcb_tx_conf;
-
-	if (rx_mq_mode == ETH_MQ_RX_VMDQ_DCB_RSS) {
-		hns3_err(hw, "ETH_MQ_RX_VMDQ_DCB_RSS is not supported. "
-			 "rx_mq_mode = %d", rx_mq_mode);
-		return -EINVAL;
-	}
-
-	if (rx_mq_mode == ETH_MQ_RX_VMDQ_DCB ||
-	    tx_mq_mode == ETH_MQ_TX_VMDQ_DCB) {
-		hns3_err(hw, "ETH_MQ_RX_VMDQ_DCB and ETH_MQ_TX_VMDQ_DCB "
-			 "is not supported. rx_mq_mode = %d, tx_mq_mode = %d",
+	if ((rx_mq_mode & ETH_MQ_RX_VMDQ_FLAG) ||
+	    (tx_mq_mode == ETH_MQ_TX_VMDQ_DCB ||
+	     tx_mq_mode == ETH_MQ_TX_VMDQ_ONLY)) {
+		hns3_err(hw, "VMDQ is not supported, rx_mq_mode = %d, tx_mq_mode = %d.",
 			 rx_mq_mode, tx_mq_mode);
-		return -EINVAL;
+		return -EOPNOTSUPP;
 	}
 
+	dcb_rx_conf = &dev->data->dev_conf.rx_adv_conf.dcb_rx_conf;
+	dcb_tx_conf = &dev->data->dev_conf.tx_adv_conf.dcb_tx_conf;
 	if (rx_mq_mode & ETH_MQ_RX_DCB_FLAG) {
 		if (dcb_rx_conf->nb_tcs > pf->tc_max) {
 			hns3_err(hw, "nb_tcs(%u) > max_tc(%u) driver supported.",
@@ -2212,8 +2205,7 @@ hns3_check_dcb_cfg(struct rte_eth_dev *dev)
 		return -EOPNOTSUPP;
 	}
 
-	/* Check multiple queue mode */
-	return hns3_check_mq_mode(dev);
+	return 0;
 }
 
 static int
@@ -2392,6 +2384,9 @@ hns3_dev_configure(struct rte_eth_dev *dev)
 		ret = -EINVAL;
 		goto cfg_err;
 	}
+	ret = hns3_check_mq_mode(dev);
+	if (ret)
+		goto cfg_err;
 
 	if ((uint32_t)mq_mode & ETH_MQ_RX_DCB_FLAG) {
 		ret = hns3_check_dcb_cfg(dev);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:32.225525000 +0800
+++ 0220-net-hns3-fix-VMDq-mode-check.patch	2021-05-10 23:59:26.700000000 +0800
@@ -1 +1 @@
-From ffd6b0b18b48d8d1b19d2567c58a0650e8d15df8 Mon Sep 17 00:00:00 2001
+From 5eaa5abcd8d54b049a2136c16d17d1aa5b4d36f6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit ffd6b0b18b48d8d1b19d2567c58a0650e8d15df8 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -16,2 +18,2 @@
- drivers/net/hns3/hns3_ethdev.c | 28 ++++++++++++----------------
- 1 file changed, 12 insertions(+), 16 deletions(-)
+ drivers/net/hns3/hns3_ethdev.c | 27 +++++++++++----------------
+ 1 file changed, 11 insertions(+), 16 deletions(-)
@@ -20 +22 @@
-index f5dfa47ac1..3f5cbef4f9 100644
+index 986e5ef91d..570e5fa6a6 100644
@@ -23 +25 @@
-@@ -2222,23 +2222,16 @@ hns3_check_mq_mode(struct rte_eth_dev *dev)
+@@ -2137,23 +2137,16 @@ hns3_check_mq_mode(struct rte_eth_dev *dev)
@@ -54 +56 @@
-@@ -2297,8 +2290,7 @@ hns3_check_dcb_cfg(struct rte_eth_dev *dev)
+@@ -2212,8 +2205,7 @@ hns3_check_dcb_cfg(struct rte_eth_dev *dev)
@@ -64 +66,3 @@
-@@ -2471,6 +2463,10 @@ hns3_dev_configure(struct rte_eth_dev *dev)
+@@ -2392,6 +2384,9 @@ hns3_dev_configure(struct rte_eth_dev *dev)
+ 		ret = -EINVAL;
+ 		goto cfg_err;
@@ -66,2 +69,0 @@
- 
- 	hw->adapter_state = HNS3_NIC_CONFIGURING;
@@ -71 +73 @@
-+
+ 
@@ -74 +75,0 @@
- 		if (ret)

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

* [dpdk-stable] patch 'net/hns3: fix flow director lock' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (217 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix VMDq " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/bonding: fix adding itself as its slave' " Xueming Li
                   ` (8 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ba1a310e046f75edec8569cdbb7141b60a77d391

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ba1a310e046f75edec8569cdbb7141b60a77d391 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Sat, 17 Apr 2021 17:54:58 +0800
Subject: [PATCH] net/hns3: fix flow director lock
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 1bdcca8006e4c690d017531f7fc6c31b19ad8d1d ]

Currently, the fdir lock was used to protect concurrent access in
multiple processes, it has the following problems:
1) Lack of protection for fdir reset recover.
2) Only part of data is protected, eg. the filterlist is not protected.

We use the following scheme:
1) Del the fdir lock.
2) Add a flow lock and provides rte flow driver ops API-level
   protection.
3) Declare support RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE.

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

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    |  4 +-
 drivers/net/hns3/hns3_ethdev.h    |  4 ++
 drivers/net/hns3/hns3_ethdev_vf.c |  3 +-
 drivers/net/hns3/hns3_fdir.c      | 28 +++++----
 drivers/net/hns3/hns3_fdir.h      |  3 +-
 drivers/net/hns3/hns3_flow.c      | 96 +++++++++++++++++++++++++++++--
 6 files changed, 111 insertions(+), 27 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 570e5fa6a6..dc463cd52a 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -6245,8 +6245,8 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
 		PMD_INIT_LOG(ERR, "Failed to alloc memory for process private");
 		return -ENOMEM;
 	}
-	/* initialize flow filter lists */
-	hns3_filterlist_init(eth_dev);
+
+	hns3_flow_init(eth_dev);
 
 	hns3_set_rxtx_function(eth_dev);
 	eth_dev->dev_ops = &hns3_eth_dev_ops;
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index f58dd356ce..9b7f6bf39c 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -5,6 +5,7 @@
 #ifndef _HNS3_ETHDEV_H_
 #define _HNS3_ETHDEV_H_
 
+#include <pthread.h>
 #include <sys/time.h>
 #include <rte_ethdev_driver.h>
 
@@ -555,6 +556,9 @@ struct hns3_hw {
 	uint8_t udp_cksum_mode;
 
 	struct hns3_port_base_vlan_config port_base_vlan_cfg;
+
+	pthread_mutex_t flows_lock; /* rte_flow ops lock */
+
 	/*
 	 * PMD setup and configuration is not thread safe. Since it is not
 	 * performance sensitive, it is better to guarantee thread-safety
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 78e7a1bba3..619f80c303 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -2760,8 +2760,7 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
 		return -ENOMEM;
 	}
 
-	/* initialize flow filter lists */
-	hns3_filterlist_init(eth_dev);
+	hns3_flow_init(eth_dev);
 
 	hns3_set_rxtx_function(eth_dev);
 	eth_dev->dev_ops = &hns3vf_eth_dev_ops;
diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
index c4a0983e74..3810c6fcd1 100644
--- a/drivers/net/hns3/hns3_fdir.c
+++ b/drivers/net/hns3/hns3_fdir.c
@@ -830,7 +830,6 @@ int hns3_fdir_filter_init(struct hns3_adapter *hns)
 
 	fdir_hash_params.socket_id = rte_socket_id();
 	TAILQ_INIT(&fdir_info->fdir_list);
-	rte_spinlock_init(&fdir_info->flows_lock);
 	snprintf(fdir_hash_name, RTE_HASH_NAMESIZE, "%s", hns->hw.data->name);
 	fdir_info->hash_handle = rte_hash_create(&fdir_hash_params);
 	if (fdir_info->hash_handle == NULL) {
@@ -856,7 +855,6 @@ void hns3_fdir_filter_uninit(struct hns3_adapter *hns)
 	struct hns3_fdir_info *fdir_info = &pf->fdir;
 	struct hns3_fdir_rule_ele *fdir_filter;
 
-	rte_spinlock_lock(&fdir_info->flows_lock);
 	if (fdir_info->hash_map) {
 		rte_free(fdir_info->hash_map);
 		fdir_info->hash_map = NULL;
@@ -865,7 +863,6 @@ void hns3_fdir_filter_uninit(struct hns3_adapter *hns)
 		rte_hash_free(fdir_info->hash_handle);
 		fdir_info->hash_handle = NULL;
 	}
-	rte_spinlock_unlock(&fdir_info->flows_lock);
 
 	fdir_filter = TAILQ_FIRST(&fdir_info->fdir_list);
 	while (fdir_filter) {
@@ -891,10 +888,8 @@ static int hns3_fdir_filter_lookup(struct hns3_fdir_info *fdir_info,
 	hash_sig_t sig;
 	int ret;
 
-	rte_spinlock_lock(&fdir_info->flows_lock);
 	sig = rte_hash_crc(key, sizeof(*key), 0);
 	ret = rte_hash_lookup_with_hash(fdir_info->hash_handle, key, sig);
-	rte_spinlock_unlock(&fdir_info->flows_lock);
 
 	return ret;
 }
@@ -908,11 +903,9 @@ static int hns3_insert_fdir_filter(struct hns3_hw *hw,
 	int ret;
 
 	key = &fdir_filter->fdir_conf.key_conf;
-	rte_spinlock_lock(&fdir_info->flows_lock);
 	sig = rte_hash_crc(key, sizeof(*key), 0);
 	ret = rte_hash_add_key_with_hash(fdir_info->hash_handle, key, sig);
 	if (ret < 0) {
-		rte_spinlock_unlock(&fdir_info->flows_lock);
 		hns3_err(hw, "Hash table full? err:%d(%s)!", ret,
 			 strerror(-ret));
 		return ret;
@@ -920,7 +913,6 @@ static int hns3_insert_fdir_filter(struct hns3_hw *hw,
 
 	fdir_info->hash_map[ret] = fdir_filter;
 	TAILQ_INSERT_TAIL(&fdir_info->fdir_list, fdir_filter, entries);
-	rte_spinlock_unlock(&fdir_info->flows_lock);
 
 	return ret;
 }
@@ -933,11 +925,9 @@ static int hns3_remove_fdir_filter(struct hns3_hw *hw,
 	hash_sig_t sig;
 	int ret;
 
-	rte_spinlock_lock(&fdir_info->flows_lock);
 	sig = rte_hash_crc(key, sizeof(*key), 0);
 	ret = rte_hash_del_key_with_hash(fdir_info->hash_handle, key, sig);
 	if (ret < 0) {
-		rte_spinlock_unlock(&fdir_info->flows_lock);
 		hns3_err(hw, "Delete hash key fail ret=%d", ret);
 		return ret;
 	}
@@ -945,7 +935,6 @@ static int hns3_remove_fdir_filter(struct hns3_hw *hw,
 	fdir_filter = fdir_info->hash_map[ret];
 	fdir_info->hash_map[ret] = NULL;
 	TAILQ_REMOVE(&fdir_info->fdir_list, fdir_filter, entries);
-	rte_spinlock_unlock(&fdir_info->flows_lock);
 
 	rte_free(fdir_filter);
 
@@ -1000,11 +989,9 @@ int hns3_fdir_filter_program(struct hns3_adapter *hns,
 	rule->location = ret;
 	node->fdir_conf.location = ret;
 
-	rte_spinlock_lock(&fdir_info->flows_lock);
 	ret = hns3_config_action(hw, rule);
 	if (!ret)
 		ret = hns3_config_key(hns, rule);
-	rte_spinlock_unlock(&fdir_info->flows_lock);
 	if (ret) {
 		hns3_err(hw, "Failed to config fdir: %u src_ip:%x dst_ip:%x "
 			 "src_port:%u dst_port:%u ret = %d",
@@ -1029,9 +1016,7 @@ int hns3_clear_all_fdir_filter(struct hns3_adapter *hns)
 	int ret = 0;
 
 	/* flush flow director */
-	rte_spinlock_lock(&fdir_info->flows_lock);
 	rte_hash_reset(fdir_info->hash_handle);
-	rte_spinlock_unlock(&fdir_info->flows_lock);
 
 	fdir_filter = TAILQ_FIRST(&fdir_info->fdir_list);
 	while (fdir_filter) {
@@ -1059,6 +1044,17 @@ int hns3_restore_all_fdir_filter(struct hns3_adapter *hns)
 	bool err = false;
 	int ret;
 
+	/*
+	 * This API is called in the reset recovery process, the parent function
+	 * must hold hw->lock.
+	 * There maybe deadlock if acquire hw->flows_lock directly because rte
+	 * flow driver ops first acquire hw->flows_lock and then may acquire
+	 * hw->lock.
+	 * So here first release the hw->lock and then acquire the
+	 * hw->flows_lock to avoid deadlock.
+	 */
+	rte_spinlock_unlock(&hw->lock);
+	pthread_mutex_lock(&hw->flows_lock);
 	TAILQ_FOREACH(fdir_filter, &fdir_info->fdir_list, entries) {
 		ret = hns3_config_action(hw, &fdir_filter->fdir_conf);
 		if (!ret)
@@ -1069,6 +1065,8 @@ int hns3_restore_all_fdir_filter(struct hns3_adapter *hns)
 				break;
 		}
 	}
+	pthread_mutex_unlock(&hw->flows_lock);
+	rte_spinlock_lock(&hw->lock);
 
 	if (err) {
 		hns3_err(hw, "Fail to restore FDIR filter, ret = %d", ret);
diff --git a/drivers/net/hns3/hns3_fdir.h b/drivers/net/hns3/hns3_fdir.h
index 266d37cc6c..fc62daa994 100644
--- a/drivers/net/hns3/hns3_fdir.h
+++ b/drivers/net/hns3/hns3_fdir.h
@@ -199,7 +199,6 @@ struct hns3_process_private {
  *  A structure used to define fields of a FDIR related info.
  */
 struct hns3_fdir_info {
-	rte_spinlock_t flows_lock;
 	struct hns3_fdir_rule_list fdir_list;
 	struct hns3_fdir_rule_ele **hash_map;
 	struct rte_hash *hash_handle;
@@ -220,7 +219,7 @@ int hns3_fdir_filter_program(struct hns3_adapter *hns,
 			     struct hns3_fdir_rule *rule, bool del);
 int hns3_clear_all_fdir_filter(struct hns3_adapter *hns);
 int hns3_get_count(struct hns3_hw *hw, uint32_t id, uint64_t *value);
-void hns3_filterlist_init(struct rte_eth_dev *dev);
+void hns3_flow_init(struct rte_eth_dev *dev);
 int hns3_restore_all_fdir_filter(struct hns3_adapter *hns);
 
 #endif /* _HNS3_FDIR_H_ */
diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index ba77defb08..026f376a55 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1241,9 +1241,18 @@ hns3_parse_fdir_filter(struct rte_eth_dev *dev,
 }
 
 void
-hns3_filterlist_init(struct rte_eth_dev *dev)
+hns3_flow_init(struct rte_eth_dev *dev)
 {
+	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct hns3_process_private *process_list = dev->process_private;
+	pthread_mutexattr_t attr;
+
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+		pthread_mutexattr_init(&attr);
+		pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_SHARED);
+		pthread_mutex_init(&hw->flows_lock, &attr);
+		dev->data->dev_flags |= RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE;
+	}
 
 	TAILQ_INIT(&process_list->fdir_list);
 	TAILQ_INIT(&process_list->filter_rss_list);
@@ -2017,12 +2026,87 @@ hns3_flow_query(struct rte_eth_dev *dev, struct rte_flow *flow,
 	return 0;
 }
 
+static int
+hns3_flow_validate_wrap(struct rte_eth_dev *dev,
+			const struct rte_flow_attr *attr,
+			const struct rte_flow_item pattern[],
+			const struct rte_flow_action actions[],
+			struct rte_flow_error *error)
+{
+	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	int ret;
+
+	pthread_mutex_lock(&hw->flows_lock);
+	ret = hns3_flow_validate(dev, attr, pattern, actions, error);
+	pthread_mutex_unlock(&hw->flows_lock);
+
+	return ret;
+}
+
+static struct rte_flow *
+hns3_flow_create_wrap(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+		      const struct rte_flow_item pattern[],
+		      const struct rte_flow_action actions[],
+		      struct rte_flow_error *error)
+{
+	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	struct rte_flow *flow;
+
+	pthread_mutex_lock(&hw->flows_lock);
+	flow = hns3_flow_create(dev, attr, pattern, actions, error);
+	pthread_mutex_unlock(&hw->flows_lock);
+
+	return flow;
+}
+
+static int
+hns3_flow_destroy_wrap(struct rte_eth_dev *dev, struct rte_flow *flow,
+		       struct rte_flow_error *error)
+{
+	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	int ret;
+
+	pthread_mutex_lock(&hw->flows_lock);
+	ret = hns3_flow_destroy(dev, flow, error);
+	pthread_mutex_unlock(&hw->flows_lock);
+
+	return ret;
+}
+
+static int
+hns3_flow_flush_wrap(struct rte_eth_dev *dev, struct rte_flow_error *error)
+{
+	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	int ret;
+
+	pthread_mutex_lock(&hw->flows_lock);
+	ret = hns3_flow_flush(dev, error);
+	pthread_mutex_unlock(&hw->flows_lock);
+
+	return ret;
+}
+
+static int
+hns3_flow_query_wrap(struct rte_eth_dev *dev, struct rte_flow *flow,
+		     const struct rte_flow_action *actions, void *data,
+		     struct rte_flow_error *error)
+{
+	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	int ret;
+
+	pthread_mutex_lock(&hw->flows_lock);
+	ret = hns3_flow_query(dev, flow, actions, data, error);
+	pthread_mutex_unlock(&hw->flows_lock);
+
+	return ret;
+}
+
 static const struct rte_flow_ops hns3_flow_ops = {
-	.validate = hns3_flow_validate,
-	.create = hns3_flow_create,
-	.destroy = hns3_flow_destroy,
-	.flush = hns3_flow_flush,
-	.query = hns3_flow_query,
+	.validate = hns3_flow_validate_wrap,
+	.create = hns3_flow_create_wrap,
+	.destroy = hns3_flow_destroy_wrap,
+	.flush = hns3_flow_flush_wrap,
+	.query = hns3_flow_query_wrap,
 	.isolate = NULL,
 };
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:32.252720000 +0800
+++ 0221-net-hns3-fix-flow-director-lock.patch	2021-05-10 23:59:26.700000000 +0800
@@ -1 +1 @@
-From 1bdcca8006e4c690d017531f7fc6c31b19ad8d1d Mon Sep 17 00:00:00 2001
+From ba1a310e046f75edec8569cdbb7141b60a77d391 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 1bdcca8006e4c690d017531f7fc6c31b19ad8d1d ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -32 +34 @@
-index 3f5cbef4f9..95be141890 100644
+index 570e5fa6a6..dc463cd52a 100644
@@ -35 +37 @@
-@@ -7356,8 +7356,8 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
+@@ -6245,8 +6245,8 @@ hns3_dev_init(struct rte_eth_dev *eth_dev)
@@ -47 +49 @@
-index aef3043d46..d27c725175 100644
+index f58dd356ce..9b7f6bf39c 100644
@@ -56,3 +58,3 @@
- #include <ethdev_driver.h>
- #include <rte_byteorder.h>
-@@ -624,6 +625,9 @@ struct hns3_hw {
+ #include <rte_ethdev_driver.h>
+ 
+@@ -555,6 +556,9 @@ struct hns3_hw {
@@ -69 +71 @@
-index 065d3181c5..7a7a6bfa7c 100644
+index 78e7a1bba3..619f80c303 100644
@@ -72 +74 @@
-@@ -2911,8 +2911,7 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
+@@ -2760,8 +2760,7 @@ hns3vf_dev_init(struct rte_eth_dev *eth_dev)
@@ -83 +85 @@
-index 603cc82d90..87c1aef895 100644
+index c4a0983e74..3810c6fcd1 100644
@@ -232 +234 @@
-index 098b191909..4511a49d9d 100644
+index ba77defb08..026f376a55 100644
@@ -235 +237 @@
-@@ -1214,9 +1214,18 @@ hns3_parse_fdir_filter(struct rte_eth_dev *dev,
+@@ -1241,9 +1241,18 @@ hns3_parse_fdir_filter(struct rte_eth_dev *dev,
@@ -255 +257 @@
-@@ -2002,12 +2011,87 @@ hns3_flow_query(struct rte_eth_dev *dev, struct rte_flow *flow,
+@@ -2017,12 +2026,87 @@ hns3_flow_query(struct rte_eth_dev *dev, struct rte_flow *flow,

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

* [dpdk-stable] patch 'net/bonding: fix adding itself as its slave' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (218 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix flow director lock' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/bnxt: fix resource cleanup' " Xueming Li
                   ` (7 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9231460d33ce386ad19d965a60b05630191af337

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9231460d33ce386ad19d965a60b05630191af337 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Thu, 15 Apr 2021 15:09:54 +0800
Subject: [PATCH] net/bonding: fix adding itself as its slave
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 324d6577ba678c00673427df681bf2debec1db8d ]

Adding the bond device as its own slave should be forbidden. This
will cause a recursive endless loop in many subsequent operations,
and eventually lead to coredump.

This problem was found in testpmd, the related logs are as follows:
testpmd> create bonded device 1 0
Created new bonded device net_bonding_testpmd_0 on (port 4).
testpmd> add bonding slave 4 4
Segmentation fault (core dumped)

The call stack is as follows:
0x000000000064eb90 in rte_eth_dev_info_get ()
0x00000000006df4b4 in bond_ethdev_info ()
0x000000000064eb90 in rte_eth_dev_info_get ()
0x00000000006df4b4 in bond_ethdev_info ()
0x000000000064eb90 in rte_eth_dev_info_get ()
0x0000000000564e58 in eth_dev_info_get_print_err ()
0x000000000055e8a4 in init_port_config ()
0x000000000052730c in cmd_add_bonding_slave_parsed ()
0x0000000000646f60 in cmdline_parse ()
0x0000000000645e08 in cmdline_valid_buffer ()
0x000000000064956c in rdline_char_in ()
0x0000000000645ee0 in cmdline_in ()
0x00000000006460a4 in cmdline_interact ()
0x0000000000531904 in prompt ()
0x000000000051cca8 in main ()

Fixes: 2efb58cbab6e ("bond: new link bonding library")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/bonding/eth_bond_private.h |  2 +-
 drivers/net/bonding/rte_eth_bond_api.c | 26 +++++++++++++++++---------
 2 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/drivers/net/bonding/eth_bond_private.h b/drivers/net/bonding/eth_bond_private.h
index 8f198bd50e..5c7a55291c 100644
--- a/drivers/net/bonding/eth_bond_private.h
+++ b/drivers/net/bonding/eth_bond_private.h
@@ -212,7 +212,7 @@ int
 valid_bonded_port_id(uint16_t port_id);
 
 int
-valid_slave_port_id(uint16_t port_id, uint8_t mode);
+valid_slave_port_id(struct bond_dev_private *internals, uint16_t port_id);
 
 void
 deactivate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id);
diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index 55c8e3167c..44775f61e5 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -56,19 +56,25 @@ check_for_master_bonded_ethdev(const struct rte_eth_dev *eth_dev)
 }
 
 int
-valid_slave_port_id(uint16_t port_id, uint8_t mode)
+valid_slave_port_id(struct bond_dev_private *internals, uint16_t slave_port_id)
 {
-	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -1);
+	RTE_ETH_VALID_PORTID_OR_ERR_RET(slave_port_id, -1);
 
-	/* Verify that port_id refers to a non bonded port */
-	if (check_for_bonded_ethdev(&rte_eth_devices[port_id]) == 0 &&
-			mode == BONDING_MODE_8023AD) {
+	/* Verify that slave_port_id refers to a non bonded port */
+	if (check_for_bonded_ethdev(&rte_eth_devices[slave_port_id]) == 0 &&
+			internals->mode == BONDING_MODE_8023AD) {
 		RTE_BOND_LOG(ERR, "Cannot add slave to bonded device in 802.3ad"
 				" mode as slave is also a bonded device, only "
 				"physical devices can be support in this mode.");
 		return -1;
 	}
 
+	if (internals->port_id == slave_port_id) {
+		RTE_BOND_LOG(ERR,
+			"Cannot add the bonded device itself as its slave.");
+		return -1;
+	}
+
 	return 0;
 }
 
@@ -456,7 +462,7 @@ __eth_bond_slave_add_lock_free(uint16_t bonded_port_id, uint16_t slave_port_id)
 	bonded_eth_dev = &rte_eth_devices[bonded_port_id];
 	internals = bonded_eth_dev->data->dev_private;
 
-	if (valid_slave_port_id(slave_port_id, internals->mode) != 0)
+	if (valid_slave_port_id(internals, slave_port_id) != 0)
 		return -1;
 
 	slave_eth_dev = &rte_eth_devices[slave_port_id];
@@ -605,13 +611,15 @@ rte_eth_bond_slave_add(uint16_t bonded_port_id, uint16_t slave_port_id)
 
 	int retval;
 
-	/* Verify that port id's are valid bonded and slave ports */
 	if (valid_bonded_port_id(bonded_port_id) != 0)
 		return -1;
 
 	bonded_eth_dev = &rte_eth_devices[bonded_port_id];
 	internals = bonded_eth_dev->data->dev_private;
 
+	if (valid_slave_port_id(internals, slave_port_id) != 0)
+		return -1;
+
 	rte_spinlock_lock(&internals->lock);
 
 	retval = __eth_bond_slave_add_lock_free(bonded_port_id, slave_port_id);
@@ -635,7 +643,7 @@ __eth_bond_slave_remove_lock_free(uint16_t bonded_port_id,
 	bonded_eth_dev = &rte_eth_devices[bonded_port_id];
 	internals = bonded_eth_dev->data->dev_private;
 
-	if (valid_slave_port_id(slave_port_id, internals->mode) < 0)
+	if (valid_slave_port_id(internals, slave_port_id) < 0)
 		return -1;
 
 	/* first remove from active slave list */
@@ -783,7 +791,7 @@ rte_eth_bond_primary_set(uint16_t bonded_port_id, uint16_t slave_port_id)
 
 	internals = rte_eth_devices[bonded_port_id].data->dev_private;
 
-	if (valid_slave_port_id(slave_port_id, internals->mode) != 0)
+	if (valid_slave_port_id(internals, slave_port_id) != 0)
 		return -1;
 
 	internals->user_defined_primary_port = 1;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:32.280854700 +0800
+++ 0222-net-bonding-fix-adding-itself-as-its-slave.patch	2021-05-10 23:59:26.700000000 +0800
@@ -1 +1 @@
-From 324d6577ba678c00673427df681bf2debec1db8d Mon Sep 17 00:00:00 2001
+From 9231460d33ce386ad19d965a60b05630191af337 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 324d6577ba678c00673427df681bf2debec1db8d ]
@@ -34 +36,0 @@
-Cc: stable@dpdk.org
@@ -44 +46 @@
-index 75fb8dc02e..fc179a2732 100644
+index 8f198bd50e..5c7a55291c 100644
@@ -57 +59 @@
-index 17e6ff8b90..eb8d15d160 100644
+index 55c8e3167c..44775f61e5 100644

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

* [dpdk-stable] patch 'net/bnxt: fix resource cleanup' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (219 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/bonding: fix adding itself as its slave' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/bnxt: fix health check alarm cancellation' " Xueming Li
                   ` (6 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8ffdca19f32d8f6710463c9ee3a3eb5c2d1b4c1b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8ffdca19f32d8f6710463c9ee3a3eb5c2d1b4c1b Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Thu, 8 Apr 2021 13:17:47 -0700
Subject: [PATCH] net/bnxt: fix resource cleanup
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit e2895305a5b54a596b510f763c61652bf05e81db ]

Fix resource cleanup in port close.
Once the pointers are freed, set them to NULL.
Make sure access to the pointers is validated before use.

Fixes: bb81e07323bb ("net/bnxt: support LED on/off")
Fixes: 804e746c7b73 ("net/bnxt: add hardware resource manager init code")
Fixes: 1d0704f4d793 ("net/bnxt: add device configure operation")
Fixes: 698aa7e95325 ("net/bnxt: add code to determine the Tx COS queue")
Fixes: 322bd6e70272 ("net/bnxt: add port representor infrastructure")
Fixes: 0bf5a0b5ebb8 ("net/bnxt: add a failure log")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 39 +++++++++++++++++++++++++---------
 drivers/net/bnxt/bnxt_hwrm.c   |  3 +++
 2 files changed, 32 insertions(+), 10 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 4a3b429dcf..1db2e1efd3 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -229,16 +229,19 @@ uint16_t bnxt_rss_hash_tbl_size(const struct bnxt *bp)
 static void bnxt_free_parent_info(struct bnxt *bp)
 {
 	rte_free(bp->parent);
+	bp->parent = NULL;
 }
 
 static void bnxt_free_pf_info(struct bnxt *bp)
 {
 	rte_free(bp->pf);
+	bp->pf = NULL;
 }
 
 static void bnxt_free_link_info(struct bnxt *bp)
 {
 	rte_free(bp->link_info);
+	bp->link_info = NULL;
 }
 
 static void bnxt_free_leds_info(struct bnxt *bp)
@@ -259,7 +262,9 @@ static void bnxt_free_flow_stats_info(struct bnxt *bp)
 static void bnxt_free_cos_queues(struct bnxt *bp)
 {
 	rte_free(bp->rx_cos_queue);
+	bp->rx_cos_queue = NULL;
 	rte_free(bp->tx_cos_queue);
+	bp->tx_cos_queue = NULL;
 }
 
 static void bnxt_free_mem(struct bnxt *bp, bool reconfig)
@@ -853,9 +858,14 @@ static int bnxt_shutdown_nic(struct bnxt *bp)
 
 uint32_t bnxt_get_speed_capabilities(struct bnxt *bp)
 {
-	uint32_t link_speed = bp->link_info->support_speeds;
+	uint32_t link_speed = 0;
 	uint32_t speed_capa = 0;
 
+	if (bp->link_info == NULL)
+		return 0;
+
+	link_speed = bp->link_info->support_speeds;
+
 	/* If PAM4 is configured, use PAM4 supported speed */
 	if (link_speed == 0 && bp->link_info->support_pam4_speeds > 0)
 		link_speed = bp->link_info->support_pam4_speeds;
@@ -1288,12 +1298,13 @@ static void bnxt_free_switch_domain(struct bnxt *bp)
 {
 	int rc = 0;
 
-	if (bp->switch_domain_id) {
-		rc = rte_eth_switch_domain_free(bp->switch_domain_id);
-		if (rc)
-			PMD_DRV_LOG(ERR, "free switch domain:%d fail: %d\n",
-				    bp->switch_domain_id, rc);
-	}
+	if (!(BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp)))
+		return;
+
+	rc = rte_eth_switch_domain_free(bp->switch_domain_id);
+	if (rc)
+		PMD_DRV_LOG(ERR, "free switch domain:%d fail: %d\n",
+			    bp->switch_domain_id, rc);
 }
 
 /* Unload the driver, release resources */
@@ -1450,11 +1461,9 @@ bnxt_uninit_locks(struct bnxt *bp)
 
 static void bnxt_drv_uninit(struct bnxt *bp)
 {
-	bnxt_free_switch_domain(bp);
 	bnxt_free_leds_info(bp);
 	bnxt_free_cos_queues(bp);
 	bnxt_free_link_info(bp);
-	bnxt_free_pf_info(bp);
 	bnxt_free_parent_info(bp);
 	bnxt_uninit_locks(bp);
 
@@ -1464,6 +1473,7 @@ static void bnxt_drv_uninit(struct bnxt *bp)
 	bp->rx_mem_zone = NULL;
 
 	bnxt_free_vf_info(bp);
+	bnxt_free_pf_info(bp);
 
 	rte_free(bp->grp_info);
 	bp->grp_info = NULL;
@@ -1616,6 +1626,10 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
 		return rc;
 
 	memset(&new, 0, sizeof(new));
+
+	if (bp->link_info == NULL)
+		goto out;
+
 	do {
 		/* Retrieve link info from hardware */
 		rc = bnxt_get_hwrm_link_config(bp, &new);
@@ -5519,7 +5533,10 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
 	bnxt_free_mem(bp, reconfig_dev);
 
 	bnxt_hwrm_func_buf_unrgtr(bp);
-	rte_free(bp->pf->vf_req_buf);
+	if (bp->pf != NULL) {
+		rte_free(bp->pf->vf_req_buf);
+		bp->pf->vf_req_buf = NULL;
+	}
 
 	rc = bnxt_hwrm_func_driver_unregister(bp, 0);
 	bp->flags &= ~BNXT_FLAG_REGISTERED;
@@ -5532,6 +5549,8 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
 	bnxt_uninit_ctx_mem(bp);
 
 	bnxt_free_flow_stats_info(bp);
+	if (bp->rep_info != NULL)
+		bnxt_free_switch_domain(bp);
 	bnxt_free_rep_info(bp);
 	rte_free(bp->ptp_cfg);
 	bp->ptp_cfg = NULL;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 2e2460b71a..67509dc8f9 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -677,6 +677,9 @@ void bnxt_free_vf_info(struct bnxt *bp)
 {
 	int i;
 
+	if (bp->pf == NULL)
+		return;
+
 	if (bp->pf->vf_info == NULL)
 		return;
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:32.305223900 +0800
+++ 0223-net-bnxt-fix-resource-cleanup.patch	2021-05-10 23:59:26.700000000 +0800
@@ -1 +1 @@
-From e2895305a5b54a596b510f763c61652bf05e81db Mon Sep 17 00:00:00 2001
+From 8ffdca19f32d8f6710463c9ee3a3eb5c2d1b4c1b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit e2895305a5b54a596b510f763c61652bf05e81db ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 20ca57eae5..dc3b04110f 100644
+index 4a3b429dcf..1db2e1efd3 100644
@@ -28 +30 @@
-@@ -219,16 +219,19 @@ uint16_t bnxt_rss_hash_tbl_size(const struct bnxt *bp)
+@@ -229,16 +229,19 @@ uint16_t bnxt_rss_hash_tbl_size(const struct bnxt *bp)
@@ -48 +50 @@
-@@ -249,7 +252,9 @@ static void bnxt_free_flow_stats_info(struct bnxt *bp)
+@@ -259,7 +262,9 @@ static void bnxt_free_flow_stats_info(struct bnxt *bp)
@@ -58 +60 @@
-@@ -849,9 +854,14 @@ static int bnxt_shutdown_nic(struct bnxt *bp)
+@@ -853,9 +858,14 @@ static int bnxt_shutdown_nic(struct bnxt *bp)
@@ -74 +76 @@
-@@ -1293,12 +1303,13 @@ static void bnxt_free_switch_domain(struct bnxt *bp)
+@@ -1288,12 +1298,13 @@ static void bnxt_free_switch_domain(struct bnxt *bp)
@@ -93,2 +95,2 @@
- static void bnxt_ptp_get_current_time(void *arg)
-@@ -1545,11 +1556,9 @@ bnxt_uninit_locks(struct bnxt *bp)
+ /* Unload the driver, release resources */
+@@ -1450,11 +1461,9 @@ bnxt_uninit_locks(struct bnxt *bp)
@@ -106 +108 @@
-@@ -1559,6 +1568,7 @@ static void bnxt_drv_uninit(struct bnxt *bp)
+@@ -1464,6 +1473,7 @@ static void bnxt_drv_uninit(struct bnxt *bp)
@@ -114 +116 @@
-@@ -1720,6 +1730,10 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
+@@ -1616,6 +1626,10 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete)
@@ -125 +127 @@
-@@ -5748,7 +5762,10 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
+@@ -5519,7 +5533,10 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
@@ -137 +139 @@
-@@ -5761,6 +5778,8 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
+@@ -5532,6 +5549,8 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev)
@@ -147 +149 @@
-index a119fc3a0b..cb2064dd57 100644
+index 2e2460b71a..67509dc8f9 100644
@@ -150 +152 @@
-@@ -792,6 +792,9 @@ void bnxt_free_vf_info(struct bnxt *bp)
+@@ -677,6 +677,9 @@ void bnxt_free_vf_info(struct bnxt *bp)

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

* [dpdk-stable] patch 'net/bnxt: fix health check alarm cancellation' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (220 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/bnxt: fix resource cleanup' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/igc: fix Rx packet size' " Xueming Li
                   ` (5 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Luca Boccassi, Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/608d69a62fdea7e664003553b9a29c5865a94a59

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 608d69a62fdea7e664003553b9a29c5865a94a59 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Tue, 20 Apr 2021 09:38:45 +0530
Subject: [PATCH] net/bnxt: fix health check alarm cancellation
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit d723d1fe5db00a266d38f5e8435eb9e4f2cc7add ]

Driver cancels the health check alarm only if error recovery is enabled
in the FW. This can cause an issue. There is a small window where the
driver receives the async event from FW and port close is invoked
immediately. Driver clears BNXT_FLAG_RECOVERY_ENABLED flag when it gets
the async event from FW. As a result, the health check alarm will not
get canceled during port close and causes a segfault when the alarm tries
to read Heartbeat register.

Fix this by canceling the health check alarm unconditionally during
port stop.

Fixes: 9d0cbaecc91a ("net/bnxt: support periodic FW health monitoring")

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 | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 1db2e1efd3..fcb6e99634 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4080,9 +4080,6 @@ done:
 
 static void bnxt_cancel_fw_health_check(struct bnxt *bp)
 {
-	if (!bnxt_is_recovery_enabled(bp))
-		return;
-
 	rte_eal_alarm_cancel(bnxt_check_fw_health, (void *)bp);
 	bp->flags &= ~BNXT_FLAG_FW_HEALTH_CHECK_SCHEDULED;
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:32.334280100 +0800
+++ 0224-net-bnxt-fix-health-check-alarm-cancellation.patch	2021-05-10 23:59:26.710000000 +0800
@@ -1 +1 @@
-From d723d1fe5db00a266d38f5e8435eb9e4f2cc7add Mon Sep 17 00:00:00 2001
+From 608d69a62fdea7e664003553b9a29c5865a94a59 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit d723d1fe5db00a266d38f5e8435eb9e4f2cc7add ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 9da817f487..f5d2dc8590 100644
+index 1db2e1efd3..fcb6e99634 100644
@@ -31 +33 @@
-@@ -4274,9 +4274,6 @@ done:
+@@ -4080,9 +4080,6 @@ done:

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

* [dpdk-stable] patch 'net/igc: fix Rx packet size' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (221 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/bnxt: fix health check alarm cancellation' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: remove unused macro' " Xueming Li
                   ` (4 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8d6377e17251bff5e4e6d623ad7c751340b809bb

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8d6377e17251bff5e4e6d623ad7c751340b809bb Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Tue, 20 Apr 2021 10:05:20 +0800
Subject: [PATCH] net/igc: fix Rx packet size
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit be1fb9fe3cc8d2a70b76ba243eb19a4255cd8cd2 ]

When DEV_RX_OFFLOAD_KEEP_CRC is enabled, the PMD will minus 4 bytes
of CRC from the size of a packet, but the NIC will strip the CRC
because the CRC strip bit in DVMOLR register is not cleared. This
will cause the size of a packet to be 4 bytes less.

This patch updates the CRC strip bit according to whether
DEV_RX_OFFLOAD_KEEP_CRC is enabled.

Fixes: a5aeb2b9e225 ("net/igc: support Rx and Tx")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/igc/igc_txrx.c | 30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/drivers/net/igc/igc_txrx.c b/drivers/net/igc/igc_txrx.c
index 4654ec41f0..c0b56e4c9b 100644
--- a/drivers/net/igc/igc_txrx.c
+++ b/drivers/net/igc/igc_txrx.c
@@ -1290,20 +1290,24 @@ igc_rx_init(struct rte_eth_dev *dev)
 	 * This needs to be done after enable.
 	 */
 	for (i = 0; i < dev->data->nb_rx_queues; i++) {
+		uint32_t dvmolr;
+
 		rxq = dev->data->rx_queues[i];
 		IGC_WRITE_REG(hw, IGC_RDH(rxq->reg_idx), 0);
-		IGC_WRITE_REG(hw, IGC_RDT(rxq->reg_idx),
-				rxq->nb_rx_desc - 1);
+		IGC_WRITE_REG(hw, IGC_RDT(rxq->reg_idx), rxq->nb_rx_desc - 1);
 
-		/* strip queue vlan offload */
-		if (rxq->offloads & DEV_RX_OFFLOAD_VLAN_STRIP) {
-			uint32_t dvmolr;
-			dvmolr = IGC_READ_REG(hw, IGC_DVMOLR(rxq->queue_id));
+		dvmolr = IGC_READ_REG(hw, IGC_DVMOLR(rxq->reg_idx));
+		if (rxq->offloads & DEV_RX_OFFLOAD_VLAN_STRIP)
+			dvmolr |= IGC_DVMOLR_STRVLAN;
+		else
+			dvmolr &= ~IGC_DVMOLR_STRVLAN;
 
-			/* If vlan been stripped off, the CRC is meaningless. */
-			dvmolr |= IGC_DVMOLR_STRVLAN | IGC_DVMOLR_STRCRC;
-			IGC_WRITE_REG(hw, IGC_DVMOLR(rxq->reg_idx), dvmolr);
-		}
+		if (offloads & DEV_RX_OFFLOAD_KEEP_CRC)
+			dvmolr &= ~IGC_DVMOLR_STRCRC;
+		else
+			dvmolr |= IGC_DVMOLR_STRCRC;
+
+		IGC_WRITE_REG(hw, IGC_DVMOLR(rxq->reg_idx), dvmolr);
 	}
 
 	return 0;
@@ -2266,12 +2270,10 @@ eth_igc_vlan_strip_queue_set(struct rte_eth_dev *dev,
 
 	reg_val = IGC_READ_REG(hw, IGC_DVMOLR(rx_queue_id));
 	if (on) {
-		/* If vlan been stripped off, the CRC is meaningless. */
-		reg_val |= IGC_DVMOLR_STRVLAN | IGC_DVMOLR_STRCRC;
+		reg_val |= IGC_DVMOLR_STRVLAN;
 		rxq->offloads |= DEV_RX_OFFLOAD_VLAN_STRIP;
 	} else {
-		reg_val &= ~(IGC_DVMOLR_STRVLAN | IGC_DVMOLR_HIDVLAN |
-				IGC_DVMOLR_STRCRC);
+		reg_val &= ~(IGC_DVMOLR_STRVLAN | IGC_DVMOLR_HIDVLAN);
 		rxq->offloads &= ~DEV_RX_OFFLOAD_VLAN_STRIP;
 	}
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:32.357936500 +0800
+++ 0225-net-igc-fix-Rx-packet-size.patch	2021-05-10 23:59:26.710000000 +0800
@@ -1 +1 @@
-From be1fb9fe3cc8d2a70b76ba243eb19a4255cd8cd2 Mon Sep 17 00:00:00 2001
+From 8d6377e17251bff5e4e6d623ad7c751340b809bb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit be1fb9fe3cc8d2a70b76ba243eb19a4255cd8cd2 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 8eaed728cc..b5489eedd2 100644
+index 4654ec41f0..c0b56e4c9b 100644
@@ -27 +29 @@
-@@ -1291,20 +1291,24 @@ igc_rx_init(struct rte_eth_dev *dev)
+@@ -1290,20 +1290,24 @@ igc_rx_init(struct rte_eth_dev *dev)
@@ -62 +64 @@
-@@ -2267,12 +2271,10 @@ eth_igc_vlan_strip_queue_set(struct rte_eth_dev *dev,
+@@ -2266,12 +2270,10 @@ eth_igc_vlan_strip_queue_set(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/hns3: remove unused macro' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (222 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/igc: fix Rx packet size' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/ice: fix disabling promiscuous mode' " Xueming Li
                   ` (3 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/32698b8d325e01030e0d5a1afa39786ec067b857

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 32698b8d325e01030e0d5a1afa39786ec067b857 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Tue, 20 Apr 2021 16:59:48 +0800
Subject: [PATCH] net/hns3: remove unused macro
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 55d5ad6bb80f209750dc6313bee617410fcd5946 ]

'HNS3_RXD_LKBK_B' was defined in previous versions but no used.
This patch deleted it.

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

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h
index 01514e2afd..46d1b8cb27 100644
--- a/drivers/net/hns3/hns3_rxtx.h
+++ b/drivers/net/hns3/hns3_rxtx.h
@@ -102,7 +102,6 @@
 #define HNS3_RXD_LUM_B				9
 #define HNS3_RXD_CRCP_B				10
 #define HNS3_RXD_L3L4P_B			11
-#define HNS3_RXD_LKBK_B				15
 #define HNS3_RXD_GRO_SIZE_S			16
 #define HNS3_RXD_GRO_SIZE_M			(0x3fff << HNS3_RXD_GRO_SIZE_S)
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:32.383263000 +0800
+++ 0226-net-hns3-remove-unused-macro.patch	2021-05-10 23:59:26.710000000 +0800
@@ -1 +1 @@
-From 55d5ad6bb80f209750dc6313bee617410fcd5946 Mon Sep 17 00:00:00 2001
+From 32698b8d325e01030e0d5a1afa39786ec067b857 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 55d5ad6bb80f209750dc6313bee617410fcd5946 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index f7b457be4f..703c4b78d4 100644
+index 01514e2afd..46d1b8cb27 100644
@@ -21 +23,3 @@
-@@ -106,7 +106,6 @@
+@@ -102,7 +102,6 @@
+ #define HNS3_RXD_LUM_B				9
+ #define HNS3_RXD_CRCP_B				10
@@ -23,2 +26,0 @@
- 
- #define HNS3_RXD_TS_VLD_B			14

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

* [dpdk-stable] patch 'net/ice: fix disabling promiscuous mode' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (223 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: remove unused macro' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/i40e: fix flow director for common pctypes' " Xueming Li
                   ` (2 subsequent siblings)
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Siwar Zitouni; +Cc: Luca Boccassi, Thibaut Collet, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/abb66bf463983bf8434f2af99db8da62d905ce00

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From abb66bf463983bf8434f2af99db8da62d905ce00 Mon Sep 17 00:00:00 2001
From: Siwar Zitouni <siwar.zitouni@6wind.com>
Date: Mon, 19 Apr 2021 14:53:48 +0200
Subject: [PATCH] net/ice: fix disabling promiscuous mode
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit fa1d598844a73765cf26676ce3d219589ba57114 ]

When promiscuous mode is disabled, allmulticast is
also disabled, even if it was previously enabled.

Add a test in ice_promisc_disable()
to check if allmulticast should be kept enabled.

Fixes: c945e4bf9063 ("net/ice: support promiscuous mode")

Signed-off-by: Thibaut Collet <thibaut.collet@6wind.com>
Signed-off-by: Siwar Zitouni <siwar.zitouni@6wind.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 7c20936123..f30199fc23 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -4459,8 +4459,11 @@ ice_promisc_disable(struct rte_eth_dev *dev)
 	uint8_t pmask;
 	int ret = 0;
 
-	pmask = ICE_PROMISC_UCAST_RX | ICE_PROMISC_UCAST_TX |
-		ICE_PROMISC_MCAST_RX | ICE_PROMISC_MCAST_TX;
+	if (dev->data->all_multicast == 1)
+		pmask = ICE_PROMISC_UCAST_RX | ICE_PROMISC_UCAST_TX;
+	else
+		pmask = ICE_PROMISC_UCAST_RX | ICE_PROMISC_UCAST_TX |
+			ICE_PROMISC_MCAST_RX | ICE_PROMISC_MCAST_TX;
 
 	status = ice_clear_vsi_promisc(hw, vsi->idx, pmask, 0);
 	if (status != ICE_SUCCESS) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:32.410654200 +0800
+++ 0227-net-ice-fix-disabling-promiscuous-mode.patch	2021-05-10 23:59:26.710000000 +0800
@@ -1 +1 @@
-From fa1d598844a73765cf26676ce3d219589ba57114 Mon Sep 17 00:00:00 2001
+From abb66bf463983bf8434f2af99db8da62d905ce00 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit fa1d598844a73765cf26676ce3d219589ba57114 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 84d1735255..da9e85bd7c 100644
+index 7c20936123..f30199fc23 100644
@@ -26 +28 @@
-@@ -4526,8 +4526,11 @@ ice_promisc_disable(struct rte_eth_dev *dev)
+@@ -4459,8 +4459,11 @@ ice_promisc_disable(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/i40e: fix flow director for common pctypes' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (224 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/ice: fix disabling promiscuous mode' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/e1000/base: fix timeout for shadow RAM write' " Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'doc: fix names of UIO drivers' " Xueming Li
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Murphy Yang; +Cc: Luca Boccassi, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/bd0291a99ab98cac01cae57de79e3dcdbd7500a0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bd0291a99ab98cac01cae57de79e3dcdbd7500a0 Mon Sep 17 00:00:00 2001
From: Murphy Yang <murphyx.yang@intel.com>
Date: Wed, 21 Apr 2021 03:44:03 +0000
Subject: [PATCH] net/i40e: fix flow director for common pctypes
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit ff04964ea6d5feeaedf421504e63e58407ffcd10 ]

Currently, FDIR doesn't work for all common PCTYPEs, the root cause is
that input set is not configured.

Fixes: 4a072ad43442 ("net/i40e: fix flow director config after flow validate")

Signed-off-by: Murphy Yang <murphyx.yang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_fdir.c | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 37d988d21c..c9cd1e4960 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -1607,8 +1607,10 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
 
 	/* Check if the configuration is conflicted */
 	if (pf->fdir.inset_flag[pctype] &&
-	    memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t)))
-		return -1;
+	    memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) {
+		PMD_DRV_LOG(ERR, "Conflict with the first rule's input set.");
+		return -EINVAL;
+	}
 
 	if (pf->fdir.inset_flag[pctype] &&
 	    !memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t)))
@@ -1616,8 +1618,10 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
 
 	num = i40e_generate_inset_mask_reg(hw, input_set, mask_reg,
 						 I40E_INSET_MASK_NUM_REG);
-	if (num < 0)
+	if (num < 0) {
+		PMD_DRV_LOG(ERR, "Invalid pattern mask.");
 		return -EINVAL;
+	}
 
 	if (pf->support_multi_driver) {
 		for (i = 0; i < num; i++)
@@ -1762,18 +1766,15 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
 	i40e_fdir_filter_convert(filter, &check_filter);
 
 	if (add) {
-		if (filter->input.flow_ext.is_flex_flow) {
+		/* configure the input set for common PCTYPEs*/
+		if (!filter->input.flow_ext.customized_pctype) {
 			ret = i40e_flow_set_fdir_inset(pf, pctype,
 					filter->input.flow_ext.input_set);
-			if (ret == -1) {
-				PMD_DRV_LOG(ERR, "Conflict with the"
-					    " first rule's input set.");
-				return -EINVAL;
-			} else if (ret == -EINVAL) {
-				PMD_DRV_LOG(ERR, "Invalid pattern mask.");
-				return -EINVAL;
-			}
+			if (ret < 0)
+				return ret;
+		}
 
+		if (filter->input.flow_ext.is_flex_flow) {
 			for (i = 0; i < filter->input.flow_ext.raw_id; i++) {
 				layer_idx = filter->input.flow_ext.layer_idx;
 				field_idx = layer_idx * I40E_MAX_FLXPLD_FIED + i;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:32.437250500 +0800
+++ 0228-net-i40e-fix-flow-director-for-common-pctypes.patch	2021-05-10 23:59:26.710000000 +0800
@@ -1 +1 @@
-From ff04964ea6d5feeaedf421504e63e58407ffcd10 Mon Sep 17 00:00:00 2001
+From bd0291a99ab98cac01cae57de79e3dcdbd7500a0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit ff04964ea6d5feeaedf421504e63e58407ffcd10 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 22e6e34640..ac0e09bfdd 100644
+index 37d988d21c..c9cd1e4960 100644
@@ -22 +24 @@
-@@ -1608,8 +1608,10 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
+@@ -1607,8 +1607,10 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
@@ -35 +37 @@
-@@ -1617,8 +1619,10 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
+@@ -1616,8 +1618,10 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
@@ -47 +49 @@
-@@ -1763,18 +1767,15 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
+@@ -1762,18 +1766,15 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/e1000/base: fix timeout for shadow RAM write' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (225 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/i40e: fix flow director for common pctypes' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-05-10 16:02 ` [dpdk-stable] patch 'doc: fix names of UIO drivers' " Xueming Li
  227 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7d3e01ef10158530d72aa1271084ba7c5680ec63

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7d3e01ef10158530d72aa1271084ba7c5680ec63 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 21 Apr 2021 17:15:35 +0800
Subject: [PATCH] net/e1000/base: fix timeout for shadow RAM write
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 4a8ab48ec47b3616272e50620b8e1a9599358ea6 ]

This fixes the timed out for shadow RAM write EEWR can't be detected.

Fixes: 5a32a257f957 ("e1000: more NICs in base driver")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/e1000/base/e1000_i210.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/e1000/base/e1000_i210.c b/drivers/net/e1000/base/e1000_i210.c
index 3c349d33ff..52800376e4 100644
--- a/drivers/net/e1000/base/e1000_i210.c
+++ b/drivers/net/e1000/base/e1000_i210.c
@@ -310,6 +310,8 @@ STATIC s32 e1000_write_nvm_srwr(struct e1000_hw *hw, u16 offset, u16 words,
 	}
 
 	for (i = 0; i < words; i++) {
+		ret_val = -E1000_ERR_NVM;
+
 		eewr = ((offset + i) << E1000_NVM_RW_ADDR_SHIFT) |
 			(data[i] << E1000_NVM_RW_REG_DATA) |
 			E1000_NVM_RW_REG_START;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:32.463158400 +0800
+++ 0229-net-e1000-base-fix-timeout-for-shadow-RAM-write.patch	2021-05-10 23:59:26.710000000 +0800
@@ -1 +1 @@
-From 4a8ab48ec47b3616272e50620b8e1a9599358ea6 Mon Sep 17 00:00:00 2001
+From 7d3e01ef10158530d72aa1271084ba7c5680ec63 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 4a8ab48ec47b3616272e50620b8e1a9599358ea6 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'doc: fix names of UIO drivers' has been queued to stable release 20.11.2
  2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
                   ` (226 preceding siblings ...)
  2021-05-10 16:02 ` [dpdk-stable] patch 'net/e1000/base: fix timeout for shadow RAM write' " Xueming Li
@ 2021-05-10 16:02 ` Xueming Li
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
  227 siblings, 1 reply; 410+ messages in thread
From: Xueming Li @ 2021-05-10 16:02 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/20bbce05a8fdf7592da64bd30bc8575d931c7aff

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 20bbce05a8fdf7592da64bd30bc8575d931c7aff Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Thu, 18 Mar 2021 12:00:49 +0100
Subject: [PATCH] doc: fix names of UIO drivers
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit b7fe612ac1de393f869c9818d5503633c8e96b36 ]

Fix typos in the names of kernel drivers based on UIO,
and make sure the generic term for the interface is UIO in capitals.

Fixes: 3a78b2f73206 ("doc: add virtio crypto PMD guide")
Fixes: 3cc4d996fa75 ("doc: update VFIO usage in qat crypto guide")
Fixes: 39922c470e3c ("doc: add known uio_pci_generic issue for i40e")
Fixes: 86fa6c57a175 ("doc: add known igb_uio issue for i40e")
Fixes: beff6d8e8e2e ("net/netvsc: add documentation")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 doc/guides/cryptodevs/caam_jr.rst     |  2 +-
 doc/guides/cryptodevs/qat.rst         |  2 +-
 doc/guides/cryptodevs/virtio.rst      |  2 +-
 doc/guides/nics/netvsc.rst            |  2 +-
 doc/guides/nics/virtio.rst            |  5 +++--
 doc/guides/nics/vmxnet3.rst           |  3 ++-
 doc/guides/rel_notes/known_issues.rst | 10 +++++-----
 doc/guides/sample_app_ug/vhost.rst    |  2 +-
 8 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/doc/guides/cryptodevs/caam_jr.rst b/doc/guides/cryptodevs/caam_jr.rst
index 5ef33ae78e..d7b0f14234 100644
--- a/doc/guides/cryptodevs/caam_jr.rst
+++ b/doc/guides/cryptodevs/caam_jr.rst
@@ -24,7 +24,7 @@ accelerators. This provides significant improvement to system level performance.
 
 SEC HW accelerator above 4.x+ version are also known as CAAM.
 
-caam_jr PMD is one of DPAA drivers which uses uio interface to interact with
+caam_jr PMD is one of DPAA drivers which uses UIO interface to interact with
 Linux kernel for configure and destroy the device instance (ring).
 
 
diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst
index cf16f03503..ea5c03b8fa 100644
--- a/doc/guides/cryptodevs/qat.rst
+++ b/doc/guides/cryptodevs/qat.rst
@@ -562,7 +562,7 @@ Binding the available VFs to the vfio-pci driver
 
 Note:
 
-* Please note that due to security issues, the usage of older DPDK igb-uio
+* Please note that due to security issues, the usage of older DPDK igb_uio
   driver is not recommended. This document shows how to use the more secure
   vfio-pci driver.
 * If QAT fails to bind to vfio-pci on Linux kernel 5.9+, please see the
diff --git a/doc/guides/cryptodevs/virtio.rst b/doc/guides/cryptodevs/virtio.rst
index 83d8e32397..8b96446ff2 100644
--- a/doc/guides/cryptodevs/virtio.rst
+++ b/doc/guides/cryptodevs/virtio.rst
@@ -63,7 +63,7 @@ QEMU can then be started using the following parameters:
         -device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0
     [...]
 
-Secondly bind the uio_generic driver for the virtio-crypto device.
+Secondly bind the uio_pci_generic driver for the virtio-crypto device.
 For example, 0000:00:04.0 is the domain, bus, device and function
 number of the virtio-crypto device:
 
diff --git a/doc/guides/nics/netvsc.rst b/doc/guides/nics/netvsc.rst
index 19f9940fe6..c0e218c743 100644
--- a/doc/guides/nics/netvsc.rst
+++ b/doc/guides/nics/netvsc.rst
@@ -62,7 +62,7 @@ store it in a shell variable:
 
 .. _`UUID`: https://en.wikipedia.org/wiki/Universally_unique_identifier
 
-There are several possible ways to assign the uio device driver for a device.
+There are several possible ways to assign the UIO device driver for a device.
 The easiest way (but only on 4.18 or later)
 is to use the `driverctl Device Driver control utility`_ to override
 the normal kernel device.
diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst
index c03c2d0fed..aabd0f1bce 100644
--- a/doc/guides/nics/virtio.rst
+++ b/doc/guides/nics/virtio.rst
@@ -71,7 +71,7 @@ In this release, the virtio PMD driver provides the basic functionality of packe
 
 *   Virtio supports software vlan stripping and inserting.
 
-*   Virtio supports using port IO to get PCI resource when uio/igb_uio module is not available.
+*   Virtio supports using port IO to get PCI resource when UIO module is not available.
 
 Prerequisites
 -------------
@@ -103,7 +103,8 @@ Host2VM communication example
 
         insmod rte_kni.ko
 
-    Other basic DPDK preparations like hugepage enabling, uio port binding are not listed here.
+    Other basic DPDK preparations like hugepage enabling,
+    UIO port binding are not listed here.
     Please refer to the *DPDK Getting Started Guide* for detailed instructions.
 
 #.  Launch the kni user application:
diff --git a/doc/guides/nics/vmxnet3.rst b/doc/guides/nics/vmxnet3.rst
index ae146f0d55..190cf91a47 100644
--- a/doc/guides/nics/vmxnet3.rst
+++ b/doc/guides/nics/vmxnet3.rst
@@ -119,7 +119,8 @@ This section describes an example setup for Phy-vSwitch-VM-Phy communication.
 
 .. note::
 
-    Other instructions on preparing to use DPDK such as, hugepage enabling, uio port binding are not listed here.
+    Other instructions on preparing to use DPDK such as,
+    hugepage enabling, UIO port binding are not listed here.
     Please refer to *DPDK Getting Started Guide and DPDK Sample Application's User Guide* for detailed instructions.
 
 The packet reception and transmission flow path is::
diff --git a/doc/guides/rel_notes/known_issues.rst b/doc/guides/rel_notes/known_issues.rst
index ee3ed1e658..e8f9fe6023 100644
--- a/doc/guides/rel_notes/known_issues.rst
+++ b/doc/guides/rel_notes/known_issues.rst
@@ -419,7 +419,7 @@ Binding PCI devices to igb_uio fails on Linux kernel 3.9 when more than one devi
 ------------------------------------------------------------------------------------------
 
 **Description**:
-   A known bug in the uio driver included in Linux kernel version 3.9 prevents more than one PCI device to be
+   A known bug in the UIO driver included in Linux kernel version 3.9 prevents more than one PCI device to be
    bound to the igb_uio driver.
 
 **Implication**:
@@ -614,7 +614,7 @@ I40e VF may not receive packets in the promiscuous mode
    Poll Mode Driver (PMD).
 
 
-uio pci generic module bind failed in X710/XL710/XXV710
+uio_pci_generic module bind failed in X710/XL710/XXV710
 -------------------------------------------------------
 
 **Description**:
@@ -671,7 +671,7 @@ virtio tx_burst() function cannot do TSO on shared packets
    Poll Mode Driver (PMD).
 
 
-igb uio legacy mode can not be used in X710/XL710/XXV710
+igb_uio legacy mode can not be used in X710/XL710/XXV710
 --------------------------------------------------------
 
 **Description**:
@@ -752,7 +752,7 @@ Netvsc driver and application restart
    handshake sequence with the host.
 
 **Resolution/Workaround**:
-   Either reboot the guest or remove and reinsert the hv_uio_generic module.
+   Either reboot the guest or remove and reinsert the uio_hv_generic module.
 
 **Affected Environment/Platform**:
    Linux Hyper-V.
@@ -816,7 +816,7 @@ Kernel crash when hot-unplug igb_uio device while DPDK application is running
 
 **Reason**:
    When device is hot-unplugged, igb_uio driver will be removed which will destroy UIO resources.
-   Later trying to access any uio resource will cause kernel crash.
+   Later trying to access any UIO resource will cause kernel crash.
 
 **Resolution/Workaround**:
    If using DPDK for PCI HW hot-unplug, prefer to bind device with VFIO instead of IGB_UIO.
diff --git a/doc/guides/sample_app_ug/vhost.rst b/doc/guides/sample_app_ug/vhost.rst
index 15aaff2493..d00693b293 100644
--- a/doc/guides/sample_app_ug/vhost.rst
+++ b/doc/guides/sample_app_ug/vhost.rst
@@ -72,7 +72,7 @@ Run testpmd inside guest
 ~~~~~~~~~~~~~~~~~~~~~~~~
 
 Make sure you have DPDK built inside the guest. Also make sure the
-corresponding virtio-net PCI device is bond to a uio driver, which
+corresponding virtio-net PCI device is bond to a UIO driver, which
 could be done by:
 
 .. code-block:: console
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:32.486753900 +0800
+++ 0230-doc-fix-names-of-UIO-drivers.patch	2021-05-10 23:59:26.710000000 +0800
@@ -1 +1 @@
-From b7fe612ac1de393f869c9818d5503633c8e96b36 Mon Sep 17 00:00:00 2001
+From 20bbce05a8fdf7592da64bd30bc8575d931c7aff Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit b7fe612ac1de393f869c9818d5503633c8e96b36 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -42 +44 @@
-index 224b22b3f7..96f5ab6afe 100644
+index cf16f03503..ea5c03b8fa 100644
@@ -81 +83 @@
-index 02e74a6e77..ac07d4d1e5 100644
+index c03c2d0fed..aabd0f1bce 100644
@@ -118 +120 @@
-index 43323e1a43..beea877bad 100644
+index ee3ed1e658..e8f9fe6023 100644
@@ -167 +169 @@
-index 09b1b6c57d..9afde9c7f5 100644
+index 15aaff2493..d00693b293 100644

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

* Re: [dpdk-stable] patch 'net/mlx5: fix flow actions index in cache' has been queued to stable release 20.11.2
  2021-05-10 16:00 ` [dpdk-stable] patch 'net/mlx5: fix flow actions index in cache' " Xueming Li
@ 2021-05-12  1:54   ` Li Zhang
  0 siblings, 0 replies; 410+ messages in thread
From: Li Zhang @ 2021-05-12  1:54 UTC (permalink / raw)
  To: Xueming(Steven) Li
  Cc: Luca Boccassi, Slava Ovsiienko, dpdk stable, Jiawei(Jonny) Wang

Go it and Thanks Steven.

Regards,
Li Zhang

> -----Original Message-----
> From: Xueming(Steven) Li <xuemingl@nvidia.com>
> Sent: Tuesday, May 11, 2021 12:01 AM
> To: Li Zhang <lizh@nvidia.com>
> Cc: Luca Boccassi <bluca@debian.org>; Slava Ovsiienko
> <viacheslavo@nvidia.com>; dpdk stable <stable@dpdk.org>
> Subject: patch 'net/mlx5: fix flow actions index in cache' has been queued to
> stable release 20.11.2
> 
> Hi,
> 
> FYI, your patch has been queued to stable release 20.11.2
> 
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 05/12/21. So please shout if
> anyone has objections.
> 
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for rebasing
> (ie: not only metadata diffs), please double check that the rebase was correctly
> done.
> 
> Queued patches are on a temporary branch at:
> https://github.com/steevenlee/dpdk
> 
> This queued commit can be viewed at:
> https://github.com/steevenlee/dpdk/commit/229101313919b163516238b0d8
> 58dba9ff12a654
> 
> Thanks.
> 
> Xueming Li <xuemingl@nvidia.com>
> 
> ---
> From 229101313919b163516238b0d858dba9ff12a654 Mon Sep 17 00:00:00
> 2001
> From: Li Zhang <lizh@nvidia.com>
> Date: Tue, 16 Mar 2021 14:05:17 +0200
> Subject: [PATCH] net/mlx5: fix flow actions index in cache
> Cc: Luca Boccassi <bluca@debian.org>
> 
> [ upstream commit d406aba8f1e8568c1bf0b1aad1d5756cead5df21 ]
> 
> When using port id or push VLAN action index to find the action in cache, it
> will fail to find actions.
> The root cause is the index is not saved in cache when creating the port id
> action or push vlan action.
> To fix these issues, update the index in cache when creating.
> 
> Fixes: 0fd5f82aaa07 ("net/mlx5: make port ID action cache thread safe")
> Fixes: 3422af2af2e4 ("net/mlx5: make push VLAN action cache thread safe")
> 
> Signed-off-by: Li Zhang <lizh@nvidia.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> ---
>  drivers/net/mlx5/mlx5_flow_dv.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c index 353a8df24c..347c3a1c13 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -3039,6 +3039,7 @@ flow_dv_port_id_create_cb(struct mlx5_cache_list
> *list,
>  				   "cannot create action");
>  		return NULL;
>  	}
> +	cache->idx = idx;
>  	return &cache->entry;
>  }
> 
> @@ -3130,6 +3131,7 @@ flow_dv_push_vlan_create_cb(struct
> mlx5_cache_list *list,
>  				   "cannot create push vlan action");
>  		return NULL;
>  	}
> +	cache->idx = idx;
>  	return &cache->entry;
>  }
> 
> --
> 2.25.1
> 
> ---
>   Diff of the applied patch vs upstream commit (please double-check if non-
> empty:
> ---
> --- -	2021-05-10 23:59:29.260567300 +0800
> +++ 0103-net-mlx5-fix-flow-actions-index-in-cache.patch	2021-05-10
> 23:59:26.480000000 +0800
> @@ -1 +1 @@
> -From d406aba8f1e8568c1bf0b1aad1d5756cead5df21 Mon Sep 17 00:00:00
> 2001
> +From 229101313919b163516238b0d858dba9ff12a654 Mon Sep 17 00:00:00
> 2001
> @@ -4,0 +5,3 @@
> +Cc: Luca Boccassi <bluca@debian.org>
> +
> +[ upstream commit d406aba8f1e8568c1bf0b1aad1d5756cead5df21 ]
> @@ -14 +16,0 @@
> -Cc: stable@dpdk.org
> @@ -23 +25 @@
> -index 1a74d5ac2b..23e5849783 100644
> +index 353a8df24c..347c3a1c13 100644
> @@ -26 +28 @@
> -@@ -3612,6 +3612,7 @@ flow_dv_port_id_create_cb(struct mlx5_cache_list
> *list,
> +@@ -3039,6 +3039,7 @@ flow_dv_port_id_create_cb(struct mlx5_cache_list
> +*list,
> @@ -34 +36 @@
> -@@ -3703,6 +3704,7 @@ flow_dv_push_vlan_create_cb(struct
> mlx5_cache_list *list,
> +@@ -3130,6 +3131,7 @@ flow_dv_push_vlan_create_cb(struct
> +mlx5_cache_list *list,

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

* [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' has been queued to stable release 20.11.2
  2021-05-10 16:02 ` [dpdk-stable] patch 'doc: fix names of UIO drivers' " Xueming Li
@ 2021-06-11 23:01   ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'config/ppc: reduce number of cores and NUMA nodes' " Xueming Li
                       ` (177 more replies)
  0 siblings, 178 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Stanislaw Kardach; +Cc: Luca Boccassi, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/cf948fe9c5295623a363453b48af3bb493fb77ba

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cf948fe9c5295623a363453b48af3bb493fb77ba Mon Sep 17 00:00:00 2001
From: Stanislaw Kardach <kda@semihalf.com>
Date: Mon, 12 Apr 2021 10:28:59 +0200
Subject: [PATCH] stack: allow lock-free only on relevant architectures
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 1abb185d6cd41f83cd91eb6b1816c31e4bce887a ]

Since commit 7911ba0473e0 ("stack: enable lock-free implementation for
aarch64"), lock-free stack is supported on arm64 but this description was
missing from the doxygen for the flag.

Currently it is impossible to detect programmatically whether lock-free
implementation of rte_stack is supported. One could check whether the
header guard for lock-free stubs is defined (_RTE_STACK_LF_STUBS_H_) but
that's an unstable implementation detail. Because of that currently all
lock-free ring creations silently succeed (as long as the stack header
is 16B long) which later leads to push and pop operations being NOPs.
The observable effect is that stack_lf_autotest fails on platforms not
supporting the lock-free. Instead it should just skip the lock-free test
altogether.

This commit adds a new errno value (ENOTSUP) that may be returned by
rte_stack_create() to indicate that a given combination of flags is not
supported on a current platform.
This is detected by checking a compile-time flag in the include logic in
rte_stack_lf.h which may be used by applications to check the lock-free
support at compile time.

Use the added RTE_STACK_LF_SUPPORTED flag to disable the lock-free stack
tests at the compile time.
Perf test doesn't fail because rte_ring_create() succeeds, however
marking this test as skipped gives a better indication of what actually
was tested.

Fixes: 7911ba0473e0 ("stack: enable lock-free implementation for aarch64")

Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 app/test/test_stack.c           | 4 ++++
 app/test/test_stack_perf.c      | 4 ++++
 lib/librte_stack/rte_stack.c    | 4 +++-
 lib/librte_stack/rte_stack.h    | 3 ++-
 lib/librte_stack/rte_stack_lf.h | 5 +++++
 5 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/app/test/test_stack.c b/app/test/test_stack.c
index 02422a32d6..00efb38e2a 100644
--- a/app/test/test_stack.c
+++ b/app/test/test_stack.c
@@ -373,7 +373,11 @@ test_stack(void)
 static int
 test_lf_stack(void)
 {
+#if defined(RTE_STACK_LF_SUPPORTED)
 	return __test_stack(RTE_STACK_F_LF);
+#else
+	return TEST_SKIPPED;
+#endif
 }
 
 REGISTER_TEST_COMMAND(stack_autotest, test_stack);
diff --git a/app/test/test_stack_perf.c b/app/test/test_stack_perf.c
index 3590625c49..4ee40d5d19 100644
--- a/app/test/test_stack_perf.c
+++ b/app/test/test_stack_perf.c
@@ -349,7 +349,11 @@ test_stack_perf(void)
 static int
 test_lf_stack_perf(void)
 {
+#if defined(RTE_STACK_LF_SUPPORTED)
 	return __test_stack_perf(RTE_STACK_F_LF);
+#else
+	return TEST_SKIPPED;
+#endif
 }
 
 REGISTER_TEST_COMMAND(stack_perf_autotest, test_stack_perf);
diff --git a/lib/librte_stack/rte_stack.c b/lib/librte_stack/rte_stack.c
index 8a51fba17f..10d3b2eeb3 100644
--- a/lib/librte_stack/rte_stack.c
+++ b/lib/librte_stack/rte_stack.c
@@ -64,9 +64,11 @@ rte_stack_create(const char *name, unsigned int count, int socket_id,
 
 #ifdef RTE_ARCH_64
 	RTE_BUILD_BUG_ON(sizeof(struct rte_stack_lf_head) != 16);
-#else
+#endif
+#if !defined(RTE_STACK_LF_SUPPORTED)
 	if (flags & RTE_STACK_F_LF) {
 		STACK_LOG_ERR("Lock-free stack is not supported on your platform\n");
+		rte_errno = ENOTSUP;
 		return NULL;
 	}
 #endif
diff --git a/lib/librte_stack/rte_stack.h b/lib/librte_stack/rte_stack.h
index 395b9ef835..27640f87b2 100644
--- a/lib/librte_stack/rte_stack.h
+++ b/lib/librte_stack/rte_stack.h
@@ -89,7 +89,7 @@ struct rte_stack {
 
 /**
  * The stack uses lock-free push and pop functions. This flag is only
- * supported on x86_64 platforms, currently.
+ * supported on x86_64 or arm64 platforms, currently.
  */
 #define RTE_STACK_F_LF 0x0001
 
@@ -205,6 +205,7 @@ rte_stack_free_count(struct rte_stack *s)
  *    - EEXIST - a stack with the same name already exists
  *    - ENOMEM - insufficient memory to create the stack
  *    - ENAMETOOLONG - name size exceeds RTE_STACK_NAMESIZE
+ *    - ENOTSUP - platform does not support given flags combination.
  */
 struct rte_stack *
 rte_stack_create(const char *name, unsigned int count, int socket_id,
diff --git a/lib/librte_stack/rte_stack_lf.h b/lib/librte_stack/rte_stack_lf.h
index eb106e64e6..f2b012cd0e 100644
--- a/lib/librte_stack/rte_stack_lf.h
+++ b/lib/librte_stack/rte_stack_lf.h
@@ -13,6 +13,11 @@
 #else
 #include "rte_stack_lf_generic.h"
 #endif
+
+/**
+ * Indicates that RTE_STACK_F_LF is supported.
+ */
+#define RTE_STACK_LF_SUPPORTED
 #endif
 
 /**
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:56.746179000 +0800
+++ 0001-stack-allow-lock-free-only-on-relevant-architectures.patch	2021-06-12 06:53:56.000000000 +0800
@@ -1 +1 @@
-From 1abb185d6cd41f83cd91eb6b1816c31e4bce887a Mon Sep 17 00:00:00 2001
+From cf948fe9c5295623a363453b48af3bb493fb77ba Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 1abb185d6cd41f83cd91eb6b1816c31e4bce887a ]
@@ -38,7 +41,6 @@
- app/test/test_stack.c                  | 4 ++++
- app/test/test_stack_perf.c             | 4 ++++
- doc/guides/rel_notes/release_21_05.rst | 4 ++++
- lib/stack/rte_stack.c                  | 4 +++-
- lib/stack/rte_stack.h                  | 3 ++-
- lib/stack/rte_stack_lf.h               | 5 +++++
- 6 files changed, 22 insertions(+), 2 deletions(-)
+ app/test/test_stack.c           | 4 ++++
+ app/test/test_stack_perf.c      | 4 ++++
+ lib/librte_stack/rte_stack.c    | 4 +++-
+ lib/librte_stack/rte_stack.h    | 3 ++-
+ lib/librte_stack/rte_stack_lf.h | 5 +++++
+ 5 files changed, 18 insertions(+), 2 deletions(-)
@@ -78,16 +80 @@
-diff --git a/doc/guides/rel_notes/release_21_05.rst b/doc/guides/rel_notes/release_21_05.rst
-index b3224dc332..cd33898c55 100644
---- a/doc/guides/rel_notes/release_21_05.rst
-+++ b/doc/guides/rel_notes/release_21_05.rst
-@@ -329,6 +329,10 @@ API Changes
-   ``policer_action_recolor_supported`` and ``policer_action_drop_supported``
-   have been removed.
- 
-+* stack: Lock-free ``rte_stack`` no longer silently ignores push and pop when
-+  it's not supported on the current platform. Instead ``rte_stack_create()``
-+  fails and ``rte_errno`` is set to ``ENOTSUP``.
-+
- 
- ABI Changes
- -----------
-diff --git a/lib/stack/rte_stack.c b/lib/stack/rte_stack.c
+diff --git a/lib/librte_stack/rte_stack.c b/lib/librte_stack/rte_stack.c
@@ -95,2 +82,2 @@
---- a/lib/stack/rte_stack.c
-+++ b/lib/stack/rte_stack.c
+--- a/lib/librte_stack/rte_stack.c
++++ b/lib/librte_stack/rte_stack.c
@@ -110 +97 @@
-diff --git a/lib/stack/rte_stack.h b/lib/stack/rte_stack.h
+diff --git a/lib/librte_stack/rte_stack.h b/lib/librte_stack/rte_stack.h
@@ -112,2 +99,2 @@
---- a/lib/stack/rte_stack.h
-+++ b/lib/stack/rte_stack.h
+--- a/lib/librte_stack/rte_stack.h
++++ b/lib/librte_stack/rte_stack.h
@@ -131 +118 @@
-diff --git a/lib/stack/rte_stack_lf.h b/lib/stack/rte_stack_lf.h
+diff --git a/lib/librte_stack/rte_stack_lf.h b/lib/librte_stack/rte_stack_lf.h
@@ -133,2 +120,2 @@
---- a/lib/stack/rte_stack_lf.h
-+++ b/lib/stack/rte_stack_lf.h
+--- a/lib/librte_stack/rte_stack_lf.h
++++ b/lib/librte_stack/rte_stack_lf.h

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

* [dpdk-stable] patch 'config/ppc: reduce number of cores and NUMA nodes' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'raw/ioat: fix script for configuring small number of queues' " Xueming Li
                       ` (176 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: David Christensen; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1c96bfbc4c739d85196d9371d4ec93071242bf7d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1c96bfbc4c739d85196d9371d4ec93071242bf7d Mon Sep 17 00:00:00 2001
From: David Christensen <drc@linux.vnet.ibm.com>
Date: Wed, 28 Apr 2021 13:10:16 -0700
Subject: [PATCH] config/ppc: reduce number of cores and NUMA nodes
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 5f760b7dccd85c7da78c6e4ee3517a912861d424 ]

When setting RTE_MAX_LCORES to the maximum value supported by ppc
hardware (1536), the lcores_autotest may timeout after 30 seconds
because the test takes nearly 60 seconds to complete. Set max_lcores to
a lower value because the maximum value is unlikely to be seen in any
production systems and to eliminate the quick test timeout error.

Bugzilla ID: 684
Fixes: db1f2f8a9fe5 ("config: increase maximum lcores for ppc")

Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 config/ppc/meson.build | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/config/ppc/meson.build b/config/ppc/meson.build
index 0d8da87e6f..ed6ea07d24 100644
--- a/config/ppc/meson.build
+++ b/config/ppc/meson.build
@@ -17,7 +17,18 @@ if not power9_supported
 	dpdk_conf.set('RTE_MACHINE','power8')
 endif
 
-# overrides specific to ppc64
-dpdk_conf.set('RTE_MAX_LCORE', 1536)
-dpdk_conf.set('RTE_MAX_NUMA_NODES', 32)
+# Certain POWER9 systems can scale as high as 1536 LCORES, but setting such a
+# high value can waste memory, cause timeouts in time limited autotests, and is
+# unlikely to be used in many production situations.  Similarly, keeping the
+# default 64 LCORES seems too small as most POWER9 dual socket systems will have
+# at least 128 LCORES available.  Set RTE_MAX_LCORE to 128 for POWER systems as
+# a compromise.
+dpdk_conf.set('RTE_MAX_LCORE', 128)
+
+# POWER systems do not allocate NUMA nodes sequentially.  A dual socket system
+# will have CPUs associated with NUMA nodes 0 & 8, so ensure that the second
+# NUMA node will be supported by setting RTE_MAX_NUMA_NODES to 16. High end
+# systems can scale even higher with as many as 32 NUMA nodes.
+dpdk_conf.set('RTE_MAX_NUMA_NODES', 16)
+
 dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:56.767933900 +0800
+++ 0002-config-ppc-reduce-number-of-cores-and-NUMA-nodes.patch	2021-06-12 06:53:56.000000000 +0800
@@ -1 +1 @@
-From 5f760b7dccd85c7da78c6e4ee3517a912861d424 Mon Sep 17 00:00:00 2001
+From 1c96bfbc4c739d85196d9371d4ec93071242bf7d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 5f760b7dccd85c7da78c6e4ee3517a912861d424 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 1c196b8db5..4f7806bab1 100644
+index 0d8da87e6f..ed6ea07d24 100644
@@ -27 +29 @@
-     dpdk_conf.set('RTE_MACHINE','power8')
+ 	dpdk_conf.set('RTE_MACHINE','power8')

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

* [dpdk-stable] patch 'raw/ioat: fix script for configuring small number of queues' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'config/ppc: reduce number of cores and NUMA nodes' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'eal/arm64: fix platform register bit' " Xueming Li
                       ` (175 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/35ad25c5b12c43e64ec2a0382963530e7379fda8

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 35ad25c5b12c43e64ec2a0382963530e7379fda8 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Tue, 4 May 2021 14:14:51 +0100
Subject: [PATCH] raw/ioat: fix script for configuring small number of queues
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit cfb286ab2b487b6e40f958a096fbe8cd13aa055d ]

The dpdk_idxd_cfg.py script included with the driver for convenience did
not work properly where the number of queues to be configured was
less than the number of groups or engines. This was because there would
be configured groups/engines not assigned to queues. Fix this by
limiting the engine and group counts to be no bigger than the number of
queues.

Fixes: 01863b9d2354 ("raw/ioat: include example configuration script")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/raw/ioat/dpdk_idxd_cfg.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/raw/ioat/dpdk_idxd_cfg.py b/drivers/raw/ioat/dpdk_idxd_cfg.py
index bce4bb5bd4..56e44063e4 100755
--- a/drivers/raw/ioat/dpdk_idxd_cfg.py
+++ b/drivers/raw/ioat/dpdk_idxd_cfg.py
@@ -39,15 +39,15 @@ def configure_dsa(dsa_id, queues):
     max_queues = dsa_dir.read_int("max_work_queues")
     max_tokens = dsa_dir.read_int("max_tokens")
 
-    # we want one engine per group
-    nb_groups = min(max_engines, max_groups)
-    for grp in range(nb_groups):
-        dsa_dir.write_values({f"engine{dsa_id}.{grp}/group_id": grp})
-
     nb_queues = min(queues, max_queues)
     if queues > nb_queues:
         print(f"Setting number of queues to max supported value: {max_queues}")
 
+    # we want one engine per group, and no more engines than queues
+    nb_groups = min(max_engines, max_groups, nb_queues)
+    for grp in range(nb_groups):
+        dsa_dir.write_values({f"engine{dsa_id}.{grp}/group_id": grp})
+
     # configure each queue
     for q in range(nb_queues):
         wq_dir = SysfsDir(os.path.join(dsa_dir.path, f"wq{dsa_id}.{q}"))
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:56.787495700 +0800
+++ 0003-raw-ioat-fix-script-for-configuring-small-number-of-.patch	2021-06-12 06:53:56.000000000 +0800
@@ -1 +1 @@
-From cfb286ab2b487b6e40f958a096fbe8cd13aa055d Mon Sep 17 00:00:00 2001
+From 35ad25c5b12c43e64ec2a0382963530e7379fda8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit cfb286ab2b487b6e40f958a096fbe8cd13aa055d ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'eal/arm64: fix platform register bit' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'config/ppc: reduce number of cores and NUMA nodes' " Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'raw/ioat: fix script for configuring small number of queues' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'mbuf: check shared memory before dumping dynamic space' " Xueming Li
                       ` (174 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Juraj Linkeš; +Cc: Luca Boccassi, Jerin Jacob, Ruifeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5f90abb23269b12fb65ff6d0ce02671e947f7e8e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5f90abb23269b12fb65ff6d0ce02671e947f7e8e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Juraj=20Linke=C5=A1?= <juraj.linkes@pantheon.tech>
Date: Thu, 22 Apr 2021 11:11:51 +0200
Subject: [PATCH] eal/arm64: fix platform register bit
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 20c7744f8d333e9388b479b308c8c2a149110703 ]

REG_PLATFORM only uses bit 0 to indicate whether the value retrieved
from hardware matches PLATFORM_STR.

Fixes: 97523f822ba9 ("eal/arm: add CPU flags for ARMv8")

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 lib/librte_eal/arm/rte_cpuflags.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/arm/rte_cpuflags.c b/lib/librte_eal/arm/rte_cpuflags.c
index e3a53bcece..845770f1e5 100644
--- a/lib/librte_eal/arm/rte_cpuflags.c
+++ b/lib/librte_eal/arm/rte_cpuflags.c
@@ -108,7 +108,7 @@ const struct feature_entry rte_cpu_feature_table[] = {
 	FEAT_DEF(SVEF32MM,	REG_HWCAP2,   10)
 	FEAT_DEF(SVEF64MM,	REG_HWCAP2,   11)
 	FEAT_DEF(SVEBF16,	REG_HWCAP2,   12)
-	FEAT_DEF(AARCH64,	REG_PLATFORM, 1)
+	FEAT_DEF(AARCH64,	REG_PLATFORM,  0)
 };
 #endif /* RTE_ARCH */
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:56.808666600 +0800
+++ 0004-eal-arm64-fix-platform-register-bit.patch	2021-06-12 06:53:56.000000000 +0800
@@ -1 +1 @@
-From 20c7744f8d333e9388b479b308c8c2a149110703 Mon Sep 17 00:00:00 2001
+From 5f90abb23269b12fb65ff6d0ce02671e947f7e8e Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 20c7744f8d333e9388b479b308c8c2a149110703 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
- lib/eal/arm/rte_cpuflags.c | 2 +-
+ lib/librte_eal/arm/rte_cpuflags.c | 2 +-
@@ -22 +24 @@
-diff --git a/lib/eal/arm/rte_cpuflags.c b/lib/eal/arm/rte_cpuflags.c
+diff --git a/lib/librte_eal/arm/rte_cpuflags.c b/lib/librte_eal/arm/rte_cpuflags.c
@@ -24,2 +26,2 @@
---- a/lib/eal/arm/rte_cpuflags.c
-+++ b/lib/eal/arm/rte_cpuflags.c
+--- a/lib/librte_eal/arm/rte_cpuflags.c
++++ b/lib/librte_eal/arm/rte_cpuflags.c

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

* [dpdk-stable] patch 'mbuf: check shared memory before dumping dynamic space' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (2 preceding siblings ...)
  2021-06-11 23:01     ` [dpdk-stable] patch 'eal/arm64: fix platform register bit' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'test/mempool: fix object initializer' " Xueming Li
                       ` (173 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, Olivier Matz, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f532cbbedb9ef66ecf31ff9c579cd7b77c0ee839

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f532cbbedb9ef66ecf31ff9c579cd7b77c0ee839 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 23 Apr 2021 16:11:04 +0800
Subject: [PATCH] mbuf: check shared memory before dumping dynamic space
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit d4902ed31c63b002268e593536b13b84d4fdac9a ]

Because mbuf dyn shared memory was allocated runtime, so it's
necessary to check validity when dump mbuf dyn info.

Also this patch adds an error logging when init shared memory fail.

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

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_mbuf/rte_mbuf_dyn.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/librte_mbuf/rte_mbuf_dyn.c b/lib/librte_mbuf/rte_mbuf_dyn.c
index 7d5e942bf0..ca46eb279e 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.c
+++ b/lib/librte_mbuf/rte_mbuf_dyn.c
@@ -115,8 +115,10 @@ init_shared_mem(void)
 	} else {
 		mz = rte_memzone_lookup(RTE_MBUF_DYN_MZNAME);
 	}
-	if (mz == NULL)
+	if (mz == NULL) {
+		RTE_LOG(ERR, MBUF, "Failed to get mbuf dyn shared memory\n");
 		return -1;
+	}
 
 	shm = mz->addr;
 
@@ -525,7 +527,11 @@ void rte_mbuf_dyn_dump(FILE *out)
 	size_t i;
 
 	rte_mcfg_tailq_write_lock();
-	init_shared_mem();
+	if (init_shared_mem() < 0) {
+		rte_mcfg_tailq_write_unlock();
+		return;
+	}
+
 	fprintf(out, "Reserved fields:\n");
 	mbuf_dynfield_list = RTE_TAILQ_CAST(
 		mbuf_dynfield_tailq.head, mbuf_dynfield_list);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:56.832127300 +0800
+++ 0005-mbuf-check-shared-memory-before-dumping-dynamic-spac.patch	2021-06-12 06:53:56.000000000 +0800
@@ -1 +1 @@
-From d4902ed31c63b002268e593536b13b84d4fdac9a Mon Sep 17 00:00:00 2001
+From f532cbbedb9ef66ecf31ff9c579cd7b77c0ee839 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit d4902ed31c63b002268e593536b13b84d4fdac9a ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
- lib/mbuf/rte_mbuf_dyn.c | 10 ++++++++--
+ lib/librte_mbuf/rte_mbuf_dyn.c | 10 ++++++++--
@@ -21 +23 @@
-diff --git a/lib/mbuf/rte_mbuf_dyn.c b/lib/mbuf/rte_mbuf_dyn.c
+diff --git a/lib/librte_mbuf/rte_mbuf_dyn.c b/lib/librte_mbuf/rte_mbuf_dyn.c
@@ -23,2 +25,2 @@
---- a/lib/mbuf/rte_mbuf_dyn.c
-+++ b/lib/mbuf/rte_mbuf_dyn.c
+--- a/lib/librte_mbuf/rte_mbuf_dyn.c
++++ b/lib/librte_mbuf/rte_mbuf_dyn.c

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

* [dpdk-stable] patch 'test/mempool: fix object initializer' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (3 preceding siblings ...)
  2021-06-11 23:01     ` [dpdk-stable] patch 'mbuf: check shared memory before dumping dynamic space' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'app/eventdev: fix overflow in lcore list parsing' " Xueming Li
                       ` (172 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Luca Boccassi, Wenwu Ma, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8ad8d124a5584d7817f5654eabdbd61ae8b2994d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8ad8d124a5584d7817f5654eabdbd61ae8b2994d Mon Sep 17 00:00:00 2001
From: Olivier Matz <olivier.matz@6wind.com>
Date: Tue, 27 Apr 2021 15:56:45 +0200
Subject: [PATCH] test/mempool: fix object initializer
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit e1064f80b61157250250353718ff196d2f050041 ]

The function rte_pktmbuf_init() expects that the mempool private area is
large enough and was previously initialized by rte_pktmbuf_pool_init(),
which is not the case.

This causes the function rte_pktmbuf_priv_size() to return an
unpredictable value, and this value is used as a size in a memset.

Replace the mempool object initializer by my_obj_init(), which does not
have this constraint, and fits the needs for this test.

Fixes: 923ceaeac140 ("test/mempool: add unit test cases")

Reported-by: Wenwu Ma <wenwux.ma@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 app/test/test_mempool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_mempool.c b/app/test/test_mempool.c
index 084842fdaa..3adadd6731 100644
--- a/app/test/test_mempool.c
+++ b/app/test/test_mempool.c
@@ -552,7 +552,7 @@ test_mempool(void)
 		GOTO_ERR(ret, err);
 
 	/* test to initialize mempool objects and memory */
-	nb_objs = rte_mempool_obj_iter(mp_stack_mempool_iter, rte_pktmbuf_init,
+	nb_objs = rte_mempool_obj_iter(mp_stack_mempool_iter, my_obj_init,
 			NULL);
 	if (nb_objs == 0)
 		GOTO_ERR(ret, err);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:56.852962600 +0800
+++ 0006-test-mempool-fix-object-initializer.patch	2021-06-12 06:53:56.000000000 +0800
@@ -1 +1 @@
-From e1064f80b61157250250353718ff196d2f050041 Mon Sep 17 00:00:00 2001
+From 8ad8d124a5584d7817f5654eabdbd61ae8b2994d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit e1064f80b61157250250353718ff196d2f050041 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'app/eventdev: fix overflow in lcore list parsing' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (4 preceding siblings ...)
  2021-06-11 23:01     ` [dpdk-stable] patch 'test/mempool: fix object initializer' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'eventdev: remove redundant thread name setting' " Xueming Li
                       ` (171 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, Pavan Nikhilesh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d173cc85c98dee2bbdfeaeb6b226fc2ee67bd18f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d173cc85c98dee2bbdfeaeb6b226fc2ee67bd18f Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Fri, 23 Apr 2021 15:38:08 +0800
Subject: [PATCH] app/eventdev: fix overflow in lcore list parsing
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 32d7dbf269be84cb906979d73ad81b40e28d377a ]

Tainted and unvalidated integer 'idx' used as an index, which may
lead to buffer overflow.

This patch fixed it.

Fixes: 89e5eb118017 ("app/testeventdev: add string parsing helpers")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 app/test-eventdev/evt_options.c | 4 ++--
 app/test-eventdev/parser.c      | 6 ++++--
 app/test-eventdev/parser.h      | 2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/app/test-eventdev/evt_options.c b/app/test-eventdev/evt_options.c
index 0d04ea9f8d..8c9d3fcdce 100644
--- a/app/test-eventdev/evt_options.c
+++ b/app/test-eventdev/evt_options.c
@@ -218,7 +218,7 @@ evt_parse_plcores(struct evt_options *opt, const char *corelist)
 {
 	int ret;
 
-	ret = parse_lcores_list(opt->plcores, corelist);
+	ret = parse_lcores_list(opt->plcores, RTE_MAX_LCORE, corelist);
 	if (ret == -E2BIG)
 		evt_err("duplicate lcores in plcores");
 
@@ -230,7 +230,7 @@ evt_parse_work_lcores(struct evt_options *opt, const char *corelist)
 {
 	int ret;
 
-	ret = parse_lcores_list(opt->wlcores, corelist);
+	ret = parse_lcores_list(opt->wlcores, RTE_MAX_LCORE, corelist);
 	if (ret == -E2BIG)
 		evt_err("duplicate lcores in wlcores");
 
diff --git a/app/test-eventdev/parser.c b/app/test-eventdev/parser.c
index 24f1855e9a..7a973cbb23 100644
--- a/app/test-eventdev/parser.c
+++ b/app/test-eventdev/parser.c
@@ -310,7 +310,7 @@ parse_hex_string(char *src, uint8_t *dst, uint32_t *size)
 }
 
 int
-parse_lcores_list(bool lcores[], const char *corelist)
+parse_lcores_list(bool lcores[], int lcores_num, const char *corelist)
 {
 	int i, idx = 0;
 	int min, max;
@@ -332,6 +332,8 @@ parse_lcores_list(bool lcores[], const char *corelist)
 		if (*corelist == '\0')
 			return -1;
 		idx = strtoul(corelist, &end, 10);
+		if (idx < 0 || idx > lcores_num)
+			return -1;
 
 		if (end == NULL)
 			return -1;
@@ -343,7 +345,7 @@ parse_lcores_list(bool lcores[], const char *corelist)
 			max = idx;
 			if (min == RTE_MAX_LCORE)
 				min = idx;
-			for (idx = min; idx <= max; idx++) {
+			for (idx = min; idx < max; idx++) {
 				if (lcores[idx] == 1)
 					return -E2BIG;
 				lcores[idx] = 1;
diff --git a/app/test-eventdev/parser.h b/app/test-eventdev/parser.h
index 673ff22d78..696b40a3e2 100644
--- a/app/test-eventdev/parser.h
+++ b/app/test-eventdev/parser.h
@@ -46,5 +46,5 @@ int parse_hex_string(char *src, uint8_t *dst, uint32_t *size);
 
 int parse_tokenize_string(char *string, char *tokens[], uint32_t *n_tokens);
 
-int parse_lcores_list(bool lcores[], const char *corelist);
+int parse_lcores_list(bool lcores[], int lcores_num, const char *corelist);
 #endif
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:56.882211000 +0800
+++ 0007-app-eventdev-fix-overflow-in-lcore-list-parsing.patch	2021-06-12 06:53:56.010000000 +0800
@@ -1 +1 @@
-From 32d7dbf269be84cb906979d73ad81b40e28d377a Mon Sep 17 00:00:00 2001
+From d173cc85c98dee2bbdfeaeb6b226fc2ee67bd18f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 32d7dbf269be84cb906979d73ad81b40e28d377a ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 0d55405741..061b63e12e 100644
+index 0d04ea9f8d..8c9d3fcdce 100644
@@ -26 +28 @@
-@@ -221,7 +221,7 @@ evt_parse_plcores(struct evt_options *opt, const char *corelist)
+@@ -218,7 +218,7 @@ evt_parse_plcores(struct evt_options *opt, const char *corelist)
@@ -35 +37 @@
-@@ -233,7 +233,7 @@ evt_parse_work_lcores(struct evt_options *opt, const char *corelist)
+@@ -230,7 +230,7 @@ evt_parse_work_lcores(struct evt_options *opt, const char *corelist)

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

* [dpdk-stable] patch 'eventdev: remove redundant thread name setting' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (5 preceding siblings ...)
  2021-06-11 23:01     ` [dpdk-stable] patch 'app/eventdev: fix overflow in lcore list parsing' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'eventdev: fix memory leakage on thread creation failure' " Xueming Li
                       ` (170 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/78dfdbc90f94ab17096009c705c2b567cb7a416f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 78dfdbc90f94ab17096009c705c2b567cb7a416f Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 30 Apr 2021 17:34:37 +0800
Subject: [PATCH] eventdev: remove redundant thread name setting
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 0bac9fc7915483500f0e37f1cd66d1b6fa55308b ]

The thread name already set by rte_ctrl_thread_create() API, so remove
the call of rte_thread_setname() API.

Fixes: 3810ae435783 ("eventdev: add interrupt driven queues to Rx adapter")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 lib/librte_eventdev/rte_event_eth_rx_adapter.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
index 3c73046551..e84e547292 100644
--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
@@ -1284,10 +1284,8 @@ rxa_create_intr_thread(struct rte_event_eth_rx_adapter *rx_adapter)
 
 	err = rte_ctrl_thread_create(&rx_adapter->rx_intr_thread, thread_name,
 				NULL, rxa_intr_thread, rx_adapter);
-	if (!err) {
-		rte_thread_setname(rx_adapter->rx_intr_thread, thread_name);
+	if (!err)
 		return 0;
-	}
 
 	RTE_EDEV_LOG_ERR("Failed to create interrupt thread err = %d\n", err);
 error:
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:56.908913500 +0800
+++ 0008-eventdev-remove-redundant-thread-name-setting.patch	2021-06-12 06:53:56.010000000 +0800
@@ -1 +1 @@
-From 0bac9fc7915483500f0e37f1cd66d1b6fa55308b Mon Sep 17 00:00:00 2001
+From 78dfdbc90f94ab17096009c705c2b567cb7a416f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 0bac9fc7915483500f0e37f1cd66d1b6fa55308b ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
- lib/eventdev/rte_event_eth_rx_adapter.c | 4 +---
+ lib/librte_eventdev/rte_event_eth_rx_adapter.c | 4 +---
@@ -19,5 +21,5 @@
-diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
-index ca166a65f2..d317e89c1b 100644
---- a/lib/eventdev/rte_event_eth_rx_adapter.c
-+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
-@@ -1432,10 +1432,8 @@ rxa_create_intr_thread(struct rte_event_eth_rx_adapter *rx_adapter)
+diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
+index 3c73046551..e84e547292 100644
+--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
++++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
+@@ -1284,10 +1284,8 @@ rxa_create_intr_thread(struct rte_event_eth_rx_adapter *rx_adapter)

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

* [dpdk-stable] patch 'eventdev: fix memory leakage on thread creation failure' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (6 preceding siblings ...)
  2021-06-11 23:01     ` [dpdk-stable] patch 'eventdev: remove redundant thread name setting' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'acl: fix build with GCC 11' " Xueming Li
                       ` (169 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/efdd260f6ee264e2597ba466a743d2f788bb9fcd

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From efdd260f6ee264e2597ba466a743d2f788bb9fcd Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 30 Apr 2021 17:34:38 +0800
Subject: [PATCH] eventdev: fix memory leakage on thread creation failure
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit f6681ab76bc5983f0571aaa4154ef839978c1088 ]

This patch fixes the issue that epoll_events memory is not released
after the intr thread created fail.

Fixes: 3810ae435783 ("eventdev: add interrupt driven queues to Rx adapter")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 lib/librte_eventdev/rte_event_eth_rx_adapter.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
index e84e547292..663b446c05 100644
--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
@@ -1288,6 +1288,7 @@ rxa_create_intr_thread(struct rte_event_eth_rx_adapter *rx_adapter)
 		return 0;
 
 	RTE_EDEV_LOG_ERR("Failed to create interrupt thread err = %d\n", err);
+	rte_free(rx_adapter->epoll_events);
 error:
 	rte_ring_free(rx_adapter->intr_ring);
 	rx_adapter->intr_ring = NULL;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:56.933279300 +0800
+++ 0009-eventdev-fix-memory-leakage-on-thread-creation-failu.patch	2021-06-12 06:53:56.010000000 +0800
@@ -1 +1 @@
-From f6681ab76bc5983f0571aaa4154ef839978c1088 Mon Sep 17 00:00:00 2001
+From efdd260f6ee264e2597ba466a743d2f788bb9fcd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit f6681ab76bc5983f0571aaa4154ef839978c1088 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
- lib/eventdev/rte_event_eth_rx_adapter.c | 1 +
+ lib/librte_eventdev/rte_event_eth_rx_adapter.c | 1 +
@@ -19,5 +21,5 @@
-diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
-index d317e89c1b..13dfb28401 100644
---- a/lib/eventdev/rte_event_eth_rx_adapter.c
-+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
-@@ -1436,6 +1436,7 @@ rxa_create_intr_thread(struct rte_event_eth_rx_adapter *rx_adapter)
+diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
+index e84e547292..663b446c05 100644
+--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
++++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
+@@ -1288,6 +1288,7 @@ rxa_create_intr_thread(struct rte_event_eth_rx_adapter *rx_adapter)

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

* [dpdk-stable] patch 'acl: fix build with GCC 11' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (7 preceding siblings ...)
  2021-06-11 23:01     ` [dpdk-stable] patch 'eventdev: fix memory leakage on thread creation failure' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'bpf: fix JSLT validation' " Xueming Li
                       ` (168 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: Luca Boccassi, Ali Alnubani, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a5fd2098d6e839c2266f3f80279e1e6f3164a6a1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a5fd2098d6e839c2266f3f80279e1e6f3164a6a1 Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
Date: Mon, 26 Apr 2021 14:35:19 +0100
Subject: [PATCH] acl: fix build with GCC 11
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 8e2dd74f0afd3ef3358f1cca05afb20bda670207 ]

gcc 11 with '-O2' complains about some variables being used without
being initialized:

In function ‘start_flow_avx512x8’,
    inlined from ‘search_trie_avx512x8.constprop’ at acl_run_avx512_common.h:317:
lib/librte_acl/acl_run_avx512_common.h:210:13: warning:
    ‘pdata’ is used uninitialized [-Wuninitialized]
In function ‘search_trie_avx512x8.constprop’:
lib/librte_acl/acl_run_avx512_common.h:314:32: note: ‘pdata’ declared here
...

Indeed, these variables are not explicitly initialized,
but this is done intentionally.
We rely on constant mask value that we pass to start_flow*() functions
as a parameter to mask out uninitialized values.
Note that '-O3' doesn't produce this warning.
Anyway, to support clean build with gcc-11 this patch adds
explicit initialization for these variables.
I checked the output binary: with '-O3' both clang and gcc 10/11
generate no extra code for it.
Also performance test didn't reveal any regressions.

Bugzilla ID: 673
Fixes: b64c2295f7fc ("acl: add 256-bit AVX512 classify method")
Fixes: 45da22e42ec3 ("acl: add 512-bit AVX512 classify method")

Reported-by: Ali Alnubani <alialnu@nvidia.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_acl/acl_run_avx512_common.h | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/lib/librte_acl/acl_run_avx512_common.h b/lib/librte_acl/acl_run_avx512_common.h
index fafaf591e8..fbad74d459 100644
--- a/lib/librte_acl/acl_run_avx512_common.h
+++ b/lib/librte_acl/acl_run_avx512_common.h
@@ -303,6 +303,28 @@ _F_(match_check_process)(struct acl_flow_avx512 *flow, uint32_t fm[2],
 	}
 }
 
+static inline void
+_F_(reset_flow_vars)(_T_simd di[2], _T_simd idx[2], _T_simd pdata[4],
+	_T_simd tr_lo[2], _T_simd tr_hi[2])
+{
+	di[0] = _M_SI_(setzero)();
+	di[1] = _M_SI_(setzero)();
+
+	idx[0] = _M_SI_(setzero)();
+	idx[1] = _M_SI_(setzero)();
+
+	pdata[0] = _M_SI_(setzero)();
+	pdata[1] = _M_SI_(setzero)();
+	pdata[2] = _M_SI_(setzero)();
+	pdata[3] = _M_SI_(setzero)();
+
+	tr_lo[0] = _M_SI_(setzero)();
+	tr_lo[1] = _M_SI_(setzero)();
+
+	tr_hi[0] = _M_SI_(setzero)();
+	tr_hi[1] = _M_SI_(setzero)();
+}
+
 /*
  * Perform search for up to (2 * _N_) flows in parallel.
  * Use two sets of metadata, each serves _N_ flows max.
@@ -313,6 +335,8 @@ _F_(search_trie)(struct acl_flow_avx512 *flow)
 	uint32_t fm[2];
 	_T_simd di[2], idx[2], in[2], pdata[4], tr_lo[2], tr_hi[2];
 
+	_F_(reset_flow_vars)(di, idx, pdata, tr_lo, tr_hi);
+
 	/* first 1B load */
 	_F_(start_flow)(flow, _SIMD_MASK_BIT_, _SIMD_MASK_MAX_,
 			&pdata[0], &idx[0], &di[0]);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:56.955338300 +0800
+++ 0010-acl-fix-build-with-GCC-11.patch	2021-06-12 06:53:56.010000000 +0800
@@ -1 +1 @@
-From 8e2dd74f0afd3ef3358f1cca05afb20bda670207 Mon Sep 17 00:00:00 2001
+From a5fd2098d6e839c2266f3f80279e1e6f3164a6a1 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 8e2dd74f0afd3ef3358f1cca05afb20bda670207 ]
@@ -34 +36,0 @@
-Cc: stable@dpdk.org
@@ -39 +41 @@
- lib/acl/acl_run_avx512_common.h | 24 ++++++++++++++++++++++++
+ lib/librte_acl/acl_run_avx512_common.h | 24 ++++++++++++++++++++++++
@@ -42 +44 @@
-diff --git a/lib/acl/acl_run_avx512_common.h b/lib/acl/acl_run_avx512_common.h
+diff --git a/lib/librte_acl/acl_run_avx512_common.h b/lib/librte_acl/acl_run_avx512_common.h
@@ -44,2 +46,2 @@
---- a/lib/acl/acl_run_avx512_common.h
-+++ b/lib/acl/acl_run_avx512_common.h
+--- a/lib/librte_acl/acl_run_avx512_common.h
++++ b/lib/librte_acl/acl_run_avx512_common.h

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

* [dpdk-stable] patch 'bpf: fix JSLT validation' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (8 preceding siblings ...)
  2021-06-11 23:01     ` [dpdk-stable] patch 'acl: fix build with GCC 11' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'power: save original ACPI governor always' " Xueming Li
                       ` (167 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Hongbo Zheng; +Cc: Luca Boccassi, Min Hu, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2c6016c807a7f54fba1d76ad4789a6cf381d618b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2c6016c807a7f54fba1d76ad4789a6cf381d618b Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3@huawei.com>
Date: Thu, 22 Apr 2021 15:30:01 +0800
Subject: [PATCH] bpf: fix JSLT validation
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit cdcee2ec9b81457f9059c3f3a007e69190672634 ]

In function 'eval_jcc', judgment 'op == EBPF_JLT' occurs
twice, as a result, the corresponding second statement
cannot be accessed.

This patch fix this problem.

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

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_bpf/bpf_validate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_bpf/bpf_validate.c b/lib/librte_bpf/bpf_validate.c
index 9214f15038..7b1291b382 100644
--- a/lib/librte_bpf/bpf_validate.c
+++ b/lib/librte_bpf/bpf_validate.c
@@ -1115,7 +1115,7 @@ eval_jcc(struct bpf_verifier *bvf, const struct ebpf_insn *ins)
 		eval_jsgt_jsle(trd, trs, frd, frs);
 	else if (op == EBPF_JSLE)
 		eval_jsgt_jsle(frd, frs, trd, trs);
-	else if (op == EBPF_JLT)
+	else if (op == EBPF_JSLT)
 		eval_jslt_jsge(trd, trs, frd, frs);
 	else if (op == EBPF_JSGE)
 		eval_jslt_jsge(frd, frs, trd, trs);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:56.975795600 +0800
+++ 0011-bpf-fix-JSLT-validation.patch	2021-06-12 06:53:56.020000000 +0800
@@ -1 +1 @@
-From cdcee2ec9b81457f9059c3f3a007e69190672634 Mon Sep 17 00:00:00 2001
+From 2c6016c807a7f54fba1d76ad4789a6cf381d618b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit cdcee2ec9b81457f9059c3f3a007e69190672634 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
- lib/bpf/bpf_validate.c | 2 +-
+ lib/librte_bpf/bpf_validate.c | 2 +-
@@ -22 +24 @@
-diff --git a/lib/bpf/bpf_validate.c b/lib/bpf/bpf_validate.c
+diff --git a/lib/librte_bpf/bpf_validate.c b/lib/librte_bpf/bpf_validate.c
@@ -24,2 +26,2 @@
---- a/lib/bpf/bpf_validate.c
-+++ b/lib/bpf/bpf_validate.c
+--- a/lib/librte_bpf/bpf_validate.c
++++ b/lib/librte_bpf/bpf_validate.c

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

* [dpdk-stable] patch 'power: save original ACPI governor always' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (9 preceding siblings ...)
  2021-06-11 23:01     ` [dpdk-stable] patch 'bpf: fix JSLT validation' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'doc: fix multiport syntax in nfp guide' " Xueming Li
                       ` (166 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Luca Boccassi, Reshma Pattan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/7abfd667daede27f826a336876d9ba83d85c1257

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 7abfd667daede27f826a336876d9ba83d85c1257 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Fri, 23 Apr 2021 11:01:56 +0000
Subject: [PATCH] power: save original ACPI governor always
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 7f15f0fbed656a8e18006bd8451e2059571b9447 ]

Currently, when we set the acpi governor to "userspace", we check if
it is already set to this value, and if it is, we skip setting it.

However, we never save this value anywhere, so that next time we come
back and request the governor to be set to its original value, the
original value is empty.

Fix it by saving the original pstate governor first. While we're at it,
replace `strlcpy` with `rte_strscpy`.

Fixes: 445c6528b55f ("power: common interface for guest and host")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
---
 lib/librte_power/power_acpi_cpufreq.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/librte_power/power_acpi_cpufreq.c b/lib/librte_power/power_acpi_cpufreq.c
index 84a9d75207..d028a9947f 100644
--- a/lib/librte_power/power_acpi_cpufreq.c
+++ b/lib/librte_power/power_acpi_cpufreq.c
@@ -152,6 +152,9 @@ power_set_governor_userspace(struct rte_power_info *pi)
 	/* Strip off terminating '\n' */
 	strtok(buf, "\n");
 
+	/* Save the original governor */
+	rte_strscpy(pi->governor_ori, buf, sizeof(pi->governor_ori));
+
 	/* Check if current governor is userspace */
 	if (strncmp(buf, POWER_GOVERNOR_USERSPACE,
 			sizeof(POWER_GOVERNOR_USERSPACE)) == 0) {
@@ -160,8 +163,6 @@ power_set_governor_userspace(struct rte_power_info *pi)
 				"already userspace\n", pi->lcore_id);
 		goto out;
 	}
-	/* Save the original governor */
-	strlcpy(pi->governor_ori, buf, sizeof(pi->governor_ori));
 
 	/* Write 'userspace' to the governor */
 	val = fseek(f, 0, SEEK_SET);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.001743200 +0800
+++ 0012-power-save-original-ACPI-governor-always.patch	2021-06-12 06:53:56.020000000 +0800
@@ -1 +1 @@
-From 7f15f0fbed656a8e18006bd8451e2059571b9447 Mon Sep 17 00:00:00 2001
+From 7abfd667daede27f826a336876d9ba83d85c1257 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 7f15f0fbed656a8e18006bd8451e2059571b9447 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
- lib/power/power_acpi_cpufreq.c | 5 +++--
+ lib/librte_power/power_acpi_cpufreq.c | 5 +++--
@@ -25 +27 @@
-diff --git a/lib/power/power_acpi_cpufreq.c b/lib/power/power_acpi_cpufreq.c
+diff --git a/lib/librte_power/power_acpi_cpufreq.c b/lib/librte_power/power_acpi_cpufreq.c
@@ -27,2 +29,2 @@
---- a/lib/power/power_acpi_cpufreq.c
-+++ b/lib/power/power_acpi_cpufreq.c
+--- a/lib/librte_power/power_acpi_cpufreq.c
++++ b/lib/librte_power/power_acpi_cpufreq.c

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

* [dpdk-stable] patch 'doc: fix multiport syntax in nfp guide' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (10 preceding siblings ...)
  2021-06-11 23:01     ` [dpdk-stable] patch 'power: save original ACPI governor always' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'net/kni: check init result' " Xueming Li
                       ` (165 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Chaoyong He; +Cc: Luca Boccassi, Heinrich Kuhn, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/bfaab1571e54c4028a3f8ef3e98d18209b59aaaf

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bfaab1571e54c4028a3f8ef3e98d18209b59aaaf Mon Sep 17 00:00:00 2001
From: Chaoyong He <chaoyong.he@corigine.com>
Date: Thu, 25 Feb 2021 13:46:22 +0200
Subject: [PATCH] doc: fix multiport syntax in nfp guide
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 8202309f9f76b46b1c2e219263a072fe73d21321 ]

Fix up the suffix of the PCI ID to be consistent with the code.

Fixes: 979f2bae0714 ("doc: improve multiport PF in nfp guide")

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
---
 doc/guides/nics/nfp.rst | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/guides/nics/nfp.rst b/doc/guides/nics/nfp.rst
index fef99973b6..bf8be723b0 100644
--- a/doc/guides/nics/nfp.rst
+++ b/doc/guides/nics/nfp.rst
@@ -117,15 +117,15 @@ 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
+suffix added to the PCI ID: wwww:xx:yy.z_portn. 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
+      0000:03:00.0_port0
+      0000:03:00.0_port1
+      0000:03:00.0_port2
+      0000:03:00.0_port3
 
    .. Note::
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.022729800 +0800
+++ 0013-doc-fix-multiport-syntax-in-nfp-guide.patch	2021-06-12 06:53:56.020000000 +0800
@@ -1 +1 @@
-From 8202309f9f76b46b1c2e219263a072fe73d21321 Mon Sep 17 00:00:00 2001
+From bfaab1571e54c4028a3f8ef3e98d18209b59aaaf Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 8202309f9f76b46b1c2e219263a072fe73d21321 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/kni: check init result' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (11 preceding siblings ...)
  2021-06-11 23:01     ` [dpdk-stable] patch 'doc: fix multiport syntax in nfp guide' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'drivers/net: fix FW version query' " Xueming Li
                       ` (164 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b65e812dd26f829c06fb6cc713dee9c351f53a50

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b65e812dd26f829c06fb6cc713dee9c351f53a50 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 21 Apr 2021 10:14:18 +0800
Subject: [PATCH] net/kni: check init result
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 7fa949fd1122b2e529c538489e2287736f1540e3 ]

This patch adds checking for rte_kni_init() result.

Fixes: 75e2bc54c018 ("net/kni: add KNI PMD")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/kni/rte_eth_kni.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index 1696787a9b..aae6dcb54e 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -406,8 +406,13 @@ eth_kni_create(struct rte_vdev_device *vdev,
 static int
 kni_init(void)
 {
-	if (is_kni_initialized == 0)
-		rte_kni_init(MAX_KNI_PORTS);
+	int ret;
+
+	if (is_kni_initialized == 0) {
+		ret = rte_kni_init(MAX_KNI_PORTS);
+		if (ret < 0)
+			return ret;
+	}
 
 	is_kni_initialized++;
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.043703400 +0800
+++ 0014-net-kni-check-init-result.patch	2021-06-12 06:53:56.020000000 +0800
@@ -1 +1 @@
-From 7fa949fd1122b2e529c538489e2287736f1540e3 Mon Sep 17 00:00:00 2001
+From b65e812dd26f829c06fb6cc713dee9c351f53a50 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 7fa949fd1122b2e529c538489e2287736f1540e3 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 9ce74e549b..4d2a42ddab 100644
+index 1696787a9b..aae6dcb54e 100644

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

* [dpdk-stable] patch 'drivers/net: fix FW version query' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (12 preceding siblings ...)
  2021-06-11 23:01     ` [dpdk-stable] patch 'net/kni: check init result' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'net/hns3: fix mailbox error message' " Xueming Li
                       ` (163 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Luca Boccassi, Ajit Khaparde, Andrew Rybchenko, Haiyue Wang,
	Rasesh Mody, Jiawen Wu, Beilei Xing, Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3ab9cfbc6a67ae2c4b54cc4a09c0327638321f5f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3ab9cfbc6a67ae2c4b54cc4a09c0327638321f5f Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Wed, 21 Apr 2021 17:20:57 +0100
Subject: [PATCH] drivers/net: fix FW version query
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit d345d6c9575c337189a755c8692be4dd3e1ed708 ]

Fixes a few different things:
* Remove 'fw_version' NULL checks, it is allowed if the 'fw_size' is
  zero, 'fw_version' being NULL but 'fw_size' not zero condition checked
  in ethdev layer
* Be sure required buffer size is returned if provided one is not big
  enough, instead of returning success (0)
* Document in doxygen comment the '-EINVAL' is a valid return type
* Take into account that 'snprintf' can return negative value
* Cast length to 'size_t' to compare it with 'fw_size'

Fixes: bb42aa9ffe4e ("net/atlantic: configure device start/stop")
Fixes: ff70acdf4299 ("net/axgbe: support reading FW version")
Fixes: e2652b0a20a0 ("net/bnxt: support get FW version")
Fixes: cf0fab1d2ca5 ("net/dpaa: support firmware version get API")
Fixes: 748eccb97cdc ("net/dpaa2: add support for firmware version get")
Fixes: b883c0644a24 ("net/e1000: add firmware version get")
Fixes: 293430677e9c ("net/enic: add handler to return firmware version")
Fixes: 1f5ca0b460cd ("net/hns3: support some device operations")
Fixes: bd5b86732bc7 ("net/hns3: modify format for firmware version")
Fixes: ed0dfdd0e976 ("net/i40e: add firmware version get")
Fixes: e31cb9a36298 ("net/ice: support FW version getting")
Fixes: 4f09bc55ac3d ("net/igc: implement device base operations")
Fixes: eec10fb0ce6b ("net/ionic: support FW version")
Fixes: 8b0b56574269 ("net/ixgbe: add firmware version get")
Fixes: 4d9f5b8adc02 ("net/octeontx2: add FW version get operation")
Fixes: f97b56f9f12e ("net/qede: support FW version query")
Fixes: 83fef46a22b2 ("net/sfc: add callback to retrieve FW version")
Fixes: bc84ac0fadef ("net/txgbe: support getting FW version")
Fixes: 21913471202f ("ethdev: add firmware version get")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
Acked-by: Jiawen Wu <jiawenwu@trustnetic.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/atlantic/atl_ethdev.c       |  7 ++++---
 drivers/net/bnxt/bnxt_ethdev.c          |  4 +++-
 drivers/net/dpaa/dpaa_ethdev.c          |  6 ++++--
 drivers/net/dpaa2/dpaa2_ethdev.c        |  4 +++-
 drivers/net/e1000/igb_ethdev.c          |  4 +++-
 drivers/net/enic/enic_ethdev.c          | 15 ++++++++++-----
 drivers/net/hns3/hns3_ethdev.c          |  5 ++++-
 drivers/net/hns3/hns3_ethdev_vf.c       |  5 ++++-
 drivers/net/i40e/i40e_ethdev.c          |  4 +++-
 drivers/net/ice/ice_ethdev.c            |  4 +++-
 drivers/net/igc/igc_ethdev.c            |  4 +++-
 drivers/net/ionic/ionic_ethdev.c        | 15 +++++++++------
 drivers/net/ixgbe/ixgbe_ethdev.c        |  4 +++-
 drivers/net/octeontx2/otx2_ethdev_ops.c |  2 +-
 drivers/net/qede/qede_ethdev.c          |  3 ---
 drivers/net/sfc/sfc_ethdev.c            |  8 --------
 drivers/net/txgbe/txgbe_ethdev.c        |  4 +++-
 17 files changed, 60 insertions(+), 38 deletions(-)

diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index b0716773ad..02935d5fd1 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -1073,7 +1073,7 @@ atl_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
 {
 	struct aq_hw_s *hw = ATL_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	uint32_t fw_ver = 0;
-	unsigned int ret = 0;
+	int ret = 0;
 
 	ret = hw_atl_utils_get_fw_version(hw, &fw_ver);
 	if (ret)
@@ -1081,10 +1081,11 @@ atl_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
 
 	ret = snprintf(fw_version, fw_size, "%u.%u.%u", fw_ver >> 24,
 		       (fw_ver >> 16) & 0xFFU, fw_ver & 0xFFFFU);
+	if (ret < 0)
+		return -EINVAL;
 
 	ret += 1; /* add string null-terminator */
-
-	if (fw_size < ret)
+	if (fw_size < (size_t)ret)
 		return ret;
 
 	return 0;
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 46dabe8c8f..c2344dabc0 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2763,9 +2763,11 @@ bnxt_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
 
 	ret = snprintf(fw_version, fw_size, "%d.%d.%d.%d",
 			fw_major, fw_minor, fw_updt, fw_rsvd);
+	if (ret < 0)
+		return -EINVAL;
 
 	ret += 1; /* add the size of '\0' */
-	if (fw_size < (uint32_t)ret)
+	if (fw_size < (size_t)ret)
 		return ret;
 	else
 		return 0;
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 79e39451b3..824eb073ad 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -538,9 +538,11 @@ dpaa_fw_version_get(struct rte_eth_dev *dev __rte_unused,
 
 	ret = snprintf(fw_version, fw_size, "SVR:%x-fman-v%x",
 		       svr_ver, fman_ip_rev);
-	ret += 1; /* add the size of '\0' */
+	if (ret < 0)
+		return -EINVAL;
 
-	if (fw_size < (uint32_t)ret)
+	ret += 1; /* add the size of '\0' */
+	if (fw_size < (size_t)ret)
 		return ret;
 	else
 		return 0;
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 5c1a12b841..49cbb09947 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -225,9 +225,11 @@ dpaa2_fw_version_get(struct rte_eth_dev *dev,
 		       mc_ver_info.major,
 		       mc_ver_info.minor,
 		       mc_ver_info.revision);
+	if (ret < 0)
+		return -EINVAL;
 
 	ret += 1; /* add the size of '\0' */
-	if (fw_size < (uint32_t)ret)
+	if (fw_size < (size_t)ret)
 		return ret;
 	else
 		return 0;
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 31927c5464..681842f5ae 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -2161,9 +2161,11 @@ eth_igb_fw_version_get(struct rte_eth_dev *dev, char *fw_version,
 		}
 		break;
 	}
+	if (ret < 0)
+		return -EINVAL;
 
 	ret += 1; /* add the size of '\0' */
-	if (fw_size < (u32)ret)
+	if (fw_size < (size_t)ret)
 		return ret;
 	else
 		return 0;
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index d041a6bee9..327b62307b 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -1061,16 +1061,21 @@ static int enicpmd_dev_fw_version_get(struct rte_eth_dev *eth_dev,
 	int ret;
 
 	ENICPMD_FUNC_TRACE();
-	if (fw_version == NULL || fw_size <= 0)
-		return -EINVAL;
+
 	enic = pmd_priv(eth_dev);
 	ret = vnic_dev_fw_info(enic->vdev, &info);
 	if (ret)
 		return ret;
-	snprintf(fw_version, fw_size, "%s %s",
+	ret = snprintf(fw_version, fw_size, "%s %s",
 		 info->fw_version, info->fw_build);
-	fw_version[fw_size - 1] = '\0';
-	return 0;
+	if (ret < 0)
+		return -EINVAL;
+
+	ret += 1; /* add the size of '\0' */
+	if (fw_size < (size_t)ret)
+		return ret;
+	else
+		return 0;
 }
 
 static const struct eth_dev_ops enicpmd_eth_dev_ops = {
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 268a73bf73..6e1d7891e9 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2647,8 +2647,11 @@ hns3_fw_version_get(struct rte_eth_dev *eth_dev, char *fw_version,
 				      HNS3_FW_VERSION_BYTE1_S),
 		       hns3_get_field(version, HNS3_FW_VERSION_BYTE0_M,
 				      HNS3_FW_VERSION_BYTE0_S));
+	if (ret < 0)
+		return -EINVAL;
+
 	ret += 1; /* add the size of '\0' */
-	if (fw_size < (uint32_t)ret)
+	if (fw_size < (size_t)ret)
 		return ret;
 	else
 		return 0;
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index c8783827a3..d2162158e6 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -2046,8 +2046,11 @@ hns3vf_fw_version_get(struct rte_eth_dev *eth_dev, char *fw_version,
 				      HNS3_FW_VERSION_BYTE1_S),
 		       hns3_get_field(version, HNS3_FW_VERSION_BYTE0_M,
 				      HNS3_FW_VERSION_BYTE0_S));
+	if (ret < 0)
+		return -EINVAL;
+
 	ret += 1; /* add the size of '\0' */
-	if (fw_size < (uint32_t)ret)
+	if (fw_size < (size_t)ret)
 		return ret;
 	else
 		return 0;
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 104f121436..fb5b8a1283 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3743,9 +3743,11 @@ i40e_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
 		 ((hw->nvm.version >> 4) & 0xff),
 		 (hw->nvm.version & 0xf), hw->nvm.eetrack,
 		 ver, build, patch);
+	if (ret < 0)
+		return -EINVAL;
 
 	ret += 1; /* add the size of '\0' */
-	if (fw_size < (u32)ret)
+	if (fw_size < (size_t)ret)
 		return ret;
 	else
 		return 0;
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index f30199fc23..88efe90769 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -4579,10 +4579,12 @@ ice_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
 			hw->flash.nvm.minor,
 			hw->flash.nvm.eetrack,
 			ver, build, patch);
+	if (ret < 0)
+		return -EINVAL;
 
 	/* add the size of '\0' */
 	ret += 1;
-	if (fw_size < (u32)ret)
+	if (fw_size < (size_t)ret)
 		return ret;
 	else
 		return 0;
diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
index a1152f9deb..44b35d07ae 100644
--- a/drivers/net/igc/igc_ethdev.c
+++ b/drivers/net/igc/igc_ethdev.c
@@ -1476,9 +1476,11 @@ eth_igc_fw_version_get(struct rte_eth_dev *dev, char *fw_version,
 				 fw.eep_build);
 		}
 	}
+	if (ret < 0)
+		return -EINVAL;
 
 	ret += 1; /* add the size of '\0' */
-	if (fw_size < (u32)ret)
+	if (fw_size < (size_t)ret)
 		return ret;
 	else
 		return 0;
diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c
index fe778043eb..8cf39f4742 100644
--- a/drivers/net/ionic/ionic_ethdev.c
+++ b/drivers/net/ionic/ionic_ethdev.c
@@ -218,15 +218,18 @@ ionic_dev_fw_version_get(struct rte_eth_dev *eth_dev,
 {
 	struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
 	struct ionic_adapter *adapter = lif->adapter;
+	int ret;
 
-	if (fw_version == NULL || fw_size <= 0)
-		return -EINVAL;
-
-	snprintf(fw_version, fw_size, "%s",
+	ret = snprintf(fw_version, fw_size, "%s",
 		 adapter->fw_version);
-	fw_version[fw_size - 1] = '\0';
+	if (ret < 0)
+		return -EINVAL;
 
-	return 0;
+	ret += 1; /* add the size of '\0' */
+	if (fw_size < (size_t)ret)
+		return ret;
+	else
+		return 0;
 }
 
 /*
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 718a665ca0..61bcf80b47 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -3808,9 +3808,11 @@ ixgbe_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
 
 	etrack_id = (eeprom_verh << 16) | eeprom_verl;
 	ret = snprintf(fw_version, fw_size, "0x%08x", etrack_id);
+	if (ret < 0)
+		return -EINVAL;
 
 	ret += 1; /* add the size of '\0' */
-	if (fw_size < (u32)ret)
+	if (fw_size < (size_t)ret)
 		return ret;
 	else
 		return 0;
diff --git a/drivers/net/octeontx2/otx2_ethdev_ops.c b/drivers/net/octeontx2/otx2_ethdev_ops.c
index 919754130c..f586e9ef59 100644
--- a/drivers/net/octeontx2/otx2_ethdev_ops.c
+++ b/drivers/net/octeontx2/otx2_ethdev_ops.c
@@ -453,7 +453,7 @@ otx2_nix_fw_version_get(struct rte_eth_dev *eth_dev, char *fw_version,
 	rc = strlcpy(fw_version, (char *)dev->mkex_pfl_name, rc);
 
 	rc += 1; /* Add the size of '\0' */
-	if (fw_size < (uint32_t)rc)
+	if (fw_size < (size_t)rc)
 		return rc;
 
 	return 0;
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index bfd38a9772..293022c2e7 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -237,9 +237,6 @@ qede_fw_version_get(struct rte_eth_dev *dev, char *fw_ver, size_t fw_size)
 	static char ver_str[QEDE_PMD_DRV_VER_STR_SIZE];
 	size_t size;
 
-	if (fw_ver == NULL)
-		return 0;
-
 	if (IS_PF(edev))
 		snprintf(ver_str, QEDE_PMD_DRV_VER_STR_SIZE, "%s",
 			 QEDE_PMD_FW_VERSION);
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index a002e2c037..cde9f2423b 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -46,14 +46,6 @@ sfc_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
 	int ret;
 	int rc;
 
-	/*
-	 * Return value of the callback is likely supposed to be
-	 * equal to or greater than 0, nevertheless, if an error
-	 * occurs, it will be desirable to pass it to the caller
-	 */
-	if ((fw_version == NULL) || (fw_size == 0))
-		return -EINVAL;
-
 	rc = efx_nic_get_fw_version(sa->nic, &enfi);
 	if (rc != 0)
 		return -rc;
diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 63bae511ef..2e539ca02e 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -2313,9 +2313,11 @@ txgbe_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
 
 	etrack_id = (eeprom_verh << 16) | eeprom_verl;
 	ret = snprintf(fw_version, fw_size, "0x%08x", etrack_id);
+	if (ret < 0)
+		return -EINVAL;
 
 	ret += 1; /* add the size of '\0' */
-	if (fw_size < (u32)ret)
+	if (fw_size < (size_t)ret)
 		return ret;
 	else
 		return 0;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.066899300 +0800
+++ 0015-drivers-net-fix-FW-version-query.patch	2021-06-12 06:53:56.090000000 +0800
@@ -1 +1 @@
-From d345d6c9575c337189a755c8692be4dd3e1ed708 Mon Sep 17 00:00:00 2001
+From 3ab9cfbc6a67ae2c4b54cc4a09c0327638321f5f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit d345d6c9575c337189a755c8692be4dd3e1ed708 ]
@@ -35 +37,0 @@
-Cc: stable@dpdk.org
@@ -47 +48,0 @@
- drivers/net/axgbe/axgbe_rxtx.c          |  4 ----
@@ -64 +65 @@
- 18 files changed, 60 insertions(+), 42 deletions(-)
+ 17 files changed, 60 insertions(+), 38 deletions(-)
@@ -67 +68 @@
-index 473f6209f6..ce7f814f25 100644
+index b0716773ad..02935d5fd1 100644
@@ -93,22 +93,0 @@
-diff --git a/drivers/net/axgbe/axgbe_rxtx.c b/drivers/net/axgbe/axgbe_rxtx.c
-index e34bb6d448..33f709a6bb 100644
---- a/drivers/net/axgbe/axgbe_rxtx.c
-+++ b/drivers/net/axgbe/axgbe_rxtx.c
-@@ -623,9 +623,6 @@ int axgbe_dev_fw_version_get(struct rte_eth_dev *eth_dev,
- 	pdata = (struct axgbe_port *)eth_dev->data->dev_private;
- 	hw_feat = &pdata->hw_feat;
- 
--	if (fw_version == NULL)
--		return -EINVAL;
--
- 	ret = snprintf(fw_version, fw_size, "%d.%d.%d",
- 			AXGMAC_GET_BITS(hw_feat->version, MAC_VR, USERVER),
- 			AXGMAC_GET_BITS(hw_feat->version, MAC_VR, DEVID),
-@@ -634,7 +631,6 @@ int axgbe_dev_fw_version_get(struct rte_eth_dev *eth_dev,
- 		return -EINVAL;
- 
- 	ret += 1; /* add the size of '\0' */
--
- 	if (fw_size < (size_t)ret)
- 		return ret;
- 	else
@@ -116 +95 @@
-index f5d2dc8590..dba5b9f94d 100644
+index 46dabe8c8f..c2344dabc0 100644
@@ -119 +98 @@
-@@ -2794,9 +2794,11 @@ bnxt_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
+@@ -2763,9 +2763,11 @@ bnxt_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
@@ -133 +112 @@
-index 176943a8ea..57ee660c5e 100644
+index 79e39451b3..824eb073ad 100644
@@ -136 +115 @@
-@@ -532,9 +532,11 @@ dpaa_fw_version_get(struct rte_eth_dev *dev __rte_unused,
+@@ -538,9 +538,11 @@ dpaa_fw_version_get(struct rte_eth_dev *dev __rte_unused,
@@ -151 +130 @@
-index 9011dcfc12..95e8d9abe8 100644
+index 5c1a12b841..49cbb09947 100644
@@ -154 +133 @@
-@@ -226,9 +226,11 @@ dpaa2_fw_version_get(struct rte_eth_dev *dev,
+@@ -225,9 +225,11 @@ dpaa2_fw_version_get(struct rte_eth_dev *dev,
@@ -168 +147 @@
-index 3fdffe3294..10ee0f3341 100644
+index 31927c5464..681842f5ae 100644
@@ -171 +150 @@
-@@ -2159,9 +2159,11 @@ eth_igb_fw_version_get(struct rte_eth_dev *dev, char *fw_version,
+@@ -2161,9 +2161,11 @@ eth_igb_fw_version_get(struct rte_eth_dev *dev, char *fw_version,
@@ -185 +164 @@
-index d91c2cdc8c..e1a393b847 100644
+index d041a6bee9..327b62307b 100644
@@ -188 +167 @@
-@@ -1050,16 +1050,21 @@ static int enicpmd_dev_fw_version_get(struct rte_eth_dev *eth_dev,
+@@ -1061,16 +1061,21 @@ static int enicpmd_dev_fw_version_get(struct rte_eth_dev *eth_dev,
@@ -216 +195 @@
-index 60267e1ec1..bd0699af58 100644
+index 268a73bf73..6e1d7891e9 100644
@@ -219 +198 @@
-@@ -2828,8 +2828,11 @@ hns3_fw_version_get(struct rte_eth_dev *eth_dev, char *fw_version,
+@@ -2647,8 +2647,11 @@ hns3_fw_version_get(struct rte_eth_dev *eth_dev, char *fw_version,
@@ -233 +212 @@
-index 7a7a6bfa7c..06a26fb9be 100644
+index c8783827a3..d2162158e6 100644
@@ -236 +215 @@
-@@ -2181,8 +2181,11 @@ hns3vf_fw_version_get(struct rte_eth_dev *eth_dev, char *fw_version,
+@@ -2046,8 +2046,11 @@ hns3vf_fw_version_get(struct rte_eth_dev *eth_dev, char *fw_version,
@@ -250 +229 @@
-index e6206a7e51..66d23d698e 100644
+index 104f121436..fb5b8a1283 100644
@@ -253 +232 @@
-@@ -3687,9 +3687,11 @@ i40e_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
+@@ -3743,9 +3743,11 @@ i40e_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
@@ -267 +246 @@
-index da9e85bd7c..c37a2e09ce 100644
+index f30199fc23..88efe90769 100644
@@ -270 +249 @@
-@@ -4646,10 +4646,12 @@ ice_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
+@@ -4579,10 +4579,12 @@ ice_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
@@ -285 +264 @@
-index 31c99dca09..b1c58fb3de 100644
+index a1152f9deb..44b35d07ae 100644
@@ -302 +281 @@
-index cffe899c07..5ec474dbf5 100644
+index fe778043eb..8cf39f4742 100644
@@ -305 +284 @@
-@@ -215,15 +215,18 @@ ionic_dev_fw_version_get(struct rte_eth_dev *eth_dev,
+@@ -218,15 +218,18 @@ ionic_dev_fw_version_get(struct rte_eth_dev *eth_dev,
@@ -331 +310 @@
-index ff65145f55..a5c191fe1b 100644
+index 718a665ca0..61bcf80b47 100644
@@ -334 +313 @@
-@@ -3814,9 +3814,11 @@ ixgbe_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
+@@ -3808,9 +3808,11 @@ ixgbe_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
@@ -348 +327 @@
-index 6f0cdc5854..5a4501208e 100644
+index 919754130c..f586e9ef59 100644
@@ -361 +340 @@
-index 057a7b00e2..c2c8de8675 100644
+index bfd38a9772..293022c2e7 100644
@@ -375 +354 @@
-index 52ba7b67b0..c50ecea0b9 100644
+index a002e2c037..cde9f2423b 100644
@@ -394 +373 @@
-index 97796f040b..8dbe3da5c2 100644
+index 63bae511ef..2e539ca02e 100644
@@ -397,2 +376 @@
-@@ -2582,9 +2582,11 @@ txgbe_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
- 	hw->phy.get_fw_version(hw, &etrack_id);
+@@ -2313,9 +2313,11 @@ txgbe_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
@@ -399,0 +378 @@
+ 	etrack_id = (eeprom_verh << 16) | eeprom_verl;

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

* [dpdk-stable] patch 'net/hns3: fix mailbox error message' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (13 preceding siblings ...)
  2021-06-11 23:01     ` [dpdk-stable] patch 'drivers/net: fix FW version query' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'net/hns3: fix processing link status message on PF' " Xueming Li
                       ` (162 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b47af28ffd12b3decba7a56a4c3878ddbf48fcec

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b47af28ffd12b3decba7a56a4c3878ddbf48fcec Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 22 Apr 2021 09:55:49 +0800
Subject: [PATCH] net/hns3: fix mailbox error message
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 871aa63542cedab7b920f2dd54fc3dc8ef82f3ca ]

The hns3_dev_handle_mbx_msg() could be called under both PF and VF,
but the error messages show VF.

Fixes: 109e4dd1bd7a ("net/hns3: get link state change through mailbox")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_mbx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
index c294c2248d..1c4d888b65 100644
--- a/drivers/net/hns3/hns3_mbx.c
+++ b/drivers/net/hns3/hns3_mbx.c
@@ -539,8 +539,7 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
 			hns3_handle_promisc_info(hw, req->msg[1]);
 			break;
 		default:
-			hns3_err(hw,
-				 "VF received unsupported(%u) mbx msg from PF",
+			hns3_err(hw, "received unsupported(%u) mbx msg",
 				 req->msg[0]);
 			break;
 		}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.125546800 +0800
+++ 0016-net-hns3-fix-mailbox-error-message.patch	2021-06-12 06:53:56.090000000 +0800
@@ -1 +1 @@
-From 871aa63542cedab7b920f2dd54fc3dc8ef82f3ca Mon Sep 17 00:00:00 2001
+From b47af28ffd12b3decba7a56a4c3878ddbf48fcec Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 871aa63542cedab7b920f2dd54fc3dc8ef82f3ca ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index eb202dd60e..3b35c0277f 100644
+index c294c2248d..1c4d888b65 100644
@@ -22 +24 @@
-@@ -528,8 +528,7 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
+@@ -539,8 +539,7 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)

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

* [dpdk-stable] patch 'net/hns3: fix processing link status message on PF' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (14 preceding siblings ...)
  2021-06-11 23:01     ` [dpdk-stable] patch 'net/hns3: fix mailbox error message' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'net/hns3: remove unused mailbox macro and struct' " Xueming Li
                       ` (161 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b012ce6634a5e8f855eb47fdc1b13efc950282a1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b012ce6634a5e8f855eb47fdc1b13efc950282a1 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 22 Apr 2021 09:55:50 +0800
Subject: [PATCH] net/hns3: fix processing link status message on PF
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 4a2f6ab6fbc4be504e155a48665cc0d854ef36b6 ]

The opcode of the link status notification message reported by the
firmware is zero, it will be filtered out because driver treats it as
already processed message. As a result, the PF can't update the link
status in a timely manner.

Because only VF can set opcode to zero when processing mailbox message,
we add a judgment to make sure the PF messages will not be filtered out.

Fixes: dbbbad23e380 ("net/hns3: fix VF handling LSC event in secondary process")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_mbx.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
index 1c4d888b65..2ca0dffcf9 100644
--- a/drivers/net/hns3/hns3_mbx.c
+++ b/drivers/net/hns3/hns3_mbx.c
@@ -446,16 +446,19 @@ scan_next:
 void
 hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
 {
+	struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw);
 	struct hns3_cmq_ring *crq = &hw->cmq.crq;
 	struct hns3_mbx_pf_to_vf_cmd *req;
 	struct hns3_cmd_desc *desc;
 	uint16_t *msg_q;
+	bool handle_out;
 	uint8_t opcode;
 	uint16_t flag;
 	rte_spinlock_lock(&hw->cmq.crq.lock);
 
-	if (rte_eal_process_type() != RTE_PROC_PRIMARY ||
-	    !rte_thread_is_intr()) {
+	handle_out = (rte_eal_process_type() != RTE_PROC_PRIMARY ||
+		      !rte_thread_is_intr()) && hns->is_vf;
+	if (handle_out) {
 		/*
 		 * Currently, any threads in the primary and secondary processes
 		 * could send mailbox sync request, so it will need to process
@@ -499,7 +502,8 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
 			continue;
 		}
 
-		if (desc->opcode == 0) {
+		handle_out = hns->is_vf && desc->opcode == 0;
+		if (handle_out) {
 			/* Message already processed by other thread */
 			crq->desc[crq->next_to_use].flag = 0;
 			hns3_mbx_ring_ptr_move_crq(crq);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.147124000 +0800
+++ 0017-net-hns3-fix-processing-link-status-message-on-PF.patch	2021-06-12 06:53:56.090000000 +0800
@@ -1 +1 @@
-From 4a2f6ab6fbc4be504e155a48665cc0d854ef36b6 Mon Sep 17 00:00:00 2001
+From b012ce6634a5e8f855eb47fdc1b13efc950282a1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 4a2f6ab6fbc4be504e155a48665cc0d854ef36b6 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 3b35c0277f..ba04ac9e90 100644
+index 1c4d888b65..2ca0dffcf9 100644
@@ -27 +29 @@
-@@ -438,16 +438,19 @@ scan_next:
+@@ -446,16 +446,19 @@ scan_next:
@@ -34,0 +37 @@
+ 	uint16_t *msg_q;
@@ -38 +40,0 @@
- 
@@ -49 +51 @@
-@@ -491,7 +494,8 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
+@@ -499,7 +502,8 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)

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

* [dpdk-stable] patch 'net/hns3: remove unused mailbox macro and struct' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (15 preceding siblings ...)
  2021-06-11 23:01     ` [dpdk-stable] patch 'net/hns3: fix processing link status message on PF' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'net/bonding: fix leak on remove' " Xueming Li
                       ` (160 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8abec7f31763ad32e6b779e3242f8f90a0d22f6a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8abec7f31763ad32e6b779e3242f8f90a0d22f6a Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 22 Apr 2021 09:55:52 +0800
Subject: [PATCH] net/hns3: remove unused mailbox macro and struct
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 40cc23b0f0ef0f0fa2ce9a77d4558eadefe1fea5 ]

In hns3_mbx.h, some macro and structure were defined in previous
versions but never used.

Fixes: 463e748964f5 ("net/hns3: support mailbox")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_mbx.h | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h
index e1ca38052a..1e9108a814 100644
--- a/drivers/net/hns3/hns3_mbx.h
+++ b/drivers/net/hns3/hns3_mbx.h
@@ -5,8 +5,6 @@
 #ifndef _HNS3_MBX_H_
 #define _HNS3_MBX_H_
 
-#define HNS3_MBX_VF_MSG_DATA_NUM	16
-
 enum HNS3_MBX_OPCODE {
 	HNS3_MBX_RESET = 0x01,          /* (VF -> PF) assert reset */
 	HNS3_MBX_ASSERTING_RESET,       /* (PF -> VF) PF is asserting reset */
@@ -80,8 +78,6 @@ enum hns3_mbx_link_fail_subcode {
 
 #define HNS3_MBX_MAX_MSG_SIZE	16
 #define HNS3_MBX_MAX_RESP_DATA_SIZE	8
-#define HNS3_MBX_RING_MAP_BASIC_MSG_NUM	3
-#define HNS3_MBX_RING_NODE_VARIABLE_NUM	3
 
 enum {
 	HNS3_MBX_RESP_MATCHING_SCHEME_OF_ORIGINAL = 0,
@@ -147,12 +143,6 @@ struct hns3_vf_bind_vector_msg {
 	struct hns3_ring_chain_param param[HNS3_MBX_MAX_RING_CHAIN_PARAM_NUM];
 };
 
-struct hns3_vf_rst_cmd {
-	uint8_t dest_vfid;
-	uint8_t vf_rst;
-	uint8_t rsv[22];
-};
-
 struct hns3_pf_rst_done_cmd {
 	uint8_t pf_rst_done;
 	uint8_t rsv[23];
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.170711700 +0800
+++ 0018-net-hns3-remove-unused-mailbox-macro-and-struct.patch	2021-06-12 06:53:56.100000000 +0800
@@ -1 +1 @@
-From 40cc23b0f0ef0f0fa2ce9a77d4558eadefe1fea5 Mon Sep 17 00:00:00 2001
+From 8abec7f31763ad32e6b779e3242f8f90a0d22f6a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 40cc23b0f0ef0f0fa2ce9a77d4558eadefe1fea5 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 0e9194dba3..86d32e654b 100644
+index e1ca38052a..1e9108a814 100644

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

* [dpdk-stable] patch 'net/bonding: fix leak on remove' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (16 preceding siblings ...)
  2021-06-11 23:01     ` [dpdk-stable] patch 'net/hns3: remove unused mailbox macro and struct' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'test/kni: fix a comment' " Xueming Li
                       ` (159 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/448c880b6e95911ded654811d755db122b4f1c96

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 448c880b6e95911ded654811d755db122b4f1c96 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Thu, 22 Apr 2021 10:05:02 +0800
Subject: [PATCH] net/bonding: fix leak on remove
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 144dc4739975602eec9f8c5f33d1a1bb7df7fcdb ]

If the bond device was created by vdev mode, the kvlist was not free
when the bond device removed.

Fixes: 8d30fe7fa737 ("bonding: support port hotplug")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 057b1ada54..9bcef952ea 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3459,6 +3459,8 @@ bond_remove(struct rte_vdev_device *dev)
 		ret = bond_ethdev_stop(eth_dev);
 		bond_ethdev_close(eth_dev);
 	}
+	if (internals->kvlist != NULL)
+		rte_kvargs_free(internals->kvlist);
 	rte_eth_dev_release_port(eth_dev);
 
 	return ret;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.191938900 +0800
+++ 0019-net-bonding-fix-leak-on-remove.patch	2021-06-12 06:53:56.100000000 +0800
@@ -1 +1 @@
-From 144dc4739975602eec9f8c5f33d1a1bb7df7fcdb Mon Sep 17 00:00:00 2001
+From 448c880b6e95911ded654811d755db122b4f1c96 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 144dc4739975602eec9f8c5f33d1a1bb7df7fcdb ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 2e9cea5b8e..25b1f771a1 100644
+index 057b1ada54..9bcef952ea 100644
@@ -23 +25 @@
-@@ -3467,6 +3467,8 @@ bond_remove(struct rte_vdev_device *dev)
+@@ -3459,6 +3459,8 @@ bond_remove(struct rte_vdev_device *dev)

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

* [dpdk-stable] patch 'test/kni: fix a comment' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (17 preceding siblings ...)
  2021-06-11 23:01     ` [dpdk-stable] patch 'net/bonding: fix leak on remove' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'test/kni: check init result' " Xueming Li
                       ` (158 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3b949ee57a0164293ef2ebdebd56b3d64dfc5ff0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3b949ee57a0164293ef2ebdebd56b3d64dfc5ff0 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Thu, 22 Apr 2021 11:56:27 +0800
Subject: [PATCH] test/kni: fix a comment
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 71a7e322475c9a1adf7d404a897194a8b9b973ab ]

This patch changed 'subsytem' to 'subsystem'.

Fixes: 0c6bc8ef70ba ("kni: memzone pool for alloc and release")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test/test_kni.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_kni.c b/app/test/test_kni.c
index f53a53eff6..3470005790 100644
--- a/app/test/test_kni.c
+++ b/app/test/test_kni.c
@@ -562,7 +562,7 @@ test_kni(void)
 	}
 	closedir(dir);
 
-	/* Initialize KNI subsytem */
+	/* Initialize KNI subsystem */
 	rte_kni_init(KNI_TEST_MAX_PORTS);
 
 	if (test_kni_allocate_lcores() < 0) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.215481100 +0800
+++ 0020-test-kni-fix-a-comment.patch	2021-06-12 06:53:56.100000000 +0800
@@ -1 +1 @@
-From 71a7e322475c9a1adf7d404a897194a8b9b973ab Mon Sep 17 00:00:00 2001
+From 3b949ee57a0164293ef2ebdebd56b3d64dfc5ff0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 71a7e322475c9a1adf7d404a897194a8b9b973ab ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'test/kni: check init result' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (18 preceding siblings ...)
  2021-06-11 23:01     ` [dpdk-stable] patch 'test/kni: fix a comment' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'app/testpmd: fix max queue number for Tx offloads' " Xueming Li
                       ` (157 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

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

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/eaee68d852780572cd74cfdc5e4707fc482a022f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From eaee68d852780572cd74cfdc5e4707fc482a022f Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Thu, 22 Apr 2021 11:56:29 +0800
Subject: [PATCH] test/kni: check init result
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 381dfcf04717f92cfea68e53aac1979c098d35a4 ]

Return value 'rte_kni_init' of a function is not checked. If
it fails, error handling (logging and return) should be done.

This patch fixed it.

Fixes: 0c6bc8ef70ba ("kni: memzone pool for alloc and release")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test/test_kni.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/app/test/test_kni.c b/app/test/test_kni.c
index 3470005790..96733554b6 100644
--- a/app/test/test_kni.c
+++ b/app/test/test_kni.c
@@ -563,7 +563,11 @@ test_kni(void)
 	closedir(dir);
 
 	/* Initialize KNI subsystem */
-	rte_kni_init(KNI_TEST_MAX_PORTS);
+	ret = rte_kni_init(KNI_TEST_MAX_PORTS);
+	if (ret < 0) {
+		printf("fail to initialize KNI subsystem\n");
+		return -1;
+	}
 
 	if (test_kni_allocate_lcores() < 0) {
 		printf("No enough lcores for kni processing\n");
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.243165300 +0800
+++ 0021-test-kni-check-init-result.patch	2021-06-12 06:53:56.100000000 +0800
@@ -1 +1 @@
-From 381dfcf04717f92cfea68e53aac1979c098d35a4 Mon Sep 17 00:00:00 2001
+From eaee68d852780572cd74cfdc5e4707fc482a022f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 381dfcf04717f92cfea68e53aac1979c098d35a4 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'app/testpmd: fix max queue number for Tx offloads' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (19 preceding siblings ...)
  2021-06-11 23:01     ` [dpdk-stable] patch 'test/kni: check init result' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'net/tap: fix interrupt vector array size' " Xueming Li
                       ` (156 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, Xiaoyun Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6ca567cc48c7ec7413cc4dd9a38bef25aaa7ce4f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6ca567cc48c7ec7413cc4dd9a38bef25aaa7ce4f Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Thu, 22 Apr 2021 15:03:31 +0800
Subject: [PATCH] app/testpmd: fix max queue number for Tx offloads
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 0ca0c473977245f2eea57d60dbd0b575e41a8ceb ]

When txq offload is configured, max rxq is used as the max queue. This
patch fixes it.

Fixes: 74453ac9ef67 ("app/testpmd: fix queue offload configuration")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 app/test-pmd/cmdline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index adaa61f94f..ab9a603dc2 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -4564,7 +4564,7 @@ cmd_config_queue_tx_offloads(struct rte_port *port)
 	int k;
 
 	/* Apply queue tx offloads configuration */
-	for (k = 0; k < port->dev_info.max_rx_queues; k++)
+	for (k = 0; k < port->dev_info.max_tx_queues; k++)
 		port->tx_conf[k].offloads =
 			port->dev_conf.txmode.offloads;
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.265726700 +0800
+++ 0022-app-testpmd-fix-max-queue-number-for-Tx-offloads.patch	2021-06-12 06:53:56.110000000 +0800
@@ -1 +1 @@
-From 0ca0c473977245f2eea57d60dbd0b575e41a8ceb Mon Sep 17 00:00:00 2001
+From 6ca567cc48c7ec7413cc4dd9a38bef25aaa7ce4f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 0ca0c473977245f2eea57d60dbd0b575e41a8ceb ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 12efbc0cab..0ad27dff66 100644
+index adaa61f94f..ab9a603dc2 100644
@@ -23 +25 @@
-@@ -4666,7 +4666,7 @@ cmd_config_queue_tx_offloads(struct rte_port *port)
+@@ -4564,7 +4564,7 @@ cmd_config_queue_tx_offloads(struct rte_port *port)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/tap: fix interrupt vector array size' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (20 preceding siblings ...)
  2021-06-11 23:01     ` [dpdk-stable] patch 'app/testpmd: fix max queue number for Tx offloads' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'net/hns3: fix typos on comments' " Xueming Li
                       ` (155 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/58155c9ecf43f1774cbedc0e04b1739b2101065e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 58155c9ecf43f1774cbedc0e04b1739b2101065e Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Thu, 22 Apr 2021 19:27:14 +0800
Subject: [PATCH] net/tap: fix interrupt vector array size
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 2ce7bc96344542f8d3e89b41bbaaafb12e1d9f72 ]

The size of the current interrupt vector array is fixed to an integer.

This patch will create an interrupt vector array based on the number
of rxqs.

Fixes: 4870a8cdd968 ("net/tap: support Rx interrupt")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/tap/tap_intr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/tap/tap_intr.c b/drivers/net/tap/tap_intr.c
index 5cf4f173a0..1cacc15d9f 100644
--- a/drivers/net/tap/tap_intr.c
+++ b/drivers/net/tap/tap_intr.c
@@ -59,7 +59,7 @@ tap_rx_intr_vec_install(struct rte_eth_dev *dev)
 
 	if (!dev->data->dev_conf.intr_conf.rxq)
 		return 0;
-	intr_handle->intr_vec = malloc(sizeof(intr_handle->intr_vec[rxqs_n]));
+	intr_handle->intr_vec = malloc(sizeof(int) * rxqs_n);
 	if (intr_handle->intr_vec == NULL) {
 		rte_errno = ENOMEM;
 		TAP_LOG(ERR,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.296608900 +0800
+++ 0023-net-tap-fix-interrupt-vector-array-size.patch	2021-06-12 06:53:56.110000000 +0800
@@ -1 +1 @@
-From 2ce7bc96344542f8d3e89b41bbaaafb12e1d9f72 Mon Sep 17 00:00:00 2001
+From 58155c9ecf43f1774cbedc0e04b1739b2101065e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 2ce7bc96344542f8d3e89b41bbaaafb12e1d9f72 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix typos on comments' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (21 preceding siblings ...)
  2021-06-11 23:01     ` [dpdk-stable] patch 'net/tap: fix interrupt vector array size' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:01     ` [dpdk-stable] patch 'app/testpmd: fix segment number check' " Xueming Li
                       ` (154 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/bef47e0c78c3c3f84629eb0c17c914a45dfc9614

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bef47e0c78c3c3f84629eb0c17c914a45dfc9614 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Fri, 23 Apr 2021 17:27:38 +0800
Subject: [PATCH] net/hns3: fix typos on comments
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit db94014c4c6084d4797b514c6d0f517cdd546076 ]

This patch fixed wrong word in comments.

Fixes: f53a793bb7c2 ("net/hns3: add more hardware error types")
Fixes: d51867db65c1 ("net/hns3: add initialization")
Fixes: 411d23b9eafb ("net/hns3: support VLAN")
Fixes: 5f8845f4ba8f ("net/hns3: process MAC interrupt")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 6e1d7891e9..8e4692385d 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -377,7 +377,7 @@ hns3_vlan_filter_configure(struct hns3_adapter *hns, uint16_t vlan_id, int on)
 	 * When port base vlan enabled, we use port base vlan as the vlan
 	 * filter condition. In this case, we don't update vlan filter table
 	 * when user add new vlan or remove exist vlan, just update the
-	 * vlan list. The vlan id in vlan list will be writen in vlan filter
+	 * vlan list. The vlan id in vlan list will be written in vlan filter
 	 * table until port base vlan disabled
 	 */
 	if (hw->port_base_vlan_cfg.state == HNS3_PORT_BASE_VLAN_DISABLE) {
@@ -3759,8 +3759,8 @@ hns3_rx_buffer_calc(struct hns3_hw *hw, struct hns3_pkt_buf_alloc *buf_alloc)
 	 * For different application scenes, the enabled port number, TC number
 	 * and no_drop TC number are different. In order to obtain the better
 	 * performance, software could allocate the buffer size and configure
-	 * the waterline by tring to decrease the private buffer size according
-	 * to the order, namely, waterline of valided tc, pfc disabled tc, pfc
+	 * the waterline by trying to decrease the private buffer size according
+	 * to the order, namely, waterline of valid tc, pfc disabled tc, pfc
 	 * enabled tc.
 	 */
 	if (hns3_rx_buf_calc_all(hw, false, buf_alloc))
@@ -4708,7 +4708,7 @@ hns3_config_all_msix_error(struct hns3_hw *hw, bool enable)
 	 * and belong to a different type from the MSI-x errors processed
 	 * by the network driver.
 	 *
-	 * Network driver should open the new error report on initialition
+	 * Network driver should open the new error report on initialization.
 	 */
 	val = hns3_read_dev(hw, HNS3_VECTOR0_OTER_EN_REG);
 	hns3_set_bit(val, HNS3_VECTOR0_ALL_MSIX_ERR_B, enable ? 1 : 0);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.317366500 +0800
+++ 0024-net-hns3-fix-typos-on-comments.patch	2021-06-12 06:53:56.120000000 +0800
@@ -1 +1 @@
-From db94014c4c6084d4797b514c6d0f517cdd546076 Mon Sep 17 00:00:00 2001
+From bef47e0c78c3c3f84629eb0c17c914a45dfc9614 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit db94014c4c6084d4797b514c6d0f517cdd546076 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -16,2 +18,2 @@
- drivers/net/hns3/hns3_ethdev.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
+ drivers/net/hns3/hns3_ethdev.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
@@ -20 +22 @@
-index bd0699af58..ab38eae127 100644
+index 6e1d7891e9..8e4692385d 100644
@@ -23,10 +25 @@
-@@ -280,7 +280,7 @@ hns3_handle_mac_tnl(struct hns3_hw *hw)
- 	uint32_t status;
- 	int ret;
- 
--	/* query and clear mac tnl interruptions */
-+	/* query and clear mac tnl interrupt */
- 	hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_QUERY_MAC_TNL_INT, true);
- 	ret = hns3_cmd_send(hw, &desc, 1);
- 	if (ret) {
-@@ -462,7 +462,7 @@ hns3_vlan_filter_configure(struct hns3_adapter *hns, uint16_t vlan_id, int on)
+@@ -377,7 +377,7 @@ hns3_vlan_filter_configure(struct hns3_adapter *hns, uint16_t vlan_id, int on)
@@ -41 +34 @@
-@@ -3986,8 +3986,8 @@ hns3_rx_buffer_calc(struct hns3_hw *hw, struct hns3_pkt_buf_alloc *buf_alloc)
+@@ -3759,8 +3759,8 @@ hns3_rx_buffer_calc(struct hns3_hw *hw, struct hns3_pkt_buf_alloc *buf_alloc)
@@ -52 +45 @@
-@@ -5048,7 +5048,7 @@ hns3_config_all_msix_error(struct hns3_hw *hw, bool enable)
+@@ -4708,7 +4708,7 @@ hns3_config_all_msix_error(struct hns3_hw *hw, bool enable)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'app/testpmd: fix segment number check' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (22 preceding siblings ...)
  2021-06-11 23:01     ` [dpdk-stable] patch 'net/hns3: fix typos on comments' " Xueming Li
@ 2021-06-11 23:01     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'doc: fix formatting in testpmd guide' " Xueming Li
                       ` (153 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:01 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Luca Boccassi, Ferruh Yigit, Xiaoyun Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9886a1aed2ba8f55f678504ad21bc110d33373de

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9886a1aed2ba8f55f678504ad21bc110d33373de Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Fri, 23 Apr 2021 17:09:52 +0100
Subject: [PATCH] app/testpmd: fix segment number check
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 3f47c017eed414490b6428d58d47dfca2964209e ]

The --txpkts command line parameter was silently ignored due to
application was unable to check the Tx queue ring sizes for non
configured ports.

The "set txpkts <len0[,len1]*>" was also rejected if there
was some stopped or /unconfigured port.

This provides the following:

  - If fails to get ring size from the port, this can be because port is
    not initialized yet, ignore the check and just be sure segment size
    won't cause an out of bound access. The port descriptor check will
    be done during Tx setup.

  - The capability to send single packet is supposed to be very basic
    and always supported, the setting segment number to 1 is always
    allowed, no check performed

  - At the moment of Tx queue setup the descriptor number is checked
    against configured segment number

Bugzilla ID: 584
Fixes: 8dae835d88b7 ("app/testpmd: remove restriction on Tx segments set")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 app/test-pmd/cmdline.c |  4 ++++
 app/test-pmd/config.c  | 32 ++++++++++++++++++++++++--------
 2 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index ab9a603dc2..294031542a 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -2808,6 +2808,10 @@ cmd_setup_rxtx_queue_parsed(
 		if (!numa_support || socket_id == NUMA_NO_CONFIG)
 			socket_id = port->socket_id;
 
+		if (port->nb_tx_desc[res->qid] < tx_pkt_nb_segs) {
+			printf("Failed to setup TX queue: not enough descriptors\n");
+			return;
+		}
 		ret = rte_eth_tx_queue_setup(res->portid,
 					     res->qid,
 					     port->nb_tx_desc[res->qid],
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 5f147ec711..cb97963157 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3842,13 +3842,15 @@ nb_segs_is_invalid(unsigned int nb_segs)
 	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 (ret) {
+				/* Port may not be initialized yet, can't say
+				 * the port is invalid in this stage.
+				 */
+				continue;
+			}
 			if (ring_size < nb_segs) {
-				printf("nb segments per TX packets=%u >= "
-				       "TX queue(%u) ring_size=%u - ignored\n",
+				printf("nb segments per TX packets=%u >= TX "
+				       "queue(%u) ring_size=%u - txpkts ignored\n",
 				       nb_segs, queue_id, ring_size);
 				return true;
 			}
@@ -3864,12 +3866,26 @@ set_tx_pkt_segments(unsigned int *seg_lengths, unsigned int nb_segs)
 	uint16_t tx_pkt_len;
 	unsigned int i;
 
-	if (nb_segs_is_invalid(nb_segs))
+	/*
+	 * For single segment settings failed check is ignored.
+	 * It is a very basic capability to send the single segment
+	 * packets, suppose it is always supported.
+	 */
+	if (nb_segs > 1 && nb_segs_is_invalid(nb_segs)) {
+		printf("Tx segment size(%u) is not supported - txpkts ignored\n",
+			nb_segs);
 		return;
+	}
+
+	if (nb_segs > RTE_MAX_SEGS_PER_PKT) {
+		printf("Tx segment size(%u) is bigger than max number of segment(%u)\n",
+			nb_segs, RTE_MAX_SEGS_PER_PKT);
+		return;
+	}
 
 	/*
 	 * Check that each segment length is greater or equal than
-	 * the mbuf data sise.
+	 * the mbuf data size.
 	 * Check also that the total packet length is greater or equal than the
 	 * size of an empty UDP/IP packet (sizeof(struct rte_ether_hdr) +
 	 * 20 + 8).
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.341865600 +0800
+++ 0025-app-testpmd-fix-segment-number-check.patch	2021-06-12 06:53:56.140000000 +0800
@@ -1 +1 @@
-From 3f47c017eed414490b6428d58d47dfca2964209e Mon Sep 17 00:00:00 2001
+From 9886a1aed2ba8f55f678504ad21bc110d33373de Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 3f47c017eed414490b6428d58d47dfca2964209e ]
@@ -29 +31,0 @@
-Cc: stable@dpdk.org
@@ -40 +42 @@
-index 0ad27dff66..5fdcc1ca18 100644
+index ab9a603dc2..294031542a 100644
@@ -43 +45 @@
-@@ -2910,6 +2910,10 @@ cmd_setup_rxtx_queue_parsed(
+@@ -2808,6 +2808,10 @@ cmd_setup_rxtx_queue_parsed(
@@ -55 +57 @@
-index e189062efd..a4445a73bf 100644
+index 5f147ec711..cb97963157 100644
@@ -58 +60 @@
-@@ -3697,13 +3697,15 @@ nb_segs_is_invalid(unsigned int nb_segs)
+@@ -3842,13 +3842,15 @@ nb_segs_is_invalid(unsigned int nb_segs)
@@ -80 +82 @@
-@@ -3719,12 +3721,26 @@ set_tx_pkt_segments(unsigned int *seg_lengths, unsigned int nb_segs)
+@@ -3864,12 +3866,26 @@ set_tx_pkt_segments(unsigned int *seg_lengths, unsigned int nb_segs)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'doc: fix formatting in testpmd guide' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (23 preceding siblings ...)
  2021-06-11 23:01     ` [dpdk-stable] patch 'app/testpmd: fix segment number check' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bonding: fix socket ID check' " Xueming Li
                       ` (152 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Luca Boccassi, Xiaoyun Li, Bing Zhao, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8d04d026a749489f754e8230777e2ed3bd06e8ac

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8d04d026a749489f754e8230777e2ed3bd06e8ac Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Fri, 23 Apr 2021 17:29:44 +0100
Subject: [PATCH] doc: fix formatting in testpmd guide
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit ea2066b13f4df6cbfef313c88e139102fedf9b35 ]

Fix formatting in testpmd user guide for hairpin operation.

Fixes: 01817b10d27c ("app/testpmd: change hairpin queues setup")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
Reviewed-by: Bing Zhao <bingz@nvidia.com>
---
 doc/guides/testpmd_app_ug/run_app.rst | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
index ca67105b70..6f9ff1316b 100644
--- a/doc/guides/testpmd_app_ug/run_app.rst
+++ b/doc/guides/testpmd_app_ug/run_app.rst
@@ -524,8 +524,10 @@ The command line options are:
 
 *   ``--hairpin-mode=0xXX``
 
-    Set the hairpin port mode with bitmask, only valid when hairpin queues number is set.
-    bit 4 - explicit Tx flow rule
-    bit 1 - two hairpin ports paired
-    bit 0 - two hairpin ports loop
+    Set the hairpin port mode with bitmask, only valid when hairpin queues number is set::
+
+	bit 4 - explicit Tx flow rule
+	bit 1 - two hairpin ports paired
+	bit 0 - two hairpin ports loop
+
     The default value is 0. Hairpin will use single port mode and implicit Tx flow mode.
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.375752200 +0800
+++ 0026-doc-fix-formatting-in-testpmd-guide.patch	2021-06-12 06:53:56.140000000 +0800
@@ -1 +1 @@
-From ea2066b13f4df6cbfef313c88e139102fedf9b35 Mon Sep 17 00:00:00 2001
+From 8d04d026a749489f754e8230777e2ed3bd06e8ac Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit ea2066b13f4df6cbfef313c88e139102fedf9b35 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index d0621658ae..eb48318353 100644
+index ca67105b70..6f9ff1316b 100644
@@ -22 +24 @@
-@@ -538,8 +538,10 @@ The command line options are:
+@@ -524,8 +524,10 @@ The command line options are:

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/bonding: fix socket ID check' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (24 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'doc: fix formatting in testpmd guide' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: fix handling link update' " Xueming Li
                       ` (151 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/adefa69ef3d394fc249d90295414c69e14e9a5a1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From adefa69ef3d394fc249d90295414c69e14e9a5a1 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Tue, 27 Apr 2021 19:39:41 +0800
Subject: [PATCH] net/bonding: fix socket ID check
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit f294e04851fda95ef7842319865d53d2df0da0d1 ]

The socket ID entered by user is cast to an unsigned integer. However,
the value may be an illegal negative value, which may cause some
problems. In this case, an error should be returned.

In addition, the socket ID may be an invalid positive number, which is
also processed in this patch.

Fixes: 2efb58cbab6e ("bond: new link bonding library")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/bonding/rte_eth_bond_args.c | 8 ++++----
 drivers/net/bonding/rte_eth_bond_pmd.c  | 5 +++--
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c
index 8c5f90dc63..764b1b8c8e 100644
--- a/drivers/net/bonding/rte_eth_bond_args.c
+++ b/drivers/net/bonding/rte_eth_bond_args.c
@@ -200,20 +200,20 @@ int
 bond_ethdev_parse_socket_id_kvarg(const char *key __rte_unused,
 		const char *value, void *extra_args)
 {
-	int socket_id;
+	long socket_id;
 	char *endptr;
 
 	if (value == NULL || extra_args == NULL)
 		return -1;
 
 	errno = 0;
-	socket_id = (uint8_t)strtol(value, &endptr, 10);
+	socket_id = strtol(value, &endptr, 10);
 	if (*endptr != 0 || errno != 0)
 		return -1;
 
 	/* validate socket id value */
-	if (socket_id >= 0) {
-		*(uint8_t *)extra_args = (uint8_t)socket_id;
+	if (socket_id >= 0 && socket_id < RTE_MAX_NUMA_NODES) {
+		*(int *)extra_args = (int)socket_id;
 		return 0;
 	}
 	return -1;
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 9bcef952ea..ec7db3dcd3 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -3325,8 +3325,9 @@ bond_probe(struct rte_vdev_device *dev)
 	const char *name;
 	struct bond_dev_private *internals;
 	struct rte_kvargs *kvlist;
-	uint8_t bonding_mode, socket_id/*, agg_mode*/;
-	int  arg_count, port_id;
+	uint8_t bonding_mode;
+	int arg_count, port_id;
+	int socket_id;
 	uint8_t agg_mode;
 	struct rte_eth_dev *eth_dev;
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.398069600 +0800
+++ 0027-net-bonding-fix-socket-ID-check.patch	2021-06-12 06:53:56.140000000 +0800
@@ -1 +1 @@
-From f294e04851fda95ef7842319865d53d2df0da0d1 Mon Sep 17 00:00:00 2001
+From adefa69ef3d394fc249d90295414c69e14e9a5a1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit f294e04851fda95ef7842319865d53d2df0da0d1 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -54 +56 @@
-index 25b1f771a1..6ba09c4d9e 100644
+index 9bcef952ea..ec7db3dcd3 100644
@@ -57 +59 @@
-@@ -3333,8 +3333,9 @@ bond_probe(struct rte_vdev_device *dev)
+@@ -3325,8 +3325,9 @@ bond_probe(struct rte_vdev_device *dev)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix handling link update' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (25 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bonding: fix socket ID check' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'common/sfc_efx/base: fix dereferencing null pointer' " Xueming Li
                       ` (150 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/551f3198b8fdf7dda1116b6f7b0e3c77d356f204

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 551f3198b8fdf7dda1116b6f7b0e3c77d356f204 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Tue, 27 Apr 2021 20:17:39 +0800
Subject: [PATCH] net/hns3: fix handling link update
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit fae9b062b01397339c02c88ebee11dd5f7af3e3c ]

The link fails code should be parsed using the structure
hns3_mbx_vf_to_pf_cmd, else it will parse fail.

Fixes: 109e4dd1bd7a ("net/hns3: get link state change through mailbox")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_mbx.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
index 2ca0dffcf9..6f0a216d11 100644
--- a/drivers/net/hns3/hns3_mbx.c
+++ b/drivers/net/hns3/hns3_mbx.c
@@ -355,7 +355,7 @@ hns3_link_fail_parse(struct hns3_hw *hw, uint8_t link_fail_code)
 
 static void
 hns3_handle_link_change_event(struct hns3_hw *hw,
-			      struct hns3_mbx_pf_to_vf_cmd *req)
+				struct hns3_mbx_vf_to_pf_cmd *req)
 {
 #define LINK_STATUS_OFFSET     1
 #define LINK_FAIL_CODE_OFFSET  2
@@ -524,7 +524,14 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
 			hns3_mbx_handler(hw);
 			break;
 		case HNS3_MBX_PUSH_LINK_STATUS:
-			hns3_handle_link_change_event(hw, req);
+			/*
+			 * This message is reported by the firmware and is
+			 * reported in 'struct hns3_mbx_vf_to_pf_cmd' format.
+			 * Therefore, we should cast the req variable to
+			 * 'struct hns3_mbx_vf_to_pf_cmd' and then process it.
+			 */
+			hns3_handle_link_change_event(hw,
+				(struct hns3_mbx_vf_to_pf_cmd *)req);
 			break;
 		case HNS3_MBX_PUSH_VLAN_INFO:
 			/*
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.420819700 +0800
+++ 0028-net-hns3-fix-handling-link-update.patch	2021-06-12 06:53:56.150000000 +0800
@@ -1 +1 @@
-From fae9b062b01397339c02c88ebee11dd5f7af3e3c Mon Sep 17 00:00:00 2001
+From 551f3198b8fdf7dda1116b6f7b0e3c77d356f204 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit fae9b062b01397339c02c88ebee11dd5f7af3e3c ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index ba04ac9e90..31ab130aae 100644
+index 2ca0dffcf9..6f0a216d11 100644
@@ -22 +24 @@
-@@ -347,7 +347,7 @@ hns3_link_fail_parse(struct hns3_hw *hw, uint8_t link_fail_code)
+@@ -355,7 +355,7 @@ hns3_link_fail_parse(struct hns3_hw *hw, uint8_t link_fail_code)
@@ -25 +27 @@
- hns3pf_handle_link_change_event(struct hns3_hw *hw,
+ hns3_handle_link_change_event(struct hns3_hw *hw,
@@ -31,2 +33,2 @@
-@@ -513,7 +513,14 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
- 			hns3_handle_asserting_reset(hw, req);
+@@ -524,7 +524,14 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
+ 			hns3_mbx_handler(hw);
@@ -35 +37 @@
--			hns3pf_handle_link_change_event(hw, req);
+-			hns3_handle_link_change_event(hw, req);
@@ -42 +44 @@
-+			hns3pf_handle_link_change_event(hw,
++			hns3_handle_link_change_event(hw,

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'common/sfc_efx/base: fix dereferencing null pointer' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (26 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: fix handling link update' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/i40e: fix negative VEB index' " Xueming Li
                       ` (149 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Hongbo Zheng; +Cc: Luca Boccassi, Min Hu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3085e8ab3e33471bbbc198d5c5038cf045a27da0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3085e8ab3e33471bbbc198d5c5038cf045a27da0 Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3@huawei.com>
Date: Sun, 25 Apr 2021 20:58:16 +0800
Subject: [PATCH] common/sfc_efx/base: fix dereferencing null pointer
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 3de9af2aaa680b33a9a597b8ec4d76163dee2029 ]

In function efx_pci_xilinx_cap_tbl_find, pointer entry_offsetp is used
before null pointer check, which may cause access to null pointer.

This patch fix this problem.

Fixes: ba9568b8b4b7 ("common/sfc_efx/base: add Xilinx capabilities table lookup")

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/common/sfc_efx/base/efx_pci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/common/sfc_efx/base/efx_pci.c b/drivers/common/sfc_efx/base/efx_pci.c
index 1e7307476f..83c9e0449d 100644
--- a/drivers/common/sfc_efx/base/efx_pci.c
+++ b/drivers/common/sfc_efx/base/efx_pci.c
@@ -310,7 +310,7 @@ efx_pci_xilinx_cap_tbl_find(
 	__in				boolean_t skip_first,
 	__inout				efsys_dma_addr_t *entry_offsetp)
 {
-	efsys_dma_addr_t offset = *entry_offsetp;
+	efsys_dma_addr_t offset;
 	boolean_t skip = skip_first;
 	efx_qword_t header;
 	uint32_t format;
@@ -322,6 +322,7 @@ efx_pci_xilinx_cap_tbl_find(
 		goto fail1;
 	}
 
+	offset = *entry_offsetp;
 	rc = ENOENT;
 	/*
 	 * SF-119689-TC Riverhead Host Interface section 4.2.2.
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.441798200 +0800
+++ 0029-common-sfc_efx-base-fix-dereferencing-null-pointer.patch	2021-06-12 06:53:56.150000000 +0800
@@ -1 +1 @@
-From 3de9af2aaa680b33a9a597b8ec4d76163dee2029 Mon Sep 17 00:00:00 2001
+From 3085e8ab3e33471bbbc198d5c5038cf045a27da0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 3de9af2aaa680b33a9a597b8ec4d76163dee2029 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 8a26da68a9..9c7cacbdec 100644
+index 1e7307476f..83c9e0449d 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/i40e: fix negative VEB index' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (27 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'common/sfc_efx/base: fix dereferencing null pointer' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/i40e: remove redundant VSI check in Tx queue setup' " Xueming Li
                       ` (148 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/35e133887c6c4c8a08590f12ee118f75b4d004b6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 35e133887c6c4c8a08590f12ee118f75b4d004b6 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 21 Apr 2021 10:33:13 +0800
Subject: [PATCH] net/i40e: fix negative VEB index
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 47b6667abe533e8c61576aa4803f41daf988eb9b ]

This patch adds check for negative VEB index when parsing VEB list.

Fixes: 79f2248219c0 ("net/i40e: add floating VEB option")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index fb5b8a1283..100d42d6bd 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -849,6 +849,8 @@ floating_veb_list_handler(__rte_unused const char *key,
 		idx = strtoul(floating_veb_value, &end, 10);
 		if (errno || end == NULL)
 			return -1;
+		if (idx < 0)
+			return -1;
 		while (isblank(*end))
 			end++;
 		if (*end == '-') {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.465016500 +0800
+++ 0030-net-i40e-fix-negative-VEB-index.patch	2021-06-12 06:53:56.160000000 +0800
@@ -1 +1 @@
-From 47b6667abe533e8c61576aa4803f41daf988eb9b Mon Sep 17 00:00:00 2001
+From 35e133887c6c4c8a08590f12ee118f75b4d004b6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 47b6667abe533e8c61576aa4803f41daf988eb9b ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 66d23d698e..d0586201f8 100644
+index fb5b8a1283..100d42d6bd 100644
@@ -22 +24 @@
-@@ -854,6 +854,8 @@ floating_veb_list_handler(__rte_unused const char *key,
+@@ -849,6 +849,8 @@ floating_veb_list_handler(__rte_unused const char *key,

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/i40e: remove redundant VSI check in Tx queue setup' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (28 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/i40e: fix negative VEB index' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/ice: fix fast mbuf freeing' " Xueming Li
                       ` (147 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c7db9596130425fdaa16ddca8a2cffa1633fa520

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c7db9596130425fdaa16ddca8a2cffa1633fa520 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 21 Apr 2021 10:33:14 +0800
Subject: [PATCH] net/i40e: remove redundant VSI check in Tx queue setup
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 70077b8630011e3cd5d7a2fa9af6ea6e73e46a4d ]

The VSI pointer is always valid, so there is no need to judge its
validity.

Fixes: b6583ee40265 ("i40e: full VMDQ pools support")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_rxtx.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index b8859bbff2..3986842a62 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2187,8 +2187,6 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev,
 	if (hw->mac.type == I40E_MAC_VF || hw->mac.type == I40E_MAC_X722_VF) {
 		vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 		vsi = &vf->vsi;
-		if (!vsi)
-			return -EINVAL;
 		reg_idx = queue_idx;
 	} else {
 		pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.492752400 +0800
+++ 0031-net-i40e-remove-redundant-VSI-check-in-Tx-queue-setu.patch	2021-06-12 06:53:56.160000000 +0800
@@ -1 +1 @@
-From 70077b8630011e3cd5d7a2fa9af6ea6e73e46a4d Mon Sep 17 00:00:00 2001
+From c7db9596130425fdaa16ddca8a2cffa1633fa520 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 70077b8630011e3cd5d7a2fa9af6ea6e73e46a4d ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 86a9eae370..02cf5e787c 100644
+index b8859bbff2..3986842a62 100644
@@ -23 +25 @@
-@@ -2253,8 +2253,6 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev,
+@@ -2187,8 +2187,6 @@ i40e_dev_tx_queue_setup(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/ice: fix fast mbuf freeing' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (29 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/i40e: remove redundant VSI check in Tx queue setup' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/iavf: fix VF to PF command failure handling' " Xueming Li
                       ` (146 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e488fd804d5268c3bd6c3b18c6105719d09b2ae0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e488fd804d5268c3bd6c3b18c6105719d09b2ae0 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Sun, 25 Apr 2021 13:18:51 +0800
Subject: [PATCH] net/ice: fix fast mbuf freeing
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit ae69b2930035509664b618c320cb03f3417be4f6 ]

MBUF_FAST_FREE should be supported as per queue offload for ice.

Fixes: 6eac0b7fde95 ("net/ice: support advance Rx/Tx")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 88efe90769..2d265fbaa6 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -3642,7 +3642,7 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	}
 
 	dev_info->rx_queue_offload_capa = 0;
-	dev_info->tx_queue_offload_capa = 0;
+	dev_info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
 
 	dev_info->reta_size = pf->hash_lut_size;
 	dev_info->hash_key_size = (VSIQF_HKEY_MAX_INDEX + 1) * sizeof(uint32_t);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.519467100 +0800
+++ 0032-net-ice-fix-fast-mbuf-freeing.patch	2021-06-12 06:53:56.170000000 +0800
@@ -1 +1 @@
-From ae69b2930035509664b618c320cb03f3417be4f6 Mon Sep 17 00:00:00 2001
+From e488fd804d5268c3bd6c3b18c6105719d09b2ae0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit ae69b2930035509664b618c320cb03f3417be4f6 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index c37a2e09ce..36b8bd1975 100644
+index 88efe90769..2d265fbaa6 100644
@@ -21 +23 @@
-@@ -3539,7 +3539,7 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -3642,7 +3642,7 @@ ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/iavf: fix VF to PF command failure handling' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (30 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/ice: fix fast mbuf freeing' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'common/iavf: fix duplicated offload bit' " Xueming Li
                       ` (145 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Luca Boccassi, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/dc22d3cfab65c82159712bcd60268600acb9c0e8

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From dc22d3cfab65c82159712bcd60268600acb9c0e8 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Sun, 25 Apr 2021 15:39:34 +0800
Subject: [PATCH] net/iavf: fix VF to PF command failure handling
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 0c35eecfe8b54bbdf59c30a803404acfdcc4f7eb ]

When the command sent by VF to PF fails, iavf may need to run
different code paths according to the specific reason of the
failure (not supported or other reasons).

This patch adds support of identifying PF return error type.

Fixes: 22b123a36d07 ("net/avf: initialize PMD")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/iavf/iavf.h       |  4 ++--
 drivers/net/iavf/iavf_vchnl.c | 18 ++++++++++++------
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
index 0196f74721..a8b0649745 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
@@ -136,7 +136,7 @@ struct iavf_info {
 	uint64_t supported_rxdid;
 	uint8_t *proto_xtr; /* proto xtr type for all queues */
 	volatile enum virtchnl_ops pend_cmd; /* pending command not finished */
-	uint32_t cmd_retval; /* return value of the cmd response from PF */
+	int cmd_retval; /* return value of the cmd response from PF */
 	uint8_t *aq_resp; /* buffer to store the adminq response from PF */
 
 	/* Event from pf */
@@ -255,7 +255,7 @@ struct iavf_cmd_info {
  * _atomic_set_cmd successfully.
  */
 static inline void
-_notify_cmd(struct iavf_info *vf, uint32_t msg_ret)
+_notify_cmd(struct iavf_info *vf, int msg_ret)
 {
 	vf->cmd_retval = msg_ret;
 	rte_wmb();
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 3d52a8c402..ed00521898 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -227,13 +227,19 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
 			rte_delay_ms(ASQ_DELAY_MS);
 			/* If don't read msg or read sys event, continue */
 		} while (i++ < MAX_TRY_TIMES);
-		/* If there's no response is received, clear command */
-		if (i >= MAX_TRY_TIMES  ||
-		    vf->cmd_retval != VIRTCHNL_STATUS_SUCCESS) {
-			err = -1;
-			PMD_DRV_LOG(ERR, "No response or return failure (%d)"
-				    " for cmd %d", vf->cmd_retval, args->ops);
+
+		if (i >= MAX_TRY_TIMES) {
+			PMD_DRV_LOG(ERR, "No response for cmd %d", args->ops);
 			_clear_cmd(vf);
+			err = -EIO;
+		} else if (vf->cmd_retval ==
+			   VIRTCHNL_STATUS_ERR_NOT_SUPPORTED) {
+			PMD_DRV_LOG(ERR, "Cmd %d not supported", args->ops);
+			err = -ENOTSUP;
+		} else if (vf->cmd_retval != VIRTCHNL_STATUS_SUCCESS) {
+			PMD_DRV_LOG(ERR, "Return failure %d for cmd %d",
+				    vf->cmd_retval, args->ops);
+			err = -EINVAL;
 		}
 		break;
 	}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.542965100 +0800
+++ 0033-net-iavf-fix-VF-to-PF-command-failure-handling.patch	2021-06-12 06:53:56.170000000 +0800
@@ -1 +1 @@
-From 0c35eecfe8b54bbdf59c30a803404acfdcc4f7eb Mon Sep 17 00:00:00 2001
+From dc22d3cfab65c82159712bcd60268600acb9c0e8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 0c35eecfe8b54bbdf59c30a803404acfdcc4f7eb ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 1e73f01211..4f5811ae87 100644
+index 0196f74721..a8b0649745 100644
@@ -26 +28 @@
-@@ -144,7 +144,7 @@ struct iavf_info {
+@@ -136,7 +136,7 @@ struct iavf_info {
@@ -35 +37 @@
-@@ -264,7 +264,7 @@ struct iavf_cmd_info {
+@@ -255,7 +255,7 @@ struct iavf_cmd_info {
@@ -45 +47 @@
-index b0fbe15677..0026120cf4 100644
+index 3d52a8c402..ed00521898 100644
@@ -48 +50 @@
-@@ -228,13 +228,19 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)
+@@ -227,13 +227,19 @@ iavf_execute_vf_cmd(struct iavf_adapter *adapter, struct iavf_cmd_info *args)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'common/iavf: fix duplicated offload bit' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (31 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/iavf: fix VF to PF command failure handling' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/e1000: fix flow error message object' " Xueming Li
                       ` (144 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Luca Boccassi, Brett Creeley, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5d2c2857f43cabf67aca8a76bea465947937c012

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5d2c2857f43cabf67aca8a76bea465947937c012 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Sat, 24 Apr 2021 14:03:34 +0800
Subject: [PATCH] common/iavf: fix duplicated offload bit
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 44a87aa9c2c89af075cec0f4eedf6ddd7c829088 ]

The value of offload VIRTCHNL_VF_OFFLOAD_CRC bit already existed as
VIRTCHNL_VF_CAP_ADV_LINK_SPEED. Fix this now by changing the value of
VIRTCHNL_VF_OFFLOAD_CRC to a currently unused value.

Also, move the define for VIRTCHNL_VF_CAP_ADV_LINK_SPEED in the correct
place to line up with the other bit values and add a comment for its
purpose. Hopefully this will prevent from defining duplicate bits moving
forward.

Fixes: e244eeafcecb ("net/iavf/base: update virtual channel")

Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/common/iavf/virtchnl.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h
index b931da61e5..4c34d35ba7 100644
--- a/drivers/common/iavf/virtchnl.h
+++ b/drivers/common/iavf/virtchnl.h
@@ -248,9 +248,11 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);
 #define VIRTCHNL_VF_OFFLOAD_RSS_REG		0x00000010
 #define VIRTCHNL_VF_OFFLOAD_WB_ON_ITR		0x00000020
 #define VIRTCHNL_VF_OFFLOAD_REQ_QUEUES		0x00000040
-#define VIRTCHNL_VF_OFFLOAD_CRC			0x00000080
+/* used to negotiate communicating link speeds in Mbps */
+#define VIRTCHNL_VF_CAP_ADV_LINK_SPEED		0x00000080
 	/* 0X00000100 is reserved */
 #define VIRTCHNL_VF_LARGE_NUM_QPAIRS		0x00000200
+#define VIRTCHNL_VF_OFFLOAD_CRC			0x00000400
 #define VIRTCHNL_VF_OFFLOAD_VLAN		0x00010000
 #define VIRTCHNL_VF_OFFLOAD_RX_POLLING		0x00020000
 #define VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2	0x00040000
@@ -268,8 +270,6 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);
 #define VIRTCHNL_VF_CAP_DCF			0X40000000
 	/* 0X80000000 is reserved */
 
-/* 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)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.566466100 +0800
+++ 0034-common-iavf-fix-duplicated-offload-bit.patch	2021-06-12 06:53:56.170000000 +0800
@@ -1 +1 @@
-From 44a87aa9c2c89af075cec0f4eedf6ddd7c829088 Mon Sep 17 00:00:00 2001
+From 5d2c2857f43cabf67aca8a76bea465947937c012 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 44a87aa9c2c89af075cec0f4eedf6ddd7c829088 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index 139569787f..c68128f773 100644
+index b931da61e5..4c34d35ba7 100644
@@ -29 +31 @@
-@@ -372,9 +372,11 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);
+@@ -248,9 +248,11 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);
@@ -39 +40,0 @@
- #define VIRTCHNL_VF_OFFLOAD_VLAN_V2		0x00008000
@@ -42 +43,2 @@
-@@ -393,8 +395,6 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);
+ #define VIRTCHNL_VF_OFFLOAD_RSS_PCTYPE_V2	0x00040000
+@@ -268,8 +270,6 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/e1000: fix flow error message object' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (32 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'common/iavf: fix duplicated offload bit' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'vhost: fix queue initialization' " Xueming Li
                       ` (143 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/351bc3464542892813f8be3e284b5ea06ae05624

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 351bc3464542892813f8be3e284b5ea06ae05624 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Tue, 27 Apr 2021 16:51:21 +0800
Subject: [PATCH] net/e1000: fix flow error message object
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 6705a69cee1db95a2ddf49e48b215da60f258174 ]

This patch fixes parameter misuse when set rte flow action error.

Fixes: c0688ef1eded ("net/igb: parse flow API n-tuple filter")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/e1000/igb_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/e1000/igb_flow.c b/drivers/net/e1000/igb_flow.c
index ccb184df95..55c36ff00f 100644
--- a/drivers/net/e1000/igb_flow.c
+++ b/drivers/net/e1000/igb_flow.c
@@ -350,7 +350,7 @@ cons_parse_ntuple_filter(const struct rte_flow_attr *attr,
 		memset(filter, 0, sizeof(struct rte_eth_ntuple_filter));
 		rte_flow_error_set(error, EINVAL,
 			RTE_FLOW_ERROR_TYPE_ACTION,
-			item, "Not supported action.");
+			act, "Not supported action.");
 		return -rte_errno;
 	}
 	filter->queue =
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.588280900 +0800
+++ 0035-net-e1000-fix-flow-error-message-object.patch	2021-06-12 06:53:56.180000000 +0800
@@ -1 +1 @@
-From 6705a69cee1db95a2ddf49e48b215da60f258174 Mon Sep 17 00:00:00 2001
+From 351bc3464542892813f8be3e284b5ea06ae05624 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 6705a69cee1db95a2ddf49e48b215da60f258174 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 33f6b1d6b3..e72376f69c 100644
+index ccb184df95..55c36ff00f 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'vhost: fix queue initialization' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (33 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/e1000: fix flow error message object' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'vhost: fix redundant vring status change notification' " Xueming Li
                       ` (142 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Jiayu Hu; +Cc: Luca Boccassi, Maxime Coquelin, Yinan Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b0a7aab7d885cb771cf6520e405c495c7ab0c18c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b0a7aab7d885cb771cf6520e405c495c7ab0c18c Mon Sep 17 00:00:00 2001
From: Jiayu Hu <jiayu.hu@intel.com>
Date: Tue, 20 Apr 2021 04:57:43 -0400
Subject: [PATCH] vhost: fix queue initialization
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 678a91efa23a50a16cd3c5a2b18a117daef3c840 ]

This patch allocates vhost queue by rte_zmalloc() to avoid
undefined values.

Fixes: a277c7159876 ("vhost: refactor code structure")

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
---
 lib/librte_vhost/vhost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index 4de588d752..90cad7fffd 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -598,7 +598,7 @@ alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx)
 		if (dev->virtqueue[i])
 			continue;
 
-		vq = rte_malloc(NULL, sizeof(struct vhost_virtqueue), 0);
+		vq = rte_zmalloc(NULL, sizeof(struct vhost_virtqueue), 0);
 		if (vq == NULL) {
 			VHOST_LOG_CONFIG(ERR,
 				"Failed to allocate memory for vring:%u.\n", i);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.609535600 +0800
+++ 0036-vhost-fix-queue-initialization.patch	2021-06-12 06:53:56.180000000 +0800
@@ -1 +1 @@
-From 678a91efa23a50a16cd3c5a2b18a117daef3c840 Mon Sep 17 00:00:00 2001
+From b0a7aab7d885cb771cf6520e405c495c7ab0c18c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 678a91efa23a50a16cd3c5a2b18a117daef3c840 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
- lib/vhost/vhost.c | 2 +-
+ lib/librte_vhost/vhost.c | 2 +-
@@ -19,5 +21,5 @@
-diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c
-index a70fe01d8f..ea38cf2b75 100644
---- a/lib/vhost/vhost.c
-+++ b/lib/vhost/vhost.c
-@@ -608,7 +608,7 @@ alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx)
+diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
+index 4de588d752..90cad7fffd 100644
+--- a/lib/librte_vhost/vhost.c
++++ b/lib/librte_vhost/vhost.c
+@@ -598,7 +598,7 @@ alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'vhost: fix redundant vring status change notification' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (34 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'vhost: fix queue initialization' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/virtio: fix getline memory leakage' " Xueming Li
                       ` (141 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Jiayu Hu; +Cc: Luca Boccassi, Yinan Wang, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/24743b77a7384ada2f25bf9e6a6c34921fe4f325

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 24743b77a7384ada2f25bf9e6a6c34921fe4f325 Mon Sep 17 00:00:00 2001
From: Jiayu Hu <jiayu.hu@intel.com>
Date: Tue, 20 Apr 2021 04:57:45 -0400
Subject: [PATCH] vhost: fix redundant vring status change notification
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit c94c9f3152a37fb31553e410ab7fd06f23802c71 ]

When VHOST_USER_F_PROTOCOL_FEATURES is not negotiated,
there is no need for vhost_user_set_vring_kick() to
notify the application of vring enabled, as
vhost_user_msg_handler() also notifies the application.

This patch is to remove unnecessary vring_state_changed() call.

Fixes: d0fcc38f5fa4 ("vhost: improve device readiness notifications")

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost_user.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 45c8ac09da..78fb49b311 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1876,9 +1876,6 @@ vhost_user_set_vring_kick(struct virtio_net **pdev, struct VhostUserMsg *msg,
 	 */
 	if (!(dev->features & (1ULL << VHOST_USER_F_PROTOCOL_FEATURES))) {
 		vq->enabled = 1;
-		if (dev->notify_ops->vring_state_changed)
-			dev->notify_ops->vring_state_changed(
-				dev->vid, file.index, 1);
 	}
 
 	if (vq->ready) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.631516200 +0800
+++ 0037-vhost-fix-redundant-vring-status-change-notification.patch	2021-06-12 06:53:56.180000000 +0800
@@ -1 +1 @@
-From c94c9f3152a37fb31553e410ab7fd06f23802c71 Mon Sep 17 00:00:00 2001
+From 24743b77a7384ada2f25bf9e6a6c34921fe4f325 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit c94c9f3152a37fb31553e410ab7fd06f23802c71 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
- lib/vhost/vhost_user.c | 3 ---
+ lib/librte_vhost/vhost_user.c | 3 ---
@@ -23,5 +25,5 @@
-diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
-index fa8929f563..611ff209e3 100644
---- a/lib/vhost/vhost_user.c
-+++ b/lib/vhost/vhost_user.c
-@@ -1922,9 +1922,6 @@ vhost_user_set_vring_kick(struct virtio_net **pdev, struct VhostUserMsg *msg,
+diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
+index 45c8ac09da..78fb49b311 100644
+--- a/lib/librte_vhost/vhost_user.c
++++ b/lib/librte_vhost/vhost_user.c
+@@ -1876,9 +1876,6 @@ vhost_user_set_vring_kick(struct virtio_net **pdev, struct VhostUserMsg *msg,
@@ -30 +32 @@
- 		vq->enabled = true;
+ 		vq->enabled = 1;

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/virtio: fix getline memory leakage' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (35 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'vhost: fix redundant vring status change notification' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: remove unnecessary forward declarations' " Xueming Li
                       ` (140 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/0f0469489b1a11ac46975e2b53f5ff8d42692446

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0f0469489b1a11ac46975e2b53f5ff8d42692446 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 21 Apr 2021 09:37:49 +0800
Subject: [PATCH] net/virtio: fix getline memory leakage
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 9f528374bffb5868ec6bf896f57919a709b31911 ]

This patch fixes getline memory leakage when parsing dynamic major num.

Fixes: 7d62bf6f54ba ("net/virtio: introduce vhost-vDPA backend type")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 drivers/net/virtio/virtio_user_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index 45edd2ae60..0906a34799 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -584,7 +584,7 @@ vdpa_dynamic_major_num(void)
 {
 	FILE *fp;
 	char *line = NULL;
-	size_t size;
+	size_t size = 0;
 	char name[11];
 	bool found = false;
 	uint32_t num;
@@ -604,6 +604,7 @@ vdpa_dynamic_major_num(void)
 			break;
 		}
 	}
+	free(line);
 	fclose(fp);
 	return found ? num : UNNAMED_MAJOR;
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.654376500 +0800
+++ 0038-net-virtio-fix-getline-memory-leakage.patch	2021-06-12 06:53:56.190000000 +0800
@@ -1 +1 @@
-From 9f528374bffb5868ec6bf896f57919a709b31911 Mon Sep 17 00:00:00 2001
+From 0f0469489b1a11ac46975e2b53f5ff8d42692446 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 9f528374bffb5868ec6bf896f57919a709b31911 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 79bd31ed82..e85906e9eb 100644
+index 45edd2ae60..0906a34799 100644
@@ -22 +24 @@
-@@ -360,7 +360,7 @@ vdpa_dynamic_major_num(void)
+@@ -584,7 +584,7 @@ vdpa_dynamic_major_num(void)
@@ -31 +33 @@
-@@ -380,6 +380,7 @@ vdpa_dynamic_major_num(void)
+@@ -604,6 +604,7 @@ vdpa_dynamic_major_num(void)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/bnxt: remove unnecessary forward declarations' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (36 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/virtio: fix getline memory leakage' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: remove unused function parameters' " Xueming Li
                       ` (139 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Luca Boccassi, Ajit Khaparde, Lance Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5396d57fc3ea67f1f54fd8cdddf2f342e7c253d3

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5396d57fc3ea67f1f54fd8cdddf2f342e7c253d3 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 22 Apr 2021 09:42:00 +0530
Subject: [PATCH] net/bnxt: remove unnecessary forward declarations
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit b3577e2aa6a1cd307d8ecc82a0df7c517d1f66d0 ]

This patch removes several redundant forward declarations of
functions and structure.

Fixes: 0b42b92ae429 ("net/bnxt: fix xstats by id")
Fixes: cf4f055a6578 ("net/bnxt: remove EEM system memory support")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
---
 drivers/net/bnxt/bnxt.h       | 8 --------
 drivers/net/bnxt/bnxt_hwrm.h  | 1 -
 drivers/net/bnxt/bnxt_stats.h | 5 -----
 3 files changed, 14 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index ca88c95051..272e076072 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -593,13 +593,6 @@ struct bnxt_rep_info {
 				     DEV_RX_OFFLOAD_SCATTER | \
 				     DEV_RX_OFFLOAD_RSS_HASH)
 
-#define  MAX_TABLE_SUPPORT 4
-#define  MAX_DIR_SUPPORT   2
-struct bnxt_dmabuf_info {
-	uint32_t entry_num;
-	int      fd[MAX_DIR_SUPPORT][MAX_TABLE_SUPPORT];
-};
-
 #define BNXT_HWRM_SHORT_REQ_LEN		sizeof(struct hwrm_short_input)
 
 struct bnxt_flow_stat_info {
@@ -809,7 +802,6 @@ struct bnxt {
 	uint16_t		port_svif;
 
 	struct tf		tfp;
-	struct bnxt_dmabuf_info dmabuf;
 	struct bnxt_ulp_context	*ulp_ctx;
 	struct bnxt_flow_stat_info *flow_stat;
 	uint8_t			flow_xstat;
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index 473e1f5395..dbde8f69fb 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -293,7 +293,6 @@ int bnxt_hwrm_get_dflt_vnic_svif(struct bnxt *bp, uint16_t fid,
 				 uint16_t *vnic_id, uint16_t *svif);
 int bnxt_hwrm_parent_pf_qcfg(struct bnxt *bp);
 int bnxt_hwrm_port_phy_qcaps(struct bnxt *bp);
-int bnxt_hwrm_oem_cmd(struct bnxt *bp, uint32_t entry_num);
 int bnxt_clear_one_vnic_filter(struct bnxt *bp,
 			       struct bnxt_filter_info *filter);
 void bnxt_free_vf_info(struct bnxt *bp);
diff --git a/drivers/net/bnxt/bnxt_stats.h b/drivers/net/bnxt/bnxt_stats.h
index 3cf2a1b822..7e11efe841 100644
--- a/drivers/net/bnxt/bnxt_stats.h
+++ b/drivers/net/bnxt/bnxt_stats.h
@@ -18,11 +18,6 @@ int bnxt_dev_xstats_get_names_op(__rte_unused struct rte_eth_dev *eth_dev,
 int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
 			   struct rte_eth_xstat *xstats, unsigned int n);
 int bnxt_dev_xstats_reset_op(struct rte_eth_dev *eth_dev);
-int bnxt_dev_xstats_get_by_id_op(struct rte_eth_dev *dev, const uint64_t *ids,
-				uint64_t *values, unsigned int limit);
-int bnxt_dev_xstats_get_names_by_id_op(struct rte_eth_dev *dev,
-				struct rte_eth_xstat_name *xstats_names,
-				const uint64_t *ids, unsigned int limit);
 
 struct bnxt_xstats_name_off {
 	char name[RTE_ETH_XSTATS_NAME_SIZE];
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.677629600 +0800
+++ 0039-net-bnxt-remove-unnecessary-forward-declarations.patch	2021-06-12 06:53:56.190000000 +0800
@@ -1 +1 @@
-From b3577e2aa6a1cd307d8ecc82a0df7c517d1f66d0 Mon Sep 17 00:00:00 2001
+From 5396d57fc3ea67f1f54fd8cdddf2f342e7c253d3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit b3577e2aa6a1cd307d8ecc82a0df7c517d1f66d0 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index dfdfa9f7a0..bd2dec4d63 100644
+index ca88c95051..272e076072 100644
@@ -26 +28 @@
-@@ -597,13 +597,6 @@ struct bnxt_rep_info {
+@@ -593,13 +593,6 @@ struct bnxt_rep_info {
@@ -40 +42 @@
-@@ -834,7 +827,6 @@ struct bnxt {
+@@ -809,7 +802,6 @@ struct bnxt {
@@ -47 +49 @@
- 	uint16_t		max_num_kflows;
+ 	uint8_t			flow_xstat;
@@ -49 +51 @@
-index 0c2e32ccbf..d9771eabd3 100644
+index 473e1f5395..dbde8f69fb 100644
@@ -52 +54 @@
-@@ -294,7 +294,6 @@ int bnxt_hwrm_get_dflt_vnic_svif(struct bnxt *bp, uint16_t fid,
+@@ -293,7 +293,6 @@ int bnxt_hwrm_get_dflt_vnic_svif(struct bnxt *bp, uint16_t fid,
@@ -61 +63 @@
-index 0ee226901a..e9e5636926 100644
+index 3cf2a1b822..7e11efe841 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/bnxt: remove unused function parameters' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (37 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: remove unnecessary forward declarations' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: use prefix on global function' " Xueming Li
                       ` (138 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Luca Boccassi, Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/52d2337eac089e365c240e532bb38f45c220c8f5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 52d2337eac089e365c240e532bb38f45c220c8f5 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Fri, 23 Apr 2021 10:49:29 +0530
Subject: [PATCH] net/bnxt: remove unused function parameters
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 91f7a2d437b9370bc2932125e0c17384cd9aac44 ]

1. Clean up unused function parameters.
2. Declare no external referenced function as static and remove
   their prototype from the header file.

Fixes: ec77c6298301 ("net/bnxt: add stats context allocation")
Fixes: 200b64ba0be8 ("net/bnxt: free statistics context")

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_hwrm.c | 10 ++++------
 drivers/net/bnxt/bnxt_hwrm.h |  4 ----
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 67509dc8f9..5ed38c9427 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1771,8 +1771,7 @@ int bnxt_hwrm_stat_clear(struct bnxt *bp, struct bnxt_cp_ring_info *cpr)
 	return rc;
 }
 
-int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
-				unsigned int idx __rte_unused)
+static int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp, struct bnxt_cp_ring_info *cpr)
 {
 	int rc;
 	struct hwrm_stat_ctx_alloc_input req = {.req_type = 0 };
@@ -1795,8 +1794,7 @@ int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
 	return rc;
 }
 
-int bnxt_hwrm_stat_ctx_free(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
-				unsigned int idx __rte_unused)
+static int bnxt_hwrm_stat_ctx_free(struct bnxt *bp, struct bnxt_cp_ring_info *cpr)
 {
 	int rc;
 	struct hwrm_stat_ctx_free_input req = {.req_type = 0 };
@@ -2461,7 +2459,7 @@ bnxt_free_all_hwrm_stat_ctxs(struct bnxt *bp)
 				bp->grp_info[i].fw_stats_ctx = -1;
 		}
 		if (cpr->hw_stats_ctx_id != HWRM_NA_SIGNATURE) {
-			rc = bnxt_hwrm_stat_ctx_free(bp, cpr, i);
+			rc = bnxt_hwrm_stat_ctx_free(bp, cpr);
 			cpr->hw_stats_ctx_id = HWRM_NA_SIGNATURE;
 			if (rc)
 				return rc;
@@ -2488,7 +2486,7 @@ int bnxt_alloc_all_hwrm_stat_ctxs(struct bnxt *bp)
 			cpr = rxq->cp_ring;
 		}
 
-		rc = bnxt_hwrm_stat_ctx_alloc(bp, cpr, i);
+		rc = bnxt_hwrm_stat_ctx_alloc(bp, cpr);
 
 		if (rc)
 			return rc;
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index dbde8f69fb..a67a17b3d4 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -165,10 +165,6 @@ int bnxt_hwrm_ring_grp_alloc(struct bnxt *bp, unsigned int idx);
 int bnxt_hwrm_ring_grp_free(struct bnxt *bp, unsigned int idx);
 
 int bnxt_hwrm_stat_clear(struct bnxt *bp, struct bnxt_cp_ring_info *cpr);
-int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp,
-			     struct bnxt_cp_ring_info *cpr, unsigned int idx);
-int bnxt_hwrm_stat_ctx_free(struct bnxt *bp,
-			    struct bnxt_cp_ring_info *cpr, unsigned int idx);
 int bnxt_hwrm_ctx_qstats(struct bnxt *bp, uint32_t cid, int idx,
 			 struct rte_eth_stats *stats, uint8_t rx);
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.700289800 +0800
+++ 0040-net-bnxt-remove-unused-function-parameters.patch	2021-06-12 06:53:56.200000000 +0800
@@ -1 +1 @@
-From 91f7a2d437b9370bc2932125e0c17384cd9aac44 Mon Sep 17 00:00:00 2001
+From 52d2337eac089e365c240e532bb38f45c220c8f5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 91f7a2d437b9370bc2932125e0c17384cd9aac44 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index cb2064dd57..931ecea77c 100644
+index 67509dc8f9..5ed38c9427 100644
@@ -26 +28 @@
-@@ -1899,8 +1899,7 @@ int bnxt_hwrm_stat_clear(struct bnxt *bp, struct bnxt_cp_ring_info *cpr)
+@@ -1771,8 +1771,7 @@ int bnxt_hwrm_stat_clear(struct bnxt *bp, struct bnxt_cp_ring_info *cpr)
@@ -36 +38 @@
-@@ -1923,8 +1922,7 @@ int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
+@@ -1795,8 +1794,7 @@ int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
@@ -46 +48 @@
-@@ -2594,7 +2592,7 @@ bnxt_free_all_hwrm_stat_ctxs(struct bnxt *bp)
+@@ -2461,7 +2459,7 @@ bnxt_free_all_hwrm_stat_ctxs(struct bnxt *bp)
@@ -55 +57 @@
-@@ -2621,7 +2619,7 @@ int bnxt_alloc_all_hwrm_stat_ctxs(struct bnxt *bp)
+@@ -2488,7 +2486,7 @@ int bnxt_alloc_all_hwrm_stat_ctxs(struct bnxt *bp)
@@ -65 +67 @@
-index d9771eabd3..90aff0c2de 100644
+index dbde8f69fb..a67a17b3d4 100644
@@ -68 +70 @@
-@@ -168,10 +168,6 @@ int bnxt_hwrm_ring_grp_alloc(struct bnxt *bp, unsigned int idx);
+@@ -165,10 +165,6 @@ int bnxt_hwrm_ring_grp_alloc(struct bnxt *bp, unsigned int idx);

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/bnxt: use prefix on global function' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (38 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: remove unused function parameters' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/mlx5: remove drop queue function prototypes' " Xueming Li
                       ` (137 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Luca Boccassi, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8965b6689600dbe98b8a970029b37616ec233e1a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8965b6689600dbe98b8a970029b37616ec233e1a Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 23 Apr 2021 14:04:44 -0700
Subject: [PATCH] net/bnxt: use prefix on global function
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit c02bbaa96b9f585021e02530ed4c7748f0db9188 ]

When statically linked the function prandom_bytes is exposed
and might conflict with something in application. All driver
functions should use the same prefix.

Fixes: 9738793f28ec ("net/bnxt: add VNIC functions and structs")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_flow.c | 4 ++--
 drivers/net/bnxt/bnxt_vnic.c | 4 ++--
 drivers/net/bnxt/bnxt_vnic.h | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index 514a5ed433..b8020d9e98 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -1397,8 +1397,8 @@ use_vnic:
 				/* If hash key has not been specified,
 				 * use random hash key.
 				 */
-				prandom_bytes(vnic->rss_hash_key,
-					      HW_HASH_KEY_SIZE);
+				bnxt_prandom_bytes(vnic->rss_hash_key,
+						   HW_HASH_KEY_SIZE);
 			} else {
 				if (rss->key_len > HW_HASH_KEY_SIZE)
 					memcpy(vnic->rss_hash_key,
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index 1602fb2b88..007f7e93c9 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -16,7 +16,7 @@
  * VNIC Functions
  */
 
-void prandom_bytes(void *dest_ptr, size_t len)
+void bnxt_prandom_bytes(void *dest_ptr, size_t len)
 {
 	char *dest = (char *)dest_ptr;
 	uint64_t rb;
@@ -172,7 +172,7 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp)
 				HW_HASH_KEY_SIZE);
 		vnic->mc_list_dma_addr = vnic->rss_hash_key_dma_addr +
 				HW_HASH_KEY_SIZE;
-		prandom_bytes(vnic->rss_hash_key, HW_HASH_KEY_SIZE);
+		bnxt_prandom_bytes(vnic->rss_hash_key, HW_HASH_KEY_SIZE);
 	}
 
 	return 0;
diff --git a/drivers/net/bnxt/bnxt_vnic.h b/drivers/net/bnxt/bnxt_vnic.h
index f173a02f97..07c7aeac0d 100644
--- a/drivers/net/bnxt/bnxt_vnic.h
+++ b/drivers/net/bnxt/bnxt_vnic.h
@@ -68,7 +68,7 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp);
 void bnxt_free_vnic_mem(struct bnxt *bp);
 int bnxt_alloc_vnic_mem(struct bnxt *bp);
 int bnxt_vnic_grp_alloc(struct bnxt *bp, struct bnxt_vnic_info *vnic);
-void prandom_bytes(void *dest_ptr, size_t len);
+void bnxt_prandom_bytes(void *dest_ptr, size_t len);
 uint16_t bnxt_rte_to_hwrm_hash_types(uint64_t rte_type);
 int bnxt_rte_to_hwrm_hash_level(struct bnxt *bp, uint64_t hash_f, uint32_t lvl);
 uint64_t bnxt_hwrm_to_rte_rss_level(struct bnxt *bp, uint32_t mode);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.724775900 +0800
+++ 0041-net-bnxt-use-prefix-on-global-function.patch	2021-06-12 06:53:56.200000000 +0800
@@ -1 +1 @@
-From c02bbaa96b9f585021e02530ed4c7748f0db9188 Mon Sep 17 00:00:00 2001
+From 8965b6689600dbe98b8a970029b37616ec233e1a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit c02bbaa96b9f585021e02530ed4c7748f0db9188 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index e3906b4779..844bf1520f 100644
+index 514a5ed433..b8020d9e98 100644
@@ -25 +27 @@
-@@ -1404,8 +1404,8 @@ skip_vnic_alloc:
+@@ -1397,8 +1397,8 @@ use_vnic:
@@ -37 +39 @@
-index 14ad33b4e8..de5c14566d 100644
+index 1602fb2b88..007f7e93c9 100644
@@ -59 +61 @@
-index 00a664c8b8..37b452f281 100644
+index f173a02f97..07c7aeac0d 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/mlx5: remove drop queue function prototypes' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (39 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: use prefix on global function' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/mlx4: fix buffer leakage on device close' " Xueming Li
                       ` (136 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/04475743c84f76ba8d9cebeb31cf2e83619f91c3

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 04475743c84f76ba8d9cebeb31cf2e83619f91c3 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Mon, 5 Apr 2021 10:07:16 +0000
Subject: [PATCH] net/mlx5: remove drop queue function prototypes
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit a4af5eed4091f74c10381f1e5d5ec1a058f19a9a ]

There are some leftovers of removed code - there are
no drop queue handling routines anymore.

Fixes: 78be885295b8 ("net/mlx5: handle drop queues as regular queues")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index cd701880ee..35f9bece05 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -1217,8 +1217,6 @@ int mlx5_ctrl_flow(struct rte_eth_dev *dev,
 		   struct rte_flow_item_eth *eth_mask);
 int mlx5_flow_lacp_miss(struct rte_eth_dev *dev);
 struct rte_flow *mlx5_flow_create_esw_table_zero_flow(struct rte_eth_dev *dev);
-int mlx5_flow_create_drop_queue(struct rte_eth_dev *dev);
-void mlx5_flow_delete_drop_queue(struct rte_eth_dev *dev);
 void mlx5_flow_async_pool_query_handle(struct mlx5_dev_ctx_shared *sh,
 				       uint64_t async_id, int status);
 void mlx5_set_query_alarm(struct mlx5_dev_ctx_shared *sh);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.747492100 +0800
+++ 0042-net-mlx5-remove-drop-queue-function-prototypes.patch	2021-06-12 06:53:56.200000000 +0800
@@ -1 +1 @@
-From a4af5eed4091f74c10381f1e5d5ec1a058f19a9a Mon Sep 17 00:00:00 2001
+From 04475743c84f76ba8d9cebeb31cf2e83619f91c3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit a4af5eed4091f74c10381f1e5d5ec1a058f19a9a ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 378b68e4be..d4aec717f0 100644
+index cd701880ee..35f9bece05 100644
@@ -21 +23 @@
-@@ -1544,8 +1544,6 @@ int mlx5_ctrl_flow(struct rte_eth_dev *dev,
+@@ -1217,8 +1217,6 @@ int mlx5_ctrl_flow(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/mlx4: fix buffer leakage on device close' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (40 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/mlx5: remove drop queue function prototypes' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/mlx5: fix probing device in legacy bonding mode' " Xueming Li
                       ` (135 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1c43f69982f8ca627c4ccb5bbac68b980ef85a3e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1c43f69982f8ca627c4ccb5bbac68b980ef85a3e Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Sat, 17 Apr 2021 20:14:14 +0300
Subject: [PATCH] net/mlx4: fix buffer leakage on device close
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit b014c6b7b595277860308468c4c12a9337bf132e ]

The mlx4 PMD tracks the buffers (mbufs) for the packets being
transmitted in the dedicated array named as "elts". The tx_burst
routine frees the mbufs from this array once it needs to rearm
the hardware descriptor and store the new mbuf, so it looks
like as replacement mbuf pointer in the elts array.

On the device stop mlx4 PMD freed only the part of elts according
tail and head pointers, leaking the rest of buffers, remained in
the elts array.

Fixes: a2ce2121c01c ("net/mlx4: separate Tx configuration functions")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx4/mlx4_rxtx.c |  4 ----
 drivers/net/mlx4/mlx4_txq.c  | 19 +++++++++----------
 2 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/drivers/net/mlx4/mlx4_rxtx.c b/drivers/net/mlx4/mlx4_rxtx.c
index adc1c9bf81..ecf08f53cf 100644
--- a/drivers/net/mlx4/mlx4_rxtx.c
+++ b/drivers/net/mlx4/mlx4_rxtx.c
@@ -921,10 +921,6 @@ mlx4_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n)
 		if (likely(elt->buf != NULL)) {
 			struct rte_mbuf *tmp = elt->buf;
 
-#ifdef RTE_LIBRTE_MLX4_DEBUG
-			/* Poisoning. */
-			memset(&elt->buf, 0x66, sizeof(struct rte_mbuf *));
-#endif
 			/* Faster than rte_pktmbuf_free(). */
 			do {
 				struct rte_mbuf *next = tmp->next;
diff --git a/drivers/net/mlx4/mlx4_txq.c b/drivers/net/mlx4/mlx4_txq.c
index 60560d9545..cc5200a1e1 100644
--- a/drivers/net/mlx4/mlx4_txq.c
+++ b/drivers/net/mlx4/mlx4_txq.c
@@ -206,19 +206,18 @@ mlx4_tx_uar_uninit_secondary(struct rte_eth_dev *dev __rte_unused)
 static void
 mlx4_txq_free_elts(struct txq *txq)
 {
-	unsigned int elts_head = txq->elts_head;
-	unsigned int elts_tail = txq->elts_tail;
 	struct txq_elt (*elts)[txq->elts_n] = txq->elts;
-	unsigned int elts_m = txq->elts_n - 1;
+	unsigned int n = txq->elts_n;
 
-	DEBUG("%p: freeing WRs", (void *)txq);
-	while (elts_tail != elts_head) {
-		struct txq_elt *elt = &(*elts)[elts_tail++ & elts_m];
+	DEBUG("%p: freeing WRs, %u", (void *)txq, n);
+	while (n--) {
+		struct txq_elt *elt = &(*elts)[n];
 
-		MLX4_ASSERT(elt->buf != NULL);
-		rte_pktmbuf_free(elt->buf);
-		elt->buf = NULL;
-		elt->wqe = NULL;
+		if (elt->buf) {
+			rte_pktmbuf_free(elt->buf);
+			elt->buf = NULL;
+			elt->wqe = NULL;
+		}
 	}
 	txq->elts_tail = txq->elts_head;
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.771358900 +0800
+++ 0043-net-mlx4-fix-buffer-leakage-on-device-close.patch	2021-06-12 06:53:56.210000000 +0800
@@ -1 +1 @@
-From b014c6b7b595277860308468c4c12a9337bf132e Mon Sep 17 00:00:00 2001
+From 1c43f69982f8ca627c4ccb5bbac68b980ef85a3e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit b014c6b7b595277860308468c4c12a9337bf132e ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -41 +43 @@
-index 31ab308050..2df26842fb 100644
+index 60560d9545..cc5200a1e1 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix probing device in legacy bonding mode' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (41 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/mlx4: fix buffer leakage on device close' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: fix link status when port is stopped' " Xueming Li
                       ` (134 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/47b2b44b9fcc3aee99a3a93e24614f1910225098

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 47b2b44b9fcc3aee99a3a93e24614f1910225098 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Date: Wed, 21 Apr 2021 08:10:13 +0000
Subject: [PATCH] net/mlx5: fix probing device in legacy bonding mode
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit ecaee305b811036d297eda04ad7c91d8349de77e ]

If the device was configured as legacy bond one (without
involving E-Switch), the mlx5 PMD erroneously tried to deduce
the vport index raising the fatal error and preventing
device from being used.

The patch checks whether there is E-Switch present and we
should use vport index indeed.

Fixes: 2eb4d0107acc ("net/mlx5: refactor PCI probing on Linux")
Fixes: d5c06b1b10ae ("net/mlx5: query vport index match mode and parameters")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index b907e6de16..8ba6f03de0 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -982,7 +982,8 @@ err_secondary:
 	}
 	if (devx_port.comp_mask & MLX5DV_DEVX_PORT_VPORT) {
 		priv->vport_id = devx_port.vport_num;
-	} else if (spawn->pf_bond >= 0) {
+	} else if (spawn->pf_bond >= 0 &&
+		   (switch_info->representor || switch_info->master)) {
 		DRV_LOG(ERR, "can't deduce vport index for port %d"
 			     " on bonding device %s",
 			     spawn->phys_port,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.791637600 +0800
+++ 0044-net-mlx5-fix-probing-device-in-legacy-bonding-mode.patch	2021-06-12 06:53:56.210000000 +0800
@@ -1 +1 @@
-From ecaee305b811036d297eda04ad7c91d8349de77e Mon Sep 17 00:00:00 2001
+From 47b2b44b9fcc3aee99a3a93e24614f1910225098 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit ecaee305b811036d297eda04ad7c91d8349de77e ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 17d0533c1b..479ee7d8d1 100644
+index b907e6de16..8ba6f03de0 100644
@@ -27 +29 @@
-@@ -1097,7 +1097,8 @@ err_secondary:
+@@ -982,7 +982,8 @@ err_secondary:

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix link status when port is stopped' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (42 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/mlx5: fix probing device in legacy bonding mode' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: fix link speed when port is down' " Xueming Li
                       ` (133 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3502d412a050f848da6c946f605a5362fe48decc

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3502d412a050f848da6c946f605a5362fe48decc Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Sun, 25 Apr 2021 20:06:28 +0800
Subject: [PATCH] net/hns3: fix link status when port is stopped
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 64308555d5bf8d7da8c3bde7d9c32550ac9c4382 ]

When port is stopped, link down should be reported to user. For HNS3
PF driver, link status comes from link status of hardware. If the port
supports NCSI feature, hardware MAC will not be disabled. At this case,
even if the port is stopped, the link status is still Up. So driver
should set link down when the port is stopped.

Fixes: 59fad0f32135 ("net/hns3: support link update operation")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 8e4692385d..01ff8de7f7 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2709,6 +2709,15 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev,
 	struct rte_eth_link new_link;
 	int ret;
 
+	/* When port is stopped, report link down. */
+	if (eth_dev->data->dev_started == 0) {
+		new_link.link_autoneg = mac->link_autoneg;
+		new_link.link_duplex = mac->link_duplex;
+		new_link.link_speed = ETH_SPEED_NUM_NONE;
+		new_link.link_status = ETH_LINK_DOWN;
+		goto out;
+	}
+
 	ret = hns3_update_port_link_info(eth_dev);
 	if (ret) {
 		mac->link_status = ETH_LINK_DOWN;
@@ -2718,6 +2727,7 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev,
 	memset(&new_link, 0, sizeof(new_link));
 	hns3_setup_linkstatus(eth_dev, &new_link);
 
+out:
 	return rte_eth_linkstatus_set(eth_dev, &new_link);
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.814085000 +0800
+++ 0045-net-hns3-fix-link-status-when-port-is-stopped.patch	2021-06-12 06:53:56.220000000 +0800
@@ -1 +1 @@
-From 64308555d5bf8d7da8c3bde7d9c32550ac9c4382 Mon Sep 17 00:00:00 2001
+From 3502d412a050f848da6c946f605a5362fe48decc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 64308555d5bf8d7da8c3bde7d9c32550ac9c4382 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index e3f1b7c3ad..63ae555c9d 100644
+index 8e4692385d..01ff8de7f7 100644
@@ -25 +27 @@
-@@ -2897,6 +2897,15 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete)
+@@ -2709,6 +2709,15 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev,
@@ -38,4 +40,4 @@
- 	do {
- 		ret = hns3_update_port_link_info(eth_dev);
- 		if (ret) {
-@@ -2914,6 +2923,7 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete)
+ 	ret = hns3_update_port_link_info(eth_dev);
+ 	if (ret) {
+ 		mac->link_status = ETH_LINK_DOWN;
+@@ -2718,6 +2727,7 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev,

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix link speed when port is down' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (43 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: fix link status when port is stopped' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'app/testpmd: fix division by zero on socket memory dump' " Xueming Li
                       ` (132 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/180a37c3ef268f6f1c31b8948bf04f6e9e4281bc

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 180a37c3ef268f6f1c31b8948bf04f6e9e4281bc Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Sun, 25 Apr 2021 20:06:29 +0800
Subject: [PATCH] net/hns3: fix link speed when port is down
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 230d4940ed8e4fc0138fab2fdb2087553b8465dd ]

When the port is link down state, it is meaningless to display the
port link speed. It should be an undefined state.

Fixes: 59fad0f32135 ("net/hns3: support link update operation")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 01ff8de7f7..40e4cfde31 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2684,16 +2684,18 @@ hns3_setup_linkstatus(struct rte_eth_dev *eth_dev,
 	case ETH_SPEED_NUM_50G:
 	case ETH_SPEED_NUM_100G:
 	case ETH_SPEED_NUM_200G:
-		new_link->link_speed = mac->link_speed;
+		if (mac->link_status)
+			new_link->link_speed = mac->link_speed;
 		break;
 	default:
 		if (mac->link_status)
 			new_link->link_speed = ETH_SPEED_NUM_UNKNOWN;
-		else
-			new_link->link_speed = ETH_SPEED_NUM_NONE;
 		break;
 	}
 
+	if (!mac->link_status)
+		new_link->link_speed = ETH_SPEED_NUM_NONE;
+
 	new_link->link_duplex = mac->link_duplex;
 	new_link->link_status = mac->link_status ? ETH_LINK_UP : ETH_LINK_DOWN;
 	new_link->link_autoneg =
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.848319100 +0800
+++ 0046-net-hns3-fix-link-speed-when-port-is-down.patch	2021-06-12 06:53:56.220000000 +0800
@@ -1 +1 @@
-From 230d4940ed8e4fc0138fab2fdb2087553b8465dd Mon Sep 17 00:00:00 2001
+From 180a37c3ef268f6f1c31b8948bf04f6e9e4281bc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 230d4940ed8e4fc0138fab2fdb2087553b8465dd ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 63ae555c9d..a6f4c92e41 100644
+index 01ff8de7f7..40e4cfde31 100644
@@ -22 +24 @@
-@@ -2870,16 +2870,18 @@ hns3_setup_linkstatus(struct rte_eth_dev *eth_dev,
+@@ -2684,16 +2684,18 @@ hns3_setup_linkstatus(struct rte_eth_dev *eth_dev,
@@ -43 +45 @@
- 	new_link->link_autoneg = mac->link_autoneg;
+ 	new_link->link_autoneg =

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'app/testpmd: fix division by zero on socket memory dump' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (44 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: fix link speed when port is down' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/tap: check ioctl on restore' " Xueming Li
                       ` (131 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6af34d2abd298a998de974fdc4d3cdb6f2d63453

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6af34d2abd298a998de974fdc4d3cdb6f2d63453 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Mon, 26 Apr 2021 19:57:57 +0800
Subject: [PATCH] app/testpmd: fix division by zero on socket memory dump
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit a767951e597964e6c02529097edd2b43b5aace4d ]

Variable total, which may be zero and result in segmentation fault.

This patch fixed it.

Fixes: 9b1249d9ff69 ("app/testpmd: support dumping socket memory")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/cmdline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 294031542a..3712daae7b 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -9557,7 +9557,7 @@ dump_socket_mem(FILE *f)
 	fprintf(f,
 		"Total   : size(M) total: %.6lf alloc: %.6lf(%.3lf%%) free: %.6lf \tcount alloc: %-4u free: %u\n",
 		(double)total / (1024 * 1024), (double)alloc / (1024 * 1024),
-		(double)alloc * 100 / (double)total,
+		total ? ((double)alloc * 100 / (double)total) : 0,
 		(double)free / (1024 * 1024),
 		n_alloc, n_free);
 	if (last_allocs)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.874394000 +0800
+++ 0047-app-testpmd-fix-division-by-zero-on-socket-memory-du.patch	2021-06-12 06:53:56.230000000 +0800
@@ -1 +1 @@
-From a767951e597964e6c02529097edd2b43b5aace4d Mon Sep 17 00:00:00 2001
+From 6af34d2abd298a998de974fdc4d3cdb6f2d63453 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit a767951e597964e6c02529097edd2b43b5aace4d ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 5fdcc1ca18..29ee41da5f 100644
+index 294031542a..3712daae7b 100644
@@ -23 +25 @@
-@@ -9731,7 +9731,7 @@ dump_socket_mem(FILE *f)
+@@ -9557,7 +9557,7 @@ dump_socket_mem(FILE *f)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/tap: check ioctl on restore' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (45 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'app/testpmd: fix division by zero on socket memory dump' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/kni: warn on stop failure' " Xueming Li
                       ` (130 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3caffc544754a9ed914795dd4cd5128f3e8fc4cd

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3caffc544754a9ed914795dd4cd5128f3e8fc4cd Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Tue, 27 Apr 2021 08:54:22 +0800
Subject: [PATCH] net/tap: check ioctl on restore
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 8f3ca7f9a8b1df13f06236b8ab2dbed238b65ba4 ]

After restoring the remote states, the return value of ioctl() is not
checked. Therefore, users cannot know whether the remote state is
restored successfully.

This patch add log for restoring failure.

Fixes: 4810d3af8343 ("net/tap: restore state of remote device when closing")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/tap/rte_eth_tap.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 2542de3065..c0a348a641 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1133,8 +1133,11 @@ tap_dev_close(struct rte_eth_dev *dev)
 
 	if (internals->remote_if_index) {
 		/* Restore initial remote state */
-		ioctl(internals->ioctl_sock, SIOCSIFFLAGS,
+		int ret = ioctl(internals->ioctl_sock, SIOCSIFFLAGS,
 				&internals->remote_initial_flags);
+		if (ret)
+			TAP_LOG(ERR, "restore remote state failed: %d", ret);
+
 	}
 
 	rte_mempool_free(internals->gso_ctx_mp);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.904604400 +0800
+++ 0048-net-tap-check-ioctl-on-restore.patch	2021-06-12 06:53:56.240000000 +0800
@@ -1 +1 @@
-From 8f3ca7f9a8b1df13f06236b8ab2dbed238b65ba4 Mon Sep 17 00:00:00 2001
+From 3caffc544754a9ed914795dd4cd5128f3e8fc4cd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 8f3ca7f9a8b1df13f06236b8ab2dbed238b65ba4 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 68baa18523..854abf4b30 100644
+index 2542de3065..c0a348a641 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/kni: warn on stop failure' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (46 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/tap: check ioctl on restore' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'app/testpmd: fix forward lcores number for DCB' " Xueming Li
                       ` (129 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9874e06dc5788832ba924480918fbced7dbd17bb

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9874e06dc5788832ba924480918fbced7dbd17bb Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Tue, 27 Apr 2021 10:08:45 +0800
Subject: [PATCH] net/kni: warn on stop failure
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit b752fb4d626c4a0f4a90f04df3684cb5318c376f ]

Return value of function 'eth_kni_dev_stop' passed to 'ret' is
rewritten later, and this is unreasonable.

This patch fixes it.

Fixes: 62024eb82756 ("ethdev: change stop operation callback to return int")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/kni/rte_eth_kni.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index aae6dcb54e..5d8fb1451a 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -211,6 +211,9 @@ eth_kni_close(struct rte_eth_dev *eth_dev)
 		return 0;
 
 	ret = eth_kni_dev_stop(eth_dev);
+	if (ret)
+		PMD_LOG(WARNING, "Not able to stop kni for %s",
+			eth_dev->data->name);
 
 	/* mac_addrs must not be freed alone because part of dev_private */
 	eth_dev->data->mac_addrs = NULL;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.930095300 +0800
+++ 0049-net-kni-warn-on-stop-failure.patch	2021-06-12 06:53:56.240000000 +0800
@@ -1 +1 @@
-From b752fb4d626c4a0f4a90f04df3684cb5318c376f Mon Sep 17 00:00:00 2001
+From 9874e06dc5788832ba924480918fbced7dbd17bb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit b752fb4d626c4a0f4a90f04df3684cb5318c376f ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 4d2a42ddab..51daf08591 100644
+index aae6dcb54e..5d8fb1451a 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'app/testpmd: fix forward lcores number for DCB' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (47 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/kni: warn on stop failure' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'app/testpmd: fix DCB forwarding configuration' " Xueming Li
                       ` (128 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Lijun Ou, Xiaoyun Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/95d258ab144bbbaf5198bd48f8d75f08a4d6dcdf

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 95d258ab144bbbaf5198bd48f8d75f08a4d6dcdf Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 28 Apr 2021 14:40:40 +0800
Subject: [PATCH] app/testpmd: fix forward lcores number for DCB
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 9ee7d02ad467c1bd1058a61753a8ef31d2313e41 ]

For the DCB forwarding test, each core is assigned to each traffic class.
Number of forwarding cores for DCB test must be equal or less than number
of total TC. Otherwise, the following problems may occur:
1/ Redundant polling threads will be created when forwarding cores number
   is greater than total TC number.
2/ Two cores would try to use a same queue on a port when Rx/Tx queue
   number is greater than the used TC number, which is not allowed.

Fixes: 900550de04a7 ("app/testpmd: add dcb support")
Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 app/test-pmd/config.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index cb97963157..fc64fcdb86 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3153,6 +3153,21 @@ rss_fwd_config_setup(void)
 	}
 }
 
+static uint16_t
+get_fwd_port_total_tc_num(void)
+{
+	struct rte_eth_dcb_info dcb_info;
+	uint16_t total_tc_num = 0;
+	unsigned int i;
+
+	for (i = 0; i < nb_fwd_ports; i++) {
+		(void)rte_eth_dev_get_dcb_info(fwd_ports_ids[i], &dcb_info);
+		total_tc_num += dcb_info.nb_tcs;
+	}
+
+	return total_tc_num;
+}
+
 /**
  * For the DCB forwarding test, each core is assigned on each traffic class.
  *
@@ -3172,12 +3187,16 @@ dcb_fwd_config_setup(void)
 	lcoreid_t  lc_id;
 	uint16_t nb_rx_queue, nb_tx_queue;
 	uint16_t i, j, k, sm_id = 0;
+	uint16_t total_tc_num;
 	uint8_t tc = 0;
 
 	cur_fwd_config.nb_fwd_lcores = (lcoreid_t) nb_fwd_lcores;
 	cur_fwd_config.nb_fwd_ports = nb_fwd_ports;
 	cur_fwd_config.nb_fwd_streams =
 		(streamid_t) (nb_rxq * cur_fwd_config.nb_fwd_ports);
+	total_tc_num = get_fwd_port_total_tc_num();
+	if (cur_fwd_config.nb_fwd_lcores > total_tc_num)
+		cur_fwd_config.nb_fwd_lcores = total_tc_num;
 
 	/* reinitialize forwarding streams */
 	init_fwd_streams();
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.950805500 +0800
+++ 0050-app-testpmd-fix-forward-lcores-number-for-DCB.patch	2021-06-12 06:53:56.240000000 +0800
@@ -1 +1 @@
-From 9ee7d02ad467c1bd1058a61753a8ef31d2313e41 Mon Sep 17 00:00:00 2001
+From 95d258ab144bbbaf5198bd48f8d75f08a4d6dcdf Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 9ee7d02ad467c1bd1058a61753a8ef31d2313e41 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index a4445a73bf..39c0b80a5b 100644
+index cb97963157..fc64fcdb86 100644
@@ -29 +31 @@
-@@ -3008,6 +3008,21 @@ rss_fwd_config_setup(void)
+@@ -3153,6 +3153,21 @@ rss_fwd_config_setup(void)
@@ -51 +53 @@
-@@ -3027,12 +3042,16 @@ dcb_fwd_config_setup(void)
+@@ -3172,12 +3187,16 @@ dcb_fwd_config_setup(void)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'app/testpmd: fix DCB forwarding configuration' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (48 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'app/testpmd: fix forward lcores number for DCB' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'app/testpmd: fix DCB re-configuration' " Xueming Li
                       ` (127 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Lijun Ou, Xiaoyun Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a3da20734911a0a28ab97fafd1e7c4b464e69cc0

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a3da20734911a0a28ab97fafd1e7c4b464e69cc0 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 28 Apr 2021 14:40:41 +0800
Subject: [PATCH] app/testpmd: fix DCB forwarding configuration
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit a690a070a4f7bc25000a6ba6c71023c29c9d26d4 ]

After DCB mode is configured, the operations of port stop and port start
change the value of the global variable "dcb_test", As a result, the
forwarding configuration from DCB to RSS mode, namely,
“dcb_fwd_config_setup()” to "rss_fwd_config_setup()".

Currently, the 'dcb_flag' field in struct 'rte_port' indicates whether
the port is configured with DCB. And it is sufficient to have
'dcb_config' as a global variable to control the DCB test status. So
this patch deletes the "dcb_test".

In addition, setting 'dcb_config' at the end of init_port_dcb_config()
in case that ports fail to enter DCB mode.

Fixes: 900550de04a7 ("app/testpmd: add dcb support")
Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings")
Fixes: 7741e4cf16c0 ("app/testpmd: VMDq and DCB updates")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 app/test-pmd/testpmd.c | 18 ++++--------------
 app/test-pmd/testpmd.h |  1 -
 2 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 555852ae5e..a419929f52 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -245,9 +245,6 @@ uint16_t mb_mempool_cache = DEF_MBUF_CACHE; /**< Size of mbuf mempool cache. */
 /* current configuration is in DCB or not,0 means it is not in DCB mode */
 uint8_t dcb_config = 0;
 
-/* Whether the dcb is in testing status */
-uint8_t dcb_test = 0;
-
 /*
  * Configurable number of RX/TX queues.
  */
@@ -2149,8 +2146,7 @@ start_packet_forwarding(int with_tx_first)
 		return;
 	}
 
-
-	if(dcb_test) {
+	if (dcb_config) {
 		for (i = 0; i < nb_fwd_ports; i++) {
 			pt_id = fwd_ports_ids[i];
 			port = &ports[pt_id];
@@ -2458,8 +2454,6 @@ start_port(portid_t pid)
 	if (port_id_is_invalid(pid, ENABLED_WARN))
 		return 0;
 
-	if(dcb_config)
-		dcb_test = 1;
 	RTE_ETH_FOREACH_DEV(pi) {
 		if (pid != pi && pid != (portid_t)RTE_PORT_ALL)
 			continue;
@@ -2697,11 +2691,6 @@ stop_port(portid_t pid)
 	portid_t peer_pl[RTE_MAX_ETHPORTS];
 	int peer_pi;
 
-	if (dcb_test) {
-		dcb_test = 0;
-		dcb_config = 0;
-	}
-
 	if (port_id_is_invalid(pid, ENABLED_WARN))
 		return;
 
@@ -3604,8 +3593,6 @@ init_port_dcb_config(portid_t pid,
 	rte_port = &ports[pid];
 
 	memset(&port_conf, 0, sizeof(struct rte_eth_conf));
-	/* Enter DCB configuration status */
-	dcb_config = 1;
 
 	port_conf.rxmode = rte_port->dev_conf.rxmode;
 	port_conf.txmode = rte_port->dev_conf.txmode;
@@ -3673,6 +3660,9 @@ init_port_dcb_config(portid_t pid,
 
 	rte_port->dcb_flag = 1;
 
+	/* Enter DCB configuration status */
+	dcb_config = 1;
+
 	return 0;
 }
 
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 1c276f4644..aad2eb30f4 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -423,7 +423,6 @@ extern uint64_t noisy_lkup_num_reads;
 extern uint64_t noisy_lkup_num_reads_writes;
 
 extern uint8_t dcb_config;
-extern uint8_t dcb_test;
 
 extern uint32_t mbuf_data_size_n;
 extern uint16_t mbuf_data_size[MAX_SEGS_BUFFER_SPLIT];
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:57.973151500 +0800
+++ 0051-app-testpmd-fix-DCB-forwarding-configuration.patch	2021-06-12 06:53:56.250000000 +0800
@@ -1 +1 @@
-From a690a070a4f7bc25000a6ba6c71023c29c9d26d4 Mon Sep 17 00:00:00 2001
+From a3da20734911a0a28ab97fafd1e7c4b464e69cc0 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit a690a070a4f7bc25000a6ba6c71023c29c9d26d4 ]
@@ -25 +27,0 @@
-Cc: stable@dpdk.org
@@ -36 +38 @@
-index d4be23f8f8..a076b1dcde 100644
+index 555852ae5e..a419929f52 100644
@@ -39 +41 @@
-@@ -246,9 +246,6 @@ uint16_t mb_mempool_cache = DEF_MBUF_CACHE; /**< Size of mbuf mempool cache. */
+@@ -245,9 +245,6 @@ uint16_t mb_mempool_cache = DEF_MBUF_CACHE; /**< Size of mbuf mempool cache. */
@@ -49 +51 @@
-@@ -2167,8 +2164,7 @@ start_packet_forwarding(int with_tx_first)
+@@ -2149,8 +2146,7 @@ start_packet_forwarding(int with_tx_first)
@@ -59 +61 @@
-@@ -2476,8 +2472,6 @@ start_port(portid_t pid)
+@@ -2458,8 +2454,6 @@ start_port(portid_t pid)
@@ -68 +70 @@
-@@ -2717,11 +2711,6 @@ stop_port(portid_t pid)
+@@ -2697,11 +2691,6 @@ stop_port(portid_t pid)
@@ -80 +82 @@
-@@ -3625,8 +3614,6 @@ init_port_dcb_config(portid_t pid,
+@@ -3604,8 +3593,6 @@ init_port_dcb_config(portid_t pid,
@@ -89 +91 @@
-@@ -3694,6 +3681,9 @@ init_port_dcb_config(portid_t pid,
+@@ -3673,6 +3660,9 @@ init_port_dcb_config(portid_t pid,
@@ -100 +102 @@
-index 6ca872db82..283b5e3680 100644
+index 1c276f4644..aad2eb30f4 100644
@@ -103 +105 @@
-@@ -425,7 +425,6 @@ extern uint64_t noisy_lkup_num_reads;
+@@ -423,7 +423,6 @@ extern uint64_t noisy_lkup_num_reads;

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'app/testpmd: fix DCB re-configuration' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (49 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'app/testpmd: fix DCB forwarding configuration' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'app/testpmd: verify DCB config during forward config' " Xueming Li
                       ` (126 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Lijun Ou, Xiaoyun Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/313bd50dab1ae2870a30e8c683950159a3a4178c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 313bd50dab1ae2870a30e8c683950159a3a4178c Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 28 Apr 2021 14:40:42 +0800
Subject: [PATCH] app/testpmd: fix DCB re-configuration
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 5cbbcbad652848b8ecdf26d1d8bf1ea5c794edda ]

After DCB mode is configured, if we decrease the number of RX and TX
queues, fwd_config_setup() will be called to setup the DCB forwarding
configuration. And forwarding streams are updated based on new queue
numbers in fwd_config_setup(), but the mapping between the TC and
queues obtained by rte_eth_dev_get_dcb_info() is still old queue
numbers (old queue numbers are greater than new queue numbers).
In this case, the segment fault happens. So rte_eth_dev_configure()
should be called again to update the mapping between the TC and
queues before rte_eth_dev_get_dcb_info().

Like:
set nbcore 4
port stop all
port config 0 dcb vt off 4 pfc on
port start all
port stop all
port config all rxq 8
port config all txq 8

Fixes: 900550de04a7 ("app/testpmd: add dcb support")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 app/test-pmd/config.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index fc64fcdb86..1397b31326 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3188,7 +3188,33 @@ dcb_fwd_config_setup(void)
 	uint16_t nb_rx_queue, nb_tx_queue;
 	uint16_t i, j, k, sm_id = 0;
 	uint16_t total_tc_num;
+	struct rte_port *port;
 	uint8_t tc = 0;
+	portid_t pid;
+	int ret;
+
+	/*
+	 * The fwd_config_setup() is called when the port is RTE_PORT_STARTED
+	 * or RTE_PORT_STOPPED.
+	 *
+	 * Re-configure ports to get updated mapping between tc and queue in
+	 * case the queue number of the port is changed. Skip for started ports
+	 * since modifying queue number and calling dev_configure need to stop
+	 * ports first.
+	 */
+	for (pid = 0; pid < nb_fwd_ports; pid++) {
+		if (port_is_started(pid) == 1)
+			continue;
+
+		port = &ports[pid];
+		ret = rte_eth_dev_configure(pid, nb_rxq, nb_txq,
+					    &port->dev_conf);
+		if (ret < 0) {
+			printf("Failed to re-configure port %d, ret = %d.\n",
+				pid, ret);
+			return;
+		}
+	}
 
 	cur_fwd_config.nb_fwd_lcores = (lcoreid_t) nb_fwd_lcores;
 	cur_fwd_config.nb_fwd_ports = nb_fwd_ports;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.000958500 +0800
+++ 0052-app-testpmd-fix-DCB-re-configuration.patch	2021-06-12 06:53:56.250000000 +0800
@@ -1 +1 @@
-From 5cbbcbad652848b8ecdf26d1d8bf1ea5c794edda Mon Sep 17 00:00:00 2001
+From 313bd50dab1ae2870a30e8c683950159a3a4178c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 5cbbcbad652848b8ecdf26d1d8bf1ea5c794edda ]
@@ -26 +28,0 @@
-Cc: stable@dpdk.org
@@ -36 +38 @@
-index 39c0b80a5b..bbf039de76 100644
+index fc64fcdb86..1397b31326 100644
@@ -39 +41 @@
-@@ -3043,7 +3043,33 @@ dcb_fwd_config_setup(void)
+@@ -3188,7 +3188,33 @@ dcb_fwd_config_setup(void)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'app/testpmd: verify DCB config during forward config' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (50 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'app/testpmd: fix DCB re-configuration' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: log time delta in decimal format' " Xueming Li
                       ` (125 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Lijun Ou, Xiaoyun Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1f6d0c6f6c460c8ed720cd5f198a191c09b864dd

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1f6d0c6f6c460c8ed720cd5f198a191c09b864dd Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Wed, 28 Apr 2021 14:40:44 +0800
Subject: [PATCH] app/testpmd: verify DCB config during forward config
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 43f1f8261136852357057b78aa49d354beaf3931 ]

Currently, the check for doing DCB test is assigned to
start_packet_forwarding(), which will be called when
run "start" cmd. But fwd_config_setup() is used in many
scenarios, such as, "port config all rxq".

This patch moves the check from start_packet_forwarding()
to fwd_config_setup().

Fixes: 7741e4cf16c0 ("app/testpmd: VMDq and DCB updates")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 app/test-pmd/config.c  | 23 +++++++++++++++++++++--
 app/test-pmd/testpmd.c | 19 -------------------
 2 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 1397b31326..25c2340d74 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3344,6 +3344,10 @@ icmp_echo_config_setup(void)
 void
 fwd_config_setup(void)
 {
+	struct rte_port *port;
+	portid_t pt_id;
+	unsigned int i;
+
 	cur_fwd_config.fwd_eng = cur_fwd_eng;
 	if (strcmp(cur_fwd_eng->fwd_mode_name, "icmpecho") == 0) {
 		icmp_echo_config_setup();
@@ -3351,9 +3355,24 @@ fwd_config_setup(void)
 	}
 
 	if ((nb_rxq > 1) && (nb_txq > 1)){
-		if (dcb_config)
+		if (dcb_config) {
+			for (i = 0; i < nb_fwd_ports; i++) {
+				pt_id = fwd_ports_ids[i];
+				port = &ports[pt_id];
+				if (!port->dcb_flag) {
+					printf("In DCB mode, all forwarding ports must "
+						"be configured in this mode.\n");
+					return;
+				}
+			}
+			if (nb_fwd_lcores == 1) {
+				printf("In DCB mode,the nb forwarding cores "
+					"should be larger than 1.\n");
+				return;
+			}
+
 			dcb_fwd_config_setup();
-		else
+		} else
 			rss_fwd_config_setup();
 	}
 	else
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index a419929f52..d830fe3a2f 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2120,9 +2120,7 @@ start_packet_forwarding(int with_tx_first)
 {
 	port_fwd_begin_t port_fwd_begin;
 	port_fwd_end_t  port_fwd_end;
-	struct rte_port *port;
 	unsigned int i;
-	portid_t   pt_id;
 
 	if (strcmp(cur_fwd_eng->fwd_mode_name, "rxonly") == 0 && !nb_rxq)
 		rte_exit(EXIT_FAILURE, "rxq are 0, cannot use rxonly fwd mode\n");
@@ -2145,23 +2143,6 @@ start_packet_forwarding(int with_tx_first)
 		printf("Packet forwarding already started\n");
 		return;
 	}
-
-	if (dcb_config) {
-		for (i = 0; i < nb_fwd_ports; i++) {
-			pt_id = fwd_ports_ids[i];
-			port = &ports[pt_id];
-			if (!port->dcb_flag) {
-				printf("In DCB mode, all forwarding ports must "
-                                       "be configured in this mode.\n");
-				return;
-			}
-		}
-		if (nb_fwd_lcores == 1) {
-			printf("In DCB mode,the nb forwarding cores "
-                               "should be larger than 1.\n");
-			return;
-		}
-	}
 	test_done = 0;
 
 	fwd_config_setup();
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.024893300 +0800
+++ 0053-app-testpmd-verify-DCB-config-during-forward-config.patch	2021-06-12 06:53:56.260000000 +0800
@@ -1 +1 @@
-From 43f1f8261136852357057b78aa49d354beaf3931 Mon Sep 17 00:00:00 2001
+From 1f6d0c6f6c460c8ed720cd5f198a191c09b864dd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 43f1f8261136852357057b78aa49d354beaf3931 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index bbf039de76..fc057e5687 100644
+index 1397b31326..25c2340d74 100644
@@ -29 +31 @@
-@@ -3199,6 +3199,10 @@ icmp_echo_config_setup(void)
+@@ -3344,6 +3344,10 @@ icmp_echo_config_setup(void)
@@ -40 +42 @@
-@@ -3206,9 +3210,24 @@ fwd_config_setup(void)
+@@ -3351,9 +3355,24 @@ fwd_config_setup(void)
@@ -68 +70 @@
-index a076b1dcde..abcbdaa6e1 100644
+index a419929f52..d830fe3a2f 100644
@@ -71 +73 @@
-@@ -2138,9 +2138,7 @@ start_packet_forwarding(int with_tx_first)
+@@ -2120,9 +2120,7 @@ start_packet_forwarding(int with_tx_first)
@@ -81 +83 @@
-@@ -2163,23 +2161,6 @@ start_packet_forwarding(int with_tx_first)
+@@ -2145,23 +2143,6 @@ start_packet_forwarding(int with_tx_first)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: log time delta in decimal format' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (51 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'app/testpmd: verify DCB config during forward config' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: fix time delta calculation' " Xueming Li
                       ` (124 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/589600a03af7071583d7a37b7cecdf2b6680048e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 589600a03af7071583d7a37b7cecdf2b6680048e Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 28 Apr 2021 15:20:52 +0800
Subject: [PATCH] net/hns3: log time delta in decimal format
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit c9a63bb64e79ab5fa6b5bd298df5b5695067d1e5 ]

If the reset process cost too much time, driver will log one error
message which formats the time delta, but the formatting is using
hexadecimal which was not readable.

This patch fixes it by formatting in decimal format.

Fixes: 2790c6464725 ("net/hns3: support device reset")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    | 2 +-
 drivers/net/hns3/hns3_ethdev_vf.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 40e4cfde31..a347533a94 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5841,7 +5841,7 @@ hns3_reset_service(void *param)
 		msec = tv_delta.tv_sec * MSEC_PER_SEC +
 		       tv_delta.tv_usec / USEC_PER_MSEC;
 		if (msec > HNS3_RESET_PROCESS_MS)
-			hns3_err(hw, "%d handle long time delta %" PRIx64
+			hns3_err(hw, "%d handle long time delta %" PRIu64
 				     " ms time=%ld.%.6ld",
 				 hw->reset.level, msec,
 				 tv.tv_sec, tv.tv_usec);
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index d2162158e6..20da418ba9 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -2633,7 +2633,7 @@ hns3vf_reset_service(void *param)
 		msec = tv_delta.tv_sec * MSEC_PER_SEC +
 		       tv_delta.tv_usec / USEC_PER_MSEC;
 		if (msec > HNS3_RESET_PROCESS_MS)
-			hns3_err(hw, "%d handle long time delta %" PRIx64
+			hns3_err(hw, "%d handle long time delta %" PRIu64
 				 " ms time=%ld.%.6ld",
 				 hw->reset.level, msec, tv.tv_sec, tv.tv_usec);
 	}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.049644300 +0800
+++ 0054-net-hns3-log-time-delta-in-decimal-format.patch	2021-06-12 06:53:56.270000000 +0800
@@ -1 +1 @@
-From c9a63bb64e79ab5fa6b5bd298df5b5695067d1e5 Mon Sep 17 00:00:00 2001
+From 589600a03af7071583d7a37b7cecdf2b6680048e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit c9a63bb64e79ab5fa6b5bd298df5b5695067d1e5 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 973384bd3e..02637e497b 100644
+index 40e4cfde31..a347533a94 100644
@@ -26 +28 @@
-@@ -6710,7 +6710,7 @@ hns3_reset_service(void *param)
+@@ -5841,7 +5841,7 @@ hns3_reset_service(void *param)
@@ -36 +38 @@
-index 74b90e214c..fcdf0e3e7b 100644
+index d2162158e6..20da418ba9 100644
@@ -39 +41 @@
-@@ -2782,7 +2782,7 @@ hns3vf_reset_service(void *param)
+@@ -2633,7 +2633,7 @@ hns3vf_reset_service(void *param)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix time delta calculation' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (52 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: log time delta in decimal format' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: remove unused macros' " Xueming Li
                       ` (123 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2f0e34a575054004ea24598e1526f63f88c1a695

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2f0e34a575054004ea24598e1526f63f88c1a695 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 28 Apr 2021 15:20:53 +0800
Subject: [PATCH] net/hns3: fix time delta calculation
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 78dbb6f999314ae05c2f5fb617660ec020a5309c ]

Currently, driver uses gettimeofday() API to get the time, and
then calculate the time delta, the delta will be used mainly in
judging timeout process.

But the time which gets from gettimeofday() API isn't monotonically
increasing. The process may fail if the system time is changed.

We use the following scheme to fix it:
1. Add hns3_clock_gettime() API which will get the monotonically
   increasing time.
2. Add hns3_clock_calctime_ms() API which will get the milliseconds of
   the monotonically increasing time.
3. Add hns3_clock_calctime_ms() API which will calc the milliseconds of
   a given time.

Fixes: 2790c6464725 ("net/hns3: support device reset")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c    | 46 ++++++++++++++++++++++++++-----
 drivers/net/hns3/hns3_ethdev.h    | 12 ++------
 drivers/net/hns3/hns3_ethdev_vf.c | 11 ++++----
 drivers/net/hns3/hns3_intr.c      | 34 +++++++++++------------
 4 files changed, 63 insertions(+), 40 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index a347533a94..907435c677 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5491,7 +5491,7 @@ hns3_wait_hardware_ready(struct hns3_adapter *hns)
 	if (wait_data->result == HNS3_WAIT_SUCCESS)
 		return 0;
 	else if (wait_data->result == HNS3_WAIT_TIMEOUT) {
-		gettimeofday(&tv, NULL);
+		hns3_clock_gettime(&tv);
 		hns3_warn(hw, "Reset step4 hardware not ready after reset time=%ld.%.6ld",
 			  tv.tv_sec, tv.tv_usec);
 		return -ETIME;
@@ -5501,7 +5501,7 @@ hns3_wait_hardware_ready(struct hns3_adapter *hns)
 	wait_data->hns = hns;
 	wait_data->check_completion = is_pf_reset_done;
 	wait_data->end_ms = (uint64_t)HNS3_RESET_WAIT_CNT *
-				      HNS3_RESET_WAIT_MS + get_timeofday_ms();
+				HNS3_RESET_WAIT_MS + hns3_clock_gettime_ms();
 	wait_data->interval = HNS3_RESET_WAIT_MS * USEC_PER_MSEC;
 	wait_data->count = HNS3_RESET_WAIT_CNT;
 	wait_data->result = HNS3_WAIT_REQUEST;
@@ -5540,7 +5540,7 @@ hns3_msix_process(struct hns3_adapter *hns, enum hns3_reset_level reset_level)
 	struct timeval tv;
 	uint32_t val;
 
-	gettimeofday(&tv, NULL);
+	hns3_clock_gettime(&tv);
 	if (hns3_read_dev(hw, HNS3_GLOBAL_RESET_REG) ||
 	    hns3_read_dev(hw, HNS3_FUN_RST_ING)) {
 		hns3_warn(hw, "Don't process msix during resetting time=%ld.%.6ld",
@@ -5834,12 +5834,11 @@ hns3_reset_service(void *param)
 	 */
 	reset_level = hns3_get_reset_level(hns, &hw->reset.pending);
 	if (reset_level != HNS3_NONE_RESET) {
-		gettimeofday(&tv_start, NULL);
+		hns3_clock_gettime(&tv_start);
 		ret = hns3_reset_process(hns, reset_level);
-		gettimeofday(&tv, NULL);
+		hns3_clock_gettime(&tv);
 		timersub(&tv, &tv_start, &tv_delta);
-		msec = tv_delta.tv_sec * MSEC_PER_SEC +
-		       tv_delta.tv_usec / USEC_PER_MSEC;
+		msec = hns3_clock_calctime_ms(&tv_delta);
 		if (msec > HNS3_RESET_PROCESS_MS)
 			hns3_err(hw, "%d handle long time delta %" PRIu64
 				     " ms time=%ld.%.6ld",
@@ -6183,6 +6182,39 @@ hns3_query_dev_fec_info(struct hns3_hw *hw)
 	return ret;
 }
 
+void
+hns3_clock_gettime(struct timeval *tv)
+{
+#ifdef CLOCK_MONOTONIC_RAW /* Defined in glibc bits/time.h */
+#define CLOCK_TYPE CLOCK_MONOTONIC_RAW
+#else
+#define CLOCK_TYPE CLOCK_MONOTONIC
+#endif
+#define NSEC_TO_USEC_DIV 1000
+
+	struct timespec spec;
+	(void)clock_gettime(CLOCK_TYPE, &spec);
+
+	tv->tv_sec = spec.tv_sec;
+	tv->tv_usec = spec.tv_nsec / NSEC_TO_USEC_DIV;
+}
+
+uint64_t
+hns3_clock_calctime_ms(struct timeval *tv)
+{
+	return (uint64_t)tv->tv_sec * MSEC_PER_SEC +
+		tv->tv_usec / USEC_PER_MSEC;
+}
+
+uint64_t
+hns3_clock_gettime_ms(void)
+{
+	struct timeval tv;
+
+	hns3_clock_gettime(&tv);
+	return hns3_clock_calctime_ms(&tv);
+}
+
 static const struct eth_dev_ops hns3_eth_dev_ops = {
 	.dev_configure      = hns3_dev_configure,
 	.dev_start          = hns3_dev_start,
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 5d76012eea..3032af6f55 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -908,15 +908,9 @@ static inline uint32_t hns3_read_reg(void *base, uint32_t reg)
 #define MSEC_PER_SEC              1000L
 #define USEC_PER_MSEC             1000L
 
-static inline uint64_t
-get_timeofday_ms(void)
-{
-	struct timeval tv;
-
-	(void)gettimeofday(&tv, NULL);
-
-	return (uint64_t)tv.tv_sec * MSEC_PER_SEC + tv.tv_usec / USEC_PER_MSEC;
-}
+void hns3_clock_gettime(struct timeval *tv);
+uint64_t hns3_clock_calctime_ms(struct timeval *tv);
+uint64_t hns3_clock_gettime_ms(void);
 
 static inline uint64_t
 hns3_atomic_test_bit(unsigned int nr, volatile uint64_t *addr)
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 20da418ba9..8ad02a0b11 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -2370,7 +2370,7 @@ hns3vf_wait_hardware_ready(struct hns3_adapter *hns)
 		hns3_warn(hw, "hardware is ready, delay 1 sec for PF reset complete");
 		return -EAGAIN;
 	} else if (wait_data->result == HNS3_WAIT_TIMEOUT) {
-		gettimeofday(&tv, NULL);
+		hns3_clock_gettime(&tv);
 		hns3_warn(hw, "Reset step4 hardware not ready after reset time=%ld.%.6ld",
 			  tv.tv_sec, tv.tv_usec);
 		return -ETIME;
@@ -2380,7 +2380,7 @@ hns3vf_wait_hardware_ready(struct hns3_adapter *hns)
 	wait_data->hns = hns;
 	wait_data->check_completion = is_vf_reset_done;
 	wait_data->end_ms = (uint64_t)HNS3VF_RESET_WAIT_CNT *
-				      HNS3VF_RESET_WAIT_MS + get_timeofday_ms();
+				HNS3VF_RESET_WAIT_MS + hns3_clock_gettime_ms();
 	wait_data->interval = HNS3VF_RESET_WAIT_MS * USEC_PER_MSEC;
 	wait_data->count = HNS3VF_RESET_WAIT_CNT;
 	wait_data->result = HNS3_WAIT_REQUEST;
@@ -2626,12 +2626,11 @@ hns3vf_reset_service(void *param)
 	 */
 	reset_level = hns3vf_get_reset_level(hw, &hw->reset.pending);
 	if (reset_level != HNS3_NONE_RESET) {
-		gettimeofday(&tv_start, NULL);
+		hns3_clock_gettime(&tv_start);
 		hns3_reset_process(hns, reset_level);
-		gettimeofday(&tv, NULL);
+		hns3_clock_gettime(&tv);
 		timersub(&tv, &tv_start, &tv_delta);
-		msec = tv_delta.tv_sec * MSEC_PER_SEC +
-		       tv_delta.tv_usec / USEC_PER_MSEC;
+		msec = hns3_clock_calctime_ms(&tv_delta);
 		if (msec > HNS3_RESET_PROCESS_MS)
 			hns3_err(hw, "%d handle long time delta %" PRIu64
 				 " ms time=%ld.%.6ld",
diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c
index dce9f36e6d..4abcd7898e 100644
--- a/drivers/net/hns3/hns3_intr.c
+++ b/drivers/net/hns3/hns3_intr.c
@@ -1829,7 +1829,7 @@ hns3_wait_callback(void *param)
 		 * Check if the current time exceeds the deadline
 		 * or a pending reset coming, or reset during close.
 		 */
-		msec = get_timeofday_ms();
+		msec = hns3_clock_gettime_ms();
 		if (msec > data->end_ms || is_reset_pending(hns) ||
 		    hw->adapter_state == HNS3_NIC_CLOSING) {
 			done = false;
@@ -2014,7 +2014,7 @@ hns3_reset_pre(struct hns3_adapter *hns)
 		rte_atomic16_set(&hns->hw.reset.resetting, 1);
 		hw->reset.stage = RESET_STAGE_DOWN;
 		ret = hw->reset.ops->stop_service(hns);
-		gettimeofday(&tv, NULL);
+		hns3_clock_gettime(&tv);
 		if (ret) {
 			hns3_warn(hw, "Reset step1 down fail=%d time=%ld.%.6ld",
 				  ret, tv.tv_sec, tv.tv_usec);
@@ -2026,7 +2026,7 @@ hns3_reset_pre(struct hns3_adapter *hns)
 	}
 	if (hw->reset.stage == RESET_STAGE_PREWAIT) {
 		ret = hw->reset.ops->prepare_reset(hns);
-		gettimeofday(&tv, NULL);
+		hns3_clock_gettime(&tv);
 		if (ret) {
 			hns3_warn(hw,
 				  "Reset step2 prepare wait fail=%d time=%ld.%.6ld",
@@ -2064,7 +2064,7 @@ hns3_reset_post(struct hns3_adapter *hns)
 		}
 		ret = hw->reset.ops->reinit_dev(hns);
 		rte_spinlock_unlock(&hw->lock);
-		gettimeofday(&tv, NULL);
+		hns3_clock_gettime(&tv);
 		if (ret) {
 			hns3_warn(hw, "Reset step5 devinit fail=%d retries=%d",
 				  ret, hw->reset.retries);
@@ -2082,7 +2082,7 @@ hns3_reset_post(struct hns3_adapter *hns)
 		rte_spinlock_lock(&hw->lock);
 		ret = hw->reset.ops->restore_conf(hns);
 		rte_spinlock_unlock(&hw->lock);
-		gettimeofday(&tv, NULL);
+		hns3_clock_gettime(&tv);
 		if (ret) {
 			hns3_warn(hw,
 				  "Reset step6 restore fail=%d retries=%d",
@@ -2105,7 +2105,7 @@ hns3_reset_post(struct hns3_adapter *hns)
 		rte_spinlock_lock(&hw->lock);
 		hw->reset.ops->start_service(hns);
 		rte_spinlock_unlock(&hw->lock);
-		gettimeofday(&tv, NULL);
+		hns3_clock_gettime(&tv);
 		timersub(&tv, &hw->reset.start_time, &tv_delta);
 		hns3_warn(hw, "%s reset done fail_cnt:%" PRIx64
 			  " success_cnt:%" PRIx64 " global_cnt:%" PRIx64
@@ -2117,10 +2117,9 @@ hns3_reset_post(struct hns3_adapter *hns)
 			  hw->reset.stats.request_cnt, hw->reset.stats.exec_cnt,
 			  hw->reset.stats.merge_cnt);
 		hns3_warn(hw,
-			  "%s reset done delta %ld ms time=%ld.%.6ld",
+			  "%s reset done delta %" PRIu64 " ms time=%ld.%.6ld",
 			  reset_string[hw->reset.level],
-			  tv_delta.tv_sec * MSEC_PER_SEC +
-			  tv_delta.tv_usec / USEC_PER_MSEC,
+			  hns3_clock_calctime_ms(&tv_delta),
 			  tv.tv_sec, tv.tv_usec);
 		hw->reset.level = HNS3_NONE_RESET;
 	}
@@ -2160,7 +2159,7 @@ hns3_reset_process(struct hns3_adapter *hns, enum hns3_reset_level new_level)
 	if (hw->reset.level == HNS3_NONE_RESET) {
 		hw->reset.level = new_level;
 		hw->reset.stats.exec_cnt++;
-		gettimeofday(&hw->reset.start_time, NULL);
+		hns3_clock_gettime(&hw->reset.start_time);
 		hns3_warn(hw, "Start %s reset time=%ld.%.6ld",
 			  reset_string[hw->reset.level],
 			  hw->reset.start_time.tv_sec,
@@ -2168,7 +2167,7 @@ hns3_reset_process(struct hns3_adapter *hns, enum hns3_reset_level new_level)
 	}
 
 	if (is_reset_pending(hns)) {
-		gettimeofday(&tv, NULL);
+		hns3_clock_gettime(&tv);
 		hns3_warn(hw,
 			  "%s reset is aborted by high level time=%ld.%.6ld",
 			  reset_string[hw->reset.level], tv.tv_sec, tv.tv_usec);
@@ -2186,7 +2185,7 @@ hns3_reset_process(struct hns3_adapter *hns, enum hns3_reset_level new_level)
 		ret = hns3_reset_req_hw_reset(hns);
 		if (ret == -EAGAIN)
 			return ret;
-		gettimeofday(&tv, NULL);
+		hns3_clock_gettime(&tv);
 		hns3_warn(hw,
 			  "Reset step3 request IMP reset success time=%ld.%.6ld",
 			  tv.tv_sec, tv.tv_usec);
@@ -2197,7 +2196,7 @@ hns3_reset_process(struct hns3_adapter *hns, enum hns3_reset_level new_level)
 		ret = hw->reset.ops->wait_hardware_ready(hns);
 		if (ret)
 			goto retry;
-		gettimeofday(&tv, NULL);
+		hns3_clock_gettime(&tv);
 		hns3_warn(hw, "Reset step4 reset wait success time=%ld.%.6ld",
 			  tv.tv_sec, tv.tv_usec);
 		hw->reset.stage = RESET_STAGE_DEV_INIT;
@@ -2225,12 +2224,11 @@ err:
 		rte_spinlock_unlock(&hw->lock);
 		rte_atomic16_clear(&hns->hw.reset.resetting);
 		hw->reset.stage = RESET_STAGE_NONE;
-		gettimeofday(&tv, NULL);
+		hns3_clock_gettime(&tv);
 		timersub(&tv, &hw->reset.start_time, &tv_delta);
-		hns3_warn(hw, "%s reset fail delta %ld ms time=%ld.%.6ld",
+		hns3_warn(hw, "%s reset fail delta %" PRIu64 " ms time=%ld.%.6ld",
 			  reset_string[hw->reset.level],
-			  tv_delta.tv_sec * MSEC_PER_SEC +
-			  tv_delta.tv_usec / USEC_PER_MSEC,
+			  hns3_clock_calctime_ms(&tv_delta),
 			  tv.tv_sec, tv.tv_usec);
 		hw->reset.level = HNS3_NONE_RESET;
 	}
@@ -2262,7 +2260,7 @@ hns3_reset_abort(struct hns3_adapter *hns)
 	rte_eal_alarm_cancel(hns3_wait_callback, hw->reset.wait_data);
 
 	if (hw->reset.level != HNS3_NONE_RESET) {
-		gettimeofday(&tv, NULL);
+		hns3_clock_gettime(&tv);
 		hns3_err(hw, "Failed to terminate reset: %s time=%ld.%.6ld",
 			 reset_string[hw->reset.level], tv.tv_sec, tv.tv_usec);
 	}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.075185900 +0800
+++ 0055-net-hns3-fix-time-delta-calculation.patch	2021-06-12 06:53:56.280000000 +0800
@@ -1 +1 @@
-From 78dbb6f999314ae05c2f5fb617660ec020a5309c Mon Sep 17 00:00:00 2001
+From 2f0e34a575054004ea24598e1526f63f88c1a695 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 78dbb6f999314ae05c2f5fb617660ec020a5309c ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -34 +36 @@
-index 02637e497b..b6655549e9 100644
+index a347533a94..907435c677 100644
@@ -37 +39 @@
-@@ -6346,7 +6346,7 @@ hns3_wait_hardware_ready(struct hns3_adapter *hns)
+@@ -5491,7 +5491,7 @@ hns3_wait_hardware_ready(struct hns3_adapter *hns)
@@ -46 +48 @@
-@@ -6356,7 +6356,7 @@ hns3_wait_hardware_ready(struct hns3_adapter *hns)
+@@ -5501,7 +5501,7 @@ hns3_wait_hardware_ready(struct hns3_adapter *hns)
@@ -55 +57 @@
-@@ -6395,7 +6395,7 @@ hns3_msix_process(struct hns3_adapter *hns, enum hns3_reset_level reset_level)
+@@ -5540,7 +5540,7 @@ hns3_msix_process(struct hns3_adapter *hns, enum hns3_reset_level reset_level)
@@ -64 +66 @@
-@@ -6703,12 +6703,11 @@ hns3_reset_service(void *param)
+@@ -5834,12 +5834,11 @@ hns3_reset_service(void *param)
@@ -80,2 +82,2 @@
-@@ -7208,6 +7207,39 @@ hns3_get_module_info(struct rte_eth_dev *dev,
- 	return 0;
+@@ -6183,6 +6182,39 @@ hns3_query_dev_fec_info(struct hns3_hw *hw)
+ 	return ret;
@@ -117,3 +119,3 @@
- static int
- hns3_parse_io_hint_func(const char *key, const char *value, void *extra_args)
- {
+ static const struct eth_dev_ops hns3_eth_dev_ops = {
+ 	.dev_configure      = hns3_dev_configure,
+ 	.dev_start          = hns3_dev_start,
@@ -121 +123 @@
-index ba50e70650..b2dacb9771 100644
+index 5d76012eea..3032af6f55 100644
@@ -124 +126 @@
-@@ -1022,15 +1022,9 @@ static inline uint32_t hns3_read_reg(void *base, uint32_t reg)
+@@ -908,15 +908,9 @@ static inline uint32_t hns3_read_reg(void *base, uint32_t reg)
@@ -144 +146 @@
-index fcdf0e3e7b..9a85e970ce 100644
+index 20da418ba9..8ad02a0b11 100644
@@ -147 +149 @@
-@@ -2510,7 +2510,7 @@ hns3vf_wait_hardware_ready(struct hns3_adapter *hns)
+@@ -2370,7 +2370,7 @@ hns3vf_wait_hardware_ready(struct hns3_adapter *hns)
@@ -156 +158 @@
-@@ -2520,7 +2520,7 @@ hns3vf_wait_hardware_ready(struct hns3_adapter *hns)
+@@ -2380,7 +2380,7 @@ hns3vf_wait_hardware_ready(struct hns3_adapter *hns)
@@ -165 +167 @@
-@@ -2775,12 +2775,11 @@ hns3vf_reset_service(void *param)
+@@ -2626,12 +2626,11 @@ hns3vf_reset_service(void *param)
@@ -182 +184 @@
-index cc7d7c6392..ba6a044323 100644
+index dce9f36e6d..4abcd7898e 100644
@@ -185 +187 @@
-@@ -2465,7 +2465,7 @@ hns3_wait_callback(void *param)
+@@ -1829,7 +1829,7 @@ hns3_wait_callback(void *param)
@@ -194,2 +196,2 @@
-@@ -2650,7 +2650,7 @@ hns3_reset_pre(struct hns3_adapter *hns)
- 		__atomic_store_n(&hns->hw.reset.resetting, 1, __ATOMIC_RELAXED);
+@@ -2014,7 +2014,7 @@ hns3_reset_pre(struct hns3_adapter *hns)
+ 		rte_atomic16_set(&hns->hw.reset.resetting, 1);
@@ -203 +205 @@
-@@ -2662,7 +2662,7 @@ hns3_reset_pre(struct hns3_adapter *hns)
+@@ -2026,7 +2026,7 @@ hns3_reset_pre(struct hns3_adapter *hns)
@@ -212 +214 @@
-@@ -2700,7 +2700,7 @@ hns3_reset_post(struct hns3_adapter *hns)
+@@ -2064,7 +2064,7 @@ hns3_reset_post(struct hns3_adapter *hns)
@@ -221 +223 @@
-@@ -2718,7 +2718,7 @@ hns3_reset_post(struct hns3_adapter *hns)
+@@ -2082,7 +2082,7 @@ hns3_reset_post(struct hns3_adapter *hns)
@@ -230 +232 @@
-@@ -2741,7 +2741,7 @@ hns3_reset_post(struct hns3_adapter *hns)
+@@ -2105,7 +2105,7 @@ hns3_reset_post(struct hns3_adapter *hns)
@@ -239 +241 @@
-@@ -2753,10 +2753,9 @@ hns3_reset_post(struct hns3_adapter *hns)
+@@ -2117,10 +2117,9 @@ hns3_reset_post(struct hns3_adapter *hns)
@@ -252 +254 @@
-@@ -2796,7 +2795,7 @@ hns3_reset_process(struct hns3_adapter *hns, enum hns3_reset_level new_level)
+@@ -2160,7 +2159,7 @@ hns3_reset_process(struct hns3_adapter *hns, enum hns3_reset_level new_level)
@@ -261 +263 @@
-@@ -2804,7 +2803,7 @@ hns3_reset_process(struct hns3_adapter *hns, enum hns3_reset_level new_level)
+@@ -2168,7 +2167,7 @@ hns3_reset_process(struct hns3_adapter *hns, enum hns3_reset_level new_level)
@@ -270 +272 @@
-@@ -2822,7 +2821,7 @@ hns3_reset_process(struct hns3_adapter *hns, enum hns3_reset_level new_level)
+@@ -2186,7 +2185,7 @@ hns3_reset_process(struct hns3_adapter *hns, enum hns3_reset_level new_level)
@@ -279 +281 @@
-@@ -2833,7 +2832,7 @@ hns3_reset_process(struct hns3_adapter *hns, enum hns3_reset_level new_level)
+@@ -2197,7 +2196,7 @@ hns3_reset_process(struct hns3_adapter *hns, enum hns3_reset_level new_level)
@@ -288 +290 @@
-@@ -2861,12 +2860,11 @@ err:
+@@ -2225,12 +2224,11 @@ err:
@@ -290 +292 @@
- 		__atomic_store_n(&hns->hw.reset.resetting, 0, __ATOMIC_RELAXED);
+ 		rte_atomic16_clear(&hns->hw.reset.resetting);
@@ -304 +306 @@
-@@ -2898,7 +2896,7 @@ hns3_reset_abort(struct hns3_adapter *hns)
+@@ -2262,7 +2260,7 @@ hns3_reset_abort(struct hns3_adapter *hns)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: remove unused macros' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (53 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: fix time delta calculation' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/mlx5: fix flow age event triggering' " Xueming Li
                       ` (122 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/053299cf1df2c9703a8c60a1666735d3b5cf7cc1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 053299cf1df2c9703a8c60a1666735d3b5cf7cc1 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 28 Apr 2021 15:20:54 +0800
Subject: [PATCH] net/hns3: remove unused macros
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 1f9d940d6d0b292937af7c1b7842ea68702f8e17 ]

The hns3_is_csq() and cmq_ring_to_dev() macro were defined in previous
version but never used.

Fixes: 737f30e1c3ab ("net/hns3: support command interface with firmware")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_cmd.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c
index b45891a7ce..c6552b45d7 100644
--- a/drivers/net/hns3/hns3_cmd.c
+++ b/drivers/net/hns3/hns3_cmd.c
@@ -10,10 +10,6 @@
 #include "hns3_intr.h"
 #include "hns3_logs.h"
 
-#define hns3_is_csq(ring) ((ring)->flag & HNS3_TYPE_CSQ)
-
-#define cmq_ring_to_dev(ring)   (&(ring)->dev->pdev->dev)
-
 static int
 hns3_ring_space(struct hns3_cmq_ring *ring)
 {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.103223800 +0800
+++ 0056-net-hns3-remove-unused-macros.patch	2021-06-12 06:53:56.280000000 +0800
@@ -1 +1 @@
-From 1f9d940d6d0b292937af7c1b7842ea68702f8e17 Mon Sep 17 00:00:00 2001
+From 053299cf1df2c9703a8c60a1666735d3b5cf7cc1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 1f9d940d6d0b292937af7c1b7842ea68702f8e17 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 62dfc19be0..5beb3d9754 100644
+index b45891a7ce..c6552b45d7 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix flow age event triggering' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (54 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: remove unused macros' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-15  8:51       ` David Bouyeure
  2021-06-11 23:02     ` [dpdk-stable] patch 'raw/ifpga: fix device name format' " Xueming Li
                       ` (121 subsequent siblings)
  177 siblings, 1 reply; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Michael Baum; +Cc: Luca Boccassi, David Bouyeure, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/cb6f74724dc2f6539709210fd1dc1725d8712718

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cb6f74724dc2f6539709210fd1dc1725d8712718 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba@nvidia.com>
Date: Thu, 29 Apr 2021 12:55:41 +0300
Subject: [PATCH] net/mlx5: fix flow age event triggering
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 447d4d797d21b35185d511b7c280d7fe171b29bd ]

A FLOW_AGE event should be invoked when a new aged-out flow is detected
by the PMD after the last user get-aged query calling.
The PMD manages 2 flags for this information and check them in order to
decide if an event should be invoked:
MLX5_AGE_EVENT_NEW - a new aged-out flow was detected. after the last
check.
MLX5_AGE_TRIGGER - get-aged query was called after the last aged-out
flow.
The 2 flags were unset after the event invoking.

When the user calls get-aged query from the event callback, the TRIGGER
flag was set inside the user callback and unset directly after the
callback what may stop the event invoking forever.

Unset the TRIGGER flag before the event invoking in order to allow set
it by the user callback.

Fixes: f935ed4b645a ("net/mlx5: support flow hit action for aging")

Reported-by: David Bouyeure <david.bouyeure@fraudbuster.mobi>
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5.c | 8 +++++---
 drivers/net/mlx5/mlx5.h | 2 ++
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index b8f31497b2..f5c1c800fc 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -549,11 +549,13 @@ mlx5_age_event_prepare(struct mlx5_dev_ctx_shared *sh)
 		age_info = &sh->port[i].age_info;
 		if (!MLX5_AGE_GET(age_info, MLX5_AGE_EVENT_NEW))
 			continue;
-		if (MLX5_AGE_GET(age_info, MLX5_AGE_TRIGGER))
+		MLX5_AGE_UNSET(age_info, MLX5_AGE_EVENT_NEW);
+		if (MLX5_AGE_GET(age_info, MLX5_AGE_TRIGGER)) {
+			MLX5_AGE_UNSET(age_info, MLX5_AGE_TRIGGER);
 			rte_eth_dev_callback_process
 				(&rte_eth_devices[sh->port[i].devx_ih_port_id],
 				RTE_ETH_EVENT_FLOW_AGED, NULL);
-		age_info->flags = 0;
+		}
 	}
 }
 
@@ -562,7 +564,7 @@ mlx5_age_event_prepare(struct mlx5_dev_ctx_shared *sh)
  *
  * @param[in] sh
  *   Pointer to mlx5_dev_ctx_shared object.
- * @param[in] sh
+ * @param[in] config
  *   Pointer to user dev config.
  */
 static void
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 35f9bece05..9437f45480 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -538,6 +538,8 @@ struct mlx5_aso_age_mng {
 #define MLX5_AGE_TRIGGER		2
 #define MLX5_AGE_SET(age_info, BIT) \
 	((age_info)->flags |= (1 << (BIT)))
+#define MLX5_AGE_UNSET(age_info, BIT) \
+	((age_info)->flags &= ~(1 << (BIT)))
 #define MLX5_AGE_GET(age_info, BIT) \
 	((age_info)->flags & (1 << (BIT)))
 #define GET_PORT_AGE_INFO(priv) \
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.123925600 +0800
+++ 0057-net-mlx5-fix-flow-age-event-triggering.patch	2021-06-12 06:53:56.280000000 +0800
@@ -1 +1 @@
-From 447d4d797d21b35185d511b7c280d7fe171b29bd Mon Sep 17 00:00:00 2001
+From cb6f74724dc2f6539709210fd1dc1725d8712718 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 447d4d797d21b35185d511b7c280d7fe171b29bd ]
@@ -24 +26,0 @@
-Cc: stable@dpdk.org
@@ -35 +37 @@
-index 19ffa16769..10d44c7bbe 100644
+index b8f31497b2..f5c1c800fc 100644
@@ -38 +40 @@
-@@ -662,11 +662,13 @@ mlx5_age_event_prepare(struct mlx5_dev_ctx_shared *sh)
+@@ -549,11 +549,13 @@ mlx5_age_event_prepare(struct mlx5_dev_ctx_shared *sh)
@@ -54 +56 @@
-@@ -675,7 +677,7 @@ mlx5_age_event_prepare(struct mlx5_dev_ctx_shared *sh)
+@@ -562,7 +564,7 @@ mlx5_age_event_prepare(struct mlx5_dev_ctx_shared *sh)
@@ -64 +66 @@
-index efb80a4a49..79ae8fbef1 100644
+index 35f9bece05..9437f45480 100644
@@ -67 +69 @@
-@@ -563,6 +563,8 @@ struct mlx5_geneve_tlv_option_resource {
+@@ -538,6 +538,8 @@ struct mlx5_aso_age_mng {

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'raw/ifpga: fix device name format' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (55 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/mlx5: fix flow age event triggering' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/iavf: fix primary MAC type when starting port' " Xueming Li
                       ` (120 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Wei Huang; +Cc: Luca Boccassi, Tianfei Zhang, Rosen Xu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5c4358f054270a6b051391a23a2c9bec7085c693

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5c4358f054270a6b051391a23a2c9bec7085c693 Mon Sep 17 00:00:00 2001
From: Wei Huang <wei.huang@intel.com>
Date: Wed, 28 Apr 2021 22:33:40 -0400
Subject: [PATCH] raw/ifpga: fix device name format
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 978bb0b33f4d17f4bba38f271a8fd32cbb28d34c ]

The device name format used in ifpga_rawdev_create() was changed to
"IFPGA:%02x:%02x.%x", but the format used in ifpga_rawdev_destroy()
was left as "IFPGA:%x:%02x.%x", it should be changed synchronously.

To prevent further similar errors, macro "IFPGA_RAWDEV_NAME_FMT" is
defined to replace this format string.

Fixes: 9c006c45d0c5 ("raw/ifpga: scan PCIe BDF device tree")

Signed-off-by: Wei Huang <wei.huang@intel.com>
Acked-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
---
 drivers/raw/ifpga/ifpga_rawdev.c | 4 ++--
 drivers/raw/ifpga/ifpga_rawdev.h | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c
index 27129b133e..4747090af1 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.c
+++ b/drivers/raw/ifpga/ifpga_rawdev.c
@@ -1448,7 +1448,7 @@ ifpga_rawdev_create(struct rte_pci_device *pci_dev,
 	}
 
 	memset(name, 0, sizeof(name));
-	snprintf(name, RTE_RAWDEV_NAME_MAX_LEN, "IFPGA:%02x:%02x.%x",
+	snprintf(name, RTE_RAWDEV_NAME_MAX_LEN, IFPGA_RAWDEV_NAME_FMT,
 		pci_dev->addr.bus, pci_dev->addr.devid, pci_dev->addr.function);
 
 	IFPGA_RAWDEV_PMD_INFO("Init %s on NUMA node %d", name, rte_socket_id());
@@ -1551,7 +1551,7 @@ ifpga_rawdev_destroy(struct rte_pci_device *pci_dev)
 	}
 
 	memset(name, 0, sizeof(name));
-	snprintf(name, RTE_RAWDEV_NAME_MAX_LEN, "IFPGA:%x:%02x.%x",
+	snprintf(name, RTE_RAWDEV_NAME_MAX_LEN, IFPGA_RAWDEV_NAME_FMT,
 		pci_dev->addr.bus, pci_dev->addr.devid, pci_dev->addr.function);
 
 	IFPGA_RAWDEV_PMD_INFO("Closing %s on NUMA node %d",
diff --git a/drivers/raw/ifpga/ifpga_rawdev.h b/drivers/raw/ifpga/ifpga_rawdev.h
index 7754beb02b..5c3ecd35d6 100644
--- a/drivers/raw/ifpga/ifpga_rawdev.h
+++ b/drivers/raw/ifpga/ifpga_rawdev.h
@@ -7,6 +7,8 @@
 
 extern int ifpga_rawdev_logtype;
 
+#define IFPGA_RAWDEV_NAME_FMT "IFPGA:%02x:%02x.%x"
+
 #define IFPGA_RAWDEV_PMD_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, ifpga_rawdev_logtype, "%s(): " fmt "\n", \
 				__func__, ##args)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.149019000 +0800
+++ 0058-raw-ifpga-fix-device-name-format.patch	2021-06-12 06:53:56.290000000 +0800
@@ -1 +1 @@
-From 978bb0b33f4d17f4bba38f271a8fd32cbb28d34c Mon Sep 17 00:00:00 2001
+From 5c4358f054270a6b051391a23a2c9bec7085c693 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 978bb0b33f4d17f4bba38f271a8fd32cbb28d34c ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -20,4 +22,3 @@
- drivers/raw/ifpga/ifpga_rawdev.c  | 4 ++--
- drivers/raw/ifpga/ifpga_rawdev.h  | 2 ++
- drivers/raw/ifpga/rte_pmd_ifpga.c | 2 +-
- 3 files changed, 5 insertions(+), 3 deletions(-)
+ drivers/raw/ifpga/ifpga_rawdev.c | 4 ++--
+ drivers/raw/ifpga/ifpga_rawdev.h | 2 ++
+ 2 files changed, 4 insertions(+), 2 deletions(-)
@@ -26 +27 @@
-index f2551be821..7ccebfa3fa 100644
+index 27129b133e..4747090af1 100644
@@ -48 +49 @@
-index 9bbe9a4278..61c8366707 100644
+index 7754beb02b..5c3ecd35d6 100644
@@ -60,13 +60,0 @@
-diff --git a/drivers/raw/ifpga/rte_pmd_ifpga.c b/drivers/raw/ifpga/rte_pmd_ifpga.c
-index 6e23a2581a..23146432c2 100644
---- a/drivers/raw/ifpga/rte_pmd_ifpga.c
-+++ b/drivers/raw/ifpga/rte_pmd_ifpga.c
-@@ -34,7 +34,7 @@ rte_pmd_ifpga_get_dev_id(const char *pci_addr, uint16_t *dev_id)
- 		return -EINVAL;
- 	}
- 
--	snprintf(rdev_name, RTE_RAWDEV_NAME_MAX_LEN, "IFPGA:%02x:%02x.%x",
-+	snprintf(rdev_name, RTE_RAWDEV_NAME_MAX_LEN, IFPGA_RAWDEV_NAME_FMT,
- 		addr.bus, addr.devid, addr.function);
- 	rdev = rte_rawdev_pmd_get_named_dev(rdev_name);
- 	if (!rdev) {

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/iavf: fix primary MAC type when starting port' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (56 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'raw/ifpga: fix device name format' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/i40e: " Xueming Li
                       ` (119 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Robin Zhang; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/38b01e7fa31bc7be98b9e223f2981faf8ee76ba7

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 38b01e7fa31bc7be98b9e223f2981faf8ee76ba7 Mon Sep 17 00:00:00 2001
From: Robin Zhang <robinx.zhang@intel.com>
Date: Wed, 28 Apr 2021 08:04:51 +0000
Subject: [PATCH] net/iavf: fix primary MAC type when starting port
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 8f156d2b1af2cb096dba0df37e1c2a187be9292f ]

When start port, all MAC addresses will be set. We should set the MAC
type of default MAC address as VIRTCHNL_ETHER_ADDR_PRIMARY.

Fixes: b335e7203475 ("net/iavf: fix lack of MAC type when set MAC address")

Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/iavf/iavf_vchnl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index ed00521898..064133785e 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -1022,7 +1022,9 @@ iavf_add_del_all_mac_addr(struct iavf_adapter *adapter, bool add)
 				continue;
 			rte_memcpy(list->list[j].addr, addr->addr_bytes,
 				   sizeof(addr->addr_bytes));
-			list->list[j].type = VIRTCHNL_ETHER_ADDR_EXTRA;
+			list->list[j].type = (j == 0 ?
+					      VIRTCHNL_ETHER_ADDR_PRIMARY :
+					      VIRTCHNL_ETHER_ADDR_EXTRA);
 			PMD_DRV_LOG(DEBUG, "add/rm mac:%x:%x:%x:%x:%x:%x",
 				    addr->addr_bytes[0], addr->addr_bytes[1],
 				    addr->addr_bytes[2], addr->addr_bytes[3],
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.171907800 +0800
+++ 0059-net-iavf-fix-primary-MAC-type-when-starting-port.patch	2021-06-12 06:53:56.290000000 +0800
@@ -1 +1 @@
-From 8f156d2b1af2cb096dba0df37e1c2a187be9292f Mon Sep 17 00:00:00 2001
+From 38b01e7fa31bc7be98b9e223f2981faf8ee76ba7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 8f156d2b1af2cb096dba0df37e1c2a187be9292f ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 0026120cf4..5d57e8b541 100644
+index ed00521898..064133785e 100644
@@ -22 +24 @@
-@@ -1172,7 +1172,9 @@ iavf_add_del_all_mac_addr(struct iavf_adapter *adapter, bool add)
+@@ -1022,7 +1022,9 @@ iavf_add_del_all_mac_addr(struct iavf_adapter *adapter, bool add)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/i40e: fix primary MAC type when starting port' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (57 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/iavf: fix primary MAC type when starting port' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/sfc: fix mark support in EF100 native Rx datapath' " Xueming Li
                       ` (118 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Robin Zhang; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/40c046441f3716ad0ded74e7b3b7afb1ae65ed64

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 40c046441f3716ad0ded74e7b3b7afb1ae65ed64 Mon Sep 17 00:00:00 2001
From: Robin Zhang <robinx.zhang@intel.com>
Date: Wed, 28 Apr 2021 08:04:52 +0000
Subject: [PATCH] net/i40e: fix primary MAC type when starting port
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 2e468c03b0a4095988ec788a62669abf8e6f4908 ]

When start port, all MAC addresses will be set. We should set the MAC
type of default MAC address as VIRTCHNL_ETHER_ADDR_PRIMARY.

Fixes: 3f604ddf33cf ("net/i40e: fix lack of MAC type when set MAC address")

Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 10cb68eb97..625981048a 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2081,7 +2081,9 @@ i40evf_add_del_all_mac_addr(struct rte_eth_dev *dev, bool add)
 				continue;
 			rte_memcpy(list->list[j].addr, addr->addr_bytes,
 					 sizeof(addr->addr_bytes));
-			list->list[j].type = VIRTCHNL_ETHER_ADDR_EXTRA;
+			list->list[j].type = (j == 0 ?
+					      VIRTCHNL_ETHER_ADDR_PRIMARY :
+					      VIRTCHNL_ETHER_ADDR_EXTRA);
 			PMD_DRV_LOG(DEBUG, "add/rm mac:%x:%x:%x:%x:%x:%x",
 				    addr->addr_bytes[0], addr->addr_bytes[1],
 				    addr->addr_bytes[2], addr->addr_bytes[3],
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.194629000 +0800
+++ 0060-net-i40e-fix-primary-MAC-type-when-starting-port.patch	2021-06-12 06:53:56.290000000 +0800
@@ -1 +1 @@
-From 2e468c03b0a4095988ec788a62669abf8e6f4908 Mon Sep 17 00:00:00 2001
+From 40c046441f3716ad0ded74e7b3b7afb1ae65ed64 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 2e468c03b0a4095988ec788a62669abf8e6f4908 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 156ad9ab96..ad80aa1e29 100644
+index 10cb68eb97..625981048a 100644
@@ -22 +24 @@
-@@ -2128,7 +2128,9 @@ i40evf_add_del_all_mac_addr(struct rte_eth_dev *dev, bool add)
+@@ -2081,7 +2081,9 @@ i40evf_add_del_all_mac_addr(struct rte_eth_dev *dev, bool add)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/sfc: fix mark support in EF100 native Rx datapath' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (58 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/i40e: " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: drop unused attribute' " Xueming Li
                       ` (117 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Luca Boccassi, Andy Moreton, Ivan Malov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/15cf480f1a93b1e24d5d20db142472ba2fa03ff2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 15cf480f1a93b1e24d5d20db142472ba2fa03ff2 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Date: Wed, 28 Apr 2021 17:17:02 +0300
Subject: [PATCH] net/sfc: fix mark support in EF100 native Rx datapath
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit ad82838e3c7c11bd940bf4b5384377fa83c6a2ba ]

Decouple user mark from user flag. Usage of mark does not require to
use flag as well. Flag is not actually supported yet.

Fixes: 1aacc3d388d3 ("net/sfc: support user mark and flag Rx for EF100")

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
---
 drivers/net/sfc/sfc_ef100_rx.c | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/drivers/net/sfc/sfc_ef100_rx.c b/drivers/net/sfc/sfc_ef100_rx.c
index c1c56d0e75..6ec0451057 100644
--- a/drivers/net/sfc/sfc_ef100_rx.c
+++ b/drivers/net/sfc/sfc_ef100_rx.c
@@ -46,6 +46,9 @@
 	((_ndesc) - 1 /* head must not step on tail */ - \
 	 1 /* Rx error */ - 1 /* flush */)
 
+/** Invalid user mark value when the mark should be treated as unset */
+#define SFC_EF100_USER_MARK_INVALID	0
+
 struct sfc_ef100_rx_sw_desc {
 	struct rte_mbuf			*mbuf;
 };
@@ -365,7 +368,6 @@ static const efx_rx_prefix_layout_t sfc_ef100_rx_prefix_layout = {
 
 		SFC_EF100_RX_PREFIX_FIELD(LENGTH, B_FALSE),
 		SFC_EF100_RX_PREFIX_FIELD(RSS_HASH_VALID, B_FALSE),
-		SFC_EF100_RX_PREFIX_FIELD(USER_FLAG, B_FALSE),
 		SFC_EF100_RX_PREFIX_FIELD(CLASS, B_FALSE),
 		SFC_EF100_RX_PREFIX_FIELD(RSS_HASH, B_FALSE),
 		SFC_EF100_RX_PREFIX_FIELD(USER_MARK, B_FALSE),
@@ -404,12 +406,16 @@ sfc_ef100_rx_prefix_to_offloads(const struct sfc_ef100_rxq *rxq,
 					      ESF_GZ_RX_PREFIX_RSS_HASH);
 	}
 
-	if ((rxq->flags & SFC_EF100_RXQ_USER_MARK) &&
-	    EFX_TEST_OWORD_BIT(rx_prefix[0], ESF_GZ_RX_PREFIX_USER_FLAG_LBN)) {
-		ol_flags |= PKT_RX_FDIR_ID;
+	if (rxq->flags & SFC_EF100_RXQ_USER_MARK) {
+		uint32_t user_mark;
+
 		/* EFX_OWORD_FIELD converts little-endian to CPU */
-		m->hash.fdir.hi = EFX_OWORD_FIELD(rx_prefix[0],
-						  ESF_GZ_RX_PREFIX_USER_MARK);
+		user_mark = EFX_OWORD_FIELD(rx_prefix[0],
+					    ESF_GZ_RX_PREFIX_USER_MARK);
+		if (user_mark != SFC_EF100_USER_MARK_INVALID) {
+			ol_flags |= PKT_RX_FDIR_ID;
+			m->hash.fdir.hi = user_mark;
+		}
 	}
 
 	m->ol_flags = ol_flags;
@@ -794,8 +800,7 @@ sfc_ef100_rx_qstart(struct sfc_dp_rxq *dp_rxq, unsigned int evq_read_ptr,
 		rxq->flags &= ~SFC_EF100_RXQ_RSS_HASH;
 
 	if ((unsup_rx_prefix_fields &
-	     ((1U << EFX_RX_PREFIX_FIELD_USER_FLAG) |
-	      (1U << EFX_RX_PREFIX_FIELD_USER_MARK))) == 0)
+	     (1U << EFX_RX_PREFIX_FIELD_USER_MARK)) == 0)
 		rxq->flags |= SFC_EF100_RXQ_USER_MARK;
 	else
 		rxq->flags &= ~SFC_EF100_RXQ_USER_MARK;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.217857400 +0800
+++ 0061-net-sfc-fix-mark-support-in-EF100-native-Rx-datapath.patch	2021-06-12 06:53:56.300000000 +0800
@@ -1 +1 @@
-From ad82838e3c7c11bd940bf4b5384377fa83c6a2ba Mon Sep 17 00:00:00 2001
+From 15cf480f1a93b1e24d5d20db142472ba2fa03ff2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit ad82838e3c7c11bd940bf4b5384377fa83c6a2ba ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 07b37ff47f..8cde24c585 100644
+index c1c56d0e75..6ec0451057 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/bnxt: drop unused attribute' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (59 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/sfc: fix mark support in EF100 native Rx datapath' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: fix vector Rx burst limitation' " Xueming Li
                       ` (116 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Luca Boccassi, Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/88be45dbba76868cd0aed67703e05d32b6dbe6cb

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 88be45dbba76868cd0aed67703e05d32b6dbe6cb Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Fri, 23 Apr 2021 10:52:26 +0530
Subject: [PATCH] net/bnxt: drop unused attribute
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 4f28d9a1a62cd3b5083e38117eb255431ad520ae ]

Remove "__rte_unused" instances that are wrongly marked.

Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")
Fixes: 1bf01f5135f8 ("net/bnxt: prevent device access when device is in reset")

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_reps.c  | 4 ++--
 drivers/net/bnxt/bnxt_stats.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index 167c46ad41..b9b0f62c9c 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -104,7 +104,7 @@ bnxt_rep_rx_burst(void *rx_queue,
 static uint16_t
 bnxt_rep_tx_burst(void *tx_queue,
 		     struct rte_mbuf **tx_pkts,
-		     __rte_unused uint16_t nb_pkts)
+		     uint16_t nb_pkts)
 {
 	struct bnxt_vf_rep_tx_queue *vfr_txq = tx_queue;
 	struct bnxt_tx_queue *ptxq;
@@ -548,7 +548,7 @@ int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
 	return 0;
 }
 
-int bnxt_rep_dev_configure_op(__rte_unused struct rte_eth_dev *eth_dev)
+int bnxt_rep_dev_configure_op(struct rte_eth_dev *eth_dev)
 {
 	struct bnxt_representor *rep_bp = eth_dev->data->dev_private;
 
diff --git a/drivers/net/bnxt/bnxt_stats.h b/drivers/net/bnxt/bnxt_stats.h
index 7e11efe841..591c55c406 100644
--- a/drivers/net/bnxt/bnxt_stats.h
+++ b/drivers/net/bnxt/bnxt_stats.h
@@ -12,7 +12,7 @@ void bnxt_free_stats(struct bnxt *bp);
 int bnxt_stats_get_op(struct rte_eth_dev *eth_dev,
 			   struct rte_eth_stats *bnxt_stats);
 int bnxt_stats_reset_op(struct rte_eth_dev *eth_dev);
-int bnxt_dev_xstats_get_names_op(__rte_unused struct rte_eth_dev *eth_dev,
+int bnxt_dev_xstats_get_names_op(struct rte_eth_dev *eth_dev,
 	struct rte_eth_xstat_name *xstats_names,
 	__rte_unused unsigned int limit);
 int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.239366500 +0800
+++ 0062-net-bnxt-drop-unused-attribute.patch	2021-06-12 06:53:56.300000000 +0800
@@ -1 +1 @@
-From 4f28d9a1a62cd3b5083e38117eb255431ad520ae Mon Sep 17 00:00:00 2001
+From 88be45dbba76868cd0aed67703e05d32b6dbe6cb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 4f28d9a1a62cd3b5083e38117eb255431ad520ae ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index b224a7d2c2..bdbad53b7d 100644
+index 167c46ad41..b9b0f62c9c 100644
@@ -43 +45 @@
-index e9e5636926..1ca9b9c594 100644
+index 7e11efe841..591c55c406 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix vector Rx burst limitation' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (60 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: drop unused attribute' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: remove read when enabling TM QCN error event' " Xueming Li
                       ` (115 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/29da2a8b3d1e2989336fe05798677eba797e2034

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 29da2a8b3d1e2989336fe05798677eba797e2034 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 30 Apr 2021 14:28:50 +0800
Subject: [PATCH] net/hns3: fix vector Rx burst limitation
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 2d408d0609c4b06dbade72e4e6af6c978e96b0de ]

Currently, driver uses the macro HNS3_DEFAULT_RX_BURST whose value is
32 to limit the vector Rx burst size, as a result, the burst size
can't exceed 32.

This patch fixes this problem by support big burst size.
Also adjust HNS3_DEFAULT_RX_BURST to 64 as it performs better than 32.

Fixes: a3d4f4d291d7 ("net/hns3: support NEON Rx")
Fixes: 952ebacce4f2 ("net/hns3: support SVE Rx")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.h         |  2 +-
 drivers/net/hns3/hns3_rxtx_vec.c     | 36 +++++++++++++++++++++-------
 drivers/net/hns3/hns3_rxtx_vec.h     |  3 +++
 drivers/net/hns3/hns3_rxtx_vec_sve.c | 32 ++++++++++++++++++++-----
 4 files changed, 58 insertions(+), 15 deletions(-)

diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h
index 46d1b8cb27..dc9c89b5af 100644
--- a/drivers/net/hns3/hns3_rxtx.h
+++ b/drivers/net/hns3/hns3_rxtx.h
@@ -20,7 +20,7 @@
 #define HNS3_DEFAULT_TX_RS_THRESH	32
 #define HNS3_TX_FAST_FREE_AHEAD		64
 
-#define HNS3_DEFAULT_RX_BURST		32
+#define HNS3_DEFAULT_RX_BURST		64
 #if (HNS3_DEFAULT_RX_BURST > 64)
 #error "PMD HNS3: HNS3_DEFAULT_RX_BURST must <= 64\n"
 #endif
diff --git a/drivers/net/hns3/hns3_rxtx_vec.c b/drivers/net/hns3/hns3_rxtx_vec.c
index b8ce0ee670..63f910165e 100644
--- a/drivers/net/hns3/hns3_rxtx_vec.c
+++ b/drivers/net/hns3/hns3_rxtx_vec.c
@@ -104,14 +104,13 @@ hns3_recv_pkts_vec(void *__restrict rx_queue,
 {
 	struct hns3_rx_queue *rxq = rx_queue;
 	struct hns3_desc *rxdp = &rxq->rx_ring[rxq->next_to_use];
-	uint64_t bd_err_mask;  /* bit mask indicate whick pkts is error */
+	uint64_t pkt_err_mask;  /* bit mask indicate whick pkts is error */
 	uint16_t nb_rx;
 
-	nb_pkts = RTE_MIN(nb_pkts, HNS3_DEFAULT_RX_BURST);
-	nb_pkts = RTE_ALIGN_FLOOR(nb_pkts, HNS3_DEFAULT_DESCS_PER_LOOP);
-
 	rte_prefetch_non_temporal(rxdp);
 
+	nb_pkts = RTE_ALIGN_FLOOR(nb_pkts, HNS3_DEFAULT_DESCS_PER_LOOP);
+
 	if (rxq->rx_rearm_nb > HNS3_DEFAULT_RXQ_REARM_THRESH)
 		hns3_rxq_rearm_mbuf(rxq);
 
@@ -124,10 +123,31 @@ hns3_recv_pkts_vec(void *__restrict rx_queue,
 	rte_prefetch0(rxq->sw_ring[rxq->next_to_use + 2].mbuf);
 	rte_prefetch0(rxq->sw_ring[rxq->next_to_use + 3].mbuf);
 
-	bd_err_mask = 0;
-	nb_rx = hns3_recv_burst_vec(rxq, rx_pkts, nb_pkts, &bd_err_mask);
-	if (unlikely(bd_err_mask))
-		nb_rx = hns3_rx_reassemble_pkts(rx_pkts, nb_rx, bd_err_mask);
+	if (likely(nb_pkts <= HNS3_DEFAULT_RX_BURST)) {
+		pkt_err_mask = 0;
+		nb_rx = hns3_recv_burst_vec(rxq, rx_pkts, nb_pkts,
+					    &pkt_err_mask);
+		nb_rx = hns3_rx_reassemble_pkts(rx_pkts, nb_rx, pkt_err_mask);
+		return nb_rx;
+	}
+
+	nb_rx = 0;
+	while (nb_pkts > 0) {
+		uint16_t ret, n;
+
+		n = RTE_MIN(nb_pkts, HNS3_DEFAULT_RX_BURST);
+		pkt_err_mask = 0;
+		ret = hns3_recv_burst_vec(rxq, &rx_pkts[nb_rx], n,
+					  &pkt_err_mask);
+		nb_pkts -= ret;
+		nb_rx += hns3_rx_reassemble_pkts(&rx_pkts[nb_rx], ret,
+						 pkt_err_mask);
+		if (ret < n)
+			break;
+
+		if (rxq->rx_rearm_nb > HNS3_DEFAULT_RXQ_REARM_THRESH)
+			hns3_rxq_rearm_mbuf(rxq);
+	}
 
 	return nb_rx;
 }
diff --git a/drivers/net/hns3/hns3_rxtx_vec.h b/drivers/net/hns3/hns3_rxtx_vec.h
index 2baf085b95..67c75e44ef 100644
--- a/drivers/net/hns3/hns3_rxtx_vec.h
+++ b/drivers/net/hns3/hns3_rxtx_vec.h
@@ -71,6 +71,9 @@ hns3_rx_reassemble_pkts(struct rte_mbuf **rx_pkts,
 	uint16_t count, i;
 	uint64_t mask;
 
+	if (likely(pkt_err_mask == 0))
+		return nb_pkts;
+
 	count = 0;
 	for (i = 0; i < nb_pkts; i++) {
 		mask = ((uint64_t)1u) << i;
diff --git a/drivers/net/hns3/hns3_rxtx_vec_sve.c b/drivers/net/hns3/hns3_rxtx_vec_sve.c
index 1a28fe0a86..67bf8ccdc5 100644
--- a/drivers/net/hns3/hns3_rxtx_vec_sve.c
+++ b/drivers/net/hns3/hns3_rxtx_vec_sve.c
@@ -287,12 +287,11 @@ hns3_recv_pkts_vec_sve(void *__restrict rx_queue,
 {
 	struct hns3_rx_queue *rxq = rx_queue;
 	struct hns3_desc *rxdp = &rxq->rx_ring[rxq->next_to_use];
-	uint64_t bd_err_mask;  /* bit mask indicate whick pkts is error */
+	uint64_t pkt_err_mask;  /* bit mask indicate whick pkts is error */
 	uint16_t nb_rx;
 
 	rte_prefetch_non_temporal(rxdp);
 
-	nb_pkts = RTE_MIN(nb_pkts, HNS3_DEFAULT_RX_BURST);
 	nb_pkts = RTE_ALIGN_FLOOR(nb_pkts, HNS3_SVE_DEFAULT_DESCS_PER_LOOP);
 
 	if (rxq->rx_rearm_nb > HNS3_DEFAULT_RXQ_REARM_THRESH)
@@ -304,10 +303,31 @@ hns3_recv_pkts_vec_sve(void *__restrict rx_queue,
 
 	hns3_rx_prefetch_mbuf_sve(&rxq->sw_ring[rxq->next_to_use]);
 
-	bd_err_mask = 0;
-	nb_rx = hns3_recv_burst_vec_sve(rxq, rx_pkts, nb_pkts, &bd_err_mask);
-	if (unlikely(bd_err_mask))
-		nb_rx = hns3_rx_reassemble_pkts(rx_pkts, nb_rx, bd_err_mask);
+	if (likely(nb_pkts <= HNS3_DEFAULT_RX_BURST)) {
+		pkt_err_mask = 0;
+		nb_rx = hns3_recv_burst_vec_sve(rxq, rx_pkts, nb_pkts,
+						&pkt_err_mask);
+		nb_rx = hns3_rx_reassemble_pkts(rx_pkts, nb_rx, pkt_err_mask);
+		return nb_rx;
+	}
+
+	nb_rx = 0;
+	while (nb_pkts > 0) {
+		uint16_t ret, n;
+
+		n = RTE_MIN(nb_pkts, HNS3_DEFAULT_RX_BURST);
+		pkt_err_mask = 0;
+		ret = hns3_recv_burst_vec_sve(rxq, &rx_pkts[nb_rx], n,
+					      &pkt_err_mask);
+		nb_pkts -= ret;
+		nb_rx += hns3_rx_reassemble_pkts(&rx_pkts[nb_rx], ret,
+						 pkt_err_mask);
+		if (ret < n)
+			break;
+
+		if (rxq->rx_rearm_nb > HNS3_DEFAULT_RXQ_REARM_THRESH)
+			hns3_rxq_rearm_mbuf_sve(rxq);
+	}
 
 	return nb_rx;
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.260711200 +0800
+++ 0063-net-hns3-fix-vector-Rx-burst-limitation.patch	2021-06-12 06:53:56.300000000 +0800
@@ -1 +1 @@
-From 2d408d0609c4b06dbade72e4e6af6c978e96b0de Mon Sep 17 00:00:00 2001
+From 29da2a8b3d1e2989336fe05798677eba797e2034 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 2d408d0609c4b06dbade72e4e6af6c978e96b0de ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index 1e2e994d2b..ba24e0076a 100644
+index 46d1b8cb27..dc9c89b5af 100644
@@ -40 +42 @@
-index dc1e1ae57b..cc8b9706a8 100644
+index b8ce0ee670..63f910165e 100644
@@ -43 +45 @@
-@@ -108,14 +108,13 @@ hns3_recv_pkts_vec(void *__restrict rx_queue,
+@@ -104,14 +104,13 @@ hns3_recv_pkts_vec(void *__restrict rx_queue,
@@ -61 +63 @@
-@@ -128,10 +127,31 @@ hns3_recv_pkts_vec(void *__restrict rx_queue,
+@@ -124,10 +123,31 @@ hns3_recv_pkts_vec(void *__restrict rx_queue,
@@ -112 +114 @@
-index ef6c875c80..bf7f704006 100644
+index 1a28fe0a86..67bf8ccdc5 100644
@@ -115 +117 @@
-@@ -292,12 +292,11 @@ hns3_recv_pkts_vec_sve(void *__restrict rx_queue,
+@@ -287,12 +287,11 @@ hns3_recv_pkts_vec_sve(void *__restrict rx_queue,
@@ -129 +131 @@
-@@ -309,10 +308,31 @@ hns3_recv_pkts_vec_sve(void *__restrict rx_queue,
+@@ -304,10 +303,31 @@ hns3_recv_pkts_vec_sve(void *__restrict rx_queue,

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: remove read when enabling TM QCN error event' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (61 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: fix vector Rx burst limitation' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: remove unused VMDq code' " Xueming Li
                       ` (114 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5d84f2b422adc0856f1404f6237ddfc6a7f64c3e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5d84f2b422adc0856f1404f6237ddfc6a7f64c3e Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 30 Apr 2021 17:04:02 +0800
Subject: [PATCH] net/hns3: remove read when enabling TM QCN error event
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 3903c05382c55ce36837405141534c6be042c2a2 ]

According to the HW manual, the read operation is unnecessary when
enabling TM QCN error event, so remove it.

Fixes: f53a793bb7c2 ("net/hns3: add more hardware error types")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_intr.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c
index 4abcd7898e..4da197f940 100644
--- a/drivers/net/hns3/hns3_intr.c
+++ b/drivers/net/hns3/hns3_intr.c
@@ -1345,14 +1345,7 @@ enable_tm_err_intr(struct hns3_adapter *hns, bool en)
 	}
 
 	/* configure TM QCN hw errors */
-	hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_TM_QCN_MEM_INT_CFG, true);
-	ret = hns3_cmd_send(hw, &desc, 1);
-	if (ret) {
-		hns3_err(hw, "fail to read TM QCN CFG status, ret = %d\n", ret);
-		return ret;
-	}
-
-	hns3_cmd_reuse_desc(&desc, false);
+	hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_TM_QCN_MEM_INT_CFG, false);
 	if (en)
 		desc.data[1] = rte_cpu_to_le_32(HNS3_TM_QCN_MEM_ERR_INT_EN);
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.283131800 +0800
+++ 0064-net-hns3-remove-read-when-enabling-TM-QCN-error-even.patch	2021-06-12 06:53:56.300000000 +0800
@@ -1 +1 @@
-From 3903c05382c55ce36837405141534c6be042c2a2 Mon Sep 17 00:00:00 2001
+From 5d84f2b422adc0856f1404f6237ddfc6a7f64c3e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 3903c05382c55ce36837405141534c6be042c2a2 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index b743b41574..62e89a960b 100644
+index 4abcd7898e..4da197f940 100644
@@ -22 +24 @@
-@@ -1782,14 +1782,7 @@ enable_tm_err_intr(struct hns3_adapter *hns, bool en)
+@@ -1345,14 +1345,7 @@ enable_tm_err_intr(struct hns3_adapter *hns, bool en)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: remove unused VMDq code' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (62 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: remove read when enabling TM QCN error event' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: increase readability in logs' " Xueming Li
                       ` (113 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ce498169d471c6175a74d33b6aed30cf320e2486

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ce498169d471c6175a74d33b6aed30cf320e2486 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 30 Apr 2021 17:04:03 +0800
Subject: [PATCH] net/hns3: remove unused VMDq code
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit cdf3e4f3000fb26aa219e46315e75c0fa392cb70 ]

VMDq is not supported yet, so remove the unused code.

Fixes: d51867db65c1 ("net/hns3: add initialization")
Fixes: 1265b5372d9d ("net/hns3: add some definitions for data structure and macro")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_cmd.h       | 2 --
 drivers/net/hns3/hns3_ethdev.c    | 4 ----
 drivers/net/hns3/hns3_ethdev.h    | 1 -
 drivers/net/hns3/hns3_ethdev_vf.c | 2 --
 4 files changed, 9 deletions(-)

diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h
index 37cb20a9f5..041f2fa789 100644
--- a/drivers/net/hns3/hns3_cmd.h
+++ b/drivers/net/hns3/hns3_cmd.h
@@ -425,8 +425,6 @@ struct hns3_umv_spc_alc_cmd {
 #define HNS3_CFG_RD_LEN_BYTES		16
 #define HNS3_CFG_RD_LEN_UNIT		4
 
-#define HNS3_CFG_VMDQ_S			0
-#define HNS3_CFG_VMDQ_M			GENMASK(7, 0)
 #define HNS3_CFG_TC_NUM_S		8
 #define HNS3_CFG_TC_NUM_M		GENMASK(15, 8)
 #define HNS3_CFG_TQP_DESC_N_S		16
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 907435c677..498e1a40f3 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2613,8 +2613,6 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
 		.offloads = 0,
 	};
 
-	info->vmdq_queue_num = 0;
-
 	info->reta_size = hw->rss_ind_tbl_size;
 	info->hash_key_size = HNS3_RSS_KEY_SIZE;
 	info->flow_type_rss_offloads = HNS3_ETH_RSS_SUPPORT;
@@ -2882,8 +2880,6 @@ hns3_parse_cfg(struct hns3_cfg *cfg, struct hns3_cmd_desc *desc)
 	req = (struct hns3_cfg_param_cmd *)desc[0].data;
 
 	/* get the configuration */
-	cfg->vmdq_vport_num = hns3_get_field(rte_le_to_cpu_32(req->param[0]),
-					     HNS3_CFG_VMDQ_M, HNS3_CFG_VMDQ_S);
 	cfg->tc_num = hns3_get_field(rte_le_to_cpu_32(req->param[0]),
 				     HNS3_CFG_TC_NUM_M, HNS3_CFG_TC_NUM_S);
 	cfg->tqp_desc_num = hns3_get_field(rte_le_to_cpu_32(req->param[0]),
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 3032af6f55..79a96bdd08 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -148,7 +148,6 @@ struct hns3_tc_queue_info {
 };
 
 struct hns3_cfg {
-	uint8_t vmdq_vport_num;
 	uint8_t tc_num;
 	uint16_t tqp_desc_num;
 	uint16_t rx_buf_len;
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 8ad02a0b11..7f83e85203 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1027,8 +1027,6 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
 		.offloads = 0,
 	};
 
-	info->vmdq_queue_num = 0;
-
 	info->reta_size = hw->rss_ind_tbl_size;
 	info->hash_key_size = HNS3_RSS_KEY_SIZE;
 	info->flow_type_rss_offloads = HNS3_ETH_RSS_SUPPORT;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.304704900 +0800
+++ 0065-net-hns3-remove-unused-VMDq-code.patch	2021-06-12 06:53:56.310000000 +0800
@@ -1 +1 @@
-From cdf3e4f3000fb26aa219e46315e75c0fa392cb70 Mon Sep 17 00:00:00 2001
+From ce498169d471c6175a74d33b6aed30cf320e2486 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit cdf3e4f3000fb26aa219e46315e75c0fa392cb70 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 944e3d6d4c..eafa365a1f 100644
+index 37cb20a9f5..041f2fa789 100644
@@ -25 +27 @@
-@@ -457,8 +457,6 @@ struct hns3_umv_spc_alc_cmd {
+@@ -425,8 +425,6 @@ struct hns3_umv_spc_alc_cmd {
@@ -35 +37 @@
-index c554d2adfc..2056a37c7d 100644
+index 907435c677..498e1a40f3 100644
@@ -38 +40 @@
-@@ -2791,8 +2791,6 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
+@@ -2613,8 +2613,6 @@ hns3_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
@@ -47 +49 @@
-@@ -3075,8 +3073,6 @@ hns3_parse_cfg(struct hns3_cfg *cfg, struct hns3_cmd_desc *desc)
+@@ -2882,8 +2880,6 @@ hns3_parse_cfg(struct hns3_cfg *cfg, struct hns3_cmd_desc *desc)
@@ -57 +59 @@
-index 133b484dd4..1714ebaaf5 100644
+index 3032af6f55..79a96bdd08 100644
@@ -60 +62 @@
-@@ -155,7 +155,6 @@ struct hns3_tc_queue_info {
+@@ -148,7 +148,6 @@ struct hns3_tc_queue_info {
@@ -69 +71 @@
-index 9a85e970ce..6aa8a9b6ed 100644
+index 8ad02a0b11..7f83e85203 100644
@@ -72 +74 @@
-@@ -1022,8 +1022,6 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)
+@@ -1027,8 +1027,6 @@ hns3vf_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *info)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: increase readability in logs' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (63 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: remove unused VMDq code' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'ethdev: add missing buses in device iterator' " Xueming Li
                       ` (112 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8e6d9cfe2d140f2bb92412f36777ee308d1bbf01

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8e6d9cfe2d140f2bb92412f36777ee308d1bbf01 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 30 Apr 2021 17:04:04 +0800
Subject: [PATCH] net/hns3: increase readability in logs
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit b80c527a9ca4b8aa5ed1d8fba4e7882213883485 ]

Some logs format u64 variables, mostly using hexadecimal which was not
readable.
This patch formats most u64 variables in decimal, and add '0x' prefix
to the ones that are not adjusted.

Fixes: c37ca66f2b27 ("net/hns3: support RSS")
Fixes: 2790c6464725 ("net/hns3: support device reset")
Fixes: 8839c5e202f3 ("net/hns3: support device stats")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_flow.c  |  2 +-
 drivers/net/hns3/hns3_intr.c  | 20 ++++++++++----------
 drivers/net/hns3/hns3_stats.c |  8 ++++----
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 026f376a55..9087268712 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -1572,7 +1572,7 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
 		     hw->rss_info.conf.types;
 	if (flow_types != rss_flow_conf.types)
 		hns3_warn(hw, "modified RSS types based on hardware support, "
-			      "requested:%" PRIx64 " configured:%" PRIx64,
+			      "requested:0x%" PRIx64 " configured:0x%" PRIx64,
 			  rss_flow_conf.types, flow_types);
 	/* Update the useful flow types */
 	rss_flow_conf.types = flow_types;
diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c
index 4da197f940..b133670be0 100644
--- a/drivers/net/hns3/hns3_intr.c
+++ b/drivers/net/hns3/hns3_intr.c
@@ -1934,7 +1934,7 @@ hns3_clear_reset_level(struct hns3_hw *hw, uint64_t *levels)
 	if (merge_cnt != hw->reset.stats.merge_cnt)
 		hns3_warn(hw,
 			  "No need to do low-level reset after %s reset. "
-			  "merge cnt: %" PRIx64 " total merge cnt: %" PRIx64,
+			  "merge cnt: %" PRIu64 " total merge cnt: %" PRIu64,
 			  reset_string[hw->reset.level],
 			  hw->reset.stats.merge_cnt - merge_cnt,
 			  hw->reset.stats.merge_cnt);
@@ -1954,7 +1954,7 @@ hns3_reset_err_handle(struct hns3_adapter *hns)
 		hw->reset.attempts = 0;
 		hw->reset.stats.fail_cnt++;
 		hns3_warn(hw, "%s reset fail because new Reset is pending "
-			      "attempts:%" PRIx64,
+			      "attempts:%" PRIu64,
 			  reset_string[hw->reset.level],
 			  hw->reset.stats.fail_cnt);
 		hw->reset.level = HNS3_NONE_RESET;
@@ -1981,10 +1981,10 @@ hns3_reset_err_handle(struct hns3_adapter *hns)
 reset_fail:
 	hw->reset.attempts = 0;
 	hw->reset.stats.fail_cnt++;
-	hns3_warn(hw, "%s reset fail fail_cnt:%" PRIx64 " success_cnt:%" PRIx64
-		  " global_cnt:%" PRIx64 " imp_cnt:%" PRIx64
-		  " request_cnt:%" PRIx64 " exec_cnt:%" PRIx64
-		  " merge_cnt:%" PRIx64 "adapter_state:%d",
+	hns3_warn(hw, "%s reset fail fail_cnt:%" PRIu64 " success_cnt:%" PRIu64
+		  " global_cnt:%" PRIu64 " imp_cnt:%" PRIu64
+		  " request_cnt:%" PRIu64 " exec_cnt:%" PRIu64
+		  " merge_cnt:%" PRIu64 "adapter_state:%d",
 		  reset_string[hw->reset.level], hw->reset.stats.fail_cnt,
 		  hw->reset.stats.success_cnt, hw->reset.stats.global_cnt,
 		  hw->reset.stats.imp_cnt, hw->reset.stats.request_cnt,
@@ -2100,10 +2100,10 @@ hns3_reset_post(struct hns3_adapter *hns)
 		rte_spinlock_unlock(&hw->lock);
 		hns3_clock_gettime(&tv);
 		timersub(&tv, &hw->reset.start_time, &tv_delta);
-		hns3_warn(hw, "%s reset done fail_cnt:%" PRIx64
-			  " success_cnt:%" PRIx64 " global_cnt:%" PRIx64
-			  " imp_cnt:%" PRIx64 " request_cnt:%" PRIx64
-			  " exec_cnt:%" PRIx64 " merge_cnt:%" PRIx64,
+		hns3_warn(hw, "%s reset done fail_cnt:%" PRIu64
+			  " success_cnt:%" PRIu64 " global_cnt:%" PRIu64
+			  " imp_cnt:%" PRIu64 " request_cnt:%" PRIu64
+			  " exec_cnt:%" PRIu64 " merge_cnt:%" PRIu64,
 			  reset_string[hw->reset.level],
 			  hw->reset.stats.fail_cnt, hw->reset.stats.success_cnt,
 			  hw->reset.stats.global_cnt, hw->reset.stats.imp_cnt,
diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c
index 5b7b0c2f10..7fbdce9a1f 100644
--- a/drivers/net/hns3/hns3_stats.c
+++ b/drivers/net/hns3/hns3_stats.c
@@ -943,7 +943,7 @@ hns3_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
 	len = cnt_stats * sizeof(struct rte_eth_xstat);
 	values_copy = rte_zmalloc("hns3_xstats_values", len, 0);
 	if (values_copy == NULL) {
-		hns3_err(hw, "Failed to allocate %" PRIx64 " bytes needed "
+		hns3_err(hw, "Failed to allocate 0x%" PRIx64 " bytes needed "
 			     "to store statistics values", len);
 		return -ENOMEM;
 	}
@@ -965,7 +965,7 @@ hns3_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
 
 	for (i = 0; i < size; i++) {
 		if (ids[i] >= cnt_stats) {
-			hns3_err(hw, "ids[%u] (%" PRIx64 ") is invalid, "
+			hns3_err(hw, "ids[%u] (%" PRIu64 ") is invalid, "
 				     "should < %u", i, ids[i], cnt_stats);
 			rte_free(values_copy);
 			return -EINVAL;
@@ -1024,7 +1024,7 @@ hns3_dev_xstats_get_names_by_id(struct rte_eth_dev *dev,
 	len = cnt_stats * sizeof(struct rte_eth_xstat_name);
 	names_copy = rte_zmalloc("hns3_xstats_names", len, 0);
 	if (names_copy == NULL) {
-		hns3_err(hw, "Failed to allocate %" PRIx64 " bytes needed "
+		hns3_err(hw, "Failed to allocate 0x%" PRIx64 " bytes needed "
 			     "to store statistics names", len);
 		return -ENOMEM;
 	}
@@ -1033,7 +1033,7 @@ hns3_dev_xstats_get_names_by_id(struct rte_eth_dev *dev,
 
 	for (i = 0; i < size; i++) {
 		if (ids[i] >= cnt_stats) {
-			hns3_err(hw, "ids[%u] (%" PRIx64 ") is invalid, "
+			hns3_err(hw, "ids[%u] (%" PRIu64 ") is invalid, "
 				     "should < %u", i, ids[i], cnt_stats);
 			rte_free(names_copy);
 			return -EINVAL;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.331476100 +0800
+++ 0066-net-hns3-increase-readability-in-logs.patch	2021-06-12 06:53:56.320000000 +0800
@@ -1 +1 @@
-From b80c527a9ca4b8aa5ed1d8fba4e7882213883485 Mon Sep 17 00:00:00 2001
+From 8e6d9cfe2d140f2bb92412f36777ee308d1bbf01 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit b80c527a9ca4b8aa5ed1d8fba4e7882213883485 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 49d6568b22..65c7f6ed88 100644
+index 026f376a55..9087268712 100644
@@ -28 +30 @@
-@@ -1556,7 +1556,7 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
+@@ -1572,7 +1572,7 @@ hns3_config_rss_filter(struct rte_eth_dev *dev,
@@ -38 +40 @@
-index 62e89a960b..905c6d9513 100644
+index 4da197f940..b133670be0 100644
@@ -41 +43 @@
-@@ -2570,7 +2570,7 @@ hns3_clear_reset_level(struct hns3_hw *hw, uint64_t *levels)
+@@ -1934,7 +1934,7 @@ hns3_clear_reset_level(struct hns3_hw *hw, uint64_t *levels)
@@ -50 +52 @@
-@@ -2590,7 +2590,7 @@ hns3_reset_err_handle(struct hns3_adapter *hns)
+@@ -1954,7 +1954,7 @@ hns3_reset_err_handle(struct hns3_adapter *hns)
@@ -59 +61 @@
-@@ -2617,10 +2617,10 @@ hns3_reset_err_handle(struct hns3_adapter *hns)
+@@ -1981,10 +1981,10 @@ hns3_reset_err_handle(struct hns3_adapter *hns)
@@ -74 +76 @@
-@@ -2736,10 +2736,10 @@ hns3_reset_post(struct hns3_adapter *hns)
+@@ -2100,10 +2100,10 @@ hns3_reset_post(struct hns3_adapter *hns)
@@ -90 +92 @@
-index 3afef4a04b..e09dc0da80 100644
+index 5b7b0c2f10..7fbdce9a1f 100644
@@ -93 +95 @@
-@@ -1325,7 +1325,7 @@ hns3_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
+@@ -943,7 +943,7 @@ hns3_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
@@ -102 +104 @@
-@@ -1347,7 +1347,7 @@ hns3_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
+@@ -965,7 +965,7 @@ hns3_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids,
@@ -111 +113 @@
-@@ -1406,7 +1406,7 @@ hns3_dev_xstats_get_names_by_id(struct rte_eth_dev *dev,
+@@ -1024,7 +1024,7 @@ hns3_dev_xstats_get_names_by_id(struct rte_eth_dev *dev,
@@ -120 +122 @@
-@@ -1415,7 +1415,7 @@ hns3_dev_xstats_get_names_by_id(struct rte_eth_dev *dev,
+@@ -1033,7 +1033,7 @@ hns3_dev_xstats_get_names_by_id(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'ethdev: add missing buses in device iterator' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (64 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: increase readability in logs' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'test/distributor: fix worker notification in burst mode' " Xueming Li
                       ` (111 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Luca Boccassi, Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8064f75d9b25f4805504b1bce032f014b75a4131

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8064f75d9b25f4805504b1bce032f014b75a4131 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Thu, 29 Apr 2021 11:25:48 +0530
Subject: [PATCH] ethdev: add missing buses in device iterator
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit a956adb2817cac30c47c07855eb265f283bffde0 ]

This patch fixes issue with OVS 2.15 not working on
DPAA/FSLMC based platform due to missing support for
these busses in dev_iterate.
This patch adds dpaa_bus and fslmc to dev iterator
for bus arguments.

Fixes: 214ed1acd125 ("ethdev: add iterator to match devargs input")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_ethdev/rte_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 8a3c999010..22fb0b96d7 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -254,7 +254,9 @@ rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs_str)
 	}
 
 	/* Convert bus args to new syntax for use with new API dev_iterate. */
-	if (strcmp(iter->bus->name, "vdev") == 0) {
+	if ((strcmp(iter->bus->name, "vdev") == 0) ||
+		(strcmp(iter->bus->name, "fslmc") == 0) ||
+		(strcmp(iter->bus->name, "dpaa_bus") == 0)) {
 		bus_param_key = "name";
 	} else if (strcmp(iter->bus->name, "pci") == 0) {
 		bus_param_key = "addr";
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.355147300 +0800
+++ 0067-ethdev-add-missing-buses-in-device-iterator.patch	2021-06-12 06:53:56.320000000 +0800
@@ -1 +1 @@
-From a956adb2817cac30c47c07855eb265f283bffde0 Mon Sep 17 00:00:00 2001
+From 8064f75d9b25f4805504b1bce032f014b75a4131 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit a956adb2817cac30c47c07855eb265f283bffde0 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
- lib/ethdev/rte_ethdev.c | 4 +++-
+ lib/librte_ethdev/rte_ethdev.c | 4 +++-
@@ -21,5 +23,5 @@
-diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
-index a1879765e8..483013ec7a 100644
---- a/lib/ethdev/rte_ethdev.c
-+++ b/lib/ethdev/rte_ethdev.c
-@@ -260,7 +260,9 @@ rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs_str)
+diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
+index 8a3c999010..22fb0b96d7 100644
+--- a/lib/librte_ethdev/rte_ethdev.c
++++ b/lib/librte_ethdev/rte_ethdev.c
+@@ -254,7 +254,9 @@ rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs_str)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'test/distributor: fix worker notification in burst mode' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (65 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'ethdev: add missing buses in device iterator' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'test/distributor: fix burst flush on worker quit' " Xueming Li
                       ` (110 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Stanislaw Kardach
  Cc: Luca Boccassi, David Hunt, Lukasz Wojciechowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8e681713b3c154b05a02a04d201ec9bdbf2c1e08

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8e681713b3c154b05a02a04d201ec9bdbf2c1e08 Mon Sep 17 00:00:00 2001
From: Stanislaw Kardach <kda@semihalf.com>
Date: Wed, 28 Apr 2021 16:25:52 +0200
Subject: [PATCH] test/distributor: fix worker notification in burst mode
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 00dac9a99c783e0d442e73842ebb006f2f39c59d ]

Because a single worker can process more than one packet from the
distributor, the final set of notifications in burst mode should be
sent one-by-one to ensure that each worker has a chance to wake up.

This fix mirrors the change done in the functional test by
commit f72bff0ec272 ("test/distributor: fix quitting workers in burst
mode").

Fixes: c3eabff124e6 ("distributor: add unit tests")

Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Acked-by: David Hunt <david.hunt@intel.com>
Tested-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Reviewed-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
---
 app/test/test_distributor_perf.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/app/test/test_distributor_perf.c b/app/test/test_distributor_perf.c
index b25f79a348..371a14ba4c 100644
--- a/app/test/test_distributor_perf.c
+++ b/app/test/test_distributor_perf.c
@@ -188,9 +188,10 @@ quit_workers(struct rte_distributor *d, struct rte_mempool *p)
 	rte_mempool_get_bulk(p, (void *)bufs, num_workers);
 
 	quit = 1;
-	for (i = 0; i < num_workers; i++)
+	for (i = 0; i < num_workers; i++) {
 		bufs[i]->hash.usr = i << 1;
-	rte_distributor_process(d, bufs, num_workers);
+		rte_distributor_process(d, &bufs[i], 1);
+	}
 
 	rte_mempool_put_bulk(p, (void *)bufs, num_workers);
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.382547000 +0800
+++ 0068-test-distributor-fix-worker-notification-in-burst-mo.patch	2021-06-12 06:53:56.330000000 +0800
@@ -1 +1 @@
-From 00dac9a99c783e0d442e73842ebb006f2f39c59d Mon Sep 17 00:00:00 2001
+From 8e681713b3c154b05a02a04d201ec9bdbf2c1e08 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 00dac9a99c783e0d442e73842ebb006f2f39c59d ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'test/distributor: fix burst flush on worker quit' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (66 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'test/distributor: fix worker notification in burst mode' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'telemetry: fix race on callbacks list' " Xueming Li
                       ` (109 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Stanislaw Kardach
  Cc: Luca Boccassi, David Hunt, Lukasz Wojciechowski, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/31619530c8fb788188202ca91e58cbe9e43dcba9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 31619530c8fb788188202ca91e58cbe9e43dcba9 Mon Sep 17 00:00:00 2001
From: Stanislaw Kardach <kda@semihalf.com>
Date: Wed, 28 Apr 2021 16:25:53 +0200
Subject: [PATCH] test/distributor: fix burst flush on worker quit
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 6cda39af86ffc629732aac79058207cb4044e952 ]

While working on RISC-V port I have encountered a situation where worker
threads get stuck in the rte_distributor_return_pkt() function in the
burst test.
Investigation showed some of the threads enter this function with
flag RTE_DISTRIB_GET_BUF set in the d->retptr64[0]. At the same time the
main thread has already passed rte_distributor_process() so nobody will
clear this flag and hence workers can't return.

What I've noticed is that adding a flush just after the last _process(),
similarly to how quit_workers() function is written in the
test_distributor.c fixes the issue.
Lukasz Wojciechowski reproduced the same issue on x86 using a VM with 32
emulated CPU cores to force some lcores not to be woken up.

Fixes: 7c3287a10535 ("test/distributor: add performance test for burst mode")

Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Acked-by: David Hunt <david.hunt@intel.com>
Tested-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Reviewed-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
---
 app/test/test_distributor_perf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test/test_distributor_perf.c b/app/test/test_distributor_perf.c
index 371a14ba4c..fdbeae6d2f 100644
--- a/app/test/test_distributor_perf.c
+++ b/app/test/test_distributor_perf.c
@@ -196,6 +196,7 @@ quit_workers(struct rte_distributor *d, struct rte_mempool *p)
 	rte_mempool_put_bulk(p, (void *)bufs, num_workers);
 
 	rte_distributor_process(d, NULL, 0);
+	rte_distributor_flush(d);
 	rte_eal_mp_wait_lcore();
 	quit = 0;
 	worker_idx = 0;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.404285500 +0800
+++ 0069-test-distributor-fix-burst-flush-on-worker-quit.patch	2021-06-12 06:53:56.330000000 +0800
@@ -1 +1 @@
-From 6cda39af86ffc629732aac79058207cb4044e952 Mon Sep 17 00:00:00 2001
+From 31619530c8fb788188202ca91e58cbe9e43dcba9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 6cda39af86ffc629732aac79058207cb4044e952 ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'telemetry: fix race on callbacks list' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (67 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'test/distributor: fix burst flush on worker quit' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/virtio: fix vectorized Rx queue rearm' " Xueming Li
                       ` (108 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Ciara Power; +Cc: Luca Boccassi, David Marchand, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b6659faacc13e952be50a2d15ef7c8ef4a435845

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b6659faacc13e952be50a2d15ef7c8ef4a435845 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Wed, 5 May 2021 15:22:48 +0000
Subject: [PATCH] telemetry: fix race on callbacks list
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 048960272e809ea728110748d317ddce1d731a27 ]

The list_commands() function accessed the callbacks list,
but did not take the lock. This may have caused inconsistencies if
callbacks were being registered at the same time.
This is now fixed to lock before iterating the list,
and unlock afterwards.

Fixes: f38748736eb2 ("telemetry: add default callback commands")

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_telemetry/telemetry.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_telemetry/telemetry.c b/lib/librte_telemetry/telemetry.c
index b142729da4..9d970d167e 100644
--- a/lib/librte_telemetry/telemetry.c
+++ b/lib/librte_telemetry/telemetry.c
@@ -95,8 +95,10 @@ list_commands(const char *cmd __rte_unused, const char *params __rte_unused,
 	int i;
 
 	rte_tel_data_start_array(d, RTE_TEL_STRING_VAL);
+	rte_spinlock_lock(&callback_sl);
 	for (i = 0; i < num_callbacks; i++)
 		rte_tel_data_add_array_string(d, callbacks[i].cmd);
+	rte_spinlock_unlock(&callback_sl);
 	return 0;
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.425667100 +0800
+++ 0070-telemetry-fix-race-on-callbacks-list.patch	2021-06-12 06:53:56.330000000 +0800
@@ -1 +1 @@
-From 048960272e809ea728110748d317ddce1d731a27 Mon Sep 17 00:00:00 2001
+From b6659faacc13e952be50a2d15ef7c8ef4a435845 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 048960272e809ea728110748d317ddce1d731a27 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
- lib/telemetry/telemetry.c | 2 ++
+ lib/librte_telemetry/telemetry.c | 2 ++
@@ -22,5 +24,5 @@
-diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c
-index c06de45531..f8b0d1157b 100644
---- a/lib/telemetry/telemetry.c
-+++ b/lib/telemetry/telemetry.c
-@@ -107,8 +107,10 @@ list_commands(const char *cmd __rte_unused, const char *params __rte_unused,
+diff --git a/lib/librte_telemetry/telemetry.c b/lib/librte_telemetry/telemetry.c
+index b142729da4..9d970d167e 100644
+--- a/lib/librte_telemetry/telemetry.c
++++ b/lib/librte_telemetry/telemetry.c
+@@ -95,8 +95,10 @@ list_commands(const char *cmd __rte_unused, const char *params __rte_unused,

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/virtio: fix vectorized Rx queue rearm' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (68 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'telemetry: fix race on callbacks list' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'vhost: fix offload flags in Rx path' " Xueming Li
                       ` (107 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Xueming Li; +Cc: Luca Boccassi, David Christensen, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/96c209b1a6b0bdce7875fb91e8db27e0d930fc91

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 96c209b1a6b0bdce7875fb91e8db27e0d930fc91 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Wed, 14 Apr 2021 22:14:04 +0800
Subject: [PATCH] net/virtio: fix vectorized Rx queue rearm
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit d99088431ea5d6bb568c5cb5542688453084dcc6 ]

When Rx queue worked in vectorized mode and rxd <= 512, under traffic of
high PPS rate, testpmd often start and receive packets of rxd without
further growth.

Testpmd started with rxq flush which tried to rx MAX_PKT_BURST(512)
packets and drop. When Rx burst size >= Rx queue size, all descriptors
in used queue consumed without rearm, device can't receive more packets.
The next Rx burst returned at once since no used descriptors found,
rearm logic was skipped, rx vq kept in starving state.

To avoid rx vq starving, this patch always check the available queue,
rearm if needed even no used descriptor reported by device.

Fixes: fc3d66212fed ("virtio: add vector Rx")
Fixes: 2d7c37194ee4 ("net/virtio: add NEON based Rx handler")
Fixes: 52b5a707e6ca ("net/virtio: add Altivec Rx")

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_rxtx_simple_altivec.c | 12 ++++++------
 drivers/net/virtio/virtio_rxtx_simple_neon.c    | 12 ++++++------
 drivers/net/virtio/virtio_rxtx_simple_sse.c     | 12 ++++++------
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/net/virtio/virtio_rxtx_simple_altivec.c b/drivers/net/virtio/virtio_rxtx_simple_altivec.c
index a260ebdf57..bcd7d5ee59 100644
--- a/drivers/net/virtio/virtio_rxtx_simple_altivec.c
+++ b/drivers/net/virtio/virtio_rxtx_simple_altivec.c
@@ -85,6 +85,12 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	if (unlikely(nb_pkts < RTE_VIRTIO_DESC_PER_LOOP))
 		return 0;
 
+	if (vq->vq_free_cnt >= RTE_VIRTIO_VPMD_RX_REARM_THRESH) {
+		virtio_rxq_rearm_vec(rxvq);
+		if (unlikely(virtqueue_kick_prepare(vq)))
+			virtqueue_notify(vq);
+	}
+
 	nb_used = virtqueue_nused(vq);
 
 	rte_compiler_barrier();
@@ -102,12 +108,6 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 
 	rte_prefetch0(rused);
 
-	if (vq->vq_free_cnt >= RTE_VIRTIO_VPMD_RX_REARM_THRESH) {
-		virtio_rxq_rearm_vec(rxvq);
-		if (unlikely(virtqueue_kick_prepare(vq)))
-			virtqueue_notify(vq);
-	}
-
 	nb_total = nb_used;
 	ref_rx_pkts = rx_pkts;
 	for (nb_pkts_received = 0;
diff --git a/drivers/net/virtio/virtio_rxtx_simple_neon.c b/drivers/net/virtio/virtio_rxtx_simple_neon.c
index 12e034dc0a..afe6a25944 100644
--- a/drivers/net/virtio/virtio_rxtx_simple_neon.c
+++ b/drivers/net/virtio/virtio_rxtx_simple_neon.c
@@ -84,6 +84,12 @@ virtio_recv_pkts_vec(void *rx_queue,
 	if (unlikely(nb_pkts < RTE_VIRTIO_DESC_PER_LOOP))
 		return 0;
 
+	if (vq->vq_free_cnt >= RTE_VIRTIO_VPMD_RX_REARM_THRESH) {
+		virtio_rxq_rearm_vec(rxvq);
+		if (unlikely(virtqueue_kick_prepare(vq)))
+			virtqueue_notify(vq);
+	}
+
 	/* virtqueue_nused has a load-acquire or rte_io_rmb inside */
 	nb_used = virtqueue_nused(vq);
 
@@ -100,12 +106,6 @@ virtio_recv_pkts_vec(void *rx_queue,
 
 	rte_prefetch_non_temporal(rused);
 
-	if (vq->vq_free_cnt >= RTE_VIRTIO_VPMD_RX_REARM_THRESH) {
-		virtio_rxq_rearm_vec(rxvq);
-		if (unlikely(virtqueue_kick_prepare(vq)))
-			virtqueue_notify(vq);
-	}
-
 	nb_total = nb_used;
 	ref_rx_pkts = rx_pkts;
 	for (nb_pkts_received = 0;
diff --git a/drivers/net/virtio/virtio_rxtx_simple_sse.c b/drivers/net/virtio/virtio_rxtx_simple_sse.c
index 1056e9c20b..e4e85c2b80 100644
--- a/drivers/net/virtio/virtio_rxtx_simple_sse.c
+++ b/drivers/net/virtio/virtio_rxtx_simple_sse.c
@@ -85,6 +85,12 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 	if (unlikely(nb_pkts < RTE_VIRTIO_DESC_PER_LOOP))
 		return 0;
 
+	if (vq->vq_free_cnt >= RTE_VIRTIO_VPMD_RX_REARM_THRESH) {
+		virtio_rxq_rearm_vec(rxvq);
+		if (unlikely(virtqueue_kick_prepare(vq)))
+			virtqueue_notify(vq);
+	}
+
 	nb_used = virtqueue_nused(vq);
 
 	if (unlikely(nb_used == 0))
@@ -100,12 +106,6 @@ virtio_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 
 	rte_prefetch0(rused);
 
-	if (vq->vq_free_cnt >= RTE_VIRTIO_VPMD_RX_REARM_THRESH) {
-		virtio_rxq_rearm_vec(rxvq);
-		if (unlikely(virtqueue_kick_prepare(vq)))
-			virtqueue_notify(vq);
-	}
-
 	nb_total = nb_used;
 	ref_rx_pkts = rx_pkts;
 	for (nb_pkts_received = 0;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.447683600 +0800
+++ 0071-net-virtio-fix-vectorized-Rx-queue-rearm.patch	2021-06-12 06:53:56.330000000 +0800
@@ -1 +1 @@
-From d99088431ea5d6bb568c5cb5542688453084dcc6 Mon Sep 17 00:00:00 2001
+From 96c209b1a6b0bdce7875fb91e8db27e0d930fc91 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit d99088431ea5d6bb568c5cb5542688453084dcc6 ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -34 +36 @@
-index 62e5100a48..7534974ef4 100644
+index a260ebdf57..bcd7d5ee59 100644
@@ -64 +66 @@
-index c8e4b13a02..7fd92d1b0c 100644
+index 12e034dc0a..afe6a25944 100644
@@ -94 +96 @@
-index ff4eba33d6..7577f5e86d 100644
+index 1056e9c20b..e4e85c2b80 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'vhost: fix offload flags in Rx path' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (69 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/virtio: fix vectorized Rx queue rearm' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: refactor multi-queue Rx configuration' " Xueming Li
                       ` (106 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: David Marchand; +Cc: Luca Boccassi, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ca60f8482369ee84266041f381fa4863c828785a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ca60f8482369ee84266041f381fa4863c828785a Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 3 May 2021 18:43:44 +0200
Subject: [PATCH] vhost: fix offload flags in Rx path
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit ca7036b4af3a82d258cca914e71171434b3d0320 ]

The vhost library currently configures Tx offloading (PKT_TX_*) on any
packet received from a guest virtio device which asks for some offloading.

This is problematic, as Tx offloading is something that the application
must ask for: the application needs to configure devices
to support every used offloads (ip, tcp checksumming, tso..), and the
various l2/l3/l4 lengths must be set following any processing that
happened in the application itself.

On the other hand, the received packets are not marked wrt current
packet l3/l4 checksumming info.

Copy virtio rx processing to fix those offload flags with some
differences:
- accept VIRTIO_NET_HDR_GSO_ECN and VIRTIO_NET_HDR_GSO_UDP,
- ignore anything but the VIRTIO_NET_HDR_F_NEEDS_CSUM flag (to comply with
  the virtio spec),

Some applications might rely on the current behavior, so it is left
untouched by default.
A new RTE_VHOST_USER_NET_COMPLIANT_OL_FLAGS flag is added to enable the
new behavior.

The vhost example has been updated for the new behavior: TSO is applied to
any packet marked LRO.

Fixes: 859b480d5afd ("vhost: add guest offload setting")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 doc/guides/prog_guide/vhost_lib.rst |  12 ++
 drivers/net/vhost/rte_eth_vhost.c   |   2 +-
 examples/vhost/main.c               |  44 +++----
 lib/librte_vhost/rte_vhost.h        |   1 +
 lib/librte_vhost/socket.c           |   5 +-
 lib/librte_vhost/vhost.c            |   6 +-
 lib/librte_vhost/vhost.h            |  14 ++-
 lib/librte_vhost/virtio_net.c       | 185 ++++++++++++++++++++++++----
 8 files changed, 216 insertions(+), 53 deletions(-)

diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst
index ba4c62aeb8..493818bcf9 100644
--- a/doc/guides/prog_guide/vhost_lib.rst
+++ b/doc/guides/prog_guide/vhost_lib.rst
@@ -118,6 +118,18 @@ The following is an overview of some key Vhost API functions:
 
     It is disabled by default.
 
+  - ``RTE_VHOST_USER_NET_COMPLIANT_OL_FLAGS``
+
+    Since v16.04, the vhost library forwards checksum and gso requests for
+    packets received from a virtio driver by filling Tx offload metadata in
+    the mbuf. This behavior is inconsistent with other drivers but it is left
+    untouched for existing applications that might rely on it.
+
+    This flag disables the legacy behavior and instead ask vhost to simply
+    populate Rx offload metadata in the mbuf.
+
+    It is disabled by default.
+
 * ``rte_vhost_driver_set_features(path, features)``
 
   This function sets the feature bits the vhost-user driver supports. The
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 5845bb15f3..fe36fc8824 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -1505,7 +1505,7 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)
 	int ret = 0;
 	char *iface_name;
 	uint16_t queues;
-	uint64_t flags = 0;
+	uint64_t flags = RTE_VHOST_USER_NET_COMPLIANT_OL_FLAGS;
 	uint64_t disable_flags = 0;
 	int client_mode = 0;
 	int iommu_support = 0;
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index dd1a936f23..b7e1abffd1 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -20,6 +20,7 @@
 #include <rte_log.h>
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
+#include <rte_net.h>
 #include <rte_vhost.h>
 #include <rte_ip.h>
 #include <rte_tcp.h>
@@ -911,33 +912,34 @@ find_local_dest(struct vhost_dev *vdev, struct rte_mbuf *m,
 	return 0;
 }
 
-static uint16_t
-get_psd_sum(void *l3_hdr, uint64_t ol_flags)
-{
-	if (ol_flags & PKT_TX_IPV4)
-		return rte_ipv4_phdr_cksum(l3_hdr, ol_flags);
-	else /* assume ethertype == RTE_ETHER_TYPE_IPV6 */
-		return rte_ipv6_phdr_cksum(l3_hdr, ol_flags);
-}
-
 static void virtio_tx_offload(struct rte_mbuf *m)
 {
+	struct rte_net_hdr_lens hdr_lens;
+	struct rte_ipv4_hdr *ipv4_hdr;
+	struct rte_tcp_hdr *tcp_hdr;
+	uint32_t ptype;
 	void *l3_hdr;
-	struct rte_ipv4_hdr *ipv4_hdr = NULL;
-	struct rte_tcp_hdr *tcp_hdr = NULL;
-	struct rte_ether_hdr *eth_hdr =
-		rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
 
-	l3_hdr = (char *)eth_hdr + m->l2_len;
+	ptype = rte_net_get_ptype(m, &hdr_lens, RTE_PTYPE_ALL_MASK);
+	m->l2_len = hdr_lens.l2_len;
+	m->l3_len = hdr_lens.l3_len;
+	m->l4_len = hdr_lens.l4_len;
 
-	if (m->ol_flags & PKT_TX_IPV4) {
+	l3_hdr = rte_pktmbuf_mtod_offset(m, void *, m->l2_len);
+	tcp_hdr = rte_pktmbuf_mtod_offset(m, struct rte_tcp_hdr *,
+		m->l2_len + m->l3_len);
+
+	m->ol_flags |= PKT_TX_TCP_SEG;
+	if ((ptype & RTE_PTYPE_L3_MASK) == RTE_PTYPE_L3_IPV4) {
+		m->ol_flags |= PKT_TX_IPV4;
+		m->ol_flags |= PKT_TX_IP_CKSUM;
 		ipv4_hdr = l3_hdr;
 		ipv4_hdr->hdr_checksum = 0;
-		m->ol_flags |= PKT_TX_IP_CKSUM;
+		tcp_hdr->cksum = rte_ipv4_phdr_cksum(l3_hdr, m->ol_flags);
+	} else { /* assume ethertype == RTE_ETHER_TYPE_IPV6 */
+		m->ol_flags |= PKT_TX_IPV6;
+		tcp_hdr->cksum = rte_ipv6_phdr_cksum(l3_hdr, m->ol_flags);
 	}
-
-	tcp_hdr = (struct rte_tcp_hdr *)((char *)l3_hdr + m->l3_len);
-	tcp_hdr->cksum = get_psd_sum(l3_hdr, m->ol_flags);
 }
 
 static inline void
@@ -1039,7 +1041,7 @@ queue2nic:
 		m->vlan_tci = vlan_tag;
 	}
 
-	if (m->ol_flags & PKT_TX_TCP_SEG)
+	if (m->ol_flags & PKT_RX_LRO)
 		virtio_tx_offload(m);
 
 	tx_q->m_table[tx_q->len++] = m;
@@ -1503,7 +1505,7 @@ main(int argc, char *argv[])
 	int ret, i;
 	uint16_t portid;
 	static pthread_t tid;
-	uint64_t flags = 0;
+	uint64_t flags = RTE_VHOST_USER_NET_COMPLIANT_OL_FLAGS;
 
 	signal(SIGINT, sigint_handler);
 
diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
index 010f160869..fe910a2a7a 100644
--- a/lib/librte_vhost/rte_vhost.h
+++ b/lib/librte_vhost/rte_vhost.h
@@ -36,6 +36,7 @@ extern "C" {
 /* support only linear buffers (no chained mbufs) */
 #define RTE_VHOST_USER_LINEARBUF_SUPPORT	(1ULL << 6)
 #define RTE_VHOST_USER_ASYNC_COPY	(1ULL << 7)
+#define RTE_VHOST_USER_NET_COMPLIANT_OL_FLAGS	(1ULL << 8)
 
 /* Features. */
 #ifndef VIRTIO_NET_F_GUEST_ANNOUNCE
diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index 0169d36481..5d0d728d52 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -42,6 +42,7 @@ struct vhost_user_socket {
 	bool extbuf;
 	bool linearbuf;
 	bool async_copy;
+	bool net_compliant_ol_flags;
 
 	/*
 	 * The "supported_features" indicates the feature bits the
@@ -224,7 +225,8 @@ vhost_user_add_connection(int fd, struct vhost_user_socket *vsocket)
 	size = strnlen(vsocket->path, PATH_MAX);
 	vhost_set_ifname(vid, vsocket->path, size);
 
-	vhost_set_builtin_virtio_net(vid, vsocket->use_builtin_virtio_net);
+	vhost_setup_virtio_net(vid, vsocket->use_builtin_virtio_net,
+		vsocket->net_compliant_ol_flags);
 
 	vhost_attach_vdpa_device(vid, vsocket->vdpa_dev);
 
@@ -877,6 +879,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
 	vsocket->extbuf = flags & RTE_VHOST_USER_EXTBUF_SUPPORT;
 	vsocket->linearbuf = flags & RTE_VHOST_USER_LINEARBUF_SUPPORT;
 	vsocket->async_copy = flags & RTE_VHOST_USER_ASYNC_COPY;
+	vsocket->net_compliant_ol_flags = flags & RTE_VHOST_USER_NET_COMPLIANT_OL_FLAGS;
 
 	if (vsocket->async_copy &&
 		(flags & (RTE_VHOST_USER_IOMMU_SUPPORT |
diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index 90cad7fffd..b97dcf6b69 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -742,7 +742,7 @@ vhost_set_ifname(int vid, const char *if_name, unsigned int if_len)
 }
 
 void
-vhost_set_builtin_virtio_net(int vid, bool enable)
+vhost_setup_virtio_net(int vid, bool enable, bool compliant_ol_flags)
 {
 	struct virtio_net *dev = get_device(vid);
 
@@ -753,6 +753,10 @@ vhost_set_builtin_virtio_net(int vid, bool enable)
 		dev->flags |= VIRTIO_DEV_BUILTIN_VIRTIO_NET;
 	else
 		dev->flags &= ~VIRTIO_DEV_BUILTIN_VIRTIO_NET;
+	if (!compliant_ol_flags)
+		dev->flags |= VIRTIO_DEV_LEGACY_OL_FLAGS;
+	else
+		dev->flags &= ~VIRTIO_DEV_LEGACY_OL_FLAGS;
 }
 
 void
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index 361c9f79b3..984c7a6f5f 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -27,15 +27,17 @@
 #include "rte_vhost_async.h"
 
 /* Used to indicate that the device is running on a data core */
-#define VIRTIO_DEV_RUNNING 1
+#define VIRTIO_DEV_RUNNING ((uint32_t)1 << 0)
 /* Used to indicate that the device is ready to operate */
-#define VIRTIO_DEV_READY 2
+#define VIRTIO_DEV_READY ((uint32_t)1 << 1)
 /* Used to indicate that the built-in vhost net device backend is enabled */
-#define VIRTIO_DEV_BUILTIN_VIRTIO_NET 4
+#define VIRTIO_DEV_BUILTIN_VIRTIO_NET ((uint32_t)1 << 2)
 /* Used to indicate that the device has its own data path and configured */
-#define VIRTIO_DEV_VDPA_CONFIGURED 8
+#define VIRTIO_DEV_VDPA_CONFIGURED ((uint32_t)1 << 3)
 /* Used to indicate that the feature negotiation failed */
-#define VIRTIO_DEV_FEATURES_FAILED 16
+#define VIRTIO_DEV_FEATURES_FAILED ((uint32_t)1 << 4)
+/* Used to indicate that the virtio_net tx code should fill TX ol_flags */
+#define VIRTIO_DEV_LEGACY_OL_FLAGS ((uint32_t)1 << 5)
 
 /* Backend value set by guest. */
 #define VIRTIO_DEV_STOPPED -1
@@ -672,7 +674,7 @@ int alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx);
 void vhost_attach_vdpa_device(int vid, struct rte_vdpa_device *dev);
 
 void vhost_set_ifname(int, const char *if_name, unsigned int if_len);
-void vhost_set_builtin_virtio_net(int vid, bool enable);
+void vhost_setup_virtio_net(int vid, bool enable, bool legacy_ol_flags);
 void vhost_enable_extbuf(int vid);
 void vhost_enable_linearbuf(int vid);
 int vhost_enable_guest_notification(struct virtio_net *dev,
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index f2392e77eb..6c7c0b0f0e 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -8,6 +8,7 @@
 
 #include <rte_mbuf.h>
 #include <rte_memcpy.h>
+#include <rte_net.h>
 #include <rte_ether.h>
 #include <rte_ip.h>
 #include <rte_vhost.h>
@@ -1844,15 +1845,12 @@ parse_ethernet(struct rte_mbuf *m, uint16_t *l4_proto, void **l4_hdr)
 }
 
 static __rte_always_inline void
-vhost_dequeue_offload(struct virtio_net_hdr *hdr, struct rte_mbuf *m)
+vhost_dequeue_offload_legacy(struct virtio_net_hdr *hdr, struct rte_mbuf *m)
 {
 	uint16_t l4_proto = 0;
 	void *l4_hdr = NULL;
 	struct rte_tcp_hdr *tcp_hdr = NULL;
 
-	if (hdr->flags == 0 && hdr->gso_type == VIRTIO_NET_HDR_GSO_NONE)
-		return;
-
 	parse_ethernet(m, &l4_proto, &l4_hdr);
 	if (hdr->flags == VIRTIO_NET_HDR_F_NEEDS_CSUM) {
 		if (hdr->csum_start == (m->l2_len + m->l3_len)) {
@@ -1897,6 +1895,94 @@ vhost_dequeue_offload(struct virtio_net_hdr *hdr, struct rte_mbuf *m)
 	}
 }
 
+static __rte_always_inline void
+vhost_dequeue_offload(struct virtio_net_hdr *hdr, struct rte_mbuf *m,
+	bool legacy_ol_flags)
+{
+	struct rte_net_hdr_lens hdr_lens;
+	int l4_supported = 0;
+	uint32_t ptype;
+
+	if (hdr->flags == 0 && hdr->gso_type == VIRTIO_NET_HDR_GSO_NONE)
+		return;
+
+	if (legacy_ol_flags) {
+		vhost_dequeue_offload_legacy(hdr, m);
+		return;
+	}
+
+	m->ol_flags |= PKT_RX_IP_CKSUM_UNKNOWN;
+
+	ptype = rte_net_get_ptype(m, &hdr_lens, RTE_PTYPE_ALL_MASK);
+	m->packet_type = ptype;
+	if ((ptype & RTE_PTYPE_L4_MASK) == RTE_PTYPE_L4_TCP ||
+	    (ptype & RTE_PTYPE_L4_MASK) == RTE_PTYPE_L4_UDP ||
+	    (ptype & RTE_PTYPE_L4_MASK) == RTE_PTYPE_L4_SCTP)
+		l4_supported = 1;
+
+	/* According to Virtio 1.1 spec, the device only needs to look at
+	 * VIRTIO_NET_HDR_F_NEEDS_CSUM in the packet transmission path.
+	 * This differs from the processing incoming packets path where the
+	 * driver could rely on VIRTIO_NET_HDR_F_DATA_VALID flag set by the
+	 * device.
+	 *
+	 * 5.1.6.2.1 Driver Requirements: Packet Transmission
+	 * The driver MUST NOT set the VIRTIO_NET_HDR_F_DATA_VALID and
+	 * VIRTIO_NET_HDR_F_RSC_INFO bits in flags.
+	 *
+	 * 5.1.6.2.2 Device Requirements: Packet Transmission
+	 * The device MUST ignore flag bits that it does not recognize.
+	 */
+	if (hdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) {
+		uint32_t hdrlen;
+
+		hdrlen = hdr_lens.l2_len + hdr_lens.l3_len + hdr_lens.l4_len;
+		if (hdr->csum_start <= hdrlen && l4_supported != 0) {
+			m->ol_flags |= PKT_RX_L4_CKSUM_NONE;
+		} else {
+			/* Unknown proto or tunnel, do sw cksum. We can assume
+			 * the cksum field is in the first segment since the
+			 * buffers we provided to the host are large enough.
+			 * In case of SCTP, this will be wrong since it's a CRC
+			 * but there's nothing we can do.
+			 */
+			uint16_t csum = 0, off;
+
+			if (rte_raw_cksum_mbuf(m, hdr->csum_start,
+					rte_pktmbuf_pkt_len(m) - hdr->csum_start, &csum) < 0)
+				return;
+			if (likely(csum != 0xffff))
+				csum = ~csum;
+			off = hdr->csum_offset + hdr->csum_start;
+			if (rte_pktmbuf_data_len(m) >= off + 1)
+				*rte_pktmbuf_mtod_offset(m, uint16_t *, off) = csum;
+		}
+	}
+
+	if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {
+		if (hdr->gso_size == 0)
+			return;
+
+		switch (hdr->gso_type & ~VIRTIO_NET_HDR_GSO_ECN) {
+		case VIRTIO_NET_HDR_GSO_TCPV4:
+		case VIRTIO_NET_HDR_GSO_TCPV6:
+			if ((ptype & RTE_PTYPE_L4_MASK) != RTE_PTYPE_L4_TCP)
+				break;
+			m->ol_flags |= PKT_RX_LRO | PKT_RX_L4_CKSUM_NONE;
+			m->tso_segsz = hdr->gso_size;
+			break;
+		case VIRTIO_NET_HDR_GSO_UDP:
+			if ((ptype & RTE_PTYPE_L4_MASK) != RTE_PTYPE_L4_UDP)
+				break;
+			m->ol_flags |= PKT_RX_LRO | PKT_RX_L4_CKSUM_NONE;
+			m->tso_segsz = hdr->gso_size;
+			break;
+		default:
+			break;
+		}
+	}
+}
+
 static __rte_noinline void
 copy_vnet_hdr_from_desc(struct virtio_net_hdr *hdr,
 		struct buf_vector *buf_vec)
@@ -1921,7 +2007,8 @@ copy_vnet_hdr_from_desc(struct virtio_net_hdr *hdr,
 static __rte_always_inline int
 copy_desc_to_mbuf(struct virtio_net *dev, struct vhost_virtqueue *vq,
 		  struct buf_vector *buf_vec, uint16_t nr_vec,
-		  struct rte_mbuf *m, struct rte_mempool *mbuf_pool)
+		  struct rte_mbuf *m, struct rte_mempool *mbuf_pool,
+		  bool legacy_ol_flags)
 {
 	uint32_t buf_avail, buf_offset;
 	uint64_t buf_addr, buf_len;
@@ -2054,7 +2141,7 @@ copy_desc_to_mbuf(struct virtio_net *dev, struct vhost_virtqueue *vq,
 	m->pkt_len    += mbuf_offset;
 
 	if (hdr)
-		vhost_dequeue_offload(hdr, m);
+		vhost_dequeue_offload(hdr, m, legacy_ol_flags);
 
 out:
 
@@ -2137,9 +2224,11 @@ virtio_dev_pktmbuf_alloc(struct virtio_net *dev, struct rte_mempool *mp,
 	return NULL;
 }
 
-static __rte_noinline uint16_t
+__rte_always_inline
+static uint16_t
 virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
-	struct rte_mempool *mbuf_pool, struct rte_mbuf **pkts, uint16_t count)
+	struct rte_mempool *mbuf_pool, struct rte_mbuf **pkts, uint16_t count,
+	bool legacy_ol_flags)
 {
 	uint16_t i;
 	uint16_t free_entries;
@@ -2199,7 +2288,7 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 		}
 
 		err = copy_desc_to_mbuf(dev, vq, buf_vec, nr_vec, pkts[i],
-				mbuf_pool);
+				mbuf_pool, legacy_ol_flags);
 		if (unlikely(err)) {
 			rte_pktmbuf_free(pkts[i]);
 			if (!allocerr_warned) {
@@ -2227,6 +2316,24 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 	return (i - dropped);
 }
 
+__rte_noinline
+static uint16_t
+virtio_dev_tx_split_legacy(struct virtio_net *dev,
+	struct vhost_virtqueue *vq, struct rte_mempool *mbuf_pool,
+	struct rte_mbuf **pkts, uint16_t count)
+{
+	return virtio_dev_tx_split(dev, vq, mbuf_pool, pkts, count, true);
+}
+
+__rte_noinline
+static uint16_t
+virtio_dev_tx_split_compliant(struct virtio_net *dev,
+	struct vhost_virtqueue *vq, struct rte_mempool *mbuf_pool,
+	struct rte_mbuf **pkts, uint16_t count)
+{
+	return virtio_dev_tx_split(dev, vq, mbuf_pool, pkts, count, false);
+}
+
 static __rte_always_inline int
 vhost_reserve_avail_batch_packed(struct virtio_net *dev,
 				 struct vhost_virtqueue *vq,
@@ -2307,7 +2414,8 @@ static __rte_always_inline int
 virtio_dev_tx_batch_packed(struct virtio_net *dev,
 			   struct vhost_virtqueue *vq,
 			   struct rte_mempool *mbuf_pool,
-			   struct rte_mbuf **pkts)
+			   struct rte_mbuf **pkts,
+			   bool legacy_ol_flags)
 {
 	uint16_t avail_idx = vq->last_avail_idx;
 	uint32_t buf_offset = sizeof(struct virtio_net_hdr_mrg_rxbuf);
@@ -2331,7 +2439,7 @@ virtio_dev_tx_batch_packed(struct virtio_net *dev,
 	if (virtio_net_with_host_offload(dev)) {
 		vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) {
 			hdr = (struct virtio_net_hdr *)(desc_addrs[i]);
-			vhost_dequeue_offload(hdr, pkts[i]);
+			vhost_dequeue_offload(hdr, pkts[i], legacy_ol_flags);
 		}
 	}
 
@@ -2352,7 +2460,8 @@ vhost_dequeue_single_packed(struct virtio_net *dev,
 			    struct rte_mempool *mbuf_pool,
 			    struct rte_mbuf **pkts,
 			    uint16_t *buf_id,
-			    uint16_t *desc_count)
+			    uint16_t *desc_count,
+			    bool legacy_ol_flags)
 {
 	struct buf_vector buf_vec[BUF_VECTOR_MAX];
 	uint32_t buf_len;
@@ -2379,7 +2488,7 @@ vhost_dequeue_single_packed(struct virtio_net *dev,
 	}
 
 	err = copy_desc_to_mbuf(dev, vq, buf_vec, nr_vec, *pkts,
-				mbuf_pool);
+				mbuf_pool, legacy_ol_flags);
 	if (unlikely(err)) {
 		if (!allocerr_warned) {
 			VHOST_LOG_DATA(ERR,
@@ -2398,14 +2507,15 @@ static __rte_always_inline int
 virtio_dev_tx_single_packed(struct virtio_net *dev,
 			    struct vhost_virtqueue *vq,
 			    struct rte_mempool *mbuf_pool,
-			    struct rte_mbuf **pkts)
+			    struct rte_mbuf **pkts,
+			    bool legacy_ol_flags)
 {
 
 	uint16_t buf_id, desc_count = 0;
 	int ret;
 
 	ret = vhost_dequeue_single_packed(dev, vq, mbuf_pool, pkts, &buf_id,
-					&desc_count);
+					&desc_count, legacy_ol_flags);
 
 	if (likely(desc_count > 0)) {
 		if (virtio_net_is_inorder(dev))
@@ -2421,12 +2531,14 @@ virtio_dev_tx_single_packed(struct virtio_net *dev,
 	return ret;
 }
 
-static __rte_noinline uint16_t
+__rte_always_inline
+static uint16_t
 virtio_dev_tx_packed(struct virtio_net *dev,
 		     struct vhost_virtqueue *__rte_restrict vq,
 		     struct rte_mempool *mbuf_pool,
 		     struct rte_mbuf **__rte_restrict pkts,
-		     uint32_t count)
+		     uint32_t count,
+		     bool legacy_ol_flags)
 {
 	uint32_t pkt_idx = 0;
 	uint32_t remained = count;
@@ -2436,7 +2548,8 @@ virtio_dev_tx_packed(struct virtio_net *dev,
 
 		if (remained >= PACKED_BATCH_SIZE) {
 			if (!virtio_dev_tx_batch_packed(dev, vq, mbuf_pool,
-							&pkts[pkt_idx])) {
+							&pkts[pkt_idx],
+							legacy_ol_flags)) {
 				pkt_idx += PACKED_BATCH_SIZE;
 				remained -= PACKED_BATCH_SIZE;
 				continue;
@@ -2444,7 +2557,8 @@ virtio_dev_tx_packed(struct virtio_net *dev,
 		}
 
 		if (virtio_dev_tx_single_packed(dev, vq, mbuf_pool,
-						&pkts[pkt_idx]))
+						&pkts[pkt_idx],
+						legacy_ol_flags))
 			break;
 		pkt_idx++;
 		remained--;
@@ -2461,6 +2575,24 @@ virtio_dev_tx_packed(struct virtio_net *dev,
 	return pkt_idx;
 }
 
+__rte_noinline
+static uint16_t
+virtio_dev_tx_packed_legacy(struct virtio_net *dev,
+	struct vhost_virtqueue *__rte_restrict vq, struct rte_mempool *mbuf_pool,
+	struct rte_mbuf **__rte_restrict pkts, uint32_t count)
+{
+	return virtio_dev_tx_packed(dev, vq, mbuf_pool, pkts, count, true);
+}
+
+__rte_noinline
+static uint16_t
+virtio_dev_tx_packed_compliant(struct virtio_net *dev,
+	struct vhost_virtqueue *__rte_restrict vq, struct rte_mempool *mbuf_pool,
+	struct rte_mbuf **__rte_restrict pkts, uint32_t count)
+{
+	return virtio_dev_tx_packed(dev, vq, mbuf_pool, pkts, count, false);
+}
+
 uint16_t
 rte_vhost_dequeue_burst(int vid, uint16_t queue_id,
 	struct rte_mempool *mbuf_pool, struct rte_mbuf **pkts, uint16_t count)
@@ -2536,10 +2668,17 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id,
 		count -= 1;
 	}
 
-	if (vq_is_packed(dev))
-		count = virtio_dev_tx_packed(dev, vq, mbuf_pool, pkts, count);
-	else
-		count = virtio_dev_tx_split(dev, vq, mbuf_pool, pkts, count);
+	if (vq_is_packed(dev)) {
+		if (dev->flags & VIRTIO_DEV_LEGACY_OL_FLAGS)
+			count = virtio_dev_tx_packed_legacy(dev, vq, mbuf_pool, pkts, count);
+		else
+			count = virtio_dev_tx_packed_compliant(dev, vq, mbuf_pool, pkts, count);
+	} else {
+		if (dev->flags & VIRTIO_DEV_LEGACY_OL_FLAGS)
+			count = virtio_dev_tx_split_legacy(dev, vq, mbuf_pool, pkts, count);
+		else
+			count = virtio_dev_tx_split_compliant(dev, vq, mbuf_pool, pkts, count);
+	}
 
 out:
 	if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM))
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.470345500 +0800
+++ 0072-vhost-fix-offload-flags-in-Rx-path.patch	2021-06-12 06:53:56.340000000 +0800
@@ -1 +1 @@
-From ca7036b4af3a82d258cca914e71171434b3d0320 Mon Sep 17 00:00:00 2001
+From ca60f8482369ee84266041f381fa4863c828785a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit ca7036b4af3a82d258cca914e71171434b3d0320 ]
@@ -33 +35,0 @@
-Cc: stable@dpdk.org
@@ -38,10 +40,9 @@
- doc/guides/prog_guide/vhost_lib.rst    |  12 ++
- doc/guides/rel_notes/release_21_05.rst |   6 +
- drivers/net/vhost/rte_eth_vhost.c      |   2 +-
- examples/vhost/main.c                  |  44 +++---
- lib/vhost/rte_vhost.h                  |   1 +
- lib/vhost/socket.c                     |   5 +-
- lib/vhost/vhost.c                      |   6 +-
- lib/vhost/vhost.h                      |  14 +-
- lib/vhost/virtio_net.c                 | 185 ++++++++++++++++++++++---
- 9 files changed, 222 insertions(+), 53 deletions(-)
+ doc/guides/prog_guide/vhost_lib.rst |  12 ++
+ drivers/net/vhost/rte_eth_vhost.c   |   2 +-
+ examples/vhost/main.c               |  44 +++----
+ lib/librte_vhost/rte_vhost.h        |   1 +
+ lib/librte_vhost/socket.c           |   5 +-
+ lib/librte_vhost/vhost.c            |   6 +-
+ lib/librte_vhost/vhost.h            |  14 ++-
+ lib/librte_vhost/virtio_net.c       | 185 ++++++++++++++++++++++++----
+ 8 files changed, 216 insertions(+), 53 deletions(-)
@@ -50 +51 @@
-index 7afa351675..d18fb98910 100644
+index ba4c62aeb8..493818bcf9 100644
@@ -72,17 +72,0 @@
-diff --git a/doc/guides/rel_notes/release_21_05.rst b/doc/guides/rel_notes/release_21_05.rst
-index 885af4ab7c..bcd4dd84fb 100644
---- a/doc/guides/rel_notes/release_21_05.rst
-+++ b/doc/guides/rel_notes/release_21_05.rst
-@@ -343,6 +343,12 @@ API Changes
-   ``policer_action_recolor_supported`` and ``policer_action_drop_supported``
-   have been removed.
- 
-+* vhost: The vhost library currently populates received mbufs from a virtio
-+  driver with Tx offload flags while not filling Rx offload flags.
-+  While this behavior is arguable, it is kept untouched.
-+  A new flag ``RTE_VHOST_USER_NET_COMPLIANT_OL_FLAGS`` has been added to ask
-+  for a behavior compliant with the mbuf offload API.
-+
- * stack: Lock-free ``rte_stack`` no longer silently ignores push and pop when
-   it's not supported on the current platform. Instead ``rte_stack_create()``
-   fails and ``rte_errno`` is set to ``ENOTSUP``.
@@ -90 +74 @@
-index d198fc8a8e..281379d6a3 100644
+index 5845bb15f3..fe36fc8824 100644
@@ -103 +87 @@
-index 0bee1f3321..d2179eadb9 100644
+index dd1a936f23..b7e1abffd1 100644
@@ -106 +90 @@
-@@ -19,6 +19,7 @@
+@@ -20,6 +20,7 @@
@@ -114 +98 @@
-@@ -1029,33 +1030,34 @@ find_local_dest(struct vhost_dev *vdev, struct rte_mbuf *m,
+@@ -911,33 +912,34 @@ find_local_dest(struct vhost_dev *vdev, struct rte_mbuf *m,
@@ -167,2 +151,2 @@
- static __rte_always_inline void
-@@ -1148,7 +1150,7 @@ queue2nic:
+ static inline void
+@@ -1039,7 +1041,7 @@ queue2nic:
@@ -177 +161 @@
-@@ -1633,7 +1635,7 @@ main(int argc, char *argv[])
+@@ -1503,7 +1505,7 @@ main(int argc, char *argv[])
@@ -186,4 +170,4 @@
-diff --git a/lib/vhost/rte_vhost.h b/lib/vhost/rte_vhost.h
-index d0a8ae31f2..8d875e9322 100644
---- a/lib/vhost/rte_vhost.h
-+++ b/lib/vhost/rte_vhost.h
+diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
+index 010f160869..fe910a2a7a 100644
+--- a/lib/librte_vhost/rte_vhost.h
++++ b/lib/librte_vhost/rte_vhost.h
@@ -198 +182 @@
-diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
+diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
@@ -200,2 +184,2 @@
---- a/lib/vhost/socket.c
-+++ b/lib/vhost/socket.c
+--- a/lib/librte_vhost/socket.c
++++ b/lib/librte_vhost/socket.c
@@ -228,5 +212,5 @@
-diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c
-index c9b6379f73..9abfc0bfe7 100644
---- a/lib/vhost/vhost.c
-+++ b/lib/vhost/vhost.c
-@@ -752,7 +752,7 @@ vhost_set_ifname(int vid, const char *if_name, unsigned int if_len)
+diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
+index 90cad7fffd..b97dcf6b69 100644
+--- a/lib/librte_vhost/vhost.c
++++ b/lib/librte_vhost/vhost.c
+@@ -742,7 +742,7 @@ vhost_set_ifname(int vid, const char *if_name, unsigned int if_len)
@@ -241 +225 @@
-@@ -763,6 +763,10 @@ vhost_set_builtin_virtio_net(int vid, bool enable)
+@@ -753,6 +753,10 @@ vhost_set_builtin_virtio_net(int vid, bool enable)
@@ -252,4 +236,4 @@
-diff --git a/lib/vhost/vhost.h b/lib/vhost/vhost.h
-index b303635645..8078ddff79 100644
---- a/lib/vhost/vhost.h
-+++ b/lib/vhost/vhost.h
+diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
+index 361c9f79b3..984c7a6f5f 100644
+--- a/lib/librte_vhost/vhost.h
++++ b/lib/librte_vhost/vhost.h
@@ -279 +263 @@
-@@ -683,7 +685,7 @@ int alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx);
+@@ -672,7 +674,7 @@ int alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx);
@@ -288,4 +272,4 @@
-diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
-index 1a34867f3c..8e36f4c340 100644
---- a/lib/vhost/virtio_net.c
-+++ b/lib/vhost/virtio_net.c
+diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
+index f2392e77eb..6c7c0b0f0e 100644
+--- a/lib/librte_vhost/virtio_net.c
++++ b/lib/librte_vhost/virtio_net.c
@@ -300 +284 @@
-@@ -2303,15 +2304,12 @@ parse_ethernet(struct rte_mbuf *m, uint16_t *l4_proto, void **l4_hdr)
+@@ -1844,15 +1845,12 @@ parse_ethernet(struct rte_mbuf *m, uint16_t *l4_proto, void **l4_hdr)
@@ -317 +301 @@
-@@ -2356,6 +2354,94 @@ vhost_dequeue_offload(struct virtio_net_hdr *hdr, struct rte_mbuf *m)
+@@ -1897,6 +1895,94 @@ vhost_dequeue_offload(struct virtio_net_hdr *hdr, struct rte_mbuf *m)
@@ -412 +396 @@
-@@ -2380,7 +2466,8 @@ copy_vnet_hdr_from_desc(struct virtio_net_hdr *hdr,
+@@ -1921,7 +2007,8 @@ copy_vnet_hdr_from_desc(struct virtio_net_hdr *hdr,
@@ -422 +406 @@
-@@ -2513,7 +2600,7 @@ copy_desc_to_mbuf(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -2054,7 +2141,7 @@ copy_desc_to_mbuf(struct virtio_net *dev, struct vhost_virtqueue *vq,
@@ -431,2 +415,2 @@
-@@ -2606,9 +2693,11 @@ virtio_dev_pktmbuf_alloc(struct virtio_net *dev, struct rte_mempool *mp,
- 	return pkt;
+@@ -2137,9 +2224,11 @@ virtio_dev_pktmbuf_alloc(struct virtio_net *dev, struct rte_mempool *mp,
+ 	return NULL;
@@ -445 +429 @@
-@@ -2668,7 +2757,7 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -2199,7 +2288,7 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
@@ -454 +438 @@
-@@ -2696,6 +2785,24 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -2227,6 +2316,24 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
@@ -479,2 +463 @@
-@@ -2770,7 +2877,8 @@ err:
- static __rte_always_inline int
+@@ -2307,7 +2414,8 @@ static __rte_always_inline int
@@ -482,0 +466 @@
+ 			   struct rte_mempool *mbuf_pool,
@@ -489 +473 @@
-@@ -2794,7 +2902,7 @@ virtio_dev_tx_batch_packed(struct virtio_net *dev,
+@@ -2331,7 +2439,7 @@ virtio_dev_tx_batch_packed(struct virtio_net *dev,
@@ -498 +482 @@
-@@ -2815,7 +2923,8 @@ vhost_dequeue_single_packed(struct virtio_net *dev,
+@@ -2352,7 +2460,8 @@ vhost_dequeue_single_packed(struct virtio_net *dev,
@@ -500 +484 @@
- 			    struct rte_mbuf *pkts,
+ 			    struct rte_mbuf **pkts,
@@ -508 +492 @@
-@@ -2841,7 +2950,7 @@ vhost_dequeue_single_packed(struct virtio_net *dev,
+@@ -2379,7 +2488,7 @@ vhost_dequeue_single_packed(struct virtio_net *dev,
@@ -511 +495 @@
- 	err = copy_desc_to_mbuf(dev, vq, buf_vec, nr_vec, pkts,
+ 	err = copy_desc_to_mbuf(dev, vq, buf_vec, nr_vec, *pkts,
@@ -517 +501 @@
-@@ -2859,14 +2968,15 @@ static __rte_always_inline int
+@@ -2398,14 +2507,15 @@ static __rte_always_inline int
@@ -521,2 +505,2 @@
--			    struct rte_mbuf *pkts)
-+			    struct rte_mbuf *pkts,
+-			    struct rte_mbuf **pkts)
++			    struct rte_mbuf **pkts,
@@ -535 +519 @@
-@@ -2882,12 +2992,14 @@ virtio_dev_tx_single_packed(struct virtio_net *dev,
+@@ -2421,12 +2531,14 @@ virtio_dev_tx_single_packed(struct virtio_net *dev,
@@ -550,0 +535,2 @@
+ 	uint32_t remained = count;
+@@ -2436,7 +2548,8 @@ virtio_dev_tx_packed(struct virtio_net *dev,
@@ -552,4 +538,2 @@
-@@ -2899,14 +3011,16 @@ virtio_dev_tx_packed(struct virtio_net *dev,
- 
- 		if (count - pkt_idx >= PACKED_BATCH_SIZE) {
- 			if (!virtio_dev_tx_batch_packed(dev, vq,
+ 		if (remained >= PACKED_BATCH_SIZE) {
+ 			if (!virtio_dev_tx_batch_packed(dev, vq, mbuf_pool,
@@ -559,0 +544 @@
+ 				remained -= PACKED_BATCH_SIZE;
@@ -561 +546 @@
- 			}
+@@ -2444,7 +2557,8 @@ virtio_dev_tx_packed(struct virtio_net *dev,
@@ -565,2 +550,2 @@
--						pkts[pkt_idx]))
-+						pkts[pkt_idx],
+-						&pkts[pkt_idx]))
++						&pkts[pkt_idx],
@@ -570,2 +555,2 @@
- 	} while (pkt_idx < count);
-@@ -2924,6 +3038,24 @@ virtio_dev_tx_packed(struct virtio_net *dev,
+ 		remained--;
+@@ -2461,6 +2575,24 @@ virtio_dev_tx_packed(struct virtio_net *dev,
@@ -596 +581 @@
-@@ -2999,10 +3131,17 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id,
+@@ -2536,10 +2668,17 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id,

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/bnxt: refactor multi-queue Rx configuration' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (70 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'vhost: fix offload flags in Rx path' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: fix Rx timestamp when FIFO pending bit is set' " Xueming Li
                       ` (105 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Luca Boccassi, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/699e70a0b61347f8f9f6d2e2366f1a75dc05118c

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 699e70a0b61347f8f9f6d2e2366f1a75dc05118c Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Mon, 26 Apr 2021 11:37:54 +0530
Subject: [PATCH] net/bnxt: refactor multi-queue Rx configuration
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 21b1677d87a23a9695be0cbcbdf38607a2d58f84 ]

Eliminate separate codepath/handling for single queue
as the multiqueue code path takes care of it as well.
The only difference being the end_grp_id being 1
now instead of 0 for single queue, but that does not matter
for single queue and does not alter any functionality.

Fixes: 6133f207970c ("net/bnxt: add Rx queue create/destroy")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxq.c | 30 ------------------------------
 1 file changed, 30 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c
index 95a3fc91db..ffb7193cfc 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -40,35 +40,6 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
 
 	bp->nr_vnics = 0;
 
-	/* Single queue mode */
-	if (bp->rx_cp_nr_rings < 2) {
-		vnic = &bp->vnic_info[0];
-		if (!vnic) {
-			PMD_DRV_LOG(ERR, "VNIC alloc failed\n");
-			rc = -ENOMEM;
-			goto err_out;
-		}
-		vnic->flags |= BNXT_VNIC_INFO_BCAST;
-		bp->nr_vnics++;
-
-		rxq = bp->eth_dev->data->rx_queues[0];
-		rxq->vnic = vnic;
-
-		vnic->func_default = true;
-		vnic->start_grp_id = 0;
-		vnic->end_grp_id = vnic->start_grp_id;
-		filter = bnxt_alloc_filter(bp);
-		if (!filter) {
-			PMD_DRV_LOG(ERR, "L2 filter alloc failed\n");
-			rc = -ENOMEM;
-			goto err_out;
-		}
-		filter->mac_index = 0;
-		filter->flags |= HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_OUTERMOST;
-		STAILQ_INSERT_TAIL(&vnic->filter, filter, next);
-		goto out;
-	}
-
 	/* Multi-queue mode */
 	if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_VMDQ_DCB_RSS) {
 		/* VMDq ONLY, VMDq+RSS, VMDq+DCB, VMDq+DCB+RSS */
@@ -163,7 +134,6 @@ skip_filter_allocation:
 		end_grp_id += nb_q_per_grp;
 	}
 
-out:
 	bp->rx_num_qs_per_vnic = nb_q_per_grp;
 
 	if (dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.497634600 +0800
+++ 0073-net-bnxt-refactor-multi-queue-Rx-configuration.patch	2021-06-12 06:53:56.350000000 +0800
@@ -1 +1 @@
-From 21b1677d87a23a9695be0cbcbdf38607a2d58f84 Mon Sep 17 00:00:00 2001
+From 699e70a0b61347f8f9f6d2e2366f1a75dc05118c Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 21b1677d87a23a9695be0cbcbdf38607a2d58f84 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 2b0d3d4ac7..45e0c3d01c 100644
+index 95a3fc91db..ffb7193cfc 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/bnxt: fix Rx timestamp when FIFO pending bit is set' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (71 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: refactor multi-queue Rx configuration' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: fix dynamic VNIC count' " Xueming Li
                       ` (104 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Luca Boccassi, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a7375b06e879cc3319d2269640d6d20f45f97d1e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a7375b06e879cc3319d2269640d6d20f45f97d1e Mon Sep 17 00:00:00 2001
From: Somnath Kotur <somnath.kotur@broadcom.com>
Date: Mon, 26 Apr 2021 11:37:55 +0530
Subject: [PATCH] net/bnxt: fix Rx timestamp when FIFO pending bit is set
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit f8120fd07bf0ebdbcfa7e1a46c91df9d611ca940 ]

Fix to clear the Rx FIFO while reading the timestamp.
If the Rx FIFO has pending bit set, keep reading to clear it
and return the last valid timestamp instead of unconditionally
returning an error.

Fixes: b11cceb83a34 ("net/bnxt: support timesync")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt.h        |  1 +
 drivers/net/bnxt/bnxt_ethdev.c | 38 ++++++++++++++++++++++++++++++----
 2 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 272e076072..600154f654 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -316,6 +316,7 @@ struct rte_flow {
 	struct bnxt_vnic_info	*vnic;
 };
 
+#define BNXT_PTP_RX_PND_CNT		10
 #define BNXT_PTP_FLAGS_PATH_TX		0x0
 #define BNXT_PTP_FLAGS_PATH_RX		0x1
 #define BNXT_PTP_FLAGS_CURRENT_TIME	0x2
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index c2344dabc0..5d15116d8a 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3373,6 +3373,38 @@ static int bnxt_get_tx_ts(struct bnxt *bp, uint64_t *ts)
 	return 0;
 }
 
+static int bnxt_clr_rx_ts(struct bnxt *bp, uint64_t *last_ts)
+{
+	struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
+	struct bnxt_pf_info *pf = bp->pf;
+	uint16_t port_id;
+	int i = 0;
+	uint32_t fifo;
+
+	if (!ptp || (bp->flags & BNXT_FLAG_THOR_CHIP))
+		return -EINVAL;
+
+	port_id = pf->port_id;
+	fifo = rte_le_to_cpu_32(rte_read32((uint8_t *)bp->bar0 +
+				ptp->rx_mapped_regs[BNXT_PTP_RX_FIFO]));
+	while ((fifo & BNXT_PTP_RX_FIFO_PENDING) && (i < BNXT_PTP_RX_PND_CNT)) {
+		rte_write32(1 << port_id, (uint8_t *)bp->bar0 +
+			    ptp->rx_mapped_regs[BNXT_PTP_RX_FIFO_ADV]);
+		fifo = rte_le_to_cpu_32(rte_read32((uint8_t *)bp->bar0 +
+					ptp->rx_mapped_regs[BNXT_PTP_RX_FIFO]));
+		*last_ts = rte_le_to_cpu_32(rte_read32((uint8_t *)bp->bar0 +
+					ptp->rx_mapped_regs[BNXT_PTP_RX_TS_L]));
+		*last_ts |= (uint64_t)rte_le_to_cpu_32(rte_read32((uint8_t *)bp->bar0 +
+					ptp->rx_mapped_regs[BNXT_PTP_RX_TS_H])) << 32;
+		i++;
+	}
+
+	if (i >= BNXT_PTP_RX_PND_CNT)
+		return -EBUSY;
+
+	return 0;
+}
+
 static int bnxt_get_rx_ts(struct bnxt *bp, uint64_t *ts)
 {
 	struct bnxt_ptp_cfg *ptp = bp->ptp_cfg;
@@ -3391,10 +3423,8 @@ static int bnxt_get_rx_ts(struct bnxt *bp, uint64_t *ts)
 
 	fifo = rte_le_to_cpu_32(rte_read32((uint8_t *)bp->bar0 +
 				   ptp->rx_mapped_regs[BNXT_PTP_RX_FIFO]));
-	if (fifo & BNXT_PTP_RX_FIFO_PENDING) {
-/*		bnxt_clr_rx_ts(bp);	  TBD  */
-		return -EBUSY;
-	}
+	if (fifo & BNXT_PTP_RX_FIFO_PENDING)
+		return bnxt_clr_rx_ts(bp, ts);
 
 	*ts = rte_le_to_cpu_32(rte_read32((uint8_t *)bp->bar0 +
 				ptp->rx_mapped_regs[BNXT_PTP_RX_TS_L]));
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.518810400 +0800
+++ 0074-net-bnxt-fix-Rx-timestamp-when-FIFO-pending-bit-is-s.patch	2021-06-12 06:53:56.350000000 +0800
@@ -1 +1 @@
-From f8120fd07bf0ebdbcfa7e1a46c91df9d611ca940 Mon Sep 17 00:00:00 2001
+From a7375b06e879cc3319d2269640d6d20f45f97d1e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit f8120fd07bf0ebdbcfa7e1a46c91df9d611ca940 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index bd2dec4d63..72513fe66b 100644
+index 272e076072..600154f654 100644
@@ -25 +27 @@
-@@ -306,6 +306,7 @@ struct rte_flow {
+@@ -316,6 +316,7 @@ struct rte_flow {
@@ -34 +36 @@
-index dba5b9f94d..748b766969 100644
+index c2344dabc0..5d15116d8a 100644
@@ -37 +39 @@
-@@ -3390,6 +3390,38 @@ static int bnxt_get_tx_ts(struct bnxt *bp, uint64_t *ts)
+@@ -3373,6 +3373,38 @@ static int bnxt_get_tx_ts(struct bnxt *bp, uint64_t *ts)
@@ -49 +51 @@
-+	if (!ptp || (bp->flags & BNXT_FLAG_CHIP_P5))
++	if (!ptp || (bp->flags & BNXT_FLAG_THOR_CHIP))
@@ -76 +78 @@
-@@ -3408,10 +3440,8 @@ static int bnxt_get_rx_ts(struct bnxt *bp, uint64_t *ts)
+@@ -3391,10 +3423,8 @@ static int bnxt_get_rx_ts(struct bnxt *bp, uint64_t *ts)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/bnxt: fix dynamic VNIC count' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (72 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: fix Rx timestamp when FIFO pending bit is set' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: fix single PF per port check' " Xueming Li
                       ` (103 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Lance Richardson
  Cc: Luca Boccassi, Ajit Khaparde, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/85b0241b6b9262f9a2f68a9da0b3c52fe6afb73f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 85b0241b6b9262f9a2f68a9da0b3c52fe6afb73f Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Wed, 28 Apr 2021 18:03:44 -0400
Subject: [PATCH] net/bnxt: fix dynamic VNIC count
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit a0c2315a2a5f0a83d5d77ec745ac1de04a1e962b ]

Ensure that the current count of in-use VNICs is decremented
when a VNIC is freed. Don't attempt VNIC allocation when the
maximum supported number of VNICs is currently allocated.

Fixes: 49d0709b257f ("net/bnxt: delete and flush L2 filters cleanly")
Fixes: d24610f7bfda ("net/bnxt: allow flow creation when RSS is enabled")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reported-by: Stephen Hemminger <sthemmin@microsoft.com>
---
 drivers/net/bnxt/bnxt.h      | 2 +-
 drivers/net/bnxt/bnxt_flow.c | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 600154f654..0fb195b656 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -705,7 +705,7 @@ struct bnxt {
 	uint32_t		max_ring_grps;
 	struct bnxt_ring_grp_info	*grp_info;
 
-	unsigned int		nr_vnics;
+	uint16_t			nr_vnics;
 
 #define BNXT_GET_DEFAULT_VNIC(bp)	(&(bp)->vnic_info[0])
 	struct bnxt_vnic_info	*vnic_info;
diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c
index b8020d9e98..11034b6719 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -925,6 +925,9 @@ static int bnxt_vnic_prep(struct bnxt *bp, struct bnxt_vnic_info *vnic)
 	uint64_t rx_offloads = dev_conf->rxmode.offloads;
 	int rc;
 
+	if (bp->nr_vnics > bp->max_vnics - 1)
+		return -ENOMEM;
+
 	rc = bnxt_vnic_grp_alloc(bp, vnic);
 	if (rc)
 		goto ret;
@@ -1543,6 +1546,7 @@ bnxt_flow_validate(struct rte_eth_dev *dev,
 			bnxt_hwrm_vnic_ctx_free(bp, vnic);
 			bnxt_hwrm_vnic_free(bp, vnic);
 			vnic->rx_queue_cnt = 0;
+			bp->nr_vnics--;
 			PMD_DRV_LOG(DEBUG, "Free VNIC\n");
 		}
 	}
@@ -2001,6 +2005,7 @@ done:
 
 			bnxt_hwrm_vnic_free(bp, vnic);
 			vnic->rx_queue_cnt = 0;
+			bp->nr_vnics--;
 		}
 	} else {
 		rte_flow_error_set(error, -ret,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.545261700 +0800
+++ 0075-net-bnxt-fix-dynamic-VNIC-count.patch	2021-06-12 06:53:56.350000000 +0800
@@ -1 +1 @@
-From a0c2315a2a5f0a83d5d77ec745ac1de04a1e962b Mon Sep 17 00:00:00 2001
+From 85b0241b6b9262f9a2f68a9da0b3c52fe6afb73f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit a0c2315a2a5f0a83d5d77ec745ac1de04a1e962b ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 72513fe66b..8558565617 100644
+index 600154f654..0fb195b656 100644
@@ -26 +28 @@
-@@ -720,7 +720,7 @@ struct bnxt {
+@@ -705,7 +705,7 @@ struct bnxt {
@@ -36 +38 @@
-index 844bf1520f..73fd24cd9a 100644
+index b8020d9e98..11034b6719 100644
@@ -49 +51 @@
-@@ -1550,6 +1553,7 @@ bnxt_flow_validate(struct rte_eth_dev *dev,
+@@ -1543,6 +1546,7 @@ bnxt_flow_validate(struct rte_eth_dev *dev,
@@ -57 +59 @@
-@@ -2011,6 +2015,7 @@ done:
+@@ -2001,6 +2005,7 @@ done:

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/bnxt: fix single PF per port check' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (73 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: fix dynamic VNIC count' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: fix mismatched type comparison in MAC restore' " Xueming Li
                       ` (102 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Luca Boccassi, Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1cfcaccb0bd4729daf626be7959346dc2f9d5bc7

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1cfcaccb0bd4729daf626be7959346dc2f9d5bc7 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Thu, 29 Apr 2021 11:23:00 +0530
Subject: [PATCH] net/bnxt: fix single PF per port check
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 7712a39cc4e8cc677da47c53e90e1b4d0fce7826 ]

The check BNXT_SINGLE_PF(bp) returns false for a VF. So there is no
extra check needed for VF along with BNXT_SINGLE_PF(bp).

Also make error messages more explicit.

Fixes: ff947c6ce15f ("net/bnxt: add check for multi host PF per port")
Fixes: f86febfb46da ("net/bnxt: support VF")
Fixes: 3e12fdb78e82 ("net/bnxt: support VLAN pvid")

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 | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 5d15116d8a..e042466995 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2166,8 +2166,9 @@ static int bnxt_flow_ctrl_set_op(struct rte_eth_dev *dev,
 	if (rc)
 		return rc;
 
-	if (!BNXT_SINGLE_PF(bp) || BNXT_VF(bp)) {
-		PMD_DRV_LOG(ERR, "Flow Control Settings cannot be modified\n");
+	if (!BNXT_SINGLE_PF(bp)) {
+		PMD_DRV_LOG(ERR,
+			    "Flow Control Settings cannot be modified on VF or on shared PF\n");
 		return -ENOTSUP;
 	}
 
@@ -2963,9 +2964,8 @@ bnxt_vlan_pvid_set_op(struct rte_eth_dev *dev, uint16_t pvid, int on)
 	if (rc)
 		return rc;
 
-	if (!BNXT_SINGLE_PF(bp) || BNXT_VF(bp)) {
-		PMD_DRV_LOG(ERR,
-			"PVID cannot be modified for this function\n");
+	if (!BNXT_SINGLE_PF(bp)) {
+		PMD_DRV_LOG(ERR, "PVID cannot be modified on VF or on shared PF\n");
 		return -ENOTSUP;
 	}
 	bp->vlan = on ? pvid : 0;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.567491200 +0800
+++ 0076-net-bnxt-fix-single-PF-per-port-check.patch	2021-06-12 06:53:56.360000000 +0800
@@ -1 +1 @@
-From 7712a39cc4e8cc677da47c53e90e1b4d0fce7826 Mon Sep 17 00:00:00 2001
+From 1cfcaccb0bd4729daf626be7959346dc2f9d5bc7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 7712a39cc4e8cc677da47c53e90e1b4d0fce7826 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 748b766969..9c3e0f9f36 100644
+index 5d15116d8a..e042466995 100644
@@ -27 +29 @@
-@@ -2197,8 +2197,9 @@ static int bnxt_flow_ctrl_set_op(struct rte_eth_dev *dev,
+@@ -2166,8 +2166,9 @@ static int bnxt_flow_ctrl_set_op(struct rte_eth_dev *dev,
@@ -39 +41 @@
-@@ -2994,9 +2995,8 @@ bnxt_vlan_pvid_set_op(struct rte_eth_dev *dev, uint16_t pvid, int on)
+@@ -2963,9 +2964,8 @@ bnxt_vlan_pvid_set_op(struct rte_eth_dev *dev, uint16_t pvid, int on)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/bnxt: fix mismatched type comparison in MAC restore' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (74 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: fix single PF per port check' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: check PCI config read' " Xueming Li
                       ` (101 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Luca Boccassi, Kalesh AP, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/91d4a1731abb2cd8b1f6df56beea9cf9df51932e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 91d4a1731abb2cd8b1f6df56beea9cf9df51932e Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Fri, 30 Apr 2021 13:14:10 -0700
Subject: [PATCH] net/bnxt: fix mismatched type comparison in MAC restore
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit c8e8154390b38f9242249eb1e023df1db976a285 ]

dev_info.max_mac_addrs is of type uint32_t. But the counter i is
of type uint16_t. This mismatch may cause the loop condition may
always be true. Change the loop counter variable to uint32_t.

Fixes: b02f1573cd07 ("net/bnxt: restore MAC filters during reset recovery")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index e042466995..25f99fbc70 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3972,7 +3972,7 @@ static int bnxt_restore_mac_filters(struct bnxt *bp)
 	struct rte_ether_addr *addr;
 	uint64_t pool_mask;
 	uint32_t pool = 0;
-	uint16_t i;
+	uint32_t i;
 	int rc;
 
 	if (BNXT_VF(bp) && !BNXT_VF_IS_TRUSTED(bp))
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.592420200 +0800
+++ 0077-net-bnxt-fix-mismatched-type-comparison-in-MAC-resto.patch	2021-06-12 06:53:56.360000000 +0800
@@ -1 +1 @@
-From c8e8154390b38f9242249eb1e023df1db976a285 Mon Sep 17 00:00:00 2001
+From 91d4a1731abb2cd8b1f6df56beea9cf9df51932e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit c8e8154390b38f9242249eb1e023df1db976a285 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 9c3e0f9f36..115acda9b3 100644
+index e042466995..25f99fbc70 100644
@@ -23 +25 @@
-@@ -3989,7 +3989,7 @@ static int bnxt_restore_mac_filters(struct bnxt *bp)
+@@ -3972,7 +3972,7 @@ static int bnxt_restore_mac_filters(struct bnxt *bp)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/bnxt: check PCI config read' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (75 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: fix mismatched type comparison in MAC restore' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: fix mismatched type comparison in Rx' " Xueming Li
                       ` (100 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Luca Boccassi, Kalesh AP, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e00127b7777942fbb73efa904647f252acbd8857

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e00127b7777942fbb73efa904647f252acbd8857 Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Fri, 30 Apr 2021 13:14:11 -0700
Subject: [PATCH] net/bnxt: check PCI config read
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 52c33734587a135b55ff968626eabbd1167993b7 ]

Return value where return value of rte_pci_read_config was not checked.
Fix it.

Coverity issue: 349919
Fixes: 9d0cbaecc91a ("net/bnxt: support periodic FW health monitoring")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 25f99fbc70..242841a598 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4138,13 +4138,17 @@ uint32_t bnxt_read_fw_status_reg(struct bnxt *bp, uint32_t index)
 	struct bnxt_error_recovery_info *info = bp->recovery_info;
 	uint32_t reg = info->status_regs[index];
 	uint32_t type, offset, val = 0;
+	int ret = 0;
 
 	type = BNXT_FW_STATUS_REG_TYPE(reg);
 	offset = BNXT_FW_STATUS_REG_OFF(reg);
 
 	switch (type) {
 	case BNXT_FW_STATUS_REG_TYPE_CFG:
-		rte_pci_read_config(bp->pdev, &val, sizeof(val), offset);
+		ret = rte_pci_read_config(bp->pdev, &val, sizeof(val), offset);
+		if (ret < 0)
+			PMD_DRV_LOG(ERR, "Failed to read PCI offset %#x",
+				    offset);
 		break;
 	case BNXT_FW_STATUS_REG_TYPE_GRC:
 		offset = info->mapped_status_regs[index];
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.619321700 +0800
+++ 0078-net-bnxt-check-PCI-config-read.patch	2021-06-12 06:53:56.370000000 +0800
@@ -1 +1 @@
-From 52c33734587a135b55ff968626eabbd1167993b7 Mon Sep 17 00:00:00 2001
+From e00127b7777942fbb73efa904647f252acbd8857 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 52c33734587a135b55ff968626eabbd1167993b7 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 115acda9b3..719eb68847 100644
+index 25f99fbc70..242841a598 100644
@@ -24 +26 @@
-@@ -4159,13 +4159,17 @@ uint32_t bnxt_read_fw_status_reg(struct bnxt *bp, uint32_t index)
+@@ -4138,13 +4138,17 @@ uint32_t bnxt_read_fw_status_reg(struct bnxt *bp, uint32_t index)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/bnxt: fix mismatched type comparison in Rx' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (76 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: check PCI config read' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: prevent device access in error state' " Xueming Li
                       ` (99 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/00b234323911dbfa2922cb203806bb6ce9fc910f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 00b234323911dbfa2922cb203806bb6ce9fc910f Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: Fri, 30 Apr 2021 13:14:12 -0700
Subject: [PATCH] net/bnxt: fix mismatched type comparison in Rx
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 0797fcb00426bf246e83caf074822b4427ec3937 ]

Fix comparison between uint16_t and uint32_t types.

Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 6ea787c59a..d16340a34b 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -966,7 +966,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 
 	/* Attempt to alloc Rx buf in case of a previous allocation failure. */
 	if (alloc_failed) {
-		uint16_t cnt;
+		int cnt;
 
 		for (cnt = 0; cnt < nb_rx_pkts + nb_rep_rx_pkts; cnt++) {
 			struct rte_mbuf **rx_buf;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.644132700 +0800
+++ 0079-net-bnxt-fix-mismatched-type-comparison-in-Rx.patch	2021-06-12 06:53:56.370000000 +0800
@@ -1 +1 @@
-From 0797fcb00426bf246e83caf074822b4427ec3937 Mon Sep 17 00:00:00 2001
+From 00b234323911dbfa2922cb203806bb6ce9fc910f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 0797fcb00426bf246e83caf074822b4427ec3937 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
-index 7179c6cb30..2ef4115ef9 100644
+index 6ea787c59a..d16340a34b 100644
@@ -20 +22 @@
-@@ -1042,7 +1042,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -966,7 +966,7 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -27 +28,0 @@
- 		rx_raw_prod = RING_NEXT(rx_raw_prod);
@@ -28,0 +30 @@
+ 			struct rte_mbuf **rx_buf;

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/bnxt: prevent device access in error state' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (77 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: fix mismatched type comparison in Rx' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'regex/octeontx2: remove unused include directory' " Xueming Li
                       ` (98 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Kalesh AP
  Cc: Luca Boccassi, Somnath Kotur, Andy Gospodarek, Ajit Khaparde,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a0a21cb0c7f032799d9a9eee1ccedcddb78121f5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a0a21cb0c7f032799d9a9eee1ccedcddb78121f5 Mon Sep 17 00:00:00 2001
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Date: Mon, 3 May 2021 10:51:50 +0530
Subject: [PATCH] net/bnxt: prevent device access in error state
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit c967098a4c0aafa0cb244ab9423fdea3d943d1ab ]

Driver should prevent any DMA with the device when it
detects an error. When firmware is in fatal state,
stop tx/rx by assigning them to dummy functions.

Fixes: be14720def9c ("net/bnxt: support FW reset")
Fixes: 9d0cbaecc91a ("net/bnxt: support periodic FW health monitoring")

Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Andy Gospodarek <gospo@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 242841a598..1498f4a653 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4254,6 +4254,8 @@ reset:
 	bp->flags |= BNXT_FLAG_FATAL_ERROR;
 	bp->flags |= BNXT_FLAG_FW_RESET;
 
+	bnxt_stop_rxtx(bp);
+
 	PMD_DRV_LOG(ERR, "Detected FW dead condition\n");
 
 	if (bnxt_is_master_func(bp))
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.665550700 +0800
+++ 0080-net-bnxt-prevent-device-access-in-error-state.patch	2021-06-12 06:53:56.370000000 +0800
@@ -1 +1 @@
-From c967098a4c0aafa0cb244ab9423fdea3d943d1ab Mon Sep 17 00:00:00 2001
+From a0a21cb0c7f032799d9a9eee1ccedcddb78121f5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit c967098a4c0aafa0cb244ab9423fdea3d943d1ab ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 719eb68847..822853a008 100644
+index 242841a598..1498f4a653 100644
@@ -26 +28 @@
-@@ -4275,6 +4275,8 @@ reset:
+@@ -4254,6 +4254,8 @@ reset:

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'regex/octeontx2: remove unused include directory' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (78 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: prevent device access in error state' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'examples: fix pkg-config override' " Xueming Li
                       ` (97 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Luca Boccassi, Guy Kaneti, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8ff559890ac52a01c83fd98a3f6b04acf0aec68d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8ff559890ac52a01c83fd98a3f6b04acf0aec68d Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Mon, 3 May 2021 16:45:33 +0200
Subject: [PATCH] regex/octeontx2: remove unused include directory
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 486cc30399879f0ab006d095e03ad193ab18f2f4 ]

The variable inc_dir is not defined in this file.

Fixes: 4cd1c5fd9ed4 ("regex/octeontx2: introduce REE driver")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Guy Kaneti <guyk@marvell.com>
---
 drivers/regex/octeontx2/meson.build | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/regex/octeontx2/meson.build b/drivers/regex/octeontx2/meson.build
index 34e51728c2..c42d83d549 100644
--- a/drivers/regex/octeontx2/meson.build
+++ b/drivers/regex/octeontx2/meson.build
@@ -12,7 +12,6 @@ lib = cc.find_library('librxp_compiler', required: false)
 if lib.found()
 	ext_deps += lib
 	ext_deps += cc.find_library('libstdc++', required: true)
-	includes += include_directories(inc_dir)
 	cflags += ['-DREE_COMPILER_SDK']
 endif
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.688754000 +0800
+++ 0081-regex-octeontx2-remove-unused-include-directory.patch	2021-06-12 06:53:56.380000000 +0800
@@ -1 +1 @@
-From 486cc30399879f0ab006d095e03ad193ab18f2f4 Mon Sep 17 00:00:00 2001
+From 8ff559890ac52a01c83fd98a3f6b04acf0aec68d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 486cc30399879f0ab006d095e03ad193ab18f2f4 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 4930ce00f4..3f81add5bf 100644
+index 34e51728c2..c42d83d549 100644
@@ -23,4 +25,4 @@
-     ext_deps += lib
-     ext_deps += cc.find_library('libstdc++', required: true)
--    includes += include_directories(inc_dir)
-     cflags += ['-DREE_COMPILER_SDK']
+ 	ext_deps += lib
+ 	ext_deps += cc.find_library('libstdc++', required: true)
+-	includes += include_directories(inc_dir)
+ 	cflags += ['-DREE_COMPILER_SDK']

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'examples: fix pkg-config override' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (79 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'regex/octeontx2: remove unused include directory' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'raw/ntb: check SPAD user index' " Xueming Li
                       ` (96 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Luca Boccassi, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/10ddae775cb9eecad1351c2952bc1fe57e9df570

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 10ddae775cb9eecad1351c2952bc1fe57e9df570 Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerinj@marvell.com>
Date: Wed, 5 May 2021 19:55:25 +0530
Subject: [PATCH] examples: fix pkg-config override
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 11e027022d0f72f3cd7419b83e69a9ceb342666d ]

Move pkg-config override to beginning in the Makefile to allow
use PKGCONF variable to detect the libdpdk availability.

Fixes: fda34680eb9a ("examples: remove legacy sections of makefiles")

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/bbdev_app/Makefile                                | 6 +++---
 examples/bond/Makefile                                     | 6 +++---
 examples/cmdline/Makefile                                  | 6 +++---
 examples/distributor/Makefile                              | 6 +++---
 examples/ethtool/ethtool-app/Makefile                      | 6 +++---
 examples/ethtool/lib/Makefile                              | 6 +++---
 examples/eventdev_pipeline/Makefile                        | 6 +++---
 examples/fips_validation/Makefile                          | 6 +++---
 examples/flow_classify/Makefile                            | 6 +++---
 examples/flow_filtering/Makefile                           | 6 +++---
 examples/helloworld/Makefile                               | 6 +++---
 examples/ioat/Makefile                                     | 6 +++---
 examples/ip_fragmentation/Makefile                         | 6 +++---
 examples/ip_pipeline/Makefile                              | 6 +++---
 examples/ip_reassembly/Makefile                            | 6 +++---
 examples/ipsec-secgw/Makefile                              | 6 +++---
 examples/ipv4_multicast/Makefile                           | 6 +++---
 examples/kni/Makefile                                      | 6 +++---
 examples/l2fwd-cat/Makefile                                | 6 +++---
 examples/l2fwd-crypto/Makefile                             | 6 +++---
 examples/l2fwd-event/Makefile                              | 6 +++---
 examples/l2fwd-jobstats/Makefile                           | 6 +++---
 examples/l2fwd-keepalive/Makefile                          | 6 +++---
 examples/l2fwd-keepalive/ka-agent/Makefile                 | 6 +++---
 examples/l2fwd/Makefile                                    | 6 +++---
 examples/l3fwd-acl/Makefile                                | 6 +++---
 examples/l3fwd-graph/Makefile                              | 6 +++---
 examples/l3fwd-power/Makefile                              | 6 +++---
 examples/l3fwd/Makefile                                    | 6 +++---
 examples/link_status_interrupt/Makefile                    | 6 +++---
 examples/multi_process/client_server_mp/mp_client/Makefile | 6 +++---
 examples/multi_process/client_server_mp/mp_server/Makefile | 6 +++---
 examples/multi_process/hotplug_mp/Makefile                 | 6 +++---
 examples/multi_process/simple_mp/Makefile                  | 6 +++---
 examples/multi_process/symmetric_mp/Makefile               | 6 +++---
 examples/ntb/Makefile                                      | 6 +++---
 examples/packet_ordering/Makefile                          | 6 +++---
 examples/performance-thread/l3fwd-thread/Makefile          | 5 +++--
 examples/performance-thread/pthread_shim/Makefile          | 6 +++---
 examples/pipeline/Makefile                                 | 6 +++---
 examples/ptpclient/Makefile                                | 6 +++---
 examples/qos_meter/Makefile                                | 6 +++---
 examples/qos_sched/Makefile                                | 6 +++---
 examples/rxtx_callbacks/Makefile                           | 6 +++---
 examples/server_node_efd/node/Makefile                     | 6 +++---
 examples/server_node_efd/server/Makefile                   | 6 +++---
 examples/service_cores/Makefile                            | 6 +++---
 examples/skeleton/Makefile                                 | 6 +++---
 examples/timer/Makefile                                    | 6 +++---
 examples/vdpa/Makefile                                     | 6 +++---
 examples/vhost/Makefile                                    | 6 +++---
 examples/vhost_blk/Makefile                                | 6 +++---
 examples/vhost_crypto/Makefile                             | 6 +++---
 examples/vm_power_manager/Makefile                         | 6 +++---
 examples/vm_power_manager/guest_cli/Makefile               | 6 +++---
 examples/vmdq/Makefile                                     | 6 +++---
 examples/vmdq_dcb/Makefile                                 | 6 +++---
 57 files changed, 171 insertions(+), 170 deletions(-)

diff --git a/examples/bbdev_app/Makefile b/examples/bbdev_app/Makefile
index 2f156736d1..942e106ac2 100644
--- a/examples/bbdev_app/Makefile
+++ b/examples/bbdev_app/Makefile
@@ -7,8 +7,10 @@ APP = bbdev
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/bond/Makefile b/examples/bond/Makefile
index 8700b589fb..d96afe2cba 100644
--- a/examples/bond/Makefile
+++ b/examples/bond/Makefile
@@ -7,8 +7,10 @@ APP = bond_app
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ static: build/$(APP)-static
 
 LDFLAGS += -lrte_net_bond
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/cmdline/Makefile b/examples/cmdline/Makefile
index 09da84ba0b..fd7ae682a4 100644
--- a/examples/cmdline/Makefile
+++ b/examples/cmdline/Makefile
@@ -7,8 +7,10 @@ APP = cmdline
 # all source are stored in SRCS-y
 SRCS-y := main.c commands.c parse_obj_list.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/distributor/Makefile b/examples/distributor/Makefile
index d7615f9a32..ade6df08b3 100644
--- a/examples/distributor/Makefile
+++ b/examples/distributor/Makefile
@@ -7,8 +7,10 @@ APP = distributor_app
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/ethtool/ethtool-app/Makefile b/examples/ethtool/ethtool-app/Makefile
index 93ef5c27c3..cda3f14252 100644
--- a/examples/ethtool/ethtool-app/Makefile
+++ b/examples/ethtool/ethtool-app/Makefile
@@ -12,8 +12,10 @@ LDFLAGS += -L../lib/build
 LDFLAGS_STATIC = -l:librte_ethtool.a
 LDFLAGS_SHARED = -lrte_ethtool
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -24,8 +26,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED += $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/ethtool/lib/Makefile b/examples/ethtool/lib/Makefile
index b4af9b0c91..a33040e66a 100644
--- a/examples/ethtool/lib/Makefile
+++ b/examples/ethtool/lib/Makefile
@@ -2,15 +2,15 @@
 # Copyright(c) 2015-2020 Intel Corporation
 
 
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+PKGCONF ?= pkg-config
+
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 ifneq ($(shell uname),Linux)
 $(error This application can only operate in a linux environment)
 endif
 
-PKGCONF ?= pkg-config
-
 # library name
 LIB = librte_ethtool.so
 LIB_STATIC = librte_ethtool.a
diff --git a/examples/eventdev_pipeline/Makefile b/examples/eventdev_pipeline/Makefile
index f5072a2b0c..faf667a54a 100644
--- a/examples/eventdev_pipeline/Makefile
+++ b/examples/eventdev_pipeline/Makefile
@@ -9,8 +9,10 @@ SRCS-y := main.c
 SRCS-y += pipeline_worker_generic.c
 SRCS-y += pipeline_worker_tx.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/fips_validation/Makefile b/examples/fips_validation/Makefile
index 8f82a4c6c5..c41fdb0006 100644
--- a/examples/fips_validation/Makefile
+++ b/examples/fips_validation/Makefile
@@ -17,8 +17,10 @@ SRCS-y += fips_dev_self_test.c
 SRCS-y += fips_validation_xts.c
 SRCS-y += main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -29,8 +31,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/flow_classify/Makefile b/examples/flow_classify/Makefile
index 4c215daf1b..7e892405de 100644
--- a/examples/flow_classify/Makefile
+++ b/examples/flow_classify/Makefile
@@ -7,8 +7,10 @@ APP = flow_classify
 # all source are stored in SRCS-y
 SRCS-y := flow_classify.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/flow_filtering/Makefile b/examples/flow_filtering/Makefile
index 9bc9179346..7453414d24 100644
--- a/examples/flow_filtering/Makefile
+++ b/examples/flow_filtering/Makefile
@@ -5,8 +5,10 @@ APP = flow
 
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -17,8 +19,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/helloworld/Makefile b/examples/helloworld/Makefile
index 436569f5a6..b16773a02f 100644
--- a/examples/helloworld/Makefile
+++ b/examples/helloworld/Makefile
@@ -7,8 +7,10 @@ APP = helloworld
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/ioat/Makefile b/examples/ioat/Makefile
index c13ad8d8af..c7a54bffbf 100644
--- a/examples/ioat/Makefile
+++ b/examples/ioat/Makefile
@@ -7,8 +7,10 @@ APP = ioatfwd
 # all source are stored in SRCS-y
 SRCS-y := ioatfwd.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/ip_fragmentation/Makefile b/examples/ip_fragmentation/Makefile
index f6baf635bb..c7a27e4f14 100644
--- a/examples/ip_fragmentation/Makefile
+++ b/examples/ip_fragmentation/Makefile
@@ -8,8 +8,10 @@ APP = ip_fragmentation
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -20,8 +22,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 CFLAGS += -DALLOW_EXPERIMENTAL_API
diff --git a/examples/ip_pipeline/Makefile b/examples/ip_pipeline/Makefile
index 4b391973cb..e71cd61b43 100644
--- a/examples/ip_pipeline/Makefile
+++ b/examples/ip_pipeline/Makefile
@@ -20,8 +20,10 @@ SRCS-y += thread.c
 SRCS-y += tmgr.c
 SRCS-y += cryptodev.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -32,8 +34,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/ip_reassembly/Makefile b/examples/ip_reassembly/Makefile
index 740f4721d0..28158225a6 100644
--- a/examples/ip_reassembly/Makefile
+++ b/examples/ip_reassembly/Makefile
@@ -8,8 +8,10 @@ APP = ip_reassembly
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -20,8 +22,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/ipsec-secgw/Makefile b/examples/ipsec-secgw/Makefile
index 7670cc3684..94a685a9ce 100644
--- a/examples/ipsec-secgw/Makefile
+++ b/examples/ipsec-secgw/Makefile
@@ -22,8 +22,10 @@ SRCS-y += flow.c
 
 CFLAGS += -gdwarf-2
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -34,8 +36,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/ipv4_multicast/Makefile b/examples/ipv4_multicast/Makefile
index 7ea44e6f63..2f054fe27d 100644
--- a/examples/ipv4_multicast/Makefile
+++ b/examples/ipv4_multicast/Makefile
@@ -8,8 +8,10 @@ APP = ipv4_multicast
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -20,8 +22,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/kni/Makefile b/examples/kni/Makefile
index bbf3bcae12..3dad5329d8 100644
--- a/examples/kni/Makefile
+++ b/examples/kni/Makefile
@@ -7,8 +7,10 @@ APP = kni
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 CFLAGS += -DALLOW_EXPERIMENTAL_API
diff --git a/examples/l2fwd-cat/Makefile b/examples/l2fwd-cat/Makefile
index 9ba1135612..532db37ba6 100644
--- a/examples/l2fwd-cat/Makefile
+++ b/examples/l2fwd-cat/Makefile
@@ -7,8 +7,10 @@ APP = l2fwd-cat
 # all source are stored in SRCS-y
 SRCS-y := l2fwd-cat.c cat.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/l2fwd-crypto/Makefile b/examples/l2fwd-crypto/Makefile
index 7731eccd03..09aec4d52d 100644
--- a/examples/l2fwd-crypto/Makefile
+++ b/examples/l2fwd-crypto/Makefile
@@ -7,8 +7,10 @@ APP = l2fwd-crypto
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/l2fwd-event/Makefile b/examples/l2fwd-event/Makefile
index 384224b24a..e011e31d1e 100644
--- a/examples/l2fwd-event/Makefile
+++ b/examples/l2fwd-event/Makefile
@@ -13,8 +13,10 @@ SRCS-y += l2fwd_common.c
 SRCS-y += l2fwd_event_generic.c
 SRCS-y += l2fwd_event_internal_port.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -25,8 +27,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/l2fwd-jobstats/Makefile b/examples/l2fwd-jobstats/Makefile
index fcb60b2a33..9a71c68fa8 100644
--- a/examples/l2fwd-jobstats/Makefile
+++ b/examples/l2fwd-jobstats/Makefile
@@ -7,8 +7,10 @@ APP = l2fwd-jobstats
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/l2fwd-keepalive/Makefile b/examples/l2fwd-keepalive/Makefile
index 09a891149b..ace9b4687e 100644
--- a/examples/l2fwd-keepalive/Makefile
+++ b/examples/l2fwd-keepalive/Makefile
@@ -7,8 +7,10 @@ APP = l2fwd-keepalive
 # all source are stored in SRCS-y
 SRCS-y := main.c shm.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ static: build/$(APP)-static
 
 LDFLAGS += -pthread -lrt
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/l2fwd-keepalive/ka-agent/Makefile b/examples/l2fwd-keepalive/ka-agent/Makefile
index 8b329a78b1..00d364fcbf 100644
--- a/examples/l2fwd-keepalive/ka-agent/Makefile
+++ b/examples/l2fwd-keepalive/ka-agent/Makefile
@@ -9,8 +9,10 @@ SRCS-y := main.c
 
 CFLAGS += -I..
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -23,8 +25,6 @@ static: build/$(APP)-static
 
 LDFLAGS += -lpthread -lrt
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/l2fwd/Makefile b/examples/l2fwd/Makefile
index b180deb862..85669a298a 100644
--- a/examples/l2fwd/Makefile
+++ b/examples/l2fwd/Makefile
@@ -7,8 +7,10 @@ APP = l2fwd
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 # Add flag to allow experimental API as l2fwd uses rte_ethdev_set_ptype API
diff --git a/examples/l3fwd-acl/Makefile b/examples/l3fwd-acl/Makefile
index 3420ea3a9c..f5d2099d8b 100644
--- a/examples/l3fwd-acl/Makefile
+++ b/examples/l3fwd-acl/Makefile
@@ -7,8 +7,10 @@ APP = l3fwd-acl
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/l3fwd-graph/Makefile b/examples/l3fwd-graph/Makefile
index 6e3d0bca06..4f6ee27272 100644
--- a/examples/l3fwd-graph/Makefile
+++ b/examples/l3fwd-graph/Makefile
@@ -7,8 +7,10 @@ APP = l3fwd-graph
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) -DALLOW_EXPERIMENTAL_API
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/l3fwd-power/Makefile b/examples/l3fwd-power/Makefile
index d69854c9f8..d1eb10e6e1 100644
--- a/examples/l3fwd-power/Makefile
+++ b/examples/l3fwd-power/Makefile
@@ -7,8 +7,10 @@ APP = l3fwd-power
 # all source are stored in SRCS-y
 SRCS-y := main.c perf_core.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/l3fwd/Makefile b/examples/l3fwd/Makefile
index 7e70bbd826..fb4f30c172 100644
--- a/examples/l3fwd/Makefile
+++ b/examples/l3fwd/Makefile
@@ -8,8 +8,10 @@ APP = l3fwd
 SRCS-y := main.c l3fwd_lpm.c l3fwd_em.c l3fwd_event.c
 SRCS-y += l3fwd_event_generic.c l3fwd_event_internal_port.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -20,8 +22,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 # Added for 'rte_eth_link_to_str()'
diff --git a/examples/link_status_interrupt/Makefile b/examples/link_status_interrupt/Makefile
index fa608c56a0..c5c342d8e5 100644
--- a/examples/link_status_interrupt/Makefile
+++ b/examples/link_status_interrupt/Makefile
@@ -7,8 +7,10 @@ APP = link_status_interrupt
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/multi_process/client_server_mp/mp_client/Makefile b/examples/multi_process/client_server_mp/mp_client/Makefile
index bc00a1c875..e694b5659e 100644
--- a/examples/multi_process/client_server_mp/mp_client/Makefile
+++ b/examples/multi_process/client_server_mp/mp_client/Makefile
@@ -9,8 +9,10 @@ SRCS-y := client.c
 
 CFLAGS += -I../shared
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/multi_process/client_server_mp/mp_server/Makefile b/examples/multi_process/client_server_mp/mp_server/Makefile
index d066524b36..39c481171a 100644
--- a/examples/multi_process/client_server_mp/mp_server/Makefile
+++ b/examples/multi_process/client_server_mp/mp_server/Makefile
@@ -9,8 +9,10 @@ SRCS-y := main.c init.c args.c
 
 CFLAGS += -I../shared
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/multi_process/hotplug_mp/Makefile b/examples/multi_process/hotplug_mp/Makefile
index 3122449d62..f72e3442db 100644
--- a/examples/multi_process/hotplug_mp/Makefile
+++ b/examples/multi_process/hotplug_mp/Makefile
@@ -7,8 +7,10 @@ APP = hotplug_mp
 # all source are stored in SRCS-y
 SRCS-y := main.c commands.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/multi_process/simple_mp/Makefile b/examples/multi_process/simple_mp/Makefile
index d03597c4c2..32ab346449 100644
--- a/examples/multi_process/simple_mp/Makefile
+++ b/examples/multi_process/simple_mp/Makefile
@@ -7,8 +7,10 @@ APP = simple_mp
 # all source are stored in SRCS-y
 SRCS-y := main.c mp_commands.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/multi_process/symmetric_mp/Makefile b/examples/multi_process/symmetric_mp/Makefile
index 45b7214cba..8dc6f56857 100644
--- a/examples/multi_process/symmetric_mp/Makefile
+++ b/examples/multi_process/symmetric_mp/Makefile
@@ -7,8 +7,10 @@ APP = symmetric_mp
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/ntb/Makefile b/examples/ntb/Makefile
index d35dabc471..2fa9a05823 100644
--- a/examples/ntb/Makefile
+++ b/examples/ntb/Makefile
@@ -7,8 +7,10 @@ APP = ntb_fwd
 # all source are stored in SRCS-y
 SRCS-y := ntb_fwd.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 CFLAGS += -D_FILE_OFFSET_BITS=64
 LDFLAGS += -pthread
 
diff --git a/examples/packet_ordering/Makefile b/examples/packet_ordering/Makefile
index 09abda91ea..de1a8b9b47 100644
--- a/examples/packet_ordering/Makefile
+++ b/examples/packet_ordering/Makefile
@@ -7,8 +7,10 @@ APP = packet_ordering
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/performance-thread/l3fwd-thread/Makefile b/examples/performance-thread/l3fwd-thread/Makefile
index ca1a5d087e..6a878482a3 100644
--- a/examples/performance-thread/l3fwd-thread/Makefile
+++ b/examples/performance-thread/l3fwd-thread/Makefile
@@ -9,10 +9,12 @@ SRCS-y := main.c
 
 include ../common/common.mk
 
+PKGCONF ?= pkg-config
+
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -23,7 +25,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
diff --git a/examples/performance-thread/pthread_shim/Makefile b/examples/performance-thread/pthread_shim/Makefile
index 6b19ff63fe..bf5458e3c7 100644
--- a/examples/performance-thread/pthread_shim/Makefile
+++ b/examples/performance-thread/pthread_shim/Makefile
@@ -13,8 +13,10 @@ CFLAGS += -DALLOW_EXPERIMENTAL_API
 CFLAGS += -D_GNU_SOURCE
 LDFLAGS += "-Wl,--copy-dt-needed-entries"
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -27,8 +29,6 @@ static: build/$(APP)-static
 
 LDFLAGS += -lpthread
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/pipeline/Makefile b/examples/pipeline/Makefile
index d0a1f02e1c..86bcc00bd2 100644
--- a/examples/pipeline/Makefile
+++ b/examples/pipeline/Makefile
@@ -11,8 +11,10 @@ SRCS-y += main.c
 SRCS-y += obj.c
 SRCS-y += thread.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -23,8 +25,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile
index 9f56a5e7a0..37c32ff873 100644
--- a/examples/ptpclient/Makefile
+++ b/examples/ptpclient/Makefile
@@ -7,8 +7,10 @@ APP = ptpclient
 # all source are stored in SRCS-y
 SRCS-y := ptpclient.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/qos_meter/Makefile b/examples/qos_meter/Makefile
index 7a53818296..5558ba939a 100644
--- a/examples/qos_meter/Makefile
+++ b/examples/qos_meter/Makefile
@@ -7,8 +7,10 @@ APP = qos_meter
 # all source are stored in SRCS-y
 SRCS-y := main.c rte_policer.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/qos_sched/Makefile b/examples/qos_sched/Makefile
index f42406fe1c..0a748f5277 100644
--- a/examples/qos_sched/Makefile
+++ b/examples/qos_sched/Makefile
@@ -7,8 +7,10 @@ APP = qos_sched
 # all source are stored in SRCS-y
 SRCS-y := main.c args.c init.c app_thread.c cfg_file.c cmdline.c stats.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/rxtx_callbacks/Makefile b/examples/rxtx_callbacks/Makefile
index a618cdf751..d11e0b4153 100644
--- a/examples/rxtx_callbacks/Makefile
+++ b/examples/rxtx_callbacks/Makefile
@@ -7,8 +7,10 @@ APP = rxtx_callbacks
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/server_node_efd/node/Makefile b/examples/server_node_efd/node/Makefile
index 2120de5397..2c93872e5b 100644
--- a/examples/server_node_efd/node/Makefile
+++ b/examples/server_node_efd/node/Makefile
@@ -9,8 +9,10 @@ SRCS-y := node.c
 
 CFLAGS += -I../shared
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/server_node_efd/server/Makefile b/examples/server_node_efd/server/Makefile
index 6b5878d8c0..f51ef134dc 100644
--- a/examples/server_node_efd/server/Makefile
+++ b/examples/server_node_efd/server/Makefile
@@ -9,8 +9,10 @@ SRCS-y := main.c init.c args.c
 
 CFLAGS += -I../shared
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/service_cores/Makefile b/examples/service_cores/Makefile
index 754333c878..2054677f96 100644
--- a/examples/service_cores/Makefile
+++ b/examples/service_cores/Makefile
@@ -7,8 +7,10 @@ APP = service_cores
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/skeleton/Makefile b/examples/skeleton/Makefile
index 4fa97cb975..4be77631ee 100644
--- a/examples/skeleton/Makefile
+++ b/examples/skeleton/Makefile
@@ -7,8 +7,10 @@ APP = basicfwd
 # all source are stored in SRCS-y
 SRCS-y := basicfwd.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/timer/Makefile b/examples/timer/Makefile
index 70b1af9f4b..1c8b8f294e 100644
--- a/examples/timer/Makefile
+++ b/examples/timer/Makefile
@@ -7,8 +7,10 @@ APP = timer
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/vdpa/Makefile b/examples/vdpa/Makefile
index c4b2184ead..369ff331e1 100644
--- a/examples/vdpa/Makefile
+++ b/examples/vdpa/Makefile
@@ -8,8 +8,10 @@ APP = vdpa
 SRCS-y := main.c
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -20,8 +22,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/vhost/Makefile b/examples/vhost/Makefile
index 8c969caaad..2b88a38fc3 100644
--- a/examples/vhost/Makefile
+++ b/examples/vhost/Makefile
@@ -7,8 +7,10 @@ APP = vhost-switch
 # all source are stored in SRCS-y
 SRCS-y := main.c virtio_net.c ioat.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -21,8 +23,6 @@ static: build/$(APP)-static
 
 LDFLAGS += -pthread
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/vhost_blk/Makefile b/examples/vhost_blk/Makefile
index 792591386e..c6a1f76633 100644
--- a/examples/vhost_blk/Makefile
+++ b/examples/vhost_blk/Makefile
@@ -7,8 +7,10 @@ APP = vhost-blk
 # all source are stored in SRCS-y
 SRCS-y := blk.c vhost_blk.c vhost_blk_compat.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 LDFLAGS += -pthread
 
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
diff --git a/examples/vhost_crypto/Makefile b/examples/vhost_crypto/Makefile
index 27abd91998..cc7f2abb90 100644
--- a/examples/vhost_crypto/Makefile
+++ b/examples/vhost_crypto/Makefile
@@ -8,8 +8,10 @@ APP = vhost-crypto
 SRCS-y := main.c
 CFLAGS += -DALLOW_EXPERIMENTAL_API
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -20,8 +22,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manager/Makefile
index 8ac1180b2f..c462f49fcf 100644
--- a/examples/vm_power_manager/Makefile
+++ b/examples/vm_power_manager/Makefile
@@ -1,8 +1,10 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2010-2020 Intel Corporation
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -25,8 +27,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/vm_power_manager/guest_cli/Makefile b/examples/vm_power_manager/guest_cli/Makefile
index 1ee1ca1017..751ca6e185 100644
--- a/examples/vm_power_manager/guest_cli/Makefile
+++ b/examples/vm_power_manager/guest_cli/Makefile
@@ -7,8 +7,10 @@ APP = guest_vm_power_mgr
 # all source are stored in SRCS-y
 SRCS-y := main.c vm_power_cli_guest.c parse.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/vmdq/Makefile b/examples/vmdq/Makefile
index 749ed53c6f..cc976384fa 100644
--- a/examples/vmdq/Makefile
+++ b/examples/vmdq/Makefile
@@ -7,8 +7,10 @@ APP = vmdq_app
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
diff --git a/examples/vmdq_dcb/Makefile b/examples/vmdq_dcb/Makefile
index 1dd42105d6..a34e7e36d4 100644
--- a/examples/vmdq_dcb/Makefile
+++ b/examples/vmdq_dcb/Makefile
@@ -7,8 +7,10 @@ APP = vmdq_dcb_app
 # all source are stored in SRCS-y
 SRCS-y := main.c
 
+PKGCONF ?= pkg-config
+
 # Build using pkg-config variables if possible
-ifneq ($(shell pkg-config --exists libdpdk && echo 0),0)
+ifneq ($(shell $(PKGCONF) --exists libdpdk && echo 0),0)
 $(error "no installation of DPDK found")
 endif
 
@@ -19,8 +21,6 @@ shared: build/$(APP)-shared
 static: build/$(APP)-static
 	ln -sf $(APP)-static build/$(APP)
 
-PKGCONF ?= pkg-config
-
 PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
 CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
 LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.710398300 +0800
+++ 0082-examples-fix-pkg-config-override.patch	2021-06-12 06:53:56.400000000 +0800
@@ -1 +1 @@
-From 11e027022d0f72f3cd7419b83e69a9ceb342666d Mon Sep 17 00:00:00 2001
+From 10ddae775cb9eecad1351c2952bc1fe57e9df570 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 11e027022d0f72f3cd7419b83e69a9ceb342666d ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -75 +77 @@
-index 03bf1edb10..86ac8a4009 100644
+index 2f156736d1..942e106ac2 100644
@@ -100 +102 @@
-index 313a5389ee..ad711a5bee 100644
+index 8700b589fb..d96afe2cba 100644
@@ -125 +127 @@
-index 0b6a3c6dd5..8a2d3b4b5a 100644
+index 09da84ba0b..fd7ae682a4 100644
@@ -150 +152 @@
-index 9630fea3f8..d4d43fbfca 100644
+index d7615f9a32..ade6df08b3 100644
@@ -175 +177 @@
-index 685afbdf3c..5b4f02d4b9 100644
+index 93ef5c27c3..cda3f14252 100644
@@ -223 +225 @@
-index 5cf88ca41a..962ff96368 100644
+index f5072a2b0c..faf667a54a 100644
@@ -248 +250 @@
-index 1cc33450c1..ff3cd4a87a 100644
+index 8f82a4c6c5..c41fdb0006 100644
@@ -273 +275 @@
-index 1caa93a9ba..539bf9682b 100644
+index 4c215daf1b..7e892405de 100644
@@ -298 +300 @@
-index b0cdeab3ac..411297597e 100644
+index 9bc9179346..7453414d24 100644
@@ -323 +325 @@
-index 1b4dfcdde9..2a6a2f1527 100644
+index 436569f5a6..b16773a02f 100644
@@ -348 +350 @@
-index c82ba17582..178fc8778c 100644
+index c13ad8d8af..c7a54bffbf 100644
@@ -373 +375 @@
-index b5b546e200..48ac67be5e 100644
+index f6baf635bb..c7a27e4f14 100644
@@ -396 +398 @@
- LDFLAGS_SHARED = $(shell $(PKGCONF) --libs libdpdk)
+ CFLAGS += -DALLOW_EXPERIMENTAL_API
@@ -398 +400 @@
-index 96f492a5ea..785c7ee38c 100644
+index 4b391973cb..e71cd61b43 100644
@@ -423 +425 @@
-index f9d0e5a6c3..f940cbfd05 100644
+index 740f4721d0..28158225a6 100644
@@ -448 +450 @@
-index 55a7ac6d85..89af54bd37 100644
+index 7670cc3684..94a685a9ce 100644
@@ -473 +475 @@
-index 614b177057..971fa4ef0c 100644
+index 7ea44e6f63..2f054fe27d 100644
@@ -498 +500 @@
-index f87e93dcf8..753cb96f5f 100644
+index bbf3bcae12..3dad5329d8 100644
@@ -523 +525 @@
-index 85066612bc..23a09550a4 100644
+index 9ba1135612..532db37ba6 100644
@@ -548 +550 @@
-index 8d44e95ed7..1657f3c351 100644
+index 7731eccd03..09aec4d52d 100644
@@ -573 +575 @@
-index 1570b1f839..4d041ba3db 100644
+index 384224b24a..e011e31d1e 100644
@@ -598 +600 @@
-index 1a8842c64f..ec498169da 100644
+index fcb60b2a33..9a71c68fa8 100644
@@ -623 +625 @@
-index bcc075f0d9..5b6e3e3905 100644
+index 09a891149b..ace9b4687e 100644
@@ -648 +650 @@
-index ef4950f239..22aa6af511 100644
+index 8b329a78b1..00d364fcbf 100644
@@ -673 +675 @@
-index 44bc9ef4d3..79c9dc0f25 100644
+index b180deb862..85669a298a 100644
@@ -698 +700 @@
-index 49ad698117..85fd2c47a1 100644
+index 3420ea3a9c..f5d2099d8b 100644
@@ -723 +725 @@
-index 9622e2358b..f64ccc6d59 100644
+index 6e3d0bca06..4f6ee27272 100644
@@ -745 +747 @@
- CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
+ CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk) -DALLOW_EXPERIMENTAL_API
@@ -748 +750 @@
-index 50edc34e6a..0a6aa5a3a4 100644
+index d69854c9f8..d1eb10e6e1 100644
@@ -773 +775 @@
-index 2381a215f0..0badedb499 100644
+index 7e70bbd826..fb4f30c172 100644
@@ -777 +779 @@
- SRCS-y := main.c l3fwd_lpm.c l3fwd_fib.c l3fwd_em.c l3fwd_event.c
+ SRCS-y := main.c l3fwd_lpm.c l3fwd_em.c l3fwd_event.c
@@ -798 +800 @@
-index 583a847364..c892d828d5 100644
+index fa608c56a0..c5c342d8e5 100644
@@ -823 +825 @@
-index 2c389f35b7..26e774fd5c 100644
+index bc00a1c875..e694b5659e 100644
@@ -848 +850 @@
-index bc04ab733e..c564286d4b 100644
+index d066524b36..39c481171a 100644
@@ -873 +875 @@
-index 75ae8eb9a7..6b20d6e49a 100644
+index 3122449d62..f72e3442db 100644
@@ -898 +900 @@
-index 675e8c3f9f..1d0a260e64 100644
+index d03597c4c2..32ab346449 100644
@@ -923 +925 @@
-index 5a671e54af..e76acb89b2 100644
+index 45b7214cba..8dc6f56857 100644
@@ -948 +950 @@
-index 8e1f52f17f..d9b6e53090 100644
+index d35dabc471..2fa9a05823 100644
@@ -973 +975 @@
-index dcf583ec06..47b64888ef 100644
+index 09abda91ea..de1a8b9b47 100644
@@ -998 +1000 @@
-index 4f518358d0..14ce9c0eb2 100644
+index ca1a5d087e..6a878482a3 100644
@@ -1001,3 +1003,3 @@
-@@ -17,10 +17,12 @@ $(error "Cannot generate statically-linked binaries with this version of pkg-con
- endif
- endif
+@@ -9,10 +9,12 @@ SRCS-y := main.c
+ 
+ include ../common/common.mk
@@ -1015 +1017 @@
-@@ -31,7 +33,6 @@ shared: build/$(APP)-shared
+@@ -23,7 +25,6 @@ shared: build/$(APP)-shared
@@ -1024 +1026 @@
-index 5aa401dc49..5acf74fff3 100644
+index 6b19ff63fe..bf5458e3c7 100644
@@ -1027 +1029 @@
-@@ -21,8 +21,10 @@ CFLAGS += -DALLOW_EXPERIMENTAL_API
+@@ -13,8 +13,10 @@ CFLAGS += -DALLOW_EXPERIMENTAL_API
@@ -1039 +1041 @@
-@@ -35,8 +37,6 @@ static: build/$(APP)-static
+@@ -27,8 +29,6 @@ static: build/$(APP)-static
@@ -1049 +1051 @@
-index fcba51fd4d..c19df3a489 100644
+index d0a1f02e1c..86bcc00bd2 100644
@@ -1074 +1076 @@
-index f0d38c5c49..909bb65257 100644
+index 9f56a5e7a0..37c32ff873 100644
@@ -1099 +1101 @@
-index 1772c75a1e..de5b435166 100644
+index 7a53818296..5558ba939a 100644
@@ -1124 +1126 @@
-index 8187542eb1..346d66d41e 100644
+index f42406fe1c..0a748f5277 100644
@@ -1149 +1151 @@
-index 4296b19f67..f980b033cb 100644
+index a618cdf751..d11e0b4153 100644
@@ -1174 +1176 @@
-index 56550e6fe1..115e2da7a0 100644
+index 2120de5397..2c93872e5b 100644
@@ -1199 +1201 @@
-index 50e18e150e..8eb75fe352 100644
+index 6b5878d8c0..f51ef134dc 100644
@@ -1224 +1226 @@
-index df0284bd01..8cc00cf02c 100644
+index 754333c878..2054677f96 100644
@@ -1249 +1251 @@
-index bbd2dc181c..026ee48a88 100644
+index 4fa97cb975..4be77631ee 100644
@@ -1274 +1276 @@
-index 4c0a0f62f9..a74f3c3254 100644
+index 70b1af9f4b..1c8b8f294e 100644
@@ -1299 +1301 @@
-index 470ca57dfc..d974db4f40 100644
+index c4b2184ead..369ff331e1 100644
@@ -1324 +1326 @@
-index 145b3f79a4..587ea2ab47 100644
+index 8c969caaad..2b88a38fc3 100644
@@ -1349 +1351 @@
-index 2fe199454a..79fcee6131 100644
+index 792591386e..c6a1f76633 100644
@@ -1374 +1376 @@
-index ce6f046244..84de8431a6 100644
+index 27abd91998..cc7f2abb90 100644
@@ -1399 +1401 @@
-index 2fff8dadda..d2f83f0da1 100644
+index 8ac1180b2f..c462f49fcf 100644
@@ -1424 +1426 @@
-index e9dff47534..17b52f23b8 100644
+index 1ee1ca1017..751ca6e185 100644
@@ -1449 +1451 @@
-index 8edda6cd63..34c7778ec0 100644
+index 749ed53c6f..cc976384fa 100644
@@ -1474 +1476 @@
-index b5d2efa4af..d784586f6a 100644
+index 1dd42105d6..a34e7e36d4 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'raw/ntb: check SPAD user index' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (80 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'examples: fix pkg-config override' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'raw/ntb: check memory allocations' " Xueming Li
                       ` (95 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, Xiaoyun Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1a62a37afe18db443e5a29b532d86c15e9ef84e8

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1a62a37afe18db443e5a29b532d86c15e9ef84e8 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 21 Apr 2021 10:08:15 +0800
Subject: [PATCH] raw/ntb: check SPAD user index
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 586f12881dc0fc37720e55f59c8a11a9e184388d ]

This patch adds checking spad user index validity when set or get attr.

Fixes: 277310027965 ("raw/ntb: introduce NTB raw device driver")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 drivers/raw/ntb/ntb.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/raw/ntb/ntb.c b/drivers/raw/ntb/ntb.c
index 6dd213ef6e..0f0e3f27a0 100644
--- a/drivers/raw/ntb/ntb.c
+++ b/drivers/raw/ntb/ntb.c
@@ -1080,6 +1080,10 @@ ntb_attr_set(struct rte_rawdev *dev, const char *attr_name,
 		if (hw->ntb_ops->spad_write == NULL)
 			return -ENOTSUP;
 		index = atoi(&attr_name[NTB_SPAD_USER_LEN]);
+		if (index < 0 || index >= NTB_SPAD_USER_MAX_NUM) {
+			NTB_LOG(ERR, "Invalid attribute (%s)", attr_name);
+			return -EINVAL;
+		}
 		(*hw->ntb_ops->spad_write)(dev, hw->spad_user_list[index],
 					   1, attr_value);
 		NTB_LOG(DEBUG, "Set attribute (%s) Value (%" PRIu64 ")",
@@ -1174,6 +1178,10 @@ ntb_attr_get(struct rte_rawdev *dev, const char *attr_name,
 		if (hw->ntb_ops->spad_read == NULL)
 			return -ENOTSUP;
 		index = atoi(&attr_name[NTB_SPAD_USER_LEN]);
+		if (index < 0 || index >= NTB_SPAD_USER_MAX_NUM) {
+			NTB_LOG(ERR, "Attribute (%s) out of range", attr_name);
+			return -EINVAL;
+		}
 		*attr_value = (*hw->ntb_ops->spad_read)(dev,
 				hw->spad_user_list[index], 0);
 		NTB_LOG(DEBUG, "Attribute (%s) Value (%" PRIu64 ")",
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.738189500 +0800
+++ 0083-raw-ntb-check-SPAD-user-index.patch	2021-06-12 06:53:56.400000000 +0800
@@ -1 +1 @@
-From 586f12881dc0fc37720e55f59c8a11a9e184388d Mon Sep 17 00:00:00 2001
+From 1a62a37afe18db443e5a29b532d86c15e9ef84e8 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 586f12881dc0fc37720e55f59c8a11a9e184388d ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'raw/ntb: check memory allocations' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (81 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'raw/ntb: check SPAD user index' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:02     ` [dpdk-stable] patch 'ipc: check malloc sync reply result' " Xueming Li
                       ` (94 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, Xiaoyun Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/89bbedc455d0d8337214d9ec5776cc9b0da49c32

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 89bbedc455d0d8337214d9ec5776cc9b0da49c32 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 21 Apr 2021 10:08:16 +0800
Subject: [PATCH] raw/ntb: check memory allocations
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 403f21feb87fc9e0e2f61c1e4576cc1b9300ed4b ]

This patch adds checking for rte_zmalloc() result when init Intel ntb
device, also fix the same bug when start ntb device.

Fixes: 034c328eb025 ("raw/ntb: support Intel NTB")
Fixes: c39d1e082a4b ("raw/ntb: setup queues")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
---
 drivers/raw/ntb/ntb.c          | 5 +++++
 drivers/raw/ntb/ntb_hw_intel.c | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/drivers/raw/ntb/ntb.c b/drivers/raw/ntb/ntb.c
index 0f0e3f27a0..6703bb5d08 100644
--- a/drivers/raw/ntb/ntb.c
+++ b/drivers/raw/ntb/ntb.c
@@ -923,6 +923,11 @@ ntb_dev_start(struct rte_rawdev *dev)
 
 	hw->peer_mw_base = rte_zmalloc("ntb_peer_mw_base", hw->mw_cnt *
 					sizeof(uint64_t), 0);
+	if (hw->peer_mw_base == NULL) {
+		NTB_LOG(ERR, "Cannot allocate memory for peer mw base.");
+		ret = -ENOMEM;
+		goto err_q_init;
+	}
 
 	if (hw->ntb_ops->spad_read == NULL) {
 		ret = -ENOTSUP;
diff --git a/drivers/raw/ntb/ntb_hw_intel.c b/drivers/raw/ntb/ntb_hw_intel.c
index 4427e11458..a742e8fbb9 100644
--- a/drivers/raw/ntb/ntb_hw_intel.c
+++ b/drivers/raw/ntb/ntb_hw_intel.c
@@ -148,6 +148,11 @@ intel_ntb_dev_init(const struct rte_rawdev *dev)
 
 	hw->mw_size = rte_zmalloc("ntb_mw_size",
 				  hw->mw_cnt * sizeof(uint64_t), 0);
+	if (hw->mw_size == NULL) {
+		NTB_LOG(ERR, "Cannot allocate memory for mw size.");
+		return -ENOMEM;
+	}
+
 	for (i = 0; i < hw->mw_cnt; i++) {
 		bar = intel_ntb_bar[i];
 		hw->mw_size[i] = hw->pci_dev->mem_resource[bar].len;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.761055300 +0800
+++ 0084-raw-ntb-check-memory-allocations.patch	2021-06-12 06:53:56.400000000 +0800
@@ -1 +1 @@
-From 403f21feb87fc9e0e2f61c1e4576cc1b9300ed4b Mon Sep 17 00:00:00 2001
+From 89bbedc455d0d8337214d9ec5776cc9b0da49c32 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 403f21feb87fc9e0e2f61c1e4576cc1b9300ed4b ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'ipc: check malloc sync reply result' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (82 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'raw/ntb: check memory allocations' " Xueming Li
@ 2021-06-11 23:02     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'eal: fix service core list parsing' " Xueming Li
                       ` (93 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:02 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/689d3a982bce91cf3f16cd179c55030cf5b64894

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 689d3a982bce91cf3f16cd179c55030cf5b64894 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 5 May 2021 12:10:06 +0800
Subject: [PATCH] ipc: check malloc sync reply result
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 76b49dcbd2cd2b7436fd196e01c04576c4feaa99 ]

This patch adds checking for mp reply result in handle_sync().

Fixes: 07dcbfe0101f ("malloc: support multiprocess memory hotplug")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 lib/librte_eal/common/malloc_mp.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/librte_eal/common/malloc_mp.c b/lib/librte_eal/common/malloc_mp.c
index 1f212f8349..dd814ef53a 100644
--- a/lib/librte_eal/common/malloc_mp.c
+++ b/lib/librte_eal/common/malloc_mp.c
@@ -170,9 +170,7 @@ handle_sync(const struct rte_mp_msg *msg, const void *peer)
 	resp->id = req->id;
 	resp->result = ret == 0 ? REQ_RESULT_SUCCESS : REQ_RESULT_FAIL;
 
-	rte_mp_reply(&reply, peer);
-
-	return 0;
+	return rte_mp_reply(&reply, peer);
 }
 
 static int
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.786784200 +0800
+++ 0085-ipc-check-malloc-sync-reply-result.patch	2021-06-12 06:53:56.400000000 +0800
@@ -1 +1 @@
-From 76b49dcbd2cd2b7436fd196e01c04576c4feaa99 Mon Sep 17 00:00:00 2001
+From 689d3a982bce91cf3f16cd179c55030cf5b64894 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 76b49dcbd2cd2b7436fd196e01c04576c4feaa99 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -14 +16 @@
- lib/eal/common/malloc_mp.c | 4 +---
+ lib/librte_eal/common/malloc_mp.c | 4 +---
@@ -17,5 +19,5 @@
-diff --git a/lib/eal/common/malloc_mp.c b/lib/eal/common/malloc_mp.c
-index c7101b32d3..2e597a17a2 100644
---- a/lib/eal/common/malloc_mp.c
-+++ b/lib/eal/common/malloc_mp.c
-@@ -171,9 +171,7 @@ handle_sync(const struct rte_mp_msg *msg, const void *peer)
+diff --git a/lib/librte_eal/common/malloc_mp.c b/lib/librte_eal/common/malloc_mp.c
+index 1f212f8349..dd814ef53a 100644
+--- a/lib/librte_eal/common/malloc_mp.c
++++ b/lib/librte_eal/common/malloc_mp.c
+@@ -170,9 +170,7 @@ handle_sync(const struct rte_mp_msg *msg, const void *peer)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'eal: fix service core list parsing' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (83 preceding siblings ...)
  2021-06-11 23:02     ` [dpdk-stable] patch 'ipc: check malloc sync reply result' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'app/bbdev: check memory allocation' " Xueming Li
                       ` (92 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, Harry van Haaren, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2194792b3acff9fee485ecd5fbe65ce7ef7f7d13

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2194792b3acff9fee485ecd5fbe65ce7ef7f7d13 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Wed, 5 May 2021 12:10:07 +0800
Subject: [PATCH] eal: fix service core list parsing
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 97ca1e786b25182199877393978decbed6608a78 ]

This patch adds checking for service core index validity when parsing
service corelist.

Fixes: 7dbd7a6413ef ("service: add -S corelist option")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 lib/librte_eal/common/eal_common_options.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index 622c7bc429..94b560a8ab 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -757,10 +757,10 @@ static int
 eal_parse_service_corelist(const char *corelist)
 {
 	struct rte_config *cfg = rte_eal_get_configuration();
-	int i, idx = 0;
+	int i;
 	unsigned count = 0;
 	char *end = NULL;
-	int min, max;
+	uint32_t min, max, idx;
 	uint32_t taken_lcore_count = 0;
 
 	if (corelist == NULL)
@@ -784,6 +784,8 @@ eal_parse_service_corelist(const char *corelist)
 		idx = strtoul(corelist, &end, 10);
 		if (errno || end == NULL)
 			return -1;
+		if (idx >= RTE_MAX_LCORE)
+			return -1;
 		while (isblank(*end))
 			end++;
 		if (*end == '-') {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.817932600 +0800
+++ 0086-eal-fix-service-core-list-parsing.patch	2021-06-12 06:53:56.410000000 +0800
@@ -1 +1 @@
-From 97ca1e786b25182199877393978decbed6608a78 Mon Sep 17 00:00:00 2001
+From 2194792b3acff9fee485ecd5fbe65ce7ef7f7d13 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 97ca1e786b25182199877393978decbed6608a78 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -16 +18 @@
- lib/eal/common/eal_common_options.c | 6 ++++--
+ lib/librte_eal/common/eal_common_options.c | 6 ++++--
@@ -19,5 +21,5 @@
-diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c
-index 66f9114715..97ab6e00fd 100644
---- a/lib/eal/common/eal_common_options.c
-+++ b/lib/eal/common/eal_common_options.c
-@@ -758,10 +758,10 @@ static int
+diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
+index 622c7bc429..94b560a8ab 100644
+--- a/lib/librte_eal/common/eal_common_options.c
++++ b/lib/librte_eal/common/eal_common_options.c
+@@ -757,10 +757,10 @@ static int
@@ -36 +38 @@
-@@ -785,6 +785,8 @@ eal_parse_service_corelist(const char *corelist)
+@@ -784,6 +784,8 @@ eal_parse_service_corelist(const char *corelist)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'app/bbdev: check memory allocation' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (84 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'eal: fix service core list parsing' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'app/bbdev: fix HARQ error messages' " Xueming Li
                       ` (91 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, Nicolas Chautru, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/90ca87dd693b18c69449075c447911f42827289d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 90ca87dd693b18c69449075c447911f42827289d Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Thu, 22 Apr 2021 17:25:05 +0800
Subject: [PATCH] app/bbdev: check memory allocation
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit bc4c9418ee0fc22c480c236846af7fbad923ba89 ]

Return value of a function 'rte_malloc' is dereferenced without
checking, and may result in segmentation fault.

This patch fixed it.

Fixes: 31a7853d1ed9 ("baseband/turbo_sw: support large size code block")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
 app/test-bbdev/test_bbdev_perf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 59b37ede4a..622ba70c67 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -957,6 +957,9 @@ init_op_data_objs(struct rte_bbdev_op_data *bufs,
 			if ((op_type == DATA_INPUT) && large_input) {
 				/* Allocate a fake overused mbuf */
 				data = rte_malloc(NULL, seg->length, 0);
+				TEST_ASSERT_NOT_NULL(data,
+					"rte malloc failed with %u bytes",
+					seg->length);
 				memcpy(data, seg->addr, seg->length);
 				m_head->buf_addr = data;
 				m_head->buf_iova = rte_malloc_virt2iova(data);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.844915700 +0800
+++ 0087-app-bbdev-check-memory-allocation.patch	2021-06-12 06:53:56.410000000 +0800
@@ -1 +1 @@
-From bc4c9418ee0fc22c480c236846af7fbad923ba89 Mon Sep 17 00:00:00 2001
+From 90ca87dd693b18c69449075c447911f42827289d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit bc4c9418ee0fc22c480c236846af7fbad923ba89 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 45b85b984c..f94e2a94d0 100644
+index 59b37ede4a..622ba70c67 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'app/bbdev: fix HARQ error messages' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (85 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'app/bbdev: check memory allocation' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'common/qat: increase IM buffer size for GEN3' " Xueming Li
                       ` (90 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, Nicolas Chautru, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6856433bed400b385f4679c61e79d6a6dcee49b4

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6856433bed400b385f4679c61e79d6a6dcee49b4 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Mon, 26 Apr 2021 08:56:59 +0800
Subject: [PATCH] app/bbdev: fix HARQ error messages
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 49ca9e5a256b7db55af71923ce827c1fa480b473 ]

The logging should show context by printing the two variables which
compared to each other. 'nb_harq_inputs', not 'nb_hard_outputs';
'nb_harq_outputs', not 'nb_hard_outputs'.

This patch corrected misused variable.

Fixes: d819c08327f3 ("app/bbdev: update for 5GNR")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Nicolas Chautru <nicolas.chautru@intel.com>
---
 app/test-bbdev/test_bbdev_perf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index 622ba70c67..36589f3c3e 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -372,14 +372,14 @@ check_dev_cap(const struct rte_bbdev_info *dev_info)
 			if (nb_harq_inputs > cap->num_buffers_hard_out) {
 				printf(
 					"Too many HARQ inputs defined: %u, max: %u\n",
-					nb_hard_outputs,
+					nb_harq_inputs,
 					cap->num_buffers_hard_out);
 				return TEST_FAILED;
 			}
 			if (nb_harq_outputs > cap->num_buffers_hard_out) {
 				printf(
 					"Too many HARQ outputs defined: %u, max: %u\n",
-					nb_hard_outputs,
+					nb_harq_outputs,
 					cap->num_buffers_hard_out);
 				return TEST_FAILED;
 			}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.873633000 +0800
+++ 0088-app-bbdev-fix-HARQ-error-messages.patch	2021-06-12 06:53:56.410000000 +0800
@@ -1 +1 @@
-From 49ca9e5a256b7db55af71923ce827c1fa480b473 Mon Sep 17 00:00:00 2001
+From 6856433bed400b385f4679c61e79d6a6dcee49b4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 49ca9e5a256b7db55af71923ce827c1fa480b473 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index f94e2a94d0..469597b8b3 100644
+index 622ba70c67..36589f3c3e 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'common/qat: increase IM buffer size for GEN3' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (86 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'app/bbdev: fix HARQ error messages' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'compress/qat: enable compression on " Xueming Li
                       ` (89 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Adam Dybkowski; +Cc: Luca Boccassi, Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/95fd32f696ae2abe29fb5d4ed95bef5c830f6f00

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 95fd32f696ae2abe29fb5d4ed95bef5c830f6f00 Mon Sep 17 00:00:00 2001
From: Adam Dybkowski <adamx.dybkowski@intel.com>
Date: Wed, 28 Apr 2021 15:41:41 +0100
Subject: [PATCH] common/qat: increase IM buffer size for GEN3
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit cd218e52c49600039c42d3b57b42704683e41a0f ]

This patch increases the intermediate buffer size used for the
compression on QAT GEN3 to accommodate new hardware versions.

Fixes: a124830a6f00 ("compress/qat: enable dynamic huffman encoding")

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 drivers/common/qat/qat_device.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/qat/qat_device.h b/drivers/common/qat/qat_device.h
index e6337c688d..9c6a3ca4e6 100644
--- a/drivers/common/qat/qat_device.h
+++ b/drivers/common/qat/qat_device.h
@@ -29,7 +29,7 @@ struct qat_dev_cmd_param {
 enum qat_comp_num_im_buffers {
 	QAT_NUM_INTERM_BUFS_GEN1 = 12,
 	QAT_NUM_INTERM_BUFS_GEN2 = 20,
-	QAT_NUM_INTERM_BUFS_GEN3 = 20
+	QAT_NUM_INTERM_BUFS_GEN3 = 64
 };
 
 struct qat_device_info {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.899744500 +0800
+++ 0089-common-qat-increase-IM-buffer-size-for-GEN3.patch	2021-06-12 06:53:56.420000000 +0800
@@ -1 +1 @@
-From cd218e52c49600039c42d3b57b42704683e41a0f Mon Sep 17 00:00:00 2001
+From 95fd32f696ae2abe29fb5d4ed95bef5c830f6f00 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit cd218e52c49600039c42d3b57b42704683e41a0f ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'compress/qat: enable compression on GEN3' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (87 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'common/qat: increase IM buffer size for GEN3' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'test/crypto: fix auth-cipher compare length in OOP' " Xueming Li
                       ` (88 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Adam Dybkowski; +Cc: Luca Boccassi, Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/afe3a7f202aea54ace3772f0f414fa539eee5a2b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From afe3a7f202aea54ace3772f0f414fa539eee5a2b Mon Sep 17 00:00:00 2001
From: Adam Dybkowski <adamx.dybkowski@intel.com>
Date: Wed, 28 Apr 2021 15:41:42 +0100
Subject: [PATCH] compress/qat: enable compression on GEN3
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit da573c0e4205d818cd602eaa27c720896f3b6f1c ]

This patch enables the compression on QAT GEN3 (on hardware
versions that support it) and changes the error message shown
on older hardware versions that don't support the compression.

It also fixes the crash that happened on IM buffer allocation
failure (not enough memory) during the PMD cleaning phase.

Fixes: a124830a6f00 ("compress/qat: enable dynamic huffman encoding")
Fixes: 352332744c3a ("compress/qat: add dynamic SGL allocation")

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 drivers/compress/qat/qat_comp.c     |   7 +-
 drivers/compress/qat/qat_comp_pmd.c | 111 +++++++++++++++++++---------
 2 files changed, 79 insertions(+), 39 deletions(-)

diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c
index 3a064ec3b2..7ac25a3b4c 100644
--- a/drivers/compress/qat/qat_comp.c
+++ b/drivers/compress/qat/qat_comp.c
@@ -191,8 +191,8 @@ qat_comp_build_request(void *in_op, uint8_t *out_msg,
 					ICP_QAT_FW_COMP_EOP
 				      : ICP_QAT_FW_COMP_NOT_EOP,
 				ICP_QAT_FW_COMP_NOT_BFINAL,
-				ICP_QAT_FW_COMP_NO_CNV,
-				ICP_QAT_FW_COMP_NO_CNV_RECOVERY);
+				ICP_QAT_FW_COMP_CNV,
+				ICP_QAT_FW_COMP_CNV_RECOVERY);
 	}
 
 	/* common for sgl and flat buffers */
@@ -603,7 +603,8 @@ qat_comp_process_response(void **op, uint8_t *resp, void *op_cookie,
 			rx_op->status = RTE_COMP_OP_STATUS_ERROR;
 			rx_op->debug_status = ERR_CODE_QAT_COMP_WRONG_FW;
 			*op = (void *)rx_op;
-			QAT_DP_LOG(ERR, "QAT has wrong firmware");
+			QAT_DP_LOG(ERR,
+					"This QAT hardware doesn't support compression operation");
 			++(*dequeue_err_count);
 			return 1;
 		}
diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c
index 18ecb34ba7..8de41f6b6e 100644
--- a/drivers/compress/qat/qat_comp_pmd.c
+++ b/drivers/compress/qat/qat_comp_pmd.c
@@ -82,13 +82,13 @@ qat_comp_qp_release(struct rte_compressdev *dev, uint16_t queue_pair_id)
 	qat_private->qat_dev->qps_in_use[QAT_SERVICE_COMPRESSION][queue_pair_id]
 						= NULL;
 
-	for (i = 0; i < qp->nb_descriptors; i++) {
-
-		struct qat_comp_op_cookie *cookie = qp->op_cookies[i];
+	if (qp != NULL)
+		for (i = 0; i < qp->nb_descriptors; i++) {
+			struct qat_comp_op_cookie *cookie = qp->op_cookies[i];
 
-		rte_free(cookie->qat_sgl_src_d);
-		rte_free(cookie->qat_sgl_dst_d);
-	}
+			rte_free(cookie->qat_sgl_src_d);
+			rte_free(cookie->qat_sgl_dst_d);
+		}
 
 	return qat_qp_release((struct qat_qp **)
 			&(dev->data->queue_pairs[queue_pair_id]));
@@ -198,7 +198,7 @@ qat_comp_setup_inter_buffers(struct qat_comp_dev_private *comp_dev,
 	struct array_of_ptrs *array_of_pointers;
 	int size_of_ptr_array;
 	uint32_t full_size;
-	uint32_t offset_of_sgls, offset_of_flat_buffs = 0;
+	uint32_t offset_of_flat_buffs;
 	int i;
 	int num_im_sgls = qat_gen_config[
 		comp_dev->qat_dev->qat_dev_gen].comp_num_im_bufs_required;
@@ -213,31 +213,31 @@ qat_comp_setup_inter_buffers(struct qat_comp_dev_private *comp_dev,
 		return memzone;
 	}
 
-	/* Create a memzone to hold intermediate buffers and associated
-	 * meta-data needed by the firmware. The memzone contains 3 parts:
+	/* Create multiple memzones to hold intermediate buffers and associated
+	 * meta-data needed by the firmware.
+	 * The first memzone contains:
 	 *  - a list of num_im_sgls physical pointers to sgls
-	 *  - the num_im_sgl sgl structures, each pointing to
-	 *    QAT_NUM_BUFS_IN_IM_SGL flat buffers
-	 *  - the flat buffers: num_im_sgl * QAT_NUM_BUFS_IN_IM_SGL
-	 *    buffers, each of buff_size
+	 * All other memzones contain:
+	 *  - the sgl structure, pointing to QAT_NUM_BUFS_IN_IM_SGL flat buffers
+	 *  - the flat buffers: QAT_NUM_BUFS_IN_IM_SGL buffers,
+	 *    each of buff_size
 	 * num_im_sgls depends on the hardware generation of the device
 	 * buff_size comes from the user via the config file
 	 */
 
 	size_of_ptr_array = num_im_sgls * sizeof(phys_addr_t);
-	offset_of_sgls = (size_of_ptr_array + (~QAT_64_BYTE_ALIGN_MASK))
-			& QAT_64_BYTE_ALIGN_MASK;
-	offset_of_flat_buffs =
-	    offset_of_sgls + num_im_sgls * sizeof(struct qat_inter_sgl);
+	offset_of_flat_buffs = sizeof(struct qat_inter_sgl);
 	full_size = offset_of_flat_buffs +
-			num_im_sgls * buff_size * QAT_NUM_BUFS_IN_IM_SGL;
+			buff_size * QAT_NUM_BUFS_IN_IM_SGL;
 
-	memzone = rte_memzone_reserve_aligned(inter_buff_mz_name, full_size,
+	memzone = rte_memzone_reserve_aligned(inter_buff_mz_name,
+			size_of_ptr_array,
 			comp_dev->compressdev->data->socket_id,
 			RTE_MEMZONE_IOVA_CONTIG, QAT_64_BYTE_ALIGN);
 	if (memzone == NULL) {
-		QAT_LOG(ERR, "Can't allocate intermediate buffers"
-				" for device %s", comp_dev->qat_dev->name);
+		QAT_LOG(ERR,
+				"Can't allocate intermediate buffers for device %s",
+				comp_dev->qat_dev->name);
 		return NULL;
 	}
 
@@ -246,17 +246,50 @@ qat_comp_setup_inter_buffers(struct qat_comp_dev_private *comp_dev,
 	QAT_LOG(DEBUG, "Memzone %s: addr = %p, phys = 0x%"PRIx64
 			", size required %d, size created %zu",
 			inter_buff_mz_name, mz_start, mz_start_phys,
-			full_size, memzone->len);
+			size_of_ptr_array, memzone->len);
 
 	array_of_pointers = (struct array_of_ptrs *)mz_start;
 	for (i = 0; i < num_im_sgls; i++) {
-		uint32_t curr_sgl_offset =
-		    offset_of_sgls + i * sizeof(struct qat_inter_sgl);
-		struct qat_inter_sgl *sgl =
-		    (struct qat_inter_sgl *)(mz_start +	curr_sgl_offset);
+		const struct rte_memzone *mz;
+		struct qat_inter_sgl *sgl;
 		int lb;
-		array_of_pointers->pointer[i] = mz_start_phys + curr_sgl_offset;
 
+		snprintf(inter_buff_mz_name, RTE_MEMZONE_NAMESIZE,
+				"%s_inter_buff_%d", comp_dev->qat_dev->name, i);
+		mz = rte_memzone_lookup(inter_buff_mz_name);
+		if (mz == NULL) {
+			mz = rte_memzone_reserve_aligned(inter_buff_mz_name,
+					full_size,
+					comp_dev->compressdev->data->socket_id,
+					RTE_MEMZONE_IOVA_CONTIG,
+					QAT_64_BYTE_ALIGN);
+			if (mz == NULL) {
+				QAT_LOG(ERR,
+						"Can't allocate intermediate buffers for device %s",
+						comp_dev->qat_dev->name);
+				while (--i >= 0) {
+					snprintf(inter_buff_mz_name,
+							RTE_MEMZONE_NAMESIZE,
+							"%s_inter_buff_%d",
+							comp_dev->qat_dev->name,
+							i);
+					rte_memzone_free(
+							rte_memzone_lookup(
+							inter_buff_mz_name));
+				}
+				rte_memzone_free(memzone);
+				return NULL;
+			}
+		}
+
+		QAT_LOG(DEBUG, "Memzone %s: addr = %p, phys = 0x%"PRIx64
+				", size required %d, size created %zu",
+				inter_buff_mz_name, mz->addr, mz->iova,
+				full_size, mz->len);
+
+		array_of_pointers->pointer[i] = mz->iova;
+
+		sgl = (struct qat_inter_sgl *) mz->addr;
 		sgl->num_bufs = QAT_NUM_BUFS_IN_IM_SGL;
 		sgl->num_mapped_bufs = 0;
 		sgl->resrvd = 0;
@@ -268,8 +301,8 @@ qat_comp_setup_inter_buffers(struct qat_comp_dev_private *comp_dev,
 #endif
 		for (lb = 0; lb < QAT_NUM_BUFS_IN_IM_SGL; lb++) {
 			sgl->buffers[lb].addr =
-			  mz_start_phys + offset_of_flat_buffs +
-			  (((i * QAT_NUM_BUFS_IN_IM_SGL) + lb) * buff_size);
+					mz->iova + offset_of_flat_buffs +
+					lb * buff_size;
 			sgl->buffers[lb].len = buff_size;
 			sgl->buffers[lb].resrvd = 0;
 #if QAT_IM_BUFFER_DEBUG
@@ -281,7 +314,7 @@ qat_comp_setup_inter_buffers(struct qat_comp_dev_private *comp_dev,
 	}
 #if QAT_IM_BUFFER_DEBUG
 	QAT_DP_HEXDUMP_LOG(DEBUG,  "IM buffer memzone start:",
-			mz_start, offset_of_flat_buffs + 32);
+			memzone->addr, size_of_ptr_array);
 #endif
 	return memzone;
 }
@@ -444,6 +477,16 @@ _qat_comp_dev_config_clear(struct qat_comp_dev_private *comp_dev)
 {
 	/* Free intermediate buffers */
 	if (comp_dev->interm_buff_mz) {
+		char mz_name[RTE_MEMZONE_NAMESIZE];
+		int i = qat_gen_config[
+		      comp_dev->qat_dev->qat_dev_gen].comp_num_im_bufs_required;
+
+		while (--i >= 0) {
+			snprintf(mz_name, RTE_MEMZONE_NAMESIZE,
+					"%s_inter_buff_%d",
+					comp_dev->qat_dev->name, i);
+			rte_memzone_free(rte_memzone_lookup(mz_name));
+		}
 		rte_memzone_free(comp_dev->interm_buff_mz);
 		comp_dev->interm_buff_mz = NULL;
 	}
@@ -607,7 +650,8 @@ qat_comp_pmd_dequeue_first_op_burst(void *qp, struct rte_comp_op **ops,
 
 			tmp_qp->qat_dev->comp_dev->compressdev->dev_ops =
 					&compress_qat_dummy_ops;
-			QAT_LOG(ERR, "QAT PMD detected wrong FW version !");
+			QAT_LOG(ERR,
+					"This QAT hardware doesn't support compression operation");
 
 		} else {
 			tmp_qp->qat_dev->comp_dev->compressdev->dequeue_burst =
@@ -656,11 +700,6 @@ qat_comp_dev_create(struct qat_pci_device *qat_pci_dev,
 	int i = 0;
 	struct qat_device_info *qat_dev_instance =
 			&qat_pci_devs[qat_pci_dev->qat_dev_id];
-	if (qat_pci_dev->qat_dev_gen == QAT_GEN3) {
-		QAT_LOG(ERR, "Compression PMD not supported on QAT c4xxx");
-		return 0;
-	}
-
 	struct rte_compressdev_pmd_init_params init_params = {
 		.name = "",
 		.socket_id = qat_dev_instance->pci_dev->device.numa_node,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.923537800 +0800
+++ 0090-compress-qat-enable-compression-on-GEN3.patch	2021-06-12 06:53:56.420000000 +0800
@@ -1 +1 @@
-From da573c0e4205d818cd602eaa27c720896f3b6f1c Mon Sep 17 00:00:00 2001
+From afe3a7f202aea54ace3772f0f414fa539eee5a2b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit da573c0e4205d818cd602eaa27c720896f3b6f1c ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'test/crypto: fix auth-cipher compare length in OOP' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (88 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'compress/qat: enable compression on " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'crypto/dpaa_sec: affine the thread portal affinity' " Xueming Li
                       ` (87 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Kai Ji; +Cc: Luca Boccassi, Damian Nowak, Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8038030f29b3e5067e60eaa612f21398a19cb1ee

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8038030f29b3e5067e60eaa612f21398a19cb1ee Mon Sep 17 00:00:00 2001
From: Kai Ji <kai.ji@intel.com>
Date: Tue, 4 May 2021 15:19:41 +0100
Subject: [PATCH] test/crypto: fix auth-cipher compare length in OOP
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 91317c0155662fcf188fac2152f33c79f90c6433 ]

For out-of-place operations, comparing expected ciphertext with
the operation result should skip cipher_offset bytes, as those
will not be copied from source to the destination buffer, making
the tests fail.

Fixes: 02ed7b3871d6 ("test/crypto: add SNOW3G test cases for auth-cipher")

Signed-off-by: Kai Ji <kai.ji@intel.com>
Signed-off-by: Damian Nowak <damianx.nowak@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 app/test/test_cryptodev.c | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 8189053c13..093324ce73 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -4672,16 +4672,20 @@ test_snow3g_auth_cipher(const struct snow3g_test_data *tdata,
 
 	/* Validate obuf */
 	if (verify) {
-		TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
+		TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT_OFFSET(
 			plaintext,
 			tdata->plaintext.data,
-			tdata->plaintext.len >> 3,
+			(tdata->plaintext.len - tdata->cipher.offset_bits -
+			 (tdata->digest.len << 3)),
+			tdata->cipher.offset_bits,
 			"SNOW 3G Plaintext data not as expected");
 	} else {
-		TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
+		TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT_OFFSET(
 			ciphertext,
 			tdata->ciphertext.data,
-			tdata->validDataLenInBits.len,
+			(tdata->validDataLenInBits.len -
+			 tdata->cipher.offset_bits),
+			tdata->cipher.offset_bits,
 			"SNOW 3G Ciphertext data not as expected");
 
 		TEST_ASSERT_BUFFERS_ARE_EQUAL(
@@ -4883,16 +4887,20 @@ test_snow3g_auth_cipher_sgl(const struct snow3g_test_data *tdata,
 
 	/* Validate obuf */
 	if (verify) {
-		TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
+		TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT_OFFSET(
 			plaintext,
 			tdata->plaintext.data,
-			tdata->plaintext.len >> 3,
+			(tdata->plaintext.len - tdata->cipher.offset_bits -
+			 (tdata->digest.len << 3)),
+			tdata->cipher.offset_bits,
 			"SNOW 3G Plaintext data not as expected");
 	} else {
-		TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
+		TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT_OFFSET(
 			ciphertext,
 			tdata->ciphertext.data,
-			tdata->validDataLenInBits.len,
+			(tdata->validDataLenInBits.len -
+			 tdata->cipher.offset_bits),
+			tdata->cipher.offset_bits,
 			"SNOW 3G Ciphertext data not as expected");
 
 		TEST_ASSERT_BUFFERS_ARE_EQUAL(
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.950342900 +0800
+++ 0091-test-crypto-fix-auth-cipher-compare-length-in-OOP.patch	2021-06-12 06:53:56.430000000 +0800
@@ -1 +1 @@
-From 91317c0155662fcf188fac2152f33c79f90c6433 Mon Sep 17 00:00:00 2001
+From 8038030f29b3e5067e60eaa612f21398a19cb1ee Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 91317c0155662fcf188fac2152f33c79f90c6433 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 32e64e2dd1..a677a21e36 100644
+index 8189053c13..093324ce73 100644
@@ -25 +27 @@
-@@ -4671,16 +4671,20 @@ test_snow3g_auth_cipher(const struct snow3g_test_data *tdata,
+@@ -4672,16 +4672,20 @@ test_snow3g_auth_cipher(const struct snow3g_test_data *tdata,
@@ -50 +52 @@
-@@ -4882,16 +4886,20 @@ test_snow3g_auth_cipher_sgl(const struct snow3g_test_data *tdata,
+@@ -4883,16 +4887,20 @@ test_snow3g_auth_cipher_sgl(const struct snow3g_test_data *tdata,

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'crypto/dpaa_sec: affine the thread portal affinity' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (89 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'test/crypto: fix auth-cipher compare length in OOP' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix close and uninit functions' " Xueming Li
                       ` (86 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/39b13992e9cf6fce1ee2faf84bdd850a40861768

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 39b13992e9cf6fce1ee2faf84bdd850a40861768 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Mon, 3 May 2021 14:09:53 +0530
Subject: [PATCH] crypto/dpaa_sec: affine the thread portal affinity
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 22629f05f8832358d01872414e0e30c2c81e43d4 ]

DPAA requires the I/O shall be done in a HW portal context only.
The portal affinity is currently only being done in session create
and config APIs with the assumption that same thread will be used
for IO. This is causing issue.
This patch add support during I/O to check the HW portal affinity
and affine portal- if not affined already.

Fixes: 9a984458f755 ("crypto/dpaa_sec: rewrite Rx/Tx path")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/crypto/dpaa_sec/dpaa_sec.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c
index 44c742738f..a958d00b46 100644
--- a/drivers/crypto/dpaa_sec/dpaa_sec.c
+++ b/drivers/crypto/dpaa_sec/dpaa_sec.c
@@ -1716,6 +1716,13 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,
 	uint32_t index, flags[DPAA_SEC_BURST] = {0};
 	struct qman_fq *inq[DPAA_SEC_BURST];
 
+	if (unlikely(!DPAA_PER_LCORE_PORTAL)) {
+		if (rte_dpaa_portal_init((void *)0)) {
+			DPAA_SEC_ERR("Failure in affining portal");
+			return 0;
+		}
+	}
+
 	while (nb_ops) {
 		frames_to_send = (nb_ops > DPAA_SEC_BURST) ?
 				DPAA_SEC_BURST : nb_ops;
@@ -1916,6 +1923,13 @@ dpaa_sec_dequeue_burst(void *qp, struct rte_crypto_op **ops,
 	uint16_t num_rx;
 	struct dpaa_sec_qp *dpaa_qp = (struct dpaa_sec_qp *)qp;
 
+	if (unlikely(!DPAA_PER_LCORE_PORTAL)) {
+		if (rte_dpaa_portal_init((void *)0)) {
+			DPAA_SEC_ERR("Failure in affining portal");
+			return 0;
+		}
+	}
+
 	num_rx = dpaa_sec_deq(dpaa_qp, ops, nb_ops);
 
 	dpaa_qp->rx_pkts += num_rx;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:58.985728900 +0800
+++ 0092-crypto-dpaa_sec-affine-the-thread-portal-affinity.patch	2021-06-12 06:53:56.430000000 +0800
@@ -1 +1 @@
-From 22629f05f8832358d01872414e0e30c2c81e43d4 Mon Sep 17 00:00:00 2001
+From 39b13992e9cf6fce1ee2faf84bdd850a40861768 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 22629f05f8832358d01872414e0e30c2c81e43d4 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 43363ba6ba..19d4684e24 100644
+index 44c742738f..a958d00b46 100644
@@ -25 +27 @@
-@@ -1717,6 +1717,13 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,
+@@ -1716,6 +1716,13 @@ dpaa_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops,
@@ -39 +41 @@
-@@ -1917,6 +1924,13 @@ dpaa_sec_dequeue_burst(void *qp, struct rte_crypto_op **ops,
+@@ -1916,6 +1923,13 @@ dpaa_sec_dequeue_burst(void *qp, struct rte_crypto_op **ops,

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'crypto/dpaa2_sec: fix close and uninit functions' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (90 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'crypto/dpaa_sec: affine the thread portal affinity' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'test/crypto: copy offset data to OOP destination buffer' " Xueming Li
                       ` (85 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Luca Boccassi, Gagandeep Singh, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e5bf617fa8b68f1f8906157d46138ff3787d77cd

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e5bf617fa8b68f1f8906157d46138ff3787d77cd Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Wed, 5 May 2021 17:46:52 +0530
Subject: [PATCH] crypto/dpaa2_sec: fix close and uninit functions
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 394b4e118e503e80ba86388d5f59f89331cf53c5 ]

The init function was calling the dpseci_open
while dpseci_close was called by the open function.
This is a mismatch un-init shall clean the init configurations and
close shall clear the configure function settings.

This was causing issue with recent changes in test framework, where
the close was being called and causing DPAA2 SEC to fail in configure

Fixes: e5cbdfc53765 ("crypto/dpaa2_sec: add basic operations")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 50 ++++++++++-----------
 1 file changed, 24 insertions(+), 26 deletions(-)

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 5d91bf910e..9f189dd890 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -3534,32 +3534,10 @@ dpaa2_sec_dev_stop(struct rte_cryptodev *dev)
 }
 
 static int
-dpaa2_sec_dev_close(struct rte_cryptodev *dev)
+dpaa2_sec_dev_close(struct rte_cryptodev *dev __rte_unused)
 {
-	struct dpaa2_sec_dev_private *priv = dev->data->dev_private;
-	struct fsl_mc_io *dpseci = (struct fsl_mc_io *)priv->hw;
-	int ret;
-
 	PMD_INIT_FUNC_TRACE();
 
-	/* Function is reverse of dpaa2_sec_dev_init.
-	 * It does the following:
-	 * 1. Detach a DPSECI from attached resources i.e. buffer pools, dpbp_id
-	 * 2. Close the DPSECI device
-	 * 3. Free the allocated resources.
-	 */
-
-	/*Close the device at underlying layer*/
-	ret = dpseci_close(dpseci, CMD_PRI_LOW, priv->token);
-	if (ret) {
-		DPAA2_SEC_ERR("Failure closing dpseci device: err(%d)", ret);
-		return -1;
-	}
-
-	/*Free the allocated memory for ethernet private data and dpseci*/
-	priv->hw = NULL;
-	rte_free(dpseci);
-
 	return 0;
 }
 
@@ -3819,11 +3797,31 @@ static const struct rte_security_ops dpaa2_sec_security_ops = {
 static int
 dpaa2_sec_uninit(const struct rte_cryptodev *dev)
 {
-	struct dpaa2_sec_dev_private *internals = dev->data->dev_private;
+	struct dpaa2_sec_dev_private *priv = dev->data->dev_private;
+	struct fsl_mc_io *dpseci = (struct fsl_mc_io *)priv->hw;
+	int ret;
 
-	rte_free(dev->security_ctx);
+	PMD_INIT_FUNC_TRACE();
+
+	/* Function is reverse of dpaa2_sec_dev_init.
+	 * It does the following:
+	 * 1. Detach a DPSECI from attached resources i.e. buffer pools, dpbp_id
+	 * 2. Close the DPSECI device
+	 * 3. Free the allocated resources.
+	 */
 
-	rte_mempool_free(internals->fle_pool);
+	/*Close the device at underlying layer*/
+	ret = dpseci_close(dpseci, CMD_PRI_LOW, priv->token);
+	if (ret) {
+		DPAA2_SEC_ERR("Failure closing dpseci device: err(%d)", ret);
+		return -1;
+	}
+
+	/*Free the allocated memory for ethernet private data and dpseci*/
+	priv->hw = NULL;
+	rte_free(dpseci);
+	rte_free(dev->security_ctx);
+	rte_mempool_free(priv->fle_pool);
 
 	DPAA2_SEC_INFO("Closing DPAA2_SEC device %s on numa socket %u",
 		       dev->data->name, rte_socket_id());
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.014694400 +0800
+++ 0093-crypto-dpaa2_sec-fix-close-and-uninit-functions.patch	2021-06-12 06:53:56.430000000 +0800
@@ -1 +1 @@
-From 394b4e118e503e80ba86388d5f59f89331cf53c5 Mon Sep 17 00:00:00 2001
+From e5bf617fa8b68f1f8906157d46138ff3787d77cd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 394b4e118e503e80ba86388d5f59f89331cf53c5 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index 05b194ccff..1ccead3641 100644
+index 5d91bf910e..9f189dd890 100644
@@ -27 +29 @@
-@@ -3564,32 +3564,10 @@ dpaa2_sec_dev_stop(struct rte_cryptodev *dev)
+@@ -3534,32 +3534,10 @@ dpaa2_sec_dev_stop(struct rte_cryptodev *dev)
@@ -61 +63 @@
-@@ -3849,11 +3827,31 @@ static const struct rte_security_ops dpaa2_sec_security_ops = {
+@@ -3819,11 +3797,31 @@ static const struct rte_security_ops dpaa2_sec_security_ops = {

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'test/crypto: copy offset data to OOP destination buffer' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (91 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix close and uninit functions' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'bus/fslmc: remove unused debug macro' " Xueming Li
                       ` (84 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Kai Ji; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/07d17061abb9f5e2caa0402738abca1dc1b99a84

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 07d17061abb9f5e2caa0402738abca1dc1b99a84 Mon Sep 17 00:00:00 2001
From: Kai Ji <kai.ji@intel.com>
Date: Wed, 5 May 2021 15:45:13 +0100
Subject: [PATCH] test/crypto: copy offset data to OOP destination buffer
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit e19deb5af6edab846197dbd4f3cbbb2b83b3784f ]

Copy over the offset data required for auth in out-of-place op
when auth offset and cipher offset are not aligned.

Fixes: e847fc512817 ("test/crypto: add encrypted digest case for AES-CTR-CMAC")

Signed-off-by: Kai Ji <kai.ji@intel.com>
---
 app/test/test_cryptodev.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 093324ce73..56b385bdf1 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -2630,6 +2630,21 @@ create_wireless_algo_auth_cipher_operation(
 	iv_ptr += cipher_iv_len;
 	rte_memcpy(iv_ptr, auth_iv, auth_iv_len);
 
+	/* Only copy over the offset data needed from src to dst in OOP,
+	 * if the auth and cipher offsets are not aligned
+	 */
+	if (op_mode == OUT_OF_PLACE) {
+		if (cipher_offset > auth_offset)
+			rte_memcpy(
+				rte_pktmbuf_mtod_offset(
+					sym_op->m_dst,
+					uint8_t *, auth_offset >> 3),
+				rte_pktmbuf_mtod_offset(
+					sym_op->m_src,
+					uint8_t *, auth_offset >> 3),
+				((cipher_offset >> 3) - (auth_offset >> 3)));
+	}
+
 	if (cipher_algo == RTE_CRYPTO_CIPHER_SNOW3G_UEA2 ||
 		cipher_algo == RTE_CRYPTO_CIPHER_KASUMI_F8 ||
 		cipher_algo == RTE_CRYPTO_CIPHER_ZUC_EEA3) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.040165100 +0800
+++ 0094-test-crypto-copy-offset-data-to-OOP-destination-buff.patch	2021-06-12 06:53:56.440000000 +0800
@@ -1 +1 @@
-From e19deb5af6edab846197dbd4f3cbbb2b83b3784f Mon Sep 17 00:00:00 2001
+From 07d17061abb9f5e2caa0402738abca1dc1b99a84 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit e19deb5af6edab846197dbd4f3cbbb2b83b3784f ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index a677a21e36..2bd4ff96cb 100644
+index 093324ce73..56b385bdf1 100644
@@ -21 +23 @@
-@@ -2629,6 +2629,21 @@ create_wireless_algo_auth_cipher_operation(
+@@ -2630,6 +2630,21 @@ create_wireless_algo_auth_cipher_operation(

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'bus/fslmc: remove unused debug macro' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (92 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'test/crypto: copy offset data to OOP destination buffer' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'eal: fix leak in shared lib mode detection' " Xueming Li
                       ` (83 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: David Marchand; +Cc: Luca Boccassi, Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5be4837391f6dea4f453a08bb4ffbd06d32dcac2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5be4837391f6dea4f453a08bb4ffbd06d32dcac2 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 6 May 2021 10:41:42 +0200
Subject: [PATCH] bus/fslmc: remove unused debug macro
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit b353f17b6dd80b0c3209cc5dc760f5b8ecff357c ]

Fixes: ce9efbf5bb09 ("bus/fslmc: support dynamic logging")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/fslmc_logs.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/bus/fslmc/fslmc_logs.h b/drivers/bus/fslmc/fslmc_logs.h
index dd74cb7dcf..a1e14dd84e 100644
--- a/drivers/bus/fslmc/fslmc_logs.h
+++ b/drivers/bus/fslmc/fslmc_logs.h
@@ -18,8 +18,6 @@ extern int dpaa2_logtype_bus;
 	rte_log(RTE_LOG_DEBUG, dpaa2_logtype_bus, "fslmc: %s(): " fmt "\n", \
 		__func__, ##args)
 
-#define BUS_INIT_FUNC_TRACE() DPAA2_BUS_DEBUG(" >>")
-
 #define DPAA2_BUS_INFO(fmt, args...) \
 	DPAA2_BUS_LOG(INFO, fmt, ## args)
 #define DPAA2_BUS_ERR(fmt, args...) \
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.074484300 +0800
+++ 0095-bus-fslmc-remove-unused-debug-macro.patch	2021-06-12 06:53:56.440000000 +0800
@@ -1 +1 @@
-From b353f17b6dd80b0c3209cc5dc760f5b8ecff357c Mon Sep 17 00:00:00 2001
+From 5be4837391f6dea4f453a08bb4ffbd06d32dcac2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit b353f17b6dd80b0c3209cc5dc760f5b8ecff357c ]
@@ -7 +9,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'eal: fix leak in shared lib mode detection' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (93 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'bus/fslmc: remove unused debug macro' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'eal: fix memory mapping on 32-bit target' " Xueming Li
                       ` (82 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: David Marchand; +Cc: Luca Boccassi, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3cb6827a324761d14641ddb2126e570bef5950c9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3cb6827a324761d14641ddb2126e570bef5950c9 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 6 May 2021 12:06:37 +0200
Subject: [PATCH] eal: fix leak in shared lib mode detection
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit b81bf1efe3ff7bf6bedf4dcce1e3fb90ac9c8d3c ]

This is reported by our internal covscan:

1. dpdk-20.11/lib/librte_eal/common/eal_common_options.c:508: alloc_fn:
Storage is returned from allocation function "dlopen".
6. dpdk-20.11/lib/librte_eal/common/eal_common_options.c:508:
leaked_storage: Failing to save or free storage allocated by
"dlopen("librte_eal.so.21.0", 5)" leaks it.

 #   506|   	 * shared library is not already loaded i.e. it's
 #   statically linked.)
 #   507|   	 */
 #   508|-> 	if (dlopen("librte_eal.so."ABI_VERSION, RTLD_LAZY |
 #   RTLD_NOLOAD) != NULL &&
 #   509|   			*default_solib_dir != '\0' &&
 #   510|   			stat(default_solib_dir, &sb) == 0 &&

This leak is not an issue per se, but on the other hand, this is easy
to fix and I prefer not having to waive this warning later.

Fixes: 06c7871dde01 ("eal: restrict default plugin path to shared lib mode")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_eal/common/eal_common_options.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index 94b560a8ab..f8ab47435d 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -508,10 +508,14 @@ is_shared_build(void)
 	}
 
 	while (len >= minlen) {
+		void *handle;
+
 		/* check if we have this .so loaded, if so - shared build */
 		RTE_LOG(DEBUG, EAL, "Checking presence of .so '%s'\n", soname);
-		if (dlopen(soname, RTLD_LAZY | RTLD_NOLOAD) != NULL) {
+		handle = dlopen(soname, RTLD_LAZY | RTLD_NOLOAD);
+		if (handle != NULL) {
 			RTE_LOG(INFO, EAL, "Detected shared linkage of DPDK\n");
+			dlclose(handle);
 			return 1;
 		}
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.100017400 +0800
+++ 0096-eal-fix-leak-in-shared-lib-mode-detection.patch	2021-06-12 06:53:56.450000000 +0800
@@ -1 +1 @@
-From b81bf1efe3ff7bf6bedf4dcce1e3fb90ac9c8d3c Mon Sep 17 00:00:00 2001
+From 3cb6827a324761d14641ddb2126e570bef5950c9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit b81bf1efe3ff7bf6bedf4dcce1e3fb90ac9c8d3c ]
@@ -26 +28,0 @@
-Cc: stable@dpdk.org
@@ -31 +33 @@
- lib/eal/common/eal_common_options.c | 6 +++++-
+ lib/librte_eal/common/eal_common_options.c | 6 +++++-
@@ -34,5 +36,5 @@
-diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c
-index 97ab6e00fd..ff5861b5f3 100644
---- a/lib/eal/common/eal_common_options.c
-+++ b/lib/eal/common/eal_common_options.c
-@@ -509,10 +509,14 @@ is_shared_build(void)
+diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
+index 94b560a8ab..f8ab47435d 100644
+--- a/lib/librte_eal/common/eal_common_options.c
++++ b/lib/librte_eal/common/eal_common_options.c
+@@ -508,10 +508,14 @@ is_shared_build(void)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'eal: fix memory mapping on 32-bit target' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (94 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'eal: fix leak in shared lib mode detection' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'raw/skeleton: add missing check after setting attribute' " Xueming Li
                       ` (81 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Luca Boccassi, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3aadd33dd27258388af609121ea1dd415f575b05

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3aadd33dd27258388af609121ea1dd415f575b05 Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Sat, 8 May 2021 10:27:53 -0400
Subject: [PATCH] eal: fix memory mapping on 32-bit target
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 6beb2d294743aad1488234109a3ad95a8d5a273f ]

For 32-bit targets, size_t is normally a 32-bit type and
does not have sufficient range to represent 64-bit offsets
that are needed when mapping PCI addresses.
Use uint64_t instead.

Found when attempting to run 32-bit Linux dpdk-testpmd
using VFIO driver:

    EAL: pci_map_resource(): cannot map resource(63, 0xc0010000, \
    0x200000, 0x20000000000): Invalid argument ((nil))

Fixes: c4b89ecb64ea ("eal: introduce memory management wrappers")

Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/include/rte_eal_paging.h |  2 +-
 lib/librte_eal/unix/eal_unix_memory.c   | 11 ++++++-----
 lib/librte_eal/windows/eal_memory.c     |  2 +-
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/lib/librte_eal/include/rte_eal_paging.h b/lib/librte_eal/include/rte_eal_paging.h
index ed98e70e9e..c60317d0f5 100644
--- a/lib/librte_eal/include/rte_eal_paging.h
+++ b/lib/librte_eal/include/rte_eal_paging.h
@@ -61,7 +61,7 @@ enum rte_map_flags {
 __rte_internal
 void *
 rte_mem_map(void *requested_addr, size_t size, int prot, int flags,
-	int fd, size_t offset);
+	int fd, uint64_t offset);
 
 /**
  * OS-independent implementation of POSIX munmap(3).
diff --git a/lib/librte_eal/unix/eal_unix_memory.c b/lib/librte_eal/unix/eal_unix_memory.c
index ec7156df96..68ae93bd6e 100644
--- a/lib/librte_eal/unix/eal_unix_memory.c
+++ b/lib/librte_eal/unix/eal_unix_memory.c
@@ -5,6 +5,7 @@
 #include <string.h>
 #include <sys/mman.h>
 #include <unistd.h>
+#include <inttypes.h>
 
 #include <rte_eal_paging.h>
 #include <rte_errno.h>
@@ -24,14 +25,14 @@
 
 static void *
 mem_map(void *requested_addr, size_t size, int prot, int flags,
-	int fd, size_t offset)
+	int fd, uint64_t offset)
 {
 	void *virt = mmap(requested_addr, size, prot, flags, fd, offset);
 	if (virt == MAP_FAILED) {
 		RTE_LOG(DEBUG, EAL,
-			"Cannot mmap(%p, 0x%zx, 0x%x, 0x%x, %d, 0x%zx): %s\n",
-			requested_addr, size, prot, flags, fd, offset,
-			strerror(errno));
+		    "Cannot mmap(%p, 0x%zx, 0x%x, 0x%x, %d, 0x%"PRIx64"): %s\n",
+		    requested_addr, size, prot, flags, fd, offset,
+		    strerror(errno));
 		rte_errno = errno;
 		return NULL;
 	}
@@ -106,7 +107,7 @@ mem_rte_to_sys_prot(int prot)
 
 void *
 rte_mem_map(void *requested_addr, size_t size, int prot, int flags,
-	int fd, size_t offset)
+	int fd, uint64_t offset)
 {
 	int sys_flags = 0;
 	int sys_prot;
diff --git a/lib/librte_eal/windows/eal_memory.c b/lib/librte_eal/windows/eal_memory.c
index 2cf5a5e649..4db048ccb5 100644
--- a/lib/librte_eal/windows/eal_memory.c
+++ b/lib/librte_eal/windows/eal_memory.c
@@ -508,7 +508,7 @@ eal_mem_set_dump(void *virt, size_t size, bool dump)
 
 void *
 rte_mem_map(void *requested_addr, size_t size, int prot, int flags,
-	int fd, size_t offset)
+	int fd, uint64_t offset)
 {
 	HANDLE file_handle = INVALID_HANDLE_VALUE;
 	HANDLE mapping_handle = INVALID_HANDLE_VALUE;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.125112700 +0800
+++ 0097-eal-fix-memory-mapping-on-32-bit-target.patch	2021-06-12 06:53:56.450000000 +0800
@@ -1 +1 @@
-From 6beb2d294743aad1488234109a3ad95a8d5a273f Mon Sep 17 00:00:00 2001
+From 3aadd33dd27258388af609121ea1dd415f575b05 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 6beb2d294743aad1488234109a3ad95a8d5a273f ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -23,3 +25,3 @@
- lib/eal/include/rte_eal_paging.h |  2 +-
- lib/eal/unix/eal_unix_memory.c   | 11 ++++++-----
- lib/eal/windows/eal_memory.c     |  2 +-
+ lib/librte_eal/include/rte_eal_paging.h |  2 +-
+ lib/librte_eal/unix/eal_unix_memory.c   | 11 ++++++-----
+ lib/librte_eal/windows/eal_memory.c     |  2 +-
@@ -28 +30 @@
-diff --git a/lib/eal/include/rte_eal_paging.h b/lib/eal/include/rte_eal_paging.h
+diff --git a/lib/librte_eal/include/rte_eal_paging.h b/lib/librte_eal/include/rte_eal_paging.h
@@ -30,2 +32,2 @@
---- a/lib/eal/include/rte_eal_paging.h
-+++ b/lib/eal/include/rte_eal_paging.h
+--- a/lib/librte_eal/include/rte_eal_paging.h
++++ b/lib/librte_eal/include/rte_eal_paging.h
@@ -41 +43 @@
-diff --git a/lib/eal/unix/eal_unix_memory.c b/lib/eal/unix/eal_unix_memory.c
+diff --git a/lib/librte_eal/unix/eal_unix_memory.c b/lib/librte_eal/unix/eal_unix_memory.c
@@ -43,2 +45,2 @@
---- a/lib/eal/unix/eal_unix_memory.c
-+++ b/lib/eal/unix/eal_unix_memory.c
+--- a/lib/librte_eal/unix/eal_unix_memory.c
++++ b/lib/librte_eal/unix/eal_unix_memory.c
@@ -81 +83 @@
-diff --git a/lib/eal/windows/eal_memory.c b/lib/eal/windows/eal_memory.c
+diff --git a/lib/librte_eal/windows/eal_memory.c b/lib/librte_eal/windows/eal_memory.c
@@ -83,2 +85,2 @@
---- a/lib/eal/windows/eal_memory.c
-+++ b/lib/eal/windows/eal_memory.c
+--- a/lib/librte_eal/windows/eal_memory.c
++++ b/lib/librte_eal/windows/eal_memory.c

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'raw/skeleton: add missing check after setting attribute' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (95 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'eal: fix memory mapping on 32-bit target' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'ipc: use monotonic clock' " Xueming Li
                       ` (80 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/45c0d2e47e48829ab9f75ac7883820d8d2a33eae

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 45c0d2e47e48829ab9f75ac7883820d8d2a33eae Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Thu, 22 Apr 2021 14:21:46 +0800
Subject: [PATCH] raw/skeleton: add missing check after setting attribute
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit b97012825dfad7d30bbd1fa99ec6115eba6135ce ]

This patch adds return value check for setting an attribute.

Fixes: 88a81bcecb7b ("raw/skeleton: remove compile-time constant for device id")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/raw/skeleton/skeleton_rawdev_test.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/raw/skeleton/skeleton_rawdev_test.c b/drivers/raw/skeleton/skeleton_rawdev_test.c
index 1405df080d..484468eeb4 100644
--- a/drivers/raw/skeleton/skeleton_rawdev_test.c
+++ b/drivers/raw/skeleton/skeleton_rawdev_test.c
@@ -295,6 +295,7 @@ test_rawdev_attr_set_get(void)
 	dummy_value = &set_value;
 	*dummy_value = 200;
 	ret = rte_rawdev_set_attr(test_dev_id, "Test2", (uintptr_t)dummy_value);
+	RTE_TEST_ASSERT(!ret, "Unable to set an attribute (Test2)");
 
 	/* Check if attributes have been set */
 	ret = rte_rawdev_get_attr(test_dev_id, "Test1", &ret_value);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.150231000 +0800
+++ 0098-raw-skeleton-add-missing-check-after-setting-attribu.patch	2021-06-12 06:53:56.450000000 +0800
@@ -1 +1 @@
-From b97012825dfad7d30bbd1fa99ec6115eba6135ce Mon Sep 17 00:00:00 2001
+From 45c0d2e47e48829ab9f75ac7883820d8d2a33eae Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit b97012825dfad7d30bbd1fa99ec6115eba6135ce ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'ipc: use monotonic clock' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (96 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'raw/skeleton: add missing check after setting attribute' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'examples/timer: fix time interval' " Xueming Li
                       ` (79 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, Morten Brørup, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/764a01e145779ff4f97ffa574593c20153abf487

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 764a01e145779ff4f97ffa574593c20153abf487 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Tue, 11 May 2021 18:41:23 +0800
Subject: [PATCH] ipc: use monotonic clock
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit cc994d3922b7cd464d84fbef110dd65348e0a0da ]

Currently, the mp uses gettimeofday() API to get the time, and used as
timeout parameter.

But the time which gets from gettimeofday() API isn't monotonically
increasing. The process may fail if the system time is changed.

This fixes it by using clock_gettime() API with monotonic attribution.

Fixes: 783b6e54971d ("eal: add synchronous multi-process communication")
Fixes: f05e26051c15 ("eal: add IPC asynchronous request")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
---
 lib/librte_eal/common/eal_common_proc.c | 27 ++++++++++++-------------
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c
index 6d1af3c0e7..dc4a2efa82 100644
--- a/lib/librte_eal/common/eal_common_proc.c
+++ b/lib/librte_eal/common/eal_common_proc.c
@@ -490,14 +490,11 @@ async_reply_handle_thread_unsafe(void *arg)
 	struct pending_request *req = (struct pending_request *)arg;
 	enum async_action action;
 	struct timespec ts_now;
-	struct timeval now;
 
-	if (gettimeofday(&now, NULL) < 0) {
+	if (clock_gettime(CLOCK_MONOTONIC, &ts_now) < 0) {
 		RTE_LOG(ERR, EAL, "Cannot get current time\n");
 		goto no_trigger;
 	}
-	ts_now.tv_nsec = now.tv_usec * 1000;
-	ts_now.tv_sec = now.tv_sec;
 
 	action = process_async_request(req, &ts_now);
 
@@ -896,6 +893,7 @@ mp_request_sync(const char *dst, struct rte_mp_msg *req,
 	       struct rte_mp_reply *reply, const struct timespec *ts)
 {
 	int ret;
+	pthread_condattr_t attr;
 	struct rte_mp_msg msg, *tmp;
 	struct pending_request pending_req, *exist;
 
@@ -904,7 +902,9 @@ mp_request_sync(const char *dst, struct rte_mp_msg *req,
 	strlcpy(pending_req.dst, dst, sizeof(pending_req.dst));
 	pending_req.request = req;
 	pending_req.reply = &msg;
-	pthread_cond_init(&pending_req.sync.cond, NULL);
+	pthread_condattr_init(&attr);
+	pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
+	pthread_cond_init(&pending_req.sync.cond, &attr);
 
 	exist = find_pending_request(dst, req->name);
 	if (exist) {
@@ -967,8 +967,7 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,
 	int dir_fd, ret = -1;
 	DIR *mp_dir;
 	struct dirent *ent;
-	struct timeval now;
-	struct timespec end;
+	struct timespec now, end;
 	const struct internal_config *internal_conf =
 		eal_get_internal_configuration();
 
@@ -987,15 +986,15 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,
 		return -1;
 	}
 
-	if (gettimeofday(&now, NULL) < 0) {
+	if (clock_gettime(CLOCK_MONOTONIC, &now) < 0) {
 		RTE_LOG(ERR, EAL, "Failed to get current time\n");
 		rte_errno = errno;
 		goto end;
 	}
 
-	end.tv_nsec = (now.tv_usec * 1000 + ts->tv_nsec) % 1000000000;
+	end.tv_nsec = (now.tv_nsec + ts->tv_nsec) % 1000000000;
 	end.tv_sec = now.tv_sec + ts->tv_sec +
-			(now.tv_usec * 1000 + ts->tv_nsec) / 1000000000;
+			(now.tv_nsec + ts->tv_nsec) / 1000000000;
 
 	/* for secondary process, send request to the primary process only */
 	if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
@@ -1069,7 +1068,7 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
 	int dir_fd, ret = 0;
 	DIR *mp_dir;
 	struct dirent *ent;
-	struct timeval now;
+	struct timespec now;
 	struct timespec *end;
 	bool dummy_used = false;
 	const struct internal_config *internal_conf =
@@ -1086,7 +1085,7 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
 		return -1;
 	}
 
-	if (gettimeofday(&now, NULL) < 0) {
+	if (clock_gettime(CLOCK_MONOTONIC, &now) < 0) {
 		RTE_LOG(ERR, EAL, "Failed to get current time\n");
 		rte_errno = errno;
 		return -1;
@@ -1108,9 +1107,9 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
 	end = &param->end;
 	reply = &param->user_reply;
 
-	end->tv_nsec = (now.tv_usec * 1000 + ts->tv_nsec) % 1000000000;
+	end->tv_nsec = (now.tv_nsec + ts->tv_nsec) % 1000000000;
 	end->tv_sec = now.tv_sec + ts->tv_sec +
-			(now.tv_usec * 1000 + ts->tv_nsec) / 1000000000;
+			(now.tv_nsec + ts->tv_nsec) / 1000000000;
 	reply->nb_sent = 0;
 	reply->nb_received = 0;
 	reply->msgs = NULL;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.172910100 +0800
+++ 0099-ipc-use-monotonic-clock.patch	2021-06-12 06:53:56.450000000 +0800
@@ -1 +1 @@
-From cc994d3922b7cd464d84fbef110dd65348e0a0da Mon Sep 17 00:00:00 2001
+From 764a01e145779ff4f97ffa574593c20153abf487 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit cc994d3922b7cd464d84fbef110dd65348e0a0da ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
- lib/eal/common/eal_common_proc.c | 27 +++++++++++++--------------
+ lib/librte_eal/common/eal_common_proc.c | 27 ++++++++++++-------------
@@ -28 +30 @@
-diff --git a/lib/eal/common/eal_common_proc.c b/lib/eal/common/eal_common_proc.c
+diff --git a/lib/librte_eal/common/eal_common_proc.c b/lib/librte_eal/common/eal_common_proc.c
@@ -30,2 +32,2 @@
---- a/lib/eal/common/eal_common_proc.c
-+++ b/lib/eal/common/eal_common_proc.c
+--- a/lib/librte_eal/common/eal_common_proc.c
++++ b/lib/librte_eal/common/eal_common_proc.c

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'examples/timer: fix time interval' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (97 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'ipc: use monotonic clock' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'test/timer: check memzone allocation' " Xueming Li
                       ` (78 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3ce8842e183a1c2c9d077b5b510038bed49d6b87

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3ce8842e183a1c2c9d077b5b510038bed49d6b87 Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Thu, 6 May 2021 17:29:36 +0800
Subject: [PATCH] examples/timer: fix time interval
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 80aa15c4dff24e7a3b549f8dca37c16ae7220920 ]

Timer sample example assumes that the frequency of the timer is about
2Ghz to control the period of calling rte_timer_manage(). But this
assumption is easy to fail. For example. the frequency of tsc on ARM64
is much less than 2Ghz.

This patch uses the frequency of the current timer to calculate the
correct time interval to ensure consistent result on all platforms.

In addition, the rte_rdtsc() is replaced with the more recommended
rte_get_timer_cycles function in this patch.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 examples/timer/main.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/examples/timer/main.c b/examples/timer/main.c
index d67301e3c4..d270ce49dc 100644
--- a/examples/timer/main.c
+++ b/examples/timer/main.c
@@ -18,8 +18,7 @@
 #include <rte_timer.h>
 #include <rte_debug.h>
 
-#define TIMER_RESOLUTION_CYCLES 20000000ULL /* around 10ms at 2 Ghz */
-
+static uint64_t timer_resolution_cycles;
 static struct rte_timer timer0;
 static struct rte_timer timer1;
 
@@ -66,15 +65,14 @@ lcore_mainloop(__rte_unused void *arg)
 
 	while (1) {
 		/*
-		 * Call the timer handler on each core: as we don't
-		 * need a very precise timer, so only call
-		 * rte_timer_manage() every ~10ms (at 2Ghz). In a real
-		 * application, this will enhance performances as
-		 * reading the HPET timer is not efficient.
+		 * Call the timer handler on each core: as we don't need a
+		 * very precise timer, so only call rte_timer_manage()
+		 * every ~10ms. In a real application, this will enhance
+		 * performances as reading the HPET timer is not efficient.
 		 */
-		cur_tsc = rte_rdtsc();
+		cur_tsc = rte_get_timer_cycles();
 		diff_tsc = cur_tsc - prev_tsc;
-		if (diff_tsc > TIMER_RESOLUTION_CYCLES) {
+		if (diff_tsc > timer_resolution_cycles) {
 			rte_timer_manage();
 			prev_tsc = cur_tsc;
 		}
@@ -100,8 +98,10 @@ main(int argc, char **argv)
 	rte_timer_init(&timer0);
 	rte_timer_init(&timer1);
 
-	/* load timer0, every second, on main lcore, reloaded automatically */
 	hz = rte_get_timer_hz();
+	timer_resolution_cycles = hz * 10 / 1000; /* around 10ms */
+
+	/* load timer0, every second, on main lcore, reloaded automatically */
 	lcore_id = rte_lcore_id();
 	rte_timer_reset(&timer0, hz, PERIODICAL, lcore_id, timer0_cb, NULL);
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.196702800 +0800
+++ 0100-examples-timer-fix-time-interval.patch	2021-06-12 06:53:56.450000000 +0800
@@ -1 +1 @@
-From 80aa15c4dff24e7a3b549f8dca37c16ae7220920 Mon Sep 17 00:00:00 2001
+From 3ce8842e183a1c2c9d077b5b510038bed49d6b87 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 80aa15c4dff24e7a3b549f8dca37c16ae7220920 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'test/timer: check memzone allocation' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (98 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'examples/timer: fix time interval' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'doc: remove PDF requirements' " Xueming Li
                       ` (77 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, Erik Gabriel Carrillo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/14e975dea9267eb7d023b204f22e839bc8fbd59a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 14e975dea9267eb7d023b204f22e839bc8fbd59a Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Tue, 4 May 2021 09:07:49 +0800
Subject: [PATCH] test/timer: check memzone allocation
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit fb9b862e7c0ddee29df36feb8dd0cbcd2762db25 ]

Segmentation fault may occur without checking if memzone
reserves succeed or not.

Fixes: 50247fe03fe0 ("test/timer: exercise new APIs in secondary process")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
---
 app/test/test_timer_secondary.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/test/test_timer_secondary.c b/app/test/test_timer_secondary.c
index 1e8f1d4549..16a9f1878b 100644
--- a/app/test/test_timer_secondary.c
+++ b/app/test/test_timer_secondary.c
@@ -125,9 +125,9 @@ test_timer_secondary(void)
 
 		mz = rte_memzone_reserve(TEST_INFO_MZ_NAME, sizeof(*test_info),
 					 SOCKET_ID_ANY, 0);
-		test_info = mz->addr;
-		TEST_ASSERT_NOT_NULL(test_info, "Couldn't allocate memory for "
+		TEST_ASSERT_NOT_NULL(mz, "Couldn't allocate memory for "
 				     "test data");
+		test_info = mz->addr;
 
 		test_info->tim_mempool = rte_mempool_create("test_timer_mp",
 				NUM_TIMERS, sizeof(struct rte_timer), 0, 0,
@@ -171,9 +171,9 @@ test_timer_secondary(void)
 		int i;
 
 		mz = rte_memzone_lookup(TEST_INFO_MZ_NAME);
-		test_info = mz->addr;
-		TEST_ASSERT_NOT_NULL(test_info, "Couldn't lookup memzone for "
+		TEST_ASSERT_NOT_NULL(mz, "Couldn't lookup memzone for "
 				     "test info");
+		test_info = mz->addr;
 
 		for (i = 0; i < NUM_TIMERS; i++) {
 			rte_mempool_get(test_info->tim_mempool, (void **)&tim);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.220674400 +0800
+++ 0101-test-timer-check-memzone-allocation.patch	2021-06-12 06:53:56.450000000 +0800
@@ -1 +1 @@
-From fb9b862e7c0ddee29df36feb8dd0cbcd2762db25 Mon Sep 17 00:00:00 2001
+From 14e975dea9267eb7d023b204f22e839bc8fbd59a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit fb9b862e7c0ddee29df36feb8dd0cbcd2762db25 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'doc: remove PDF requirements' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (99 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'test/timer: check memzone allocation' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'power: fix sanity checks for guest channel read' " Xueming Li
                       ` (76 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Luca Boccassi, Ruifeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5d30751003cf9cff56438b0a88dfd3ac185caa74

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5d30751003cf9cff56438b0a88dfd3ac185caa74 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Tue, 11 May 2021 22:57:36 +0200
Subject: [PATCH] doc: remove PDF requirements
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 428eaeb822c229d92e287322c80eeb15e0b53351 ]

The documentation is generated in HTML only.
The PDF format is abandoned since DPDK 20.11
while dropping support of the make-based build.

This decision has been mentioned by the Technical Board:
https://mails.dpdk.org/archives/dev/2021-January/195549.html

Fixes: 3cc6ecfdfe85 ("build: remove makefiles")

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 devtools/checkpatches.sh                  |  3 +-
 doc/guides/conf.py                        | 43 -------------
 doc/guides/contributing/documentation.rst | 74 +++--------------------
 3 files changed, 11 insertions(+), 109 deletions(-)

diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 78a408ef98..db4c7d8301 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -118,8 +118,7 @@ check_forbidden_additions() { # <patch>
 		-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
 		"$1" || res=1
 
-	# svg figures must be included with wildcard extension
-	# because of png conversion for pdf docs
+	# SVG must be included with wildcard extension to allow conversion
 	awk -v FOLDERS='doc' \
 		-v EXPRESSIONS='::[[:space:]]*[^[:space:]]*\\.svg' \
 		-v RET_ON_FAIL=1 \
diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index c22caaa247..894d81ca75 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -5,8 +5,6 @@
 from docutils import nodes
 from distutils.version import LooseVersion
 from sphinx import __version__ as sphinx_version
-from sphinx.highlighting import PygmentsBridge
-from pygments.formatters.latex import LatexFormatter
 from os import listdir
 from os import environ
 from os.path import basename
@@ -30,7 +28,6 @@ stop_on_error = ('-W' in argv)
 
 project = 'Data Plane Development Kit'
 html_logo = '../logo/DPDK_logo_vertical_rev_small.png'
-latex_logo = '../logo/DPDK_logo_horizontal_tag.png'
 if LooseVersion(sphinx_version) >= LooseVersion('3.5'):
     html_permalinks = False
 else:
@@ -49,46 +46,6 @@ feature_str_len = 30
 # Figures, tables and code-blocks automatically numbered if they have caption
 numfig = True
 
-latex_documents = [
-    ('index',
-     'doc.tex',
-     '',
-     '',
-     'manual')
-]
-
-# Latex directives to be included directly in the latex/pdf docs.
-custom_latex_preamble = r"""
-\usepackage{textalpha}
-\RecustomVerbatimEnvironment{Verbatim}{Verbatim}{xleftmargin=5mm}
-\usepackage{etoolbox}
-\robustify\(
-\robustify\)
-"""
-
-# Configuration for the latex/pdf docs.
-latex_elements = {
-    'papersize': 'a4paper',
-    'pointsize': '11pt',
-    # remove blank pages
-    'classoptions': ',openany,oneside',
-    'babel': '\\usepackage[english]{babel}',
-    # customize Latex formatting
-    'preamble': custom_latex_preamble
-}
-
-
-# Override the default Latex formatter in order to modify the
-# code/verbatim blocks.
-class CustomLatexFormatter(LatexFormatter):
-    def __init__(self, **options):
-        super(CustomLatexFormatter, self).__init__(**options)
-        # Use the second smallest font size for code/verbatim blocks.
-        self.verboptions = r'formatcom=\footnotesize'
-
-# Replace the default latex formatter.
-PygmentsBridge.latex_formatter = CustomLatexFormatter
-
 # Configuration for man pages
 man_pages = [("testpmd_app_ug/run_app", "testpmd",
               "tests for dpdk pmds", "", 1),
diff --git a/doc/guides/contributing/documentation.rst b/doc/guides/contributing/documentation.rst
index a4e6be6aca..1e998fd214 100644
--- a/doc/guides/contributing/documentation.rst
+++ b/doc/guides/contributing/documentation.rst
@@ -8,7 +8,7 @@ DPDK Documentation Guidelines
 
 This document outlines the guidelines for writing the DPDK Guides and API documentation in RST and Doxygen format.
 
-It also explains the structure of the DPDK documentation and shows how to build the Html and PDF versions of the documents.
+It also explains the structure of the DPDK documentation and how to build it.
 
 
 Structure of the Documentation
@@ -136,17 +136,11 @@ Building the Documentation
 Dependencies
 ~~~~~~~~~~~~
 
-
 The following dependencies must be installed to build the documentation:
 
 * Doxygen.
-
 * Sphinx (also called python-sphinx).
 
-* TexLive (at least TexLive-core and the extra Latex support).
-
-* Inkscape.
-
 `Doxygen`_ generates documentation from commented source code.
 It can be installed as follows:
 
@@ -158,7 +152,7 @@ It can be installed as follows:
    # Red Hat/Fedora.
    sudo dnf     -y install doxygen
 
-`Sphinx`_ is a Python documentation tool for converting RST files to Html or to PDF (via LaTeX).
+`Sphinx`_ is a Python documentation tool for converting RST files to HTML.
 For full support with figure and table captioning the latest version of Sphinx can be installed as follows:
 
 .. code-block:: console
@@ -177,43 +171,6 @@ For further information on getting started with Sphinx see the
    To get full support for Figure and Table numbering it is best to install Sphinx 1.3.1 or later.
 
 
-`Inkscape`_ is a vector based graphics program which is used to create SVG images and also to convert SVG images to PDF images.
-It can be installed as follows:
-
-.. code-block:: console
-
-   # Ubuntu/Debian.
-   sudo apt-get -y install inkscape
-
-   # Red Hat/Fedora.
-   sudo dnf     -y install inkscape
-
-`TexLive <http://www.tug.org/texlive/>`_ is an installation package for Tex/LaTeX.
-It is used to generate the PDF versions of the documentation.
-The main required packages can be installed as follows:
-
-.. code-block:: console
-
-   # Ubuntu/Debian.
-   sudo apt-get -y install texlive-latex-extra texlive-lang-greek
-
-   # Red Hat/Fedora, selective install.
-   sudo dnf     -y install texlive-collection-latexextra texlive-greek-fontenc
-
-`Latexmk <http://personal.psu.edu/jcc8/software/latexmk-jcc/>`_ is a perl script
-for running LaTeX for resolving cross references,
-and it also runs auxiliary programs like bibtex, makeindex if necessary, and dvips.
-It has also a number of other useful capabilities (see man 1 latexmk).
-
-.. code-block:: console
-
-   # Ubuntu/Debian.
-   sudo apt-get -y install latexmk
-
-   # Red Hat/Fedora.
-   sudo dnf     -y install latexmk
-
-
 Build commands
 ~~~~~~~~~~~~~~
 
@@ -225,16 +182,7 @@ To build the documentation::
 
 See :doc:`../linux_gsg/build_dpdk` for more detail on compiling DPDK with meson.
 
-The output is generated in the ``build`` directory::
-
-   build/doc
-         |-- html
-         |   |-- api
-         |   +-- guides
-         |
-         +-- pdf
-             +-- guides
-
+The output is generated in the directories ``build/doc/html/{api,guides}``.
 
 .. Note::
 
@@ -259,7 +207,8 @@ Here are some guidelines in relation to the style of the documentation:
 RST Guidelines
 --------------
 
-The RST (reStructuredText) format is a plain text markup format that can be converted to Html, PDF or other formats.
+The RST (reStructuredText) format is a plain text markup format
+that can be converted to HTML or other formats.
 It is most closely associated with Python but it can be used to document any language.
 It is used in DPDK to document everything apart from the API.
 
@@ -282,9 +231,8 @@ Line Length
   words. Multiple sentences which are not separated by a blank line are joined
   automatically into paragraphs.
 
-* Lines in literal blocks **must** be less than 80 characters since
-  they are not wrapped by the document formatters and can exceed the page width
-  in PDF documents.
+* Lines in literal blocks should be less than 80 characters
+  since they are not wrapped by the document formatters.
 
   Long literal command lines can be shown wrapped with backslashes. For
   example::
@@ -437,8 +385,8 @@ Code and Literal block sections
 * The default encoding for a literal block using the simplified ``::``
   directive is ``none``.
 
-* Lines in literal blocks must be less than 80 characters since they can exceed the page width when converted to PDF documentation.
-  For long literal lines that exceed that limit try to wrap the text at sensible locations.
+* Lines in literal blocks should be less than 80 characters.
+  For long literal lines, try to wrap the text at sensible locations.
   For example a long command line could be documented like this and still work if copied directly from the docs::
 
      ./<build_dir>/app/dpdk-testpmd -l 0-2 -n3 --vdev=net_pcap0,iface=eth0    \
@@ -503,7 +451,7 @@ Tables
 ~~~~~~
 
 * RST tables should be used sparingly.
-  They are hard to format and to edit, they are often rendered incorrectly in PDF format, and the same information
+  They are hard to format and to edit, and the same information
   can usually be shown just as clearly with a definition or bullet list.
 
 * Tables in the documentation should be formatted as follows:
@@ -533,8 +481,6 @@ Tables
 
      The QOS configuration is shown in :numref:`table_qos_pipes`.
 
-* Tables should not include merged cells since they are not supported by the PDF renderer.
-
 
 .. _links:
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.245622000 +0800
+++ 0102-doc-remove-PDF-requirements.patch	2021-06-12 06:53:56.460000000 +0800
@@ -1 +1 @@
-From 428eaeb822c229d92e287322c80eeb15e0b53351 Mon Sep 17 00:00:00 2001
+From 5d30751003cf9cff56438b0a88dfd3ac185caa74 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 428eaeb822c229d92e287322c80eeb15e0b53351 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -107 +109 @@
-index 842549a4c8..6098663896 100644
+index a4e6be6aca..1e998fd214 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'power: fix sanity checks for guest channel read' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (100 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'doc: remove PDF requirements' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'event/dpaa2: remove unused macros' " Xueming Li
                       ` (75 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Hongbo Zheng
  Cc: Luca Boccassi, Min Hu, Reshma Pattan, David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b7ab9f121d70b57465583b9c074d85fb3c6e7386

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b7ab9f121d70b57465583b9c074d85fb3c6e7386 Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3@huawei.com>
Date: Wed, 12 May 2021 10:19:19 +0800
Subject: [PATCH] power: fix sanity checks for guest channel read
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 1fe00fd358c0b5cab798010a69e758bfead9fd84 ]

In function power_guest_channel_read_msg, 'lcore_id' is used before
validity check, which may cause buffer 'global_fds' accessed by index
'lcore_id' overflow.

This patch moves the validity check of 'lcore_id' before the 'lcore_id'
being used for the first time.

Fixes: 9dc843eb273b ("power: extend guest channel API for reading")

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
 lib/librte_power/guest_channel.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/lib/librte_power/guest_channel.c b/lib/librte_power/guest_channel.c
index 2f7507a03c..474dd92998 100644
--- a/lib/librte_power/guest_channel.c
+++ b/lib/librte_power/guest_channel.c
@@ -166,6 +166,17 @@ int power_guest_channel_read_msg(void *pkt,
 	if (pkt_len == 0 || pkt == NULL)
 		return -1;
 
+	if (lcore_id >= RTE_MAX_LCORE) {
+		RTE_LOG(ERR, GUEST_CHANNEL, "Channel(%u) is out of range 0...%d\n",
+				lcore_id, RTE_MAX_LCORE-1);
+		return -1;
+	}
+
+	if (global_fds[lcore_id] < 0) {
+		RTE_LOG(ERR, GUEST_CHANNEL, "Channel is not connected\n");
+		return -1;
+	}
+
 	fds.fd = global_fds[lcore_id];
 	fds.events = POLLIN;
 
@@ -179,17 +190,6 @@ int power_guest_channel_read_msg(void *pkt,
 		return -1;
 	}
 
-	if (lcore_id >= RTE_MAX_LCORE) {
-		RTE_LOG(ERR, GUEST_CHANNEL, "Channel(%u) is out of range 0...%d\n",
-				lcore_id, RTE_MAX_LCORE-1);
-		return -1;
-	}
-
-	if (global_fds[lcore_id] < 0) {
-		RTE_LOG(ERR, GUEST_CHANNEL, "Channel is not connected\n");
-		return -1;
-	}
-
 	while (pkt_len > 0) {
 		ret = read(global_fds[lcore_id],
 				pkt, pkt_len);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.270979100 +0800
+++ 0103-power-fix-sanity-checks-for-guest-channel-read.patch	2021-06-12 06:53:56.460000000 +0800
@@ -1 +1 @@
-From 1fe00fd358c0b5cab798010a69e758bfead9fd84 Mon Sep 17 00:00:00 2001
+From b7ab9f121d70b57465583b9c074d85fb3c6e7386 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 1fe00fd358c0b5cab798010a69e758bfead9fd84 ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
- lib/power/guest_channel.c | 22 +++++++++++-----------
+ lib/librte_power/guest_channel.c | 22 +++++++++++-----------
@@ -24 +26 @@
-diff --git a/lib/power/guest_channel.c b/lib/power/guest_channel.c
+diff --git a/lib/librte_power/guest_channel.c b/lib/librte_power/guest_channel.c
@@ -26,2 +28,2 @@
---- a/lib/power/guest_channel.c
-+++ b/lib/power/guest_channel.c
+--- a/lib/librte_power/guest_channel.c
++++ b/lib/librte_power/guest_channel.c

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'event/dpaa2: remove unused macros' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (101 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'power: fix sanity checks for guest channel read' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'app/eventdev: fix lcore parsing skipping last core' " Xueming Li
                       ` (74 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: David Marchand; +Cc: Luca Boccassi, Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d4138b565da98079fc1e41d4b1c8755bb412355a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d4138b565da98079fc1e41d4b1c8755bb412355a Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 6 May 2021 10:41:54 +0200
Subject: [PATCH] event/dpaa2: remove unused macros
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 7a188872875e0d2c51d799fa5b814ef058bce3c5 ]

Fixes: 653242c3375a ("event/dpaa2: add self test")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/event/dpaa2/dpaa2_eventdev_logs.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/event/dpaa2/dpaa2_eventdev_logs.h b/drivers/event/dpaa2/dpaa2_eventdev_logs.h
index 5da85c60f0..66c8c77274 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev_logs.h
+++ b/drivers/event/dpaa2/dpaa2_eventdev_logs.h
@@ -38,7 +38,5 @@ extern int dpaa2_logtype_event;
 #define dpaa2_evdev_info(fmt, ...) DPAA2_EVENTDEV_LOG(INFO, fmt, ##__VA_ARGS__)
 #define dpaa2_evdev_dbg(fmt, ...) DPAA2_EVENTDEV_LOG(DEBUG, fmt, ##__VA_ARGS__)
 #define dpaa2_evdev_err(fmt, ...) DPAA2_EVENTDEV_LOG(ERR, fmt, ##__VA_ARGS__)
-#define dpaa2_evdev__func_trace dpaa2_evdev_dbg
-#define dpaa2_evdev_selftest dpaa2_evdev_info
 
 #endif /* _DPAA2_EVENTDEV_LOGS_H_ */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.294845300 +0800
+++ 0104-event-dpaa2-remove-unused-macros.patch	2021-06-12 06:53:56.460000000 +0800
@@ -1 +1 @@
-From 7a188872875e0d2c51d799fa5b814ef058bce3c5 Mon Sep 17 00:00:00 2001
+From d4138b565da98079fc1e41d4b1c8755bb412355a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 7a188872875e0d2c51d799fa5b814ef058bce3c5 ]
@@ -7 +9,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'app/eventdev: fix lcore parsing skipping last core' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (102 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'event/dpaa2: remove unused macros' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ice/base: fix memory allocation wrapper' " Xueming Li
                       ` (73 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Luca Boccassi, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d8351b6c9f3d569240d82ad7d5edc8ea43deba46

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d8351b6c9f3d569240d82ad7d5edc8ea43deba46 Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
Date: Fri, 7 May 2021 02:33:09 +0530
Subject: [PATCH] app/eventdev: fix lcore parsing skipping last core
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit ca90f20feaa4280cac012ebca6f2ecebd5b72b98 ]

The last lcore declared in the list is also a valid lcore in the list.

Fixes: 32d7dbf269be ("app/eventdev: fix overflow in lcore list parsing")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 app/test-eventdev/parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-eventdev/parser.c b/app/test-eventdev/parser.c
index 7a973cbb23..8818c37ff8 100644
--- a/app/test-eventdev/parser.c
+++ b/app/test-eventdev/parser.c
@@ -345,7 +345,7 @@ parse_lcores_list(bool lcores[], int lcores_num, const char *corelist)
 			max = idx;
 			if (min == RTE_MAX_LCORE)
 				min = idx;
-			for (idx = min; idx < max; idx++) {
+			for (idx = min; idx <= max; idx++) {
 				if (lcores[idx] == 1)
 					return -E2BIG;
 				lcores[idx] = 1;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.314980400 +0800
+++ 0105-app-eventdev-fix-lcore-parsing-skipping-last-core.patch	2021-06-12 06:53:56.460000000 +0800
@@ -1 +1 @@
-From ca90f20feaa4280cac012ebca6f2ecebd5b72b98 Mon Sep 17 00:00:00 2001
+From d8351b6c9f3d569240d82ad7d5edc8ea43deba46 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit ca90f20feaa4280cac012ebca6f2ecebd5b72b98 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/ice/base: fix memory allocation wrapper' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (103 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'app/eventdev: fix lcore parsing skipping last core' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/mlx5: fix RSS flow item expansion for GRE key' " Xueming Li
                       ` (72 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: David Marchand; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6db31e330446f6830e8a4dc4c29f2f13622252e1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6db31e330446f6830e8a4dc4c29f2f13622252e1 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 6 May 2021 12:07:02 +0200
Subject: [PATCH] net/ice/base: fix memory allocation wrapper
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 35f9cb006534018b6f69dce8f0d22684fe98e812 ]

This is reported by our internal covscan:

1. dpdk-20.11/drivers/net/ice/base/ice_switch.c:4214: sign_extension:
Suspicious implicit sign extension: "s_rule_size" with type "u16" (16
bits, unsigned) is promoted in "num_unicast * s_rule_size" to type "int"
(32 bits, signed), then sign-extended to type "unsigned long" (64 bits,
unsigned).
If "num_unicast * s_rule_size" is greater than 0x7FFFFFFF, the upper bits
of the result will all be 1.

 #  4212|   	s_rule_size = ICE_SW_RULE_RX_TX_ETH_HDR_SIZE;
 #  4213|   	s_rule = (struct ice_aqc_sw_rules_elem *)
 #  4214|-> 		ice_calloc(hw, num_unicast, s_rule_size);
 #  4215|   	if (!s_rule) {
 #  4216|   		status = ICE_ERR_NO_MEMORY;

Even if this condition is not likely to happen, in any case, it is more
straightforward to rely on the existing rte_calloc.

Fixes: 5f0978e96220 ("net/ice/base: add OS specific implementation")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_osdep.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_osdep.h b/drivers/net/ice/base/ice_osdep.h
index c0f1e77257..818bfa3b89 100644
--- a/drivers/net/ice/base/ice_osdep.h
+++ b/drivers/net/ice/base/ice_osdep.h
@@ -192,7 +192,7 @@ struct ice_virt_mem {
 } __rte_packed;
 
 #define ice_malloc(h, s)    rte_zmalloc(NULL, s, 0)
-#define ice_calloc(h, c, s) rte_zmalloc(NULL, (c) * (s), 0)
+#define ice_calloc(h, c, s) rte_calloc(NULL, c, s, 0)
 #define ice_free(h, m)         rte_free(m)
 
 #define ice_memset(a, b, c, d) memset((a), (b), (c))
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.334385400 +0800
+++ 0106-net-ice-base-fix-memory-allocation-wrapper.patch	2021-06-12 06:53:56.460000000 +0800
@@ -1 +1 @@
-From 35f9cb006534018b6f69dce8f0d22684fe98e812 Mon Sep 17 00:00:00 2001
+From 6db31e330446f6830e8a4dc4c29f2f13622252e1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 35f9cb006534018b6f69dce8f0d22684fe98e812 ]
@@ -26 +28,0 @@
-Cc: stable@dpdk.org
@@ -35 +37 @@
-index f4cc762e99..878c5597d4 100644
+index c0f1e77257..818bfa3b89 100644
@@ -38 +40 @@
-@@ -207,7 +207,7 @@ struct ice_virt_mem {
+@@ -192,7 +192,7 @@ struct ice_virt_mem {

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix RSS flow item expansion for GRE key' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (104 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ice/base: fix memory allocation wrapper' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/mlx5/linux: fix firmware version' " Xueming Li
                       ` (71 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Jiawei Wang; +Cc: Luca Boccassi, Xiaoyu Min, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/106f00833d1f9d36c1dca55c032c14bd5ca7c64b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 106f00833d1f9d36c1dca55c032c14bd5ca7c64b Mon Sep 17 00:00:00 2001
From: Jiawei Wang <jiaweiw@nvidia.com>
Date: Fri, 7 May 2021 12:42:12 +0300
Subject: [PATCH] net/mlx5: fix RSS flow item expansion for GRE key
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 09546d7b01927b5e31fdb51eea1f4ccc3abac5d2 ]

The support of RSS expansion for the flows with IPv6 GRE item was added
to mlx5 PMD. And the GRE KEY item support in expansion was missed
and the flows with GRE and GRE KEY items were expanded in the wrong
way causing the flow creation failure.

This patch adds the RSS expansion support for GRE KEY and mlx5 PMD
performs RSS expansion correctly.

Fixes: 048f0d45e342 ("net/mlx5: support RSS expansion for IPv6 GRE")

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 5c2712329b..d976ca9a8d 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -99,6 +99,8 @@ struct mlx5_flow_expand_node {
 	 * RSS types bit-field associated with this node
 	 * (see ETH_RSS_* definitions).
 	 */
+	uint8_t optional;
+	/**< optional expand field. Default 0 to expand, 1 not go deeper. */
 };
 
 /** Object returned by mlx5_flow_expand_rss(). */
@@ -212,7 +214,7 @@ mlx5_flow_expand_rss_item_complete(const struct rte_flow_item *item)
 	return ret;
 }
 
-#define MLX5_RSS_EXP_ELT_N 8
+#define MLX5_RSS_EXP_ELT_N 16
 
 /**
  * Expand RSS flows into several possible flows according to the RSS hash
@@ -366,7 +368,7 @@ mlx5_flow_expand_rss(struct mlx5_flow_expand_rss *buf, size_t size,
 			}
 		}
 		/* Go deeper. */
-		if (node->next) {
+		if (!node->optional && node->next) {
 			next_node = node->next;
 			if (stack_pos++ == MLX5_RSS_EXP_ELT_N) {
 				rte_errno = E2BIG;
@@ -405,6 +407,7 @@ enum mlx5_expansion {
 	MLX5_EXPANSION_VXLAN,
 	MLX5_EXPANSION_VXLAN_GPE,
 	MLX5_EXPANSION_GRE,
+	MLX5_EXPANSION_GRE_KEY,
 	MLX5_EXPANSION_MPLS,
 	MLX5_EXPANSION_ETH,
 	MLX5_EXPANSION_ETH_VLAN,
@@ -513,9 +516,16 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 	},
 	[MLX5_EXPANSION_GRE] = {
 		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,
-						  MLX5_EXPANSION_IPV6),
+						  MLX5_EXPANSION_IPV6,
+						  MLX5_EXPANSION_GRE_KEY),
 		.type = RTE_FLOW_ITEM_TYPE_GRE,
 	},
+	[MLX5_EXPANSION_GRE_KEY] = {
+		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,
+						  MLX5_EXPANSION_IPV6),
+		.type = RTE_FLOW_ITEM_TYPE_GRE_KEY,
+		.optional = 1,
+	},
 	[MLX5_EXPANSION_MPLS] = {
 		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,
 						  MLX5_EXPANSION_IPV6),
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.356416000 +0800
+++ 0107-net-mlx5-fix-RSS-flow-item-expansion-for-GRE-key.patch	2021-06-12 06:53:56.470000000 +0800
@@ -1 +1 @@
-From 09546d7b01927b5e31fdb51eea1f4ccc3abac5d2 Mon Sep 17 00:00:00 2001
+From 106f00833d1f9d36c1dca55c032c14bd5ca7c64b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 09546d7b01927b5e31fdb51eea1f4ccc3abac5d2 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 2811537226..32634c9af7 100644
+index 5c2712329b..d976ca9a8d 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/mlx5/linux: fix firmware version' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (105 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/mlx5: fix RSS flow item expansion for GRE key' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena: switch memcpy to optimized " Xueming Li
                       ` (70 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Kamil Vojanec; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/48af30a4c38ec2784868bbe23d84d2e2038bc621

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 48af30a4c38ec2784868bbe23d84d2e2038bc621 Mon Sep 17 00:00:00 2001
From: Kamil Vojanec <xvojan00@stud.fit.vutbr.cz>
Date: Fri, 5 Feb 2021 10:00:45 +0100
Subject: [PATCH] net/mlx5/linux: fix firmware version
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 520e3f4888c508dad32da1d8c5486a7be9b0fbba ]

This patch fixes a bug where firmware version was not
copied from ibv_device_attr structure into mlx5_dev_attr
structure, resulting in inability to read firmware
version.

Fixes: e85f623e13ea ("net/mlx5: remove attributes dependency on Verbs")

Signed-off-by: Kamil Vojanec <xvojan00@stud.fit.vutbr.cz>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 8ba6f03de0..22fbe30e05 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -147,6 +147,8 @@ mlx5_os_get_dev_attr(void *ctx, struct mlx5_dev_attr *device_attr)
 #ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT
 	device_attr->tunnel_offloads_caps = dv_attr.tunnel_offloads_caps;
 #endif
+	strlcpy(device_attr->fw_ver, attr_ex.orig_attr.fw_ver,
+		sizeof(device_attr->fw_ver));
 
 	return err;
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.383821500 +0800
+++ 0108-net-mlx5-linux-fix-firmware-version.patch	2021-06-12 06:53:56.470000000 +0800
@@ -1 +1 @@
-From 520e3f4888c508dad32da1d8c5486a7be9b0fbba Mon Sep 17 00:00:00 2001
+From 48af30a4c38ec2784868bbe23d84d2e2038bc621 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 520e3f4888c508dad32da1d8c5486a7be9b0fbba ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 6325607cdb..41b3e076a1 100644
+index 8ba6f03de0..22fbe30e05 100644
@@ -24 +26 @@
-@@ -154,6 +154,8 @@ mlx5_os_get_dev_attr(void *ctx, struct mlx5_dev_attr *device_attr)
+@@ -147,6 +147,8 @@ mlx5_os_get_dev_attr(void *ctx, struct mlx5_dev_attr *device_attr)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/ena: switch memcpy to optimized version' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (106 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/mlx5/linux: fix firmware version' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena/base: improve style and comments' " Xueming Li
                       ` (69 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Igor Chauskin; +Cc: Luca Boccassi, Michal Krawczyk, Artur Rojek, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/70f1f80edb6720fe3f836a84b5782a4f931f78fc

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 70f1f80edb6720fe3f836a84b5782a4f931f78fc Mon Sep 17 00:00:00 2001
From: Igor Chauskin <igorch@amazon.com>
Date: Tue, 11 May 2021 08:45:36 +0200
Subject: [PATCH] net/ena: switch memcpy to optimized version
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 142778b3702a3acbe8efe2efc17722bfc1a7393d ]

memcpy is now mapped to rte_memcpy macro on x86 architectures.

Fixes: 9ba7981ec992 ("ena: add communication layer for DPDK")

Signed-off-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Artur Rojek <ar@semihalf.com>
---
 drivers/net/ena/base/ena_plat_dpdk.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h
index a1d749f83f..ae68f860a5 100644
--- a/drivers/net/ena/base/ena_plat_dpdk.h
+++ b/drivers/net/ena/base/ena_plat_dpdk.h
@@ -25,6 +25,7 @@
 #include <rte_spinlock.h>
 
 #include <sys/time.h>
+#include <rte_memcpy.h>
 
 typedef uint64_t u64;
 typedef uint32_t u32;
@@ -62,7 +63,11 @@ typedef uint64_t dma_addr_t;
 #define ENA_UDELAY(x) rte_delay_us_block(x)
 
 #define ENA_TOUCH(x) ((void)(x))
-#define memcpy_toio memcpy
+/* Avoid nested declaration on arm64, as it may define rte_memcpy as memcpy. */
+#if defined(RTE_ARCH_X86)
+#undef memcpy
+#define memcpy rte_memcpy
+#endif
 #define wmb rte_wmb
 #define rmb rte_rmb
 #define mb rte_mb
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.406561600 +0800
+++ 0109-net-ena-switch-memcpy-to-optimized-version.patch	2021-06-12 06:53:56.470000000 +0800
@@ -1 +1 @@
-From 142778b3702a3acbe8efe2efc17722bfc1a7393d Mon Sep 17 00:00:00 2001
+From 70f1f80edb6720fe3f836a84b5782a4f931f78fc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 142778b3702a3acbe8efe2efc17722bfc1a7393d ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -15,3 +17,2 @@
- doc/guides/rel_notes/release_21_05.rst | 7 +++++++
- drivers/net/ena/base/ena_plat_dpdk.h   | 7 ++++++-
- 2 files changed, 13 insertions(+), 1 deletion(-)
+ drivers/net/ena/base/ena_plat_dpdk.h | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
@@ -19,18 +19,0 @@
-diff --git a/doc/guides/rel_notes/release_21_05.rst b/doc/guides/rel_notes/release_21_05.rst
-index 30dec1c1d1..d054b10793 100644
---- a/doc/guides/rel_notes/release_21_05.rst
-+++ b/doc/guides/rel_notes/release_21_05.rst
-@@ -111,6 +111,13 @@ New Features
- 
-   * Added conntrack item and action for stateful connection offload.
- 
-+* **Updated Amazon ENA PMD.**
-+
-+  The new driver version (v2.3.0) introduced bug fixes and improvements,
-+  including:
-+
-+  * Changed memcpy mapping to the dpdk-optimized version.
-+
- * **Updated Arkville PMD driver.**
- 
-   Updated Arkville net driver with new features and improvements, including:

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/ena/base: improve style and comments' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (107 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena: switch memcpy to optimized " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena/base: fix type conversions by explicit casting' " Xueming Li
                       ` (68 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Michal Krawczyk; +Cc: Luca Boccassi, Igor Chauskin, Guy Tzalik, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/47ed9f3e81c40bd4f54650800269ddc2b57a7acf

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 47ed9f3e81c40bd4f54650800269ddc2b57a7acf Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Tue, 11 May 2021 08:45:39 +0200
Subject: [PATCH] net/ena/base: improve style and comments
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit b19f366cc9cb91a38710813a7d0078c46e67ff55 ]

List of changes:
  * Comment style was adjusted for the functions
  * The keys_num at "struct ena_admin_feature_rss_flow_hash_control" was
    renamed to the key_parts to better describe it's meaning
  * The RSS indirection table was called "REDIRECTION" -> changed to
    INDIRECTION
  * Change AENQ field "syndrom" -> "syndrome"
  * Calculate number of the RSS key parts or whole key by using the
    common way: sizeof of the first element of the RSS key
  * Add description of the "enum ena_admin_aq_feature_id"
  * Rename "map_rx_buf_bidirectional" field as "rx_buf_mirroring"
  * Other minor style fixes (remove extra spaces, add missing line break,
    improve indentation)
  * Remove unused macros ENA_ADMIN_EXTRA_PROPERTIES_*
  * Restructure the "if {} else if {} else" conditional statement for
    setting up the meta descriptor

Fixes: 99ecfbf845b3 ("ena: import communication layer")
Fixes: b68309be44c0 ("net/ena/base: update communication layer for the ENAv2")
Fixes: b2b02edeb0d6 ("net/ena/base: upgrade HAL for new HW features")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
---
 drivers/net/ena/base/ena_com.c                | 26 +++---
 .../net/ena/base/ena_defs/ena_admin_defs.h    | 85 +++++++++----------
 drivers/net/ena/base/ena_eth_com.c            | 16 ++--
 drivers/net/ena/ena_ethdev.c                  |  4 +-
 4 files changed, 66 insertions(+), 65 deletions(-)

diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c
index aae68721fb..e137d5078b 100644
--- a/drivers/net/ena/base/ena_com.c
+++ b/drivers/net/ena/base/ena_com.c
@@ -587,7 +587,7 @@ err:
 	return ret;
 }
 
-/**
+/*
  * Set the LLQ configurations of the firmware
  *
  * The driver provides only the enabled feature values to the device,
@@ -1078,7 +1078,7 @@ static void ena_com_hash_key_fill_default_key(struct ena_com_dev *ena_dev)
 	/* The key buffer is stored in the device in an array of
 	 * uint32 elements.
 	 */
-	hash_key->keys_num = ENA_ADMIN_RSS_KEY_PARTS;
+	hash_key->key_parts = ENA_ADMIN_RSS_KEY_PARTS;
 }
 
 static int ena_com_hash_key_allocate(struct ena_com_dev *ena_dev)
@@ -1151,7 +1151,7 @@ static int ena_com_indirect_table_allocate(struct ena_com_dev *ena_dev,
 	int ret;
 
 	ret = ena_com_get_feature(ena_dev, &get_resp,
-				  ENA_ADMIN_RSS_REDIRECTION_TABLE_CONFIG, 0);
+				  ENA_ADMIN_RSS_INDIRECTION_TABLE_CONFIG, 0);
 	if (unlikely(ret))
 		return ret;
 
@@ -1961,6 +1961,7 @@ int ena_com_get_dev_attr_feat(struct ena_com_dev *ena_dev,
 
 	memcpy(&get_feat_ctx->dev_attr, &get_resp.u.dev_attr,
 	       sizeof(get_resp.u.dev_attr));
+
 	ena_dev->supported_features = get_resp.u.dev_attr.supported_features;
 
 	if (ena_dev->supported_features & BIT(ENA_ADMIN_MAX_QUEUES_EXT)) {
@@ -2028,7 +2029,7 @@ int ena_com_get_dev_attr_feat(struct ena_com_dev *ena_dev,
 		return rc;
 
 	rc = ena_com_get_feature(ena_dev, &get_resp,
-				 ENA_ADMIN_RSS_REDIRECTION_TABLE_CONFIG, 0);
+				 ENA_ADMIN_RSS_INDIRECTION_TABLE_CONFIG, 0);
 	if (!rc)
 		memcpy(&get_feat_ctx->ind_table, &get_resp.u.ind_table,
 		       sizeof(get_resp.u.ind_table));
@@ -2090,9 +2091,9 @@ void ena_com_aenq_intr_handler(struct ena_com_dev *dev, void *data)
 		timestamp = (u64)aenq_common->timestamp_low |
 			((u64)aenq_common->timestamp_high << 32);
 		ENA_TOUCH(timestamp); /* In case debug is disabled */
-		ena_trc_dbg("AENQ! Group[%x] Syndrom[%x] timestamp: [%" ENA_PRIu64 "s]\n",
+		ena_trc_dbg("AENQ! Group[%x] Syndrome[%x] timestamp: [%" ENA_PRIu64 "s]\n",
 			    aenq_common->group,
-			    aenq_common->syndrom,
+			    aenq_common->syndrome,
 			    timestamp);
 
 		/* Handle specific event*/
@@ -2394,7 +2395,7 @@ int ena_com_fill_hash_function(struct ena_com_dev *ena_dev,
 			}
 			memcpy(hash_key->key, key, key_len);
 			rss->hash_init_val = init_val;
-			hash_key->keys_num = key_len / sizeof(u32);
+			hash_key->key_parts = key_len / sizeof(hash_key->key[0]);
 		}
 		break;
 	case ENA_ADMIN_CRC32:
@@ -2449,7 +2450,8 @@ int ena_com_get_hash_key(struct ena_com_dev *ena_dev, u8 *key)
 		ena_dev->rss.hash_key;
 
 	if (key)
-		memcpy(key, hash_key->key, (size_t)(hash_key->keys_num) << 2);
+		memcpy(key, hash_key->key,
+		       (size_t)(hash_key->key_parts) * sizeof(hash_key->key[0]));
 
 	return 0;
 }
@@ -2644,9 +2646,9 @@ int ena_com_indirect_table_set(struct ena_com_dev *ena_dev)
 	int ret;
 
 	if (!ena_com_check_supported_feature_id(ena_dev,
-						ENA_ADMIN_RSS_REDIRECTION_TABLE_CONFIG)) {
+						ENA_ADMIN_RSS_INDIRECTION_TABLE_CONFIG)) {
 		ena_trc_dbg("Feature %d isn't supported\n",
-			    ENA_ADMIN_RSS_REDIRECTION_TABLE_CONFIG);
+			    ENA_ADMIN_RSS_INDIRECTION_TABLE_CONFIG);
 		return ENA_COM_UNSUPPORTED;
 	}
 
@@ -2661,7 +2663,7 @@ int ena_com_indirect_table_set(struct ena_com_dev *ena_dev)
 	cmd.aq_common_descriptor.opcode = ENA_ADMIN_SET_FEATURE;
 	cmd.aq_common_descriptor.flags =
 		ENA_ADMIN_AQ_COMMON_DESC_CTRL_DATA_INDIRECT_MASK;
-	cmd.feat_common.feature_id = ENA_ADMIN_RSS_REDIRECTION_TABLE_CONFIG;
+	cmd.feat_common.feature_id = ENA_ADMIN_RSS_INDIRECTION_TABLE_CONFIG;
 	cmd.u.ind_table.size = rss->tbl_log_size;
 	cmd.u.ind_table.inline_index = 0xFFFFFFFF;
 
@@ -2699,7 +2701,7 @@ int ena_com_indirect_table_get(struct ena_com_dev *ena_dev, u32 *ind_tbl)
 		sizeof(struct ena_admin_rss_ind_table_entry);
 
 	rc = ena_com_get_feature_ex(ena_dev, &get_resp,
-				    ENA_ADMIN_RSS_REDIRECTION_TABLE_CONFIG,
+				    ENA_ADMIN_RSS_INDIRECTION_TABLE_CONFIG,
 				    rss->rss_ind_tbl_dma_addr,
 				    tbl_size, 0);
 	if (unlikely(rc))
diff --git a/drivers/net/ena/base/ena_defs/ena_admin_defs.h b/drivers/net/ena/base/ena_defs/ena_admin_defs.h
index 30e5eead71..40c2db717c 100644
--- a/drivers/net/ena/base/ena_defs/ena_admin_defs.h
+++ b/drivers/net/ena/base/ena_defs/ena_admin_defs.h
@@ -2,13 +2,9 @@
  * Copyright (c) 2015-2020 Amazon.com, Inc. or its affiliates.
  * All rights reserved.
  */
-
 #ifndef _ENA_ADMIN_H_
 #define _ENA_ADMIN_H_
 
-#define ENA_ADMIN_EXTRA_PROPERTIES_STRING_LEN 32
-#define ENA_ADMIN_EXTRA_PROPERTIES_COUNT     32
-
 #define ENA_ADMIN_RSS_KEY_PARTS              10
 
 enum ena_admin_aq_opcode {
@@ -33,6 +29,7 @@ enum ena_admin_aq_completion_status {
 	ENA_ADMIN_RESOURCE_BUSY                     = 7,
 };
 
+/* subcommands for the set/get feature admin commands */
 enum ena_admin_aq_feature_id {
 	ENA_ADMIN_DEVICE_ATTRIBUTES                 = 1,
 	ENA_ADMIN_MAX_QUEUES_NUM                    = 2,
@@ -43,7 +40,7 @@ enum ena_admin_aq_feature_id {
 	ENA_ADMIN_MAX_QUEUES_EXT                    = 7,
 	ENA_ADMIN_RSS_HASH_FUNCTION                 = 10,
 	ENA_ADMIN_STATELESS_OFFLOAD_CONFIG          = 11,
-	ENA_ADMIN_RSS_REDIRECTION_TABLE_CONFIG      = 12,
+	ENA_ADMIN_RSS_INDIRECTION_TABLE_CONFIG      = 12,
 	ENA_ADMIN_MTU                               = 14,
 	ENA_ADMIN_RSS_HASH_INPUT                    = 18,
 	ENA_ADMIN_INTERRUPT_MODERATION              = 20,
@@ -175,7 +172,7 @@ struct ena_admin_acq_common_desc {
 	uint16_t extended_status;
 
 	/* indicates to the driver which AQ entry has been consumed by the
-	 *    device and could be reused
+	 * device and could be reused
 	 */
 	uint16_t sq_head_indx;
 };
@@ -220,8 +217,8 @@ struct ena_admin_aq_create_sq_cmd {
 	 */
 	uint8_t sq_caps_3;
 
-	/* associated completion queue id. This CQ must be created prior to
-	 *    SQ creation
+	/* associated completion queue id. This CQ must be created prior to SQ
+	 * creation
 	 */
 	uint16_t cq_idx;
 
@@ -360,7 +357,7 @@ struct ena_admin_aq_get_stats_cmd {
 	uint16_t queue_idx;
 
 	/* device id, value 0xFFFF means mine. only privileged device can get
-	 *    stats of other device
+	 * stats of other device
 	 */
 	uint16_t device_id;
 };
@@ -442,8 +439,8 @@ struct ena_admin_get_set_feature_common_desc {
 	uint8_t feature_id;
 
 	/* The driver specifies the max feature version it supports and the
-	 *    device responds with the currently supported feature version. The
-	 *    field is zero based
+	 * device responds with the currently supported feature version. The
+	 * field is zero based
 	 */
 	uint8_t feature_version;
 
@@ -455,7 +452,9 @@ struct ena_admin_device_attr_feature_desc {
 
 	uint32_t device_version;
 
-	/* bitmap of ena_admin_aq_feature_id */
+	/* bitmap of ena_admin_aq_feature_id, which represents supported
+	 * subcommands for the set/get feature admin commands.
+	 */
 	uint32_t supported_features;
 
 	uint32_t reserved3;
@@ -541,32 +540,30 @@ struct ena_admin_feature_llq_desc {
 
 	uint32_t max_llq_depth;
 
-	/*  specify the header locations the device supports. bitfield of
-	 *    enum ena_admin_llq_header_location.
+	/* specify the header locations the device supports. bitfield of enum
+	 * ena_admin_llq_header_location.
 	 */
 	uint16_t header_location_ctrl_supported;
 
 	/* the header location the driver selected to use. */
 	uint16_t header_location_ctrl_enabled;
 
-	/* if inline header is specified - this is the size of descriptor
-	 *    list entry. If header in a separate ring is specified - this is
-	 *    the size of header ring entry. bitfield of enum
-	 *    ena_admin_llq_ring_entry_size. specify the entry sizes the device
-	 *    supports
+	/* if inline header is specified - this is the size of descriptor list
+	 * entry. If header in a separate ring is specified - this is the size
+	 * of header ring entry. bitfield of enum ena_admin_llq_ring_entry_size.
+	 * specify the entry sizes the device supports
 	 */
 	uint16_t entry_size_ctrl_supported;
 
 	/* the entry size the driver selected to use. */
 	uint16_t entry_size_ctrl_enabled;
 
-	/* valid only if inline header is specified. First entry associated
-	 *    with the packet includes descriptors and header. Rest of the
-	 *    entries occupied by descriptors. This parameter defines the max
-	 *    number of descriptors precedding the header in the first entry.
-	 *    The field is bitfield of enum
-	 *    ena_admin_llq_num_descs_before_header and specify the values the
-	 *    device supports
+	/* valid only if inline header is specified. First entry associated with
+	 * the packet includes descriptors and header. Rest of the entries
+	 * occupied by descriptors. This parameter defines the max number of
+	 * descriptors precedding the header in the first entry. The field is
+	 * bitfield of enum ena_admin_llq_num_descs_before_header and specify
+	 * the values the device supports
 	 */
 	uint16_t desc_num_before_header_supported;
 
@@ -574,7 +571,7 @@ struct ena_admin_feature_llq_desc {
 	uint16_t desc_num_before_header_enabled;
 
 	/* valid only if inline was chosen. bitfield of enum
-	 *    ena_admin_llq_stride_ctrl
+	 * ena_admin_llq_stride_ctrl
 	 */
 	uint16_t descriptors_stride_ctrl_supported;
 
@@ -584,8 +581,8 @@ struct ena_admin_feature_llq_desc {
 	/* reserved */
 	uint32_t reserved1;
 
-	/* accelerated low latency queues requirement. Driver needs to
-	 * support those requirements in order to use accelerated LLQ
+	/* accelerated low latency queues requirement. driver needs to
+	 * support those requirements in order to use accelerated llq
 	 */
 	struct ena_admin_accel_mode_req accel_mode;
 };
@@ -609,8 +606,8 @@ struct ena_admin_queue_ext_feature_fields {
 
 	uint32_t max_tx_header_size;
 
-	/* Maximum Descriptors number, including meta descriptor, allowed for
-	 *    a single Tx packet
+	/* Maximum Descriptors number, including meta descriptor, allowed for a
+	 * single Tx packet
 	 */
 	uint16_t max_per_packet_tx_descs;
 
@@ -633,8 +630,8 @@ struct ena_admin_queue_feature_desc {
 
 	uint32_t max_header_size;
 
-	/* Maximum Descriptors number, including meta descriptor, allowed for
-	 *    a single Tx packet
+	/* Maximum Descriptors number, including meta descriptor, allowed for a
+	 * single Tx packet
 	 */
 	uint16_t max_packet_tx_descs;
 
@@ -730,7 +727,7 @@ enum ena_admin_hash_functions {
 };
 
 struct ena_admin_feature_rss_flow_hash_control {
-	uint32_t keys_num;
+	uint32_t key_parts;
 
 	uint32_t reserved;
 
@@ -872,7 +869,7 @@ struct ena_admin_host_info {
 	/* 0 : mutable_rss_table_size
 	 * 1 : rx_offset
 	 * 2 : interrupt_moderation
-	 * 3 : map_rx_buf_bidirectional
+	 * 3 : rx_buf_mirroring
 	 * 4 : rss_configurable_function_key
 	 * 31:5 : reserved
 	 */
@@ -956,7 +953,7 @@ struct ena_admin_queue_ext_feature_desc {
 		struct ena_admin_queue_ext_feature_fields max_queue_ext;
 
 		uint32_t raw[10];
-	} ;
+	};
 };
 
 struct ena_admin_get_feat_resp {
@@ -1039,7 +1036,7 @@ struct ena_admin_set_feat_resp {
 struct ena_admin_aenq_common_desc {
 	uint16_t group;
 
-	uint16_t syndrom;
+	uint16_t syndrome;
 
 	/* 0 : phase
 	 * 7:1 : reserved - MBZ
@@ -1063,7 +1060,7 @@ enum ena_admin_aenq_group {
 	ENA_ADMIN_AENQ_GROUPS_NUM                   = 5,
 };
 
-enum ena_admin_aenq_notification_syndrom {
+enum ena_admin_aenq_notification_syndrome {
 	ENA_ADMIN_SUSPEND                           = 0,
 	ENA_ADMIN_RESUME                            = 1,
 	ENA_ADMIN_UPDATE_HINTS                      = 2,
@@ -1197,8 +1194,8 @@ struct ena_admin_ena_mmio_req_read_less_resp {
 #define ENA_ADMIN_HOST_INFO_RX_OFFSET_MASK                  BIT(1)
 #define ENA_ADMIN_HOST_INFO_INTERRUPT_MODERATION_SHIFT      2
 #define ENA_ADMIN_HOST_INFO_INTERRUPT_MODERATION_MASK       BIT(2)
-#define ENA_ADMIN_HOST_INFO_MAP_RX_BUF_BIDIRECTIONAL_SHIFT  3
-#define ENA_ADMIN_HOST_INFO_MAP_RX_BUF_BIDIRECTIONAL_MASK   BIT(3)
+#define ENA_ADMIN_HOST_INFO_RX_BUF_MIRRORING_SHIFT          3
+#define ENA_ADMIN_HOST_INFO_RX_BUF_MIRRORING_MASK           BIT(3)
 #define ENA_ADMIN_HOST_INFO_RSS_CONFIGURABLE_FUNCTION_KEY_SHIFT 4
 #define ENA_ADMIN_HOST_INFO_RSS_CONFIGURABLE_FUNCTION_KEY_MASK BIT(4)
 
@@ -1652,14 +1649,14 @@ static inline void set_ena_admin_host_info_interrupt_moderation(struct ena_admin
 	p->driver_supported_features |= (val << ENA_ADMIN_HOST_INFO_INTERRUPT_MODERATION_SHIFT) & ENA_ADMIN_HOST_INFO_INTERRUPT_MODERATION_MASK;
 }
 
-static inline uint32_t get_ena_admin_host_info_map_rx_buf_bidirectional(const struct ena_admin_host_info *p)
+static inline uint32_t get_ena_admin_host_info_rx_buf_mirroring(const struct ena_admin_host_info *p)
 {
-	return (p->driver_supported_features & ENA_ADMIN_HOST_INFO_MAP_RX_BUF_BIDIRECTIONAL_MASK) >> ENA_ADMIN_HOST_INFO_MAP_RX_BUF_BIDIRECTIONAL_SHIFT;
+	return (p->driver_supported_features & ENA_ADMIN_HOST_INFO_RX_BUF_MIRRORING_MASK) >> ENA_ADMIN_HOST_INFO_RX_BUF_MIRRORING_SHIFT;
 }
 
-static inline void set_ena_admin_host_info_map_rx_buf_bidirectional(struct ena_admin_host_info *p, uint32_t val)
+static inline void set_ena_admin_host_info_rx_buf_mirroring(struct ena_admin_host_info *p, uint32_t val)
 {
-	p->driver_supported_features |= (val << ENA_ADMIN_HOST_INFO_MAP_RX_BUF_BIDIRECTIONAL_SHIFT) & ENA_ADMIN_HOST_INFO_MAP_RX_BUF_BIDIRECTIONAL_MASK;
+	p->driver_supported_features |= (val << ENA_ADMIN_HOST_INFO_RX_BUF_MIRRORING_SHIFT) & ENA_ADMIN_HOST_INFO_RX_BUF_MIRRORING_MASK;
 }
 
 static inline uint32_t get_ena_admin_host_info_rss_configurable_function_key(const struct ena_admin_host_info *p)
diff --git a/drivers/net/ena/base/ena_eth_com.c b/drivers/net/ena/base/ena_eth_com.c
index 5583a310a1..042dc1c20e 100644
--- a/drivers/net/ena/base/ena_eth_com.c
+++ b/drivers/net/ena/base/ena_eth_com.c
@@ -323,16 +323,18 @@ static int ena_com_create_and_store_tx_meta_desc(struct ena_com_io_sq *io_sq,
 
 		*have_meta = true;
 		return ena_com_create_meta(io_sq, ena_meta);
-	} else if (ena_com_meta_desc_changed(io_sq, ena_tx_ctx)) {
+	}
+
+	if (ena_com_meta_desc_changed(io_sq, ena_tx_ctx)) {
 		*have_meta = true;
 		/* Cache the meta desc */
 		memcpy(&io_sq->cached_tx_meta, ena_meta,
 		       sizeof(struct ena_com_tx_meta));
 		return ena_com_create_meta(io_sq, ena_meta);
-	} else {
-		*have_meta = false;
-		return ENA_COM_OK;
 	}
+
+	*have_meta = false;
+	return ENA_COM_OK;
 }
 
 static void ena_com_rx_set_flags(struct ena_com_rx_ctx *ena_rx_ctx,
@@ -604,9 +606,9 @@ int ena_com_add_single_rx_desc(struct ena_com_io_sq *io_sq,
 	desc->length = ena_buf->len;
 
 	desc->ctrl = ENA_ETH_IO_RX_DESC_FIRST_MASK |
-		ENA_ETH_IO_RX_DESC_LAST_MASK |
-		(io_sq->phase & ENA_ETH_IO_RX_DESC_PHASE_MASK) |
-		ENA_ETH_IO_RX_DESC_COMP_REQ_MASK;
+		     ENA_ETH_IO_RX_DESC_LAST_MASK |
+		     ENA_ETH_IO_RX_DESC_COMP_REQ_MASK |
+		     (io_sq->phase & ENA_ETH_IO_RX_DESC_PHASE_MASK);
 
 	desc->req_id = req_id;
 
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 1b34c2aefa..6327b882b6 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -2973,7 +2973,7 @@ static void ena_notification(void *data,
 			aenq_e->aenq_common_desc.group,
 			ENA_ADMIN_NOTIFICATION);
 
-	switch (aenq_e->aenq_common_desc.syndrom) {
+	switch (aenq_e->aenq_common_desc.syndrome) {
 	case ENA_ADMIN_UPDATE_HINTS:
 		hints = (struct ena_admin_ena_hw_hints *)
 			(&aenq_e->inline_data_w4);
@@ -2981,7 +2981,7 @@ static void ena_notification(void *data,
 		break;
 	default:
 		PMD_DRV_LOG(ERR, "Invalid aenq notification link state %d\n",
-			aenq_e->aenq_common_desc.syndrom);
+			aenq_e->aenq_common_desc.syndrome);
 	}
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.429726400 +0800
+++ 0110-net-ena-base-improve-style-and-comments.patch	2021-06-12 06:53:56.480000000 +0800
@@ -1 +1 @@
-From b19f366cc9cb91a38710813a7d0078c46e67ff55 Mon Sep 17 00:00:00 2001
+From 47ed9f3e81c40bd4f54650800269ddc2b57a7acf Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit b19f366cc9cb91a38710813a7d0078c46e67ff55 ]
@@ -26 +28,0 @@
-Cc: stable@dpdk.org
@@ -39 +41 @@
-index 9931819bbb..9dc9f280c4 100644
+index aae68721fb..e137d5078b 100644
@@ -42 +44 @@
-@@ -598,7 +598,7 @@ err:
+@@ -587,7 +587,7 @@ err:
@@ -51 +53 @@
-@@ -1092,7 +1092,7 @@ static void ena_com_hash_key_fill_default_key(struct ena_com_dev *ena_dev)
+@@ -1078,7 +1078,7 @@ static void ena_com_hash_key_fill_default_key(struct ena_com_dev *ena_dev)
@@ -60 +62 @@
-@@ -1165,7 +1165,7 @@ static int ena_com_indirect_table_allocate(struct ena_com_dev *ena_dev,
+@@ -1151,7 +1151,7 @@ static int ena_com_indirect_table_allocate(struct ena_com_dev *ena_dev,
@@ -69 +71 @@
-@@ -1977,6 +1977,7 @@ int ena_com_get_dev_attr_feat(struct ena_com_dev *ena_dev,
+@@ -1961,6 +1961,7 @@ int ena_com_get_dev_attr_feat(struct ena_com_dev *ena_dev,
@@ -77 +79 @@
-@@ -2044,7 +2045,7 @@ int ena_com_get_dev_attr_feat(struct ena_com_dev *ena_dev,
+@@ -2028,7 +2029,7 @@ int ena_com_get_dev_attr_feat(struct ena_com_dev *ena_dev,
@@ -86 +88 @@
-@@ -2106,9 +2107,9 @@ void ena_com_aenq_intr_handler(struct ena_com_dev *ena_dev, void *data)
+@@ -2090,9 +2091,9 @@ void ena_com_aenq_intr_handler(struct ena_com_dev *dev, void *data)
@@ -90,2 +92,2 @@
--		ena_trc_dbg(ena_dev, "AENQ! Group[%x] Syndrom[%x] timestamp: [%" ENA_PRIu64 "s]\n",
-+		ena_trc_dbg(ena_dev, "AENQ! Group[%x] Syndrome[%x] timestamp: [%" ENA_PRIu64 "s]\n",
+-		ena_trc_dbg("AENQ! Group[%x] Syndrom[%x] timestamp: [%" ENA_PRIu64 "s]\n",
++		ena_trc_dbg("AENQ! Group[%x] Syndrome[%x] timestamp: [%" ENA_PRIu64 "s]\n",
@@ -98 +100 @@
-@@ -2410,7 +2411,7 @@ int ena_com_fill_hash_function(struct ena_com_dev *ena_dev,
+@@ -2394,7 +2395,7 @@ int ena_com_fill_hash_function(struct ena_com_dev *ena_dev,
@@ -107 +109 @@
-@@ -2465,7 +2466,8 @@ int ena_com_get_hash_key(struct ena_com_dev *ena_dev, u8 *key)
+@@ -2449,7 +2450,8 @@ int ena_com_get_hash_key(struct ena_com_dev *ena_dev, u8 *key)
@@ -117 +119 @@
-@@ -2660,9 +2662,9 @@ int ena_com_indirect_table_set(struct ena_com_dev *ena_dev)
+@@ -2644,9 +2646,9 @@ int ena_com_indirect_table_set(struct ena_com_dev *ena_dev)
@@ -123 +125 @@
- 		ena_trc_dbg(ena_dev, "Feature %d isn't supported\n",
+ 		ena_trc_dbg("Feature %d isn't supported\n",
@@ -129 +131 @@
-@@ -2677,7 +2679,7 @@ int ena_com_indirect_table_set(struct ena_com_dev *ena_dev)
+@@ -2661,7 +2663,7 @@ int ena_com_indirect_table_set(struct ena_com_dev *ena_dev)
@@ -138 +140 @@
-@@ -2715,7 +2717,7 @@ int ena_com_indirect_table_get(struct ena_com_dev *ena_dev, u32 *ind_tbl)
+@@ -2699,7 +2701,7 @@ int ena_com_indirect_table_get(struct ena_com_dev *ena_dev, u32 *ind_tbl)
@@ -396 +398 @@
-index 701e6721e3..92a9a10a9e 100644
+index 5583a310a1..042dc1c20e 100644
@@ -399 +401 @@
-@@ -331,16 +331,18 @@ static int ena_com_create_and_store_tx_meta_desc(struct ena_com_io_sq *io_sq,
+@@ -323,16 +323,18 @@ static int ena_com_create_and_store_tx_meta_desc(struct ena_com_io_sq *io_sq,
@@ -421,2 +423,2 @@
- static void ena_com_rx_set_flags(struct ena_com_io_cq *io_cq,
-@@ -626,9 +628,9 @@ int ena_com_add_single_rx_desc(struct ena_com_io_sq *io_sq,
+ static void ena_com_rx_set_flags(struct ena_com_rx_ctx *ena_rx_ctx,
+@@ -604,9 +606,9 @@ int ena_com_add_single_rx_desc(struct ena_com_io_sq *io_sq,
@@ -436 +438 @@
-index f21a026b50..60c06a2132 100644
+index 1b34c2aefa..6327b882b6 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/ena/base: fix type conversions by explicit casting' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (108 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena/base: improve style and comments' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena/base: destroy multiple wait events' " Xueming Li
                       ` (67 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Michal Krawczyk; +Cc: Luca Boccassi, Igor Chauskin, Guy Tzalik, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/74cc4f7d974f623aa90ef6d1b71e80284792bb0e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 74cc4f7d974f623aa90ef6d1b71e80284792bb0e Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Tue, 11 May 2021 08:45:40 +0200
Subject: [PATCH] net/ena/base: fix type conversions by explicit casting
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 83e8d5378d3f2eef749d47bb1145c29cc797a277 ]

To silence error messages from the static code analysis, make the type
conversions explicit where they're intended.

Also fix the type for the DMA width value.

Fixes: 99ecfbf845b3 ("ena: import communication layer")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Guy Tzalik <gtzalik@amazon.com>
---
 drivers/net/ena/base/ena_com.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c
index e137d5078b..ae69b63602 100644
--- a/drivers/net/ena/base/ena_com.c
+++ b/drivers/net/ena/base/ena_com.c
@@ -1366,7 +1366,7 @@ int ena_com_execute_admin_command(struct ena_com_admin_queue *admin_queue,
 			ena_trc_err("Failed to submit command [%ld]\n",
 				    PTR_ERR(comp_ctx));
 
-		return PTR_ERR(comp_ctx);
+		return (int)PTR_ERR(comp_ctx);
 	}
 
 	ret = ena_com_wait_and_process_admin_cq(comp_ctx, admin_queue);
@@ -1586,7 +1586,7 @@ int ena_com_set_aenq_config(struct ena_com_dev *ena_dev, u32 groups_flag)
 int ena_com_get_dma_width(struct ena_com_dev *ena_dev)
 {
 	u32 caps = ena_com_reg_bar_read32(ena_dev, ENA_REGS_CAPS_OFF);
-	int width;
+	u32 width;
 
 	if (unlikely(caps == ENA_MMIO_READ_TIMEOUT)) {
 		ena_trc_err("Reg read timeout occurred\n");
@@ -2264,7 +2264,7 @@ int ena_com_set_dev_mtu(struct ena_com_dev *ena_dev, int mtu)
 	cmd.aq_common_descriptor.opcode = ENA_ADMIN_SET_FEATURE;
 	cmd.aq_common_descriptor.flags = 0;
 	cmd.feat_common.feature_id = ENA_ADMIN_MTU;
-	cmd.u.mtu.mtu = mtu;
+	cmd.u.mtu.mtu = (u32)mtu;
 
 	ret = ena_com_execute_admin_command(admin_queue,
 					    (struct ena_admin_aq_entry *)&cmd,
@@ -2675,7 +2675,7 @@ int ena_com_indirect_table_set(struct ena_com_dev *ena_dev)
 		return ret;
 	}
 
-	cmd.control_buffer.length = (1ULL << rss->tbl_log_size) *
+	cmd.control_buffer.length = (u32)(1ULL << rss->tbl_log_size) *
 		sizeof(struct ena_admin_rss_ind_table_entry);
 
 	ret = ena_com_execute_admin_command(admin_queue,
@@ -2697,7 +2697,7 @@ int ena_com_indirect_table_get(struct ena_com_dev *ena_dev, u32 *ind_tbl)
 	u32 tbl_size;
 	int i, rc;
 
-	tbl_size = (1ULL << rss->tbl_log_size) *
+	tbl_size = (u32)(1ULL << rss->tbl_log_size) *
 		sizeof(struct ena_admin_rss_ind_table_entry);
 
 	rc = ena_com_get_feature_ex(ena_dev, &get_resp,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.454597300 +0800
+++ 0111-net-ena-base-fix-type-conversions-by-explicit-castin.patch	2021-06-12 06:53:56.490000000 +0800
@@ -1 +1 @@
-From 83e8d5378d3f2eef749d47bb1145c29cc797a277 Mon Sep 17 00:00:00 2001
+From 74cc4f7d974f623aa90ef6d1b71e80284792bb0e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 83e8d5378d3f2eef749d47bb1145c29cc797a277 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 9dc9f280c4..0cdeb1a2d9 100644
+index e137d5078b..ae69b63602 100644
@@ -25,2 +27,2 @@
-@@ -1382,7 +1382,7 @@ int ena_com_execute_admin_command(struct ena_com_admin_queue *admin_queue,
- 				    "Failed to submit command [%ld]\n",
+@@ -1366,7 +1366,7 @@ int ena_com_execute_admin_command(struct ena_com_admin_queue *admin_queue,
+ 			ena_trc_err("Failed to submit command [%ld]\n",
@@ -34 +36 @@
-@@ -1602,7 +1602,7 @@ int ena_com_set_aenq_config(struct ena_com_dev *ena_dev, u32 groups_flag)
+@@ -1586,7 +1586,7 @@ int ena_com_set_aenq_config(struct ena_com_dev *ena_dev, u32 groups_flag)
@@ -42,2 +44,2 @@
- 		ena_trc_err(ena_dev, "Reg read timeout occurred\n");
-@@ -2280,7 +2280,7 @@ int ena_com_set_dev_mtu(struct ena_com_dev *ena_dev, int mtu)
+ 		ena_trc_err("Reg read timeout occurred\n");
+@@ -2264,7 +2264,7 @@ int ena_com_set_dev_mtu(struct ena_com_dev *ena_dev, int mtu)
@@ -52 +54 @@
-@@ -2691,7 +2691,7 @@ int ena_com_indirect_table_set(struct ena_com_dev *ena_dev)
+@@ -2675,7 +2675,7 @@ int ena_com_indirect_table_set(struct ena_com_dev *ena_dev)
@@ -61 +63 @@
-@@ -2713,7 +2713,7 @@ int ena_com_indirect_table_get(struct ena_com_dev *ena_dev, u32 *ind_tbl)
+@@ -2697,7 +2697,7 @@ int ena_com_indirect_table_get(struct ena_com_dev *ena_dev, u32 *ind_tbl)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/ena/base: destroy multiple wait events' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (109 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena/base: fix type conversions by explicit casting' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena: fix parsing of large LLQ header device argument' " Xueming Li
                       ` (66 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Michal Krawczyk; +Cc: Luca Boccassi, Igor Chauskin, Guy Tzalik, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1c44277b56335adce9b697b0635533cd13ed3cc5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1c44277b56335adce9b697b0635533cd13ed3cc5 Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Tue, 11 May 2021 08:45:41 +0200
Subject: [PATCH] net/ena/base: destroy multiple wait events
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 04a6a3e63a1ebde2161caffb8f034fb30afce72c ]

Although the ENA DPDK PMD doesn't have to perform any actions for
destroying the wait event, some other platforms have to.

The macro "ENA_WAIT_EVENT_DESTROY" was renamed to
"ENA_WAIT_EVENTS_DESTROY" and also whole implementation responsible for
that was moved to a separate function for better readability.

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>
---
 drivers/net/ena/base/ena_com.c       | 24 +++++++++++++++++-------
 drivers/net/ena/base/ena_plat_dpdk.h |  2 +-
 2 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c
index ae69b63602..00dea4bfc7 100644
--- a/drivers/net/ena/base/ena_com.c
+++ b/drivers/net/ena/base/ena_com.c
@@ -1655,6 +1655,22 @@ int ena_com_validate_version(struct ena_com_dev *ena_dev)
 	return 0;
 }
 
+static void
+ena_com_free_ena_admin_queue_comp_ctx(struct ena_com_dev *ena_dev,
+				      struct ena_com_admin_queue *admin_queue)
+
+{
+	if (!admin_queue->comp_ctx)
+		return;
+
+	ENA_WAIT_EVENTS_DESTROY(admin_queue);
+	ENA_MEM_FREE(ena_dev->dmadev,
+		     admin_queue->comp_ctx,
+		     (admin_queue->q_depth * sizeof(struct ena_comp_ctx)));
+
+	admin_queue->comp_ctx = NULL;
+}
+
 void ena_com_admin_destroy(struct ena_com_dev *ena_dev)
 {
 	struct ena_com_admin_queue *admin_queue = &ena_dev->admin_queue;
@@ -1663,14 +1679,8 @@ void ena_com_admin_destroy(struct ena_com_dev *ena_dev)
 	struct ena_com_aenq *aenq = &ena_dev->aenq;
 	u16 size;
 
-	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_com_free_ena_admin_queue_comp_ctx(ena_dev, admin_queue);
 
-	admin_queue->comp_ctx = NULL;
 	size = ADMIN_SQ_SIZE(admin_queue->q_depth);
 	if (sq->entries)
 		ENA_MEM_FREE_COHERENT(ena_dev->dmadev, size, sq->entries,
diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h
index ae68f860a5..bd8ebad9a7 100644
--- a/drivers/net/ena/base/ena_plat_dpdk.h
+++ b/drivers/net/ena/base/ena_plat_dpdk.h
@@ -294,7 +294,7 @@ extern rte_atomic32_t ena_alloc_cnt;
 #define ENA_TIME_EXPIRE(timeout)  (timeout < rte_get_timer_cycles())
 #define ENA_GET_SYSTEM_TIMEOUT(timeout_us)				\
     (timeout_us * rte_get_timer_hz() / 1000000 + rte_get_timer_cycles())
-#define ENA_WAIT_EVENT_DESTROY(waitqueue) ((void)(waitqueue))
+#define ENA_WAIT_EVENTS_DESTROY(admin_queue) ((void)(admin_queue))
 
 #ifndef READ_ONCE
 #define READ_ONCE(var) (*((volatile typeof(var) *)(&(var))))
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.479196500 +0800
+++ 0112-net-ena-base-destroy-multiple-wait-events.patch	2021-06-12 06:53:56.490000000 +0800
@@ -1 +1 @@
-From 04a6a3e63a1ebde2161caffb8f034fb30afce72c Mon Sep 17 00:00:00 2001
+From 1c44277b56335adce9b697b0635533cd13ed3cc5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 04a6a3e63a1ebde2161caffb8f034fb30afce72c ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 0cdeb1a2d9..d025c9cee1 100644
+index ae69b63602..00dea4bfc7 100644
@@ -28 +30 @@
-@@ -1671,6 +1671,22 @@ int ena_com_validate_version(struct ena_com_dev *ena_dev)
+@@ -1655,6 +1655,22 @@ int ena_com_validate_version(struct ena_com_dev *ena_dev)
@@ -51 +53 @@
-@@ -1679,14 +1695,8 @@ void ena_com_admin_destroy(struct ena_com_dev *ena_dev)
+@@ -1663,14 +1679,8 @@ void ena_com_admin_destroy(struct ena_com_dev *ena_dev)
@@ -68 +70 @@
-index df2fdd30f6..ddf54f0ad5 100644
+index ae68f860a5..bd8ebad9a7 100644
@@ -71 +73 @@
-@@ -299,7 +299,7 @@ extern rte_atomic32_t ena_alloc_cnt;
+@@ -294,7 +294,7 @@ extern rte_atomic32_t ena_alloc_cnt;

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/ena: fix parsing of large LLQ header device argument' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (110 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena/base: destroy multiple wait events' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena: fix crash with unsupported " Xueming Li
                       ` (65 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Igor Chauskin; +Cc: Luca Boccassi, Shay Agroskin, Michal Krawczyk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a5c0cca39ad6d6c78476734f4ae4f92640783e9d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a5c0cca39ad6d6c78476734f4ae4f92640783e9d Mon Sep 17 00:00:00 2001
From: Igor Chauskin <igorch@amazon.com>
Date: Tue, 11 May 2021 08:45:46 +0200
Subject: [PATCH] net/ena: fix parsing of large LLQ header device argument
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 9b312ad310024d00822cbc431677b59daa1e5e2c ]

The code incorrectly checked the return value of comparison when parsing
the argument key name. The return value of strcmp should be compared
to 0 to identify a match.

Fixes: 8a7a73f26cc9 ("net/ena: support large LLQ headers")

Signed-off-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shay Agroskin <shayagr@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
---
 drivers/net/ena/ena_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 6327b882b6..e7547af144 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -2865,7 +2865,7 @@ static int ena_process_bool_devarg(const char *key,
 	}
 
 	/* Now, assign it to the proper adapter field. */
-	if (strcmp(key, ENA_DEVARG_LARGE_LLQ_HDR))
+	if (strcmp(key, ENA_DEVARG_LARGE_LLQ_HDR) == 0)
 		adapter->use_large_llq_hdr = bool_value;
 
 	return 0;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.500944100 +0800
+++ 0113-net-ena-fix-parsing-of-large-LLQ-header-device-argum.patch	2021-06-12 06:53:56.490000000 +0800
@@ -1 +1 @@
-From 9b312ad310024d00822cbc431677b59daa1e5e2c Mon Sep 17 00:00:00 2001
+From a5c0cca39ad6d6c78476734f4ae4f92640783e9d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 9b312ad310024d00822cbc431677b59daa1e5e2c ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 5b073658d1..53647cc56e 100644
+index 6327b882b6..e7547af144 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/ena: fix crash with unsupported device argument' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (111 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena: fix parsing of large LLQ header device argument' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena: remove endian swap functions' " Xueming Li
                       ` (64 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Michal Krawczyk
  Cc: Luca Boccassi, Igor Chauskin, Shay Agroskin, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/967dcfb168c8e8d79df4e5855b27cd66b68cc0f2

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 967dcfb168c8e8d79df4e5855b27cd66b68cc0f2 Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Tue, 11 May 2021 08:45:47 +0200
Subject: [PATCH] net/ena: fix crash with unsupported device argument
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 9f220a959d4d7208491efea8ca8e0c4a96b98f0e ]

As the documentation of rte_kvargs_parse() states, the valid_keys
argument must be NULL terminated. Lack of this feature may cause
segmentation fault if the passed devarg will be different then the
supported value.

Fixes: 8a7a73f26cc9 ("net/ena: support large LLQ headers")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shay Agroskin <shayagr@amazon.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/ena/ena_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index e7547af144..46ef021072 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -2876,6 +2876,7 @@ static int ena_parse_devargs(struct ena_adapter *adapter,
 {
 	static const char * const allowed_args[] = {
 		ENA_DEVARG_LARGE_LLQ_HDR,
+		NULL,
 	};
 	struct rte_kvargs *kvlist;
 	int rc;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.523900000 +0800
+++ 0114-net-ena-fix-crash-with-unsupported-device-argument.patch	2021-06-12 06:53:56.500000000 +0800
@@ -1 +1 @@
-From 9f220a959d4d7208491efea8ca8e0c4a96b98f0e Mon Sep 17 00:00:00 2001
+From 967dcfb168c8e8d79df4e5855b27cd66b68cc0f2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 9f220a959d4d7208491efea8ca8e0c4a96b98f0e ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 53647cc56e..9721a70cf8 100644
+index e7547af144..46ef021072 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/ena: remove endian swap functions' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (112 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena: fix crash with unsupported " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena: report default ring size' " Xueming Li
                       ` (63 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Stanislaw Kardach
  Cc: Luca Boccassi, Michal Krawczyk, Igor Chauskin, Shay Agroskin,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4a79d25bd19541c2188b08d204b53f64f765ff5e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4a79d25bd19541c2188b08d204b53f64f765ff5e Mon Sep 17 00:00:00 2001
From: Stanislaw Kardach <kda@semihalf.com>
Date: Tue, 11 May 2021 08:45:49 +0200
Subject: [PATCH] net/ena: remove endian swap functions
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 07ebd5dd9800bdcac018d9a89010c75051ab6484 ]

swap*_*_le() functions are not used anywhere and besides there are rte
alternatives already present.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")

Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shay Agroskin <shayagr@amazon.com>
---
 drivers/net/ena/ena_platform.h | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/net/ena/ena_platform.h b/drivers/net/ena/ena_platform.h
index d3e40e0e9e..748928b2d9 100644
--- a/drivers/net/ena/ena_platform.h
+++ b/drivers/net/ena/ena_platform.h
@@ -6,18 +6,6 @@
 #ifndef __ENA_PLATFORM_H__
 #define __ENA_PLATFORM_H__
 
-#define swap16_to_le(x)		(x)
-
-#define swap32_to_le(x)		(x)
-
-#define swap64_to_le(x)		(x)
-
-#define swap16_from_le(x)       (x)
-
-#define swap32_from_le(x)	(x)
-
-#define swap64_from_le(x)	(x)
-
 #define ena_assert_msg(cond, msg)		\
 	do {					\
 		if (unlikely(!(cond))) {	\
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.547068800 +0800
+++ 0115-net-ena-remove-endian-swap-functions.patch	2021-06-12 06:53:56.500000000 +0800
@@ -1 +1 @@
-From 07ebd5dd9800bdcac018d9a89010c75051ab6484 Mon Sep 17 00:00:00 2001
+From 4a79d25bd19541c2188b08d204b53f64f765ff5e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 07ebd5dd9800bdcac018d9a89010c75051ab6484 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/ena: report default ring size' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (113 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena: remove endian swap functions' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/nfp: fix reporting of RSS capabilities' " Xueming Li
                       ` (62 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Stanislaw Kardach
  Cc: Luca Boccassi, Michal Krawczyk, Igor Chauskin, Shay Agroskin,
	dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c9000c686e2021d23d60ae649ebcb50490e0202b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c9000c686e2021d23d60ae649ebcb50490e0202b Mon Sep 17 00:00:00 2001
From: Stanislaw Kardach <kda@semihalf.com>
Date: Tue, 11 May 2021 08:45:53 +0200
Subject: [PATCH] net/ena: report default ring size
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 30a6c7ef4054e1f4fcc6bd68606c5991c324f08c ]

Remove invalid ring size alignment logic and add default Rx and Tx port
ring sizes to the device info spec.

The logic in lines 1297 and 1371 is invalid. The
RTE_ETH_DEV_FALLBACK_RX_RINGSIZE (and the TX counterpart) is a value
that rte_eth_rx_queue_setup() will set if
dev_info.default_rxportconf.ring_size is 0 and user provided 0 in
nb_rx_desc argument. However the current code treats it as a hint for
the PMD to change the ring size to internal defaults.

Additionally since the ENA_DEFAULT_RING_SIZE is defined, report it in
the device capabilities so that both rte_ethdev code and the user can
utilize it for device configuration.

Fixes: ea93d37eb49d ("net/ena: add HW queues depth setup")

Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Shay Agroskin <shayagr@amazon.com>
---
 drivers/net/ena/ena_ethdev.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 46ef021072..aa497ba985 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1275,9 +1275,6 @@ static int ena_tx_queue_setup(struct rte_eth_dev *dev,
 		return -EINVAL;
 	}
 
-	if (nb_desc == RTE_ETH_DEV_FALLBACK_TX_RINGSIZE)
-		nb_desc = adapter->max_tx_ring_size;
-
 	txq->port_id = dev->data->port_id;
 	txq->next_to_clean = 0;
 	txq->next_to_use = 0;
@@ -1349,9 +1346,6 @@ static int ena_rx_queue_setup(struct rte_eth_dev *dev,
 		return ENA_COM_FAULT;
 	}
 
-	if (nb_desc == RTE_ETH_DEV_FALLBACK_RX_RINGSIZE)
-		nb_desc = adapter->max_rx_ring_size;
-
 	if (!rte_is_power_of_2(nb_desc)) {
 		PMD_DRV_LOG(ERR,
 			"Unsupported size of RX queue: %d is not a power of 2.\n",
@@ -2068,6 +2062,9 @@ static int ena_infos_get(struct rte_eth_dev *dev,
 	dev_info->tx_desc_lim.nb_mtu_seg_max = RTE_MIN(ENA_PKT_MAX_BUFS,
 					adapter->max_tx_sgl_size);
 
+	dev_info->default_rxportconf.ring_size = ENA_DEFAULT_RING_SIZE;
+	dev_info->default_txportconf.ring_size = ENA_DEFAULT_RING_SIZE;
+
 	return 0;
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.568922200 +0800
+++ 0116-net-ena-report-default-ring-size.patch	2021-06-12 06:53:56.500000000 +0800
@@ -1 +1 @@
-From 30a6c7ef4054e1f4fcc6bd68606c5991c324f08c Mon Sep 17 00:00:00 2001
+From c9000c686e2021d23d60ae649ebcb50490e0202b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 30a6c7ef4054e1f4fcc6bd68606c5991c324f08c ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org
@@ -32 +34 @@
-index 9721a70cf8..1099ae8efa 100644
+index 46ef021072..aa497ba985 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/nfp: fix reporting of RSS capabilities' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (114 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena: report default ring size' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: return error on PCI config write failure' " Xueming Li
                       ` (61 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Heinrich Kuhn; +Cc: Luca Boccassi, Simon Horman, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/3387f2c95ffae452e29b60bc0845edf55f27236d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 3387f2c95ffae452e29b60bc0845edf55f27236d Mon Sep 17 00:00:00 2001
From: Heinrich Kuhn <heinrich.kuhn@netronome.com>
Date: Mon, 10 May 2021 18:45:50 +0200
Subject: [PATCH] net/nfp: fix reporting of RSS capabilities
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit b75fc6b19057a7c5385c12a3c9353f2d5e27de20 ]

Before this change the dev_infos callback always reported RSS
capabilities regardless of whether the capability is supported by the
device or not. First check the capabilities field in the BAR of the
device and advertise RSS functionality accordingly.

Fixes: 8b945a7f7dcb ("drivers/net: update Rx RSS hash offload capabilities")

Signed-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
---
 drivers/net/nfp/nfp_net.c | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 9ea24e5bda..91c6678c71 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1220,9 +1220,6 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 					     DEV_RX_OFFLOAD_UDP_CKSUM |
 					     DEV_RX_OFFLOAD_TCP_CKSUM;
 
-	dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_JUMBO_FRAME |
-				     DEV_RX_OFFLOAD_RSS_HASH;
-
 	if (hw->cap & NFP_NET_CFG_CTRL_TXVLAN)
 		dev_info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT;
 
@@ -1271,15 +1268,22 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		.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 |
-					   ETH_RSS_IPV6 |
-					   ETH_RSS_NONFRAG_IPV6_TCP |
-					   ETH_RSS_NONFRAG_IPV6_UDP;
+	/* All NFP devices support jumbo frames */
+	dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_JUMBO_FRAME;
+
+	if (hw->cap & NFP_NET_CFG_CTRL_RSS) {
+		dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_RSS_HASH;
 
-	dev_info->reta_size = NFP_NET_CFG_RSS_ITBL_SZ;
-	dev_info->hash_key_size = NFP_NET_CFG_RSS_KEY_SZ;
+		dev_info->flow_type_rss_offloads = ETH_RSS_IPV4 |
+						   ETH_RSS_NONFRAG_IPV4_TCP |
+						   ETH_RSS_NONFRAG_IPV4_UDP |
+						   ETH_RSS_IPV6 |
+						   ETH_RSS_NONFRAG_IPV6_TCP |
+						   ETH_RSS_NONFRAG_IPV6_UDP;
+
+		dev_info->reta_size = NFP_NET_CFG_RSS_ITBL_SZ;
+		dev_info->hash_key_size = NFP_NET_CFG_RSS_KEY_SZ;
+	}
 
 	dev_info->speed_capa = ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G |
 			       ETH_LINK_SPEED_25G | ETH_LINK_SPEED_40G |
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.594435700 +0800
+++ 0117-net-nfp-fix-reporting-of-RSS-capabilities.patch	2021-06-12 06:53:56.510000000 +0800
@@ -1 +1 @@
-From b75fc6b19057a7c5385c12a3c9353f2d5e27de20 Mon Sep 17 00:00:00 2001
+From 3387f2c95ffae452e29b60bc0845edf55f27236d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit b75fc6b19057a7c5385c12a3c9353f2d5e27de20 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index ad2c2b55f6..90206a1685 100644
+index 9ea24e5bda..91c6678c71 100644
@@ -24 +26 @@
-@@ -1257,9 +1257,6 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -1220,9 +1220,6 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -34 +36 @@
-@@ -1308,15 +1305,22 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -1271,15 +1268,22 @@ nfp_net_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: return error on PCI config write failure' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (115 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/nfp: fix reporting of RSS capabilities' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fix log on flow director clear' " Xueming Li
                       ` (60 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9e15a154c5a5de90d23d99be9a13d8cf769dffef

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9e15a154c5a5de90d23d99be9a13d8cf769dffef Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 7 May 2021 17:08:14 +0800
Subject: [PATCH] net/hns3: return error on PCI config write failure
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit d9fb708a000d4935af253ad93f917ed7a8be208e ]

This patch returns error code when calling rte_pci_write_config() API.

Fixes: 6dd32ded17d8 ("net/hns3: check PCI config space write")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 7f83e85203..235beea14d 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -153,9 +153,12 @@ hns3vf_enable_msix(const struct rte_pci_device *device, bool op)
 		if (ret < 0) {
 			PMD_INIT_LOG(ERR, "failed to write PCI offset 0x%x",
 				    (pos + PCI_MSIX_FLAGS));
+			return -ENXIO;
 		}
+
 		return 0;
 	}
+
 	return -ENXIO;
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.620033200 +0800
+++ 0118-net-hns3-return-error-on-PCI-config-write-failure.patch	2021-06-12 06:53:56.510000000 +0800
@@ -1 +1 @@
-From d9fb708a000d4935af253ad93f917ed7a8be208e Mon Sep 17 00:00:00 2001
+From 9e15a154c5a5de90d23d99be9a13d8cf769dffef Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit d9fb708a000d4935af253ad93f917ed7a8be208e ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +20 @@
-index 6aa8a9b6ed..71f3f95877 100644
+index 7f83e85203..235beea14d 100644
@@ -21 +23 @@
-@@ -156,9 +156,12 @@ hns3vf_enable_msix(const struct rte_pci_device *device, bool op)
+@@ -153,9 +153,12 @@ hns3vf_enable_msix(const struct rte_pci_device *device, bool op)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix log on flow director clear' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (116 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: return error on PCI config write failure' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: clear hash map " Xueming Li
                       ` (59 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8f93ec62881375eb5ec45696d44cee34f3d161fc

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8f93ec62881375eb5ec45696d44cee34f3d161fc Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 7 May 2021 17:08:15 +0800
Subject: [PATCH] net/hns3: fix log on flow director clear
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit f4e5c18ffa2656d253bc334171854e60463afbbb ]

If clear FDIR rules fail, the error code was logged, but the error code
was useless because it was the sum of all fail code.

This patch fixes it by log the success cnt and fail cnt.

Fixes: fcba820d9b9e ("net/hns3: support flow director")
Fixes: 8eed8acc812e ("net/hns3: add error code to some logs")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_fdir.c | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
index 3810c6fcd1..ab7db1189d 100644
--- a/drivers/net/hns3/hns3_fdir.c
+++ b/drivers/net/hns3/hns3_fdir.c
@@ -1013,6 +1013,8 @@ int hns3_clear_all_fdir_filter(struct hns3_adapter *hns)
 	struct hns3_fdir_info *fdir_info = &pf->fdir;
 	struct hns3_fdir_rule_ele *fdir_filter;
 	struct hns3_hw *hw = &hns->hw;
+	int succ_cnt = 0;
+	int fail_cnt = 0;
 	int ret = 0;
 
 	/* flush flow director */
@@ -1021,17 +1023,23 @@ int hns3_clear_all_fdir_filter(struct hns3_adapter *hns)
 	fdir_filter = TAILQ_FIRST(&fdir_info->fdir_list);
 	while (fdir_filter) {
 		TAILQ_REMOVE(&fdir_info->fdir_list, fdir_filter, entries);
-		ret += hns3_fd_tcam_config(hw, true,
-					   fdir_filter->fdir_conf.location,
-					   NULL, false);
+		ret = hns3_fd_tcam_config(hw, true,
+					  fdir_filter->fdir_conf.location,
+					  NULL, false);
+		if (ret == 0)
+			succ_cnt++;
+		else
+			fail_cnt++;
 		rte_free(fdir_filter);
 		fdir_filter = TAILQ_FIRST(&fdir_info->fdir_list);
 	}
 
-	if (ret) {
-		hns3_err(hw, "Fail to delete FDIR filter, ret = %d", ret);
+	if (fail_cnt > 0) {
+		hns3_err(hw, "fail to delete all FDIR filter, success num = %d "
+			 "fail num = %d", succ_cnt, fail_cnt);
 		ret = -EIO;
 	}
+
 	return ret;
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.647938800 +0800
+++ 0119-net-hns3-fix-log-on-flow-director-clear.patch	2021-06-12 06:53:56.510000000 +0800
@@ -1 +1 @@
-From f4e5c18ffa2656d253bc334171854e60463afbbb Mon Sep 17 00:00:00 2001
+From 8f93ec62881375eb5ec45696d44cee34f3d161fc Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit f4e5c18ffa2656d253bc334171854e60463afbbb ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index 0ef0938ea2..e116d872fb 100644
+index 3810c6fcd1..ab7db1189d 100644
@@ -25 +27 @@
-@@ -1026,6 +1026,8 @@ int hns3_clear_all_fdir_filter(struct hns3_adapter *hns)
+@@ -1013,6 +1013,8 @@ int hns3_clear_all_fdir_filter(struct hns3_adapter *hns)
@@ -34 +36 @@
-@@ -1034,17 +1036,23 @@ int hns3_clear_all_fdir_filter(struct hns3_adapter *hns)
+@@ -1021,17 +1023,23 @@ int hns3_clear_all_fdir_filter(struct hns3_adapter *hns)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: clear hash map on flow director clear' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (117 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fix log on flow director clear' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fix VF alive notification after config restore' " Xueming Li
                       ` (58 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6ed898b2971caa51fe2542911e301f57550f7e95

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6ed898b2971caa51fe2542911e301f57550f7e95 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 7 May 2021 17:08:16 +0800
Subject: [PATCH] net/hns3: clear hash map on flow director clear
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 7d01f89fa6a149157f77ef11a2b5ebec890d7db8 ]

The fdir hash map hold the pointers of fdir rule elements, it needs to
be set to NULL when clear all fdir rules.

Fixes: fcba820d9b9e ("net/hns3: support flow director")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_fdir.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
index ab7db1189d..693d9c731a 100644
--- a/drivers/net/hns3/hns3_fdir.c
+++ b/drivers/net/hns3/hns3_fdir.c
@@ -1020,6 +1020,10 @@ int hns3_clear_all_fdir_filter(struct hns3_adapter *hns)
 	/* flush flow director */
 	rte_hash_reset(fdir_info->hash_handle);
 
+	memset(fdir_info->hash_map, 0,
+	       sizeof(struct hns3_fdir_rule_ele *) *
+	       fdir_info->fd_cfg.rule_num[HNS3_FD_STAGE_1]);
+
 	fdir_filter = TAILQ_FIRST(&fdir_info->fdir_list);
 	while (fdir_filter) {
 		TAILQ_REMOVE(&fdir_info->fdir_list, fdir_filter, entries);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.673472800 +0800
+++ 0120-net-hns3-clear-hash-map-on-flow-director-clear.patch	2021-06-12 06:53:56.510000000 +0800
@@ -1 +1 @@
-From 7d01f89fa6a149157f77ef11a2b5ebec890d7db8 Mon Sep 17 00:00:00 2001
+From 6ed898b2971caa51fe2542911e301f57550f7e95 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 7d01f89fa6a149157f77ef11a2b5ebec890d7db8 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index e116d872fb..d043f5786d 100644
+index ab7db1189d..693d9c731a 100644
@@ -22 +24 @@
-@@ -1033,6 +1033,10 @@ int hns3_clear_all_fdir_filter(struct hns3_adapter *hns)
+@@ -1020,6 +1020,10 @@ int hns3_clear_all_fdir_filter(struct hns3_adapter *hns)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix VF alive notification after config restore' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (118 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: clear hash map " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fix querying flow director counter for out param' " Xueming Li
                       ` (57 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Hongbo Zheng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8e72b7a2eef263261b09d36dd750a78a4e7cc09f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8e72b7a2eef263261b09d36dd750a78a4e7cc09f Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3@huawei.com>
Date: Fri, 7 May 2021 17:08:17 +0800
Subject: [PATCH] net/hns3: fix VF alive notification after config restore
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 9c552087dc81d95a0bdbfef1be796a0c9656acee ]

Currently in the VF reset scenario, the VF performs the set
alive operation before restoring the configuration completed,
which may cause the hardware to work in an abnormal state.

This patch fix this problem by set VF alive after restoring
the configuration is completed.

Fixes: a5475d61fa34 ("net/hns3: support VF")

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 235beea14d..d18313c330 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1759,12 +1759,6 @@ hns3vf_init_hardware(struct hns3_adapter *hns)
 		goto err_init_hardware;
 	}
 
-	ret = hns3vf_set_alive(hw, true);
-	if (ret) {
-		PMD_INIT_LOG(ERR, "Failed to VF send alive to PF: %d", ret);
-		goto err_init_hardware;
-	}
-
 	return 0;
 
 err_init_hardware:
@@ -1856,6 +1850,12 @@ hns3vf_init_vf(struct rte_eth_dev *eth_dev)
 
 	hns3_set_default_rss_args(hw);
 
+	ret = hns3vf_set_alive(hw, true);
+	if (ret) {
+		PMD_INIT_LOG(ERR, "Failed to VF send alive to PF: %d", ret);
+		goto err_set_tc_queue;
+	}
+
 	return 0;
 
 err_set_tc_queue:
@@ -2559,6 +2559,13 @@ hns3vf_restore_conf(struct hns3_adapter *hns)
 		hns3_info(hw, "hns3vf dev restart successful!");
 	} else if (hw->adapter_state == HNS3_NIC_STOPPING)
 		hw->adapter_state = HNS3_NIC_CONFIGURED;
+
+	ret = hns3vf_set_alive(hw, true);
+	if (ret) {
+		hns3_err(hw, "failed to VF send alive to PF: %d", ret);
+		goto err_vlan_table;
+	}
+
 	return 0;
 
 err_vlan_table:
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.697821400 +0800
+++ 0121-net-hns3-fix-VF-alive-notification-after-config-rest.patch	2021-06-12 06:53:56.520000000 +0800
@@ -1 +1 @@
-From 9c552087dc81d95a0bdbfef1be796a0c9656acee Mon Sep 17 00:00:00 2001
+From 8e72b7a2eef263261b09d36dd750a78a4e7cc09f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 9c552087dc81d95a0bdbfef1be796a0c9656acee ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 71f3f95877..536ed463ef 100644
+index 235beea14d..d18313c330 100644
@@ -26 +28 @@
-@@ -1891,12 +1891,6 @@ hns3vf_init_hardware(struct hns3_adapter *hns)
+@@ -1759,12 +1759,6 @@ hns3vf_init_hardware(struct hns3_adapter *hns)
@@ -39 +41 @@
-@@ -1995,6 +1989,12 @@ hns3vf_init_vf(struct rte_eth_dev *eth_dev)
+@@ -1856,6 +1850,12 @@ hns3vf_init_vf(struct rte_eth_dev *eth_dev)
@@ -41 +43 @@
- 	hns3_rss_set_default_args(hw);
+ 	hns3_set_default_rss_args(hw);
@@ -52 +54 @@
-@@ -2706,6 +2706,13 @@ hns3vf_restore_conf(struct hns3_adapter *hns)
+@@ -2559,6 +2559,13 @@ hns3vf_restore_conf(struct hns3_adapter *hns)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix querying flow director counter for out param' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (119 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fix VF alive notification after config restore' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/txgbe: fix QinQ strip' " Xueming Li
                       ` (56 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/33f33e3e7c46650c878389cf9300cd980b9ef17d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 33f33e3e7c46650c878389cf9300cd980b9ef17d Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Fri, 7 May 2021 17:08:18 +0800
Subject: [PATCH] net/hns3: fix querying flow director counter for out param
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 7ab816640c923f6e91beddcc196b1cad81cda524 ]

The hardware doesn't support counting the number of bytes that through
the fdir rule. Therefore, the corresponding out parameters (e.g.
bytes_set/bytes) is set to zero.

Fixes: fcba820d9b9e ("net/hns3: support flow director")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_flow.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c
index 9087268712..40e40bd88b 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -223,6 +223,8 @@ hns3_counter_query(struct rte_eth_dev *dev, struct rte_flow *flow,
 	}
 	qc->hits_set = 1;
 	qc->hits = value;
+	qc->bytes_set = 0;
+	qc->bytes = 0;
 
 	return 0;
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.720690400 +0800
+++ 0122-net-hns3-fix-querying-flow-director-counter-for-out-.patch	2021-06-12 06:53:56.520000000 +0800
@@ -1 +1 @@
-From 7ab816640c923f6e91beddcc196b1cad81cda524 Mon Sep 17 00:00:00 2001
+From 33f33e3e7c46650c878389cf9300cd980b9ef17d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 7ab816640c923f6e91beddcc196b1cad81cda524 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 65c7f6ed88..82810e00e8 100644
+index 9087268712..40e40bd88b 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/txgbe: fix QinQ strip' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (120 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fix querying flow director counter for out param' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fix TM QCN error event report by MSI-X' " Xueming Li
                       ` (55 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Jiawen Wu; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/ec14e372203b24f7077c43cf664841b36fc30ec5

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From ec14e372203b24f7077c43cf664841b36fc30ec5 Mon Sep 17 00:00:00 2001
From: Jiawen Wu <jiawenwu@trustnetic.com>
Date: Sat, 8 May 2021 14:35:26 +0800
Subject: [PATCH] net/txgbe: fix QinQ strip
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 15f0573e9254763c3680bfbfa4bfab8599e5ab84 ]

Support to enable and disable QINQ hardware strip, when configure VLAN
offload with QINQ strip mask. If there are packets have QINQ tag to RSS,
users should enable QINQ strip before configuring the RSS.

Fixes: 220b0e49bc47 ("net/txgbe: support VLAN")

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.c | 39 +++++++++++++++++++++++++++-----
 1 file changed, 33 insertions(+), 6 deletions(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 2e539ca02e..d9cc7d236a 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -977,7 +977,6 @@ txgbe_vlan_hw_extend_disable(struct rte_eth_dev *dev)
 
 	ctrl = rd32(hw, TXGBE_PORTCTL);
 	ctrl &= ~TXGBE_PORTCTL_VLANEXT;
-	ctrl &= ~TXGBE_PORTCTL_QINQ;
 	wr32(hw, TXGBE_PORTCTL, ctrl);
 }
 
@@ -985,17 +984,38 @@ static void
 txgbe_vlan_hw_extend_enable(struct rte_eth_dev *dev)
 {
 	struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
-	struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode;
-	struct rte_eth_txmode *txmode = &dev->data->dev_conf.txmode;
 	uint32_t ctrl;
 
 	PMD_INIT_FUNC_TRACE();
 
 	ctrl  = rd32(hw, TXGBE_PORTCTL);
 	ctrl |= TXGBE_PORTCTL_VLANEXT;
-	if (rxmode->offloads & DEV_RX_OFFLOAD_QINQ_STRIP ||
-	    txmode->offloads & DEV_TX_OFFLOAD_QINQ_INSERT)
-		ctrl |= TXGBE_PORTCTL_QINQ;
+	wr32(hw, TXGBE_PORTCTL, ctrl);
+}
+
+static void
+txgbe_qinq_hw_strip_disable(struct rte_eth_dev *dev)
+{
+	struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
+	uint32_t ctrl;
+
+	PMD_INIT_FUNC_TRACE();
+
+	ctrl = rd32(hw, TXGBE_PORTCTL);
+	ctrl &= ~TXGBE_PORTCTL_QINQ;
+	wr32(hw, TXGBE_PORTCTL, ctrl);
+}
+
+static void
+txgbe_qinq_hw_strip_enable(struct rte_eth_dev *dev)
+{
+	struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
+	uint32_t ctrl;
+
+	PMD_INIT_FUNC_TRACE();
+
+	ctrl  = rd32(hw, TXGBE_PORTCTL);
+	ctrl |= TXGBE_PORTCTL_QINQ | TXGBE_PORTCTL_VLANEXT;
 	wr32(hw, TXGBE_PORTCTL, ctrl);
 }
 
@@ -1062,6 +1082,13 @@ txgbe_vlan_offload_config(struct rte_eth_dev *dev, int mask)
 			txgbe_vlan_hw_extend_disable(dev);
 	}
 
+	if (mask & ETH_QINQ_STRIP_MASK) {
+		if (rxmode->offloads & DEV_RX_OFFLOAD_QINQ_STRIP)
+			txgbe_qinq_hw_strip_enable(dev);
+		else
+			txgbe_qinq_hw_strip_disable(dev);
+	}
+
 	return 0;
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.743893100 +0800
+++ 0123-net-txgbe-fix-QinQ-strip.patch	2021-06-12 06:53:56.520000000 +0800
@@ -1 +1 @@
-From 15f0573e9254763c3680bfbfa4bfab8599e5ab84 Mon Sep 17 00:00:00 2001
+From ec14e372203b24f7077c43cf664841b36fc30ec5 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 15f0573e9254763c3680bfbfa4bfab8599e5ab84 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 46d6f541b5..e62675520a 100644
+index 2e539ca02e..d9cc7d236a 100644
@@ -22 +24 @@
-@@ -1186,7 +1186,6 @@ txgbe_vlan_hw_extend_disable(struct rte_eth_dev *dev)
+@@ -977,7 +977,6 @@ txgbe_vlan_hw_extend_disable(struct rte_eth_dev *dev)
@@ -30 +32 @@
-@@ -1194,17 +1193,38 @@ static void
+@@ -985,17 +984,38 @@ static void
@@ -74 +76 @@
-@@ -1271,6 +1291,13 @@ txgbe_vlan_offload_config(struct rte_eth_dev *dev, int mask)
+@@ -1062,6 +1082,13 @@ txgbe_vlan_offload_config(struct rte_eth_dev *dev, int mask)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix TM QCN error event report by MSI-X' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (121 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/txgbe: fix QinQ strip' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fix mailbox message ID in log' " Xueming Li
                       ` (54 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/5244852443b92ff078d87665109c8452e4aa1e22

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 5244852443b92ff078d87665109c8452e4aa1e22 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Sat, 8 May 2021 15:40:57 +0800
Subject: [PATCH] net/hns3: fix TM QCN error event report by MSI-X
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit ffb62592f80faf70fa3627c3de34e137883333cf ]

The TM QCN error event should report by RAS other than MSIX.

Also this patch adds fifo int enable configuration before the TM QCN
error event is enabled.

Fixes: f53a793bb7c2 ("net/hns3: add more hardware error types")
Fixes: 3903c05382c5 ("net/hns3: remove read when enabling TM QCN error event")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_intr.c | 5 ++++-
 drivers/net/hns3/hns3_intr.h | 2 ++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c
index b133670be0..99b5301689 100644
--- a/drivers/net/hns3/hns3_intr.c
+++ b/drivers/net/hns3/hns3_intr.c
@@ -1346,8 +1346,11 @@ enable_tm_err_intr(struct hns3_adapter *hns, bool en)
 
 	/* configure TM QCN hw errors */
 	hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_TM_QCN_MEM_INT_CFG, false);
-	if (en)
+	desc.data[0] = rte_cpu_to_le_32(HNS3_TM_QCN_ERR_INT_TYPE);
+	if (en) {
+		desc.data[0] |= rte_cpu_to_le_32(HNS3_TM_QCN_FIFO_INT_EN);
 		desc.data[1] = rte_cpu_to_le_32(HNS3_TM_QCN_MEM_ERR_INT_EN);
+	}
 
 	ret = hns3_cmd_send(hw, &desc, 1);
 	if (ret)
diff --git a/drivers/net/hns3/hns3_intr.h b/drivers/net/hns3/hns3_intr.h
index d87d3ce1d7..17bd0519c4 100644
--- a/drivers/net/hns3/hns3_intr.h
+++ b/drivers/net/hns3/hns3_intr.h
@@ -74,6 +74,8 @@
 #define HNS3_NCSI_ERR_INT_EN			0x3
 
 #define HNS3_TM_SCH_ECC_ERR_INT_EN		0x3
+#define HNS3_TM_QCN_ERR_INT_TYPE		0x29
+#define HNS3_TM_QCN_FIFO_INT_EN			0xFFFF00
 #define HNS3_TM_QCN_MEM_ERR_INT_EN		0xFFFFFF
 
 #define HNS3_RESET_PROCESS_MS			200
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.769008700 +0800
+++ 0124-net-hns3-fix-TM-QCN-error-event-report-by-MSI-X.patch	2021-06-12 06:53:56.530000000 +0800
@@ -1 +1 @@
-From ffb62592f80faf70fa3627c3de34e137883333cf Mon Sep 17 00:00:00 2001
+From 5244852443b92ff078d87665109c8452e4aa1e22 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit ffb62592f80faf70fa3627c3de34e137883333cf ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 905c6d9513..6bdb17f622 100644
+index b133670be0..99b5301689 100644
@@ -26 +28 @@
-@@ -1783,8 +1783,11 @@ enable_tm_err_intr(struct hns3_adapter *hns, bool en)
+@@ -1346,8 +1346,11 @@ enable_tm_err_intr(struct hns3_adapter *hns, bool en)
@@ -40 +42 @@
-index 8bee8d77af..1a0f196614 100644
+index d87d3ce1d7..17bd0519c4 100644
@@ -43 +45 @@
-@@ -77,6 +77,8 @@
+@@ -74,6 +74,8 @@

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix mailbox message ID in log' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (122 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fix TM QCN error event report by MSI-X' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fix secondary process request start/stop Rx/Tx' " Xueming Li
                       ` (53 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a795428a299f7c5e28149071973ec524152e819a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a795428a299f7c5e28149071973ec524152e819a Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Mon, 10 May 2021 21:38:10 +0800
Subject: [PATCH] net/hns3: fix mailbox message ID in log
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 34a9a44a3288506316d51b8f0b5a74b81a5db9ec ]

The mailbox message id is uint8_t, but the unsupported mailbox message
id was logged by uint16.

Fixes: 463e748964f5 ("net/hns3: support mailbox")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_mbx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
index 6f0a216d11..f8d83c313d 100644
--- a/drivers/net/hns3/hns3_mbx.c
+++ b/drivers/net/hns3/hns3_mbx.c
@@ -551,7 +551,7 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
 			break;
 		default:
 			hns3_err(hw, "received unsupported(%u) mbx msg",
-				 req->msg[0]);
+				 opcode);
 			break;
 		}
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.792791000 +0800
+++ 0125-net-hns3-fix-mailbox-message-ID-in-log.patch	2021-06-12 06:53:56.530000000 +0800
@@ -1 +1 @@
-From 34a9a44a3288506316d51b8f0b5a74b81a5db9ec Mon Sep 17 00:00:00 2001
+From a795428a299f7c5e28149071973ec524152e819a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 34a9a44a3288506316d51b8f0b5a74b81a5db9ec ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index 31ab130aae..f36cb10d08 100644
+index 6f0a216d11..f8d83c313d 100644
@@ -22 +24 @@
-@@ -540,7 +540,7 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
+@@ -551,7 +551,7 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix secondary process request start/stop Rx/Tx' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (123 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fix mailbox message ID in log' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fix ordering in secondary process initialization' " Xueming Li
                       ` (52 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/edd8521ace0ee77e997238125257c03a2e05ffd1

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From edd8521ace0ee77e997238125257c03a2e05ffd1 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Mon, 10 May 2021 21:38:11 +0800
Subject: [PATCH] net/hns3: fix secondary process request start/stop Rx/Tx
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit db6a165adc460810555f56aa2a3ebf8284c4de62 ]

This secondary process should not send request to start/stop Rx/Tx,
this patch fixes it.

Fixes: 23d4b61fee5d ("net/hns3: support multiple process")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_mp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_mp.c b/drivers/net/hns3/hns3_mp.c
index 568ddc2a3c..77c1a100ce 100644
--- a/drivers/net/hns3/hns3_mp.c
+++ b/drivers/net/hns3/hns3_mp.c
@@ -130,7 +130,7 @@ mp_req_on_rxtx(struct rte_eth_dev *dev, enum hns3_mp_req_type type)
 	int ret;
 	int i;
 
-	if (!hw->secondary_cnt)
+	if (rte_eal_process_type() == RTE_PROC_SECONDARY || !hw->secondary_cnt)
 		return;
 	if (type != HNS3_MP_REQ_START_RXTX && type != HNS3_MP_REQ_STOP_RXTX) {
 		hns3_err(hw, "port %u unknown request (req_type %d)",
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.815332200 +0800
+++ 0126-net-hns3-fix-secondary-process-request-start-stop-Rx.patch	2021-06-12 06:53:56.530000000 +0800
@@ -1 +1 @@
-From db6a165adc460810555f56aa2a3ebf8284c4de62 Mon Sep 17 00:00:00 2001
+From edd8521ace0ee77e997238125257c03a2e05ffd1 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit db6a165adc460810555f56aa2a3ebf8284c4de62 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index ac0b5a0235..cab784f42a 100644
+index 568ddc2a3c..77c1a100ce 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix ordering in secondary process initialization' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (124 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fix secondary process request start/stop Rx/Tx' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fail setting FEC if one bit mode is not supported' " Xueming Li
                       ` (51 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a6c272ac76cdebcd0d96e990a05158e805b22c18

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a6c272ac76cdebcd0d96e990a05158e805b22c18 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Mon, 10 May 2021 21:38:12 +0800
Subject: [PATCH] net/hns3: fix ordering in secondary process initialization
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit ac8962e96599b713b3e87d22be602a2d9d951321 ]

The memory barrier is used to ensure that the response is returned
only after the Tx/Rx function is set, it should place after the Rx/Tx
function is set.

Fixes: 23d4b61fee5d ("net/hns3: support multiple process")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_mp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_mp.c b/drivers/net/hns3/hns3_mp.c
index 77c1a100ce..2a7654d272 100644
--- a/drivers/net/hns3/hns3_mp.c
+++ b/drivers/net/hns3/hns3_mp.c
@@ -86,8 +86,8 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
 	case HNS3_MP_REQ_START_RXTX:
 		PMD_INIT_LOG(INFO, "port %u starting datapath",
 			     dev->data->port_id);
-		rte_mb();
 		hns3_set_rxtx_function(dev);
+		rte_mb();
 		mp_init_msg(dev, &mp_res, param->type);
 		res->result = 0;
 		ret = rte_mp_reply(&mp_res, peer);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.836537500 +0800
+++ 0127-net-hns3-fix-ordering-in-secondary-process-initializ.patch	2021-06-12 06:53:56.530000000 +0800
@@ -1 +1 @@
-From ac8962e96599b713b3e87d22be602a2d9d951321 Mon Sep 17 00:00:00 2001
+From a6c272ac76cdebcd0d96e990a05158e805b22c18 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit ac8962e96599b713b3e87d22be602a2d9d951321 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index cab784f42a..a8485f5cfd 100644
+index 77c1a100ce..2a7654d272 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: fail setting FEC if one bit mode is not supported' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (125 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fix ordering in secondary process initialization' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'app/testpmd: fix tunnel offload flows cleanup' " Xueming Li
                       ` (50 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/98f23aad5647198c35f83767641f24fbc39b861d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 98f23aad5647198c35f83767641f24fbc39b861d Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Mon, 10 May 2021 21:38:13 +0800
Subject: [PATCH] net/hns3: fail setting FEC if one bit mode is not supported
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit ab8c5005853ac4f77b645396ce681fb6ea2bb5e9 ]

If the FEC mode was not supported, it should return error code.

This patch also adds a space when log error info.

Fixes: 9bf2ea8dbc65 ("net/hns3: support FEC")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 498e1a40f3..5716e399c9 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -6121,9 +6121,11 @@ hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)
 		return ret;
 
 	/* HNS3 PMD driver only support one bit set mode, e.g. 0x1, 0x4 */
-	if (!is_fec_mode_one_bit_set(mode))
-		hns3_err(hw, "FEC mode(0x%x) not supported in HNS3 PMD,"
+	if (!is_fec_mode_one_bit_set(mode)) {
+		hns3_err(hw, "FEC mode(0x%x) not supported in HNS3 PMD, "
 			     "FEC mode should be only one bit set", mode);
+		return -EINVAL;
+	}
 
 	/*
 	 * Check whether the configured mode is within the FEC capability.
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.859901800 +0800
+++ 0128-net-hns3-fail-setting-FEC-if-one-bit-mode-is-not-sup.patch	2021-06-12 06:53:56.540000000 +0800
@@ -1 +1 @@
-From ab8c5005853ac4f77b645396ce681fb6ea2bb5e9 Mon Sep 17 00:00:00 2001
+From 98f23aad5647198c35f83767641f24fbc39b861d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit ab8c5005853ac4f77b645396ce681fb6ea2bb5e9 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index b8e97355e9..0589e3f10a 100644
+index 498e1a40f3..5716e399c9 100644
@@ -23 +25 @@
-@@ -6991,9 +6991,11 @@ hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)
+@@ -6121,9 +6121,11 @@ hns3_fec_set(struct rte_eth_dev *dev, uint32_t mode)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'app/testpmd: fix tunnel offload flows cleanup' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (126 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fail setting FEC if one bit mode is not supported' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ice: fix leak on thread termination' " Xueming Li
                       ` (49 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/18151dfdcb4ed88b44d7c21244442dad671b8d36

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 18151dfdcb4ed88b44d7c21244442dad671b8d36 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Tue, 11 May 2021 11:03:31 +0300
Subject: [PATCH] app/testpmd: fix tunnel offload flows cleanup
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 99fc79b37af5652f30ab3c9725fd6a98494d14dc ]

Tunnel offload model requires application to obtain PMD related flow
items or actions to construct a flow rule. These elements acquire
internal PMD flow resources that must be explicitly released.

The patch destroys tunnel offload PMD resources after flow creation
failure.

Fixes: 1b9f274623b8 ("app/testpmd: add commands for tunnel offload")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 app/test-pmd/config.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 25c2340d74..937a90f3cd 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2115,6 +2115,9 @@ port_flow_create(portid_t port_id,
 	memset(&error, 0x22, sizeof(error));
 	flow = rte_flow_create(port_id, attr, pattern, actions, &error);
 	if (!flow) {
+		if (tunnel_ops->enabled)
+			port_flow_tunnel_offload_cmd_release(port_id,
+							     tunnel_ops, pft);
 		free(pf);
 		return port_flow_complain(&error);
 	}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.884103700 +0800
+++ 0129-app-testpmd-fix-tunnel-offload-flows-cleanup.patch	2021-06-12 06:53:56.540000000 +0800
@@ -1 +1 @@
-From 99fc79b37af5652f30ab3c9725fd6a98494d14dc Mon Sep 17 00:00:00 2001
+From 18151dfdcb4ed88b44d7c21244442dad671b8d36 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 99fc79b37af5652f30ab3c9725fd6a98494d14dc ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index 01a541cdd6..43c79b5021 100644
+index 25c2340d74..937a90f3cd 100644
@@ -26 +28 @@
-@@ -1940,6 +1940,9 @@ port_flow_create(portid_t port_id,
+@@ -2115,6 +2115,9 @@ port_flow_create(portid_t port_id,

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/ice: fix leak on thread termination' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (127 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'app/testpmd: fix tunnel offload flows cleanup' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/enic: enable GENEVE offload via VNIC configuration' " Xueming Li
                       ` (48 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: David Marchand; +Cc: Luca Boccassi, Haiyue Wang, Dmitry Kozlyuk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/1cf7b4c7692ab2a8eaf455654a9bd46eab606b90

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 1cf7b4c7692ab2a8eaf455654a9bd46eab606b90 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 11 May 2021 13:33:58 +0200
Subject: [PATCH] net/ice: fix leak on thread termination
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 8eff201b0021a5821cd71149a43805501f9373c1 ]

A terminated pthread should be joined or detached so that its associated
resources are released.

The "ice-reset-<vf_id>" threads are used to service some reset task in
the background, but they are never joined by the thread that created
them.
The easiest solution is to detach new threads.

The Windows EAL did not provide a pthread_detach wrapper but there is no
resource to release for Windows threads, so add an empty wrapper.

Fixes: 3b3757bda3c3 ("net/ice: get VF hardware index in DCF")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 drivers/net/ice/ice_dcf_parent.c         | 2 ++
 lib/librte_eal/windows/include/pthread.h | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c
index 30ead4c9fd..b109e360f9 100644
--- a/drivers/net/ice/ice_dcf_parent.c
+++ b/drivers/net/ice/ice_dcf_parent.c
@@ -112,8 +112,10 @@ ice_dcf_vsi_update_service_handler(void *param)
 {
 	struct ice_dcf_hw *hw = param;
 
+	pthread_detach(pthread_self());
 	usleep(ICE_DCF_VSI_UPDATE_SERVICE_INTERVAL);
 
+
 	rte_spinlock_lock(&vsi_update_lock);
 
 	if (!ice_dcf_handle_vsi_update_event(hw)) {
diff --git a/lib/librte_eal/windows/include/pthread.h b/lib/librte_eal/windows/include/pthread.h
index 1939b0121c..27fd2cca52 100644
--- a/lib/librte_eal/windows/include/pthread.h
+++ b/lib/librte_eal/windows/include/pthread.h
@@ -143,6 +143,12 @@ pthread_create(void *threadid, const void *threadattr, void *threadfunc,
 	return ((hThread != NULL) ? 0 : E_FAIL);
 }
 
+static inline int
+pthread_detach(__rte_unused pthread_t thread)
+{
+	return 0;
+}
+
 static inline int
 pthread_join(__rte_unused pthread_t thread,
 	__rte_unused void **value_ptr)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.907392900 +0800
+++ 0130-net-ice-fix-leak-on-thread-termination.patch	2021-06-12 06:53:56.540000000 +0800
@@ -1 +1 @@
-From 8eff201b0021a5821cd71149a43805501f9373c1 Mon Sep 17 00:00:00 2001
+From 1cf7b4c7692ab2a8eaf455654a9bd46eab606b90 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 8eff201b0021a5821cd71149a43805501f9373c1 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -24,2 +26,2 @@
- drivers/net/ice/ice_dcf_parent.c  | 2 ++
- lib/eal/windows/include/pthread.h | 6 ++++++
+ drivers/net/ice/ice_dcf_parent.c         | 2 ++
+ lib/librte_eal/windows/include/pthread.h | 6 ++++++
@@ -29 +31 @@
-index c8e433239b..1d7aa8bc87 100644
+index 30ead4c9fd..b109e360f9 100644
@@ -32,3 +34,3 @@
-@@ -121,6 +121,8 @@ ice_dcf_vsi_update_service_handler(void *param)
- 	struct ice_dcf_hw *hw = reset_param->dcf_hw;
- 	struct ice_dcf_adapter *adapter;
+@@ -112,8 +112,10 @@ ice_dcf_vsi_update_service_handler(void *param)
+ {
+ 	struct ice_dcf_hw *hw = param;
@@ -37,2 +39 @@
-+
- 	rte_delay_us(ICE_DCF_VSI_UPDATE_SERVICE_INTERVAL);
+ 	usleep(ICE_DCF_VSI_UPDATE_SERVICE_INTERVAL);
@@ -39,0 +41 @@
++
@@ -41 +43,3 @@
-diff --git a/lib/eal/windows/include/pthread.h b/lib/eal/windows/include/pthread.h
+ 
+ 	if (!ice_dcf_handle_vsi_update_event(hw)) {
+diff --git a/lib/librte_eal/windows/include/pthread.h b/lib/librte_eal/windows/include/pthread.h
@@ -43,2 +47,2 @@
---- a/lib/eal/windows/include/pthread.h
-+++ b/lib/eal/windows/include/pthread.h
+--- a/lib/librte_eal/windows/include/pthread.h
++++ b/lib/librte_eal/windows/include/pthread.h

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/enic: enable GENEVE offload via VNIC configuration' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (128 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ice: fix leak on thread termination' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/mlx5: fix tunnel offload private items location' " Xueming Li
                       ` (47 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: John Daley; +Cc: Luca Boccassi, Hyong Youb Kim, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6bdf3844471e199957a718af0faae4070f1d1e3d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6bdf3844471e199957a718af0faae4070f1d1e3d Mon Sep 17 00:00:00 2001
From: John Daley <johndale@cisco.com>
Date: Tue, 11 May 2021 12:25:26 -0700
Subject: [PATCH] net/enic: enable GENEVE offload via VNIC configuration
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 61c7b522d9062242d648d09b61d5137740bc2ebb ]

The admin-configured vNIC settings (i.e. via CIMC or UCSM) now include
Geneve offload. Use that setting to decide whether to enable or
disable Geneve offload and remove the devarg 'geneve-opt'.

Also, the firmware now allows the driver to change the Geneve port
number. So extend udp_tunnel_port_{add,del} to accept Geneve port, in
addition to VXLAN.

Fixes: 93fb21fdbe23 ("net/enic: enable overlay offload for VXLAN and GENEVE")

Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
---
 doc/guides/nics/enic.rst               |  32 +++--
 doc/guides/rel_notes/release_20_05.rst |   7 ++
 drivers/net/enic/base/vnic_dev.c       |   2 +-
 drivers/net/enic/base/vnic_enet.h      |   1 +
 drivers/net/enic/enic.h                |   4 +-
 drivers/net/enic/enic_ethdev.c         |  70 ++++++-----
 drivers/net/enic/enic_main.c           | 161 +++++++++++++++----------
 drivers/net/enic/enic_res.c            |   7 +-
 8 files changed, 161 insertions(+), 123 deletions(-)

diff --git a/doc/guides/nics/enic.rst b/doc/guides/nics/enic.rst
index 5d1cc9f7fa..102522492a 100644
--- a/doc/guides/nics/enic.rst
+++ b/doc/guides/nics/enic.rst
@@ -294,35 +294,31 @@ inner and outer packets can be IPv4 or IPv6.
 
   RSS hash calculation, therefore queue selection, is done on inner packets.
 
-In order to enable overlay offload, the 'Enable VXLAN' box should be checked
+In order to enable overlay offload, enable VXLAN and/or Geneve on vNIC
 via CIMC or UCSM followed by a reboot of the server. When PMD successfully
-enables overlay offload, it prints the following message on the console.
+enables overlay offload, it prints one of the following messages on the console.
 
 .. code-block:: console
 
-    Overlay offload is enabled
+    Overlay offload is enabled (VxLAN)
+    Overlay offload is enabled (Geneve)
+    Overlay offload is enabled (VxLAN, Geneve)
 
 By default, PMD enables overlay offload if hardware supports it. To disable
 it, set ``devargs`` parameter ``disable-overlay=1``. For example::
 
     -a 12:00.0,disable-overlay=1
 
-By default, the NIC uses 4789 as the VXLAN port. The user may change
-it through ``rte_eth_dev_udp_tunnel_port_{add,delete}``. However, as
-the current NIC has a single VXLAN port number, the user cannot
-configure multiple port numbers.
-
-Geneve headers with non-zero options are not supported by default. To
-use Geneve with options, update the VIC firmware to the latest version
-and then set ``devargs`` parameter ``geneve-opt=1``. When Geneve with
-options is enabled, flow API cannot be used as the features are
-currently mutually exclusive. When this feature is successfully
-enabled, PMD prints the following message.
-
-.. code-block:: console
-
-    Geneve with options is enabled
+By default, the NIC uses 4789 and 6081 as the VXLAN and Geneve ports,
+respectively. The user may change them through
+``rte_eth_dev_udp_tunnel_port_{add,delete}``. However, as the current
+NIC has a single VXLAN port number and a single Geneve port number,
+the user cannot configure multiple port numbers for each tunnel type.
 
+Geneve offload support has evolved over VIC models. On older models,
+Geneve offload and advanced filters are mutually exclusive.  This is
+enforced by UCSM and CIMC, which only allow one of the two features
+to be selected at one time. Newer VIC models do not have this restriction.
 
 Ingress VLAN Rewrite
 --------------------
diff --git a/doc/guides/rel_notes/release_20_05.rst b/doc/guides/rel_notes/release_20_05.rst
index 985c845de4..b59576a575 100644
--- a/doc/guides/rel_notes/release_20_05.rst
+++ b/doc/guides/rel_notes/release_20_05.rst
@@ -121,6 +121,13 @@ New Features
   * Added flow counters to extended stats.
   * Added PCI function stats to extended stats.
 
+* **Updated Cisco enic driver.**
+
+  Updated Cisco enic driver GENEVE tunneling support:
+
+  * Added support to control GENEVE tunneling via UCSM/CIMC and removed devarg.
+  * Added GENEVE port number configuration.
+
 * **Updated Hisilicon hns3 driver.**
 
   Updated Hisilicon hns3 driver with new features and improvements, including:
diff --git a/drivers/net/enic/base/vnic_dev.c b/drivers/net/enic/base/vnic_dev.c
index aaca07ca67..6f48ea51de 100644
--- a/drivers/net/enic/base/vnic_dev.c
+++ b/drivers/net/enic/base/vnic_dev.c
@@ -1318,5 +1318,5 @@ int vnic_dev_capable_geneve(struct vnic_dev *vdev)
 	int ret;
 
 	ret = vnic_dev_cmd(vdev, CMD_GET_SUPP_FEATURE_VER, &a0, &a1, wait);
-	return ret == 0 && (a1 & FEATURE_GENEVE_OPTIONS);
+	return ret == 0 && !!(a1 & FEATURE_GENEVE_OPTIONS);
 }
diff --git a/drivers/net/enic/base/vnic_enet.h b/drivers/net/enic/base/vnic_enet.h
index 7687951c90..2a97a33044 100644
--- a/drivers/net/enic/base/vnic_enet.h
+++ b/drivers/net/enic/base/vnic_enet.h
@@ -55,6 +55,7 @@ struct vnic_enet_config {
 #define VENETF_NICSWITCH        0x80000 /* NICSWITCH enabled */
 #define VENETF_RSSHASH_UDPIPV4  0x100000 /* Hash on UDP + IPv4 fields */
 #define VENETF_RSSHASH_UDPIPV6  0x200000 /* Hash on UDP + IPv6 fields */
+#define VENETF_GENEVE		0x400000 /* GENEVE offload */
 
 #define VENET_INTR_TYPE_MIN	0	/* Timer specs min interrupt spacing */
 #define VENET_INTR_TYPE_IDLE	1	/* Timer specs idle time before irq */
diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h
index 079f194275..67d872e4b1 100644
--- a/drivers/net/enic/enic.h
+++ b/drivers/net/enic/enic.h
@@ -137,15 +137,15 @@ struct enic {
 	uint8_t adv_filters;
 	uint32_t flow_filter_mode;
 	uint8_t filter_actions; /* HW supported actions */
+	bool geneve;
 	bool vxlan;
 	bool disable_overlay; /* devargs disable_overlay=1 */
 	uint8_t enable_avx2_rx;  /* devargs enable-avx2-rx=1 */
-	uint8_t geneve_opt_avail;    /* Geneve with options offload available */
-	uint8_t geneve_opt_enabled;  /* Geneve with options offload enabled */
 	uint8_t geneve_opt_request;  /* devargs geneve-opt=1 */
 	bool nic_cfg_chk;     /* NIC_CFG_CHK available */
 	bool udp_rss_weak;    /* Bodega style UDP RSS */
 	uint8_t ig_vlan_rewrite_mode; /* devargs ig-vlan-rewrite */
+	uint16_t geneve_port; /* current geneve port pushed to NIC */
 	uint16_t vxlan_port;  /* current vxlan port pushed to NIC */
 	int use_simple_tx_handler;
 	int use_noscatter_vec_rx_handler;
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 327b62307b..9e59847f36 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -11,6 +11,7 @@
 #include <rte_bus_pci.h>
 #include <rte_ethdev_driver.h>
 #include <rte_ethdev_pci.h>
+#include <rte_geneve.h>
 #include <rte_kvargs.h>
 #include <rte_string_fns.h>
 
@@ -66,7 +67,6 @@ static const struct vic_speed_capa {
 
 #define ENIC_DEVARG_DISABLE_OVERLAY "disable-overlay"
 #define ENIC_DEVARG_ENABLE_AVX2_RX "enable-avx2-rx"
-#define ENIC_DEVARG_GENEVE_OPT "geneve-opt"
 #define ENIC_DEVARG_IG_VLAN_REWRITE "ig-vlan-rewrite"
 #define ENIC_DEVARG_REPRESENTOR "representor"
 
@@ -83,12 +83,6 @@ enicpmd_dev_filter_ctrl(struct rte_eth_dev *dev,
 
 	ENICPMD_FUNC_TRACE();
 
-	/*
-	 * Currently, when Geneve with options offload is enabled, host
-	 * cannot insert match-action rules.
-	 */
-	if (enic->geneve_opt_enabled)
-		return -ENOTSUP;
 	switch (filter_type) {
 	case RTE_ETH_FILTER_GENERIC:
 		if (filter_op != RTE_ETH_FILTER_GET)
@@ -983,26 +977,32 @@ static int enicpmd_dev_rx_queue_intr_disable(struct rte_eth_dev *eth_dev,
 static int udp_tunnel_common_check(struct enic *enic,
 				   struct rte_eth_udp_tunnel *tnl)
 {
-	if (tnl->prot_type != RTE_TUNNEL_TYPE_VXLAN)
+	if (tnl->prot_type != RTE_TUNNEL_TYPE_VXLAN &&
+	    tnl->prot_type != RTE_TUNNEL_TYPE_GENEVE)
 		return -ENOTSUP;
 	if (!enic->overlay_offload) {
-		ENICPMD_LOG(DEBUG, " vxlan (overlay offload) is not "
-			     "supported\n");
+		ENICPMD_LOG(DEBUG, " overlay offload is not supported\n");
 		return -ENOTSUP;
 	}
 	return 0;
 }
 
-static int update_vxlan_port(struct enic *enic, uint16_t port)
+static int update_tunnel_port(struct enic *enic, uint16_t port, bool vxlan)
 {
-	if (vnic_dev_overlay_offload_cfg(enic->vdev,
-					 OVERLAY_CFG_VXLAN_PORT_UPDATE,
-					 port)) {
-		ENICPMD_LOG(DEBUG, " failed to update vxlan port\n");
+	uint8_t cfg;
+
+	cfg = vxlan ? OVERLAY_CFG_VXLAN_PORT_UPDATE :
+		OVERLAY_CFG_GENEVE_PORT_UPDATE;
+	if (vnic_dev_overlay_offload_cfg(enic->vdev, cfg, port)) {
+		ENICPMD_LOG(DEBUG, " failed to update tunnel port\n");
 		return -EINVAL;
 	}
-	ENICPMD_LOG(DEBUG, " updated vxlan port to %u\n", port);
-	enic->vxlan_port = port;
+	ENICPMD_LOG(DEBUG, " updated %s port to %u\n",
+		    vxlan ? "vxlan" : "geneve", port);
+	if (vxlan)
+		enic->vxlan_port = port;
+	else
+		enic->geneve_port = port;
 	return 0;
 }
 
@@ -1010,34 +1010,48 @@ static int enicpmd_dev_udp_tunnel_port_add(struct rte_eth_dev *eth_dev,
 					   struct rte_eth_udp_tunnel *tnl)
 {
 	struct enic *enic = pmd_priv(eth_dev);
+	uint16_t port;
+	bool vxlan;
 	int ret;
 
 	ENICPMD_FUNC_TRACE();
 	ret = udp_tunnel_common_check(enic, tnl);
 	if (ret)
 		return ret;
+	vxlan = (tnl->prot_type == RTE_TUNNEL_TYPE_VXLAN);
+	if (vxlan)
+		port = enic->vxlan_port;
+	else
+		port = enic->geneve_port;
 	/*
-	 * The NIC has 1 configurable VXLAN port number. "Adding" a new port
-	 * number replaces it.
+	 * The NIC has 1 configurable port number per tunnel type.
+	 * "Adding" a new port number replaces it.
 	 */
-	if (tnl->udp_port == enic->vxlan_port || tnl->udp_port == 0) {
+	if (tnl->udp_port == port || tnl->udp_port == 0) {
 		ENICPMD_LOG(DEBUG, " %u is already configured or invalid\n",
 			     tnl->udp_port);
 		return -EINVAL;
 	}
-	return update_vxlan_port(enic, tnl->udp_port);
+	return update_tunnel_port(enic, tnl->udp_port, vxlan);
 }
 
 static int enicpmd_dev_udp_tunnel_port_del(struct rte_eth_dev *eth_dev,
 					   struct rte_eth_udp_tunnel *tnl)
 {
 	struct enic *enic = pmd_priv(eth_dev);
+	uint16_t port;
+	bool vxlan;
 	int ret;
 
 	ENICPMD_FUNC_TRACE();
 	ret = udp_tunnel_common_check(enic, tnl);
 	if (ret)
 		return ret;
+	vxlan = (tnl->prot_type == RTE_TUNNEL_TYPE_VXLAN);
+	if (vxlan)
+		port = enic->vxlan_port;
+	else
+		port = enic->geneve_port;
 	/*
 	 * Clear the previously set port number and restore the
 	 * hardware default port number. Some drivers disable VXLAN
@@ -1045,12 +1059,13 @@ static int enicpmd_dev_udp_tunnel_port_del(struct rte_eth_dev *eth_dev,
 	 * enic does not do that as VXLAN is part of overlay offload,
 	 * which is tied to inner RSS and TSO.
 	 */
-	if (tnl->udp_port != enic->vxlan_port) {
-		ENICPMD_LOG(DEBUG, " %u is not a configured vxlan port\n",
+	if (tnl->udp_port != port) {
+		ENICPMD_LOG(DEBUG, " %u is not a configured tunnel port\n",
 			     tnl->udp_port);
 		return -EINVAL;
 	}
-	return update_vxlan_port(enic, RTE_VXLAN_DEFAULT_PORT);
+	port = vxlan ? RTE_VXLAN_DEFAULT_PORT : RTE_GENEVE_DEFAULT_PORT;
+	return update_tunnel_port(enic, port, vxlan);
 }
 
 static int enicpmd_dev_fw_version_get(struct rte_eth_dev *eth_dev,
@@ -1154,8 +1169,6 @@ static int enic_parse_zero_one(const char *key,
 		enic->disable_overlay = b;
 	if (strcmp(key, ENIC_DEVARG_ENABLE_AVX2_RX) == 0)
 		enic->enable_avx2_rx = b;
-	if (strcmp(key, ENIC_DEVARG_GENEVE_OPT) == 0)
-		enic->geneve_opt_request = b;
 	return 0;
 }
 
@@ -1197,7 +1210,6 @@ static int enic_check_devargs(struct rte_eth_dev *dev)
 	static const char *const valid_keys[] = {
 		ENIC_DEVARG_DISABLE_OVERLAY,
 		ENIC_DEVARG_ENABLE_AVX2_RX,
-		ENIC_DEVARG_GENEVE_OPT,
 		ENIC_DEVARG_IG_VLAN_REWRITE,
 		ENIC_DEVARG_REPRESENTOR,
 		NULL};
@@ -1208,7 +1220,6 @@ static int enic_check_devargs(struct rte_eth_dev *dev)
 
 	enic->disable_overlay = false;
 	enic->enable_avx2_rx = false;
-	enic->geneve_opt_request = false;
 	enic->ig_vlan_rewrite_mode = IG_VLAN_REWRITE_MODE_PASS_THRU;
 	if (!dev->device->devargs)
 		return 0;
@@ -1219,8 +1230,6 @@ static int enic_check_devargs(struct rte_eth_dev *dev)
 			       enic_parse_zero_one, enic) < 0 ||
 	    rte_kvargs_process(kvlist, ENIC_DEVARG_ENABLE_AVX2_RX,
 			       enic_parse_zero_one, enic) < 0 ||
-	    rte_kvargs_process(kvlist, ENIC_DEVARG_GENEVE_OPT,
-			       enic_parse_zero_one, enic) < 0 ||
 	    rte_kvargs_process(kvlist, ENIC_DEVARG_IG_VLAN_REWRITE,
 			       enic_parse_ig_vlan_rewrite, enic) < 0) {
 		rte_kvargs_free(kvlist);
@@ -1389,5 +1398,4 @@ RTE_PMD_REGISTER_KMOD_DEP(net_enic, "* igb_uio | uio_pci_generic | vfio-pci");
 RTE_PMD_REGISTER_PARAM_STRING(net_enic,
 	ENIC_DEVARG_DISABLE_OVERLAY "=0|1 "
 	ENIC_DEVARG_ENABLE_AVX2_RX "=0|1 "
-	ENIC_DEVARG_GENEVE_OPT "=0|1 "
 	ENIC_DEVARG_IG_VLAN_REWRITE "=trunk|untag|priority|pass");
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index d0d41035fd..e0c71350ad 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -16,6 +16,7 @@
 #include <rte_mbuf.h>
 #include <rte_string_fns.h>
 #include <rte_ethdev_driver.h>
+#include <rte_geneve.h>
 
 #include "enic_compat.h"
 #include "enic.h"
@@ -1704,6 +1705,85 @@ set_mtu_done:
 	return rc;
 }
 
+static void
+enic_disable_overlay_offload(struct enic *enic)
+{
+	/*
+	 * Disabling fails if the feature is provisioned but
+	 * not enabled. So ignore result and do not log error.
+	 */
+	if (enic->vxlan) {
+		vnic_dev_overlay_offload_ctrl(enic->vdev,
+			OVERLAY_FEATURE_VXLAN, OVERLAY_OFFLOAD_DISABLE);
+	}
+	if (enic->geneve) {
+		vnic_dev_overlay_offload_ctrl(enic->vdev,
+			OVERLAY_FEATURE_GENEVE, OVERLAY_OFFLOAD_DISABLE);
+	}
+}
+
+static int
+enic_enable_overlay_offload(struct enic *enic)
+{
+	if (enic->vxlan && vnic_dev_overlay_offload_ctrl(enic->vdev,
+			OVERLAY_FEATURE_VXLAN, OVERLAY_OFFLOAD_ENABLE) != 0) {
+		dev_err(NULL, "failed to enable VXLAN offload\n");
+		return -EINVAL;
+	}
+	if (enic->geneve && vnic_dev_overlay_offload_ctrl(enic->vdev,
+			OVERLAY_FEATURE_GENEVE, OVERLAY_OFFLOAD_ENABLE) != 0) {
+		dev_err(NULL, "failed to enable Geneve offload\n");
+		return -EINVAL;
+	}
+	enic->tx_offload_capa |=
+		DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM |
+		(enic->geneve ? DEV_TX_OFFLOAD_GENEVE_TNL_TSO : 0) |
+		(enic->vxlan ? DEV_TX_OFFLOAD_VXLAN_TNL_TSO : 0);
+	enic->tx_offload_mask |=
+		PKT_TX_OUTER_IPV6 |
+		PKT_TX_OUTER_IPV4 |
+		PKT_TX_OUTER_IP_CKSUM |
+		PKT_TX_TUNNEL_MASK;
+	enic->overlay_offload = true;
+
+	if (enic->vxlan && enic->geneve)
+		dev_info(NULL, "Overlay offload is enabled (VxLAN, Geneve)\n");
+	else if (enic->vxlan)
+		dev_info(NULL, "Overlay offload is enabled (VxLAN)\n");
+	else
+		dev_info(NULL, "Overlay offload is enabled (Geneve)\n");
+
+	return 0;
+}
+
+static int
+enic_reset_overlay_port(struct enic *enic)
+{
+	if (enic->vxlan) {
+		enic->vxlan_port = RTE_VXLAN_DEFAULT_PORT;
+		/*
+		 * Reset the vxlan port to the default, as the NIC firmware
+		 * does not reset it automatically and keeps the old setting.
+		 */
+		if (vnic_dev_overlay_offload_cfg(enic->vdev,
+						 OVERLAY_CFG_VXLAN_PORT_UPDATE,
+						 RTE_VXLAN_DEFAULT_PORT)) {
+			dev_err(enic, "failed to update vxlan port\n");
+			return -EINVAL;
+		}
+	}
+	if (enic->geneve) {
+		enic->geneve_port = RTE_GENEVE_DEFAULT_PORT;
+		if (vnic_dev_overlay_offload_cfg(enic->vdev,
+						 OVERLAY_CFG_GENEVE_PORT_UPDATE,
+						 RTE_GENEVE_DEFAULT_PORT)) {
+			dev_err(enic, "failed to update vxlan port\n");
+			return -EINVAL;
+		}
+	}
+	return 0;
+}
+
 static int enic_dev_init(struct enic *enic)
 {
 	int err;
@@ -1773,85 +1853,32 @@ static int enic_dev_init(struct enic *enic)
 	/* set up link status checking */
 	vnic_dev_notify_set(enic->vdev, -1); /* No Intr for notify */
 
+	enic->overlay_offload = false;
 	/*
-	 * When Geneve with options offload is available, always disable it
-	 * first as it can interfere with user flow rules.
+	 * First, explicitly disable overlay offload as the setting is
+	 * sticky, and resetting vNIC may not disable it.
 	 */
-	if (enic->geneve_opt_avail) {
-		/*
-		 * Disabling fails if the feature is provisioned but
-		 * not enabled. So ignore result and do not log error.
-		 */
-		vnic_dev_overlay_offload_ctrl(enic->vdev,
-			OVERLAY_FEATURE_GENEVE,
-			OVERLAY_OFFLOAD_DISABLE);
-	}
-	enic->overlay_offload = false;
-	if (enic->disable_overlay && enic->vxlan) {
-		/*
-		 * Explicitly disable overlay offload as the setting is
-		 * sticky, and resetting vNIC does not disable it.
-		 */
-		if (vnic_dev_overlay_offload_ctrl(enic->vdev,
-						  OVERLAY_FEATURE_VXLAN,
-						  OVERLAY_OFFLOAD_DISABLE)) {
-			dev_err(enic, "failed to disable overlay offload\n");
-		} else {
-			dev_info(enic, "Overlay offload is disabled\n");
-		}
-	}
-	if (!enic->disable_overlay && enic->vxlan &&
-	    /* 'VXLAN feature' enables VXLAN, NVGRE, and GENEVE. */
-	    vnic_dev_overlay_offload_ctrl(enic->vdev,
-					  OVERLAY_FEATURE_VXLAN,
-					  OVERLAY_OFFLOAD_ENABLE) == 0) {
-		enic->tx_offload_capa |=
-			DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM |
-			DEV_TX_OFFLOAD_GENEVE_TNL_TSO |
-			DEV_TX_OFFLOAD_VXLAN_TNL_TSO;
-		enic->tx_offload_mask |=
-			PKT_TX_OUTER_IPV6 |
-			PKT_TX_OUTER_IPV4 |
-			PKT_TX_OUTER_IP_CKSUM |
-			PKT_TX_TUNNEL_MASK;
-		enic->overlay_offload = true;
-		dev_info(enic, "Overlay offload is enabled\n");
-	}
-	/* Geneve with options offload requires overlay offload */
-	if (enic->overlay_offload && enic->geneve_opt_avail &&
-	    enic->geneve_opt_request) {
-		if (vnic_dev_overlay_offload_ctrl(enic->vdev,
-				OVERLAY_FEATURE_GENEVE,
-				OVERLAY_OFFLOAD_ENABLE)) {
-			dev_err(enic, "failed to enable geneve+option\n");
-		} else {
-			enic->geneve_opt_enabled = 1;
-			dev_info(enic, "Geneve with options is enabled\n");
+	enic_disable_overlay_offload(enic);
+	/* Then, enable overlay offload according to vNIC flags */
+	if (!enic->disable_overlay && (enic->vxlan || enic->geneve)) {
+		err = enic_enable_overlay_offload(enic);
+		if (err) {
+			dev_info(NULL, "failed to enable overlay offload\n");
+			return err;
 		}
 	}
 	/*
-	 * Reset the vxlan port if HW vxlan parsing is available. It
+	 * Reset the vxlan/geneve port if HW parsing is available. It
 	 * is always enabled regardless of overlay offload
 	 * enable/disable.
 	 */
-	if (enic->vxlan) {
-		enic->vxlan_port = RTE_VXLAN_DEFAULT_PORT;
-		/*
-		 * Reset the vxlan port to the default, as the NIC firmware
-		 * does not reset it automatically and keeps the old setting.
-		 */
-		if (vnic_dev_overlay_offload_cfg(enic->vdev,
-						 OVERLAY_CFG_VXLAN_PORT_UPDATE,
-						 RTE_VXLAN_DEFAULT_PORT)) {
-			dev_err(enic, "failed to update vxlan port\n");
-			return -EINVAL;
-		}
-	}
+	err = enic_reset_overlay_port(enic);
+	if (err)
+		return err;
 
 	if (enic_fm_init(enic))
 		dev_warning(enic, "Init of flowman failed.\n");
 	return 0;
-
 }
 
 static void lock_devcmd(void *priv)
diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c
index 20888eb257..d079e2f0e7 100644
--- a/drivers/net/enic/enic_res.c
+++ b/drivers/net/enic/enic_res.c
@@ -178,10 +178,9 @@ int enic_get_vnic_config(struct enic *enic)
 
 	enic->vxlan = ENIC_SETTING(enic, VXLAN) &&
 		vnic_dev_capable_vxlan(enic->vdev);
-	if (vnic_dev_capable_geneve(enic->vdev)) {
-		dev_info(NULL, "Geneve with options offload available\n");
-		enic->geneve_opt_avail = 1;
-	}
+	enic->geneve = ENIC_SETTING(enic, GENEVE) &&
+		vnic_dev_capable_geneve(enic->vdev);
+
 	/*
 	 * Default hardware capabilities. enic_dev_init() may add additional
 	 * flags if it enables overlay offloads.
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.930607800 +0800
+++ 0131-net-enic-enable-GENEVE-offload-via-VNIC-configuratio.patch	2021-06-12 06:53:56.550000000 +0800
@@ -1 +1 @@
-From 61c7b522d9062242d648d09b61d5137740bc2ebb Mon Sep 17 00:00:00 2001
+From 6bdf3844471e199957a718af0faae4070f1d1e3d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 61c7b522d9062242d648d09b61d5137740bc2ebb ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
- drivers/net/enic/enic_ethdev.c         |  71 ++++++-----
+ drivers/net/enic/enic_ethdev.c         |  70 ++++++-----
@@ -28 +30 @@
- 8 files changed, 161 insertions(+), 124 deletions(-)
+ 8 files changed, 161 insertions(+), 123 deletions(-)
@@ -31 +33 @@
-index 4e7629c5cd..91bdcd065a 100644
+index 5d1cc9f7fa..102522492a 100644
@@ -103 +105 @@
-index 526273cef5..55c08eb3dc 100644
+index aaca07ca67..6f48ea51de 100644
@@ -106 +108 @@
-@@ -1318,7 +1318,7 @@ int vnic_dev_capable_geneve(struct vnic_dev *vdev)
+@@ -1318,5 +1318,5 @@ int vnic_dev_capable_geneve(struct vnic_dev *vdev)
@@ -113,2 +114,0 @@
- 
- uint64_t vnic_dev_capable_cq_entry_size(struct vnic_dev *vdev)
@@ -128 +128 @@
-index cd66348f2f..47bfdac2cf 100644
+index 079f194275..67d872e4b1 100644
@@ -131 +131,2 @@
-@@ -118,17 +118,17 @@ struct enic {
+@@ -137,15 +137,15 @@ struct enic {
+ 	uint8_t adv_filters;
@@ -134 +134,0 @@
- 	uint64_t cq_entry_sizes; /* supported CQ entry sizes */
@@ -137,2 +136,0 @@
- 	bool cq64;            /* actually using 64B CQ entry */
- 	bool cq64_request;    /* devargs cq64=1 */
@@ -152 +150 @@
-index ab64480f39..8d5797523b 100644
+index 327b62307b..9e59847f36 100644
@@ -157,2 +155,2 @@
- #include <ethdev_driver.h>
- #include <ethdev_pci.h>
+ #include <rte_ethdev_driver.h>
+ #include <rte_ethdev_pci.h>
@@ -163,2 +161,2 @@
-@@ -67,7 +68,6 @@ static const struct vic_speed_capa {
- #define ENIC_DEVARG_CQ64 "cq64"
+@@ -66,7 +67,6 @@ static const struct vic_speed_capa {
+ 
@@ -171 +169 @@
-@@ -81,13 +81,6 @@ enicpmd_dev_flow_ops_get(struct rte_eth_dev *dev,
+@@ -83,12 +83,6 @@ enicpmd_dev_filter_ctrl(struct rte_eth_dev *dev,
@@ -181,5 +179,4 @@
--
- 	if (enic->flow_filter_mode == FILTER_FLOWMAN)
- 		*ops = &enic_fm_flow_ops;
- 	else
-@@ -972,26 +965,32 @@ static int enicpmd_dev_rx_queue_intr_disable(struct rte_eth_dev *eth_dev,
+ 	switch (filter_type) {
+ 	case RTE_ETH_FILTER_GENERIC:
+ 		if (filter_op != RTE_ETH_FILTER_GET)
+@@ -983,26 +977,32 @@ static int enicpmd_dev_rx_queue_intr_disable(struct rte_eth_dev *eth_dev,
@@ -228 +225 @@
-@@ -999,34 +998,48 @@ static int enicpmd_dev_udp_tunnel_port_add(struct rte_eth_dev *eth_dev,
+@@ -1010,34 +1010,48 @@ static int enicpmd_dev_udp_tunnel_port_add(struct rte_eth_dev *eth_dev,
@@ -281 +278 @@
-@@ -1034,12 +1047,13 @@ static int enicpmd_dev_udp_tunnel_port_del(struct rte_eth_dev *eth_dev,
+@@ -1045,12 +1059,13 @@ static int enicpmd_dev_udp_tunnel_port_del(struct rte_eth_dev *eth_dev,
@@ -298 +295 @@
-@@ -1145,8 +1159,6 @@ static int enic_parse_zero_one(const char *key,
+@@ -1154,8 +1169,6 @@ static int enic_parse_zero_one(const char *key,
@@ -307,2 +304,2 @@
-@@ -1189,7 +1201,6 @@ static int enic_check_devargs(struct rte_eth_dev *dev)
- 		ENIC_DEVARG_CQ64,
+@@ -1197,7 +1210,6 @@ static int enic_check_devargs(struct rte_eth_dev *dev)
+ 	static const char *const valid_keys[] = {
@@ -315,2 +312,2 @@
-@@ -1201,7 +1212,6 @@ static int enic_check_devargs(struct rte_eth_dev *dev)
- 	enic->cq64_request = true; /* Use 64B entry if available */
+@@ -1208,7 +1220,6 @@ static int enic_check_devargs(struct rte_eth_dev *dev)
+ 
@@ -323 +320 @@
-@@ -1214,8 +1224,6 @@ static int enic_check_devargs(struct rte_eth_dev *dev)
+@@ -1219,8 +1230,6 @@ static int enic_check_devargs(struct rte_eth_dev *dev)
@@ -332,2 +329,2 @@
-@@ -1391,5 +1399,4 @@ RTE_PMD_REGISTER_PARAM_STRING(net_enic,
- 	ENIC_DEVARG_CQ64 "=0|1"
+@@ -1389,5 +1398,4 @@ RTE_PMD_REGISTER_KMOD_DEP(net_enic, "* igb_uio | uio_pci_generic | vfio-pci");
+ RTE_PMD_REGISTER_PARAM_STRING(net_enic,
@@ -339 +336 @@
-index 2a06d46872..2affd380c6 100644
+index d0d41035fd..e0c71350ad 100644
@@ -345 +342 @@
- #include <ethdev_driver.h>
+ #include <rte_ethdev_driver.h>
@@ -350 +347 @@
-@@ -1719,6 +1720,85 @@ set_mtu_done:
+@@ -1704,6 +1705,85 @@ set_mtu_done:
@@ -436 +433 @@
-@@ -1785,85 +1865,32 @@ static int enic_dev_init(struct enic *enic)
+@@ -1773,85 +1853,32 @@ static int enic_dev_init(struct enic *enic)
@@ -537 +534 @@
-index 689bf748ae..a8f5332a40 100644
+index 20888eb257..d079e2f0e7 100644
@@ -540 +537 @@
-@@ -179,10 +179,9 @@ int enic_get_vnic_config(struct enic *enic)
+@@ -178,10 +178,9 @@ int enic_get_vnic_config(struct enic *enic)
@@ -551,3 +548,3 @@
- 	/* Supported CQ entry sizes */
- 	enic->cq_entry_sizes = vnic_dev_capable_cq_entry_size(enic->vdev);
- 	sizes = enic->cq_entry_sizes;
+ 	/*
+ 	 * Default hardware capabilities. enic_dev_init() may add additional
+ 	 * flags if it enables overlay offloads.

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix tunnel offload private items location' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (129 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/enic: enable GENEVE offload via VNIC configuration' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena: indicate Rx RSS hash presence' " Xueming Li
                       ` (46 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Gregory Etelson; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/96883cec2af4f2921287d451c73f93a6d4e47772

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 96883cec2af4f2921287d451c73f93a6d4e47772 Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson@nvidia.com>
Date: Thu, 6 May 2021 12:57:51 +0300
Subject: [PATCH] net/mlx5: fix tunnel offload private items location
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 8c5a231bce3adb2088252fea73df70bf9d7fb329 ]

Tunnel offload API requires application to query PMD for specific flow
items and actions. Application uses these PMD specific elements to
build flow rules according to the tunnel offload model.
The model does not restrict private elements location in a flow rule,
but the current MLX5 PMD implementation expects that tunnel offload
rule will begin with PMD specific elements.
The patch removes that placement limitation.

Fixes: 4ec6360de37d ("net/mlx5: implement tunnel offload")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c    | 48 ++++++++++++-------
 drivers/net/mlx5/mlx5_flow.h    | 46 ++++++++++--------
 drivers/net/mlx5/mlx5_flow_dv.c | 84 ++++++++++++++++-----------------
 3 files changed, 100 insertions(+), 78 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index d976ca9a8d..cab0aee567 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -50,6 +50,7 @@ flow_tunnel_add_default_miss(struct rte_eth_dev *dev,
 			     const struct rte_flow_attr *attr,
 			     const struct rte_flow_action *app_actions,
 			     uint32_t flow_idx,
+			     const struct mlx5_flow_tunnel *tunnel,
 			     struct tunnel_default_miss_ctx *ctx,
 			     struct rte_flow_error *error);
 static struct mlx5_flow_tunnel *
@@ -5183,22 +5184,14 @@ flow_create_split_outer(struct rte_eth_dev *dev,
 	return ret;
 }
 
-static struct mlx5_flow_tunnel *
-flow_tunnel_from_rule(struct rte_eth_dev *dev,
-		      const struct rte_flow_attr *attr,
-		      const struct rte_flow_item items[],
-		      const struct rte_flow_action actions[])
+static inline struct mlx5_flow_tunnel *
+flow_tunnel_from_rule(const struct mlx5_flow *flow)
 {
 	struct mlx5_flow_tunnel *tunnel;
 
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wcast-qual"
-	if (is_flow_tunnel_match_rule(dev, attr, items, actions))
-		tunnel = (struct mlx5_flow_tunnel *)items[0].spec;
-	else if (is_flow_tunnel_steer_rule(dev, attr, items, actions))
-		tunnel = (struct mlx5_flow_tunnel *)actions[0].conf;
-	else
-		tunnel = NULL;
+	tunnel = (typeof(tunnel))flow->tunnel;
 #pragma GCC diagnostic pop
 
 	return tunnel;
@@ -5392,12 +5385,11 @@ flow_list_create(struct rte_eth_dev *dev, uint32_t *list,
 					      error);
 		if (ret < 0)
 			goto error;
-		if (is_flow_tunnel_steer_rule(dev, attr,
-					      buf->entry[i].pattern,
-					      p_actions_rx)) {
+		if (is_flow_tunnel_steer_rule(wks->flows[0].tof_type)) {
 			ret = flow_tunnel_add_default_miss(dev, flow, attr,
 							   p_actions_rx,
 							   idx,
+							   wks->flows[0].tunnel,
 							   &default_miss_ctx,
 							   error);
 			if (ret < 0) {
@@ -5461,7 +5453,7 @@ flow_list_create(struct rte_eth_dev *dev, uint32_t *list,
 	}
 	flow_rxq_flags_set(dev, flow);
 	rte_free(translated_actions);
-	tunnel = flow_tunnel_from_rule(dev, attr, items, actions);
+	tunnel = flow_tunnel_from_rule(wks->flows);
 	if (tunnel) {
 		flow->tunnel = 1;
 		flow->tunnel_id = tunnel->tunnel_id;
@@ -7210,6 +7202,28 @@ int rte_pmd_mlx5_sync_flow(uint16_t port_id, uint32_t domains)
 	return ret;
 }
 
+const struct mlx5_flow_tunnel *
+mlx5_get_tof(const struct rte_flow_item *item,
+	     const struct rte_flow_action *action,
+	     enum mlx5_tof_rule_type *rule_type)
+{
+	for (; item->type != RTE_FLOW_ITEM_TYPE_END; item++) {
+		if (item->type == (typeof(item->type))
+				  MLX5_RTE_FLOW_ITEM_TYPE_TUNNEL) {
+			*rule_type = MLX5_TUNNEL_OFFLOAD_MATCH_RULE;
+			return flow_items_to_tunnel(item);
+		}
+	}
+	for (; action->conf != RTE_FLOW_ACTION_TYPE_END; action++) {
+		if (action->type == (typeof(action->type))
+				    MLX5_RTE_FLOW_ACTION_TYPE_TUNNEL_SET) {
+			*rule_type = MLX5_TUNNEL_OFFLOAD_SET_RULE;
+			return flow_actions_to_tunnel(action);
+		}
+	}
+	return NULL;
+}
+
 /**
  * tunnel offload functionalilty is defined for DV environment only
  */
@@ -7240,13 +7254,13 @@ flow_tunnel_add_default_miss(struct rte_eth_dev *dev,
 			     const struct rte_flow_attr *attr,
 			     const struct rte_flow_action *app_actions,
 			     uint32_t flow_idx,
+			     const struct mlx5_flow_tunnel *tunnel,
 			     struct tunnel_default_miss_ctx *ctx,
 			     struct rte_flow_error *error)
 {
 	struct mlx5_priv *priv = dev->data->dev_private;
 	struct mlx5_flow *dev_flow;
 	struct rte_flow_attr miss_attr = *attr;
-	const struct mlx5_flow_tunnel *tunnel = app_actions[0].conf;
 	const struct rte_flow_item miss_items[2] = {
 		{
 			.type = RTE_FLOW_ITEM_TYPE_ETH,
@@ -7332,6 +7346,7 @@ flow_tunnel_add_default_miss(struct rte_eth_dev *dev,
 	dev_flow->flow = flow;
 	dev_flow->external = true;
 	dev_flow->tunnel = tunnel;
+	dev_flow->tof_type = MLX5_TUNNEL_OFFLOAD_MISS_RULE;
 	/* Subflow object was created, we must include one in the list. */
 	SILIST_INSERT(&flow->dev_handles, dev_flow->handle_idx,
 		      dev_flow->handle, next);
@@ -7926,6 +7941,7 @@ flow_tunnel_add_default_miss(__rte_unused struct rte_eth_dev *dev,
 			     __rte_unused const struct rte_flow_attr *attr,
 			     __rte_unused const struct rte_flow_action *actions,
 			     __rte_unused uint32_t flow_idx,
+			     __rte_unused const struct mlx5_flow_tunnel *tunnel,
 			     __rte_unused struct tunnel_default_miss_ctx *ctx,
 			     __rte_unused struct rte_flow_error *error)
 {
diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h
index 293c60f5b4..9b72cde5ff 100644
--- a/drivers/net/mlx5/mlx5_flow.h
+++ b/drivers/net/mlx5/mlx5_flow.h
@@ -753,6 +753,16 @@ struct mlx5_flow_verbs_workspace {
 /** Maximal number of device sub-flows supported. */
 #define MLX5_NUM_MAX_DEV_FLOWS 32
 
+/**
+ * tunnel offload rules type
+ */
+enum mlx5_tof_rule_type {
+	MLX5_TUNNEL_OFFLOAD_NONE = 0,
+	MLX5_TUNNEL_OFFLOAD_SET_RULE,
+	MLX5_TUNNEL_OFFLOAD_MATCH_RULE,
+	MLX5_TUNNEL_OFFLOAD_MISS_RULE,
+};
+
 /** Device flow structure. */
 __extension__
 struct mlx5_flow {
@@ -774,6 +784,7 @@ struct mlx5_flow {
 	struct mlx5_flow_handle *handle;
 	uint32_t handle_idx; /* Index of the mlx5 flow handle memory. */
 	const struct mlx5_flow_tunnel *tunnel;
+	enum mlx5_tof_rule_type tof_type;
 };
 
 /* Flow meter state. */
@@ -983,10 +994,10 @@ mlx5_tunnel_hub(struct rte_eth_dev *dev)
 }
 
 static inline bool
-is_tunnel_offload_active(struct rte_eth_dev *dev)
+is_tunnel_offload_active(const struct rte_eth_dev *dev)
 {
 #ifdef HAVE_IBV_FLOW_DV_SUPPORT
-	struct mlx5_priv *priv = dev->data->dev_private;
+	const struct mlx5_priv *priv = dev->data->dev_private;
 	return !!priv->config.dv_miss_info;
 #else
 	RTE_SET_USED(dev);
@@ -995,23 +1006,15 @@ is_tunnel_offload_active(struct rte_eth_dev *dev)
 }
 
 static inline bool
-is_flow_tunnel_match_rule(__rte_unused struct rte_eth_dev *dev,
-			  __rte_unused const struct rte_flow_attr *attr,
-			  __rte_unused const struct rte_flow_item items[],
-			  __rte_unused const struct rte_flow_action actions[])
+is_flow_tunnel_match_rule(enum mlx5_tof_rule_type tof_rule_type)
 {
-	return (items[0].type == (typeof(items[0].type))
-				 MLX5_RTE_FLOW_ITEM_TYPE_TUNNEL);
+	return tof_rule_type == MLX5_TUNNEL_OFFLOAD_MATCH_RULE;
 }
 
 static inline bool
-is_flow_tunnel_steer_rule(__rte_unused struct rte_eth_dev *dev,
-			  __rte_unused const struct rte_flow_attr *attr,
-			  __rte_unused const struct rte_flow_item items[],
-			  __rte_unused const struct rte_flow_action actions[])
+is_flow_tunnel_steer_rule(enum mlx5_tof_rule_type tof_rule_type)
 {
-	return (actions[0].type == (typeof(actions[0].type))
-				   MLX5_RTE_FLOW_ACTION_TYPE_TUNNEL_SET);
+	return tof_rule_type == MLX5_TUNNEL_OFFLOAD_SET_RULE;
 }
 
 static inline const struct mlx5_flow_tunnel *
@@ -1252,11 +1255,10 @@ struct flow_grp_info {
 
 static inline bool
 tunnel_use_standard_attr_group_translate
-		    (struct rte_eth_dev *dev,
-		     const struct mlx5_flow_tunnel *tunnel,
+		    (const struct rte_eth_dev *dev,
 		     const struct rte_flow_attr *attr,
-		     const struct rte_flow_item items[],
-		     const struct rte_flow_action actions[])
+		     const struct mlx5_flow_tunnel *tunnel,
+		     enum mlx5_tof_rule_type tof_rule_type)
 {
 	bool verdict;
 
@@ -1272,7 +1274,7 @@ tunnel_use_standard_attr_group_translate
 		 * method
 		 */
 		verdict = !attr->group &&
-			  is_flow_tunnel_steer_rule(dev, attr, items, actions);
+			  is_flow_tunnel_steer_rule(tof_rule_type);
 	} else {
 		/*
 		 * non-tunnel group translation uses standard method for
@@ -1505,4 +1507,10 @@ void flow_dv_dest_array_remove_cb(struct mlx5_cache_list *list,
 				  struct mlx5_cache_entry *entry);
 struct mlx5_aso_age_action *flow_aso_age_get_by_idx(struct rte_eth_dev *dev,
 						    uint32_t age_idx);
+const struct mlx5_flow_tunnel *
+mlx5_get_tof(const struct rte_flow_item *items,
+	     const struct rte_flow_action *actions,
+	     enum mlx5_tof_rule_type *rule_type);
+
+
 #endif /* RTE_PMD_MLX5_FLOW_H_ */
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index a1d1579991..5a5a33172a 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -5323,32 +5323,33 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 	int16_t rw_act_num = 0;
 	uint64_t is_root;
 	const struct mlx5_flow_tunnel *tunnel;
+	enum mlx5_tof_rule_type tof_rule_type;
 	struct flow_grp_info grp_info = {
 		.external = !!external,
 		.transfer = !!attr->transfer,
 		.fdb_def_rule = !!priv->fdb_def_rule,
+		.std_tbl_fix = true,
 	};
 	const struct rte_eth_hairpin_conf *conf;
 
 	if (items == NULL)
 		return -1;
-	if (is_flow_tunnel_match_rule(dev, attr, items, actions)) {
-		tunnel = flow_items_to_tunnel(items);
-		action_flags |= MLX5_FLOW_ACTION_TUNNEL_MATCH |
-				MLX5_FLOW_ACTION_DECAP;
-	} else if (is_flow_tunnel_steer_rule(dev, attr, items, actions)) {
-		tunnel = flow_actions_to_tunnel(actions);
-		action_flags |= MLX5_FLOW_ACTION_TUNNEL_SET;
-	} else {
-		tunnel = NULL;
+	tunnel = is_tunnel_offload_active(dev) ?
+		 mlx5_get_tof(items, actions, &tof_rule_type) : NULL;
+	if (tunnel) {
+		if (priv->representor)
+			return rte_flow_error_set
+				(error, ENOTSUP,
+				 RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+				 NULL, "decap not supported for VF representor");
+		if (tof_rule_type == MLX5_TUNNEL_OFFLOAD_SET_RULE)
+			action_flags |= MLX5_FLOW_ACTION_TUNNEL_SET;
+		else if (tof_rule_type == MLX5_TUNNEL_OFFLOAD_MATCH_RULE)
+			action_flags |= MLX5_FLOW_ACTION_TUNNEL_MATCH |
+					MLX5_FLOW_ACTION_DECAP;
+		grp_info.std_tbl_fix = tunnel_use_standard_attr_group_translate
+					(dev, attr, tunnel, tof_rule_type);
 	}
-	if (tunnel && priv->representor)
-		return rte_flow_error_set(error, ENOTSUP,
-					  RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
-					  "decap not supported "
-					  "for VF representor");
-	grp_info.std_tbl_fix = tunnel_use_standard_attr_group_translate
-				(dev, tunnel, attr, items, actions);
 	ret = flow_dv_validate_attributes(dev, tunnel, attr, &grp_info, error);
 	if (ret < 0)
 		return ret;
@@ -5362,15 +5363,6 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 						  RTE_FLOW_ERROR_TYPE_ITEM,
 						  NULL, "item not supported");
 		switch (type) {
-		case MLX5_RTE_FLOW_ITEM_TYPE_TUNNEL:
-			if (items[0].type != (typeof(items[0].type))
-						MLX5_RTE_FLOW_ITEM_TYPE_TUNNEL)
-				return rte_flow_error_set
-						(error, EINVAL,
-						RTE_FLOW_ERROR_TYPE_ITEM,
-						NULL, "MLX5 private items "
-						"must be the first");
-			break;
 		case RTE_FLOW_ITEM_TYPE_VOID:
 			break;
 		case RTE_FLOW_ITEM_TYPE_PORT_ID:
@@ -5631,6 +5623,11 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 				return ret;
 			last_item = MLX5_FLOW_LAYER_ECPRI;
 			break;
+		case MLX5_RTE_FLOW_ITEM_TYPE_TUNNEL:
+			/* tunnel offload item was processed before
+			 * list it here as a supported type
+			 */
+			break;
 		default:
 			return rte_flow_error_set(error, ENOTSUP,
 						  RTE_FLOW_ERROR_TYPE_ITEM,
@@ -6099,15 +6096,9 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
 			++actions_n;
 			break;
 		case MLX5_RTE_FLOW_ACTION_TYPE_TUNNEL_SET:
-			if (actions[0].type != (typeof(actions[0].type))
-				MLX5_RTE_FLOW_ACTION_TYPE_TUNNEL_SET)
-				return rte_flow_error_set
-						(error, EINVAL,
-						RTE_FLOW_ERROR_TYPE_ACTION,
-						NULL, "MLX5 private action "
-						"must be the first");
-
-			action_flags |= MLX5_FLOW_ACTION_TUNNEL_SET;
+			/* tunnel offload action was processed before
+			 * list it here as a supported type
+			 */
 			break;
 		default:
 			return rte_flow_error_set(error, ENOTSUP,
@@ -9730,12 +9721,13 @@ flow_dv_translate(struct rte_eth_dev *dev,
 	int tmp_actions_n = 0;
 	uint32_t table;
 	int ret = 0;
-	const struct mlx5_flow_tunnel *tunnel;
+	const struct mlx5_flow_tunnel *tunnel = NULL;
 	struct flow_grp_info grp_info = {
 		.external = !!dev_flow->external,
 		.transfer = !!attr->transfer,
 		.fdb_def_rule = !!priv->fdb_def_rule,
 		.skip_scale = !!dev_flow->skip_scale,
+		.std_tbl_fix = true,
 	};
 
 	if (!wks)
@@ -9750,15 +9742,21 @@ flow_dv_translate(struct rte_eth_dev *dev,
 					   MLX5DV_FLOW_TABLE_TYPE_NIC_RX;
 	/* update normal path action resource into last index of array */
 	sample_act = &mdest_res.sample_act[MLX5_MAX_DEST_NUM - 1];
-	tunnel = is_flow_tunnel_match_rule(dev, attr, items, actions) ?
-		 flow_items_to_tunnel(items) :
-		 is_flow_tunnel_steer_rule(dev, attr, items, actions) ?
-		 flow_actions_to_tunnel(actions) :
-		 dev_flow->tunnel ? dev_flow->tunnel : NULL;
+	if (is_tunnel_offload_active(dev)) {
+		if (dev_flow->tunnel) {
+			RTE_VERIFY(dev_flow->tof_type ==
+				   MLX5_TUNNEL_OFFLOAD_MISS_RULE);
+			tunnel = dev_flow->tunnel;
+		} else {
+			tunnel = mlx5_get_tof(items, actions,
+					      &dev_flow->tof_type);
+			dev_flow->tunnel = tunnel;
+		}
+		grp_info.std_tbl_fix = tunnel_use_standard_attr_group_translate
+					(dev, attr, tunnel, dev_flow->tof_type);
+	}
 	mhdr_res->ft_type = attr->egress ? MLX5DV_FLOW_TABLE_TYPE_NIC_TX :
 					   MLX5DV_FLOW_TABLE_TYPE_NIC_RX;
-	grp_info.std_tbl_fix = tunnel_use_standard_attr_group_translate
-				(dev, tunnel, attr, items, actions);
 	ret = mlx5_flow_group_to_table(dev, tunnel, attr->group, &table,
 				       &grp_info, error);
 	if (ret)
@@ -9770,7 +9768,7 @@ flow_dv_translate(struct rte_eth_dev *dev,
 		priority = dev_conf->flow_prio - 1;
 	/* number of actions must be set to 0 in case of dirty stack. */
 	mhdr_res->actions_num = 0;
-	if (is_flow_tunnel_match_rule(dev, attr, items, actions)) {
+	if (is_flow_tunnel_match_rule(dev_flow->tof_type)) {
 		/*
 		 * do not add decap action if match rule drops packet
 		 * HW rejects rules with decap & drop
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.955671100 +0800
+++ 0132-net-mlx5-fix-tunnel-offload-private-items-location.patch	2021-06-12 06:53:56.570000000 +0800
@@ -1 +1 @@
-From 8c5a231bce3adb2088252fea73df70bf9d7fb329 Mon Sep 17 00:00:00 2001
+From 96883cec2af4f2921287d451c73f93a6d4e47772 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 8c5a231bce3adb2088252fea73df70bf9d7fb329 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -20,4 +22,4 @@
- drivers/net/mlx5/mlx5_flow.c    | 48 ++++++++++++------
- drivers/net/mlx5/mlx5_flow.h    | 46 ++++++++++-------
- drivers/net/mlx5/mlx5_flow_dv.c | 88 ++++++++++++++++-----------------
- 3 files changed, 102 insertions(+), 80 deletions(-)
+ drivers/net/mlx5/mlx5_flow.c    | 48 ++++++++++++-------
+ drivers/net/mlx5/mlx5_flow.h    | 46 ++++++++++--------
+ drivers/net/mlx5/mlx5_flow_dv.c | 84 ++++++++++++++++-----------------
+ 3 files changed, 100 insertions(+), 78 deletions(-)
@@ -26 +28 @@
-index 32634c9af7..8c375f1aac 100644
+index d976ca9a8d..cab0aee567 100644
@@ -37 +39 @@
-@@ -5968,22 +5969,14 @@ flow_create_split_outer(struct rte_eth_dev *dev,
+@@ -5183,22 +5184,14 @@ flow_create_split_outer(struct rte_eth_dev *dev,
@@ -63 +65 @@
-@@ -6178,12 +6171,11 @@ flow_list_create(struct rte_eth_dev *dev, uint32_t *list,
+@@ -5392,12 +5385,11 @@ flow_list_create(struct rte_eth_dev *dev, uint32_t *list,
@@ -78 +80 @@
-@@ -6247,7 +6239,7 @@ flow_list_create(struct rte_eth_dev *dev, uint32_t *list,
+@@ -5461,7 +5453,7 @@ flow_list_create(struct rte_eth_dev *dev, uint32_t *list,
@@ -87 +89 @@
-@@ -8159,6 +8151,28 @@ int rte_pmd_mlx5_sync_flow(uint16_t port_id, uint32_t domains)
+@@ -7210,6 +7202,28 @@ int rte_pmd_mlx5_sync_flow(uint16_t port_id, uint32_t domains)
@@ -116 +118 @@
-@@ -8189,13 +8203,13 @@ flow_tunnel_add_default_miss(struct rte_eth_dev *dev,
+@@ -7240,13 +7254,13 @@ flow_tunnel_add_default_miss(struct rte_eth_dev *dev,
@@ -131 +133 @@
-@@ -8281,6 +8295,7 @@ flow_tunnel_add_default_miss(struct rte_eth_dev *dev,
+@@ -7332,6 +7346,7 @@ flow_tunnel_add_default_miss(struct rte_eth_dev *dev,
@@ -139 +141 @@
-@@ -8894,6 +8909,7 @@ flow_tunnel_add_default_miss(__rte_unused struct rte_eth_dev *dev,
+@@ -7926,6 +7941,7 @@ flow_tunnel_add_default_miss(__rte_unused struct rte_eth_dev *dev,
@@ -148 +150 @@
-index 5365699426..04c8806bf6 100644
+index 293c60f5b4..9b72cde5ff 100644
@@ -151 +153 @@
-@@ -819,6 +819,16 @@ struct mlx5_flow_verbs_workspace {
+@@ -753,6 +753,16 @@ struct mlx5_flow_verbs_workspace {
@@ -168 +170 @@
-@@ -854,6 +864,7 @@ struct mlx5_flow {
+@@ -774,6 +784,7 @@ struct mlx5_flow {
@@ -176 +178 @@
-@@ -949,10 +960,10 @@ mlx5_tunnel_hub(struct rte_eth_dev *dev)
+@@ -983,10 +994,10 @@ mlx5_tunnel_hub(struct rte_eth_dev *dev)
@@ -189 +191 @@
-@@ -961,23 +972,15 @@ is_tunnel_offload_active(struct rte_eth_dev *dev)
+@@ -995,23 +1006,15 @@ is_tunnel_offload_active(struct rte_eth_dev *dev)
@@ -217 +219 @@
-@@ -1273,11 +1276,10 @@ struct flow_grp_info {
+@@ -1252,11 +1255,10 @@ struct flow_grp_info {
@@ -232 +234 @@
-@@ -1293,7 +1295,7 @@ tunnel_use_standard_attr_group_translate
+@@ -1272,7 +1274,7 @@ tunnel_use_standard_attr_group_translate
@@ -241,4 +243,4 @@
-@@ -1681,4 +1683,10 @@ int mlx5_flow_create_def_policy(struct rte_eth_dev *dev);
- void mlx5_flow_destroy_def_policy(struct rte_eth_dev *dev);
- void flow_drv_rxq_flags_set(struct rte_eth_dev *dev,
- 		       struct mlx5_flow_handle *dev_handle);
+@@ -1505,4 +1507,10 @@ void flow_dv_dest_array_remove_cb(struct mlx5_cache_list *list,
+ 				  struct mlx5_cache_entry *entry);
+ struct mlx5_aso_age_action *flow_aso_age_get_by_idx(struct rte_eth_dev *dev,
+ 						    uint32_t age_idx);
@@ -253 +255 @@
-index 70e8d0b113..10ca342edc 100644
+index a1d1579991..5a5a33172a 100644
@@ -256,2 +258,2 @@
-@@ -6627,10 +6627,12 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
- 	uint32_t rw_act_num = 0;
+@@ -5323,32 +5323,33 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+ 	int16_t rw_act_num = 0;
@@ -268,2 +269,0 @@
- 	const struct rte_flow_item *rule_items = items;
-@@ -6638,23 +6640,22 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -308 +308 @@
-@@ -6668,15 +6669,6 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
+@@ -5362,15 +5363,6 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -324,2 +324 @@
-@@ -6975,6 +6967,11 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
- 			if (ret < 0)
+@@ -5631,6 +5623,11 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -326,0 +326 @@
+ 			last_item = MLX5_FLOW_LAYER_ECPRI;
@@ -336,2 +336 @@
-@@ -7516,17 +7513,6 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
- 			action_flags |= MLX5_FLOW_ACTION_SAMPLE;
+@@ -6099,15 +6096,9 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
@@ -340 +339 @@
--		case MLX5_RTE_FLOW_ACTION_TYPE_TUNNEL_SET:
+ 		case MLX5_RTE_FLOW_ACTION_TYPE_TUNNEL_SET:
@@ -350,9 +348,0 @@
--			break;
- 		case RTE_FLOW_ACTION_TYPE_MODIFY_FIELD:
- 			ret = flow_dv_validate_action_modify_field(dev,
- 								   action_flags,
-@@ -7551,6 +7537,11 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,
- 				return ret;
- 			action_flags |= MLX5_FLOW_ACTION_CT;
- 			break;
-+		case MLX5_RTE_FLOW_ACTION_TYPE_TUNNEL_SET:
@@ -362 +352 @@
-+			break;
+ 			break;
@@ -365,2 +355 @@
- 						  RTE_FLOW_ERROR_TYPE_ACTION,
-@@ -12035,13 +12026,14 @@ flow_dv_translate(struct rte_eth_dev *dev,
+@@ -9730,12 +9721,13 @@ flow_dv_translate(struct rte_eth_dev *dev,
@@ -376,2 +365 @@
- 		.skip_scale = dev_flow->skip_scale &
- 			(1 << MLX5_SCALE_FLOW_GROUP_BIT),
+ 		.skip_scale = !!dev_flow->skip_scale,
@@ -380 +367,0 @@
- 	const struct rte_flow_item *head_item = items;
@@ -382 +369,2 @@
-@@ -12057,15 +12049,21 @@ flow_dv_translate(struct rte_eth_dev *dev,
+ 	if (!wks)
+@@ -9750,15 +9742,21 @@ flow_dv_translate(struct rte_eth_dev *dev,
@@ -411,2 +399,2 @@
-@@ -12075,7 +12073,7 @@ flow_dv_translate(struct rte_eth_dev *dev,
- 		mhdr_res->ft_type = MLX5DV_FLOW_TABLE_TYPE_FDB;
+@@ -9770,7 +9768,7 @@ flow_dv_translate(struct rte_eth_dev *dev,
+ 		priority = dev_conf->flow_prio - 1;

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/ena: indicate Rx RSS hash presence' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (130 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/mlx5: fix tunnel offload private items location' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ice: fix VSI array out of bounds access' " Xueming Li
                       ` (45 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Michal Krawczyk; +Cc: Luca Boccassi, Igor Chauskin, Amit Bernstein, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e5c01fbc22f9cb6551b12e303a27423cd83187b7

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e5c01fbc22f9cb6551b12e303a27423cd83187b7 Mon Sep 17 00:00:00 2001
From: Michal Krawczyk <mk@semihalf.com>
Date: Wed, 12 May 2021 12:13:44 +0200
Subject: [PATCH] net/ena: indicate Rx RSS hash presence
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit b418f0d29977f031e18185d78198f2717bcfb361 ]

To make it possible to the app to determine if the hash was calculated
for the packet or not, the PKT_RX_RSS_HASH should be set in the mbuf's
ol_flags.

As the PMD wasn't setting that, the application couldn't check if there
is a hash in a proper way.

The hash is valid only if it's UDP or TCP and the IP packet wasn't
fragmented.

Fixes: e5df9f33db00 ("net/ena: fix passing RSS hash to mbuf")

Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
Reviewed-by: Amit Bernstein <amitbern@amazon.com>
---
 drivers/net/ena/ena_ethdev.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index aa497ba985..69198a6435 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -51,6 +51,8 @@
 
 #define ENA_MIN_RING_DESC	128
 
+#define ENA_PTYPE_HAS_HASH	(RTE_PTYPE_L4_TCP | RTE_PTYPE_L4_UDP)
+
 enum ethtool_stringset {
 	ETH_SS_TEST             = 0,
 	ETH_SS_STATS,
@@ -314,6 +316,11 @@ static inline void ena_rx_mbuf_prepare(struct rte_mbuf *mbuf,
 		else
 			ol_flags |= PKT_RX_L4_CKSUM_GOOD;
 
+	if (likely((packet_type & ENA_PTYPE_HAS_HASH) && !ena_rx_ctx->frag)) {
+		ol_flags |= PKT_RX_RSS_HASH;
+		mbuf->hash.rss = ena_rx_ctx->hash;
+	}
+
 	mbuf->ol_flags = ol_flags;
 	mbuf->packet_type = packet_type;
 }
@@ -1954,6 +1961,9 @@ static int ena_dev_configure(struct rte_eth_dev *dev)
 
 	adapter->state = ENA_ADAPTER_STATE_CONFIG;
 
+	if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)
+		dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
+
 	adapter->tx_selected_offloads = dev->data->dev_conf.txmode.offloads;
 	adapter->rx_selected_offloads = dev->data->dev_conf.rxmode.offloads;
 	return 0;
@@ -2030,6 +2040,7 @@ static int ena_infos_get(struct rte_eth_dev *dev,
 
 	/* Inform framework about available features */
 	dev_info->rx_offload_capa = rx_feat;
+	dev_info->rx_offload_capa |= DEV_RX_OFFLOAD_RSS_HASH;
 	dev_info->rx_queue_offload_capa = rx_feat;
 	dev_info->tx_offload_capa = tx_feat;
 	dev_info->tx_queue_offload_capa = tx_feat;
@@ -2242,8 +2253,6 @@ static uint16_t eth_ena_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
 			++rx_ring->rx_stats.bad_csum;
 		}
 
-		mbuf->hash.rss = ena_rx_ctx.hash;
-
 		rx_pkts[completed] = mbuf;
 		rx_ring->rx_stats.bytes += mbuf->pkt_len;
 	}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:53:59.995437300 +0800
+++ 0133-net-ena-indicate-Rx-RSS-hash-presence.patch	2021-06-12 06:53:56.570000000 +0800
@@ -1 +1 @@
-From b418f0d29977f031e18185d78198f2717bcfb361 Mon Sep 17 00:00:00 2001
+From e5c01fbc22f9cb6551b12e303a27423cd83187b7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit b418f0d29977f031e18185d78198f2717bcfb361 ]
@@ -17 +19,0 @@
-Cc: stable@dpdk.org
@@ -23,16 +25,3 @@
- doc/guides/rel_notes/release_21_05.rst |  1 +
- drivers/net/ena/ena_ethdev.c           | 13 +++++++++++--
- 2 files changed, 12 insertions(+), 2 deletions(-)
-
-diff --git a/doc/guides/rel_notes/release_21_05.rst b/doc/guides/rel_notes/release_21_05.rst
-index bb8fe03b0b..98cdc85888 100644
---- a/doc/guides/rel_notes/release_21_05.rst
-+++ b/doc/guides/rel_notes/release_21_05.rst
-@@ -118,6 +118,7 @@ New Features
- 
-   * Changed memcpy mapping to the dpdk-optimized version.
-   * Updated ena_com (HAL) to the latest version.
-+  * Added indication of the RSS hash presence in the mbuf.
- 
- * **Updated Arkville PMD driver.**
- 
+ drivers/net/ena/ena_ethdev.c | 13 +++++++++++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
+
@@ -40 +29 @@
-index 54d5e756cb..fb2b19cfdb 100644
+index aa497ba985..69198a6435 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/ice: fix VSI array out of bounds access' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (131 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena: indicate Rx RSS hash presence' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/i40e: fix VF RSS configuration' " Xueming Li
                       ` (44 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Jie Wang; +Cc: Luca Boccassi, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2e077407fee708a0f6052ed44b33e7abcea598b7

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2e077407fee708a0f6052ed44b33e7abcea598b7 Mon Sep 17 00:00:00 2001
From: Jie Wang <jie1x.wang@intel.com>
Date: Wed, 12 May 2021 03:14:07 +0000
Subject: [PATCH] net/ice: fix VSI array out of bounds access
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit d7ea27d065ebe3206c0739c67bf66510c0ac79a1 ]

In the loop, when the index of array "vsi->rss_key" is equal
to "vsi->rss_key_size", the array will be accessed out of bounds.

Fixes: 50370662b727 ("net/ice: support device and queue ops")

Signed-off-by: Jie Wang <jie1x.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 2d265fbaa6..40498f038a 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -3227,7 +3227,7 @@ static int ice_init_rss(struct ice_pf *pf)
 	/* configure RSS key */
 	if (!rss_conf->rss_key) {
 		/* Calculate the default hash key */
-		for (i = 0; i <= vsi->rss_key_size; i++)
+		for (i = 0; i < vsi->rss_key_size; i++)
 			vsi->rss_key[i] = (uint8_t)rte_rand();
 	} else {
 		rte_memcpy(vsi->rss_key, rss_conf->rss_key,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.018108600 +0800
+++ 0134-net-ice-fix-VSI-array-out-of-bounds-access.patch	2021-06-12 06:53:56.580000000 +0800
@@ -1 +1 @@
-From d7ea27d065ebe3206c0739c67bf66510c0ac79a1 Mon Sep 17 00:00:00 2001
+From 2e077407fee708a0f6052ed44b33e7abcea598b7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit d7ea27d065ebe3206c0739c67bf66510c0ac79a1 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index f742d07fc2..5fd5f99b6f 100644
+index 2d265fbaa6..40498f038a 100644
@@ -22 +24 @@
-@@ -3040,7 +3040,7 @@ static int ice_init_rss(struct ice_pf *pf)
+@@ -3227,7 +3227,7 @@ static int ice_init_rss(struct ice_pf *pf)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/i40e: fix VF RSS configuration' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (132 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ice: fix VSI array out of bounds access' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/igc: fix speed " Xueming Li
                       ` (43 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Luca Boccassi, Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e0305fc830c22d7c4ca253269c704c03efe968f4

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From e0305fc830c22d7c4ca253269c704c03efe968f4 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Wed, 12 May 2021 17:23:11 +0800
Subject: [PATCH] net/i40e: fix VF RSS configuration
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 7594f2dac4489cde35f7088a46b8133fd4738a4a ]

The kernel driver supports VF RSS configuration message
"VIRTCHNL_OP_GET_RSS_HENA_CAPS and VIRTCHNL_OP_SET_RSS_HENA",
this patch adds PMD support for these messages.

Fixes: b81295c474b0 ("net/i40e: add user callback for VF to PF message")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_pf.c | 61 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
index d6f5698342..0a2fa17580 100644
--- a/drivers/net/i40e/i40e_pf.c
+++ b/drivers/net/i40e/i40e_pf.c
@@ -29,6 +29,28 @@
 
 #define I40E_CFG_CRCSTRIP_DEFAULT 1
 
+/* Supported RSS offloads */
+#define I40E_DEFAULT_RSS_HENA ( \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_UDP) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_SCTP) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_TCP) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_OTHER) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV4) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_UDP) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_TCP) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_SCTP) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_OTHER) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV6) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_L2_PAYLOAD))
+
+#define I40E_DEFAULT_RSS_HENA_EXPANDED (I40E_DEFAULT_RSS_HENA | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP) | \
+	BIT_ULL(I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP))
+
 static int
 i40e_pf_host_switch_queues(struct i40e_pf_vf *vf,
 			   struct virtchnl_queue_select *qsel,
@@ -1288,6 +1310,37 @@ i40e_pf_host_process_cmd_request_queues(struct i40e_pf_vf *vf, uint8_t *msg)
 				(u8 *)vfres, sizeof(*vfres));
 }
 
+static void
+i40e_pf_host_process_cmd_get_rss_hena(struct i40e_pf_vf *vf)
+{
+	struct virtchnl_rss_hena vrh = {0};
+	struct i40e_pf *pf = vf->pf;
+
+	if (pf->adapter->hw.mac.type == I40E_MAC_X722)
+		vrh.hena = I40E_DEFAULT_RSS_HENA_EXPANDED;
+	else
+		vrh.hena = I40E_DEFAULT_RSS_HENA;
+
+	i40e_pf_host_send_msg_to_vf(vf, VIRTCHNL_OP_GET_RSS_HENA_CAPS,
+				    I40E_SUCCESS, (uint8_t *)&vrh, sizeof(vrh));
+}
+
+static void
+i40e_pf_host_process_cmd_set_rss_hena(struct i40e_pf_vf *vf, uint8_t *msg)
+{
+	struct virtchnl_rss_hena *vrh =
+		(struct virtchnl_rss_hena *)msg;
+	struct i40e_hw *hw = &vf->pf->adapter->hw;
+
+	i40e_write_rx_ctl(hw, I40E_VFQF_HENA1(0, vf->vf_idx),
+			  (uint32_t)vrh->hena);
+	i40e_write_rx_ctl(hw, I40E_VFQF_HENA1(1, vf->vf_idx),
+			  (uint32_t)(vrh->hena >> 32));
+
+	i40e_pf_host_send_msg_to_vf(vf, VIRTCHNL_OP_SET_RSS_HENA,
+				    I40E_SUCCESS, NULL, 0);
+}
+
 void
 i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,
 			   uint16_t abs_vf_id, uint32_t opcode,
@@ -1458,6 +1511,14 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,
 		PMD_DRV_LOG(INFO, "OP_REQUEST_QUEUES received");
 		i40e_pf_host_process_cmd_request_queues(vf, msg);
 		break;
+	case VIRTCHNL_OP_GET_RSS_HENA_CAPS:
+		PMD_DRV_LOG(INFO, "OP_GET_RSS_HENA_CAPS received");
+		i40e_pf_host_process_cmd_get_rss_hena(vf);
+		break;
+	case VIRTCHNL_OP_SET_RSS_HENA:
+		PMD_DRV_LOG(INFO, "OP_SET_RSS_HENA received");
+		i40e_pf_host_process_cmd_set_rss_hena(vf, msg);
+		break;
 
 	/* Don't add command supported below, which will
 	 * return an error code.
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.040097000 +0800
+++ 0135-net-i40e-fix-VF-RSS-configuration.patch	2021-06-12 06:53:56.580000000 +0800
@@ -1 +1 @@
-From 7594f2dac4489cde35f7088a46b8133fd4738a4a Mon Sep 17 00:00:00 2001
+From e0305fc830c22d7c4ca253269c704c03efe968f4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 7594f2dac4489cde35f7088a46b8133fd4738a4a ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 9804ed4253..e2d8b2b5f7 100644
+index d6f5698342..0a2fa17580 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/igc: fix speed configuration' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (133 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/i40e: fix VF RSS configuration' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/bnx2x: fix build with GCC 11' " Xueming Li
                       ` (42 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Luca Boccassi, Junfeng Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a83980d0798724945c4c3dda009bd6c93069e3ea

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a83980d0798724945c4c3dda009bd6c93069e3ea Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang@intel.com>
Date: Wed, 12 May 2021 16:28:26 +0800
Subject: [PATCH] net/igc: fix speed configuration
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit a4d5f9f9c21ba8e28de82b5107ed1b5166cefe83 ]

Fixed speed mode is not supported currently, this patch
removes configurations for this mode and adds fault handling
for ETH_LINK_SPEED_FIXED.

Fixes: 4f09bc55ac3d ("net/igc: implement device base operations")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Acked-by: Junfeng Guo <junfeng.guo@intel.com>
---
 drivers/net/igc/igc_ethdev.c | 26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)

diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
index 44b35d07ae..673996314b 100644
--- a/drivers/net/igc/igc_ethdev.c
+++ b/drivers/net/igc/igc_ethdev.c
@@ -989,15 +989,20 @@ eth_igc_start(struct rte_eth_dev *dev)
 		hw->mac.autoneg = 1;
 	} else {
 		int num_speeds = 0;
-		bool autoneg = (*speeds & ETH_LINK_SPEED_FIXED) == 0;
 
-		/* Reset */
+		if (*speeds & ETH_LINK_SPEED_FIXED) {
+			PMD_DRV_LOG(ERR,
+				    "Force speed mode currently not supported");
+			igc_dev_clear_queues(dev);
+			return -EINVAL;
+		}
+
 		hw->phy.autoneg_advertised = 0;
+		hw->mac.autoneg = 1;
 
 		if (*speeds & ~(ETH_LINK_SPEED_10M_HD | ETH_LINK_SPEED_10M |
 				ETH_LINK_SPEED_100M_HD | ETH_LINK_SPEED_100M |
-				ETH_LINK_SPEED_1G | ETH_LINK_SPEED_2_5G |
-				ETH_LINK_SPEED_FIXED)) {
+				ETH_LINK_SPEED_1G | ETH_LINK_SPEED_2_5G)) {
 			num_speeds = -1;
 			goto error_invalid_config;
 		}
@@ -1025,19 +1030,8 @@ eth_igc_start(struct rte_eth_dev *dev)
 			hw->phy.autoneg_advertised |= ADVERTISE_2500_FULL;
 			num_speeds++;
 		}
-		if (num_speeds == 0 || (!autoneg && num_speeds > 1))
+		if (num_speeds == 0)
 			goto error_invalid_config;
-
-		/* Set/reset the mac.autoneg based on the link speed,
-		 * fixed or not
-		 */
-		if (!autoneg) {
-			hw->mac.autoneg = 0;
-			hw->mac.forced_speed_duplex =
-					hw->phy.autoneg_advertised;
-		} else {
-			hw->mac.autoneg = 1;
-		}
 	}
 
 	igc_setup_link(hw);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.065331000 +0800
+++ 0136-net-igc-fix-speed-configuration.patch	2021-06-12 06:53:56.580000000 +0800
@@ -1 +1 @@
-From a4d5f9f9c21ba8e28de82b5107ed1b5166cefe83 Mon Sep 17 00:00:00 2001
+From a83980d0798724945c4c3dda009bd6c93069e3ea Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit a4d5f9f9c21ba8e28de82b5107ed1b5166cefe83 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index b1c58fb3de..224a095483 100644
+index 44b35d07ae..673996314b 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/bnx2x: fix build with GCC 11' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (134 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/igc: fix speed " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` Xueming Li
                       ` (41 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Luca Boccassi, Kevin Traynor, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/724378c1a14cab60494c3da98714f474f06e0745

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 724378c1a14cab60494c3da98714f474f06e0745 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 11 May 2021 14:14:32 +0100
Subject: [PATCH] net/bnx2x: fix build with GCC 11
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit b3c740e03751215ab01841975b8f5764023f953b ]

Reproduced with '--buildtype=debugoptimized' config,
compiler version: gcc (GCC) 12.0.0 20210509 (experimental)

Build error:
In file included from ../drivers/net/bnx2x/bnx2x_rxtx.c:8:
../drivers/net/bnx2x/bnx2x_rxtx.c: In function ‘bnx2x_upd_rx_prod_fast’:
../drivers/net/bnx2x/bnx2x.h:1528:35:
    warning: ‘rx_prods’ is used uninitialized [-Wuninitialized]
 #define REG_WR32(sc, offset, val) bnx2x_reg_write32(sc, (offset), val)
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/net/bnx2x/bnx2x.h:1531:33:
	note: in expansion of macro ‘REG_WR32’
 1531 | #define REG_WR(sc, offset, val) REG_WR32(sc, offset, val)
      |                                 ^~~~~~~~
../drivers/net/bnx2x/bnx2x_rxtx.c:331:9:
	note: in expansion of macro ‘REG_WR’
  331 |         REG_WR(sc, fp->ustorm_rx_prods_offset, val[0]);
      |         ^~~~~~
../drivers/net/bnx2x/bnx2x_rxtx.c:324:40: note: ‘rx_prods’ declared here
  324 |         struct ustorm_eth_rx_producers rx_prods = { 0 };
      |                                        ^~~~~~~~

REG_WR32 requires 'uint32_t', use union instead of cast to 'uint32_t'.

Bugzilla ID: 692
Fixes: 38dff79ba736 ("net/bnx2x: update HSI")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
---
 drivers/net/bnx2x/bnx2x_rxtx.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/net/bnx2x/bnx2x_rxtx.c
index 57e2ce5045..2b17602290 100644
--- a/drivers/net/bnx2x/bnx2x_rxtx.c
+++ b/drivers/net/bnx2x/bnx2x_rxtx.c
@@ -321,14 +321,15 @@ static inline void
 bnx2x_upd_rx_prod_fast(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp,
 		uint16_t rx_bd_prod, uint16_t rx_cq_prod)
 {
-	struct ustorm_eth_rx_producers rx_prods = { 0 };
-	uint32_t *val = NULL;
+	union {
+		struct ustorm_eth_rx_producers rx_prods;
+		uint32_t val;
+	} val = { {0} };
 
-	rx_prods.bd_prod  = rx_bd_prod;
-	rx_prods.cqe_prod = rx_cq_prod;
+	val.rx_prods.bd_prod  = rx_bd_prod;
+	val.rx_prods.cqe_prod = rx_cq_prod;
 
-	val = (uint32_t *)&rx_prods;
-	REG_WR(sc, fp->ustorm_rx_prods_offset, val[0]);
+	REG_WR(sc, fp->ustorm_rx_prods_offset, val.val);
 }
 
 static uint16_t
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.087592400 +0800
+++ 0137-net-bnx2x-fix-build-with-GCC-11.patch	2021-06-12 06:53:56.580000000 +0800
@@ -1 +1 @@
-From b3c740e03751215ab01841975b8f5764023f953b Mon Sep 17 00:00:00 2001
+From 724378c1a14cab60494c3da98714f474f06e0745 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit b3c740e03751215ab01841975b8f5764023f953b ]
@@ -35 +37,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/bnx2x: fix build with GCC 11' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (135 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/bnx2x: fix build with GCC 11' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ice/base: " Xueming Li
                       ` (40 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Luca Boccassi, Kevin Traynor, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/84c5ec250561c8493c270d928f02bb4f2d226ecd

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 84c5ec250561c8493c270d928f02bb4f2d226ecd Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 11 May 2021 14:14:33 +0100
Subject: [PATCH] net/bnx2x: fix build with GCC 11
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit ab70be7e2d971dd0238da10322ac19209917b8ca ]

Reproduced with '--buildtype=debugoptimized' config,
compiler version: gcc (GCC) 12.0.0 20210509 (experimental)

Build error:
In file included from ../drivers/net/bnx2x/bnx2x.c:16:
../drivers/net/bnx2x/bnx2x.c: In function ‘bnx2x_hc_ack_sb’:
../drivers/net/bnx2x/bnx2x.h:1528:35:
         warning: ‘igu_ack’ is used uninitialized [-Wuninitialized]
 #define REG_WR32(sc, offset, val) bnx2x_reg_write32(sc, (offset), val)
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/net/bnx2x/bnx2x.h:1531:33:
	note: in expansion of macro ‘REG_WR32’
 1531 | #define REG_WR(sc, offset, val) REG_WR32(sc, offset, val)
      |                                 ^~~~~~~~
../drivers/net/bnx2x/bnx2x.h:1916:9: note: in expansion of macro ‘REG_WR’
 1916 |         REG_WR(sc, hc_addr, *val);
      |         ^~~~~~
../drivers/net/bnx2x/bnx2x.h:1905:33: note: ‘igu_ack’ declared here
 1905 |         struct igu_ack_register igu_ack;
      |                                 ^~~~~~~

REG_WR32 requires 'uint32_t', use union instead of cast to 'uint32_t'.

Bugzilla ID: 692
Fixes: 38dff79ba736 ("net/bnx2x: update HSI")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
---
 drivers/net/bnx2x/bnx2x.h | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h
index 69cc1430a4..8b3f807eb6 100644
--- a/drivers/net/bnx2x/bnx2x.h
+++ b/drivers/net/bnx2x/bnx2x.h
@@ -1902,18 +1902,19 @@ bnx2x_hc_ack_sb(struct bnx2x_softc *sc, uint8_t sb_id, uint8_t storm,
 {
 	uint32_t hc_addr = (HC_REG_COMMAND_REG + SC_PORT(sc) * 32 +
 			COMMAND_REG_INT_ACK);
-	struct igu_ack_register igu_ack;
-	uint32_t *val = NULL;
+	union {
+		struct igu_ack_register igu_ack;
+		uint32_t val;
+	} val;
 
-	igu_ack.status_block_index = index;
-	igu_ack.sb_id_and_flags =
+	val.igu_ack.status_block_index = index;
+	val.igu_ack.sb_id_and_flags =
 		((sb_id << IGU_ACK_REGISTER_STATUS_BLOCK_ID_SHIFT) |
 		 (storm << IGU_ACK_REGISTER_STORM_ID_SHIFT) |
 		 (update << IGU_ACK_REGISTER_UPDATE_INDEX_SHIFT) |
 		 (op << IGU_ACK_REGISTER_INTERRUPT_MODE_SHIFT));
 
-	val = (uint32_t *)&igu_ack;
-	REG_WR(sc, hc_addr, *val);
+	REG_WR(sc, hc_addr, val.val);
 
 	/* Make sure that ACK is written */
 	mb();
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.110626000 +0800
+++ 0138-net-bnx2x-fix-build-with-GCC-11.patch	2021-06-12 06:53:56.590000000 +0800
@@ -1 +1 @@
-From ab70be7e2d971dd0238da10322ac19209917b8ca Mon Sep 17 00:00:00 2001
+From 84c5ec250561c8493c270d928f02bb4f2d226ecd Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit ab70be7e2d971dd0238da10322ac19209917b8ca ]
@@ -34 +36,0 @@
-Cc: stable@dpdk.org
@@ -43 +45 @@
-index e13ab15574..80d19cbfd6 100644
+index 69cc1430a4..8b3f807eb6 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/ice/base: fix build with GCC 11' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (136 preceding siblings ...)
  2021-06-11 23:03     ` Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/tap: " Xueming Li
                       ` (39 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Luca Boccassi, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c2155d8297623181fc5d10dfbe54b6ee88e35e9d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c2155d8297623181fc5d10dfbe54b6ee88e35e9d Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 11 May 2021 14:14:34 +0100
Subject: [PATCH] net/ice/base: fix build with GCC 11
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 97de3819ed93f4b3a71e429147a7e6a435789ab2 ]

Reproduced with '--buildtype=debugoptimized' config,
compiler version: gcc (GCC) 12.0.0 20210509 (experimental)

There are multiple build errors, like:
../drivers/net/ice/base/ice_switch.c: In function ‘ice_add_marker_act’:
../drivers/net/ice/base/ice_switch.c:3727:15:
	warning: array subscript ‘struct ice_aqc_sw_rules_elem[0]’
	is partly outside array bounds of ‘unsigned char[52]’
	[-Warray-bounds]
 3727 |         lg_act->type = CPU_TO_LE16(ICE_AQC_SW_RULES_T_LG_ACT);
      |               ^~
In file included from ../drivers/net/ice/base/ice_type.h:52,
                 from ../drivers/net/ice/base/ice_common.h:8,
                 from ../drivers/net/ice/base/ice_switch.h:8,
                 from ../drivers/net/ice/base/ice_switch.c:5:
../drivers/net/ice/base/ice_osdep.h:209:29:
	note: referencing an object of size 52 allocated by ‘rte_zmalloc’
  209 | #define ice_malloc(h, s)    rte_zmalloc(NULL, s, 0)
      |                             ^~~~~~~~~~~~~~~~~~~~~~~
../drivers/net/ice/base/ice_switch.c:3720:50:
	note: in expansion of macro ‘ice_malloc’
  lg_act = (struct ice_aqc_sw_rules_elem *)ice_malloc(hw, rules_size);

These errors are mainly because allocated memory is cast to
"struct ice_aqc_sw_rules_elem *" but allocated size is less than the size
of "struct ice_aqc_sw_rules_elem".

"struct ice_aqc_sw_rules_elem" has multiple other structs has unions,
based on which one is used allocated memory being less than the size of
"struct ice_aqc_sw_rules_elem" is logically correct but compiler is
complaining about it.

Since the allocation is done explicitly and both producer and consumer
are internal, safe to ignore the warnings. Also to prevent any side
affect disabling the compiler warning for now, until proper fix done.

Reducing the warning disable to gcc >= 11 version.

Bugzilla ID: 678
Fixes: c7dd15931183 ("net/ice/base: add virtual switch code")
Fixes: 02acdce2f553 ("net/ice/base: add MAC filter with marker and counter")
Fixes: f89aa3affa9e ("net/ice/base: support removing advanced rule")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
---
 drivers/net/ice/base/meson.build | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ice/base/meson.build b/drivers/net/ice/base/meson.build
index 22963ce31d..8f7d4384e7 100644
--- a/drivers/net/ice/base/meson.build
+++ b/drivers/net/ice/base/meson.build
@@ -20,6 +20,11 @@ error_cflags = ['-Wno-unused-value',
 		'-Wno-unused-variable',
 		'-Wno-unused-parameter',
 ]
+# Bugzilla ID: 678
+if (toolchain == 'gcc' and cc.version().version_compare('>=11.0.0'))
+    error_cflags += ['-Wno-array-bounds']
+endif
+
 c_args = cflags
 
 foreach flag: error_cflags
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.132306300 +0800
+++ 0139-net-ice-base-fix-build-with-GCC-11.patch	2021-06-12 06:53:56.590000000 +0800
@@ -1 +1 @@
-From 97de3819ed93f4b3a71e429147a7e6a435789ab2 Mon Sep 17 00:00:00 2001
+From c2155d8297623181fc5d10dfbe54b6ee88e35e9d Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 97de3819ed93f4b3a71e429147a7e6a435789ab2 ]
@@ -51 +53,0 @@
-Cc: stable@dpdk.org
@@ -60 +62 @@
-index 6c548a9977..3305e5dd18 100644
+index 22963ce31d..8f7d4384e7 100644
@@ -63,2 +65,3 @@
-@@ -23,6 +23,11 @@ error_cflags = [
-         '-Wno-unused-parameter',
+@@ -20,6 +20,11 @@ error_cflags = ['-Wno-unused-value',
+ 		'-Wno-unused-variable',
+ 		'-Wno-unused-parameter',
@@ -66 +68,0 @@
- 
@@ -72,3 +74,3 @@
- if is_windows and cc.get_id() != 'clang'
-     cflags += ['-fno-asynchronous-unwind-tables']
- endif
+ c_args = cflags
+ 
+ foreach flag: error_cflags

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/tap: fix build with GCC 11' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (137 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/ice/base: " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/mlx4: fix secondary process initialization ordering' " Xueming Li
                       ` (38 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Luca Boccassi, Kevin Traynor, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/071855618a655b8ade45f8545f0c5da2f63a75a3

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 071855618a655b8ade45f8545f0c5da2f63a75a3 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Tue, 11 May 2021 14:14:35 +0100
Subject: [PATCH] net/tap: fix build with GCC 11
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit a625ab89df114bb813a9c8bc3ee3a8f5735bd5fe ]

Reproduced with '--buildtype=debugoptimized' config,
compiler version: gcc (GCC) 12.0.0 20210509 (experimental)

There are multiple build errors, like:
In file included from ../drivers/net/tap/tap_flow.c:13:
In function ‘rte_jhash_2hashes’,
    inlined from ‘rte_jhash’ at ../lib/hash/rte_jhash.h:284:2,
    inlined from ‘tap_flow_set_handle’ at
	../drivers/net/tap/tap_flow.c:1306:12,
    inlined from ‘rss_enable’ at ../drivers/net/tap/tap_flow.c:1909:3,
    inlined from ‘priv_flow_process’ at
	../drivers/net/tap/tap_flow.c:1228:11:
../lib/hash/rte_jhash.h:238:9:
	warning: ‘flow’ may be used uninitialized [-Wmaybe-uninitialized]
  238 |         __rte_jhash_2hashes(key, length, pc, pb, 1);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/net/tap/tap_flow.c: In function ‘priv_flow_process’:
../lib/hash/rte_jhash.h:81:1: note: by argument 1 of type ‘const void *’
	to ‘__rte_jhash_2hashes.constprop’ declared here
 81 | __rte_jhash_2hashes(const void *key, uint32_t length, uint32_t *pc,
    | ^~~~~~~~~~~~~~~~~~~
../drivers/net/tap/tap_flow.c:1028:1: note: ‘flow’ declared here
 1028 | priv_flow_process(struct pmd_internals *pmd,
      | ^~~~~~~~~~~~~~~~~

Fix strict aliasing rule by using union.

Bugzilla ID: 690
Fixes: de96fe68ae95 ("net/tap: add basic flow API patterns and actions")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
---
 drivers/net/tap/tap_flow.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c
index 1538349e9c..2e471832b5 100644
--- a/drivers/net/tap/tap_flow.c
+++ b/drivers/net/tap/tap_flow.c
@@ -1300,10 +1300,16 @@ tap_flow_validate(struct rte_eth_dev *dev,
 static void
 tap_flow_set_handle(struct rte_flow *flow)
 {
+	union {
+		struct rte_flow *flow;
+		const void *key;
+	} tmp;
 	uint32_t handle = 0;
 
+	tmp.flow = flow;
+
 	if (sizeof(flow) > 4)
-		handle = rte_jhash(&flow, sizeof(flow), 1);
+		handle = rte_jhash(tmp.key, sizeof(flow), 1);
 	else
 		handle = (uintptr_t)flow;
 	/* must be at least 1 to avoid letting the kernel choose one for us */
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.154756000 +0800
+++ 0140-net-tap-fix-build-with-GCC-11.patch	2021-06-12 06:53:56.590000000 +0800
@@ -1 +1 @@
-From a625ab89df114bb813a9c8bc3ee3a8f5735bd5fe Mon Sep 17 00:00:00 2001
+From 071855618a655b8ade45f8545f0c5da2f63a75a3 Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit a625ab89df114bb813a9c8bc3ee3a8f5735bd5fe ]
@@ -38 +40,0 @@
-Cc: stable@dpdk.org
@@ -47 +49 @@
-index 1ee6fb30ab..c4f60ce98e 100644
+index 1538349e9c..2e471832b5 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/mlx4: fix secondary process initialization ordering' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (138 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/tap: " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/mlx5: " Xueming Li
                       ` (37 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/14b6df2399e05851c44075f457088ce63b6480d7

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 14b6df2399e05851c44075f457088ce63b6480d7 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Mon, 10 May 2021 20:06:02 +0800
Subject: [PATCH] net/mlx4: fix secondary process initialization ordering
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit e5d94cf94e9d7c240e73b390c8c292fc9595f971 ]

The memory barrier is used to ensure that the response is returned
only after the Tx/Rx function is set, it should place after the Rx/Tx
function is set.

Fixes: 0203d33a1059 ("net/mlx4: support secondary process")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx4/mlx4_mp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx4/mlx4_mp.c b/drivers/net/mlx4/mlx4_mp.c
index 3622d61075..dd72755252 100644
--- a/drivers/net/mlx4/mlx4_mp.c
+++ b/drivers/net/mlx4/mlx4_mp.c
@@ -126,7 +126,6 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
 	switch (param->type) {
 	case MLX4_MP_REQ_START_RXTX:
 		INFO("port %u starting datapath", dev->data->port_id);
-		rte_mb();
 		dev->tx_pkt_burst = mlx4_tx_burst;
 		dev->rx_pkt_burst = mlx4_rx_burst;
 #ifdef HAVE_IBV_MLX4_UAR_MMAP_OFFSET
@@ -144,6 +143,7 @@ mp_secondary_handle(const struct rte_mp_msg *mp_msg, const void *peer)
 			}
 		}
 #endif
+		rte_mb();
 		mp_init_msg(dev, &mp_res, param->type);
 		res->result = 0;
 		ret = rte_mp_reply(&mp_res, peer);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.181281300 +0800
+++ 0141-net-mlx4-fix-secondary-process-initialization-orderi.patch	2021-06-12 06:53:56.590000000 +0800
@@ -1 +1 @@
-From e5d94cf94e9d7c240e73b390c8c292fc9595f971 Mon Sep 17 00:00:00 2001
+From 14b6df2399e05851c44075f457088ce63b6480d7 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit e5d94cf94e9d7c240e73b390c8c292fc9595f971 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index ddf7bdb9ef..8fcfb5490e 100644
+index 3622d61075..dd72755252 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix secondary process initialization ordering' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (139 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/mlx4: fix secondary process initialization ordering' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/mlx5: fix RSS flow item expansion for NVGRE' " Xueming Li
                       ` (36 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/cb97d5942878f53de74075e704f62e6119d4795e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cb97d5942878f53de74075e704f62e6119d4795e Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Mon, 10 May 2021 20:06:03 +0800
Subject: [PATCH] net/mlx5: fix secondary process initialization ordering
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 69b44d6bce1c9990e522a08f693d5f9f2e2e5067 ]

The memory barrier is used to ensure that the response is returned
only after the Tx/Rx function is set, it should place after the Rx/Tx
function is set.

Fixes: 2aac5b5d119f ("net/mlx5: sync stop/start with secondary process")

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_mp_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/linux/mlx5_mp_os.c b/drivers/net/mlx5/linux/mlx5_mp_os.c
index 95372e2084..8567e43471 100644
--- a/drivers/net/mlx5/linux/mlx5_mp_os.c
+++ b/drivers/net/mlx5/linux/mlx5_mp_os.c
@@ -130,7 +130,6 @@ struct rte_mp_msg mp_res;
 	switch (param->type) {
 	case MLX5_MP_REQ_START_RXTX:
 		DRV_LOG(INFO, "port %u starting datapath", dev->data->port_id);
-		rte_mb();
 		dev->rx_pkt_burst = mlx5_select_rx_function(dev);
 		dev->tx_pkt_burst = mlx5_select_tx_function(dev);
 		ppriv = (struct mlx5_proc_priv *)dev->process_private;
@@ -147,6 +146,7 @@ struct rte_mp_msg mp_res;
 				return -rte_errno;
 			}
 		}
+		rte_mb();
 		mp_init_msg(&priv->mp_id, &mp_res, param->type);
 		res->result = 0;
 		ret = rte_mp_reply(&mp_res, peer);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.202393700 +0800
+++ 0142-net-mlx5-fix-secondary-process-initialization-orderi.patch	2021-06-12 06:53:56.590000000 +0800
@@ -1 +1 @@
-From 69b44d6bce1c9990e522a08f693d5f9f2e2e5067 Mon Sep 17 00:00:00 2001
+From cb97d5942878f53de74075e704f62e6119d4795e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 69b44d6bce1c9990e522a08f693d5f9f2e2e5067 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index ca529b6007..3a4aa766f8 100644
+index 95372e2084..8567e43471 100644
@@ -23 +25 @@
-@@ -132,7 +132,6 @@ struct rte_mp_msg mp_res;
+@@ -130,7 +130,6 @@ struct rte_mp_msg mp_res;
@@ -31 +33 @@
-@@ -149,6 +148,7 @@ struct rte_mp_msg mp_res;
+@@ -147,6 +146,7 @@ struct rte_mp_msg mp_res;

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix RSS flow item expansion for NVGRE' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (140 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/mlx5: " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'test/crypto: fix return value of a skipped test' " Xueming Li
                       ` (35 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Jiawei Wang; +Cc: Luca Boccassi, Xiaoyu Min, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/975a9831e1723d38127af5835e7bbf5b10d27154

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 975a9831e1723d38127af5835e7bbf5b10d27154 Mon Sep 17 00:00:00 2001
From: Jiawei Wang <jiaweiw@nvidia.com>
Date: Wed, 12 May 2021 13:24:08 +0300
Subject: [PATCH] net/mlx5: fix RSS flow item expansion for NVGRE
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit c3e6adf037bfd89cdbe3deb383b9186c154be9e6 ]

Currently RSS expansion only supports GRE and GRE KEY.
This patch adds RSS expansion for NVGRE item so PMD can expand flow item
correctly.

Fixes: ea81c1b816f7 ("net/mlx5: fix NVGRE matching")

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index cab0aee567..ee0716ffd1 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -408,6 +408,7 @@ enum mlx5_expansion {
 	MLX5_EXPANSION_VXLAN,
 	MLX5_EXPANSION_VXLAN_GPE,
 	MLX5_EXPANSION_GRE,
+	MLX5_EXPANSION_NVGRE,
 	MLX5_EXPANSION_GRE_KEY,
 	MLX5_EXPANSION_MPLS,
 	MLX5_EXPANSION_ETH,
@@ -466,6 +467,7 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 			(MLX5_EXPANSION_OUTER_IPV4_UDP,
 			 MLX5_EXPANSION_OUTER_IPV4_TCP,
 			 MLX5_EXPANSION_GRE,
+			 MLX5_EXPANSION_NVGRE,
 			 MLX5_EXPANSION_IPV4,
 			 MLX5_EXPANSION_IPV6),
 		.type = RTE_FLOW_ITEM_TYPE_IPV4,
@@ -488,7 +490,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 			 MLX5_EXPANSION_OUTER_IPV6_TCP,
 			 MLX5_EXPANSION_IPV4,
 			 MLX5_EXPANSION_IPV6,
-			 MLX5_EXPANSION_GRE),
+			 MLX5_EXPANSION_GRE,
+			 MLX5_EXPANSION_NVGRE),
 		.type = RTE_FLOW_ITEM_TYPE_IPV6,
 		.rss_types = ETH_RSS_IPV6 | ETH_RSS_FRAG_IPV6 |
 			ETH_RSS_NONFRAG_IPV6_OTHER,
@@ -527,6 +530,10 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
 		.type = RTE_FLOW_ITEM_TYPE_GRE_KEY,
 		.optional = 1,
 	},
+	[MLX5_EXPANSION_NVGRE] = {
+		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_ETH),
+		.type = RTE_FLOW_ITEM_TYPE_NVGRE,
+	},
 	[MLX5_EXPANSION_MPLS] = {
 		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,
 						  MLX5_EXPANSION_IPV6),
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.222660000 +0800
+++ 0143-net-mlx5-fix-RSS-flow-item-expansion-for-NVGRE.patch	2021-06-12 06:53:56.600000000 +0800
@@ -1 +1 @@
-From c3e6adf037bfd89cdbe3deb383b9186c154be9e6 Mon Sep 17 00:00:00 2001
+From 975a9831e1723d38127af5835e7bbf5b10d27154 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit c3e6adf037bfd89cdbe3deb383b9186c154be9e6 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index c322d5d479..8d4b4a8187 100644
+index cab0aee567..ee0716ffd1 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'test/crypto: fix return value of a skipped test' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (141 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'net/mlx5: fix RSS flow item expansion for NVGRE' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:03     ` [dpdk-stable] patch 'crypto/qat: fix null authentication request' " Xueming Li
                       ` (34 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Ciara Power
  Cc: Luca Boccassi, Akhil Goyal, Declan Doherty, Hemant Agrawal,
	Ruifeng Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/010e63f5eefffe31c51ed79305a43bc856625824

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 010e63f5eefffe31c51ed79305a43bc856625824 Mon Sep 17 00:00:00 2001
From: Ciara Power <ciara.power@intel.com>
Date: Wed, 12 May 2021 11:36:54 +0000
Subject: [PATCH] test/crypto: fix return value of a skipped test
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 085f128aac8119a3cd1b903398dc92771da4ad38 ]

The blockcipher testcase return value TEST_SUCCESS was incorrect for
one conditional check, it should have been TEST_SKIPPED similar to the
other condition checks in this function when the testcase is skipped.

Fixes: 4868f6591c6f ("test/crypto: add cases for raw datapath API")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Tested-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 app/test/test_cryptodev_blockcipher.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_cryptodev_blockcipher.c b/app/test/test_cryptodev_blockcipher.c
index 135e57b9fa..8e168724be 100644
--- a/app/test/test_cryptodev_blockcipher.c
+++ b/app/test/test_cryptodev_blockcipher.c
@@ -160,7 +160,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
 			printf("Raw Data Path APIs do not support OOP, "
 				"Test Skipped.\n");
 			snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN, "SKIPPED");
-			status = TEST_SUCCESS;
+			status = TEST_SKIPPED;
 			goto error_exit;
 		}
 	}
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.249545400 +0800
+++ 0144-test-crypto-fix-return-value-of-a-skipped-test.patch	2021-06-12 06:53:56.600000000 +0800
@@ -1 +1 @@
-From 085f128aac8119a3cd1b903398dc92771da4ad38 Mon Sep 17 00:00:00 2001
+From 010e63f5eefffe31c51ed79305a43bc856625824 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 085f128aac8119a3cd1b903398dc92771da4ad38 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index b99d2ce50a..411968837f 100644
+index 135e57b9fa..8e168724be 100644
@@ -26 +28 @@
-@@ -170,7 +170,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
+@@ -160,7 +160,7 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'crypto/qat: fix null authentication request' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (142 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'test/crypto: fix return value of a skipped test' " Xueming Li
@ 2021-06-11 23:03     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'app/crypto-perf: check memory allocation' " Xueming Li
                       ` (33 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:03 UTC (permalink / raw)
  To: Adam Dybkowski; +Cc: Luca Boccassi, Fan Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/cfd635034c73b364ec063a9e646335cb76d2b721

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From cfd635034c73b364ec063a9e646335cb76d2b721 Mon Sep 17 00:00:00 2001
From: Adam Dybkowski <adamx.dybkowski@intel.com>
Date: Mon, 10 May 2021 11:20:11 +0100
Subject: [PATCH] crypto/qat: fix null authentication request
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 5cce3bd6b2fc9e272a8defc7b8971a96232d4529 ]

This patch fixes the NULL auth generation case where the request
shouldn't contain the authentication result address. Allows to run
ipsec_autotest with a QAT device.

Fixes: 65beb9abca6d ("crypto/qat: fix null auth when using VFIO")

Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 drivers/crypto/qat/qat_sym.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/qat/qat_sym.c b/drivers/crypto/qat/qat_sym.c
index a6cd33be37..299605eb30 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -333,8 +333,10 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
 		}
 		min_ofs = auth_ofs;
 
-		auth_param->auth_res_addr =
-			op->sym->auth.digest.phys_addr;
+		if (ctx->qat_hash_alg != ICP_QAT_HW_AUTH_ALGO_NULL ||
+				ctx->auth_op == ICP_QAT_HW_AUTH_VERIFY)
+			auth_param->auth_res_addr =
+					op->sym->auth.digest.phys_addr;
 
 	}
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.271178100 +0800
+++ 0145-crypto-qat-fix-null-authentication-request.patch	2021-06-12 06:53:56.600000000 +0800
@@ -1 +1 @@
-From 5cce3bd6b2fc9e272a8defc7b8971a96232d4529 Mon Sep 17 00:00:00 2001
+From cfd635034c73b364ec063a9e646335cb76d2b721 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 5cce3bd6b2fc9e272a8defc7b8971a96232d4529 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index a1f5676c04..9415ec7d32 100644
+index a6cd33be37..299605eb30 100644
@@ -23 +25 @@
-@@ -399,8 +399,10 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
+@@ -333,8 +333,10 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'app/crypto-perf: check memory allocation' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (143 preceding siblings ...)
  2021-06-11 23:03     ` [dpdk-stable] patch 'crypto/qat: fix null authentication request' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'examples/rxtx_callbacks: fix port ID format specifier' " Xueming Li
                       ` (32 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/fc88e04a9ab013033843e61f9fd4753d5d1a90f3

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From fc88e04a9ab013033843e61f9fd4753d5d1a90f3 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Thu, 6 May 2021 14:13:59 +0800
Subject: [PATCH] app/crypto-perf: check memory allocation
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 37c0359bc550e0cf3938382553c7dbb4fb21567d ]

Return value of a function 'rte_zmalloc' is dereferenced without
checking, and it may call segmentation fault.

This patch fixed it.

Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 app/test-crypto-perf/cperf_options_parsing.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c
index 40b6dfb648..e84f56cfaa 100644
--- a/app/test-crypto-perf/cperf_options_parsing.c
+++ b/app/test-crypto-perf/cperf_options_parsing.c
@@ -506,6 +506,12 @@ parse_test_name(struct cperf_options *opts,
 {
 	char *test_name = (char *) rte_zmalloc(NULL,
 		sizeof(char) * (strlen(arg) + 3), 0);
+	if (test_name == NULL) {
+		RTE_LOG(ERR, USER1, "Failed to rte zmalloc with size: %zu\n",
+			strlen(arg) + 3);
+		return -1;
+	}
+
 	snprintf(test_name, strlen(arg) + 3, "[%s]", arg);
 	opts->test_name = test_name;
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.294605600 +0800
+++ 0146-app-crypto-perf-check-memory-allocation.patch	2021-06-12 06:53:56.610000000 +0800
@@ -1 +1 @@
-From 37c0359bc550e0cf3938382553c7dbb4fb21567d Mon Sep 17 00:00:00 2001
+From fc88e04a9ab013033843e61f9fd4753d5d1a90f3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 37c0359bc550e0cf3938382553c7dbb4fb21567d ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'examples/rxtx_callbacks: fix port ID format specifier' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (144 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'app/crypto-perf: check memory allocation' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'examples/flow_classify: fix NUMA check of port and core' " Xueming Li
                       ` (31 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Dmitry Kozlyuk
  Cc: Luca Boccassi, Tyler Retzlaff, Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b993ebf7bbd6cb0f9670a1fcd2478d4769a17b69

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b993ebf7bbd6cb0f9670a1fcd2478d4769a17b69 Mon Sep 17 00:00:00 2001
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Date: Thu, 6 May 2021 00:54:35 +0300
Subject: [PATCH] examples/rxtx_callbacks: fix port ID format specifier
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 7861009f7b2ca7a028ee7fe867c90cd5560de529 ]

This fixes -Wformat warning with clang 10.0.0 on Windows.

Fixes: f8244c6399d9 ("ethdev: increase port id range")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 examples/rxtx_callbacks/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/rxtx_callbacks/main.c b/examples/rxtx_callbacks/main.c
index b57b2fc6bc..192521c3c6 100644
--- a/examples/rxtx_callbacks/main.c
+++ b/examples/rxtx_callbacks/main.c
@@ -329,7 +329,7 @@ main(int argc, char *argv[])
 	/* initialize all ports */
 	RTE_ETH_FOREACH_DEV(portid)
 		if (port_init(portid, mbuf_pool) != 0)
-			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu8"\n",
+			rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu16"\n",
 					portid);
 
 	if (rte_lcore_count() > 1)
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.316158900 +0800
+++ 0147-examples-rxtx_callbacks-fix-port-ID-format-specifier.patch	2021-06-12 06:53:56.610000000 +0800
@@ -1 +1 @@
-From 7861009f7b2ca7a028ee7fe867c90cd5560de529 Mon Sep 17 00:00:00 2001
+From b993ebf7bbd6cb0f9670a1fcd2478d4769a17b69 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 7861009f7b2ca7a028ee7fe867c90cd5560de529 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'examples/flow_classify: fix NUMA check of port and core' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (145 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'examples/rxtx_callbacks: fix port ID format specifier' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'examples/l2fwd-cat: " Xueming Li
                       ` (30 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Min Hu (Connor)
  Cc: Luca Boccassi, Bernard Iremonger, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/110a22070f7301d8cd0c17b89dba4c72d2a08913

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 110a22070f7301d8cd0c17b89dba4c72d2a08913 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Thu, 29 Apr 2021 08:50:46 +0800
Subject: [PATCH] examples/flow_classify: fix NUMA check of port and core
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 78a5545ef92b48553be4a244514a2514ca9b09b0 ]

According to the comments and logging, the author just hope user to use
the core and device which are in the same numa node for optimal
performance. If not, A warning gives out.

For example in flow_classify:
./build/flow_classify -a 0000:7d:00.1  -l 93
Here:
0000:7d:00.1 is on numa node 0.
core 93  is on numa node 3.

The two are not in same numa node, but no warning gives out in old codes
when device is on node 0.
This patch includes the node 0 in the check.

Fixes: bab16ddaf2c1 ("examples/flow_classify: add sample application")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Tested-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 examples/flow_classify/flow_classify.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/flow_classify/flow_classify.c b/examples/flow_classify/flow_classify.c
index 5c3e111cfa..94c1553648 100644
--- a/examples/flow_classify/flow_classify.c
+++ b/examples/flow_classify/flow_classify.c
@@ -284,7 +284,7 @@ lcore_main(struct flow_classifier *cls_app)
 	 * for best performance.
 	 */
 	RTE_ETH_FOREACH_DEV(port)
-		if (rte_eth_dev_socket_id(port) > 0 &&
+		if (rte_eth_dev_socket_id(port) >= 0 &&
 			rte_eth_dev_socket_id(port) != (int)rte_socket_id()) {
 			printf("\n\n");
 			printf("WARNING: port %u is on remote NUMA node\n",
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.337936200 +0800
+++ 0148-examples-flow_classify-fix-NUMA-check-of-port-and-co.patch	2021-06-12 06:53:56.610000000 +0800
@@ -1 +1 @@
-From 78a5545ef92b48553be4a244514a2514ca9b09b0 Mon Sep 17 00:00:00 2001
+From 110a22070f7301d8cd0c17b89dba4c72d2a08913 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 78a5545ef92b48553be4a244514a2514ca9b09b0 ]
@@ -21 +23,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'examples/l2fwd-cat: fix NUMA check of port and core' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (146 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'examples/flow_classify: fix NUMA check of port and core' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'examples/skeleton: " Xueming Li
                       ` (29 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/12822e56a0974fd57d36496d0b60570374063c2a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 12822e56a0974fd57d36496d0b60570374063c2a Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Thu, 29 Apr 2021 08:50:47 +0800
Subject: [PATCH] examples/l2fwd-cat: fix NUMA check of port and core
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 59a50c6a9ace0dc736d71e75267a1cc2127e7938 ]

According to the comments and logging, the author just hope user to use
the core and device which are in the same numa node for optimal
performance. If not, A warning gives out.

This patch fixes the check for a device on the node 0.

Fixes: f6baccbc2b3b ("examples/l2fwd-cat: add sample application for PQoS CAT and CDP")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 examples/l2fwd-cat/l2fwd-cat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/l2fwd-cat/l2fwd-cat.c b/examples/l2fwd-cat/l2fwd-cat.c
index 02288a3824..8e7eb32485 100644
--- a/examples/l2fwd-cat/l2fwd-cat.c
+++ b/examples/l2fwd-cat/l2fwd-cat.c
@@ -107,7 +107,7 @@ lcore_main(void)
 	 * for best performance.
 	 */
 	RTE_ETH_FOREACH_DEV(port)
-		if (rte_eth_dev_socket_id(port) > 0 &&
+		if (rte_eth_dev_socket_id(port) >= 0 &&
 				rte_eth_dev_socket_id(port) !=
 						(int)rte_socket_id())
 			printf("WARNING, port %u is on remote NUMA node to "
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.361380400 +0800
+++ 0149-examples-l2fwd-cat-fix-NUMA-check-of-port-and-core.patch	2021-06-12 06:53:56.610000000 +0800
@@ -1 +1 @@
-From 59a50c6a9ace0dc736d71e75267a1cc2127e7938 Mon Sep 17 00:00:00 2001
+From 12822e56a0974fd57d36496d0b60570374063c2a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 59a50c6a9ace0dc736d71e75267a1cc2127e7938 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'examples/skeleton: fix NUMA check of port and core' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (147 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'examples/l2fwd-cat: " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'test: check flow classifier creation' " Xueming Li
                       ` (28 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/acf64e968541c95f31185d09d537639b4e647ff9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From acf64e968541c95f31185d09d537639b4e647ff9 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Thu, 29 Apr 2021 08:50:48 +0800
Subject: [PATCH] examples/skeleton: fix NUMA check of port and core
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 5ffa60cd77c76855690d06cb900d6670f29de9a6 ]

According to the comments and logging, the author just hope user to use
the core and device which are in the same numa node for optimal
performance. If not, A warning gives out.

This patch fixes the check for a device on the node 0.

Fixes: 7107e471a6c7 ("examples/skeleton: very simple code for packet forwarding")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 examples/skeleton/basicfwd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/skeleton/basicfwd.c b/examples/skeleton/basicfwd.c
index a31b2882ae..43b9d17a3c 100644
--- a/examples/skeleton/basicfwd.c
+++ b/examples/skeleton/basicfwd.c
@@ -122,7 +122,7 @@ lcore_main(void)
 	 * for best performance.
 	 */
 	RTE_ETH_FOREACH_DEV(port)
-		if (rte_eth_dev_socket_id(port) > 0 &&
+		if (rte_eth_dev_socket_id(port) >= 0 &&
 				rte_eth_dev_socket_id(port) !=
 						(int)rte_socket_id())
 			printf("WARNING, port %u is on remote NUMA node to "
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.381594200 +0800
+++ 0150-examples-skeleton-fix-NUMA-check-of-port-and-core.patch	2021-06-12 06:53:56.610000000 +0800
@@ -1 +1 @@
-From 5ffa60cd77c76855690d06cb900d6670f29de9a6 Mon Sep 17 00:00:00 2001
+From acf64e968541c95f31185d09d537639b4e647ff9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 5ffa60cd77c76855690d06cb900d6670f29de9a6 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'test: check flow classifier creation' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (148 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'examples/skeleton: " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'test/power: fix CPU frequency check' " Xueming Li
                       ` (27 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, Bernard Iremonger, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/9a1044da2579119ae9b163f964185352f57e235a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 9a1044da2579119ae9b163f964185352f57e235a Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Thu, 22 Apr 2021 14:13:54 +0800
Subject: [PATCH] test: check flow classifier creation
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 705b04af1c100c464b6d9238408e84cfeffc489c ]

'cls->cls' will be NULL if flow classifier create has failed,
then segmentation fault will occur if the variable is used.

This patch fixed it.

Fixes: 9c9befea4f57 ("test: add flow classify unit tests")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test/test_flow_classify.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/app/test/test_flow_classify.c b/app/test/test_flow_classify.c
index ef0b6fdd5c..951606f248 100644
--- a/app/test/test_flow_classify.c
+++ b/app/test/test_flow_classify.c
@@ -828,6 +828,12 @@ test_flow_classify(void)
 	cls_params.name = "flow_classifier";
 	cls_params.socket_id = 0;
 	cls->cls = rte_flow_classifier_create(&cls_params);
+	if (cls->cls == NULL) {
+		printf("Line %i: flow classifier create has failed!\n",
+		       __LINE__);
+		rte_free(cls);
+		return TEST_FAILED;
+	}
 
 	/* initialise ACL table params */
 	table_acl_params.n_rule_fields = RTE_DIM(ipv4_defs);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.402493700 +0800
+++ 0151-test-check-flow-classifier-creation.patch	2021-06-12 06:53:56.610000000 +0800
@@ -1 +1 @@
-From 705b04af1c100c464b6d9238408e84cfeffc489c Mon Sep 17 00:00:00 2001
+From 9a1044da2579119ae9b163f964185352f57e235a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 705b04af1c100c464b6d9238408e84cfeffc489c ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'test/power: fix CPU frequency check' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (149 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'test: check flow classifier creation' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'test/power: add turbo mode to " Xueming Li
                       ` (26 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: David Hunt; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c729d4f1253d8123b18f2c539eff0d0655ace56f

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c729d4f1253d8123b18f2c539eff0d0655ace56f Mon Sep 17 00:00:00 2001
From: David Hunt <david.hunt@intel.com>
Date: Wed, 12 May 2021 17:32:51 +0100
Subject: [PATCH] test/power: fix CPU frequency check
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit ff6dfb8e492f1cfa8755150816d888541e2cd7c7 ]

Different drivers present the current cpu core frequency in different
sysfs files. Some present it in cpuinfo_cur_freq, some in scaling_cur_freq,
and some actually present it in both.

This patch attempts to open one, if that fails, tries the other.

Fixes: d550a8cc31f3 ("app/test: enhance power manager unit tests")

Signed-off-by: David Hunt <david.hunt@intel.com>
---
 app/test/test_power_cpufreq.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c
index f753d24ac5..52f58ef8b2 100644
--- a/app/test/test_power_cpufreq.c
+++ b/app/test/test_power_cpufreq.c
@@ -39,8 +39,10 @@ test_power_caps(void)
 #define TEST_FREQ_ROUNDING_DELTA 50000
 #define TEST_ROUND_FREQ_TO_N_100000 100000
 
-#define TEST_POWER_SYSFILE_CUR_FREQ \
+#define TEST_POWER_SYSFILE_CPUINFO_FREQ \
 	"/sys/devices/system/cpu/cpu%u/cpufreq/cpuinfo_cur_freq"
+#define TEST_POWER_SYSFILE_SCALING_FREQ \
+	"/sys/devices/system/cpu/cpu%u/cpufreq/scaling_cur_freq"
 
 static uint32_t total_freq_num;
 static uint32_t freqs[TEST_POWER_FREQS_NUM_MAX];
@@ -58,12 +60,19 @@ check_cur_freq(unsigned lcore_id, uint32_t idx)
 	int i;
 
 	if (snprintf(fullpath, sizeof(fullpath),
-		TEST_POWER_SYSFILE_CUR_FREQ, lcore_id) < 0) {
+		TEST_POWER_SYSFILE_SCALING_FREQ, lcore_id) < 0) {
 		return 0;
 	}
 	f = fopen(fullpath, "r");
 	if (f == NULL) {
-		return 0;
+		if (snprintf(fullpath, sizeof(fullpath),
+			TEST_POWER_SYSFILE_CPUINFO_FREQ, lcore_id) < 0) {
+			return 0;
+		}
+		f = fopen(fullpath, "r");
+		if (f == NULL) {
+			return 0;
+		}
 	}
 	for (i = 0; i < MAX_LOOP; i++) {
 		fflush(f);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.424588600 +0800
+++ 0152-test-power-fix-CPU-frequency-check.patch	2021-06-12 06:53:56.610000000 +0800
@@ -1 +1 @@
-From ff6dfb8e492f1cfa8755150816d888541e2cd7c7 Mon Sep 17 00:00:00 2001
+From c729d4f1253d8123b18f2c539eff0d0655ace56f Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit ff6dfb8e492f1cfa8755150816d888541e2cd7c7 ]
@@ -13 +15,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'test/power: add turbo mode to frequency check' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (150 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'test/power: fix CPU frequency check' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'test/power: fix low frequency test when turbo enabled' " Xueming Li
                       ` (25 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: David Hunt; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/c5a5a60d9e18d949f42c9dd8411453a585b7bba3

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From c5a5a60d9e18d949f42c9dd8411453a585b7bba3 Mon Sep 17 00:00:00 2001
From: David Hunt <david.hunt@intel.com>
Date: Wed, 12 May 2021 17:32:52 +0100
Subject: [PATCH] test/power: add turbo mode to frequency check
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 6db92b3b9bb130acf0bc9d774ab2d75ea67d00df ]

With the intel_pstate driver and turbo enabled, the top frequency in
the frequency array is the P1+1, i.e. 2300001, whereas the frequency
shown in scaling_cur_freq could be a lot higher.

This patch adds a flag to the check_cur_freq function so that we can
specify if a frequency is greater than expected (turbo mode), in which
case the check should be successful.

Fixes: aeaeaf5f2d62 ("test/power: add cases for turbo feature")

Signed-off-by: David Hunt <david.hunt@intel.com>
---
 app/test/test_power_cpufreq.c | 27 +++++++++++++++------------
 1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c
index 52f58ef8b2..2b4728d2e1 100644
--- a/app/test/test_power_cpufreq.c
+++ b/app/test/test_power_cpufreq.c
@@ -48,7 +48,7 @@ static uint32_t total_freq_num;
 static uint32_t freqs[TEST_POWER_FREQS_NUM_MAX];
 
 static int
-check_cur_freq(unsigned lcore_id, uint32_t idx)
+check_cur_freq(unsigned int lcore_id, uint32_t idx, bool turbo)
 {
 #define TEST_POWER_CONVERT_TO_DECIMAL 10
 #define MAX_LOOP 100
@@ -90,7 +90,10 @@ check_cur_freq(unsigned lcore_id, uint32_t idx)
 					/ TEST_ROUND_FREQ_TO_N_100000;
 		freq_conv = freq_conv * TEST_ROUND_FREQ_TO_N_100000;
 
-		ret = (freqs[idx] == freq_conv ? 0 : -1);
+		if (turbo)
+			ret = (freqs[idx] <= freq_conv ? 0 : -1);
+		else
+			ret = (freqs[idx] == freq_conv ? 0 : -1);
 
 		if (ret == 0)
 			break;
@@ -183,7 +186,7 @@ check_power_get_freq(void)
 	}
 
 	/* Check the current frequency */
-	ret = check_cur_freq(TEST_POWER_LCORE_ID, count);
+	ret = check_cur_freq(TEST_POWER_LCORE_ID, count, false);
 	if (ret < 0)
 		return -1;
 
@@ -233,7 +236,7 @@ check_power_set_freq(void)
 	}
 
 	/* Check the current frequency */
-	ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1);
+	ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1, false);
 	if (ret < 0)
 		return -1;
 
@@ -269,7 +272,7 @@ check_power_freq_down(void)
 	}
 
 	/* Check the current frequency */
-	ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1);
+	ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1, false);
 	if (ret < 0)
 		return -1;
 
@@ -288,7 +291,7 @@ check_power_freq_down(void)
 	}
 
 	/* Check the current frequency */
-	ret = check_cur_freq(TEST_POWER_LCORE_ID, 1);
+	ret = check_cur_freq(TEST_POWER_LCORE_ID, 1, false);
 	if (ret < 0)
 		return -1;
 
@@ -324,7 +327,7 @@ check_power_freq_up(void)
 	}
 
 	/* Check the current frequency */
-	ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 2);
+	ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 2, false);
 	if (ret < 0)
 		return -1;
 
@@ -343,7 +346,7 @@ check_power_freq_up(void)
 	}
 
 	/* Check the current frequency */
-	ret = check_cur_freq(TEST_POWER_LCORE_ID, 0);
+	ret = check_cur_freq(TEST_POWER_LCORE_ID, 0, true);
 	if (ret < 0)
 		return -1;
 
@@ -371,7 +374,7 @@ check_power_freq_max(void)
 	}
 
 	/* Check the current frequency */
-	ret = check_cur_freq(TEST_POWER_LCORE_ID, 0);
+	ret = check_cur_freq(TEST_POWER_LCORE_ID, 0, true);
 	if (ret < 0)
 		return -1;
 
@@ -399,7 +402,7 @@ check_power_freq_min(void)
 	}
 
 	/* Check the current frequency */
-	ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1);
+	ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1, false);
 	if (ret < 0)
 		return -1;
 
@@ -433,7 +436,7 @@ check_power_turbo(void)
 	}
 
 	/* Check the current frequency */
-	ret = check_cur_freq(TEST_POWER_LCORE_ID, 0);
+	ret = check_cur_freq(TEST_POWER_LCORE_ID, 0, true);
 	if (ret < 0)
 		return -1;
 
@@ -452,7 +455,7 @@ check_power_turbo(void)
 	}
 
 	/* Check the current frequency */
-	ret = check_cur_freq(TEST_POWER_LCORE_ID, 1);
+	ret = check_cur_freq(TEST_POWER_LCORE_ID, 1, false);
 	if (ret < 0)
 		return -1;
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.447182800 +0800
+++ 0153-test-power-add-turbo-mode-to-frequency-check.patch	2021-06-12 06:53:56.610000000 +0800
@@ -1 +1 @@
-From 6db92b3b9bb130acf0bc9d774ab2d75ea67d00df Mon Sep 17 00:00:00 2001
+From c5a5a60d9e18d949f42c9dd8411453a585b7bba3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 6db92b3b9bb130acf0bc9d774ab2d75ea67d00df ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'test/power: fix low frequency test when turbo enabled' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (151 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'test/power: add turbo mode to " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'test/power: fix turbo test' " Xueming Li
                       ` (24 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: David Hunt; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4498bac0f5d21cccd7b6559a671d1de69bc49842

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4498bac0f5d21cccd7b6559a671d1de69bc49842 Mon Sep 17 00:00:00 2001
From: David Hunt <david.hunt@intel.com>
Date: Wed, 12 May 2021 17:32:53 +0100
Subject: [PATCH] test/power: fix low frequency test when turbo enabled
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 0745214e9239784a62dba28c6ad6bbb211cde949 ]

With the intel_pstate driver and turbo enabled, indexing is slightly
different to normal, so to get the test to work properly, enable
turbo at the start.

Fixes: ed7c51a6a680 ("app/test: vm power management")

Signed-off-by: David Hunt <david.hunt@intel.com>
---
 app/test/test_power_cpufreq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c
index 2b4728d2e1..c24b706f4f 100644
--- a/app/test/test_power_cpufreq.c
+++ b/app/test/test_power_cpufreq.c
@@ -249,6 +249,8 @@ check_power_freq_down(void)
 {
 	int ret;
 
+	rte_power_freq_enable_turbo(TEST_POWER_LCORE_ID);
+
 	/* test with an invalid lcore id */
 	ret = rte_power_freq_down(TEST_POWER_LCORE_INVALID);
 	if (ret >= 0) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.467846500 +0800
+++ 0154-test-power-fix-low-frequency-test-when-turbo-enabled.patch	2021-06-12 06:53:56.620000000 +0800
@@ -1 +1 @@
-From 0745214e9239784a62dba28c6ad6bbb211cde949 Mon Sep 17 00:00:00 2001
+From 4498bac0f5d21cccd7b6559a671d1de69bc49842 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 0745214e9239784a62dba28c6ad6bbb211cde949 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'test/power: fix turbo test' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (152 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'test/power: fix low frequency test when turbo enabled' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'test/table: fix build with GCC 11' " Xueming Li
                       ` (23 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: David Hunt; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/61238b46be3fd48e6addc9b02d7fa354041d2962

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 61238b46be3fd48e6addc9b02d7fa354041d2962 Mon Sep 17 00:00:00 2001
From: David Hunt <david.hunt@intel.com>
Date: Wed, 12 May 2021 17:32:54 +0100
Subject: [PATCH] test/power: fix turbo test
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 5bb0409b440bf43f38b90c196a66accd09a5bf8f ]

when turbo is enabled or disabled, the frequency is set to a low non-turbo
frequency, so we need to set to the frequency expected by the test before
checking.

Fixes: aeaeaf5f2d62 ("test/power: add cases for turbo feature")

Signed-off-by: David Hunt <david.hunt@intel.com>
---
 app/test/test_power_cpufreq.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c
index c24b706f4f..0c3adc5f33 100644
--- a/app/test/test_power_cpufreq.c
+++ b/app/test/test_power_cpufreq.c
@@ -436,6 +436,12 @@ check_power_turbo(void)
 				TEST_POWER_LCORE_ID);
 		return -1;
 	}
+	ret = rte_power_freq_max(TEST_POWER_LCORE_ID);
+	if (ret < 0) {
+		printf("Fail to scale up the freq to max on lcore %u\n",
+						TEST_POWER_LCORE_ID);
+		return -1;
+	}
 
 	/* Check the current frequency */
 	ret = check_cur_freq(TEST_POWER_LCORE_ID, 0, true);
@@ -455,6 +461,12 @@ check_power_turbo(void)
 				TEST_POWER_LCORE_ID);
 		return -1;
 	}
+	ret = rte_power_freq_max(TEST_POWER_LCORE_ID);
+	if (ret < 0) {
+		printf("Fail to scale up the freq to max on lcore %u\n",
+						TEST_POWER_LCORE_ID);
+		return -1;
+	}
 
 	/* Check the current frequency */
 	ret = check_cur_freq(TEST_POWER_LCORE_ID, 1, false);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.491027600 +0800
+++ 0155-test-power-fix-turbo-test.patch	2021-06-12 06:53:56.620000000 +0800
@@ -1 +1 @@
-From 5bb0409b440bf43f38b90c196a66accd09a5bf8f Mon Sep 17 00:00:00 2001
+From 61238b46be3fd48e6addc9b02d7fa354041d2962 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 5bb0409b440bf43f38b90c196a66accd09a5bf8f ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'test/table: fix build with GCC 11' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (153 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'test/power: fix turbo test' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'examples/l3fwd-power: fix empty poll thresholds' " Xueming Li
                       ` (22 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/64ac670fa007b2e0005cb16416324745ccc5a1ad

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 64ac670fa007b2e0005cb16416324745ccc5a1ad Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit@intel.com>
Date: Mon, 17 May 2021 16:57:39 +0100
Subject: [PATCH] test/table: fix build with GCC 11
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 33c12ac5ba5f09727c6de807e71403dd260a7bbc ]

Build error:
../app/test/test_table_tables.c: In function ‘test_table_stub’:
../app/test/test_table_tables.c:31:9:
	warning: ‘memset’ offset [0, 31] is out of the bounds [0, 0]
	[-Warray-bounds]
         memset((uint8_t *)mbuf + sizeof(struct rte_mbuf) + 32, 0, 32); \
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../app/test/test_table_tables.c:151:25:
	note: in expansion of macro ‘PREPARE_PACKET’
  151 |                         PREPARE_PACKET(mbufs[i], 0xadadadad);
      |                         ^~~~~~~~~~~~~~

'key' points to mbuf header + 32 bytes, and memset clears next 32 bytes
of 'key', so overall there needs to be 64 bytes after mbuf header.
Adding a mbuf size check before memset.

The original code has an assumption that mbuf data buffer follows mbuf
header, this patch accepts same assumption.

Bugzilla ID: 677
Fixes: 5205954791cb ("app/test: packet framework unit tests")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test/test_table_tables.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test/test_table_tables.c b/app/test/test_table_tables.c
index 1aa269f95d..4ff6ab16aa 100644
--- a/app/test/test_table_tables.c
+++ b/app/test/test_table_tables.c
@@ -28,7 +28,8 @@ table_test table_tests[] = {
 			APP_METADATA_OFFSET(0));			\
 	key = RTE_MBUF_METADATA_UINT8_PTR(mbuf,			\
 			APP_METADATA_OFFSET(32));			\
-	memset(key, 0, 32);						\
+	if (mbuf->priv_size + mbuf->buf_len >= 64)			\
+		memset(key, 0, 32);					\
 	k32 = (uint32_t *) key;						\
 	k32[0] = (value);						\
 	*signature = pipeline_test_hash(key, NULL, 0, 0);			\
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.513757200 +0800
+++ 0156-test-table-fix-build-with-GCC-11.patch	2021-06-12 06:53:56.620000000 +0800
@@ -1 +1 @@
-From 33c12ac5ba5f09727c6de807e71403dd260a7bbc Mon Sep 17 00:00:00 2001
+From 64ac670fa007b2e0005cb16416324745ccc5a1ad Mon Sep 17 00:00:00 2001
@@ -7,0 +8,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 33c12ac5ba5f09727c6de807e71403dd260a7bbc ]
@@ -30 +32,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'examples/l3fwd-power: fix empty poll thresholds' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (154 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'test/table: fix build with GCC 11' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'test: fix division by zero' " Xueming Li
                       ` (21 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Hongbo Zheng
  Cc: Luca Boccassi, Min Hu, Reshma Pattan, David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/99755af674814928f8f7625cdeb983cc232d5268

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 99755af674814928f8f7625cdeb983cc232d5268 Mon Sep 17 00:00:00 2001
From: Hongbo Zheng <zhenghongbo3@huawei.com>
Date: Wed, 21 Apr 2021 11:53:39 +0800
Subject: [PATCH] examples/l3fwd-power: fix empty poll thresholds
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit db7447c70820391f1225be0e6de6dab5710e6f18 ]

Fix assignment errors of ep_hgh_edpi in function parse_ep_config.

Fixes: a137d012a0dd ("examples/l3fwd-power: support traffic pattern aware control")

Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Reshma Pattan <reshma.pattan@gmail.com>
Acked-by: David Hunt <david.hunt@intel.com>
---
 examples/l3fwd-power/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index 995a3b6ad7..43f14104a3 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -1716,7 +1716,7 @@ parse_ep_config(const char *q_arg)
 	int hgh_edpi;
 
 	ep_med_edpi = EMPTY_POLL_MED_THRESHOLD;
-	ep_hgh_edpi = EMPTY_POLL_MED_THRESHOLD;
+	ep_hgh_edpi = EMPTY_POLL_HGH_THRESHOLD;
 
 	strlcpy(s, p, sizeof(s));
 
@@ -1739,7 +1739,7 @@ parse_ep_config(const char *q_arg)
 		if (med_edpi > 0)
 			ep_med_edpi = med_edpi;
 
-		if (med_edpi > 0)
+		if (hgh_edpi > 0)
 			ep_hgh_edpi = hgh_edpi;
 
 	} else {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.534994900 +0800
+++ 0157-examples-l3fwd-power-fix-empty-poll-thresholds.patch	2021-06-12 06:53:56.620000000 +0800
@@ -1 +1 @@
-From db7447c70820391f1225be0e6de6dab5710e6f18 Mon Sep 17 00:00:00 2001
+From 99755af674814928f8f7625cdeb983cc232d5268 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit db7447c70820391f1225be0e6de6dab5710e6f18 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 0af8810697..f8dfed1634 100644
+index 995a3b6ad7..43f14104a3 100644
@@ -23 +25 @@
-@@ -1748,7 +1748,7 @@ parse_ep_config(const char *q_arg)
+@@ -1716,7 +1716,7 @@ parse_ep_config(const char *q_arg)
@@ -32 +34 @@
-@@ -1771,7 +1771,7 @@ parse_ep_config(const char *q_arg)
+@@ -1739,7 +1739,7 @@ parse_ep_config(const char *q_arg)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'test: fix division by zero' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (155 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'examples/l3fwd-power: fix empty poll thresholds' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'devtools: fix orphan symbols check with busybox' " Xueming Li
                       ` (20 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Luca Boccassi, Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/934abbb8b8cd9156856c98daac1105558a3f4501

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 934abbb8b8cd9156856c98daac1105558a3f4501 Mon Sep 17 00:00:00 2001
From: "Min Hu (Connor)" <humin29@huawei.com>
Date: Thu, 13 May 2021 09:10:37 +0800
Subject: [PATCH] test: fix division by zero
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 07b3c7d8e3b6513044d8f5cc45359cc42c14eb18 ]

Variable i is used as a denominator which may be zero, and
this may result in segmentation fault.

This patch fixed it.

Fixes: 948bc3d6d095 ("test: add reciprocal based division")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/test/test_reciprocal_division_perf.c | 41 ++++++++++++++----------
 1 file changed, 24 insertions(+), 17 deletions(-)

diff --git a/app/test/test_reciprocal_division_perf.c b/app/test/test_reciprocal_division_perf.c
index a7be8aa71a..4f625873e5 100644
--- a/app/test/test_reciprocal_division_perf.c
+++ b/app/test/test_reciprocal_division_perf.c
@@ -71,10 +71,12 @@ test_reciprocal_division_perf(void)
 			tot_cyc_n);
 	printf("Total number of cycles reciprocal division : %"PRIu64"\n",
 			tot_cyc_r);
-	printf("Cycles per division(normal) : %3.2f\n",
-			((double)tot_cyc_n)/i);
-	printf("Cycles per division(reciprocal) : %3.2f\n\n",
-			((double)tot_cyc_r)/i);
+	if (i != 0) {
+		printf("Cycles per division(normal) : %3.2f\n",
+				((double)tot_cyc_n)/i);
+		printf("Cycles per division(reciprocal) : %3.2f\n\n",
+				((double)tot_cyc_r)/i);
+	}
 
 	tot_cyc_n = 0;
 	tot_cyc_r = 0;
@@ -111,11 +113,12 @@ test_reciprocal_division_perf(void)
 			tot_cyc_n);
 	printf("Total number of cycles reciprocal division : %"PRIu64"\n",
 			tot_cyc_r);
-	printf("Cycles per division(normal) : %3.2f\n",
-			((double)tot_cyc_n)/i);
-	printf("Cycles per division(reciprocal) : %3.2f\n\n",
-			((double)tot_cyc_r)/i);
-
+	if (i != 0) {
+		printf("Cycles per division(normal) : %3.2f\n",
+				((double)tot_cyc_n)/i);
+		printf("Cycles per division(reciprocal) : %3.2f\n\n",
+				((double)tot_cyc_r)/i);
+	}
 	tot_cyc_n = 0;
 	tot_cyc_r = 0;
 
@@ -152,10 +155,12 @@ test_reciprocal_division_perf(void)
 			tot_cyc_n);
 	printf("Total number of cycles reciprocal division : %"PRIu64"\n",
 			tot_cyc_r);
-	printf("Cycles per division(normal) : %3.2f\n",
-			((double)tot_cyc_n)/i);
-	printf("Cycles per division(reciprocal) : %3.2f\n\n",
-			((double)tot_cyc_r)/i);
+	if (i != 0) {
+		printf("Cycles per division(normal) : %3.2f\n",
+				((double)tot_cyc_n)/i);
+		printf("Cycles per division(reciprocal) : %3.2f\n\n",
+				((double)tot_cyc_r)/i);
+	}
 
 	tot_cyc_n = 0;
 	tot_cyc_r = 0;
@@ -190,10 +195,12 @@ test_reciprocal_division_perf(void)
 			tot_cyc_n);
 	printf("Total number of cycles reciprocal division : %"PRIu64"\n",
 			tot_cyc_r);
-	printf("Cycles per division(normal) : %3.2f\n",
-			((double)tot_cyc_n)/i);
-	printf("Cycles per division(reciprocal) : %3.2f\n",
-			((double)tot_cyc_r)/i);
+	if (i != 0) {
+		printf("Cycles per division(normal) : %3.2f\n",
+				((double)tot_cyc_n)/i);
+		printf("Cycles per division(reciprocal) : %3.2f\n",
+				((double)tot_cyc_r)/i);
+	}
 
 	return result;
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.557539800 +0800
+++ 0158-test-fix-division-by-zero.patch	2021-06-12 06:53:56.620000000 +0800
@@ -1 +1 @@
-From 07b3c7d8e3b6513044d8f5cc45359cc42c14eb18 Mon Sep 17 00:00:00 2001
+From 934abbb8b8cd9156856c98daac1105558a3f4501 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 07b3c7d8e3b6513044d8f5cc45359cc42c14eb18 ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'devtools: fix orphan symbols check with busybox' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (156 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'test: fix division by zero' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'test/crypto: fix build with GCC 11' " Xueming Li
                       ` (19 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: David Marchand; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/18918e1884a3109e6f3c1fd8ca34a0a18d8da890

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 18918e1884a3109e6f3c1fd8ca34a0a18d8da890 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Thu, 13 May 2021 10:34:13 +0200
Subject: [PATCH] devtools: fix orphan symbols check with busybox
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 71459555a6f8c88d3638fd857b810d4913a504e3 ]

Avoid relying on GNU grep --exclude option.

Fixes: f8ad40dc998c ("devtools: check orphan symbols in map files")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 devtools/check-symbol-maps.sh | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh
index 0e097eed89..e07682a479 100755
--- a/devtools/check-symbol-maps.sh
+++ b/devtools/check-symbol-maps.sh
@@ -20,8 +20,7 @@ find_orphan_symbols ()
             else
                 symsrc=$sym
             fi
-            if ! grep -q -r --exclude=$(basename $map) \
-                    -w $symsrc $(dirname $map) ; then
+            if [ -z "$(grep -rlw $symsrc $(dirname $map) | grep -v $map)" ] ; then
                 echo "$map: $sym"
             fi
         done
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.581363900 +0800
+++ 0159-devtools-fix-orphan-symbols-check-with-busybox.patch	2021-06-12 06:53:56.620000000 +0800
@@ -1 +1 @@
-From 71459555a6f8c88d3638fd857b810d4913a504e3 Mon Sep 17 00:00:00 2001
+From 18918e1884a3109e6f3c1fd8ca34a0a18d8da890 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 71459555a6f8c88d3638fd857b810d4913a504e3 ]
@@ -9 +11,0 @@
-Cc: stable@dpdk.org
@@ -17 +19 @@
-index f06353fc75..055db24472 100755
+index 0e097eed89..e07682a479 100755

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'test/crypto: fix build with GCC 11' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (157 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'devtools: fix orphan symbols check with busybox' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'crypto/zuc: " Xueming Li
                       ` (18 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Luca Boccassi, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/87eec97f52428847cd6f1f949a9d75218062c79d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 87eec97f52428847cd6f1f949a9d75218062c79d Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Wed, 5 May 2021 09:53:14 +0100
Subject: [PATCH] test/crypto: fix build with GCC 11
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 8f73a72378333a68ada948ad648f9c6f925af58b ]

Fix the allocation for sessions, to prevent an array-bounds
warning with GCC 11. Set the not created session to NULL.

Fixes: 202d375c60bc ("app/test: add cryptodev unit and performance tests")

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
 app/test/test_cryptodev.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 56b385bdf1..ea24e8edb7 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -10411,8 +10411,8 @@ test_multi_session(void)
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
 
 	sessions = rte_malloc(NULL,
-			(sizeof(struct rte_cryptodev_sym_session *) *
-			MAX_NB_SESSIONS) + 1, 0);
+			sizeof(struct rte_cryptodev_sym_session *) *
+			(MAX_NB_SESSIONS + 1), 0);
 
 	/* Create multiple crypto sessions*/
 	for (i = 0; i < MAX_NB_SESSIONS; i++) {
@@ -10457,6 +10457,7 @@ test_multi_session(void)
 		}
 	}
 
+	sessions[i] = NULL;
 	/* Next session create should fail */
 	rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
 			sessions[i], &ut_params->auth_xform,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.601466500 +0800
+++ 0160-test-crypto-fix-build-with-GCC-11.patch	2021-06-12 06:53:56.630000000 +0800
@@ -1 +1 @@
-From 8f73a72378333a68ada948ad648f9c6f925af58b Mon Sep 17 00:00:00 2001
+From 87eec97f52428847cd6f1f949a9d75218062c79d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 8f73a72378333a68ada948ad648f9c6f925af58b ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index c68684b80b..39db52b17a 100644
+index 56b385bdf1..ea24e8edb7 100644
@@ -22 +24 @@
-@@ -10748,8 +10748,8 @@ test_multi_session(void)
+@@ -10411,8 +10411,8 @@ test_multi_session(void)
@@ -33 +35 @@
-@@ -10794,6 +10794,7 @@ test_multi_session(void)
+@@ -10457,6 +10457,7 @@ test_multi_session(void)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'crypto/zuc: fix build with GCC 11' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (158 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'test/crypto: fix build with GCC 11' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/mlx4: fix leak when configured repeatedly' " Xueming Li
                       ` (17 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6156da10414a4f7e60f262ba80dd8b5bf9cccfd3

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6156da10414a4f7e60f262ba80dd8b5bf9cccfd3 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Fri, 14 May 2021 16:08:34 +0100
Subject: [PATCH] crypto/zuc: fix build with GCC 11
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 099db3d156038b792d97c29a6e2743369d7d50a5 ]

GCC 11 complains that some arrays may be uninitialized in
process_zuc_hash_op(). This is because their initialization
depends on num_ops being > 0.

This function is only called with num_ops > 0 because of
checks in process_zuc_hash_op().

To remove the warning initialize the arrays.

Fixes: 0b133c36ad7d ("crypto/zuc: support IPsec Multi-buffer lib v0.54")

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
 drivers/crypto/zuc/rte_zuc_pmd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c
index a9ff318281..28ce961c77 100644
--- a/drivers/crypto/zuc/rte_zuc_pmd.c
+++ b/drivers/crypto/zuc/rte_zuc_pmd.c
@@ -238,11 +238,11 @@ process_zuc_hash_op(struct zuc_qp *qp, struct rte_crypto_op **ops,
 {
 	unsigned int i;
 	uint8_t processed_ops = 0;
-	uint8_t *src[ZUC_MAX_BURST];
+	uint8_t *src[ZUC_MAX_BURST] = { 0 };
 	uint32_t *dst[ZUC_MAX_BURST];
-	uint32_t length_in_bits[ZUC_MAX_BURST];
-	uint8_t *iv[ZUC_MAX_BURST];
-	const void *hash_keys[ZUC_MAX_BURST];
+	uint32_t length_in_bits[ZUC_MAX_BURST] = { 0 };
+	uint8_t *iv[ZUC_MAX_BURST] = { 0 };
+	const void *hash_keys[ZUC_MAX_BURST] = { 0 };
 	struct zuc_session *sess;
 
 	for (i = 0; i < num_ops; i++) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.631512700 +0800
+++ 0161-crypto-zuc-fix-build-with-GCC-11.patch	2021-06-12 06:53:56.630000000 +0800
@@ -1 +1 @@
-From 099db3d156038b792d97c29a6e2743369d7d50a5 Mon Sep 17 00:00:00 2001
+From 6156da10414a4f7e60f262ba80dd8b5bf9cccfd3 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 099db3d156038b792d97c29a6e2743369d7d50a5 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -24 +26 @@
-index aa50c12da6..42b669f188 100644
+index a9ff318281..28ce961c77 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/mlx4: fix leak when configured repeatedly' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (159 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'crypto/zuc: " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/mlx5: " Xueming Li
                       ` (16 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2471e99da32fde2ae583e8d93bb0b5b7fcb33c8e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 2471e99da32fde2ae583e8d93bb0b5b7fcb33c8e Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Thu, 13 May 2021 11:38:56 +0800
Subject: [PATCH] net/mlx4: fix leak when configured repeatedly
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 6f14d4d75aa07210d13fe0a7fcc5c26273c835d1 ]

Currently, configuring a mlx device, it will allocate its
own process private in mlx5_proc_priv_init() and only frees
it when closing the device. This will lead to a memory leak,
when a device is configured repeatedly.

For example:
for(...)
do
    rte_eth_dev_configure
    rte_eth_rx_queue_setup
    rte_eth_tx_queue_setup
    rte_eth_dev_start
    rte_eth_dev_stop
done

Fixes: 97d37d2c1f6b ("net/mlx4: remove device register remap")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx4/mlx4.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 919a9347f9..b35372ed64 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -201,6 +201,7 @@ mlx4_proc_priv_init(struct rte_eth_dev *dev)
 	struct mlx4_proc_priv *ppriv;
 	size_t ppriv_size;
 
+	mlx4_proc_priv_uninit(dev);
 	/*
 	 * UAR register table follows the process private structure. BlueFlame
 	 * registers for Tx queues are stored in the table.
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.653044700 +0800
+++ 0162-net-mlx4-fix-leak-when-configured-repeatedly.patch	2021-06-12 06:53:56.640000000 +0800
@@ -1 +1 @@
-From 6f14d4d75aa07210d13fe0a7fcc5c26273c835d1 Mon Sep 17 00:00:00 2001
+From 2471e99da32fde2ae583e8d93bb0b5b7fcb33c8e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 6f14d4d75aa07210d13fe0a7fcc5c26273c835d1 ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -31 +33 @@
-index 7cd35cd3ca..c522157a0a 100644
+index 919a9347f9..b35372ed64 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix leak when configured repeatedly' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (160 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/mlx4: fix leak when configured repeatedly' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/mlx5: fix counter offset detection' " Xueming Li
                       ` (15 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/570fa795f0894854a37a6cfbfa7d0e1b06ab1736

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 570fa795f0894854a37a6cfbfa7d0e1b06ab1736 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian@huawei.com>
Date: Thu, 13 May 2021 11:39:54 +0800
Subject: [PATCH] net/mlx5: fix leak when configured repeatedly
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 6dad8b3a381911c6f7fe0362517bee9bfc24def3 ]

Currently, configuring a mlx device, it will allocate its
own process private in mlx5_proc_priv_init() and only frees
it when closing the device. This will lead to a memory leak,
when a device is configured repeatedly.

For example:
for(...)
do
    rte_eth_dev_configure
    rte_eth_rx_queue_setup
    rte_eth_tx_queue_setup
    rte_eth_dev_start
    rte_eth_dev_stop
done

Fixes: 120dc4a7dcd3 ("net/mlx5: remove device register remap")

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index f5c1c800fc..7953a27834 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1243,6 +1243,7 @@ mlx5_proc_priv_init(struct rte_eth_dev *dev)
 	struct mlx5_proc_priv *ppriv;
 	size_t ppriv_size;
 
+	mlx5_proc_priv_uninit(dev);
 	/*
 	 * UAR register table follows the process private structure. BlueFlame
 	 * registers for Tx queues are stored in the table.
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.676516700 +0800
+++ 0163-net-mlx5-fix-leak-when-configured-repeatedly.patch	2021-06-12 06:53:56.640000000 +0800
@@ -1 +1 @@
-From 6dad8b3a381911c6f7fe0362517bee9bfc24def3 Mon Sep 17 00:00:00 2001
+From 570fa795f0894854a37a6cfbfa7d0e1b06ab1736 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 6dad8b3a381911c6f7fe0362517bee9bfc24def3 ]
@@ -22 +24,0 @@
-Cc: stable@dpdk.org
@@ -31 +33 @@
-index 35f91e965e..cf1815cb74 100644
+index f5c1c800fc..7953a27834 100644
@@ -34 +36 @@
-@@ -1455,6 +1455,7 @@ mlx5_proc_priv_init(struct rte_eth_dev *dev)
+@@ -1243,6 +1243,7 @@ mlx5_proc_priv_init(struct rte_eth_dev *dev)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix counter offset detection' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (161 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/mlx5: " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/vhost: restore pseudo TSO support' " Xueming Li
                       ` (14 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Suanming Mou; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d565e160b11fff3c4c9c7e1c74cd81b76740153a

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From d565e160b11fff3c4c9c7e1c74cd81b76740153a Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm@nvidia.com>
Date: Thu, 13 May 2021 11:05:15 +0300
Subject: [PATCH] net/mlx5: fix counter offset detection
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 4fd5e14848871a682840642fdd6ad776d0017080 ]

Currently, the counter offset support is discovered by creating the
rule with invalid offset counter and drop action in root table. If
the rule creation fails with EINVAL errno, that mean counter offset
is not supported in root table.

However, drop action may not be supported in some rdma-core version
in root table. In this case, the discover code will not work properly.

This commits changes flow attribute to egress. That removes all the
extra fate actions in the flow to avoid any unsupported fate actions
make the discover code fail time to time.

Fixes: 994829e695c0 ("net/mlx5: remove single counter container")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 5a5a33172a..f5ceb7a2d5 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -12585,7 +12585,7 @@ mlx5_flow_dv_discover_counter_offset_support(struct rte_eth_dev *dev)
 		.size = sizeof(value.buf),
 	};
 	struct mlx5dv_flow_matcher_attr dv_attr = {
-		.type = IBV_FLOW_ATTR_NORMAL,
+		.type = IBV_FLOW_ATTR_NORMAL | IBV_FLOW_ATTR_FLAGS_EGRESS,
 		.priority = 0,
 		.match_criteria_enable = 0,
 		.match_mask = (void *)&mask,
@@ -12597,7 +12597,7 @@ mlx5_flow_dv_discover_counter_offset_support(struct rte_eth_dev *dev)
 	void *flow = NULL;
 	int ret = -1;
 
-	tbl = flow_dv_tbl_resource_get(dev, 0, 0, 0, false, NULL, 0, 0, NULL);
+	tbl = flow_dv_tbl_resource_get(dev, 0, 1, 0, false, NULL, 0, 0, NULL);
 	if (!tbl)
 		goto err;
 	dcs = mlx5_devx_cmd_flow_counter_alloc(priv->sh->ctx, 0x4);
@@ -12607,14 +12607,12 @@ mlx5_flow_dv_discover_counter_offset_support(struct rte_eth_dev *dev)
 						    &actions[0]);
 	if (ret)
 		goto err;
-	actions[1] = sh->dr_drop_action ? sh->dr_drop_action :
-					  priv->drop_queue.hrxq->action;
 	dv_attr.match_criteria_enable = flow_dv_matcher_enable(mask.buf);
 	ret = mlx5_flow_os_create_flow_matcher(sh->ctx, &dv_attr, tbl->obj,
 					       &matcher);
 	if (ret)
 		goto err;
-	ret = mlx5_flow_os_create_flow(matcher, (void *)&value, 2,
+	ret = mlx5_flow_os_create_flow(matcher, (void *)&value, 1,
 				       actions, &flow);
 err:
 	/*
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.697750300 +0800
+++ 0164-net-mlx5-fix-counter-offset-detection.patch	2021-06-12 06:53:56.650000000 +0800
@@ -1 +1 @@
-From 4fd5e14848871a682840642fdd6ad776d0017080 Mon Sep 17 00:00:00 2001
+From d565e160b11fff3c4c9c7e1c74cd81b76740153a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 4fd5e14848871a682840642fdd6ad776d0017080 ]
@@ -19 +21,0 @@
-Cc: stable@dpdk.org
@@ -28 +30 @@
-index 7fc7efbc5c..71d9f88a95 100644
+index 5a5a33172a..f5ceb7a2d5 100644
@@ -31 +33 @@
-@@ -16081,7 +16081,7 @@ mlx5_flow_dv_discover_counter_offset_support(struct rte_eth_dev *dev)
+@@ -12585,7 +12585,7 @@ mlx5_flow_dv_discover_counter_offset_support(struct rte_eth_dev *dev)
@@ -40 +42 @@
-@@ -16093,7 +16093,7 @@ mlx5_flow_dv_discover_counter_offset_support(struct rte_eth_dev *dev)
+@@ -12597,7 +12597,7 @@ mlx5_flow_dv_discover_counter_offset_support(struct rte_eth_dev *dev)
@@ -44,3 +46,2 @@
--	tbl = flow_dv_tbl_resource_get(dev, 0, 0, 0, false, NULL,
-+	tbl = flow_dv_tbl_resource_get(dev, 0, 1, 0, false, NULL,
- 					0, 0, 0, NULL);
+-	tbl = flow_dv_tbl_resource_get(dev, 0, 0, 0, false, NULL, 0, 0, NULL);
++	tbl = flow_dv_tbl_resource_get(dev, 0, 1, 0, false, NULL, 0, 0, NULL);
@@ -49 +50,2 @@
-@@ -16104,14 +16104,12 @@ mlx5_flow_dv_discover_counter_offset_support(struct rte_eth_dev *dev)
+ 	dcs = mlx5_devx_cmd_flow_counter_alloc(priv->sh->ctx, 0x4);
+@@ -12607,14 +12607,12 @@ mlx5_flow_dv_discover_counter_offset_support(struct rte_eth_dev *dev)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/vhost: restore pseudo TSO support' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (162 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/mlx5: fix counter offset detection' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'vdpa/mlx5: fix device unplug' " Xueming Li
                       ` (13 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: David Marchand; +Cc: Luca Boccassi, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4079bce204905af72483e818ef2d01138d2cfe3b

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4079bce204905af72483e818ef2d01138d2cfe3b Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Tue, 18 May 2021 09:07:27 +0200
Subject: [PATCH] net/vhost: restore pseudo TSO support
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 1583ad5b5e3e75285c566b943eda7d7cbb4d2825 ]

The net/vhost PMD does not comply with the ethdev offload API as it does
not report Rx/Tx offload capabilities wrt TSO and checksum offloading.
On the other hand, the net/vhost PMD lets guest negotiates TSO and
checksum offloading.

Changing the behavior for Rx/Tx offload flags handling won't
improve/fix this situation and will break applications that might have
been relying on implicit support of TSO in this driver.

Revert this behavior change until we have a complete fix.

Fixes: ca7036b4af3a ("vhost: fix offload flags in Rx path")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index fe36fc8824..5845bb15f3 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -1505,7 +1505,7 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)
 	int ret = 0;
 	char *iface_name;
 	uint16_t queues;
-	uint64_t flags = RTE_VHOST_USER_NET_COMPLIANT_OL_FLAGS;
+	uint64_t flags = 0;
 	uint64_t disable_flags = 0;
 	int client_mode = 0;
 	int iommu_support = 0;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.728428400 +0800
+++ 0165-net-vhost-restore-pseudo-TSO-support.patch	2021-06-12 06:53:56.650000000 +0800
@@ -1 +1 @@
-From 1583ad5b5e3e75285c566b943eda7d7cbb4d2825 Mon Sep 17 00:00:00 2001
+From 4079bce204905af72483e818ef2d01138d2cfe3b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 1583ad5b5e3e75285c566b943eda7d7cbb4d2825 ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index 8524898661..a202931e9a 100644
+index fe36fc8824..5845bb15f3 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'vdpa/mlx5: fix device unplug' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (163 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/vhost: restore pseudo TSO support' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/hns3: fix Rx/Tx queue numbers check' " Xueming Li
                       ` (12 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Matan Azrad; +Cc: Luca Boccassi, Eli Britstein, Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/a6967ee4a8cb1be554f2ff9d3c9ba794eef16aee

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From a6967ee4a8cb1be554f2ff9d3c9ba794eef16aee Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@nvidia.com>
Date: Thu, 13 May 2021 21:40:20 +0300
Subject: [PATCH] vdpa/mlx5: fix device unplug
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 2838aa76ba94e0dd7712e57fe6a32651f5690797 ]

The vDPA PCI device unplug process should release all the private
device resources and also to unregister the device.

The device unregistration was missed what remained the device data
invalid in the rte_vhost library.

Unregister the device in unplug process via the remove operation.

Fixes: 95276abaaf0a ("vdpa/mlx5: introduce Mellanox vDPA driver")

Reported-by: Eli Britstein <elibr@nvidia.com>
Signed-off-by: Matan Azrad <matan@nvidia.com>
Tested-by: Eli Britstein <elibr@nvidia.com>
Acked-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
---
 drivers/vdpa/mlx5/mlx5_vdpa.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.c b/drivers/vdpa/mlx5/mlx5_vdpa.c
index 228f5f59d2..6029cfc3a8 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa.c
@@ -805,6 +805,8 @@ mlx5_vdpa_pci_remove(struct rte_pci_device *pci_dev)
 			mlx5_glue->dv_free_var(priv->var);
 			priv->var = NULL;
 		}
+		if (priv->vdev)
+			rte_vdpa_unregister_device(priv->vdev);
 		mlx5_glue->close_device(priv->ctx);
 		pthread_mutex_destroy(&priv->vq_config_lock);
 		rte_free(priv);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.749240000 +0800
+++ 0166-vdpa-mlx5-fix-device-unplug.patch	2021-06-12 06:53:56.650000000 +0800
@@ -1 +1 @@
-From 2838aa76ba94e0dd7712e57fe6a32651f5690797 Mon Sep 17 00:00:00 2001
+From a6967ee4a8cb1be554f2ff9d3c9ba794eef16aee Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 2838aa76ba94e0dd7712e57fe6a32651f5690797 ]
@@ -15 +17,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index 40db28b6db..e5e03e6582 100644
+index 228f5f59d2..6029cfc3a8 100644
@@ -30 +32 @@
-@@ -787,6 +787,8 @@ mlx5_vdpa_pci_remove(struct rte_pci_device *pci_dev)
+@@ -805,6 +805,8 @@ mlx5_vdpa_pci_remove(struct rte_pci_device *pci_dev)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix Rx/Tx queue numbers check' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (164 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'vdpa/mlx5: fix device unplug' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/hns3: fix requested FC mode rollback' " Xueming Li
                       ` (11 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6442b97894923ddfc38b85e65b230382f6a42fe6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6442b97894923ddfc38b85e65b230382f6a42fe6 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Sat, 15 May 2021 08:52:33 +0800
Subject: [PATCH] net/hns3: fix Rx/Tx queue numbers check
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 16c08f07ab673655db5fcae2043e2cb1f423c5b2 ]

The Rx/Tx queue numbers should be greater than TC number, this patch adds
this check for PF before updating the mapping between TC and queue.

Fixes: a951c1ed3ab5 ("net/hns3: support different numbers of Rx and Tx queues")
Fixes: 76d794566d43 ("net/hns3: maximize queue number")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_dcb.c       | 12 ++++++++++++
 drivers/net/hns3/hns3_ethdev_vf.c | 12 ------------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c
index b395372aac..cbfcb11ed0 100644
--- a/drivers/net/hns3/hns3_dcb.c
+++ b/drivers/net/hns3/hns3_dcb.c
@@ -685,6 +685,18 @@ hns3_queue_to_tc_mapping(struct hns3_hw *hw, uint16_t nb_rx_q, uint16_t nb_tx_q)
 {
 	int ret;
 
+	if (nb_rx_q < hw->num_tc) {
+		hns3_err(hw, "number of Rx queues(%u) is less than number of TC(%u).",
+			 nb_rx_q, hw->num_tc);
+		return -EINVAL;
+	}
+
+	if (nb_tx_q < hw->num_tc) {
+		hns3_err(hw, "number of Tx queues(%u) is less than number of TC(%u).",
+			 nb_tx_q, hw->num_tc);
+		return -EINVAL;
+	}
+
 	ret = hns3_set_rss_size(hw, nb_rx_q);
 	if (ret)
 		return ret;
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index d18313c330..807ebe16ba 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1435,18 +1435,6 @@ hns3vf_set_tc_queue_mapping(struct hns3_adapter *hns, uint16_t nb_rx_q,
 {
 	struct hns3_hw *hw = &hns->hw;
 
-	if (nb_rx_q < hw->num_tc) {
-		hns3_err(hw, "number of Rx queues(%u) is less than tcs(%u).",
-			 nb_rx_q, hw->num_tc);
-		return -EINVAL;
-	}
-
-	if (nb_tx_q < hw->num_tc) {
-		hns3_err(hw, "number of Tx queues(%u) is less than tcs(%u).",
-			 nb_tx_q, hw->num_tc);
-		return -EINVAL;
-	}
-
 	return hns3_queue_to_tc_mapping(hw, nb_rx_q, nb_tx_q);
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.773243800 +0800
+++ 0167-net-hns3-fix-Rx-Tx-queue-numbers-check.patch	2021-06-12 06:53:56.660000000 +0800
@@ -1 +1 @@
-From 16c08f07ab673655db5fcae2043e2cb1f423c5b2 Mon Sep 17 00:00:00 2001
+From 6442b97894923ddfc38b85e65b230382f6a42fe6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 16c08f07ab673655db5fcae2043e2cb1f423c5b2 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
-index 30e59e80a6..ab307f1f54 100644
+index b395372aac..cbfcb11ed0 100644
@@ -24 +26 @@
-@@ -727,6 +727,18 @@ hns3_queue_to_tc_mapping(struct hns3_hw *hw, uint16_t nb_rx_q, uint16_t nb_tx_q)
+@@ -685,6 +685,18 @@ hns3_queue_to_tc_mapping(struct hns3_hw *hw, uint16_t nb_rx_q, uint16_t nb_tx_q)
@@ -44 +46 @@
-index 536ed463ef..c64961632c 100644
+index d18313c330..807ebe16ba 100644
@@ -47 +49 @@
-@@ -1498,18 +1498,6 @@ hns3vf_set_tc_queue_mapping(struct hns3_adapter *hns, uint16_t nb_rx_q,
+@@ -1435,18 +1435,6 @@ hns3vf_set_tc_queue_mapping(struct hns3_adapter *hns, uint16_t nb_rx_q,

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix requested FC mode rollback' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (165 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/hns3: fix Rx/Tx queue numbers check' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/hns3: remove meaningless packet buffer " Xueming Li
                       ` (10 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/47af5229ce0a272be51ae904dc65b944b6f47d19

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 47af5229ce0a272be51ae904dc65b944b6f47d19 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Sat, 15 May 2021 08:52:34 +0800
Subject: [PATCH] net/hns3: fix requested FC mode rollback
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 19603f63fbb77f6ceddce9d36d20a6f5d7cdd4cf ]

Currently, the "requested_fc_mode" lacks rollback when enabling link
FC or PFC fails.
For example, this may result an incorrect FC mode after a reset.

Fixes: d4fdb71a0e7b ("net/hns3: fix flow control mode")
Fixes: 62e3ccc2b94c ("net/hns3: support flow control")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_dcb.c    | 30 ++++++++++++++++++++++++++++++
 drivers/net/hns3/hns3_ethdev.c | 28 ----------------------------
 2 files changed, 30 insertions(+), 28 deletions(-)

diff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c
index cbfcb11ed0..e5b6915d17 100644
--- a/drivers/net/hns3/hns3_dcb.c
+++ b/drivers/net/hns3/hns3_dcb.c
@@ -1717,6 +1717,30 @@ hns3_dcb_cfg_update(struct hns3_adapter *hns)
 	return ret;
 }
 
+static void
+hns3_get_fc_mode(struct hns3_hw *hw, enum rte_eth_fc_mode mode)
+{
+	switch (mode) {
+	case RTE_FC_NONE:
+		hw->requested_fc_mode = HNS3_FC_NONE;
+		break;
+	case RTE_FC_RX_PAUSE:
+		hw->requested_fc_mode = HNS3_FC_RX_PAUSE;
+		break;
+	case RTE_FC_TX_PAUSE:
+		hw->requested_fc_mode = HNS3_FC_TX_PAUSE;
+		break;
+	case RTE_FC_FULL:
+		hw->requested_fc_mode = HNS3_FC_FULL;
+		break;
+	default:
+		hw->requested_fc_mode = HNS3_FC_NONE;
+		hns3_warn(hw, "fc_mode(%u) exceeds member scope and is "
+			  "configured to RTE_FC_NONE", mode);
+		break;
+	}
+}
+
 /*
  * hns3_dcb_pfc_enable - Enable priority flow control
  * @dev: pointer to ethernet device
@@ -1729,6 +1753,7 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
 	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct hns3_pf *pf = HNS3_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	enum hns3_fc_status fc_status = hw->current_fc_status;
+	enum hns3_fc_mode old_fc_mode = hw->requested_fc_mode;
 	uint8_t hw_pfc_map = hw->dcb_info.hw_pfc_map;
 	uint8_t pfc_en = hw->dcb_info.pfc_en;
 	uint8_t priority = pfc_conf->priority;
@@ -1736,6 +1761,7 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
 	int ret, status;
 
 	pf->pause_time = pfc_conf->fc.pause_time;
+	hns3_get_fc_mode(hw, pfc_conf->fc.mode);
 	hw->current_fc_status = HNS3_FC_STATUS_PFC;
 	hw->dcb_info.pfc_en |= BIT(priority);
 	hw->dcb_info.hw_pfc_map =
@@ -1757,6 +1783,7 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
 	return 0;
 
 pfc_setup_fail:
+	hw->requested_fc_mode = old_fc_mode;
 	hw->current_fc_status = fc_status;
 	pf->pause_time = pause_time;
 	hw->dcb_info.pfc_en = pfc_en;
@@ -1779,11 +1806,13 @@ hns3_fc_enable(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 {
 	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct hns3_pf *pf = HNS3_DEV_PRIVATE_TO_PF(dev->data->dev_private);
+	enum hns3_fc_mode old_fc_mode = hw->requested_fc_mode;
 	enum hns3_fc_status fc_status = hw->current_fc_status;
 	uint16_t pause_time = pf->pause_time;
 	int ret;
 
 	pf->pause_time = fc_conf->pause_time;
+	hns3_get_fc_mode(hw, fc_conf->mode);
 
 	/*
 	 * In fact, current_fc_status is HNS3_FC_STATUS_NONE when mode
@@ -1803,6 +1832,7 @@ hns3_fc_enable(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 	return 0;
 
 setup_fc_fail:
+	hw->requested_fc_mode = old_fc_mode;
 	hw->current_fc_status = fc_status;
 	pf->pause_time = pause_time;
 
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 5716e399c9..907fa43257 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -5241,30 +5241,6 @@ hns3_flow_ctrl_get(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 	return 0;
 }
 
-static void
-hns3_get_fc_mode(struct hns3_hw *hw, enum rte_eth_fc_mode mode)
-{
-	switch (mode) {
-	case RTE_FC_NONE:
-		hw->requested_fc_mode = HNS3_FC_NONE;
-		break;
-	case RTE_FC_RX_PAUSE:
-		hw->requested_fc_mode = HNS3_FC_RX_PAUSE;
-		break;
-	case RTE_FC_TX_PAUSE:
-		hw->requested_fc_mode = HNS3_FC_TX_PAUSE;
-		break;
-	case RTE_FC_FULL:
-		hw->requested_fc_mode = HNS3_FC_FULL;
-		break;
-	default:
-		hw->requested_fc_mode = HNS3_FC_NONE;
-		hns3_warn(hw, "fc_mode(%u) exceeds member scope and is "
-			  "configured to RTE_FC_NONE", mode);
-		break;
-	}
-}
-
 static int
 hns3_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 {
@@ -5302,8 +5278,6 @@ hns3_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
 		return -EOPNOTSUPP;
 	}
 
-	hns3_get_fc_mode(hw, fc_conf->mode);
-
 	rte_spinlock_lock(&hw->lock);
 	ret = hns3_fc_enable(dev, fc_conf);
 	rte_spinlock_unlock(&hw->lock);
@@ -5350,8 +5324,6 @@ hns3_priority_flow_ctrl_set(struct rte_eth_dev *dev,
 		return -EOPNOTSUPP;
 	}
 
-	hns3_get_fc_mode(hw, pfc_conf->fc.mode);
-
 	rte_spinlock_lock(&hw->lock);
 	ret = hns3_dcb_pfc_enable(dev, pfc_conf);
 	rte_spinlock_unlock(&hw->lock);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.796482100 +0800
+++ 0168-net-hns3-fix-requested-FC-mode-rollback.patch	2021-06-12 06:53:56.660000000 +0800
@@ -1 +1 @@
-From 19603f63fbb77f6ceddce9d36d20a6f5d7cdd4cf Mon Sep 17 00:00:00 2001
+From 47af5229ce0a272be51ae904dc65b944b6f47d19 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 19603f63fbb77f6ceddce9d36d20a6f5d7cdd4cf ]
@@ -12 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +24 @@
-index ab307f1f54..bea41156a4 100644
+index cbfcb11ed0..e5b6915d17 100644
@@ -25 +27 @@
-@@ -1760,6 +1760,30 @@ hns3_dcb_cfg_update(struct hns3_adapter *hns)
+@@ -1717,6 +1717,30 @@ hns3_dcb_cfg_update(struct hns3_adapter *hns)
@@ -56 +58 @@
-@@ -1772,6 +1796,7 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
+@@ -1729,6 +1753,7 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
@@ -64 +66 @@
-@@ -1779,6 +1804,7 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
+@@ -1736,6 +1761,7 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
@@ -72 +74 @@
-@@ -1800,6 +1826,7 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
+@@ -1757,6 +1783,7 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
@@ -80 +82 @@
-@@ -1822,11 +1849,13 @@ hns3_fc_enable(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -1779,11 +1806,13 @@ hns3_fc_enable(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
@@ -94 +96 @@
-@@ -1846,6 +1875,7 @@ hns3_fc_enable(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -1803,6 +1832,7 @@ hns3_fc_enable(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
@@ -103 +105 @@
-index 0589e3f10a..f49f220062 100644
+index 5716e399c9..907fa43257 100644
@@ -106 +108 @@
-@@ -6059,30 +6059,6 @@ hns3_flow_ctrl_get(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -5241,30 +5241,6 @@ hns3_flow_ctrl_get(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
@@ -135 +137 @@
- hns3_check_fc_autoneg_valid(struct hns3_hw *hw, uint8_t autoneg)
+ hns3_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
@@ -137 +139 @@
-@@ -6156,8 +6132,6 @@ hns3_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -5302,8 +5278,6 @@ hns3_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
@@ -146 +148 @@
-@@ -6204,8 +6178,6 @@ hns3_priority_flow_ctrl_set(struct rte_eth_dev *dev,
+@@ -5350,8 +5324,6 @@ hns3_priority_flow_ctrl_set(struct rte_eth_dev *dev,

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: remove meaningless packet buffer rollback' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (166 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/hns3: fix requested FC mode rollback' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/hns3: fix DCB configuration' " Xueming Li
                       ` (9 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/aeaba9b829aa101839a4dd594abd2f05a24fbbbb

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From aeaba9b829aa101839a4dd594abd2f05a24fbbbb Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Sat, 15 May 2021 08:52:35 +0800
Subject: [PATCH] net/hns3: remove meaningless packet buffer rollback
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 47ce649fd30c89d95c420a015f9eef7f215bb386 ]

Packet buffer allocation and hardware pause configuration fail normally
when a reset occurs. If the execution fails, rollback of the packet
buffer still fails. So this rollback is meaningless.

Fixes: 62e3ccc2b94c ("net/hns3: support flow control")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_dcb.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c
index e5b6915d17..69db900c93 100644
--- a/drivers/net/hns3/hns3_dcb.c
+++ b/drivers/net/hns3/hns3_dcb.c
@@ -1501,7 +1501,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
 	enum hns3_fc_status fc_status = hw->current_fc_status;
 	enum hns3_fc_mode requested_fc_mode = hw->requested_fc_mode;
 	uint8_t hw_pfc_map = hw->dcb_info.hw_pfc_map;
-	int ret, status;
+	int ret;
 
 	if (pf->tx_sch_mode != HNS3_FLAG_TC_BASE_SCH_MODE &&
 	    pf->tx_sch_mode != HNS3_FLAG_VNET_BASE_SCH_MODE)
@@ -1526,7 +1526,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
 
 		ret = hns3_buffer_alloc(hw);
 		if (ret)
-			return ret;
+			goto buffer_alloc_fail;
 
 		hw->current_fc_status = HNS3_FC_STATUS_PFC;
 		hw->requested_fc_mode = HNS3_FC_FULL;
@@ -1552,10 +1552,9 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
 pfc_setup_fail:
 	hw->requested_fc_mode = requested_fc_mode;
 	hw->current_fc_status = fc_status;
+
+buffer_alloc_fail:
 	hw->dcb_info.hw_pfc_map = hw_pfc_map;
-	status = hns3_buffer_alloc(hw);
-	if (status)
-		hns3_err(hw, "recover packet buffer fail! status = %d", status);
 
 	return ret;
 }
@@ -1758,7 +1757,7 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
 	uint8_t pfc_en = hw->dcb_info.pfc_en;
 	uint8_t priority = pfc_conf->priority;
 	uint16_t pause_time = pf->pause_time;
-	int ret, status;
+	int ret;
 
 	pf->pause_time = pfc_conf->fc.pause_time;
 	hns3_get_fc_mode(hw, pfc_conf->fc.mode);
@@ -1788,9 +1787,6 @@ pfc_setup_fail:
 	pf->pause_time = pause_time;
 	hw->dcb_info.pfc_en = pfc_en;
 	hw->dcb_info.hw_pfc_map = hw_pfc_map;
-	status = hns3_buffer_alloc(hw);
-	if (status)
-		hns3_err(hw, "recover packet buffer fail: %d", status);
 
 	return ret;
 }
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.821768600 +0800
+++ 0169-net-hns3-remove-meaningless-packet-buffer-rollback.patch	2021-06-12 06:53:56.670000000 +0800
@@ -1 +1 @@
-From 47ce649fd30c89d95c420a015f9eef7f215bb386 Mon Sep 17 00:00:00 2001
+From aeaba9b829aa101839a4dd594abd2f05a24fbbbb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 47ce649fd30c89d95c420a015f9eef7f215bb386 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index bea41156a4..8fcb284cf1 100644
+index e5b6915d17..69db900c93 100644
@@ -23 +25 @@
-@@ -1543,7 +1543,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
+@@ -1501,7 +1501,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
@@ -32 +34 @@
-@@ -1568,7 +1568,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
+@@ -1526,7 +1526,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
@@ -41 +43 @@
-@@ -1594,10 +1594,9 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
+@@ -1552,10 +1552,9 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
@@ -54 +56 @@
-@@ -1801,7 +1800,7 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
+@@ -1758,7 +1757,7 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
@@ -63 +65 @@
-@@ -1831,9 +1830,6 @@ pfc_setup_fail:
+@@ -1788,9 +1787,6 @@ pfc_setup_fail:

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix DCB configuration' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (167 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/hns3: remove meaningless packet buffer " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/hns3: fix DCB reconfiguration' " Xueming Li
                       ` (8 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/0eafb399ba3a6bb5b016efdc27a1e56114f20893

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0eafb399ba3a6bb5b016efdc27a1e56114f20893 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Sat, 15 May 2021 08:52:36 +0800
Subject: [PATCH] net/hns3: fix DCB configuration
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 0b92fa1eb0648c489447853073d47e56b7717e74 ]

Currently, the DCB configuration takes effect in the dev_start stage, and
the mapping between TCs and queues are also updated in this stage.
However, the DCB configuration is delivered in the dev_configure stage.

If the configuration fails, it should be intercepted in this stage. If
the configuration succeeds, the user should be able to obtain the
corresponding updated information, such as the mapping between TCs and
queues. So this patch moves DCB configuration to dev_configure.

Fixes: 62e3ccc2b94c ("net/hns3: support flow control")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_dcb.c    | 34 ++++-------------------
 drivers/net/hns3/hns3_dcb.h    |  2 +-
 drivers/net/hns3/hns3_ethdev.c | 51 ++++++++++++++++++++--------------
 3 files changed, 37 insertions(+), 50 deletions(-)

diff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c
index 69db900c93..15f5f05134 100644
--- a/drivers/net/hns3/hns3_dcb.c
+++ b/drivers/net/hns3/hns3_dcb.c
@@ -1573,7 +1573,7 @@ hns3_dcb_configure(struct hns3_adapter *hns)
 	int ret;
 
 	hns3_dcb_cfg_validate(hns, &num_tc, &map_changed);
-	if (map_changed || rte_atomic16_read(&hw->reset.resetting)) {
+	if (map_changed) {
 		ret = hns3_dcb_info_update(hns, num_tc);
 		if (ret) {
 			hns3_err(hw, "dcb info update failed: %d", ret);
@@ -1669,14 +1669,18 @@ hns3_dcb_init(struct hns3_hw *hw)
 	return 0;
 }
 
-static int
+int
 hns3_update_queue_map_configure(struct hns3_adapter *hns)
 {
 	struct hns3_hw *hw = &hns->hw;
+	enum rte_eth_rx_mq_mode mq_mode = hw->data->dev_conf.rxmode.mq_mode;
 	uint16_t nb_rx_q = hw->data->nb_rx_queues;
 	uint16_t nb_tx_q = hw->data->nb_tx_queues;
 	int ret;
 
+	if ((uint32_t)mq_mode & ETH_MQ_RX_DCB_FLAG)
+		return 0;
+
 	ret = hns3_dcb_update_tc_queue_mapping(hw, nb_rx_q, nb_tx_q);
 	if (ret) {
 		hns3_err(hw, "failed to update tc queue mapping, ret = %d.",
@@ -1690,32 +1694,6 @@ hns3_update_queue_map_configure(struct hns3_adapter *hns)
 	return ret;
 }
 
-int
-hns3_dcb_cfg_update(struct hns3_adapter *hns)
-{
-	struct hns3_hw *hw = &hns->hw;
-	enum rte_eth_rx_mq_mode mq_mode = hw->data->dev_conf.rxmode.mq_mode;
-	int ret;
-
-	if ((uint32_t)mq_mode & ETH_MQ_RX_DCB_FLAG) {
-		ret = hns3_dcb_configure(hns);
-		if (ret)
-			hns3_err(hw, "Failed to config dcb: %d", ret);
-	} else {
-		/*
-		 * Update queue map without PFC configuration,
-		 * due to queues reconfigured by user.
-		 */
-		ret = hns3_update_queue_map_configure(hns);
-		if (ret)
-			hns3_err(hw,
-				 "Failed to update queue mapping configure: %d",
-				 ret);
-	}
-
-	return ret;
-}
-
 static void
 hns3_get_fc_mode(struct hns3_hw *hw, enum rte_eth_fc_mode mode)
 {
diff --git a/drivers/net/hns3/hns3_dcb.h b/drivers/net/hns3/hns3_dcb.h
index 49e5ba70a5..0d167e75dc 100644
--- a/drivers/net/hns3/hns3_dcb.h
+++ b/drivers/net/hns3/hns3_dcb.h
@@ -207,7 +207,7 @@ int hns3_dcb_pfc_enable(struct rte_eth_dev *dev,
 int hns3_queue_to_tc_mapping(struct hns3_hw *hw, uint16_t nb_rx_q,
 			     uint16_t nb_tx_q);
 
-int hns3_dcb_cfg_update(struct hns3_adapter *hns);
+int hns3_update_queue_map_configure(struct hns3_adapter *hns);
 int hns3_dcb_port_shaper_cfg(struct hns3_hw *hw);
 
 #endif /* _HNS3_DCB_H_ */
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 907fa43257..637e6134f9 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2191,24 +2191,6 @@ hns3_check_mq_mode(struct rte_eth_dev *dev)
 	return 0;
 }
 
-static int
-hns3_check_dcb_cfg(struct rte_eth_dev *dev)
-{
-	struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-
-	if (!hns3_dev_dcb_supported(hw)) {
-		hns3_err(hw, "this port does not support dcb configurations.");
-		return -EOPNOTSUPP;
-	}
-
-	if (hw->current_fc_status == HNS3_FC_STATUS_MAC_PAUSE) {
-		hns3_err(hw, "MAC pause enabled, cannot config dcb info.");
-		return -EOPNOTSUPP;
-	}
-
-	return 0;
-}
-
 static int
 hns3_bind_ring_with_vector(struct hns3_hw *hw, uint16_t vector_id, bool en,
 			   enum hns3_ring_type queue_type, uint16_t queue_id)
@@ -2344,6 +2326,30 @@ hns3_refresh_mtu(struct rte_eth_dev *dev, struct rte_eth_conf *conf)
 	return 0;
 }
 
+static int
+hns3_setup_dcb(struct rte_eth_dev *dev)
+{
+	struct hns3_adapter *hns = dev->data->dev_private;
+	struct hns3_hw *hw = &hns->hw;
+	int ret;
+
+	if (!hns3_dev_dcb_supported(hw)) {
+		hns3_err(hw, "this port does not support dcb configurations.");
+		return -EOPNOTSUPP;
+	}
+
+	if (hw->current_fc_status == HNS3_FC_STATUS_MAC_PAUSE) {
+		hns3_err(hw, "MAC pause enabled, cannot config dcb info.");
+		return -EOPNOTSUPP;
+	}
+
+	ret = hns3_dcb_configure(hns);
+	if (ret)
+		hns3_err(hw, "failed to config dcb: %d", ret);
+
+	return ret;
+}
+
 static int
 hns3_dev_configure(struct rte_eth_dev *dev)
 {
@@ -2390,7 +2396,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
 		goto cfg_err;
 
 	if ((uint32_t)mq_mode & ETH_MQ_RX_DCB_FLAG) {
-		ret = hns3_check_dcb_cfg(dev);
+		ret = hns3_setup_dcb(dev);
 		if (ret)
 			goto cfg_err;
 	}
@@ -4870,9 +4876,12 @@ hns3_do_start(struct hns3_adapter *hns, bool reset_queue)
 	struct hns3_hw *hw = &hns->hw;
 	int ret;
 
-	ret = hns3_dcb_cfg_update(hns);
-	if (ret)
+	ret = hns3_update_queue_map_configure(hns);
+	if (ret) {
+		hns3_err(hw, "failed to update queue mapping configuration, ret = %d",
+			 ret);
 		return ret;
+	}
 
 	ret = hns3_init_queues(hns, reset_queue);
 	if (ret) {
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.847089400 +0800
+++ 0170-net-hns3-fix-DCB-configuration.patch	2021-06-12 06:53:56.670000000 +0800
@@ -1 +1 @@
-From 0b92fa1eb0648c489447853073d47e56b7717e74 Mon Sep 17 00:00:00 2001
+From 0eafb399ba3a6bb5b016efdc27a1e56114f20893 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 0b92fa1eb0648c489447853073d47e56b7717e74 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -21 +23 @@
- drivers/net/hns3/hns3_dcb.c    | 35 ++++-----------------
+ drivers/net/hns3/hns3_dcb.c    | 34 ++++-------------------
@@ -23,2 +25,2 @@
- drivers/net/hns3/hns3_ethdev.c | 56 +++++++++++++++++++---------------
- 3 files changed, 38 insertions(+), 55 deletions(-)
+ drivers/net/hns3/hns3_ethdev.c | 51 ++++++++++++++++++++--------------
+ 3 files changed, 37 insertions(+), 50 deletions(-)
@@ -27 +29 @@
-index 8fcb284cf1..1cb6adb886 100644
+index 69db900c93..15f5f05134 100644
@@ -30 +32 @@
-@@ -1615,8 +1615,7 @@ hns3_dcb_configure(struct hns3_adapter *hns)
+@@ -1573,7 +1573,7 @@ hns3_dcb_configure(struct hns3_adapter *hns)
@@ -34,2 +36 @@
--	if (map_changed ||
--	    __atomic_load_n(&hw->reset.resetting,  __ATOMIC_RELAXED)) {
+-	if (map_changed || rte_atomic16_read(&hw->reset.resetting)) {
@@ -40 +41 @@
-@@ -1712,14 +1711,18 @@ hns3_dcb_init(struct hns3_hw *hw)
+@@ -1669,14 +1669,18 @@ hns3_dcb_init(struct hns3_hw *hw)
@@ -60 +61 @@
-@@ -1733,32 +1736,6 @@ hns3_update_queue_map_configure(struct hns3_adapter *hns)
+@@ -1690,32 +1694,6 @@ hns3_update_queue_map_configure(struct hns3_adapter *hns)
@@ -94 +95 @@
-index cd8d0b7bc8..f378bd46c6 100644
+index 49e5ba70a5..0d167e75dc 100644
@@ -103,3 +104,3 @@
- int hns3_port_shaper_update(struct hns3_hw *hw, uint32_t speed);
- int hns3_pg_shaper_rate_cfg(struct hns3_hw *hw, uint8_t pg_id, uint32_t rate);
- int hns3_pri_shaper_rate_cfg(struct hns3_hw *hw, uint8_t tc_no, uint32_t rate);
+ int hns3_dcb_port_shaper_cfg(struct hns3_hw *hw);
+ 
+ #endif /* _HNS3_DCB_H_ */
@@ -107 +108 @@
-index f49f220062..20491305e7 100644
+index 907fa43257..637e6134f9 100644
@@ -110 +111 @@
-@@ -2273,24 +2273,6 @@ hns3_check_mq_mode(struct rte_eth_dev *dev)
+@@ -2191,24 +2191,6 @@ hns3_check_mq_mode(struct rte_eth_dev *dev)
@@ -135 +136 @@
-@@ -2426,6 +2408,30 @@ hns3_refresh_mtu(struct rte_eth_dev *dev, struct rte_eth_conf *conf)
+@@ -2344,6 +2326,30 @@ hns3_refresh_mtu(struct rte_eth_dev *dev, struct rte_eth_conf *conf)
@@ -164 +165 @@
- hns3_check_link_speed(struct hns3_hw *hw, uint32_t link_speeds)
+ hns3_dev_configure(struct rte_eth_dev *dev)
@@ -166 +167 @@
-@@ -2506,7 +2512,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
+@@ -2390,7 +2396,7 @@ hns3_dev_configure(struct rte_eth_dev *dev)
@@ -175 +176 @@
-@@ -5574,14 +5580,14 @@ hns3_do_start(struct hns3_adapter *hns, bool reset_queue)
+@@ -4870,9 +4876,12 @@ hns3_do_start(struct hns3_adapter *hns, bool reset_queue)
@@ -188,6 +189 @@
--	/*
--	 * The hns3_dcb_cfg_update may configure TM module, so
--	 * hns3_tm_conf_update must called later.
--	 */
-+	/* Note: hns3_tm_conf_update must be called after configuring DCB. */
- 	ret = hns3_tm_conf_update(hw);
+ 	ret = hns3_init_queues(hns, reset_queue);
@@ -195 +190,0 @@
- 		PMD_INIT_LOG(ERR, "failed to update tm conf, ret = %d.", ret);

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix DCB reconfiguration' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (168 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/hns3: fix DCB configuration' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/hns3: fix link speed when VF device is down' " Xueming Li
                       ` (7 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f4a3f4a6b9111ab5ec3682e9cd8428a87040b1f4

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From f4a3f4a6b9111ab5ec3682e9cd8428a87040b1f4 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Sat, 15 May 2021 08:52:37 +0800
Subject: [PATCH] net/hns3: fix DCB reconfiguration
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit b67bdfc8f6630934f3005ad531225c7203304661 ]

Whether the enable bit of the pfc ("pfc_en") is changed or not is one of
the conditions for reconfiguring the DCB. Currently, pfc_en is not
rolled back when DCB configuration fails. This patch fixes it.

Fixes: 62e3ccc2b94c ("net/hns3: support flow control")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_dcb.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/hns3/hns3_dcb.c b/drivers/net/hns3/hns3_dcb.c
index 15f5f05134..7ed220be2b 100644
--- a/drivers/net/hns3/hns3_dcb.c
+++ b/drivers/net/hns3/hns3_dcb.c
@@ -1501,6 +1501,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
 	enum hns3_fc_status fc_status = hw->current_fc_status;
 	enum hns3_fc_mode requested_fc_mode = hw->requested_fc_mode;
 	uint8_t hw_pfc_map = hw->dcb_info.hw_pfc_map;
+	uint8_t pfc_en = hw->dcb_info.pfc_en;
 	int ret;
 
 	if (pf->tx_sch_mode != HNS3_FLAG_TC_BASE_SCH_MODE &&
@@ -1554,6 +1555,7 @@ pfc_setup_fail:
 	hw->current_fc_status = fc_status;
 
 buffer_alloc_fail:
+	hw->dcb_info.pfc_en = pfc_en;
 	hw->dcb_info.hw_pfc_map = hw_pfc_map;
 
 	return ret;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.871395700 +0800
+++ 0171-net-hns3-fix-DCB-reconfiguration.patch	2021-06-12 06:53:56.680000000 +0800
@@ -1 +1 @@
-From b67bdfc8f6630934f3005ad531225c7203304661 Mon Sep 17 00:00:00 2001
+From f4a3f4a6b9111ab5ec3682e9cd8428a87040b1f4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit b67bdfc8f6630934f3005ad531225c7203304661 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 1cb6adb886..90c0d041c9 100644
+index 15f5f05134..7ed220be2b 100644
@@ -23 +25 @@
-@@ -1543,6 +1543,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
+@@ -1501,6 +1501,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
@@ -31 +33 @@
-@@ -1596,6 +1597,7 @@ pfc_setup_fail:
+@@ -1554,6 +1555,7 @@ pfc_setup_fail:

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix link speed when VF device is down' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (169 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/hns3: fix DCB reconfiguration' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/mlx5: fix loopback for Direct Verbs queue' " Xueming Li
                       ` (6 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Huisong Li; +Cc: Luca Boccassi, Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/91f0c38c0d6561a1abca4ed00115e13829d327a4

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 91f0c38c0d6561a1abca4ed00115e13829d327a4 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong@huawei.com>
Date: Sat, 15 May 2021 08:52:38 +0800
Subject: [PATCH] net/hns3: fix link speed when VF device is down
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit d1ced85a7e7a193051e96c2d34a8961a2e3f96d9 ]

When the port is link down state, it is meaningless to display the
port link speed. It should be an undefined state.

Fixes: 59fad0f32135 ("net/hns3: support link update operation")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 807ebe16ba..ed9dd9b3c3 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -2065,16 +2065,18 @@ hns3vf_dev_link_update(struct rte_eth_dev *eth_dev,
 	case ETH_SPEED_NUM_50G:
 	case ETH_SPEED_NUM_100G:
 	case ETH_SPEED_NUM_200G:
-		new_link.link_speed = mac->link_speed;
+		if (mac->link_status)
+			new_link.link_speed = mac->link_speed;
 		break;
 	default:
 		if (mac->link_status)
 			new_link.link_speed = ETH_SPEED_NUM_UNKNOWN;
-		else
-			new_link.link_speed = ETH_SPEED_NUM_NONE;
 		break;
 	}
 
+	if (!mac->link_status)
+		new_link.link_speed = ETH_SPEED_NUM_NONE;
+
 	new_link.link_duplex = mac->link_duplex;
 	new_link.link_status = mac->link_status ? ETH_LINK_UP : ETH_LINK_DOWN;
 	new_link.link_autoneg =
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.894316900 +0800
+++ 0172-net-hns3-fix-link-speed-when-VF-device-is-down.patch	2021-06-12 06:53:56.680000000 +0800
@@ -1 +1 @@
-From d1ced85a7e7a193051e96c2d34a8961a2e3f96d9 Mon Sep 17 00:00:00 2001
+From 91f0c38c0d6561a1abca4ed00115e13829d327a4 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit d1ced85a7e7a193051e96c2d34a8961a2e3f96d9 ]
@@ -10 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +21 @@
-index c64961632c..41dd8ee129 100644
+index 807ebe16ba..ed9dd9b3c3 100644
@@ -22 +24 @@
-@@ -2205,16 +2205,18 @@ hns3vf_dev_link_update(struct rte_eth_dev *eth_dev,
+@@ -2065,16 +2065,18 @@ hns3vf_dev_link_update(struct rte_eth_dev *eth_dev,

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/mlx5: fix loopback for Direct Verbs queue' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (170 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/hns3: fix link speed when VF device is down' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'common/sfc_efx/base: limit reported MCDI response length' " Xueming Li
                       ` (5 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Bing Zhao; +Cc: Luca Boccassi, Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/83fcaa37fe82555e4b9d3dc726882aef259780b9

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 83fcaa37fe82555e4b9d3dc726882aef259780b9 Mon Sep 17 00:00:00 2001
From: Bing Zhao <bingz@nvidia.com>
Date: Mon, 17 May 2021 18:18:41 +0300
Subject: [PATCH] net/mlx5: fix loopback for Direct Verbs queue
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 23233fd63a15e5cde5bae4f26f78f4d679033a7b ]

In the past, all the queues and other hardware objects were created
through Verbs interface. Currently, most of the objects creation are
migrated to Devx interface by default, including queues. Only when
the DV is disabled by device arg or eswitch is enabled, all or some
of the objects are created through Verbs interface.

When using Devx interface to create queues, the kernel driver
behavior is different from the case using Verbs. The Tx loopback
cannot work properly even if the Tx and Rx queues are configured
with loopback attribute. To fix the support self loopback for Tx, a
Verbs dummy queue pair needs to be created to trigger the kernel to
enable the global loopback capability.

This is only required when TIR is created for Rx and loopback is
needed. Only CQ and QP are needed for this case, no WQ(RQ) needs to
be created.

Bugzilla ID: 645
Fixes: 6deb19e1b2d2 ("net/mlx5: separate Rx queue object creations")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c    |   5 +-
 drivers/net/mlx5/linux/mlx5_verbs.c | 121 ++++++++++++++++++++++++++++
 drivers/net/mlx5/linux/mlx5_verbs.h |   2 +
 drivers/net/mlx5/mlx5.h             |  11 +++
 drivers/net/mlx5/mlx5_devx.c        |   2 +
 drivers/net/mlx5/mlx5_trigger.c     |  10 +++
 6 files changed, 150 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 22fbe30e05..800df92997 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -1508,7 +1508,10 @@ err_secondary:
 		/* Use specific wrappers for Tx object. */
 		priv->obj_ops.txq_obj_new = mlx5_os_txq_obj_new;
 		priv->obj_ops.txq_obj_release = mlx5_os_txq_obj_release;
-
+		priv->obj_ops.lb_dummy_queue_create =
+					mlx5_rxq_ibv_obj_dummy_lb_create;
+		priv->obj_ops.lb_dummy_queue_release =
+					mlx5_rxq_ibv_obj_dummy_lb_release;
 	} else {
 		priv->obj_ops = ibv_obj_ops;
 	}
diff --git a/drivers/net/mlx5/linux/mlx5_verbs.c b/drivers/net/mlx5/linux/mlx5_verbs.c
index 6b98a4c166..689c523ec8 100644
--- a/drivers/net/mlx5/linux/mlx5_verbs.c
+++ b/drivers/net/mlx5/linux/mlx5_verbs.c
@@ -1053,6 +1053,125 @@ error:
 	return -rte_errno;
 }
 
+/*
+ * Create the dummy QP with minimal resources for loopback.
+ *
+ * @param dev
+ *   Pointer to Ethernet device.
+ *
+ * @return
+ *   0 on success, a negative errno value otherwise and rte_errno is set.
+ */
+int
+mlx5_rxq_ibv_obj_dummy_lb_create(struct rte_eth_dev *dev)
+{
+#if defined(HAVE_IBV_DEVICE_TUNNEL_SUPPORT) && defined(HAVE_IBV_FLOW_DV_SUPPORT)
+	struct mlx5_priv *priv = dev->data->dev_private;
+	struct mlx5_dev_ctx_shared *sh = priv->sh;
+	struct ibv_context *ctx = sh->ctx;
+	struct mlx5dv_qp_init_attr qp_init_attr = {0};
+	struct {
+		struct ibv_cq_init_attr_ex ibv;
+		struct mlx5dv_cq_init_attr mlx5;
+	} cq_attr = {{0}};
+
+	if (dev->data->dev_conf.lpbk_mode) {
+		/* Allow packet sent from NIC loop back w/o source MAC check. */
+		qp_init_attr.comp_mask |=
+				MLX5DV_QP_INIT_ATTR_MASK_QP_CREATE_FLAGS;
+		qp_init_attr.create_flags |=
+				MLX5DV_QP_CREATE_TIR_ALLOW_SELF_LOOPBACK_UC;
+	} else {
+		return 0;
+	}
+	/* Only need to check refcnt, 0 after "sh" is allocated. */
+	if (!!(__atomic_fetch_add(&sh->self_lb.refcnt, 1, __ATOMIC_RELAXED))) {
+		MLX5_ASSERT(sh->self_lb.ibv_cq && sh->self_lb.qp);
+		priv->lb_used = 1;
+		return 0;
+	}
+	cq_attr.ibv = (struct ibv_cq_init_attr_ex){
+		.cqe = 1,
+		.channel = NULL,
+		.comp_mask = 0,
+	};
+	cq_attr.mlx5 = (struct mlx5dv_cq_init_attr){
+		.comp_mask = 0,
+	};
+	/* Only CQ is needed, no WQ(RQ) is required in this case. */
+	sh->self_lb.ibv_cq = mlx5_glue->cq_ex_to_cq(mlx5_glue->dv_create_cq(ctx,
+							&cq_attr.ibv,
+							&cq_attr.mlx5));
+	if (!sh->self_lb.ibv_cq) {
+		DRV_LOG(ERR, "Port %u cannot allocate CQ for loopback.",
+			dev->data->port_id);
+		rte_errno = errno;
+		goto error;
+	}
+	sh->self_lb.qp = mlx5_glue->dv_create_qp(ctx,
+				&(struct ibv_qp_init_attr_ex){
+					.qp_type = IBV_QPT_RAW_PACKET,
+					.comp_mask = IBV_QP_INIT_ATTR_PD,
+					.pd = sh->pd,
+					.send_cq = sh->self_lb.ibv_cq,
+					.recv_cq = sh->self_lb.ibv_cq,
+					.cap.max_recv_wr = 1,
+				},
+				&qp_init_attr);
+	if (!sh->self_lb.qp) {
+		DRV_LOG(DEBUG, "Port %u cannot allocate QP for loopback.",
+			dev->data->port_id);
+		rte_errno = errno;
+		goto error;
+	}
+	priv->lb_used = 1;
+	return 0;
+error:
+	if (sh->self_lb.ibv_cq) {
+		claim_zero(mlx5_glue->destroy_cq(sh->self_lb.ibv_cq));
+		sh->self_lb.ibv_cq = NULL;
+	}
+	(void)__atomic_sub_fetch(&sh->self_lb.refcnt, 1, __ATOMIC_RELAXED);
+	return -rte_errno;
+#else
+	RTE_SET_USED(dev);
+	return 0;
+#endif
+}
+
+/*
+ * Release the dummy queue resources for loopback.
+ *
+ * @param dev
+ *   Pointer to Ethernet device.
+ */
+void
+mlx5_rxq_ibv_obj_dummy_lb_release(struct rte_eth_dev *dev)
+{
+#if defined(HAVE_IBV_DEVICE_TUNNEL_SUPPORT) && defined(HAVE_IBV_FLOW_DV_SUPPORT)
+	struct mlx5_priv *priv = dev->data->dev_private;
+	struct mlx5_dev_ctx_shared *sh = priv->sh;
+
+	if (!priv->lb_used)
+		return;
+	MLX5_ASSERT(__atomic_load_n(&sh->self_lb.refcnt, __ATOMIC_RELAXED));
+	if (!(__atomic_sub_fetch(&sh->self_lb.refcnt, 1, __ATOMIC_RELAXED))) {
+		if (sh->self_lb.qp) {
+			claim_zero(mlx5_glue->destroy_qp(sh->self_lb.qp));
+			sh->self_lb.qp = NULL;
+		}
+		if (sh->self_lb.ibv_cq) {
+			claim_zero(mlx5_glue->destroy_cq(sh->self_lb.ibv_cq));
+			sh->self_lb.ibv_cq = NULL;
+		}
+	}
+	priv->lb_used = 0;
+#else
+	RTE_SET_USED(dev);
+	return;
+#endif
+}
+
 /**
  * Release an Tx verbs queue object.
  *
@@ -1082,4 +1201,6 @@ struct mlx5_obj_ops ibv_obj_ops = {
 	.txq_obj_new = mlx5_txq_ibv_obj_new,
 	.txq_obj_modify = mlx5_ibv_modify_qp,
 	.txq_obj_release = mlx5_txq_ibv_obj_release,
+	.lb_dummy_queue_create = NULL,
+	.lb_dummy_queue_release = NULL,
 };
diff --git a/drivers/net/mlx5/linux/mlx5_verbs.h b/drivers/net/mlx5/linux/mlx5_verbs.h
index 0670f6c47e..e4975051d9 100644
--- a/drivers/net/mlx5/linux/mlx5_verbs.h
+++ b/drivers/net/mlx5/linux/mlx5_verbs.h
@@ -14,6 +14,8 @@ struct mlx5_verbs_ops {
 
 int mlx5_txq_ibv_obj_new(struct rte_eth_dev *dev, uint16_t idx);
 void mlx5_txq_ibv_obj_release(struct mlx5_txq_obj *txq_obj);
+int mlx5_rxq_ibv_obj_dummy_lb_create(struct rte_eth_dev *dev);
+void mlx5_rxq_ibv_obj_dummy_lb_release(struct rte_eth_dev *dev);
 
 /* Verbs ops struct */
 extern const struct mlx5_verbs_ops mlx5_verbs_ops;
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 9437f45480..831838768a 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -269,6 +269,13 @@ struct mlx5_drop {
 	struct mlx5_rxq_obj *rxq; /* Rx queue object. */
 };
 
+/* Loopback dummy queue resources required due to Verbs API. */
+struct mlx5_lb_ctx {
+	struct ibv_qp *qp; /* QP object. */
+	void *ibv_cq; /* Completion queue. */
+	uint16_t refcnt; /* Reference count for representors. */
+};
+
 #define MLX5_COUNTERS_PER_POOL 512
 #define MLX5_MAX_PENDING_QUERIES 4
 #define MLX5_CNT_CONTAINER_RESIZE 64
@@ -751,6 +758,7 @@ struct mlx5_dev_ctx_shared {
 	void *devx_rx_uar; /* DevX UAR for Rx. */
 	struct mlx5_aso_age_mng *aso_age_mng;
 	/* Management data for aging mechanism using ASO Flow Hit. */
+	struct mlx5_lb_ctx self_lb; /* QP to enable self loopback for Devx. */
 	struct mlx5_dev_shared_port port[]; /* per device port data array. */
 };
 
@@ -915,6 +923,8 @@ struct mlx5_obj_ops {
 	int (*txq_obj_modify)(struct mlx5_txq_obj *obj,
 			      enum mlx5_txq_modify_type type, uint8_t dev_port);
 	void (*txq_obj_release)(struct mlx5_txq_obj *txq_obj);
+	int (*lb_dummy_queue_create)(struct rte_eth_dev *dev);
+	void (*lb_dummy_queue_release)(struct rte_eth_dev *dev);
 };
 
 #define MLX5_RSS_HASH_FIELDS_LEN RTE_DIM(mlx5_rss_hash_fields)
@@ -938,6 +948,7 @@ struct mlx5_priv {
 	unsigned int mtr_en:1; /* Whether support meter. */
 	unsigned int mtr_reg_share:1; /* Whether support meter REG_C share. */
 	unsigned int sampler_en:1; /* Whether support sampler. */
+	unsigned int lb_used:1; /* Loopback queue is referred to. */
 	uint16_t domain_id; /* Switch domain identifier. */
 	uint16_t vport_id; /* Associated VF vport index (if any). */
 	uint32_t vport_meta_tag; /* Used for vport index match ove VF LAG. */
diff --git a/drivers/net/mlx5/mlx5_devx.c b/drivers/net/mlx5/mlx5_devx.c
index 377362e321..2d1ce4d556 100644
--- a/drivers/net/mlx5/mlx5_devx.c
+++ b/drivers/net/mlx5/mlx5_devx.c
@@ -1567,4 +1567,6 @@ struct mlx5_obj_ops devx_obj_ops = {
 	.txq_obj_new = mlx5_txq_devx_obj_new,
 	.txq_obj_modify = mlx5_devx_modify_sq,
 	.txq_obj_release = mlx5_txq_devx_obj_release,
+	.lb_dummy_queue_create = NULL,
+	.lb_dummy_queue_release = NULL,
 };
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index bd029154f8..0c267dce06 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -1066,6 +1066,12 @@ mlx5_dev_start(struct rte_eth_dev *dev)
 			dev->data->port_id, strerror(rte_errno));
 		goto error;
 	}
+	if ((priv->config.devx && priv->config.dv_flow_en &&
+	    priv->config.dest_tir) && priv->obj_ops.lb_dummy_queue_create) {
+		ret = priv->obj_ops.lb_dummy_queue_create(dev);
+		if (ret)
+			goto error;
+	}
 	ret = mlx5_txq_start(dev);
 	if (ret) {
 		DRV_LOG(ERR, "port %u Tx queue allocation failed: %s",
@@ -1146,6 +1152,8 @@ error:
 	mlx5_traffic_disable(dev);
 	mlx5_txq_stop(dev);
 	mlx5_rxq_stop(dev);
+	if (priv->obj_ops.lb_dummy_queue_release)
+		priv->obj_ops.lb_dummy_queue_release(dev);
 	mlx5_txpp_stop(dev); /* Stop last. */
 	rte_errno = ret; /* Restore rte_errno. */
 	return -rte_errno;
@@ -1183,6 +1191,8 @@ mlx5_dev_stop(struct rte_eth_dev *dev)
 	priv->sh->port[priv->dev_port - 1].devx_ih_port_id = RTE_MAX_ETHPORTS;
 	mlx5_txq_stop(dev);
 	mlx5_rxq_stop(dev);
+	if (priv->obj_ops.lb_dummy_queue_release)
+		priv->obj_ops.lb_dummy_queue_release(dev);
 	mlx5_txpp_stop(dev);
 
 	return 0;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.916760800 +0800
+++ 0173-net-mlx5-fix-loopback-for-Direct-Verbs-queue.patch	2021-06-12 06:53:56.690000000 +0800
@@ -1 +1 @@
-From 23233fd63a15e5cde5bae4f26f78f4d679033a7b Mon Sep 17 00:00:00 2001
+From 83fcaa37fe82555e4b9d3dc726882aef259780b9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 23233fd63a15e5cde5bae4f26f78f4d679033a7b ]
@@ -25 +27,0 @@
-Cc: stable@dpdk.org
@@ -39 +41 @@
-index ef7ccba5de..534a56a555 100644
+index 22fbe30e05..800df92997 100644
@@ -42 +44,2 @@
-@@ -1632,7 +1632,10 @@ err_secondary:
+@@ -1508,7 +1508,10 @@ err_secondary:
+ 		/* Use specific wrappers for Tx object. */
@@ -45 +47,0 @@
- 		mlx5_queue_counter_id_prepare(eth_dev);
@@ -55 +57 @@
-index 0b0759f33f..d4fa202ac4 100644
+index 6b98a4c166..689c523ec8 100644
@@ -58 +60 @@
-@@ -1055,6 +1055,125 @@ error:
+@@ -1053,6 +1053,125 @@ error:
@@ -184 +186 @@
-@@ -1084,4 +1203,6 @@ struct mlx5_obj_ops ibv_obj_ops = {
+@@ -1082,4 +1201,6 @@ struct mlx5_obj_ops ibv_obj_ops = {
@@ -192 +194 @@
-index 76a79bf4f4..f7e8e2fe98 100644
+index 0670f6c47e..e4975051d9 100644
@@ -195 +197 @@
-@@ -9,6 +9,8 @@
+@@ -14,6 +14,8 @@ struct mlx5_verbs_ops {
@@ -203 +205 @@
- extern const struct mlx5_mr_ops mlx5_mr_verbs_ops;
+ extern const struct mlx5_verbs_ops mlx5_verbs_ops;
@@ -205 +207 @@
-index b8a29dd369..32b2817bf2 100644
+index 9437f45480..831838768a 100644
@@ -208 +210 @@
-@@ -287,6 +287,13 @@ struct mlx5_drop {
+@@ -269,6 +269,13 @@ struct mlx5_drop {
@@ -222,4 +224,4 @@
-@@ -1128,6 +1135,7 @@ struct mlx5_dev_ctx_shared {
- 	/* Meter management structure. */
- 	struct mlx5_aso_ct_pools_mng *ct_mng;
- 	/* Management data for ASO connection tracking. */
+@@ -751,6 +758,7 @@ struct mlx5_dev_ctx_shared {
+ 	void *devx_rx_uar; /* DevX UAR for Rx. */
+ 	struct mlx5_aso_age_mng *aso_age_mng;
+ 	/* Management data for aging mechanism using ASO Flow Hit. */
@@ -230 +232 @@
-@@ -1287,6 +1295,8 @@ struct mlx5_obj_ops {
+@@ -915,6 +923,8 @@ struct mlx5_obj_ops {
@@ -239,2 +241 @@
-@@ -1316,6 +1326,7 @@ struct mlx5_priv {
- 	unsigned int sampler_en:1; /* Whether support sampler. */
+@@ -938,6 +948,7 @@ struct mlx5_priv {
@@ -242,0 +244 @@
+ 	unsigned int sampler_en:1; /* Whether support sampler. */
@@ -248 +250 @@
-index 531a81d7fa..78b88f99b4 100644
+index 377362e321..2d1ce4d556 100644
@@ -251 +253 @@
-@@ -1188,4 +1188,6 @@ struct mlx5_obj_ops devx_obj_ops = {
+@@ -1567,4 +1567,6 @@ struct mlx5_obj_ops devx_obj_ops = {
@@ -259 +261 @@
-index 879d3171e9..ae7fcca229 100644
+index bd029154f8..0c267dce06 100644
@@ -262 +264 @@
-@@ -1068,6 +1068,12 @@ mlx5_dev_start(struct rte_eth_dev *dev)
+@@ -1066,6 +1066,12 @@ mlx5_dev_start(struct rte_eth_dev *dev)
@@ -275 +277 @@
-@@ -1148,6 +1154,8 @@ error:
+@@ -1146,6 +1152,8 @@ error:
@@ -284 +286 @@
-@@ -1186,6 +1194,8 @@ mlx5_dev_stop(struct rte_eth_dev *dev)
+@@ -1183,6 +1191,8 @@ mlx5_dev_stop(struct rte_eth_dev *dev)

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'common/sfc_efx/base: limit reported MCDI response length' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (171 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/mlx5: fix loopback for Direct Verbs queue' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'common/sfc_efx/base: add missing MCDI response length checks' " Xueming Li
                       ` (4 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Andy Moreton; +Cc: Luca Boccassi, Ivan Malov, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/6f41c82e526645b5e3cec54c61cb417b7c134ba6

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 6f41c82e526645b5e3cec54c61cb417b7c134ba6 Mon Sep 17 00:00:00 2001
From: Andy Moreton <amoreton@xilinx.com>
Date: Tue, 18 May 2021 18:10:11 +0300
Subject: [PATCH] common/sfc_efx/base: limit reported MCDI response length
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit e1c9fcab3f17b050793d1e771d33448027a15ae1 ]

MCDI helper routines in libefx include length checks for response
messages, to ensure that short replies and optional fields are
handled correctly.

If the MCDI response message from the firmware is larger than the
caller's buffer then the response length reported to the caller
should be limited to the buffer size. Otherwise length checks in
the caller may allow reading past the end of the buffer.

Fixes: 6f619653b9b1 ("net/sfc/base: import MCDI implementation")

Signed-off-by: Andy Moreton <amoreton@xilinx.com>
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/common/sfc_efx/base/efx_mcdi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/common/sfc_efx/base/efx_mcdi.c b/drivers/common/sfc_efx/base/efx_mcdi.c
index ca44267724..584f86e13a 100644
--- a/drivers/common/sfc_efx/base/efx_mcdi.c
+++ b/drivers/common/sfc_efx/base/efx_mcdi.c
@@ -516,6 +516,9 @@ efx_mcdi_finish_response(
 	bytes = MIN(emrp->emr_out_length_used, emrp->emr_out_length);
 	efx_mcdi_read_response(enp, emrp->emr_out_buf, resp_off, bytes);
 
+	/* Report bytes copied to caller (response message may be larger) */
+	emrp->emr_out_length_used = bytes;
+
 #if EFSYS_OPT_MCDI_LOGGING
 	if (emtp->emt_logger != NULL) {
 		emtp->emt_logger(emtp->emt_context,
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.945029900 +0800
+++ 0174-common-sfc_efx-base-limit-reported-MCDI-response-len.patch	2021-06-12 06:53:56.690000000 +0800
@@ -1 +1 @@
-From e1c9fcab3f17b050793d1e771d33448027a15ae1 Mon Sep 17 00:00:00 2001
+From 6f41c82e526645b5e3cec54c61cb417b7c134ba6 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit e1c9fcab3f17b050793d1e771d33448027a15ae1 ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +28 @@
-index ff676f8a01..f4e1384d09 100644
+index ca44267724..584f86e13a 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'common/sfc_efx/base: add missing MCDI response length checks' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (172 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'common/sfc_efx/base: limit reported MCDI response length' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/memif: fix Tx bps statistics for zero-copy' " Xueming Li
                       ` (3 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Andy Moreton; +Cc: Luca Boccassi, Ivan Malov, Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/b1ec8ac5ec339de563244d06d6b119cb2dabb367

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From b1ec8ac5ec339de563244d06d6b119cb2dabb367 Mon Sep 17 00:00:00 2001
From: Andy Moreton <amoreton@xilinx.com>
Date: Tue, 18 May 2021 18:10:12 +0300
Subject: [PATCH] common/sfc_efx/base: add missing MCDI response length checks
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit e27950a02b035a6d366ed362c6719b6c892dda6b ]

Fixes: 6f619653b9b1 ("net/sfc/base: import MCDI implementation")
Fixes: e7cd430c864f ("net/sfc/base: import SFN7xxx family support")
Fixes: 94190e3543bf ("net/sfc/base: import SFN8xxx family support")
Fixes: 34285fd0891d ("common/sfc_efx/base: add match spec validate API")
Fixes: e61baa82e64b ("common/sfc_efx/base: add MAE action set provisioning APIs")
Fixes: b4fac34715f2 ("common/sfc_efx/base: add MAE action rule provisioning APIs")
Fixes: ed15d7f8e064 ("common/sfc_efx/base: validate and compare outer match specs")
Fixes: 7a673e1a4a05 ("common/sfc_efx/base: support outer rule provisioning")

Signed-off-by: Andy Moreton <amoreton@xilinx.com>
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/common/sfc_efx/base/ef10_filter.c | 11 ++++-
 drivers/common/sfc_efx/base/ef10_nic.c    | 10 ++++-
 drivers/common/sfc_efx/base/efx_mae.c     | 52 +++++++++++++++++++----
 drivers/common/sfc_efx/base/efx_mcdi.c    |  7 +++
 4 files changed, 69 insertions(+), 11 deletions(-)

diff --git a/drivers/common/sfc_efx/base/ef10_filter.c b/drivers/common/sfc_efx/base/ef10_filter.c
index 0e5f04fe3b..5158e07cc9 100644
--- a/drivers/common/sfc_efx/base/ef10_filter.c
+++ b/drivers/common/sfc_efx/base/ef10_filter.c
@@ -1225,20 +1225,25 @@ efx_mcdi_get_parser_disp_info(
 		goto fail1;
 	}
 
+	if (req.emr_out_length_used < MC_CMD_GET_PARSER_DISP_INFO_OUT_LENMIN) {
+		rc = EMSGSIZE;
+		goto fail2;
+	}
+
 	matches_count = MCDI_OUT_DWORD(req,
 	    GET_PARSER_DISP_INFO_OUT_NUM_SUPPORTED_MATCHES);
 
 	if (req.emr_out_length_used <
 	    MC_CMD_GET_PARSER_DISP_INFO_OUT_LEN(matches_count)) {
 		rc = EMSGSIZE;
-		goto fail2;
+		goto fail3;
 	}
 
 	*list_lengthp = matches_count;
 
 	if (buffer_length < matches_count) {
 		rc = ENOSPC;
-		goto fail3;
+		goto fail4;
 	}
 
 	/*
@@ -1258,6 +1263,8 @@ efx_mcdi_get_parser_disp_info(
 
 	return (0);
 
+fail4:
+	EFSYS_PROBE(fail4);
 fail3:
 	EFSYS_PROBE(fail3);
 fail2:
diff --git a/drivers/common/sfc_efx/base/ef10_nic.c b/drivers/common/sfc_efx/base/ef10_nic.c
index 9dccde9576..ccce7b7437 100644
--- a/drivers/common/sfc_efx/base/ef10_nic.c
+++ b/drivers/common/sfc_efx/base/ef10_nic.c
@@ -491,11 +491,17 @@ efx_mcdi_get_rxdp_config(
 	req.emr_out_length = MC_CMD_GET_RXDP_CONFIG_OUT_LEN;
 
 	efx_mcdi_execute(enp, &req);
+
 	if (req.emr_rc != 0) {
 		rc = req.emr_rc;
 		goto fail1;
 	}
 
+	if (req.emr_out_length_used < MC_CMD_GET_RXDP_CONFIG_OUT_LEN) {
+		rc = EMSGSIZE;
+		goto fail2;
+	}
+
 	if (MCDI_OUT_DWORD_FIELD(req, GET_RXDP_CONFIG_OUT_DATA,
 				    GET_RXDP_CONFIG_OUT_PAD_HOST_DMA) == 0) {
 		/* RX DMA end padding is disabled */
@@ -514,7 +520,7 @@ efx_mcdi_get_rxdp_config(
 			break;
 		default:
 			rc = ENOTSUP;
-			goto fail2;
+			goto fail3;
 		}
 	}
 
@@ -522,6 +528,8 @@ efx_mcdi_get_rxdp_config(
 
 	return (0);
 
+fail3:
+	EFSYS_PROBE(fail3);
 fail2:
 	EFSYS_PROBE(fail2);
 fail1:
diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index 56b9fadf86..4bed2d4ab7 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -110,17 +110,22 @@ efx_mae_get_outer_rule_caps(
 		goto fail2;
 	}
 
+	if (req.emr_out_length_used < MC_CMD_MAE_GET_OR_CAPS_OUT_LENMIN) {
+		rc = EMSGSIZE;
+		goto fail3;
+	}
+
 	mcdi_field_ncaps = MCDI_OUT_DWORD(req, MAE_GET_OR_CAPS_OUT_COUNT);
 
 	if (req.emr_out_length_used <
 	    MC_CMD_MAE_GET_OR_CAPS_OUT_LEN(mcdi_field_ncaps)) {
 		rc = EMSGSIZE;
-		goto fail3;
+		goto fail4;
 	}
 
 	if (mcdi_field_ncaps > field_ncaps) {
 		rc = EMSGSIZE;
-		goto fail4;
+		goto fail5;
 	}
 
 	for (i = 0; i < mcdi_field_ncaps; ++i) {
@@ -148,6 +153,8 @@ efx_mae_get_outer_rule_caps(
 
 	return (0);
 
+fail5:
+	EFSYS_PROBE(fail5);
 fail4:
 	EFSYS_PROBE(fail4);
 fail3:
@@ -192,17 +199,22 @@ efx_mae_get_action_rule_caps(
 		goto fail2;
 	}
 
-	mcdi_field_ncaps = MCDI_OUT_DWORD(req, MAE_GET_OR_CAPS_OUT_COUNT);
+	if (req.emr_out_length_used < MC_CMD_MAE_GET_AR_CAPS_OUT_LENMIN) {
+		rc = EMSGSIZE;
+		goto fail3;
+	}
+
+	mcdi_field_ncaps = MCDI_OUT_DWORD(req, MAE_GET_AR_CAPS_OUT_COUNT);
 
 	if (req.emr_out_length_used <
 	    MC_CMD_MAE_GET_AR_CAPS_OUT_LEN(mcdi_field_ncaps)) {
 		rc = EMSGSIZE;
-		goto fail3;
+		goto fail4;
 	}
 
 	if (mcdi_field_ncaps > field_ncaps) {
 		rc = EMSGSIZE;
-		goto fail4;
+		goto fail5;
 	}
 
 	for (i = 0; i < mcdi_field_ncaps; ++i) {
@@ -230,6 +242,8 @@ efx_mae_get_action_rule_caps(
 
 	return (0);
 
+fail5:
+	EFSYS_PROBE(fail5);
 fail4:
 	EFSYS_PROBE(fail4);
 fail3:
@@ -1650,15 +1664,22 @@ efx_mae_outer_rule_remove(
 		goto fail2;
 	}
 
+	if (req.emr_out_length_used < MC_CMD_MAE_OUTER_RULE_REMOVE_OUT_LENMIN) {
+		rc = EMSGSIZE;
+		goto fail3;
+	}
+
 	if (MCDI_OUT_DWORD(req, MAE_OUTER_RULE_REMOVE_OUT_REMOVED_OR_ID) !=
 	    or_idp->id) {
 		/* Firmware failed to remove the outer rule. */
 		rc = EAGAIN;
-		goto fail3;
+		goto fail4;
 	}
 
 	return (0);
 
+fail4:
+	EFSYS_PROBE(fail4);
 fail3:
 	EFSYS_PROBE(fail3);
 fail2:
@@ -1854,15 +1875,22 @@ efx_mae_action_set_free(
 		goto fail2;
 	}
 
+	if (req.emr_out_length_used < MC_CMD_MAE_ACTION_SET_FREE_OUT_LENMIN) {
+		rc = EMSGSIZE;
+		goto fail3;
+	}
+
 	if (MCDI_OUT_DWORD(req, MAE_ACTION_SET_FREE_OUT_FREED_AS_ID) !=
 	    aset_idp->id) {
 		/* Firmware failed to free the action set. */
 		rc = EAGAIN;
-		goto fail3;
+		goto fail4;
 	}
 
 	return (0);
 
+fail4:
+	EFSYS_PROBE(fail4);
 fail3:
 	EFSYS_PROBE(fail3);
 fail2:
@@ -2004,15 +2032,23 @@ efx_mae_action_rule_remove(
 		goto fail2;
 	}
 
+	if (req.emr_out_length_used <
+	    MC_CMD_MAE_ACTION_RULE_DELETE_OUT_LENMIN) {
+		rc = EMSGSIZE;
+		goto fail3;
+	}
+
 	if (MCDI_OUT_DWORD(req, MAE_ACTION_RULE_DELETE_OUT_DELETED_AR_ID) !=
 	    ar_idp->id) {
 		/* Firmware failed to delete the action rule. */
 		rc = EAGAIN;
-		goto fail3;
+		goto fail4;
 	}
 
 	return (0);
 
+fail4:
+	EFSYS_PROBE(fail4);
 fail3:
 	EFSYS_PROBE(fail3);
 fail2:
diff --git a/drivers/common/sfc_efx/base/efx_mcdi.c b/drivers/common/sfc_efx/base/efx_mcdi.c
index 584f86e13a..59e884dcc6 100644
--- a/drivers/common/sfc_efx/base/efx_mcdi.c
+++ b/drivers/common/sfc_efx/base/efx_mcdi.c
@@ -2294,6 +2294,11 @@ efx_mcdi_get_workarounds(
 		goto fail1;
 	}
 
+	if (req.emr_out_length_used < MC_CMD_GET_WORKAROUNDS_OUT_LEN) {
+		rc = EMSGSIZE;
+		goto fail2;
+	}
+
 	if (implementedp != NULL) {
 		*implementedp =
 		    MCDI_OUT_DWORD(req, GET_WORKAROUNDS_OUT_IMPLEMENTED);
@@ -2305,6 +2310,8 @@ efx_mcdi_get_workarounds(
 
 	return (0);
 
+fail2:
+	EFSYS_PROBE(fail2);
 fail1:
 	EFSYS_PROBE1(fail1, efx_rc_t, rc);
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.968325100 +0800
+++ 0175-common-sfc_efx-base-add-missing-MCDI-response-length.patch	2021-06-12 06:53:56.700000000 +0800
@@ -1 +1 @@
-From e27950a02b035a6d366ed362c6719b6c892dda6b Mon Sep 17 00:00:00 2001
+From b1ec8ac5ec339de563244d06d6b119cb2dabb367 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit e27950a02b035a6d366ed362c6719b6c892dda6b ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -27 +29 @@
-index 0c99d4b74b..ac6006c9b4 100644
+index 0e5f04fe3b..5158e07cc9 100644
@@ -68 +70 @@
-index 531365e420..eda0ad3068 100644
+index 9dccde9576..ccce7b7437 100644
@@ -108 +110 @@
-index 80fe155d0d..c1784211e7 100644
+index 56b9fadf86..4bed2d4ab7 100644
@@ -111 +113 @@
-@@ -109,17 +109,22 @@ efx_mae_get_outer_rule_caps(
+@@ -110,17 +110,22 @@ efx_mae_get_outer_rule_caps(
@@ -136 +138 @@
-@@ -147,6 +152,8 @@ efx_mae_get_outer_rule_caps(
+@@ -148,6 +153,8 @@ efx_mae_get_outer_rule_caps(
@@ -145 +147 @@
-@@ -191,17 +198,22 @@ efx_mae_get_action_rule_caps(
+@@ -192,17 +199,22 @@ efx_mae_get_action_rule_caps(
@@ -171 +173 @@
-@@ -229,6 +241,8 @@ efx_mae_get_action_rule_caps(
+@@ -230,6 +242,8 @@ efx_mae_get_action_rule_caps(
@@ -180 +182 @@
-@@ -1773,15 +1787,22 @@ efx_mae_outer_rule_remove(
+@@ -1650,15 +1664,22 @@ efx_mae_outer_rule_remove(
@@ -204 +206 @@
-@@ -2176,15 +2197,22 @@ efx_mae_action_set_free(
+@@ -1854,15 +1875,22 @@ efx_mae_action_set_free(
@@ -228 +230 @@
-@@ -2326,15 +2354,23 @@ efx_mae_action_rule_remove(
+@@ -2004,15 +2032,23 @@ efx_mae_action_rule_remove(
@@ -254 +256 @@
-index f4e1384d09..f226ffd923 100644
+index 584f86e13a..59e884dcc6 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'net/memif: fix Tx bps statistics for zero-copy' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (173 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'common/sfc_efx/base: add missing MCDI response length checks' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'test: fix build with GCC 11' " Xueming Li
                       ` (2 subsequent siblings)
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Tianyu Li; +Cc: Luca Boccassi, Jakub Grajciar, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/0b1753ac72607b09d13e0ccba704d3db12ecc01e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 0b1753ac72607b09d13e0ccba704d3db12ecc01e Mon Sep 17 00:00:00 2001
From: Tianyu Li <tianyu.li@arm.com>
Date: Mon, 12 Apr 2021 16:22:31 +0800
Subject: [PATCH] net/memif: fix Tx bps statistics for zero-copy
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 78dafb4bb544a4288be174345c321b48e4c676fb ]

Fix the missing Tx-bps counter for memif zero-copy mode
Before
  Rx-pps:      6891450          Rx-bps:   3528438928
  Tx-pps:      6891482          Tx-bps:            0
After
  Throughput (since last show)
  Rx-pps:     11157056          Rx-bps:   5712413016
  Tx-pps:     11157056          Tx-bps:   5712413016

Fixes: 43b815d88188 ("net/memif: support zero-copy slave")

Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Reviewed-by: Jakub Grajciar <jgrajcia@cisco.com>
---
 drivers/net/memif/rte_eth_memif.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c
index 8ed9aebab7..15284b3d2c 100644
--- a/drivers/net/memif/rte_eth_memif.c
+++ b/drivers/net/memif/rte_eth_memif.c
@@ -706,6 +706,7 @@ next_in_chain:
 	/* populate descriptor */
 	d0 = &ring->desc[slot & mask];
 	d0->length = rte_pktmbuf_data_len(mbuf);
+	mq->n_bytes += rte_pktmbuf_data_len(mbuf);
 	/* FIXME: get region index */
 	d0->region = 1;
 	d0->offset = rte_pktmbuf_mtod(mbuf, uint8_t *) -
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:00.998069200 +0800
+++ 0176-net-memif-fix-Tx-bps-statistics-for-zero-copy.patch	2021-06-12 06:53:56.700000000 +0800
@@ -1 +1 @@
-From 78dafb4bb544a4288be174345c321b48e4c676fb Mon Sep 17 00:00:00 2001
+From 0b1753ac72607b09d13e0ccba704d3db12ecc01e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 78dafb4bb544a4288be174345c321b48e4c676fb ]
@@ -16 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +27 @@
-index 37a49fa13d..da7195783f 100644
+index 8ed9aebab7..15284b3d2c 100644

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'test: fix build with GCC 11' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (174 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'net/memif: fix Tx bps statistics for zero-copy' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'event/dlb2: remove references to deferred scheduling' " Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'doc: fix runtime options in DLB2 guide' " Xueming Li
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Luca Boccassi, Ali Alnubani, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/4d182a84d5ab473560d1e1a2b1eb410b0a7cb97d

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 4d182a84d5ab473560d1e1a2b1eb410b0a7cb97d Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Thu, 20 May 2021 12:06:12 +0100
Subject: [PATCH] test: fix build with GCC 11
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 50eea2bfa79cc6bfef9014c2e0cb89d5a458969f ]

GCC 11 complains that 'a' is uninitialized.

../dpdk/app/test/test_prefetch.c: In function 'test_prefetch':
../dpdk/app/test/test_prefetch.c:25:9:
error: 'a' may be used uninitialized [-Werror=maybe-uninitialized]
   25 |         rte_prefetch0(&a);
      |         ^~~~~~~~~~~~~~~~~

Fix by initializing 'a'.

Bugzilla ID: 714
Fixes: af75078fece3 ("first public release")

Reported-by: Ali Alnubani <alialnu@nvidia.com>
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Tested-by: Ali Alnubani <alialnu@nvidia.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_prefetch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_prefetch.c b/app/test/test_prefetch.c
index 5489885b51..7b4a8e4144 100644
--- a/app/test/test_prefetch.c
+++ b/app/test/test_prefetch.c
@@ -20,7 +20,7 @@
 static int
 test_prefetch(void)
 {
-	int a;
+	int a = 0;
 
 	rte_prefetch0(&a);
 	rte_prefetch1(&a);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:01.020158500 +0800
+++ 0177-test-fix-build-with-GCC-11.patch	2021-06-12 06:53:56.700000000 +0800
@@ -1 +1 @@
-From 50eea2bfa79cc6bfef9014c2e0cb89d5a458969f Mon Sep 17 00:00:00 2001
+From 4d182a84d5ab473560d1e1a2b1eb410b0a7cb97d Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 50eea2bfa79cc6bfef9014c2e0cb89d5a458969f ]
@@ -18 +20,0 @@
-Cc: stable@dpdk.org

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'event/dlb2: remove references to deferred scheduling' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (175 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'test: fix build with GCC 11' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  2021-06-11 23:04     ` [dpdk-stable] patch 'doc: fix runtime options in DLB2 guide' " Xueming Li
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Timothy McDaniel; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/8ba82ed84d54592b07a202ab5c945866b17cdc64

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From 8ba82ed84d54592b07a202ab5c945866b17cdc64 Mon Sep 17 00:00:00 2001
From: Timothy McDaniel <timothy.mcdaniel@intel.com>
Date: Fri, 21 May 2021 11:11:34 +0200
Subject: [PATCH] event/dlb2: remove references to deferred scheduling
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 0e94408f0028f888c638810973a7f2ddbfdbb795 ]

Deferred scheduling is a DLB v1.0 feature, and is not valid for
DLB v2.0 or v2.5.

Fixes: bc62748bd7d4 ("event/dlb2: add private data structures and constants")
Fixes: a2e4f1f5e79f ("event/dlb2: add dequeue and its burst variants")

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
---
 doc/guides/eventdevs/dlb2.rst  | 21 ---------------------
 drivers/event/dlb2/dlb2_priv.h |  3 ---
 2 files changed, 24 deletions(-)

diff --git a/doc/guides/eventdevs/dlb2.rst b/doc/guides/eventdevs/dlb2.rst
index 94d2c77ff4..6ba67f278c 100644
--- a/doc/guides/eventdevs/dlb2.rst
+++ b/doc/guides/eventdevs/dlb2.rst
@@ -314,27 +314,6 @@ The PMD does not support the following configuration sequences:
 This sequence is not supported because the event device must be reconfigured
 before its ports or queues can be.
 
-Deferred Scheduling
-~~~~~~~~~~~~~~~~~~~
-
-The DLB2 PMD's default behavior for managing a CQ is to "pop" the CQ once per
-dequeued event before returning from rte_event_dequeue_burst(). This frees the
-corresponding entries in the CQ, which enables the DLB2 to schedule more events
-to it.
-
-To support applications seeking finer-grained scheduling control -- for example
-deferring scheduling to get the best possible priority scheduling and
-load-balancing -- the PMD supports a deferred scheduling mode. In this mode,
-the CQ entry is not popped until the *subsequent* rte_event_dequeue_burst()
-call. This mode only applies to load-balanced event ports with dequeue depth of
-1.
-
-To enable deferred scheduling, use the defer_sched vdev argument like so:
-
-    .. code-block:: console
-
-       --vdev=dlb1_event,defer_sched=on
-
 Atomic Inflights Allocation
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
diff --git a/drivers/event/dlb2/dlb2_priv.h b/drivers/event/dlb2/dlb2_priv.h
index b73cf3ff14..8a01938785 100644
--- a/drivers/event/dlb2/dlb2_priv.h
+++ b/drivers/event/dlb2/dlb2_priv.h
@@ -27,7 +27,6 @@
 #define DLB2_MAX_NUM_EVENTS "max_num_events"
 #define DLB2_NUM_DIR_CREDITS "num_dir_credits"
 #define DEV_ID_ARG "dev_id"
-#define DLB2_DEFER_SCHED_ARG "defer_sched"
 #define DLB2_QID_DEPTH_THRESH_ARG "qid_depth_thresh"
 #define DLB2_COS_ARG "cos"
 
@@ -498,7 +497,6 @@ struct dlb2_eventdev {
 	uint16_t num_dir_ports; /* total num of dir ports requested */
 	bool umwait_allowed;
 	bool global_dequeue_wait; /* Not using per dequeue wait if true */
-	bool defer_sched;
 	enum dlb2_cq_poll_modes poll_mode;
 	uint8_t revision;
 	bool configured;
@@ -523,7 +521,6 @@ struct dlb2_devargs {
 	int max_num_events;
 	int num_dir_credits_override;
 	int dev_id;
-	int defer_sched;
 	struct dlb2_qid_depth_thresholds qid_depth_thresholds;
 	enum dlb2_cos cos_id;
 };
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:01.041480000 +0800
+++ 0178-event-dlb2-remove-references-to-deferred-scheduling.patch	2021-06-12 06:53:56.710000000 +0800
@@ -1 +1 @@
-From 0e94408f0028f888c638810973a7f2ddbfdbb795 Mon Sep 17 00:00:00 2001
+From 8ba82ed84d54592b07a202ab5c945866b17cdc64 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 0e94408f0028f888c638810973a7f2ddbfdbb795 ]
@@ -11 +13,0 @@
-Cc: stable@dpdk.org
@@ -20 +22 @@
-index 31de6bc470..c60c454d6b 100644
+index 94d2c77ff4..6ba67f278c 100644
@@ -23 +25 @@
-@@ -293,27 +293,6 @@ The PMD does not support the following configuration sequences:
+@@ -314,27 +314,6 @@ The PMD does not support the following configuration sequences:
@@ -30 +32 @@
--The DLB PMD's default behavior for managing a CQ is to "pop" the CQ once per
+-The DLB2 PMD's default behavior for managing a CQ is to "pop" the CQ once per
@@ -32 +34 @@
--corresponding entries in the CQ, which enables the DLB to schedule more events
+-corresponding entries in the CQ, which enables the DLB2 to schedule more events
@@ -46 +48 @@
--       --vdev=dlb2_event,defer_sched=on
+-       --vdev=dlb1_event,defer_sched=on
@@ -52 +54 @@
-index 3140764a59..b1225af37e 100644
+index b73cf3ff14..8a01938785 100644
@@ -55 +57 @@
-@@ -32,7 +32,6 @@
+@@ -27,7 +27,6 @@
@@ -62,2 +64,2 @@
- #define DLB2_POLL_INTERVAL_ARG "poll_interval"
-@@ -585,7 +584,6 @@ struct dlb2_eventdev {
+ 
+@@ -498,7 +497,6 @@ struct dlb2_eventdev {
@@ -69,3 +71,3 @@
- 	int poll_interval;
- 	int sw_credit_quanta;
-@@ -620,7 +618,6 @@ struct dlb2_devargs {
+ 	uint8_t revision;
+ 	bool configured;
+@@ -523,7 +521,6 @@ struct dlb2_devargs {
@@ -78 +80 @@
- 	int poll_interval;
+ };

^ permalink raw reply	[flat|nested] 410+ messages in thread

* [dpdk-stable] patch 'doc: fix runtime options in DLB2 guide' has been queued to stable release 20.11.2
  2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
                       ` (176 preceding siblings ...)
  2021-06-11 23:04     ` [dpdk-stable] patch 'event/dlb2: remove references to deferred scheduling' " Xueming Li
@ 2021-06-11 23:04     ` Xueming Li
  177 siblings, 0 replies; 410+ messages in thread
From: Xueming Li @ 2021-06-11 23:04 UTC (permalink / raw)
  To: Timothy McDaniel; +Cc: Luca Boccassi, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/14/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/bd41e2bc99d68b7f5eb777d9a33d90c74ff50c9e

Thanks.

Xueming Li <xuemingl@nvidia.com>

---
From bd41e2bc99d68b7f5eb777d9a33d90c74ff50c9e Mon Sep 17 00:00:00 2001
From: Timothy McDaniel <timothy.mcdaniel@intel.com>
Date: Fri, 21 May 2021 11:11:35 +0200
Subject: [PATCH] doc: fix runtime options in DLB2 guide
Cc: Luca Boccassi <bluca@debian.org>

[ upstream commit 9e35ae0700d5a16fa949fe64c6853043a76a675e ]

Convert to PCI "--allow" devarg format.
The documentation was previously using the "--vdev" form, which cannot
be used with the DLB2 PF PMD.

Fixes: f3cad285bb88 ("event/dlb2: add infos get and configure")
Fixes: f7cc194b0f7e ("event/dlb2: add enqueue and its burst variants")
Fixes: a2e4f1f5e79f ("event/dlb2: add dequeue and its burst variants")
Fixes: 95aa7101cd3c ("doc: add some features to DLB2 guide")

Signed-off-by: Timothy McDaniel <timothy.mcdaniel@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 doc/guides/eventdevs/dlb2.rst | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/doc/guides/eventdevs/dlb2.rst b/doc/guides/eventdevs/dlb2.rst
index 6ba67f278c..1223219cf7 100644
--- a/doc/guides/eventdevs/dlb2.rst
+++ b/doc/guides/eventdevs/dlb2.rst
@@ -179,19 +179,19 @@ pools' sizes are controlled by the nb_events_limit field in struct
 rte_event_dev_config. The load-balanced pool is sized to contain
 nb_events_limit credits, and the directed pool is sized to contain
 nb_events_limit/4 credits. The directed pool size can be overridden with the
-num_dir_credits vdev argument, like so:
+num_dir_credits devargs argument, like so:
 
     .. code-block:: console
 
-       --vdev=dlb1_event,num_dir_credits=<value>
+       --allow ea:00.0,num_dir_credits=<value>
 
 This can be used if the default allocation is too low or too high for the
-specific application needs. The PMD also supports a vdev arg that limits the
+specific application needs. The PMD also supports a devarg that limits the
 max_num_events reported by rte_event_dev_info_get():
 
     .. code-block:: console
 
-       --vdev=dlb1_event,max_num_events=<value>
+       --allow ea:00.0,max_num_events=<value>
 
 By default, max_num_events is reported as the total available load-balanced
 credits. If multiple DLB2-based applications are being used, it may be desirable
@@ -336,11 +336,11 @@ buffer space (e.g. if not all queues are used, or aren't used for atomic
 scheduling).
 
 The PMD provides a dev arg to override the default per-queue allocation. To
-increase a vdev's per-queue atomic-inflight allocation to (for example) 64:
+increase per-queue atomic-inflight allocation to (for example) 64:
 
     .. code-block:: console
 
-       --vdev=dlb1_event,atm_inflights=64
+       --allow ea:00.0,atm_inflights=64
 
 QID Depth Threshold
 ~~~~~~~~~~~~~~~~~~~
@@ -363,9 +363,9 @@ shown below.
 
     .. code-block:: console
 
-       --vdev=dlb2_event,qid_depth_thresh=all:<threshold_value>
-       --vdev=dlb2_event,qid_depth_thresh=qidA-qidB:<threshold_value>
-       --vdev=dlb2_event,qid_depth_thresh=qid:<threshold_value>
+       --allow ea:00.0,qid_depth_thresh=all:<threshold_value>
+       --allow ea:00.0,qid_depth_thresh=qidA-qidB:<threshold_value>
+       --allow ea:00.0,qid_depth_thresh=qid:<threshold_value>
 
 Class of service
 ~~~~~~~~~~~~~~~~
@@ -387,4 +387,4 @@ Class of service can be specified in the devargs, as follows
 
     .. code-block:: console
 
-       --vdev=dlb2_event,cos=<0..4>
+       --allow ea:00.0,cos=<0..4>
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-06-12 06:54:01.062347600 +0800
+++ 0179-doc-fix-runtime-options-in-DLB2-guide.patch	2021-06-12 06:53:56.710000000 +0800
@@ -1 +1 @@
-From 9e35ae0700d5a16fa949fe64c6853043a76a675e Mon Sep 17 00:00:00 2001
+From bd41e2bc99d68b7f5eb777d9a33d90c74ff50c9e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca@debian.org>
+
+[ upstream commit 9e35ae0700d5a16fa949fe64c6853043a76a675e ]
@@ -14 +16,0 @@
-Cc: stable@dpdk.org
@@ -23 +25 @@
-index c60c454d6b..99ea8418a5 100644
+index 6ba67f278c..1223219cf7 100644
@@ -26 +28 @@
-@@ -152,19 +152,19 @@ These pools' sizes are controlled by the nb_events_limit field in struct
+@@ -179,19 +179,19 @@ pools' sizes are controlled by the nb_events_limit field in struct
@@ -35 +37 @@
--       --vdev=dlb2_event,num_dir_credits=<value>
+-       --vdev=dlb1_event,num_dir_credits=<value>
@@ -45 +47 @@
--       --vdev=dlb2_event,max_num_events=<value>
+-       --vdev=dlb1_event,max_num_events=<value>
@@ -49,2 +51,2 @@
- credits. If multiple DLB-based applications are being used, it may be desirable
-@@ -315,11 +315,11 @@ buffer space (e.g. if not all queues are used, or aren't used for atomic
+ credits. If multiple DLB2-based applications are being used, it may be desirable
+@@ -336,11 +336,11 @@ buffer space (e.g. if not all queues are used, or aren't used for atomic
@@ -59 +61 @@
--       --vdev=dlb2_event,atm_inflights=64
+-       --vdev=dlb1_event,atm_inflights=64
@@ -64 +66 @@
-@@ -342,9 +342,9 @@ shown below.
+@@ -363,9 +363,9 @@ shown below.
@@ -77 +79 @@
-@@ -366,4 +366,4 @@ Class of service can be specified in the devargs, as follows
+@@ -387,4 +387,4 @@ Class of service can be specified in the devargs, as follows

^ permalink raw reply	[flat|nested] 410+ messages in thread

* Re: [dpdk-stable] patch 'net/mlx5: fix flow age event triggering' has been queued to stable release 20.11.2
  2021-06-11 23:02     ` [dpdk-stable] patch 'net/mlx5: fix flow age event triggering' " Xueming Li
@ 2021-06-15  8:51       ` David Bouyeure
  0 siblings, 0 replies; 410+ messages in thread
From: David Bouyeure @ 2021-06-15  8:51 UTC (permalink / raw)
  To: Xueming Li, Michael Baum; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,


thanks a lot for the information.


Regards.

On 6/12/21 1:02 AM, Xueming Li wrote:
> Hi,
>
> FYI, your patch has been queued to stable release 20.11.2
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 06/14/21. So please
> shout if anyone has objections.
>
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
>
> Queued patches are on a temporary branch at:
> https://github.com/steevenlee/dpdk
>
> This queued commit can be viewed at:
> https://github.com/steevenlee/dpdk/commit/cb6f74724dc2f6539709210fd1dc1725d8712718
>
> Thanks.
>
> Xueming Li <xuemingl@nvidia.com>
>
> ---
>  From cb6f74724dc2f6539709210fd1dc1725d8712718 Mon Sep 17 00:00:00 2001
> From: Michael Baum <michaelba@nvidia.com>
> Date: Thu, 29 Apr 2021 12:55:41 +0300
> Subject: [PATCH] net/mlx5: fix flow age event triggering
> Cc: Luca Boccassi <bluca@debian.org>
>
> [ upstream commit 447d4d797d21b35185d511b7c280d7fe171b29bd ]
>
> A FLOW_AGE event should be invoked when a new aged-out flow is detected
> by the PMD after the last user get-aged query calling.
> The PMD manages 2 flags for this information and check them in order to
> decide if an event should be invoked:
> MLX5_AGE_EVENT_NEW - a new aged-out flow was detected. after the last
> check.
> MLX5_AGE_TRIGGER - get-aged query was called after the last aged-out
> flow.
> The 2 flags were unset after the event invoking.
>
> When the user calls get-aged query from the event callback, the TRIGGER
> flag was set inside the user callback and unset directly after the
> callback what may stop the event invoking forever.
>
> Unset the TRIGGER flag before the event invoking in order to allow set
> it by the user callback.
>
> Fixes: f935ed4b645a ("net/mlx5: support flow hit action for aging")
>
> Reported-by: David Bouyeure <david.bouyeure@fraudbuster.mobi>
> Signed-off-by: Michael Baum <michaelba@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>
> ---
>   drivers/net/mlx5/mlx5.c | 8 +++++---
>   drivers/net/mlx5/mlx5.h | 2 ++
>   2 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
> index b8f31497b2..f5c1c800fc 100644
> --- a/drivers/net/mlx5/mlx5.c
> +++ b/drivers/net/mlx5/mlx5.c
> @@ -549,11 +549,13 @@ mlx5_age_event_prepare(struct mlx5_dev_ctx_shared *sh)
>   		age_info = &sh->port[i].age_info;
>   		if (!MLX5_AGE_GET(age_info, MLX5_AGE_EVENT_NEW))
>   			continue;
> -		if (MLX5_AGE_GET(age_info, MLX5_AGE_TRIGGER))
> +		MLX5_AGE_UNSET(age_info, MLX5_AGE_EVENT_NEW);
> +		if (MLX5_AGE_GET(age_info, MLX5_AGE_TRIGGER)) {
> +			MLX5_AGE_UNSET(age_info, MLX5_AGE_TRIGGER);
>   			rte_eth_dev_callback_process
>   				(&rte_eth_devices[sh->port[i].devx_ih_port_id],
>   				RTE_ETH_EVENT_FLOW_AGED, NULL);
> -		age_info->flags = 0;
> +		}
>   	}
>   }
>   
> @@ -562,7 +564,7 @@ mlx5_age_event_prepare(struct mlx5_dev_ctx_shared *sh)
>    *
>    * @param[in] sh
>    *   Pointer to mlx5_dev_ctx_shared object.
> - * @param[in] sh
> + * @param[in] config
>    *   Pointer to user dev config.
>    */
>   static void
> diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
> index 35f9bece05..9437f45480 100644
> --- a/drivers/net/mlx5/mlx5.h
> +++ b/drivers/net/mlx5/mlx5.h
> @@ -538,6 +538,8 @@ struct mlx5_aso_age_mng {
>   #define MLX5_AGE_TRIGGER		2
>   #define MLX5_AGE_SET(age_info, BIT) \
>   	((age_info)->flags |= (1 << (BIT)))
> +#define MLX5_AGE_UNSET(age_info, BIT) \
> +	((age_info)->flags &= ~(1 << (BIT)))
>   #define MLX5_AGE_GET(age_info, BIT) \
>   	((age_info)->flags & (1 << (BIT)))
>   #define GET_PORT_AGE_INFO(priv) \

^ permalink raw reply	[flat|nested] 410+ messages in thread

end of thread, other threads:[~2021-06-15  8:51 UTC | newest]

Thread overview: 410+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-10 15:59 [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 20.11.2 Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'test/mem: fix page size for external memory' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'power: remove duplicated symbols from map file' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'vfio: fix API description' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'fbarray: fix log message on truncation error' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/failsafe: fix RSS hash offload reporting' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/failsafe: report minimum and maximum MTU' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/mlx5: fix external buffer pool registration for Rx queue' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'common/mlx5: fix DevX read output buffer size' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/mlx5: fix metadata item validation for ingress flows' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'bus/fslmc: fix random portal hangs with qbman 5.0' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'bus/dpaa: fix statistics reading' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/dpaa2: fix getting link status' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/dpaa: " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/ionic: fix completion type in lif init' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'app/testpmd: remove unnecessary UDP tunnel check' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/sfc: fix buffer size for flow parse' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/af_xdp: fix error handling during Rx queue setup' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/pcap: fix format string' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/mlx5: fix hashed list size for tunnel flow groups' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/mlx5: fix UAR allocation diagnostics messages' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/pcap: fix file descriptor leak on close' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'common/mlx5/linux: add glue function to query WQ' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'common/mlx5: add DevX command " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'common/mlx5: add DevX commands for queue counters' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/hns3: fix device capabilities for copper media type' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/hns3: fix HW buffer size on MTU update' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/hns3: remove unused parameter markers' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/bonding: fix LACP system address check' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/txgbe: remove unused functions' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/txgbe: fix Rx missed packet counter' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/txgbe: update packet type' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/ice: fix VLAN filter with PF' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/igc: remove MTU setting limitation' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/e1000: " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/ice/base: fix payload indicator on ptype' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/ice/base: fix uninitialized struct' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/ice/base: cleanup filter list on error' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/i40evf: fix packet loss for X722' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/i40e: fix IPv4 fragment offload' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/mlx5: fix Rx segmented packets on mbuf starvation' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/octeontx2: fix VLAN filter' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'build: exclude meson files from examples installation' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'log/linux: make default output stderr' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'eal/windows: add missing SPDX license tag' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'eal/windows: fix default thread priority' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'bus/pci: skip probing some Windows NDIS devices' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'bus/pci: fix Windows kernel driver categories' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net: fix comment in IPv6 header' " Xueming Li
2021-05-10 15:59 ` [dpdk-stable] patch 'net/bnxt: remove unused macro' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix VNIC configuration' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix queues per VNIC' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix firmware fatal error handling' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix FW readiness check during recovery' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix device readiness check' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix VF info allocation' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix HWRM and FW incompatibility handling' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: mute some failure logs' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix xstats get' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix Rx and Tx timestamps' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'app/testpmd: check MAC address query' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/ice: check some functions return' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'common/mlx5: add timestamp format support to DevX' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'vdpa/mlx5: support timestamp format' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/mlx5: fix Rx metadata leftovers' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'eal: fix comment of OS-specific header files' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'buildtools: fix build with busybox' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'build: detect execinfo library on Linux' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'build: remove redundant _GNU_SOURCE definitions' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'eal: fix build with musl' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'common/dpaax/caamflib: " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'bus/dpaa: fix 64-bit arch detection' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'bus/dpaa: fix build with musl' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/cxgbe: remove use of uint type' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/igc: " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'event/dlb: fix header includes for musl' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'app/testpmd: fix build with " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'examples/bbdev: fix header include for " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'table: fix actions with different data size' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'examples/packet_ordering: fix port configuration' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'pipeline: fix instruction translation' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'test: fix autotest handling of skipped tests' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/ark: update packet director initial state' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/ark: refactor Rx buffer recovery' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'common/sfc_efx: remove GENEVE from supported tunnels' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'app/testpmd: fix NVGRE encap configuration' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix Tx timestamp init' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix PCI write check' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix RSS context cleanup' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix link state operations' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix timesync when PTP is not supported' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix Rx buffer posting' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix Tx length hint threshold' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix handling of null flow mask' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: check kvargs parsing' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/bnxt: fix memory allocation for command response' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/qede: reduce log verbosity' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/qede: accept bigger RSS table' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/i40e: fix input set field mask' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/ice: fix RSS hash update' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/ice/base: fix memory allocation for MAC addresses' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/mlx5: fix flow actions index in cache' " Xueming Li
2021-05-12  1:54   ` Li Zhang
2021-05-10 16:00 ` [dpdk-stable] patch 'net/mlx5: support RSS expansion for IPv6 GRE' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/hns3: fix reporting undefined speed' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/hns3: fix processing Tx offload flags' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/hns3: fix Tx checksum for UDP packets with special port' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/hns3: fix link update when failed to get link info' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/hns3: fix long task queue pairs reset time' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/hinic: fix crash in secondary process' " Xueming Li
2021-05-10 16:00 ` [dpdk-stable] patch 'net/sfc: fix error path inconsistency' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'app/testpmd: fix Tx/Rx descriptor query error log' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/i40e: fix parsing packet type for NEON' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/iavf: fix packet length parsing in AVX512' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/i40e: announce request queue capability in PF' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/igc: fix Rx RSS hash offload capability' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/iavf: fix TSO max segment size' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/ixgbe: fix RSS RETA being reset after port start' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/mlx5: fix using flow tunnel before null check' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'vdpa/ifc: check PCI config read' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'examples/vhost: check memory table query' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'vhost: fix split ring potential buffer overflow' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'vhost: fix packed " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'vhost: fix batch dequeue " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'examples/vhost_crypto: remove unused short option' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'vdpa/mlx5: fix virtq cleaning' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'doc: fix sphinx rtd theme import in GHA' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'power: do not skip saving original P-state governor' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'mem: fix freeing segments in --huge-unlink mode' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'service: clean references to removed symbol' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'drivers: fix log level after loading' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'test: proceed if timer subsystem already initialized' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'eal: fix evaluation of log level option' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'app/regex: fix usage text' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'app/testpmd: " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'eal: fix race in control thread creation' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'eal: fix hang " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: fix MTU config complexity' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: update HiSilicon copyright syntax' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/ena: fix releasing Tx ring mbufs' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/igc: fix Rx error counter for bad length' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/e1000: " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'doc: update recommended versions for i40e' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/i40e: fix flow director config after flow validate' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/mlx5: fix shared inner RSS' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/mlx5: fix missing shared RSS hash types' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/mlx5: fix drop action for Direct Rules/Verbs' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/bnxt: fix double free in port start failure' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/bnxt: fix configuring LRO' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'vhost: fix initialization of temporary header' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'vhost: fix initialization of async " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'ethdev: validate input in module EEPROM dump' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'ethdev: validate input in register info' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'ethdev: validate input in EEPROM " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: fix copyright date' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: fix FLR miss detection' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: fix rollback after setting PVID failure' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: fix flow control exception' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: fix flow counter value' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: fix VF mailbox head field' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: support get device version when dump register' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/hns3: delete redundant blank line' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'net/enic: fix flow initialization error handling' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'app/flow-perf: fix encap/decap actions' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'eal/windows: fix return codes of pthread shim layer' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'test/event: fix timeout accuracy' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'app/eventdev: " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'event/octeontx2: fix device reconfigure for single slot' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'license: fix typos' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'test/trace: fix race on collected perf data' " Xueming Li
2021-05-10 16:01 ` [dpdk-stable] patch 'raw/octeontx2_dma: assign PCI device in DPI VF' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'eal: add C++ include guard for reciprocal header' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'crypto/octeontx: fix session-less mode' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'examples/l2fwd-crypto: skip masked devices' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix packet length while decryption' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'crypto/qat: fix offset for out-of-place scatter-gather' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'buildtools: fix all drivers disabled on Windows' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'test: fix TCP header initialization' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix some packet types' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix timing in resetting queues' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix queue state when concurrent with reset' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix configure FEC " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'common/sfc_efx/base: fix indication of MAE encap support' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/e1000: fix max Rx packet size' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/ice: fix illegal access when removing MAC filter' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/mlx5: fix redundant flow after RSS expansion' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/mlx4: fix RSS action with null hash key' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/mlx5: fix resource release for mirror flow' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/ixgbe: fix Rx errors statistics for UDP checksum' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'app/testpmd: fix bitmap of link speeds when force speed' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'ethdev: update flow item GTP QFI definition' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/iavf: fix crash in AVX512' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/ice: " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix use of command status enumeration' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix missing outer L4 UDP flag for VXLAN' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: remove VLAN/QinQ ptypes from support list' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix flow control mode' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/i40e: fix lack of MAC type when set MAC address' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/iavf: " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'eventdev: fix case to initiate crypto adapter service' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'vfio: fix duplicated user mem map' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'pipeline: fix endianness conversions' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'examples/ptpclient: remove wrong comment' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'examples/l3fwd: fix LPM IPv6 subnets' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'test/cmdline: fix inputs array' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'test: check thread creation' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'ip_frag: fix fragmenting IPv4 packet with header option' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'sched: fix traffic class oversubscription parameter' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'common/dpaax: fix possible null pointer access' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'test/bpf: fix error message' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'test/power: add delay before checking CPU frequency' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'test/power: round CPU frequency to check' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'examples: add eal cleanup to examples' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'examples/ethtool: remove unused parsing' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'doc: fix HiSilicon copyright syntax' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: remove unused macros' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'doc: fix matching versions in ice guide' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: remove redundant mailbox response' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix DCB mode check' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix VMDq " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: fix flow director lock' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/bonding: fix adding itself as its slave' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/bnxt: fix resource cleanup' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/bnxt: fix health check alarm cancellation' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/igc: fix Rx packet size' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/hns3: remove unused macro' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/ice: fix disabling promiscuous mode' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/i40e: fix flow director for common pctypes' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'net/e1000/base: fix timeout for shadow RAM write' " Xueming Li
2021-05-10 16:02 ` [dpdk-stable] patch 'doc: fix names of UIO drivers' " Xueming Li
2021-06-11 23:01   ` [dpdk-stable] patch 'stack: allow lock-free only on relevant architectures' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'config/ppc: reduce number of cores and NUMA nodes' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'raw/ioat: fix script for configuring small number of queues' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'eal/arm64: fix platform register bit' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'mbuf: check shared memory before dumping dynamic space' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'test/mempool: fix object initializer' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'app/eventdev: fix overflow in lcore list parsing' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'eventdev: remove redundant thread name setting' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'eventdev: fix memory leakage on thread creation failure' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'acl: fix build with GCC 11' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'bpf: fix JSLT validation' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'power: save original ACPI governor always' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'doc: fix multiport syntax in nfp guide' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'net/kni: check init result' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'drivers/net: fix FW version query' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'net/hns3: fix mailbox error message' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'net/hns3: fix processing link status message on PF' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'net/hns3: remove unused mailbox macro and struct' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'net/bonding: fix leak on remove' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'test/kni: fix a comment' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'test/kni: check init result' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'app/testpmd: fix max queue number for Tx offloads' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'net/tap: fix interrupt vector array size' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'net/hns3: fix typos on comments' " Xueming Li
2021-06-11 23:01     ` [dpdk-stable] patch 'app/testpmd: fix segment number check' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'doc: fix formatting in testpmd guide' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/bonding: fix socket ID check' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: fix handling link update' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'common/sfc_efx/base: fix dereferencing null pointer' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/i40e: fix negative VEB index' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/i40e: remove redundant VSI check in Tx queue setup' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/ice: fix fast mbuf freeing' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/iavf: fix VF to PF command failure handling' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'common/iavf: fix duplicated offload bit' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/e1000: fix flow error message object' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'vhost: fix queue initialization' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'vhost: fix redundant vring status change notification' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/virtio: fix getline memory leakage' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: remove unnecessary forward declarations' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: remove unused function parameters' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: use prefix on global function' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/mlx5: remove drop queue function prototypes' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/mlx4: fix buffer leakage on device close' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/mlx5: fix probing device in legacy bonding mode' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: fix link status when port is stopped' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: fix link speed when port is down' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'app/testpmd: fix division by zero on socket memory dump' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/tap: check ioctl on restore' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/kni: warn on stop failure' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'app/testpmd: fix forward lcores number for DCB' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'app/testpmd: fix DCB forwarding configuration' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'app/testpmd: fix DCB re-configuration' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'app/testpmd: verify DCB config during forward config' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: log time delta in decimal format' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: fix time delta calculation' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: remove unused macros' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/mlx5: fix flow age event triggering' " Xueming Li
2021-06-15  8:51       ` David Bouyeure
2021-06-11 23:02     ` [dpdk-stable] patch 'raw/ifpga: fix device name format' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/iavf: fix primary MAC type when starting port' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/i40e: " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/sfc: fix mark support in EF100 native Rx datapath' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: drop unused attribute' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: fix vector Rx burst limitation' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: remove read when enabling TM QCN error event' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: remove unused VMDq code' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/hns3: increase readability in logs' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'ethdev: add missing buses in device iterator' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'test/distributor: fix worker notification in burst mode' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'test/distributor: fix burst flush on worker quit' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'telemetry: fix race on callbacks list' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/virtio: fix vectorized Rx queue rearm' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'vhost: fix offload flags in Rx path' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: refactor multi-queue Rx configuration' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: fix Rx timestamp when FIFO pending bit is set' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: fix dynamic VNIC count' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: fix single PF per port check' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: fix mismatched type comparison in MAC restore' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: check PCI config read' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: fix mismatched type comparison in Rx' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'net/bnxt: prevent device access in error state' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'regex/octeontx2: remove unused include directory' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'examples: fix pkg-config override' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'raw/ntb: check SPAD user index' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'raw/ntb: check memory allocations' " Xueming Li
2021-06-11 23:02     ` [dpdk-stable] patch 'ipc: check malloc sync reply result' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'eal: fix service core list parsing' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'app/bbdev: check memory allocation' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'app/bbdev: fix HARQ error messages' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'common/qat: increase IM buffer size for GEN3' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'compress/qat: enable compression on " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'test/crypto: fix auth-cipher compare length in OOP' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'crypto/dpaa_sec: affine the thread portal affinity' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'crypto/dpaa2_sec: fix close and uninit functions' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'test/crypto: copy offset data to OOP destination buffer' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'bus/fslmc: remove unused debug macro' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'eal: fix leak in shared lib mode detection' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'eal: fix memory mapping on 32-bit target' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'raw/skeleton: add missing check after setting attribute' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'ipc: use monotonic clock' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'examples/timer: fix time interval' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'test/timer: check memzone allocation' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'doc: remove PDF requirements' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'power: fix sanity checks for guest channel read' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'event/dpaa2: remove unused macros' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'app/eventdev: fix lcore parsing skipping last core' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/ice/base: fix memory allocation wrapper' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/mlx5: fix RSS flow item expansion for GRE key' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/mlx5/linux: fix firmware version' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena: switch memcpy to optimized " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena/base: improve style and comments' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena/base: fix type conversions by explicit casting' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena/base: destroy multiple wait events' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena: fix parsing of large LLQ header device argument' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena: fix crash with unsupported " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena: remove endian swap functions' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena: report default ring size' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/nfp: fix reporting of RSS capabilities' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: return error on PCI config write failure' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fix log on flow director clear' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: clear hash map " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fix VF alive notification after config restore' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fix querying flow director counter for out param' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/txgbe: fix QinQ strip' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fix TM QCN error event report by MSI-X' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fix mailbox message ID in log' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fix secondary process request start/stop Rx/Tx' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fix ordering in secondary process initialization' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/hns3: fail setting FEC if one bit mode is not supported' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'app/testpmd: fix tunnel offload flows cleanup' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/ice: fix leak on thread termination' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/enic: enable GENEVE offload via VNIC configuration' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/mlx5: fix tunnel offload private items location' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/ena: indicate Rx RSS hash presence' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/ice: fix VSI array out of bounds access' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/i40e: fix VF RSS configuration' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/igc: fix speed " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/bnx2x: fix build with GCC 11' " Xueming Li
2021-06-11 23:03     ` Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/ice/base: " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/tap: " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/mlx4: fix secondary process initialization ordering' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/mlx5: " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'net/mlx5: fix RSS flow item expansion for NVGRE' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'test/crypto: fix return value of a skipped test' " Xueming Li
2021-06-11 23:03     ` [dpdk-stable] patch 'crypto/qat: fix null authentication request' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'app/crypto-perf: check memory allocation' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'examples/rxtx_callbacks: fix port ID format specifier' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'examples/flow_classify: fix NUMA check of port and core' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'examples/l2fwd-cat: " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'examples/skeleton: " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'test: check flow classifier creation' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'test/power: fix CPU frequency check' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'test/power: add turbo mode to " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'test/power: fix low frequency test when turbo enabled' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'test/power: fix turbo test' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'test/table: fix build with GCC 11' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'examples/l3fwd-power: fix empty poll thresholds' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'test: fix division by zero' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'devtools: fix orphan symbols check with busybox' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'test/crypto: fix build with GCC 11' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'crypto/zuc: " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'net/mlx4: fix leak when configured repeatedly' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'net/mlx5: " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'net/mlx5: fix counter offset detection' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'net/vhost: restore pseudo TSO support' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'vdpa/mlx5: fix device unplug' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'net/hns3: fix Rx/Tx queue numbers check' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'net/hns3: fix requested FC mode rollback' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'net/hns3: remove meaningless packet buffer " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'net/hns3: fix DCB configuration' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'net/hns3: fix DCB reconfiguration' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'net/hns3: fix link speed when VF device is down' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'net/mlx5: fix loopback for Direct Verbs queue' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'common/sfc_efx/base: limit reported MCDI response length' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'common/sfc_efx/base: add missing MCDI response length checks' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'net/memif: fix Tx bps statistics for zero-copy' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'test: fix build with GCC 11' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'event/dlb2: remove references to deferred scheduling' " Xueming Li
2021-06-11 23:04     ` [dpdk-stable] patch 'doc: fix runtime options in DLB2 guide' " Xueming Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).