patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2
@ 2019-04-16 14:36 Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'common/cpt: fix null auth only' " Kevin Traynor
                   ` (59 more replies)
  0 siblings, 60 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 0b607ae7c436057dae1a6b8c9aeedb89fa21e85f Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Thu, 17 Jan 2019 17:30:32 +0000
Subject: [PATCH] eal: support strlcat function

[ upstream commit 146e57627f4b53dbdeecea3ee1f36f185cb55661 ]

Add the strlcat function to DPDK to exist alongside the strlcpy one.
While strncat is generally safe for use for concatenation, the API for the
strlcat function is perhaps a little nicer to use, and supports truncation
detection.

See commit 5364de644a4b ("eal: support strlcpy function") for more
details on the function selection logic, since we only should be using the
DPDK-provided version when no system-provided version is present.

Picked to stable branch to ease backports of bugfixes using strlcat.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 .../common/include/rte_string_fns.h           | 16 +++++++
 test/test/test_string_fns.c                   | 45 +++++++++++++++++++
 2 files changed, 61 insertions(+)

diff --git a/lib/librte_eal/common/include/rte_string_fns.h b/lib/librte_eal/common/include/rte_string_fns.h
index 9a2a1ff90..35c6b003c 100644
--- a/lib/librte_eal/common/include/rte_string_fns.h
+++ b/lib/librte_eal/common/include/rte_string_fns.h
@@ -60,8 +60,23 @@ rte_strlcpy(char *dst, const char *src, size_t size)
 }
 
+/**
+ * @internal
+ * DPDK-specific version of strlcat for systems without
+ * libc or libbsd copies of the function
+ */
+static inline size_t
+rte_strlcat(char *dst, const char *src, size_t size)
+{
+	size_t l = strnlen(dst, size);
+	if (l < size)
+		return l + rte_strlcpy(&dst[l], src, size - l);
+	return l + strlen(src);
+}
+
 /* pull in a strlcpy function */
 #ifdef RTE_EXEC_ENV_BSDAPP
 #ifndef __BSD_VISIBLE /* non-standard functions are hidden */
 #define strlcpy(dst, src, size) rte_strlcpy(dst, src, size)
+#define strlcat(dst, src, size) rte_strlcat(dst, src, size)
 #endif
 
@@ -72,4 +87,5 @@ rte_strlcpy(char *dst, const char *src, size_t size)
 #else /* no BSD header files, create own */
 #define strlcpy(dst, src, size) rte_strlcpy(dst, src, size)
+#define strlcat(dst, src, size) rte_strlcat(dst, src, size)
 
 #endif /* RTE_USE_LIBBSD */
diff --git a/test/test/test_string_fns.c b/test/test/test_string_fns.c
index 3f091ab92..5e105d2bb 100644
--- a/test/test/test_string_fns.c
+++ b/test/test/test_string_fns.c
@@ -130,4 +130,47 @@ test_rte_strsplit(void)
 }
 
+static int
+test_rte_strlcat(void)
+{
+	/* only run actual unit tests if we have system-provided strlcat */
+#if defined(__BSD_VISIBLE) || defined(RTE_USE_LIBBSD)
+#define BUF_LEN 32
+	const char dst[BUF_LEN] = "Test string";
+	const char src[] = " appended";
+	char bsd_dst[BUF_LEN];
+	char rte_dst[BUF_LEN];
+	size_t i, bsd_ret, rte_ret;
+
+	LOG("dst = '%s', strlen(dst) = %zu\n", dst, strlen(dst));
+	LOG("src = '%s', strlen(src) = %zu\n", src, strlen(src));
+	LOG("---\n");
+
+	for (i = 0; i < BUF_LEN; i++) {
+		/* initialize destination buffers */
+		memcpy(bsd_dst, dst, BUF_LEN);
+		memcpy(rte_dst, dst, BUF_LEN);
+		/* compare implementations */
+		bsd_ret = strlcat(bsd_dst, src, i);
+		rte_ret = rte_strlcat(rte_dst, src, i);
+		if (bsd_ret != rte_ret) {
+			LOG("Incorrect retval for buf length = %zu\n", i);
+			LOG("BSD: '%zu', rte: '%zu'\n", bsd_ret, rte_ret);
+			return -1;
+		}
+		if (memcmp(bsd_dst, rte_dst, BUF_LEN) != 0) {
+			LOG("Resulting buffers don't match\n");
+			LOG("BSD: '%s', rte: '%s'\n", bsd_dst, rte_dst);
+			return -1;
+		}
+		LOG("buffer size = %zu: dst = '%s', ret = %zu\n",
+			i, rte_dst, rte_ret);
+	}
+	LOG("Checked %zu combinations\n", i);
+#undef BUF_LEN
+#endif /* defined(__BSD_VISIBLE) || defined(RTE_USE_LIBBSD) */
+
+	return 0;
+}
+
 static int
 test_string_fns(void)
@@ -135,4 +178,6 @@ test_string_fns(void)
 	if (test_rte_strsplit() < 0)
 		return -1;
+	if (test_rte_strlcat() < 0)
+		return -1;
 	return 0;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:25.269273441 +0100
+++ 0001-eal-support-strlcat-function.patch	2019-04-16 15:34:25.100181725 +0100
@@ -1,8 +1,10 @@
-From 146e57627f4b53dbdeecea3ee1f36f185cb55661 Mon Sep 17 00:00:00 2001
+From 0b607ae7c436057dae1a6b8c9aeedb89fa21e85f Mon Sep 17 00:00:00 2001
 From: Bruce Richardson <bruce.richardson@intel.com>
 Date: Thu, 17 Jan 2019 17:30:32 +0000
 Subject: [PATCH] eal: support strlcat function
 
+[ upstream commit 146e57627f4b53dbdeecea3ee1f36f185cb55661 ]
+
 Add the strlcat function to DPDK to exist alongside the strlcpy one.
 While strncat is generally safe for use for concatenation, the API for the
 strlcat function is perhaps a little nicer to use, and supports truncation
@@ -12,6 +14,8 @@
 details on the function selection logic, since we only should be using the
 DPDK-provided version when no system-provided version is present.
 
+Picked to stable branch to ease backports of bugfixes using strlcat.
+
 Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
 ---

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

* [dpdk-stable] patch 'common/cpt: fix null auth only' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'crypto/openssl: fix big numbers after computations' " Kevin Traynor
                   ` (58 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Anoob Joseph; +Cc: Tejasree Kondoj, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From aade391026a6e1581a856d17cffcfa2580ccf6de Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj@marvell.com>
Date: Wed, 13 Feb 2019 09:22:50 +0000
Subject: [PATCH] common/cpt: fix null auth only

[ upstream commit 3ca687a4a02dedd2469ddd9824bbd531d5828a0c ]

Fixes: 351fbee21986 ("common/cpt: support hash")

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
---
 drivers/common/cpt/cpt_ucode.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/cpt/cpt_ucode.h b/drivers/common/cpt/cpt_ucode.h
index 5933ea77e..d408d50e3 100644
--- a/drivers/common/cpt/cpt_ucode.h
+++ b/drivers/common/cpt/cpt_ucode.h
@@ -550,5 +550,5 @@ cpt_digest_gen_prep(uint32_t flags,
 		opcode.s.minor = 0x03;
 		/* Send out completion code only */
-		vq_cmd_w0.s.param2 = 0x1;
+		vq_cmd_w0.s.param2 = rte_cpu_to_be_16(0x1);
 	}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:25.310435245 +0100
+++ 0002-common-cpt-fix-null-auth-only.patch	2019-04-16 15:34:25.103181658 +0100
@@ -1,10 +1,11 @@
-From 3ca687a4a02dedd2469ddd9824bbd531d5828a0c Mon Sep 17 00:00:00 2001
+From aade391026a6e1581a856d17cffcfa2580ccf6de Mon Sep 17 00:00:00 2001
 From: Anoob Joseph <anoobj@marvell.com>
 Date: Wed, 13 Feb 2019 09:22:50 +0000
 Subject: [PATCH] common/cpt: fix null auth only
 
+[ upstream commit 3ca687a4a02dedd2469ddd9824bbd531d5828a0c ]
+
 Fixes: 351fbee21986 ("common/cpt: support hash")
-Cc: stable@dpdk.org
 
 Signed-off-by: Anoob Joseph <anoobj@marvell.com>
 Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>

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

* [dpdk-stable] patch 'crypto/openssl: fix big numbers after computations' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'common/cpt: fix null auth only' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'crypto/openssl: fix modexp' " Kevin Traynor
                   ` (57 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Arek Kusztal; +Cc: Fiona Trahe, Shally Verma, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 0af95c7eef36b836fde38499e48436284abb2552 Mon Sep 17 00:00:00 2001
From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Date: Thu, 7 Feb 2019 11:54:39 +0100
Subject: [PATCH] crypto/openssl: fix big numbers after computations

[ upstream commit 990b180290203c32b8df9e1179f989270354cd13 ]

After performing mod exp and mod inv big numbers (BIGNUM) should
be cleared as data already is copied into op fields and this BNs would
very likely contain private information for unspecified amount of time
(duration of the session).

Fixes: 3e9d6bd447fb ("crypto/openssl: add RSA and mod asym operations")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Shally Verma <shallyv@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 11ea0d190..ece512563 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1800,4 +1800,7 @@ process_openssl_modinv_op(struct rte_crypto_op *cop,
 	}
 
+	BN_clear(res);
+	BN_clear(base);
+
 	return 0;
 }
@@ -1832,4 +1835,7 @@ process_openssl_modexp_op(struct rte_crypto_op *cop,
 	}
 
+	BN_clear(res);
+	BN_clear(base);
+
 	return 0;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:25.354611866 +0100
+++ 0003-crypto-openssl-fix-big-numbers-after-computations.patch	2019-04-16 15:34:25.105181614 +0100
@@ -1,15 +1,16 @@
-From 990b180290203c32b8df9e1179f989270354cd13 Mon Sep 17 00:00:00 2001
+From 0af95c7eef36b836fde38499e48436284abb2552 Mon Sep 17 00:00:00 2001
 From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
 Date: Thu, 7 Feb 2019 11:54:39 +0100
 Subject: [PATCH] crypto/openssl: fix big numbers after computations
 
+[ upstream commit 990b180290203c32b8df9e1179f989270354cd13 ]
+
 After performing mod exp and mod inv big numbers (BIGNUM) should
 be cleared as data already is copied into op fields and this BNs would
 very likely contain private information for unspecified amount of time
 (duration of the session).
 
 Fixes: 3e9d6bd447fb ("crypto/openssl: add RSA and mod asym operations")
-Cc: stable@dpdk.org
 
 Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
 Acked-by: Fiona Trahe <fiona.trahe@intel.com>
@@ -20,10 +21,10 @@
  1 file changed, 6 insertions(+)
 
 diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
-index ea5aac69e..4ecc3c414 100644
+index 11ea0d190..ece512563 100644
 --- a/drivers/crypto/openssl/rte_openssl_pmd.c
 +++ b/drivers/crypto/openssl/rte_openssl_pmd.c
-@@ -1796,4 +1796,7 @@ process_openssl_modinv_op(struct rte_crypto_op *cop,
+@@ -1800,4 +1800,7 @@ process_openssl_modinv_op(struct rte_crypto_op *cop,
  	}
  
 +	BN_clear(res);
@@ -31,7 +32,7 @@
 +
  	return 0;
  }
-@@ -1826,4 +1829,7 @@ process_openssl_modexp_op(struct rte_crypto_op *cop,
+@@ -1832,4 +1835,7 @@ process_openssl_modexp_op(struct rte_crypto_op *cop,
  	}
  
 +	BN_clear(res);

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

* [dpdk-stable] patch 'crypto/openssl: fix modexp' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'common/cpt: fix null auth only' " Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'crypto/openssl: fix big numbers after computations' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'test/crypto: fix duplicate id used by CCP device' " Kevin Traynor
                   ` (56 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Arek Kusztal; +Cc: Fiona Trahe, Shally Verma, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 6e596662713ccc21c93491e6edfb4b399bdbc28a Mon Sep 17 00:00:00 2001
From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Date: Tue, 5 Feb 2019 10:13:19 +0100
Subject: [PATCH] crypto/openssl: fix modexp

[ upstream commit 27323f538597965add7ae1bef95abd7bf0a655a8 ]

Fixes bad reference of modinv struct in openssl pmd

Fixes: 3e9d6bd447fb ("crypto/openssl: add RSA and mod asym operations")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Shally Verma <shallyv@marvell.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/openssl/rte_openssl_pmd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index ece512563..5b27bb919 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -1824,10 +1824,10 @@ process_openssl_modexp_op(struct rte_crypto_op *cop,
 	}
 
-	base = BN_bin2bn((const unsigned char *)op->modinv.base.data,
-			op->modinv.base.length, base);
+	base = BN_bin2bn((const unsigned char *)op->modex.base.data,
+			op->modex.base.length, base);
 
 	if (BN_mod_exp(res, base, sess->u.e.exp,
 				sess->u.e.mod, sess->u.e.ctx)) {
-		op->modinv.base.length = BN_bn2bin(res, op->modinv.base.data);
+		op->modex.base.length = BN_bn2bin(res, op->modex.base.data);
 		cop->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
 	} else {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:25.395434568 +0100
+++ 0004-crypto-openssl-fix-modexp.patch	2019-04-16 15:34:25.107181570 +0100
@@ -1,12 +1,13 @@
-From 27323f538597965add7ae1bef95abd7bf0a655a8 Mon Sep 17 00:00:00 2001
+From 6e596662713ccc21c93491e6edfb4b399bdbc28a Mon Sep 17 00:00:00 2001
 From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
 Date: Tue, 5 Feb 2019 10:13:19 +0100
 Subject: [PATCH] crypto/openssl: fix modexp
 
+[ upstream commit 27323f538597965add7ae1bef95abd7bf0a655a8 ]
+
 Fixes bad reference of modinv struct in openssl pmd
 
 Fixes: 3e9d6bd447fb ("crypto/openssl: add RSA and mod asym operations")
-Cc: stable@dpdk.org
 
 Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
 Acked-by: Fiona Trahe <fiona.trahe@intel.com>
@@ -17,10 +18,10 @@
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
-index 4ecc3c414..51cdd9b96 100644
+index ece512563..5b27bb919 100644
 --- a/drivers/crypto/openssl/rte_openssl_pmd.c
 +++ b/drivers/crypto/openssl/rte_openssl_pmd.c
-@@ -1818,10 +1818,10 @@ process_openssl_modexp_op(struct rte_crypto_op *cop,
+@@ -1824,10 +1824,10 @@ process_openssl_modexp_op(struct rte_crypto_op *cop,
  	}
  
 -	base = BN_bin2bn((const unsigned char *)op->modinv.base.data,

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

* [dpdk-stable] patch 'test/crypto: fix duplicate id used by CCP device' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (2 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'crypto/openssl: fix modexp' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-17  6:55   ` [dpdk-stable] [EXT] " Hemant Agrawal
  2019-04-16 14:36 ` [dpdk-stable] patch 'event/opdl: replace sprintf with snprintf' " Kevin Traynor
                   ` (55 subsequent siblings)
  59 siblings, 1 reply; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: Anoob Joseph, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 28632b66553b11af1ff3d9e151957a7dd4f47dc5 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Wed, 6 Mar 2019 22:10:34 +0530
Subject: [PATCH] test/crypto: fix duplicate id used by CCP device

[ upstream commit 610e235a11e49a1e5d55c2804a5bc628e87417f1 ]

These duplicate device id is causing incorrect mapping
for DPAA_SEC for test case execution on the basis of
capabilities.

Fixes: e155ca055e84 ("test/crypto: add tests for AMD CCP")

Reported-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 test/test/test_cryptodev_blockcipher.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/test/test_cryptodev_blockcipher.h b/test/test/test_cryptodev_blockcipher.h
index f8bd85838..52c377649 100644
--- a/test/test/test_cryptodev_blockcipher.h
+++ b/test/test/test_cryptodev_blockcipher.h
@@ -28,8 +28,8 @@
 #define BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC	0x0040 /* DPAA_SEC flag */
 #define BLOCKCIPHER_TEST_TARGET_PMD_MVSAM	0x0080 /* Marvell flag */
-#define BLOCKCIPHER_TEST_TARGET_PMD_CCP		0x0040 /* CCP flag */
-#define BLOCKCIPHER_TEST_TARGET_PMD_VIRTIO	0x0200 /* VIRTIO flag */
 #define BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX	0x0100 /* OCTEON TX flag */
+#define BLOCKCIPHER_TEST_TARGET_PMD_VIRTIO	0x0200 /* VIRTIO flag */
 #define BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR	0x0400 /* CAAM_JR flag */
+#define BLOCKCIPHER_TEST_TARGET_PMD_CCP		0x0800 /* CCP flag */
 
 #define BLOCKCIPHER_TEST_OP_CIPHER	(BLOCKCIPHER_TEST_OP_ENCRYPT | \
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:25.437350407 +0100
+++ 0005-test-crypto-fix-duplicate-id-used-by-CCP-device.patch	2019-04-16 15:34:25.108181547 +0100
@@ -1,26 +1,27 @@
-From 610e235a11e49a1e5d55c2804a5bc628e87417f1 Mon Sep 17 00:00:00 2001
+From 28632b66553b11af1ff3d9e151957a7dd4f47dc5 Mon Sep 17 00:00:00 2001
 From: Hemant Agrawal <hemant.agrawal@nxp.com>
 Date: Wed, 6 Mar 2019 22:10:34 +0530
 Subject: [PATCH] test/crypto: fix duplicate id used by CCP device
 
+[ upstream commit 610e235a11e49a1e5d55c2804a5bc628e87417f1 ]
+
 These duplicate device id is causing incorrect mapping
 for DPAA_SEC for test case execution on the basis of
 capabilities.
 
 Fixes: e155ca055e84 ("test/crypto: add tests for AMD CCP")
-Cc: stable@dpdk.org
 
 Reported-by: Anoob Joseph <anoobj@marvell.com>
 Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
 Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
 ---
- app/test/test_cryptodev_blockcipher.h | 4 ++--
+ test/test/test_cryptodev_blockcipher.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/app/test/test_cryptodev_blockcipher.h b/app/test/test_cryptodev_blockcipher.h
-index 5c22d5da6..6925a6c0d 100644
---- a/app/test/test_cryptodev_blockcipher.h
-+++ b/app/test/test_cryptodev_blockcipher.h
+diff --git a/test/test/test_cryptodev_blockcipher.h b/test/test/test_cryptodev_blockcipher.h
+index f8bd85838..52c377649 100644
+--- a/test/test/test_cryptodev_blockcipher.h
++++ b/test/test/test_cryptodev_blockcipher.h
 @@ -28,8 +28,8 @@
  #define BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC	0x0040 /* DPAA_SEC flag */
  #define BLOCKCIPHER_TEST_TARGET_PMD_MVSAM	0x0080 /* Marvell flag */

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

* [dpdk-stable] patch 'event/opdl: replace sprintf with snprintf' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (3 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'test/crypto: fix duplicate id used by CCP device' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/nfp: fix setting MAC address' " Kevin Traynor
                   ` (54 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Pallantla Poornima; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 5f05c4e500feb449d6744d54a8b62c19734ae386 Mon Sep 17 00:00:00 2001
From: Pallantla Poornima <pallantlax.poornima@intel.com>
Date: Mon, 4 Feb 2019 07:18:02 +0000
Subject: [PATCH] event/opdl: replace sprintf with snprintf

[ upstream commit 57362ddf4262d0440ae1bddc6eaf69e9f94f9c85 ]

sprintf function is not secure as it doesn't check the length of string.
More secure function snprintf is used.

Fixes: 3c7f3dcfb0 ("event/opdl: add PMD main body and helper function")

Signed-off-by: Pallantla Poornima <pallantlax.poornima@intel.com>
---
 drivers/event/opdl/opdl_evdev.c        | 7 ++++---
 drivers/event/opdl/opdl_evdev_xstats.c | 7 +++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c
index a4f0bc8b6..d2d2be44b 100644
--- a/drivers/event/opdl/opdl_evdev.c
+++ b/drivers/event/opdl/opdl_evdev.c
@@ -423,8 +423,9 @@ opdl_dump(struct rte_eventdev *dev, FILE *f)
 				p_type = "????";
 
-			sprintf(queue_id, "%02u", port->external_qid);
+			snprintf(queue_id, sizeof(queue_id), "%02u",
+					port->external_qid);
 			if (port->p_type == OPDL_REGULAR_PORT ||
 					port->p_type == OPDL_ASYNC_PORT)
-				sprintf(total_cyc,
+				snprintf(total_cyc, sizeof(total_cyc),
 					" %'16"PRIu64"",
 					(cpg != 0 ?
@@ -432,5 +433,5 @@ opdl_dump(struct rte_eventdev *dev, FILE *f)
 					 : 0));
 			else
-				sprintf(total_cyc,
+				snprintf(total_cyc, sizeof(total_cyc),
 					"             ----");
 			fprintf(f,
diff --git a/drivers/event/opdl/opdl_evdev_xstats.c b/drivers/event/opdl/opdl_evdev_xstats.c
index 0e6c6bd5e..27b3d8802 100644
--- a/drivers/event/opdl/opdl_evdev_xstats.c
+++ b/drivers/event/opdl/opdl_evdev_xstats.c
@@ -33,8 +33,7 @@ opdl_xstats_init(struct rte_eventdev *dev)
 
 			/* Name */
-			sprintf(device->port_xstat[index].stat.name,
-			       "port_%02u_%s",
-			       i,
-			       port_xstat_str[j]);
+			snprintf(device->port_xstat[index].stat.name,
+				sizeof(device->port_xstat[index].stat.name),
+				"port_%02u_%s", i, port_xstat_str[j]);
 
 			/* ID */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:25.481144220 +0100
+++ 0006-event-opdl-replace-sprintf-with-snprintf.patch	2019-04-16 15:34:25.109181525 +0100
@@ -1,13 +1,14 @@
-From 57362ddf4262d0440ae1bddc6eaf69e9f94f9c85 Mon Sep 17 00:00:00 2001
+From 5f05c4e500feb449d6744d54a8b62c19734ae386 Mon Sep 17 00:00:00 2001
 From: Pallantla Poornima <pallantlax.poornima@intel.com>
 Date: Mon, 4 Feb 2019 07:18:02 +0000
 Subject: [PATCH] event/opdl: replace sprintf with snprintf
 
+[ upstream commit 57362ddf4262d0440ae1bddc6eaf69e9f94f9c85 ]
+
 sprintf function is not secure as it doesn't check the length of string.
 More secure function snprintf is used.
 
 Fixes: 3c7f3dcfb0 ("event/opdl: add PMD main body and helper function")
-Cc: stable@dpdk.org
 
 Signed-off-by: Pallantla Poornima <pallantlax.poornima@intel.com>
 ---

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

* [dpdk-stable] patch 'net/nfp: fix setting MAC address' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (4 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'event/opdl: replace sprintf with snprintf' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-23 10:24   ` Pablo Cascón
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/i40e: fix time sync for 25G' " Kevin Traynor
                   ` (53 subsequent siblings)
  59 siblings, 1 reply; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Pablo Cascón; +Cc: Alejandro Lucero, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 8fb7943ea804d437fc5b7153d7c073c79eeb3837 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pablo=20Casc=C3=B3n?= <pablo.cascon@netronome.com>
Date: Fri, 8 Mar 2019 15:40:47 +0000
Subject: [PATCH] net/nfp: fix setting MAC address
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 027412fe949c763fd4d536b13dcb4432f2df5534 ]

Some firmwares, mostly for VFs, do not advertise the feature /
capability of changing the MAC address while the interface is up. With
such firmware a request to change the MAC address that at the same
time also tries to enable the not available feature will be denied by
the firmware resulting in an error message like:

nfp_net_reconfig(): Error nfp_net reconfig for ctrl: 80000000 update: 800

Fix set_mac_addr by not trying to enable a feature if it is not
advertised by the firmware.

Fixes: 2fe669f4bcd2 ("net/nfp: support MAC address change")

Signed-off-by: Pablo Cascón <pablo.cascon@netronome.com>
Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 drivers/net/nfp/nfp_net.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 54c6da924..278e154cd 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -567,5 +567,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
 	/* Signal the NIC about the change */
 	update = NFP_NET_CFG_UPDATE_MACADDR;
-	ctrl = hw->ctrl | NFP_NET_CFG_CTRL_LIVE_ADDR;
+	ctrl = hw->ctrl;
+	if ((hw->ctrl & NFP_NET_CFG_CTRL_ENABLE) &&
+	    (hw->cap & NFP_NET_CFG_CTRL_LIVE_ADDR))
+		ctrl |= NFP_NET_CFG_CTRL_LIVE_ADDR;
 	if (nfp_net_reconfig(hw, ctrl, update) < 0) {
 		PMD_INIT_LOG(INFO, "MAC address update failed");
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:25.521984688 +0100
+++ 0007-net-nfp-fix-setting-MAC-address.patch	2019-04-16 15:34:25.112181459 +0100
@@ -1,4 +1,4 @@
-From 027412fe949c763fd4d536b13dcb4432f2df5534 Mon Sep 17 00:00:00 2001
+From 8fb7943ea804d437fc5b7153d7c073c79eeb3837 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Pablo=20Casc=C3=B3n?= <pablo.cascon@netronome.com>
 Date: Fri, 8 Mar 2019 15:40:47 +0000
 Subject: [PATCH] net/nfp: fix setting MAC address
@@ -6,6 +6,8 @@
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
+[ upstream commit 027412fe949c763fd4d536b13dcb4432f2df5534 ]
+
 Some firmwares, mostly for VFs, do not advertise the feature /
 capability of changing the MAC address while the interface is up. With
 such firmware a request to change the MAC address that at the same
@@ -18,7 +20,6 @@
 advertised by the firmware.
 
 Fixes: 2fe669f4bcd2 ("net/nfp: support MAC address change")
-Cc: stable@dpdk.org
 
 Signed-off-by: Pablo Cascón <pablo.cascon@netronome.com>
 Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
@@ -27,10 +28,10 @@
  1 file changed, 4 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
-index a791e95e2..1b7b6c2fd 100644
+index 54c6da924..278e154cd 100644
 --- a/drivers/net/nfp/nfp_net.c
 +++ b/drivers/net/nfp/nfp_net.c
-@@ -576,5 +576,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
+@@ -567,5 +567,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
  	/* Signal the NIC about the change */
  	update = NFP_NET_CFG_UPDATE_MACADDR;
 -	ctrl = hw->ctrl | NFP_NET_CFG_CTRL_LIVE_ADDR;

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

* [dpdk-stable] patch 'net/i40e: fix time sync for 25G' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (5 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/nfp: fix setting MAC address' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/qede: support IOVA VA mode' " Kevin Traynor
                   ` (52 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Qi Zhang; +Cc: Michael Luo, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 2a9c6a299c8c27aa77f7bdd3c37e96ffbf868b03 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 11 Mar 2019 15:42:20 +0800
Subject: [PATCH] net/i40e: fix time sync for 25G

[ upstream commit d9263ab13886f8b25a324e40ddb205f1a3f71c6d ]

Time sync increment value is not configured for 25G device.

The patch fix this issue by setting the same value as 40G, this
aligned with kernel driver's behaviour.

Fixes: 75d133dd3296 ("net/i40e: enable 25G device")

Reported-by: Michael Luo <michael.luo@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Michael Luo <michael.luo@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index dca61f03a..8191a6a73 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -10831,4 +10831,5 @@ i40e_start_timecounters(struct rte_eth_dev *dev)
 	switch (link.link_speed) {
 	case ETH_SPEED_NUM_40G:
+	case ETH_SPEED_NUM_25G:
 		tsync_inc_l = I40E_PTP_40GB_INCVAL & 0xFFFFFFFF;
 		tsync_inc_h = I40E_PTP_40GB_INCVAL >> 32;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:25.567230467 +0100
+++ 0008-net-i40e-fix-time-sync-for-25G.patch	2019-04-16 15:34:25.124181192 +0100
@@ -1,15 +1,16 @@
-From d9263ab13886f8b25a324e40ddb205f1a3f71c6d Mon Sep 17 00:00:00 2001
+From 2a9c6a299c8c27aa77f7bdd3c37e96ffbf868b03 Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang@intel.com>
 Date: Mon, 11 Mar 2019 15:42:20 +0800
 Subject: [PATCH] net/i40e: fix time sync for 25G
 
+[ upstream commit d9263ab13886f8b25a324e40ddb205f1a3f71c6d ]
+
 Time sync increment value is not configured for 25G device.
 
 The patch fix this issue by setting the same value as 40G, this
 aligned with kernel driver's behaviour.
 
 Fixes: 75d133dd3296 ("net/i40e: enable 25G device")
-Cc: stable@dpdk.org
 
 Reported-by: Michael Luo <michael.luo@intel.com>
 Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>

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

* [dpdk-stable] patch 'net/qede: support IOVA VA mode' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (6 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/i40e: fix time sync for 25G' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/mlx5: fix packet inline on Tx queue wraparound' " Kevin Traynor
                   ` (51 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Shahed Shaikh, Rasesh Mody, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 2d45b3d48654433df5db4832a39ed9a8a136de23 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Fri, 8 Mar 2019 09:28:55 +0000
Subject: [PATCH] net/qede: support IOVA VA mode

[ upstream commit 7aac5899df81f40c07a8047f410e7f2fcc62962d ]

Set RTE_PCI_DRV_IOVA_AS_VA in drv_flags. This allows initializing qede
PMD as non-root also on Linux v4.x, where /proc/self/pagemap can't be
acccessed without CAP_SYS_ADMIN privileges.

The flag was introduced generically but not in pmds in:
commit 815c7deaed2d ("pci: get IOMMU class on Linux")

Acked-by: Shahed Shaikh <shshaikh@marvell.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
Signed-off-by: Kevin Traynor <ktraynor@redhat.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 518673dce..0b2f305e1 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -2736,5 +2736,6 @@ static int qedevf_eth_dev_pci_remove(struct rte_pci_device *pci_dev)
 static struct rte_pci_driver rte_qedevf_pmd = {
 	.id_table = pci_id_qedevf_map,
-	.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC,
+	.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC |
+		     RTE_PCI_DRV_IOVA_AS_VA,
 	.probe = qedevf_eth_dev_pci_probe,
 	.remove = qedevf_eth_dev_pci_remove,
@@ -2755,5 +2756,6 @@ static int qede_eth_dev_pci_remove(struct rte_pci_device *pci_dev)
 static struct rte_pci_driver rte_qede_pmd = {
 	.id_table = pci_id_qede_map,
-	.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC,
+	.drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC |
+		     RTE_PCI_DRV_IOVA_AS_VA,
 	.probe = qede_eth_dev_pci_probe,
 	.remove = qede_eth_dev_pci_remove,
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:25.619176835 +0100
+++ 0009-net-qede-support-IOVA-VA-mode.patch	2019-04-16 15:34:25.126181148 +0100
@@ -1,8 +1,10 @@
-From 7aac5899df81f40c07a8047f410e7f2fcc62962d Mon Sep 17 00:00:00 2001
+From 2d45b3d48654433df5db4832a39ed9a8a136de23 Mon Sep 17 00:00:00 2001
 From: Kevin Traynor <ktraynor@redhat.com>
 Date: Fri, 8 Mar 2019 09:28:55 +0000
 Subject: [PATCH] net/qede: support IOVA VA mode
 
+[ upstream commit 7aac5899df81f40c07a8047f410e7f2fcc62962d ]
+
 Set RTE_PCI_DRV_IOVA_AS_VA in drv_flags. This allows initializing qede
 PMD as non-root also on Linux v4.x, where /proc/self/pagemap can't be
 acccessed without CAP_SYS_ADMIN privileges.
@@ -10,8 +12,6 @@
 The flag was introduced generically but not in pmds in:
 commit 815c7deaed2d ("pci: get IOMMU class on Linux")
 
-Cc: stable@dpdk.org
-
 Acked-by: Shahed Shaikh <shshaikh@marvell.com>
 Acked-by: Rasesh Mody <rmody@marvell.com>
 Signed-off-by: Kevin Traynor <ktraynor@redhat.com>

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

* [dpdk-stable] patch 'net/mlx5: fix packet inline on Tx queue wraparound' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (7 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/qede: support IOVA VA mode' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/bnxt: silence IOVA warnings' " Kevin Traynor
                   ` (50 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Shahaf Shuler; +Cc: Yongseok Koh, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From a7e7ada7027799d81513300a4524e2f151fe61e7 Mon Sep 17 00:00:00 2001
From: Shahaf Shuler <shahafs@mellanox.com>
Date: Sun, 10 Mar 2019 10:14:10 +0200
Subject: [PATCH] net/mlx5: fix packet inline on Tx queue wraparound

[ upstream commit 57c0e2494c51421033771122e8972a41dddb4cb7 ]

Inlining a packet to WQE that cross the WQ wraparound, i.e. the WQE
starts on the end of the ring and ends on the beginning, is not
supported and blocked by the data path logic.

However, in case of TSO, an extra inline header is required before
inlining. This inline header is not taken into account when checking if
there is enough room left for the required inline size.
On some corner cases were
(ring_tailroom - inline header) < inline size < ring_tailroom ,
this can lead to WQE being written outsize of the ring buffer.

Fixing it by always assuming the worse case that inline of packet will
require the inline header.

Fixes: 3f13f8c23a7c ("net/mlx5: support hardware TSO")

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index baa4079c1..38ce0e29a 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -694,5 +694,6 @@ pkt_inline:
 			copy_b = (addr_end > addr) ?
 				 RTE_MIN((addr_end - addr), length) : 0;
-			if (copy_b && ((end - (uintptr_t)raw) > copy_b)) {
+			if (copy_b && ((end - (uintptr_t)raw) >
+				       (copy_b + sizeof(inl)))) {
 				/*
 				 * One Dseg remains in the current WQE.  To
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:25.663281776 +0100
+++ 0010-net-mlx5-fix-packet-inline-on-Tx-queue-wraparound.patch	2019-04-16 15:34:25.128181104 +0100
@@ -1,8 +1,10 @@
-From 57c0e2494c51421033771122e8972a41dddb4cb7 Mon Sep 17 00:00:00 2001
+From a7e7ada7027799d81513300a4524e2f151fe61e7 Mon Sep 17 00:00:00 2001
 From: Shahaf Shuler <shahafs@mellanox.com>
 Date: Sun, 10 Mar 2019 10:14:10 +0200
 Subject: [PATCH] net/mlx5: fix packet inline on Tx queue wraparound
 
+[ upstream commit 57c0e2494c51421033771122e8972a41dddb4cb7 ]
+
 Inlining a packet to WQE that cross the WQ wraparound, i.e. the WQE
 starts on the end of the ring and ends on the beginning, is not
 supported and blocked by the data path logic.
@@ -18,7 +20,6 @@
 require the inline header.
 
 Fixes: 3f13f8c23a7c ("net/mlx5: support hardware TSO")
-Cc: stable@dpdk.org
 
 Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
 Acked-by: Yongseok Koh <yskoh@mellanox.com>

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

* [dpdk-stable] patch 'net/bnxt: silence IOVA warnings' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (8 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/mlx5: fix packet inline on Tx queue wraparound' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/bnxt: suppress spurious error log' " Kevin Traynor
                   ` (49 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Rami Rosen, Ajit Khaparde, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 9c51af87a045acda4b29669ed39d1255081ccb10 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 14 Mar 2019 14:32:13 -0700
Subject: [PATCH] net/bnxt: silence IOVA warnings

[ upstream commit f06515964aaeba46d2742347a9250bb4e2376512 ]

When using bnxt on bare-metal with vfio-pci, the driver logs an
unnecessary warning. Hardware works fine, message is not urgent.
Change it to INFO level.

Fixes: 62196f4e0941 ("mem: rename address mapping function to IOVA")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 189527207..bdc6a1267 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3243,8 +3243,6 @@ skip_init:
 		mz_phys_addr = mz->iova;
 		if ((unsigned long)mz->addr == mz_phys_addr) {
-			PMD_DRV_LOG(WARNING,
-				"Memzone physical address same as virtual.\n");
-			PMD_DRV_LOG(WARNING,
-				"Using rte_mem_virt2iova()\n");
+			PMD_DRV_LOG(INFO,
+				"Memzone physical address same as virtual using rte_mem_virt2iova()\n");
 			mz_phys_addr = rte_mem_virt2iova(mz->addr);
 			if (mz_phys_addr == 0) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:25.705296702 +0100
+++ 0011-net-bnxt-silence-IOVA-warnings.patch	2019-04-16 15:34:25.131181037 +0100
@@ -1,14 +1,15 @@
-From f06515964aaeba46d2742347a9250bb4e2376512 Mon Sep 17 00:00:00 2001
+From 9c51af87a045acda4b29669ed39d1255081ccb10 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Thu, 14 Mar 2019 14:32:13 -0700
 Subject: [PATCH] net/bnxt: silence IOVA warnings
 
+[ upstream commit f06515964aaeba46d2742347a9250bb4e2376512 ]
+
 When using bnxt on bare-metal with vfio-pci, the driver logs an
 unnecessary warning. Hardware works fine, message is not urgent.
 Change it to INFO level.
 
 Fixes: 62196f4e0941 ("mem: rename address mapping function to IOVA")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 Reviewed-by: Rami Rosen <ramirose@gmail.com>
@@ -18,7 +19,7 @@
  1 file changed, 2 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
-index b5d8128cf..78ab07d0c 100644
+index 189527207..bdc6a1267 100644
 --- a/drivers/net/bnxt/bnxt_ethdev.c
 +++ b/drivers/net/bnxt/bnxt_ethdev.c
 @@ -3243,8 +3243,6 @@ skip_init:

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

* [dpdk-stable] patch 'net/bnxt: suppress spurious error log' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (9 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/bnxt: silence IOVA warnings' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/nfp: fix RSS query' " Kevin Traynor
                   ` (48 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Somnath Kotur, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 5d8463d247d770b16720aa75b358f6eebfcf642e Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Thu, 14 Mar 2019 14:32:14 -0700
Subject: [PATCH] net/bnxt: suppress spurious error log

[ upstream commit 618bbdab47ce0da7bcdb0c361fee2332fdca1fe4 ]

The driver multiple rxq allocation logs a message at error level
but it really is a debug message.

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

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Somnath Kotur <somnath.kotur@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 5345d3938..17e2909a7 100644
--- a/drivers/net/bnxt/bnxt_rxq.c
+++ b/drivers/net/bnxt/bnxt_rxq.c
@@ -101,5 +101,6 @@ int bnxt_mq_rx_configure(struct bnxt *bp)
 	}
 	nb_q_per_grp = bp->rx_cp_nr_rings / pools;
-	PMD_DRV_LOG(ERR, "pools = %u nb_q_per_grp = %u\n", pools, 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;
 	end_grp_id = nb_q_per_grp;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:25.748654841 +0100
+++ 0012-net-bnxt-suppress-spurious-error-log.patch	2019-04-16 15:34:25.132181015 +0100
@@ -1,13 +1,14 @@
-From 618bbdab47ce0da7bcdb0c361fee2332fdca1fe4 Mon Sep 17 00:00:00 2001
+From 5d8463d247d770b16720aa75b358f6eebfcf642e Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Thu, 14 Mar 2019 14:32:14 -0700
 Subject: [PATCH] net/bnxt: suppress spurious error log
 
+[ upstream commit 618bbdab47ce0da7bcdb0c361fee2332fdca1fe4 ]
+
 The driver multiple rxq allocation logs a message at error level
 but it really is a debug message.
 
 Fixes: 51fafb89a9a0 ("net/bnxt: get rid of ff pools and use VNIC info array")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>

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

* [dpdk-stable] patch 'net/nfp: fix RSS query' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (10 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/bnxt: suppress spurious error log' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/ixgbe: restore VLAN filter for VF' " Kevin Traynor
                   ` (47 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Alejandro Lucero; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 78b5742a465242dc8576ccd72ff782a358269a85 Mon Sep 17 00:00:00 2001
From: Alejandro Lucero <alejandro.lucero@netronome.com>
Date: Tue, 12 Mar 2019 10:19:27 +0000
Subject: [PATCH] net/nfp: fix RSS query

[ upstream commit 761186fc7ba7fff191f2916734da82e134a9d0a1 ]

Current code is not properly giving the RSS information
regarding the redirection table.

Fixes: 934e4c60fbff ("nfp: add RSS")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 drivers/net/nfp/nfp_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 278e154cd..2e3879176 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2447,5 +2447,5 @@ nfp_net_reta_query(struct rte_eth_dev *dev,
 			if (!(mask & (0x1 << j)))
 				continue;
-			reta_conf->reta[shift + j] =
+			reta_conf[idx].reta[shift + j] =
 				(uint8_t)((reta >> (8 * j)) & 0xF);
 		}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:25.793529253 +0100
+++ 0013-net-nfp-fix-RSS-query.patch	2019-04-16 15:34:25.135180948 +0100
@@ -1,13 +1,14 @@
-From 761186fc7ba7fff191f2916734da82e134a9d0a1 Mon Sep 17 00:00:00 2001
+From 78b5742a465242dc8576ccd72ff782a358269a85 Mon Sep 17 00:00:00 2001
 From: Alejandro Lucero <alejandro.lucero@netronome.com>
 Date: Tue, 12 Mar 2019 10:19:27 +0000
 Subject: [PATCH] net/nfp: fix RSS query
 
+[ upstream commit 761186fc7ba7fff191f2916734da82e134a9d0a1 ]
+
 Current code is not properly giving the RSS information
 regarding the redirection table.
 
 Fixes: 934e4c60fbff ("nfp: add RSS")
-Cc: stable@dpdk.org
 
 Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
 ---
@@ -15,10 +16,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
-index 1b7b6c2fd..fa7722a47 100644
+index 278e154cd..2e3879176 100644
 --- a/drivers/net/nfp/nfp_net.c
 +++ b/drivers/net/nfp/nfp_net.c
-@@ -2466,5 +2466,5 @@ nfp_net_reta_query(struct rte_eth_dev *dev,
+@@ -2447,5 +2447,5 @@ nfp_net_reta_query(struct rte_eth_dev *dev,
  			if (!(mask & (0x1 << j)))
  				continue;
 -			reta_conf->reta[shift + j] =

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

* [dpdk-stable] patch 'net/ixgbe: restore VLAN filter for VF' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (11 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/nfp: fix RSS query' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'app/testpmd: remove unused field from port struct' " Kevin Traynor
                   ` (46 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: David Harton; +Cc: Wei Zhao, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 13ed169a4ea497171affadc2a7fe8b50bd302e6e Mon Sep 17 00:00:00 2001
From: David Harton <dharton@cisco.com>
Date: Fri, 15 Mar 2019 12:08:32 -0400
Subject: [PATCH] net/ixgbe: restore VLAN filter for VF

[ upstream commit b28e4b87d69a786706f62666e8b7dc19f79ad51a ]

ixgbevf VLAN strip and extend capabilities were removed when
migrating to the bit flags implementation.

Restoring the capability to enable the VLAN strip offload at
configuration time.

Fixes: ec3b1124d14d ("net/ixgbe: convert to new Rx offloads API")

Signed-off-by: David Harton <dharton@cisco.com>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 9a79d18e4..63ca5dccf 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -2854,4 +2854,5 @@ ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev)
 		   DEV_RX_OFFLOAD_KEEP_CRC    |
 		   DEV_RX_OFFLOAD_JUMBO_FRAME |
+		   DEV_RX_OFFLOAD_VLAN_FILTER |
 		   DEV_RX_OFFLOAD_SCATTER;
 
@@ -2860,6 +2861,5 @@ ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev)
 
 	if (ixgbe_is_vf(dev) == 0)
-		offloads |= (DEV_RX_OFFLOAD_VLAN_FILTER |
-			     DEV_RX_OFFLOAD_VLAN_EXTEND);
+		offloads |= DEV_RX_OFFLOAD_VLAN_EXTEND;
 
 	/*
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:25.837876008 +0100
+++ 0014-net-ixgbe-restore-VLAN-filter-for-VF.patch	2019-04-16 15:34:25.140180837 +0100
@@ -1,8 +1,10 @@
-From b28e4b87d69a786706f62666e8b7dc19f79ad51a Mon Sep 17 00:00:00 2001
+From 13ed169a4ea497171affadc2a7fe8b50bd302e6e Mon Sep 17 00:00:00 2001
 From: David Harton <dharton@cisco.com>
 Date: Fri, 15 Mar 2019 12:08:32 -0400
 Subject: [PATCH] net/ixgbe: restore VLAN filter for VF
 
+[ upstream commit b28e4b87d69a786706f62666e8b7dc19f79ad51a ]
+
 ixgbevf VLAN strip and extend capabilities were removed when
 migrating to the bit flags implementation.
 
@@ -10,7 +12,6 @@
 configuration time.
 
 Fixes: ec3b1124d14d ("net/ixgbe: convert to new Rx offloads API")
-Cc: stable@dpdk.org
 
 Signed-off-by: David Harton <dharton@cisco.com>
 Acked-by: Wei Zhao <wei.zhao1@intel.com>
@@ -19,7 +20,7 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
-index e92a70fb3..e71d3c188 100644
+index 9a79d18e4..63ca5dccf 100644
 --- a/drivers/net/ixgbe/ixgbe_rxtx.c
 +++ b/drivers/net/ixgbe/ixgbe_rxtx.c
 @@ -2854,4 +2854,5 @@ ixgbe_get_rx_port_offloads(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'app/testpmd: remove unused field from port struct' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (12 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/ixgbe: restore VLAN filter for VF' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'app/testpmd: fix a typo in log message' " Kevin Traynor
                   ` (45 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: David Marchand; +Cc: Rami Rosen, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 21b7ce68042875423cd4bcbc971da378dccc5c6d Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 11 Mar 2019 16:35:19 +0100
Subject: [PATCH] app/testpmd: remove unused field from port struct

[ upstream commit 9bbc2a11ed98feee99deb2be66baf0d382f14426 ]

Remove some leftover from a previous rework.

Fixes: c4bcc342c8ee ("app/testpmd: refactor ieee1588 forwarding")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Rami Rosen <ramirose@gmail.com>
---
 app/test-pmd/testpmd.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 3ff11e644..ed8f7b0b2 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -174,5 +174,4 @@ struct rte_port {
 	uint16_t                tx_vlan_id;/**< The tag ID */
 	uint16_t                tx_vlan_id_outer;/**< The outer tag ID */
-	void                    *fwd_ctx;   /**< Forwarding mode context */
 	uint64_t                rx_bad_ip_csum; /**< rx pkts with bad ip checksum  */
 	uint64_t                rx_bad_l4_csum; /**< rx pkts with bad l4 checksum */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:25.885783913 +0100
+++ 0015-app-testpmd-remove-unused-field-from-port-struct.patch	2019-04-16 15:34:25.141180815 +0100
@@ -1,12 +1,13 @@
-From 9bbc2a11ed98feee99deb2be66baf0d382f14426 Mon Sep 17 00:00:00 2001
+From 21b7ce68042875423cd4bcbc971da378dccc5c6d Mon Sep 17 00:00:00 2001
 From: David Marchand <david.marchand@redhat.com>
 Date: Mon, 11 Mar 2019 16:35:19 +0100
 Subject: [PATCH] app/testpmd: remove unused field from port struct
 
+[ upstream commit 9bbc2a11ed98feee99deb2be66baf0d382f14426 ]
+
 Remove some leftover from a previous rework.
 
 Fixes: c4bcc342c8ee ("app/testpmd: refactor ieee1588 forwarding")
-Cc: stable@dpdk.org
 
 Signed-off-by: David Marchand <david.marchand@redhat.com>
 Reviewed-by: Rami Rosen <ramirose@gmail.com>
@@ -15,7 +16,7 @@
  1 file changed, 1 deletion(-)
 
 diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
-index fa4887853..85b791b6b 100644
+index 3ff11e644..ed8f7b0b2 100644
 --- a/app/test-pmd/testpmd.h
 +++ b/app/test-pmd/testpmd.h
 @@ -174,5 +174,4 @@ struct rte_port {

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

* [dpdk-stable] patch 'app/testpmd: fix a typo in log message' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (13 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'app/testpmd: remove unused field from port struct' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'ethdev: fix method name in doxygen comment' " Kevin Traynor
                   ` (44 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Rami Rosen; +Cc: Ferruh Yigit, Bernard Iremonger, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 32992aeafe670a6002ba86825bbce09026fa8291 Mon Sep 17 00:00:00 2001
From: Rami Rosen <ramirose@gmail.com>
Date: Tue, 12 Mar 2019 07:48:43 +0200
Subject: [PATCH] app/testpmd: fix a typo in log message

[ upstream commit 9ee641c2c80bca6097fc52d59f469b3553194f46 ]

This patch fixes a typo in test-pmd/cmdline.c,
succcessfully->successfully
Two C's are good enough for success...

Fixes: a09f3e4c5046 ("app/testpmd: add hash configuration")

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test-pmd/cmdline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 51704b500..f17ca3282 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -12071,5 +12071,5 @@ cmd_set_hash_global_config_parsed(void *parsed_result,
 	else
 		printf("Global hash configurations have been set "
-			"succcessfully by port %d\n", res->port_id);
+			"successfully by port %d\n", res->port_id);
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:25.926096019 +0100
+++ 0016-app-testpmd-fix-a-typo-in-log-message.patch	2019-04-16 15:34:25.158180438 +0100
@@ -1,14 +1,15 @@
-From 9ee641c2c80bca6097fc52d59f469b3553194f46 Mon Sep 17 00:00:00 2001
+From 32992aeafe670a6002ba86825bbce09026fa8291 Mon Sep 17 00:00:00 2001
 From: Rami Rosen <ramirose@gmail.com>
 Date: Tue, 12 Mar 2019 07:48:43 +0200
 Subject: [PATCH] app/testpmd: fix a typo in log message
 
+[ upstream commit 9ee641c2c80bca6097fc52d59f469b3553194f46 ]
+
 This patch fixes a typo in test-pmd/cmdline.c,
 succcessfully->successfully
 Two C's are good enough for success...
 
 Fixes: a09f3e4c5046 ("app/testpmd: add hash configuration")
-Cc: stable@dpdk.org
 
 Signed-off-by: Rami Rosen <ramirose@gmail.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -18,10 +19,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
-index db53cc0cc..815e5e887 100644
+index 51704b500..f17ca3282 100644
 --- a/app/test-pmd/cmdline.c
 +++ b/app/test-pmd/cmdline.c
-@@ -12077,5 +12077,5 @@ cmd_set_hash_global_config_parsed(void *parsed_result,
+@@ -12071,5 +12071,5 @@ cmd_set_hash_global_config_parsed(void *parsed_result,
  	else
  		printf("Global hash configurations have been set "
 -			"succcessfully by port %d\n", res->port_id);

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

* [dpdk-stable] patch 'ethdev: fix method name in doxygen comment' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (14 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'app/testpmd: fix a typo in log message' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/qede: fix Rx packet drop' " Kevin Traynor
                   ` (43 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Rami Rosen; +Cc: Stephen Hemminger, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 646f8df722b8d0569b33b6bc996c81812edf73b2 Mon Sep 17 00:00:00 2001
From: Rami Rosen <ramirose@gmail.com>
Date: Tue, 12 Mar 2019 18:07:42 +0200
Subject: [PATCH] ethdev: fix method name in doxygen comment

[ upstream commit 7065dff68e9af69d3752ca3f514971d98fc26fbc ]

This patch fixes rte_ethdev header file to use the correct method name,
namely to use rte_eth_dev_info_get() instead of
rte_eth_dev_infos_get().

Fixes: a4996bd89c42 ("ethdev: new Rx/Tx offloads API")
Fixes: 4f5701f28bd4 ("examples: fix RSS hash function configuration")

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/librte_ethdev/rte_ethdev.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index a3c864a13..e32395346 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -1552,5 +1552,5 @@ const char *rte_eth_dev_tx_offload_name(uint64_t offload);
  *        structure and use offloads field to set per-port offloads instead.
  *     -  Any offloading set in eth_conf->[rt]xmode.offloads must be within
- *        the [rt]x_offload_capa returned from rte_eth_dev_infos_get().
+ *        the [rt]x_offload_capa returned from rte_eth_dev_info_get().
  *        Any type of device supported offloading set in the input argument
  *        eth_conf->[rt]xmode.offloads to rte_eth_dev_configure() is enabled
@@ -1559,5 +1559,5 @@ const char *rte_eth_dev_tx_offload_name(uint64_t offload);
  *        queues per port. Any RSS hash function set in eth_conf->rss_conf.rss_hf
  *        must be within the flow_type_rss_offloads provided by drivers via
- *        rte_eth_dev_infos_get() API.
+ *        rte_eth_dev_info_get() API.
  *
  *   Embedding all configuration information in a single data structure
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:25.986004569 +0100
+++ 0017-ethdev-fix-method-name-in-doxygen-comment.patch	2019-04-16 15:34:25.161180371 +0100
@@ -1,15 +1,16 @@
-From 7065dff68e9af69d3752ca3f514971d98fc26fbc Mon Sep 17 00:00:00 2001
+From 646f8df722b8d0569b33b6bc996c81812edf73b2 Mon Sep 17 00:00:00 2001
 From: Rami Rosen <ramirose@gmail.com>
 Date: Tue, 12 Mar 2019 18:07:42 +0200
 Subject: [PATCH] ethdev: fix method name in doxygen comment
 
+[ upstream commit 7065dff68e9af69d3752ca3f514971d98fc26fbc ]
+
 This patch fixes rte_ethdev header file to use the correct method name,
 namely to use rte_eth_dev_info_get() instead of
 rte_eth_dev_infos_get().
 
 Fixes: a4996bd89c42 ("ethdev: new Rx/Tx offloads API")
 Fixes: 4f5701f28bd4 ("examples: fix RSS hash function configuration")
-Cc: stable@dpdk.org
 
 Signed-off-by: Rami Rosen <ramirose@gmail.com>
 Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>

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

* [dpdk-stable] patch 'net/qede: fix Rx packet drop' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (15 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'ethdev: fix method name in doxygen comment' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix negative error codes' " Kevin Traynor
                   ` (42 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Shahed Shaikh; +Cc: Rasesh Mody, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From d3e0551d9042d4778093f9f0e7a5a1f2fa481e4c Mon Sep 17 00:00:00 2001
From: Shahed Shaikh <shshaikh@marvell.com>
Date: Tue, 12 Mar 2019 09:51:14 -0700
Subject: [PATCH] net/qede: fix Rx packet drop

[ upstream commit 3732f83a45f5ee7b45d7655a15150f665841ce53 ]

There is a corner case in which driver won't post
receive buffers when driver has processed all received packets
in single loop (i.e. hw_consumer == sw_consumer) and then
HW will start dropping packets since it did not see new receive
buffers posted.

This corner case is seen when size of Rx ring is less than or equals
Rx packet burst count for dev->rx_pkt_burst().

Fixes: 8f2312474529 ("net/qede: fix performance bottleneck in Rx path")

Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
Acked-by: Rasesh Mody <rmody@marvell.com>
---
 drivers/net/qede/qede_rxtx.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index 70c32e3fc..27bac0995 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -1421,11 +1421,4 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 	int rx_alloc_count = 0;
 
-	hw_comp_cons = rte_le_to_cpu_16(*rxq->hw_cons_ptr);
-	sw_comp_cons = ecore_chain_get_cons_idx(&rxq->rx_comp_ring);
-
-	rte_rmb();
-
-	if (hw_comp_cons == sw_comp_cons)
-		return 0;
 
 	/* Allocate buffers that we used in previous loop */
@@ -1448,4 +1441,12 @@ qede_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 	}
 
+	hw_comp_cons = rte_le_to_cpu_16(*rxq->hw_cons_ptr);
+	sw_comp_cons = ecore_chain_get_cons_idx(&rxq->rx_comp_ring);
+
+	rte_rmb();
+
+	if (hw_comp_cons == sw_comp_cons)
+		return 0;
+
 	while (sw_comp_cons != hw_comp_cons) {
 		ol_flags = 0;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.029828320 +0100
+++ 0018-net-qede-fix-Rx-packet-drop.patch	2019-04-16 15:34:25.163180327 +0100
@@ -1,8 +1,10 @@
-From 3732f83a45f5ee7b45d7655a15150f665841ce53 Mon Sep 17 00:00:00 2001
+From d3e0551d9042d4778093f9f0e7a5a1f2fa481e4c Mon Sep 17 00:00:00 2001
 From: Shahed Shaikh <shshaikh@marvell.com>
 Date: Tue, 12 Mar 2019 09:51:14 -0700
 Subject: [PATCH] net/qede: fix Rx packet drop
 
+[ upstream commit 3732f83a45f5ee7b45d7655a15150f665841ce53 ]
+
 There is a corner case in which driver won't post
 receive buffers when driver has processed all received packets
 in single loop (i.e. hw_consumer == sw_consumer) and then
@@ -13,7 +15,6 @@
 Rx packet burst count for dev->rx_pkt_burst().
 
 Fixes: 8f2312474529 ("net/qede: fix performance bottleneck in Rx path")
-Cc: stable@dpdk.org
 
 Signed-off-by: Shahed Shaikh <shshaikh@marvell.com>
 Acked-by: Rasesh Mody <rmody@marvell.com>

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

* [dpdk-stable] patch 'net/atlantic: fix negative error codes' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (16 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/qede: fix Rx packet drop' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: remove unused variable' " Kevin Traynor
                   ` (41 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Igor Russkikh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 9a273ee2104f0b44299c0c9245d066ae54c9ea4e Mon Sep 17 00:00:00 2001
From: Igor Russkikh <igor.russkikh@aquantia.com>
Date: Tue, 12 Mar 2019 15:24:52 +0000
Subject: [PATCH] net/atlantic: fix negative error codes

[ upstream commit 327d8206c29fe690bf2a52c75d374d8102fe29f1 ]

These are just convention breakage on rte_errno,
no real harm from that.

Fixes: 2b1472d7150c ("net/atlantic: implement Tx path")

Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
---
 drivers/net/atlantic/atl_rxtx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/atlantic/atl_rxtx.c b/drivers/net/atlantic/atl_rxtx.c
index 40c913795..aea58c0d5 100644
--- a/drivers/net/atlantic/atl_rxtx.c
+++ b/drivers/net/atlantic/atl_rxtx.c
@@ -813,10 +813,10 @@ atl_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
 
 		if (m->nb_segs > AQ_HW_MAX_SEGS_SIZE) {
-			rte_errno = -EINVAL;
+			rte_errno = EINVAL;
 			return i;
 		}
 
 		if (ol_flags & ATL_TX_OFFLOAD_NOTSUP_MASK) {
-			rte_errno = -ENOTSUP;
+			rte_errno = ENOTSUP;
 			return i;
 		}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.074059867 +0100
+++ 0019-net-atlantic-fix-negative-error-codes.patch	2019-04-16 15:34:25.164180305 +0100
@@ -1,13 +1,14 @@
-From 327d8206c29fe690bf2a52c75d374d8102fe29f1 Mon Sep 17 00:00:00 2001
+From 9a273ee2104f0b44299c0c9245d066ae54c9ea4e Mon Sep 17 00:00:00 2001
 From: Igor Russkikh <igor.russkikh@aquantia.com>
 Date: Tue, 12 Mar 2019 15:24:52 +0000
 Subject: [PATCH] net/atlantic: fix negative error codes
 
+[ upstream commit 327d8206c29fe690bf2a52c75d374d8102fe29f1 ]
+
 These are just convention breakage on rte_errno,
 no real harm from that.
 
 Fixes: 2b1472d7150c ("net/atlantic: implement Tx path")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
 ---

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

* [dpdk-stable] patch 'net/atlantic: remove unused variable' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (17 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix negative error codes' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: remove extra checks for error codes' " Kevin Traynor
                   ` (40 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Igor Russkikh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From eacc1c58bccfdf849fd131c9d6ca3e94934cf383 Mon Sep 17 00:00:00 2001
From: Igor Russkikh <igor.russkikh@aquantia.com>
Date: Tue, 12 Mar 2019 15:24:53 +0000
Subject: [PATCH] net/atlantic: remove unused variable

[ upstream commit 1da02f4ebe1ddfaf9adbe0fdf43288b20596b43f ]

Found by coverity scan.

Coverity issue: 323512
Fixes: 7906661edac6 ("net/atlantic: add b0 hardware layer")

Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
---
 drivers/net/atlantic/hw_atl/hw_atl_b0.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/atlantic/hw_atl/hw_atl_b0.c b/drivers/net/atlantic/hw_atl/hw_atl_b0.c
index 9400e0edb..53fd8e9f0 100644
--- a/drivers/net/atlantic/hw_atl/hw_atl_b0.c
+++ b/drivers/net/atlantic/hw_atl/hw_atl_b0.c
@@ -32,5 +32,4 @@ static int hw_atl_b0_hw_qos_set(struct aq_hw_s *self)
 	u32 buff_size = 0U;
 	unsigned int i_priority = 0U;
-	bool is_rx_flow_control = false;
 
 	/* TPS Descriptor rate init */
@@ -65,5 +64,4 @@ static int hw_atl_b0_hw_qos_set(struct aq_hw_s *self)
 	/* QoS Rx buf size per TC */
 	tc = 0;
-	is_rx_flow_control = 0;
 	buff_size = HW_ATL_B0_RXBUF_MAX;
 
@@ -77,7 +75,5 @@ static int hw_atl_b0_hw_qos_set(struct aq_hw_s *self)
 						   (1024U / 32U) * 50U) /
 						   100U, tc);
-	hw_atl_rpb_rx_xoff_en_per_tc_set(self,
-					 is_rx_flow_control ? 1U : 0U,
-					 tc);
+	hw_atl_rpb_rx_xoff_en_per_tc_set(self, 0U, tc);
 
 	/* QoS 802.1p priority -> TC mapping */
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.114964324 +0100
+++ 0020-net-atlantic-remove-unused-variable.patch	2019-04-16 15:34:25.164180305 +0100
@@ -1,13 +1,14 @@
-From 1da02f4ebe1ddfaf9adbe0fdf43288b20596b43f Mon Sep 17 00:00:00 2001
+From eacc1c58bccfdf849fd131c9d6ca3e94934cf383 Mon Sep 17 00:00:00 2001
 From: Igor Russkikh <igor.russkikh@aquantia.com>
 Date: Tue, 12 Mar 2019 15:24:53 +0000
 Subject: [PATCH] net/atlantic: remove unused variable
 
+[ upstream commit 1da02f4ebe1ddfaf9adbe0fdf43288b20596b43f ]
+
 Found by coverity scan.
 
 Coverity issue: 323512
 Fixes: 7906661edac6 ("net/atlantic: add b0 hardware layer")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
 ---

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

* [dpdk-stable] patch 'net/atlantic: remove extra checks for error codes' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (18 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: remove unused variable' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix buffer overflow' " Kevin Traynor
                   ` (39 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Igor Russkikh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From ea3d0a12a99272619620cc29d1a3143ae48b818c Mon Sep 17 00:00:00 2001
From: Igor Russkikh <igor.russkikh@aquantia.com>
Date: Tue, 12 Mar 2019 15:24:55 +0000
Subject: [PATCH] net/atlantic: remove extra checks for error codes

[ upstream commit 0b504bcfefc29fbafd9278603022093df401a85f ]

Found by Coverity scan. Checks are useless
because at these code places err is always zero.

Fixes: 86d36773bd42 ("net/atlantic: implement firmware operations")

Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
---
 drivers/net/atlantic/hw_atl/hw_atl_utils.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/atlantic/hw_atl/hw_atl_utils.c b/drivers/net/atlantic/hw_atl/hw_atl_utils.c
index f11093a50..13f02b9f9 100644
--- a/drivers/net/atlantic/hw_atl/hw_atl_utils.c
+++ b/drivers/net/atlantic/hw_atl/hw_atl_utils.c
@@ -463,6 +463,4 @@ int hw_atl_utils_fw_rpc_wait(struct aq_hw_s *self,
 		}
 	} while (sw.tid != fw.tid || 0xFFFFU == fw.len);
-	if (err < 0)
-		goto err_exit;
 
 	if (rpc) {
@@ -876,6 +874,5 @@ static int aq_fw1x_set_wol(struct aq_hw_s *self, bool wol_enabled, u8 *mac)
 
 	err = hw_atl_utils_fw_rpc_call(self, rpc_size);
-	if (err < 0)
-		goto err_exit;
+
 err_exit:
 	return err;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.154890011 +0100
+++ 0021-net-atlantic-remove-extra-checks-for-error-codes.patch	2019-04-16 15:34:25.165180283 +0100
@@ -1,13 +1,14 @@
-From 0b504bcfefc29fbafd9278603022093df401a85f Mon Sep 17 00:00:00 2001
+From ea3d0a12a99272619620cc29d1a3143ae48b818c Mon Sep 17 00:00:00 2001
 From: Igor Russkikh <igor.russkikh@aquantia.com>
 Date: Tue, 12 Mar 2019 15:24:55 +0000
 Subject: [PATCH] net/atlantic: remove extra checks for error codes
 
+[ upstream commit 0b504bcfefc29fbafd9278603022093df401a85f ]
+
 Found by Coverity scan. Checks are useless
 because at these code places err is always zero.
 
 Fixes: 86d36773bd42 ("net/atlantic: implement firmware operations")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
 ---

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

* [dpdk-stable] patch 'net/atlantic: fix buffer overflow' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (19 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: remove extra checks for error codes' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix EEPROM get for small and uneven lengths' " Kevin Traynor
                   ` (38 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Pavel Belous; +Cc: Igor Russkikh, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From de7b992ce9c15972ff1c0c4622e339b94a118280 Mon Sep 17 00:00:00 2001
From: Pavel Belous <pavel.belous@aquantia.com>
Date: Tue, 12 Mar 2019 15:24:57 +0000
Subject: [PATCH] net/atlantic: fix buffer overflow

[ upstream commit e09a7bee7772d39e57537a7564c9d58ed028ffcf ]

Found by Coverity scan. This is a real memory corruption.
There is no need in extra RTE_ALIGN macros since the
request/result structures are 4-byte aligned by definition.

Coverity issue: 323518, 323520
Fixes: ce4e8d418097 ("net/atlantic: implement EEPROM get/set")

Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
---
 drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c b/drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c
index 6841d9bce..f90ccfe9e 100644
--- a/drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c
+++ b/drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c
@@ -502,5 +502,5 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, u32 *data, u32 len)
 	err = hw_atl_utils_fw_upload_dwords(self, self->rpc_addr,
 				(u32 *)(void *)&request,
-				RTE_ALIGN(sizeof(request), sizeof(u32)));
+				sizeof(request) / sizeof(u32));
 
 	if (err < 0)
@@ -524,5 +524,5 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, u32 *data, u32 len)
 	err = hw_atl_utils_fw_downld_dwords(self, self->rpc_addr + sizeof(u32),
 			&result,
-			RTE_ALIGN(sizeof(result), sizeof(u32)));
+			sizeof(result) / sizeof(u32));
 
 	if (err < 0)
@@ -559,5 +559,5 @@ static int aq_fw2x_set_eeprom(struct aq_hw_s *self, u32 *data, u32 len)
 	err = hw_atl_utils_fw_upload_dwords(self, self->rpc_addr,
 				(u32 *)(void *)&request,
-				RTE_ALIGN(sizeof(request), sizeof(u32)));
+				sizeof(request) / sizeof(u32));
 
 	if (err < 0)
@@ -590,5 +590,5 @@ static int aq_fw2x_set_eeprom(struct aq_hw_s *self, u32 *data, u32 len)
 	err = hw_atl_utils_fw_downld_dwords(self, self->rpc_addr + sizeof(u32),
 				&result,
-				RTE_ALIGN(sizeof(result), sizeof(u32)));
+				sizeof(result) / sizeof(u32));
 
 	if (err < 0)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.197776863 +0100
+++ 0022-net-atlantic-fix-buffer-overflow.patch	2019-04-16 15:34:25.166180260 +0100
@@ -1,15 +1,16 @@
-From e09a7bee7772d39e57537a7564c9d58ed028ffcf Mon Sep 17 00:00:00 2001
+From de7b992ce9c15972ff1c0c4622e339b94a118280 Mon Sep 17 00:00:00 2001
 From: Pavel Belous <pavel.belous@aquantia.com>
 Date: Tue, 12 Mar 2019 15:24:57 +0000
 Subject: [PATCH] net/atlantic: fix buffer overflow
 
+[ upstream commit e09a7bee7772d39e57537a7564c9d58ed028ffcf ]
+
 Found by Coverity scan. This is a real memory corruption.
 There is no need in extra RTE_ALIGN macros since the
 request/result structures are 4-byte aligned by definition.
 
 Coverity issue: 323518, 323520
 Fixes: ce4e8d418097 ("net/atlantic: implement EEPROM get/set")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
 Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>

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

* [dpdk-stable] patch 'net/atlantic: fix EEPROM get for small and uneven lengths' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (20 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix buffer overflow' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix link configuration' " Kevin Traynor
                   ` (37 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Pavel Belous; +Cc: Igor Russkikh, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From b5e5bd079a0408e5eb5b11bc70cd9d567235bca9 Mon Sep 17 00:00:00 2001
From: Pavel Belous <pavel.belous@aquantia.com>
Date: Tue, 12 Mar 2019 15:25:01 +0000
Subject: [PATCH] net/atlantic: fix EEPROM get for small and uneven lengths

[ upstream commit d940a707858981efc376ff9a8552270437fc7272 ]

Fixes: ce4e8d418097 ("net/atlantic: implement EEPROM get/set")

Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
---
 .../net/atlantic/hw_atl/hw_atl_utils_fw2x.c   | 28 ++++++++++++++++---
 1 file changed, 24 insertions(+), 4 deletions(-)

diff --git a/drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c b/drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c
index f90ccfe9e..4d850d397 100644
--- a/drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c
+++ b/drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c
@@ -530,11 +530,31 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, u32 *data, u32 len)
 
 	if (result == 0) {
-		err = hw_atl_utils_fw_downld_dwords(self,
+		u32 num_dwords = len / sizeof(u32);
+		u32 bytes_remains = len % sizeof(u32);
+
+		if (num_dwords) {
+			err = hw_atl_utils_fw_downld_dwords(self,
 				self->rpc_addr + sizeof(u32) * 2,
 				data,
-				RTE_ALIGN(len, sizeof(u32)));
+				num_dwords);
 
-		if (err < 0)
-			return err;
+			if (err < 0)
+				return err;
+		}
+
+		if (bytes_remains) {
+			u32 val = 0;
+
+			err = hw_atl_utils_fw_downld_dwords(self,
+				self->rpc_addr + sizeof(u32) * 2 + num_dwords,
+				&val,
+				sizeof(u32));
+
+			if (err < 0)
+				return err;
+
+			rte_memcpy((u8 *)data + len - bytes_remains,
+				   &val, bytes_remains);
+		}
 	}
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.238872529 +0100
+++ 0023-net-atlantic-fix-EEPROM-get-for-small-and-uneven-len.patch	2019-04-16 15:34:25.167180238 +0100
@@ -1,10 +1,11 @@
-From d940a707858981efc376ff9a8552270437fc7272 Mon Sep 17 00:00:00 2001
+From b5e5bd079a0408e5eb5b11bc70cd9d567235bca9 Mon Sep 17 00:00:00 2001
 From: Pavel Belous <pavel.belous@aquantia.com>
 Date: Tue, 12 Mar 2019 15:25:01 +0000
 Subject: [PATCH] net/atlantic: fix EEPROM get for small and uneven lengths
 
+[ upstream commit d940a707858981efc376ff9a8552270437fc7272 ]
+
 Fixes: ce4e8d418097 ("net/atlantic: implement EEPROM get/set")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
 Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
@@ -13,10 +14,10 @@
  1 file changed, 24 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c b/drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c
-index 1d9190155..f215ceb70 100644
+index f90ccfe9e..4d850d397 100644
 --- a/drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c
 +++ b/drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c
-@@ -535,11 +535,31 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, int dev_addr,
+@@ -530,11 +530,31 @@ static int aq_fw2x_get_eeprom(struct aq_hw_s *self, u32 *data, u32 len)
  
  	if (result == 0) {
 -		err = hw_atl_utils_fw_downld_dwords(self,

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

* [dpdk-stable] patch 'net/atlantic: fix link configuration' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (21 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix EEPROM get for small and uneven lengths' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix missing VLAN filter offload' " Kevin Traynor
                   ` (36 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Igor Russkikh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 85a79ecfbc385e09dc0c688c023ecb77b49bd7df Mon Sep 17 00:00:00 2001
From: Igor Russkikh <igor.russkikh@aquantia.com>
Date: Tue, 12 Mar 2019 15:25:03 +0000
Subject: [PATCH] net/atlantic: fix link configuration

[ upstream commit 51a071cd8e97d2e7e6ddb7b160aa460292ba608b ]

In case link speed is re configured after port start, it does not
takes the requested speed value, but instead just sets full autoneg
mask.

Fixes: 7943ba05f67c ("net/atlantic: add link status and interrupt management")

Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
---
 drivers/net/atlantic/atl_ethdev.c | 44 ++++++++++++++-----------------
 1 file changed, 20 insertions(+), 24 deletions(-)

diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index 5bc04f55c..0ce9308d3 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -466,6 +466,4 @@ atl_dev_start(struct rte_eth_dev *dev)
 	struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
 	uint32_t intr_vector = 0;
-	uint32_t *link_speeds;
-	uint32_t speed = 0;
 	int status;
 	int err;
@@ -544,4 +542,6 @@ atl_dev_start(struct rte_eth_dev *dev)
 	}
 
+	err = atl_dev_set_link_up(dev);
+
 	err = hw->aq_fw_ops->update_link_status(hw);
 
@@ -551,24 +551,4 @@ atl_dev_start(struct rte_eth_dev *dev)
 	dev->data->dev_link.link_status = hw->aq_link_status.mbps != 0;
 
-	link_speeds = &dev->data->dev_conf.link_speeds;
-
-	speed = 0x0;
-
-	if (*link_speeds == ETH_LINK_SPEED_AUTONEG) {
-		speed = hw->aq_nic_cfg->link_speed_msk;
-	} else {
-		if (*link_speeds & ETH_LINK_SPEED_10G)
-			speed |= AQ_NIC_RATE_10G;
-		if (*link_speeds & ETH_LINK_SPEED_5G)
-			speed |= AQ_NIC_RATE_5G;
-		if (*link_speeds & ETH_LINK_SPEED_1G)
-			speed |= AQ_NIC_RATE_1G;
-		if (*link_speeds & ETH_LINK_SPEED_2_5G)
-			speed |=  AQ_NIC_RATE_2G5;
-		if (*link_speeds & ETH_LINK_SPEED_100M)
-			speed |= AQ_NIC_RATE_100M;
-	}
-
-	err = hw->aq_fw_ops->set_link_speed(hw, speed);
 	if (err)
 		goto error;
@@ -658,7 +638,23 @@ atl_dev_set_link_up(struct rte_eth_dev *dev)
 {
 	struct aq_hw_s *hw = ATL_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	uint32_t link_speeds = dev->data->dev_conf.link_speeds;
+	uint32_t speed_mask = 0;
 
-	return hw->aq_fw_ops->set_link_speed(hw,
-			hw->aq_nic_cfg->link_speed_msk);
+	if (link_speeds == ETH_LINK_SPEED_AUTONEG) {
+		speed_mask = hw->aq_nic_cfg->link_speed_msk;
+	} else {
+		if (link_speeds & ETH_LINK_SPEED_10G)
+			speed_mask |= AQ_NIC_RATE_10G;
+		if (link_speeds & ETH_LINK_SPEED_5G)
+			speed_mask |= AQ_NIC_RATE_5G;
+		if (link_speeds & ETH_LINK_SPEED_1G)
+			speed_mask |= AQ_NIC_RATE_1G;
+		if (link_speeds & ETH_LINK_SPEED_2_5G)
+			speed_mask |=  AQ_NIC_RATE_2G5;
+		if (link_speeds & ETH_LINK_SPEED_100M)
+			speed_mask |= AQ_NIC_RATE_100M;
+	}
+
+	return hw->aq_fw_ops->set_link_speed(hw, speed_mask);
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.277929089 +0100
+++ 0024-net-atlantic-fix-link-configuration.patch	2019-04-16 15:34:25.168180216 +0100
@@ -1,14 +1,15 @@
-From 51a071cd8e97d2e7e6ddb7b160aa460292ba608b Mon Sep 17 00:00:00 2001
+From 85a79ecfbc385e09dc0c688c023ecb77b49bd7df Mon Sep 17 00:00:00 2001
 From: Igor Russkikh <igor.russkikh@aquantia.com>
 Date: Tue, 12 Mar 2019 15:25:03 +0000
 Subject: [PATCH] net/atlantic: fix link configuration
 
+[ upstream commit 51a071cd8e97d2e7e6ddb7b160aa460292ba608b ]
+
 In case link speed is re configured after port start, it does not
 takes the requested speed value, but instead just sets full autoneg
 mask.
 
 Fixes: 7943ba05f67c ("net/atlantic: add link status and interrupt management")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
 ---
@@ -16,7 +17,7 @@
  1 file changed, 20 insertions(+), 24 deletions(-)
 
 diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
-index a510646a5..e43e1e724 100644
+index 5bc04f55c..0ce9308d3 100644
 --- a/drivers/net/atlantic/atl_ethdev.c
 +++ b/drivers/net/atlantic/atl_ethdev.c
 @@ -466,6 +466,4 @@ atl_dev_start(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/atlantic: fix missing VLAN filter offload' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (22 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix link configuration' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix xstats return' " Kevin Traynor
                   ` (35 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Igor Russkikh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 54e2b3c27b8c31cdde635d931fc2b60e826124de Mon Sep 17 00:00:00 2001
From: Igor Russkikh <igor.russkikh@aquantia.com>
Date: Tue, 12 Mar 2019 15:25:07 +0000
Subject: [PATCH] net/atlantic: fix missing VLAN filter offload

[ upstream commit ebf751d6a792fd0b689ba0d43fc6fb03f0696cd8 ]

Original vlan offload code declared callbacks, but did not
enable the feature offload bit

Fixes: f7c2c2c8c558 ("net/atlantic: implement VLAN filters and offloads")

Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
---
 drivers/net/atlantic/atl_ethdev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index 0ce9308d3..0fc7af83e 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -166,5 +166,6 @@ static struct rte_pci_driver rte_atl_pmd = {
 			| DEV_RX_OFFLOAD_UDP_CKSUM \
 			| DEV_RX_OFFLOAD_TCP_CKSUM \
-			| DEV_RX_OFFLOAD_JUMBO_FRAME)
+			| DEV_RX_OFFLOAD_JUMBO_FRAME \
+			| DEV_RX_OFFLOAD_VLAN_FILTER)
 
 #define ATL_TX_OFFLOADS (DEV_TX_OFFLOAD_VLAN_INSERT \
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.321521964 +0100
+++ 0025-net-atlantic-fix-missing-VLAN-filter-offload.patch	2019-04-16 15:34:25.169180194 +0100
@@ -1,13 +1,14 @@
-From ebf751d6a792fd0b689ba0d43fc6fb03f0696cd8 Mon Sep 17 00:00:00 2001
+From 54e2b3c27b8c31cdde635d931fc2b60e826124de Mon Sep 17 00:00:00 2001
 From: Igor Russkikh <igor.russkikh@aquantia.com>
 Date: Tue, 12 Mar 2019 15:25:07 +0000
 Subject: [PATCH] net/atlantic: fix missing VLAN filter offload
 
+[ upstream commit ebf751d6a792fd0b689ba0d43fc6fb03f0696cd8 ]
+
 Original vlan offload code declared callbacks, but did not
 enable the feature offload bit
 
 Fixes: f7c2c2c8c558 ("net/atlantic: implement VLAN filters and offloads")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
 ---
@@ -15,7 +16,7 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
-index e43e1e724..b05dc545d 100644
+index 0ce9308d3..0fc7af83e 100644
 --- a/drivers/net/atlantic/atl_ethdev.c
 +++ b/drivers/net/atlantic/atl_ethdev.c
 @@ -166,5 +166,6 @@ static struct rte_pci_driver rte_atl_pmd = {

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

* [dpdk-stable] patch 'net/atlantic: fix xstats return' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (23 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix missing VLAN filter offload' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/enic: fix max MTU calculation' " Kevin Traynor
                   ` (34 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Igor Russkikh; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 357f86784d3c9a9715f5a6591edddcd431668c80 Mon Sep 17 00:00:00 2001
From: Igor Russkikh <igor.russkikh@aquantia.com>
Date: Tue, 12 Mar 2019 15:25:10 +0000
Subject: [PATCH] net/atlantic: fix xstats return

[ upstream commit 5ab51dbfd4e7f14d0b0329cec33d5d545bd610bc ]

Max number of xstats items was returned instead of actual number
of filled in records.

Fixes: fbe059e87209 ("net/atlantic: implement device statistics")

Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
---
 drivers/net/atlantic/atl_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index 0fc7af83e..acc00966f 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -759,5 +759,5 @@ atl_dev_xstats_get_names(struct rte_eth_dev *dev __rte_unused,
 			atl_xstats_tbl[i].name);
 
-	return size;
+	return i;
 }
 
@@ -779,5 +779,5 @@ atl_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *stats,
 	}
 
-	return n;
+	return i;
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.362918538 +0100
+++ 0026-net-atlantic-fix-xstats-return.patch	2019-04-16 15:34:25.171180149 +0100
@@ -1,13 +1,14 @@
-From 5ab51dbfd4e7f14d0b0329cec33d5d545bd610bc Mon Sep 17 00:00:00 2001
+From 357f86784d3c9a9715f5a6591edddcd431668c80 Mon Sep 17 00:00:00 2001
 From: Igor Russkikh <igor.russkikh@aquantia.com>
 Date: Tue, 12 Mar 2019 15:25:10 +0000
 Subject: [PATCH] net/atlantic: fix xstats return
 
+[ upstream commit 5ab51dbfd4e7f14d0b0329cec33d5d545bd610bc ]
+
 Max number of xstats items was returned instead of actual number
 of filled in records.
 
 Fixes: fbe059e87209 ("net/atlantic: implement device statistics")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
 ---
@@ -15,7 +16,7 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
-index b05dc545d..5c62d137b 100644
+index 0fc7af83e..acc00966f 100644
 --- a/drivers/net/atlantic/atl_ethdev.c
 +++ b/drivers/net/atlantic/atl_ethdev.c
 @@ -759,5 +759,5 @@ atl_dev_xstats_get_names(struct rte_eth_dev *dev __rte_unused,

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

* [dpdk-stable] patch 'net/enic: fix max MTU calculation' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (24 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix xstats return' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/octeontx: fix vdev name' " Kevin Traynor
                   ` (33 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: John Daley, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 55d63bf043aa4a1f1167759f28d3c65819b1021f Mon Sep 17 00:00:00 2001
From: Hyong Youb Kim <hyonkim@cisco.com>
Date: Thu, 14 Mar 2019 04:05:32 -0700
Subject: [PATCH] net/enic: fix max MTU calculation

[ upstream commit c09eb9352978fc0344e1865a1857e6e1c9cf266f ]

The maximum packet length (max_pkt_len) from the firmware does not
include CRC, so do not subtract 4 when deriving the max MTU. This
change effectively increases the max MTU by 4B. Apps often assume max
MTU = max_rx_pkt_len - 14 (ethernet header), and attempt to set the
MTU to that value (i.e. set MTU to max HW value). This change
incidentally allows such apps to change MTU to max value successfully.

Fixes: bb34ffb848a0 ("net/enic: determine max egress packet size and max MTU")

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
---
 drivers/net/enic/enic.h     | 4 ++--
 drivers/net/enic/enic_res.c | 5 ++---
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h
index e57f90985..377f607f7 100644
--- a/drivers/net/enic/enic.h
+++ b/drivers/net/enic/enic.h
@@ -202,6 +202,6 @@ struct enic {
 static inline uint32_t enic_mtu_to_max_rx_pktlen(uint32_t mtu)
 {
-	/* ethdev max size includes eth and crc whereas NIC MTU does not */
-	return mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;
+	/* ethdev max size includes eth whereas NIC MTU does not */
+	return mtu + ETHER_HDR_LEN;
 }
 
diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c
index 24b2844f3..78bb6b8f1 100644
--- a/drivers/net/enic/enic_res.c
+++ b/drivers/net/enic/enic_res.c
@@ -62,8 +62,7 @@ int enic_get_vnic_config(struct enic *enic)
 	 */
 	if (c->max_pkt_size > ENIC_DEFAULT_RX_MAX_PKT_SIZE)
-		enic->max_mtu = c->max_pkt_size - (ETHER_HDR_LEN + 4);
+		enic->max_mtu = c->max_pkt_size - ETHER_HDR_LEN;
 	else
-		enic->max_mtu = ENIC_DEFAULT_RX_MAX_PKT_SIZE
-				- (ETHER_HDR_LEN + 4);
+		enic->max_mtu = ENIC_DEFAULT_RX_MAX_PKT_SIZE - ETHER_HDR_LEN;
 	if (c->mtu == 0)
 		c->mtu = 1500;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.404177841 +0100
+++ 0027-net-enic-fix-max-MTU-calculation.patch	2019-04-16 15:34:25.172180127 +0100
@@ -1,8 +1,10 @@
-From c09eb9352978fc0344e1865a1857e6e1c9cf266f Mon Sep 17 00:00:00 2001
+From 55d63bf043aa4a1f1167759f28d3c65819b1021f Mon Sep 17 00:00:00 2001
 From: Hyong Youb Kim <hyonkim@cisco.com>
 Date: Thu, 14 Mar 2019 04:05:32 -0700
 Subject: [PATCH] net/enic: fix max MTU calculation
 
+[ upstream commit c09eb9352978fc0344e1865a1857e6e1c9cf266f ]
+
 The maximum packet length (max_pkt_len) from the firmware does not
 include CRC, so do not subtract 4 when deriving the max MTU. This
 change effectively increases the max MTU by 4B. Apps often assume max
@@ -11,7 +13,6 @@
 incidentally allows such apps to change MTU to max value successfully.
 
 Fixes: bb34ffb848a0 ("net/enic: determine max egress packet size and max MTU")
-Cc: stable@dpdk.org
 
 Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
 Reviewed-by: John Daley <johndale@cisco.com>
@@ -21,10 +22,10 @@
  2 files changed, 4 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h
-index fa4d5590e..9193fb038 100644
+index e57f90985..377f607f7 100644
 --- a/drivers/net/enic/enic.h
 +++ b/drivers/net/enic/enic.h
-@@ -204,6 +204,6 @@ struct enic {
+@@ -202,6 +202,6 @@ struct enic {
  static inline uint32_t enic_mtu_to_max_rx_pktlen(uint32_t mtu)
  {
 -	/* ethdev max size includes eth and crc whereas NIC MTU does not */
@@ -34,7 +35,7 @@
  }
  
 diff --git a/drivers/net/enic/enic_res.c b/drivers/net/enic/enic_res.c
-index d289f3da8..f7cbc90fb 100644
+index 24b2844f3..78bb6b8f1 100644
 --- a/drivers/net/enic/enic_res.c
 +++ b/drivers/net/enic/enic_res.c
 @@ -62,8 +62,7 @@ int enic_get_vnic_config(struct enic *enic)

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

* [dpdk-stable] patch 'net/octeontx: fix vdev name' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (25 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/enic: fix max MTU calculation' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'vhost: prevent disabled rings to be processed with zero-copy' " Kevin Traynor
                   ` (32 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Rami Rosen, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 7024b0995c60dcca3870febbaaeffb2e7dd91775 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Wed, 13 Mar 2019 14:58:15 -0700
Subject: [PATCH] net/octeontx: fix vdev name

[ upstream commit b4ec00a2542425c8dae92ac7fa957a12e94686d1 ]

The octeontx driver is creating vdev with name  "OCTEONTX_PMD"
which is an artifact from how RTE_PMD_REGISTER_VDEV arguments
work.

Change to use the same convention as all the other network
drivers ie "net_octeontx").

Fixes: f7be70e5130e ("net/octeontx: add net device probe and remove")

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/net/octeontx/octeontx_ethdev.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/octeontx/octeontx_ethdev.h b/drivers/net/octeontx/octeontx_ethdev.h
index 920f6f89b..2a4a08afc 100644
--- a/drivers/net/octeontx/octeontx_ethdev.h
+++ b/drivers/net/octeontx/octeontx_ethdev.h
@@ -22,4 +22,5 @@
 #include "base/octeontx_io.h"
 
+#define OCTEONTX_PMD				net_octeontx
 #define OCTEONTX_VDEV_DEFAULT_MAX_NR_PORT	12
 #define OCTEONTX_VDEV_NR_PORT_ARG		("nr_port")
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.447497652 +0100
+++ 0028-net-octeontx-fix-vdev-name.patch	2019-04-16 15:34:25.172180127 +0100
@@ -1,8 +1,10 @@
-From b4ec00a2542425c8dae92ac7fa957a12e94686d1 Mon Sep 17 00:00:00 2001
+From 7024b0995c60dcca3870febbaaeffb2e7dd91775 Mon Sep 17 00:00:00 2001
 From: Stephen Hemminger <stephen@networkplumber.org>
 Date: Wed, 13 Mar 2019 14:58:15 -0700
 Subject: [PATCH] net/octeontx: fix vdev name
 
+[ upstream commit b4ec00a2542425c8dae92ac7fa957a12e94686d1 ]
+
 The octeontx driver is creating vdev with name  "OCTEONTX_PMD"
 which is an artifact from how RTE_PMD_REGISTER_VDEV arguments
 work.
@@ -11,7 +13,6 @@
 drivers ie "net_octeontx").
 
 Fixes: f7be70e5130e ("net/octeontx: add net device probe and remove")
-Cc: stable@dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
 Reviewed-by: Rami Rosen <ramirose@gmail.com>

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

* [dpdk-stable] patch 'vhost: prevent disabled rings to be processed with zero-copy' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (26 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/octeontx: fix vdev name' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/virtio-user: fix multiqueue with vhost kernel' " Kevin Traynor
                   ` (31 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: Tiwei Bie, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 7dadea51de8e770dad51940d6a5efc347fd9b30c Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Date: Thu, 28 Feb 2019 18:57:04 +0100
Subject: [PATCH] vhost: prevent disabled rings to be processed with zero-copy

[ upstream commit 11d5253a3e93a38be14da65328dd19960fd8cb14 ]

The vhost-user spec says that once the vring is disabled, the
client has to stop processing it. But it can happen when
dequeue zero-copy is enabled if outstanding descriptors buffers
are still being processed by an external NIC or another guest.

The fix consists in draining the zmbufs list to ensure no more
descriptors buffers are in the wild.

Note that this fix is only working in the case REPLY_ACK
protocol feature is enabled, which is not the case by default
for now (it is only enabled when IOMMU feature is enabled in
the vhost library).

Fixes: b0a985d1f340 ("vhost: add dequeue zero copy")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
 lib/librte_vhost/vhost_user.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index be4f3c6c8..2d1123e60 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1346,4 +1346,8 @@ vhost_user_set_vring_enable(struct virtio_net **pdev,
 				index, enable);
 
+	/* On disable, rings have to be stopped being processed. */
+	if (!enable && dev->dequeue_zero_copy)
+		drain_zmbuf_list(dev->virtqueue[index]);
+
 	dev->virtqueue[index]->enabled = enable;
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.487909570 +0100
+++ 0029-vhost-prevent-disabled-rings-to-be-processed-with-ze.patch	2019-04-16 15:34:25.174180083 +0100
@@ -1,8 +1,10 @@
-From 11d5253a3e93a38be14da65328dd19960fd8cb14 Mon Sep 17 00:00:00 2001
+From 7dadea51de8e770dad51940d6a5efc347fd9b30c Mon Sep 17 00:00:00 2001
 From: Maxime Coquelin <maxime.coquelin@redhat.com>
 Date: Thu, 28 Feb 2019 18:57:04 +0100
 Subject: [PATCH] vhost: prevent disabled rings to be processed with zero-copy
 
+[ upstream commit 11d5253a3e93a38be14da65328dd19960fd8cb14 ]
+
 The vhost-user spec says that once the vring is disabled, the
 client has to stop processing it. But it can happen when
 dequeue zero-copy is enabled if outstanding descriptors buffers
@@ -17,7 +19,6 @@
 the vhost library).
 
 Fixes: b0a985d1f340 ("vhost: add dequeue zero copy")
-Cc: stable@dpdk.org
 
 Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
 Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
@@ -26,7 +27,7 @@
  1 file changed, 4 insertions(+)
 
 diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
-index 36c0c676d..555d09ad9 100644
+index be4f3c6c8..2d1123e60 100644
 --- a/lib/librte_vhost/vhost_user.c
 +++ b/lib/librte_vhost/vhost_user.c
 @@ -1346,4 +1346,8 @@ vhost_user_set_vring_enable(struct virtio_net **pdev,

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

* [dpdk-stable] patch 'net/virtio-user: fix multiqueue with vhost kernel' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (27 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'vhost: prevent disabled rings to be processed with zero-copy' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'vhost: fix interrupt suppression for the split ring' " Kevin Traynor
                   ` (30 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Stephen Hemminger, Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From cc49e7b184e487c2121a8bdc78c5615010b0fcb5 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Tue, 12 Mar 2019 15:13:07 +0800
Subject: [PATCH] net/virtio-user: fix multiqueue with vhost kernel

[ upstream commit bad78b4b8b23412f6007efd034de04b35c663a6f ]

The multiqueue support in virtio-user with vhost kernel backend
is broken when tap name isn't specified by users explicitly,
because the tap name returned by ioctl(TUNSETIFF) isn't saved
properly, and multiple tap interfaces will be created in this
case. Fix this by saving the dynamically allocated tap name
first before reusing the ifr structure. Besides, also make it
possible to support the format string in tap name (e.g. foo%d)
specified by users explicitly.

Fixes: 791b43e08842 ("net/virtio-user: specify MAC of the tap")

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/virtio/virtio_user/vhost_kernel_tap.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
index a3faf1d0c..fbd9e979d 100644
--- a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
+++ b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
@@ -63,4 +63,5 @@ vhost_kernel_open_tap(char **p_ifname, int hdr_size, int req_mq,
 {
 	unsigned int tap_features;
+	char *tap_name = NULL;
 	int sndbuf = INT_MAX;
 	struct ifreq ifr;
@@ -113,4 +114,10 @@ vhost_kernel_open_tap(char **p_ifname, int hdr_size, int req_mq,
 	}
 
+	tap_name = strdup(ifr.ifr_name);
+	if (!tap_name) {
+		PMD_DRV_LOG(ERR, "strdup ifname failed: %s", strerror(errno));
+		goto error;
+	}
+
 	fcntl(tapfd, F_SETFL, O_NONBLOCK);
 
@@ -135,9 +142,10 @@ vhost_kernel_open_tap(char **p_ifname, int hdr_size, int req_mq,
 	}
 
-	if (!(*p_ifname))
-		*p_ifname = strdup(ifr.ifr_name);
+	free(*p_ifname);
+	*p_ifname = tap_name;
 
 	return tapfd;
 error:
+	free(tap_name);
 	close(tapfd);
 	return -1;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.530281599 +0100
+++ 0030-net-virtio-user-fix-multiqueue-with-vhost-kernel.patch	2019-04-16 15:34:25.175180061 +0100
@@ -1,8 +1,10 @@
-From bad78b4b8b23412f6007efd034de04b35c663a6f Mon Sep 17 00:00:00 2001
+From cc49e7b184e487c2121a8bdc78c5615010b0fcb5 Mon Sep 17 00:00:00 2001
 From: Tiwei Bie <tiwei.bie@intel.com>
 Date: Tue, 12 Mar 2019 15:13:07 +0800
 Subject: [PATCH] net/virtio-user: fix multiqueue with vhost kernel
 
+[ upstream commit bad78b4b8b23412f6007efd034de04b35c663a6f ]
+
 The multiqueue support in virtio-user with vhost kernel backend
 is broken when tap name isn't specified by users explicitly,
 because the tap name returned by ioctl(TUNSETIFF) isn't saved
@@ -13,7 +15,6 @@
 specified by users explicitly.
 
 Fixes: 791b43e08842 ("net/virtio-user: specify MAC of the tap")
-Cc: stable@dpdk.org
 
 Reported-by: Stephen Hemminger <stephen@networkplumber.org>
 Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>

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

* [dpdk-stable] patch 'vhost: fix interrupt suppression for the split ring' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (28 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/virtio-user: fix multiqueue with vhost kernel' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/virtio: add barrier in interrupt enable' " Kevin Traynor
                   ` (29 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Jiayu Hu; +Cc: Yinan Wang, Tiwei Bie, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 771777c9191f025077b60ee93d5d747f7e63d571 Mon Sep 17 00:00:00 2001
From: Jiayu Hu <jiayu.hu@intel.com>
Date: Sun, 17 Mar 2019 14:38:32 +0800
Subject: [PATCH] vhost: fix interrupt suppression for the split ring

[ upstream commit 2f706027c8ee1bfcf4895cc35a42f0d2270dc819 ]

The VIRTIO_RING_F_EVENT_IDX feature of split ring might
be broken, as the value of signalled_used is invalid
after live migration, start up and virtio driver reload.
This patch fixes it by using signalled_used_valid.

In addition, this patch makes the VIRTIO_RING_F_EVENT_IDX
implementation of split ring match kernel backend to suppress
more interrupts.

Fixes: e37ff954405a ("vhost: support virtqueue interrupt/notification suppression")

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
---
 lib/librte_vhost/vhost.h      | 12 ++++++++----
 lib/librte_vhost/vhost_user.c |  2 ++
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index 0f9fc9edd..bb9cff9f7 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -687,4 +687,8 @@ vhost_vring_call_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
 		uint16_t old = vq->signalled_used;
 		uint16_t new = vq->last_used_idx;
+		bool signalled_used_valid = vq->signalled_used_valid;
+
+		vq->signalled_used = new;
+		vq->signalled_used_valid = true;
 
 		VHOST_LOG_DEBUG(VHOST_DATA, "%s: used_event_idx=%d, old=%d, new=%d\n",
@@ -692,9 +696,9 @@ vhost_vring_call_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
 			vhost_used_event(vq),
 			old, new);
-		if (vhost_need_event(vhost_used_event(vq), new, old)
-			&& (vq->callfd >= 0)) {
-			vq->signalled_used = vq->last_used_idx;
+
+		if ((vhost_need_event(vhost_used_event(vq), new, old) &&
+					(vq->callfd >= 0)) ||
+				unlikely(!signalled_used_valid))
 			eventfd_write(vq->callfd, (eventfd_t) 1);
-		}
 	} else {
 		/* Kick the guest if necessary. */
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 2d1123e60..7952ef700 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -1299,4 +1299,6 @@ vhost_user_get_vring_base(struct virtio_net **pdev,
 	vq->callfd = VIRTIO_UNINITIALIZED_EVENTFD;
 
+	vq->signalled_used_valid = false;
+
 	if (dev->dequeue_zero_copy)
 		free_zmbufs(vq);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.574932928 +0100
+++ 0031-vhost-fix-interrupt-suppression-for-the-split-ring.patch	2019-04-16 15:34:25.177180016 +0100
@@ -1,8 +1,10 @@
-From 2f706027c8ee1bfcf4895cc35a42f0d2270dc819 Mon Sep 17 00:00:00 2001
+From 771777c9191f025077b60ee93d5d747f7e63d571 Mon Sep 17 00:00:00 2001
 From: Jiayu Hu <jiayu.hu@intel.com>
 Date: Sun, 17 Mar 2019 14:38:32 +0800
 Subject: [PATCH] vhost: fix interrupt suppression for the split ring
 
+[ upstream commit 2f706027c8ee1bfcf4895cc35a42f0d2270dc819 ]
+
 The VIRTIO_RING_F_EVENT_IDX feature of split ring might
 be broken, as the value of signalled_used is invalid
 after live migration, start up and virtio driver reload.
@@ -13,7 +15,6 @@
 more interrupts.
 
 Fixes: e37ff954405a ("vhost: support virtqueue interrupt/notification suppression")
-Cc: stable@dpdk.org
 
 Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
 Tested-by: Yinan Wang <yinan.wang@intel.com>
@@ -24,10 +25,10 @@
  2 files changed, 10 insertions(+), 4 deletions(-)
 
 diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
-index f008ec43b..e9138dfab 100644
+index 0f9fc9edd..bb9cff9f7 100644
 --- a/lib/librte_vhost/vhost.h
 +++ b/lib/librte_vhost/vhost.h
-@@ -634,4 +634,8 @@ vhost_vring_call_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
+@@ -687,4 +687,8 @@ vhost_vring_call_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
  		uint16_t old = vq->signalled_used;
  		uint16_t new = vq->last_used_idx;
 +		bool signalled_used_valid = vq->signalled_used_valid;
@@ -36,7 +37,7 @@
 +		vq->signalled_used_valid = true;
  
  		VHOST_LOG_DEBUG(VHOST_DATA, "%s: used_event_idx=%d, old=%d, new=%d\n",
-@@ -639,9 +643,9 @@ vhost_vring_call_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
+@@ -692,9 +696,9 @@ vhost_vring_call_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
  			vhost_used_event(vq),
  			old, new);
 -		if (vhost_need_event(vhost_used_event(vq), new, old)
@@ -51,7 +52,7 @@
  	} else {
  		/* Kick the guest if necessary. */
 diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
-index 555d09ad9..4f215769f 100644
+index 2d1123e60..7952ef700 100644
 --- a/lib/librte_vhost/vhost_user.c
 +++ b/lib/librte_vhost/vhost_user.c
 @@ -1299,4 +1299,6 @@ vhost_user_get_vring_base(struct virtio_net **pdev,

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

* [dpdk-stable] patch 'net/virtio: add barrier in interrupt enable' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (29 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'vhost: fix interrupt suppression for the split ring' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'app/testpmd: fix stdout flush after printing stats' " Kevin Traynor
                   ` (28 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 4d06e68e88a603eb8ca13e815498eedefd12c748 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Tue, 19 Mar 2019 14:43:05 +0800
Subject: [PATCH] net/virtio: add barrier in interrupt enable

[ upstream commit 8f66bc4ac3c0d4a11252d860f495abd806aa871f ]

Typically, after enabling Rx interrupt, a check should be done
to make sure that there is no new incoming packets before going
to sleep. So a barrier is needed to make sure that any following
check won't happen before the interrupt is actually enabled.

Fixes: c056be239db5 ("net/virtio: add Rx interrupt enable/disable functions")

Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 drivers/net/virtio/virtio_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index a1096287e..1767140b7 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -729,4 +729,5 @@ virtio_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
 
 	virtqueue_enable_intr(vq);
+	virtio_mb();
 	return 0;
 }
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.617302709 +0100
+++ 0032-net-virtio-add-barrier-in-interrupt-enable.patch	2019-04-16 15:34:25.179179972 +0100
@@ -1,35 +1,31 @@
-From 8f66bc4ac3c0d4a11252d860f495abd806aa871f Mon Sep 17 00:00:00 2001
+From 4d06e68e88a603eb8ca13e815498eedefd12c748 Mon Sep 17 00:00:00 2001
 From: Tiwei Bie <tiwei.bie@intel.com>
 Date: Tue, 19 Mar 2019 14:43:05 +0800
 Subject: [PATCH] net/virtio: add barrier in interrupt enable
 
+[ upstream commit 8f66bc4ac3c0d4a11252d860f495abd806aa871f ]
+
 Typically, after enabling Rx interrupt, a check should be done
 to make sure that there is no new incoming packets before going
 to sleep. So a barrier is needed to make sure that any following
 check won't happen before the interrupt is actually enabled.
 
 Fixes: c056be239db5 ("net/virtio: add Rx interrupt enable/disable functions")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
 ---
- drivers/net/virtio/virtio_ethdev.c | 2 ++
- 1 file changed, 2 insertions(+)
+ drivers/net/virtio/virtio_ethdev.c | 1 +
+ 1 file changed, 1 insertion(+)
 
 diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
-index 78ba7bd29..ff16fb63e 100644
+index a1096287e..1767140b7 100644
 --- a/drivers/net/virtio/virtio_ethdev.c
 +++ b/drivers/net/virtio/virtio_ethdev.c
-@@ -851,8 +851,10 @@ static int
- virtio_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
- {
-+	struct virtio_hw *hw = dev->data->dev_private;
- 	struct virtnet_rx *rxvq = dev->data->rx_queues[queue_id];
- 	struct virtqueue *vq = rxvq->vq;
+@@ -729,4 +729,5 @@ virtio_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id)
  
  	virtqueue_enable_intr(vq);
-+	virtio_mb(hw->weak_barriers);
++	virtio_mb();
  	return 0;
  }
 -- 

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

* [dpdk-stable] patch 'app/testpmd: fix stdout flush after printing stats' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (30 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/virtio: add barrier in interrupt enable' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/nfp: fix possible buffer overflow' " Kevin Traynor
                   ` (27 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Igor Romanov; +Cc: Andrew Rybchenko, Bernard Iremonger, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From c30166747e762bfe4f7b5eff1ef02e465d095c67 Mon Sep 17 00:00:00 2001
From: Igor Romanov <igor.romanov@oktetlabs.ru>
Date: Mon, 18 Mar 2019 11:35:47 +0000
Subject: [PATCH] app/testpmd: fix stdout flush after printing stats

[ upstream commit 683d1e82a0f2caae1a9c6f1209ab4d743373a173 ]

User can specify stats period(n). The statistics should be available
to user every n second. But the print_stats() function does not
force stdout to be flushed, so for instance, a user reading testpmd's
stdout through pipe will not be able to read it until the stdout
buffer is filled.

Fixes: cfea1f3048d1 ("app/testpmd: print statistics periodically")

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test-pmd/testpmd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 7b0c8e682..2fb5e15e7 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -3059,4 +3059,6 @@ print_stats(void)
 	for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++)
 		nic_stats_display(fwd_ports_ids[i]);
+
+	fflush(stdout);
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.661945034 +0100
+++ 0033-app-testpmd-fix-stdout-flush-after-printing-stats.patch	2019-04-16 15:34:25.182179905 +0100
@@ -1,8 +1,10 @@
-From 683d1e82a0f2caae1a9c6f1209ab4d743373a173 Mon Sep 17 00:00:00 2001
+From c30166747e762bfe4f7b5eff1ef02e465d095c67 Mon Sep 17 00:00:00 2001
 From: Igor Romanov <igor.romanov@oktetlabs.ru>
 Date: Mon, 18 Mar 2019 11:35:47 +0000
 Subject: [PATCH] app/testpmd: fix stdout flush after printing stats
 
+[ upstream commit 683d1e82a0f2caae1a9c6f1209ab4d743373a173 ]
+
 User can specify stats period(n). The statistics should be available
 to user every n second. But the print_stats() function does not
 force stdout to be flushed, so for instance, a user reading testpmd's
@@ -10,7 +12,6 @@
 buffer is filled.
 
 Fixes: cfea1f3048d1 ("app/testpmd: print statistics periodically")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -20,10 +21,10 @@
  1 file changed, 2 insertions(+)
 
 diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
-index d9d0c16d4..216be47f9 100644
+index 7b0c8e682..2fb5e15e7 100644
 --- a/app/test-pmd/testpmd.c
 +++ b/app/test-pmd/testpmd.c
-@@ -3047,4 +3047,6 @@ print_stats(void)
+@@ -3059,4 +3059,6 @@ print_stats(void)
  	for (i = 0; i < cur_fwd_config.nb_fwd_ports; i++)
  		nic_stats_display(fwd_ports_ids[i]);
 +

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

* [dpdk-stable] patch 'net/nfp: fix possible buffer overflow' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (31 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'app/testpmd: fix stdout flush after printing stats' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/tap: fix getting max iovec' " Kevin Traynor
                   ` (26 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Pallantla Poornima; +Cc: Alejandro Lucero, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 458ede605fabc48f152db2df9d679e61fa5a2123 Mon Sep 17 00:00:00 2001
From: Pallantla Poornima <pallantlax.poornima@intel.com>
Date: Fri, 8 Mar 2019 10:28:05 +0000
Subject: [PATCH] net/nfp: fix possible buffer overflow

[ upstream commit 968e9c14f3fe51174e8cda7eb9148985f28f1bb3 ]

sprintf function is not secure as it doesn't check the length of string.
More secure function snprintf is used.

Fixes: 896c265ef954 ("net/nfp: use new CPP interface")
Fixes: c4171b520b3f ("net/nfp: support PF multiport")

Signed-off-by: Pallantla Poornima <pallantlax.poornima@intel.com>
Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Tested-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 drivers/net/nfp/nfp_net.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 2e3879176..99c9b46e8 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2958,7 +2958,7 @@ nfp_pf_create_dev(struct rte_pci_device *dev, int port, int ports,
 
 	if (ports > 1)
-		sprintf(port_name, "%s_port%d", dev->device.name, port);
+		snprintf(port_name, 100, "%s_port%d", dev->device.name, port);
 	else
-		sprintf(port_name, "%s", dev->device.name);
+		strlcat(port_name, dev->device.name, 100);
 
 	eth_dev = rte_eth_dev_allocate(port_name);
@@ -3025,10 +3025,12 @@ nfp_fw_upload(struct rte_pci_device *dev, struct nfp_nsp *nsp, char *card)
 
 	/* First try to find a firmware image specific for this device */
-	sprintf(serial, "serial-%02x-%02x-%02x-%02x-%02x-%02x-%02x-%02x",
+	snprintf(serial, sizeof(serial),
+			"serial-%02x-%02x-%02x-%02x-%02x-%02x-%02x-%02x",
 		cpp->serial[0], cpp->serial[1], cpp->serial[2], cpp->serial[3],
 		cpp->serial[4], cpp->serial[5], cpp->interface >> 8,
 		cpp->interface & 0xff);
 
-	sprintf(fw_name, "%s/%s.nffw", DEFAULT_FW_PATH, serial);
+	snprintf(fw_name, sizeof(fw_name), "%s/%s.nffw", DEFAULT_FW_PATH,
+			serial);
 
 	PMD_DRV_LOG(DEBUG, "Trying with fw file: %s", fw_name);
@@ -3038,5 +3040,6 @@ nfp_fw_upload(struct rte_pci_device *dev, struct nfp_nsp *nsp, char *card)
 
 	/* Then try the PCI name */
-	sprintf(fw_name, "%s/pci-%s.nffw", DEFAULT_FW_PATH, dev->device.name);
+	snprintf(fw_name, sizeof(fw_name), "%s/pci-%s.nffw", DEFAULT_FW_PATH,
+			dev->device.name);
 
 	PMD_DRV_LOG(DEBUG, "Trying with fw file: %s", fw_name);
@@ -3046,5 +3049,5 @@ nfp_fw_upload(struct rte_pci_device *dev, struct nfp_nsp *nsp, char *card)
 
 	/* Finally try the card type and media */
-	sprintf(fw_name, "%s/%s", DEFAULT_FW_PATH, card);
+	snprintf(fw_name, sizeof(fw_name), "%s/%s", DEFAULT_FW_PATH, card);
 	PMD_DRV_LOG(DEBUG, "Trying with fw file: %s", fw_name);
 	fw_f = open(fw_name, O_RDONLY);
@@ -3122,6 +3125,7 @@ nfp_fw_setup(struct rte_pci_device *dev, struct nfp_cpp *cpp,
 	PMD_DRV_LOG(INFO, "Port speed: %u", nfp_eth_table->ports[0].speed);
 
-	sprintf(card_desc, "nic_%s_%dx%d.nffw", nfp_fw_model,
-		nfp_eth_table->count, nfp_eth_table->ports[0].speed / 1000);
+	snprintf(card_desc, sizeof(card_desc), "nic_%s_%dx%d.nffw",
+			nfp_fw_model, nfp_eth_table->count,
+			nfp_eth_table->ports[0].speed / 1000);
 
 	nsp = nfp_nsp_open(cpp);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.704800549 +0100
+++ 0034-net-nfp-fix-possible-buffer-overflow.patch	2019-04-16 15:34:25.184179861 +0100
@@ -1,14 +1,15 @@
-From 968e9c14f3fe51174e8cda7eb9148985f28f1bb3 Mon Sep 17 00:00:00 2001
+From 458ede605fabc48f152db2df9d679e61fa5a2123 Mon Sep 17 00:00:00 2001
 From: Pallantla Poornima <pallantlax.poornima@intel.com>
 Date: Fri, 8 Mar 2019 10:28:05 +0000
 Subject: [PATCH] net/nfp: fix possible buffer overflow
 
+[ upstream commit 968e9c14f3fe51174e8cda7eb9148985f28f1bb3 ]
+
 sprintf function is not secure as it doesn't check the length of string.
 More secure function snprintf is used.
 
 Fixes: 896c265ef954 ("net/nfp: use new CPP interface")
 Fixes: c4171b520b3f ("net/nfp: support PF multiport")
-Cc: stable@dpdk.org
 
 Signed-off-by: Pallantla Poornima <pallantlax.poornima@intel.com>
 Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
@@ -18,10 +19,10 @@
  1 file changed, 12 insertions(+), 8 deletions(-)
 
 diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
-index fa7722a47..611a6ee35 100644
+index 2e3879176..99c9b46e8 100644
 --- a/drivers/net/nfp/nfp_net.c
 +++ b/drivers/net/nfp/nfp_net.c
-@@ -3322,7 +3322,7 @@ nfp_pf_create_dev(struct rte_pci_device *dev, int port, int ports,
+@@ -2958,7 +2958,7 @@ nfp_pf_create_dev(struct rte_pci_device *dev, int port, int ports,
  
  	if (ports > 1)
 -		sprintf(port_name, "%s_port%d", dev->device.name, port);
@@ -30,8 +31,8 @@
 -		sprintf(port_name, "%s", dev->device.name);
 +		strlcat(port_name, dev->device.name, 100);
  
- 
-@@ -3437,10 +3437,12 @@ nfp_fw_upload(struct rte_pci_device *dev, struct nfp_nsp *nsp, char *card)
+ 	eth_dev = rte_eth_dev_allocate(port_name);
+@@ -3025,10 +3025,12 @@ nfp_fw_upload(struct rte_pci_device *dev, struct nfp_nsp *nsp, char *card)
  
  	/* First try to find a firmware image specific for this device */
 -	sprintf(serial, "serial-%02x-%02x-%02x-%02x-%02x-%02x-%02x-%02x",
@@ -46,7 +47,7 @@
 +			serial);
  
  	PMD_DRV_LOG(DEBUG, "Trying with fw file: %s", fw_name);
-@@ -3450,5 +3452,6 @@ nfp_fw_upload(struct rte_pci_device *dev, struct nfp_nsp *nsp, char *card)
+@@ -3038,5 +3040,6 @@ nfp_fw_upload(struct rte_pci_device *dev, struct nfp_nsp *nsp, char *card)
  
  	/* Then try the PCI name */
 -	sprintf(fw_name, "%s/pci-%s.nffw", DEFAULT_FW_PATH, dev->device.name);
@@ -54,14 +55,14 @@
 +			dev->device.name);
  
  	PMD_DRV_LOG(DEBUG, "Trying with fw file: %s", fw_name);
-@@ -3458,5 +3461,5 @@ nfp_fw_upload(struct rte_pci_device *dev, struct nfp_nsp *nsp, char *card)
+@@ -3046,5 +3049,5 @@ nfp_fw_upload(struct rte_pci_device *dev, struct nfp_nsp *nsp, char *card)
  
  	/* Finally try the card type and media */
 -	sprintf(fw_name, "%s/%s", DEFAULT_FW_PATH, card);
 +	snprintf(fw_name, sizeof(fw_name), "%s/%s", DEFAULT_FW_PATH, card);
  	PMD_DRV_LOG(DEBUG, "Trying with fw file: %s", fw_name);
  	fw_f = open(fw_name, O_RDONLY);
-@@ -3534,6 +3537,7 @@ nfp_fw_setup(struct rte_pci_device *dev, struct nfp_cpp *cpp,
+@@ -3122,6 +3125,7 @@ nfp_fw_setup(struct rte_pci_device *dev, struct nfp_cpp *cpp,
  	PMD_DRV_LOG(INFO, "Port speed: %u", nfp_eth_table->ports[0].speed);
  
 -	sprintf(card_desc, "nic_%s_%dx%d.nffw", nfp_fw_model,

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

* [dpdk-stable] patch 'net/tap: fix getting max iovec' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (32 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/nfp: fix possible buffer overflow' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/sfc: fix speed capabilities reported in device info' " Kevin Traynor
                   ` (25 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Oleg Polyakov; +Cc: Keith Wiles, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 454c44c9b9d1801e4210b7c4c0f40c42b324a96a Mon Sep 17 00:00:00 2001
From: Oleg Polyakov <olegp123@walla.co.il>
Date: Mon, 18 Mar 2019 14:20:47 -0400
Subject: [PATCH] net/tap: fix getting max iovec

[ upstream commit efa28ae847546a1376b2112544490251dd0ea5cd ]

If the value _SC_IOV_MAX is missing, sysconf returns -1.
In this case, iov_max is set to a default value of 1024.
This should never happen except for redhat bug:
   https://bugzilla.redhat.com/show_bug.cgi?id=1504165

Fixes: ec12df9504fe ("net/tap: fix support for large Rx queues")

Signed-off-by: Oleg Polyakov <olegp123@walla.co.il>
Acked-by: Keith Wiles <keith.wiles@intel.com>
---
 drivers/net/tap/rte_eth_tap.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 17273eb68..d16bc8c7f 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -68,4 +68,6 @@
 #define TAP_MP_KEY "tap_mp_sync_queues"
 
+#define TAP_IOV_DEFAULT_MAX 1024
+
 static int tap_devices_count;
 static struct rte_vdev_driver pmd_tap_drv;
@@ -1327,4 +1329,11 @@ tap_rx_queue_setup(struct rte_eth_dev *dev,
 	struct rte_mbuf **tmp = &rxq->pool;
 	long iov_max = sysconf(_SC_IOV_MAX);
+
+	if (iov_max <= 0) {
+		TAP_LOG(WARNING,
+			"_SC_IOV_MAX is not defined. Using %d as default",
+			TAP_IOV_DEFAULT_MAX);
+		iov_max = TAP_IOV_DEFAULT_MAX;
+	}
 	uint16_t nb_desc = RTE_MIN(nb_rx_desc, iov_max - 1);
 	struct iovec (*iovecs)[nb_desc + 1];
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.750037671 +0100
+++ 0035-net-tap-fix-getting-max-iovec.patch	2019-04-16 15:34:25.186179817 +0100
@@ -1,15 +1,16 @@
-From efa28ae847546a1376b2112544490251dd0ea5cd Mon Sep 17 00:00:00 2001
+From 454c44c9b9d1801e4210b7c4c0f40c42b324a96a Mon Sep 17 00:00:00 2001
 From: Oleg Polyakov <olegp123@walla.co.il>
 Date: Mon, 18 Mar 2019 14:20:47 -0400
 Subject: [PATCH] net/tap: fix getting max iovec
 
+[ upstream commit efa28ae847546a1376b2112544490251dd0ea5cd ]
+
 If the value _SC_IOV_MAX is missing, sysconf returns -1.
 In this case, iov_max is set to a default value of 1024.
 This should never happen except for redhat bug:
    https://bugzilla.redhat.com/show_bug.cgi?id=1504165
 
 Fixes: ec12df9504fe ("net/tap: fix support for large Rx queues")
-Cc: stable@dpdk.org
 
 Signed-off-by: Oleg Polyakov <olegp123@walla.co.il>
 Acked-by: Keith Wiles <keith.wiles@intel.com>
@@ -18,10 +19,10 @@
  1 file changed, 9 insertions(+)
 
 diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
-index 6f5109fca..9aae4c77f 100644
+index 17273eb68..d16bc8c7f 100644
 --- a/drivers/net/tap/rte_eth_tap.c
 +++ b/drivers/net/tap/rte_eth_tap.c
-@@ -69,4 +69,6 @@
+@@ -68,4 +68,6 @@
  #define TAP_MP_KEY "tap_mp_sync_queues"
  
 +#define TAP_IOV_DEFAULT_MAX 1024

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

* [dpdk-stable] patch 'net/sfc: fix speed capabilities reported in device info' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (33 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/tap: fix getting max iovec' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/bonding: fix LACP negotiation' " Kevin Traynor
                   ` (24 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 78ce47dad62e02247c3fdc669b02b49194e0cab7 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Tue, 19 Mar 2019 16:36:00 +0000
Subject: [PATCH] net/sfc: fix speed capabilities reported in device info

[ upstream commit cf6a73fc3fb774477feea692e90d2976a8f91cd8 ]

Phy capabilities are bit offsets in libefx, but was used as bit masks.

Fixes: d23f3a89ab54 ("net/sfc: support link speed and duplex settings")
Fixes: f82e33afbbb9 ("net/sfc: support link speeds up to 100G")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_ethdev.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 10e032400..83dd088cf 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -95,15 +95,15 @@ sfc_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	/* Autonegotiation may be disabled */
 	dev_info->speed_capa = ETH_LINK_SPEED_FIXED;
-	if (sa->port.phy_adv_cap_mask & EFX_PHY_CAP_1000FDX)
+	if (sa->port.phy_adv_cap_mask & (1u << EFX_PHY_CAP_1000FDX))
 		dev_info->speed_capa |= ETH_LINK_SPEED_1G;
-	if (sa->port.phy_adv_cap_mask & EFX_PHY_CAP_10000FDX)
+	if (sa->port.phy_adv_cap_mask & (1u << EFX_PHY_CAP_10000FDX))
 		dev_info->speed_capa |= ETH_LINK_SPEED_10G;
-	if (sa->port.phy_adv_cap_mask & EFX_PHY_CAP_25000FDX)
+	if (sa->port.phy_adv_cap_mask & (1u << EFX_PHY_CAP_25000FDX))
 		dev_info->speed_capa |= ETH_LINK_SPEED_25G;
-	if (sa->port.phy_adv_cap_mask & EFX_PHY_CAP_40000FDX)
+	if (sa->port.phy_adv_cap_mask & (1u << EFX_PHY_CAP_40000FDX))
 		dev_info->speed_capa |= ETH_LINK_SPEED_40G;
-	if (sa->port.phy_adv_cap_mask & EFX_PHY_CAP_50000FDX)
+	if (sa->port.phy_adv_cap_mask & (1u << EFX_PHY_CAP_50000FDX))
 		dev_info->speed_capa |= ETH_LINK_SPEED_50G;
-	if (sa->port.phy_adv_cap_mask & EFX_PHY_CAP_100000FDX)
+	if (sa->port.phy_adv_cap_mask & (1u << EFX_PHY_CAP_100000FDX))
 		dev_info->speed_capa |= ETH_LINK_SPEED_100G;
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.793029519 +0100
+++ 0036-net-sfc-fix-speed-capabilities-reported-in-device-in.patch	2019-04-16 15:34:25.188179772 +0100
@@ -1,13 +1,14 @@
-From cf6a73fc3fb774477feea692e90d2976a8f91cd8 Mon Sep 17 00:00:00 2001
+From 78ce47dad62e02247c3fdc669b02b49194e0cab7 Mon Sep 17 00:00:00 2001
 From: Andrew Rybchenko <arybchenko@solarflare.com>
 Date: Tue, 19 Mar 2019 16:36:00 +0000
 Subject: [PATCH] net/sfc: fix speed capabilities reported in device info
 
+[ upstream commit cf6a73fc3fb774477feea692e90d2976a8f91cd8 ]
+
 Phy capabilities are bit offsets in libefx, but was used as bit masks.
 
 Fixes: d23f3a89ab54 ("net/sfc: support link speed and duplex settings")
 Fixes: f82e33afbbb9 ("net/sfc: support link speeds up to 100G")
-Cc: stable@dpdk.org
 
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
 ---
@@ -15,10 +16,10 @@
  1 file changed, 6 insertions(+), 6 deletions(-)
 
 diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
-index e7bfd8917..2675d4a8c 100644
+index 10e032400..83dd088cf 100644
 --- a/drivers/net/sfc/sfc_ethdev.c
 +++ b/drivers/net/sfc/sfc_ethdev.c
-@@ -97,15 +97,15 @@ sfc_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -95,15 +95,15 @@ sfc_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
  	/* Autonegotiation may be disabled */
  	dev_info->speed_capa = ETH_LINK_SPEED_FIXED;
 -	if (sa->port.phy_adv_cap_mask & EFX_PHY_CAP_1000FDX)

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

* [dpdk-stable] patch 'net/bonding: fix LACP negotiation' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (34 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/sfc: fix speed capabilities reported in device info' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/cxgbe: fix missing checksum flags and packet type' " Kevin Traynor
                   ` (23 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Liang Zhang; +Cc: Chas Williams, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 52a5cdadf575164b02001616db20003c7a2474dc Mon Sep 17 00:00:00 2001
From: Liang Zhang <zhangliang@bigo.sg>
Date: Thu, 21 Mar 2019 18:22:47 +0800
Subject: [PATCH] net/bonding: fix LACP negotiation

[ upstream commit 56cbc08173995d6d57bd5927dfe9b11ad269bf8d ]

When monitor(port-mirroring) traffic from other LACP port-channel,
rx_machine_update may be receiving other LACP negotiation packets.
Thus bond mode 4 negotiation will fail.

Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")

Signed-off-by: Liang Zhang <zhangliang@bigo.sg>
Acked-by: Chas Williams <chas3@att.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c         | 12 ++++++++++--
 drivers/net/bonding/rte_eth_bond_8023ad_private.h |  1 +
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index dd847c6f6..dac23ac7b 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -785,4 +785,5 @@ rx_machine_update(struct bond_dev_private *internals, uint8_t slave_id,
 		struct rte_mbuf *lacp_pkt) {
 	struct lacpdu_header *lacp;
+	struct lacpdu_actor_partner_params *partner;
 
 	if (lacp_pkt != NULL) {
@@ -790,6 +791,12 @@ rx_machine_update(struct bond_dev_private *internals, uint8_t slave_id,
 		RTE_ASSERT(lacp->lacpdu.subtype == SLOW_SUBTYPE_LACP);
 
-		/* This is LACP frame so pass it to rx_machine */
-		rx_machine(internals, slave_id, &lacp->lacpdu);
+		partner = &lacp->lacpdu.partner;
+		if (is_same_ether_addr(&partner->port_params.system,
+			&internals->mode4.mac_addr)) {
+			/* This LACP frame is sending to the bonding port
+			 * so pass it to rx_machine.
+			 */
+			rx_machine(internals, slave_id, &lacp->lacpdu);
+		}
 		rte_pktmbuf_free(lacp_pkt);
 	} else
@@ -1166,4 +1173,5 @@ bond_mode_8023ad_start(struct rte_eth_dev *bond_dev)
 	static const uint64_t us = BOND_MODE_8023AX_UPDATE_TIMEOUT_MS * 1000;
 
+	rte_eth_macaddr_get(internals->port_id, &mode4->mac_addr);
 	if (mode4->slowrx_cb)
 		return rte_eal_alarm_set(us, &bond_mode_8023ad_ext_periodic_cb,
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad_private.h b/drivers/net/bonding/rte_eth_bond_8023ad_private.h
index c51426b85..f91902ebd 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad_private.h
+++ b/drivers/net/bonding/rte_eth_bond_8023ad_private.h
@@ -151,4 +151,5 @@ struct mode8023ad_private {
 	rte_eth_bond_8023ad_ext_slowrx_fn slowrx_cb;
 	uint8_t external_sm;
+	struct ether_addr mac_addr;
 
 	struct rte_eth_link slave_link;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.839924497 +0100
+++ 0037-net-bonding-fix-LACP-negotiation.patch	2019-04-16 15:34:25.189179750 +0100
@@ -1,14 +1,15 @@
-From 56cbc08173995d6d57bd5927dfe9b11ad269bf8d Mon Sep 17 00:00:00 2001
+From 52a5cdadf575164b02001616db20003c7a2474dc Mon Sep 17 00:00:00 2001
 From: Liang Zhang <zhangliang@bigo.sg>
 Date: Thu, 21 Mar 2019 18:22:47 +0800
 Subject: [PATCH] net/bonding: fix LACP negotiation
 
+[ upstream commit 56cbc08173995d6d57bd5927dfe9b11ad269bf8d ]
+
 When monitor(port-mirroring) traffic from other LACP port-channel,
 rx_machine_update may be receiving other LACP negotiation packets.
 Thus bond mode 4 negotiation will fail.
 
 Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")
-Cc: stable@dpdk.org
 
 Signed-off-by: Liang Zhang <zhangliang@bigo.sg>
 Acked-by: Chas Williams <chas3@att.com>

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

* [dpdk-stable] patch 'net/cxgbe: fix missing checksum flags and packet type' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (35 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/bonding: fix LACP negotiation' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'doc: fix examples in bonding guide' " Kevin Traynor
                   ` (22 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: Vishal Kulkarni; +Cc: Rahul Lakkireddy, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 7beb36406df7b38890c4aaef03b6bdf81f0ba87a Mon Sep 17 00:00:00 2001
From: Vishal Kulkarni <vishal@chelsio.com>
Date: Wed, 20 Mar 2019 17:18:21 +0530
Subject: [PATCH] net/cxgbe: fix missing checksum flags and packet type

[ upstream commit df68e75a79a4d0f86d0ebea2d43775759e066a2a ]

Checksum good offload flags are not being set and some of the
packet type flags are missing on received packets. So, rework
Rx path to set proper ol_flags and packet_type in mbufs.

Fixes: 78fc1a716ae8 ("cxgbe: improve Rx performance")

Signed-off-by: Vishal Kulkarni <vishal@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/sge.c | 78 +++++++++++++++++++++++++----------------
 1 file changed, 48 insertions(+), 30 deletions(-)

diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c
index f9d2d48a0..663c0a796 100644
--- a/drivers/net/cxgbe/sge.c
+++ b/drivers/net/cxgbe/sge.c
@@ -1605,4 +1605,50 @@ static inline void rspq_next(struct sge_rspq *q)
 }
 
+static inline void cxgbe_set_mbuf_info(struct rte_mbuf *pkt, uint32_t ptype,
+				       uint64_t ol_flags)
+{
+	pkt->packet_type |= ptype;
+	pkt->ol_flags |= ol_flags;
+}
+
+static inline void cxgbe_fill_mbuf_info(struct adapter *adap,
+					const struct cpl_rx_pkt *cpl,
+					struct rte_mbuf *pkt)
+{
+	bool csum_ok;
+	u16 err_vec;
+
+	if (adap->params.tp.rx_pkt_encap)
+		err_vec = G_T6_COMPR_RXERR_VEC(ntohs(cpl->err_vec));
+	else
+		err_vec = ntohs(cpl->err_vec);
+
+	csum_ok = cpl->csum_calc && !err_vec;
+
+	if (cpl->vlan_ex)
+		cxgbe_set_mbuf_info(pkt, RTE_PTYPE_L2_ETHER_VLAN,
+				    PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED);
+	else
+		cxgbe_set_mbuf_info(pkt, RTE_PTYPE_L2_ETHER, 0);
+
+	if (cpl->l2info & htonl(F_RXF_IP))
+		cxgbe_set_mbuf_info(pkt, RTE_PTYPE_L3_IPV4,
+				    csum_ok ? PKT_RX_IP_CKSUM_GOOD :
+					      PKT_RX_IP_CKSUM_BAD);
+	else if (cpl->l2info & htonl(F_RXF_IP6))
+		cxgbe_set_mbuf_info(pkt, RTE_PTYPE_L3_IPV6,
+				    csum_ok ? PKT_RX_IP_CKSUM_GOOD :
+					      PKT_RX_IP_CKSUM_BAD);
+
+	if (cpl->l2info & htonl(F_RXF_TCP))
+		cxgbe_set_mbuf_info(pkt, RTE_PTYPE_L4_TCP,
+				    csum_ok ? PKT_RX_L4_CKSUM_GOOD :
+					      PKT_RX_L4_CKSUM_BAD);
+	else if (cpl->l2info & htonl(F_RXF_UDP))
+		cxgbe_set_mbuf_info(pkt, RTE_PTYPE_L4_UDP,
+				    csum_ok ? PKT_RX_L4_CKSUM_GOOD :
+					      PKT_RX_L4_CKSUM_BAD);
+}
+
 /**
  * process_responses - process responses from an SGE response queue
@@ -1656,6 +1702,4 @@ static int process_responses(struct sge_rspq *q, int budget,
 				struct rte_mbuf *pkt, *npkt;
 				u32 len, bufsz;
-				bool csum_ok;
-				u16 err_vec;
 
 				rc = (const struct rsp_ctrl *)
@@ -1674,14 +1718,4 @@ static int process_responses(struct sge_rspq *q, int budget,
 				pkt->pkt_len = len;
 
-				/* Compressed error vector is enabled for
-				 * T6 only
-				 */
-				if (q->adapter->params.tp.rx_pkt_encap)
-					err_vec = G_T6_COMPR_RXERR_VEC(
-							ntohs(cpl->err_vec));
-				else
-					err_vec = ntohs(cpl->err_vec);
-				csum_ok = cpl->csum_calc && !err_vec;
-
 				/* Chain mbufs into len if necessary */
 				while (len) {
@@ -1701,18 +1735,5 @@ static int process_responses(struct sge_rspq *q, int budget,
 				pkt->nb_segs--;
 
-				if (cpl->l2info & htonl(F_RXF_IP)) {
-					pkt->packet_type = RTE_PTYPE_L3_IPV4;
-					if (unlikely(!csum_ok))
-						pkt->ol_flags |=
-							PKT_RX_IP_CKSUM_BAD;
-
-					if ((cpl->l2info &
-					     htonl(F_RXF_UDP | F_RXF_TCP)) &&
-					    !csum_ok)
-						pkt->ol_flags |=
-							PKT_RX_L4_CKSUM_BAD;
-				} else if (cpl->l2info & htonl(F_RXF_IP6)) {
-					pkt->packet_type = RTE_PTYPE_L3_IPV6;
-				}
+				cxgbe_fill_mbuf_info(q->adapter, cpl, pkt);
 
 				if (!rss_hdr->filter_tid &&
@@ -1723,9 +1744,6 @@ static int process_responses(struct sge_rspq *q, int budget,
 				}
 
-				if (cpl->vlan_ex) {
-					pkt->ol_flags |= PKT_RX_VLAN |
-							 PKT_RX_VLAN_STRIPPED;
+				if (cpl->vlan_ex)
 					pkt->vlan_tci = ntohs(cpl->vlan);
-				}
 
 				rte_pktmbuf_adj(pkt, s->pktshift);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.886556791 +0100
+++ 0038-net-cxgbe-fix-missing-checksum-flags-and-packet-type.patch	2019-04-16 15:34:25.192179684 +0100
@@ -1,14 +1,15 @@
-From df68e75a79a4d0f86d0ebea2d43775759e066a2a Mon Sep 17 00:00:00 2001
+From 7beb36406df7b38890c4aaef03b6bdf81f0ba87a Mon Sep 17 00:00:00 2001
 From: Vishal Kulkarni <vishal@chelsio.com>
 Date: Wed, 20 Mar 2019 17:18:21 +0530
 Subject: [PATCH] net/cxgbe: fix missing checksum flags and packet type
 
+[ upstream commit df68e75a79a4d0f86d0ebea2d43775759e066a2a ]
+
 Checksum good offload flags are not being set and some of the
 packet type flags are missing on received packets. So, rework
 Rx path to set proper ol_flags and packet_type in mbufs.
 
 Fixes: 78fc1a716ae8 ("cxgbe: improve Rx performance")
-Cc: stable@dpdk.org
 
 Signed-off-by: Vishal Kulkarni <vishal@chelsio.com>
 Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
@@ -17,10 +18,10 @@
  1 file changed, 48 insertions(+), 30 deletions(-)
 
 diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c
-index bfb90a33c..3a0eba5df 100644
+index f9d2d48a0..663c0a796 100644
 --- a/drivers/net/cxgbe/sge.c
 +++ b/drivers/net/cxgbe/sge.c
-@@ -1514,4 +1514,50 @@ static inline void rspq_next(struct sge_rspq *q)
+@@ -1605,4 +1605,50 @@ static inline void rspq_next(struct sge_rspq *q)
  }
  
 +static inline void cxgbe_set_mbuf_info(struct rte_mbuf *pkt, uint32_t ptype,
@@ -71,14 +72,14 @@
 +
  /**
   * process_responses - process responses from an SGE response queue
-@@ -1565,6 +1611,4 @@ static int process_responses(struct sge_rspq *q, int budget,
+@@ -1656,6 +1702,4 @@ static int process_responses(struct sge_rspq *q, int budget,
  				struct rte_mbuf *pkt, *npkt;
  				u32 len, bufsz;
 -				bool csum_ok;
 -				u16 err_vec;
  
  				rc = (const struct rsp_ctrl *)
-@@ -1583,14 +1627,4 @@ static int process_responses(struct sge_rspq *q, int budget,
+@@ -1674,14 +1718,4 @@ static int process_responses(struct sge_rspq *q, int budget,
  				pkt->pkt_len = len;
  
 -				/* Compressed error vector is enabled for
@@ -93,7 +94,7 @@
 -
  				/* Chain mbufs into len if necessary */
  				while (len) {
-@@ -1610,18 +1644,5 @@ static int process_responses(struct sge_rspq *q, int budget,
+@@ -1701,18 +1735,5 @@ static int process_responses(struct sge_rspq *q, int budget,
  				pkt->nb_segs--;
  
 -				if (cpl->l2info & htonl(F_RXF_IP)) {
@@ -113,7 +114,7 @@
 +				cxgbe_fill_mbuf_info(q->adapter, cpl, pkt);
  
  				if (!rss_hdr->filter_tid &&
-@@ -1632,9 +1653,6 @@ static int process_responses(struct sge_rspq *q, int budget,
+@@ -1723,9 +1744,6 @@ static int process_responses(struct sge_rspq *q, int budget,
  				}
  
 -				if (cpl->vlan_ex) {

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

* [dpdk-stable] patch 'doc: fix examples in bonding guide' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (36 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/cxgbe: fix missing checksum flags and packet type' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/bonding: fix port id types' " Kevin Traynor
                   ` (21 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: David Marchand; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 698980ee0ef3426870ff5a69a111c9270b2ee22d Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 20 Mar 2019 12:47:18 +0100
Subject: [PATCH] doc: fix examples in bonding guide

[ upstream commit 86dc5089e696ce39eb6964b6d96c995656042049 ]

Removed incorrect space character and fixed PCI addresses.

Fixes: fc1f2750a3ec ("doc: programmers guide")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst b/doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst
index 56abee547..2459fd243 100644
--- a/doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst
+++ b/doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst
@@ -478,5 +478,5 @@ Create a bonded device in round robin mode with two slaves specified by their PC
 .. code-block:: console
 
-    $RTE_TARGET/app/testpmd -l 0-3 -n 4 --vdev 'net_bonding0,mode=0, slave=0000:00a:00.01,slave=0000:004:00.00' -- --port-topology=chained
+    $RTE_TARGET/app/testpmd -l 0-3 -n 4 --vdev 'net_bonding0,mode=0,slave=0000:0a:00.01,slave=0000:04:00.00' -- --port-topology=chained
 
 Create a bonded device in round robin mode with two slaves specified by their PCI address and an overriding MAC address:
@@ -484,5 +484,5 @@ Create a bonded device in round robin mode with two slaves specified by their PC
 .. code-block:: console
 
-    $RTE_TARGET/app/testpmd -l 0-3 -n 4 --vdev 'net_bonding0,mode=0, slave=0000:00a:00.01,slave=0000:004:00.00,mac=00:1e:67:1d:fd:1d' -- --port-topology=chained
+    $RTE_TARGET/app/testpmd -l 0-3 -n 4 --vdev 'net_bonding0,mode=0,slave=0000:0a:00.01,slave=0000:04:00.00,mac=00:1e:67:1d:fd:1d' -- --port-topology=chained
 
 Create a bonded device in active backup mode with two slaves specified, and a primary slave specified by their PCI addresses:
@@ -490,5 +490,5 @@ Create a bonded device in active backup mode with two slaves specified, and a pr
 .. code-block:: console
 
-    $RTE_TARGET/app/testpmd -l 0-3 -n 4 --vdev 'net_bonding0,mode=1, slave=0000:00a:00.01,slave=0000:004:00.00,primary=0000:00a:00.01' -- --port-topology=chained
+    $RTE_TARGET/app/testpmd -l 0-3 -n 4 --vdev 'net_bonding0,mode=1,slave=0000:0a:00.01,slave=0000:04:00.00,primary=0000:0a:00.01' -- --port-topology=chained
 
 Create a bonded device in balance mode with two slaves specified by their PCI addresses, and a transmission policy of layer 3 + 4 forwarding:
@@ -496,3 +496,3 @@ Create a bonded device in balance mode with two slaves specified by their PCI ad
 .. code-block:: console
 
-    $RTE_TARGET/app/testpmd -l 0-3 -n 4 --vdev 'net_bonding0,mode=2, slave=0000:00a:00.01,slave=0000:004:00.00,xmit_policy=l34' -- --port-topology=chained
+    $RTE_TARGET/app/testpmd -l 0-3 -n 4 --vdev 'net_bonding0,mode=2,slave=0000:0a:00.01,slave=0000:04:00.00,xmit_policy=l34' -- --port-topology=chained
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.935902652 +0100
+++ 0039-doc-fix-examples-in-bonding-guide.patch	2019-04-16 15:34:25.193179661 +0100
@@ -1,12 +1,13 @@
-From 86dc5089e696ce39eb6964b6d96c995656042049 Mon Sep 17 00:00:00 2001
+From 698980ee0ef3426870ff5a69a111c9270b2ee22d Mon Sep 17 00:00:00 2001
 From: David Marchand <david.marchand@redhat.com>
 Date: Wed, 20 Mar 2019 12:47:18 +0100
 Subject: [PATCH] doc: fix examples in bonding guide
 
+[ upstream commit 86dc5089e696ce39eb6964b6d96c995656042049 ]
+
 Removed incorrect space character and fixed PCI addresses.
 
 Fixes: fc1f2750a3ec ("doc: programmers guide")
-Cc: stable@dpdk.org
 
 Signed-off-by: David Marchand <david.marchand@redhat.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'net/bonding: fix port id types' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (37 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'doc: fix examples in bonding guide' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/bonding: fix slave " Kevin Traynor
                   ` (20 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: David Marchand; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 2e9dd2b63ddc505becdea1c318537051b5a08fe3 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 20 Mar 2019 12:47:19 +0100
Subject: [PATCH] net/bonding: fix port id types

[ upstream commit c4fa09ba8ed585ce68af01d69f1614a1425e86a5 ]

Following the port id conversion to 16bits, two references to bonding
port id have been missed.

Fixes: f8244c6399d9 ("ethdev: increase port id range")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index b0d191d13..df0a3b419 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2197,5 +2197,5 @@ bond_ethdev_close(struct rte_eth_dev *dev)
 {
 	struct bond_dev_private *internals = dev->data->dev_private;
-	uint8_t bond_port_id = internals->port_id;
+	uint16_t bond_port_id = internals->port_id;
 	int skipped = 0;
 	struct rte_flow_error ferror;
@@ -2664,5 +2664,5 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 		return rc;
 
-	bonded_eth_dev = &rte_eth_devices[*(uint8_t *)param];
+	bonded_eth_dev = &rte_eth_devices[*(uint16_t *)param];
 
 	if (check_for_bonded_ethdev(bonded_eth_dev))
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:26.977517133 +0100
+++ 0040-net-bonding-fix-port-id-types.patch	2019-04-16 15:34:25.195179617 +0100
@@ -1,13 +1,14 @@
-From c4fa09ba8ed585ce68af01d69f1614a1425e86a5 Mon Sep 17 00:00:00 2001
+From 2e9dd2b63ddc505becdea1c318537051b5a08fe3 Mon Sep 17 00:00:00 2001
 From: David Marchand <david.marchand@redhat.com>
 Date: Wed, 20 Mar 2019 12:47:19 +0100
 Subject: [PATCH] net/bonding: fix port id types
 
+[ upstream commit c4fa09ba8ed585ce68af01d69f1614a1425e86a5 ]
+
 Following the port id conversion to 16bits, two references to bonding
 port id have been missed.
 
 Fixes: f8244c6399d9 ("ethdev: increase port id range")
-Cc: stable@dpdk.org
 
 Signed-off-by: David Marchand <david.marchand@redhat.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'net/bonding: fix slave id types' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (38 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/bonding: fix port id types' " Kevin Traynor
@ 2019-04-16 14:36 ` Kevin Traynor
  2019-04-16 14:37 ` [dpdk-stable] patch 'net/bonding: fix packet count type for LACP' " Kevin Traynor
                   ` (19 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:36 UTC (permalink / raw)
  To: David Marchand; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From a48b960a6d4c325a62c6480fe1e4311423c353b0 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 20 Mar 2019 12:47:20 +0100
Subject: [PATCH] net/bonding: fix slave id types

[ upstream commit 1d6cab8a91ba461b6a223f98a527d81182c9a6d2 ]

Caught by code review, with port id conversion to 16bits, the slave id
have been extended to 16bits as well (both slave index and count).

Fixes: f8244c6399d9 ("ethdev: increase port id range")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c  | 10 +++---
 drivers/net/bonding/rte_eth_bond_alb.c     |  4 +--
 drivers/net/bonding/rte_eth_bond_api.c     |  4 +--
 drivers/net/bonding/rte_eth_bond_pmd.c     | 36 ++++++++++++----------
 drivers/net/bonding/rte_eth_bond_private.h |  8 ++---
 5 files changed, 33 insertions(+), 29 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index dac23ac7b..1e6a3fc7c 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -665,5 +665,5 @@ max_index(uint64_t *a, int n)
  */
 static void
-selection_logic(struct bond_dev_private *internals, uint8_t slave_id)
+selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
 {
 	struct port *agg, *port;
@@ -782,5 +782,5 @@ link_speed_key(uint16_t speed) {
 
 static void
-rx_machine_update(struct bond_dev_private *internals, uint8_t slave_id,
+rx_machine_update(struct bond_dev_private *internals, uint16_t slave_id,
 		struct rte_mbuf *lacp_pkt) {
 	struct lacpdu_header *lacp;
@@ -813,6 +813,6 @@ bond_mode_8023ad_periodic_cb(void *arg)
 	struct ether_addr slave_addr;
 	struct rte_mbuf *lacp_pkt = NULL;
-
-	uint8_t i, slave_id;
+	uint16_t slave_id;
+	uint16_t i;
 
 
@@ -1157,5 +1157,5 @@ bond_mode_8023ad_enable(struct rte_eth_dev *bond_dev)
 {
 	struct bond_dev_private *internals = bond_dev->data->dev_private;
-	uint8_t i;
+	uint16_t i;
 
 	for (i = 0; i < internals->active_slave_count; i++)
diff --git a/drivers/net/bonding/rte_eth_bond_alb.c b/drivers/net/bonding/rte_eth_bond_alb.c
index c3891c7e3..d3e16d4bd 100644
--- a/drivers/net/bonding/rte_eth_bond_alb.c
+++ b/drivers/net/bonding/rte_eth_bond_alb.c
@@ -19,8 +19,8 @@ simple_hash(uint8_t *hash_start, int hash_size)
 }
 
-static uint8_t
+static uint16_t
 calculate_slave(struct bond_dev_private *internals)
 {
-	uint8_t idx;
+	uint16_t idx;
 
 	idx = (internals->mode6.last_slave + 1) % internals->active_slave_count;
diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index b55752ed3..a23988dc7 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -77,5 +77,5 @@ activate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id)
 {
 	struct bond_dev_private *internals = eth_dev->data->dev_private;
-	uint8_t active_count = internals->active_slave_count;
+	uint16_t active_count = internals->active_slave_count;
 
 	if (internals->mode == BONDING_MODE_8023AD)
@@ -797,5 +797,5 @@ rte_eth_bond_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
 {
 	struct bond_dev_private *internals;
-	uint8_t i;
+	uint16_t i;
 
 	if (valid_bonded_port_id(bonded_port_id) != 0)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index df0a3b419..bbe2568cd 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -354,5 +354,5 @@ bond_ethdev_tx_burst_8023ad_fast_queue(void *queue, struct rte_mbuf **bufs,
 	for (i = 0; i < nb_bufs; i++) {
 		/* Populate slave mbuf arrays with mbufs for that slave. */
-		uint8_t slave_idx = bufs_slave_port_idxs[i];
+		uint16_t slave_idx = bufs_slave_port_idxs[i];
 
 		slave_bufs[slave_idx][slave_nb_bufs[slave_idx]++] = bufs[i];
@@ -405,6 +405,7 @@ bond_ethdev_rx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
 	uint8_t collecting;  /* current slave collecting status */
 	const uint8_t promisc = internals->promiscuous_en;
-	uint8_t i, j, k;
 	uint8_t subtype;
+	uint8_t j, k;
+	uint16_t i;
 
 	/* Copy slave list to protect against slave up/down changes during tx
@@ -775,5 +776,5 @@ ipv6_hash(struct ipv6_hdr *ipv6_hdr)
 void
 burst_xmit_l2_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
-		uint8_t slave_count, uint16_t *slaves)
+		uint16_t slave_count, uint16_t *slaves)
 {
 	struct ether_hdr *eth_hdr;
@@ -792,5 +793,5 @@ burst_xmit_l2_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
 void
 burst_xmit_l23_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
-		uint8_t slave_count, uint16_t *slaves)
+		uint16_t slave_count, uint16_t *slaves)
 {
 	uint16_t i;
@@ -830,5 +831,5 @@ burst_xmit_l23_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
 void
 burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
-		uint8_t slave_count, uint16_t *slaves)
+		uint16_t slave_count, uint16_t *slaves)
 {
 	struct ether_hdr *eth_hdr;
@@ -900,5 +901,5 @@ struct bwg_slave {
 	uint64_t bwg_left_int;
 	uint64_t bwg_left_remainder;
-	uint8_t slave;
+	uint16_t slave;
 };
 
@@ -953,9 +954,10 @@ bond_ethdev_update_tlb_slave_cb(void *arg)
 	struct rte_eth_stats slave_stats;
 	struct bwg_slave bwg_array[RTE_MAX_ETHPORTS];
-	uint8_t slave_count;
+	uint16_t slave_count;
 	uint64_t tx_bytes;
 
 	uint8_t update_stats = 0;
-	uint8_t i, slave_id;
+	uint16_t slave_id;
+	uint16_t i;
 
 	internals->slave_update_idx++;
@@ -1244,5 +1246,5 @@ bond_ethdev_tx_burst_balance(void *queue, struct rte_mbuf **bufs,
 	for (i = 0; i < nb_bufs; i++) {
 		/* Populate slave mbuf arrays with mbufs for that slave. */
-		uint8_t slave_idx = bufs_slave_port_idxs[i];
+		uint16_t slave_idx = bufs_slave_port_idxs[i];
 
 		slave_bufs[slave_idx][slave_nb_bufs[slave_idx]++] = bufs[i];
@@ -1355,5 +1357,5 @@ bond_ethdev_tx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
 			 * slave
 			 */
-			uint8_t slave_idx = bufs_slave_port_idxs[i];
+			uint16_t slave_idx = bufs_slave_port_idxs[i];
 
 			slave_bufs[slave_idx][slave_nb_bufs[slave_idx]++] =
@@ -1397,6 +1399,7 @@ bond_ethdev_tx_burst_broadcast(void *queue, struct rte_mbuf **bufs,
 	struct bond_tx_queue *bd_tx_q;
 
-	uint8_t tx_failed_flag = 0, num_of_slaves;
 	uint16_t slaves[RTE_MAX_ETHPORTS];
+	uint8_t tx_failed_flag = 0;
+	uint16_t num_of_slaves;
 
 	uint16_t max_nb_of_tx_pkts = 0;
@@ -1949,5 +1952,5 @@ slave_remove(struct bond_dev_private *internals,
 		struct rte_eth_dev *slave_eth_dev)
 {
-	uint8_t i;
+	uint16_t i;
 
 	for (i = 0; i < internals->slave_count; i++)
@@ -2148,5 +2151,5 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev)
 {
 	struct bond_dev_private *internals = eth_dev->data->dev_private;
-	uint8_t i;
+	uint16_t i;
 
 	if (internals->mode == BONDING_MODE_8023AD) {
@@ -2244,5 +2247,5 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	if (internals->slave_count > 0) {
 		struct rte_eth_dev_info slave_info;
-		uint8_t idx;
+		uint16_t idx;
 
 		for (idx = 0; idx < internals->slave_count; idx++) {
@@ -2657,7 +2660,8 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 	int rc = -1;
 
-	int i, valid_slave = 0;
-	uint8_t active_pos;
 	uint8_t lsc_flag = 0;
+	int valid_slave = 0;
+	uint16_t active_pos;
+	uint16_t i;
 
 	if (type != RTE_ETH_EVENT_INTR_LSC || param == NULL)
diff --git a/drivers/net/bonding/rte_eth_bond_private.h b/drivers/net/bonding/rte_eth_bond_private.h
index 032ffed02..8afef39ba 100644
--- a/drivers/net/bonding/rte_eth_bond_private.h
+++ b/drivers/net/bonding/rte_eth_bond_private.h
@@ -101,5 +101,5 @@ struct rte_flow {
 
 typedef void (*burst_xmit_hash_t)(struct rte_mbuf **buf, uint16_t nb_pkts,
-		uint8_t slave_count, uint16_t *slaves);
+		uint16_t slave_count, uint16_t *slaves);
 
 /** Link Bonding PMD device private configuration Structure */
@@ -257,13 +257,13 @@ slave_add(struct bond_dev_private *internals,
 void
 burst_xmit_l2_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
-		uint8_t slave_count, uint16_t *slaves);
+		uint16_t slave_count, uint16_t *slaves);
 
 void
 burst_xmit_l23_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
-		uint8_t slave_count, uint16_t *slaves);
+		uint16_t slave_count, uint16_t *slaves);
 
 void
 burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
-		uint8_t slave_count, uint16_t *slaves);
+		uint16_t slave_count, uint16_t *slaves);
 
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:27.020153420 +0100
+++ 0041-net-bonding-fix-slave-id-types.patch	2019-04-16 15:34:25.199179528 +0100
@@ -1,13 +1,14 @@
-From 1d6cab8a91ba461b6a223f98a527d81182c9a6d2 Mon Sep 17 00:00:00 2001
+From a48b960a6d4c325a62c6480fe1e4311423c353b0 Mon Sep 17 00:00:00 2001
 From: David Marchand <david.marchand@redhat.com>
 Date: Wed, 20 Mar 2019 12:47:20 +0100
 Subject: [PATCH] net/bonding: fix slave id types
 
+[ upstream commit 1d6cab8a91ba461b6a223f98a527d81182c9a6d2 ]
+
 Caught by code review, with port id conversion to 16bits, the slave id
 have been extended to 16bits as well (both slave index and count).
 
 Fixes: f8244c6399d9 ("ethdev: increase port id range")
-Cc: stable@dpdk.org
 
 Signed-off-by: David Marchand <david.marchand@redhat.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'net/bonding: fix packet count type for LACP' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (39 preceding siblings ...)
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/bonding: fix slave " Kevin Traynor
@ 2019-04-16 14:37 ` Kevin Traynor
  2019-04-16 14:37 ` [dpdk-stable] patch 'net/bonding: fix queue index types' " Kevin Traynor
                   ` (18 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:37 UTC (permalink / raw)
  To: David Marchand; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From e20f0cf99d9e5b1acc87435a3f041a75a0e4d807 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 20 Mar 2019 12:47:21 +0100
Subject: [PATCH] net/bonding: fix packet count type for LACP

[ upstream commit 646d3f20aa5140ae6152e3b30e59fae9dde3d6a8 ]

Caught by code review, those variables are supposed to be on 16bits to
avoid endless loops in the (unlikely?) case where the application asks
for receiving more than 256 packets and the accumulated num_rx_total
count reaches 256:

uint16_t num_rx_total = 0;
uint8_t j, k;

j = num_rx_total;
num_rx_total += rte_eth_rx_burst();

for (k = j; k < 2 && k < num_rx_total; k++)
	rte_prefetch0(rte_pktmbuf_mtod(bufs[k], void *));

while (j < num_rx_total) {
	j++;
}

Fixes: 46fb43683679 ("bond: add mode 4")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index bbe2568cd..ae66a70f4 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -406,6 +406,7 @@ bond_ethdev_rx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
 	const uint8_t promisc = internals->promiscuous_en;
 	uint8_t subtype;
-	uint8_t j, k;
 	uint16_t i;
+	uint16_t j;
+	uint16_t k;
 
 	/* Copy slave list to protect against slave up/down changes during tx
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:27.069878017 +0100
+++ 0042-net-bonding-fix-packet-count-type-for-LACP.patch	2019-04-16 15:34:25.200179506 +0100
@@ -1,8 +1,10 @@
-From 646d3f20aa5140ae6152e3b30e59fae9dde3d6a8 Mon Sep 17 00:00:00 2001
+From e20f0cf99d9e5b1acc87435a3f041a75a0e4d807 Mon Sep 17 00:00:00 2001
 From: David Marchand <david.marchand@redhat.com>
 Date: Wed, 20 Mar 2019 12:47:21 +0100
 Subject: [PATCH] net/bonding: fix packet count type for LACP
 
+[ upstream commit 646d3f20aa5140ae6152e3b30e59fae9dde3d6a8 ]
+
 Caught by code review, those variables are supposed to be on 16bits to
 avoid endless loops in the (unlikely?) case where the application asks
 for receiving more than 256 packets and the accumulated num_rx_total
@@ -22,7 +24,6 @@
 }
 
 Fixes: 46fb43683679 ("bond: add mode 4")
-Cc: stable@dpdk.org
 
 Signed-off-by: David Marchand <david.marchand@redhat.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'net/bonding: fix queue index types' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (40 preceding siblings ...)
  2019-04-16 14:37 ` [dpdk-stable] patch 'net/bonding: fix packet count type for LACP' " Kevin Traynor
@ 2019-04-16 14:37 ` Kevin Traynor
  2019-04-16 14:37 ` [dpdk-stable] patch 'drivers/net: fix possible overflow using strlcat' " Kevin Traynor
                   ` (17 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:37 UTC (permalink / raw)
  To: David Marchand; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From c25c21b90125ccbc731c99010e38ba43b142c5e8 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 20 Mar 2019 12:47:22 +0100
Subject: [PATCH] net/bonding: fix queue index types

[ upstream commit 88245e7e215272203355f4a671526d193db7a595 ]

Caught by code review, rxq and txq indexes are on 16bits.

Fixes: d1d1e664c6c4 ("bonding: free queue memory when closing")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index ae66a70f4..58b6e4344 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2129,5 +2129,5 @@ static void
 bond_ethdev_free_queues(struct rte_eth_dev *dev)
 {
-	uint8_t i;
+	uint16_t i;
 
 	if (dev->data->rx_queues != NULL) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:27.112200648 +0100
+++ 0043-net-bonding-fix-queue-index-types.patch	2019-04-16 15:34:25.202179461 +0100
@@ -1,12 +1,13 @@
-From 88245e7e215272203355f4a671526d193db7a595 Mon Sep 17 00:00:00 2001
+From c25c21b90125ccbc731c99010e38ba43b142c5e8 Mon Sep 17 00:00:00 2001
 From: David Marchand <david.marchand@redhat.com>
 Date: Wed, 20 Mar 2019 12:47:22 +0100
 Subject: [PATCH] net/bonding: fix queue index types
 
+[ upstream commit 88245e7e215272203355f4a671526d193db7a595 ]
+
 Caught by code review, rxq and txq indexes are on 16bits.
 
 Fixes: d1d1e664c6c4 ("bonding: free queue memory when closing")
-Cc: stable@dpdk.org
 
 Signed-off-by: David Marchand <david.marchand@redhat.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'drivers/net: fix possible overflow using strlcat' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (41 preceding siblings ...)
  2019-04-16 14:37 ` [dpdk-stable] patch 'net/bonding: fix queue index types' " Kevin Traynor
@ 2019-04-16 14:37 ` Kevin Traynor
  2019-04-16 14:37 ` [dpdk-stable] patch 'compress/qat: fix setup inter buffers' " Kevin Traynor
                   ` (16 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:37 UTC (permalink / raw)
  To: Chaitanya Babu Talluri; +Cc: Ferruh Yigit, Shahed Shaikh, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 6ebf5b652d11d578f44b2258bc3414da9b03cf9b Mon Sep 17 00:00:00 2001
From: Chaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com>
Date: Fri, 22 Mar 2019 07:51:42 +0000
Subject: [PATCH] drivers/net: fix possible overflow using strlcat

[ upstream commit faf8c3095ac649f3d893ee846e2aa7cf1b4ccf4d ]

strcat does not check the destination length and there might be
chances of string overflow so instead of strcat, strlcat is used.

Fixes: 540a211084a7 ("bnx2x: driver core")
Fixes: e163c18a15b0 ("net/i40e: update ptype and pctype info")

Signed-off-by: Chaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shahed Shaikh <shshaikh@marvell.com>
---
 drivers/net/bnx2x/bnx2x.c      | 5 +++--
 drivers/net/i40e/i40e_ethdev.c | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 26b3828e8..ab092e23f 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -26,4 +26,5 @@
 #include <fcntl.h>
 #include <zlib.h>
+#include <rte_string_fns.h>
 
 #define BNX2X_PMD_VER_PREFIX "BNX2X PMD"
@@ -11742,5 +11743,5 @@ static const char *get_bnx2x_flags(uint32_t flags)
 	for (i = 0; i < 5; i++)
 		if (flags & (1 << i)) {
-			strcat(flag_str, flag[i]);
+			strlcat(flag_str, flag[i], sizeof(flag_str));
 			flags ^= (1 << i);
 		}
@@ -11748,5 +11749,5 @@ static const char *get_bnx2x_flags(uint32_t flags)
 		static char unknown[BNX2X_INFO_STR_MAX];
 		snprintf(unknown, 32, "Unknown flag mask %x", flags);
-		strcat(flag_str, unknown);
+		strlcat(flag_str, unknown, sizeof(flag_str));
 	}
 	return flag_str;
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 8191a6a73..63ec8136d 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -12203,6 +12203,6 @@ i40e_update_customized_pctype(struct rte_eth_dev *dev, uint8_t *pkg,
 				if (proto[n].proto_id != proto_id)
 					continue;
-				strcat(name, proto[n].name);
-				strcat(name, "_");
+				strlcat(name, proto[n].name, sizeof(name));
+				strlcat(name, "_", sizeof(name));
 				break;
 			}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:27.158407760 +0100
+++ 0044-drivers-net-fix-possible-overflow-using-strlcat.patch	2019-04-16 15:34:25.217179129 +0100
@@ -1,14 +1,15 @@
-From faf8c3095ac649f3d893ee846e2aa7cf1b4ccf4d Mon Sep 17 00:00:00 2001
+From 6ebf5b652d11d578f44b2258bc3414da9b03cf9b Mon Sep 17 00:00:00 2001
 From: Chaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com>
 Date: Fri, 22 Mar 2019 07:51:42 +0000
 Subject: [PATCH] drivers/net: fix possible overflow using strlcat
 
+[ upstream commit faf8c3095ac649f3d893ee846e2aa7cf1b4ccf4d ]
+
 strcat does not check the destination length and there might be
 chances of string overflow so instead of strcat, strlcat is used.
 
 Fixes: 540a211084a7 ("bnx2x: driver core")
 Fixes: e163c18a15b0 ("net/i40e: update ptype and pctype info")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-stable] patch 'compress/qat: fix setup inter buffers' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (42 preceding siblings ...)
  2019-04-16 14:37 ` [dpdk-stable] patch 'drivers/net: fix possible overflow using strlcat' " Kevin Traynor
@ 2019-04-16 14:37 ` Kevin Traynor
  2019-04-16 14:37 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix AES-CTR block size' " Kevin Traynor
                   ` (15 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:37 UTC (permalink / raw)
  To: Marko Kovacevic; +Cc: Fiona Trahe, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From b11ee04d6f6d2928df68811b71ee10a054575d4e Mon Sep 17 00:00:00 2001
From: Marko Kovacevic <marko.kovacevic@intel.com>
Date: Thu, 24 Jan 2019 15:03:04 +0000
Subject: [PATCH] compress/qat: fix setup inter buffers

[ upstream commit 25e9517961d9cebcf643952a3e9a76f7a3de951b ]

This patch fixes qat comp setup inter_buffers
memory allocation size to a broader size
then just 2MB

Fixes: a124830a6f00 ("compress/qat: enable dynamic huffman encoding")

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
 drivers/compress/qat/qat_comp_pmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c
index ea9307721..9b7ae8de1 100644
--- a/drivers/compress/qat/qat_comp_pmd.c
+++ b/drivers/compress/qat/qat_comp_pmd.c
@@ -186,5 +186,5 @@ qat_comp_setup_inter_buffers(struct qat_comp_dev_private *comp_dev,
 	memzone = rte_memzone_reserve_aligned(inter_buff_mz_name, full_size,
 			comp_dev->compressdev->data->socket_id,
-			RTE_MEMZONE_2MB, QAT_64_BYTE_ALIGN);
+			RTE_MEMZONE_IOVA_CONTIG, QAT_64_BYTE_ALIGN);
 	if (memzone == NULL) {
 		QAT_LOG(ERR, "Can't allocate intermediate buffers"
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:27.221605010 +0100
+++ 0045-compress-qat-fix-setup-inter-buffers.patch	2019-04-16 15:34:25.218179107 +0100
@@ -1,14 +1,15 @@
-From 25e9517961d9cebcf643952a3e9a76f7a3de951b Mon Sep 17 00:00:00 2001
+From b11ee04d6f6d2928df68811b71ee10a054575d4e Mon Sep 17 00:00:00 2001
 From: Marko Kovacevic <marko.kovacevic@intel.com>
 Date: Thu, 24 Jan 2019 15:03:04 +0000
 Subject: [PATCH] compress/qat: fix setup inter buffers
 
+[ upstream commit 25e9517961d9cebcf643952a3e9a76f7a3de951b ]
+
 This patch fixes qat comp setup inter_buffers
 memory allocation size to a broader size
 then just 2MB
 
 Fixes: a124830a6f00 ("compress/qat: enable dynamic huffman encoding")
-Cc: stable@dpdk.org
 
 Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
 Acked-by: Fiona Trahe <fiona.trahe@intel.com>
@@ -17,7 +18,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c
-index 27c885625..d45cd675b 100644
+index ea9307721..9b7ae8de1 100644
 --- a/drivers/compress/qat/qat_comp_pmd.c
 +++ b/drivers/compress/qat/qat_comp_pmd.c
 @@ -186,5 +186,5 @@ qat_comp_setup_inter_buffers(struct qat_comp_dev_private *comp_dev,

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

* [dpdk-stable] patch 'examples/ipsec-secgw: fix AES-CTR block size' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (43 preceding siblings ...)
  2019-04-16 14:37 ` [dpdk-stable] patch 'compress/qat: fix setup inter buffers' " Kevin Traynor
@ 2019-04-16 14:37 ` Kevin Traynor
  2019-04-16 14:37 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix debug logs' " Kevin Traynor
                   ` (14 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:37 UTC (permalink / raw)
  To: Fan Zhang; +Cc: Konstantin Ananyev, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 1c839a075d579c942bbc45246f087b213575609e Mon Sep 17 00:00:00 2001
From: Fan Zhang <roy.fan.zhang@intel.com>
Date: Tue, 5 Mar 2019 14:40:41 +0000
Subject: [PATCH] examples/ipsec-secgw: fix AES-CTR block size

[ upstream commit 8d9a222507b291113e18e6bc46f3196a51fd181d ]

This patch fixes the incorrect block size for AES-CTR in
legacy mode. Originally, wrong block size will cause
esp_inbound() drop AES-CTR encrypted packets if the payload
sizes not equal to multiple times of 16.

Fixes: 4470c22de2e1 ("examples/ipsec-secgw: add AES-CTR")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 examples/ipsec-secgw/sa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 640f1d793..4ea016a6a 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -80,5 +80,5 @@ const struct supported_cipher_algo cipher_algos[] = {
 		.algo = RTE_CRYPTO_CIPHER_AES_CTR,
 		.iv_len = 8,
-		.block_size = 16, /* XXX AESNI MB limition, should be 4 */
+		.block_size = 4,
 		.key_len = 20
 	},
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:27.262544033 +0100
+++ 0046-examples-ipsec-secgw-fix-AES-CTR-block-size.patch	2019-04-16 15:34:25.219179084 +0100
@@ -1,15 +1,16 @@
-From 8d9a222507b291113e18e6bc46f3196a51fd181d Mon Sep 17 00:00:00 2001
+From 1c839a075d579c942bbc45246f087b213575609e Mon Sep 17 00:00:00 2001
 From: Fan Zhang <roy.fan.zhang@intel.com>
 Date: Tue, 5 Mar 2019 14:40:41 +0000
 Subject: [PATCH] examples/ipsec-secgw: fix AES-CTR block size
 
+[ upstream commit 8d9a222507b291113e18e6bc46f3196a51fd181d ]
+
 This patch fixes the incorrect block size for AES-CTR in
 legacy mode. Originally, wrong block size will cause
 esp_inbound() drop AES-CTR encrypted packets if the payload
 sizes not equal to multiple times of 16.
 
 Fixes: 4470c22de2e1 ("examples/ipsec-secgw: add AES-CTR")
-Cc: stable@dpdk.org
 
 Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
 Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
@@ -19,10 +20,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
-index 414fcd26c..93e3620bc 100644
+index 640f1d793..4ea016a6a 100644
 --- a/examples/ipsec-secgw/sa.c
 +++ b/examples/ipsec-secgw/sa.c
-@@ -81,5 +81,5 @@ const struct supported_cipher_algo cipher_algos[] = {
+@@ -80,5 +80,5 @@ const struct supported_cipher_algo cipher_algos[] = {
  		.algo = RTE_CRYPTO_CIPHER_AES_CTR,
  		.iv_len = 8,
 -		.block_size = 16, /* XXX AESNI MB limition, should be 4 */

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

* [dpdk-stable] patch 'examples/ipsec-secgw: fix debug logs' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (44 preceding siblings ...)
  2019-04-16 14:37 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix AES-CTR block size' " Kevin Traynor
@ 2019-04-16 14:37 ` Kevin Traynor
  2019-04-16 14:37 ` [dpdk-stable] patch 'cryptodev: fix driver name comparison' " Kevin Traynor
                   ` (13 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:37 UTC (permalink / raw)
  To: Bernard Iremonger; +Cc: Konstantin Ananyev, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 12ae3d018d59eba793dfe6d1c0c3d8d4ab8f0f0a Mon Sep 17 00:00:00 2001
From: Bernard Iremonger <bernard.iremonger@intel.com>
Date: Thu, 7 Mar 2019 10:34:52 +0000
Subject: [PATCH] examples/ipsec-secgw: fix debug logs

[ upstream commit da7a540e1dc64495785d4f0d6e6b20b27bf28580 ]

Improve debug code in esp.c, sa.c and ipsec-secgw.c

Fixes: f159e70b0922 ("examples/ipsec-secgw: support transport mode")
Fixes: ec17993a145a ("examples/ipsec-secgw: support security offload")
Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file")
Fixes: 906257e965b7 ("examples/ipsec-secgw: support IPv6")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 examples/ipsec-secgw/esp.c         |  5 +++--
 examples/ipsec-secgw/ipsec-secgw.c |  6 ++++--
 examples/ipsec-secgw/sa.c          | 21 ++++++++++++++++++---
 3 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/examples/ipsec-secgw/esp.c b/examples/ipsec-secgw/esp.c
index e33232c98..faa84ddd1 100644
--- a/examples/ipsec-secgw/esp.c
+++ b/examples/ipsec-secgw/esp.c
@@ -163,5 +163,5 @@ esp_inbound_post(struct rte_mbuf *m, struct ipsec_sa *sa,
 
 	if (cop->status != RTE_CRYPTO_OP_STATUS_SUCCESS) {
-		RTE_LOG(ERR, IPSEC_ESP, "failed crypto op\n");
+		RTE_LOG(ERR, IPSEC_ESP, "%s() failed crypto op\n", __func__);
 		return -1;
 	}
@@ -456,5 +456,6 @@ esp_outbound_post(struct rte_mbuf *m,
 		RTE_ASSERT(cop != NULL);
 		if (cop->status != RTE_CRYPTO_OP_STATUS_SUCCESS) {
-			RTE_LOG(ERR, IPSEC_ESP, "Failed crypto op\n");
+			RTE_LOG(ERR, IPSEC_ESP, "%s() failed crypto op\n",
+				__func__);
 			return -1;
 		}
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index f88fdb4c4..84fd4de12 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -256,5 +256,6 @@ prepare_one_packet(struct rte_mbuf *pkt, struct ipsec_traffic *t)
 	} else {
 		/* Unknown/Unsupported type, drop the packet */
-		RTE_LOG(ERR, IPSEC, "Unsupported packet type\n");
+		RTE_LOG(ERR, IPSEC, "Unsupported packet type 0x%x\n",
+			rte_be_to_cpu_16(eth->ether_type));
 		rte_pktmbuf_free(pkt);
 	}
@@ -933,5 +934,6 @@ main_loop(__attribute__((unused)) void *dummy)
 
 	if (qconf->nb_rx_queue == 0) {
-		RTE_LOG(INFO, IPSEC, "lcore %u has nothing to do\n", lcore_id);
+		RTE_LOG(DEBUG, IPSEC, "lcore %u has nothing to do\n",
+			lcore_id);
 		return 0;
 	}
diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 4ea016a6a..cd4f369f3 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -688,5 +688,20 @@ print_one_sa_rule(const struct ipsec_sa *sa, int inbound)
 		break;
 	case TRANSPORT:
-		printf("Transport");
+		printf("Transport ");
+		break;
+	}
+	printf(" type:");
+	switch (sa->type) {
+	case RTE_SECURITY_ACTION_TYPE_NONE:
+		printf("no-offload ");
+		break;
+	case RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO:
+		printf("inline-crypto-offload ");
+		break;
+	case RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL:
+		printf("inline-protocol-offload ");
+		break;
+	case RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL:
+		printf("lookaside-protocol-offload ");
 		break;
 	}
@@ -715,6 +730,6 @@ sa_create(const char *name, int32_t socket_id)
 
 	/* Create SA array table */
-	printf("Creating SA context with %u maximum entries\n",
-			IPSEC_SA_MAX_ENTRIES);
+	printf("Creating SA context with %u maximum entries on socket %d\n",
+			IPSEC_SA_MAX_ENTRIES, socket_id);
 
 	mz_size = sizeof(struct sa_ctx);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:27.304387286 +0100
+++ 0047-examples-ipsec-secgw-fix-debug-logs.patch	2019-04-16 15:34:25.221179040 +0100
@@ -1,15 +1,16 @@
-From da7a540e1dc64495785d4f0d6e6b20b27bf28580 Mon Sep 17 00:00:00 2001
+From 12ae3d018d59eba793dfe6d1c0c3d8d4ab8f0f0a Mon Sep 17 00:00:00 2001
 From: Bernard Iremonger <bernard.iremonger@intel.com>
 Date: Thu, 7 Mar 2019 10:34:52 +0000
 Subject: [PATCH] examples/ipsec-secgw: fix debug logs
 
+[ upstream commit da7a540e1dc64495785d4f0d6e6b20b27bf28580 ]
+
 Improve debug code in esp.c, sa.c and ipsec-secgw.c
 
 Fixes: f159e70b0922 ("examples/ipsec-secgw: support transport mode")
 Fixes: ec17993a145a ("examples/ipsec-secgw: support security offload")
 Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file")
 Fixes: 906257e965b7 ("examples/ipsec-secgw: support IPv6")
-Cc: stable@dpdk.org
 
 Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
 Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
@@ -40,10 +41,10 @@
  			return -1;
  		}
 diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
-index 8e7cd1b73..b253eea2b 100644
+index f88fdb4c4..84fd4de12 100644
 --- a/examples/ipsec-secgw/ipsec-secgw.c
 +++ b/examples/ipsec-secgw/ipsec-secgw.c
-@@ -261,5 +261,6 @@ prepare_one_packet(struct rte_mbuf *pkt, struct ipsec_traffic *t)
+@@ -256,5 +256,6 @@ prepare_one_packet(struct rte_mbuf *pkt, struct ipsec_traffic *t)
  	} else {
  		/* Unknown/Unsupported type, drop the packet */
 -		RTE_LOG(ERR, IPSEC, "Unsupported packet type\n");
@@ -51,7 +52,7 @@
 +			rte_be_to_cpu_16(eth->ether_type));
  		rte_pktmbuf_free(pkt);
  	}
-@@ -985,5 +986,6 @@ main_loop(__attribute__((unused)) void *dummy)
+@@ -933,5 +934,6 @@ main_loop(__attribute__((unused)) void *dummy)
  
  	if (qconf->nb_rx_queue == 0) {
 -		RTE_LOG(INFO, IPSEC, "lcore %u has nothing to do\n", lcore_id);
@@ -60,10 +61,10 @@
  		return 0;
  	}
 diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
-index 93e3620bc..a7298a30c 100644
+index 4ea016a6a..cd4f369f3 100644
 --- a/examples/ipsec-secgw/sa.c
 +++ b/examples/ipsec-secgw/sa.c
-@@ -689,5 +689,20 @@ print_one_sa_rule(const struct ipsec_sa *sa, int inbound)
+@@ -688,5 +688,20 @@ print_one_sa_rule(const struct ipsec_sa *sa, int inbound)
  		break;
  	case TRANSPORT:
 -		printf("Transport");
@@ -85,7 +86,7 @@
 +		printf("lookaside-protocol-offload ");
  		break;
  	}
-@@ -717,6 +732,6 @@ sa_create(const char *name, int32_t socket_id)
+@@ -715,6 +730,6 @@ sa_create(const char *name, int32_t socket_id)
  
  	/* Create SA array table */
 -	printf("Creating SA context with %u maximum entries\n",

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

* [dpdk-stable] patch 'cryptodev: fix driver name comparison' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (45 preceding siblings ...)
  2019-04-16 14:37 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix debug logs' " Kevin Traynor
@ 2019-04-16 14:37 ` Kevin Traynor
  2019-04-16 14:37 ` [dpdk-stable] patch 'test/crypto: fix possible overflow using strlcat' " Kevin Traynor
                   ` (12 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:37 UTC (permalink / raw)
  To: Anoob Joseph; +Cc: Ankur Dwivedi, Fiona Trahe, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 8a2facefbc4c7478c8f528715822fb1b852bccb7 Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj@marvell.com>
Date: Mon, 11 Mar 2019 05:55:44 +0000
Subject: [PATCH] cryptodev: fix driver name comparison

[ upstream commit 2382aa8c8f5820a5783b32a82e364a63d486183f ]

The string compare to the length of driver name might give false
positives when there are drivers with similar names (one being the
subset of another).

Following is such a naming which could result in false positive.
1. crypto_driver
2. crypto_driver1

When strncmp with len = strlen("crypto_driver") is done, it could give
a false positive when compared against "crypto_driver1". For such cases,
'strlen + 1' is done, so that the NULL termination also would be
considered for the comparison.

Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for crypto devices")

Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 lib/librte_cryptodev/rte_cryptodev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index a52eaaa45..ff8520cf7 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -577,5 +577,5 @@ rte_cryptodev_devices_get(const char *driver_name, uint8_t *devices,
 			cmp = strncmp(devs[i].device->driver->name,
 					driver_name,
-					strlen(driver_name));
+					strlen(driver_name) + 1);
 
 			if (cmp == 0)
@@ -1572,5 +1572,5 @@ rte_cryptodev_driver_id_get(const char *name)
 	TAILQ_FOREACH(driver, &cryptodev_driver_list, next) {
 		driver_name = driver->driver->name;
-		if (strncmp(driver_name, name, strlen(driver_name)) == 0)
+		if (strncmp(driver_name, name, strlen(driver_name) + 1) == 0)
 			return driver->id;
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:27.351563111 +0100
+++ 0048-cryptodev-fix-driver-name-comparison.patch	2019-04-16 15:34:25.223178996 +0100
@@ -1,8 +1,10 @@
-From 2382aa8c8f5820a5783b32a82e364a63d486183f Mon Sep 17 00:00:00 2001
+From 8a2facefbc4c7478c8f528715822fb1b852bccb7 Mon Sep 17 00:00:00 2001
 From: Anoob Joseph <anoobj@marvell.com>
 Date: Mon, 11 Mar 2019 05:55:44 +0000
 Subject: [PATCH] cryptodev: fix driver name comparison
 
+[ upstream commit 2382aa8c8f5820a5783b32a82e364a63d486183f ]
+
 The string compare to the length of driver name might give false
 positives when there are drivers with similar names (one being the
 subset of another).
@@ -17,7 +19,6 @@
 considered for the comparison.
 
 Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for crypto devices")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
 Signed-off-by: Anoob Joseph <anoobj@marvell.com>
@@ -28,17 +29,17 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
-index 700973530..871d7dda8 100644
+index a52eaaa45..ff8520cf7 100644
 --- a/lib/librte_cryptodev/rte_cryptodev.c
 +++ b/lib/librte_cryptodev/rte_cryptodev.c
-@@ -587,5 +587,5 @@ rte_cryptodev_devices_get(const char *driver_name, uint8_t *devices,
+@@ -577,5 +577,5 @@ rte_cryptodev_devices_get(const char *driver_name, uint8_t *devices,
  			cmp = strncmp(devs[i].device->driver->name,
  					driver_name,
 -					strlen(driver_name));
 +					strlen(driver_name) + 1);
  
  			if (cmp == 0)
-@@ -1692,5 +1692,5 @@ rte_cryptodev_driver_id_get(const char *name)
+@@ -1572,5 +1572,5 @@ rte_cryptodev_driver_id_get(const char *name)
  	TAILQ_FOREACH(driver, &cryptodev_driver_list, next) {
  		driver_name = driver->driver->name;
 -		if (strncmp(driver_name, name, strlen(driver_name)) == 0)

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

* [dpdk-stable] patch 'test/crypto: fix possible overflow using strlcat' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (46 preceding siblings ...)
  2019-04-16 14:37 ` [dpdk-stable] patch 'cryptodev: fix driver name comparison' " Kevin Traynor
@ 2019-04-16 14:37 ` Kevin Traynor
  2019-04-16 14:37 ` [dpdk-stable] patch 'build: remove meson warning for Arm' " Kevin Traynor
                   ` (11 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:37 UTC (permalink / raw)
  To: Chaitanya Babu Talluri; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From f5c74ea2816cbacf857a167c1370ba693981c9c3 Mon Sep 17 00:00:00 2001
From: Chaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com>
Date: Mon, 18 Mar 2019 12:36:36 +0000
Subject: [PATCH] test/crypto: fix possible overflow using strlcat

[ upstream commit e3b91a3ef236b3bb6ee4db12cc285e8f87b942e7 ]

strcat does not check the destination length and there might be
chances of string overflow so instead of strcat, strlcat is used.

Fixes: 6f4eec2565 ("test/crypto: enhance scheduler unit tests")

Signed-off-by: Chaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 test/test/test_cryptodev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 84065eb49..fbe8c21e6 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -16,4 +16,5 @@
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
+#include <rte_string_fns.h>
 
 #ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
@@ -375,5 +376,5 @@ testsuite_setup(void)
 					"%s%d", temp_str, i);
 			strcpy(temp_str, vdev_args);
-			strcat(temp_str, ";");
+			strlcat(temp_str, ";", sizeof(temp_str));
 			slave_core_count++;
 			socket_id = lcore_config[i].socket_id;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:27.392951174 +0100
+++ 0049-test-crypto-fix-possible-overflow-using-strlcat.patch	2019-04-16 15:34:25.230178840 +0100
@@ -1,31 +1,32 @@
-From e3b91a3ef236b3bb6ee4db12cc285e8f87b942e7 Mon Sep 17 00:00:00 2001
+From f5c74ea2816cbacf857a167c1370ba693981c9c3 Mon Sep 17 00:00:00 2001
 From: Chaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com>
 Date: Mon, 18 Mar 2019 12:36:36 +0000
 Subject: [PATCH] test/crypto: fix possible overflow using strlcat
 
+[ upstream commit e3b91a3ef236b3bb6ee4db12cc285e8f87b942e7 ]
+
 strcat does not check the destination length and there might be
 chances of string overflow so instead of strcat, strlcat is used.
 
 Fixes: 6f4eec2565 ("test/crypto: enhance scheduler unit tests")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com>
 Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
 ---
- app/test/test_cryptodev.c | 3 ++-
+ test/test/test_cryptodev.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
-diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
-index 32f1893bc..2ff204137 100644
---- a/app/test/test_cryptodev.c
-+++ b/app/test/test_cryptodev.c
+diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
+index 84065eb49..fbe8c21e6 100644
+--- a/test/test/test_cryptodev.c
++++ b/test/test/test_cryptodev.c
 @@ -16,4 +16,5 @@
  #include <rte_cryptodev.h>
  #include <rte_cryptodev_pmd.h>
 +#include <rte_string_fns.h>
  
  #ifdef RTE_LIBRTE_PMD_CRYPTO_SCHEDULER
-@@ -376,5 +377,5 @@ testsuite_setup(void)
+@@ -375,5 +376,5 @@ testsuite_setup(void)
  					"%s%d", temp_str, i);
  			strcpy(temp_str, vdev_args);
 -			strcat(temp_str, ";");

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

* [dpdk-stable] patch 'build: remove meson warning for Arm' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (47 preceding siblings ...)
  2019-04-16 14:37 ` [dpdk-stable] patch 'test/crypto: fix possible overflow using strlcat' " Kevin Traynor
@ 2019-04-16 14:37 ` Kevin Traynor
  2019-04-16 14:37 ` [dpdk-stable] patch 'doc: update cross Arm toolchain in Linux guide' " Kevin Traynor
                   ` (10 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:37 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 165e940fea85067a46cb8d84a1946b1b8b1489ff Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerinj@marvell.com>
Date: Tue, 19 Mar 2019 17:22:20 +0000
Subject: [PATCH] build: remove meson warning for Arm

[ upstream commit f6188bb8b0a7567d581023bfd91655bc668464d4 ]

Remove the following warning by comparing string to string.

config/arm/meson.build:153: WARNING: Trying to compare values of
different types (list, str) using ==.

Fixes: c6e536e38437 ("build: add more implementers IDs and PNs for ARM")

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 config/arm/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/config/arm/meson.build b/config/arm/meson.build
index dae55d6b2..45b611151 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -116,6 +116,6 @@ else
 		endif
 		# Set to generic if variable is not found
-		machine = get_variable('impl_' + cmd_output[0], 'generic')
-		if machine == 'generic'
+		machine = get_variable('impl_' + cmd_output[0], ['generic'])
+		if machine[0] == 'generic'
 			machine = impl_generic
 			cmd_output = cmd_generic
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:27.442194237 +0100
+++ 0050-build-remove-meson-warning-for-Arm.patch	2019-04-16 15:34:25.230178840 +0100
@@ -1,15 +1,16 @@
-From f6188bb8b0a7567d581023bfd91655bc668464d4 Mon Sep 17 00:00:00 2001
+From 165e940fea85067a46cb8d84a1946b1b8b1489ff Mon Sep 17 00:00:00 2001
 From: Jerin Jacob <jerinj@marvell.com>
 Date: Tue, 19 Mar 2019 17:22:20 +0000
 Subject: [PATCH] build: remove meson warning for Arm
 
+[ upstream commit f6188bb8b0a7567d581023bfd91655bc668464d4 ]
+
 Remove the following warning by comparing string to string.
 
 config/arm/meson.build:153: WARNING: Trying to compare values of
 different types (list, str) using ==.
 
 Fixes: c6e536e38437 ("build: add more implementers IDs and PNs for ARM")
-Cc: stable@dpdk.org
 
 Signed-off-by: Jerin Jacob <jerinj@marvell.com>
 Acked-by: Luca Boccassi <bluca@debian.org>
@@ -18,10 +19,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/config/arm/meson.build b/config/arm/meson.build
-index 8e892fa77..170a4981a 100644
+index dae55d6b2..45b611151 100644
 --- a/config/arm/meson.build
 +++ b/config/arm/meson.build
-@@ -117,6 +117,6 @@ else
+@@ -116,6 +116,6 @@ else
  		endif
  		# Set to generic if variable is not found
 -		machine = get_variable('impl_' + cmd_output[0], 'generic')

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

* [dpdk-stable] patch 'doc: update cross Arm toolchain in Linux guide' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (48 preceding siblings ...)
  2019-04-16 14:37 ` [dpdk-stable] patch 'build: remove meson warning for Arm' " Kevin Traynor
@ 2019-04-16 14:37 ` Kevin Traynor
  2019-04-16 14:37 ` [dpdk-stable] patch 'acl: fix compiler flags with meson and AVX2 runtime' " Kevin Traynor
                   ` (9 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:37 UTC (permalink / raw)
  To: Joyce Kong; +Cc: Stephen Hemminger, Jerin Jacob, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From bf4c8b92ef6c06fd4788ef75871ed804583b79ae Mon Sep 17 00:00:00 2001
From: Joyce Kong <joyce.kong@arm.com>
Date: Mon, 11 Mar 2019 11:05:14 +0800
Subject: [PATCH] doc: update cross Arm toolchain in Linux guide

[ upstream commit c5b72f6827538425c32a2b11742376d2a13bfa1b ]

Update cross build tool links as newer cross build tools
version are provided on Linaro, and attempts to download
the old one give permission denied.

Fixes: 01add9da25cd ("doc: add cross compiling guide")

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Acked-by: Stephen Hemminger <sthemmin@microsoft.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
---
 .../linux_gsg/cross_build_dpdk_for_arm64.rst     | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
index 9d1f0fa00..fd7a46c80 100644
--- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
+++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
@@ -15,11 +15,11 @@ Obtain the cross tool chain
 ---------------------------
 The latest cross compile tool chain can be downloaded from:
-https://releases.linaro.org/components/toolchain/binaries/latest/aarch64-linux-gnu/.
+https://developer.arm.com/open-source/gnu-toolchain/gnu-a/downloads.
 
-Following is the step to get the version 7.2.1, latest one at the time of this writing.
+Following is the step to get the version 8.2, latest one at the time of this writing.
 
 .. code-block:: console
 
-   wget https://releases.linaro.org/components/toolchain/binaries/latest/aarch64-linux-gnu/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu.tar.xz
+   wget https://developer.arm.com/-/media/Files/downloads/gnu-a/8.2-2019.01/gcc-arm-8.2-2019.01-x86_64-aarch64-linux-gnu.tar.xz
 
 Unzip and add into the PATH
@@ -28,10 +28,10 @@ Unzip and add into the PATH
 .. code-block:: console
 
-   tar -xvf gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu.tar.xz
-   export PATH=$PATH:<cross_install_dir>/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu/bin
+   tar -xvf gcc-arm-8.2-2019.01-x86_64-aarch64-linux-gnu.tar.xz
+   export PATH=$PATH:<cross_install_dir>/gcc-arm-8.2-2019.01-x86_64-aarch64-linux-gnu/bin
 
 .. note::
 
-   For the host requirements and other info, refer to the release note section: https://releases.linaro.org/components/toolchain/binaries/latest/
+   For the host requirements and other info, refer to the release note section: https://releases.linaro.org/components/toolchain/binaries/
 
 Getting the prerequisite library
@@ -70,6 +70,6 @@ Copy the NUMA header files and lib to the cross compiler's directories:
 .. code-block:: console
 
-   cp <numa_install_dir>/include/numa*.h <cross_install_dir>/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu/bin/../aarch64-linux-gnu/libc/usr/include/
-   cp <numa_install_dir>/lib/libnuma.a <cross_install_dir>/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/7.2.1/
+   cp <numa_install_dir>/include/numa*.h <cross_install_dir>/gcc-arm-8.2-2019.01-x86_64-aarch64-linux-gnu/bin/../aarch64-linux-gnu/libc/usr/include/
+   cp <numa_install_dir>/lib/libnuma.a <cross_install_dir>/gcc-arm-8.2-2019.01-x86_64-aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/8.2/
 
 .. _configure_and_cross_compile_dpdk_build:
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:27.483041524 +0100
+++ 0051-doc-update-cross-Arm-toolchain-in-Linux-guide.patch	2019-04-16 15:34:25.231178818 +0100
@@ -1,14 +1,15 @@
-From c5b72f6827538425c32a2b11742376d2a13bfa1b Mon Sep 17 00:00:00 2001
+From bf4c8b92ef6c06fd4788ef75871ed804583b79ae Mon Sep 17 00:00:00 2001
 From: Joyce Kong <joyce.kong@arm.com>
 Date: Mon, 11 Mar 2019 11:05:14 +0800
 Subject: [PATCH] doc: update cross Arm toolchain in Linux guide
 
+[ upstream commit c5b72f6827538425c32a2b11742376d2a13bfa1b ]
+
 Update cross build tool links as newer cross build tools
 version are provided on Linaro, and attempts to download
 the old one give permission denied.
 
 Fixes: 01add9da25cd ("doc: add cross compiling guide")
-Cc: stable@dpdk.org
 
 Signed-off-by: Joyce Kong <joyce.kong@arm.com>
 Acked-by: Stephen Hemminger <sthemmin@microsoft.com>
@@ -18,7 +19,7 @@
  1 file changed, 8 insertions(+), 8 deletions(-)
 
 diff --git a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
-index 270a60674..f19e2edad 100644
+index 9d1f0fa00..fd7a46c80 100644
 --- a/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
 +++ b/doc/guides/linux_gsg/cross_build_dpdk_for_arm64.rst
 @@ -15,11 +15,11 @@ Obtain the cross tool chain

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

* [dpdk-stable] patch 'acl: fix compiler flags with meson and AVX2 runtime' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (49 preceding siblings ...)
  2019-04-16 14:37 ` [dpdk-stable] patch 'doc: update cross Arm toolchain in Linux guide' " Kevin Traynor
@ 2019-04-16 14:37 ` Kevin Traynor
  2019-04-16 14:37 ` [dpdk-stable] patch 'malloc: fix documentation of realloc function' " Kevin Traynor
                   ` (8 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:37 UTC (permalink / raw)
  To: Andrius Sirvys; +Cc: Bruce Richardson, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 6af0b4da4e369f44ee1b2f80e2c09c3159f8d134 Mon Sep 17 00:00:00 2001
From: Andrius Sirvys <andrius.sirvys@intel.com>
Date: Mon, 11 Mar 2019 15:18:11 +0000
Subject: [PATCH] acl: fix compiler flags with meson and AVX2 runtime

[ upstream commit cd6683331dced0c910cb850a6d8f9bcd784ca693 ]

When compiling the ACL library on a system without AVX2 support,
the flags used to compile the AVX2-specific code for later run-time
use were not based on the regular cflags for the rest of the library.
This can cause errors due to symbols being missed/undefined
due to incorrect flags. For example,
when testing compilation on Alpine linux, we got:
	error: unknown type name 'cpu_set_t'
due to _GNU_SOURCE not being defined in the cflags.

This issue can be fixed by appending "-mavx2" to
the cflags rather than replacing them with it.

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

Signed-off-by: Andrius Sirvys <andrius.sirvys@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_acl/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_acl/meson.build b/lib/librte_acl/meson.build
index aec792f51..2207dbafe 100644
--- a/lib/librte_acl/meson.build
+++ b/lib/librte_acl/meson.build
@@ -24,5 +24,5 @@ if arch_subdir == 'x86'
 				'acl_run_avx2.c',
 				dependencies: static_rte_eal,
-				c_args: '-mavx2')
+				c_args: cflags + ['-mavx2'])
 		objs += avx2_tmplib.extract_objects('acl_run_avx2.c')
 		cflags += '-DCC_AVX2_SUPPORT'
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:27.522952339 +0100
+++ 0052-acl-fix-compiler-flags-with-meson-and-AVX2-runtime.patch	2019-04-16 15:34:25.231178818 +0100
@@ -1,8 +1,10 @@
-From cd6683331dced0c910cb850a6d8f9bcd784ca693 Mon Sep 17 00:00:00 2001
+From 6af0b4da4e369f44ee1b2f80e2c09c3159f8d134 Mon Sep 17 00:00:00 2001
 From: Andrius Sirvys <andrius.sirvys@intel.com>
 Date: Mon, 11 Mar 2019 15:18:11 +0000
 Subject: [PATCH] acl: fix compiler flags with meson and AVX2 runtime
 
+[ upstream commit cd6683331dced0c910cb850a6d8f9bcd784ca693 ]
+
 When compiling the ACL library on a system without AVX2 support,
 the flags used to compile the AVX2-specific code for later run-time
 use were not based on the regular cflags for the rest of the library.
@@ -16,7 +18,6 @@
 the cflags rather than replacing them with it.
 
 Fixes: 5b9656b157d3 ("lib: build with meson")
-Cc: stable@dpdk.org
 
 Signed-off-by: Andrius Sirvys <andrius.sirvys@intel.com>
 Acked-by: Bruce Richardson <bruce.richardson@intel.com>

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

* [dpdk-stable] patch 'malloc: fix documentation of realloc function' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (50 preceding siblings ...)
  2019-04-16 14:37 ` [dpdk-stable] patch 'acl: fix compiler flags with meson and AVX2 runtime' " Kevin Traynor
@ 2019-04-16 14:37 ` Kevin Traynor
  2019-04-16 14:37 ` [dpdk-stable] patch 'eal/linux: fix log levels for pagemap reading failure' " Kevin Traynor
                   ` (7 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:37 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From b4b8cdd3a1803c8789c60f71a9abf9990c31a8f0 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Fri, 22 Feb 2019 15:29:29 +0000
Subject: [PATCH] malloc: fix documentation of realloc function

[ upstream commit 929a91e99c22c022342382779f3a06ddaabb2ff5 ]

The documentation for rte_realloc claims that the resized area
will always reside on the same NUMA node. This is not actually
the case - while *resized* area will be on the same NUMA node,
if resizing the area is not possible, then the memory will be
reallocated using rte_malloc(), which can allocate memory on
another NUMA node, depending on which lcore rte_realloc() was
called from and which NUMA nodes have memory available.

Fix the API doc to match the actual code of rte_realloc().

Fixes: af75078fece3 ("first public release")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/include/rte_malloc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/common/include/rte_malloc.h b/lib/librte_eal/common/include/rte_malloc.h
index 54a12467a..e0be13ca3 100644
--- a/lib/librte_eal/common/include/rte_malloc.h
+++ b/lib/librte_eal/common/include/rte_malloc.h
@@ -112,5 +112,5 @@ rte_calloc(const char *type, size_t num, size_t size, unsigned align);
  * Replacement function for realloc(), using huge-page memory. Reserved area
  * memory is resized, preserving contents. In NUMA systems, the new area
- * resides on the same NUMA socket as the old area.
+ * may not reside on the same NUMA node as the old one.
  *
  * @param ptr
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:27.565904498 +0100
+++ 0053-malloc-fix-documentation-of-realloc-function.patch	2019-04-16 15:34:25.232178796 +0100
@@ -1,8 +1,10 @@
-From 929a91e99c22c022342382779f3a06ddaabb2ff5 Mon Sep 17 00:00:00 2001
+From b4b8cdd3a1803c8789c60f71a9abf9990c31a8f0 Mon Sep 17 00:00:00 2001
 From: Anatoly Burakov <anatoly.burakov@intel.com>
 Date: Fri, 22 Feb 2019 15:29:29 +0000
 Subject: [PATCH] malloc: fix documentation of realloc function
 
+[ upstream commit 929a91e99c22c022342382779f3a06ddaabb2ff5 ]
+
 The documentation for rte_realloc claims that the resized area
 will always reside on the same NUMA node. This is not actually
 the case - while *resized* area will be on the same NUMA node,
@@ -14,7 +16,6 @@
 Fix the API doc to match the actual code of rte_realloc().
 
 Fixes: af75078fece3 ("first public release")
-Cc: stable@dpdk.org
 
 Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
 ---
@@ -22,7 +23,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/lib/librte_eal/common/include/rte_malloc.h b/lib/librte_eal/common/include/rte_malloc.h
-index 5fbde4ed8..5ff1a39a2 100644
+index 54a12467a..e0be13ca3 100644
 --- a/lib/librte_eal/common/include/rte_malloc.h
 +++ b/lib/librte_eal/common/include/rte_malloc.h
 @@ -112,5 +112,5 @@ rte_calloc(const char *type, size_t num, size_t size, unsigned align);

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

* [dpdk-stable] patch 'eal/linux: fix log levels for pagemap reading failure' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (51 preceding siblings ...)
  2019-04-16 14:37 ` [dpdk-stable] patch 'malloc: fix documentation of realloc function' " Kevin Traynor
@ 2019-04-16 14:37 ` Kevin Traynor
  2019-04-16 14:37 ` [dpdk-stable] patch 'ring: enforce reading tail before slots' " Kevin Traynor
                   ` (6 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:37 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Aaron Conole, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 16ad59011dbc01f9bcf2702dcc8f49cf5d9871e1 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor@redhat.com>
Date: Thu, 14 Feb 2019 17:56:56 +0000
Subject: [PATCH] eal/linux: fix log levels for pagemap reading failure

[ upstream commit c0d9052afbc711d85350c6e1252affda66e2f88b ]

Commit cdc242f260e7 says:
    For Linux kernel 4.0 and newer, the ability to obtain
    physical page frame numbers for unprivileged users from
    /proc/self/pagemap was removed. Instead, when an IOMMU
    is present, simply choose our own DMA addresses instead.

In this case the user still sees error messages, so adjust
the log levels. Later, other checks will ensure that errors
are logged in the appropriate cases.

Fixes: cdc242f260e7 ("eal/linux: support running as unprivileged user")

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
 lib/librte_eal/linuxapp/eal/eal_memory.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c
index e05da74ca..7a4a9ed3c 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
@@ -111,5 +111,5 @@ rte_mem_virt2phy(const void *virtaddr)
 	fd = open("/proc/self/pagemap", O_RDONLY);
 	if (fd < 0) {
-		RTE_LOG(ERR, EAL, "%s(): cannot open /proc/self/pagemap: %s\n",
+		RTE_LOG(INFO, EAL, "%s(): cannot open /proc/self/pagemap: %s\n",
 			__func__, strerror(errno));
 		return RTE_BAD_IOVA;
@@ -119,5 +119,5 @@ rte_mem_virt2phy(const void *virtaddr)
 	offset = sizeof(uint64_t) * virt_pfn;
 	if (lseek(fd, offset, SEEK_SET) == (off_t) -1) {
-		RTE_LOG(ERR, EAL, "%s(): seek error in /proc/self/pagemap: %s\n",
+		RTE_LOG(INFO, EAL, "%s(): seek error in /proc/self/pagemap: %s\n",
 				__func__, strerror(errno));
 		close(fd);
@@ -128,9 +128,9 @@ rte_mem_virt2phy(const void *virtaddr)
 	close(fd);
 	if (retval < 0) {
-		RTE_LOG(ERR, EAL, "%s(): cannot read /proc/self/pagemap: %s\n",
+		RTE_LOG(INFO, EAL, "%s(): cannot read /proc/self/pagemap: %s\n",
 				__func__, strerror(errno));
 		return RTE_BAD_IOVA;
 	} else if (retval != PFN_MASK_SIZE) {
-		RTE_LOG(ERR, EAL, "%s(): read %d bytes from /proc/self/pagemap "
+		RTE_LOG(INFO, EAL, "%s(): read %d bytes from /proc/self/pagemap "
 				"but expected %d:\n",
 				__func__, retval, PFN_MASK_SIZE);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:27.606956657 +0100
+++ 0054-eal-linux-fix-log-levels-for-pagemap-reading-failure.patch	2019-04-16 15:34:25.234178752 +0100
@@ -1,8 +1,10 @@
-From c0d9052afbc711d85350c6e1252affda66e2f88b Mon Sep 17 00:00:00 2001
+From 16ad59011dbc01f9bcf2702dcc8f49cf5d9871e1 Mon Sep 17 00:00:00 2001
 From: Kevin Traynor <ktraynor@redhat.com>
 Date: Thu, 14 Feb 2019 17:56:56 +0000
 Subject: [PATCH] eal/linux: fix log levels for pagemap reading failure
 
+[ upstream commit c0d9052afbc711d85350c6e1252affda66e2f88b ]
+
 Commit cdc242f260e7 says:
     For Linux kernel 4.0 and newer, the ability to obtain
     physical page frame numbers for unprivileged users from
@@ -14,33 +16,32 @@
 are logged in the appropriate cases.
 
 Fixes: cdc242f260e7 ("eal/linux: support running as unprivileged user")
-Cc: stable@dpdk.org
 
 Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
 Acked-by: Aaron Conole <aconole@redhat.com>
 ---
- lib/librte_eal/linux/eal/eal_memory.c | 8 ++++----
+ lib/librte_eal/linuxapp/eal/eal_memory.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
 
-diff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c
-index 1b96b576e..f6ee403ad 100644
---- a/lib/librte_eal/linux/eal/eal_memory.c
-+++ b/lib/librte_eal/linux/eal/eal_memory.c
-@@ -115,5 +115,5 @@ rte_mem_virt2phy(const void *virtaddr)
+diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c
+index e05da74ca..7a4a9ed3c 100644
+--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
++++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
+@@ -111,5 +111,5 @@ rte_mem_virt2phy(const void *virtaddr)
  	fd = open("/proc/self/pagemap", O_RDONLY);
  	if (fd < 0) {
 -		RTE_LOG(ERR, EAL, "%s(): cannot open /proc/self/pagemap: %s\n",
 +		RTE_LOG(INFO, EAL, "%s(): cannot open /proc/self/pagemap: %s\n",
  			__func__, strerror(errno));
  		return RTE_BAD_IOVA;
-@@ -123,5 +123,5 @@ rte_mem_virt2phy(const void *virtaddr)
+@@ -119,5 +119,5 @@ rte_mem_virt2phy(const void *virtaddr)
  	offset = sizeof(uint64_t) * virt_pfn;
  	if (lseek(fd, offset, SEEK_SET) == (off_t) -1) {
 -		RTE_LOG(ERR, EAL, "%s(): seek error in /proc/self/pagemap: %s\n",
 +		RTE_LOG(INFO, EAL, "%s(): seek error in /proc/self/pagemap: %s\n",
  				__func__, strerror(errno));
  		close(fd);
-@@ -132,9 +132,9 @@ rte_mem_virt2phy(const void *virtaddr)
+@@ -128,9 +128,9 @@ rte_mem_virt2phy(const void *virtaddr)
  	close(fd);
  	if (retval < 0) {
 -		RTE_LOG(ERR, EAL, "%s(): cannot read /proc/self/pagemap: %s\n",

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

* [dpdk-stable] patch 'ring: enforce reading tail before slots' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (52 preceding siblings ...)
  2019-04-16 14:37 ` [dpdk-stable] patch 'eal/linux: fix log levels for pagemap reading failure' " Kevin Traynor
@ 2019-04-16 14:37 ` Kevin Traynor
  2019-04-16 14:37 ` [dpdk-stable] patch 'test/spinlock: remove delay for correct benchmarking' " Kevin Traynor
                   ` (5 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:37 UTC (permalink / raw)
  To: Gavin Hu; +Cc: Ola Liljedahl, Nipun Gupta, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 76b5e7cde680dc9cacaaec01566d577422c32273 Mon Sep 17 00:00:00 2001
From: Gavin Hu <gavin.hu@arm.com>
Date: Wed, 13 Mar 2019 00:58:53 +0800
Subject: [PATCH] ring: enforce reading tail before slots

[ upstream commit 85cffb2eccd9edf89a9e28539206a79258a6e9d9 ]

In weak memory models, like arm64, reading the prod.tail may get
reordered after reading the ring slots, which corrupts the ring and
stale data is observed.

This issue was reported by NXP on 8-A72 DPAA2 board. The problem is most
likely caused by missing the acquire semantics when reading
prod.tail (in SC dequeue) which makes it possible to read a
stale value from the ring slots.

For MP (and MC) case, rte_atomic32_cmpset() already provides the required
ordering. For SP case, the control depependency between if-statement (which
depends on the read of r->cons.tail) and the later stores to the ring slots
make RMB unnecessary. About the control dependency, read more at:
https://www.cl.cam.ac.uk/~pes20/ppc-supplemental/test7.pdf

This patch is adding the required read barrier to prevent reading the ring
slots get reordered before reading prod.tail for SC case.

Fixes: c9fb3c62896f ("ring: move code in a new header file")

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Tested-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_ring/rte_ring_generic.h | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/librte_ring/rte_ring_generic.h b/lib/librte_ring/rte_ring_generic.h
index ea7dbe5b9..953cdbbd5 100644
--- a/lib/librte_ring/rte_ring_generic.h
+++ b/lib/librte_ring/rte_ring_generic.h
@@ -159,9 +159,12 @@ __rte_ring_move_cons_head(struct rte_ring *r, unsigned int is_sc,
 
 		*new_head = *old_head + n;
-		if (is_sc)
-			r->cons.head = *new_head, success = 1;
-		else
+		if (is_sc) {
+			r->cons.head = *new_head;
+			rte_smp_rmb();
+			success = 1;
+		} else {
 			success = rte_atomic32_cmpset(&r->cons.head, *old_head,
 					*new_head);
+		}
 	} while (unlikely(success == 0));
 	return n;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:27.649879139 +0100
+++ 0055-ring-enforce-reading-tail-before-slots.patch	2019-04-16 15:34:25.234178752 +0100
@@ -1,8 +1,10 @@
-From 85cffb2eccd9edf89a9e28539206a79258a6e9d9 Mon Sep 17 00:00:00 2001
+From 76b5e7cde680dc9cacaaec01566d577422c32273 Mon Sep 17 00:00:00 2001
 From: Gavin Hu <gavin.hu@arm.com>
 Date: Wed, 13 Mar 2019 00:58:53 +0800
 Subject: [PATCH] ring: enforce reading tail before slots
 
+[ upstream commit 85cffb2eccd9edf89a9e28539206a79258a6e9d9 ]
+
 In weak memory models, like arm64, reading the prod.tail may get
 reordered after reading the ring slots, which corrupts the ring and
 stale data is observed.
@@ -22,7 +24,6 @@
 slots get reordered before reading prod.tail for SC case.
 
 Fixes: c9fb3c62896f ("ring: move code in a new header file")
-Cc: stable@dpdk.org
 
 Signed-off-by: Gavin Hu <gavin.hu@arm.com>
 Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>

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

* [dpdk-stable] patch 'test/spinlock: remove delay for correct benchmarking' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (53 preceding siblings ...)
  2019-04-16 14:37 ` [dpdk-stable] patch 'ring: enforce reading tail before slots' " Kevin Traynor
@ 2019-04-16 14:37 ` Kevin Traynor
  2019-04-16 14:37 ` [dpdk-stable] patch 'test/spinlock: amortize the cost of getting time' " Kevin Traynor
                   ` (4 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:37 UTC (permalink / raw)
  To: Gavin Hu
  Cc: Ruifeng Wang, Joyce Kong, Phil Yang, Honnappa Nagarahalli,
	Ola Liljedahl, Jerin Jacob, Nipun Gupta, Konstantin Ananyev,
	dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 6e8cc16a52e3b261ad099f5eb89f706dfb284c22 Mon Sep 17 00:00:00 2001
From: Gavin Hu <gavin.hu@arm.com>
Date: Fri, 8 Mar 2019 15:56:35 +0800
Subject: [PATCH] test/spinlock: remove delay for correct benchmarking

[ upstream commit 9119ad305db027b5c87e27b13fde9d60f9aa9a1f ]

The test is to benchmark the performance of spinlock by counting the
number of spinlock acquire and release operations within the specified
time.
A typical pair of lock and unlock operations costs tens or hundreds of
nano seconds, in comparison to this, delaying 1 us outside of the locked
region is too much, compromising the goal of benchmarking the lock and
unlock performance.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 test/test/test_spinlock.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/test/test/test_spinlock.c b/test/test/test_spinlock.c
index 73bff128e..6795195ae 100644
--- a/test/test/test_spinlock.c
+++ b/test/test/test_spinlock.c
@@ -121,6 +121,4 @@ load_loop_fn(void *func_param)
 		if (use_lock)
 			rte_spinlock_unlock(&lk);
-		/* delay to make lock duty cycle slighlty realistic */
-		rte_delay_us(1);
 		time_diff = rte_get_timer_cycles() - begin;
 	}
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:27.695249272 +0100
+++ 0056-test-spinlock-remove-delay-for-correct-benchmarking.patch	2019-04-16 15:34:25.235178729 +0100
@@ -1,8 +1,10 @@
-From 9119ad305db027b5c87e27b13fde9d60f9aa9a1f Mon Sep 17 00:00:00 2001
+From 6e8cc16a52e3b261ad099f5eb89f706dfb284c22 Mon Sep 17 00:00:00 2001
 From: Gavin Hu <gavin.hu@arm.com>
 Date: Fri, 8 Mar 2019 15:56:35 +0800
 Subject: [PATCH] test/spinlock: remove delay for correct benchmarking
 
+[ upstream commit 9119ad305db027b5c87e27b13fde9d60f9aa9a1f ]
+
 The test is to benchmark the performance of spinlock by counting the
 number of spinlock acquire and release operations within the specified
 time.
@@ -12,7 +14,6 @@
 unlock performance.
 
 Fixes: af75078fece3 ("first public release")
-Cc: stable@dpdk.org
 
 Signed-off-by: Gavin Hu <gavin.hu@arm.com>
 Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
@@ -24,13 +25,13 @@
 Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
 Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
 ---
- app/test/test_spinlock.c | 2 --
+ test/test/test_spinlock.c | 2 --
  1 file changed, 2 deletions(-)
 
-diff --git a/app/test/test_spinlock.c b/app/test/test_spinlock.c
+diff --git a/test/test/test_spinlock.c b/test/test/test_spinlock.c
 index 73bff128e..6795195ae 100644
---- a/app/test/test_spinlock.c
-+++ b/app/test/test_spinlock.c
+--- a/test/test/test_spinlock.c
++++ b/test/test/test_spinlock.c
 @@ -121,6 +121,4 @@ load_loop_fn(void *func_param)
  		if (use_lock)
  			rte_spinlock_unlock(&lk);

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

* [dpdk-stable] patch 'test/spinlock: amortize the cost of getting time' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (54 preceding siblings ...)
  2019-04-16 14:37 ` [dpdk-stable] patch 'test/spinlock: remove delay for correct benchmarking' " Kevin Traynor
@ 2019-04-16 14:37 ` Kevin Traynor
  2019-04-16 14:37 ` [dpdk-stable] patch 'spinlock: reimplement with atomic one-way barrier' " Kevin Traynor
                   ` (3 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:37 UTC (permalink / raw)
  To: Gavin Hu
  Cc: Joyce Kong, Ruifeng Wang, Honnappa Nagarahalli, Nipun Gupta,
	Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 779bd05e16dde88cbf9690e253b0fc51417c328a Mon Sep 17 00:00:00 2001
From: Gavin Hu <gavin.hu@arm.com>
Date: Fri, 8 Mar 2019 15:56:36 +0800
Subject: [PATCH] test/spinlock: amortize the cost of getting time

[ upstream commit a52c5530d8d2b21c1ff4a5b12b40216fb6ee06f1 ]

Instead of getting timestamps per iteration, amortize its overhead
can help getting more precise benchmarking results.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 test/test/test_spinlock.c | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/test/test/test_spinlock.c b/test/test/test_spinlock.c
index 6795195ae..6ac749597 100644
--- a/test/test/test_spinlock.c
+++ b/test/test/test_spinlock.c
@@ -97,7 +97,7 @@ test_spinlock_recursive_per_core(__attribute__((unused)) void *arg)
 
 static rte_spinlock_t lk = RTE_SPINLOCK_INITIALIZER;
-static uint64_t lock_count[RTE_MAX_LCORE] = {0};
+static uint64_t time_count[RTE_MAX_LCORE] = {0};
 
-#define TIME_MS 100
+#define MAX_LOOP 10000
 
 static int
@@ -106,5 +106,5 @@ load_loop_fn(void *func_param)
 	uint64_t time_diff = 0, begin;
 	uint64_t hz = rte_get_timer_hz();
-	uint64_t lcount = 0;
+	volatile uint64_t lcount = 0;
 	const int use_lock = *(int*)func_param;
 	const unsigned lcore = rte_lcore_id();
@@ -115,5 +115,5 @@ load_loop_fn(void *func_param)
 
 	begin = rte_get_timer_cycles();
-	while (time_diff < hz * TIME_MS / 1000) {
+	while (lcount < MAX_LOOP) {
 		if (use_lock)
 			rte_spinlock_lock(&lk);
@@ -121,7 +121,7 @@ load_loop_fn(void *func_param)
 		if (use_lock)
 			rte_spinlock_unlock(&lk);
-		time_diff = rte_get_timer_cycles() - begin;
 	}
-	lock_count[lcore] = lcount;
+	time_diff = rte_get_timer_cycles() - begin;
+	time_count[lcore] = time_diff * 1000000 / hz;
 	return 0;
 }
@@ -137,12 +137,14 @@ test_spinlock_perf(void)
 	printf("\nTest with no lock on single core...\n");
 	load_loop_fn(&lock);
-	printf("Core [%u] count = %"PRIu64"\n", lcore, lock_count[lcore]);
-	memset(lock_count, 0, sizeof(lock_count));
+	printf("Core [%u] Cost Time = %"PRIu64" us\n", lcore,
+						time_count[lcore]);
+	memset(time_count, 0, sizeof(time_count));
 
 	printf("\nTest with lock on single core...\n");
 	lock = 1;
 	load_loop_fn(&lock);
-	printf("Core [%u] count = %"PRIu64"\n", lcore, lock_count[lcore]);
-	memset(lock_count, 0, sizeof(lock_count));
+	printf("Core [%u] Cost Time = %"PRIu64" us\n", lcore,
+						time_count[lcore]);
+	memset(time_count, 0, sizeof(time_count));
 
 	printf("\nTest with lock on %u cores...\n", rte_lcore_count());
@@ -159,9 +161,10 @@ test_spinlock_perf(void)
 
 	RTE_LCORE_FOREACH(i) {
-		printf("Core [%u] count = %"PRIu64"\n", i, lock_count[i]);
-		total += lock_count[i];
+		printf("Core [%u] Cost Time = %"PRIu64" us\n", i,
+						time_count[i]);
+		total += time_count[i];
 	}
 
-	printf("Total count = %"PRIu64"\n", total);
+	printf("Total Cost Time = %"PRIu64" us\n", total);
 
 	return 0;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:27.735335751 +0100
+++ 0057-test-spinlock-amortize-the-cost-of-getting-time.patch	2019-04-16 15:34:25.235178729 +0100
@@ -1,13 +1,14 @@
-From a52c5530d8d2b21c1ff4a5b12b40216fb6ee06f1 Mon Sep 17 00:00:00 2001
+From 779bd05e16dde88cbf9690e253b0fc51417c328a Mon Sep 17 00:00:00 2001
 From: Gavin Hu <gavin.hu@arm.com>
 Date: Fri, 8 Mar 2019 15:56:36 +0800
 Subject: [PATCH] test/spinlock: amortize the cost of getting time
 
+[ upstream commit a52c5530d8d2b21c1ff4a5b12b40216fb6ee06f1 ]
+
 Instead of getting timestamps per iteration, amortize its overhead
 can help getting more precise benchmarking results.
 
 Fixes: af75078fece3 ("first public release")
-Cc: stable@dpdk.org
 
 Signed-off-by: Gavin Hu <gavin.hu@arm.com>
 Reviewed-by: Joyce Kong <joyce.kong@arm.com>
@@ -16,13 +17,13 @@
 Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
 Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
 ---
- app/test/test_spinlock.c | 29 ++++++++++++++++-------------
+ test/test/test_spinlock.c | 29 ++++++++++++++++-------------
  1 file changed, 16 insertions(+), 13 deletions(-)
 
-diff --git a/app/test/test_spinlock.c b/app/test/test_spinlock.c
+diff --git a/test/test/test_spinlock.c b/test/test/test_spinlock.c
 index 6795195ae..6ac749597 100644
---- a/app/test/test_spinlock.c
-+++ b/app/test/test_spinlock.c
+--- a/test/test/test_spinlock.c
++++ b/test/test/test_spinlock.c
 @@ -97,7 +97,7 @@ test_spinlock_recursive_per_core(__attribute__((unused)) void *arg)
  
  static rte_spinlock_t lk = RTE_SPINLOCK_INITIALIZER;

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

* [dpdk-stable] patch 'spinlock: reimplement with atomic one-way barrier' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (55 preceding siblings ...)
  2019-04-16 14:37 ` [dpdk-stable] patch 'test/spinlock: amortize the cost of getting time' " Kevin Traynor
@ 2019-04-16 14:37 ` Kevin Traynor
  2019-04-16 14:37 ` [dpdk-stable] patch 'rwlock: reimplement with atomic builtins' " Kevin Traynor
                   ` (2 subsequent siblings)
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:37 UTC (permalink / raw)
  To: Gavin Hu
  Cc: Phil Yang, Honnappa Nagarahalli, Ola Liljedahl, Steve Capper,
	Jerin Jacob, Nipun Gupta, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 548edf47ab0869243541b1c855d1e9330b4718a7 Mon Sep 17 00:00:00 2001
From: Gavin Hu <gavin.hu@arm.com>
Date: Fri, 8 Mar 2019 15:56:37 +0800
Subject: [PATCH] spinlock: reimplement with atomic one-way barrier

[ upstream commit 453d8f736676255696bce3c5e01b43b543ff896c ]

The __sync builtin based implementation generates full memory barriers
('dmb ish') on Arm platforms. Using C11 atomic builtins to generate one way
barriers.

Here is the assembly code of __sync_compare_and_swap builtin.
__sync_bool_compare_and_swap(dst, exp, src);
   0x000000000090f1b0 <+16>:    e0 07 40 f9 ldr x0, [sp, #8]
   0x000000000090f1b4 <+20>:    e1 0f 40 79 ldrh    w1, [sp, #6]
   0x000000000090f1b8 <+24>:    e2 0b 40 79 ldrh    w2, [sp, #4]
   0x000000000090f1bc <+28>:    21 3c 00 12 and w1, w1, #0xffff
   0x000000000090f1c0 <+32>:    03 7c 5f 48 ldxrh   w3, [x0]
   0x000000000090f1c4 <+36>:    7f 00 01 6b cmp w3, w1
   0x000000000090f1c8 <+40>:    61 00 00 54 b.ne    0x90f1d4
<rte_atomic16_cmpset+52>  // b.any
   0x000000000090f1cc <+44>:    02 fc 04 48 stlxrh  w4, w2, [x0]
   0x000000000090f1d0 <+48>:    84 ff ff 35 cbnz    w4, 0x90f1c0
<rte_atomic16_cmpset+32>
   0x000000000090f1d4 <+52>:    bf 3b 03 d5 dmb ish
   0x000000000090f1d8 <+56>:    e0 17 9f 1a cset    w0, eq  // eq = none

The benchmarking results showed constant improvements on all available
platforms:
1. Cavium ThunderX2: 126% performance;
2. Hisilicon 1616: 30%;
3. Qualcomm Falkor: 13%;
4. Marvell ARMADA 8040 with A72 cores on macchiatobin: 3.7%

Here is the example test result on TX2:
$sudo ./build/app/test -l 16-27 -- i
RTE>>spinlock_autotest

*** spinlock_autotest without this patch ***
Test with lock on 12 cores...
Core [16] Cost Time = 53886 us
Core [17] Cost Time = 53605 us
Core [18] Cost Time = 53163 us
Core [19] Cost Time = 49419 us
Core [20] Cost Time = 34317 us
Core [21] Cost Time = 53408 us
Core [22] Cost Time = 53970 us
Core [23] Cost Time = 53930 us
Core [24] Cost Time = 53283 us
Core [25] Cost Time = 51504 us
Core [26] Cost Time = 50718 us
Core [27] Cost Time = 51730 us
Total Cost Time = 612933 us

*** spinlock_autotest with this patch ***
Test with lock on 12 cores...
Core [16] Cost Time = 18808 us
Core [17] Cost Time = 29497 us
Core [18] Cost Time = 29132 us
Core [19] Cost Time = 26150 us
Core [20] Cost Time = 21892 us
Core [21] Cost Time = 24377 us
Core [22] Cost Time = 27211 us
Core [23] Cost Time = 11070 us
Core [24] Cost Time = 29802 us
Core [25] Cost Time = 15793 us
Core [26] Cost Time = 7474 us
Core [27] Cost Time = 29550 us
Total Cost Time = 270756 us

In the tests on ThunderX2, with more cores contending, the performance gain
was even higher, indicating the __atomic implementation scales up better
than __sync.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>
Reviewed-by: Steve Capper <steve.capper@arm.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 .../common/include/generic/rte_spinlock.h      | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/lib/librte_eal/common/include/generic/rte_spinlock.h b/lib/librte_eal/common/include/generic/rte_spinlock.h
index c4c3fc31e..87ae7a4f1 100644
--- a/lib/librte_eal/common/include/generic/rte_spinlock.h
+++ b/lib/librte_eal/common/include/generic/rte_spinlock.h
@@ -62,7 +62,12 @@ static inline void
 rte_spinlock_lock(rte_spinlock_t *sl)
 {
-	while (__sync_lock_test_and_set(&sl->locked, 1))
-		while(sl->locked)
+	int exp = 0;
+
+	while (!__atomic_compare_exchange_n(&sl->locked, &exp, 1, 0,
+				__ATOMIC_ACQUIRE, __ATOMIC_RELAXED)) {
+		while (__atomic_load_n(&sl->locked, __ATOMIC_RELAXED))
 			rte_pause();
+		exp = 0;
+	}
 }
 #endif
@@ -81,5 +86,5 @@ static inline void
 rte_spinlock_unlock (rte_spinlock_t *sl)
 {
-	__sync_lock_release(&sl->locked);
+	__atomic_store_n(&sl->locked, 0, __ATOMIC_RELEASE);
 }
 #endif
@@ -100,5 +105,8 @@ static inline int
 rte_spinlock_trylock (rte_spinlock_t *sl)
 {
-	return __sync_lock_test_and_set(&sl->locked,1) == 0;
+	int exp = 0;
+	return __atomic_compare_exchange_n(&sl->locked, &exp, 1,
+				0, /* disallow spurious failure */
+				__ATOMIC_ACQUIRE, __ATOMIC_RELAXED);
 }
 #endif
@@ -114,5 +122,5 @@ rte_spinlock_trylock (rte_spinlock_t *sl)
 static inline int rte_spinlock_is_locked (rte_spinlock_t *sl)
 {
-	return sl->locked;
+	return __atomic_load_n(&sl->locked, __ATOMIC_ACQUIRE);
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:27.777024964 +0100
+++ 0058-spinlock-reimplement-with-atomic-one-way-barrier.patch	2019-04-16 15:34:25.236178707 +0100
@@ -1,8 +1,10 @@
-From 453d8f736676255696bce3c5e01b43b543ff896c Mon Sep 17 00:00:00 2001
+From 548edf47ab0869243541b1c855d1e9330b4718a7 Mon Sep 17 00:00:00 2001
 From: Gavin Hu <gavin.hu@arm.com>
 Date: Fri, 8 Mar 2019 15:56:37 +0800
 Subject: [PATCH] spinlock: reimplement with atomic one-way barrier
 
+[ upstream commit 453d8f736676255696bce3c5e01b43b543ff896c ]
+
 The __sync builtin based implementation generates full memory barriers
 ('dmb ish') on Arm platforms. Using C11 atomic builtins to generate one way
 barriers.
@@ -71,7 +73,6 @@
 than __sync.
 
 Fixes: af75078fece3 ("first public release")
-Cc: stable@dpdk.org
 
 Signed-off-by: Gavin Hu <gavin.hu@arm.com>
 Reviewed-by: Phil Yang <phil.yang@arm.com>

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

* [dpdk-stable] patch 'rwlock: reimplement with atomic builtins' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (56 preceding siblings ...)
  2019-04-16 14:37 ` [dpdk-stable] patch 'spinlock: reimplement with atomic one-way barrier' " Kevin Traynor
@ 2019-04-16 14:37 ` Kevin Traynor
  2019-04-16 14:37 ` [dpdk-stable] patch 'eal/ppc: fix global memory barrier' " Kevin Traynor
  2019-04-16 14:37 ` [dpdk-stable] patch 'vfio: document multiprocess limitation for container API' " Kevin Traynor
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:37 UTC (permalink / raw)
  To: Joyce Kong; +Cc: Gavin Hu, Jerin Jacob, Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 55c7ea8fcc0b3eb07f4c7bbbf9cf60da44661861 Mon Sep 17 00:00:00 2001
From: Joyce Kong <joyce.kong@arm.com>
Date: Mon, 25 Mar 2019 17:14:57 +0800
Subject: [PATCH] rwlock: reimplement with atomic builtins

[ upstream commit e8af2f1f11c8f35430086806988d43ff78414ba5 ]

The __sync builtin based implementation generates full memory
barriers ('dmb ish') on Arm platforms. Using C11 atomic builtins
to generate one way barriers.

Here is the assembly code of __sync_compare_and_swap builtin.
__sync_bool_compare_and_swap(dst, exp, src);
   0x000000000090f1b0 <+16>:    e0 07 40 f9 ldr x0, [sp, #8]
   0x000000000090f1b4 <+20>:    e1 0f 40 79 ldrh    w1, [sp, #6]
   0x000000000090f1b8 <+24>:    e2 0b 40 79 ldrh    w2, [sp, #4]
   0x000000000090f1bc <+28>:    21 3c 00 12 and w1, w1, #0xffff
   0x000000000090f1c0 <+32>:    03 7c 5f 48 ldxrh   w3, [x0]
   0x000000000090f1c4 <+36>:    7f 00 01 6b cmp w3, w1
   0x000000000090f1c8 <+40>:    61 00 00 54 b.ne    0x90f1d4
<rte_atomic16_cmpset+52>  // b.any
   0x000000000090f1cc <+44>:    02 fc 04 48 stlxrh  w4, w2, [x0]
   0x000000000090f1d0 <+48>:    84 ff ff 35 cbnz    w4, 0x90f1c0
<rte_atomic16_cmpset+32>
   0x000000000090f1d4 <+52>:    bf 3b 03 d5 dmb ish
   0x000000000090f1d8 <+56>:    e0 17 9f 1a cset    w0, eq  // eq = none

Fixes: af75078fece3 ("first public release")

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Tested-by: Joyce Kong <joyce.kong@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 .../common/include/generic/rte_rwlock.h          | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/librte_eal/common/include/generic/rte_rwlock.h b/lib/librte_eal/common/include/generic/rte_rwlock.h
index 5751a0e6d..2c284f0b5 100644
--- a/lib/librte_eal/common/include/generic/rte_rwlock.h
+++ b/lib/librte_eal/common/include/generic/rte_rwlock.h
@@ -65,5 +65,5 @@ rte_rwlock_read_lock(rte_rwlock_t *rwl)
 
 	while (success == 0) {
-		x = rwl->cnt;
+		x = __atomic_load_n(&rwl->cnt, __ATOMIC_RELAXED);
 		/* write lock is held */
 		if (x < 0) {
@@ -71,6 +71,6 @@ rte_rwlock_read_lock(rte_rwlock_t *rwl)
 			continue;
 		}
-		success = rte_atomic32_cmpset((volatile uint32_t *)&rwl->cnt,
-					      (uint32_t)x, (uint32_t)(x + 1));
+		success = __atomic_compare_exchange_n(&rwl->cnt, &x, x + 1, 1,
+					__ATOMIC_ACQUIRE, __ATOMIC_RELAXED);
 	}
 }
@@ -85,5 +85,5 @@ static inline void
 rte_rwlock_read_unlock(rte_rwlock_t *rwl)
 {
-	rte_atomic32_dec((rte_atomic32_t *)(intptr_t)&rwl->cnt);
+	__atomic_fetch_sub(&rwl->cnt, 1, __ATOMIC_RELEASE);
 }
 
@@ -101,5 +101,5 @@ rte_rwlock_write_lock(rte_rwlock_t *rwl)
 
 	while (success == 0) {
-		x = rwl->cnt;
+		x = __atomic_load_n(&rwl->cnt, __ATOMIC_RELAXED);
 		/* a lock is held */
 		if (x != 0) {
@@ -107,6 +107,6 @@ rte_rwlock_write_lock(rte_rwlock_t *rwl)
 			continue;
 		}
-		success = rte_atomic32_cmpset((volatile uint32_t *)&rwl->cnt,
-					      0, (uint32_t)-1);
+		success = __atomic_compare_exchange_n(&rwl->cnt, &x, -1, 1,
+					__ATOMIC_ACQUIRE, __ATOMIC_RELAXED);
 	}
 }
@@ -121,5 +121,5 @@ static inline void
 rte_rwlock_write_unlock(rte_rwlock_t *rwl)
 {
-	rte_atomic32_inc((rte_atomic32_t *)(intptr_t)&rwl->cnt);
+	__atomic_store_n(&rwl->cnt, 0, __ATOMIC_RELEASE);
 }
 
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:27.821461788 +0100
+++ 0059-rwlock-reimplement-with-atomic-builtins.patch	2019-04-16 15:34:25.236178707 +0100
@@ -1,8 +1,10 @@
-From e8af2f1f11c8f35430086806988d43ff78414ba5 Mon Sep 17 00:00:00 2001
+From 55c7ea8fcc0b3eb07f4c7bbbf9cf60da44661861 Mon Sep 17 00:00:00 2001
 From: Joyce Kong <joyce.kong@arm.com>
 Date: Mon, 25 Mar 2019 17:14:57 +0800
 Subject: [PATCH] rwlock: reimplement with atomic builtins
 
+[ upstream commit e8af2f1f11c8f35430086806988d43ff78414ba5 ]
+
 The __sync builtin based implementation generates full memory
 barriers ('dmb ish') on Arm platforms. Using C11 atomic builtins
 to generate one way barriers.
@@ -24,7 +26,6 @@
    0x000000000090f1d8 <+56>:    e0 17 9f 1a cset    w0, eq  // eq = none
 
 Fixes: af75078fece3 ("first public release")
-Cc: stable@dpdk.org
 
 Signed-off-by: Gavin Hu <gavin.hu@arm.com>
 Signed-off-by: Joyce Kong <joyce.kong@arm.com>
@@ -32,11 +33,11 @@
 Acked-by: Jerin Jacob <jerinj@marvell.com>
 Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
 ---
- .../common/include/generic/rte_rwlock.h       | 29 ++++++++++---------
- 1 file changed, 15 insertions(+), 14 deletions(-)
+ .../common/include/generic/rte_rwlock.h          | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
 
 diff --git a/lib/librte_eal/common/include/generic/rte_rwlock.h b/lib/librte_eal/common/include/generic/rte_rwlock.h
-index b05d85aee..31608fa2e 100644
+index 5751a0e6d..2c284f0b5 100644
 --- a/lib/librte_eal/common/include/generic/rte_rwlock.h
 +++ b/lib/librte_eal/common/include/generic/rte_rwlock.h
 @@ -65,5 +65,5 @@ rte_rwlock_read_lock(rte_rwlock_t *rwl)
@@ -55,48 +56,21 @@
 +					__ATOMIC_ACQUIRE, __ATOMIC_RELAXED);
  	}
  }
-@@ -96,11 +96,12 @@ rte_rwlock_read_trylock(rte_rwlock_t *rwl)
- 
- 	while (success == 0) {
--		x = rwl->cnt;
-+		x = __atomic_load_n(&rwl->cnt, __ATOMIC_RELAXED);
- 		/* write lock is held */
- 		if (x < 0)
- 			return -EBUSY;
--		success = rte_atomic32_cmpset((volatile uint32_t *)&rwl->cnt,
--					      (uint32_t)x, (uint32_t)(x + 1));
-+		success = __atomic_compare_exchange_n(&rwl->cnt, &x, x + 1, 1,
-+					__ATOMIC_ACQUIRE, __ATOMIC_RELAXED);
- 	}
-+
- 	return 0;
- }
-@@ -115,5 +116,5 @@ static inline void
+@@ -85,5 +85,5 @@ static inline void
  rte_rwlock_read_unlock(rte_rwlock_t *rwl)
  {
 -	rte_atomic32_dec((rte_atomic32_t *)(intptr_t)&rwl->cnt);
 +	__atomic_fetch_sub(&rwl->cnt, 1, __ATOMIC_RELEASE);
  }
  
-@@ -136,7 +137,7 @@ rte_rwlock_write_trylock(rte_rwlock_t *rwl)
- 	int32_t x;
- 
--	x = rwl->cnt;
--	if (x != 0 || rte_atomic32_cmpset((volatile uint32_t *)&rwl->cnt,
--				0, (uint32_t)-1) == 0)
-+	x = __atomic_load_n(&rwl->cnt, __ATOMIC_RELAXED);
-+	if (x != 0 || __atomic_compare_exchange_n(&rwl->cnt, &x, -1, 1,
-+			      __ATOMIC_ACQUIRE, __ATOMIC_RELAXED) == 0)
- 		return -EBUSY;
- 
-@@ -157,5 +158,5 @@ rte_rwlock_write_lock(rte_rwlock_t *rwl)
+@@ -101,5 +101,5 @@ rte_rwlock_write_lock(rte_rwlock_t *rwl)
  
  	while (success == 0) {
 -		x = rwl->cnt;
 +		x = __atomic_load_n(&rwl->cnt, __ATOMIC_RELAXED);
  		/* a lock is held */
  		if (x != 0) {
-@@ -163,6 +164,6 @@ rte_rwlock_write_lock(rte_rwlock_t *rwl)
+@@ -107,6 +107,6 @@ rte_rwlock_write_lock(rte_rwlock_t *rwl)
  			continue;
  		}
 -		success = rte_atomic32_cmpset((volatile uint32_t *)&rwl->cnt,
@@ -105,7 +79,7 @@
 +					__ATOMIC_ACQUIRE, __ATOMIC_RELAXED);
  	}
  }
-@@ -177,5 +178,5 @@ static inline void
+@@ -121,5 +121,5 @@ static inline void
  rte_rwlock_write_unlock(rte_rwlock_t *rwl)
  {
 -	rte_atomic32_inc((rte_atomic32_t *)(intptr_t)&rwl->cnt);

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

* [dpdk-stable] patch 'eal/ppc: fix global memory barrier' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (57 preceding siblings ...)
  2019-04-16 14:37 ` [dpdk-stable] patch 'rwlock: reimplement with atomic builtins' " Kevin Traynor
@ 2019-04-16 14:37 ` Kevin Traynor
  2019-04-16 14:37 ` [dpdk-stable] patch 'vfio: document multiprocess limitation for container API' " Kevin Traynor
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:37 UTC (permalink / raw)
  To: Dekel Peled; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From 457170828d8a03416e010a71fc4657822b3567cb Mon Sep 17 00:00:00 2001
From: Dekel Peled <dekelp@mellanox.com>
Date: Mon, 18 Mar 2019 14:58:13 +0200
Subject: [PATCH] eal/ppc: fix global memory barrier

[ upstream commit 8015c5593acc3ed490d75c70ff67961b7e278e38 ]

From previous patch description: "to improve performance on PPC64,
use light weight sync instruction instead of sync instruction."

Excerpt from IBM doc [1], section "Memory barrier instructions":
"The second form of the sync instruction is light-weight sync,
or lwsync.
This form is used to control ordering for storage accesses to system
memory only. It does not create a memory barrier for accesses to
device memory."

This patch removes the use of lwsync, so calls to rte_wmb() and
rte_rmb() will provide correct memory barrier to ensure order of
accesses to system memory and device memory.

[1] https://www.ibm.com/developerworks/systems/articles/powerpc.html

Fixes: d23a6bd04d72 ("eal/ppc: fix memory barrier for IBM POWER")

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
---
 lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h b/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h
index ce38350bd..797381c0f 100644
--- a/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h
+++ b/lib/librte_eal/common/include/arch/ppc_64/rte_atomic.h
@@ -64,9 +64,5 @@ extern "C" {
  * occur before the STORE operations generated after.
  */
-#ifdef RTE_ARCH_64
-#define	rte_wmb() asm volatile("lwsync" : : : "memory")
-#else
 #define	rte_wmb() asm volatile("sync" : : : "memory")
-#endif
 
 /**
@@ -76,9 +72,5 @@ extern "C" {
  * occur before the LOAD operations generated after.
  */
-#ifdef RTE_ARCH_64
-#define	rte_rmb() asm volatile("lwsync" : : : "memory")
-#else
 #define	rte_rmb() asm volatile("sync" : : : "memory")
-#endif
 
 #define rte_smp_mb() rte_mb()
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:27.862297580 +0100
+++ 0060-eal-ppc-fix-global-memory-barrier.patch	2019-04-16 15:34:25.237178685 +0100
@@ -1,8 +1,10 @@
-From 8015c5593acc3ed490d75c70ff67961b7e278e38 Mon Sep 17 00:00:00 2001
+From 457170828d8a03416e010a71fc4657822b3567cb Mon Sep 17 00:00:00 2001
 From: Dekel Peled <dekelp@mellanox.com>
 Date: Mon, 18 Mar 2019 14:58:13 +0200
 Subject: [PATCH] eal/ppc: fix global memory barrier
 
+[ upstream commit 8015c5593acc3ed490d75c70ff67961b7e278e38 ]
+
 From previous patch description: "to improve performance on PPC64,
 use light weight sync instruction instead of sync instruction."
 
@@ -20,7 +22,6 @@
 [1] https://www.ibm.com/developerworks/systems/articles/powerpc.html
 
 Fixes: d23a6bd04d72 ("eal/ppc: fix memory barrier for IBM POWER")
-Cc: stable@dpdk.org
 
 Signed-off-by: Dekel Peled <dekelp@mellanox.com>
 ---

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

* [dpdk-stable] patch 'vfio: document multiprocess limitation for container API' has been queued to LTS release 18.11.2
  2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
                   ` (58 preceding siblings ...)
  2019-04-16 14:37 ` [dpdk-stable] patch 'eal/ppc: fix global memory barrier' " Kevin Traynor
@ 2019-04-16 14:37 ` Kevin Traynor
  59 siblings, 0 replies; 69+ messages in thread
From: Kevin Traynor @ 2019-04-16 14:37 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to LTS release 18.11.2

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

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

Thanks.

Kevin Traynor

---
From ae959092c95221583d968a0628d31cccb7519d3d Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov@intel.com>
Date: Wed, 27 Feb 2019 15:41:24 +0000
Subject: [PATCH] vfio: document multiprocess limitation for container API

[ upstream commit 1fd3bcf3f97b219a93456466cb1aa46e2419f051 ]

Currently, there is no support for sharing custom VFIO containers
between multiple processes, but it is not documented.

Document this limitation.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/include/rte_vfio.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_eal/common/include/rte_vfio.h b/lib/librte_eal/common/include/rte_vfio.h
index cae96fab9..4b3a91e91 100644
--- a/lib/librte_eal/common/include/rte_vfio.h
+++ b/lib/librte_eal/common/include/rte_vfio.h
@@ -292,4 +292,8 @@ rte_vfio_get_group_fd(int iommu_group_num);
  *       any container created by this API.
  *
+ * @note When creating containers using this API, the container will only be
+ *       available in the process that has created it. Sharing containers and
+ *       devices between multiple processes is not supported.
+ *
  * @return
  *   the container fd if successful
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-16 15:34:27.903072801 +0100
+++ 0061-vfio-document-multiprocess-limitation-for-container-.patch	2019-04-16 15:34:25.238178663 +0100
@@ -1,15 +1,15 @@
-From 1fd3bcf3f97b219a93456466cb1aa46e2419f051 Mon Sep 17 00:00:00 2001
+From ae959092c95221583d968a0628d31cccb7519d3d Mon Sep 17 00:00:00 2001
 From: Anatoly Burakov <anatoly.burakov@intel.com>
 Date: Wed, 27 Feb 2019 15:41:24 +0000
 Subject: [PATCH] vfio: document multiprocess limitation for container API
 
+[ upstream commit 1fd3bcf3f97b219a93456466cb1aa46e2419f051 ]
+
 Currently, there is no support for sharing custom VFIO containers
 between multiple processes, but it is not documented.
 
 Document this limitation.
 
-Cc: stable@dpdk.org
-
 Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
 ---
  lib/librte_eal/common/include/rte_vfio.h | 4 ++++

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

* Re: [dpdk-stable] [EXT] patch 'test/crypto: fix duplicate id used by CCP device' has been queued to LTS release 18.11.2
  2019-04-16 14:36 ` [dpdk-stable] patch 'test/crypto: fix duplicate id used by CCP device' " Kevin Traynor
@ 2019-04-17  6:55   ` Hemant Agrawal
  0 siblings, 0 replies; 69+ messages in thread
From: Hemant Agrawal @ 2019-04-17  6:55 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Anoob Joseph, Akhil Goyal, dpdk stable

Looks ok

-----Original Message-----
From: Kevin Traynor <ktraynor@redhat.com> 
Sent: Tuesday, April 16, 2019 8:06 PM
To: Hemant Agrawal <hemant.agrawal@nxp.com>
Cc: Anoob Joseph <anoobj@marvell.com>; Akhil Goyal <akhil.goyal@nxp.com>; dpdk stable <stable@dpdk.org>
Subject: [EXT] patch 'test/crypto: fix duplicate id used by CCP device' has been queued to LTS release 18.11.2

WARNING: This email was created outside of NXP. DO NOT CLICK links or attachments unless you recognize the sender and know the content is safe.



Hi,

FYI, your patch has been queued to LTS release 18.11.2

Note it hasn't been pushed to https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdpdk.org%2Fbrowse%2Fdpdk-stable&amp;data=02%7C01%7Chemant.agrawal%40nxp.com%7C9459b6db3d8c4198449b08d6c27915e9%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636910222674367885&amp;sdata=w0hKR7ThFqkriJRObB8muF88LnvtE%2B6nCHwlcINhLqo%3D&amp;reserved=0 yet.
It will be pushed if I get no objections before 04/24/19. So please shout if anyone has objections.

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

Thanks.

Kevin Traynor

---
From 28632b66553b11af1ff3d9e151957a7dd4f47dc5 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Wed, 6 Mar 2019 22:10:34 +0530
Subject: [PATCH] test/crypto: fix duplicate id used by CCP device

[ upstream commit 610e235a11e49a1e5d55c2804a5bc628e87417f1 ]

These duplicate device id is causing incorrect mapping for DPAA_SEC for test case execution on the basis of capabilities.

Fixes: e155ca055e84 ("test/crypto: add tests for AMD CCP")

Reported-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 test/test/test_cryptodev_blockcipher.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/test/test_cryptodev_blockcipher.h b/test/test/test_cryptodev_blockcipher.h
index f8bd85838..52c377649 100644
--- a/test/test/test_cryptodev_blockcipher.h
+++ b/test/test/test_cryptodev_blockcipher.h
@@ -28,8 +28,8 @@
 #define BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC   0x0040 /* DPAA_SEC flag */
 #define BLOCKCIPHER_TEST_TARGET_PMD_MVSAM      0x0080 /* Marvell flag */
-#define BLOCKCIPHER_TEST_TARGET_PMD_CCP                0x0040 /* CCP flag */
-#define BLOCKCIPHER_TEST_TARGET_PMD_VIRTIO     0x0200 /* VIRTIO flag */
 #define BLOCKCIPHER_TEST_TARGET_PMD_OCTEONTX   0x0100 /* OCTEON TX flag */
+#define BLOCKCIPHER_TEST_TARGET_PMD_VIRTIO     0x0200 /* VIRTIO flag */
 #define BLOCKCIPHER_TEST_TARGET_PMD_CAAM_JR    0x0400 /* CAAM_JR flag */
+#define BLOCKCIPHER_TEST_TARGET_PMD_CCP                0x0800 /* CCP flag */

 #define BLOCKCIPHER_TEST_OP_CIPHER     (BLOCKCIPHER_TEST_OP_ENCRYPT | \
--
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -   2019-04-16 15:34:25.437350407 +0100
+++ 0005-test-crypto-fix-duplicate-id-used-by-CCP-device.patch  
+++ 2019-04-16 15:34:25.108181547 +0100
@@ -1,26 +1,27 @@
-From 610e235a11e49a1e5d55c2804a5bc628e87417f1 Mon Sep 17 00:00:00 2001
+From 28632b66553b11af1ff3d9e151957a7dd4f47dc5 Mon Sep 17 00:00:00 2001
 From: Hemant Agrawal <hemant.agrawal@nxp.com>
 Date: Wed, 6 Mar 2019 22:10:34 +0530
 Subject: [PATCH] test/crypto: fix duplicate id used by CCP device

+[ upstream commit 610e235a11e49a1e5d55c2804a5bc628e87417f1 ]
+
 These duplicate device id is causing incorrect mapping  for DPAA_SEC for test case execution on the basis of  capabilities.

 Fixes: e155ca055e84 ("test/crypto: add tests for AMD CCP")
-Cc: stable@dpdk.org

 Reported-by: Anoob Joseph <anoobj@marvell.com>
 Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
 Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
 ---
- app/test/test_cryptodev_blockcipher.h | 4 ++--
+ test/test/test_cryptodev_blockcipher.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

-diff --git a/app/test/test_cryptodev_blockcipher.h b/app/test/test_cryptodev_blockcipher.h
-index 5c22d5da6..6925a6c0d 100644
---- a/app/test/test_cryptodev_blockcipher.h
-+++ b/app/test/test_cryptodev_blockcipher.h
+diff --git a/test/test/test_cryptodev_blockcipher.h 
+b/test/test/test_cryptodev_blockcipher.h
+index f8bd85838..52c377649 100644
+--- a/test/test/test_cryptodev_blockcipher.h
++++ b/test/test/test_cryptodev_blockcipher.h
 @@ -28,8 +28,8 @@
  #define BLOCKCIPHER_TEST_TARGET_PMD_DPAA_SEC  0x0040 /* DPAA_SEC flag */
  #define BLOCKCIPHER_TEST_TARGET_PMD_MVSAM     0x0080 /* Marvell flag */

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

* Re: [dpdk-stable] patch 'net/nfp: fix setting MAC address' has been queued to LTS release 18.11.2
  2019-04-16 14:36 ` [dpdk-stable] patch 'net/nfp: fix setting MAC address' " Kevin Traynor
@ 2019-04-23 10:24   ` Pablo Cascón
  2019-04-23 13:03     ` Kevin Traynor
  0 siblings, 1 reply; 69+ messages in thread
From: Pablo Cascón @ 2019-04-23 10:24 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Alejandro Lucero, dpdk stable

Hi,

thanks for the reply and explaining the process.

Unfortunately the diff at the end of your commit doesn't match what I was expecting. Have tried to generate it here and could only get changes related to the rebase (metada diffs) but no code changes. And your diff seems to imply code changes, not 100% sure. Could you double check the stable patch and diff please. Happy to send a patch of what I would like to land into stable

For clarity this is what I tried, perhaps incorrectly, please let me know:
1) generate patch from dpdk upstream commit:
    dpdk⟫ git format-patch -o /tmp/ -n -1 027412f
2) import it into stable
    dpdk-stable⟫ git am /tmp/0001-net-nfp-fix-setting-MAC-address.patch
3) generate patch of just imported one:
    dpdk-stable⟫ git format-patch -o /tmp/stable/ -n -1 HEAD
4) diff the checking there are only rebase related changes:

dpdk-stable⟫ diff /tmp/0001-net-nfp-fix-setting-MAC-address.patch /tmp/stable/0001-net-nfp-fix-setting-MAC-address.patch
1c1
< From 027412fe949c763fd4d536b13dcb4432f2df5534 Mon Sep 17 00:00:00 2001
---
> From 3e5c4cd12ff01df228124d92905e4e7d563b652e Mon Sep 17 00:00:00 2001
30c30
< index a791e95..1b7b6c2 100644
---
> index 54c6da9..278e154 100644
33c33
< @@ -575,7 +575,10 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
---
> @@ -566,7 +566,10 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)

Thanks,

Pablo

On 16/04/2019 15:36, Kevin Traynor wrote:
> Hi,
>
> FYI, your patch has been queued to LTS release 18.11.2
>
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 04/24/19. So please
> shout if anyone has objections.
>
> Also note that after the patch there's a diff of the upstream commit vs the
> patch applied to the branch. This will indicate if there was any rebasing
> needed to apply to the stable branch. If there were code changes for rebasing
> (ie: not only metadata diffs), please double check that the rebase was
> correctly done.
>
> Thanks.
>
> Kevin Traynor
>
> ---
> From 8fb7943ea804d437fc5b7153d7c073c79eeb3837 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Pablo=20Casc=C3=B3n?= <pablo.cascon@netronome.com>
> Date: Fri, 8 Mar 2019 15:40:47 +0000
> Subject: [PATCH] net/nfp: fix setting MAC address
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> [ upstream commit 027412fe949c763fd4d536b13dcb4432f2df5534 ]
>
> Some firmwares, mostly for VFs, do not advertise the feature /
> capability of changing the MAC address while the interface is up. With
> such firmware a request to change the MAC address that at the same
> time also tries to enable the not available feature will be denied by
> the firmware resulting in an error message like:
>
> nfp_net_reconfig(): Error nfp_net reconfig for ctrl: 80000000 update: 800
>
> Fix set_mac_addr by not trying to enable a feature if it is not
> advertised by the firmware.
>
> Fixes: 2fe669f4bcd2 ("net/nfp: support MAC address change")
>
> Signed-off-by: Pablo Cascón <pablo.cascon@netronome.com>
> Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
> ---
>  drivers/net/nfp/nfp_net.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
> index 54c6da924..278e154cd 100644
> --- a/drivers/net/nfp/nfp_net.c
> +++ b/drivers/net/nfp/nfp_net.c
> @@ -567,5 +567,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
>  	/* Signal the NIC about the change */
>  	update = NFP_NET_CFG_UPDATE_MACADDR;
> -	ctrl = hw->ctrl | NFP_NET_CFG_CTRL_LIVE_ADDR;
> +	ctrl = hw->ctrl;
> +	if ((hw->ctrl & NFP_NET_CFG_CTRL_ENABLE) &&
> +	    (hw->cap & NFP_NET_CFG_CTRL_LIVE_ADDR))
> +		ctrl |= NFP_NET_CFG_CTRL_LIVE_ADDR;
>  	if (nfp_net_reconfig(hw, ctrl, update) < 0) {
>  		PMD_INIT_LOG(INFO, "MAC address update failed");


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

* Re: [dpdk-stable] patch 'net/nfp: fix setting MAC address' has been queued to LTS release 18.11.2
  2019-04-23 10:24   ` Pablo Cascón
@ 2019-04-23 13:03     ` Kevin Traynor
  2019-04-23 13:35       ` Pablo Cascón
  0 siblings, 1 reply; 69+ messages in thread
From: Kevin Traynor @ 2019-04-23 13:03 UTC (permalink / raw)
  To: Pablo Cascón; +Cc: Alejandro Lucero, dpdk stable

On 23/04/2019 11:24, Pablo Cascón wrote:
> Hi,
> 

Hi Pablo,

> thanks for the reply and explaining the process.
> 
> Unfortunately the diff at the end of your commit doesn't match what I was expecting. Have tried to generate it here and could only get changes related to the rebase (metada diffs) but no code changes. And your diff seems to imply code changes, not 100% sure. Could you double check the stable patch and diff please. Happy to send a patch of what I would like to land into stable
> 

I checked and the change is the same in stable as master, so it looks ok.

I think I know what's causing the confusion. The diff is a diff of the
*patches*, not the code. Both patches have +/- LOC in them and one is
being brought into context by a metadata change between the patches.
There is a difference in the indent of the +/-'s of the patches
themselves vs the diff between the patches but it's hard to distinguish.
See below:

-@@ -576,5 +576,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct
ether_addr *mac_addr)
+@@ -567,5 +567,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct

^ '+' and '-' is a metadata diff between the patches, context below

ether_addr *mac_addr)
  	/* Signal the NIC about the change */
  	update = NFP_NET_CFG_UPDATE_MACADDR;
 -	ctrl = hw->ctrl | NFP_NET_CFG_CTRL_LIVE_ADDR;

 ^ '-' is part of both patches that removes this LOC
^ no diff between the patches


Thanks for checking the patch and raising this. We can think about how
to make it clearer - perhaps the diff would be better without any context.

Kevin.

> For clarity this is what I tried, perhaps incorrectly, please let me know:
> 1) generate patch from dpdk upstream commit:
>     dpdk⟫ git format-patch -o /tmp/ -n -1 027412f
> 2) import it into stable
>     dpdk-stable⟫ git am /tmp/0001-net-nfp-fix-setting-MAC-address.patch
> 3) generate patch of just imported one:
>     dpdk-stable⟫ git format-patch -o /tmp/stable/ -n -1 HEAD
> 4) diff the checking there are only rebase related changes:
> 
> dpdk-stable⟫ diff /tmp/0001-net-nfp-fix-setting-MAC-address.patch /tmp/stable/0001-net-nfp-fix-setting-MAC-address.patch
> 1c1
> < From 027412fe949c763fd4d536b13dcb4432f2df5534 Mon Sep 17 00:00:00 2001
> ---
>> From 3e5c4cd12ff01df228124d92905e4e7d563b652e Mon Sep 17 00:00:00 2001
> 30c30
> < index a791e95..1b7b6c2 100644
> ---
>> index 54c6da9..278e154 100644
> 33c33
> < @@ -575,7 +575,10 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
> ---
>> @@ -566,7 +566,10 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
> 
> Thanks,
> 
> Pablo
> 
> On 16/04/2019 15:36, Kevin Traynor wrote:
>> Hi,
>>
>> FYI, your patch has been queued to LTS release 18.11.2
>>
>> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
>> It will be pushed if I get no objections before 04/24/19. So please
>> shout if anyone has objections.
>>
>> Also note that after the patch there's a diff of the upstream commit vs the
>> patch applied to the branch. This will indicate if there was any rebasing
>> needed to apply to the stable branch. If there were code changes for rebasing
>> (ie: not only metadata diffs), please double check that the rebase was
>> correctly done.
>>
>> Thanks.
>>
>> Kevin Traynor
>>
>> ---
>> From 8fb7943ea804d437fc5b7153d7c073c79eeb3837 Mon Sep 17 00:00:00 2001
>> From: =?UTF-8?q?Pablo=20Casc=C3=B3n?= <pablo.cascon@netronome.com>
>> Date: Fri, 8 Mar 2019 15:40:47 +0000
>> Subject: [PATCH] net/nfp: fix setting MAC address
>> MIME-Version: 1.0
>> Content-Type: text/plain; charset=UTF-8
>> Content-Transfer-Encoding: 8bit
>>
>> [ upstream commit 027412fe949c763fd4d536b13dcb4432f2df5534 ]
>>
>> Some firmwares, mostly for VFs, do not advertise the feature /
>> capability of changing the MAC address while the interface is up. With
>> such firmware a request to change the MAC address that at the same
>> time also tries to enable the not available feature will be denied by
>> the firmware resulting in an error message like:
>>
>> nfp_net_reconfig(): Error nfp_net reconfig for ctrl: 80000000 update: 800
>>
>> Fix set_mac_addr by not trying to enable a feature if it is not
>> advertised by the firmware.
>>
>> Fixes: 2fe669f4bcd2 ("net/nfp: support MAC address change")
>>
>> Signed-off-by: Pablo Cascón <pablo.cascon@netronome.com>
>> Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
>> ---
>>  drivers/net/nfp/nfp_net.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
>> index 54c6da924..278e154cd 100644
>> --- a/drivers/net/nfp/nfp_net.c
>> +++ b/drivers/net/nfp/nfp_net.c
>> @@ -567,5 +567,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
>>  	/* Signal the NIC about the change */
>>  	update = NFP_NET_CFG_UPDATE_MACADDR;
>> -	ctrl = hw->ctrl | NFP_NET_CFG_CTRL_LIVE_ADDR;
>> +	ctrl = hw->ctrl;
>> +	if ((hw->ctrl & NFP_NET_CFG_CTRL_ENABLE) &&
>> +	    (hw->cap & NFP_NET_CFG_CTRL_LIVE_ADDR))
>> +		ctrl |= NFP_NET_CFG_CTRL_LIVE_ADDR;
>>  	if (nfp_net_reconfig(hw, ctrl, update) < 0) {
>>  		PMD_INIT_LOG(INFO, "MAC address update failed");
> 


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

* Re: [dpdk-stable] patch 'net/nfp: fix setting MAC address' has been queued to LTS release 18.11.2
  2019-04-23 13:03     ` Kevin Traynor
@ 2019-04-23 13:35       ` Pablo Cascón
  2019-04-25 16:02         ` Kevin Traynor
  0 siblings, 1 reply; 69+ messages in thread
From: Pablo Cascón @ 2019-04-23 13:35 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Alejandro Lucero, dpdk stable

Thank you very much for walking me through it, it's crystal clear now :)  Please push the changes, at least no objection from me.

(Also got the extra tip from a colleague to use Thunderbird's extension Colored Diffs where the tiny extra space that differentiates a context from the actual change is a lot more visible. Wish I had good feedback to contribute, can only think of: a) educating those struggling (thx!) b) no diff context (any downside?) and c) also sharing the stable patch?)

Pablo

On 23/04/2019 14:03, Kevin Traynor wrote:
> On 23/04/2019 11:24, Pablo Cascón wrote:
>> Hi,
>>
> Hi Pablo,
>
>> thanks for the reply and explaining the process.
>>
>> Unfortunately the diff at the end of your commit doesn't match what I was expecting. Have tried to generate it here and could only get changes related to the rebase (metada diffs) but no code changes. And your diff seems to imply code changes, not 100% sure. Could you double check the stable patch and diff please. Happy to send a patch of what I would like to land into stable
>>
> I checked and the change is the same in stable as master, so it looks ok.
>
> I think I know what's causing the confusion. The diff is a diff of the
> *patches*, not the code. Both patches have +/- LOC in them and one is
> being brought into context by a metadata change between the patches.
> There is a difference in the indent of the +/-'s of the patches
> themselves vs the diff between the patches but it's hard to distinguish.
> See below:
>
> -@@ -576,5 +576,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct
> ether_addr *mac_addr)
> +@@ -567,5 +567,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct
>
> ^ '+' and '-' is a metadata diff between the patches, context below
>
> ether_addr *mac_addr)
>   	/* Signal the NIC about the change */
>   	update = NFP_NET_CFG_UPDATE_MACADDR;
>  -	ctrl = hw->ctrl | NFP_NET_CFG_CTRL_LIVE_ADDR;
>
>  ^ '-' is part of both patches that removes this LOC
> ^ no diff between the patches
>
>
> Thanks for checking the patch and raising this. We can think about how
> to make it clearer - perhaps the diff would be better without any context.
>
> Kevin.
>
>> For clarity this is what I tried, perhaps incorrectly, please let me know:
>> 1) generate patch from dpdk upstream commit:
>>     dpdk⟫ git format-patch -o /tmp/ -n -1 027412f
>> 2) import it into stable
>>     dpdk-stable⟫ git am /tmp/0001-net-nfp-fix-setting-MAC-address.patch
>> 3) generate patch of just imported one:
>>     dpdk-stable⟫ git format-patch -o /tmp/stable/ -n -1 HEAD
>> 4) diff the checking there are only rebase related changes:
>>
>> dpdk-stable⟫ diff /tmp/0001-net-nfp-fix-setting-MAC-address.patch /tmp/stable/0001-net-nfp-fix-setting-MAC-address.patch
>> 1c1
>> < From 027412fe949c763fd4d536b13dcb4432f2df5534 Mon Sep 17 00:00:00 2001
>> ---
>>> From 3e5c4cd12ff01df228124d92905e4e7d563b652e Mon Sep 17 00:00:00 2001
>> 30c30
>> < index a791e95..1b7b6c2 100644
>> ---
>>> index 54c6da9..278e154 100644
>> 33c33
>> < @@ -575,7 +575,10 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
>> ---
>>> @@ -566,7 +566,10 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
>> Thanks,
>>
>> Pablo
>>
>> On 16/04/2019 15:36, Kevin Traynor wrote:
>>> Hi,
>>>
>>> FYI, your patch has been queued to LTS release 18.11.2
>>>
>>> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
>>> It will be pushed if I get no objections before 04/24/19. So please
>>> shout if anyone has objections.
>>>
>>> Also note that after the patch there's a diff of the upstream commit vs the
>>> patch applied to the branch. This will indicate if there was any rebasing
>>> needed to apply to the stable branch. If there were code changes for rebasing
>>> (ie: not only metadata diffs), please double check that the rebase was
>>> correctly done.
>>>
>>> Thanks.
>>>
>>> Kevin Traynor
>>>
>>> ---
>>> From 8fb7943ea804d437fc5b7153d7c073c79eeb3837 Mon Sep 17 00:00:00 2001
>>> From: =?UTF-8?q?Pablo=20Casc=C3=B3n?= <pablo.cascon@netronome.com>
>>> Date: Fri, 8 Mar 2019 15:40:47 +0000
>>> Subject: [PATCH] net/nfp: fix setting MAC address
>>> MIME-Version: 1.0
>>> Content-Type: text/plain; charset=UTF-8
>>> Content-Transfer-Encoding: 8bit
>>>
>>> [ upstream commit 027412fe949c763fd4d536b13dcb4432f2df5534 ]
>>>
>>> Some firmwares, mostly for VFs, do not advertise the feature /
>>> capability of changing the MAC address while the interface is up. With
>>> such firmware a request to change the MAC address that at the same
>>> time also tries to enable the not available feature will be denied by
>>> the firmware resulting in an error message like:
>>>
>>> nfp_net_reconfig(): Error nfp_net reconfig for ctrl: 80000000 update: 800
>>>
>>> Fix set_mac_addr by not trying to enable a feature if it is not
>>> advertised by the firmware.
>>>
>>> Fixes: 2fe669f4bcd2 ("net/nfp: support MAC address change")
>>>
>>> Signed-off-by: Pablo Cascón <pablo.cascon@netronome.com>
>>> Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
>>> ---
>>>  drivers/net/nfp/nfp_net.c | 5 ++++-
>>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
>>> index 54c6da924..278e154cd 100644
>>> --- a/drivers/net/nfp/nfp_net.c
>>> +++ b/drivers/net/nfp/nfp_net.c
>>> @@ -567,5 +567,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
>>>  	/* Signal the NIC about the change */
>>>  	update = NFP_NET_CFG_UPDATE_MACADDR;
>>> -	ctrl = hw->ctrl | NFP_NET_CFG_CTRL_LIVE_ADDR;
>>> +	ctrl = hw->ctrl;
>>> +	if ((hw->ctrl & NFP_NET_CFG_CTRL_ENABLE) &&
>>> +	    (hw->cap & NFP_NET_CFG_CTRL_LIVE_ADDR))
>>> +		ctrl |= NFP_NET_CFG_CTRL_LIVE_ADDR;
>>>  	if (nfp_net_reconfig(hw, ctrl, update) < 0) {
>>>  		PMD_INIT_LOG(INFO, "MAC address update failed");


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

* Re: [dpdk-stable] patch 'net/nfp: fix setting MAC address' has been queued to LTS release 18.11.2
  2019-04-23 13:35       ` Pablo Cascón
@ 2019-04-25 16:02         ` Kevin Traynor
  2019-04-26  9:26           ` Pablo Cascón
  0 siblings, 1 reply; 69+ messages in thread
From: Kevin Traynor @ 2019-04-25 16:02 UTC (permalink / raw)
  To: Pablo Cascón; +Cc: Alejandro Lucero, dpdk stable

On 23/04/2019 14:35, Pablo Cascón wrote:
> Thank you very much for walking me through it, it's crystal clear now :)  Please push the changes, at least no objection from me.
> 
> (Also got the extra tip from a colleague to use Thunderbird's extension Colored Diffs where the tiny extra space that differentiates a context from the actual change is a lot more visible. Wish I had good feedback to contribute, can only think of: a) educating those struggling (thx!) b) no diff context (any downside?) and c) also sharing the stable patch?)
> 

For the latest batch of patches I reduced the patch to patch diff
context to zero, so every line in the diff is an actual change, either
metadata or code. The downside of no context is it can be hard to
understand the changes, so I also pushed the queued patches to github.

I think now it can be quicker to see if there is any code changes and
the code can be viewed in full context if needed.

Kevin.

> Pablo
> 
> On 23/04/2019 14:03, Kevin Traynor wrote:
>> On 23/04/2019 11:24, Pablo Cascón wrote:
>>> Hi,
>>>
>> Hi Pablo,
>>
>>> thanks for the reply and explaining the process.
>>>
>>> Unfortunately the diff at the end of your commit doesn't match what I was expecting. Have tried to generate it here and could only get changes related to the rebase (metada diffs) but no code changes. And your diff seems to imply code changes, not 100% sure. Could you double check the stable patch and diff please. Happy to send a patch of what I would like to land into stable
>>>
>> I checked and the change is the same in stable as master, so it looks ok.
>>
>> I think I know what's causing the confusion. The diff is a diff of the
>> *patches*, not the code. Both patches have +/- LOC in them and one is
>> being brought into context by a metadata change between the patches.
>> There is a difference in the indent of the +/-'s of the patches
>> themselves vs the diff between the patches but it's hard to distinguish.
>> See below:
>>
>> -@@ -576,5 +576,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct
>> ether_addr *mac_addr)
>> +@@ -567,5 +567,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct
>>
>> ^ '+' and '-' is a metadata diff between the patches, context below
>>
>> ether_addr *mac_addr)
>>   	/* Signal the NIC about the change */
>>   	update = NFP_NET_CFG_UPDATE_MACADDR;
>>  -	ctrl = hw->ctrl | NFP_NET_CFG_CTRL_LIVE_ADDR;
>>
>>  ^ '-' is part of both patches that removes this LOC
>> ^ no diff between the patches
>>
>>
>> Thanks for checking the patch and raising this. We can think about how
>> to make it clearer - perhaps the diff would be better without any context.
>>
>> Kevin.
>>
>>> For clarity this is what I tried, perhaps incorrectly, please let me know:
>>> 1) generate patch from dpdk upstream commit:
>>>     dpdk⟫ git format-patch -o /tmp/ -n -1 027412f
>>> 2) import it into stable
>>>     dpdk-stable⟫ git am /tmp/0001-net-nfp-fix-setting-MAC-address.patch
>>> 3) generate patch of just imported one:
>>>     dpdk-stable⟫ git format-patch -o /tmp/stable/ -n -1 HEAD
>>> 4) diff the checking there are only rebase related changes:
>>>
>>> dpdk-stable⟫ diff /tmp/0001-net-nfp-fix-setting-MAC-address.patch /tmp/stable/0001-net-nfp-fix-setting-MAC-address.patch
>>> 1c1
>>> < From 027412fe949c763fd4d536b13dcb4432f2df5534 Mon Sep 17 00:00:00 2001
>>> ---
>>>> From 3e5c4cd12ff01df228124d92905e4e7d563b652e Mon Sep 17 00:00:00 2001
>>> 30c30
>>> < index a791e95..1b7b6c2 100644
>>> ---
>>>> index 54c6da9..278e154 100644
>>> 33c33
>>> < @@ -575,7 +575,10 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
>>> ---
>>>> @@ -566,7 +566,10 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
>>> Thanks,
>>>
>>> Pablo
>>>
>>> On 16/04/2019 15:36, Kevin Traynor wrote:
>>>> Hi,
>>>>
>>>> FYI, your patch has been queued to LTS release 18.11.2
>>>>
>>>> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
>>>> It will be pushed if I get no objections before 04/24/19. So please
>>>> shout if anyone has objections.
>>>>
>>>> Also note that after the patch there's a diff of the upstream commit vs the
>>>> patch applied to the branch. This will indicate if there was any rebasing
>>>> needed to apply to the stable branch. If there were code changes for rebasing
>>>> (ie: not only metadata diffs), please double check that the rebase was
>>>> correctly done.
>>>>
>>>> Thanks.
>>>>
>>>> Kevin Traynor
>>>>
>>>> ---
>>>> From 8fb7943ea804d437fc5b7153d7c073c79eeb3837 Mon Sep 17 00:00:00 2001
>>>> From: =?UTF-8?q?Pablo=20Casc=C3=B3n?= <pablo.cascon@netronome.com>
>>>> Date: Fri, 8 Mar 2019 15:40:47 +0000
>>>> Subject: [PATCH] net/nfp: fix setting MAC address
>>>> MIME-Version: 1.0
>>>> Content-Type: text/plain; charset=UTF-8
>>>> Content-Transfer-Encoding: 8bit
>>>>
>>>> [ upstream commit 027412fe949c763fd4d536b13dcb4432f2df5534 ]
>>>>
>>>> Some firmwares, mostly for VFs, do not advertise the feature /
>>>> capability of changing the MAC address while the interface is up. With
>>>> such firmware a request to change the MAC address that at the same
>>>> time also tries to enable the not available feature will be denied by
>>>> the firmware resulting in an error message like:
>>>>
>>>> nfp_net_reconfig(): Error nfp_net reconfig for ctrl: 80000000 update: 800
>>>>
>>>> Fix set_mac_addr by not trying to enable a feature if it is not
>>>> advertised by the firmware.
>>>>
>>>> Fixes: 2fe669f4bcd2 ("net/nfp: support MAC address change")
>>>>
>>>> Signed-off-by: Pablo Cascón <pablo.cascon@netronome.com>
>>>> Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
>>>> ---
>>>>  drivers/net/nfp/nfp_net.c | 5 ++++-
>>>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
>>>> index 54c6da924..278e154cd 100644
>>>> --- a/drivers/net/nfp/nfp_net.c
>>>> +++ b/drivers/net/nfp/nfp_net.c
>>>> @@ -567,5 +567,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
>>>>  	/* Signal the NIC about the change */
>>>>  	update = NFP_NET_CFG_UPDATE_MACADDR;
>>>> -	ctrl = hw->ctrl | NFP_NET_CFG_CTRL_LIVE_ADDR;
>>>> +	ctrl = hw->ctrl;
>>>> +	if ((hw->ctrl & NFP_NET_CFG_CTRL_ENABLE) &&
>>>> +	    (hw->cap & NFP_NET_CFG_CTRL_LIVE_ADDR))
>>>> +		ctrl |= NFP_NET_CFG_CTRL_LIVE_ADDR;
>>>>  	if (nfp_net_reconfig(hw, ctrl, update) < 0) {
>>>>  		PMD_INIT_LOG(INFO, "MAC address update failed");
> 


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

* Re: [dpdk-stable] patch 'net/nfp: fix setting MAC address' has been queued to LTS release 18.11.2
  2019-04-25 16:02         ` Kevin Traynor
@ 2019-04-26  9:26           ` Pablo Cascón
  2019-04-26  9:32             ` Kevin Traynor
  0 siblings, 1 reply; 69+ messages in thread
From: Pablo Cascón @ 2019-04-26  9:26 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Alejandro Lucero, dpdk stable

On 25/04/2019 17:02, Kevin Traynor wrote:
> On 23/04/2019 14:35, Pablo Cascón wrote:
>> Thank you very much for walking me through it, it's crystal clear now :)  Please push the changes, at least no objection from me.
>>
>> (Also got the extra tip from a colleague to use Thunderbird's extension Colored Diffs where the tiny extra space that differentiates a context from the actual change is a lot more visible. Wish I had good feedback to contribute, can only think of: a) educating those struggling (thx!) b) no diff context (any downside?) and c) also sharing the stable patch?)
>>
> For the latest batch of patches I reduced the patch to patch diff
> context to zero, so every line in the diff is an actual change, either
> metadata or code. The downside of no context is it can be hard to
> understand the changes, so I also pushed the queued patches to github.
>
> I think now it can be quicker to see if there is any code changes and
> the code can be viewed in full context if needed.
>
> Kevin.

That sounds like a good idea, thanks for adapting. Can't find the github for this though, just out of curiosity would you mind sharing the link?

>
>> Pablo
>>
>> On 23/04/2019 14:03, Kevin Traynor wrote:
>>> On 23/04/2019 11:24, Pablo Cascón wrote:
>>>> Hi,
>>>>
>>> Hi Pablo,
>>>
>>>> thanks for the reply and explaining the process.
>>>>
>>>> Unfortunately the diff at the end of your commit doesn't match what I was expecting. Have tried to generate it here and could only get changes related to the rebase (metada diffs) but no code changes. And your diff seems to imply code changes, not 100% sure. Could you double check the stable patch and diff please. Happy to send a patch of what I would like to land into stable
>>>>
>>> I checked and the change is the same in stable as master, so it looks ok.
>>>
>>> I think I know what's causing the confusion. The diff is a diff of the
>>> *patches*, not the code. Both patches have +/- LOC in them and one is
>>> being brought into context by a metadata change between the patches.
>>> There is a difference in the indent of the +/-'s of the patches
>>> themselves vs the diff between the patches but it's hard to distinguish.
>>> See below:
>>>
>>> -@@ -576,5 +576,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct
>>> ether_addr *mac_addr)
>>> +@@ -567,5 +567,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct
>>>
>>> ^ '+' and '-' is a metadata diff between the patches, context below
>>>
>>> ether_addr *mac_addr)
>>>   	/* Signal the NIC about the change */
>>>   	update = NFP_NET_CFG_UPDATE_MACADDR;
>>>  -	ctrl = hw->ctrl | NFP_NET_CFG_CTRL_LIVE_ADDR;
>>>
>>>  ^ '-' is part of both patches that removes this LOC
>>> ^ no diff between the patches
>>>
>>>
>>> Thanks for checking the patch and raising this. We can think about how
>>> to make it clearer - perhaps the diff would be better without any context.
>>>
>>> Kevin.
>>>
>>>> For clarity this is what I tried, perhaps incorrectly, please let me know:
>>>> 1) generate patch from dpdk upstream commit:
>>>>     dpdk⟫ git format-patch -o /tmp/ -n -1 027412f
>>>> 2) import it into stable
>>>>     dpdk-stable⟫ git am /tmp/0001-net-nfp-fix-setting-MAC-address.patch
>>>> 3) generate patch of just imported one:
>>>>     dpdk-stable⟫ git format-patch -o /tmp/stable/ -n -1 HEAD
>>>> 4) diff the checking there are only rebase related changes:
>>>>
>>>> dpdk-stable⟫ diff /tmp/0001-net-nfp-fix-setting-MAC-address.patch /tmp/stable/0001-net-nfp-fix-setting-MAC-address.patch
>>>> 1c1
>>>> < From 027412fe949c763fd4d536b13dcb4432f2df5534 Mon Sep 17 00:00:00 2001
>>>> ---
>>>>> From 3e5c4cd12ff01df228124d92905e4e7d563b652e Mon Sep 17 00:00:00 2001
>>>> 30c30
>>>> < index a791e95..1b7b6c2 100644
>>>> ---
>>>>> index 54c6da9..278e154 100644
>>>> 33c33
>>>> < @@ -575,7 +575,10 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
>>>> ---
>>>>> @@ -566,7 +566,10 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
>>>> Thanks,
>>>>
>>>> Pablo
>>>>
>>>> On 16/04/2019 15:36, Kevin Traynor wrote:
>>>>> Hi,
>>>>>
>>>>> FYI, your patch has been queued to LTS release 18.11.2
>>>>>
>>>>> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
>>>>> It will be pushed if I get no objections before 04/24/19. So please
>>>>> shout if anyone has objections.
>>>>>
>>>>> Also note that after the patch there's a diff of the upstream commit vs the
>>>>> patch applied to the branch. This will indicate if there was any rebasing
>>>>> needed to apply to the stable branch. If there were code changes for rebasing
>>>>> (ie: not only metadata diffs), please double check that the rebase was
>>>>> correctly done.
>>>>>
>>>>> Thanks.
>>>>>
>>>>> Kevin Traynor
>>>>>
>>>>> ---
>>>>> From 8fb7943ea804d437fc5b7153d7c073c79eeb3837 Mon Sep 17 00:00:00 2001
>>>>> From: =?UTF-8?q?Pablo=20Casc=C3=B3n?= <pablo.cascon@netronome.com>
>>>>> Date: Fri, 8 Mar 2019 15:40:47 +0000
>>>>> Subject: [PATCH] net/nfp: fix setting MAC address
>>>>> MIME-Version: 1.0
>>>>> Content-Type: text/plain; charset=UTF-8
>>>>> Content-Transfer-Encoding: 8bit
>>>>>
>>>>> [ upstream commit 027412fe949c763fd4d536b13dcb4432f2df5534 ]
>>>>>
>>>>> Some firmwares, mostly for VFs, do not advertise the feature /
>>>>> capability of changing the MAC address while the interface is up. With
>>>>> such firmware a request to change the MAC address that at the same
>>>>> time also tries to enable the not available feature will be denied by
>>>>> the firmware resulting in an error message like:
>>>>>
>>>>> nfp_net_reconfig(): Error nfp_net reconfig for ctrl: 80000000 update: 800
>>>>>
>>>>> Fix set_mac_addr by not trying to enable a feature if it is not
>>>>> advertised by the firmware.
>>>>>
>>>>> Fixes: 2fe669f4bcd2 ("net/nfp: support MAC address change")
>>>>>
>>>>> Signed-off-by: Pablo Cascón <pablo.cascon@netronome.com>
>>>>> Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
>>>>> ---
>>>>>  drivers/net/nfp/nfp_net.c | 5 ++++-
>>>>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
>>>>> index 54c6da924..278e154cd 100644
>>>>> --- a/drivers/net/nfp/nfp_net.c
>>>>> +++ b/drivers/net/nfp/nfp_net.c
>>>>> @@ -567,5 +567,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
>>>>>  	/* Signal the NIC about the change */
>>>>>  	update = NFP_NET_CFG_UPDATE_MACADDR;
>>>>> -	ctrl = hw->ctrl | NFP_NET_CFG_CTRL_LIVE_ADDR;
>>>>> +	ctrl = hw->ctrl;
>>>>> +	if ((hw->ctrl & NFP_NET_CFG_CTRL_ENABLE) &&
>>>>> +	    (hw->cap & NFP_NET_CFG_CTRL_LIVE_ADDR))
>>>>> +		ctrl |= NFP_NET_CFG_CTRL_LIVE_ADDR;
>>>>>  	if (nfp_net_reconfig(hw, ctrl, update) < 0) {
>>>>>  		PMD_INIT_LOG(INFO, "MAC address update failed");


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

* Re: [dpdk-stable] patch 'net/nfp: fix setting MAC address' has been queued to LTS release 18.11.2
  2019-04-26  9:26           ` Pablo Cascón
@ 2019-04-26  9:32             ` Kevin Traynor
  2019-04-26 10:00               ` Pablo Cascón
  0 siblings, 1 reply; 69+ messages in thread
From: Kevin Traynor @ 2019-04-26  9:32 UTC (permalink / raw)
  To: Pablo Cascón; +Cc: Alejandro Lucero, dpdk stable

On 26/04/2019 10:26, Pablo Cascón wrote:
> On 25/04/2019 17:02, Kevin Traynor wrote:
>> On 23/04/2019 14:35, Pablo Cascón wrote:
>>> Thank you very much for walking me through it, it's crystal clear now :)  Please push the changes, at least no objection from me.
>>>
>>> (Also got the extra tip from a colleague to use Thunderbird's extension Colored Diffs where the tiny extra space that differentiates a context from the actual change is a lot more visible. Wish I had good feedback to contribute, can only think of: a) educating those struggling (thx!) b) no diff context (any downside?) and c) also sharing the stable patch?)
>>>
>> For the latest batch of patches I reduced the patch to patch diff
>> context to zero, so every line in the diff is an actual change, either
>> metadata or code. The downside of no context is it can be hard to
>> understand the changes, so I also pushed the queued patches to github.
>>
>> I think now it can be quicker to see if there is any code changes and
>> the code can be viewed in full context if needed.
>>
>> Kevin.
> 
> That sounds like a good idea, thanks for adapting. Can't find the github for this though, just out of curiosity would you mind sharing the link?
> 

Sure - it's here https://github.com/kevintraynor/dpdk-stable-queue.git

>>
>>> Pablo
>>>
>>> On 23/04/2019 14:03, Kevin Traynor wrote:
>>>> On 23/04/2019 11:24, Pablo Cascón wrote:
>>>>> Hi,
>>>>>
>>>> Hi Pablo,
>>>>
>>>>> thanks for the reply and explaining the process.
>>>>>
>>>>> Unfortunately the diff at the end of your commit doesn't match what I was expecting. Have tried to generate it here and could only get changes related to the rebase (metada diffs) but no code changes. And your diff seems to imply code changes, not 100% sure. Could you double check the stable patch and diff please. Happy to send a patch of what I would like to land into stable
>>>>>
>>>> I checked and the change is the same in stable as master, so it looks ok.
>>>>
>>>> I think I know what's causing the confusion. The diff is a diff of the
>>>> *patches*, not the code. Both patches have +/- LOC in them and one is
>>>> being brought into context by a metadata change between the patches.
>>>> There is a difference in the indent of the +/-'s of the patches
>>>> themselves vs the diff between the patches but it's hard to distinguish.
>>>> See below:
>>>>
>>>> -@@ -576,5 +576,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct
>>>> ether_addr *mac_addr)
>>>> +@@ -567,5 +567,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct
>>>>
>>>> ^ '+' and '-' is a metadata diff between the patches, context below
>>>>
>>>> ether_addr *mac_addr)
>>>>   	/* Signal the NIC about the change */
>>>>   	update = NFP_NET_CFG_UPDATE_MACADDR;
>>>>  -	ctrl = hw->ctrl | NFP_NET_CFG_CTRL_LIVE_ADDR;
>>>>
>>>>  ^ '-' is part of both patches that removes this LOC
>>>> ^ no diff between the patches
>>>>
>>>>
>>>> Thanks for checking the patch and raising this. We can think about how
>>>> to make it clearer - perhaps the diff would be better without any context.
>>>>
>>>> Kevin.
>>>>
>>>>> For clarity this is what I tried, perhaps incorrectly, please let me know:
>>>>> 1) generate patch from dpdk upstream commit:
>>>>>     dpdk⟫ git format-patch -o /tmp/ -n -1 027412f
>>>>> 2) import it into stable
>>>>>     dpdk-stable⟫ git am /tmp/0001-net-nfp-fix-setting-MAC-address.patch
>>>>> 3) generate patch of just imported one:
>>>>>     dpdk-stable⟫ git format-patch -o /tmp/stable/ -n -1 HEAD
>>>>> 4) diff the checking there are only rebase related changes:
>>>>>
>>>>> dpdk-stable⟫ diff /tmp/0001-net-nfp-fix-setting-MAC-address.patch /tmp/stable/0001-net-nfp-fix-setting-MAC-address.patch
>>>>> 1c1
>>>>> < From 027412fe949c763fd4d536b13dcb4432f2df5534 Mon Sep 17 00:00:00 2001
>>>>> ---
>>>>>> From 3e5c4cd12ff01df228124d92905e4e7d563b652e Mon Sep 17 00:00:00 2001
>>>>> 30c30
>>>>> < index a791e95..1b7b6c2 100644
>>>>> ---
>>>>>> index 54c6da9..278e154 100644
>>>>> 33c33
>>>>> < @@ -575,7 +575,10 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
>>>>> ---
>>>>>> @@ -566,7 +566,10 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
>>>>> Thanks,
>>>>>
>>>>> Pablo
>>>>>
>>>>> On 16/04/2019 15:36, Kevin Traynor wrote:
>>>>>> Hi,
>>>>>>
>>>>>> FYI, your patch has been queued to LTS release 18.11.2
>>>>>>
>>>>>> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
>>>>>> It will be pushed if I get no objections before 04/24/19. So please
>>>>>> shout if anyone has objections.
>>>>>>
>>>>>> Also note that after the patch there's a diff of the upstream commit vs the
>>>>>> patch applied to the branch. This will indicate if there was any rebasing
>>>>>> needed to apply to the stable branch. If there were code changes for rebasing
>>>>>> (ie: not only metadata diffs), please double check that the rebase was
>>>>>> correctly done.
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>> Kevin Traynor
>>>>>>
>>>>>> ---
>>>>>> From 8fb7943ea804d437fc5b7153d7c073c79eeb3837 Mon Sep 17 00:00:00 2001
>>>>>> From: =?UTF-8?q?Pablo=20Casc=C3=B3n?= <pablo.cascon@netronome.com>
>>>>>> Date: Fri, 8 Mar 2019 15:40:47 +0000
>>>>>> Subject: [PATCH] net/nfp: fix setting MAC address
>>>>>> MIME-Version: 1.0
>>>>>> Content-Type: text/plain; charset=UTF-8
>>>>>> Content-Transfer-Encoding: 8bit
>>>>>>
>>>>>> [ upstream commit 027412fe949c763fd4d536b13dcb4432f2df5534 ]
>>>>>>
>>>>>> Some firmwares, mostly for VFs, do not advertise the feature /
>>>>>> capability of changing the MAC address while the interface is up. With
>>>>>> such firmware a request to change the MAC address that at the same
>>>>>> time also tries to enable the not available feature will be denied by
>>>>>> the firmware resulting in an error message like:
>>>>>>
>>>>>> nfp_net_reconfig(): Error nfp_net reconfig for ctrl: 80000000 update: 800
>>>>>>
>>>>>> Fix set_mac_addr by not trying to enable a feature if it is not
>>>>>> advertised by the firmware.
>>>>>>
>>>>>> Fixes: 2fe669f4bcd2 ("net/nfp: support MAC address change")
>>>>>>
>>>>>> Signed-off-by: Pablo Cascón <pablo.cascon@netronome.com>
>>>>>> Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
>>>>>> ---
>>>>>>  drivers/net/nfp/nfp_net.c | 5 ++++-
>>>>>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
>>>>>> index 54c6da924..278e154cd 100644
>>>>>> --- a/drivers/net/nfp/nfp_net.c
>>>>>> +++ b/drivers/net/nfp/nfp_net.c
>>>>>> @@ -567,5 +567,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
>>>>>>  	/* Signal the NIC about the change */
>>>>>>  	update = NFP_NET_CFG_UPDATE_MACADDR;
>>>>>> -	ctrl = hw->ctrl | NFP_NET_CFG_CTRL_LIVE_ADDR;
>>>>>> +	ctrl = hw->ctrl;
>>>>>> +	if ((hw->ctrl & NFP_NET_CFG_CTRL_ENABLE) &&
>>>>>> +	    (hw->cap & NFP_NET_CFG_CTRL_LIVE_ADDR))
>>>>>> +		ctrl |= NFP_NET_CFG_CTRL_LIVE_ADDR;
>>>>>>  	if (nfp_net_reconfig(hw, ctrl, update) < 0) {
>>>>>>  		PMD_INIT_LOG(INFO, "MAC address update failed");
> 


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

* Re: [dpdk-stable] patch 'net/nfp: fix setting MAC address' has been queued to LTS release 18.11.2
  2019-04-26  9:32             ` Kevin Traynor
@ 2019-04-26 10:00               ` Pablo Cascón
  0 siblings, 0 replies; 69+ messages in thread
From: Pablo Cascón @ 2019-04-26 10:00 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: Alejandro Lucero, dpdk stable

On 26/04/2019 10:32, Kevin Traynor wrote:
> On 26/04/2019 10:26, Pablo Cascón wrote:
>> On 25/04/2019 17:02, Kevin Traynor wrote:
>>> On 23/04/2019 14:35, Pablo Cascón wrote:
>>>> Thank you very much for walking me through it, it's crystal clear now :)  Please push the changes, at least no objection from me.
>>>>
>>>> (Also got the extra tip from a colleague to use Thunderbird's extension Colored Diffs where the tiny extra space that differentiates a context from the actual change is a lot more visible. Wish I had good feedback to contribute, can only think of: a) educating those struggling (thx!) b) no diff context (any downside?) and c) also sharing the stable patch?)
>>>>
>>> For the latest batch of patches I reduced the patch to patch diff
>>> context to zero, so every line in the diff is an actual change, either
>>> metadata or code. The downside of no context is it can be hard to
>>> understand the changes, so I also pushed the queued patches to github.
>>>
>>> I think now it can be quicker to see if there is any code changes and
>>> the code can be viewed in full context if needed.
>>>
>>> Kevin.
>> That sounds like a good idea, thanks for adapting. Can't find the github for this though, just out of curiosity would you mind sharing the link?
>>
> Sure - it's here https://github.com/kevintraynor/dpdk-stable-queue.git

That's perfect, thanks!
>
>>>> Pablo
>>>>
>>>> On 23/04/2019 14:03, Kevin Traynor wrote:
>>>>> On 23/04/2019 11:24, Pablo Cascón wrote:
>>>>>> Hi,
>>>>>>
>>>>> Hi Pablo,
>>>>>
>>>>>> thanks for the reply and explaining the process.
>>>>>>
>>>>>> Unfortunately the diff at the end of your commit doesn't match what I was expecting. Have tried to generate it here and could only get changes related to the rebase (metada diffs) but no code changes. And your diff seems to imply code changes, not 100% sure. Could you double check the stable patch and diff please. Happy to send a patch of what I would like to land into stable
>>>>>>
>>>>> I checked and the change is the same in stable as master, so it looks ok.
>>>>>
>>>>> I think I know what's causing the confusion. The diff is a diff of the
>>>>> *patches*, not the code. Both patches have +/- LOC in them and one is
>>>>> being brought into context by a metadata change between the patches.
>>>>> There is a difference in the indent of the +/-'s of the patches
>>>>> themselves vs the diff between the patches but it's hard to distinguish.
>>>>> See below:
>>>>>
>>>>> -@@ -576,5 +576,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct
>>>>> ether_addr *mac_addr)
>>>>> +@@ -567,5 +567,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct
>>>>>
>>>>> ^ '+' and '-' is a metadata diff between the patches, context below
>>>>>
>>>>> ether_addr *mac_addr)
>>>>>   	/* Signal the NIC about the change */
>>>>>   	update = NFP_NET_CFG_UPDATE_MACADDR;
>>>>>  -	ctrl = hw->ctrl | NFP_NET_CFG_CTRL_LIVE_ADDR;
>>>>>
>>>>>  ^ '-' is part of both patches that removes this LOC
>>>>> ^ no diff between the patches
>>>>>
>>>>>
>>>>> Thanks for checking the patch and raising this. We can think about how
>>>>> to make it clearer - perhaps the diff would be better without any context.
>>>>>
>>>>> Kevin.
>>>>>
>>>>>> For clarity this is what I tried, perhaps incorrectly, please let me know:
>>>>>> 1) generate patch from dpdk upstream commit:
>>>>>>     dpdk⟫ git format-patch -o /tmp/ -n -1 027412f
>>>>>> 2) import it into stable
>>>>>>     dpdk-stable⟫ git am /tmp/0001-net-nfp-fix-setting-MAC-address.patch
>>>>>> 3) generate patch of just imported one:
>>>>>>     dpdk-stable⟫ git format-patch -o /tmp/stable/ -n -1 HEAD
>>>>>> 4) diff the checking there are only rebase related changes:
>>>>>>
>>>>>> dpdk-stable⟫ diff /tmp/0001-net-nfp-fix-setting-MAC-address.patch /tmp/stable/0001-net-nfp-fix-setting-MAC-address.patch
>>>>>> 1c1
>>>>>> < From 027412fe949c763fd4d536b13dcb4432f2df5534 Mon Sep 17 00:00:00 2001
>>>>>> ---
>>>>>>> From 3e5c4cd12ff01df228124d92905e4e7d563b652e Mon Sep 17 00:00:00 2001
>>>>>> 30c30
>>>>>> < index a791e95..1b7b6c2 100644
>>>>>> ---
>>>>>>> index 54c6da9..278e154 100644
>>>>>> 33c33
>>>>>> < @@ -575,7 +575,10 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
>>>>>> ---
>>>>>>> @@ -566,7 +566,10 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
>>>>>> Thanks,
>>>>>>
>>>>>> Pablo
>>>>>>
>>>>>> On 16/04/2019 15:36, Kevin Traynor wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> FYI, your patch has been queued to LTS release 18.11.2
>>>>>>>
>>>>>>> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
>>>>>>> It will be pushed if I get no objections before 04/24/19. So please
>>>>>>> shout if anyone has objections.
>>>>>>>
>>>>>>> Also note that after the patch there's a diff of the upstream commit vs the
>>>>>>> patch applied to the branch. This will indicate if there was any rebasing
>>>>>>> needed to apply to the stable branch. If there were code changes for rebasing
>>>>>>> (ie: not only metadata diffs), please double check that the rebase was
>>>>>>> correctly done.
>>>>>>>
>>>>>>> Thanks.
>>>>>>>
>>>>>>> Kevin Traynor
>>>>>>>
>>>>>>> ---
>>>>>>> From 8fb7943ea804d437fc5b7153d7c073c79eeb3837 Mon Sep 17 00:00:00 2001
>>>>>>> From: =?UTF-8?q?Pablo=20Casc=C3=B3n?= <pablo.cascon@netronome.com>
>>>>>>> Date: Fri, 8 Mar 2019 15:40:47 +0000
>>>>>>> Subject: [PATCH] net/nfp: fix setting MAC address
>>>>>>> MIME-Version: 1.0
>>>>>>> Content-Type: text/plain; charset=UTF-8
>>>>>>> Content-Transfer-Encoding: 8bit
>>>>>>>
>>>>>>> [ upstream commit 027412fe949c763fd4d536b13dcb4432f2df5534 ]
>>>>>>>
>>>>>>> Some firmwares, mostly for VFs, do not advertise the feature /
>>>>>>> capability of changing the MAC address while the interface is up. With
>>>>>>> such firmware a request to change the MAC address that at the same
>>>>>>> time also tries to enable the not available feature will be denied by
>>>>>>> the firmware resulting in an error message like:
>>>>>>>
>>>>>>> nfp_net_reconfig(): Error nfp_net reconfig for ctrl: 80000000 update: 800
>>>>>>>
>>>>>>> Fix set_mac_addr by not trying to enable a feature if it is not
>>>>>>> advertised by the firmware.
>>>>>>>
>>>>>>> Fixes: 2fe669f4bcd2 ("net/nfp: support MAC address change")
>>>>>>>
>>>>>>> Signed-off-by: Pablo Cascón <pablo.cascon@netronome.com>
>>>>>>> Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
>>>>>>> ---
>>>>>>>  drivers/net/nfp/nfp_net.c | 5 ++++-
>>>>>>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>>>>>>
>>>>>>> diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
>>>>>>> index 54c6da924..278e154cd 100644
>>>>>>> --- a/drivers/net/nfp/nfp_net.c
>>>>>>> +++ b/drivers/net/nfp/nfp_net.c
>>>>>>> @@ -567,5 +567,8 @@ nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
>>>>>>>  	/* Signal the NIC about the change */
>>>>>>>  	update = NFP_NET_CFG_UPDATE_MACADDR;
>>>>>>> -	ctrl = hw->ctrl | NFP_NET_CFG_CTRL_LIVE_ADDR;
>>>>>>> +	ctrl = hw->ctrl;
>>>>>>> +	if ((hw->ctrl & NFP_NET_CFG_CTRL_ENABLE) &&
>>>>>>> +	    (hw->cap & NFP_NET_CFG_CTRL_LIVE_ADDR))
>>>>>>> +		ctrl |= NFP_NET_CFG_CTRL_LIVE_ADDR;
>>>>>>>  	if (nfp_net_reconfig(hw, ctrl, update) < 0) {
>>>>>>>  		PMD_INIT_LOG(INFO, "MAC address update failed");


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

end of thread, other threads:[~2019-04-26 10:00 UTC | newest]

Thread overview: 69+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-16 14:36 [dpdk-stable] patch 'eal: support strlcat function' has been queued to LTS release 18.11.2 Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'common/cpt: fix null auth only' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'crypto/openssl: fix big numbers after computations' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'crypto/openssl: fix modexp' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'test/crypto: fix duplicate id used by CCP device' " Kevin Traynor
2019-04-17  6:55   ` [dpdk-stable] [EXT] " Hemant Agrawal
2019-04-16 14:36 ` [dpdk-stable] patch 'event/opdl: replace sprintf with snprintf' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/nfp: fix setting MAC address' " Kevin Traynor
2019-04-23 10:24   ` Pablo Cascón
2019-04-23 13:03     ` Kevin Traynor
2019-04-23 13:35       ` Pablo Cascón
2019-04-25 16:02         ` Kevin Traynor
2019-04-26  9:26           ` Pablo Cascón
2019-04-26  9:32             ` Kevin Traynor
2019-04-26 10:00               ` Pablo Cascón
2019-04-16 14:36 ` [dpdk-stable] patch 'net/i40e: fix time sync for 25G' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/qede: support IOVA VA mode' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/mlx5: fix packet inline on Tx queue wraparound' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/bnxt: silence IOVA warnings' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/bnxt: suppress spurious error log' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/nfp: fix RSS query' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/ixgbe: restore VLAN filter for VF' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'app/testpmd: remove unused field from port struct' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'app/testpmd: fix a typo in log message' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'ethdev: fix method name in doxygen comment' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/qede: fix Rx packet drop' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix negative error codes' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: remove unused variable' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: remove extra checks for error codes' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix buffer overflow' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix EEPROM get for small and uneven lengths' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix link configuration' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix missing VLAN filter offload' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/atlantic: fix xstats return' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/enic: fix max MTU calculation' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/octeontx: fix vdev name' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'vhost: prevent disabled rings to be processed with zero-copy' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/virtio-user: fix multiqueue with vhost kernel' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'vhost: fix interrupt suppression for the split ring' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/virtio: add barrier in interrupt enable' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'app/testpmd: fix stdout flush after printing stats' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/nfp: fix possible buffer overflow' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/tap: fix getting max iovec' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/sfc: fix speed capabilities reported in device info' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/bonding: fix LACP negotiation' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/cxgbe: fix missing checksum flags and packet type' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'doc: fix examples in bonding guide' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/bonding: fix port id types' " Kevin Traynor
2019-04-16 14:36 ` [dpdk-stable] patch 'net/bonding: fix slave " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'net/bonding: fix packet count type for LACP' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'net/bonding: fix queue index types' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'drivers/net: fix possible overflow using strlcat' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'compress/qat: fix setup inter buffers' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix AES-CTR block size' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix debug logs' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'cryptodev: fix driver name comparison' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'test/crypto: fix possible overflow using strlcat' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'build: remove meson warning for Arm' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'doc: update cross Arm toolchain in Linux guide' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'acl: fix compiler flags with meson and AVX2 runtime' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'malloc: fix documentation of realloc function' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'eal/linux: fix log levels for pagemap reading failure' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'ring: enforce reading tail before slots' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'test/spinlock: remove delay for correct benchmarking' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'test/spinlock: amortize the cost of getting time' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'spinlock: reimplement with atomic one-way barrier' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'rwlock: reimplement with atomic builtins' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'eal/ppc: fix global memory barrier' " Kevin Traynor
2019-04-16 14:37 ` [dpdk-stable] patch 'vfio: document multiprocess limitation for container API' " Kevin Traynor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).