patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9
@ 2021-05-17 16:07 Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' " Christian Ehrhardt
                   ` (188 more replies)
  0 siblings, 189 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: Anatoly Burakov, David Christensen, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From b92fd56073afacb5ba3a31c42a5526b96399ff74 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <ndabilpuram@marvell.com>
Date: Fri, 15 Jan 2021 13:02:41 +0530
Subject: [PATCH] vfio: do not merge contiguous areas

[ upstream commit 016763c219580292c8b05059c7452a7a11d0d19e ]

In order to save DMA entries limited by kernel both for external
memory and hugepage memory, an attempt was made to map physically
contiguous memory in one go. This cannot be done as VFIO IOMMU type1
does not support partially unmapping a previously mapped memory
region while Heap can request for multi page mapping and
partial unmapping.
Hence for going back to old method of mapping/unmapping at
memseg granularity, this commit reverts
commit d1c7c0cdf7ba ("vfio: map contiguous areas in one go")

Also add documentation on what module parameter needs to be used
to increase the per-container dma map limit for VFIO.

Fixes: d1c7c0cdf7ba ("vfio: map contiguous areas in one go")

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>
---
 doc/guides/linux_gsg/linux_drivers.rst | 10 +++++
 lib/librte_eal/linux/eal/eal_vfio.c    | 59 ++++----------------------
 2 files changed, 18 insertions(+), 51 deletions(-)

diff --git a/doc/guides/linux_gsg/linux_drivers.rst b/doc/guides/linux_gsg/linux_drivers.rst
index 96817e78cd..d8e5ad711a 100644
--- a/doc/guides/linux_gsg/linux_drivers.rst
+++ b/doc/guides/linux_gsg/linux_drivers.rst
@@ -72,6 +72,16 @@ Note that in order to use VFIO, your kernel must support it.
 VFIO kernel modules have been included in the Linux kernel since version 3.6.0 and are usually present by default,
 however please consult your distributions documentation to make sure that is the case.
 
+For DMA mapping of either external memory or hugepages, VFIO interface is used.
+VFIO does not support partial unmap of once mapped memory. Hence DPDK's memory is
+mapped in hugepage granularity or system page granularity. Number of DMA
+mappings is limited by kernel with user locked memory limit of a process (rlimit)
+for system/hugepage memory. Another per-container overall limit applicable both
+for external memory and system memory was added in kernel 5.1 defined by
+VFIO module parameter ``dma_entry_limit`` with a default value of 64K.
+When application is out of DMA entries, these limits need to be adjusted to
+increase the allowed limit.
+
 Also, to use VFIO, both kernel and BIOS must support and be configured to use IO virtualization (such as Intel® VT-d).
 
 .. note::
diff --git a/lib/librte_eal/linux/eal/eal_vfio.c b/lib/librte_eal/linux/eal/eal_vfio.c
index 1be02e7f13..5e6101d9a9 100644
--- a/lib/librte_eal/linux/eal/eal_vfio.c
+++ b/lib/librte_eal/linux/eal/eal_vfio.c
@@ -514,11 +514,9 @@ static void
 vfio_mem_event_callback(enum rte_mem_event type, const void *addr, size_t len,
 		void *arg __rte_unused)
 {
-	rte_iova_t iova_start, iova_expected;
 	struct rte_memseg_list *msl;
 	struct rte_memseg *ms;
 	size_t cur_len = 0;
-	uint64_t va_start;
 
 	msl = rte_mem_virt2memseg_list(addr);
 
@@ -547,63 +545,22 @@ vfio_mem_event_callback(enum rte_mem_event type, const void *addr, size_t len,
 #endif
 	/* memsegs are contiguous in memory */
 	ms = rte_mem_virt2memseg(addr, msl);
-
-	/*
-	 * This memory is not guaranteed to be contiguous, but it still could
-	 * be, or it could have some small contiguous chunks. Since the number
-	 * of VFIO mappings is limited, and VFIO appears to not concatenate
-	 * adjacent mappings, we have to do this ourselves.
-	 *
-	 * So, find contiguous chunks, then map them.
-	 */
-	va_start = ms->addr_64;
-	iova_start = iova_expected = ms->iova;
 	while (cur_len < len) {
-		bool new_contig_area = ms->iova != iova_expected;
-		bool last_seg = (len - cur_len) == ms->len;
-		bool skip_last = false;
-
-		/* only do mappings when current contiguous area ends */
-		if (new_contig_area) {
-			if (type == RTE_MEM_EVENT_ALLOC)
-				vfio_dma_mem_map(default_vfio_cfg, va_start,
-						iova_start,
-						iova_expected - iova_start, 1);
-			else
-				vfio_dma_mem_map(default_vfio_cfg, va_start,
-						iova_start,
-						iova_expected - iova_start, 0);
-			va_start = ms->addr_64;
-			iova_start = ms->iova;
-		}
 		/* some memory segments may have invalid IOVA */
 		if (ms->iova == RTE_BAD_IOVA) {
 			RTE_LOG(DEBUG, EAL, "Memory segment at %p has bad IOVA, skipping\n",
 					ms->addr);
-			skip_last = true;
+			goto next;
 		}
-		iova_expected = ms->iova + ms->len;
+		if (type == RTE_MEM_EVENT_ALLOC)
+			vfio_dma_mem_map(default_vfio_cfg, ms->addr_64,
+					ms->iova, ms->len, 1);
+		else
+			vfio_dma_mem_map(default_vfio_cfg, ms->addr_64,
+					ms->iova, ms->len, 0);
+next:
 		cur_len += ms->len;
 		++ms;
-
-		/*
-		 * don't count previous segment, and don't attempt to
-		 * dereference a potentially invalid pointer.
-		 */
-		if (skip_last && !last_seg) {
-			iova_expected = iova_start = ms->iova;
-			va_start = ms->addr_64;
-		} else if (!skip_last && last_seg) {
-			/* this is the last segment and we're not skipping */
-			if (type == RTE_MEM_EVENT_ALLOC)
-				vfio_dma_mem_map(default_vfio_cfg, va_start,
-						iova_start,
-						iova_expected - iova_start, 1);
-			else
-				vfio_dma_mem_map(default_vfio_cfg, va_start,
-						iova_start,
-						iova_expected - iova_start, 0);
-		}
 	}
 #ifdef RTE_ARCH_PPC_64
 	cur_len = 0;
-- 
2.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:29.646596418 +0200
+++ 0001-vfio-do-not-merge-contiguous-areas.patch	2021-05-17 17:40:29.087808815 +0200
@@ -1 +1 @@
-From 016763c219580292c8b05059c7452a7a11d0d19e Mon Sep 17 00:00:00 2001
+From b92fd56073afacb5ba3a31c42a5526b96399ff74 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 016763c219580292c8b05059c7452a7a11d0d19e ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
- lib/librte_eal/linux/eal_vfio.c        | 59 ++++----------------------
+ lib/librte_eal/linux/eal/eal_vfio.c    | 59 ++++----------------------
@@ -31 +32 @@
-index 90635a45d9..c6b6881ea2 100644
+index 96817e78cd..d8e5ad711a 100644
@@ -34,2 +35,2 @@
-@@ -25,6 +25,16 @@ To make use of VFIO, the ``vfio-pci`` module must be loaded:
- VFIO kernel is usually present by default in all distributions,
+@@ -72,6 +72,16 @@ Note that in order to use VFIO, your kernel must support it.
+ VFIO kernel modules have been included in the Linux kernel since version 3.6.0 and are usually present by default,
@@ -48,8 +49,8 @@
- Since Linux version 5.7,
- the ``vfio-pci`` module supports the creation of virtual functions.
- After the PF is bound to ``vfio-pci`` module,
-diff --git a/lib/librte_eal/linux/eal_vfio.c b/lib/librte_eal/linux/eal_vfio.c
-index 050082444e..64b134d530 100644
---- a/lib/librte_eal/linux/eal_vfio.c
-+++ b/lib/librte_eal/linux/eal_vfio.c
-@@ -517,11 +517,9 @@ static void
+ Also, to use VFIO, both kernel and BIOS must support and be configured to use IO virtualization (such as Intel® VT-d).
+ 
+ .. note::
+diff --git a/lib/librte_eal/linux/eal/eal_vfio.c b/lib/librte_eal/linux/eal/eal_vfio.c
+index 1be02e7f13..5e6101d9a9 100644
+--- a/lib/librte_eal/linux/eal/eal_vfio.c
++++ b/lib/librte_eal/linux/eal/eal_vfio.c
+@@ -514,11 +514,9 @@ static void
@@ -67,2 +68,2 @@
-@@ -539,63 +537,22 @@ vfio_mem_event_callback(enum rte_mem_event type, const void *addr, size_t len,
- 
+@@ -547,63 +545,22 @@ vfio_mem_event_callback(enum rte_mem_event type, const void *addr, size_t len,
+ #endif
@@ -137,2 +138,2 @@
- }
- 
+ #ifdef RTE_ARCH_PPC_64
+ 	cur_len = 0;

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

* [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'test/mem: fix page size for external memory' " Christian Ehrhardt
                   ` (187 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: Anatoly Burakov, David Christensen, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From fd3a70f1b26cc21cb43c21d1bbb834feee088ee7 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

[ 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/eal_vfio.c | 34 ++++++++++++++++++++++++-----
 lib/librte_eal/linux/eal/eal_vfio.h |  1 +
 2 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/lib/librte_eal/linux/eal/eal_vfio.c b/lib/librte_eal/linux/eal/eal_vfio.c
index 5e6101d9a9..25992ae92f 100644
--- a/lib/librte_eal/linux/eal/eal_vfio.c
+++ b/lib/librte_eal/linux/eal/eal_vfio.c
@@ -69,6 +69,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
 	},
@@ -76,6 +77,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
 	},
@@ -83,6 +85,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
 	},
@@ -523,12 +526,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;
 	}
 
@@ -1340,6 +1350,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;
 		}
 	}
 
@@ -1810,6 +1826,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/eal_vfio.h b/lib/librte_eal/linux/eal/eal_vfio.h
index cb2d35fb12..6ebaca6a0c 100644
--- a/lib/librte_eal/linux/eal/eal_vfio.h
+++ b/lib/librte_eal/linux/eal/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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:29.684675350 +0200
+++ 0002-vfio-fix-DMA-mapping-granularity-for-IOVA-as-VA.patch	2021-05-17 17:40:29.091808846 +0200
@@ -1 +1 @@
-From c13ca4e81cac591904c893a65ffbbf446af0268a Mon Sep 17 00:00:00 2001
+From fd3a70f1b26cc21cb43c21d1bbb834feee088ee7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c13ca4e81cac591904c893a65ffbbf446af0268a ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -27,2 +28,2 @@
- lib/librte_eal/linux/eal_vfio.c | 34 +++++++++++++++++++++++++++------
- lib/librte_eal/linux/eal_vfio.h |  1 +
+ lib/librte_eal/linux/eal/eal_vfio.c | 34 ++++++++++++++++++++++++-----
+ lib/librte_eal/linux/eal/eal_vfio.h |  1 +
@@ -31,5 +32,5 @@
-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[] = {
+diff --git a/lib/librte_eal/linux/eal/eal_vfio.c b/lib/librte_eal/linux/eal/eal_vfio.c
+index 5e6101d9a9..25992ae92f 100644
+--- a/lib/librte_eal/linux/eal/eal_vfio.c
++++ b/lib/librte_eal/linux/eal/eal_vfio.c
+@@ -69,6 +69,7 @@ static const struct vfio_iommu_type iommu_types[] = {
@@ -43 +44 @@
-@@ -77,6 +78,7 @@ static const struct vfio_iommu_type iommu_types[] = {
+@@ -76,6 +77,7 @@ static const struct vfio_iommu_type iommu_types[] = {
@@ -51 +52 @@
-@@ -84,6 +86,7 @@ static const struct vfio_iommu_type iommu_types[] = {
+@@ -83,6 +85,7 @@ static const struct vfio_iommu_type iommu_types[] = {
@@ -59 +60 @@
-@@ -526,12 +529,19 @@ vfio_mem_event_callback(enum rte_mem_event type, const void *addr, size_t len,
+@@ -523,12 +526,19 @@ vfio_mem_event_callback(enum rte_mem_event type, const void *addr, size_t len,
@@ -85 +86 @@
-@@ -1348,6 +1358,12 @@ vfio_type1_dma_mem_map(int vfio_container_fd, uint64_t vaddr, uint64_t iova,
+@@ -1340,6 +1350,12 @@ vfio_type1_dma_mem_map(int vfio_container_fd, uint64_t vaddr, uint64_t iova,
@@ -98 +99 @@
-@@ -1823,6 +1839,12 @@ container_dma_unmap(struct vfio_config *vfio_cfg, uint64_t vaddr, uint64_t iova,
+@@ -1810,6 +1826,12 @@ container_dma_unmap(struct vfio_config *vfio_cfg, uint64_t vaddr, uint64_t iova,
@@ -111 +112 @@
-diff --git a/lib/librte_eal/linux/eal_vfio.h b/lib/librte_eal/linux/eal_vfio.h
+diff --git a/lib/librte_eal/linux/eal/eal_vfio.h b/lib/librte_eal/linux/eal/eal_vfio.h
@@ -113,2 +114,2 @@
---- a/lib/librte_eal/linux/eal_vfio.h
-+++ b/lib/librte_eal/linux/eal_vfio.h
+--- a/lib/librte_eal/linux/eal/eal_vfio.h
++++ b/lib/librte_eal/linux/eal/eal_vfio.h

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

* [dpdk-stable] patch 'test/mem: fix page size for external memory' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'power: remove duplicated symbols from map file' " Christian Ehrhardt
                   ` (186 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Nithin Dabilpuram; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From e30aac50c141a585b3ba5a03daddd1359553d2ea 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

[ 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:29.722903397 +0200
+++ 0003-test-mem-fix-page-size-for-external-memory.patch	2021-05-17 17:40:29.091808846 +0200
@@ -1 +1 @@
-From 52db57db0536bf20cbb50464ca4c18b0c9fde4e4 Mon Sep 17 00:00:00 2001
+From e30aac50c141a585b3ba5a03daddd1359553d2ea Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 52db57db0536bf20cbb50464ca4c18b0c9fde4e4 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'power: remove duplicated symbols from map file' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'vfio: fix DMA mapping granularity for IOVA as VA' " Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'test/mem: fix page size for external memory' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'vfio: fix API description' " Christian Ehrhardt
                   ` (185 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From e7fc0eb5646c2930e28389e8c790bc0d98fbf350 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

[ 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/rte_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/rte_power_version.map b/lib/librte_power/rte_power_version.map
index 0fe85377ab..e6ef3a7811 100644
--- a/lib/librte_power/rte_power_version.map
+++ b/lib/librte_power/rte_power_version.map
@@ -35,6 +35,4 @@ EXPERIMENTAL {
 	rte_power_poll_stat_update;
 
 	# added in 21.02
-	rte_power_guest_channel_receive_msg;
-	rte_power_guest_channel_send_msg;
 };
-- 
2.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:29.758295654 +0200
+++ 0004-power-remove-duplicated-symbols-from-map-file.patch	2021-05-17 17:40:29.091808846 +0200
@@ -1 +1 @@
-From e79b0efd989a077d0193e7dbf47f966f65d0c9dc Mon Sep 17 00:00:00 2001
+From e7fc0eb5646c2930e28389e8c790bc0d98fbf350 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e79b0efd989a077d0193e7dbf47f966f65d0c9dc ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
- lib/librte_power/version.map               | 2 --
+ lib/librte_power/rte_power_version.map     | 2 --
@@ -53,5 +54,7 @@
-diff --git a/lib/librte_power/version.map b/lib/librte_power/version.map
-index 3ba9390241..b004e3e4a9 100644
---- a/lib/librte_power/version.map
-+++ b/lib/librte_power/version.map
-@@ -38,6 +38,4 @@ EXPERIMENTAL {
+diff --git a/lib/librte_power/rte_power_version.map b/lib/librte_power/rte_power_version.map
+index 0fe85377ab..e6ef3a7811 100644
+--- a/lib/librte_power/rte_power_version.map
++++ b/lib/librte_power/rte_power_version.map
+@@ -35,6 +35,4 @@ EXPERIMENTAL {
+ 	rte_power_poll_stat_update;
+ 
@@ -59,2 +61,0 @@
- 	rte_power_ethdev_pmgmt_queue_disable;
- 	rte_power_ethdev_pmgmt_queue_enable;

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

* [dpdk-stable] patch 'vfio: fix API description' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (2 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'power: remove duplicated symbols from map file' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'fbarray: fix log message on truncation error' " Christian Ehrhardt
                   ` (184 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/0611571465cb3aefdd8394966b43ebe7f1706106

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 0611571465cb3aefdd8394966b43ebe7f1706106 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

[ 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/common/include/rte_vfio.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_vfio.h b/lib/librte_eal/common/include/rte_vfio.h
index 20ed8c45a9..e7a87454be 100644
--- a/lib/librte_eal/common/include/rte_vfio.h
+++ b/lib/librte_eal/common/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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:29.792380544 +0200
+++ 0005-vfio-fix-API-description.patch	2021-05-17 17:40:29.091808846 +0200
@@ -1 +1 @@
-From 8d63961fc7137cab823f85a50ee82779792f21e4 Mon Sep 17 00:00:00 2001
+From 0611571465cb3aefdd8394966b43ebe7f1706106 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8d63961fc7137cab823f85a50ee82779792f21e4 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -14 +15 @@
- lib/librte_eal/include/rte_vfio.h | 7 ++++---
+ lib/librte_eal/common/include/rte_vfio.h | 7 ++++---
@@ -17 +18 @@
-diff --git a/lib/librte_eal/include/rte_vfio.h b/lib/librte_eal/include/rte_vfio.h
+diff --git a/lib/librte_eal/common/include/rte_vfio.h b/lib/librte_eal/common/include/rte_vfio.h
@@ -19,2 +20,2 @@
---- a/lib/librte_eal/include/rte_vfio.h
-+++ b/lib/librte_eal/include/rte_vfio.h
+--- a/lib/librte_eal/common/include/rte_vfio.h
++++ b/lib/librte_eal/common/include/rte_vfio.h

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

* [dpdk-stable] patch 'fbarray: fix log message on truncation error' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (3 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'vfio: fix API description' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/failsafe: fix RSS hash offload reporting' " Christian Ehrhardt
                   ` (183 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Andrew Boyer, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/87ec379c3e9e73709d3e15d667836d82faf7f863

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 87ec379c3e9e73709d3e15d667836d82faf7f863 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

[ 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 de7e772042..c45c1189b3 100644
--- a/lib/librte_eal/common/eal_common_fbarray.c
+++ b/lib/librte_eal/common/eal_common_fbarray.c
@@ -80,9 +80,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 (ftruncate(fd, len)) {
@@ -794,7 +793,7 @@ rte_fbarray_init(struct rte_fbarray *arr, const char *name, unsigned int len,
 			goto fail;
 		}
 
-		if (resize_and_map(fd, data, mmap_len))
+		if (resize_and_map(fd, path, data, mmap_len))
 			goto fail;
 	}
 	ma->addr = data;
@@ -900,7 +899,7 @@ rte_fbarray_attach(struct rte_fbarray *arr)
 		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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:29.825261485 +0200
+++ 0006-fbarray-fix-log-message-on-truncation-error.patch	2021-05-17 17:40:29.091808846 +0200
@@ -1 +1 @@
-From 2a2ebeab9e3309ab332baefdbcc1caa7e62ecc82 Mon Sep 17 00:00:00 2001
+From 87ec379c3e9e73709d3e15d667836d82faf7f863 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2a2ebeab9e3309ab332baefdbcc1caa7e62ecc82 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index d974f3dab7..592ec58594 100644
+index de7e772042..c45c1189b3 100644
@@ -25 +26 @@
-@@ -81,9 +81,8 @@ get_used_mask(void *data, unsigned int elt_sz, unsigned int len)
+@@ -80,9 +80,8 @@ get_used_mask(void *data, unsigned int elt_sz, unsigned int len)
@@ -35,3 +36,2 @@
- 	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))
+ 	if (ftruncate(fd, len)) {
+@@ -794,7 +793,7 @@ rte_fbarray_init(struct rte_fbarray *arr, const char *name, unsigned int len,
@@ -38,0 +39 @@
+ 		}
@@ -45,2 +46 @@
-@@ -895,7 +894,7 @@ rte_fbarray_attach(struct rte_fbarray *arr)
- 	if (eal_file_lock(fd, EAL_FLOCK_SHARED, EAL_FLOCK_RETURN))
+@@ -900,7 +899,7 @@ rte_fbarray_attach(struct rte_fbarray *arr)
@@ -47,0 +48 @@
+ 	}

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

* [dpdk-stable] patch 'net/failsafe: fix RSS hash offload reporting' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (4 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'fbarray: fix log message on truncation error' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/failsafe: report minimum and maximum MTU' " Christian Ehrhardt
                   ` (182 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Gaetan Rivet, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ea56dfbae3073b2d6eb52699dd3586f95f1b1d9a 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

[ 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 96f7e456f9..4bc8b90e96 100644
--- a/drivers/net/failsafe/failsafe_ops.c
+++ b/drivers/net/failsafe/failsafe_ops.c
@@ -1148,7 +1148,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 |
@@ -1165,7 +1166,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:29.858588354 +0200
+++ 0007-net-failsafe-fix-RSS-hash-offload-reporting.patch	2021-05-17 17:40:29.095808877 +0200
@@ -1 +1 @@
-From f971b7d3013d53a5d911b8c5cf51ab55946253b0 Mon Sep 17 00:00:00 2001
+From ea56dfbae3073b2d6eb52699dd3586f95f1b1d9a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f971b7d3013d53a5d911b8c5cf51ab55946253b0 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 2b6ca9080d..966cfd2dba 100644
+index 96f7e456f9..4bc8b90e96 100644
@@ -23 +24 @@
-@@ -1192,7 +1192,8 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
+@@ -1148,7 +1148,8 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
@@ -33 +34 @@
-@@ -1209,7 +1210,8 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
+@@ -1165,7 +1166,8 @@ fs_dev_infos_get(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/failsafe: report minimum and maximum MTU' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (5 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/failsafe: fix RSS hash offload reporting' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/mlx5: fix metadata item validation for ingress flows' " Christian Ehrhardt
                   ` (181 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: Gaetan Rivet, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 65f95125f78b34e560ebf0ac299d69447d7c9b66 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

[ 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 4bc8b90e96..f63be9b11d 100644
--- a/drivers/net/failsafe/failsafe_ops.c
+++ b/drivers/net/failsafe/failsafe_ops.c
@@ -1051,6 +1051,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);
@@ -1119,6 +1121,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:29.893467217 +0200
+++ 0008-net-failsafe-report-minimum-and-maximum-MTU.patch	2021-05-17 17:40:29.095808877 +0200
@@ -1 +1 @@
-From c0396a48b526eb3d38c941a7e7d63d360a789d16 Mon Sep 17 00:00:00 2001
+From 65f95125f78b34e560ebf0ac299d69447d7c9b66 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c0396a48b526eb3d38c941a7e7d63d360a789d16 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 966cfd2dba..1343777d61 100644
+index 4bc8b90e96..f63be9b11d 100644
@@ -22 +23 @@
-@@ -1095,6 +1095,8 @@ static void
+@@ -1051,6 +1051,8 @@ static void
@@ -31 +32 @@
-@@ -1163,6 +1165,8 @@ fs_dev_infos_get(struct rte_eth_dev *dev,
+@@ -1119,6 +1121,8 @@ fs_dev_infos_get(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/mlx5: fix metadata item validation for ingress flows' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (6 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/failsafe: report minimum and maximum MTU' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'bus/fslmc: fix random portal hangs with qbman 5.0' " Christian Ehrhardt
                   ` (180 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From edcfbe02187c0c23f11f554f51530ff4954fd501 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

[ 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 a1b805c105..6dc4e680ed 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1395,13 +1395,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:29.927429877 +0200
+++ 0009-net-mlx5-fix-metadata-item-validation-for-ingress-fl.patch	2021-05-17 17:40:29.099808908 +0200
@@ -1 +1 @@
-From aa1c17f1d8202a1a6e64e813103cdbe6b357b0ba Mon Sep 17 00:00:00 2001
+From edcfbe02187c0c23f11f554f51530ff4954fd501 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit aa1c17f1d8202a1a6e64e813103cdbe6b357b0ba ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index a44291a3c9..1a74d5ac2b 100644
+index a1b805c105..6dc4e680ed 100644
@@ -27 +28 @@
-@@ -1960,13 +1960,20 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,
+@@ -1395,13 +1395,20 @@ flow_dv_validate_item_meta(struct rte_eth_dev *dev __rte_unused,

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

* [dpdk-stable] patch 'bus/fslmc: fix random portal hangs with qbman 5.0' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (7 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/mlx5: fix metadata item validation for ingress flows' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'bus/dpaa: fix statistics reading' " Christian Ehrhardt
                   ` (179 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Youri Querry; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From b32efbdac253ad55ebfec519f879e3085513ee69 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

[ 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 54bea97820..e88cecc34a 100644
--- a/drivers/bus/fslmc/qbman/qbman_portal.c
+++ b/drivers/bus/fslmc/qbman/qbman_portal.c
@@ -311,17 +311,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:29.966969185 +0200
+++ 0010-bus-fslmc-fix-random-portal-hangs-with-qbman-5.0.patch	2021-05-17 17:40:29.103808941 +0200
@@ -1 +1 @@
-From a675f35d784115bb2a746daa94b6b5ab6305298f Mon Sep 17 00:00:00 2001
+From b32efbdac253ad55ebfec519f879e3085513ee69 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a675f35d784115bb2a746daa94b6b5ab6305298f ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 77c9d508c4..aedcad9258 100644
+index 54bea97820..e88cecc34a 100644
@@ -26 +27 @@
-@@ -339,17 +339,9 @@ struct qbman_swp *qbman_swp_init(const struct qbman_swp_desc *d)
+@@ -311,17 +311,9 @@ struct qbman_swp *qbman_swp_init(const struct qbman_swp_desc *d)

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

* [dpdk-stable] patch 'bus/dpaa: fix statistics reading' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (8 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'bus/fslmc: fix random portal hangs with qbman 5.0' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/dpaa2: fix getting link status' " Christian Ehrhardt
                   ` (178 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Nipun Gupta; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From fa5027dd6968fbf19a82602ac4d155de4dd49eeb 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

[ 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 9ab8e835dc..d28ed0bb8a 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.000110084 +0200
+++ 0011-bus-dpaa-fix-statistics-reading.patch	2021-05-17 17:40:29.103808941 +0200
@@ -1 +1 @@
-From e62a3f4183f14a91f0dd63e9ea39e749406b5653 Mon Sep 17 00:00:00 2001
+From fa5027dd6968fbf19a82602ac4d155de4dd49eeb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e62a3f4183f14a91f0dd63e9ea39e749406b5653 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 4ab49f7853..af9bac76c2 100644
+index 9ab8e835dc..d28ed0bb8a 100644

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

* [dpdk-stable] patch 'net/dpaa2: fix getting link status' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (9 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'bus/dpaa: fix statistics reading' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'app/testpmd: remove unnecessary UDP tunnel check' " Christian Ehrhardt
                   ` (177 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Rohit Raj; +Cc: Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 0a67bed904a140e88b4f9ae1330e2be1a2a31043 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

[ 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 5b7529690b..acdff22521 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 =
@@ -1662,23 +1664,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.030739387 +0200
+++ 0012-net-dpaa2-fix-getting-link-status.patch	2021-05-17 17:40:29.103808941 +0200
@@ -1 +1 @@
-From eadcfd95ffde80b679b757d060f889f683c96266 Mon Sep 17 00:00:00 2001
+From 0a67bed904a140e88b4f9ae1330e2be1a2a31043 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit eadcfd95ffde80b679b757d060f889f683c96266 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 38774e255b..a81c73438e 100644
+index 5b7529690b..acdff22521 100644
@@ -42 +43 @@
-@@ -1805,23 +1807,32 @@ error:
+@@ -1662,23 +1664,32 @@ error:

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

* [dpdk-stable] patch 'app/testpmd: remove unnecessary UDP tunnel check' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (10 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/dpaa2: fix getting link status' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/af_xdp: fix error handling during Rx queue setup' " Christian Ehrhardt
                   ` (176 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Xiaoyun Li; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/540aba68adb2a66e8d415d09e5344f6a1745ad8b

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 540aba68adb2a66e8d415d09e5344f6a1745ad8b 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

[ 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 9a9da744a1..cba219625f 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -9100,7 +9100,7 @@ cmdline_parse_inst_t cmd_tunnel_filter = {
 
 /* *** 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;
@@ -9116,9 +9116,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,
@@ -9131,9 +9129,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");
@@ -9150,7 +9148,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.064313346 +0200
+++ 0013-app-testpmd-remove-unnecessary-UDP-tunnel-check.patch	2021-05-17 17:40:29.119809066 +0200
@@ -1 +1 @@
-From 9d32f448ea0096185d0bbc5582c8b57f090c88a6 Mon Sep 17 00:00:00 2001
+From 540aba68adb2a66e8d415d09e5344f6a1745ad8b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9d32f448ea0096185d0bbc5582c8b57f090c88a6 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 65d03b0ffb..14110eb2e4 100644
+index 9a9da744a1..cba219625f 100644
@@ -24 +25 @@
-@@ -9097,7 +9097,7 @@ cmdline_parse_inst_t cmd_vf_rate_limit = {
+@@ -9100,7 +9100,7 @@ cmdline_parse_inst_t cmd_tunnel_filter = {
@@ -33 +34 @@
-@@ -9113,9 +9113,7 @@ cmd_tunnel_udp_config_parsed(void *parsed_result,
+@@ -9116,9 +9116,7 @@ cmd_tunnel_udp_config_parsed(void *parsed_result,
@@ -44 +45 @@
-@@ -9128,9 +9126,9 @@ cmd_tunnel_udp_config_parsed(void *parsed_result,
+@@ -9131,9 +9129,9 @@ cmd_tunnel_udp_config_parsed(void *parsed_result,
@@ -56 +57 @@
-@@ -9147,7 +9145,7 @@ cmdline_parse_inst_t cmd_tunnel_udp_config = {
+@@ -9150,7 +9148,7 @@ cmdline_parse_inst_t cmd_tunnel_udp_config = {

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

* [dpdk-stable] patch 'net/af_xdp: fix error handling during Rx queue setup' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (11 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'app/testpmd: remove unnecessary UDP tunnel check' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/pcap: fix format string' " Christian Ehrhardt
                   ` (175 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Ciara Loftus; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From eed2d4cca835ddce26efa5b8f4f28b7e55dc448a 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

[ 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 ac253b1d81..f939f69740 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -899,7 +899,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.108983858 +0200
+++ 0014-net-af_xdp-fix-error-handling-during-Rx-queue-setup.patch	2021-05-17 17:40:29.119809066 +0200
@@ -1 +1 @@
-From 831268022300cfbc338f65d43b8f685e50011c86 Mon Sep 17 00:00:00 2001
+From eed2d4cca835ddce26efa5b8f4f28b7e55dc448a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 831268022300cfbc338f65d43b8f685e50011c86 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index b8d5ad0d91..3957227bf0 100644
+index ac253b1d81..f939f69740 100644
@@ -24 +25 @@
-@@ -1145,7 +1145,8 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,
+@@ -899,7 +899,8 @@ xsk_configure(struct pmd_internals *internals, struct pkt_rx_queue *rxq,

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

* [dpdk-stable] patch 'net/pcap: fix format string' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (12 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/af_xdp: fix error handling during Rx queue setup' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/bnxt: fix Rx queue count' " Christian Ehrhardt
                   ` (174 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/38deda63f6a7e76f758771034ffc5ed2c6e5867e

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 38deda63f6a7e76f758771034ffc5ed2c6e5867e 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

[ 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 f4afe67116..9ac0a11ffb 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -802,7 +802,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.144715089 +0200
+++ 0015-net-pcap-fix-format-string.patch	2021-05-17 17:40:29.119809066 +0200
@@ -1 +1 @@
-From 198aba383316162e98c6e0c3c53c525ddca0b071 Mon Sep 17 00:00:00 2001
+From 38deda63f6a7e76f758771034ffc5ed2c6e5867e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 198aba383316162e98c6e0c3c53c525ddca0b071 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 38b1fe2f77..2766745a71 100644
+index f4afe67116..9ac0a11ffb 100644
@@ -21 +22 @@
-@@ -893,7 +893,7 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,
+@@ -802,7 +802,7 @@ eth_rx_queue_setup(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/bnxt: fix Rx queue count' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (13 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/pcap: fix format string' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/bonding: fix LACP system address check' " Christian Ehrhardt
                   ` (173 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/138528f094f9489be127c86adee50d1fbcb7387c

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 138528f094f9489be127c86adee50d1fbcb7387c Mon Sep 17 00:00:00 2001
From: Lance Richardson <lance.richardson@broadcom.com>
Date: Thu, 18 Feb 2021 13:19:20 -0500
Subject: [PATCH] net/bnxt: fix Rx queue count

[ upstream commit 9f13e888ef77d36a97a3ace278e8e812a98e740d ]

bnxt_rx_queue_count_op() incorrectly returns the number of
filled but unprocessed completion queue entries instead of
the number of filled but unprocessed received packet
completions. Fix by properly accounting for the number of
completion ring entries used by the various received packet
completion types.

Fixes: 34c0ba839bae ("net/bnxt: fix Rx queue count")

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

diff --git a/drivers/net/bnxt/bnxt_cpr.h b/drivers/net/bnxt/bnxt_cpr.h
index ff9697f4c8..c769bde619 100644
--- a/drivers/net/bnxt/bnxt_cpr.h
+++ b/drivers/net/bnxt/bnxt_cpr.h
@@ -26,6 +26,10 @@ struct bnxt_db_info;
 #define CMP_TYPE(cmp)						\
 	(((struct cmpl_base *)cmp)->type & CMPL_BASE_TYPE_MASK)
 
+/* Get completion length from completion type, in 16-byte units. */
+#define CMP_LEN(cmp_type) (((cmp_type) & 1) + 1)
+
+
 #define ADV_RAW_CMP(idx, n)	((idx) + (n))
 #define NEXT_RAW_CMP(idx)	ADV_RAW_CMP(idx, 1)
 #define RING_CMP(ring, idx)	((idx) & (ring)->ring_mask)
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 06843d8ddb..7b3532760a 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2379,8 +2379,8 @@ static uint32_t
 bnxt_rx_queue_count_op(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 {
 	struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
-	uint32_t desc = 0, raw_cons = 0, cons;
 	struct bnxt_cp_ring_info *cpr;
+	uint32_t desc = 0, raw_cons;
 	struct bnxt_rx_queue *rxq;
 	struct rx_pkt_cmpl *rxcmp;
 	int rc;
@@ -2394,15 +2394,43 @@ bnxt_rx_queue_count_op(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	raw_cons = cpr->cp_raw_cons;
 
 	while (1) {
+		uint32_t agg_cnt, cons, cmpl_type;
+
 		cons = RING_CMP(cpr->cp_ring_struct, raw_cons);
-		rte_prefetch0(&cpr->cp_desc_ring[cons]);
 		rxcmp = (struct rx_pkt_cmpl *)&cpr->cp_desc_ring[cons];
 
-		if (!CMP_VALID(rxcmp, raw_cons, cpr->cp_ring_struct)) {
+		if (!CMP_VALID(rxcmp, raw_cons, cpr->cp_ring_struct))
 			break;
-		} else {
-			raw_cons++;
+
+		cmpl_type = CMP_TYPE(rxcmp);
+
+		switch (cmpl_type) {
+		case CMPL_BASE_TYPE_RX_L2:
+		case CMPL_BASE_TYPE_RX_L2_V2:
+			agg_cnt = BNXT_RX_L2_AGG_BUFS(rxcmp);
+			raw_cons = raw_cons + CMP_LEN(cmpl_type) + agg_cnt;
 			desc++;
+			break;
+
+		case CMPL_BASE_TYPE_RX_TPA_END:
+			if (BNXT_CHIP_P5(rxq->bp)) {
+				struct rx_tpa_v2_end_cmpl_hi *p5_tpa_end;
+
+				p5_tpa_end = (void *)rxcmp;
+				agg_cnt = BNXT_TPA_END_AGG_BUFS_TH(p5_tpa_end);
+			} else {
+				struct rx_tpa_end_cmpl *tpa_end;
+
+				tpa_end = (void *)rxcmp;
+				agg_cnt = BNXT_TPA_END_AGG_BUFS(tpa_end);
+			}
+
+			raw_cons = raw_cons + CMP_LEN(cmpl_type) + agg_cnt;
+			desc++;
+			break;
+
+		default:
+			raw_cons += CMP_LEN(cmpl_type);
 		}
 	}
 
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index 1cf8f3e17c..668b6aae9a 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -463,8 +463,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
 		goto next_rx;
 	}
 
-	agg_buf = (rxcmp->agg_bufs_v1 & RX_PKT_CMPL_AGG_BUFS_MASK)
-			>> RX_PKT_CMPL_AGG_BUFS_SFT;
+	agg_buf = BNXT_RX_L2_AGG_BUFS(rxcmp);
 	if (agg_buf && !bnxt_agg_bufs_valid(cpr, agg_buf, tmp_raw_cons))
 		return -EBUSY;
 
diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
index 410b46016b..d5b7387144 100644
--- a/drivers/net/bnxt/bnxt_rxr.h
+++ b/drivers/net/bnxt/bnxt_rxr.h
@@ -147,6 +147,10 @@ static inline uint16_t bnxt_tpa_start_agg_id(struct bnxt *bp,
 #define RX_CMP_L4_CS_UNKNOWN(rxcmp1)					\
 	    !((rxcmp1)->flags2 & RX_CMP_L4_CS_BITS)
 
+#define BNXT_RX_L2_AGG_BUFS(cmp) \
+	(((cmp)->agg_bufs_v1 & RX_PKT_CMPL_AGG_BUFS_MASK) >> \
+		RX_PKT_CMPL_AGG_BUFS_SFT)
+
 #define RX_CMP_T_L4_CS_BITS	\
 	rte_cpu_to_le_32(RX_PKT_CMPL_FLAGS2_T_L4_CS_CALC)
 
-- 
2.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.177855818 +0200
+++ 0016-net-bnxt-fix-Rx-queue-count.patch	2021-05-17 17:40:29.123809097 +0200
@@ -1 +1 @@
-From 9f13e888ef77d36a97a3ace278e8e812a98e740d Mon Sep 17 00:00:00 2001
+From 138528f094f9489be127c86adee50d1fbcb7387c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9f13e888ef77d36a97a3ace278e8e812a98e740d ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index d7e0d4621a..28c0a9049c 100644
+index ff9697f4c8..c769bde619 100644
@@ -42 +43 @@
-index 22c880c5c3..9824cdb6d8 100644
+index 06843d8ddb..7b3532760a 100644
@@ -45 +46 @@
-@@ -2942,8 +2942,8 @@ static uint32_t
+@@ -2379,8 +2379,8 @@ static uint32_t
@@ -55 +56 @@
-@@ -2957,15 +2957,43 @@ bnxt_rx_queue_count_op(struct rte_eth_dev *dev, uint16_t rx_queue_id)
+@@ -2394,15 +2394,43 @@ bnxt_rx_queue_count_op(struct rte_eth_dev *dev, uint16_t rx_queue_id)
@@ -78 +79 @@
-+			desc++;
+ 			desc++;
@@ -95 +96 @@
- 			desc++;
++			desc++;
@@ -104 +105 @@
-index 91a00c7cf4..498811a732 100644
+index 1cf8f3e17c..668b6aae9a 100644
@@ -107 +108 @@
-@@ -827,8 +827,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
+@@ -463,8 +463,7 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
@@ -118 +119 @@
-index 0e31b37cad..06d10848da 100644
+index 410b46016b..d5b7387144 100644
@@ -121,3 +122,3 @@
-@@ -37,6 +37,10 @@ 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)
+@@ -147,6 +147,10 @@ static inline uint16_t bnxt_tpa_start_agg_id(struct bnxt *bp,
+ #define RX_CMP_L4_CS_UNKNOWN(rxcmp1)					\
+ 	    !((rxcmp1)->flags2 & RX_CMP_L4_CS_BITS)
@@ -129 +130,2 @@
- #define BNXT_RX_POST_THRESH	32
+ #define RX_CMP_T_L4_CS_BITS	\
+ 	rte_cpu_to_le_32(RX_PKT_CMPL_FLAGS2_T_L4_CS_CALC)
@@ -131 +132,0 @@
- /* Number of descriptors to process per inner loop in vector mode. */

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

* [dpdk-stable] patch 'net/bonding: fix LACP system address check' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (14 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/bnxt: fix Rx queue count' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/ice: fix VLAN filter with PF' " Christian Ehrhardt
                   ` (172 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Vadim Podovinnikov; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From b99e3d106e8f48a09b78f700a660c3049731f50b 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

[ 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.214856122 +0200
+++ 0017-net-bonding-fix-LACP-system-address-check.patch	2021-05-17 17:40:29.127809130 +0200
@@ -1 +1 @@
-From fad80ab3698e7f7d3e9c2a28c371da6a17fbc477 Mon Sep 17 00:00:00 2001
+From b99e3d106e8f48a09b78f700a660c3049731f50b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fad80ab3698e7f7d3e9c2a28c371da6a17fbc477 ]
+
@@ -21 +22,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/ice: fix VLAN filter with PF' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (15 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/bonding: fix LACP system address check' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/e1000: remove MTU setting limitation' " Christian Ehrhardt
                   ` (171 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Zhimin Huang, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From d0dbb7ca6e746eaab730d2ecfed32a388db7d761 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

[ 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 c2e659303c..5469f6b1cd 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -3374,20 +3374,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.248301963 +0200
+++ 0018-net-ice-fix-VLAN-filter-with-PF.patch	2021-05-17 17:40:29.127809130 +0200
@@ -1 +1 @@
-From da996000e8ea513ee47e3e01f0f4e709e66cec07 Mon Sep 17 00:00:00 2001
+From d0dbb7ca6e746eaab730d2ecfed32a388db7d761 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit da996000e8ea513ee47e3e01f0f4e709e66cec07 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index dfd99ace94..8999d441ac 100644
+index c2e659303c..5469f6b1cd 100644
@@ -31 +32 @@
-@@ -4011,20 +4011,16 @@ ice_vsi_config_vlan_filter(struct ice_vsi *vsi, bool on)
+@@ -3374,20 +3374,16 @@ ice_vsi_config_vlan_filter(struct ice_vsi *vsi, bool on)

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

* [dpdk-stable] patch 'net/e1000: remove MTU setting limitation' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (16 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/ice: fix VLAN filter with PF' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/ice/base: fix payload indicator on ptype' " Christian Ehrhardt
                   ` (170 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Dapeng Yu; +Cc: Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 8e81ce2881056665cb87b778971c35649acaae23 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

[ 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 4a6e6b8d73..5f9e64d3ef 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -1801,11 +1801,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 a7886041f6..5edb8e7c68 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -4568,11 +4568,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.285337941 +0200
+++ 0019-net-e1000-remove-MTU-setting-limitation.patch	2021-05-17 17:40:29.131809161 +0200
@@ -1 +1 @@
-From 0984d196be2a92eb6e2e0b926fdb4a06a1d7d823 Mon Sep 17 00:00:00 2001
+From 8e81ce2881056665cb87b778971c35649acaae23 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0984d196be2a92eb6e2e0b926fdb4a06a1d7d823 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 9b8c4a7de5..3c6f643c19 100644
+index 4a6e6b8d73..5f9e64d3ef 100644
@@ -30 +31 @@
-@@ -1805,11 +1805,15 @@ eth_em_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -1801,11 +1801,15 @@ eth_em_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
@@ -51 +52 @@
-index 5323504e98..1716d6b904 100644
+index a7886041f6..5edb8e7c68 100644
@@ -54 +55 @@
-@@ -4394,11 +4394,15 @@ eth_igb_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
+@@ -4568,11 +4568,15 @@ eth_igb_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)

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

* [dpdk-stable] patch 'net/ice/base: fix payload indicator on ptype' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (17 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/e1000: remove MTU setting limitation' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/ice/base: cleanup filter list on error' " Christian Ehrhardt
                   ` (169 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Jacob Keller, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/56492fdf5d0da5a21f817a9defefe1d49165d878

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 56492fdf5d0da5a21f817a9defefe1d49165d878 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

[ 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 51e30848f8..d20f5f5748 100644
--- a/drivers/net/ice/base/ice_lan_tx_rx.h
+++ b/drivers/net/ice/base/ice_lan_tx_rx.h
@@ -1307,7 +1307,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.331801149 +0200
+++ 0020-net-ice-base-fix-payload-indicator-on-ptype.patch	2021-05-17 17:40:29.135809192 +0200
@@ -1 +1 @@
-From 50fb95cb66d0dc993e98500a8384eb366b0d7b52 Mon Sep 17 00:00:00 2001
+From 56492fdf5d0da5a21f817a9defefe1d49165d878 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 50fb95cb66d0dc993e98500a8384eb366b0d7b52 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 107826acd0..e0e79cad95 100644
+index 51e30848f8..d20f5f5748 100644
@@ -26 +27 @@
-@@ -1353,7 +1353,7 @@ static const struct ice_rx_ptype_decoded ice_ptype_lkup[] = {
+@@ -1307,7 +1307,7 @@ static const struct ice_rx_ptype_decoded ice_ptype_lkup[] = {

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

* [dpdk-stable] patch 'net/ice/base: cleanup filter list on error' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (18 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/ice/base: fix payload indicator on ptype' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/i40evf: fix packet loss for X722' " Christian Ehrhardt
                   ` (168 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Robert Malz, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/442c42160b5c7c965907868513707050e57faf75

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 442c42160b5c7c965907868513707050e57faf75 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

[ 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 71c6d9821c..6899502a93 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -4215,7 +4215,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:
@@ -4244,6 +4244,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.373869416 +0200
+++ 0021-net-ice-base-cleanup-filter-list-on-error.patch	2021-05-17 17:40:29.135809192 +0200
@@ -1 +1 @@
-From 34ede45188c318e451ef98183814cc4555208f46 Mon Sep 17 00:00:00 2001
+From 442c42160b5c7c965907868513707050e57faf75 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 34ede45188c318e451ef98183814cc4555208f46 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 2d0dd4b28c..3dc764266b 100644
+index 71c6d9821c..6899502a93 100644
@@ -27 +28 @@
-@@ -6078,7 +6078,7 @@ ice_remove_vsi_lkup_fltr(struct ice_hw *hw, u16 vsi_handle,
+@@ -4215,7 +4215,7 @@ ice_remove_vsi_lkup_fltr(struct ice_hw *hw, u16 vsi_handle,
@@ -36 +37 @@
-@@ -6106,6 +6106,7 @@ ice_remove_vsi_lkup_fltr(struct ice_hw *hw, u16 vsi_handle,
+@@ -4244,6 +4244,7 @@ ice_remove_vsi_lkup_fltr(struct ice_hw *hw, u16 vsi_handle,

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

* [dpdk-stable] patch 'net/i40evf: fix packet loss for X722' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (19 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/ice/base: cleanup filter list on error' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/i40e: fix IPv4 fragment offload' " Christian Ehrhardt
                   ` (167 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Hengjian Zhang, Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ea635e004f36361e38fa942cb10d83845b3946f9 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

[ 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 9a8d2ed9b6..56986991cd 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -2715,7 +2715,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.417267931 +0200
+++ 0022-net-i40evf-fix-packet-loss-for-X722.patch	2021-05-17 17:40:29.139809223 +0200
@@ -1 +1 @@
-From c45bd78e07e9d4b5ffc29748b9b7d4127293597a Mon Sep 17 00:00:00 2001
+From ea635e004f36361e38fa942cb10d83845b3946f9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c45bd78e07e9d4b5ffc29748b9b7d4127293597a ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index 2909b4d894..0c9bd8d2c6 100644
+index 9a8d2ed9b6..56986991cd 100644
@@ -25 +26 @@
-@@ -2746,7 +2746,7 @@ i40evf_config_rss(struct i40e_vf *vf)
+@@ -2715,7 +2715,7 @@ i40evf_config_rss(struct i40e_vf *vf)

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

* [dpdk-stable] patch 'net/i40e: fix IPv4 fragment offload' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (20 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/i40evf: fix packet loss for X722' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/mlx5: fix Rx segmented packets on mbuf starvation' " Christian Ehrhardt
                   ` (166 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Xiaoyun Li; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From db8195c0751c70250b88825a0d6293f58cb8e42b 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

[ 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 4f5f31c802..ed2565e88f 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2310,7 +2310,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;
@@ -2321,7 +2321,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;
@@ -2349,7 +2348,7 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 	outer_tpid = i40e_get_outer_vlan(dev);
 	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,
@@ -2470,15 +2469,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,
@@ -2499,11 +2523,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;
+				}
 
 				/* Get the filter info */
 				filter->input.flow.ip4_flow.proto =
-- 
2.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.462075523 +0200
+++ 0023-net-i40e-fix-IPv4-fragment-offload.patch	2021-05-17 17:40:29.139809223 +0200
@@ -1 +1 @@
-From 10127dbacf7c041a1b67b9e962635b31184bd604 Mon Sep 17 00:00:00 2001
+From db8195c0751c70250b88825a0d6293f58cb8e42b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 10127dbacf7c041a1b67b9e962635b31184bd604 ]
+
@@ -19 +20,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index 4d44282312..3e514d5f38 100644
+index 4f5f31c802..ed2565e88f 100644
@@ -31 +32 @@
-@@ -2433,7 +2433,7 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
+@@ -2310,7 +2310,7 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
@@ -40 +41 @@
-@@ -2446,7 +2446,6 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
+@@ -2321,7 +2321,6 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
@@ -48,2 +49,2 @@
-@@ -2472,7 +2471,7 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
- 	memset(len_arr, 0, sizeof(len_arr));
+@@ -2349,7 +2348,7 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
+ 	outer_tpid = i40e_get_outer_vlan(dev);
@@ -57 +58 @@
-@@ -2611,15 +2610,40 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
+@@ -2470,15 +2469,40 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
@@ -99 +100 @@
-@@ -2640,11 +2664,56 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
+@@ -2499,11 +2523,56 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
@@ -159,2 +160,2 @@
- 				if (input_set & (I40E_INSET_DMAC | I40E_INSET_SMAC)) {
- 					if (input_set & (I40E_INSET_IPV4_SRC |
+ 				/* Get the filter info */
+ 				filter->input.flow.ip4_flow.proto =

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

* [dpdk-stable] patch 'net/mlx5: fix Rx segmented packets on mbuf starvation' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (21 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/i40e: fix IPv4 fragment offload' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/octeontx2: fix VLAN filter' " Christian Ehrhardt
                   ` (165 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Jiawei Zhu; +Cc: Viacheslav Ovsiienko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ea89524268e26b6dea44bb98657bb40fbb24761b 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

[ 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 ac5c1868a0..6904a23cff 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1337,6 +1337,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.502007898 +0200
+++ 0024-net-mlx5-fix-Rx-segmented-packets-on-mbuf-starvation.patch	2021-05-17 17:40:29.143809256 +0200
@@ -1 +1 @@
-From c9678e49feef4e423ebd917c7670fee238f4c2bb Mon Sep 17 00:00:00 2001
+From ea89524268e26b6dea44bb98657bb40fbb24761b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c9678e49feef4e423ebd917c7670fee238f4c2bb ]
+
@@ -30 +31,0 @@
-Cc: stable@dpdk.org
@@ -39 +40 @@
-index 2e4b87c3e5..e3ce9fd224 100644
+index ac5c1868a0..6904a23cff 100644
@@ -42 +43 @@
-@@ -1480,6 +1480,9 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
+@@ -1337,6 +1337,9 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)

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

* [dpdk-stable] patch 'net/octeontx2: fix VLAN filter' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (22 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/mlx5: fix Rx segmented packets on mbuf starvation' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'build: exclude meson files from examples installation' " Christian Ehrhardt
                   ` (164 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Satheesh Paul; +Cc: Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 8fa55fd7b899c8f521a036b00f50b0ed5c0a3e1e 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

[ 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.543948669 +0200
+++ 0025-net-octeontx2-fix-VLAN-filter.patch	2021-05-17 17:40:29.143809256 +0200
@@ -1 +1 @@
-From c8238116ece889fe356c54930bca791091ab1938 Mon Sep 17 00:00:00 2001
+From 8fa55fd7b899c8f521a036b00f50b0ed5c0a3e1e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c8238116ece889fe356c54930bca791091ab1938 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'build: exclude meson files from examples installation' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (23 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/octeontx2: fix VLAN filter' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'log/linux: make default output stderr' " Christian Ehrhardt
                   ` (163 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/93d076ea808e29f1debc26169987328dbdc38287

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 93d076ea808e29f1debc26169987328dbdc38287 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

[ 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 4dc292fbd1..59b4a014a0 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -47,6 +47,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 01bbb556ec..428b84d22f 100644
--- a/meson.build
+++ b/meson.build
@@ -50,7 +50,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.579470328 +0200
+++ 0026-build-exclude-meson-files-from-examples-installation.patch	2021-05-17 17:40:29.143809256 +0200
@@ -1 +1 @@
-From 5d20515e0c260377fcd23fab785070c4391cc59d Mon Sep 17 00:00:00 2001
+From 93d076ea808e29f1debc26169987328dbdc38287 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5d20515e0c260377fcd23fab785070c4391cc59d ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index b9ab24223f..3fe08d4ca5 100644
+index 4dc292fbd1..59b4a014a0 100644
@@ -29 +30 @@
-@@ -48,6 +48,12 @@ all_examples = [
+@@ -47,6 +47,12 @@ all_examples = [
@@ -43 +44 @@
-index fcc4d4c900..7778e18200 100644
+index 01bbb556ec..428b84d22f 100644
@@ -46 +47 @@
-@@ -61,7 +61,7 @@ subdir('doc')
+@@ -50,7 +50,7 @@ subdir('doc')

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

* [dpdk-stable] patch 'log/linux: make default output stderr' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (24 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'build: exclude meson files from examples installation' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net: fix comment in IPv6 header' " Christian Ehrhardt
                   ` (162 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Alexandre Ferrieux, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 7fa4f46043890a9c7709d6b38684709f0e498788 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

[ 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/eal_log.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/librte_eal/linux/eal/eal_log.c b/lib/librte_eal/linux/eal/eal_log.c
index 9d02dddbed..bd5358ca24 100644
--- a/lib/librte_eal/linux/eal/eal_log.c
+++ b/lib/librte_eal/linux/eal/eal_log.c
@@ -27,9 +27,9 @@ console_log_write(__attribute__((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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.622961530 +0200
+++ 0027-log-linux-make-default-output-stderr.patch	2021-05-17 17:40:29.147809287 +0200
@@ -1 +1 @@
-From 5988725d0efeb7021670986aafeb3ff3d87839e1 Mon Sep 17 00:00:00 2001
+From 7fa4f46043890a9c7709d6b38684709f0e498788 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5988725d0efeb7021670986aafeb3ff3d87839e1 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
- lib/librte_eal/linux/eal_log.c | 6 +++---
+ lib/librte_eal/linux/eal/eal_log.c | 6 +++---
@@ -24,5 +25,5 @@
-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)
+diff --git a/lib/librte_eal/linux/eal/eal_log.c b/lib/librte_eal/linux/eal/eal_log.c
+index 9d02dddbed..bd5358ca24 100644
+--- a/lib/librte_eal/linux/eal/eal_log.c
++++ b/lib/librte_eal/linux/eal/eal_log.c
+@@ -27,9 +27,9 @@ console_log_write(__attribute__((unused)) void *c, const char *buf, size_t size)

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

* [dpdk-stable] patch 'net: fix comment in IPv6 header' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (25 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'log/linux: make default output stderr' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/bnxt: remove unused macro' " Christian Ehrhardt
                   ` (161 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Ivan Malov; +Cc: Andrew Rybchenko, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From e70313d86b119f29f2b88702d8e51cfe7e8d5429 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

[ 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 d34c0611f0..f03db05e18 100644
--- a/lib/librte_net/rte_ip.h
+++ b/lib/librte_net/rte_ip.h
@@ -365,7 +365,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.659449251 +0200
+++ 0028-net-fix-comment-in-IPv6-header.patch	2021-05-17 17:40:29.147809287 +0200
@@ -1 +1 @@
-From 24f8b2d896328785038400046773a1e412360627 Mon Sep 17 00:00:00 2001
+From e70313d86b119f29f2b88702d8e51cfe7e8d5429 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 24f8b2d896328785038400046773a1e412360627 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 212ff2c4fd..b59c4d67a3 100644
+index d34c0611f0..f03db05e18 100644
@@ -24 +25 @@
-@@ -384,7 +384,7 @@ rte_ipv4_udptcp_cksum(const struct rte_ipv4_hdr *ipv4_hdr, const void *l4_hdr)
+@@ -365,7 +365,7 @@ rte_ipv4_udptcp_cksum(const struct rte_ipv4_hdr *ipv4_hdr, const void *l4_hdr)

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

* [dpdk-stable] patch 'net/bnxt: remove unused macro' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (26 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net: fix comment in IPv6 header' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/bnxt: fix VNIC configuration' " Christian Ehrhardt
                   ` (160 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/971160e393a9c449be2f344d7a4acce744dc30ea

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 971160e393a9c449be2f344d7a4acce744dc30ea 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

[ 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 8ceaeb59c0..067d77e423 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -13,7 +13,6 @@ struct bnxt;
 struct bnxt_filter_info;
 struct bnxt_cp_ring_info;
 
-#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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.697252070 +0200
+++ 0029-net-bnxt-remove-unused-macro.patch	2021-05-17 17:40:29.151809317 +0200
@@ -1 +1 @@
-From a7bc5e04be47f4d0850a83bec971fcec2785fee4 Mon Sep 17 00:00:00 2001
+From 971160e393a9c449be2f344d7a4acce744dc30ea Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a7bc5e04be47f4d0850a83bec971fcec2785fee4 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index a9d9fcb294..449cb911e5 100644
+index 8ceaeb59c0..067d77e423 100644
@@ -22 +23,2 @@
-@@ -14,7 +14,6 @@ struct bnxt_filter_info;
+@@ -13,7 +13,6 @@ struct bnxt;
+ struct bnxt_filter_info;
@@ -24 +25,0 @@
- struct hwrm_func_qstats_output;

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

* [dpdk-stable] patch 'net/bnxt: fix VNIC configuration' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (27 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/bnxt: remove unused macro' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/bnxt: fix queues per VNIC' " Christian Ehrhardt
                   ` (159 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ae70631a61882920dd04da4eb3273bc3c2122408 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

[ 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 8025d5ad78..f35e4a7811 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1845,12 +1845,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);
@@ -1898,10 +1892,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 a372b899bc..652a3c8f3f 100644
--- a/drivers/net/bnxt/bnxt_vnic.h
+++ b/drivers/net/bnxt/bnxt_vnic.h
@@ -49,8 +49,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.740865695 +0200
+++ 0030-net-bnxt-fix-VNIC-configuration.patch	2021-05-17 17:40:29.151809317 +0200
@@ -1 +1 @@
-From fc886d04bcf49ce2c623cfbbf3d4991aef5fb8ce Mon Sep 17 00:00:00 2001
+From ae70631a61882920dd04da4eb3273bc3c2122408 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fc886d04bcf49ce2c623cfbbf3d4991aef5fb8ce ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index cb8baa8776..5366fe72ca 100644
+index 8025d5ad78..f35e4a7811 100644
@@ -24 +25 @@
-@@ -2013,12 +2013,6 @@ config_mru:
+@@ -1845,12 +1845,6 @@ config_mru:
@@ -37 +38 @@
-@@ -2066,10 +2060,6 @@ int bnxt_hwrm_vnic_qcfg(struct bnxt *bp, struct bnxt_vnic_info *vnic,
+@@ -1898,10 +1892,6 @@ int bnxt_hwrm_vnic_qcfg(struct bnxt *bp, struct bnxt_vnic_info *vnic,
@@ -49 +50 @@
-index 917b909284..00a664c8b8 100644
+index a372b899bc..652a3c8f3f 100644
@@ -52 +53 @@
-@@ -52,8 +52,6 @@ struct bnxt_vnic_info {
+@@ -49,8 +49,6 @@ struct bnxt_vnic_info {

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

* [dpdk-stable] patch 'net/bnxt: fix queues per VNIC' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (28 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/bnxt: fix VNIC configuration' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/bnxt: fix FW readiness check during recovery' " Christian Ehrhardt
                   ` (158 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Venkat Duvvuru; +Cc: Somnath Kotur, Kalesh AP, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 7accc1fb55338fc33734c702c096d95d2b617093 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

[ 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 df00191c09..084f7ecf8f 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.781034294 +0200
+++ 0031-net-bnxt-fix-queues-per-VNIC.patch	2021-05-17 17:40:29.151809317 +0200
@@ -1 +1 @@
-From c23190303efd6884eaeeda7afe23c2a158f4c1ee Mon Sep 17 00:00:00 2001
+From 7accc1fb55338fc33734c702c096d95d2b617093 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c23190303efd6884eaeeda7afe23c2a158f4c1ee ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index f46b10c1c5..53a9b52a46 100644
+index df00191c09..084f7ecf8f 100644

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

* [dpdk-stable] patch 'net/bnxt: fix FW readiness check during recovery' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (29 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/bnxt: fix queues per VNIC' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/bnxt: fix device readiness check' " Christian Ehrhardt
                   ` (157 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From e17e1144c4b7e34ba2a3694d7ad819f1b0904f38 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

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

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 7b3532760a..3f7e6cf787 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -4052,27 +4052,36 @@ static int bnxt_restore_filters(struct bnxt *bp)
 	return ret;
 }
 
-static void bnxt_dev_recover(void *arg)
+static int bnxt_check_fw_ready(struct bnxt *bp)
 {
-	struct bnxt *bp = arg;
 	int timeout = bp->fw_reset_max_msecs;
 	int rc = 0;
 
-	/* 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);
+		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);
+	} while (rc && timeout > 0);
 
-	if (rc) {
+	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 rc = 0;
+
+	/* Clear Error flag so that device re-init should happen */
+	bp->flags &= ~BNXT_FLAG_FATAL_ERROR;
+
+	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 f35e4a7811..b1b6b43e65 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -5095,3 +5095,24 @@ int bnxt_hwrm_port_ts_query(struct bnxt *bp, uint8_t path, uint64_t *timestamp)
 
 	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;
+}
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index 067d77e423..74340eb863 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -231,4 +231,5 @@ int bnxt_hwrm_port_ts_query(struct bnxt *bp, uint8_t path,
 			    uint64_t *timestamp);
 int bnxt_clear_one_vnic_filter(struct bnxt *bp,
 			       struct bnxt_filter_info *filter);
+int bnxt_hwrm_poll_ver_get(struct bnxt *bp);
 #endif
-- 
2.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.818920095 +0200
+++ 0032-net-bnxt-fix-FW-readiness-check-during-recovery.patch	2021-05-17 17:40:29.155809350 +0200
@@ -1 +1 @@
-From 6a4f7139cbce7345e45d9e75d4e28ad1b1218486 Mon Sep 17 00:00:00 2001
+From e17e1144c4b7e34ba2a3694d7ad819f1b0904f38 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6a4f7139cbce7345e45d9e75d4e28ad1b1218486 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -23,2 +24,2 @@
- drivers/net/bnxt/bnxt_ethdev.c | 33 +++++++++++++++++++++------------
- drivers/net/bnxt/bnxt_hwrm.c   | 22 ++++++++++++++++++++++
+ drivers/net/bnxt/bnxt_ethdev.c | 27 ++++++++++++++++++---------
+ drivers/net/bnxt/bnxt_hwrm.c   | 21 +++++++++++++++++++++
@@ -26 +27 @@
- 3 files changed, 44 insertions(+), 12 deletions(-)
+ 3 files changed, 40 insertions(+), 9 deletions(-)
@@ -29 +30 @@
-index 67ff800da5..af146451a5 100644
+index 7b3532760a..3f7e6cf787 100644
@@ -32 +33 @@
-@@ -3859,10 +3859,28 @@ static int bnxt_restore_filters(struct bnxt *bp)
+@@ -4052,27 +4052,36 @@ static int bnxt_restore_filters(struct bnxt *bp)
@@ -35,0 +37 @@
+-static void bnxt_dev_recover(void *arg)
@@ -37,5 +39,10 @@
-+{
-+	int timeout = bp->fw_reset_max_msecs;
-+	int rc = 0;
-+
-+	do {
+ {
+-	struct bnxt *bp = arg;
+ 	int timeout = bp->fw_reset_max_msecs;
+ 	int rc = 0;
+ 
+-	/* 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);
@@ -43,4 +50,5 @@
-+		if (rc == 0)
-+			break;
-+		rte_delay_ms(BNXT_FW_READY_WAIT_INTERVAL);
-+		timeout -= BNXT_FW_READY_WAIT_INTERVAL;
+ 		if (rc == 0)
+ 			break;
+ 		rte_delay_ms(BNXT_FW_READY_WAIT_INTERVAL);
+ 		timeout -= BNXT_FW_READY_WAIT_INTERVAL;
+-	} while (rc && timeout);
@@ -48 +56,2 @@
-+
+ 
+-	if (rc) {
@@ -50 +59 @@
-+		PMD_DRV_LOG(ERR, "FW is not Ready after reset\n");
+ 		PMD_DRV_LOG(ERR, "FW is not Ready after reset\n");
@@ -55,21 +64,8 @@
- static void bnxt_dev_recover(void *arg)
- {
- 	struct bnxt *bp = arg;
--	int timeout = bp->fw_reset_max_msecs;
- 	int rc = 0;
- 
- 	pthread_mutex_lock(&bp->err_recovery_lock);
-@@ -3876,18 +3894,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");
++static void bnxt_dev_recover(void *arg)
++{
++	struct bnxt *bp = arg;
++	int rc = 0;
++
++	/* Clear Error flag so that device re-init should happen */
++	bp->flags &= ~BNXT_FLAG_FATAL_ERROR;
++
@@ -84 +80 @@
-index 9142119954..0b5318e238 100644
+index f35e4a7811..b1b6b43e65 100644
@@ -87 +83 @@
-@@ -5913,3 +5913,25 @@ int bnxt_hwrm_fw_echo_reply(struct bnxt *bp, uint32_t echo_req_data1,
+@@ -5095,3 +5095,24 @@ int bnxt_hwrm_port_ts_query(struct bnxt *bp, uint8_t path, uint64_t *timestamp)
@@ -91 +86,0 @@
-+
@@ -114 +109 @@
-index c47c2498e9..785e321bfd 100644
+index 067d77e423..74340eb863 100644
@@ -117,4 +112,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);
+@@ -231,4 +231,5 @@ int bnxt_hwrm_port_ts_query(struct bnxt *bp, uint8_t path,
+ 			    uint64_t *timestamp);
+ int bnxt_clear_one_vnic_filter(struct bnxt *bp,
+ 			       struct bnxt_filter_info *filter);

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

* [dpdk-stable] patch 'net/bnxt: fix device readiness check' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (30 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/bnxt: fix FW readiness check during recovery' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/bnxt: fix HWRM and FW incompatibility handling' " Christian Ehrhardt
                   ` (156 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Randy Schacher, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From f734fc7b78206baf7b865183b85aee2d8b88cf24 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

[ 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 b1b6b43e65..f18ba83d8a 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1005,6 +1005,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,
@@ -5112,6 +5117,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.859484604 +0200
+++ 0033-net-bnxt-fix-device-readiness-check.patch	2021-05-17 17:40:29.159809382 +0200
@@ -1 +1 @@
-From 3972281f47b2cc0cf844698885f0e6b4228c0975 Mon Sep 17 00:00:00 2001
+From f734fc7b78206baf7b865183b85aee2d8b88cf24 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3972281f47b2cc0cf844698885f0e6b4228c0975 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 02b0a214ca..5ef0845e8c 100644
+index b1b6b43e65..f18ba83d8a 100644
@@ -27 +28 @@
-@@ -1217,6 +1217,11 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
+@@ -1005,6 +1005,11 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
@@ -39 +40 @@
-@@ -6045,6 +6050,10 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp)
+@@ -5112,6 +5117,10 @@ int bnxt_hwrm_poll_ver_get(struct bnxt *bp)

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

* [dpdk-stable] patch 'net/bnxt: fix HWRM and FW incompatibility handling' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (31 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/bnxt: fix device readiness check' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/bnxt: fix Rx and Tx timestamps' " Christian Ehrhardt
                   ` (155 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From c0406eb8205d5d93562d772cbee80ed375972d5d 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

[ 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 f18ba83d8a..52b30bcb42 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1043,6 +1043,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.895229154 +0200
+++ 0034-net-bnxt-fix-HWRM-and-FW-incompatibility-handling.patch	2021-05-17 17:40:29.159809382 +0200
@@ -1 +1 @@
-From b0764e7c207b0932ecd73655d8f7aa015e6733f4 Mon Sep 17 00:00:00 2001
+From c0406eb8205d5d93562d772cbee80ed375972d5d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b0764e7c207b0932ecd73655d8f7aa015e6733f4 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index c16edc8956..3de5c7e3a1 100644
+index f18ba83d8a..52b30bcb42 100644
@@ -25 +26 @@
-@@ -1271,6 +1271,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
+@@ -1043,6 +1043,7 @@ int bnxt_hwrm_ver_get(struct bnxt *bp, uint32_t timeout)
@@ -31,2 +32,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] 191+ messages in thread

* [dpdk-stable] patch 'net/bnxt: fix Rx and Tx timestamps' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (32 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/bnxt: fix HWRM and FW incompatibility handling' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/ice: check some functions return' " Christian Ehrhardt
                   ` (154 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Lance Richardson, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 1ad0c43258631e82f639756394e4b2c5038f6335 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

[ 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 3f7e6cf787..eb2c840943 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3506,6 +3506,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;
 }
@@ -3652,6 +3654,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.930293976 +0200
+++ 0035-net-bnxt-fix-Rx-and-Tx-timestamps.patch	2021-05-17 17:40:29.159809382 +0200
@@ -1 +1 @@
-From 71f5872dd131983932cbfeb5f71345c53473fa81 Mon Sep 17 00:00:00 2001
+From 1ad0c43258631e82f639756394e4b2c5038f6335 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 71f5872dd131983932cbfeb5f71345c53473fa81 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 7124f48013..6cc6af0a66 100644
+index 3f7e6cf787..eb2c840943 100644
@@ -23 +24 @@
-@@ -3428,6 +3428,8 @@ bnxt_timesync_write_time(struct rte_eth_dev *dev, const struct timespec *ts)
+@@ -3506,6 +3506,8 @@ bnxt_timesync_write_time(struct rte_eth_dev *dev, const struct timespec *ts)
@@ -32 +33 @@
-@@ -3578,6 +3580,8 @@ bnxt_timesync_adjust_time(struct rte_eth_dev *dev, int64_t delta)
+@@ -3652,6 +3654,8 @@ bnxt_timesync_adjust_time(struct rte_eth_dev *dev, int64_t delta)

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

* [dpdk-stable] patch 'net/ice: check some functions return' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (33 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/bnxt: fix Rx and Tx timestamps' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/mlx5: fix Rx metadata leftovers' " Christian Ehrhardt
                   ` (153 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Wenjun Wu; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From b9d78a6c6fe9706c243dcce0a55825da708b1124 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

[ 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 5469f6b1cd..2fc3b71544 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -1800,8 +1800,14 @@ ice_pkg_file_search_path(struct rte_pci_device *pci_dev, char *pkg_file)
 	pos = ice_pci_find_next_ext_capability(pci_dev, 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 {
@@ -1863,7 +1869,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:30.966943880 +0200
+++ 0036-net-ice-check-some-functions-return.patch	2021-05-17 17:40:29.163809413 +0200
@@ -1 +1 @@
-From 32667f5b48a371cd65c35d26c61ea293745e1b44 Mon Sep 17 00:00:00 2001
+From b9d78a6c6fe9706c243dcce0a55825da708b1124 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 32667f5b48a371cd65c35d26c61ea293745e1b44 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 8999d441ac..9c9b84a938 100644
+index 5469f6b1cd..2fc3b71544 100644
@@ -21,2 +22,2 @@
-@@ -1663,8 +1663,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);
+@@ -1800,8 +1800,14 @@ ice_pkg_file_search_path(struct rte_pci_device *pci_dev, char *pkg_file)
+ 	pos = ice_pci_find_next_ext_capability(pci_dev, PCI_EXT_CAP_ID_DSN);
@@ -38 +39 @@
-@@ -1727,7 +1733,11 @@ static int ice_load_pkg(struct rte_eth_dev *dev)
+@@ -1863,7 +1869,11 @@ static int ice_load_pkg(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/mlx5: fix Rx metadata leftovers' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (34 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/ice: check some functions return' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'eal: fix comment of OS-specific header files' " Christian Ehrhardt
                   ` (152 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/8598a62e39342b3f1f98e5cb199a58e545ec169a

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 8598a62e39342b3f1f98e5cb199a58e545ec169a 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

[ 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 74f17d3710..2311f424e0 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -894,10 +894,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 6904a23cff..73dbf68d2b 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1259,10 +1259,15 @@ rxq_cq_to_mbuf(struct mlx5_rxq_data *rxq, struct rte_mbuf *pkt,
 			pkt->hash.fdir.hi = mlx5_flow_mark_get(mark);
 		}
 	}
-	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 daa67e2f5c..34ec66a3ae 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -156,6 +156,7 @@ struct mlx5_rxq_data {
 	uint32_t tunnel; /* Tunnel information. */
 	uint64_t flow_meta_mask;
 	int32_t flow_meta_offset;
+	uint32_t flow_meta_port_mask;
 } __rte_cache_aligned;
 
 enum mlx5_rxq_obj_type {
diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
index c167672f52..7160d202dd 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h
@@ -1036,22 +1036,23 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
 		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 607659a629..01b834bb7c 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h
@@ -713,19 +713,24 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
 		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 9935299d59..a9d9e8e7d9 100644
--- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
+++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h
@@ -665,15 +665,16 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
 		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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.003999081 +0200
+++ 0037-net-mlx5-fix-Rx-metadata-leftovers.patch	2021-05-17 17:40:29.171809476 +0200
@@ -1 +1 @@
-From 4eefb20faacab6eae03c860c5d622603f7499ff4 Mon Sep 17 00:00:00 2001
+From 8598a62e39342b3f1f98e5cb199a58e545ec169a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4eefb20faacab6eae03c860c5d622603f7499ff4 ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -32 +33 @@
-index 773f3e63f4..d46fc333d1 100644
+index 74f17d3710..2311f424e0 100644
@@ -35 +36 @@
-@@ -1267,10 +1267,14 @@ mlx5_flow_rxq_dynf_metadata_set(struct rte_eth_dev *dev)
+@@ -894,10 +894,14 @@ mlx5_flow_rxq_dynf_metadata_set(struct rte_eth_dev *dev)
@@ -51 +52 @@
-index e3ce9fd224..c76b9951bc 100644
+index 6904a23cff..73dbf68d2b 100644
@@ -54,2 +55,2 @@
-@@ -1388,10 +1388,15 @@ rxq_cq_to_mbuf(struct mlx5_rxq_data *rxq, struct rte_mbuf *pkt,
- 			}
+@@ -1259,10 +1259,15 @@ rxq_cq_to_mbuf(struct mlx5_rxq_data *rxq, struct rte_mbuf *pkt,
+ 			pkt->hash.fdir.hi = mlx5_flow_mark_get(mark);
@@ -75 +76 @@
-index 0fd98af9d1..4f0fda0dec 100644
+index daa67e2f5c..34ec66a3ae 100644
@@ -78,2 +79,2 @@
-@@ -168,6 +168,7 @@ struct mlx5_rxq_data {
- 	uint64_t timestamp_rx_flag; /* Dynamic mbuf flag for timestamp. */
+@@ -156,6 +156,7 @@ struct mlx5_rxq_data {
+ 	uint32_t tunnel; /* Tunnel information. */
@@ -83,3 +84,3 @@
- 	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. */
+ } __rte_cache_aligned;
+ 
+ enum mlx5_rxq_obj_type {
@@ -87 +88 @@
-index 48b677e40d..2d1154b624 100644
+index c167672f52..7160d202dd 100644
@@ -90 +91 @@
-@@ -1221,22 +1221,23 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
+@@ -1036,22 +1036,23 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
@@ -120 +121 @@
-index 4c067d8801..2234fbe6b2 100644
+index 607659a629..01b834bb7c 100644
@@ -123 +124 @@
-@@ -832,19 +832,24 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
+@@ -713,19 +713,24 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
@@ -153 +154 @@
-index 0b3f240e10..c508a7a4f2 100644
+index 9935299d59..a9d9e8e7d9 100644
@@ -156 +157 @@
-@@ -768,15 +768,16 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,
+@@ -665,15 +665,16 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,

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

* [dpdk-stable] patch 'eal: fix comment of OS-specific header files' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (35 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/mlx5: fix Rx metadata leftovers' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'buildtools: fix build with busybox' " Christian Ehrhardt
                   ` (151 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Andrew Rybchenko, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ac0f0e81d97c56a0269ac293e8521ae2c560c172 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

[ 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/eal/include/rte_os.h | 5 ++---
 lib/librte_eal/linux/eal/include/rte_os.h   | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/lib/librte_eal/freebsd/eal/include/rte_os.h b/lib/librte_eal/freebsd/eal/include/rte_os.h
index a5efe618f5..f384632f52 100644
--- a/lib/librte_eal/freebsd/eal/include/rte_os.h
+++ b/lib/librte_eal/freebsd/eal/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/eal/include/rte_os.h b/lib/librte_eal/linux/eal/include/rte_os.h
index 218d4fa86e..390b87b3a1 100644
--- a/lib/librte_eal/linux/eal/include/rte_os.h
+++ b/lib/librte_eal/linux/eal/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>
-- 
2.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.048994019 +0200
+++ 0038-eal-fix-comment-of-OS-specific-header-files.patch	2021-05-17 17:40:29.171809476 +0200
@@ -1 +1 @@
-From bfb42c3777a82717bfc8da0169a932fe344f22b5 Mon Sep 17 00:00:00 2001
+From ac0f0e81d97c56a0269ac293e8521ae2c560c172 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bfb42c3777a82717bfc8da0169a932fe344f22b5 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -16,4 +17,3 @@
- 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(-)
+ lib/librte_eal/freebsd/eal/include/rte_os.h | 5 ++---
+ lib/librte_eal/linux/eal/include/rte_os.h   | 5 ++---
+ 2 files changed, 4 insertions(+), 6 deletions(-)
@@ -21,4 +21,4 @@
-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
+diff --git a/lib/librte_eal/freebsd/eal/include/rte_os.h b/lib/librte_eal/freebsd/eal/include/rte_os.h
+index a5efe618f5..f384632f52 100644
+--- a/lib/librte_eal/freebsd/eal/include/rte_os.h
++++ b/lib/librte_eal/freebsd/eal/include/rte_os.h
@@ -37 +37 @@
-diff --git a/lib/librte_eal/linux/include/rte_os.h b/lib/librte_eal/linux/include/rte_os.h
+diff --git a/lib/librte_eal/linux/eal/include/rte_os.h b/lib/librte_eal/linux/eal/include/rte_os.h
@@ -39,2 +39,2 @@
---- a/lib/librte_eal/linux/include/rte_os.h
-+++ b/lib/librte_eal/linux/include/rte_os.h
+--- a/lib/librte_eal/linux/eal/include/rte_os.h
++++ b/lib/librte_eal/linux/eal/include/rte_os.h
@@ -53,16 +52,0 @@
-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>

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

* [dpdk-stable] patch 'buildtools: fix build with busybox' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (36 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'eal: fix comment of OS-specific header files' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'build: detect execinfo library on Linux' " Christian Ehrhardt
                   ` (150 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Bruce Richardson, Andrew Rybchenko, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 0bbd0f529af66ee1a7c45ac726836d3c63755f55 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

[ 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/check-experimental-syms.sh | 2 +-
 buildtools/map-list-symbol.sh         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/buildtools/check-experimental-syms.sh b/buildtools/check-experimental-syms.sh
index f3603e5bac..fe07dd38fd 100755
--- a/buildtools/check-experimental-syms.sh
+++ b/buildtools/check-experimental-syms.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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.083610591 +0200
+++ 0039-buildtools-fix-build-with-busybox.patch	2021-05-17 17:40:29.171809476 +0200
@@ -1 +1 @@
-From e1ab26df4862143b81719957977988271505198a Mon Sep 17 00:00:00 2001
+From 0bbd0f529af66ee1a7c45ac726836d3c63755f55 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e1ab26df4862143b81719957977988271505198a ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -27,22 +28,8 @@
- 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
+ buildtools/check-experimental-syms.sh | 2 +-
+ buildtools/map-list-symbol.sh         | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/buildtools/check-experimental-syms.sh b/buildtools/check-experimental-syms.sh
+index f3603e5bac..fe07dd38fd 100755
+--- a/buildtools/check-experimental-syms.sh
++++ b/buildtools/check-experimental-syms.sh

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

* [dpdk-stable] patch 'build: detect execinfo library on Linux' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (37 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'buildtools: fix build with busybox' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'common/dpaax/caamflib: fix build with musl' " Christian Ehrhardt
                   ` (149 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Bruce Richardson, Andrew Rybchenko, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 7f254be3728941b9439cb0c1bb43a5ba625c5cac 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

[ 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      | 3 ---
 app/test/meson.build | 1 -
 config/meson.build   | 9 ++++++---
 examples/meson.build | 4 +---
 4 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/app/meson.build b/app/meson.build
index c7f689eb79..4bdfaf4787 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -18,8 +18,6 @@ apps = [
 	'test-pmd',
 	'test-sad']
 
-# for BSD only
-lib_execinfo = cc.find_library('execinfo', required: false)
 
 default_cflags = machine_args
 default_ldflags = []
@@ -51,7 +49,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 860728bb07..2e35e93477 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -387,7 +387,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 b1f728ee86..4007b8f37c 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -121,11 +121,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
@@ -155,6 +152,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 59b4a014a0..bcd40cc302 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -6,8 +6,6 @@ if get_option('default_library') == 'static'
 	driver_libs = 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',
@@ -81,7 +79,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']
 	if is_windows
-- 
2.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.118181026 +0200
+++ 0040-build-detect-execinfo-library-on-Linux.patch	2021-05-17 17:40:29.171809476 +0200
@@ -1 +1 @@
-From 1cd512b2f5325c971c5bfdd7715debded986df27 Mon Sep 17 00:00:00 2001
+From 7f254be3728941b9439cb0c1bb43a5ba625c5cac Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1cd512b2f5325c971c5bfdd7715debded986df27 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
- app/meson.build      | 4 ----
+ app/meson.build      | 3 ---
@@ -27 +28 @@
- 4 files changed, 7 insertions(+), 11 deletions(-)
+ 4 files changed, 7 insertions(+), 10 deletions(-)
@@ -30 +31 @@
-index 87fc195dbf..50a53dbde8 100644
+index c7f689eb79..4bdfaf4787 100644
@@ -33,2 +34,2 @@
-@@ -21,9 +21,6 @@ apps = [
- 	'test-regex',
+@@ -18,8 +18,6 @@ apps = [
+ 	'test-pmd',
@@ -39,2 +40,2 @@
--
- default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
+ 
+ default_cflags = machine_args
@@ -42,2 +43 @@
- if get_option('default_library') == 'static' and not is_windows
-@@ -53,7 +50,6 @@ foreach app:apps
+@@ -51,7 +49,6 @@ foreach app:apps
@@ -52 +52 @@
-index 561e493a29..099895fc87 100644
+index 860728bb07..2e35e93477 100644
@@ -55 +55 @@
-@@ -426,7 +426,6 @@ foreach d:test_deps
+@@ -387,7 +387,6 @@ foreach d:test_deps
@@ -64 +64 @@
-index 3cf560b8a3..66a2edcc47 100644
+index b1f728ee86..4007b8f37c 100644
@@ -67 +67 @@
-@@ -125,11 +125,8 @@ if cc.find_library('m', required : false).found()
+@@ -121,11 +121,8 @@ if cc.find_library('m', required : false).found()
@@ -79 +79 @@
-@@ -166,6 +163,12 @@ if fdt_dep.found() and cc.has_header('fdt.h')
+@@ -155,6 +152,12 @@ if fdt_dep.found() and cc.has_header('fdt.h')
@@ -93 +93 @@
-index 3fe08d4ca5..d065a6a08b 100644
+index 59b4a014a0..bcd40cc302 100644
@@ -97 +97 @@
- 	link_whole_libs = dpdk_static_libraries + dpdk_drivers
+ 	driver_libs = dpdk_drivers
@@ -105 +105 @@
-@@ -82,7 +80,7 @@ foreach example: examples
+@@ -81,7 +79,7 @@ foreach example: examples
@@ -113 +113 @@
- 	subdir(example)
+ 	if is_windows

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

* [dpdk-stable] patch 'common/dpaax/caamflib: fix build with musl' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (38 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'build: detect execinfo library on Linux' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'bus/dpaa: fix 64-bit arch detection' " Christian Ehrhardt
                   ` (148 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Natanael Copa
  Cc: Hemant Agrawal, Thomas Monjalon, Andrew Rybchenko,
	David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 6b51c0a4e900ea28b97262537ff31fec396f9bd8 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

[ 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 ce946ccb5c..95d887a9d6 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 __attribute__((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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.155847951 +0200
+++ 0041-common-dpaax-caamflib-fix-build-with-musl.patch	2021-05-17 17:40:29.171809476 +0200
@@ -1 +1 @@
-From 8bf3ff3c37ec1786470dfa7b8056e3304bbba14f Mon Sep 17 00:00:00 2001
+From 6b51c0a4e900ea28b97262537ff31fec396f9bd8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 8bf3ff3c37ec1786470dfa7b8056e3304bbba14f ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 36ee4b5335..c1a693498d 100644
+index ce946ccb5c..95d887a9d6 100644
@@ -47 +48 @@
- #define __maybe_unused __rte_unused
+ #define __maybe_unused __attribute__((unused))

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

* [dpdk-stable] patch 'bus/dpaa: fix 64-bit arch detection' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (39 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'common/dpaax/caamflib: fix build with musl' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'bus/dpaa: fix build with musl' " Christian Ehrhardt
                   ` (147 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Natanael Copa
  Cc: Hemant Agrawal, Andrew Rybchenko, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ff200e05640c7fec3a94323fe7b6637e9396b169 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

[ 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 4deea5e75e..2660234adb 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.189286080 +0200
+++ 0042-bus-dpaa-fix-64-bit-arch-detection.patch	2021-05-17 17:40:29.175809507 +0200
@@ -1 +1 @@
-From a4ab65e75beecbebafdca91aa6aac1f091b4460c Mon Sep 17 00:00:00 2001
+From ff200e05640c7fec3a94323fe7b6637e9396b169 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a4ab65e75beecbebafdca91aa6aac1f091b4460c ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 10212f0fd5..7ef2f3b2e3 100644
+index 4deea5e75e..2660234adb 100644

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

* [dpdk-stable] patch 'bus/dpaa: fix build with musl' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (40 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'bus/dpaa: fix 64-bit arch detection' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/cxgbe: remove use of uint type' " Christian Ehrhardt
                   ` (146 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Natanael Copa
  Cc: Thomas Monjalon, Andrew Rybchenko, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 4b72771849918d48e16c32f2597b0e6afc0d2210 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

[ 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 36eca88cd4..2ec504c5d2 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>
@@ -89,7 +89,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 e1dee17542..2aa3b682d0 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
@@ -40,7 +42,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;
@@ -86,8 +89,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;
 }
 
@@ -136,7 +141,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;
 	}
 
@@ -145,7 +151,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 bf7bfae8cb..e1f0461fcd 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 12c9d99179..d2883d02d4 100644
--- a/drivers/common/dpaax/compat.h
+++ b/drivers/common/dpaax/compat.h
@@ -34,7 +34,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.231301044 +0200
+++ 0043-bus-dpaa-fix-build-with-musl.patch	2021-05-17 17:40:29.175809507 +0200
@@ -1 +1 @@
-From e9fd4b87f08d4da01ea9bde075f02e702b65a784 Mon Sep 17 00:00:00 2001
+From 4b72771849918d48e16c32f2597b0e6afc0d2210 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e9fd4b87f08d4da01ea9bde075f02e702b65a784 ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -40 +41 @@
-index b7009f2299..120deb0bb6 100644
+index 36eca88cd4..2ec504c5d2 100644
@@ -52 +53 @@
-@@ -90,7 +90,7 @@ netcfg_acquire(void)
+@@ -89,7 +89,7 @@ netcfg_acquire(void)
@@ -107 +108 @@
-index 6d9aaff164..dfbafe581a 100644
+index e1dee17542..2aa3b682d0 100644
@@ -119 +120 @@
-@@ -50,7 +52,8 @@ static int fsl_qman_portal_init(uint32_t index, int is_shared)
+@@ -40,7 +42,8 @@ static int fsl_qman_portal_init(uint32_t index, int is_shared)
@@ -129 +130 @@
-@@ -96,8 +99,10 @@ static int fsl_qman_portal_finish(void)
+@@ -86,8 +89,10 @@ static int fsl_qman_portal_finish(void)
@@ -142 +143 @@
-@@ -146,7 +151,8 @@ struct qman_portal *fsl_qman_fq_portal_create(int *fd)
+@@ -136,7 +141,8 @@ struct qman_portal *fsl_qman_fq_portal_create(int *fd)
@@ -152 +153 @@
-@@ -155,7 +161,8 @@ struct qman_portal *fsl_qman_fq_portal_create(int *fd)
+@@ -145,7 +151,8 @@ struct qman_portal *fsl_qman_fq_portal_create(int *fd)
@@ -163 +164 @@
-index d7d1befd24..bb18a34e3d 100644
+index bf7bfae8cb..e1f0461fcd 100644
@@ -175 +176 @@
-index c69e76ab96..7166f8cceb 100644
+index 12c9d99179..d2883d02d4 100644
@@ -178 +179 @@
-@@ -30,7 +30,6 @@
+@@ -34,7 +34,6 @@

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

* [dpdk-stable] patch 'net/cxgbe: remove use of uint type' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (41 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'bus/dpaa: fix build with musl' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'app/testpmd: fix build with musl' " Christian Ehrhardt
                   ` (145 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Natanael Copa
  Cc: Morten Brørup, Andrew Rybchenko, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From e9f38e9aff2f66813f3879864d2eb793fa73fa05 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

[ 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 6047642c5c..7e12624be1 100644
--- a/drivers/net/cxgbe/base/common.h
+++ b/drivers/net/cxgbe/base/common.h
@@ -198,15 +198,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.274977322 +0200
+++ 0044-net-cxgbe-remove-use-of-uint-type.patch	2021-05-17 17:40:29.175809507 +0200
@@ -1 +1 @@
-From 3d100ccb2e16087f1ba0ba09274ee1b40b6f0e15 Mon Sep 17 00:00:00 2001
+From e9f38e9aff2f66813f3879864d2eb793fa73fa05 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 3d100ccb2e16087f1ba0ba09274ee1b40b6f0e15 ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -31 +32 @@
-index 202a2f4baf..ab100d784c 100644
+index 6047642c5c..7e12624be1 100644
@@ -34 +35 @@
-@@ -189,15 +189,15 @@ struct rss_params {
+@@ -198,15 +198,15 @@ struct rss_params {

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

* [dpdk-stable] patch 'app/testpmd: fix build with musl' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (42 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/cxgbe: remove use of uint type' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'examples/bbdev: fix header include for " Christian Ehrhardt
                   ` (144 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Natanael Copa
  Cc: Morten Brørup, Thomas Monjalon, Andrew Rybchenko,
	David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/96d8538b1ca6cb1ba7d86cdff0855de1bbda1265

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 96d8538b1ca6cb1ba7d86cdff0855de1bbda1265 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

[ 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 d2deadd4e6..3899d9f724 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 e14ff42745..ce6fb44d5a 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2138,7 +2138,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 4dbcee3a62..a955e731e5 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -820,7 +820,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.317920050 +0200
+++ 0045-app-testpmd-fix-build-with-musl.patch	2021-05-17 17:40:29.179809538 +0200
@@ -1 +1 @@
-From 3529e8f3a5e62919c6528457c68f0c5c26cfdada Mon Sep 17 00:00:00 2001
+From 96d8538b1ca6cb1ba7d86cdff0855de1bbda1265 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 3529e8f3a5e62919c6528457c68f0c5c26cfdada ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
-index 066619e115..6980291f07 100644
+index d2deadd4e6..3899d9f724 100644
@@ -47 +48 @@
-index 4ce75a8e73..ef0b9784d0 100644
+index e14ff42745..ce6fb44d5a 100644
@@ -50 +51 @@
-@@ -2674,7 +2674,7 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)
+@@ -2138,7 +2138,7 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)
@@ -60 +61 @@
-index af40859170..a87ccb0f0f 100644
+index 4dbcee3a62..a955e731e5 100644
@@ -63 +64 @@
-@@ -936,7 +936,7 @@ int set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate,
+@@ -820,7 +820,7 @@ int set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate,

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

* [dpdk-stable] patch 'examples/bbdev: fix header include for musl' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (43 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'app/testpmd: fix build with musl' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'examples/packet_ordering: fix port configuration' " Christian Ehrhardt
                   ` (143 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Andrew Rybchenko, David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/17075d864bce2802d117c9f65da9b697c2e2f7fb

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 17075d864bce2802d117c9f65da9b697c2e2f7fb 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

[ 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 68a46050c0..db2dc33345 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.366607572 +0200
+++ 0046-examples-bbdev-fix-header-include-for-musl.patch	2021-05-17 17:40:29.179809538 +0200
@@ -1 +1 @@
-From 960f28b2a3b39c143191bd3a5424245fc7dc4cf8 Mon Sep 17 00:00:00 2001
+From 17075d864bce2802d117c9f65da9b697c2e2f7fb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 960f28b2a3b39c143191bd3a5424245fc7dc4cf8 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 2e170caf84..20cfd327fb 100644
+index 68a46050c0..db2dc33345 100644

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

* [dpdk-stable] patch 'examples/packet_ordering: fix port configuration' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (44 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'examples/bbdev: fix header include for " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'test: fix autotest handling of skipped tests' " Christian Ehrhardt
                   ` (142 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Dapeng Yu; +Cc: Reshma Pattan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/616e4fe2911bc51ac628c66b3fdac7845939d994

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 616e4fe2911bc51ac628c66b3fdac7845939d994 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

[ 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 edaf810d94..4eea8a3318 100644
--- a/examples/packet_ordering/main.c
+++ b/examples/packet_ordering/main.c
@@ -293,7 +293,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.401647969 +0200
+++ 0047-examples-packet_ordering-fix-port-configuration.patch	2021-05-17 17:40:29.179809538 +0200
@@ -1 +1 @@
-From c99f115bbd9d56630fc5a8d404443e0761684832 Mon Sep 17 00:00:00 2001
+From 616e4fe2911bc51ac628c66b3fdac7845939d994 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c99f115bbd9d56630fc5a8d404443e0761684832 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index ff670747fd..bcbda05f5e 100644
+index edaf810d94..4eea8a3318 100644
@@ -27 +28 @@
-@@ -297,7 +297,7 @@ configure_eth_port(uint16_t port_id)
+@@ -293,7 +293,7 @@ configure_eth_port(uint16_t port_id)

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

* [dpdk-stable] patch 'test: fix autotest handling of skipped tests' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (45 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'examples/packet_ordering: fix port configuration' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/ark: update packet director initial state' " Christian Ehrhardt
                   ` (141 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Thinh Tran; +Cc: David Christensen, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/874a929f3bde9d7b3c2252b437ebed44690bef9a

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 874a929f3bde9d7b3c2252b437ebed44690bef9a 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

[ 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 26688b7132..016d99cc24 100644
--- a/app/test/autotest_test_funcs.py
+++ b/app/test/autotest_test_funcs.py
@@ -12,13 +12,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.441089413 +0200
+++ 0048-test-fix-autotest-handling-of-skipped-tests.patch	2021-05-17 17:40:29.179809538 +0200
@@ -1 +1 @@
-From c8c3cfd699a117cf8c070059a606ea12ab030cbb Mon Sep 17 00:00:00 2001
+From 874a929f3bde9d7b3c2252b437ebed44690bef9a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c8c3cfd699a117cf8c070059a606ea12ab030cbb ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 0811066cb0..6c717bddb4 100644
+index 26688b7132..016d99cc24 100644
@@ -26 +27 @@
-@@ -13,13 +13,16 @@ import pexpect
+@@ -12,13 +12,16 @@ import pexpect

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

* [dpdk-stable] patch 'net/ark: update packet director initial state' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (46 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'test: fix autotest handling of skipped tests' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/ark: refactor Rx buffer recovery' " Christian Ehrhardt
                   ` (140 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Ed Czeck; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 1b52c3e3370db71853c94e7c7e2317d9ca7de79e 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

[ 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 c3642012dd..7d54a1b03d 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -283,6 +283,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;
 
 	PMD_DEBUG_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 1f2c8182ad..0bcc379f06 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 314e6dea9d..8e9f119855 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.477971897 +0200
+++ 0049-net-ark-update-packet-director-initial-state.patch	2021-05-17 17:40:29.183809571 +0200
@@ -1 +1 @@
-From 3b4f34f6b6071524a3de6a1db316eca65b4804ca Mon Sep 17 00:00:00 2001
+From 1b52c3e3370db71853c94e7c7e2317d9ca7de79e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3b4f34f6b6071524a3de6a1db316eca65b4804ca ]
+
@@ -7 +8,0 @@
-Cc: stable@dpdk.org
@@ -17 +18 @@
-index ef650a4658..477e1de02d 100644
+index c3642012dd..7d54a1b03d 100644
@@ -20 +21 @@
-@@ -321,6 +321,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
+@@ -283,6 +283,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
@@ -26 +27 @@
- 	ARK_PMD_LOG(INFO, "Sys Ctrl Const = 0x%x  HW Commit_ID: %08x\n",
+ 	PMD_DEBUG_LOG(INFO, "Sys Ctrl Const = 0x%x  HW Commit_ID: %08x\n",
@@ -29 +30 @@
-index 25e1218310..dbfd2924bd 100644
+index 1f2c8182ad..0bcc379f06 100644
@@ -42 +43 @@
-index 4afd128f95..b5577cebb3 100644
+index 314e6dea9d..8e9f119855 100644

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

* [dpdk-stable] patch 'net/ark: refactor Rx buffer recovery' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (47 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/ark: update packet director initial state' " Christian Ehrhardt
@ 2021-05-17 16:07 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'app/testpmd: fix NVGRE encap configuration' " Christian Ehrhardt
                   ` (139 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:07 UTC (permalink / raw)
  To: Ed Czeck; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/099ab9bb98acf79008db7fcb86b8dad2664e2a56

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 099ab9bb98acf79008db7fcb86b8dad2664e2a56 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

[ 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 6156730bb2..32ee5c1264 100644
--- a/drivers/net/ark/ark_ethdev_rx.c
+++ b/drivers/net/ark/ark_ethdev_rx.c
@@ -25,9 +25,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 {
@@ -53,7 +50,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 */
@@ -104,9 +101,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);
 	}
 }
@@ -317,9 +313,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;
 }
@@ -456,11 +450,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_RX_DEBUG) {		/* DEBUG */
@@ -509,29 +505,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) {
-		PMD_DRV_LOG(ERR,
-			    "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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.514966347 +0200
+++ 0050-net-ark-refactor-Rx-buffer-recovery.patch	2021-05-17 17:40:29.183809571 +0200
@@ -1 +1 @@
-From 31d7dded033fc061950312253919237dde07ac63 Mon Sep 17 00:00:00 2001
+From 099ab9bb98acf79008db7fcb86b8dad2664e2a56 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 31d7dded033fc061950312253919237dde07ac63 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index d29d3db783..8e55b851a2 100644
+index 6156730bb2..32ee5c1264 100644
@@ -22 +23 @@
-@@ -26,9 +26,6 @@ static uint32_t eth_ark_rx_jumbo(struct ark_rx_queue *queue,
+@@ -25,9 +25,6 @@ static uint32_t eth_ark_rx_jumbo(struct ark_rx_queue *queue,
@@ -32 +33 @@
-@@ -54,7 +51,7 @@ struct ark_rx_queue {
+@@ -53,7 +50,7 @@ struct ark_rx_queue {
@@ -41 +42 @@
-@@ -105,9 +102,8 @@ static inline void
+@@ -104,9 +101,8 @@ static inline void
@@ -53 +54 @@
-@@ -321,9 +317,7 @@ eth_ark_recv_pkts(void *rx_queue,
+@@ -317,9 +313,7 @@ eth_ark_recv_pkts(void *rx_queue,
@@ -64 +65 @@
-@@ -458,11 +452,13 @@ eth_ark_rx_seed_mbufs(struct ark_rx_queue *queue)
+@@ -456,11 +450,13 @@ eth_ark_rx_seed_mbufs(struct ark_rx_queue *queue)
@@ -82,2 +83,2 @@
- 	if (ARK_DEBUG_CORE) {		/* DEBUG */
-@@ -511,29 +507,6 @@ eth_ark_rx_seed_mbufs(struct ark_rx_queue *queue)
+ 	if (ARK_RX_DEBUG) {		/* DEBUG */
+@@ -509,29 +505,6 @@ eth_ark_rx_seed_mbufs(struct ark_rx_queue *queue)
@@ -101 +102 @@
--		ARK_PMD_LOG(NOTICE,
+-		PMD_DRV_LOG(ERR,

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

* [dpdk-stable] patch 'app/testpmd: fix NVGRE encap configuration' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (48 preceding siblings ...)
  2021-05-17 16:07 ` [dpdk-stable] patch 'net/ark: refactor Rx buffer recovery' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/bnxt: fix Tx timestamp init' " Christian Ehrhardt
                   ` (138 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Jiawei Wang; +Cc: Ori Kam, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/75a0b1a8c14999ce893bc4a8df34e818e95b0b9f

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 75a0b1a8c14999ce893bc4a8df34e818e95b0b9f 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

[ 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 da3533c557..894546f2c0 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -4250,6 +4250,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.557227581 +0200
+++ 0051-app-testpmd-fix-NVGRE-encap-configuration.patch	2021-05-17 17:40:29.187809602 +0200
@@ -1 +1 @@
-From 9b0da816bdec98c0d6c5d17ccdd337bdbafc3f75 Mon Sep 17 00:00:00 2001
+From 75a0b1a8c14999ce893bc4a8df34e818e95b0b9f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9b0da816bdec98c0d6c5d17ccdd337bdbafc3f75 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 49d9f9c043..2c40c6996e 100644
+index da3533c557..894546f2c0 100644
@@ -26 +27 @@
-@@ -5439,6 +5439,8 @@ parse_vc_action_nvgre_encap(struct context *ctx, const struct token *token,
+@@ -4250,6 +4250,8 @@ parse_vc_action_nvgre_encap(struct context *ctx, const struct token *token,

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

* [dpdk-stable] patch 'net/bnxt: fix Tx timestamp init' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (49 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'app/testpmd: fix NVGRE encap configuration' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/bnxt: fix PCI write check' " Christian Ehrhardt
                   ` (137 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Somnath Kotur; +Cc: Kalesh AP, Lance Richardson, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 5a6893bd46133061c99f2b8d177a96615b0368b6 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

[ 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 eb2c840943..fed52bafd5 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3455,6 +3455,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.597924933 +0200
+++ 0052-net-bnxt-fix-Tx-timestamp-init.patch	2021-05-17 17:40:29.187809602 +0200
@@ -1 +1 @@
-From aa764bae8d66856caad976c5e7d4b415c3158179 Mon Sep 17 00:00:00 2001
+From 5a6893bd46133061c99f2b8d177a96615b0368b6 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit aa764bae8d66856caad976c5e7d4b415c3158179 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index f1dd40591f..57a409c0b7 100644
+index eb2c840943..fed52bafd5 100644
@@ -26 +27 @@
-@@ -3377,6 +3377,7 @@ static int bnxt_get_tx_ts(struct bnxt *bp, uint64_t *ts)
+@@ -3455,6 +3455,7 @@ static int bnxt_get_tx_ts(struct bnxt *bp, uint64_t *ts)

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

* [dpdk-stable] patch 'net/bnxt: fix PCI write check' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (50 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/bnxt: fix Tx timestamp init' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/bnxt: fix RSS context cleanup' " Christian Ehrhardt
                   ` (136 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/55c01bcfaf7bdd68d295898c4d05b220f78febdd

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 55c01bcfaf7bdd68d295898c4d05b220f78febdd 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

[ 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 fed52bafd5..b1154df66e 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3936,13 +3936,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.635810452 +0200
+++ 0053-net-bnxt-fix-PCI-write-check.patch	2021-05-17 17:40:29.191809632 +0200
@@ -1 +1 @@
-From fcf953791c5c72a22741969071265b74d647c08f Mon Sep 17 00:00:00 2001
+From 55c01bcfaf7bdd68d295898c4d05b220f78febdd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fcf953791c5c72a22741969071265b74d647c08f ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 57a409c0b7..1997783a7d 100644
+index fed52bafd5..b1154df66e 100644
@@ -24 +25 @@
-@@ -3861,13 +3861,19 @@ static void bnxt_write_fw_reset_reg(struct bnxt *bp, uint32_t index)
+@@ -3936,13 +3936,19 @@ static void bnxt_write_fw_reset_reg(struct bnxt *bp, uint32_t index)

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

* [dpdk-stable] patch 'net/bnxt: fix RSS context cleanup' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (51 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/bnxt: fix PCI write check' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/bnxt: fix link state operations' " Christian Ehrhardt
                   ` (135 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Ajit Khaparde; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From a9a6ca9809d08400c8de693f7574ce7ccf62565a 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

[ 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 b1154df66e..59f66ce539 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1952,6 +1952,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.673663703 +0200
+++ 0054-net-bnxt-fix-RSS-context-cleanup.patch	2021-05-17 17:40:29.191809632 +0200
@@ -1 +1 @@
-From 670ab553841b2f2bbf59667465855b0869eea86b Mon Sep 17 00:00:00 2001
+From a9a6ca9809d08400c8de693f7574ce7ccf62565a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 670ab553841b2f2bbf59667465855b0869eea86b ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 1997783a7d..ff92f999db 100644
+index b1154df66e..59f66ce539 100644
@@ -27 +28 @@
-@@ -2531,6 +2531,10 @@ static int bnxt_free_one_vnic(struct bnxt *bp, uint16_t vnic_id)
+@@ -1952,6 +1952,10 @@ static int bnxt_free_one_vnic(struct bnxt *bp, uint16_t vnic_id)

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

* [dpdk-stable] patch 'net/bnxt: fix link state operations' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (52 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/bnxt: fix RSS context cleanup' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/bnxt: fix Rx buffer posting' " Christian Ehrhardt
                   ` (134 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/85592e852a88531f88939d17fe4411ef02f38dec

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 85592e852a88531f88939d17fe4411ef02f38dec 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

[ 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 59f66ce539..1ab07ed826 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -919,6 +919,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)
@@ -932,6 +935,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.708806772 +0200
+++ 0055-net-bnxt-fix-link-state-operations.patch	2021-05-17 17:40:29.195809666 +0200
@@ -1 +1 @@
-From 586d9da38aaa19bfe2e804c4038c3d0ec0a3ef99 Mon Sep 17 00:00:00 2001
+From 85592e852a88531f88939d17fe4411ef02f38dec Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 586d9da38aaa19bfe2e804c4038c3d0ec0a3ef99 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index ff92f999db..4bdc8223d3 100644
+index 59f66ce539..1ab07ed826 100644
@@ -24 +25 @@
-@@ -1268,6 +1268,9 @@ static int bnxt_dev_set_link_up_op(struct rte_eth_dev *eth_dev)
+@@ -919,6 +919,9 @@ static int bnxt_dev_set_link_up_op(struct rte_eth_dev *eth_dev)
@@ -31 +32 @@
- 	if (!bp->link_info->link_up)
+ 	if (!bp->link_info.link_up)
@@ -34 +35 @@
-@@ -1281,6 +1284,9 @@ static int bnxt_dev_set_link_down_op(struct rte_eth_dev *eth_dev)
+@@ -932,6 +935,9 @@ static int bnxt_dev_set_link_down_op(struct rte_eth_dev *eth_dev)
@@ -43 +44 @@
- 	bp->link_info->link_up = 0;
+ 	bp->link_info.link_up = 0;

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

* [dpdk-stable] patch 'net/bnxt: fix Rx buffer posting' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (53 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/bnxt: fix link state operations' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/bnxt: fix Tx length hint threshold' " Christian Ehrhardt
                   ` (133 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From b3037f1170151407e8e7750bf593954e07ec09f4 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

[ 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 668b6aae9a..dcdde44c03 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -654,9 +654,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 || 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 d5b7387144..387ab0b1e4 100644
--- a/drivers/net/bnxt/bnxt_rxr.h
+++ b/drivers/net/bnxt/bnxt_rxr.h
@@ -169,8 +169,6 @@ static inline uint16_t bnxt_tpa_start_agg_id(struct bnxt *bp,
 	 ((rxcmp1)->errors_v2 & \
 	  rte_cpu_to_le_32(RX_PKT_CMPL_ERRORS_L4_CS_ERROR))
 
-#define BNXT_RX_POST_THRESH	32
-
 enum pkt_hash_types {
 	PKT_HASH_TYPE_NONE,	/* Undefined type */
 	PKT_HASH_TYPE_L2,	/* Input: src_MAC, dest_MAC */
-- 
2.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.744664037 +0200
+++ 0056-net-bnxt-fix-Rx-buffer-posting.patch	2021-05-17 17:40:29.195809666 +0200
@@ -1 +1 @@
-From bb4f70d275045647db78df48aa1f2456c37cf5fd Mon Sep 17 00:00:00 2001
+From b3037f1170151407e8e7750bf593954e07ec09f4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bb4f70d275045647db78df48aa1f2456c37cf5fd ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -28 +29 @@
-index c72545ada7..7179c6cb30 100644
+index 668b6aae9a..dcdde44c03 100644
@@ -31 +32 @@
-@@ -1018,9 +1018,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+@@ -654,9 +654,6 @@ uint16_t bnxt_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
@@ -33 +34 @@
- 		if (nb_rx_pkts == nb_pkts || nb_rep_rx_pkts == nb_pkts || evt)
+ 		if (nb_rx_pkts == nb_pkts || evt)
@@ -37 +38 @@
--			bnxt_db_write(&rxr->rx_db, rxr->rx_raw_prod);
+-			bnxt_db_write(&rxr->rx_db, rxr->rx_prod);
@@ -42 +43 @@
-index a6fdd7767a..b43256e03e 100644
+index d5b7387144..387ab0b1e4 100644
@@ -45,3 +46,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)
+@@ -169,8 +169,6 @@ static inline uint16_t bnxt_tpa_start_agg_id(struct bnxt *bp,
+ 	 ((rxcmp1)->errors_v2 & \
+ 	  rte_cpu_to_le_32(RX_PKT_CMPL_ERRORS_L4_CS_ERROR))
@@ -51,3 +52,3 @@
- /* Number of descriptors to process per inner loop in vector mode. */
- #define RTE_BNXT_DESCS_PER_LOOP		4U
- 
+ enum pkt_hash_types {
+ 	PKT_HASH_TYPE_NONE,	/* Undefined type */
+ 	PKT_HASH_TYPE_L2,	/* Input: src_MAC, dest_MAC */

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

* [dpdk-stable] patch 'net/bnxt: fix Tx length hint threshold' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (54 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/bnxt: fix Rx buffer posting' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/bnxt: fix handling of null flow mask' " Christian Ehrhardt
                   ` (132 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Ajit Khaparde, Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/67992449c0a4dcd5140b8d10eecd40b9bc656c8a

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 67992449c0a4dcd5140b8d10eecd40b9bc656c8a 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

[ 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 9a18e8f6f7..a3543e7cea 100644
--- a/drivers/net/bnxt/bnxt_txr.c
+++ b/drivers/net/bnxt/bnxt_txr.c
@@ -176,7 +176,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.776467652 +0200
+++ 0057-net-bnxt-fix-Tx-length-hint-threshold.patch	2021-05-17 17:40:29.195809666 +0200
@@ -1 +1 @@
-From 74f2172177a0556348f312b2d88d9ad5f5e298cc Mon Sep 17 00:00:00 2001
+From 67992449c0a4dcd5140b8d10eecd40b9bc656c8a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 74f2172177a0556348f312b2d88d9ad5f5e298cc ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 65355fb040..27459960de 100644
+index 9a18e8f6f7..a3543e7cea 100644
@@ -23 +24 @@
-@@ -187,7 +187,7 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,
+@@ -176,7 +176,7 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt,

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

* [dpdk-stable] patch 'net/bnxt: fix handling of null flow mask' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (55 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/bnxt: fix Tx length hint threshold' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/qede: reduce log verbosity' " Christian Ehrhardt
                   ` (131 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/919272fe90a0c072de83f8c7b6d82e38cfa2959d

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 919272fe90a0c072de83f8c7b6d82e38cfa2959d 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

[ 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 f069e5f56a..fea35f53f8 100644
--- a/drivers/net/bnxt/bnxt_flow.c
+++ b/drivers/net/bnxt/bnxt_flow.c
@@ -185,11 +185,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.
@@ -278,7 +282,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,
@@ -321,11 +330,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 ||
@@ -382,11 +395,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 ||
@@ -434,11 +451,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 ||
@@ -479,11 +500,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.811026635 +0200
+++ 0058-net-bnxt-fix-handling-of-null-flow-mask.patch	2021-05-17 17:40:29.195809666 +0200
@@ -1 +1 @@
-From dea1afc71ffce08fccef2d49f09f6ad874c433c5 Mon Sep 17 00:00:00 2001
+From 919272fe90a0c072de83f8c7b6d82e38cfa2959d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dea1afc71ffce08fccef2d49f09f6ad874c433c5 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index a8f5d91fc4..e3906b4779 100644
+index f069e5f56a..fea35f53f8 100644
@@ -22 +23 @@
-@@ -188,11 +188,15 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
+@@ -185,11 +185,15 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
@@ -40 +41 @@
-@@ -281,7 +285,12 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
+@@ -278,7 +282,12 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
@@ -54 +55 @@
-@@ -324,11 +333,15 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
+@@ -321,11 +330,15 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
@@ -72 +73 @@
-@@ -385,11 +398,15 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
+@@ -382,11 +395,15 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
@@ -90 +91 @@
-@@ -437,11 +454,15 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
+@@ -434,11 +451,15 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
@@ -108 +109 @@
-@@ -482,11 +503,15 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
+@@ -479,11 +500,15 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,

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

* [dpdk-stable] patch 'net/qede: reduce log verbosity' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (56 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/bnxt: fix handling of null flow mask' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/qede: accept bigger RSS table' " Christian Ehrhardt
                   ` (130 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Igor Russkikh; +Cc: Devendra Singh Rawat, Rasesh Mody, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/2cb101bd9ff7042b3e43383832ebcde6ebf488a3

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 2cb101bd9ff7042b3e43383832ebcde6ebf488a3 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

[ 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.843810709 +0200
+++ 0059-net-qede-reduce-log-verbosity.patch	2021-05-17 17:40:29.199809697 +0200
@@ -1 +1 @@
-From 218d54849f0707347d6956f8f1c97017c6b6ac08 Mon Sep 17 00:00:00 2001
+From 2cb101bd9ff7042b3e43383832ebcde6ebf488a3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 218d54849f0707347d6956f8f1c97017c6b6ac08 ]
+
@@ -11,2 +12,0 @@
-
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/qede: accept bigger RSS table' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (57 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/qede: reduce log verbosity' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/i40e: fix input set field mask' " Christian Ehrhardt
                   ` (129 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Igor Russkikh; +Cc: Rasesh Mody, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/95c2cf40898ac03de1e35053726d7c3179d6ecf3

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 95c2cf40898ac03de1e35053726d7c3179d6ecf3 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

[ 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 6f2f0051f6..0be9c5a211 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -2049,8 +2049,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.877820417 +0200
+++ 0060-net-qede-accept-bigger-RSS-table.patch	2021-05-17 17:40:29.199809697 +0200
@@ -1 +1 @@
-From 6ceb7ab83f168fa6b8e90e4bd5a1392de1a48c70 Mon Sep 17 00:00:00 2001
+From 95c2cf40898ac03de1e35053726d7c3179d6ecf3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6ceb7ab83f168fa6b8e90e4bd5a1392de1a48c70 ]
+
@@ -14,2 +15,0 @@
-Cc: stable@dpdk.org
-
@@ -23 +23 @@
-index ab5f5b1065..bfd38a9772 100644
+index 6f2f0051f6..0be9c5a211 100644
@@ -26 +26 @@
-@@ -2139,8 +2139,10 @@ int qede_rss_hash_update(struct rte_eth_dev *eth_dev,
+@@ -2049,8 +2049,10 @@ int qede_rss_hash_update(struct rte_eth_dev *eth_dev,

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

* [dpdk-stable] patch 'net/i40e: fix input set field mask' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (58 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/qede: accept bigger RSS table' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/ice/base: fix memory allocation for MAC addresses' " Christian Ehrhardt
                   ` (128 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Lingli Chen, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ce1c16ab2255d945f6f493539b7d3e71128d0e76 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

[ 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 2e23631211..79558c8aad 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -201,12 +201,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
@@ -219,6 +219,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);
@@ -9628,49 +9647,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;
@@ -9724,7 +9810,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;
@@ -9829,7 +9915,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 91d6830a3c..7c97c609f3 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -1276,8 +1276,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 ed2565e88f..e8a52bdb76 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2201,7 +2201,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.913775418 +0200
+++ 0061-net-i40e-fix-input-set-field-mask.patch	2021-05-17 17:40:29.211809791 +0200
@@ -1 +1 @@
-From 2a2fd19d46e598a6816be8f81aa62ec372fd495d Mon Sep 17 00:00:00 2001
+From ce1c16ab2255d945f6f493539b7d3e71128d0e76 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2a2fd19d46e598a6816be8f81aa62ec372fd495d ]
+
@@ -35 +36,0 @@
-Cc: stable@dpdk.org
@@ -46 +47 @@
-index 9b86bcdc69..09a1402a3f 100644
+index 2e23631211..79558c8aad 100644
@@ -49 +50 @@
-@@ -202,12 +202,12 @@
+@@ -201,12 +201,12 @@
@@ -68 +69 @@
-@@ -220,6 +220,25 @@
+@@ -219,6 +219,25 @@
@@ -94 +95 @@
-@@ -9424,49 +9443,116 @@ i40e_translate_input_set_reg(enum i40e_mac_type type, uint64_t input)
+@@ -9628,49 +9647,116 @@ i40e_translate_input_set_reg(enum i40e_mac_type type, uint64_t input)
@@ -239 +240 @@
-@@ -9520,7 +9606,7 @@ i40e_filter_input_set_init(struct i40e_pf *pf)
+@@ -9724,7 +9810,7 @@ i40e_filter_input_set_init(struct i40e_pf *pf)
@@ -248 +249 @@
-@@ -9600,7 +9686,7 @@ i40e_set_hash_inset(struct i40e_hw *hw, uint64_t input_set,
+@@ -9829,7 +9915,7 @@ i40e_hash_filter_inset_select(struct i40e_hw *hw,
@@ -258 +259 @@
-index 1e8f5d3a87..faf6896fbc 100644
+index 91d6830a3c..7c97c609f3 100644
@@ -261,2 +262,2 @@
-@@ -1458,8 +1458,8 @@ void i40e_set_symmetric_hash_enable_per_port(struct i40e_hw *hw,
- 					     uint8_t enable);
+@@ -1276,8 +1276,8 @@ bool is_i40evf_supported(struct rte_eth_dev *dev);
+ 
@@ -273 +274 @@
-index 3e514d5f38..1ee8959e56 100644
+index ed2565e88f..e8a52bdb76 100644
@@ -276 +277 @@
-@@ -2269,7 +2269,7 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
+@@ -2201,7 +2201,7 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,

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

* [dpdk-stable] patch 'net/ice/base: fix memory allocation for MAC addresses' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (59 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/i40e: fix input set field mask' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/mlx5: support RSS expansion for IPv6 GRE' " Christian Ehrhardt
                   ` (127 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Ferruh Yigit, Qiming Yang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From f5b22356fcbeace247c0cac0ba5e074cc1a08d3a 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

[ 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 2fc3b71544..00a6c7bcb3 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -795,7 +795,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.960001590 +0200
+++ 0062-net-ice-base-fix-memory-allocation-for-MAC-addresses.patch	2021-05-17 17:40:29.211809791 +0200
@@ -1 +1 @@
-From 78b52e3878c6496748cba2028f8cb9080435cb46 Mon Sep 17 00:00:00 2001
+From f5b22356fcbeace247c0cac0ba5e074cc1a08d3a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 78b52e3878c6496748cba2028f8cb9080435cb46 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 5a1190d50e..3e85e5f629 100644
+index 2fc3b71544..00a6c7bcb3 100644
@@ -24 +25 @@
-@@ -809,7 +809,7 @@ ice_init_mac_address(struct rte_eth_dev *dev)
+@@ -795,7 +795,7 @@ ice_init_mac_address(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/mlx5: support RSS expansion for IPv6 GRE' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (60 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/ice/base: fix memory allocation for MAC addresses' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/hns3: fix reporting undefined speed' " Christian Ehrhardt
                   ` (126 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Xiaoyu Min; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From bfbdb7ac71858ac9af7217dd922f52b8f3115f57 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

[ 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 2311f424e0..7925f24243 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -149,7 +149,8 @@ static const struct rte_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,
@@ -177,7 +178,8 @@ static const struct rte_flow_expand_node mlx5_support_expansion[] = {
 		.type = RTE_FLOW_ITEM_TYPE_VXLAN_GPE,
 	},
 	[MLX5_EXPANSION_GRE] = {
-		.next = RTE_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4),
+		.next = RTE_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4
+						  MLX5_EXPANSION_IPV6),
 		.type = RTE_FLOW_ITEM_TYPE_GRE,
 	},
 	[MLX5_EXPANSION_MPLS] = {
-- 
2.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:31.997656334 +0200
+++ 0063-net-mlx5-support-RSS-expansion-for-IPv6-GRE.patch	2021-05-17 17:40:29.215809823 +0200
@@ -1 +1 @@
-From 048f0d45e3420cc3569f60e2d9b5ee447ae34fd1 Mon Sep 17 00:00:00 2001
+From bfbdb7ac71858ac9af7217dd922f52b8f3115f57 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 048f0d45e3420cc3569f60e2d9b5ee447ae34fd1 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index d46fc333d1..de4e4a374a 100644
+index 2311f424e0..7925f24243 100644
@@ -26 +27 @@
-@@ -499,7 +499,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+@@ -149,7 +149,8 @@ static const struct rte_flow_expand_node mlx5_support_expansion[] = {
@@ -36 +37 @@
-@@ -527,7 +528,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
+@@ -177,7 +178,8 @@ static const struct rte_flow_expand_node mlx5_support_expansion[] = {
@@ -40,2 +41,2 @@
--		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4),
-+		.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,
+-		.next = RTE_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4),
++		.next = RTE_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4

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

* [dpdk-stable] patch 'net/hns3: fix reporting undefined speed' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (61 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/mlx5: support RSS expansion for IPv6 GRE' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/hinic: fix crash in secondary process' " Christian Ehrhardt
                   ` (125 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/606602aa104f331467742e5d96d03b6952ce8cd8

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 606602aa104f331467742e5d96d03b6952ce8cd8 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

[ 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 66be58dc26..98bc37d294 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2578,7 +2578,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 c936114075..0c21a20740 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -1695,7 +1695,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.043049196 +0200
+++ 0064-net-hns3-fix-reporting-undefined-speed.patch	2021-05-17 17:40:29.219809853 +0200
@@ -1 +1 @@
-From b6579e3db794be36637a66e009199a1e7451e995 Mon Sep 17 00:00:00 2001
+From 606602aa104f331467742e5d96d03b6952ce8cd8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b6579e3db794be36637a66e009199a1e7451e995 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index d392f6d109..73b96c18d1 100644
+index 66be58dc26..98bc37d294 100644
@@ -27 +28 @@
-@@ -2725,7 +2725,10 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev,
+@@ -2578,7 +2578,10 @@ hns3_dev_link_update(struct rte_eth_dev *eth_dev,
@@ -40 +41 @@
-index 30788f5c32..6c3ddcc50e 100644
+index c936114075..0c21a20740 100644
@@ -43 +44 @@
-@@ -2123,7 +2123,10 @@ hns3vf_dev_link_update(struct rte_eth_dev *eth_dev,
+@@ -1695,7 +1695,10 @@ hns3vf_dev_link_update(struct rte_eth_dev *eth_dev,

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

* [dpdk-stable] patch 'net/hinic: fix crash in secondary process' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (62 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/hns3: fix reporting undefined speed' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'app/testpmd: fix Tx/Rx descriptor query error log' " Christian Ehrhardt
                   ` (124 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Guoyang Zhou; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From be86991e714876ff68ec891378b75409c88197ba 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

[ 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 473a273b6b..ac42ca5f8e 100644
--- a/drivers/net/hinic/base/hinic_compat.h
+++ b/drivers/net/hinic/base/hinic_compat.h
@@ -203,6 +203,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)
 {
@@ -257,24 +258,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 a0499da7d4..89ee5b7a78 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -2972,6 +2972,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;
@@ -2985,6 +2989,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.081105989 +0200
+++ 0065-net-hinic-fix-crash-in-secondary-process.patch	2021-05-17 17:40:29.219809853 +0200
@@ -1 +1 @@
-From 4c670dfaa417bc5604c9c58b505a74e2725acdb2 Mon Sep 17 00:00:00 2001
+From be86991e714876ff68ec891378b75409c88197ba Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4c670dfaa417bc5604c9c58b505a74e2725acdb2 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 6dd210ec06..aea332046e 100644
+index 473a273b6b..ac42ca5f8e 100644
@@ -23 +24 @@
-@@ -171,6 +171,7 @@ static inline u32 readl(const volatile void *addr)
+@@ -203,6 +203,7 @@ static inline u32 readl(const volatile void *addr)
@@ -31 +32 @@
-@@ -225,24 +226,14 @@ static inline int hinic_mutex_destroy(pthread_mutex_t *pthreadmutex)
+@@ -257,24 +258,14 @@ static inline int hinic_mutex_destroy(pthread_mutex_t *pthreadmutex)
@@ -64 +65 @@
-index 2352dd1615..b5a36a863b 100644
+index a0499da7d4..89ee5b7a78 100644
@@ -67,2 +68,2 @@
-@@ -3063,6 +3063,10 @@ static const struct eth_dev_ops hinic_pmd_vf_ops = {
- 	.flow_ops_get                  = hinic_dev_flow_ops_get,
+@@ -2972,6 +2972,10 @@ static const struct eth_dev_ops hinic_pmd_vf_ops = {
+ 	.filter_ctrl                   = hinic_dev_filter_ctrl,
@@ -78 +79 @@
-@@ -3077,6 +3081,7 @@ static int hinic_func_init(struct rte_eth_dev *eth_dev)
+@@ -2985,6 +2989,7 @@ static int hinic_func_init(struct rte_eth_dev *eth_dev)

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

* [dpdk-stable] patch 'app/testpmd: fix Tx/Rx descriptor query error log' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (63 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/hinic: fix crash in secondary process' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/i40e: fix parsing packet type for NEON' " Christian Ehrhardt
                   ` (123 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Hongbo Zheng; +Cc: Min Hu, Xiaoyun Li, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/826f3237cc76e9ba385c0f1a26508a2e47de247e

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 826f3237cc76e9ba385c0f1a26508a2e47de247e 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

[ 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 cba219625f..ecf36a7c67 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -19036,7 +19036,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)
@@ -19049,7 +19050,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.120479372 +0200
+++ 0066-app-testpmd-fix-Tx-Rx-descriptor-query-error-log.patch	2021-05-17 17:40:29.231809948 +0200
@@ -1 +1 @@
-From 0e8f3489940aae7a29112b0de745bb5205239c83 Mon Sep 17 00:00:00 2001
+From 826f3237cc76e9ba385c0f1a26508a2e47de247e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0e8f3489940aae7a29112b0de745bb5205239c83 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 14110eb2e4..f44116b087 100644
+index cba219625f..ecf36a7c67 100644
@@ -22 +23 @@
-@@ -16629,7 +16629,8 @@ cmd_show_rx_tx_desc_status_parsed(void *parsed_result,
+@@ -19036,7 +19036,8 @@ cmd_show_rx_tx_desc_status_parsed(void *parsed_result,
@@ -32 +33 @@
-@@ -16642,7 +16643,8 @@ cmd_show_rx_tx_desc_status_parsed(void *parsed_result,
+@@ -19049,7 +19050,8 @@ cmd_show_rx_tx_desc_status_parsed(void *parsed_result,

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

* [dpdk-stable] patch 'net/i40e: fix parsing packet type for NEON' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (64 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'app/testpmd: fix Tx/Rx descriptor query error log' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/i40e: announce request queue capability in PF' " Christian Ehrhardt
                   ` (122 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Feifei Wang; +Cc: Ruifeng Wang, Kathleen Capella, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From c1d0fd909494e440986cb804087e9346d6788538 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

[ 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 5cac418cf0..695c5e362e 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_neon.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c
@@ -309,10 +309,16 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 		/* 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);
@@ -340,10 +346,16 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
 		/* 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.166861334 +0200
+++ 0067-net-i40e-fix-parsing-packet-type-for-NEON.patch	2021-05-17 17:40:29.231809948 +0200
@@ -1 +1 @@
-From 31d7c6f7d424c533b0a4dd9b4408b814ac7852f1 Mon Sep 17 00:00:00 2001
+From c1d0fd909494e440986cb804087e9346d6788538 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 31d7c6f7d424c533b0a4dd9b4408b814ac7852f1 ]
+
@@ -26 +27,0 @@
-Cc: stable@dpdk.org
@@ -36 +37 @@
-index da16dfc386..1f5539bda8 100644
+index 5cac418cf0..695c5e362e 100644
@@ -39 +40 @@
-@@ -310,10 +310,16 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *__rte_restrict rxq,
+@@ -309,10 +309,16 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,
@@ -58 +59 @@
-@@ -341,10 +347,16 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *__rte_restrict rxq,
+@@ -340,10 +346,16 @@ _recv_raw_pkts_vec(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts,

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

* [dpdk-stable] patch 'net/i40e: announce request queue capability in PF' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (65 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/i40e: fix parsing packet type for NEON' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/iavf: fix TSO max segment size' " Christian Ehrhardt
                   ` (121 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Robin Zhang; +Cc: Jeff Guo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ce3e95400fba81aba11c0de9e948c68bf5574632 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

[ 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 7bf1e79410..50c9930198 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.201905290 +0200
+++ 0068-net-i40e-announce-request-queue-capability-in-PF.patch	2021-05-17 17:40:29.235809979 +0200
@@ -1 +1 @@
-From 918e90b96039cd05f9271a2d80d9c000b42f5c44 Mon Sep 17 00:00:00 2001
+From ce3e95400fba81aba11c0de9e948c68bf5574632 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 918e90b96039cd05f9271a2d80d9c000b42f5c44 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index f3d6d899f6..9804ed4253 100644
+index 7bf1e79410..50c9930198 100644

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

* [dpdk-stable] patch 'net/iavf: fix TSO max segment size' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (66 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/i40e: announce request queue capability in PF' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/ixgbe: fix RSS RETA being reset after port start' " Christian Ehrhardt
                   ` (120 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Beilei Xing, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From bd99b278f18e6957d2b0cb2fe6ae15c74f0772f8 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

[ 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 60d02c521f..c3baf93861 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.236328788 +0200
+++ 0069-net-iavf-fix-TSO-max-segment-size.patch	2021-05-17 17:40:29.235809979 +0200
@@ -1 +1 @@
-From 6d05fc905df216b78e4e3db935927a53a638c6d0 Mon Sep 17 00:00:00 2001
+From bd99b278f18e6957d2b0cb2fe6ae15c74f0772f8 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 6d05fc905df216b78e4e3db935927a53a638c6d0 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 5377459eae..4fbd847034 100644
+index 60d02c521f..c3baf93861 100644

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

* [dpdk-stable] patch 'net/ixgbe: fix RSS RETA being reset after port start' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (67 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/iavf: fix TSO max segment size' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'vdpa/ifc: check PCI config read' " Christian Ehrhardt
                   ` (119 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Murphy Yang; +Cc: Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 4e5ad74e198946e4d38a095ad7795526886a7bd4 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

[ 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 dcd7291b97..e7ddb237b1 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -5056,11 +5056,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.270994329 +0200
+++ 0070-net-ixgbe-fix-RSS-RETA-being-reset-after-port-start.patch	2021-05-17 17:40:29.239810012 +0200
@@ -1 +1 @@
-From 8b628c22b38f7a81b6cba677aaabd140d8583ae5 Mon Sep 17 00:00:00 2001
+From 4e5ad74e198946e4d38a095ad7795526886a7bd4 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 8b628c22b38f7a81b6cba677aaabd140d8583ae5 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index be9c438c10..31faff066c 100644
+index dcd7291b97..e7ddb237b1 100644
@@ -29 +30 @@
-@@ -5013,11 +5013,19 @@ ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev,
+@@ -5056,11 +5056,19 @@ ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'vdpa/ifc: check PCI config read' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (68 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/ixgbe: fix RSS RETA being reset after port start' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'examples/vhost: check memory table query' " Christian Ehrhardt
                   ` (118 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Xiao Wang; +Cc: Chenbo Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 8e6f032a5812e031705d5c4050d0459e383b40a9 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

[ 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/net/ifc/base/ifcvf.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ifc/base/ifcvf.c b/drivers/net/ifc/base/ifcvf.c
index 3c0b2dff66..721cb1da8a 100644
--- a/drivers/net/ifc/base/ifcvf.c
+++ b/drivers/net/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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.311580031 +0200
+++ 0071-vdpa-ifc-check-PCI-config-read.patch	2021-05-17 17:40:29.239810012 +0200
@@ -1 +1 @@
-From 629d75653bc584a2927a87566bf00beea661f91b Mon Sep 17 00:00:00 2001
+From 8e6f032a5812e031705d5c4050d0459e383b40a9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 629d75653bc584a2927a87566bf00beea661f91b ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
- drivers/vdpa/ifc/base/ifcvf.c | 7 ++++++-
+ drivers/net/ifc/base/ifcvf.c | 7 ++++++-
@@ -18 +19 @@
-diff --git a/drivers/vdpa/ifc/base/ifcvf.c b/drivers/vdpa/ifc/base/ifcvf.c
+diff --git a/drivers/net/ifc/base/ifcvf.c b/drivers/net/ifc/base/ifcvf.c
@@ -20,2 +21,2 @@
---- a/drivers/vdpa/ifc/base/ifcvf.c
-+++ b/drivers/vdpa/ifc/base/ifcvf.c
+--- a/drivers/net/ifc/base/ifcvf.c
++++ b/drivers/net/ifc/base/ifcvf.c

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

* [dpdk-stable] patch 'examples/vhost: check memory table query' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (69 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'vdpa/ifc: check PCI config read' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'vhost: fix split ring potential buffer overflow' " Christian Ehrhardt
                   ` (117 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Chenbo Xia; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 5dfb1c2f83252a3b3eb144fedacb2b42cc83ff13 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

[ 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.345285417 +0200
+++ 0072-examples-vhost-check-memory-table-query.patch	2021-05-17 17:40:29.239810012 +0200
@@ -1 +1 @@
-From 1739f814258cf7f4e25d55710918fa0ecc4d828e Mon Sep 17 00:00:00 2001
+From 5dfb1c2f83252a3b3eb144fedacb2b42cc83ff13 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1739f814258cf7f4e25d55710918fa0ecc4d828e ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 64bf3d19ff..9064fc3a82 100644
+index 8ea6b36d59..28e4b00960 100644

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

* [dpdk-stable] patch 'vhost: fix split ring potential buffer overflow' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (70 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'examples/vhost: check memory table query' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'vhost: fix packed " Christian Ehrhardt
                   ` (116 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Marvin Liu; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From a6eda732ae0d400cd910b7eaeb4fbcdb07d2abb0 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

[ 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 f397e9a13a..32d341fb70 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -546,10 +546,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.376875073 +0200
+++ 0073-vhost-fix-split-ring-potential-buffer-overflow.patch	2021-05-17 17:40:29.239810012 +0200
@@ -1 +1 @@
-From 134228ca39ef0cfe325bc5f1d0df38c733ec9752 Mon Sep 17 00:00:00 2001
+From a6eda732ae0d400cd910b7eaeb4fbcdb07d2abb0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 134228ca39ef0cfe325bc5f1d0df38c733ec9752 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
-index 3d8e29df09..852b4ec9f5 100644
+index f397e9a13a..32d341fb70 100644
@@ -27 +28 @@
-@@ -548,10 +548,11 @@ fill_vec_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -546,10 +546,11 @@ fill_vec_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,

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

* [dpdk-stable] patch 'vhost: fix packed ring potential buffer overflow' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (71 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'vhost: fix split ring potential buffer overflow' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'vhost: fix batch dequeue " Christian Ehrhardt
                   ` (115 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Marvin Liu; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/5075e41779561991f7cf5adbcee149a367deb7a0

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 5075e41779561991f7cf5adbcee149a367deb7a0 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

[ 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 32d341fb70..d93c448811 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -667,9 +667,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;
 	}
@@ -690,6 +691,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;
@@ -722,11 +724,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.413591888 +0200
+++ 0074-vhost-fix-packed-ring-potential-buffer-overflow.patch	2021-05-17 17:40:29.243810043 +0200
@@ -1 +1 @@
-From 93ed2f49dec5bee1dfc221c8644c22b351496776 Mon Sep 17 00:00:00 2001
+From 5075e41779561991f7cf5adbcee149a367deb7a0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 93ed2f49dec5bee1dfc221c8644c22b351496776 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 852b4ec9f5..d07b30ed7f 100644
+index 32d341fb70..d93c448811 100644
@@ -23 +24 @@
-@@ -669,9 +669,10 @@ fill_vec_buf_packed_indirect(struct virtio_net *dev,
+@@ -667,9 +667,10 @@ fill_vec_buf_packed_indirect(struct virtio_net *dev,
@@ -36 +37 @@
-@@ -692,6 +693,7 @@ fill_vec_buf_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -690,6 +691,7 @@ fill_vec_buf_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,
@@ -44 +45 @@
-@@ -724,11 +726,12 @@ fill_vec_buf_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -722,11 +724,12 @@ fill_vec_buf_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,

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

* [dpdk-stable] patch 'vhost: fix batch dequeue potential buffer overflow' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (72 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'vhost: fix packed " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'examples/vhost_crypto: remove unused short option' " Christian Ehrhardt
                   ` (114 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Marvin Liu; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ec59dc5b89ecc7806b20e1a72e6246106072dc65 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

[ 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 d93c448811..a01a5c8d99 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -1865,7 +1865,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.449527103 +0200
+++ 0075-vhost-fix-batch-dequeue-potential-buffer-overflow.patch	2021-05-17 17:40:29.243810043 +0200
@@ -1 +1 @@
-From af584d21bf66047e36ad3b9ccdcfd83ecdccd5db Mon Sep 17 00:00:00 2001
+From ec59dc5b89ecc7806b20e1a72e6246106072dc65 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit af584d21bf66047e36ad3b9ccdcfd83ecdccd5db ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index d07b30ed7f..7f621fb6dd 100644
+index d93c448811..a01a5c8d99 100644
@@ -23 +24 @@
-@@ -2318,7 +2318,7 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev,
+@@ -1865,7 +1865,7 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev,

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

* [dpdk-stable] patch 'examples/vhost_crypto: remove unused short option' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (73 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'vhost: fix batch dequeue " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'doc: fix sphinx rtd theme import in GHA' " Christian Ehrhardt
                   ` (113 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Ibtisam Tariq; +Cc: Fan Zhang, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From d00a31fe2e4d1f18c154220d01fad00aadc6f684 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

[ 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 405d16966d..7973b57564 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.484234290 +0200
+++ 0076-examples-vhost_crypto-remove-unused-short-option.patch	2021-05-17 17:40:29.243810043 +0200
@@ -1 +1 @@
-From dd0946f975bac65ab680adcd389295cc56ad78e1 Mon Sep 17 00:00:00 2001
+From d00a31fe2e4d1f18c154220d01fad00aadc6f684 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dd0946f975bac65ab680adcd389295cc56ad78e1 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index efae997815..7ed38fedf2 100644
+index 405d16966d..7973b57564 100644
@@ -23 +24 @@
-@@ -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 +32 @@
- 		if (opt == '?') {
+ 		switch (opt) {

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

* [dpdk-stable] patch 'doc: fix sphinx rtd theme import in GHA' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (74 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'examples/vhost_crypto: remove unused short option' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'power: do not skip saving original P-state governor' " Christian Ehrhardt
                   ` (112 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: David Marchand; +Cc: Aaron Conole, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From df6515ef82f9dfc0aaceca346582c01b45090904 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

[ 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 c1a82be95b..be02c2ba20 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -25,7 +25,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: pip install sphinx_rtd_theme')
-- 
2.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.517367246 +0200
+++ 0077-doc-fix-sphinx-rtd-theme-import-in-GHA.patch	2021-05-17 17:40:29.243810043 +0200
@@ -1 +1 @@
-From aa9cb78f66c53728593c1f65f69f2bbc7ca4a4a9 Mon Sep 17 00:00:00 2001
+From df6515ef82f9dfc0aaceca346582c01b45090904 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit aa9cb78f66c53728593c1f65f69f2bbc7ca4a4a9 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index aceeb62a4f..ec59aeae7e 100644
+index c1a82be95b..be02c2ba20 100644
@@ -28 +29 @@
-@@ -20,7 +20,6 @@ try:
+@@ -25,7 +25,6 @@ try:
@@ -35 +36 @@
-           'layout: https://sphinx-rtd-theme.readthedocs.io/',
+           'layout: pip install sphinx_rtd_theme')

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

* [dpdk-stable] patch 'power: do not skip saving original P-state governor' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (75 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'doc: fix sphinx rtd theme import in GHA' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'mem: fix freeing segments in --huge-unlink mode' " Christian Ehrhardt
                   ` (111 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: Reshma Pattan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/500cef51e15ace6e16f628e4c98f37043f9907d3

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 500cef51e15ace6e16f628e4c98f37043f9907d3 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

[ 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 fa16b44146..103c5375e9 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.557947750 +0200
+++ 0078-power-do-not-skip-saving-original-P-state-governor.patch	2021-05-17 17:40:29.243810043 +0200
@@ -1 +1 @@
-From 190f38773acffc5cc822f4347b38ce04257cd044 Mon Sep 17 00:00:00 2001
+From 500cef51e15ace6e16f628e4c98f37043f9907d3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 190f38773acffc5cc822f4347b38ce04257cd044 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index c4639e4b8a..1cb0e4d917 100644
+index fa16b44146..103c5375e9 100644
@@ -29 +30 @@
-@@ -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 +40 @@
-@@ -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] 191+ messages in thread

* [dpdk-stable] patch 'mem: fix freeing segments in --huge-unlink mode' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (76 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'power: do not skip saving original P-state governor' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'service: clean references to removed symbol' " Christian Ehrhardt
                   ` (110 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Roy Shterman; +Cc: Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/39b93e36e566816d84911c05acf049fb0c566157

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 39b93e36e566816d84911c05acf049fb0c566157 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

[ 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/eal_memalloc.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/lib/librte_eal/linux/eal/eal_memalloc.c b/lib/librte_eal/linux/eal/eal_memalloc.c
index 22f1ff68eb..e8b2daa66a 100644
--- a/lib/librte_eal/linux/eal/eal_memalloc.c
+++ b/lib/librte_eal/linux/eal/eal_memalloc.c
@@ -698,7 +698,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;
 
 	/* erase page data */
 	memset(ms->addr, 0, ms->len);
@@ -713,17 +712,8 @@ free_seg(struct rte_memseg *ms, struct hugepage_info *hi,
 	if (madvise(ms->addr, ms->len, MADV_DONTDUMP) != 0)
 		RTE_LOG(DEBUG, EAL, "madvise failed: %s\n", strerror(errno));
 
-	exit_early = false;
-
 	/* if we're using anonymous hugepages, nothing to be done */
-	if (internal_config.in_memory && !memfd_create_supported)
-		exit_early = true;
-
-	/* if we've already unlinked the page, nothing needs to be done */
-	if (!internal_config.in_memory && internal_config.hugepage_unlink)
-		exit_early = true;
-
-	if (exit_early) {
+	if (internal_config.in_memory && !memfd_create_supported) {
 		memset(ms, 0, sizeof(*ms));
 		return 0;
 	}
@@ -749,7 +739,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_config.in_memory) {
+		if (!internal_config.in_memory && !internal_config.hugepage_unlink) {
 			ret = lock(fd, LOCK_EX);
 			if (ret >= 0) {
 				/* no one else is using this page */
-- 
2.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.595603438 +0200
+++ 0079-mem-fix-freeing-segments-in-huge-unlink-mode.patch	2021-05-17 17:40:29.243810043 +0200
@@ -1 +1 @@
-From edf20bd8a55192616e4a0f26c346b55ddbac1d81 Mon Sep 17 00:00:00 2001
+From 39b93e36e566816d84911c05acf049fb0c566157 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit edf20bd8a55192616e4a0f26c346b55ddbac1d81 ]
+
@@ -29 +30,0 @@
-Cc: stable@dpdk.org
@@ -34 +35 @@
- lib/librte_eal/linux/eal_memalloc.c | 14 ++------------
+ lib/librte_eal/linux/eal/eal_memalloc.c | 14 ++------------
@@ -37,5 +38,5 @@
-diff --git a/lib/librte_eal/linux/eal_memalloc.c b/lib/librte_eal/linux/eal_memalloc.c
-index 00e2662c15..0ec8542283 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,
+diff --git a/lib/librte_eal/linux/eal/eal_memalloc.c b/lib/librte_eal/linux/eal/eal_memalloc.c
+index 22f1ff68eb..e8b2daa66a 100644
+--- a/lib/librte_eal/linux/eal/eal_memalloc.c
++++ b/lib/librte_eal/linux/eal/eal_memalloc.c
+@@ -698,7 +698,6 @@ free_seg(struct rte_memseg *ms, struct hugepage_info *hi,
@@ -46,4 +46,0 @@
- 	const struct internal_config *internal_conf =
- 		eal_get_internal_configuration();
- 
-@@ -725,17 +724,8 @@ free_seg(struct rte_memseg *ms, struct hugepage_info *hi,
@@ -51 +48,5 @@
- 	eal_mem_set_dump(ms->addr, ms->len, false);
+ 	/* erase page data */
+ 	memset(ms->addr, 0, ms->len);
+@@ -713,17 +712,8 @@ free_seg(struct rte_memseg *ms, struct hugepage_info *hi,
+ 	if (madvise(ms->addr, ms->len, MADV_DONTDUMP) != 0)
+ 		RTE_LOG(DEBUG, EAL, "madvise failed: %s\n", strerror(errno));
@@ -56 +57 @@
--	if (internal_conf->in_memory && !memfd_create_supported)
+-	if (internal_config.in_memory && !memfd_create_supported)
@@ -60 +61 @@
--	if (!internal_conf->in_memory && internal_conf->hugepage_unlink)
+-	if (!internal_config.in_memory && internal_config.hugepage_unlink)
@@ -64 +65 @@
-+	if (internal_conf->in_memory && !memfd_create_supported) {
++	if (internal_config.in_memory && !memfd_create_supported) {
@@ -68 +69 @@
-@@ -761,7 +751,7 @@ free_seg(struct rte_memseg *ms, struct hugepage_info *hi,
+@@ -749,7 +739,7 @@ free_seg(struct rte_memseg *ms, struct hugepage_info *hi,
@@ -72,2 +73,2 @@
--		if (!internal_conf->in_memory) {
-+		if (!internal_conf->in_memory && !internal_conf->hugepage_unlink) {
+-		if (!internal_config.in_memory) {
++		if (!internal_config.in_memory && !internal_config.hugepage_unlink) {

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

* [dpdk-stable] patch 'service: clean references to removed symbol' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (77 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'mem: fix freeing segments in --huge-unlink mode' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'test: proceed if timer subsystem already initialized' " Christian Ehrhardt
                   ` (109 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: David Marchand; +Cc: Harry van Haaren, Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/2875a8341a35cbf0439597f954036c4d7d7871e9

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 2875a8341a35cbf0439597f954036c4d7d7871e9 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

[ 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/common/include/rte_service.h | 5 +----
 lib/librte_eal/rte_eal_version.map          | 1 -
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_service.h b/lib/librte_eal/common/include/rte_service.h
index e2d0a6dd32..b91d738de9 100644
--- a/lib/librte_eal/common/include/rte_service.h
+++ b/lib/librte_eal/common/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/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
index e38d02530c..9ff3f76a87 100644
--- a/lib/librte_eal/rte_eal_version.map
+++ b/lib/librte_eal/rte_eal_version.map
@@ -159,7 +159,6 @@ DPDK_20.0 {
 	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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.631258702 +0200
+++ 0080-service-clean-references-to-removed-symbol.patch	2021-05-17 17:40:29.247810073 +0200
@@ -1 +1 @@
-From 60e0e75b615fc94b8538a5334dffc0935864438c Mon Sep 17 00:00:00 2001
+From 2875a8341a35cbf0439597f954036c4d7d7871e9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 60e0e75b615fc94b8538a5334dffc0935864438c ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -16,2 +17,2 @@
- lib/librte_eal/include/rte_service.h | 5 +----
- lib/librte_eal/version.map           | 1 -
+ lib/librte_eal/common/include/rte_service.h | 5 +----
+ lib/librte_eal/rte_eal_version.map          | 1 -
@@ -20,4 +21,4 @@
-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
+diff --git a/lib/librte_eal/common/include/rte_service.h b/lib/librte_eal/common/include/rte_service.h
+index e2d0a6dd32..b91d738de9 100644
+--- a/lib/librte_eal/common/include/rte_service.h
++++ b/lib/librte_eal/common/include/rte_service.h
@@ -36,5 +37,5 @@
-diff --git a/lib/librte_eal/version.map b/lib/librte_eal/version.map
-index fc305c1c71..7a307e3cc9 100644
---- a/lib/librte_eal/version.map
-+++ b/lib/librte_eal/version.map
-@@ -159,7 +159,6 @@ DPDK_21 {
+diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
+index e38d02530c..9ff3f76a87 100644
+--- a/lib/librte_eal/rte_eal_version.map
++++ b/lib/librte_eal/rte_eal_version.map
+@@ -159,7 +159,6 @@ DPDK_20.0 {

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

* [dpdk-stable] patch 'test: proceed if timer subsystem already initialized' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (78 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'service: clean references to removed symbol' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'app: fix exit messages' " Christian Ehrhardt
                   ` (108 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Stanislaw Kardach; +Cc: Michal Krawczyk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From b24becd81cf89fe29d286ef6a4e50caab495be7e 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

[ 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 4736a17ff3..3e063af333 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_LIBRTE_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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.664849340 +0200
+++ 0081-test-proceed-if-timer-subsystem-already-initialized.patch	2021-05-17 17:40:29.247810073 +0200
@@ -1 +1 @@
-From 3dd7d693ff73dac58999ed7ea6b27d0adc8dc6bc Mon Sep 17 00:00:00 2001
+From b24becd81cf89fe29d286ef6a4e50caab495be7e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3dd7d693ff73dac58999ed7ea6b27d0adc8dc6bc ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 624dd48042..864523ed61 100644
+index 4736a17ff3..3e063af333 100644
@@ -32 +33 @@
- #ifdef RTE_LIB_TIMER
+ #ifdef RTE_LIBRTE_TIMER

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

* [dpdk-stable] patch 'app: fix exit messages' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (79 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'test: proceed if timer subsystem already initialized' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/hns3: fix MTU config complexity' " Christian Ehrhardt
                   ` (107 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Wisam Jaddo, Ori Kam, Bruce Richardson, Andrew Rybchenko,
	David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From b61be794c1602384eba1c1a56d8451f5b2c6e624 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas@monjalon.net>
Date: Mon, 5 Apr 2021 21:33:23 +0200
Subject: [PATCH] app: fix exit messages

[ upstream commit 487cfc24370fdb7ea843aa510d6e6d2a7212dd23 ]

Some applications were printing useless messages with rte_exit()
after showing the help. Using exit() is enough in this case.

Some applications were using a redundant printf or fprintf() before
calling rte_exit(). The messages are unified in a single rte_exit().

Some rte_exit() calls were missing a line feed or returning a wrong code.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Wisam Jaddo <wisamm@nvidia.com>
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-compress-perf/comp_perf_options_parse.c | 2 +-
 app/test-crypto-perf/cperf_options_parsing.c     | 2 +-
 app/test-pmd/parameters.c                        | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/test-compress-perf/comp_perf_options_parse.c b/app/test-compress-perf/comp_perf_options_parse.c
index 12d0a6caf0..898dd310dd 100644
--- a/app/test-compress-perf/comp_perf_options_parse.c
+++ b/app/test-compress-perf/comp_perf_options_parse.c
@@ -598,7 +598,7 @@ comp_perf_options_parse(struct comp_test_data *test_data, int argc, char **argv)
 		switch (opt) {
 		case 'h':
 			usage(argv[0]);
-			rte_exit(EXIT_SUCCESS, "Displayed help\n");
+			exit(EXIT_SUCCESS);
 			break;
 		/* long options */
 		case 0:
diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c
index 49b469781c..22bf9cd4d6 100644
--- a/app/test-crypto-perf/cperf_options_parsing.c
+++ b/app/test-crypto-perf/cperf_options_parsing.c
@@ -953,7 +953,7 @@ cperf_options_parse(struct cperf_options *options, int argc, char **argv)
 		switch (opt) {
 		case 'h':
 			usage(argv[0]);
-			rte_exit(EXIT_SUCCESS, "Displayed help\n");
+			exit(EXIT_SUCCESS);
 			break;
 		/* long options */
 		case 0:
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index a1c08a411a..9ce3b4f4be 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -694,7 +694,7 @@ launch_args_parse(int argc, char** argv)
 		case 0: /*long options */
 			if (!strcmp(lgopts[opt_idx].name, "help")) {
 				usage(argv[0]);
-				rte_exit(EXIT_SUCCESS, "Displayed help\n");
+				exit(EXIT_SUCCESS);
 			}
 #ifdef RTE_LIBRTE_CMDLINE
 			if (!strcmp(lgopts[opt_idx].name, "interactive")) {
@@ -1356,7 +1356,7 @@ launch_args_parse(int argc, char** argv)
 			break;
 		case 'h':
 			usage(argv[0]);
-			rte_exit(EXIT_SUCCESS, "Displayed help\n");
+			exit(EXIT_SUCCESS);
 			break;
 		default:
 			usage(argv[0]);
-- 
2.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.699299088 +0200
+++ 0082-app-fix-exit-messages.patch	2021-05-17 17:40:29.247810073 +0200
@@ -1 +1 @@
-From 487cfc24370fdb7ea843aa510d6e6d2a7212dd23 Mon Sep 17 00:00:00 2001
+From b61be794c1602384eba1c1a56d8451f5b2c6e624 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 487cfc24370fdb7ea843aa510d6e6d2a7212dd23 ]
+
@@ -21,6 +23,4 @@
- .../comp_perf_options_parse.c                 |  2 +-
- app/test-crypto-perf/cperf_options_parsing.c  |  2 +-
- app/test-flow-perf/main.c                     | 59 +++++++++----------
- app/test-pmd/parameters.c                     |  4 +-
- app/test-regex/main.c                         |  3 +-
- 5 files changed, 33 insertions(+), 37 deletions(-)
+ app/test-compress-perf/comp_perf_options_parse.c | 2 +-
+ app/test-crypto-perf/cperf_options_parsing.c     | 2 +-
+ app/test-pmd/parameters.c                        | 4 ++--
+ 3 files changed, 4 insertions(+), 4 deletions(-)
@@ -29 +29 @@
-index 04a8d2fbee..019eddb7bd 100644
+index 12d0a6caf0..898dd310dd 100644
@@ -32 +32 @@
-@@ -620,7 +620,7 @@ comp_perf_options_parse(struct comp_test_data *test_data, int argc, char **argv)
+@@ -598,7 +598,7 @@ comp_perf_options_parse(struct comp_test_data *test_data, int argc, char **argv)
@@ -42 +42 @@
-index 0466f7baf8..40b6dfb648 100644
+index 49b469781c..22bf9cd4d6 100644
@@ -45 +45 @@
-@@ -983,7 +983,7 @@ cperf_options_parse(struct cperf_options *options, int argc, char **argv)
+@@ -953,7 +953,7 @@ cperf_options_parse(struct cperf_options *options, int argc, char **argv)
@@ -54,186 +53,0 @@
-diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c
-index 99d0463456..0aef767350 100644
---- a/app/test-flow-perf/main.c
-+++ b/app/test-flow-perf/main.c
-@@ -639,7 +639,7 @@ args_parse(int argc, char **argv)
- 		case 0:
- 			if (strcmp(lgopts[opt_idx].name, "help") == 0) {
- 				usage(argv[0]);
--				rte_exit(EXIT_SUCCESS, "Displayed help\n");
-+				exit(EXIT_SUCCESS);
- 			}
- 
- 			if (strcmp(lgopts[opt_idx].name, "group") == 0) {
-@@ -647,7 +647,7 @@ args_parse(int argc, char **argv)
- 				if (n >= 0)
- 					flow_group = n;
- 				else
--					rte_exit(EXIT_SUCCESS,
-+					rte_exit(EXIT_FAILURE,
- 						"flow group should be >= 0\n");
- 				printf("group %d / ", flow_group);
- 			}
-@@ -667,7 +667,7 @@ args_parse(int argc, char **argv)
- 				if (n > 0)
- 					hairpin_queues_num = n;
- 				else
--					rte_exit(EXIT_SUCCESS,
-+					rte_exit(EXIT_FAILURE,
- 						"Hairpin queues should be > 0\n");
- 
- 				flow_actions[actions_idx++] =
-@@ -680,7 +680,7 @@ args_parse(int argc, char **argv)
- 				if (n > 0)
- 					hairpin_queues_num = n;
- 				else
--					rte_exit(EXIT_SUCCESS,
-+					rte_exit(EXIT_FAILURE,
- 						"Hairpin queues should be > 0\n");
- 
- 				flow_actions[actions_idx++] =
-@@ -704,11 +704,9 @@ args_parse(int argc, char **argv)
- 							break;
- 						}
- 						/* Reached last item with no match */
--						if (i == (RTE_DIM(flow_options) - 1)) {
--							fprintf(stderr, "Invalid encap item: %s\n", token);
--							usage(argv[0]);
--							rte_exit(EXIT_SUCCESS, "Invalid encap item\n");
--						}
-+						if (i == (RTE_DIM(flow_options) - 1))
-+							rte_exit(EXIT_FAILURE,
-+								"Invalid encap item: %s\n", token);
- 					}
- 					token = strtok(NULL, ",");
- 				}
-@@ -730,11 +728,9 @@ args_parse(int argc, char **argv)
- 							break;
- 						}
- 						/* Reached last item with no match */
--						if (i == (RTE_DIM(flow_options) - 1)) {
--							fprintf(stderr, "Invalid decap item: %s\n", token);
--							usage(argv[0]);
--							rte_exit(EXIT_SUCCESS, "Invalid decap item\n");
--						}
-+						if (i == (RTE_DIM(flow_options) - 1))
-+							rte_exit(EXIT_FAILURE,
-+								"Invalid decap item %s\n", token);
- 					}
- 					token = strtok(NULL, ",");
- 				}
-@@ -747,9 +743,9 @@ args_parse(int argc, char **argv)
- 				if (n >= DEFAULT_RULES_BATCH)
- 					rules_batch = n;
- 				else {
--					printf("\n\nrules_batch should be >= %d\n",
-+					rte_exit(EXIT_FAILURE,
-+						"rules_batch should be >= %d\n",
- 						DEFAULT_RULES_BATCH);
--					rte_exit(EXIT_SUCCESS, " ");
- 				}
- 			}
- 			if (strcmp(lgopts[opt_idx].name,
-@@ -758,7 +754,8 @@ args_parse(int argc, char **argv)
- 				if (n >= (int) rules_batch)
- 					rules_count = n;
- 				else {
--					printf("\n\nrules_count should be >= %d\n",
-+					rte_exit(EXIT_FAILURE,
-+						"rules_count should be >= %d\n",
- 						rules_batch);
- 				}
- 			}
-@@ -786,23 +783,23 @@ args_parse(int argc, char **argv)
- 			if (strcmp(lgopts[opt_idx].name, "cores") == 0) {
- 				n = atoi(optarg);
- 				if ((int) rte_lcore_count() <= n) {
--					printf("\nError: you need %d cores to run on multi-cores\n"
-+					rte_exit(EXIT_FAILURE,
-+						"Error: you need %d cores to run on multi-cores\n"
- 						"Existing cores are: %d\n", n, rte_lcore_count());
--					rte_exit(EXIT_FAILURE, " ");
- 				}
- 				if (n <= RTE_MAX_LCORE && n > 0)
- 					mc_pool.cores_count = n;
- 				else {
--					printf("Error: cores count must be > 0 "
--						" and < %d\n", RTE_MAX_LCORE);
--					rte_exit(EXIT_FAILURE, " ");
-+					rte_exit(EXIT_FAILURE,
-+						"Error: cores count must be > 0 and < %d\n",
-+						RTE_MAX_LCORE);
- 				}
- 			}
- 			break;
- 		default:
--			fprintf(stderr, "Invalid option: %s\n", argv[optind]);
- 			usage(argv[0]);
--			rte_exit(EXIT_SUCCESS, "Invalid option\n");
-+			rte_exit(EXIT_FAILURE, "Invalid option: %s\n",
-+					argv[optind]);
- 			break;
- 		}
- 	}
-@@ -936,7 +933,7 @@ create_meter_rule(int port_id, uint32_t counter)
- 		printf("Port %u create meter idx(%d) error(%d) message: %s\n",
- 			port_id, counter, error.type,
- 			error.message ? error.message : "(no stated reason)");
--		rte_exit(EXIT_FAILURE, "error in creating meter");
-+		rte_exit(EXIT_FAILURE, "Error in creating meter\n");
- 	}
- }
- 
-@@ -949,7 +946,7 @@ destroy_meter_rule(int port_id, uint32_t counter)
- 		printf("Port %u destroy meter(%d) error(%d) message: %s\n",
- 			port_id, counter, error.type,
- 			error.message ? error.message : "(no stated reason)");
--		rte_exit(EXIT_FAILURE, "Error in deleting meter rule");
-+		rte_exit(EXIT_FAILURE, "Error in deleting meter rule\n");
- 	}
- }
- 
-@@ -1097,7 +1094,7 @@ destroy_flows(int port_id, uint8_t core_id, struct rte_flow **flows_list)
- 		memset(&error, 0x33, sizeof(error));
- 		if (rte_flow_destroy(port_id, flows_list[i], &error)) {
- 			print_flow_error(error);
--			rte_exit(EXIT_FAILURE, "Error in deleting flow");
-+			rte_exit(EXIT_FAILURE, "Error in deleting flow\n");
- 		}
- 
- 		/*
-@@ -1160,7 +1157,7 @@ insert_flows(int port_id, uint8_t core_id)
- 	flows_list = rte_zmalloc("flows_list",
- 		(sizeof(struct rte_flow *) * rules_count_per_core) + 1, 0);
- 	if (flows_list == NULL)
--		rte_exit(EXIT_FAILURE, "No Memory available!");
-+		rte_exit(EXIT_FAILURE, "No Memory available!\n");
- 
- 	cpu_time_used = 0;
- 	flow_index = 0;
-@@ -1180,7 +1177,7 @@ insert_flows(int port_id, uint8_t core_id)
- 
- 		if (flow == NULL) {
- 			print_flow_error(error);
--			rte_exit(EXIT_FAILURE, "error in creating flow");
-+			rte_exit(EXIT_FAILURE, "Error in creating flow\n");
- 		}
- 		flows_list[flow_index++] = flow;
- 	}
-@@ -1199,7 +1196,7 @@ insert_flows(int port_id, uint8_t core_id)
- 
- 		if (!flow) {
- 			print_flow_error(error);
--			rte_exit(EXIT_FAILURE, "error in creating flow");
-+			rte_exit(EXIT_FAILURE, "Error in creating flow\n");
- 		}
- 
- 		flows_list[flow_index++] = flow;
-@@ -1517,7 +1514,7 @@ packet_per_second_stats(void)
- 	old = rte_zmalloc("old",
- 		sizeof(struct lcore_info) * RTE_MAX_LCORE, 0);
- 	if (old == NULL)
--		rte_exit(EXIT_FAILURE, "No Memory available!");
-+		rte_exit(EXIT_FAILURE, "No Memory available!\n");
- 
- 	memcpy(old, lcore_infos,
- 		sizeof(struct lcore_info) * RTE_MAX_LCORE);
@@ -241 +55 @@
-index a326c8ce4f..b7d4ef76b0 100644
+index a1c08a411a..9ce3b4f4be 100644
@@ -244 +58 @@
-@@ -671,7 +671,7 @@ launch_args_parse(int argc, char** argv)
+@@ -694,7 +694,7 @@ launch_args_parse(int argc, char** argv)
@@ -251 +65 @@
- #ifdef RTE_LIB_CMDLINE
+ #ifdef RTE_LIBRTE_CMDLINE
@@ -253 +67 @@
-@@ -1413,7 +1413,7 @@ launch_args_parse(int argc, char** argv)
+@@ -1356,7 +1356,7 @@ launch_args_parse(int argc, char** argv)
@@ -262,15 +75,0 @@
-diff --git a/app/test-regex/main.c b/app/test-regex/main.c
-index 82cffaacfa..18a22db533 100644
---- a/app/test-regex/main.c
-+++ b/app/test-regex/main.c
-@@ -162,9 +162,8 @@ args_parse(int argc, char **argv, char *rules_file, char *data_file,
- 			usage("RegEx test app");
- 			break;
- 		default:
--			fprintf(stderr, "Invalid option: %s\n", argv[optind]);
- 			usage("RegEx test app");
--			rte_exit(EXIT_FAILURE, "Invalid option\n");
-+			rte_exit(EXIT_FAILURE, "Invalid option: %s\n", argv[optind]);
- 			break;
- 		}
- 	}

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

* [dpdk-stable] patch 'net/hns3: fix MTU config complexity' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (80 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'app: fix exit messages' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/hns3: update HiSilicon copyright syntax' " Christian Ehrhardt
                   ` (106 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ceeb684478b742219a37a4c795b64c12b13f8fd1 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

[ 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 98bc37d294..505bf116eb 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -2279,6 +2279,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)
 {
@@ -2290,8 +2325,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;
 	int ret;
 
 	/*
@@ -2338,28 +2371,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.741143298 +0200
+++ 0083-net-hns3-fix-MTU-config-complexity.patch	2021-05-17 17:40:29.251810107 +0200
@@ -1 +1 @@
-From d81d78eb86d50732ba98a8b255d19c2f6292521c Mon Sep 17 00:00:00 2001
+From ceeb684478b742219a37a4c795b64c12b13f8fd1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d81d78eb86d50732ba98a8b255d19c2f6292521c ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 9c718082b0..b07996928b 100644
+index 98bc37d294..505bf116eb 100644
@@ -21 +22 @@
-@@ -2372,6 +2372,41 @@ hns3_init_ring_with_vector(struct hns3_hw *hw)
+@@ -2279,6 +2279,41 @@ hns3_init_ring_with_vector(struct hns3_hw *hw)
@@ -63 +64 @@
-@@ -2382,8 +2417,6 @@ hns3_dev_configure(struct rte_eth_dev *dev)
+@@ -2290,8 +2325,6 @@ hns3_dev_configure(struct rte_eth_dev *dev)
@@ -69 +69,0 @@
- 	bool gro_en;
@@ -72 +72,2 @@
-@@ -2431,28 +2464,9 @@ hns3_dev_configure(struct rte_eth_dev *dev)
+ 	/*
+@@ -2338,28 +2371,9 @@ hns3_dev_configure(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/hns3: update HiSilicon copyright syntax' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (81 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/hns3: fix MTU config complexity' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/ena: fix releasing Tx ring mbufs' " Christian Ehrhardt
                   ` (105 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/8119dd902993c88c1c081fc948603d434c41cae5

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 8119dd902993c88c1c081fc948603d434c41cae5 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

[ 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_stats.c     | 2 +-
 drivers/net/hns3/hns3_stats.h     | 2 +-
 25 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c
index dc2473a0f7..d7de2bc981 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 <errno.h>
diff --git a/drivers/net/hns3/hns3_cmd.h b/drivers/net/hns3/hns3_cmd.h
index 5a7b7a44e0..9c3c68c3e2 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 62d8930c15..7a2ba795cc 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 <errno.h>
diff --git a/drivers/net/hns3/hns3_dcb.h b/drivers/net/hns3/hns3_dcb.h
index fe67d3a466..ff406bc693 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 505bf116eb..315baaa84f 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 <errno.h>
diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h
index 8ba22dc424..e65b38c881 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 0c21a20740..913d6fd406 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 <errno.h>
diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
index 98a044f567..a55ce0bf42 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 <stdbool.h>
diff --git a/drivers/net/hns3/hns3_fdir.h b/drivers/net/hns3/hns3_fdir.h
index f7b4216136..0c78121ded 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 b1d3d81aee..5d9d30624c 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 <stdbool.h>
diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c
index 46d617c68e..3c754cccd2 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 <stdbool.h>
diff --git a/drivers/net/hns3/hns3_intr.h b/drivers/net/hns3/hns3_intr.h
index d0af16c502..cf390de5dd 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 64996c9ae1..b7d0519131 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 <errno.h>
diff --git a/drivers/net/hns3/hns3_mbx.h b/drivers/net/hns3/hns3_mbx.h
index b01eaacc3c..7065111a61 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 639f46ced8..ecfba447a2 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 <stdbool.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 2f34357d48..7093a97ccc 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 <errno.h>
diff --git a/drivers/net/hns3/hns3_regs.h b/drivers/net/hns3/hns3_regs.h
index 64bd6931b3..2535bc977a 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 a63d6ef725..21ed875f26 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 <stdbool.h>
diff --git a/drivers/net/hns3/hns3_rss.h b/drivers/net/hns3/hns3_rss.h
index b49e399901..a03e7df6bb 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 5971cf6cd5..1deaf4e6be 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 <stdarg.h>
diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h
index 88a75843b3..fbe3dd0ab8 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_stats.c b/drivers/net/hns3/hns3_stats.c
index d2ef722cfb..3dff75c730 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 <stdbool.h>
diff --git a/drivers/net/hns3/hns3_stats.h b/drivers/net/hns3/hns3_stats.h
index 34c76be21e..c51e835cde 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.781077330 +0200
+++ 0084-net-hns3-update-HiSilicon-copyright-syntax.patch	2021-05-17 17:40:29.263810201 +0200
@@ -1 +1 @@
-From fa485faca236bd0ac834b6ad7c36f5050305482e Mon Sep 17 00:00:00 2001
+From 8119dd902993c88c1c081fc948603d434c41cae5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fa485faca236bd0ac834b6ad7c36f5050305482e ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -24,32 +25,26 @@
- 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/hns3_tm.c            | 2 +-
- drivers/net/hns3/hns3_tm.h            | 2 +-
- 31 files changed, 31 insertions(+), 31 deletions(-)
+ 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_stats.c     | 2 +-
+ drivers/net/hns3/hns3_stats.h     | 2 +-
+ 25 files changed, 25 insertions(+), 25 deletions(-)
@@ -58 +53 @@
-index 03f8048f27..1087178373 100644
+index dc2473a0f7..d7de2bc981 100644
@@ -67 +62 @@
- #include <ethdev_pci.h>
+ #include <errno.h>
@@ -69 +64 @@
-index 5d1fb67644..9ca25295b2 100644
+index 5a7b7a44e0..9c3c68c3e2 100644
@@ -80 +75 @@
-index ebfc24044f..3fcec8220e 100644
+index 62d8930c15..7a2ba795cc 100644
@@ -89 +84 @@
- #include <rte_io.h>
+ #include <errno.h>
@@ -91 +86 @@
-index 0d25d3b7ab..9c60ab948a 100644
+index fe67d3a466..ff406bc693 100644
@@ -102 +97 @@
-index f695db3784..a9e2e93528 100644
+index 505bf116eb..315baaa84f 100644
@@ -111 +106 @@
- #include <rte_alarm.h>
+ #include <errno.h>
@@ -113 +108 @@
-index d23239d2e1..d666b1a1e9 100644
+index 8ba22dc424..e65b38c881 100644
@@ -124 +119 @@
-index 6c3ddcc50e..a677cc809f 100644
+index 0c21a20740..913d6fd406 100644
@@ -133 +128 @@
- #include <linux/pci_regs.h>
+ #include <errno.h>
@@ -135 +130 @@
-index 896540df78..658f6a6fc1 100644
+index 98a044f567..a55ce0bf42 100644
@@ -144 +139 @@
- #include <ethdev_driver.h>
+ #include <stdbool.h>
@@ -146 +141 @@
-index a5760a3ccf..b77745f221 100644
+index f7b4216136..0c78121ded 100644
@@ -157 +152 @@
-index 0c4e91109c..366a301fe8 100644
+index b1d3d81aee..5d9d30624c 100644
@@ -166 +161 @@
- #include <rte_flow_driver.h>
+ #include <stdbool.h>
@@ -168 +163 @@
-index c259f2e4a5..c8d61376cf 100644
+index 46d617c68e..3c754cccd2 100644
@@ -177 +172 @@
- #include <rte_alarm.h>
+ #include <stdbool.h>
@@ -179 +174 @@
-index c569a9de37..e10e0941ff 100644
+index d0af16c502..cf390de5dd 100644
@@ -201 +196 @@
-index 61d15845e7..597a2d1299 100644
+index 64996c9ae1..b7d0519131 100644
@@ -210 +205 @@
- #include <ethdev_driver.h>
+ #include <errno.h>
@@ -212 +207 @@
-index 7f7ade13fa..7f5fdd24f4 100644
+index b01eaacc3c..7065111a61 100644
@@ -223 +218 @@
-index 3342a781ad..cfee30f77f 100644
+index 639f46ced8..ecfba447a2 100644
@@ -232 +227 @@
- #include <rte_eal.h>
+ #include <stdbool.h>
@@ -245 +240 @@
-index 4022bb990d..d53c132b1e 100644
+index 2f34357d48..7093a97ccc 100644
@@ -254 +249 @@
- #include <ethdev_pci.h>
+ #include <errno.h>
@@ -256 +251 @@
-index c9e10be6b3..7f05f8be79 100644
+index 64bd6931b3..2535bc977a 100644
@@ -267 +262 @@
-index 858e31a234..226ec25150 100644
+index a63d6ef725..21ed875f26 100644
@@ -276 +271 @@
- #include <rte_ethdev.h>
+ #include <stdbool.h>
@@ -278 +273 @@
-index 94668ed6d5..da2375e2ee 100644
+index b49e399901..a03e7df6bb 100644
@@ -289 +284 @@
-index 70cd2c2306..64a0cd4f25 100644
+index 5971cf6cd5..1deaf4e6be 100644
@@ -298 +293 @@
- #include <rte_bus_pci.h>
+ #include <stdarg.h>
@@ -300 +295 @@
-index eebbebf8c2..cfe6cadaf5 100644
+index 88a75843b3..fbe3dd0ab8 100644
@@ -310,44 +304,0 @@
-diff --git a/drivers/net/hns3/hns3_rxtx_vec.c b/drivers/net/hns3/hns3_rxtx_vec.c
-index 030bfdb627..60018ea3fb 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 68f098f2f5..b27fce85f8 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 40fe6f743f..ef3a756195 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>
@@ -355 +306 @@
-index 1af689ff09..fdada8ba3c 100644
+index d2ef722cfb..3dff75c730 100644
@@ -364 +315 @@
- #include <rte_ethdev.h>
+ #include <stdbool.h>
@@ -366 +317 @@
-index 273be4246f..88ac4cd500 100644
+index 34c76be21e..c51e835cde 100644
@@ -376,22 +326,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] 191+ messages in thread

* [dpdk-stable] patch 'net/ena: fix releasing Tx ring mbufs' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (82 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/hns3: update HiSilicon copyright syntax' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/e1000: fix Rx error counter for bad length' " Christian Ehrhardt
                   ` (104 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: David Harton; +Cc: Michal Krawczyk, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/03de5b658b9af034dd1d590ff3690873d5c316f9

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 03de5b658b9af034dd1d590ff3690873d5c316f9 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

[ 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 d098387a8c..2adf461a3c 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -733,8 +733,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;
+		}
 	}
 }
 
@@ -1376,7 +1378,7 @@ static int ena_populate_rx_queue(struct ena_ring *rxq, unsigned int count)
 	ena_assert_msg(((in_use + count) < ring_size), "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;
@@ -1415,8 +1417,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.830711062 +0200
+++ 0085-net-ena-fix-releasing-Tx-ring-mbufs.patch	2021-05-17 17:40:29.263810201 +0200
@@ -1 +1 @@
-From 3c8bc29fd07006338e3460b03655a772cd36a9e7 Mon Sep 17 00:00:00 2001
+From 03de5b658b9af034dd1d590ff3690873d5c316f9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3c8bc29fd07006338e3460b03655a772cd36a9e7 ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 9aa51c9dcf..f60e843b7f 100644
+index d098387a8c..2adf461a3c 100644
@@ -29 +30 @@
-@@ -767,8 +767,10 @@ static void ena_tx_queue_release_bufs(struct ena_ring *ring)
+@@ -733,8 +733,10 @@ static void ena_tx_queue_release_bufs(struct ena_ring *ring)
@@ -41,2 +42,2 @@
-@@ -1457,7 +1459,7 @@ static int ena_populate_rx_queue(struct ena_ring *rxq, unsigned int count)
- 		"bad ring state\n");
+@@ -1376,7 +1378,7 @@ static int ena_populate_rx_queue(struct ena_ring *rxq, unsigned int count)
+ 	ena_assert_msg(((in_use + count) < ring_size), "bad ring state\n");
@@ -50 +51 @@
-@@ -1486,8 +1488,7 @@ static int ena_populate_rx_queue(struct ena_ring *rxq, unsigned int count)
+@@ -1415,8 +1417,7 @@ static int ena_populate_rx_queue(struct ena_ring *rxq, unsigned int count)

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

* [dpdk-stable] patch 'net/e1000: fix Rx error counter for bad length' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (83 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/ena: fix releasing Tx ring mbufs' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/bnxt: fix configuring LRO' " Christian Ehrhardt
                   ` (103 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/644be87eac799eb1ec171d9955696f5310278e42

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 644be87eac799eb1ec171d9955696f5310278e42 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

[ 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 5f9e64d3ef..2c49d3daf1 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -971,8 +971,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 5edb8e7c68..a82209e6d9 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -1849,8 +1849,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.864833891 +0200
+++ 0086-net-e1000-fix-Rx-error-counter-for-bad-length.patch	2021-05-17 17:40:29.267810232 +0200
@@ -1 +1 @@
-From 7b0a60dd394969fb17409519fd673e61b05f284e Mon Sep 17 00:00:00 2001
+From 644be87eac799eb1ec171d9955696f5310278e42 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7b0a60dd394969fb17409519fd673e61b05f284e ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 3e7ccdbf09..a0ca371b02 100644
+index 5f9e64d3ef..2c49d3daf1 100644
@@ -28 +29 @@
-@@ -975,8 +975,7 @@ eth_em_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats)
+@@ -971,8 +971,7 @@ eth_em_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats)
@@ -39 +40 @@
-index a1a72339ba..25218da240 100644
+index 5edb8e7c68..a82209e6d9 100644
@@ -42 +43 @@
-@@ -1825,8 +1825,7 @@ eth_igb_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats)
+@@ -1849,8 +1849,7 @@ eth_igb_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *rte_stats)

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

* [dpdk-stable] patch 'net/bnxt: fix configuring LRO' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (84 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/e1000: fix Rx error counter for bad length' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'vhost: fix initialization of temporary header' " Christian Ehrhardt
                   ` (102 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Kalesh AP; +Cc: Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/687314688414f260cd3b99cccf95fceb2f97ed83

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 687314688414f260cd3b99cccf95fceb2f97ed83 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

[ 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 1ab07ed826..a6c902535a 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -320,10 +320,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.903048577 +0200
+++ 0087-net-bnxt-fix-configuring-LRO.patch	2021-05-17 17:40:29.267810232 +0200
@@ -1 +1 @@
-From e73fb98b69dffacb2c74e45807096ec597b88cae Mon Sep 17 00:00:00 2001
+From 687314688414f260cd3b99cccf95fceb2f97ed83 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e73fb98b69dffacb2c74e45807096ec597b88cae ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 02fe00036b..20ca57eae5 100644
+index 1ab07ed826..a6c902535a 100644
@@ -23 +24 @@
-@@ -479,10 +479,11 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)
+@@ -320,10 +320,11 @@ static int bnxt_setup_one_vnic(struct bnxt *bp, uint16_t vnic_id)

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

* [dpdk-stable] patch 'vhost: fix initialization of temporary header' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (85 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/bnxt: fix configuring LRO' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'ethdev: validate input in module EEPROM dump' " Christian Ehrhardt
                   ` (101 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Marvin Liu; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/31b17ff59f3b9ab51f4073f7f680faa140e47984

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 31b17ff59f3b9ab51f4073f7f680faa140e47984 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

[ 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 a01a5c8d99..62b7bbda96 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -810,9 +810,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_DEBUG(VHOST_DATA, "(%d) RX: num merge buffers %d\n",
-- 
2.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.939403026 +0200
+++ 0088-vhost-fix-initialization-of-temporary-header.patch	2021-05-17 17:40:29.267810232 +0200
@@ -1 +1 @@
-From 5b784a2d80abddd5d554b1eef534e8047b1d2e5a Mon Sep 17 00:00:00 2001
+From 31b17ff59f3b9ab51f4073f7f680faa140e47984 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5b784a2d80abddd5d554b1eef534e8047b1d2e5a ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 7f621fb6dd..48b013a9b4 100644
+index a01a5c8d99..62b7bbda96 100644
@@ -23 +24 @@
-@@ -812,9 +812,10 @@ copy_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq,
+@@ -810,9 +810,10 @@ copy_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq,
@@ -35 +36 @@
- 	VHOST_LOG_DATA(DEBUG, "(%d) RX: num merge buffers %d\n",
+ 	VHOST_LOG_DEBUG(VHOST_DATA, "(%d) RX: num merge buffers %d\n",

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

* [dpdk-stable] patch 'ethdev: validate input in module EEPROM dump' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (86 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'vhost: fix initialization of temporary header' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'ethdev: validate input in register info' " Christian Ehrhardt
                   ` (100 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Min Hu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From d50e609bde4d36b56e794701018c15d90027821a 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

[ 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/mlx5_ethdev.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 a82209e6d9..06ba55b875 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -5518,9 +5518,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 79558c8aad..b583d3a0ea 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -12129,9 +12129,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 e7ddb237b1..9cb25bbf3a 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -7628,9 +7628,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/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index efcc69ca44..7af7fb0f9f 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -1883,7 +1883,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;
@@ -1917,7 +1917,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 beb4f58148..1f8292589c 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 fb0912a4a8..14f9a7134c 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -4922,6 +4922,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);
@@ -4935,6 +4937,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 017459e595..8fd7f272bf 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -3920,6 +3920,7 @@ int rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
  *   - (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.
  */
@@ -3942,6 +3943,7 @@ rte_eth_dev_get_module_info(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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:32.978052717 +0200
+++ 0089-ethdev-validate-input-in-module-EEPROM-dump.patch	2021-05-17 17:40:29.287810389 +0200
@@ -1 +1 @@
-From e2bd08d569d9821131d8e245446d24eaed145f21 Mon Sep 17 00:00:00 2001
+From d50e609bde4d36b56e794701018c15d90027821a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e2bd08d569d9821131d8e245446d24eaed145f21 ]
+
@@ -15 +16,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
- drivers/net/mlx5/linux/mlx5_ethdev_os.c | 4 ++--
+ drivers/net/mlx5/mlx5_ethdev.c          | 4 ++--
@@ -31 +32 @@
-index 25218da240..7d6d04abcb 100644
+index a82209e6d9..06ba55b875 100644
@@ -34 +35 @@
-@@ -5118,9 +5118,6 @@ eth_igb_get_module_eeprom(struct rte_eth_dev *dev,
+@@ -5518,9 +5518,6 @@ eth_igb_get_module_eeprom(struct rte_eth_dev *dev,
@@ -45 +46 @@
-index 2076717324..c03e4a0a4b 100644
+index 79558c8aad..b583d3a0ea 100644
@@ -48 +49 @@
-@@ -11659,9 +11659,6 @@ static int i40e_get_module_eeprom(struct rte_eth_dev *dev,
+@@ -12129,9 +12129,6 @@ static int i40e_get_module_eeprom(struct rte_eth_dev *dev,
@@ -59 +60 @@
-index 2d308be48a..4ee709b17f 100644
+index e7ddb237b1..9cb25bbf3a 100644
@@ -62 +63 @@
-@@ -7330,9 +7330,6 @@ ixgbe_get_module_eeprom(struct rte_eth_dev *dev,
+@@ -7628,9 +7628,6 @@ ixgbe_get_module_eeprom(struct rte_eth_dev *dev,
@@ -72,5 +73,5 @@
-diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
-index 4365c55b81..ddc1371aa9 100644
---- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
-+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
-@@ -1193,7 +1193,7 @@ mlx5_get_module_info(struct rte_eth_dev *dev,
+diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
+index efcc69ca44..7af7fb0f9f 100644
+--- a/drivers/net/mlx5/mlx5_ethdev.c
++++ b/drivers/net/mlx5/mlx5_ethdev.c
+@@ -1883,7 +1883,7 @@ mlx5_get_module_info(struct rte_eth_dev *dev,
@@ -85 +86 @@
-@@ -1227,7 +1227,7 @@ int mlx5_get_module_eeprom(struct rte_eth_dev *dev,
+@@ -1917,7 +1917,7 @@ int mlx5_get_module_eeprom(struct rte_eth_dev *dev,
@@ -95 +96 @@
-index 9e3f80937d..6f0cdc5854 100644
+index beb4f58148..1f8292589c 100644
@@ -98 +99 @@
-@@ -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 +110 @@
-index 3059aa55b3..bb195abe70 100644
+index fb0912a4a8..14f9a7134c 100644
@@ -112 +113 @@
-@@ -5335,6 +5335,8 @@ rte_eth_dev_get_module_info(uint16_t port_id,
+@@ -4922,6 +4922,8 @@ rte_eth_dev_get_module_info(uint16_t port_id,
@@ -121 +122 @@
-@@ -5348,6 +5350,8 @@ rte_eth_dev_get_module_eeprom(uint16_t port_id,
+@@ -4935,6 +4937,8 @@ rte_eth_dev_get_module_eeprom(uint16_t port_id,
@@ -131 +132 @@
-index 6c7c72890f..f5bbc10b68 100644
+index 017459e595..8fd7f272bf 100644
@@ -134 +135 @@
-@@ -4471,6 +4471,7 @@ int rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
+@@ -3920,6 +3920,7 @@ int rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
@@ -142 +143 @@
-@@ -4493,6 +4494,7 @@ rte_eth_dev_get_module_info(uint16_t port_id,
+@@ -3942,6 +3943,7 @@ rte_eth_dev_get_module_info(uint16_t port_id,

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

* [dpdk-stable] patch 'ethdev: validate input in register info' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (87 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'ethdev: validate input in module EEPROM dump' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'ethdev: validate input in EEPROM " Christian Ehrhardt
                   ` (99 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Min Hu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 86c3bbbaaef8836d2505f5534fa525b15e8efde7 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

[ 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 7093a97ccc..f38c1e3cca 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -336,11 +336,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 14f9a7134c..607608a65f 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -4873,6 +4873,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 8fd7f272bf..73b6d10909 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -3900,6 +3900,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.028689841 +0200
+++ 0090-ethdev-validate-input-in-register-info.patch	2021-05-17 17:40:29.291810422 +0200
@@ -1 +1 @@
-From 94af45f4005ee0c3152db45a3669bec5238a3c10 Mon Sep 17 00:00:00 2001
+From 86c3bbbaaef8836d2505f5534fa525b15e8efde7 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 94af45f4005ee0c3152db45a3669bec5238a3c10 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index d53c132b1e..5d15613c67 100644
+index 7093a97ccc..f38c1e3cca 100644
@@ -25 +26 @@
-@@ -484,11 +484,6 @@ hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)
+@@ -336,11 +336,6 @@ hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)
@@ -38 +39 @@
-index bb195abe70..3fe200d508 100644
+index 14f9a7134c..607608a65f 100644
@@ -41 +42 @@
-@@ -5286,6 +5286,8 @@ rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info)
+@@ -4873,6 +4873,8 @@ rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info)
@@ -51 +52 @@
-index f5bbc10b68..1ad7cda27d 100644
+index 8fd7f272bf..73b6d10909 100644
@@ -54 +55 @@
-@@ -4403,6 +4403,7 @@ int rte_eth_get_monitor_addr(uint16_t port_id, uint16_t queue_id,
+@@ -3900,6 +3900,7 @@ int rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);

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

* [dpdk-stable] patch 'ethdev: validate input in EEPROM info' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (88 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'ethdev: validate input in register info' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/hns3: fix FLR miss detection' " Christian Ehrhardt
                   ` (98 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Min Hu, Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/73a2b50eb55212a003ab3c3d912c8d0f751c8dbf

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 73a2b50eb55212a003ab3c3d912c8d0f751c8dbf 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

[ 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 607608a65f..df4bb9c5bc 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -4899,6 +4899,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);
@@ -4911,6 +4913,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 73b6d10909..d42226daa3 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -3853,6 +3853,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.
  */
@@ -3883,6 +3884,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.072047759 +0200
+++ 0091-ethdev-validate-input-in-EEPROM-info.patch	2021-05-17 17:40:29.295810453 +0200
@@ -1 +1 @@
-From 18239da4ac2155582d91d4ccb8ed8b2193193534 Mon Sep 17 00:00:00 2001
+From 73a2b50eb55212a003ab3c3d912c8d0f751c8dbf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 18239da4ac2155582d91d4ccb8ed8b2193193534 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 3fe200d508..6b5cfd696d 100644
+index 607608a65f..df4bb9c5bc 100644
@@ -23 +24 @@
-@@ -5312,6 +5312,8 @@ rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
+@@ -4899,6 +4899,8 @@ rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
@@ -32 +33 @@
-@@ -5324,6 +5326,8 @@ rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
+@@ -4911,6 +4913,8 @@ rte_eth_dev_set_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info)
@@ -42 +43 @@
-index 1ad7cda27d..3b773b6dd0 100644
+index 73b6d10909..d42226daa3 100644
@@ -45,2 +46 @@
-@@ -4435,6 +4435,7 @@ int rte_eth_dev_get_eeprom_length(uint16_t port_id);
-  * @return
+@@ -3853,6 +3853,7 @@ int rte_eth_tx_burst_mode_get(uint16_t port_id, uint16_t queue_id,
@@ -49 +48,0 @@
-+ *   - (-EINVAL) if bad parameter.
@@ -50,0 +50 @@
++ *   - (-EINVAL) if bad parameter.
@@ -53 +53,3 @@
-@@ -4453,6 +4454,7 @@ int rte_eth_dev_get_eeprom(uint16_t port_id, struct rte_dev_eeprom_info *info);
+  */
+@@ -3883,6 +3884,7 @@ int rte_eth_dev_get_eeprom_length(uint16_t port_id);
+  * @return
@@ -56 +57,0 @@
-  *   - (-ENODEV) if *port_id* invalid.
@@ -57,0 +59 @@
+  *   - (-ENODEV) if *port_id* invalid.
@@ -60 +61,0 @@
-  */

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

* [dpdk-stable] patch 'net/hns3: fix FLR miss detection' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (89 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'ethdev: validate input in EEPROM " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/hns3: fix rollback after setting PVID failure' " Christian Ehrhardt
                   ` (97 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Hongbo Zheng; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From c47ed490511eed3479960092ab709f9836c1db6a 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

[ 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 | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c
index d7de2bc981..e669598cf1 100644
--- a/drivers/net/hns3/hns3_cmd.c
+++ b/drivers/net/hns3/hns3_cmd.c
@@ -210,13 +210,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.109782694 +0200
+++ 0092-net-hns3-fix-FLR-miss-detection.patch	2021-05-17 17:40:29.295810453 +0200
@@ -1 +1 @@
-From 32040ae365735f94253ce317b4b01e8bc4ea9c6b Mon Sep 17 00:00:00 2001
+From c47ed490511eed3479960092ab709f9836c1db6a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 32040ae365735f94253ce317b4b01e8bc4ea9c6b ]
+
@@ -25 +26,0 @@
-Cc: stable@dpdk.org
@@ -30,2 +31,2 @@
- drivers/net/hns3/hns3_cmd.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
+ drivers/net/hns3/hns3_cmd.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
@@ -34 +35 @@
-index 22453b0832..1d8ef7a812 100644
+index d7de2bc981..e669598cf1 100644
@@ -37 +38 @@
-@@ -195,12 +195,14 @@ hns3_cmd_csq_clean(struct hns3_hw *hw)
+@@ -210,13 +210,14 @@ hns3_cmd_csq_clean(struct hns3_hw *hw)
@@ -44,0 +46 @@
+-
@@ -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] 191+ messages in thread

* [dpdk-stable] patch 'net/hns3: fix rollback after setting PVID failure' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (90 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/hns3: fix FLR miss detection' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/hns3: fix flow control exception' " Christian Ehrhardt
                   ` (96 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/979db7ce12639af4a83d881360e019294594e06f

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 979db7ce12639af4a83d881360e019294594e06f 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

[ 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 315baaa84f..768876d65b 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -849,7 +849,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)
@@ -872,7 +872,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)
@@ -881,13 +881,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.142590356 +0200
+++ 0093-net-hns3-fix-rollback-after-setting-PVID-failure.patch	2021-05-17 17:40:29.299810484 +0200
@@ -1 +1 @@
-From 39c4fe7042acaeea7a4dff0213ed3fd453a2c255 Mon Sep 17 00:00:00 2001
+From 979db7ce12639af4a83d881360e019294594e06f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 39c4fe7042acaeea7a4dff0213ed3fd453a2c255 ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index a4d17ed0f4..56b3032e6b 100644
+index 315baaa84f..768876d65b 100644
@@ -26 +27 @@
-@@ -981,7 +981,7 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
+@@ -849,7 +849,7 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
@@ -35 +36 @@
-@@ -1004,7 +1004,7 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
+@@ -872,7 +872,7 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
@@ -44 +45 @@
-@@ -1013,13 +1013,27 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)
+@@ -881,13 +881,27 @@ hns3_vlan_pvid_configure(struct hns3_adapter *hns, uint16_t pvid, int on)

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

* [dpdk-stable] patch 'net/hns3: fix flow control exception' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (91 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/hns3: fix rollback after setting PVID failure' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/hns3: fix flow counter value' " Christian Ehrhardt
                   ` (95 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From f38f50a6ae26f94649eb16eb2ddc67feda73f837 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

[ 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 768876d65b..4fbb5794c4 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -4868,6 +4868,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.179059818 +0200
+++ 0094-net-hns3-fix-flow-control-exception.patch	2021-05-17 17:40:29.299810484 +0200
@@ -1 +1 @@
-From f1c555219fee71fe76cc53955cd0c052c88b2848 Mon Sep 17 00:00:00 2001
+From f38f50a6ae26f94649eb16eb2ddc67feda73f837 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f1c555219fee71fe76cc53955cd0c052c88b2848 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 56b3032e6b..2fa0bfa072 100644
+index 768876d65b..4fbb5794c4 100644
@@ -23 +24 @@
-@@ -5554,6 +5554,11 @@ hns3_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -4868,6 +4868,11 @@ hns3_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)

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

* [dpdk-stable] patch 'net/hns3: fix flow counter value' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (92 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/hns3: fix flow control exception' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/hns3: fix VF mailbox head field' " Christian Ehrhardt
                   ` (94 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/63113e94cd161e926d4bfbdaf67d552ce9529327

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 63113e94cd161e926d4bfbdaf67d552ce9529327 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

[ 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 5d9d30624c..a726be747b 100644
--- a/drivers/net/hns3/hns3_flow.c
+++ b/drivers/net/hns3/hns3_flow.c
@@ -120,7 +120,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) {
@@ -133,6 +136,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.216281766 +0200
+++ 0095-net-hns3-fix-flow-counter-value.patch	2021-05-17 17:40:29.303810514 +0200
@@ -1 +1 @@
-From a06c3b0e9f0a4807ee8ac145f58284ec49f2f33d Mon Sep 17 00:00:00 2001
+From 63113e94cd161e926d4bfbdaf67d552ce9529327 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a06c3b0e9f0a4807ee8ac145f58284ec49f2f33d ]
+
@@ -14 +15,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 711eed3f54..098b191909 100644
+index 5d9d30624c..a726be747b 100644
@@ -26 +27 @@
-@@ -158,7 +158,10 @@ hns3_counter_new(struct rte_eth_dev *dev, uint32_t shared, uint32_t id,
+@@ -120,7 +120,10 @@ hns3_counter_new(struct rte_eth_dev *dev, uint32_t shared, uint32_t id,
@@ -37 +38 @@
-@@ -171,6 +174,13 @@ hns3_counter_new(struct rte_eth_dev *dev, uint32_t shared, uint32_t id,
+@@ -133,6 +136,13 @@ hns3_counter_new(struct rte_eth_dev *dev, uint32_t shared, uint32_t id,

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

* [dpdk-stable] patch 'net/hns3: fix VF mailbox head field' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (93 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/hns3: fix flow counter value' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/hns3: support get device version when dump register' " Christian Ehrhardt
                   ` (93 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 9b6a8b6a039f45673127bad73f759b6fca3fab61 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

[ 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 b7d0519131..3f97b8100b 100644
--- a/drivers/net/hns3/hns3_mbx.c
+++ b/drivers/net/hns3/hns3_mbx.c
@@ -184,6 +184,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.250726646 +0200
+++ 0096-net-hns3-fix-VF-mailbox-head-field.patch	2021-05-17 17:40:29.303810514 +0200
@@ -1 +1 @@
-From 38d5b71c27d6fd9324cbaeed972df382c2c7a34b Mon Sep 17 00:00:00 2001
+From 9b6a8b6a039f45673127bad73f759b6fca3fab61 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 38d5b71c27d6fd9324cbaeed972df382c2c7a34b ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -26 +27 @@
-index 499285d7c2..8ea8998ac7 100644
+index b7d0519131..3f97b8100b 100644
@@ -29 +30 @@
-@@ -142,6 +142,7 @@ hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,
+@@ -184,6 +184,7 @@ hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,

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

* [dpdk-stable] patch 'net/hns3: support get device version when dump register' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (94 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/hns3: fix VF mailbox head field' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/hns3: delete redundant blank line' " Christian Ehrhardt
                   ` (92 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/62169644fed3eb04faf640f2b5284100ed4c81e5

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 62169644fed3eb04faf640f2b5284100ed4c81e5 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

[ 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 f38c1e3cca..a38e945670 100644
--- a/drivers/net/hns3/hns3_regs.c
+++ b/drivers/net/hns3/hns3_regs.c
@@ -351,6 +351,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.286358763 +0200
+++ 0097-net-hns3-support-get-device-version-when-dump-regist.patch	2021-05-17 17:40:29.303810514 +0200
@@ -1 +1 @@
-From 214917f66bf2852c7b758550fdcab1738cad8fa4 Mon Sep 17 00:00:00 2001
+From 62169644fed3eb04faf640f2b5284100ed4c81e5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 214917f66bf2852c7b758550fdcab1738cad8fa4 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 7edd9b023b..86a4cf74d5 100644
+index f38c1e3cca..a38e945670 100644
@@ -22 +23 @@
-@@ -499,6 +499,8 @@ hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)
+@@ -351,6 +351,8 @@ hns3_get_regs(struct rte_eth_dev *eth_dev, struct rte_dev_reg_info *regs)

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

* [dpdk-stable] patch 'net/hns3: delete redundant blank line' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (95 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/hns3: support get device version when dump register' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'test/event: fix timeout accuracy' " Christian Ehrhardt
                   ` (91 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Hongbo Zheng; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 8d5643eb8e25120a353673b4971d5a2e10b42641 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

[ 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 913d6fd406..b4aedf82e0 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -926,7 +926,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.321423501 +0200
+++ 0098-net-hns3-delete-redundant-blank-line.patch	2021-05-17 17:40:29.303810514 +0200
@@ -1 +1 @@
-From d7e8b721fccc855b1d7a61e1e06d0d6921cf34fd Mon Sep 17 00:00:00 2001
+From 8d5643eb8e25120a353673b4971d5a2e10b42641 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d7e8b721fccc855b1d7a61e1e06d0d6921cf34fd ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index eb47ed320a..5f8a460f35 100644
+index 913d6fd406..b4aedf82e0 100644
@@ -22 +23 @@
-@@ -1064,7 +1064,6 @@ hns3vf_check_event_cause(struct hns3_adapter *hns, uint32_t *clearval)
+@@ -926,7 +926,6 @@ hns3vf_check_event_cause(struct hns3_adapter *hns, uint32_t *clearval)

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

* [dpdk-stable] patch 'test/event: fix timeout accuracy' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (96 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/hns3: delete redundant blank line' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'app/eventdev: " Christian Ehrhardt
                   ` (90 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Erik Gabriel Carrillo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From e60e641b3b8beb4ba531954c38c5e0cb0226dd84 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

[ 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.357299298 +0200
+++ 0099-test-event-fix-timeout-accuracy.patch	2021-05-17 17:40:29.303810514 +0200
@@ -1 +1 @@
-From 41f27795bb947c9aa1d02e0c8a2688af2a3197ba Mon Sep 17 00:00:00 2001
+From e60e641b3b8beb4ba531954c38c5e0cb0226dd84 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 41f27795bb947c9aa1d02e0c8a2688af2a3197ba ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'app/eventdev: fix timeout accuracy' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (97 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'test/event: fix timeout accuracy' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'event/octeontx2: fix device reconfigure for single slot' " Christian Ehrhardt
                   ` (89 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: Erik Gabriel Carrillo, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From c731d4102ba2335548e66dd507b632efbb64f9f1 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

[ 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 b3af4bfeca..83aeb8d080 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.391310836 +0200
+++ 0100-app-eventdev-fix-timeout-accuracy.patch	2021-05-17 17:40:29.303810514 +0200
@@ -1 +1 @@
-From 626b12a8d3bb018f7fc9e2eae356a375fb2d38dc Mon Sep 17 00:00:00 2001
+From c731d4102ba2335548e66dd507b632efbb64f9f1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 626b12a8d3bb018f7fc9e2eae356a375fb2d38dc ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 34cded3739..cc100650c2 100644
+index b3af4bfeca..83aeb8d080 100644

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

* [dpdk-stable] patch 'event/octeontx2: fix device reconfigure for single slot' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (98 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'app/eventdev: " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'license: fix typos' " Christian Ehrhardt
                   ` (88 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Harman Kalra; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/13a95a034256e857808733c49222450991819585

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 13a95a034256e857808733c49222450991819585 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

[ 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 5bdf23c362..6a0149b942 100644
--- a/drivers/event/octeontx2/otx2_evdev.c
+++ b/drivers/event/octeontx2/otx2_evdev.c
@@ -842,29 +842,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.423445299 +0200
+++ 0101-event-octeontx2-fix-device-reconfigure-for-single-sl.patch	2021-05-17 17:40:29.307810548 +0200
@@ -1 +1 @@
-From 340d22cdd14802de3f80859a940dfa178b0de7ca Mon Sep 17 00:00:00 2001
+From 13a95a034256e857808733c49222450991819585 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 340d22cdd14802de3f80859a940dfa178b0de7ca ]
+
@@ -17 +18,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 770a801c4e..cdadbb2b21 100644
+index 5bdf23c362..6a0149b942 100644
@@ -28 +29 @@
-@@ -885,29 +885,27 @@ sso_configure_ports(const struct rte_eventdev *event_dev)
+@@ -842,29 +842,27 @@ sso_configure_ports(const struct rte_eventdev *event_dev)

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

* [dpdk-stable] patch 'license: fix typos' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (99 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'event/octeontx2: fix device reconfigure for single slot' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'devargs: fix memory leak on parsing failure' " Christian Ehrhardt
                   ` (87 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Stephen Hemminger, Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/659d4fc92fe688705df8c8de0ce8659c8bb4d71a

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 659d4fc92fe688705df8c8de0ce8659c8bb4d71a 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

[ 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.458648790 +0200
+++ 0102-license-fix-typos.patch	2021-05-17 17:40:29.307810548 +0200
@@ -1 +1 @@
-From ff43cd79e395f0eb8c763ec7ab0338526ad201d8 Mon Sep 17 00:00:00 2001
+From 659d4fc92fe688705df8c8de0ce8659c8bb4d71a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ff43cd79e395f0eb8c763ec7ab0338526ad201d8 ]
+
@@ -7 +8,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'devargs: fix memory leak on parsing failure' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (100 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'license: fix typos' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'eal: add C++ include guard for reciprocal header' " Christian Ehrhardt
                   ` (86 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Xueming Li; +Cc: Gaetan Rivet, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 4dc48d766c3ab8076786266d1bb6cfe1cd03d25c Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl@nvidia.com>
Date: Tue, 13 Apr 2021 03:14:09 +0000
Subject: [PATCH] devargs: fix memory leak on parsing failure

[ upstream commit e132ee8690474fa985e26f1d4db75823024748c8 ]

This patch fixes memory leak in parsing error handling.

Fixes: 338327d731e6 ("devargs: add function to parse device layers")

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: Gaetan Rivet <grive@u256.net>
---
 lib/librte_eal/common/eal_common_devargs.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c
index 2123773ef8..0e350bc3ce 100644
--- a/lib/librte_eal/common/eal_common_devargs.c
+++ b/lib/librte_eal/common/eal_common_devargs.c
@@ -60,6 +60,7 @@ rte_devargs_layers_parse(struct rte_devargs *devargs,
 	size_t nblayer;
 	size_t i = 0;
 	int ret = 0;
+	bool allocated_data = false;
 
 	/* Split each sub-lists. */
 	nblayer = devargs_layer_count(devstr);
@@ -81,6 +82,7 @@ rte_devargs_layers_parse(struct rte_devargs *devargs,
 			ret = -ENOMEM;
 			goto get_out;
 		}
+		allocated_data = true;
 		s = devargs->data;
 	}
 
@@ -163,8 +165,14 @@ get_out:
 		if (layers[i].kvlist)
 			rte_kvargs_free(layers[i].kvlist);
 	}
-	if (ret != 0)
+	if (ret != 0) {
+		if (allocated_data) {
+			/* Free duplicated data. */
+			free(devargs->data);
+			devargs->data = NULL;
+		}
 		rte_errno = -ret;
+	}
 	return ret;
 }
 
-- 
2.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.492661267 +0200
+++ 0103-devargs-fix-memory-leak-on-parsing-failure.patch	2021-05-17 17:40:29.307810548 +0200
@@ -1 +1 @@
-From e132ee8690474fa985e26f1d4db75823024748c8 Mon Sep 17 00:00:00 2001
+From 4dc48d766c3ab8076786266d1bb6cfe1cd03d25c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e132ee8690474fa985e26f1d4db75823024748c8 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 48f85ee9c0..e40b91ea66 100644
+index 2123773ef8..0e350bc3ce 100644

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

* [dpdk-stable] patch 'eal: add C++ include guard for reciprocal header' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (101 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'devargs: fix memory leak on parsing failure' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'examples/l2fwd-crypto: skip masked devices' " Christian Ehrhardt
                   ` (85 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Tyler Retzlaff; +Cc: David Marchand, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 8b5417aa2a285b0b6552bb39518e4d74bf12d8c9 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

[ 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/common/include/rte_reciprocal.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/librte_eal/common/include/rte_reciprocal.h b/lib/librte_eal/common/include/rte_reciprocal.h
index 735adb029b..fa1cb4854e 100644
--- a/lib/librte_eal/common/include/rte_reciprocal.h
+++ b/lib/librte_eal/common/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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.526112262 +0200
+++ 0104-eal-add-C-include-guard-for-reciprocal-header.patch	2021-05-17 17:40:29.307810548 +0200
@@ -1 +1 @@
-From a6f88f7eb9ed077a02607cf9cd2b5101eda9f804 Mon Sep 17 00:00:00 2001
+From 8b5417aa2a285b0b6552bb39518e4d74bf12d8c9 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a6f88f7eb9ed077a02607cf9cd2b5101eda9f804 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -15 +16 @@
- lib/librte_eal/include/rte_reciprocal.h | 8 ++++++++
+ lib/librte_eal/common/include/rte_reciprocal.h | 8 ++++++++
@@ -18 +19 @@
-diff --git a/lib/librte_eal/include/rte_reciprocal.h b/lib/librte_eal/include/rte_reciprocal.h
+diff --git a/lib/librte_eal/common/include/rte_reciprocal.h b/lib/librte_eal/common/include/rte_reciprocal.h
@@ -20,2 +21,2 @@
---- a/lib/librte_eal/include/rte_reciprocal.h
-+++ b/lib/librte_eal/include/rte_reciprocal.h
+--- a/lib/librte_eal/common/include/rte_reciprocal.h
++++ b/lib/librte_eal/common/include/rte_reciprocal.h

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

* [dpdk-stable] patch 'examples/l2fwd-crypto: skip masked devices' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (102 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'eal: add C++ include guard for reciprocal header' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix packet length while decryption' " Christian Ehrhardt
                   ` (84 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Apeksha Gupta; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From a76754ea482f702d0f875d99cb99cd7f4fe0eee2 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

[ 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 827da9b3e3..26e0e5c824 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -2254,6 +2254,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.559097017 +0200
+++ 0105-examples-l2fwd-crypto-skip-masked-devices.patch	2021-05-17 17:40:29.307810548 +0200
@@ -1 +1 @@
-From 58266cc91efbf45e24fee3a15e23816da6941501 Mon Sep 17 00:00:00 2001
+From a76754ea482f702d0f875d99cb99cd7f4fe0eee2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 58266cc91efbf45e24fee3a15e23816da6941501 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 0ee3e1470a..1016ceb841 100644
+index 827da9b3e3..26e0e5c824 100644
@@ -22 +23 @@
-@@ -2251,6 +2251,12 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
+@@ -2254,6 +2254,12 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,

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

* [dpdk-stable] patch 'examples/l2fwd-crypto: fix packet length while decryption' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (103 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'examples/l2fwd-crypto: skip masked devices' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'crypto/qat: fix offset for out-of-place scatter-gather' " Christian Ehrhardt
                   ` (83 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Rohit Raj; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/984c68b3b344cf92f3f266c477837d0025eb0f39

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 984c68b3b344cf92f3f266c477837d0025eb0f39 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

[ 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 26e0e5c824..b09d017e46 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.596174160 +0200
+++ 0106-examples-l2fwd-crypto-fix-packet-length-while-decryp.patch	2021-05-17 17:40:29.307810548 +0200
@@ -1 +1 @@
-From 62c0b4484c455e9ba03d04dcf8403fef17e7d22d Mon Sep 17 00:00:00 2001
+From 984c68b3b344cf92f3f266c477837d0025eb0f39 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 62c0b4484c455e9ba03d04dcf8403fef17e7d22d ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index 1016ceb841..23a398043e 100644
+index 26e0e5c824..b09d017e46 100644

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

* [dpdk-stable] patch 'crypto/qat: fix offset for out-of-place scatter-gather' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (104 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix packet length while decryption' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'test: fix TCP header initialization' " Christian Ehrhardt
                   ` (82 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Arek Kusztal; +Cc: Declan Doherty, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/33a72320c478a23ee9b132cd9b53060f024c4cd8

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 33a72320c478a23ee9b132cd9b53060f024c4cd8 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

[ 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 fda20ad26d..9990507187 100644
--- a/drivers/crypto/qat/qat_sym.c
+++ b/drivers/crypto/qat/qat_sym.c
@@ -161,6 +161,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;
@@ -447,6 +448,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
@@ -507,7 +509,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.629763675 +0200
+++ 0107-crypto-qat-fix-offset-for-out-of-place-scatter-gathe.patch	2021-05-17 17:40:29.311810579 +0200
@@ -1 +1 @@
-From 935da450b414610a3aa2855fb9bb0c6f105e59ba Mon Sep 17 00:00:00 2001
+From 33a72320c478a23ee9b132cd9b53060f024c4cd8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 935da450b414610a3aa2855fb9bb0c6f105e59ba ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 2c0f5cd925..a1f5676c04 100644
+index fda20ad26d..9990507187 100644
@@ -23 +24 @@
-@@ -228,6 +228,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
+@@ -161,6 +161,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
@@ -31 +32 @@
-@@ -538,6 +539,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
+@@ -447,6 +448,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
@@ -39 +40 @@
-@@ -598,7 +600,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,
+@@ -507,7 +509,7 @@ qat_sym_build_request(void *in_op, uint8_t *out_msg,

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

* [dpdk-stable] patch 'test: fix TCP header initialization' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (105 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'crypto/qat: fix offset for out-of-place scatter-gather' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/e1000: fix max Rx packet size' " Christian Ehrhardt
                   ` (81 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Lance Richardson; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 7ce3bce887bcde8f40f95581f834c2c78f2d2285 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

[ 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.664862018 +0200
+++ 0108-test-fix-TCP-header-initialization.patch	2021-05-17 17:40:29.311810579 +0200
@@ -1 +1 @@
-From 9fdba32788d4adbac196ba0bb9398ba8c2d0d4bc Mon Sep 17 00:00:00 2001
+From 7ce3bce887bcde8f40f95581f834c2c78f2d2285 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9fdba32788d4adbac196ba0bb9398ba8c2d0d4bc ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org

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

* [dpdk-stable] patch 'net/e1000: fix max Rx packet size' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (106 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'test: fix TCP header initialization' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/ice: fix illegal access when removing MAC filter' " Christian Ehrhardt
                   ` (80 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Alvin Zhang; +Cc: Lingli Chen, Haiyue Wang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 9b54e27c7fe23d8a4755b4bff6bc58fad00b152c 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

[ 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 06ba55b875..96a1d42999 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -2710,8 +2710,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
@@ -2730,7 +2729,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 5260bbe341..cd70624c7f 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -2341,15 +2341,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.695181216 +0200
+++ 0109-net-e1000-fix-max-Rx-packet-size.patch	2021-05-17 17:40:29.315810609 +0200
@@ -1 +1 @@
-From ddbc8c16a97fd6662ecccf7e8431a9a3c7f43366 Mon Sep 17 00:00:00 2001
+From 9b54e27c7fe23d8a4755b4bff6bc58fad00b152c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ddbc8c16a97fd6662ecccf7e8431a9a3c7f43366 ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index 7d6d04abcb..3fdffe3294 100644
+index 06ba55b875..96a1d42999 100644
@@ -26 +27 @@
-@@ -2686,8 +2686,7 @@ igb_vlan_hw_extend_disable(struct rte_eth_dev *dev)
+@@ -2710,8 +2710,7 @@ igb_vlan_hw_extend_disable(struct rte_eth_dev *dev)
@@ -36 +37 @@
-@@ -2706,7 +2705,7 @@ igb_vlan_hw_extend_enable(struct rte_eth_dev *dev)
+@@ -2730,7 +2729,7 @@ igb_vlan_hw_extend_enable(struct rte_eth_dev *dev)
@@ -46 +47 @@
-index 45da4ed9d2..278d5d2712 100644
+index 5260bbe341..cd70624c7f 100644
@@ -49 +50 @@
-@@ -2343,15 +2343,18 @@ eth_igb_rx_init(struct rte_eth_dev *dev)
+@@ -2341,15 +2341,18 @@ eth_igb_rx_init(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/ice: fix illegal access when removing MAC filter' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (107 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/e1000: fix max Rx packet size' " Christian Ehrhardt
@ 2021-05-17 16:08 ` Christian Ehrhardt
  2021-05-17 16:09 ` [dpdk-stable] patch 'net/mlx4: fix RSS action with null hash key' " Christian Ehrhardt
                   ` (79 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:08 UTC (permalink / raw)
  To: Wenwu Ma; +Cc: Zhihong Peng, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/53c519355d8134504051f31c04821e9b19bd29eb

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 53c519355d8134504051f31c04821e9b19bd29eb 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

[ 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 00a6c7bcb3..7227d2182e 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"
@@ -1078,12 +1080,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;
@@ -1094,7 +1097,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) {
 		ret = ice_remove_vlan_filter(vsi, v_f->vlan_info.vlan_id);
 		if (ret != ICE_SUCCESS) {
 			ret = -EINVAL;
-- 
2.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.737105269 +0200
+++ 0110-net-ice-fix-illegal-access-when-removing-MAC-filter.patch	2021-05-17 17:40:29.315810609 +0200
@@ -1 +1 @@
-From f4b6eb2b91f38dc9ebc6c4e2b913fd1d25f14773 Mon Sep 17 00:00:00 2001
+From 53c519355d8134504051f31c04821e9b19bd29eb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f4b6eb2b91f38dc9ebc6c4e2b913fd1d25f14773 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -21 +22 @@
-index a1365131e0..84d1735255 100644
+index 00a6c7bcb3..7227d2182e 100644
@@ -33 +34 @@
-@@ -1092,12 +1094,13 @@ ice_remove_all_mac_vlan_filters(struct ice_vsi *vsi)
+@@ -1078,12 +1080,13 @@ ice_remove_all_mac_vlan_filters(struct ice_vsi *vsi)
@@ -48 +49 @@
-@@ -1108,7 +1111,7 @@ ice_remove_all_mac_vlan_filters(struct ice_vsi *vsi)
+@@ -1094,7 +1097,7 @@ ice_remove_all_mac_vlan_filters(struct ice_vsi *vsi)
@@ -53,2 +54,2 @@
-+	TAILQ_FOREACH_SAFE(v_f, &vsi->vlan_list, next, temp) {
- 		ret = ice_remove_vlan_filter(vsi, &v_f->vlan_info.vlan);
++	TAILQ_FOREACH_SAFE(v_f, &vsi->vlan_list, next) {
+ 		ret = ice_remove_vlan_filter(vsi, v_f->vlan_info.vlan_id);

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

* [dpdk-stable] patch 'net/mlx4: fix RSS action with null hash key' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (108 preceding siblings ...)
  2021-05-17 16:08 ` [dpdk-stable] patch 'net/ice: fix illegal access when removing MAC filter' " Christian Ehrhardt
@ 2021-05-17 16:09 ` Christian Ehrhardt
  2021-05-17 16:09 ` [dpdk-stable] patch 'net/ixgbe: fix Rx errors statistics for UDP checksum' " Christian Ehrhardt
                   ` (78 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:09 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 3ed1b3374823b3ced3e707a0c5c08aec9ca3f4e8 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

[ 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 2da4f6d965..b268c0fafa 100644
--- a/drivers/net/mlx4/mlx4_flow.c
+++ b/drivers/net/mlx4/mlx4_flow.c
@@ -792,7 +792,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.776854264 +0200
+++ 0111-net-mlx4-fix-RSS-action-with-null-hash-key.patch	2021-05-17 17:40:29.319810642 +0200
@@ -1 +1 @@
-From 4a750d29927e750b7197dc18fb9ebd9286324108 Mon Sep 17 00:00:00 2001
+From 3ed1b3374823b3ced3e707a0c5c08aec9ca3f4e8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4a750d29927e750b7197dc18fb9ebd9286324108 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 43a65abcc0..71ea91b3fb 100644
+index 2da4f6d965..b268c0fafa 100644
@@ -28 +29 @@
-@@ -791,7 +791,8 @@ fill:
+@@ -792,7 +792,8 @@ fill:

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

* [dpdk-stable] patch 'net/ixgbe: fix Rx errors statistics for UDP checksum' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (109 preceding siblings ...)
  2021-05-17 16:09 ` [dpdk-stable] patch 'net/mlx4: fix RSS action with null hash key' " Christian Ehrhardt
@ 2021-05-17 16:09 ` Christian Ehrhardt
  2021-05-17 16:09 ` [dpdk-stable] patch 'app/testpmd: fix bitmap of link speeds when force speed' " Christian Ehrhardt
                   ` (77 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:09 UTC (permalink / raw)
  To: Haiyue Wang; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From bb8e7233af0d94c2b5bf98305e223cbf738a295a 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

[ 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 9cb25bbf3a..2e424460d0 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -3382,6 +3382,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.812094927 +0200
+++ 0112-net-ixgbe-fix-Rx-errors-statistics-for-UDP-checksum.patch	2021-05-17 17:40:29.319810642 +0200
@@ -1 +1 @@
-From 2ee14c8905e9e39e2a5996b58fadd5403c808611 Mon Sep 17 00:00:00 2001
+From bb8e7233af0d94c2b5bf98305e223cbf738a295a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2ee14c8905e9e39e2a5996b58fadd5403c808611 ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 4ee709b17f..ff65145f55 100644
+index 9cb25bbf3a..2e424460d0 100644
@@ -22 +23 @@
-@@ -3344,6 +3344,13 @@ ixgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
+@@ -3382,6 +3382,13 @@ ixgbe_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)

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

* [dpdk-stable] patch 'app/testpmd: fix bitmap of link speeds when force speed' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (110 preceding siblings ...)
  2021-05-17 16:09 ` [dpdk-stable] patch 'net/ixgbe: fix Rx errors statistics for UDP checksum' " Christian Ehrhardt
@ 2021-05-17 16:09 ` Christian Ehrhardt
  2021-05-17 16:09 ` [dpdk-stable] patch 'ethdev: update flow item GTP QFI definition' " Christian Ehrhardt
                   ` (76 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:09 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, Ferruh Yigit, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 0bd755a5b369ec87c36ad2023f448108d8940b3a 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

[ 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 ecf36a7c67..d301971b2f 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1618,6 +1618,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.859427792 +0200
+++ 0113-app-testpmd-fix-bitmap-of-link-speeds-when-force-spe.patch	2021-05-17 17:40:29.331810737 +0200
@@ -1 +1 @@
-From 312312e928c71cb6b45aeaab2b421d059897dd07 Mon Sep 17 00:00:00 2001
+From 0bd755a5b369ec87c36ad2023f448108d8940b3a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 312312e928c71cb6b45aeaab2b421d059897dd07 ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index ec98ccc652..5bf1497f2b 100644
+index ecf36a7c67..d301971b2f 100644
@@ -25 +26 @@
-@@ -1525,6 +1525,9 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)
+@@ -1618,6 +1618,9 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)

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

* [dpdk-stable] patch 'ethdev: update flow item GTP QFI definition' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (111 preceding siblings ...)
  2021-05-17 16:09 ` [dpdk-stable] patch 'app/testpmd: fix bitmap of link speeds when force speed' " Christian Ehrhardt
@ 2021-05-17 16:09 ` Christian Ehrhardt
  2021-05-17 16:09 ` [dpdk-stable] patch 'net/hns3: fix VF handling LSC event in secondary process' " Christian Ehrhardt
                   ` (75 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:09 UTC (permalink / raw)
  To: Raslan Darawsheh; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From e7461728e6f42ec87a98fa7d6bcfff0f024a9b95 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

[ 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 17a41c21e5..4f77db31f6 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -3944,7 +3944,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 693824da8a..c32cd40434 100644
--- a/lib/librte_ethdev/rte_flow.h
+++ b/lib/librte_ethdev/rte_flow.h
@@ -1302,14 +1302,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.909898603 +0200
+++ 0114-ethdev-update-flow-item-GTP-QFI-definition.patch	2021-05-17 17:40:29.335810768 +0200
@@ -1 +1 @@
-From 7d96f5717a693546933aff4f6623c94976150c5b Mon Sep 17 00:00:00 2001
+From e7461728e6f42ec87a98fa7d6bcfff0f024a9b95 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7d96f5717a693546933aff4f6623c94976150c5b ]
+
@@ -20 +21,0 @@
-Cc: stable@dpdk.org
@@ -30 +31 @@
-index 72667dedb1..711683fa11 100644
+index 17a41c21e5..4f77db31f6 100644
@@ -33 +34 @@
-@@ -3767,7 +3767,8 @@ This section lists supported pattern items and their attributes, if any.
+@@ -3944,7 +3944,8 @@ This section lists supported pattern items and their attributes, if any.
@@ -44 +45 @@
-index 5eba79d26f..203c4cde9a 100644
+index 693824da8a..c32cd40434 100644
@@ -47 +48 @@
-@@ -1423,14 +1423,14 @@ static const struct rte_flow_item_meta rte_flow_item_meta_mask = {
+@@ -1302,14 +1302,14 @@ static const struct rte_flow_item_meta rte_flow_item_meta_mask = {

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

* [dpdk-stable] patch 'net/hns3: fix VF handling LSC event in secondary process' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (112 preceding siblings ...)
  2021-05-17 16:09 ` [dpdk-stable] patch 'ethdev: update flow item GTP QFI definition' " Christian Ehrhardt
@ 2021-05-17 16:09 ` Christian Ehrhardt
  2021-05-17 16:09 ` [dpdk-stable] patch 'net/hns3: fix flow control mode' " Christian Ehrhardt
                   ` (74 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:09 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/67069d4cd10b98677d48de5b7e93d0ccfc5ebcd4

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 67069d4cd10b98677d48de5b7e93d0ccfc5ebcd4 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen@huawei.com>
Date: Tue, 13 Apr 2021 19:50:02 +0800
Subject: [PATCH] net/hns3: fix VF handling LSC event in secondary process

[ upstream commit dbbbad23e380773b37872df2195c4529fd93ca6f ]

VF will build two queues (csq: command send queue, crq: command receive
queue) with firmware, the crq may contain the following messages:
1) mailbox response message which was the ack of mailbox sync request.
2) PF's link status change message which may send by PF at anytime;

Currently, any threads in the primary and secondary processes could
send mailbox sync request, so it will need to process the crq messages
in there own thread context.

If the crq hold two messages: a) PF's link status change message, b)
mailbox response message when secondary process deals with the crq
messages, it will lead to report lsc event in secondary process
because it uses the policy of processing all pending messages at once.

We use the following scheme to solve it:
1) threads in secondary process could only process specifics messages
   (eg. mailbox response message) in crq, if the message processed, its
   opcode will rewrite with zero, then the intr thread in primary
   process will not process again.
2) threads other than intr thread in the primary process use the same
   processing logic as the threads in secondary process.
3) intr thread in the primary process could process all messages.

Fixes: 76a3836b98c4 ("net/hns3: fix setting default MAC address in bonding of VF")
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 | 68 +++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
index 3f97b8100b..f289d57012 100644
--- a/drivers/net/hns3/hns3_mbx.c
+++ b/drivers/net/hns3/hns3_mbx.c
@@ -327,6 +327,44 @@ hns3_handle_link_change_event(struct hns3_hw *hw,
 	hns3_update_link_status(hw);
 }
 
+static void
+hns3_handle_mbx_msg_out_intr(struct hns3_hw *hw)
+{
+	struct hns3_cmq_ring *crq = &hw->cmq.crq;
+	struct hns3_mbx_pf_to_vf_cmd *req;
+	struct hns3_cmd_desc *desc;
+	uint32_t tail, next_to_use;
+	uint8_t opcode;
+	uint16_t flag;
+
+	tail = hns3_read_dev(hw, HNS3_CMDQ_RX_TAIL_REG);
+	next_to_use = crq->next_to_use;
+	while (next_to_use != tail) {
+		desc = &crq->desc[next_to_use];
+		req = (struct hns3_mbx_pf_to_vf_cmd *)desc->data;
+		opcode = req->msg[0] & 0xff;
+
+		flag = rte_le_to_cpu_16(crq->desc[next_to_use].flag);
+		if (!hns3_get_bit(flag, HNS3_CMDQ_RX_OUTVLD_B))
+			goto scan_next;
+
+		if (crq->desc[next_to_use].opcode == 0)
+			goto scan_next;
+
+		if (opcode == HNS3_MBX_PF_VF_RESP) {
+			hns3_handle_mbx_response(hw, req);
+			/*
+			 * Clear opcode to inform intr thread don't process
+			 * again.
+			 */
+			crq->desc[crq->next_to_use].opcode = 0;
+		}
+
+scan_next:
+		next_to_use = (next_to_use + 1) % hw->cmq.crq.desc_num;
+	}
+}
+
 void
 hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
 {
@@ -341,6 +379,29 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
 	uint8_t *temp;
 	int i;
 
+	if (rte_eal_process_type() != RTE_PROC_PRIMARY ||
+	    !rte_thread_is_intr()) {
+		/*
+		 * Currently, any threads in the primary and secondary processes
+		 * could send mailbox sync request, so it will need to process
+		 * the crq message (which is the HNS3_MBX_PF_VF_RESP) in there
+		 * own thread context. It may also process other messages
+		 * because it uses the policy of processing all pending messages
+		 * at once.
+		 * But some messages such as HNS3_MBX_PUSH_LINK_STATUS could
+		 * only process within the intr thread in primary process,
+		 * otherwise it may lead to report lsc event in secondary
+		 * process.
+		 * So the threads other than intr thread in primary process
+		 * could only process HNS3_MBX_PF_VF_RESP message, if the
+		 * message processed, its opcode will rewrite with zero, then
+		 * the intr thread in primary process will not process again.
+		 */
+		hns3_handle_mbx_msg_out_intr(hw);
+		rte_spinlock_unlock(&hw->cmq.crq.lock);
+		return;
+	}
+
 	while (!hns3_cmd_crq_empty(hw)) {
 		if (rte_atomic16_read(&hw->reset.disable_cmd))
 			return;
@@ -361,6 +422,13 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
 			continue;
 		}
 
+		if (desc->opcode == 0) {
+			/* Message already processed by other thread */
+			crq->desc[crq->next_to_use].flag = 0;
+			hns3_mbx_ring_ptr_move_crq(crq);
+			continue;
+		}
+
 		switch (opcode) {
 		case HNS3_MBX_PF_VF_RESP:
 			resp->resp_status = hns3_resp_to_errno(req->msg[3]);
-- 
2.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.949263197 +0200
+++ 0115-net-hns3-fix-VF-handling-LSC-event-in-secondary-proc.patch	2021-05-17 17:40:29.335810768 +0200
@@ -1 +1 @@
-From dbbbad23e380773b37872df2195c4529fd93ca6f Mon Sep 17 00:00:00 2001
+From 67069d4cd10b98677d48de5b7e93d0ccfc5ebcd4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit dbbbad23e380773b37872df2195c4529fd93ca6f ]
+
@@ -31 +32,0 @@
-Cc: stable@dpdk.org
@@ -40 +41 @@
-index 8e38649d21..c5b0856c96 100644
+index 3f97b8100b..f289d57012 100644
@@ -43,2 +44,2 @@
-@@ -400,6 +400,44 @@ hns3_handle_promisc_info(struct hns3_hw *hw, uint16_t promisc_en)
- 	}
+@@ -327,6 +327,44 @@ hns3_handle_link_change_event(struct hns3_hw *hw,
+ 	hns3_update_link_status(hw);
@@ -88,3 +89,3 @@
-@@ -411,6 +449,29 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
- 
- 	rte_spinlock_lock(&hw->cmq.crq.lock);
+@@ -341,6 +379,29 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
+ 	uint8_t *temp;
+ 	int i;
@@ -116,3 +117,3 @@
- 		if (__atomic_load_n(&hw->reset.disable_cmd, __ATOMIC_RELAXED)) {
- 			rte_spinlock_unlock(&hw->cmq.crq.lock);
-@@ -433,6 +494,13 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
+ 		if (rte_atomic16_read(&hw->reset.disable_cmd))
+ 			return;
+@@ -361,6 +422,13 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)
@@ -131 +132 @@
- 			hns3_handle_mbx_response(hw, req);
+ 			resp->resp_status = hns3_resp_to_errno(req->msg[3]);

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

* [dpdk-stable] patch 'net/hns3: fix flow control mode' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (113 preceding siblings ...)
  2021-05-17 16:09 ` [dpdk-stable] patch 'net/hns3: fix VF handling LSC event in secondary process' " Christian Ehrhardt
@ 2021-05-17 16:09 ` Christian Ehrhardt
  2021-05-17 16:09 ` [dpdk-stable] patch 'net/i40e: fix lack of MAC type when set MAC address' " Christian Ehrhardt
                   ` (73 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:09 UTC (permalink / raw)
  To: Huisong Li; +Cc: Min Hu, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/1848a73f3cf9e715feab831cea70f437df588171

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 1848a73f3cf9e715feab831cea70f437df588171 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

[ 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 7a2ba795cc..612c826e40 100644
--- a/drivers/net/hns3/hns3_dcb.c
+++ b/drivers/net/hns3/hns3_dcb.c
@@ -1103,7 +1103,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;
@@ -1280,7 +1280,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)
@@ -1390,7 +1390,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;
 
@@ -1420,7 +1420,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);
@@ -1441,7 +1441,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);
@@ -1518,8 +1518,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;
 
@@ -1606,7 +1605,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;
@@ -1614,7 +1612,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 =
@@ -1625,7 +1622,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) {
@@ -1636,7 +1633,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;
@@ -1660,18 +1656,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;
@@ -1685,7 +1679,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 4fbb5794c4..5b60d1d2cc 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -4791,8 +4791,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;
@@ -4816,19 +4819,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;
@@ -4839,7 +4842,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 ||
@@ -4874,9 +4876,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);
@@ -4890,8 +4889,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)) {
@@ -4926,12 +4923,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 e65b38c881..2cf81e9aec 100644
--- a/drivers/net/hns3/hns3_ethdev.h
+++ b/drivers/net/hns3/hns3_ethdev.h
@@ -382,8 +382,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:33.983650784 +0200
+++ 0116-net-hns3-fix-flow-control-mode.patch	2021-05-17 17:40:29.339810799 +0200
@@ -1 +1 @@
-From d4fdb71a0e7beb95b6e2c6ffe13fb159904317bf Mon Sep 17 00:00:00 2001
+From 1848a73f3cf9e715feab831cea70f437df588171 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d4fdb71a0e7beb95b6e2c6ffe13fb159904317bf ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -27 +28 @@
-index 096afe8d0c..30e59e80a6 100644
+index 7a2ba795cc..612c826e40 100644
@@ -30 +31 @@
-@@ -1238,7 +1238,7 @@ hns3_qs_bp_cfg(struct hns3_hw *hw, uint8_t tc, uint8_t grp_id, uint32_t bit_map)
+@@ -1103,7 +1103,7 @@ hns3_qs_bp_cfg(struct hns3_hw *hw, uint8_t tc, uint8_t grp_id, uint32_t bit_map)
@@ -39 +40 @@
-@@ -1415,7 +1415,7 @@ hns3_dcb_cfg_validate(struct hns3_adapter *hns, uint8_t *tc, bool *changed)
+@@ -1280,7 +1280,7 @@ hns3_dcb_cfg_validate(struct hns3_adapter *hns, uint8_t *tc, bool *changed)
@@ -48 +49 @@
-@@ -1529,7 +1529,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
+@@ -1390,7 +1390,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
@@ -57 +58 @@
-@@ -1559,7 +1559,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
+@@ -1420,7 +1420,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
@@ -66 +67 @@
-@@ -1580,7 +1580,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
+@@ -1441,7 +1441,7 @@ hns3_dcb_hw_configure(struct hns3_adapter *hns)
@@ -75 +76 @@
-@@ -1659,8 +1659,7 @@ hns3_dcb_init(struct hns3_hw *hw)
+@@ -1518,8 +1518,7 @@ hns3_dcb_init(struct hns3_hw *hw)
@@ -85 +86 @@
-@@ -1761,7 +1760,6 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
+@@ -1606,7 +1605,6 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
@@ -93 +94 @@
-@@ -1769,7 +1767,6 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
+@@ -1614,7 +1612,6 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
@@ -101 +102 @@
-@@ -1780,7 +1777,7 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
+@@ -1625,7 +1622,7 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
@@ -110 +111 @@
-@@ -1791,7 +1788,6 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
+@@ -1636,7 +1633,6 @@ hns3_dcb_pfc_enable(struct rte_eth_dev *dev, struct rte_eth_pfc_conf *pfc_conf)
@@ -118 +119 @@
-@@ -1815,18 +1811,16 @@ hns3_fc_enable(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -1660,18 +1656,16 @@ hns3_fc_enable(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
@@ -138 +139 @@
-@@ -1840,7 +1834,6 @@ hns3_fc_enable(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -1685,7 +1679,6 @@ hns3_fc_enable(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
@@ -147 +148 @@
-index ee471173e6..cd6b159047 100644
+index 4fbb5794c4..5b60d1d2cc 100644
@@ -150 +151 @@
-@@ -5496,8 +5496,11 @@ hns3_flow_ctrl_get(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -4791,8 +4791,11 @@ hns3_flow_ctrl_get(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
@@ -164 +165 @@
-@@ -5521,19 +5524,19 @@ hns3_get_fc_mode(struct hns3_hw *hw, enum rte_eth_fc_mode mode)
+@@ -4816,19 +4819,19 @@ hns3_get_fc_mode(struct hns3_hw *hw, enum rte_eth_fc_mode mode)
@@ -189 +190 @@
-@@ -5544,7 +5547,6 @@ static int
+@@ -4839,7 +4842,6 @@ static int
@@ -197 +198 @@
-@@ -5579,9 +5581,6 @@ hns3_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
+@@ -4874,9 +4876,6 @@ hns3_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
@@ -207 +208 @@
-@@ -5595,8 +5594,6 @@ hns3_priority_flow_ctrl_set(struct rte_eth_dev *dev,
+@@ -4890,8 +4889,6 @@ hns3_priority_flow_ctrl_set(struct rte_eth_dev *dev,
@@ -216 +217 @@
-@@ -5631,12 +5628,7 @@ hns3_priority_flow_ctrl_set(struct rte_eth_dev *dev,
+@@ -4926,12 +4923,7 @@ hns3_priority_flow_ctrl_set(struct rte_eth_dev *dev,
@@ -230 +231 @@
-index 17d24690bd..39afae7b80 100644
+index e65b38c881..2cf81e9aec 100644
@@ -233 +234 @@
-@@ -469,8 +469,7 @@ struct hns3_hw {
+@@ -382,8 +382,7 @@ struct hns3_hw {

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

* [dpdk-stable] patch 'net/i40e: fix lack of MAC type when set MAC address' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (114 preceding siblings ...)
  2021-05-17 16:09 ` [dpdk-stable] patch 'net/hns3: fix flow control mode' " Christian Ehrhardt
@ 2021-05-17 16:09 ` Christian Ehrhardt
  2021-05-17 16:09 ` [dpdk-stable] patch 'net/iavf: " Christian Ehrhardt
                   ` (72 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:09 UTC (permalink / raw)
  To: Robin Zhang; +Cc: Yan Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/332bb84d3ed4bf0609f10a69185f1d1c9bd85234

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 332bb84d3ed4bf0609f10a69185f1d1c9bd85234 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

[ 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 acd7b7eb88..1b4e76f60b 100644
--- a/drivers/net/i40e/base/virtchnl.h
+++ b/drivers/net/i40e/base/virtchnl.h
@@ -388,9 +388,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 56986991cd..49b5ead859 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,
@@ -801,10 +804,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);
@@ -813,83 +815,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
@@ -2066,6 +2055,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],
@@ -2823,6 +2813,10 @@ i40evf_set_default_mac_addr(struct rte_eth_dev *dev,
 {
 	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 	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.");
@@ -2832,9 +2826,13 @@ i40evf_set_default_mac_addr(struct rte_eth_dev *dev,
 	if (vf->flags & I40E_FLAG_VF_MAC_BY_PF)
 		return -EPERM;
 
-	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);
@@ -2878,6 +2876,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:34.028447685 +0200
+++ 0117-net-i40e-fix-lack-of-MAC-type-when-set-MAC-address.patch	2021-05-17 17:40:29.343810830 +0200
@@ -1 +1 @@
-From 3f604ddf33cf69d9a9a7645e67a7e0b915e76b6a Mon Sep 17 00:00:00 2001
+From 332bb84d3ed4bf0609f10a69185f1d1c9bd85234 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 3f604ddf33cf69d9a9a7645e67a7e0b915e76b6a ]
+
@@ -45 +46,0 @@
-Cc: stable@dpdk.org
@@ -55 +56 @@
-index 9c64fd4690..648072f5bb 100644
+index acd7b7eb88..1b4e76f60b 100644
@@ -58 +59 @@
-@@ -402,9 +402,36 @@ VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_queue_select);
+@@ -388,9 +388,36 @@ VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_queue_select);
@@ -97 +98 @@
-index 0c9bd8d2c6..7548062934 100644
+index 56986991cd..49b5ead859 100644
@@ -110 +111 @@
-@@ -823,10 +826,9 @@ i40evf_stop_queues(struct rte_eth_dev *dev)
+@@ -801,10 +804,9 @@ i40evf_stop_queues(struct rte_eth_dev *dev)
@@ -124 +125 @@
-@@ -835,83 +837,70 @@ i40evf_add_mac_addr(struct rte_eth_dev *dev,
+@@ -813,83 +815,70 @@ i40evf_add_mac_addr(struct rte_eth_dev *dev,
@@ -235 +236 @@
-@@ -2093,6 +2082,7 @@ i40evf_add_del_all_mac_addr(struct rte_eth_dev *dev, bool add)
+@@ -2066,6 +2055,7 @@ i40evf_add_del_all_mac_addr(struct rte_eth_dev *dev, bool add)
@@ -243,2 +244 @@
-@@ -2853,15 +2843,23 @@ i40evf_set_default_mac_addr(struct rte_eth_dev *dev,
- 			    struct rte_ether_addr *mac_addr)
+@@ -2823,6 +2813,10 @@ i40evf_set_default_mac_addr(struct rte_eth_dev *dev,
@@ -245,0 +246 @@
+ 	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
@@ -254,2 +255,3 @@
- 		return -EINVAL;
- 	}
+@@ -2832,9 +2826,13 @@ i40evf_set_default_mac_addr(struct rte_eth_dev *dev,
+ 	if (vf->flags & I40E_FLAG_VF_MAC_BY_PF)
+ 		return -EPERM;
@@ -269 +271 @@
-@@ -2905,6 +2903,7 @@ i40evf_add_del_mc_addr_list(struct rte_eth_dev *dev,
+@@ -2878,6 +2876,7 @@ i40evf_add_del_mc_addr_list(struct rte_eth_dev *dev,

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

* [dpdk-stable] patch 'net/iavf: fix lack of MAC type when set MAC address' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (115 preceding siblings ...)
  2021-05-17 16:09 ` [dpdk-stable] patch 'net/i40e: fix lack of MAC type when set MAC address' " Christian Ehrhardt
@ 2021-05-17 16:09 ` Christian Ehrhardt
  2021-05-17 16:09 ` [dpdk-stable] patch 'eventdev: fix case to initiate crypto adapter service' " Christian Ehrhardt
                   ` (71 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:09 UTC (permalink / raw)
  To: Robin Zhang; +Cc: Yan Xia, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From ecffee2c06a163a87634af7e850c08b6d9adbb0b 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

[ 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 b343f58004..432e700d84 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
@@ -233,7 +233,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_add_del_mc_addr_list(struct iavf_adapter *adapter,
 			      struct rte_ether_addr *mc_addrs,
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 717d6a242c..fc45a39714 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -792,7 +792,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;
@@ -814,7 +814,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");
 
@@ -1026,17 +1026,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",
@@ -1047,7 +1045,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 81ad748f4d..149c52e778 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -708,6 +708,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],
@@ -794,7 +795,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);
@@ -806,6 +807,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));
 
@@ -886,6 +888,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:34.062338684 +0200
+++ 0118-net-iavf-fix-lack-of-MAC-type-when-set-MAC-address.patch	2021-05-17 17:40:29.347810863 +0200
@@ -1 +1 @@
-From b335e7203475c82f79692171ce9add9f846d71ef Mon Sep 17 00:00:00 2001
+From ecffee2c06a163a87634af7e850c08b6d9adbb0b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b335e7203475c82f79692171ce9add9f846d71ef ]
+
@@ -12 +13,0 @@
-Cc: stable@dpdk.org
@@ -23 +24 @@
-index c934d2e614..d1ae5a3f0b 100644
+index b343f58004..432e700d84 100644
@@ -26 +27 @@
-@@ -328,7 +328,7 @@ int iavf_query_stats(struct iavf_adapter *adapter,
+@@ -233,7 +233,7 @@ int iavf_query_stats(struct iavf_adapter *adapter,
@@ -33,2 +34,2 @@
- 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);
+ int iavf_add_del_mc_addr_list(struct iavf_adapter *adapter,
+ 			      struct rte_ether_addr *mc_addrs,
@@ -36 +37 @@
-index 51cad48069..8f25a21e85 100644
+index 717d6a242c..fc45a39714 100644
@@ -39 +40 @@
-@@ -997,7 +997,7 @@ iavf_dev_add_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *addr,
+@@ -792,7 +792,7 @@ iavf_dev_add_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *addr,
@@ -43,2 +44,2 @@
--	err = iavf_add_del_eth_addr(adapter, addr, true);
-+	err = iavf_add_del_eth_addr(adapter, addr, true, VIRTCHNL_ETHER_ADDR_EXTRA);
+-	err = iavf_add_del_eth_addr(adapter, addr, TRUE);
++	err = iavf_add_del_eth_addr(adapter, addr, TRUE, VIRTCHNL_ETHER_ADDR_EXTRA);
@@ -48 +49 @@
-@@ -1019,7 +1019,7 @@ iavf_dev_del_mac_addr(struct rte_eth_dev *dev, uint32_t index)
+@@ -814,7 +814,7 @@ iavf_dev_del_mac_addr(struct rte_eth_dev *dev, uint32_t index)
@@ -52,2 +53,2 @@
--	err = iavf_add_del_eth_addr(adapter, addr, false);
-+	err = iavf_add_del_eth_addr(adapter, addr, false, VIRTCHNL_ETHER_ADDR_EXTRA);
+-	err = iavf_add_del_eth_addr(adapter, addr, FALSE);
++	err = iavf_add_del_eth_addr(adapter, addr, FALSE, VIRTCHNL_ETHER_ADDR_EXTRA);
@@ -57 +58 @@
-@@ -1339,17 +1339,15 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
+@@ -1026,17 +1026,15 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
@@ -74,2 +75,2 @@
--	ret = iavf_add_del_eth_addr(adapter, old_addr, false);
-+	ret = iavf_add_del_eth_addr(adapter, old_addr, false, VIRTCHNL_ETHER_ADDR_PRIMARY);
+-	ret = iavf_add_del_eth_addr(adapter, old_addr, FALSE);
++	ret = iavf_add_del_eth_addr(adapter, old_addr, FALSE, VIRTCHNL_ETHER_ADDR_PRIMARY);
@@ -79 +80 @@
-@@ -1360,7 +1358,7 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
+@@ -1047,7 +1045,7 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
@@ -83,2 +84,2 @@
--	ret = iavf_add_del_eth_addr(adapter, mac_addr, true);
-+	ret = iavf_add_del_eth_addr(adapter, mac_addr, true, VIRTCHNL_ETHER_ADDR_PRIMARY);
+-	ret = iavf_add_del_eth_addr(adapter, mac_addr, TRUE);
++	ret = iavf_add_del_eth_addr(adapter, mac_addr, TRUE, VIRTCHNL_ETHER_ADDR_PRIMARY);
@@ -89 +90 @@
-index aae5b900bb..45096cbfae 100644
+index 81ad748f4d..149c52e778 100644
@@ -92 +93 @@
-@@ -1166,6 +1166,7 @@ iavf_add_del_all_mac_addr(struct iavf_adapter *adapter, bool add)
+@@ -708,6 +708,7 @@ iavf_add_del_all_mac_addr(struct iavf_adapter *adapter, bool add)
@@ -100 +101 @@
-@@ -1261,7 +1262,7 @@ iavf_config_promisc(struct iavf_adapter *adapter,
+@@ -794,7 +795,7 @@ iavf_config_promisc(struct iavf_adapter *adapter,
@@ -109 +110 @@
-@@ -1273,6 +1274,7 @@ iavf_add_del_eth_addr(struct iavf_adapter *adapter, struct rte_ether_addr *addr,
+@@ -806,6 +807,7 @@ iavf_add_del_eth_addr(struct iavf_adapter *adapter, struct rte_ether_addr *addr,
@@ -117 +118 @@
-@@ -1550,6 +1552,7 @@ iavf_add_del_mc_addr_list(struct iavf_adapter *adapter,
+@@ -886,6 +888,7 @@ iavf_add_del_mc_addr_list(struct iavf_adapter *adapter,

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

* [dpdk-stable] patch 'eventdev: fix case to initiate crypto adapter service' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (116 preceding siblings ...)
  2021-05-17 16:09 ` [dpdk-stable] patch 'net/iavf: " Christian Ehrhardt
@ 2021-05-17 16:09 ` Christian Ehrhardt
  2021-05-17 16:09 ` [dpdk-stable] patch 'vfio: fix duplicated user mem map' " Christian Ehrhardt
                   ` (70 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:09 UTC (permalink / raw)
  To: Shijith Thotton; +Cc: Abhinandan Gujjar, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/112f02abc9a16873f4d9e7c0d103489e7c81c0eb

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 112f02abc9a16873f4d9e7c0d103489e7c81c0eb 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

[ 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 db9af8c200..3c330c6cbb 100644
--- a/lib/librte_eventdev/rte_event_crypto_adapter.c
+++ b/lib/librte_eventdev/rte_event_crypto_adapter.c
@@ -857,6 +857,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:34.100788869 +0200
+++ 0119-eventdev-fix-case-to-initiate-crypto-adapter-service.patch	2021-05-17 17:40:29.347810863 +0200
@@ -1 +1 @@
-From d69123d26620e729ea23a0e11166c3f5859bf6ce Mon Sep 17 00:00:00 2001
+From 112f02abc9a16873f4d9e7c0d103489e7c81c0eb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d69123d26620e729ea23a0e11166c3f5859bf6ce ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index d903cdd480..e1d38d383d 100644
+index db9af8c200..3c330c6cbb 100644
@@ -23 +24 @@
-@@ -861,6 +861,7 @@ rte_event_crypto_adapter_queue_pair_add(uint8_t id,
+@@ -857,6 +857,7 @@ rte_event_crypto_adapter_queue_pair_add(uint8_t id,

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

* [dpdk-stable] patch 'vfio: fix duplicated user mem map' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (117 preceding siblings ...)
  2021-05-17 16:09 ` [dpdk-stable] patch 'eventdev: fix case to initiate crypto adapter service' " Christian Ehrhardt
@ 2021-05-17 16:09 ` Christian Ehrhardt
  2021-05-17 16:09 ` [dpdk-stable] patch 'examples/ptpclient: remove wrong comment' " Christian Ehrhardt
                   ` (69 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:09 UTC (permalink / raw)
  To: Yunjian Wang; +Cc: Kevin Traynor, Anatoly Burakov, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From f6a20c5729acd0af11439db136110c0f901d75ac 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

[ 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/eal_vfio.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/librte_eal/linux/eal/eal_vfio.c b/lib/librte_eal/linux/eal/eal_vfio.c
index 25992ae92f..cb7de6f810 100644
--- a/lib/librte_eal/linux/eal/eal_vfio.c
+++ b/lib/librte_eal/linux/eal/eal_vfio.c
@@ -170,6 +170,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)
@@ -177,6 +181,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:34.136576110 +0200
+++ 0120-vfio-fix-duplicated-user-mem-map.patch	2021-05-17 17:40:29.347810863 +0200
@@ -1 +1 @@
-From 22677b0eef49ec30ef0facadee44b0084fc091ac Mon Sep 17 00:00:00 2001
+From f6a20c5729acd0af11439db136110c0f901d75ac Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 22677b0eef49ec30ef0facadee44b0084fc091ac ]
+
@@ -18 +19,0 @@
-Cc: stable@dpdk.org
@@ -24 +25 @@
- lib/librte_eal/linux/eal_vfio.c | 5 +++++
+ lib/librte_eal/linux/eal/eal_vfio.c | 5 +++++
@@ -27,5 +28,5 @@
-diff --git a/lib/librte_eal/linux/eal_vfio.c b/lib/librte_eal/linux/eal_vfio.c
-index fe25719991..25add2fa5d 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,
+diff --git a/lib/librte_eal/linux/eal/eal_vfio.c b/lib/librte_eal/linux/eal/eal_vfio.c
+index 25992ae92f..cb7de6f810 100644
+--- a/lib/librte_eal/linux/eal/eal_vfio.c
++++ b/lib/librte_eal/linux/eal/eal_vfio.c
+@@ -170,6 +170,10 @@ adjust_map(struct user_mem_map *src, struct user_mem_map *end,
@@ -42 +43 @@
-@@ -178,6 +182,7 @@ merge_map(struct user_mem_map *left, struct user_mem_map *right)
+@@ -177,6 +181,7 @@ merge_map(struct user_mem_map *left, struct user_mem_map *right)

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

* [dpdk-stable] patch 'examples/ptpclient: remove wrong comment' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (118 preceding siblings ...)
  2021-05-17 16:09 ` [dpdk-stable] patch 'vfio: fix duplicated user mem map' " Christian Ehrhardt
@ 2021-05-17 16:09 ` Christian Ehrhardt
  2021-05-17 16:09 ` [dpdk-stable] patch 'examples/l3fwd: fix LPM IPv6 subnets' " Christian Ehrhardt
                   ` (68 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:09 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/2d3f6fbd7580f0c4317d3d4c4fa77f5acf9676bb

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 2d3f6fbd7580f0c4317d3d4c4fa77f5acf9676bb 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

[ 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 a1a7ae699a..c5b0c79ed4 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:34.171834533 +0200
+++ 0121-examples-ptpclient-remove-wrong-comment.patch	2021-05-17 17:40:29.351810894 +0200
@@ -1 +1 @@
-From e1d10a42f6e0e44b07ea7936f6704b93a8d2a1ef Mon Sep 17 00:00:00 2001
+From 2d3f6fbd7580f0c4317d3d4c4fa77f5acf9676bb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e1d10a42f6e0e44b07ea7936f6704b93a8d2a1ef ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 33b297e37a..878d1a0b99 100644
+index a1a7ae699a..c5b0c79ed4 100644
@@ -21 +22 @@
-@@ -606,10 +606,6 @@ lcore_main(void)
+@@ -603,10 +603,6 @@ lcore_main(void)

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

* [dpdk-stable] patch 'examples/l3fwd: fix LPM IPv6 subnets' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (119 preceding siblings ...)
  2021-05-17 16:09 ` [dpdk-stable] patch 'examples/ptpclient: remove wrong comment' " Christian Ehrhardt
@ 2021-05-17 16:09 ` Christian Ehrhardt
  2021-05-17 16:09 ` [dpdk-stable] patch 'test/cmdline: fix inputs array' " Christian Ehrhardt
                   ` (67 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:09 UTC (permalink / raw)
  To: Conor Walsh; +Cc: Vladimir Medvedkin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/34bb672c0c978ad7ed90af691bc57a1cb8b57b68

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 34bb672c0c978ad7ed90af691bc57a1cb8b57b68 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

[ 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 349de2703c..c6b67cea2e 100644
--- a/examples/l3fwd/l3fwd_lpm.c
+++ b/examples/l3fwd/l3fwd_lpm.c
@@ -41,7 +41,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 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},
@@ -53,16 +56,19 @@ static 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 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_NUM_ROUTES \
-- 
2.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:34.204903671 +0200
+++ 0122-examples-l3fwd-fix-LPM-IPv6-subnets.patch	2021-05-17 17:40:29.351810894 +0200
@@ -1 +1 @@
-From 0c74a91ad6eb016cbc7bfd92d5aa414d04aa31ef Mon Sep 17 00:00:00 2001
+From 34bb672c0c978ad7ed90af691bc57a1cb8b57b68 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0c74a91ad6eb016cbc7bfd92d5aa414d04aa31ef ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 375746fef0..5af87dbd69 100644
+index 349de2703c..c6b67cea2e 100644
@@ -28 +29 @@
-@@ -42,7 +42,10 @@ struct ipv6_l3fwd_lpm_route {
+@@ -41,7 +41,10 @@ struct ipv6_l3fwd_lpm_route {
@@ -37 +38 @@
- static const struct ipv4_l3fwd_lpm_route ipv4_l3fwd_lpm_route_array[] = {
+ static struct ipv4_l3fwd_lpm_route ipv4_l3fwd_lpm_route_array[] = {
@@ -40 +41 @@
-@@ -54,16 +57,19 @@ static const struct ipv4_l3fwd_lpm_route ipv4_l3fwd_lpm_route_array[] = {
+@@ -53,16 +56,19 @@ static struct ipv4_l3fwd_lpm_route ipv4_l3fwd_lpm_route_array[] = {
@@ -49 +50 @@
- static const struct ipv6_l3fwd_lpm_route ipv6_l3fwd_lpm_route_array[] = {
+ static struct ipv6_l3fwd_lpm_route ipv6_l3fwd_lpm_route_array[] = {
@@ -68 +69 @@
- #define IPV4_L3FWD_LPM_MAX_RULES         1024
+ #define IPV4_L3FWD_LPM_NUM_ROUTES \

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

* [dpdk-stable] patch 'test/cmdline: fix inputs array' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (120 preceding siblings ...)
  2021-05-17 16:09 ` [dpdk-stable] patch 'examples/l3fwd: fix LPM IPv6 subnets' " Christian Ehrhardt
@ 2021-05-17 16:09 ` Christian Ehrhardt
  2021-05-17 16:09 ` [dpdk-stable] patch 'test: check thread creation' " Christian Ehrhardt
                   ` (66 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:09 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/20d9298ce0316749636b8c16093b376d14b6160d

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 20d9298ce0316749636b8c16093b376d14b6160d 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

[ 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 088cd5afc3..312ed79c49 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:34.239321543 +0200
+++ 0123-test-cmdline-fix-inputs-array.patch	2021-05-17 17:40:29.351810894 +0200
@@ -1 +1 @@
-From 414245bbc527b6ff6da0dc0787c6e5c67556d9ec Mon Sep 17 00:00:00 2001
+From 20d9298ce0316749636b8c16093b376d14b6160d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 414245bbc527b6ff6da0dc0787c6e5c67556d9ec ]
+
@@ -30 +32 @@
-index b3f50d80d2..2a1ee120fc 100644
+index 088cd5afc3..312ed79c49 100644

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

* [dpdk-stable] patch 'test: check thread creation' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (121 preceding siblings ...)
  2021-05-17 16:09 ` [dpdk-stable] patch 'test/cmdline: fix inputs array' " Christian Ehrhardt
@ 2021-05-17 16:09 ` Christian Ehrhardt
  2021-05-17 16:09 ` [dpdk-stable] patch 'common/dpaax: fix possible null pointer access' " Christian Ehrhardt
                   ` (65 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:09 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Min Hu, Reshma Pattan, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 8cf97af50dd3b2ee44f3daba354cb80fd6ed7ae0 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

[ 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 c3b3780337..20e8eedda8 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_LIBRTE_PDUMP
 #ifdef RTE_LIBRTE_RING_PMD
 	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_LIBRTE_PDUMP
 #ifdef RTE_LIBRTE_RING_PMD
-	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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:34.273204377 +0200
+++ 0124-test-check-thread-creation.patch	2021-05-17 17:40:29.351810894 +0200
@@ -1 +1 @@
-From a20cb9d0275eb7f0618b4ef2448544056e1035df Mon Sep 17 00:00:00 2001
+From 8cf97af50dd3b2ee44f3daba354cb80fd6ed7ae0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a20cb9d0275eb7f0618b4ef2448544056e1035df ]
+
@@ -10 +11,0 @@
-Cc: stable@dpdk.org
@@ -20 +21 @@
-index 27f1b1c0e6..a09a088477 100644
+index c3b3780337..20e8eedda8 100644
@@ -24,2 +25,2 @@
- #ifdef RTE_LIB_PDUMP
- #ifdef RTE_NET_RING
+ #ifdef RTE_LIBRTE_PDUMP
+ #ifdef RTE_LIBRTE_RING_PMD
@@ -33,2 +34,2 @@
- #ifdef RTE_LIB_PDUMP
- #ifdef RTE_NET_RING
+ #ifdef RTE_LIBRTE_PDUMP
+ #ifdef RTE_LIBRTE_RING_PMD

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

* [dpdk-stable] patch 'common/dpaax: fix possible null pointer access' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (122 preceding siblings ...)
  2021-05-17 16:09 ` [dpdk-stable] patch 'test: check thread creation' " Christian Ehrhardt
@ 2021-05-17 16:09 ` Christian Ehrhardt
  2021-05-17 16:09 ` [dpdk-stable] patch 'test/bpf: fix error message' " Christian Ehrhardt
                   ` (64 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:09 UTC (permalink / raw)
  To: Chengwen Feng; +Cc: Min Hu, Hemant Agrawal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From c1a732a680af84fcffad1af3696f530e9e683ebe 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

[ 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 98b076e09f..3f3be4ff9f 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -369,8 +369,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:34.308953269 +0200
+++ 0125-common-dpaax-fix-possible-null-pointer-access.patch	2021-05-17 17:40:29.351810894 +0200
@@ -1 +1 @@
-From 611c394c18598185d3f6f330d0cdf6c26316cc9b Mon Sep 17 00:00:00 2001
+From c1a732a680af84fcffad1af3696f530e9e683ebe Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 611c394c18598185d3f6f330d0cdf6c26316cc9b ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -19 +20 @@
-index 91bee65e7b..54f89e12ba 100644
+index 98b076e09f..3f3be4ff9f 100644
@@ -22 +23 @@
-@@ -366,8 +366,10 @@ dpaax_iova_table_dump(void)
+@@ -369,8 +369,10 @@ dpaax_iova_table_dump(void)

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

* [dpdk-stable] patch 'test/bpf: fix error message' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (123 preceding siblings ...)
  2021-05-17 16:09 ` [dpdk-stable] patch 'common/dpaax: fix possible null pointer access' " Christian Ehrhardt
@ 2021-05-17 16:09 ` Christian Ehrhardt
  2021-05-17 16:09 ` [dpdk-stable] patch 'test/power: add delay before checking CPU frequency' " Christian Ehrhardt
                   ` (63 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:09 UTC (permalink / raw)
  To: Min Hu (Connor); +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

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

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From c0be59c04371efa09e71a1186ab6ec029f239a47 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

[ 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 4a61a7d7cb..88048b4644 100644
--- a/app/test/test_bpf.c
+++ b/app/test/test_bpf.c
@@ -2744,7 +2744,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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:34.349517242 +0200
+++ 0126-test-bpf-fix-error-message.patch	2021-05-17 17:40:29.351810894 +0200
@@ -1 +1 @@
-From 7eff355b6983872ce4d2817ea8017d21320489e1 Mon Sep 17 00:00:00 2001
+From c0be59c04371efa09e71a1186ab6ec029f239a47 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7eff355b6983872ce4d2817ea8017d21320489e1 ]
+
@@ -9 +10,0 @@
-Cc: stable@dpdk.org
@@ -18 +19 @@
-index 7c3de96c62..527c06b807 100644
+index 4a61a7d7cb..88048b4644 100644
@@ -21 +22 @@
-@@ -3207,7 +3207,7 @@ run_test(const struct bpf_test *tst)
+@@ -2744,7 +2744,7 @@ run_test(const struct bpf_test *tst)

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

* [dpdk-stable] patch 'test/power: add delay before checking CPU frequency' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (124 preceding siblings ...)
  2021-05-17 16:09 ` [dpdk-stable] patch 'test/bpf: fix error message' " Christian Ehrhardt
@ 2021-05-17 16:09 ` Christian Ehrhardt
  2021-05-17 16:09 ` [dpdk-stable] patch 'test/power: round CPU frequency to check' " Christian Ehrhardt
                   ` (62 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:09 UTC (permalink / raw)
  To: Richael Zhuang; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/002beb990e5dcfeca7ae73a5ad5505e19f729f7e
our

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 002beb990e5dcfeca7ae73a5ad5505e19f729f7e 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

[ 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 d203810da9..188d789e0a 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:34.386989302 +0200
+++ 0127-test-power-add-delay-before-checking-CPU-frequency.patch	2021-05-17 17:40:29.355810924 +0200
@@ -1 +1 @@
-From 00456850be40d8b663d1066763ddedffe4346585 Mon Sep 17 00:00:00 2001
+From 002beb990e5dcfeca7ae73a5ad5505e19f729f7e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 00456850be40d8b663d1066763ddedffe4346585 ]
+
@@ -16 +17,0 @@
-Cc: stable@dpdk.org
@@ -25 +26 @@
-index 731c6b4dc8..d47b3e0a1a 100644
+index d203810da9..188d789e0a 100644

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

* [dpdk-stable] patch 'test/power: round CPU frequency to check' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (125 preceding siblings ...)
  2021-05-17 16:09 ` [dpdk-stable] patch 'test/power: add delay before checking CPU frequency' " Christian Ehrhardt
@ 2021-05-17 16:09 ` Christian Ehrhardt
  2021-05-17 16:09 ` [dpdk-stable] patch 'examples: add eal cleanup to examples' " Christian Ehrhardt
                   ` (61 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:09 UTC (permalink / raw)
  To: Richael Zhuang; +Cc: David Hunt, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/46adbafe91c306e648c8923f4b4c619b5d69e1e8

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 46adbafe91c306e648c8923f4b4c619b5d69e1e8 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

[ 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 188d789e0a..6c2f5ced72 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.31.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-17 17:40:34.423585191 +0200
+++ 0128-test-power-round-CPU-frequency-to-check.patch	2021-05-17 17:40:29.355810924 +0200
@@ -1 +1 @@
-From 606a234c6d3607c93a0426bdccdbf9aaa2b8e5f6 Mon Sep 17 00:00:00 2001
+From 46adbafe91c306e648c8923f4b4c619b5d69e1e8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 606a234c6d3607c93a0426bdccdbf9aaa2b8e5f6 ]
+
@@ -13 +14,0 @@
-Cc: stable@dpdk.org
@@ -22 +23 @@
-index d47b3e0a1a..f753d24ac5 100644
+index 188d789e0a..6c2f5ced72 100644

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

* [dpdk-stable] patch 'examples: add eal cleanup to examples' has been queued to stable release 19.11.9
  2021-05-17 16:07 [dpdk-stable] patch 'vfio: do not merge contiguous areas' has been queued to stable release 19.11.9 Christian Ehrhardt
                   ` (126 preceding siblings ...)
  2021-05-17 16:09 ` [dpdk-stable] patch 'test/power: round CPU frequency to check' " Christian Ehrhardt
@ 2021-05-17 16:09 ` Christian Ehrhardt
  2021-05-17 16:09 ` [dpdk-stable] patch 'examples/ethtool: remove unused parsing' " Christian Ehrhardt
                   ` (60 subsequent siblings)
  188 siblings, 0 replies; 191+ messages in thread
From: Christian Ehrhardt @ 2021-05-17 16:09 UTC (permalink / raw)
  To: Chengchang Tang; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.9

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/19/21. So please
shout if anyone has objections.

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

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/036cff489ea2c5b77de407d837090a708fd89307

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From 036cff489ea2c5b77de407d837090a708fd89307 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

[ 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                             | 3 +++
 examples/helloworld/main.c                                 | 4 ++++
 examples/ioat/ioatfwd.c                                    | 3 +++
 examples/ip_fragmentation/main.c                           | 3 +++
 examples/ip_pipeline/main.c                                | 3 +++
 examples/ip_reassembly/main.c                              | 3 +++
 examples/ipsec-secgw/ipsec-secgw.c                         | 2 ++
 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/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/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 +++
 50 files changed, 159 insertions(+), 1 deletion(-)

diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c
index db2dc33345..a5e69d5852 100644
--- a/examples/bbdev_app/main.c
+++ b/examples/bbdev_app/main.c
@@ -1171,5 +1171,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 ee8fa2d271..d4de4b9e68 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -879,5 +879,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 f2f2e5a2f4..dd3bfab9d1 100644
--- a/examples/cmdline/main.c
+++ b/examples/cmdline/main.c
@@ -37,5 +37,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 567c5e9891..3f606a80a0 100644
--- a/examples/distributor/main.c
+++ b/examples/distributor/main.c
@@ -935,5 +935,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 29891012ac..608327170f 100644
--- a/examples/ethtool/ethtool-app/main.c
+++ b/examples/ethtool/ethtool-app/main.c
@@ -298,5 +298,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 eadfdb4bac..2f8238886b 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -433,6 +433,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 1c12bbb2fd..060f0c9402 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 master 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 cc9e7e7808..6188f9c6bb 100644
--- a/examples/flow_filtering/main.c
+++ b/examples/flow_filtering/main.c
@@ -256,5 +256,8 @@ main(int argc, char **argv)
 
 	main_loop();
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/helloworld/main.c b/examples/helloworld/main.c
index c922cfbad7..d2f262b86b 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 7971442b5d..087bdcf66a 100644
--- a/examples/ioat/ioatfwd.c
+++ b/examples/ioat/ioatfwd.c
@@ -1013,6 +1013,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 90e4d1ea4a..435b6eca61 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -1078,5 +1078,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/ip_pipeline/main.c b/examples/ip_pipeline/main.c
index 97d1e91c2b..95051fca49 100644
--- a/examples/ip_pipeline/main.c
+++ b/examples/ip_pipeline/main.c
@@ -266,4 +266,7 @@ main(int argc, char **argv)
 
 		kni_handle_request();
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
 }
diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index 29b34d0710..89ff1a06b6 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -1207,5 +1207,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 1493be9025..8e9b45493a 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -2543,5 +2543,7 @@ main(int32_t argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
 	return 0;
 }
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index 09d9270aff..83bdeb7403 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -811,5 +811,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 7edc73ab91..a696a83578 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -1120,5 +1120,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 6838f288c6..87d6c930b6 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 master 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 b09d017e46..063db823bd 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -2828,5 +2828,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 7969a1c313..5bfdcf42ef 100644
--- a/examples/l2fwd-event/main.c
+++ b/examples/l2fwd-event/main.c
@@ -583,6 +583,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 c2180c2d1c..b50ba604eb 100644
--- a/examples/l2fwd-jobstats/main.c
+++ b/examples/l2fwd-jobstats/main.c
@@ -1028,5 +1028,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 ba2745c915..935987bf8f 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -823,5 +823,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 e3767a3159..1d850fcfc1 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -772,6 +772,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 cfbeee962b..430d42d103 100644
--- a/examples/l3fwd-acl/main.c
+++ b/examples/l3fwd-acl/main.c
@@ -2116,5 +2116,8 @@ main(int argc, char **argv)
 			return -1;
 	}
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index b98040df45..19722f0c4c 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -1093,6 +1093,10 @@ 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/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
index 6b8c153b58..26595bb47a 100644
--- a/examples/link_status_interrupt/main.c
+++ b/examples/link_status_interrupt/main.c
@@ -741,5 +741,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 1084b303ff..b349d90d92 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_MASTER);
 
 	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 e6c69d6a33..0304c453ec 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 c5cd8825e5..a5ff1fee6e 100644
--- a/examples/multi_process/symmetric_mp/main.c
+++ b/examples/multi_process/symmetric_mp/main.c
@@ -475,5 +475,8 @@ main(int argc, char **argv)
 
 	rte_eal_mp_remote_launch(lcore_main, NULL, CALL_MASTER);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c
index 17eedcf0b8..4630ece311 100644
--- a/examples/ntb/ntb_fwd.c
+++ b/examples/ntb/ntb_fwd.c
@@ -1496,5 +1496,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 4eea8a3318..c9f645e67e 100644
--- a/examples/packet_ordering/main.c
+++ b/examples/packet_ordering/main.c
@@ -779,5 +779,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 96fbdcdde2..aee075f2d2 100644
--- a/examples/performance-thread/l3fwd-thread/main.c
+++ b/examples/performance-thread/l3fwd-thread/main.c
@@ -3783,5 +3783,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 03ff394369..d137c49bb3 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_SLAVE(lcore_id) {
 		rte_eal_wait_lcore(lcore_id);
 	}
+
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }
diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c
index c5b0c79ed4..e13a491c27 100644
--- a/examples/ptpclient/ptpclient.c
+++ b/examples/ptpclient/ptpclient.c
@@ -784,5 +784,8 @@ main(int argc, char *argv[])
 	/* Call lcore_main on the master 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 e8112c83a2..03129c85f4 100644
--- a/examples/qos_meter/main.c
+++ b/examples/qos_meter/main.c
@@ -463,5 +463,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 c0ed16b68f..4dc65e10c2 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 07e95e8d1a..35648226fe 100644
--- a/examples/rxtx_callbacks/main.c
+++ b/examples/rxtx_callbacks/main.c
@@ -304,5 +304,9 @@ main(int argc, char *argv[])
 
 	/* call lcore_main on master 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 21c72acda2..c42b6530c0 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_MASTER);
 
 	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 73d313b84e..6f6b59e6f7 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 master 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 968a941367..9f1730f932 100644
--- a/examples/timer/main.c
+++ b/examples/timer/main.c
@@ -117,5 +117,8 @@ main(int argc, char **argv)
 	/* call it on master 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 d2e2cb7cd4..c3be9159fb 100644
--- a/examples/vdpa/main.c
+++ b/examples/vdpa/main.c
@@ -450,5 +450,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 312829e8b9..135aafa5b4 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -1571,6 +1571,8 @@ main(int argc, char *argv[])
 	RTE_LCORE_FOREACH_SLAVE(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 d0c30a9c6f..57f0adf50f 100644
--- a/examples/vhost_blk/vhost_blk.c
+++ b/examples/vhost_blk/vhost_blk.c
@@ -1098,5 +1098,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 7973b57564..03fb238758 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 2316aace5a..2f82b878fe 100644
--- a/examples/vm_power_manager/main.c
+++ b/examples/vm_power_manager/main.c
@@ -469,5 +469,8 @@ main(int argc, char **argv)
 
 	free(ci->cd);
 
+	/* clean up the EAL */
+	rte_eal_cleanup();
+
 	return 0;
 }