patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1
@ 2018-11-21 16:03 Kevin Traynor
  2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: fix invalid order of memset arguments' " Kevin Traynor
                   ` (48 more replies)
  0 siblings, 49 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:03 UTC (permalink / raw)
  To: Martin Harvey; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From a2c927689e13c0a03cce406648d8be238d0b9806 Mon Sep 17 00:00:00 2001
From: Martin Harvey <mharvey@solarflare.com>
Date: Mon, 10 Sep 2018 10:33:00 +0100
Subject: [PATCH] net/sfc/base: fix PreFAST warnings because of unused return

[ upstream commit f394c63d2d33449443a42e86da826c38e98d59b3 ]

Fixes: 19b64c6ac35f ("net/sfc/base: import libefx base")
Fixes: d96a34d165b1 ("net/sfc/base: import NVRAM support")
Fixes: e7cd430c864f ("net/sfc/base: import SFN7xxx family support")

Signed-off-by: Martin Harvey <mharvey@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/ef10_filter.c | 47 ++++++++++++++++++++++++------
 drivers/net/sfc/base/ef10_mac.c    |  2 +-
 drivers/net/sfc/base/ef10_nic.c    |  4 +--
 drivers/net/sfc/base/ef10_nvram.c  |  4 +--
 drivers/net/sfc/base/ef10_tx.c     |  8 +++--
 drivers/net/sfc/base/efx_port.c    |  2 +-
 6 files changed, 49 insertions(+), 18 deletions(-)

diff --git a/drivers/net/sfc/base/ef10_filter.c b/drivers/net/sfc/base/ef10_filter.c
index ae872853d..a4d97f99c 100644
--- a/drivers/net/sfc/base/ef10_filter.c
+++ b/drivers/net/sfc/base/ef10_filter.c
@@ -1145,10 +1145,13 @@ ef10_filter_insert_unicast(
 	    filter_flags,
 	    eftp->eft_default_rxq);
-	efx_filter_spec_set_eth_local(&spec, EFX_FILTER_SPEC_VID_UNSPEC, addr);
+	rc = efx_filter_spec_set_eth_local(&spec, EFX_FILTER_SPEC_VID_UNSPEC,
+	    addr);
+	if (rc != 0)
+		goto fail1;
 
 	rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
 	    &eftp->eft_unicst_filter_indexes[eftp->eft_unicst_filter_count]);
 	if (rc != 0)
-		goto fail1;
+		goto fail2;
 
 	eftp->eft_unicst_filter_count++;
@@ -1158,4 +1161,6 @@ ef10_filter_insert_unicast(
 	return (0);
 
+fail2:
+	EFSYS_PROBE(fail2);
 fail1:
 	EFSYS_PROBE1(fail1, efx_rc_t, rc);
@@ -1176,9 +1181,11 @@ ef10_filter_insert_all_unicast(
 	    filter_flags,
 	    eftp->eft_default_rxq);
-	efx_filter_spec_set_uc_def(&spec);
+	rc = efx_filter_spec_set_uc_def(&spec);
+	if (rc != 0)
+		goto fail1;
 	rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
 	    &eftp->eft_unicst_filter_indexes[eftp->eft_unicst_filter_count]);
 	if (rc != 0)
-		goto fail1;
+		goto fail2;
 
 	eftp->eft_unicst_filter_count++;
@@ -1188,4 +1195,6 @@ ef10_filter_insert_all_unicast(
 	return (0);
 
+fail2:
+	EFSYS_PROBE(fail2);
 fail1:
 	EFSYS_PROBE1(fail1, efx_rc_t, rc);
@@ -1229,7 +1238,19 @@ ef10_filter_insert_multicast_list(
 		    eftp->eft_default_rxq);
 
-		efx_filter_spec_set_eth_local(&spec,
+		rc = efx_filter_spec_set_eth_local(&spec,
 		    EFX_FILTER_SPEC_VID_UNSPEC,
 		    &addrs[i * EFX_MAC_ADDR_LEN]);
+		if (rc != 0) {
+			if (rollback == B_TRUE) {
+				/* Only stop upon failure if told to rollback */
+				goto rollback;
+			} else {
+				/*
+				 * Don't try to add a filter with a corrupt
+				 * specification.
+				 */
+				continue;
+			}
+		}
 
 		rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
@@ -1254,6 +1275,10 @@ ef10_filter_insert_multicast_list(
 
 		EFX_MAC_BROADCAST_ADDR_SET(addr);
-		efx_filter_spec_set_eth_local(&spec, EFX_FILTER_SPEC_VID_UNSPEC,
-		    addr);
+		rc = efx_filter_spec_set_eth_local(&spec,
+		    EFX_FILTER_SPEC_VID_UNSPEC, addr);
+		if ((rc != 0) && (rollback == B_TRUE)) {
+			/* Only stop upon failure if told to rollback */
+			goto rollback;
+		}
 
 		rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
@@ -1303,10 +1328,12 @@ ef10_filter_insert_all_multicast(
 	    filter_flags,
 	    eftp->eft_default_rxq);
-	efx_filter_spec_set_mc_def(&spec);
+	rc = efx_filter_spec_set_mc_def(&spec);
+	if (rc != 0)
+		goto fail1;
 
 	rc = ef10_filter_add_internal(enp, &spec, B_TRUE,
 	    &eftp->eft_mulcst_filter_indexes[0]);
 	if (rc != 0)
-		goto fail1;
+		goto fail2;
 
 	eftp->eft_mulcst_filter_count = 1;
@@ -1319,4 +1346,6 @@ ef10_filter_insert_all_multicast(
 	return (0);
 
+fail2:
+	EFSYS_PROBE(fail2);
 fail1:
 	EFSYS_PROBE1(fail1, efx_rc_t, rc);
diff --git a/drivers/net/sfc/base/ef10_mac.c b/drivers/net/sfc/base/ef10_mac.c
index 1031e8369..c14010732 100644
--- a/drivers/net/sfc/base/ef10_mac.c
+++ b/drivers/net/sfc/base/ef10_mac.c
@@ -413,5 +413,5 @@ ef10_mac_filter_default_rxq_clear(
 	ef10_filter_default_rxq_clear(enp);
 
-	efx_filter_reconfigure(enp, epp->ep_mac_addr,
+	(void) efx_filter_reconfigure(enp, epp->ep_mac_addr,
 				    epp->ep_all_unicst, epp->ep_mulcst,
 				    epp->ep_all_mulcst, epp->ep_brdcst,
diff --git a/drivers/net/sfc/base/ef10_nic.c b/drivers/net/sfc/base/ef10_nic.c
index 7dbf843bf..d1985b3c5 100644
--- a/drivers/net/sfc/base/ef10_nic.c
+++ b/drivers/net/sfc/base/ef10_nic.c
@@ -807,5 +807,5 @@ fail1:
 		handlep = &enp->en_arch.ef10.ena_piobuf_handle[i];
 
-		efx_mcdi_free_piobuf(enp, *handlep);
+		(void) efx_mcdi_free_piobuf(enp, *handlep);
 		*handlep = EFX_PIOBUF_HANDLE_INVALID;
 	}
@@ -824,5 +824,5 @@ ef10_nic_free_piobufs(
 		handlep = &enp->en_arch.ef10.ena_piobuf_handle[i];
 
-		efx_mcdi_free_piobuf(enp, *handlep);
+		(void) efx_mcdi_free_piobuf(enp, *handlep);
 		*handlep = EFX_PIOBUF_HANDLE_INVALID;
 	}
diff --git a/drivers/net/sfc/base/ef10_nvram.c b/drivers/net/sfc/base/ef10_nvram.c
index 2883ec8f4..0d885ccdf 100644
--- a/drivers/net/sfc/base/ef10_nvram.c
+++ b/drivers/net/sfc/base/ef10_nvram.c
@@ -1809,5 +1809,5 @@ ef10_nvram_partn_write_segment_tlv(
 
 	/* Unlock the partition */
-	ef10_nvram_partn_unlock(enp, partn, NULL);
+	(void) ef10_nvram_partn_unlock(enp, partn, NULL);
 
 	EFSYS_KMEM_FREE(enp->en_esip, partn_size, partn_data);
@@ -1824,5 +1824,5 @@ fail4:
 	EFSYS_PROBE(fail4);
 
-	ef10_nvram_partn_unlock(enp, partn, NULL);
+	(void) ef10_nvram_partn_unlock(enp, partn, NULL);
 fail3:
 	EFSYS_PROBE(fail3);
diff --git a/drivers/net/sfc/base/ef10_tx.c b/drivers/net/sfc/base/ef10_tx.c
index 7d27f7100..b92cadcbf 100644
--- a/drivers/net/sfc/base/ef10_tx.c
+++ b/drivers/net/sfc/base/ef10_tx.c
@@ -279,5 +279,5 @@ ef10_tx_qpio_enable(
 fail3:
 	EFSYS_PROBE(fail3);
-	ef10_nic_pio_free(enp, etp->et_pio_bufnum, etp->et_pio_blknum);
+	(void) ef10_nic_pio_free(enp, etp->et_pio_bufnum, etp->et_pio_blknum);
 fail2:
 	EFSYS_PROBE(fail2);
@@ -297,8 +297,10 @@ ef10_tx_qpio_disable(
 	if (etp->et_pio_size != 0) {
 		/* Unlink the piobuf from this TXQ */
-		ef10_nic_pio_unlink(enp, etp->et_index);
+		if (ef10_nic_pio_unlink(enp, etp->et_index) != 0)
+			return;
 
 		/* Free the sub-allocated PIO block */
-		ef10_nic_pio_free(enp, etp->et_pio_bufnum, etp->et_pio_blknum);
+		(void) ef10_nic_pio_free(enp, etp->et_pio_bufnum,
+		    etp->et_pio_blknum);
 		etp->et_pio_size = 0;
 		etp->et_pio_write_offset = 0;
diff --git a/drivers/net/sfc/base/efx_port.c b/drivers/net/sfc/base/efx_port.c
index 33a1a0843..5fff932be 100644
--- a/drivers/net/sfc/base/efx_port.c
+++ b/drivers/net/sfc/base/efx_port.c
@@ -38,5 +38,5 @@ efx_port_init(
 
 	/* Pick up current phy capababilities */
-	efx_port_poll(enp, NULL);
+	(void) efx_port_poll(enp, NULL);
 
 	/*
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:13.648082084 +0000
+++ 0001-net-sfc-base-fix-PreFAST-warnings-because-of-unused-.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,12 +1,13 @@
-From f394c63d2d33449443a42e86da826c38e98d59b3 Mon Sep 17 00:00:00 2001
+From a2c927689e13c0a03cce406648d8be238d0b9806 Mon Sep 17 00:00:00 2001
 From: Martin Harvey <mharvey@solarflare.com>
 Date: Mon, 10 Sep 2018 10:33:00 +0100
 Subject: [PATCH] net/sfc/base: fix PreFAST warnings because of unused return
 
+[ upstream commit f394c63d2d33449443a42e86da826c38e98d59b3 ]
+
 Fixes: 19b64c6ac35f ("net/sfc/base: import libefx base")
 Fixes: d96a34d165b1 ("net/sfc/base: import NVRAM support")
 Fixes: e7cd430c864f ("net/sfc/base: import SFN7xxx family support")
-Cc: stable@dpdk.org
 
 Signed-off-by: Martin Harvey <mharvey@solarflare.com>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

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

* [dpdk-stable] patch 'net/sfc/base: fix invalid order of memset arguments' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
@ 2018-11-21 16:03 ` Kevin Traynor
  2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: fix output buffer SAL annotation' " Kevin Traynor
                   ` (47 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:03 UTC (permalink / raw)
  To: Martin Harvey; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 1c8adca23bf84e9312cfe74d25017090bd3293d0 Mon Sep 17 00:00:00 2001
From: Martin Harvey <mharvey@solarflare.com>
Date: Mon, 10 Sep 2018 10:33:01 +0100
Subject: [PATCH] net/sfc/base: fix invalid order of memset arguments

[ upstream commit b1c25748ddf5dcec834eed4d1e97068ebe5e2409 ]

Found by PreFAST.

Fixes: 3f2f0189dd44 ("net/sfc/base: add signed image layout support")

Signed-off-by: Martin Harvey <mharvey@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/ef10_image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/base/ef10_image.c b/drivers/net/sfc/base/ef10_image.c
index 6fb7e4764..0d8898762 100644
--- a/drivers/net/sfc/base/ef10_image.c
+++ b/drivers/net/sfc/base/ef10_image.c
@@ -705,5 +705,5 @@ efx_build_signed_image_write_buffer(
 	 */
 	/* END CSTYLED */
-	memset(bufferp, buffer_size, 0xFF);
+	memset(bufferp, 0xFF, buffer_size);
 
 	EFX_STATIC_ASSERT(sizeof (chunk_hdr) == SIGNED_IMAGE_CHUNK_HDR_LEN);
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:13.676570117 +0000
+++ 0002-net-sfc-base-fix-invalid-order-of-memset-arguments.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,12 +1,13 @@
-From b1c25748ddf5dcec834eed4d1e97068ebe5e2409 Mon Sep 17 00:00:00 2001
+From 1c8adca23bf84e9312cfe74d25017090bd3293d0 Mon Sep 17 00:00:00 2001
 From: Martin Harvey <mharvey@solarflare.com>
 Date: Mon, 10 Sep 2018 10:33:01 +0100
 Subject: [PATCH] net/sfc/base: fix invalid order of memset arguments
 
+[ upstream commit b1c25748ddf5dcec834eed4d1e97068ebe5e2409 ]
+
 Found by PreFAST.
 
 Fixes: 3f2f0189dd44 ("net/sfc/base: add signed image layout support")
-Cc: stable@dpdk.org
 
 Signed-off-by: Martin Harvey <mharvey@solarflare.com>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

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

* [dpdk-stable] patch 'net/sfc/base: fix output buffer SAL annotation' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
  2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: fix invalid order of memset arguments' " Kevin Traynor
@ 2018-11-21 16:03 ` Kevin Traynor
  2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: fix SAL annotation for input buffers' " Kevin Traynor
                   ` (46 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:03 UTC (permalink / raw)
  To: Martin Harvey; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 5635e1b16181768ae30ffee0c6b8ed3aee200c42 Mon Sep 17 00:00:00 2001
From: Martin Harvey <mharvey@solarflare.com>
Date: Mon, 10 Sep 2018 10:33:02 +0100
Subject: [PATCH] net/sfc/base: fix output buffer SAL annotation

[ upstream commit a8fb089398ae5c7df554e3a72927cd202de30594 ]

Found by PreFAST warnings.

Fixes: 3f2f0189dd44 ("net/sfc/base: add signed image layout support")

Signed-off-by: Martin Harvey <mharvey@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/ef10_image.c | 3 ++-
 drivers/net/sfc/base/efx.h        | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/sfc/base/ef10_image.c b/drivers/net/sfc/base/ef10_image.c
index 0d8898762..c035e0df6 100644
--- a/drivers/net/sfc/base/ef10_image.c
+++ b/drivers/net/sfc/base/ef10_image.c
@@ -578,5 +578,6 @@ fail1:
 	__checkReturn	efx_rc_t
 efx_build_signed_image_write_buffer(
-	__out		uint8_t			*bufferp,
+	__out_bcount(buffer_size)
+			uint8_t			*bufferp,
 	__in		uint32_t		buffer_size,
 	__in		efx_image_info_t	*infop,
diff --git a/drivers/net/sfc/base/efx.h b/drivers/net/sfc/base/efx.h
index 5108b9b1f..53cbc9858 100644
--- a/drivers/net/sfc/base/efx.h
+++ b/drivers/net/sfc/base/efx.h
@@ -1690,5 +1690,6 @@ efx_check_reflash_image(
 extern	__checkReturn	efx_rc_t
 efx_build_signed_image_write_buffer(
-	__out		uint8_t			*bufferp,
+	__out_bcount(buffer_size)
+			uint8_t			*bufferp,
 	__in		uint32_t		buffer_size,
 	__in		efx_image_info_t	*infop,
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:13.701449853 +0000
+++ 0003-net-sfc-base-fix-output-buffer-SAL-annotation.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,12 +1,13 @@
-From a8fb089398ae5c7df554e3a72927cd202de30594 Mon Sep 17 00:00:00 2001
+From 5635e1b16181768ae30ffee0c6b8ed3aee200c42 Mon Sep 17 00:00:00 2001
 From: Martin Harvey <mharvey@solarflare.com>
 Date: Mon, 10 Sep 2018 10:33:02 +0100
 Subject: [PATCH] net/sfc/base: fix output buffer SAL annotation
 
+[ upstream commit a8fb089398ae5c7df554e3a72927cd202de30594 ]
+
 Found by PreFAST warnings.
 
 Fixes: 3f2f0189dd44 ("net/sfc/base: add signed image layout support")
-Cc: stable@dpdk.org
 
 Signed-off-by: Martin Harvey <mharvey@solarflare.com>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

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

* [dpdk-stable] patch 'net/sfc/base: fix SAL annotation for input buffers' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
  2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: fix invalid order of memset arguments' " Kevin Traynor
  2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: fix output buffer SAL annotation' " Kevin Traynor
@ 2018-11-21 16:03 ` Kevin Traynor
  2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: properly align on line continuation' " Kevin Traynor
                   ` (45 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:03 UTC (permalink / raw)
  To: Martin Harvey; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From f3cc1fb2fc757e9a1ff5e53552900ed6984cbd77 Mon Sep 17 00:00:00 2001
From: Martin Harvey <mharvey@solarflare.com>
Date: Mon, 10 Sep 2018 10:33:04 +0100
Subject: [PATCH] net/sfc/base: fix SAL annotation for input buffers

[ upstream commit d0e22de5bd4da4c28dafc4b09e9631b37d302b21 ]

Fixes: d96a34d165b1 ("net/sfc/base: import NVRAM support")

Signed-off-by: Martin Harvey <mharvey@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/ef10_impl.h  | 2 +-
 drivers/net/sfc/base/ef10_nvram.c | 2 +-
 drivers/net/sfc/base/efx_impl.h   | 2 +-
 drivers/net/sfc/base/efx_nvram.c  | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/sfc/base/ef10_impl.h b/drivers/net/sfc/base/ef10_impl.h
index 4751faf16..fb0d98875 100644
--- a/drivers/net/sfc/base/ef10_impl.h
+++ b/drivers/net/sfc/base/ef10_impl.h
@@ -454,5 +454,5 @@ ef10_nvram_partn_write(
 	__in			uint32_t partn,
 	__in			unsigned int offset,
-	__out_bcount(size)	caddr_t data,
+	__in_bcount(size)	caddr_t data,
 	__in			size_t size);
 
diff --git a/drivers/net/sfc/base/ef10_nvram.c b/drivers/net/sfc/base/ef10_nvram.c
index 0d885ccdf..46838dd75 100644
--- a/drivers/net/sfc/base/ef10_nvram.c
+++ b/drivers/net/sfc/base/ef10_nvram.c
@@ -2001,5 +2001,5 @@ ef10_nvram_partn_write(
 	__in			uint32_t partn,
 	__in			unsigned int offset,
-	__out_bcount(size)	caddr_t data,
+	__in_bcount(size)	caddr_t data,
 	__in			size_t size)
 {
diff --git a/drivers/net/sfc/base/efx_impl.h b/drivers/net/sfc/base/efx_impl.h
index 548834f90..637e31e0c 100644
--- a/drivers/net/sfc/base/efx_impl.h
+++ b/drivers/net/sfc/base/efx_impl.h
@@ -584,5 +584,5 @@ efx_mcdi_nvram_write(
 	__in			uint32_t partn,
 	__in			uint32_t offset,
-	__out_bcount(size)	caddr_t data,
+	__in_bcount(size)	caddr_t data,
 	__in			size_t size);
 
diff --git a/drivers/net/sfc/base/efx_nvram.c b/drivers/net/sfc/base/efx_nvram.c
index be409c3af..f3107bbb5 100644
--- a/drivers/net/sfc/base/efx_nvram.c
+++ b/drivers/net/sfc/base/efx_nvram.c
@@ -866,5 +866,5 @@ efx_mcdi_nvram_write(
 	__in			uint32_t partn,
 	__in			uint32_t offset,
-	__out_bcount(size)	caddr_t data,
+	__in_bcount(size)	caddr_t data,
 	__in			size_t size)
 {
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:13.731772278 +0000
+++ 0004-net-sfc-base-fix-SAL-annotation-for-input-buffers.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,10 +1,11 @@
-From d0e22de5bd4da4c28dafc4b09e9631b37d302b21 Mon Sep 17 00:00:00 2001
+From f3cc1fb2fc757e9a1ff5e53552900ed6984cbd77 Mon Sep 17 00:00:00 2001
 From: Martin Harvey <mharvey@solarflare.com>
 Date: Mon, 10 Sep 2018 10:33:04 +0100
 Subject: [PATCH] net/sfc/base: fix SAL annotation for input buffers
 
+[ upstream commit d0e22de5bd4da4c28dafc4b09e9631b37d302b21 ]
+
 Fixes: d96a34d165b1 ("net/sfc/base: import NVRAM support")
-Cc: stable@dpdk.org
 
 Signed-off-by: Martin Harvey <mharvey@solarflare.com>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

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

* [dpdk-stable] patch 'net/sfc/base: properly align on line continuation' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (2 preceding siblings ...)
  2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: fix SAL annotation for input buffers' " Kevin Traynor
@ 2018-11-21 16:03 ` Kevin Traynor
  2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: add space after sizeof' " Kevin Traynor
                   ` (44 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:03 UTC (permalink / raw)
  To: Andy Moreton; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From a3cc3f5aa30890c37318b22a13f4e9c31be1de45 Mon Sep 17 00:00:00 2001
From: Andy Moreton <amoreton@solarflare.com>
Date: Mon, 10 Sep 2018 10:33:05 +0100
Subject: [PATCH] net/sfc/base: properly align on line continuation

[ upstream commit 9d42b13e8c2bd325e7c9735830a2f65e3f14b41c ]

Fixes: 19b64c6ac35f ("net/sfc/base: import libefx base")

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/efx_nic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/base/efx_nic.c b/drivers/net/sfc/base/efx_nic.c
index 6c162e035..6314ae2ff 100644
--- a/drivers/net/sfc/base/efx_nic.c
+++ b/drivers/net/sfc/base/efx_nic.c
@@ -560,5 +560,5 @@ efx_nic_reset(
 	mod_flags = enp->en_mod_flags;
 	mod_flags &= ~(EFX_MOD_MCDI | EFX_MOD_PROBE | EFX_MOD_NVRAM |
-		    EFX_MOD_VPD | EFX_MOD_MON);
+	    EFX_MOD_VPD | EFX_MOD_MON);
 	EFSYS_ASSERT3U(mod_flags, ==, 0);
 	if (mod_flags != 0) {
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:13.758418387 +0000
+++ 0005-net-sfc-base-properly-align-on-line-continuation.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,10 +1,11 @@
-From 9d42b13e8c2bd325e7c9735830a2f65e3f14b41c Mon Sep 17 00:00:00 2001
+From a3cc3f5aa30890c37318b22a13f4e9c31be1de45 Mon Sep 17 00:00:00 2001
 From: Andy Moreton <amoreton@solarflare.com>
 Date: Mon, 10 Sep 2018 10:33:05 +0100
 Subject: [PATCH] net/sfc/base: properly align on line continuation
 
+[ upstream commit 9d42b13e8c2bd325e7c9735830a2f65e3f14b41c ]
+
 Fixes: 19b64c6ac35f ("net/sfc/base: import libefx base")
-Cc: stable@dpdk.org
 
 Signed-off-by: Andy Moreton <amoreton@solarflare.com>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

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

* [dpdk-stable] patch 'net/sfc/base: add space after sizeof' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (3 preceding siblings ...)
  2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: properly align on line continuation' " Kevin Traynor
@ 2018-11-21 16:03 ` Kevin Traynor
  2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: fix build because of no declaration' " Kevin Traynor
                   ` (43 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:03 UTC (permalink / raw)
  To: Andy Moreton; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 1be2bfc1b11891ef882891e135cf2b3d0ce6fc21 Mon Sep 17 00:00:00 2001
From: Andy Moreton <amoreton@solarflare.com>
Date: Mon, 10 Sep 2018 10:33:06 +0100
Subject: [PATCH] net/sfc/base: add space after sizeof

[ upstream commit f64f2a47f0512e7bd47606f5214a583fa9b4f79b ]

Required by GLD cstyle.

Fixes: d4f4b8f9d260 ("net/sfc/base: make RxQ type data an union")

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/efx_rx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/sfc/base/efx_rx.c b/drivers/net/sfc/base/efx_rx.c
index 4fd73bab3..09933b41a 100644
--- a/drivers/net/sfc/base/efx_rx.c
+++ b/drivers/net/sfc/base/efx_rx.c
@@ -832,5 +832,5 @@ efx_rx_qcreate_packed_stream(
 	efx_rxq_type_data_t type_data;
 
-	memset(&type_data, 0, sizeof(type_data));
+	memset(&type_data, 0, sizeof (type_data));
 
 	type_data.ertd_packed_stream.eps_buf_size = ps_buf_size;
@@ -868,5 +868,5 @@ efx_rx_qcreate_es_super_buffer(
 	}
 
-	memset(&type_data, 0, sizeof(type_data));
+	memset(&type_data, 0, sizeof (type_data));
 
 	type_data.ertd_es_super_buffer.eessb_bufs_per_desc = n_bufs_per_desc;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:13.780010046 +0000
+++ 0006-net-sfc-base-add-space-after-sizeof.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,12 +1,13 @@
-From f64f2a47f0512e7bd47606f5214a583fa9b4f79b Mon Sep 17 00:00:00 2001
+From 1be2bfc1b11891ef882891e135cf2b3d0ce6fc21 Mon Sep 17 00:00:00 2001
 From: Andy Moreton <amoreton@solarflare.com>
 Date: Mon, 10 Sep 2018 10:33:06 +0100
 Subject: [PATCH] net/sfc/base: add space after sizeof
 
+[ upstream commit f64f2a47f0512e7bd47606f5214a583fa9b4f79b ]
+
 Required by GLD cstyle.
 
 Fixes: d4f4b8f9d260 ("net/sfc/base: make RxQ type data an union")
-Cc: stable@dpdk.org
 
 Signed-off-by: Andy Moreton <amoreton@solarflare.com>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

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

* [dpdk-stable] patch 'net/sfc/base: fix build because of no declaration' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (4 preceding siblings ...)
  2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: add space after sizeof' " Kevin Traynor
@ 2018-11-21 16:03 ` Kevin Traynor
  2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: fix outer IPID field in TSO option descriptors' " Kevin Traynor
                   ` (42 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:03 UTC (permalink / raw)
  To: Andrew Rybchenko; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From b86a6354b6791a49aaaf515e6c42dae2d490e081 Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Mon, 10 Sep 2018 10:33:07 +0100
Subject: [PATCH] net/sfc/base: fix build because of no declaration

[ upstream commit 5d23ac47e940f78bf6d95e6e52d3e0b9c486b8dd ]

Functions declared in mcdi_mon.h are implemented in mcdi_mon.c.
The build fails if compiler options require declaration before definition.

Fixes: dfb3b1ce15f6 ("net/sfc/base: import monitors access via MCDI")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/mcdi_mon.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/sfc/base/mcdi_mon.c b/drivers/net/sfc/base/mcdi_mon.c
index 940bd0265..8c0b6f0d9 100644
--- a/drivers/net/sfc/base/mcdi_mon.c
+++ b/drivers/net/sfc/base/mcdi_mon.c
@@ -7,4 +7,5 @@
 #include "efx.h"
 #include "efx_impl.h"
+#include "mcdi_mon.h"
 
 #if EFSYS_OPT_MON_MCDI
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:13.804523845 +0000
+++ 0007-net-sfc-base-fix-build-because-of-no-declaration.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,13 +1,14 @@
-From 5d23ac47e940f78bf6d95e6e52d3e0b9c486b8dd Mon Sep 17 00:00:00 2001
+From b86a6354b6791a49aaaf515e6c42dae2d490e081 Mon Sep 17 00:00:00 2001
 From: Andrew Rybchenko <arybchenko@solarflare.com>
 Date: Mon, 10 Sep 2018 10:33:07 +0100
 Subject: [PATCH] net/sfc/base: fix build because of no declaration
 
+[ upstream commit 5d23ac47e940f78bf6d95e6e52d3e0b9c486b8dd ]
+
 Functions declared in mcdi_mon.h are implemented in mcdi_mon.c.
 The build fails if compiler options require declaration before definition.
 
 Fixes: dfb3b1ce15f6 ("net/sfc/base: import monitors access via MCDI")
-Cc: stable@dpdk.org
 
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
 ---

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

* [dpdk-stable] patch 'net/sfc/base: fix outer IPID field in TSO option descriptors' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (5 preceding siblings ...)
  2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: fix build because of no declaration' " Kevin Traynor
@ 2018-11-21 16:03 ` Kevin Traynor
  2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: add check for TUNNEL module in NIC reset API' " Kevin Traynor
                   ` (41 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:03 UTC (permalink / raw)
  To: Vijay Srivastava; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 4ae0929488de6bdd27eb5039c5376fc8b6a74c9b Mon Sep 17 00:00:00 2001
From: Vijay Srivastava <vijays@solarflare.com>
Date: Mon, 10 Sep 2018 10:33:09 +0100
Subject: [PATCH] net/sfc/base: fix outer IPID field in TSO option descriptors

[ upstream commit b5f238171d473e670d5f569a396caacf83eaef3a ]

Fixes: 912e603706c5 ("net/sfc/base: add outer IP ID parameter to TSOv2 descriptor")

Signed-off-by: Vijay Srivastava <vijays@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/ef10_tx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/sfc/base/ef10_tx.c b/drivers/net/sfc/base/ef10_tx.c
index b92cadcbf..e74d39540 100644
--- a/drivers/net/sfc/base/ef10_tx.c
+++ b/drivers/net/sfc/base/ef10_tx.c
@@ -640,5 +640,5 @@ ef10_tx_qdesc_tso2_create(
 	EFSYS_ASSERT(count >= EFX_TX_FATSOV2_OPT_NDESCS);
 
-	EFX_POPULATE_QWORD_6(edp[0].ed_eq,
+	EFX_POPULATE_QWORD_5(edp[0].ed_eq,
 			    ESF_DZ_TX_DESC_IS_OPT, 1,
 			    ESF_DZ_TX_OPTION_TYPE,
@@ -647,7 +647,6 @@ ef10_tx_qdesc_tso2_create(
 			    ESE_DZ_TX_TSO_OPTION_DESC_FATSO2A,
 			    ESF_DZ_TX_TSO_IP_ID, ipv4_id,
-			    ESF_DZ_TX_TSO_OUTER_IPID, outer_ipv4_id,
 			    ESF_DZ_TX_TSO_TCP_SEQNO, tcp_seq);
-	EFX_POPULATE_QWORD_4(edp[1].ed_eq,
+	EFX_POPULATE_QWORD_5(edp[1].ed_eq,
 			    ESF_DZ_TX_DESC_IS_OPT, 1,
 			    ESF_DZ_TX_OPTION_TYPE,
@@ -655,5 +654,6 @@ ef10_tx_qdesc_tso2_create(
 			    ESF_DZ_TX_TSO_OPTION_TYPE,
 			    ESE_DZ_TX_TSO_OPTION_DESC_FATSO2B,
-			    ESF_DZ_TX_TSO_TCP_MSS, tcp_mss);
+			    ESF_DZ_TX_TSO_TCP_MSS, tcp_mss,
+			    ESF_DZ_TX_TSO_OUTER_IPID, outer_ipv4_id);
 }
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:13.827281132 +0000
+++ 0008-net-sfc-base-fix-outer-IPID-field-in-TSO-option-desc.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,10 +1,11 @@
-From b5f238171d473e670d5f569a396caacf83eaef3a Mon Sep 17 00:00:00 2001
+From 4ae0929488de6bdd27eb5039c5376fc8b6a74c9b Mon Sep 17 00:00:00 2001
 From: Vijay Srivastava <vijays@solarflare.com>
 Date: Mon, 10 Sep 2018 10:33:09 +0100
 Subject: [PATCH] net/sfc/base: fix outer IPID field in TSO option descriptors
 
+[ upstream commit b5f238171d473e670d5f569a396caacf83eaef3a ]
+
 Fixes: 912e603706c5 ("net/sfc/base: add outer IP ID parameter to TSOv2 descriptor")
-Cc: stable@dpdk.org
 
 Signed-off-by: Vijay Srivastava <vijays@solarflare.com>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

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

* [dpdk-stable] patch 'net/sfc/base: add check for TUNNEL module in NIC reset API' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (6 preceding siblings ...)
  2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: fix outer IPID field in TSO option descriptors' " Kevin Traynor
@ 2018-11-21 16:03 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: check size of memory to read sensors data to' " Kevin Traynor
                   ` (40 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:03 UTC (permalink / raw)
  To: Vijay Srivastava; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From e3cf8013ae94a41d6ec9b0b60032dd651472844a Mon Sep 17 00:00:00 2001
From: Vijay Srivastava <vijays@solarflare.com>
Date: Mon, 10 Sep 2018 10:33:11 +0100
Subject: [PATCH] net/sfc/base: add check for TUNNEL module in NIC reset API

[ upstream commit f933b46a0a95dd3a7fd5d206a24649d847fffbb6 ]

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

Signed-off-by: Vijay Srivastava <vijays@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/efx_nic.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/sfc/base/efx_nic.c b/drivers/net/sfc/base/efx_nic.c
index 6314ae2ff..0e8ed9c2a 100644
--- a/drivers/net/sfc/base/efx_nic.c
+++ b/drivers/net/sfc/base/efx_nic.c
@@ -550,5 +550,5 @@ efx_nic_reset(
 	EFSYS_ASSERT(enp->en_mod_flags & EFX_MOD_PROBE);
 	/*
-	 * All modules except the MCDI, PROBE, NVRAM, VPD, MON
+	 * All modules except the MCDI, PROBE, NVRAM, VPD, MON, TUNNEL
 	 * (which we do not reset here) must have been shut down or never
 	 * initialized.
@@ -561,4 +561,7 @@ efx_nic_reset(
 	mod_flags &= ~(EFX_MOD_MCDI | EFX_MOD_PROBE | EFX_MOD_NVRAM |
 	    EFX_MOD_VPD | EFX_MOD_MON);
+#if EFSYS_OPT_TUNNEL
+	mod_flags &= ~EFX_MOD_TUNNEL;
+#endif /* EFSYS_OPT_TUNNEL */
 	EFSYS_ASSERT3U(mod_flags, ==, 0);
 	if (mod_flags != 0) {
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:13.850817242 +0000
+++ 0009-net-sfc-base-add-check-for-TUNNEL-module-in-NIC-rese.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,10 +1,11 @@
-From f933b46a0a95dd3a7fd5d206a24649d847fffbb6 Mon Sep 17 00:00:00 2001
+From e3cf8013ae94a41d6ec9b0b60032dd651472844a Mon Sep 17 00:00:00 2001
 From: Vijay Srivastava <vijays@solarflare.com>
 Date: Mon, 10 Sep 2018 10:33:11 +0100
 Subject: [PATCH] net/sfc/base: add check for TUNNEL module in NIC reset API
 
+[ upstream commit f933b46a0a95dd3a7fd5d206a24649d847fffbb6 ]
+
 Fixes: 17551f6dffcc ("net/sfc/base: add API to control UDP tunnel ports")
-Cc: stable@dpdk.org
 
 Signed-off-by: Vijay Srivastava <vijays@solarflare.com>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

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

* [dpdk-stable] patch 'net/sfc/base: check size of memory to read sensors data to' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (7 preceding siblings ...)
  2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: add check for TUNNEL module in NIC reset API' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: avoid usage of too big arrays on stack' " Kevin Traynor
                   ` (39 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Martin Harvey; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From c4bd00ae5301cdc60ca05cae7bcbe8f043795c13 Mon Sep 17 00:00:00 2001
From: Martin Harvey <mharvey@solarflare.com>
Date: Mon, 10 Sep 2018 10:33:15 +0100
Subject: [PATCH] net/sfc/base: check size of memory to read sensors data to

[ upstream commit 252faf84f41e6d726d3ab0f9b7544723756afcca ]

Size of provided memory should be consistent with specified size.

Fixes: dfb3b1ce15f6 ("net/sfc/base: import monitors access via MCDI")

Signed-off-by: Martin Harvey <mharvey@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/mcdi_mon.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/sfc/base/mcdi_mon.c b/drivers/net/sfc/base/mcdi_mon.c
index 8c0b6f0d9..54f7ae5db 100644
--- a/drivers/net/sfc/base/mcdi_mon.c
+++ b/drivers/net/sfc/base/mcdi_mon.c
@@ -302,4 +302,10 @@ efx_mcdi_read_sensors(
 			    MC_CMD_READ_SENSORS_EXT_OUT_LEN)];
 	uint32_t addr_lo, addr_hi;
+	efx_rc_t rc;
+
+	if (EFSYS_MEM_SIZE(esmp) < size) {
+		rc = EINVAL;
+		goto fail1;
+	}
 
 	req.emr_cmd = MC_CMD_READ_SENSORS;
@@ -319,4 +325,9 @@ efx_mcdi_read_sensors(
 
 	return (req.emr_rc);
+
+fail1:
+	EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+	return (rc);
 }
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:13.874564522 +0000
+++ 0010-net-sfc-base-check-size-of-memory-to-read-sensors-da.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,12 +1,13 @@
-From 252faf84f41e6d726d3ab0f9b7544723756afcca Mon Sep 17 00:00:00 2001
+From c4bd00ae5301cdc60ca05cae7bcbe8f043795c13 Mon Sep 17 00:00:00 2001
 From: Martin Harvey <mharvey@solarflare.com>
 Date: Mon, 10 Sep 2018 10:33:15 +0100
 Subject: [PATCH] net/sfc/base: check size of memory to read sensors data to
 
+[ upstream commit 252faf84f41e6d726d3ab0f9b7544723756afcca ]
+
 Size of provided memory should be consistent with specified size.
 
 Fixes: dfb3b1ce15f6 ("net/sfc/base: import monitors access via MCDI")
-Cc: stable@dpdk.org
 
 Signed-off-by: Martin Harvey <mharvey@solarflare.com>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -15,10 +16,10 @@
  1 file changed, 11 insertions(+)
 
 diff --git a/drivers/net/sfc/base/mcdi_mon.c b/drivers/net/sfc/base/mcdi_mon.c
-index 93e6b1e35..68bbc575d 100644
+index 8c0b6f0d9..54f7ae5db 100644
 --- a/drivers/net/sfc/base/mcdi_mon.c
 +++ b/drivers/net/sfc/base/mcdi_mon.c
-@@ -195,4 +195,10 @@ efx_mcdi_read_sensors(
+@@ -302,4 +302,10 @@ efx_mcdi_read_sensors(
  			    MC_CMD_READ_SENSORS_EXT_OUT_LEN)];
  	uint32_t addr_lo, addr_hi;
 +	efx_rc_t rc;
@@ -29,7 +30,7 @@
 +	}
  
  	req.emr_cmd = MC_CMD_READ_SENSORS;
-@@ -212,4 +218,9 @@ efx_mcdi_read_sensors(
+@@ -319,4 +325,9 @@ efx_mcdi_read_sensors(
  
  	return (req.emr_rc);
 +

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

* [dpdk-stable] patch 'net/sfc/base: avoid usage of too big arrays on stack' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (8 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: check size of memory to read sensors data to' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: fix out of bounds read when dereferencing sdup' " Kevin Traynor
                   ` (38 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Martin Harvey; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From af46826f4325915429d372d59d40e1258ddc9255 Mon Sep 17 00:00:00 2001
From: Martin Harvey <mharvey@solarflare.com>
Date: Mon, 10 Sep 2018 10:33:20 +0100
Subject: [PATCH] net/sfc/base: avoid usage of too big arrays on stack

[ upstream commit da8692388e7f2cc575b53b2cc76f72f459fd9ca5 ]

Found by PreFAST static analysis.

Fixes: 1dae25112a54 ("net/sfc/base: import built-in selftest")
Fixes: d96a34d165b1 ("net/sfc/base: import NVRAM support")

Signed-off-by: Martin Harvey <mharvey@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/ef10_phy.c  | 18 +++++++++++++++---
 drivers/net/sfc/base/efx_nvram.c | 27 ++++++++++++++++++---------
 2 files changed, 33 insertions(+), 12 deletions(-)

diff --git a/drivers/net/sfc/base/ef10_phy.c b/drivers/net/sfc/base/ef10_phy.c
index 84acb70a1..e9c7b40e4 100644
--- a/drivers/net/sfc/base/ef10_phy.c
+++ b/drivers/net/sfc/base/ef10_phy.c
@@ -584,12 +584,24 @@ ef10_bist_poll(
 	__in			size_t count)
 {
+	/*
+	 * MCDI_CTL_SDU_LEN_MAX_V1 is large enough cover all BIST results,
+	 * whilst not wasting stack.
+	 */
+	uint8_t payload[MAX(MC_CMD_POLL_BIST_IN_LEN, MCDI_CTL_SDU_LEN_MAX_V1)];
 	efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_POLL_BIST_IN_LEN,
-			    MCDI_CTL_SDU_LEN_MAX)];
 	uint32_t value_mask = 0;
 	uint32_t result;
 	efx_rc_t rc;
 
+	EFX_STATIC_ASSERT(MC_CMD_POLL_BIST_OUT_LEN <=
+	    MCDI_CTL_SDU_LEN_MAX_V1);
+	EFX_STATIC_ASSERT(MC_CMD_POLL_BIST_OUT_SFT9001_LEN <=
+	    MCDI_CTL_SDU_LEN_MAX_V1);
+	EFX_STATIC_ASSERT(MC_CMD_POLL_BIST_OUT_MRSFP_LEN <=
+	    MCDI_CTL_SDU_LEN_MAX_V1);
+	EFX_STATIC_ASSERT(MC_CMD_POLL_BIST_OUT_MEM_LEN <=
+	    MCDI_CTL_SDU_LEN_MAX_V1);
+
 	_NOTE(ARGUNUSED(type))
 
@@ -599,5 +611,5 @@ ef10_bist_poll(
 	req.emr_in_length = MC_CMD_POLL_BIST_IN_LEN;
 	req.emr_out_buf = payload;
-	req.emr_out_length = MCDI_CTL_SDU_LEN_MAX;
+	req.emr_out_length = MCDI_CTL_SDU_LEN_MAX_V1;
 
 	efx_mcdi_execute(enp, &req);
diff --git a/drivers/net/sfc/base/efx_nvram.c b/drivers/net/sfc/base/efx_nvram.c
index f3107bbb5..f9a6ee585 100644
--- a/drivers/net/sfc/base/efx_nvram.c
+++ b/drivers/net/sfc/base/efx_nvram.c
@@ -870,14 +870,12 @@ efx_mcdi_nvram_write(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MCDI_CTL_SDU_LEN_MAX_V1,
-			    MCDI_CTL_SDU_LEN_MAX_V2)];
+	uint8_t *payload;
 	efx_rc_t rc;
 	size_t max_data_size;
+	size_t payload_len = enp->en_nic_cfg.enc_mcdi_max_payload_length;
 
-	max_data_size = enp->en_nic_cfg.enc_mcdi_max_payload_length
-	    - MC_CMD_NVRAM_WRITE_IN_LEN(0);
-	EFSYS_ASSERT3U(enp->en_nic_cfg.enc_mcdi_max_payload_length, >, 0);
-	EFSYS_ASSERT3U(max_data_size, <,
-		    enp->en_nic_cfg.enc_mcdi_max_payload_length);
+	max_data_size = payload_len - MC_CMD_NVRAM_WRITE_IN_LEN(0);
+	EFSYS_ASSERT3U(payload_len, >, 0);
+	EFSYS_ASSERT3U(max_data_size, <, payload_len);
 
 	if (size > max_data_size) {
@@ -886,5 +884,11 @@ efx_mcdi_nvram_write(
 	}
 
-	(void) memset(payload, 0, sizeof (payload));
+	EFSYS_KMEM_ALLOC(enp->en_esip, payload_len, payload);
+	if (payload == NULL) {
+		rc = ENOMEM;
+		goto fail2;
+	}
+
+	(void) memset(payload, 0, payload_len);
 	req.emr_cmd = MC_CMD_NVRAM_WRITE;
 	req.emr_in_buf = payload;
@@ -904,9 +908,14 @@ efx_mcdi_nvram_write(
 	if (req.emr_rc != 0) {
 		rc = req.emr_rc;
-		goto fail2;
+		goto fail3;
 	}
 
+	EFSYS_KMEM_FREE(enp->en_esip, payload_len, payload);
+
 	return (0);
 
+fail3:
+	EFSYS_PROBE(fail3);
+	EFSYS_KMEM_FREE(enp->en_esip, payload_len, payload);
 fail2:
 	EFSYS_PROBE(fail2);
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:13.896090588 +0000
+++ 0011-net-sfc-base-avoid-usage-of-too-big-arrays-on-stack.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,13 +1,14 @@
-From da8692388e7f2cc575b53b2cc76f72f459fd9ca5 Mon Sep 17 00:00:00 2001
+From af46826f4325915429d372d59d40e1258ddc9255 Mon Sep 17 00:00:00 2001
 From: Martin Harvey <mharvey@solarflare.com>
 Date: Mon, 10 Sep 2018 10:33:20 +0100
 Subject: [PATCH] net/sfc/base: avoid usage of too big arrays on stack
 
+[ upstream commit da8692388e7f2cc575b53b2cc76f72f459fd9ca5 ]
+
 Found by PreFAST static analysis.
 
 Fixes: 1dae25112a54 ("net/sfc/base: import built-in selftest")
 Fixes: d96a34d165b1 ("net/sfc/base: import NVRAM support")
-Cc: stable@dpdk.org
 
 Signed-off-by: Martin Harvey <mharvey@solarflare.com>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -55,7 +56,7 @@
  
  	efx_mcdi_execute(enp, &req);
 diff --git a/drivers/net/sfc/base/efx_nvram.c b/drivers/net/sfc/base/efx_nvram.c
-index 9000fe886..d7b1a6778 100644
+index f3107bbb5..f9a6ee585 100644
 --- a/drivers/net/sfc/base/efx_nvram.c
 +++ b/drivers/net/sfc/base/efx_nvram.c
 @@ -870,14 +870,12 @@ efx_mcdi_nvram_write(

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

* [dpdk-stable] patch 'net/sfc/base: fix out of bounds read when dereferencing sdup' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (9 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: avoid usage of too big arrays on stack' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: fix ID retrieval in v3 licensing' " Kevin Traynor
                   ` (37 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Gautam Dawar; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 6c703736316d161efea833e2be9400f392d08acd Mon Sep 17 00:00:00 2001
From: Gautam Dawar <gdawar@solarflare.com>
Date: Mon, 10 Sep 2018 10:33:22 +0100
Subject: [PATCH] net/sfc/base: fix out of bounds read when dereferencing sdup

[ upstream commit ed42d18458cbdceb28f006fda9967141a7e79b92 ]

Introduce and use macro to make sure that MCDI buffers allocated
on stack are rounded up properly.

Fixes: 6f619653b9b1 ("net/sfc/base: import MCDI implementation")
Fixes: f7dc06bf35f2 ("net/sfc/base: import 5xxx/6xxx family support")
Fixes: e7cd430c864f ("net/sfc/base: import SFN7xxx family support")
Fixes: 1dae25112a54 ("net/sfc/base: import built-in selftest")
Fixes: 0a7864349106 ("net/sfc/base: import PHY statistics")
Fixes: 8c7c723dfe7c ("net/sfc/base: import MAC statistics")
Fixes: 5935cd8c47d3 ("net/sfc/base: import RSS support")
Fixes: 9ee64bd404fc ("net/sfc/base: import loopback control")
Fixes: dfb3b1ce15f6 ("net/sfc/base: import monitors access via MCDI")
Fixes: d96a34d165b1 ("net/sfc/base: import NVRAM support")
Fixes: 05fce2ce8451 ("net/sfc/base: import libefx licensing")
Fixes: ba6afee9a81e ("net/sfc/base: add advanced function to extract FW version")
Fixes: c7815c1d1f20 ("net/sfc/base: use proper MCDI command for encap filters")
Fixes: 17551f6dffcc ("net/sfc/base: add API to control UDP tunnel ports")
Fixes: eff9b666eae5 ("net/sfc/base: move RxDP config get to EF10 NIC code")
Fixes: 4aab7f07a645 ("net/sfc/base: refactor EF10 get datapath capabilities")
Fixes: 480a13044b8b ("net/sfc/base: support FW subvariant choice")
Fixes: 6f60cc4a78b6 ("net/sfc/base: support equal stride super-buffer Rx mode")
Fixes: 9a733758c046 ("net/sfc/base: support MARK and FLAG actions in filters")

Signed-off-by: Gautam Dawar <gdawar@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/ef10_ev.c     | 28 ++++-----
 drivers/net/sfc/base/ef10_filter.c | 15 ++---
 drivers/net/sfc/base/ef10_intr.c   |  5 +-
 drivers/net/sfc/base/ef10_mac.c    | 20 +++----
 drivers/net/sfc/base/ef10_nic.c    | 93 ++++++++++++------------------
 drivers/net/sfc/base/ef10_phy.c    | 19 +++---
 drivers/net/sfc/base/ef10_rx.c     | 35 +++++------
 drivers/net/sfc/base/ef10_tx.c     | 10 ++--
 drivers/net/sfc/base/efx_lic.c     | 39 +++++--------
 drivers/net/sfc/base/efx_mcdi.c    | 82 +++++++++++---------------
 drivers/net/sfc/base/efx_mcdi.h    | 11 ++++
 drivers/net/sfc/base/efx_nic.c     |  5 +-
 drivers/net/sfc/base/efx_nvram.c   | 40 +++++--------
 drivers/net/sfc/base/efx_tunnel.c  |  6 +-
 drivers/net/sfc/base/mcdi_mon.c    | 12 ++--
 drivers/net/sfc/base/siena_mac.c   |  9 ++-
 drivers/net/sfc/base/siena_nic.c   |  5 +-
 drivers/net/sfc/base/siena_nvram.c |  5 +-
 drivers/net/sfc/base/siena_phy.c   | 28 ++++-----
 19 files changed, 197 insertions(+), 270 deletions(-)

diff --git a/drivers/net/sfc/base/ef10_ev.c b/drivers/net/sfc/base/ef10_ev.c
index 7f89a7bf0..287550605 100644
--- a/drivers/net/sfc/base/ef10_ev.c
+++ b/drivers/net/sfc/base/ef10_ev.c
@@ -74,9 +74,8 @@ efx_mcdi_set_evq_tmr(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_SET_EVQ_TMR_IN_LEN,
-			    MC_CMD_SET_EVQ_TMR_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_SET_EVQ_TMR_IN_LEN,
+		MC_CMD_SET_EVQ_TMR_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_SET_EVQ_TMR;
 	req.emr_in_buf = payload;
@@ -124,7 +123,7 @@ efx_mcdi_init_evq(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[
-	    MAX(MC_CMD_INIT_EVQ_IN_LEN(EFX_EVQ_NBUFS(EFX_EVQ_MAXNEVS)),
-		MC_CMD_INIT_EVQ_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload,
+		MC_CMD_INIT_EVQ_IN_LEN(EFX_EVQ_NBUFS(EFX_EVQ_MAXNEVS)),
+		MC_CMD_INIT_EVQ_OUT_LEN);
 	efx_qword_t *dma_addr;
 	uint64_t addr;
@@ -141,5 +140,4 @@ efx_mcdi_init_evq(
 	}
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_INIT_EVQ;
 	req.emr_in_buf = payload;
@@ -261,7 +259,7 @@ efx_mcdi_init_evq_v2(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[
-		MAX(MC_CMD_INIT_EVQ_V2_IN_LEN(EFX_EVQ_NBUFS(EFX_EVQ_MAXNEVS)),
-		    MC_CMD_INIT_EVQ_V2_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload,
+		MC_CMD_INIT_EVQ_V2_IN_LEN(EFX_EVQ_NBUFS(EFX_EVQ_MAXNEVS)),
+		MC_CMD_INIT_EVQ_V2_OUT_LEN);
 	boolean_t interrupting;
 	unsigned int evq_type;
@@ -278,5 +276,4 @@ efx_mcdi_init_evq_v2(
 	}
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_INIT_EVQ;
 	req.emr_in_buf = payload;
@@ -385,9 +382,8 @@ efx_mcdi_fini_evq(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_FINI_EVQ_IN_LEN,
-			    MC_CMD_FINI_EVQ_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_FINI_EVQ_IN_LEN,
+		MC_CMD_FINI_EVQ_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_FINI_EVQ;
 	req.emr_in_buf = payload;
@@ -604,6 +600,6 @@ efx_mcdi_driver_event(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_DRIVER_EVENT_IN_LEN,
-			    MC_CMD_DRIVER_EVENT_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_DRIVER_EVENT_IN_LEN,
+		MC_CMD_DRIVER_EVENT_OUT_LEN);
 	efx_rc_t rc;
 
diff --git a/drivers/net/sfc/base/ef10_filter.c b/drivers/net/sfc/base/ef10_filter.c
index a4d97f99c..30a4892df 100644
--- a/drivers/net/sfc/base/ef10_filter.c
+++ b/drivers/net/sfc/base/ef10_filter.c
@@ -173,10 +173,9 @@ efx_mcdi_filter_op_add(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_FILTER_OP_V3_IN_LEN,
-			    MC_CMD_FILTER_OP_EXT_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_FILTER_OP_V3_IN_LEN,
+		MC_CMD_FILTER_OP_EXT_OUT_LEN);
 	efx_filter_match_flags_t match_flags;
 	efx_rc_t rc;
 
-	memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_FILTER_OP;
 	req.emr_in_buf = payload;
@@ -377,9 +376,8 @@ efx_mcdi_filter_op_delete(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_FILTER_OP_EXT_IN_LEN,
-			    MC_CMD_FILTER_OP_EXT_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_FILTER_OP_EXT_IN_LEN,
+		MC_CMD_FILTER_OP_EXT_OUT_LEN);
 	efx_rc_t rc;
 
-	memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_FILTER_OP;
 	req.emr_in_buf = payload;
@@ -951,11 +949,10 @@ efx_mcdi_get_parser_disp_info(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_PARSER_DISP_INFO_IN_LEN,
-			    MC_CMD_GET_PARSER_DISP_INFO_OUT_LENMAX)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_PARSER_DISP_INFO_IN_LEN,
+		MC_CMD_GET_PARSER_DISP_INFO_OUT_LENMAX);
 	size_t matches_count;
 	size_t list_size;
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_PARSER_DISP_INFO;
 	req.emr_in_buf = payload;
diff --git a/drivers/net/sfc/base/ef10_intr.c b/drivers/net/sfc/base/ef10_intr.c
index 1ffe266b1..efa157125 100644
--- a/drivers/net/sfc/base/ef10_intr.c
+++ b/drivers/net/sfc/base/ef10_intr.c
@@ -52,6 +52,6 @@ efx_mcdi_trigger_interrupt(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_TRIGGER_INTERRUPT_IN_LEN,
-			    MC_CMD_TRIGGER_INTERRUPT_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_TRIGGER_INTERRUPT_IN_LEN,
+		MC_CMD_TRIGGER_INTERRUPT_OUT_LEN);
 	efx_rc_t rc;
 
@@ -65,5 +65,4 @@ efx_mcdi_trigger_interrupt(
 	}
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_TRIGGER_INTERRUPT;
 	req.emr_in_buf = payload;
diff --git a/drivers/net/sfc/base/ef10_mac.c b/drivers/net/sfc/base/ef10_mac.c
index c14010732..a4a6d9ec8 100644
--- a/drivers/net/sfc/base/ef10_mac.c
+++ b/drivers/net/sfc/base/ef10_mac.c
@@ -76,9 +76,8 @@ efx_mcdi_vadapter_set_mac(
 	efx_port_t *epp = &(enp->en_port);
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_VADAPTOR_SET_MAC_IN_LEN,
-			    MC_CMD_VADAPTOR_SET_MAC_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_VADAPTOR_SET_MAC_IN_LEN,
+		MC_CMD_VADAPTOR_SET_MAC_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_VADAPTOR_SET_MAC;
 	req.emr_in_buf = payload;
@@ -142,9 +141,8 @@ efx_mcdi_mtu_set(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_SET_MAC_EXT_IN_LEN,
-			    MC_CMD_SET_MAC_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_SET_MAC_EXT_IN_LEN,
+		MC_CMD_SET_MAC_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_SET_MAC;
 	req.emr_in_buf = payload;
@@ -179,9 +177,8 @@ efx_mcdi_mtu_get(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_SET_MAC_EXT_IN_LEN,
-			    MC_CMD_SET_MAC_V2_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_SET_MAC_EXT_IN_LEN,
+		MC_CMD_SET_MAC_V2_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_SET_MAC;
 	req.emr_in_buf = payload;
@@ -275,9 +272,8 @@ ef10_mac_reconfigure(
 	efx_port_t *epp = &(enp->en_port);
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_SET_MAC_IN_LEN,
-			    MC_CMD_SET_MAC_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_SET_MAC_IN_LEN,
+		MC_CMD_SET_MAC_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_SET_MAC;
 	req.emr_in_buf = payload;
diff --git a/drivers/net/sfc/base/ef10_nic.c b/drivers/net/sfc/base/ef10_nic.c
index d1985b3c5..0dd00e192 100644
--- a/drivers/net/sfc/base/ef10_nic.c
+++ b/drivers/net/sfc/base/ef10_nic.c
@@ -21,6 +21,6 @@ efx_mcdi_get_port_assignment(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_PORT_ASSIGNMENT_IN_LEN,
-			    MC_CMD_GET_PORT_ASSIGNMENT_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_PORT_ASSIGNMENT_IN_LEN,
+		MC_CMD_GET_PORT_ASSIGNMENT_OUT_LEN);
 	efx_rc_t rc;
 
@@ -29,5 +29,4 @@ efx_mcdi_get_port_assignment(
 	    enp->en_family == EFX_FAMILY_MEDFORD2);
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_PORT_ASSIGNMENT;
 	req.emr_in_buf = payload;
@@ -67,6 +66,6 @@ efx_mcdi_get_port_modes(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_PORT_MODES_IN_LEN,
-			    MC_CMD_GET_PORT_MODES_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_PORT_MODES_IN_LEN,
+		MC_CMD_GET_PORT_MODES_OUT_LEN);
 	efx_rc_t rc;
 
@@ -75,5 +74,4 @@ efx_mcdi_get_port_modes(
 	    enp->en_family == EFX_FAMILY_MEDFORD2);
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_PORT_MODES;
 	req.emr_in_buf = payload;
@@ -175,11 +173,10 @@ efx_mcdi_vadaptor_alloc(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_VADAPTOR_ALLOC_IN_LEN,
-			    MC_CMD_VADAPTOR_ALLOC_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_VADAPTOR_ALLOC_IN_LEN,
+		MC_CMD_VADAPTOR_ALLOC_OUT_LEN);
 	efx_rc_t rc;
 
 	EFSYS_ASSERT3U(enp->en_vport_id, ==, EVB_PORT_ID_NULL);
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_VADAPTOR_ALLOC;
 	req.emr_in_buf = payload;
@@ -214,9 +211,8 @@ efx_mcdi_vadaptor_free(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_VADAPTOR_FREE_IN_LEN,
-			    MC_CMD_VADAPTOR_FREE_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_VADAPTOR_FREE_IN_LEN,
+		MC_CMD_VADAPTOR_FREE_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_VADAPTOR_FREE;
 	req.emr_in_buf = payload;
@@ -248,6 +244,6 @@ efx_mcdi_get_mac_address_pf(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_MAC_ADDRESSES_IN_LEN,
-			    MC_CMD_GET_MAC_ADDRESSES_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_MAC_ADDRESSES_IN_LEN,
+		MC_CMD_GET_MAC_ADDRESSES_OUT_LEN);
 	efx_rc_t rc;
 
@@ -256,5 +252,4 @@ efx_mcdi_get_mac_address_pf(
 	    enp->en_family == EFX_FAMILY_MEDFORD2);
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_MAC_ADDRESSES;
 	req.emr_in_buf = payload;
@@ -307,6 +302,6 @@ efx_mcdi_get_mac_address_vf(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_VPORT_GET_MAC_ADDRESSES_IN_LEN,
-			    MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_LENMAX)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_VPORT_GET_MAC_ADDRESSES_IN_LEN,
+		MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_LENMAX);
 	efx_rc_t rc;
 
@@ -315,5 +310,4 @@ efx_mcdi_get_mac_address_vf(
 	    enp->en_family == EFX_FAMILY_MEDFORD2);
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_VPORT_GET_MAC_ADDRESSES;
 	req.emr_in_buf = payload;
@@ -372,6 +366,6 @@ efx_mcdi_get_clock(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_CLOCK_IN_LEN,
-			    MC_CMD_GET_CLOCK_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_CLOCK_IN_LEN,
+		MC_CMD_GET_CLOCK_OUT_LEN);
 	efx_rc_t rc;
 
@@ -380,5 +374,4 @@ efx_mcdi_get_clock(
 	    enp->en_family == EFX_FAMILY_MEDFORD2);
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_CLOCK;
 	req.emr_in_buf = payload;
@@ -430,10 +423,9 @@ efx_mcdi_get_rxdp_config(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_RXDP_CONFIG_IN_LEN,
-			    MC_CMD_GET_RXDP_CONFIG_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_RXDP_CONFIG_IN_LEN,
+		MC_CMD_GET_RXDP_CONFIG_OUT_LEN);
 	uint32_t end_padding;
 	efx_rc_t rc;
 
-	memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_RXDP_CONFIG;
 	req.emr_in_buf = payload;
@@ -490,9 +482,8 @@ efx_mcdi_get_vector_cfg(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_VECTOR_CFG_IN_LEN,
-			    MC_CMD_GET_VECTOR_CFG_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_VECTOR_CFG_IN_LEN,
+		MC_CMD_GET_VECTOR_CFG_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_VECTOR_CFG;
 	req.emr_in_buf = payload;
@@ -540,6 +531,6 @@ efx_mcdi_alloc_vis(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_ALLOC_VIS_IN_LEN,
-			    MC_CMD_ALLOC_VIS_EXT_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_ALLOC_VIS_IN_LEN,
+		MC_CMD_ALLOC_VIS_EXT_OUT_LEN);
 	efx_rc_t rc;
 
@@ -549,5 +540,4 @@ efx_mcdi_alloc_vis(
 	}
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_ALLOC_VIS;
 	req.emr_in_buf = payload;
@@ -632,6 +622,6 @@ efx_mcdi_alloc_piobuf(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_ALLOC_PIOBUF_IN_LEN,
-			    MC_CMD_ALLOC_PIOBUF_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_ALLOC_PIOBUF_IN_LEN,
+		MC_CMD_ALLOC_PIOBUF_OUT_LEN);
 	efx_rc_t rc;
 
@@ -641,5 +631,4 @@ efx_mcdi_alloc_piobuf(
 	}
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_ALLOC_PIOBUF;
 	req.emr_in_buf = payload;
@@ -680,9 +669,8 @@ efx_mcdi_free_piobuf(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_FREE_PIOBUF_IN_LEN,
-			    MC_CMD_FREE_PIOBUF_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_FREE_PIOBUF_IN_LEN,
+		MC_CMD_FREE_PIOBUF_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_FREE_PIOBUF;
 	req.emr_in_buf = payload;
@@ -715,9 +703,8 @@ efx_mcdi_link_piobuf(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_LINK_PIOBUF_IN_LEN,
-			    MC_CMD_LINK_PIOBUF_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_LINK_PIOBUF_IN_LEN,
+		MC_CMD_LINK_PIOBUF_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_LINK_PIOBUF;
 	req.emr_in_buf = payload;
@@ -750,9 +737,8 @@ efx_mcdi_unlink_piobuf(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_UNLINK_PIOBUF_IN_LEN,
-			    MC_CMD_UNLINK_PIOBUF_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_UNLINK_PIOBUF_IN_LEN,
+		MC_CMD_UNLINK_PIOBUF_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_UNLINK_PIOBUF;
 	req.emr_in_buf = payload;
@@ -952,9 +938,8 @@ ef10_mcdi_get_pf_count(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_PF_COUNT_IN_LEN,
-			    MC_CMD_GET_PF_COUNT_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_PF_COUNT_IN_LEN,
+		MC_CMD_GET_PF_COUNT_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_PF_COUNT;
 	req.emr_in_buf = payload;
@@ -996,6 +981,6 @@ ef10_get_datapath_caps(
 	efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_CAPABILITIES_IN_LEN,
-			    MC_CMD_GET_CAPABILITIES_V5_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_CAPABILITIES_IN_LEN,
+		MC_CMD_GET_CAPABILITIES_V5_OUT_LEN);
 	efx_rc_t rc;
 
@@ -1004,5 +989,4 @@ ef10_get_datapath_caps(
 
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_CAPABILITIES;
 	req.emr_in_buf = payload;
@@ -2040,6 +2024,6 @@ ef10_nic_reset(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_ENTITY_RESET_IN_LEN,
-			    MC_CMD_ENTITY_RESET_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_ENTITY_RESET_IN_LEN,
+		MC_CMD_ENTITY_RESET_OUT_LEN);
 	efx_rc_t rc;
 
@@ -2050,5 +2034,4 @@ ef10_nic_reset(
 		goto fail2;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_ENTITY_RESET;
 	req.emr_in_buf = payload;
@@ -2387,9 +2370,8 @@ efx_mcdi_get_nic_global(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_NIC_GLOBAL_IN_LEN,
-			    MC_CMD_GET_NIC_GLOBAL_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_NIC_GLOBAL_IN_LEN,
+		MC_CMD_GET_NIC_GLOBAL_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_NIC_GLOBAL;
 	req.emr_in_buf = payload;
@@ -2431,8 +2413,7 @@ efx_mcdi_set_nic_global(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MC_CMD_SET_NIC_GLOBAL_IN_LEN];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_SET_NIC_GLOBAL_IN_LEN, 0);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_SET_NIC_GLOBAL;
 	req.emr_in_buf = payload;
diff --git a/drivers/net/sfc/base/ef10_phy.c b/drivers/net/sfc/base/ef10_phy.c
index e9c7b40e4..a1f59ff1c 100644
--- a/drivers/net/sfc/base/ef10_phy.c
+++ b/drivers/net/sfc/base/ef10_phy.c
@@ -243,9 +243,8 @@ ef10_phy_get_link(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_LINK_IN_LEN,
-			    MC_CMD_GET_LINK_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_LINK_IN_LEN,
+		MC_CMD_GET_LINK_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_LINK;
 	req.emr_in_buf = payload;
@@ -302,6 +301,6 @@ ef10_phy_reconfigure(
 	efx_port_t *epp = &(enp->en_port);
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_SET_LINK_IN_LEN,
-			    MC_CMD_SET_LINK_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_SET_LINK_IN_LEN,
+		MC_CMD_SET_LINK_OUT_LEN);
 	uint32_t cap_mask;
 #if EFSYS_OPT_PHY_LED_CONTROL
@@ -317,5 +316,4 @@ ef10_phy_reconfigure(
 		goto out;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_SET_LINK;
 	req.emr_in_buf = payload;
@@ -465,10 +463,9 @@ ef10_phy_verify(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_PHY_STATE_IN_LEN,
-			    MC_CMD_GET_PHY_STATE_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_PHY_STATE_IN_LEN,
+		MC_CMD_GET_PHY_STATE_OUT_LEN);
 	uint32_t state;
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_PHY_STATE;
 	req.emr_in_buf = payload;
@@ -588,5 +585,6 @@ ef10_bist_poll(
 	 * whilst not wasting stack.
 	 */
-	uint8_t payload[MAX(MC_CMD_POLL_BIST_IN_LEN, MCDI_CTL_SDU_LEN_MAX_V1)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_POLL_BIST_IN_LEN,
+		MCDI_CTL_SDU_LEN_MAX_V1);
 	efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
 	efx_mcdi_req_t req;
@@ -606,5 +604,4 @@ ef10_bist_poll(
 	_NOTE(ARGUNUSED(type))
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_POLL_BIST;
 	req.emr_in_buf = payload;
diff --git a/drivers/net/sfc/base/ef10_rx.c b/drivers/net/sfc/base/ef10_rx.c
index 313a36918..17678b517 100644
--- a/drivers/net/sfc/base/ef10_rx.c
+++ b/drivers/net/sfc/base/ef10_rx.c
@@ -30,6 +30,6 @@ efx_mcdi_init_rxq(
 	efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_INIT_RXQ_V3_IN_LEN,
-			    MC_CMD_INIT_RXQ_V3_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_INIT_RXQ_V3_IN_LEN,
+		MC_CMD_INIT_RXQ_V3_OUT_LEN);
 	int npages = EFX_RXQ_NBUFS(ndescs);
 	int i;
@@ -74,5 +74,4 @@ efx_mcdi_init_rxq(
 	}
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_INIT_RXQ;
 	req.emr_in_buf = payload;
@@ -147,9 +146,8 @@ efx_mcdi_fini_rxq(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_FINI_RXQ_IN_LEN,
-			    MC_CMD_FINI_RXQ_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_FINI_RXQ_IN_LEN,
+		MC_CMD_FINI_RXQ_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_FINI_RXQ;
 	req.emr_in_buf = payload;
@@ -189,6 +187,6 @@ efx_mcdi_rss_context_alloc(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_RSS_CONTEXT_ALLOC_IN_LEN,
-			    MC_CMD_RSS_CONTEXT_ALLOC_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_RSS_CONTEXT_ALLOC_IN_LEN,
+		MC_CMD_RSS_CONTEXT_ALLOC_OUT_LEN);
 	uint32_t rss_context;
 	uint32_t context_type;
@@ -212,5 +210,4 @@ efx_mcdi_rss_context_alloc(
 	}
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_RSS_CONTEXT_ALLOC;
 	req.emr_in_buf = payload;
@@ -275,6 +272,6 @@ efx_mcdi_rss_context_free(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_RSS_CONTEXT_FREE_IN_LEN,
-			    MC_CMD_RSS_CONTEXT_FREE_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_RSS_CONTEXT_FREE_IN_LEN,
+		MC_CMD_RSS_CONTEXT_FREE_OUT_LEN);
 	efx_rc_t rc;
 
@@ -284,5 +281,4 @@ efx_mcdi_rss_context_free(
 	}
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_RSS_CONTEXT_FREE;
 	req.emr_in_buf = payload;
@@ -325,6 +321,6 @@ efx_mcdi_rss_context_set_flags(
 	efx_rx_hash_type_t modes;
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_LEN,
-			    MC_CMD_RSS_CONTEXT_SET_FLAGS_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_RSS_CONTEXT_SET_FLAGS_IN_LEN,
+		MC_CMD_RSS_CONTEXT_SET_FLAGS_OUT_LEN);
 	efx_rc_t rc;
 
@@ -351,5 +347,4 @@ efx_mcdi_rss_context_set_flags(
 	}
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_RSS_CONTEXT_SET_FLAGS;
 	req.emr_in_buf = payload;
@@ -440,6 +435,6 @@ efx_mcdi_rss_context_set_key(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_RSS_CONTEXT_SET_KEY_IN_LEN,
-			    MC_CMD_RSS_CONTEXT_SET_KEY_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_RSS_CONTEXT_SET_KEY_IN_LEN,
+		MC_CMD_RSS_CONTEXT_SET_KEY_OUT_LEN);
 	efx_rc_t rc;
 
@@ -449,5 +444,4 @@ efx_mcdi_rss_context_set_key(
 	}
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_RSS_CONTEXT_SET_KEY;
 	req.emr_in_buf = payload;
@@ -497,6 +491,6 @@ efx_mcdi_rss_context_set_table(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_RSS_CONTEXT_SET_TABLE_IN_LEN,
-			    MC_CMD_RSS_CONTEXT_SET_TABLE_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_RSS_CONTEXT_SET_TABLE_IN_LEN,
+		MC_CMD_RSS_CONTEXT_SET_TABLE_OUT_LEN);
 	uint8_t *req_table;
 	int i, rc;
@@ -507,5 +501,4 @@ efx_mcdi_rss_context_set_table(
 	}
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_RSS_CONTEXT_SET_TABLE;
 	req.emr_in_buf = payload;
diff --git a/drivers/net/sfc/base/ef10_tx.c b/drivers/net/sfc/base/ef10_tx.c
index e74d39540..20816f2fc 100644
--- a/drivers/net/sfc/base/ef10_tx.c
+++ b/drivers/net/sfc/base/ef10_tx.c
@@ -32,6 +32,6 @@ efx_mcdi_init_txq(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_INIT_TXQ_IN_LEN(EFX_TXQ_MAX_BUFS),
-			    MC_CMD_INIT_TXQ_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_INIT_TXQ_IN_LEN(EFX_TXQ_MAX_BUFS),
+		MC_CMD_INIT_TXQ_OUT_LEN);
 	efx_qword_t *dma_addr;
 	uint64_t addr;
@@ -54,5 +54,4 @@ efx_mcdi_init_txq(
 	}
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_INIT_TXQ;
 	req.emr_in_buf = payload;
@@ -121,9 +120,8 @@ efx_mcdi_fini_txq(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_FINI_TXQ_IN_LEN,
-			    MC_CMD_FINI_TXQ_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_FINI_TXQ_IN_LEN,
+		MC_CMD_FINI_TXQ_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_FINI_TXQ;
 	req.emr_in_buf = payload;
diff --git a/drivers/net/sfc/base/efx_lic.c b/drivers/net/sfc/base/efx_lic.c
index 49c00347f..1ca1bf477 100644
--- a/drivers/net/sfc/base/efx_lic.c
+++ b/drivers/net/sfc/base/efx_lic.c
@@ -302,10 +302,9 @@ efx_mcdi_fc_license_update_license(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MC_CMD_FC_IN_LICENSE_LEN];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_FC_IN_LICENSE_LEN, 0);
 	efx_rc_t rc;
 
 	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_SIENA);
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_FC;
 	req.emr_in_buf = payload;
@@ -348,11 +347,10 @@ efx_mcdi_fc_license_get_key_stats(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_FC_IN_LICENSE_LEN,
-			    MC_CMD_FC_OUT_LICENSE_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_FC_IN_LICENSE_LEN,
+		MC_CMD_FC_OUT_LICENSE_LEN);
 	efx_rc_t rc;
 
 	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_SIENA);
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_FC;
 	req.emr_in_buf = payload;
@@ -664,6 +662,6 @@ efx_mcdi_licensed_app_state(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_LICENSED_APP_STATE_IN_LEN,
-			    MC_CMD_GET_LICENSED_APP_STATE_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_LICENSED_APP_STATE_IN_LEN,
+		MC_CMD_GET_LICENSED_APP_STATE_OUT_LEN);
 	uint32_t app_state;
 	efx_rc_t rc;
@@ -677,5 +675,4 @@ efx_mcdi_licensed_app_state(
 	}
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_LICENSED_APP_STATE;
 	req.emr_in_buf = payload;
@@ -723,10 +720,9 @@ efx_mcdi_licensing_update_licenses(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MC_CMD_LICENSING_IN_LEN];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_LICENSING_IN_LEN, 0);
 	efx_rc_t rc;
 
 	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON);
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_LICENSING;
 	req.emr_in_buf = payload;
@@ -766,11 +762,10 @@ efx_mcdi_licensing_get_key_stats(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_LICENSING_IN_LEN,
-			    MC_CMD_LICENSING_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_LICENSING_IN_LEN,
+		MC_CMD_LICENSING_OUT_LEN);
 	efx_rc_t rc;
 
 	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON);
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_LICENSING;
 	req.emr_in_buf = payload;
@@ -830,5 +825,5 @@ efx_mcdi_licensing_v3_update_licenses(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MC_CMD_LICENSING_V3_IN_LEN];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_LICENSING_V3_IN_LEN, 0);
 	efx_rc_t rc;
 
@@ -836,5 +831,4 @@ efx_mcdi_licensing_v3_update_licenses(
 	    (enp->en_family == EFX_FAMILY_MEDFORD2));
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_LICENSING_V3;
 	req.emr_in_buf = payload;
@@ -867,6 +861,6 @@ efx_mcdi_licensing_v3_report_license(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_LICENSING_V3_IN_LEN,
-			    MC_CMD_LICENSING_V3_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_LICENSING_V3_IN_LEN,
+		MC_CMD_LICENSING_V3_OUT_LEN);
 	efx_rc_t rc;
 
@@ -874,5 +868,4 @@ efx_mcdi_licensing_v3_report_license(
 	    (enp->en_family == EFX_FAMILY_MEDFORD2));
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_LICENSING_V3;
 	req.emr_in_buf = payload;
@@ -931,6 +924,6 @@ efx_mcdi_licensing_v3_app_state(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_LICENSED_V3_APP_STATE_IN_LEN,
-			    MC_CMD_GET_LICENSED_V3_APP_STATE_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_LICENSED_V3_APP_STATE_IN_LEN,
+		MC_CMD_GET_LICENSED_V3_APP_STATE_OUT_LEN);
 	uint32_t app_state;
 	efx_rc_t rc;
@@ -939,5 +932,4 @@ efx_mcdi_licensing_v3_app_state(
 	    (enp->en_family == EFX_FAMILY_MEDFORD2));
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_LICENSED_V3_APP_STATE;
 	req.emr_in_buf = payload;
@@ -991,6 +983,6 @@ efx_mcdi_licensing_v3_get_id(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_LICENSING_GET_ID_V3_IN_LEN,
-			    MC_CMD_LICENSING_GET_ID_V3_OUT_LENMIN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_LICENSING_GET_ID_V3_IN_LEN,
+		MC_CMD_LICENSING_GET_ID_V3_OUT_LENMIN);
 	efx_rc_t rc;
 
@@ -1003,5 +995,4 @@ efx_mcdi_licensing_v3_get_id(
 		req.emr_out_buf = bufferp;
 		req.emr_out_length = MC_CMD_LICENSING_GET_ID_V3_OUT_LENMIN;
-		(void) memset(payload, 0, sizeof (payload));
 	} else {
 		/* Request full buffer */
diff --git a/drivers/net/sfc/base/efx_mcdi.c b/drivers/net/sfc/base/efx_mcdi.c
index d4ebcf265..84d8452e4 100644
--- a/drivers/net/sfc/base/efx_mcdi.c
+++ b/drivers/net/sfc/base/efx_mcdi.c
@@ -901,8 +901,8 @@ efx_mcdi_version(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MAX(MC_CMD_GET_VERSION_IN_LEN,
-				MC_CMD_GET_VERSION_OUT_LEN),
-			    MAX(MC_CMD_GET_BOOT_STATUS_IN_LEN,
-				MC_CMD_GET_BOOT_STATUS_OUT_LEN))];
+	EFX_MCDI_DECLARE_BUF(payload,
+		MAX(MC_CMD_GET_VERSION_IN_LEN, MC_CMD_GET_BOOT_STATUS_IN_LEN),
+		MAX(MC_CMD_GET_VERSION_OUT_LEN,
+			MC_CMD_GET_BOOT_STATUS_OUT_LEN));
 	efx_word_t *ver_words;
 	uint16_t version[4];
@@ -913,5 +913,4 @@ efx_mcdi_version(
 	EFSYS_ASSERT3U(enp->en_features, &, EFX_FEATURE_MCDI);
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_VERSION;
 	req.emr_in_buf = payload;
@@ -1019,10 +1018,9 @@ efx_mcdi_get_capabilities(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_CAPABILITIES_IN_LEN,
-			    MC_CMD_GET_CAPABILITIES_V2_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_CAPABILITIES_IN_LEN,
+		MC_CMD_GET_CAPABILITIES_V2_OUT_LEN);
 	boolean_t v2_capable;
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_CAPABILITIES;
 	req.emr_in_buf = payload;
@@ -1087,5 +1085,6 @@ efx_mcdi_do_reboot(
 	__in		boolean_t after_assertion)
 {
-	uint8_t payload[MAX(MC_CMD_REBOOT_IN_LEN, MC_CMD_REBOOT_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_REBOOT_IN_LEN,
+		MC_CMD_REBOOT_OUT_LEN);
 	efx_mcdi_req_t req;
 	efx_rc_t rc;
@@ -1100,5 +1099,4 @@ efx_mcdi_do_reboot(
 	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_REBOOT;
 	req.emr_in_buf = payload;
@@ -1151,6 +1149,6 @@ efx_mcdi_read_assertion(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_ASSERTS_IN_LEN,
-			    MC_CMD_GET_ASSERTS_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_ASSERTS_IN_LEN,
+		MC_CMD_GET_ASSERTS_OUT_LEN);
 	const char *reason;
 	unsigned int flags;
@@ -1253,9 +1251,8 @@ efx_mcdi_drv_attach(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_DRV_ATTACH_IN_LEN,
-			    MC_CMD_DRV_ATTACH_EXT_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_DRV_ATTACH_IN_LEN,
+		MC_CMD_DRV_ATTACH_EXT_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_DRV_ATTACH;
 	req.emr_in_buf = payload;
@@ -1312,9 +1309,8 @@ efx_mcdi_get_board_cfg(
 	efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip);
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_BOARD_CFG_IN_LEN,
-			    MC_CMD_GET_BOARD_CFG_OUT_LENMIN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_BOARD_CFG_IN_LEN,
+		MC_CMD_GET_BOARD_CFG_OUT_LENMIN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_BOARD_CFG;
 	req.emr_in_buf = payload;
@@ -1392,9 +1388,8 @@ efx_mcdi_get_resource_limits(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_RESOURCE_LIMITS_IN_LEN,
-			    MC_CMD_GET_RESOURCE_LIMITS_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_RESOURCE_LIMITS_IN_LEN,
+		MC_CMD_GET_RESOURCE_LIMITS_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_RESOURCE_LIMITS;
 	req.emr_in_buf = payload;
@@ -1439,6 +1434,6 @@ efx_mcdi_get_phy_cfg(
 	efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_PHY_CFG_IN_LEN,
-			    MC_CMD_GET_PHY_CFG_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_PHY_CFG_IN_LEN,
+		MC_CMD_GET_PHY_CFG_OUT_LEN);
 #if EFSYS_OPT_NAMES
 	const char *namep;
@@ -1448,5 +1443,4 @@ efx_mcdi_get_phy_cfg(
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_PHY_CFG;
 	req.emr_in_buf = payload;
@@ -1687,9 +1681,8 @@ efx_mcdi_bist_start(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_START_BIST_IN_LEN,
-			    MC_CMD_START_BIST_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_START_BIST_IN_LEN,
+		MC_CMD_START_BIST_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_START_BIST;
 	req.emr_in_buf = payload;
@@ -1750,9 +1743,8 @@ efx_mcdi_log_ctrl(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_LOG_CTRL_IN_LEN,
-			    MC_CMD_LOG_CTRL_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_LOG_CTRL_IN_LEN,
+		MC_CMD_LOG_CTRL_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_LOG_CTRL;
 	req.emr_in_buf = payload;
@@ -1799,6 +1791,6 @@ efx_mcdi_mac_stats(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_MAC_STATS_IN_LEN,
-			    MC_CMD_MAC_STATS_V2_OUT_DMA_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_MAC_STATS_IN_LEN,
+		MC_CMD_MAC_STATS_V2_OUT_DMA_LEN);
 	int clear = (action == EFX_STATS_CLEAR);
 	int upload = (action == EFX_STATS_UPLOAD);
@@ -1808,5 +1800,4 @@ efx_mcdi_mac_stats(
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_MAC_STATS;
 	req.emr_in_buf = payload;
@@ -1980,9 +1971,8 @@ efx_mcdi_get_function_info(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_FUNCTION_INFO_IN_LEN,
-			    MC_CMD_GET_FUNCTION_INFO_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_FUNCTION_INFO_IN_LEN,
+		MC_CMD_GET_FUNCTION_INFO_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_FUNCTION_INFO;
 	req.emr_in_buf = payload;
@@ -2025,9 +2015,8 @@ efx_mcdi_privilege_mask(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_PRIVILEGE_MASK_IN_LEN,
-			    MC_CMD_PRIVILEGE_MASK_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_PRIVILEGE_MASK_IN_LEN,
+		MC_CMD_PRIVILEGE_MASK_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_PRIVILEGE_MASK;
 	req.emr_in_buf = payload;
@@ -2074,9 +2063,8 @@ efx_mcdi_set_workaround(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_WORKAROUND_IN_LEN,
-			    MC_CMD_WORKAROUND_EXT_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_WORKAROUND_IN_LEN,
+		MC_CMD_WORKAROUND_EXT_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_WORKAROUND;
 	req.emr_in_buf = payload;
@@ -2118,8 +2106,7 @@ efx_mcdi_get_workarounds(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MC_CMD_GET_WORKAROUNDS_OUT_LEN];
+	EFX_MCDI_DECLARE_BUF(payload, 0, MC_CMD_GET_WORKAROUNDS_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_WORKAROUNDS;
 	req.emr_in_buf = NULL;
@@ -2167,12 +2154,11 @@ efx_mcdi_get_phy_media_info(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_PHY_MEDIA_INFO_IN_LEN,
-			    MC_CMD_GET_PHY_MEDIA_INFO_OUT_LEN(
-				EFX_PHY_MEDIA_INFO_PAGE_SIZE))];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_PHY_MEDIA_INFO_IN_LEN,
+		MC_CMD_GET_PHY_MEDIA_INFO_OUT_LEN(
+			EFX_PHY_MEDIA_INFO_PAGE_SIZE));
 	efx_rc_t rc;
 
 	EFSYS_ASSERT((uint32_t)offset + len <= EFX_PHY_MEDIA_INFO_PAGE_SIZE);
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_PHY_MEDIA_INFO;
 	req.emr_in_buf = payload;
diff --git a/drivers/net/sfc/base/efx_mcdi.h b/drivers/net/sfc/base/efx_mcdi.h
index 253a9e60b..d2685abc9 100644
--- a/drivers/net/sfc/base/efx_mcdi.h
+++ b/drivers/net/sfc/base/efx_mcdi.h
@@ -381,4 +381,15 @@ efx_mcdi_phy_module_get_info(
 	(MC_CMD_PRIVILEGE_MASK_IN_GRP_ ## priv))
 
+/*
+ * The buffer size must be a multiple of dword to ensure that MCDI works
+ * properly with Siena based boards (which use on-chip buffer). Also, it
+ * should be at minimum the size of two dwords to allow space for extended
+ * error responses if the request/response buffer sizes are smaller.
+ */
+#define EFX_MCDI_DECLARE_BUF(_name, _in_len, _out_len)			\
+	uint8_t _name[P2ROUNDUP(MAX(MAX(_in_len, _out_len),		\
+				    (2 * sizeof (efx_dword_t))),	\
+				sizeof (efx_dword_t))] = {0}
+
 typedef enum efx_mcdi_feature_id_e {
 	EFX_MCDI_FEATURE_FW_UPDATE = 0,
diff --git a/drivers/net/sfc/base/efx_nic.c b/drivers/net/sfc/base/efx_nic.c
index 0e8ed9c2a..c364bffba 100644
--- a/drivers/net/sfc/base/efx_nic.c
+++ b/drivers/net/sfc/base/efx_nic.c
@@ -790,11 +790,10 @@ efx_mcdi_get_loopback_modes(
 	efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_LOOPBACK_MODES_IN_LEN,
-			    MC_CMD_GET_LOOPBACK_MODES_OUT_V2_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_LOOPBACK_MODES_IN_LEN,
+		MC_CMD_GET_LOOPBACK_MODES_OUT_V2_LEN);
 	efx_qword_t mask;
 	efx_qword_t modes;
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_LOOPBACK_MODES;
 	req.emr_in_buf = payload;
diff --git a/drivers/net/sfc/base/efx_nvram.c b/drivers/net/sfc/base/efx_nvram.c
index f9a6ee585..fdab7aafa 100644
--- a/drivers/net/sfc/base/efx_nvram.c
+++ b/drivers/net/sfc/base/efx_nvram.c
@@ -515,10 +515,9 @@ efx_mcdi_nvram_partitions(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_NVRAM_PARTITIONS_IN_LEN,
-			    MC_CMD_NVRAM_PARTITIONS_OUT_LENMAX)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_NVRAM_PARTITIONS_IN_LEN,
+		MC_CMD_NVRAM_PARTITIONS_OUT_LENMAX);
 	unsigned int npartn;
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_NVRAM_PARTITIONS;
 	req.emr_in_buf = payload;
@@ -578,9 +577,8 @@ efx_mcdi_nvram_metadata(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_NVRAM_METADATA_IN_LEN,
-			    MC_CMD_NVRAM_METADATA_OUT_LENMAX)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_NVRAM_METADATA_IN_LEN,
+		MC_CMD_NVRAM_METADATA_OUT_LENMAX);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_NVRAM_METADATA;
 	req.emr_in_buf = payload;
@@ -668,10 +666,9 @@ efx_mcdi_nvram_info(
 	__out_opt		uint32_t *write_sizep)
 {
-	uint8_t payload[MAX(MC_CMD_NVRAM_INFO_IN_LEN,
-			    MC_CMD_NVRAM_INFO_V2_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_NVRAM_INFO_IN_LEN,
+		MC_CMD_NVRAM_INFO_V2_OUT_LEN);
 	efx_mcdi_req_t req;
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_NVRAM_INFO;
 	req.emr_in_buf = payload;
@@ -729,10 +726,9 @@ efx_mcdi_nvram_update_start(
 	__in			uint32_t partn)
 {
-	uint8_t payload[MAX(MC_CMD_NVRAM_UPDATE_START_V2_IN_LEN,
-			    MC_CMD_NVRAM_UPDATE_START_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_NVRAM_UPDATE_START_V2_IN_LEN,
+		MC_CMD_NVRAM_UPDATE_START_OUT_LEN);
 	efx_mcdi_req_t req;
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_NVRAM_UPDATE_START;
 	req.emr_in_buf = payload;
@@ -771,6 +767,6 @@ efx_mcdi_nvram_read(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_NVRAM_READ_IN_V2_LEN,
-			    MC_CMD_NVRAM_READ_OUT_LENMAX)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_NVRAM_READ_IN_V2_LEN,
+		MC_CMD_NVRAM_READ_OUT_LENMAX);
 	efx_rc_t rc;
 
@@ -780,5 +776,4 @@ efx_mcdi_nvram_read(
 	}
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_NVRAM_READ;
 	req.emr_in_buf = payload;
@@ -826,9 +821,8 @@ efx_mcdi_nvram_erase(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_NVRAM_ERASE_IN_LEN,
-			    MC_CMD_NVRAM_ERASE_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_NVRAM_ERASE_IN_LEN,
+		MC_CMD_NVRAM_ERASE_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_NVRAM_ERASE;
 	req.emr_in_buf = payload;
@@ -940,10 +934,9 @@ efx_mcdi_nvram_update_finish(
 	const efx_nic_cfg_t *encp = &enp->en_nic_cfg;
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_LEN,
-			    MC_CMD_NVRAM_UPDATE_FINISH_V2_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_NVRAM_UPDATE_FINISH_V2_IN_LEN,
+		MC_CMD_NVRAM_UPDATE_FINISH_V2_OUT_LEN);
 	uint32_t verify_result = MC_CMD_NVRAM_VERIFY_RC_UNKNOWN;
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_NVRAM_UPDATE_FINISH;
 	req.emr_in_buf = payload;
@@ -1011,10 +1004,9 @@ efx_mcdi_nvram_test(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_NVRAM_TEST_IN_LEN,
-			    MC_CMD_NVRAM_TEST_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_NVRAM_TEST_IN_LEN,
+		MC_CMD_NVRAM_TEST_OUT_LEN);
 	int result;
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_NVRAM_TEST;
 	req.emr_in_buf = payload;
diff --git a/drivers/net/sfc/base/efx_tunnel.c b/drivers/net/sfc/base/efx_tunnel.c
index 399fd540b..edb6be028 100644
--- a/drivers/net/sfc/base/efx_tunnel.c
+++ b/drivers/net/sfc/base/efx_tunnel.c
@@ -41,6 +41,7 @@ efx_mcdi_set_tunnel_encap_udp_ports(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_LENMAX,
-			    MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload,
+		MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_IN_LENMAX,
+		MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS_OUT_LEN);
 	efx_word_t flags;
 	efx_rc_t rc;
@@ -53,5 +54,4 @@ efx_mcdi_set_tunnel_encap_udp_ports(
 		entries_num = etcp->etc_udp_entries_num;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS;
 	req.emr_in_buf = payload;
diff --git a/drivers/net/sfc/base/mcdi_mon.c b/drivers/net/sfc/base/mcdi_mon.c
index 54f7ae5db..2fb1b8e35 100644
--- a/drivers/net/sfc/base/mcdi_mon.c
+++ b/drivers/net/sfc/base/mcdi_mon.c
@@ -299,6 +299,6 @@ efx_mcdi_read_sensors(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_READ_SENSORS_EXT_IN_LEN,
-			    MC_CMD_READ_SENSORS_EXT_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_READ_SENSORS_EXT_IN_LEN,
+		MC_CMD_READ_SENSORS_EXT_OUT_LEN);
 	uint32_t addr_lo, addr_hi;
 	efx_rc_t rc;
@@ -338,6 +338,6 @@ efx_mcdi_sensor_info_npages(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_SENSOR_INFO_EXT_IN_LEN,
-			    MC_CMD_SENSOR_INFO_OUT_LENMAX)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_SENSOR_INFO_EXT_IN_LEN,
+		MC_CMD_SENSOR_INFO_OUT_LENMAX);
 	int page;
 	efx_rc_t rc;
@@ -382,6 +382,6 @@ efx_mcdi_sensor_info(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_SENSOR_INFO_EXT_IN_LEN,
-			    MC_CMD_SENSOR_INFO_OUT_LENMAX)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_SENSOR_INFO_EXT_IN_LEN,
+		MC_CMD_SENSOR_INFO_OUT_LENMAX);
 	uint32_t page;
 	efx_rc_t rc;
diff --git a/drivers/net/sfc/base/siena_mac.c b/drivers/net/sfc/base/siena_mac.c
index f8857cdd5..928dfc340 100644
--- a/drivers/net/sfc/base/siena_mac.c
+++ b/drivers/net/sfc/base/siena_mac.c
@@ -69,12 +69,11 @@ siena_mac_reconfigure(
 	efx_oword_t multicast_hash[2];
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MAX(MC_CMD_SET_MAC_IN_LEN,
-				MC_CMD_SET_MAC_OUT_LEN),
-			    MAX(MC_CMD_SET_MCAST_HASH_IN_LEN,
-				MC_CMD_SET_MCAST_HASH_OUT_LEN))];
+	EFX_MCDI_DECLARE_BUF(payload,
+		MAX(MC_CMD_SET_MAC_IN_LEN, MC_CMD_SET_MCAST_HASH_IN_LEN),
+		MAX(MC_CMD_SET_MAC_OUT_LEN, MC_CMD_SET_MCAST_HASH_OUT_LEN));
+
 	unsigned int fcntl;
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_SET_MAC;
 	req.emr_in_buf = payload;
diff --git a/drivers/net/sfc/base/siena_nic.c b/drivers/net/sfc/base/siena_nic.c
index 31eef80b9..8a58986e8 100644
--- a/drivers/net/sfc/base/siena_nic.c
+++ b/drivers/net/sfc/base/siena_nic.c
@@ -19,9 +19,8 @@ siena_nic_get_partn_mask(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_NVRAM_TYPES_IN_LEN,
-			    MC_CMD_NVRAM_TYPES_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_NVRAM_TYPES_IN_LEN,
+		MC_CMD_NVRAM_TYPES_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_NVRAM_TYPES;
 	req.emr_in_buf = payload;
diff --git a/drivers/net/sfc/base/siena_nvram.c b/drivers/net/sfc/base/siena_nvram.c
index 8cdd2df70..b8ea8a757 100644
--- a/drivers/net/sfc/base/siena_nvram.c
+++ b/drivers/net/sfc/base/siena_nvram.c
@@ -419,10 +419,9 @@ siena_nvram_get_subtype(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_BOARD_CFG_IN_LEN,
-			    MC_CMD_GET_BOARD_CFG_OUT_LENMAX)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_BOARD_CFG_IN_LEN,
+		MC_CMD_GET_BOARD_CFG_OUT_LENMAX);
 	efx_word_t *fw_list;
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_BOARD_CFG;
 	req.emr_in_buf = payload;
diff --git a/drivers/net/sfc/base/siena_phy.c b/drivers/net/sfc/base/siena_phy.c
index 4b2190d38..7eec9c747 100644
--- a/drivers/net/sfc/base/siena_phy.c
+++ b/drivers/net/sfc/base/siena_phy.c
@@ -170,9 +170,8 @@ siena_phy_get_link(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_LINK_IN_LEN,
-			    MC_CMD_GET_LINK_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_LINK_IN_LEN,
+		MC_CMD_GET_LINK_OUT_LEN);
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_LINK;
 	req.emr_in_buf = payload;
@@ -245,8 +244,7 @@ siena_phy_reconfigure(
 	efx_port_t *epp = &(enp->en_port);
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MAX(MC_CMD_SET_ID_LED_IN_LEN,
-				MC_CMD_SET_ID_LED_OUT_LEN),
-			    MAX(MC_CMD_SET_LINK_IN_LEN,
-				MC_CMD_SET_LINK_OUT_LEN))];
+	EFX_MCDI_DECLARE_BUF(payload,
+		MAX(MC_CMD_SET_ID_LED_IN_LEN, MC_CMD_SET_LINK_IN_LEN),
+		MAX(MC_CMD_SET_ID_LED_OUT_LEN, MC_CMD_SET_LINK_OUT_LEN));
 	uint32_t cap_mask;
 #if EFSYS_OPT_PHY_LED_CONTROL
@@ -256,5 +254,4 @@ siena_phy_reconfigure(
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_SET_LINK;
 	req.emr_in_buf = payload;
@@ -362,10 +359,9 @@ siena_phy_verify(
 {
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_GET_PHY_STATE_IN_LEN,
-			    MC_CMD_GET_PHY_STATE_OUT_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_PHY_STATE_IN_LEN,
+		MC_CMD_GET_PHY_STATE_OUT_LEN);
 	uint32_t state;
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_GET_PHY_STATE;
 	req.emr_in_buf = payload;
@@ -531,6 +527,6 @@ siena_phy_stats_update(
 	uint64_t smask;
 	efx_mcdi_req_t req;
-	uint8_t payload[MAX(MC_CMD_PHY_STATS_IN_LEN,
-			    MC_CMD_PHY_STATS_OUT_DMA_LEN)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_PHY_STATS_IN_LEN,
+		MC_CMD_PHY_STATS_OUT_DMA_LEN);
 	efx_rc_t rc;
 
@@ -540,5 +536,4 @@ siena_phy_stats_update(
 	}
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_PHY_STATS;
 	req.emr_in_buf = payload;
@@ -627,6 +622,6 @@ siena_phy_bist_poll(
 {
 	efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
-	uint8_t payload[MAX(MC_CMD_POLL_BIST_IN_LEN,
-			    MCDI_CTL_SDU_LEN_MAX)];
+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_POLL_BIST_IN_LEN,
+		MCDI_CTL_SDU_LEN_MAX);
 	uint32_t value_mask = 0;
 	efx_mcdi_req_t req;
@@ -634,5 +629,4 @@ siena_phy_bist_poll(
 	efx_rc_t rc;
 
-	(void) memset(payload, 0, sizeof (payload));
 	req.emr_cmd = MC_CMD_POLL_BIST;
 	req.emr_in_buf = payload;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:13.920285512 +0000
+++ 0012-net-sfc-base-fix-out-of-bounds-read-when-dereferenci.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,8 +1,10 @@
-From ed42d18458cbdceb28f006fda9967141a7e79b92 Mon Sep 17 00:00:00 2001
+From 6c703736316d161efea833e2be9400f392d08acd Mon Sep 17 00:00:00 2001
 From: Gautam Dawar <gdawar@solarflare.com>
 Date: Mon, 10 Sep 2018 10:33:22 +0100
 Subject: [PATCH] net/sfc/base: fix out of bounds read when dereferencing sdup
 
+[ upstream commit ed42d18458cbdceb28f006fda9967141a7e79b92 ]
+
 Introduce and use macro to make sure that MCDI buffers allocated
 on stack are rounded up properly.
 
@@ -25,7 +27,6 @@
 Fixes: 480a13044b8b ("net/sfc/base: support FW subvariant choice")
 Fixes: 6f60cc4a78b6 ("net/sfc/base: support equal stride super-buffer Rx mode")
 Fixes: 9a733758c046 ("net/sfc/base: support MARK and FLAG actions in filters")
-Cc: stable@dpdk.org
 
 Signed-off-by: Gautam Dawar <gdawar@solarflare.com>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -44,12 +45,12 @@
  drivers/net/sfc/base/efx_nic.c     |  5 +-
  drivers/net/sfc/base/efx_nvram.c   | 40 +++++--------
  drivers/net/sfc/base/efx_tunnel.c  |  6 +-
- drivers/net/sfc/base/mcdi_mon.c    | 17 +++---
+ drivers/net/sfc/base/mcdi_mon.c    | 12 ++--
  drivers/net/sfc/base/siena_mac.c   |  9 ++-
  drivers/net/sfc/base/siena_nic.c   |  5 +-
  drivers/net/sfc/base/siena_nvram.c |  5 +-
  drivers/net/sfc/base/siena_phy.c   | 28 ++++-----
- 19 files changed, 199 insertions(+), 273 deletions(-)
+ 19 files changed, 197 insertions(+), 270 deletions(-)
 
 diff --git a/drivers/net/sfc/base/ef10_ev.c b/drivers/net/sfc/base/ef10_ev.c
 index 7f89a7bf0..287550605 100644
@@ -237,7 +238,7 @@
  	req.emr_cmd = MC_CMD_SET_MAC;
  	req.emr_in_buf = payload;
 diff --git a/drivers/net/sfc/base/ef10_nic.c b/drivers/net/sfc/base/ef10_nic.c
-index 9145c389c..332f6ef81 100644
+index d1985b3c5..0dd00e192 100644
 --- a/drivers/net/sfc/base/ef10_nic.c
 +++ b/drivers/net/sfc/base/ef10_nic.c
 @@ -21,6 +21,6 @@ efx_mcdi_get_port_assignment(
@@ -255,7 +256,7 @@
 -	(void) memset(payload, 0, sizeof (payload));
  	req.emr_cmd = MC_CMD_GET_PORT_ASSIGNMENT;
  	req.emr_in_buf = payload;
-@@ -68,6 +67,6 @@ efx_mcdi_get_port_modes(
+@@ -67,6 +66,6 @@ efx_mcdi_get_port_modes(
  {
  	efx_mcdi_req_t req;
 -	uint8_t payload[MAX(MC_CMD_GET_PORT_MODES_IN_LEN,
@@ -264,13 +265,13 @@
 +		MC_CMD_GET_PORT_MODES_OUT_LEN);
  	efx_rc_t rc;
  
-@@ -76,5 +75,4 @@ efx_mcdi_get_port_modes(
+@@ -75,5 +74,4 @@ efx_mcdi_get_port_modes(
  	    enp->en_family == EFX_FAMILY_MEDFORD2);
  
 -	(void) memset(payload, 0, sizeof (payload));
  	req.emr_cmd = MC_CMD_GET_PORT_MODES;
  	req.emr_in_buf = payload;
-@@ -181,11 +179,10 @@ efx_mcdi_vadaptor_alloc(
+@@ -175,11 +173,10 @@ efx_mcdi_vadaptor_alloc(
  {
  	efx_mcdi_req_t req;
 -	uint8_t payload[MAX(MC_CMD_VADAPTOR_ALLOC_IN_LEN,
@@ -284,7 +285,7 @@
 -	(void) memset(payload, 0, sizeof (payload));
  	req.emr_cmd = MC_CMD_VADAPTOR_ALLOC;
  	req.emr_in_buf = payload;
-@@ -220,9 +217,8 @@ efx_mcdi_vadaptor_free(
+@@ -214,9 +211,8 @@ efx_mcdi_vadaptor_free(
  {
  	efx_mcdi_req_t req;
 -	uint8_t payload[MAX(MC_CMD_VADAPTOR_FREE_IN_LEN,
@@ -296,7 +297,7 @@
 -	(void) memset(payload, 0, sizeof (payload));
  	req.emr_cmd = MC_CMD_VADAPTOR_FREE;
  	req.emr_in_buf = payload;
-@@ -254,6 +250,6 @@ efx_mcdi_get_mac_address_pf(
+@@ -248,6 +244,6 @@ efx_mcdi_get_mac_address_pf(
  {
  	efx_mcdi_req_t req;
 -	uint8_t payload[MAX(MC_CMD_GET_MAC_ADDRESSES_IN_LEN,
@@ -305,13 +306,13 @@
 +		MC_CMD_GET_MAC_ADDRESSES_OUT_LEN);
  	efx_rc_t rc;
  
-@@ -262,5 +258,4 @@ efx_mcdi_get_mac_address_pf(
+@@ -256,5 +252,4 @@ efx_mcdi_get_mac_address_pf(
  	    enp->en_family == EFX_FAMILY_MEDFORD2);
  
 -	(void) memset(payload, 0, sizeof (payload));
  	req.emr_cmd = MC_CMD_GET_MAC_ADDRESSES;
  	req.emr_in_buf = payload;
-@@ -313,6 +308,6 @@ efx_mcdi_get_mac_address_vf(
+@@ -307,6 +302,6 @@ efx_mcdi_get_mac_address_vf(
  {
  	efx_mcdi_req_t req;
 -	uint8_t payload[MAX(MC_CMD_VPORT_GET_MAC_ADDRESSES_IN_LEN,
@@ -320,13 +321,13 @@
 +		MC_CMD_VPORT_GET_MAC_ADDRESSES_OUT_LENMAX);
  	efx_rc_t rc;
  
-@@ -321,5 +316,4 @@ efx_mcdi_get_mac_address_vf(
+@@ -315,5 +310,4 @@ efx_mcdi_get_mac_address_vf(
  	    enp->en_family == EFX_FAMILY_MEDFORD2);
  
 -	(void) memset(payload, 0, sizeof (payload));
  	req.emr_cmd = MC_CMD_VPORT_GET_MAC_ADDRESSES;
  	req.emr_in_buf = payload;
-@@ -378,6 +372,6 @@ efx_mcdi_get_clock(
+@@ -372,6 +366,6 @@ efx_mcdi_get_clock(
  {
  	efx_mcdi_req_t req;
 -	uint8_t payload[MAX(MC_CMD_GET_CLOCK_IN_LEN,
@@ -335,13 +336,13 @@
 +		MC_CMD_GET_CLOCK_OUT_LEN);
  	efx_rc_t rc;
  
-@@ -386,5 +380,4 @@ efx_mcdi_get_clock(
+@@ -380,5 +374,4 @@ efx_mcdi_get_clock(
  	    enp->en_family == EFX_FAMILY_MEDFORD2);
  
 -	(void) memset(payload, 0, sizeof (payload));
  	req.emr_cmd = MC_CMD_GET_CLOCK;
  	req.emr_in_buf = payload;
-@@ -436,10 +429,9 @@ efx_mcdi_get_rxdp_config(
+@@ -430,10 +423,9 @@ efx_mcdi_get_rxdp_config(
  {
  	efx_mcdi_req_t req;
 -	uint8_t payload[MAX(MC_CMD_GET_RXDP_CONFIG_IN_LEN,
@@ -354,7 +355,7 @@
 -	memset(payload, 0, sizeof (payload));
  	req.emr_cmd = MC_CMD_GET_RXDP_CONFIG;
  	req.emr_in_buf = payload;
-@@ -496,9 +488,8 @@ efx_mcdi_get_vector_cfg(
+@@ -490,9 +482,8 @@ efx_mcdi_get_vector_cfg(
  {
  	efx_mcdi_req_t req;
 -	uint8_t payload[MAX(MC_CMD_GET_VECTOR_CFG_IN_LEN,
@@ -366,7 +367,7 @@
 -	(void) memset(payload, 0, sizeof (payload));
  	req.emr_cmd = MC_CMD_GET_VECTOR_CFG;
  	req.emr_in_buf = payload;
-@@ -546,6 +537,6 @@ efx_mcdi_alloc_vis(
+@@ -540,6 +531,6 @@ efx_mcdi_alloc_vis(
  {
  	efx_mcdi_req_t req;
 -	uint8_t payload[MAX(MC_CMD_ALLOC_VIS_IN_LEN,
@@ -375,13 +376,13 @@
 +		MC_CMD_ALLOC_VIS_EXT_OUT_LEN);
  	efx_rc_t rc;
  
-@@ -555,5 +546,4 @@ efx_mcdi_alloc_vis(
+@@ -549,5 +540,4 @@ efx_mcdi_alloc_vis(
  	}
  
 -	(void) memset(payload, 0, sizeof (payload));
  	req.emr_cmd = MC_CMD_ALLOC_VIS;
  	req.emr_in_buf = payload;
-@@ -638,6 +628,6 @@ efx_mcdi_alloc_piobuf(
+@@ -632,6 +622,6 @@ efx_mcdi_alloc_piobuf(
  {
  	efx_mcdi_req_t req;
 -	uint8_t payload[MAX(MC_CMD_ALLOC_PIOBUF_IN_LEN,
@@ -390,13 +391,13 @@
 +		MC_CMD_ALLOC_PIOBUF_OUT_LEN);
  	efx_rc_t rc;
  
-@@ -647,5 +637,4 @@ efx_mcdi_alloc_piobuf(
+@@ -641,5 +631,4 @@ efx_mcdi_alloc_piobuf(
  	}
  
 -	(void) memset(payload, 0, sizeof (payload));
  	req.emr_cmd = MC_CMD_ALLOC_PIOBUF;
  	req.emr_in_buf = payload;
-@@ -686,9 +675,8 @@ efx_mcdi_free_piobuf(
+@@ -680,9 +669,8 @@ efx_mcdi_free_piobuf(
  {
  	efx_mcdi_req_t req;
 -	uint8_t payload[MAX(MC_CMD_FREE_PIOBUF_IN_LEN,
@@ -408,7 +409,7 @@
 -	(void) memset(payload, 0, sizeof (payload));
  	req.emr_cmd = MC_CMD_FREE_PIOBUF;
  	req.emr_in_buf = payload;
-@@ -721,9 +709,8 @@ efx_mcdi_link_piobuf(
+@@ -715,9 +703,8 @@ efx_mcdi_link_piobuf(
  {
  	efx_mcdi_req_t req;
 -	uint8_t payload[MAX(MC_CMD_LINK_PIOBUF_IN_LEN,
@@ -420,7 +421,7 @@
 -	(void) memset(payload, 0, sizeof (payload));
  	req.emr_cmd = MC_CMD_LINK_PIOBUF;
  	req.emr_in_buf = payload;
-@@ -756,9 +743,8 @@ efx_mcdi_unlink_piobuf(
+@@ -750,9 +737,8 @@ efx_mcdi_unlink_piobuf(
  {
  	efx_mcdi_req_t req;
 -	uint8_t payload[MAX(MC_CMD_UNLINK_PIOBUF_IN_LEN,
@@ -432,7 +433,7 @@
 -	(void) memset(payload, 0, sizeof (payload));
  	req.emr_cmd = MC_CMD_UNLINK_PIOBUF;
  	req.emr_in_buf = payload;
-@@ -958,9 +944,8 @@ ef10_mcdi_get_pf_count(
+@@ -952,9 +938,8 @@ ef10_mcdi_get_pf_count(
  {
  	efx_mcdi_req_t req;
 -	uint8_t payload[MAX(MC_CMD_GET_PF_COUNT_IN_LEN,
@@ -444,7 +445,7 @@
 -	(void) memset(payload, 0, sizeof (payload));
  	req.emr_cmd = MC_CMD_GET_PF_COUNT;
  	req.emr_in_buf = payload;
-@@ -1002,6 +987,6 @@ ef10_get_datapath_caps(
+@@ -996,6 +981,6 @@ ef10_get_datapath_caps(
  	efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
  	efx_mcdi_req_t req;
 -	uint8_t payload[MAX(MC_CMD_GET_CAPABILITIES_IN_LEN,
@@ -453,13 +454,13 @@
 +		MC_CMD_GET_CAPABILITIES_V5_OUT_LEN);
  	efx_rc_t rc;
  
-@@ -1010,5 +995,4 @@ ef10_get_datapath_caps(
+@@ -1004,5 +989,4 @@ ef10_get_datapath_caps(
  
  
 -	(void) memset(payload, 0, sizeof (payload));
  	req.emr_cmd = MC_CMD_GET_CAPABILITIES;
  	req.emr_in_buf = payload;
-@@ -2047,6 +2031,6 @@ ef10_nic_reset(
+@@ -2040,6 +2024,6 @@ ef10_nic_reset(
  {
  	efx_mcdi_req_t req;
 -	uint8_t payload[MAX(MC_CMD_ENTITY_RESET_IN_LEN,
@@ -468,13 +469,13 @@
 +		MC_CMD_ENTITY_RESET_OUT_LEN);
  	efx_rc_t rc;
  
-@@ -2057,5 +2041,4 @@ ef10_nic_reset(
+@@ -2050,5 +2034,4 @@ ef10_nic_reset(
  		goto fail2;
  
 -	(void) memset(payload, 0, sizeof (payload));
  	req.emr_cmd = MC_CMD_ENTITY_RESET;
  	req.emr_in_buf = payload;
-@@ -2394,9 +2377,8 @@ efx_mcdi_get_nic_global(
+@@ -2387,9 +2370,8 @@ efx_mcdi_get_nic_global(
  {
  	efx_mcdi_req_t req;
 -	uint8_t payload[MAX(MC_CMD_GET_NIC_GLOBAL_IN_LEN,
@@ -486,7 +487,7 @@
 -	(void) memset(payload, 0, sizeof (payload));
  	req.emr_cmd = MC_CMD_GET_NIC_GLOBAL;
  	req.emr_in_buf = payload;
-@@ -2438,8 +2420,7 @@ efx_mcdi_set_nic_global(
+@@ -2431,8 +2413,7 @@ efx_mcdi_set_nic_global(
  {
  	efx_mcdi_req_t req;
 -	uint8_t payload[MC_CMD_SET_NIC_GLOBAL_IN_LEN];
@@ -661,7 +662,7 @@
  	req.emr_cmd = MC_CMD_RSS_CONTEXT_SET_TABLE;
  	req.emr_in_buf = payload;
 diff --git a/drivers/net/sfc/base/ef10_tx.c b/drivers/net/sfc/base/ef10_tx.c
-index 4d77d76d7..5f3df42b9 100644
+index e74d39540..20816f2fc 100644
 --- a/drivers/net/sfc/base/ef10_tx.c
 +++ b/drivers/net/sfc/base/ef10_tx.c
 @@ -32,6 +32,6 @@ efx_mcdi_init_txq(
@@ -692,7 +693,7 @@
  	req.emr_cmd = MC_CMD_FINI_TXQ;
  	req.emr_in_buf = payload;
 diff --git a/drivers/net/sfc/base/efx_lic.c b/drivers/net/sfc/base/efx_lic.c
-index 2b06e2d1e..2a6da2647 100644
+index 49c00347f..1ca1bf477 100644
 --- a/drivers/net/sfc/base/efx_lic.c
 +++ b/drivers/net/sfc/base/efx_lic.c
 @@ -302,10 +302,9 @@ efx_mcdi_fc_license_update_license(
@@ -1032,10 +1033,10 @@
  	req.emr_cmd = MC_CMD_GET_PHY_MEDIA_INFO;
  	req.emr_in_buf = payload;
 diff --git a/drivers/net/sfc/base/efx_mcdi.h b/drivers/net/sfc/base/efx_mcdi.h
-index d2cd1e9e1..40072405e 100644
+index 253a9e60b..d2685abc9 100644
 --- a/drivers/net/sfc/base/efx_mcdi.h
 +++ b/drivers/net/sfc/base/efx_mcdi.h
-@@ -385,4 +385,15 @@ efx_mcdi_phy_module_get_info(
+@@ -381,4 +381,15 @@ efx_mcdi_phy_module_get_info(
  	(MC_CMD_PRIVILEGE_MASK_IN_GRP_ ## priv))
  
 +/*
@@ -1070,7 +1071,7 @@
  	req.emr_cmd = MC_CMD_GET_LOOPBACK_MODES;
  	req.emr_in_buf = payload;
 diff --git a/drivers/net/sfc/base/efx_nvram.c b/drivers/net/sfc/base/efx_nvram.c
-index d7b1a6778..5296c59b8 100644
+index f9a6ee585..fdab7aafa 100644
 --- a/drivers/net/sfc/base/efx_nvram.c
 +++ b/drivers/net/sfc/base/efx_nvram.c
 @@ -515,10 +515,9 @@ efx_mcdi_nvram_partitions(
@@ -1198,10 +1199,10 @@
  	req.emr_cmd = MC_CMD_SET_TUNNEL_ENCAP_UDP_PORTS;
  	req.emr_in_buf = payload;
 diff --git a/drivers/net/sfc/base/mcdi_mon.c b/drivers/net/sfc/base/mcdi_mon.c
-index 0e860168a..b53de0d68 100644
+index 54f7ae5db..2fb1b8e35 100644
 --- a/drivers/net/sfc/base/mcdi_mon.c
 +++ b/drivers/net/sfc/base/mcdi_mon.c
-@@ -192,6 +192,6 @@ efx_mcdi_read_sensors(
+@@ -299,6 +299,6 @@ efx_mcdi_read_sensors(
  {
  	efx_mcdi_req_t req;
 -	uint8_t payload[MAX(MC_CMD_READ_SENSORS_EXT_IN_LEN,
@@ -1210,7 +1211,7 @@
 +		MC_CMD_READ_SENSORS_EXT_OUT_LEN);
  	uint32_t addr_lo, addr_hi;
  	efx_rc_t rc;
-@@ -231,6 +231,6 @@ efx_mcdi_sensor_info_npages(
+@@ -338,6 +338,6 @@ efx_mcdi_sensor_info_npages(
  {
  	efx_mcdi_req_t req;
 -	uint8_t payload[MAX(MC_CMD_SENSOR_INFO_EXT_IN_LEN,
@@ -1219,7 +1220,7 @@
 +		MC_CMD_SENSOR_INFO_OUT_LENMAX);
  	int page;
  	efx_rc_t rc;
-@@ -275,6 +275,6 @@ efx_mcdi_sensor_info(
+@@ -382,6 +382,6 @@ efx_mcdi_sensor_info(
  {
  	efx_mcdi_req_t req;
 -	uint8_t payload[MAX(MC_CMD_SENSOR_INFO_EXT_IN_LEN,
@@ -1228,21 +1229,6 @@
 +		MC_CMD_SENSOR_INFO_OUT_LENMAX);
  	uint32_t page;
  	efx_rc_t rc;
-@@ -344,6 +344,6 @@ efx_mcdi_sensor_info_page(
- {
- 	efx_mcdi_req_t req;
--	uint8_t payload[MAX(MC_CMD_SENSOR_INFO_EXT_IN_LEN,
--		MC_CMD_SENSOR_INFO_OUT_LENMAX)];
-+	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_SENSOR_INFO_EXT_IN_LEN,
-+		MC_CMD_SENSOR_INFO_OUT_LENMAX);
- 	efx_rc_t rc;
- 	uint32_t mask_copy;
-@@ -357,5 +357,4 @@ efx_mcdi_sensor_info_page(
- 	    ((sizeof (*mask_part) * 8) - 1) * sizeof (efx_mon_stat_limits_t));
- 
--	(void) memset(payload, 0, sizeof (payload));
- 	req.emr_cmd = MC_CMD_SENSOR_INFO;
- 	req.emr_in_buf = payload;
 diff --git a/drivers/net/sfc/base/siena_mac.c b/drivers/net/sfc/base/siena_mac.c
 index f8857cdd5..928dfc340 100644
 --- a/drivers/net/sfc/base/siena_mac.c

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

* [dpdk-stable] patch 'net/sfc/base: fix ID retrieval in v3 licensing' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (10 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: fix out of bounds read when dereferencing sdup' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: prevent access to the NIC config before probe' " Kevin Traynor
                   ` (36 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Andy Moreton; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From be987c78a6c018b7b484004bdefa63d96113ba22 Mon Sep 17 00:00:00 2001
From: Andy Moreton <amoreton@solarflare.com>
Date: Mon, 10 Sep 2018 10:33:25 +0100
Subject: [PATCH] net/sfc/base: fix ID retrieval in v3 licensing

[ upstream commit 416aa7f1c98acfaf996a54f63fd2a02dc5ef3a73 ]

Fixes: 05fce2ce8451 ("net/sfc/base: import libefx licensing")
Fixes: f67e4719147d ("net/sfc/base: fix coding style")

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/efx_lic.c | 39 ++++++++--------------------------
 1 file changed, 9 insertions(+), 30 deletions(-)

diff --git a/drivers/net/sfc/base/efx_lic.c b/drivers/net/sfc/base/efx_lic.c
index 1ca1bf477..e2097b6b4 100644
--- a/drivers/net/sfc/base/efx_lic.c
+++ b/drivers/net/sfc/base/efx_lic.c
@@ -984,24 +984,12 @@ efx_mcdi_licensing_v3_get_id(
 	efx_mcdi_req_t req;
 	EFX_MCDI_DECLARE_BUF(payload, MC_CMD_LICENSING_GET_ID_V3_IN_LEN,
-		MC_CMD_LICENSING_GET_ID_V3_OUT_LENMIN);
+		MC_CMD_LICENSING_GET_ID_V3_OUT_LENMAX);
 	efx_rc_t rc;
 
 	req.emr_cmd = MC_CMD_LICENSING_GET_ID_V3;
-
-	if (bufferp == NULL) {
-		/* Request id type and length only */
-		req.emr_in_buf = bufferp;
-		req.emr_in_length = MC_CMD_LICENSING_GET_ID_V3_IN_LEN;
-		req.emr_out_buf = bufferp;
-		req.emr_out_length = MC_CMD_LICENSING_GET_ID_V3_OUT_LENMIN;
-	} else {
-		/* Request full buffer */
-		req.emr_in_buf = bufferp;
-		req.emr_in_length = MC_CMD_LICENSING_GET_ID_V3_IN_LEN;
-		req.emr_out_buf = bufferp;
-		req.emr_out_length =
-		    MIN(buffer_size, MC_CMD_LICENSING_GET_ID_V3_OUT_LENMAX);
-		(void) memset(bufferp, 0, req.emr_out_length);
-	}
+	req.emr_in_buf = payload;
+	req.emr_in_length = MC_CMD_LICENSING_GET_ID_V3_IN_LEN;
+	req.emr_out_buf = payload;
+	req.emr_out_length = MC_CMD_LICENSING_GET_ID_V3_OUT_LENMAX;
 
 	efx_mcdi_execute_quiet(enp, &req);
@@ -1021,17 +1009,8 @@ efx_mcdi_licensing_v3_get_id(
 	    MCDI_OUT_DWORD(req, LICENSING_GET_ID_V3_OUT_LICENSE_ID_LENGTH);
 
-	if (bufferp == NULL) {
-		/*
-		 * Modify length requirements to indicate to caller the extra
-		 * buffering needed to read the complete output.
-		 */
-		*lengthp += MC_CMD_LICENSING_GET_ID_V3_OUT_LENMIN;
-	} else {
-		/* Shift ID down to start of buffer */
-		memmove(bufferp,
-		    bufferp + MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_ID_OFST,
-		    *lengthp);
-		memset(bufferp + (*lengthp), 0,
-		    MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_ID_OFST);
+	if (bufferp != NULL) {
+		memcpy(bufferp,
+		    payload + MC_CMD_LICENSING_GET_ID_V3_OUT_LICENSE_ID_OFST,
+		    MIN(buffer_size, *lengthp));
 	}
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:13.961806814 +0000
+++ 0013-net-sfc-base-fix-ID-retrieval-in-v3-licensing.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,11 +1,12 @@
-From 416aa7f1c98acfaf996a54f63fd2a02dc5ef3a73 Mon Sep 17 00:00:00 2001
+From be987c78a6c018b7b484004bdefa63d96113ba22 Mon Sep 17 00:00:00 2001
 From: Andy Moreton <amoreton@solarflare.com>
 Date: Mon, 10 Sep 2018 10:33:25 +0100
 Subject: [PATCH] net/sfc/base: fix ID retrieval in v3 licensing
 
+[ upstream commit 416aa7f1c98acfaf996a54f63fd2a02dc5ef3a73 ]
+
 Fixes: 05fce2ce8451 ("net/sfc/base: import libefx licensing")
 Fixes: f67e4719147d ("net/sfc/base: fix coding style")
-Cc: stable@dpdk.org
 
 Signed-off-by: Andy Moreton <amoreton@solarflare.com>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -14,7 +15,7 @@
  1 file changed, 9 insertions(+), 30 deletions(-)
 
 diff --git a/drivers/net/sfc/base/efx_lic.c b/drivers/net/sfc/base/efx_lic.c
-index 2a6da2647..4081aef1b 100644
+index 1ca1bf477..e2097b6b4 100644
 --- a/drivers/net/sfc/base/efx_lic.c
 +++ b/drivers/net/sfc/base/efx_lic.c
 @@ -984,24 +984,12 @@ efx_mcdi_licensing_v3_get_id(

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

* [dpdk-stable] patch 'net/sfc/base: prevent access to the NIC config before probe' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (11 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: fix ID retrieval in v3 licensing' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: fix name of the argument to store RSS flags' " Kevin Traynor
                   ` (35 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Mark Spender; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 52fc777ba25ee3250f1ca646bb794a702f296ae4 Mon Sep 17 00:00:00 2001
From: Mark Spender <mspender@solarflare.com>
Date: Mon, 10 Sep 2018 10:33:26 +0100
Subject: [PATCH] net/sfc/base: prevent access to the NIC config before probe

[ upstream commit f78fb0a8e1c78cc3ffcdd0a6b72f6aa200e980ee ]

NIC config is initialized during NIC probe.

Fixes: 19b64c6ac35f ("net/sfc/base: import libefx base")

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/efx_nic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/sfc/base/efx_nic.c b/drivers/net/sfc/base/efx_nic.c
index c364bffba..3253b441b 100644
--- a/drivers/net/sfc/base/efx_nic.c
+++ b/drivers/net/sfc/base/efx_nic.c
@@ -588,4 +588,5 @@ efx_nic_cfg_get(
 {
 	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
+	EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);
 
 	return (&(enp->en_nic_cfg));
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:13.986305249 +0000
+++ 0014-net-sfc-base-prevent-access-to-the-NIC-config-before.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,12 +1,13 @@
-From f78fb0a8e1c78cc3ffcdd0a6b72f6aa200e980ee Mon Sep 17 00:00:00 2001
+From 52fc777ba25ee3250f1ca646bb794a702f296ae4 Mon Sep 17 00:00:00 2001
 From: Mark Spender <mspender@solarflare.com>
 Date: Mon, 10 Sep 2018 10:33:26 +0100
 Subject: [PATCH] net/sfc/base: prevent access to the NIC config before probe
 
+[ upstream commit f78fb0a8e1c78cc3ffcdd0a6b72f6aa200e980ee ]
+
 NIC config is initialized during NIC probe.
 
 Fixes: 19b64c6ac35f ("net/sfc/base: import libefx base")
-Cc: stable@dpdk.org
 
 Signed-off-by: Mark Spender <mspender@solarflare.com>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -15,10 +16,10 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/drivers/net/sfc/base/efx_nic.c b/drivers/net/sfc/base/efx_nic.c
-index e5cb0105f..cea32b792 100644
+index c364bffba..3253b441b 100644
 --- a/drivers/net/sfc/base/efx_nic.c
 +++ b/drivers/net/sfc/base/efx_nic.c
-@@ -596,4 +596,5 @@ efx_nic_cfg_get(
+@@ -588,4 +588,5 @@ efx_nic_cfg_get(
  {
  	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
 +	EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);

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

* [dpdk-stable] patch 'net/sfc/base: fix name of the argument to store RSS flags' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (12 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: prevent access to the NIC config before probe' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: fix a typo in unicast filter insertion comment' " Kevin Traynor
                   ` (34 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Ivan Malov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 783dd59cf14af20497c4bff44f1ecfc6bcb52f2d Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Mon, 10 Sep 2018 10:33:27 +0100
Subject: [PATCH] net/sfc/base: fix name of the argument to store RSS flags

[ upstream commit e7feaba71c02418796afbe4356840e725ca6df6b ]

The function used to retrieve supported RSS flags has an
argument which should be named properly to indicate
that it's a pointer.

Fixes: 613cbe75ae99 ("net/sfc/base: add a new means to control RSS hash")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/efx.h    | 2 +-
 drivers/net/sfc/base/efx_rx.c | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/sfc/base/efx.h b/drivers/net/sfc/base/efx.h
index 53cbc9858..24fdd867d 100644
--- a/drivers/net/sfc/base/efx.h
+++ b/drivers/net/sfc/base/efx.h
@@ -2225,5 +2225,5 @@ efx_rx_scale_hash_flags_get(
 	__in					efx_nic_t *enp,
 	__in					efx_rx_hash_alg_t hash_alg,
-	__inout_ecount(EFX_RX_HASH_NFLAGS)	unsigned int *flags,
+	__inout_ecount(EFX_RX_HASH_NFLAGS)	unsigned int *flagsp,
 	__out					unsigned int *nflagsp);
 
diff --git a/drivers/net/sfc/base/efx_rx.c b/drivers/net/sfc/base/efx_rx.c
index 09933b41a..7b9f28664 100644
--- a/drivers/net/sfc/base/efx_rx.c
+++ b/drivers/net/sfc/base/efx_rx.c
@@ -299,5 +299,5 @@ efx_rx_scale_hash_flags_get(
 	__in					efx_nic_t *enp,
 	__in					efx_rx_hash_alg_t hash_alg,
-	__inout_ecount(EFX_RX_HASH_NFLAGS)	unsigned int *flags,
+	__inout_ecount(EFX_RX_HASH_NFLAGS)	unsigned int *flagsp,
 	__out					unsigned int *nflagsp)
 {
@@ -305,8 +305,8 @@ efx_rx_scale_hash_flags_get(
 	boolean_t l4;
 	boolean_t additional_modes;
-	unsigned int *entryp = flags;
+	unsigned int *entryp = flagsp;
 	efx_rc_t rc;
 
-	if (flags == NULL || nflagsp == NULL) {
+	if (flagsp == NULL || nflagsp == NULL) {
 		rc = EINVAL;
 		goto fail1;
@@ -369,5 +369,5 @@ efx_rx_scale_hash_flags_get(
 #undef LIST_FLAGS
 
-	*nflagsp = (unsigned int)(entryp - flags);
+	*nflagsp = (unsigned int)(entryp - flagsp);
 	EFSYS_ASSERT3U(*nflagsp, <=, EFX_RX_HASH_NFLAGS);
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.010150706 +0000
+++ 0015-net-sfc-base-fix-name-of-the-argument-to-store-RSS-f.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,14 +1,15 @@
-From e7feaba71c02418796afbe4356840e725ca6df6b Mon Sep 17 00:00:00 2001
+From 783dd59cf14af20497c4bff44f1ecfc6bcb52f2d Mon Sep 17 00:00:00 2001
 From: Ivan Malov <ivan.malov@oktetlabs.ru>
 Date: Mon, 10 Sep 2018 10:33:27 +0100
 Subject: [PATCH] net/sfc/base: fix name of the argument to store RSS flags
 
+[ upstream commit e7feaba71c02418796afbe4356840e725ca6df6b ]
+
 The function used to retrieve supported RSS flags has an
 argument which should be named properly to indicate
 that it's a pointer.
 
 Fixes: 613cbe75ae99 ("net/sfc/base: add a new means to control RSS hash")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -18,10 +19,10 @@
  2 files changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/net/sfc/base/efx.h b/drivers/net/sfc/base/efx.h
-index 0982a34d6..15b3882dd 100644
+index 53cbc9858..24fdd867d 100644
 --- a/drivers/net/sfc/base/efx.h
 +++ b/drivers/net/sfc/base/efx.h
-@@ -2369,5 +2369,5 @@ efx_rx_scale_hash_flags_get(
+@@ -2225,5 +2225,5 @@ efx_rx_scale_hash_flags_get(
  	__in					efx_nic_t *enp,
  	__in					efx_rx_hash_alg_t hash_alg,
 -	__inout_ecount(EFX_RX_HASH_NFLAGS)	unsigned int *flags,

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

* [dpdk-stable] patch 'net/sfc/base: fix a typo in unicast filter insertion comment' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (13 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: fix name of the argument to store RSS flags' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: fix MAC Tx stats for less or equal to 64 bytes' " Kevin Traynor
                   ` (33 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Ivan Malov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 3f228e701eacb1cb3ef4ae5db7acff9fa42756e5 Mon Sep 17 00:00:00 2001
From: Ivan Malov <ivan.malov@oktetlabs.ru>
Date: Mon, 10 Sep 2018 10:33:28 +0100
Subject: [PATCH] net/sfc/base: fix a typo in unicast filter insertion comment

[ upstream commit 9673e044a1593a2f62557095e6aa37ec197a04fb ]

Fixes: e7cd430c864f ("net/sfc/base: import SFN7xxx family support")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/ef10_filter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/base/ef10_filter.c b/drivers/net/sfc/base/ef10_filter.c
index 30a4892df..afe4064d9 100644
--- a/drivers/net/sfc/base/ef10_filter.c
+++ b/drivers/net/sfc/base/ef10_filter.c
@@ -1579,5 +1579,5 @@ ef10_filter_reconfigure(
 	 * Insert or renew unicast filters.
 	 *
-	 * Frimware does not perform chaining on unicast filters. As traffic is
+	 * Firmware does not perform chaining on unicast filters. As traffic is
 	 * therefore only delivered to the first matching filter, we should
 	 * always insert the specific filter for our MAC address, to try and
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.035976573 +0000
+++ 0016-net-sfc-base-fix-a-typo-in-unicast-filter-insertion-.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,10 +1,11 @@
-From 9673e044a1593a2f62557095e6aa37ec197a04fb Mon Sep 17 00:00:00 2001
+From 3f228e701eacb1cb3ef4ae5db7acff9fa42756e5 Mon Sep 17 00:00:00 2001
 From: Ivan Malov <ivan.malov@oktetlabs.ru>
 Date: Mon, 10 Sep 2018 10:33:28 +0100
 Subject: [PATCH] net/sfc/base: fix a typo in unicast filter insertion comment
 
+[ upstream commit 9673e044a1593a2f62557095e6aa37ec197a04fb ]
+
 Fixes: e7cd430c864f ("net/sfc/base: import SFN7xxx family support")
-Cc: stable@dpdk.org
 
 Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

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

* [dpdk-stable] patch 'net/sfc/base: fix MAC Tx stats for less or equal to 64 bytes' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (14 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: fix a typo in unicast filter insertion comment' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc: fix an Rx queue double release possibility' " Kevin Traynor
                   ` (32 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Andy Moreton; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 471664142365f05056f8f4e892c1fc3e91e683db Mon Sep 17 00:00:00 2001
From: Andy Moreton <amoreton@solarflare.com>
Date: Mon, 10 Sep 2018 10:33:35 +0100
Subject: [PATCH] net/sfc/base: fix MAC Tx stats for less or equal to 64 bytes

[ upstream commit 42f235911a613b339b3b6597fd0b998321c2ce22 ]

This statistic should include 64byte and smaller frames.
Fix EF10 calculation to match Siena code.

Fixes: 8c7c723dfe7c ("net/sfc/base: import MAC statistics")

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/ef10_mac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/base/ef10_mac.c b/drivers/net/sfc/base/ef10_mac.c
index a4a6d9ec8..ab73828f1 100644
--- a/drivers/net/sfc/base/ef10_mac.c
+++ b/drivers/net/sfc/base/ef10_mac.c
@@ -651,5 +651,5 @@ ef10_mac_stats_update(
 	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_TX_LE_64_PKTS]), &value);
 	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_64_PKTS, &value);
-	EFSYS_STAT_SET_QWORD(&(stat[EFX_MAC_TX_LE_64_PKTS]), &value);
+	EFSYS_STAT_INCR_QWORD(&(stat[EFX_MAC_TX_LE_64_PKTS]), &value);
 
 	EF10_MAC_STAT_READ(esmp, MC_CMD_MAC_TX_65_TO_127_PKTS, &value);
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.062270446 +0000
+++ 0017-net-sfc-base-fix-MAC-Tx-stats-for-less-or-equal-to-6.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,13 +1,14 @@
-From 42f235911a613b339b3b6597fd0b998321c2ce22 Mon Sep 17 00:00:00 2001
+From 471664142365f05056f8f4e892c1fc3e91e683db Mon Sep 17 00:00:00 2001
 From: Andy Moreton <amoreton@solarflare.com>
 Date: Mon, 10 Sep 2018 10:33:35 +0100
 Subject: [PATCH] net/sfc/base: fix MAC Tx stats for less or equal to 64 bytes
 
+[ upstream commit 42f235911a613b339b3b6597fd0b998321c2ce22 ]
+
 This statistic should include 64byte and smaller frames.
 Fix EF10 calculation to match Siena code.
 
 Fixes: 8c7c723dfe7c ("net/sfc/base: import MAC statistics")
-Cc: stable@dpdk.org
 
 Signed-off-by: Andy Moreton <amoreton@solarflare.com>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

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

* [dpdk-stable] patch 'net/sfc: fix an Rx queue double release possibility' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (15 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: fix MAC Tx stats for less or equal to 64 bytes' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc: fix a Tx " Kevin Traynor
                   ` (31 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Igor Romanov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 0a43a68d47396224b28dd3a10c5088c755cc4b69 Mon Sep 17 00:00:00 2001
From: Igor Romanov <igor.romanov@oktetlabs.ru>
Date: Fri, 14 Sep 2018 08:31:35 +0100
Subject: [PATCH] net/sfc: fix an Rx queue double release possibility

[ upstream commit 7eb7588c99ab5fd0f31032b29cac74b57e1de2ff ]

There are two function that call sfc_rx_qfini():
sfc_rx_fini_queues() and sfc_rx_queue_release(). But only
sfc_rx_queue_release() sets rx_queues pointer of the device data to NULL.
It may lead to the scenario in which a queue is destroyed by
sfc_rx_fini_queues() and after the queue is attempted to be destroyed again
by sfc_rx_queue_release().

Move NULL assignment to sfc_rx_qfini().

Fixes: ce35b05c635e ("net/sfc: implement Rx queue setup release operations")

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_ethdev.c | 2 --
 drivers/net/sfc/sfc_rx.c     | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 9decbf5af..d35187a3a 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -442,6 +442,4 @@ sfc_rx_queue_release(void *queue)
 	sfc_log_init(sa, "RxQ=%u", sw_index);
 
-	sa->eth_dev->data->rx_queues[sw_index] = NULL;
-
 	sfc_rx_qfini(sa, sw_index);
 
diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
index d8503e201..311b8d9df 100644
--- a/drivers/net/sfc/sfc_rx.c
+++ b/drivers/net/sfc/sfc_rx.c
@@ -1104,4 +1104,5 @@ sfc_rx_qfini(struct sfc_adapter *sa, unsigned int sw_index)
 
 	SFC_ASSERT(sw_index < sa->rxq_count);
+	sa->eth_dev->data->rx_queues[sw_index] = NULL;
 
 	rxq_info = &sa->rxq_info[sw_index];
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.086953252 +0000
+++ 0018-net-sfc-fix-an-Rx-queue-double-release-possibility.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,8 +1,10 @@
-From 7eb7588c99ab5fd0f31032b29cac74b57e1de2ff Mon Sep 17 00:00:00 2001
+From 0a43a68d47396224b28dd3a10c5088c755cc4b69 Mon Sep 17 00:00:00 2001
 From: Igor Romanov <igor.romanov@oktetlabs.ru>
 Date: Fri, 14 Sep 2018 08:31:35 +0100
 Subject: [PATCH] net/sfc: fix an Rx queue double release possibility
 
+[ upstream commit 7eb7588c99ab5fd0f31032b29cac74b57e1de2ff ]
+
 There are two function that call sfc_rx_qfini():
 sfc_rx_fini_queues() and sfc_rx_queue_release(). But only
 sfc_rx_queue_release() sets rx_queues pointer of the device data to NULL.
@@ -13,7 +15,6 @@
 Move NULL assignment to sfc_rx_qfini().
 
 Fixes: ce35b05c635e ("net/sfc: implement Rx queue setup release operations")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -23,10 +24,10 @@
  2 files changed, 1 insertion(+), 2 deletions(-)
 
 diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
-index 435bde67f..23778c9f3 100644
+index 9decbf5af..d35187a3a 100644
 --- a/drivers/net/sfc/sfc_ethdev.c
 +++ b/drivers/net/sfc/sfc_ethdev.c
-@@ -445,6 +445,4 @@ sfc_rx_queue_release(void *queue)
+@@ -442,6 +442,4 @@ sfc_rx_queue_release(void *queue)
  	sfc_log_init(sa, "RxQ=%u", sw_index);
  
 -	sa->eth_dev->data->rx_queues[sw_index] = NULL;
@@ -34,7 +35,7 @@
  	sfc_rx_qfini(sa, sw_index);
  
 diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
-index 338184dda..58c57acfe 100644
+index d8503e201..311b8d9df 100644
 --- a/drivers/net/sfc/sfc_rx.c
 +++ b/drivers/net/sfc/sfc_rx.c
 @@ -1104,4 +1104,5 @@ sfc_rx_qfini(struct sfc_adapter *sa, unsigned int sw_index)

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

* [dpdk-stable] patch 'net/sfc: fix a Tx queue double release possibility' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (16 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc: fix an Rx queue double release possibility' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/e1000: fix missing Tx multi-segs capability' " Kevin Traynor
                   ` (30 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Igor Romanov; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From b6f3cc25414269b602e221c2486448934f71bd01 Mon Sep 17 00:00:00 2001
From: Igor Romanov <igor.romanov@oktetlabs.ru>
Date: Fri, 14 Sep 2018 08:31:36 +0100
Subject: [PATCH] net/sfc: fix a Tx queue double release possibility

[ upstream commit 5d138ef92d47b34af589e49f505fb1bf6db5f09b ]

There are two function that call sfc_tx_qfini():
sfc_tx_fini_queues() and sfc_tx_queue_release(). But only
sfc_tx_queue_release() sets tx_queues pointer of the device data to NULL.
It may lead to the scenario in which a queue is destroyed by
sfc_tx_fini_queues() and after the queue is attempted to be destroyed again
by sfc_tx_queue_release().

Move NULL assignment to sfc_tx_qfini().

Fixes: b1b7ad933b39 ("net/sfc: set up and release Tx queues")

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_ethdev.c | 3 ---
 drivers/net/sfc/sfc_tx.c     | 2 ++
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index d35187a3a..b5ef47296 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -496,7 +496,4 @@ sfc_tx_queue_release(void *queue)
 	sfc_adapter_lock(sa);
 
-	SFC_ASSERT(sw_index < sa->eth_dev->data->nb_tx_queues);
-	sa->eth_dev->data->tx_queues[sw_index] = NULL;
-
 	sfc_tx_qfini(sa, sw_index);
 
diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c
index 6d42a1a65..0c909b1f5 100644
--- a/drivers/net/sfc/sfc_tx.c
+++ b/drivers/net/sfc/sfc_tx.c
@@ -234,4 +234,6 @@ sfc_tx_qfini(struct sfc_adapter *sa, unsigned int sw_index)
 
 	SFC_ASSERT(sw_index < sa->txq_count);
+	sa->eth_dev->data->tx_queues[sw_index] = NULL;
+
 	txq_info = &sa->txq_info[sw_index];
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.112898303 +0000
+++ 0019-net-sfc-fix-a-Tx-queue-double-release-possibility.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,8 +1,10 @@
-From 5d138ef92d47b34af589e49f505fb1bf6db5f09b Mon Sep 17 00:00:00 2001
+From b6f3cc25414269b602e221c2486448934f71bd01 Mon Sep 17 00:00:00 2001
 From: Igor Romanov <igor.romanov@oktetlabs.ru>
 Date: Fri, 14 Sep 2018 08:31:36 +0100
 Subject: [PATCH] net/sfc: fix a Tx queue double release possibility
 
+[ upstream commit 5d138ef92d47b34af589e49f505fb1bf6db5f09b ]
+
 There are two function that call sfc_tx_qfini():
 sfc_tx_fini_queues() and sfc_tx_queue_release(). But only
 sfc_tx_queue_release() sets tx_queues pointer of the device data to NULL.
@@ -13,7 +15,6 @@
 Move NULL assignment to sfc_tx_qfini().
 
 Fixes: b1b7ad933b39 ("net/sfc: set up and release Tx queues")
-Cc: stable@dpdk.org
 
 Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -23,10 +24,10 @@
  2 files changed, 2 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
-index 23778c9f3..93bfecc4e 100644
+index d35187a3a..b5ef47296 100644
 --- a/drivers/net/sfc/sfc_ethdev.c
 +++ b/drivers/net/sfc/sfc_ethdev.c
-@@ -499,7 +499,4 @@ sfc_tx_queue_release(void *queue)
+@@ -496,7 +496,4 @@ sfc_tx_queue_release(void *queue)
  	sfc_adapter_lock(sa);
  
 -	SFC_ASSERT(sw_index < sa->eth_dev->data->nb_tx_queues);
@@ -35,7 +36,7 @@
  	sfc_tx_qfini(sa, sw_index);
  
 diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c
-index 8af08b37c..12665d813 100644
+index 6d42a1a65..0c909b1f5 100644
 --- a/drivers/net/sfc/sfc_tx.c
 +++ b/drivers/net/sfc/sfc_tx.c
 @@ -234,4 +234,6 @@ sfc_tx_qfini(struct sfc_adapter *sa, unsigned int sw_index)

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

* [dpdk-stable] patch 'net/e1000: fix missing Tx multi-segs capability' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (17 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc: fix a Tx " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/fm10k: " Kevin Traynor
                   ` (29 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Didier Pallard; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From fd6ec96af73718b8f5f0bf6df7e98048cb072dd5 Mon Sep 17 00:00:00 2001
From: Didier Pallard <didier.pallard@6wind.com>
Date: Wed, 19 Sep 2018 17:04:06 +0200
Subject: [PATCH] net/e1000: fix missing Tx multi-segs capability

[ upstream commit a6607ae14c15158f082a8a620007b573d40aed11 ]

In former API, ETH_TXQ_FLAGS_NOMULTSEGS was merely a hint indicating
that application will never send multisegmented packets, allowing
pmd to choose different tx methods accordingly.
In new API, DEV_TX_OFFLOAD_MULTI_SEGS became an offload capability
that is advertised by pmds, some of them do not advertise it and
expect to never receive fragmented packets (octeontx, axgbe)
So an ethdev that supports multisegmented packets should properly
advertise it.

Fixes: e5c05e6590ea ("net/e1000: convert to new Tx offloads API")

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 drivers/net/e1000/em_rxtx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
index 7d2ac4eb7..5860e93d5 100644
--- a/drivers/net/e1000/em_rxtx.c
+++ b/drivers/net/e1000/em_rxtx.c
@@ -1161,4 +1161,5 @@ em_get_tx_port_offloads_capa(struct rte_eth_dev *dev)
 	RTE_SET_USED(dev);
 	tx_offload_capa =
+		DEV_TX_OFFLOAD_MULTI_SEGS  |
 		DEV_TX_OFFLOAD_VLAN_INSERT |
 		DEV_TX_OFFLOAD_IPV4_CKSUM  |
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.137580855 +0000
+++ 0020-net-e1000-fix-missing-Tx-multi-segs-capability.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,8 +1,10 @@
-From a6607ae14c15158f082a8a620007b573d40aed11 Mon Sep 17 00:00:00 2001
+From fd6ec96af73718b8f5f0bf6df7e98048cb072dd5 Mon Sep 17 00:00:00 2001
 From: Didier Pallard <didier.pallard@6wind.com>
 Date: Wed, 19 Sep 2018 17:04:06 +0200
 Subject: [PATCH] net/e1000: fix missing Tx multi-segs capability
 
+[ upstream commit a6607ae14c15158f082a8a620007b573d40aed11 ]
+
 In former API, ETH_TXQ_FLAGS_NOMULTSEGS was merely a hint indicating
 that application will never send multisegmented packets, allowing
 pmd to choose different tx methods accordingly.
@@ -13,7 +15,6 @@
 advertise it.
 
 Fixes: e5c05e6590ea ("net/e1000: convert to new Tx offloads API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
 Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
@@ -22,7 +23,7 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
-index 1103a1839..087e68304 100644
+index 7d2ac4eb7..5860e93d5 100644
 --- a/drivers/net/e1000/em_rxtx.c
 +++ b/drivers/net/e1000/em_rxtx.c
 @@ -1161,4 +1161,5 @@ em_get_tx_port_offloads_capa(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/fm10k: fix missing Tx multi-segs capability' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (18 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/e1000: fix missing Tx multi-segs capability' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/i40e: " Kevin Traynor
                   ` (28 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Didier Pallard; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 317ec441647fe3d58c05e4746c2fc7b0499fdac4 Mon Sep 17 00:00:00 2001
From: Didier Pallard <didier.pallard@6wind.com>
Date: Wed, 19 Sep 2018 17:04:07 +0200
Subject: [PATCH] net/fm10k: fix missing Tx multi-segs capability

[ upstream commit 310e479b5f517ccabab6ba5a07a99378cf7ab5fd ]

In former API, ETH_TXQ_FLAGS_NOMULTSEGS was merely a hint indicating
that application will never send multisegmented packets, allowing
pmd to choose different tx methods accordingly.
In new API, DEV_TX_OFFLOAD_MULTI_SEGS became an offload capability
that is advertised by pmds, some of them do not advertise it and
expect to never receive fragmented packets (octeontx, axgbe)
So an ethdev that supports multisegmented packets should properly
advertise it.

Problem was spotted and tested on e1000, should be also present in
fm10k.

Fixes: 30f3ce999e6a ("net/fm10k: convert to new Tx offloads API")

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 drivers/net/fm10k/fm10k_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 541a49b75..aebe8b5a5 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -1983,4 +1983,5 @@ static uint64_t fm10k_get_tx_port_offloads_capa(struct rte_eth_dev *dev)
 
 	return (uint64_t)(DEV_TX_OFFLOAD_VLAN_INSERT |
+			  DEV_TX_OFFLOAD_MULTI_SEGS  |
 			  DEV_TX_OFFLOAD_IPV4_CKSUM  |
 			  DEV_TX_OFFLOAD_UDP_CKSUM   |
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.161495984 +0000
+++ 0021-net-fm10k-fix-missing-Tx-multi-segs-capability.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,8 +1,10 @@
-From 310e479b5f517ccabab6ba5a07a99378cf7ab5fd Mon Sep 17 00:00:00 2001
+From 317ec441647fe3d58c05e4746c2fc7b0499fdac4 Mon Sep 17 00:00:00 2001
 From: Didier Pallard <didier.pallard@6wind.com>
 Date: Wed, 19 Sep 2018 17:04:07 +0200
 Subject: [PATCH] net/fm10k: fix missing Tx multi-segs capability
 
+[ upstream commit 310e479b5f517ccabab6ba5a07a99378cf7ab5fd ]
+
 In former API, ETH_TXQ_FLAGS_NOMULTSEGS was merely a hint indicating
 that application will never send multisegmented packets, allowing
 pmd to choose different tx methods accordingly.
@@ -16,7 +18,6 @@
 fm10k.
 
 Fixes: 30f3ce999e6a ("net/fm10k: convert to new Tx offloads API")
-Cc: stable@dpdk.org
 
 Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
 Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
@@ -25,10 +26,10 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
-index 3359df3c8..7cf5b0314 100644
+index 541a49b75..aebe8b5a5 100644
 --- a/drivers/net/fm10k/fm10k_ethdev.c
 +++ b/drivers/net/fm10k/fm10k_ethdev.c
-@@ -1976,4 +1976,5 @@ static uint64_t fm10k_get_tx_port_offloads_capa(struct rte_eth_dev *dev)
+@@ -1983,4 +1983,5 @@ static uint64_t fm10k_get_tx_port_offloads_capa(struct rte_eth_dev *dev)
  
  	return (uint64_t)(DEV_TX_OFFLOAD_VLAN_INSERT |
 +			  DEV_TX_OFFLOAD_MULTI_SEGS  |

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

* [dpdk-stable] patch 'net/i40e: fix missing Tx multi-segs capability' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (19 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/fm10k: " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/ixgbe: " Kevin Traynor
                   ` (27 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Didier Pallard; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 1ab27b6630da6dfa695bc7854b6e5f0f51cc8204 Mon Sep 17 00:00:00 2001
From: Didier Pallard <didier.pallard@6wind.com>
Date: Wed, 19 Sep 2018 17:04:08 +0200
Subject: [PATCH] net/i40e: fix missing Tx multi-segs capability

[ upstream commit c8dc2d66c547daf5054557b485eff3fdc0f87864 ]

In former API, ETH_TXQ_FLAGS_NOMULTSEGS was merely a hint indicating
that application will never send multisegmented packets, allowing
pmd to choose different tx methods accordingly.
In new API, DEV_TX_OFFLOAD_MULTI_SEGS became an offload capability
that is advertised by pmds, some of them do not advertise it and
expect to never receive fragmented packets (octeontx, axgbe)
So an ethdev that supports multisegmented packets should properly
advertise it.

Problem was spotted and tested on e1000, should be also present in
i40e_vf representor.

Fixes: e0cb96204b71 ("net/i40e: add support for representor ports")

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 drivers/net/i40e/i40e_vf_representor.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/i40e/i40e_vf_representor.c b/drivers/net/i40e/i40e_vf_representor.c
index f9f131611..0bfbb4f60 100644
--- a/drivers/net/i40e/i40e_vf_representor.c
+++ b/drivers/net/i40e/i40e_vf_representor.c
@@ -49,4 +49,5 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev,
 		DEV_RX_OFFLOAD_TCP_CKSUM;
 	dev_info->tx_offload_capa =
+		DEV_TX_OFFLOAD_MULTI_SEGS  |
 		DEV_TX_OFFLOAD_VLAN_INSERT |
 		DEV_TX_OFFLOAD_QINQ_INSERT |
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.188388279 +0000
+++ 0022-net-i40e-fix-missing-Tx-multi-segs-capability.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,8 +1,10 @@
-From c8dc2d66c547daf5054557b485eff3fdc0f87864 Mon Sep 17 00:00:00 2001
+From 1ab27b6630da6dfa695bc7854b6e5f0f51cc8204 Mon Sep 17 00:00:00 2001
 From: Didier Pallard <didier.pallard@6wind.com>
 Date: Wed, 19 Sep 2018 17:04:08 +0200
 Subject: [PATCH] net/i40e: fix missing Tx multi-segs capability
 
+[ upstream commit c8dc2d66c547daf5054557b485eff3fdc0f87864 ]
+
 In former API, ETH_TXQ_FLAGS_NOMULTSEGS was merely a hint indicating
 that application will never send multisegmented packets, allowing
 pmd to choose different tx methods accordingly.
@@ -16,7 +18,6 @@
 i40e_vf representor.
 
 Fixes: e0cb96204b71 ("net/i40e: add support for representor ports")
-Cc: stable@dpdk.org
 
 Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
 Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

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

* [dpdk-stable] patch 'net/ixgbe: fix missing Tx multi-segs capability' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (20 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/i40e: " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/avf: fix unused variables and label' " Kevin Traynor
                   ` (26 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Didier Pallard; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From c3b613cdd0f8cc492ff79dd23bb8349e789d7a56 Mon Sep 17 00:00:00 2001
From: Didier Pallard <didier.pallard@6wind.com>
Date: Wed, 19 Sep 2018 17:04:09 +0200
Subject: [PATCH] net/ixgbe: fix missing Tx multi-segs capability

[ upstream commit e8c220aa9757c1549057bf508416e859aecb31b9 ]

In former API, ETH_TXQ_FLAGS_NOMULTSEGS was merely a hint indicating
that application will never send multisegmented packets, allowing
pmd to choose different tx methods accordingly.
In new API, DEV_TX_OFFLOAD_MULTI_SEGS became an offload capability
that is advertised by pmds, some of them do not advertise it and
expect to never receive fragmented packets (octeontx, axgbe)
So an ethdev that supports multisegmented packets should properly
advertise it.

Problem was spotted and tested on e1000, should be also present in
ixgbe_vf representor.

Fixes: cf80ba6e2038 ("net/ixgbe: add support for representor ports")

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 drivers/net/ixgbe/ixgbe_vf_representor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_vf_representor.c b/drivers/net/ixgbe/ixgbe_vf_representor.c
index db516d991..b0fbbc49f 100644
--- a/drivers/net/ixgbe/ixgbe_vf_representor.c
+++ b/drivers/net/ixgbe/ixgbe_vf_representor.c
@@ -66,5 +66,5 @@ ixgbe_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev,
 		DEV_TX_OFFLOAD_IPV4_CKSUM | DEV_TX_OFFLOAD_UDP_CKSUM |
 		DEV_TX_OFFLOAD_TCP_CKSUM | DEV_TX_OFFLOAD_SCTP_CKSUM |
-		DEV_TX_OFFLOAD_TCP_TSO;
+		DEV_TX_OFFLOAD_TCP_TSO | DEV_TX_OFFLOAD_MULTI_SEGS;
 	/**< Device TX offload capabilities. */
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.214344916 +0000
+++ 0023-net-ixgbe-fix-missing-Tx-multi-segs-capability.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,8 +1,10 @@
-From e8c220aa9757c1549057bf508416e859aecb31b9 Mon Sep 17 00:00:00 2001
+From c3b613cdd0f8cc492ff79dd23bb8349e789d7a56 Mon Sep 17 00:00:00 2001
 From: Didier Pallard <didier.pallard@6wind.com>
 Date: Wed, 19 Sep 2018 17:04:09 +0200
 Subject: [PATCH] net/ixgbe: fix missing Tx multi-segs capability
 
+[ upstream commit e8c220aa9757c1549057bf508416e859aecb31b9 ]
+
 In former API, ETH_TXQ_FLAGS_NOMULTSEGS was merely a hint indicating
 that application will never send multisegmented packets, allowing
 pmd to choose different tx methods accordingly.
@@ -16,7 +18,6 @@
 ixgbe_vf representor.
 
 Fixes: cf80ba6e2038 ("net/ixgbe: add support for representor ports")
-Cc: stable@dpdk.org
 
 Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
 Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

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

* [dpdk-stable] patch 'net/avf: fix unused variables and label' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (21 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/ixgbe: " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/avf: fix missing compiler error flags' " Kevin Traynor
                   ` (25 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Luca Boccassi, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 9dd8605b36d338c28d02435b873aad37be821c38 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 19 Sep 2018 11:04:15 +0100
Subject: [PATCH] net/avf: fix unused variables and label

[ upstream commit 584798f8e8abd403e01dd8579ccfc3a4f3d1e83b ]

Compiling with all warnings turned on causes errors about unused variables
and an unused label. Remove these to allow building without having to
disable those warnings.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
Fixes: 3fd7a3719c66 ("net/avf: enable ops for MTU setting")
Fixes: d6bde6b5eae9 ("net/avf: enable Rx interrupt")
Fixes: 22b123a36d07 ("net/avf: initialize PMD")
Fixes: 319c421f3890 ("net/avf: enable SSE Rx Tx")
Fixes: a2b29a7733ef ("net/avf: enable basic Rx Tx")
Fixes: 1060591eada5 ("net/avf: enable bulk allocate Rx")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 drivers/net/avf/avf_ethdev.c | 15 +--------------
 drivers/net/avf/avf_rxtx.c   | 19 ++++++-------------
 drivers/net/avf/avf_vchnl.c  |  2 --
 3 files changed, 7 insertions(+), 29 deletions(-)

diff --git a/drivers/net/avf/avf_ethdev.c b/drivers/net/avf/avf_ethdev.c
index 3a2baaf28..be9f163be 100644
--- a/drivers/net/avf/avf_ethdev.c
+++ b/drivers/net/avf/avf_ethdev.c
@@ -155,5 +155,4 @@ avf_init_rss(struct avf_adapter *adapter)
 {
 	struct avf_info *vf =  AVF_DEV_PRIVATE_TO_VF(adapter);
-	struct avf_hw *hw = AVF_DEV_PRIVATE_TO_HW(adapter);
 	struct rte_eth_rss_conf *rss_conf;
 	uint8_t i, j, nb_q;
@@ -260,9 +259,6 @@ static int
 avf_init_queues(struct rte_eth_dev *dev)
 {
-	struct avf_info *vf = AVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 	struct avf_rx_queue **rxq =
 		(struct avf_rx_queue **)dev->data->rx_queues;
-	struct avf_tx_queue **txq =
-		(struct avf_tx_queue **)dev->data->tx_queues;
 	int i, ret = AVF_SUCCESS;
 
@@ -416,5 +412,4 @@ avf_dev_start(struct rte_eth_dev *dev)
 	struct avf_info *vf = AVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 	struct avf_hw *hw = AVF_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
 	struct rte_intr_handle *intr_handle = dev->intr_handle;
 
@@ -477,7 +472,5 @@ avf_dev_stop(struct rte_eth_dev *dev)
 		AVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 	struct avf_hw *hw = AVF_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
 	struct rte_intr_handle *intr_handle = dev->intr_handle;
-	int ret, i;
 
 	PMD_INIT_FUNC_TRACE();
@@ -504,6 +497,4 @@ static void
 avf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 {
-	struct avf_adapter *adapter =
-		AVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 	struct avf_info *vf = AVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 
@@ -916,5 +907,4 @@ static int
 avf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 {
-	struct avf_info *vf = AVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 	uint32_t frame_size = mtu + AVF_ETH_OVERHEAD;
 	int ret = 0;
@@ -1046,6 +1036,4 @@ static int
 avf_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
 {
-	struct avf_adapter *adapter =
-		AVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
 	struct avf_hw *hw = AVF_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -1090,5 +1078,5 @@ static int
 avf_init_vf(struct rte_eth_dev *dev)
 {
-	int i, err, bufsz;
+	int err, bufsz;
 	struct avf_adapter *adapter =
 		AVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
@@ -1199,5 +1187,4 @@ avf_dev_interrupt_handler(void *param)
 	avf_handle_virtchnl_msg(dev);
 
-done:
 	avf_enable_irq0(hw);
 }
diff --git a/drivers/net/avf/avf_rxtx.c b/drivers/net/avf/avf_rxtx.c
index e03a136fc..6b3b0191c 100644
--- a/drivers/net/avf/avf_rxtx.c
+++ b/drivers/net/avf/avf_rxtx.c
@@ -248,5 +248,4 @@ static inline void
 release_rxq_mbufs(struct avf_rx_queue *rxq)
 {
-	struct rte_mbuf *mbuf;
 	uint16_t i;
 
@@ -311,7 +310,6 @@ avf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 	const struct rte_memzone *mz;
 	uint32_t ring_size;
-	uint16_t len, i;
+	uint16_t len;
 	uint16_t rx_free_thresh;
-	uint16_t base, bsf, tc_mapping;
 
 	PMD_INIT_FUNC_TRACE();
@@ -429,11 +427,8 @@ avf_dev_tx_queue_setup(struct rte_eth_dev *dev,
 {
 	struct avf_hw *hw = AVF_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	struct avf_adapter *ad =
-		AVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 	struct avf_tx_queue *txq;
 	const struct rte_memzone *mz;
 	uint32_t ring_size;
 	uint16_t tx_rs_thresh, tx_free_thresh;
-	uint16_t i, base, bsf, tc_mapping;
 	uint64_t offloads;
 
@@ -516,6 +511,9 @@ avf_dev_tx_queue_setup(struct rte_eth_dev *dev,
 
 #ifdef RTE_LIBRTE_AVF_INC_VECTOR
-	if (check_tx_vec_allow(txq) == FALSE)
+	if (check_tx_vec_allow(txq) == FALSE) {
+		struct avf_adapter *ad =
+			AVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 		ad->tx_vec_allowed = false;
+	}
 #endif
 
@@ -1269,5 +1267,4 @@ rx_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 {
 	struct avf_rx_queue *rxq = (struct avf_rx_queue *)rx_queue;
-	struct rte_eth_dev *dev;
 	uint16_t nb_rx = 0;
 
@@ -1585,8 +1582,4 @@ avf_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 		if (nb_ctx) {
 			/* Setup TX context descriptor if required */
-			volatile struct avf_tx_context_desc *ctx_txd =
-				(volatile struct avf_tx_context_desc *)
-					&txr[tx_id];
-			uint16_t cd_l2tag2 = 0;
 			uint64_t cd_type_cmd_tso_mss =
 				AVF_TX_DESC_DTYPE_CONTEXT;
@@ -1604,5 +1597,5 @@ avf_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 					avf_set_tso_ctx(tx_pkt, tx_offload);
 
-			AVF_DUMP_TX_DESC(txq, ctx_txd, tx_id);
+			AVF_DUMP_TX_DESC(txq, &txr[tx_id], tx_id);
 			txe->last_id = tx_last;
 			tx_id = txe->next_id;
diff --git a/drivers/net/avf/avf_vchnl.c b/drivers/net/avf/avf_vchnl.c
index fa71014e1..fd90cc2c3 100644
--- a/drivers/net/avf/avf_vchnl.c
+++ b/drivers/net/avf/avf_vchnl.c
@@ -70,5 +70,4 @@ avf_execute_vf_cmd(struct avf_adapter *adapter, struct avf_cmd_info *args)
 	struct avf_hw *hw = AVF_DEV_PRIVATE_TO_HW(adapter);
 	struct avf_info *vf = AVF_DEV_PRIVATE_TO_VF(adapter);
-	struct avf_arq_event_info event_info;
 	enum avf_status_code ret;
 	int err = 0;
@@ -601,5 +600,4 @@ avf_config_irq_map(struct avf_adapter *adapter)
 	struct virtchnl_vector_map *vecmap;
 	struct avf_cmd_info args;
-	uint32_t vector_id;
 	int len, i, err;
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.237046383 +0000
+++ 0024-net-avf-fix-unused-variables-and-label.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,8 +1,10 @@
-From 584798f8e8abd403e01dd8579ccfc3a4f3d1e83b Mon Sep 17 00:00:00 2001
+From 9dd8605b36d338c28d02435b873aad37be821c38 Mon Sep 17 00:00:00 2001
 From: Bruce Richardson <bruce.richardson@intel.com>
 Date: Wed, 19 Sep 2018 11:04:15 +0100
 Subject: [PATCH] net/avf: fix unused variables and label
 
+[ upstream commit 584798f8e8abd403e01dd8579ccfc3a4f3d1e83b ]
+
 Compiling with all warnings turned on causes errors about unused variables
 and an unused label. Remove these to allow building without having to
 disable those warnings.
@@ -15,8 +17,6 @@
 Fixes: a2b29a7733ef ("net/avf: enable basic Rx Tx")
 Fixes: 1060591eada5 ("net/avf: enable bulk allocate Rx")
 
-CC: stable@dpdk.org
-
 Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
 Acked-by: Luca Boccassi <bluca@debian.org>
 ---
@@ -26,7 +26,7 @@
  3 files changed, 7 insertions(+), 29 deletions(-)
 
 diff --git a/drivers/net/avf/avf_ethdev.c b/drivers/net/avf/avf_ethdev.c
-index a7d69828c..6b6ff7d55 100644
+index 3a2baaf28..be9f163be 100644
 --- a/drivers/net/avf/avf_ethdev.c
 +++ b/drivers/net/avf/avf_ethdev.c
 @@ -155,5 +155,4 @@ avf_init_rss(struct avf_adapter *adapter)
@@ -66,27 +66,27 @@
 -		AVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
  	struct avf_info *vf = AVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
  
-@@ -915,5 +906,4 @@ static int
+@@ -916,5 +907,4 @@ static int
  avf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
  {
 -	struct avf_info *vf = AVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
  	uint32_t frame_size = mtu + AVF_ETH_OVERHEAD;
  	int ret = 0;
-@@ -1045,6 +1035,4 @@ static int
+@@ -1046,6 +1036,4 @@ static int
  avf_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id)
  {
 -	struct avf_adapter *adapter =
 -		AVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
  	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
  	struct avf_hw *hw = AVF_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-@@ -1089,5 +1077,5 @@ static int
+@@ -1090,5 +1078,5 @@ static int
  avf_init_vf(struct rte_eth_dev *dev)
  {
 -	int i, err, bufsz;
 +	int err, bufsz;
  	struct avf_adapter *adapter =
  		AVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
-@@ -1198,5 +1186,4 @@ avf_dev_interrupt_handler(void *param)
+@@ -1199,5 +1187,4 @@ avf_dev_interrupt_handler(void *param)
  	avf_handle_virtchnl_msg(dev);
  
 -done:

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

* [dpdk-stable] patch 'net/avf: fix missing compiler error flags' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (22 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/avf: fix unused variables and label' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/bonding: fix Rx slave fairness' " Kevin Traynor
                   ` (24 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Ferruh Yigit, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 9459e0acddd6de13797ce3ebc08195d71e686227 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Wed, 19 Sep 2018 11:04:16 +0100
Subject: [PATCH] net/avf: fix missing compiler error flags

[ upstream commit bfd38e4d708bc2479e70329ce242ce2e13c8da5d ]

The AVF driver was missing $(WERROR_FLAGS) in it's cflags, which means
that a number of compilation errors were getting missed. This patch adds
in the flag and fixes most of the errors, just disabling the
strict-aliasing ones.

Fixes: 22b123a36d07 ("net/avf: initialize PMD")
Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
Fixes: a2b29a7733ef ("net/avf: enable basic Rx Tx")
Fixes: 319c421f3890 ("net/avf: enable SSE Rx Tx")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/avf/Makefile           | 2 +-
 drivers/net/avf/avf_ethdev.c       | 2 +-
 drivers/net/avf/avf_rxtx.h         | 2 +-
 drivers/net/avf/avf_rxtx_vec_sse.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/avf/Makefile b/drivers/net/avf/Makefile
index 3f815bbc4..0a142c104 100644
--- a/drivers/net/avf/Makefile
+++ b/drivers/net/avf/Makefile
@@ -9,5 +9,5 @@ include $(RTE_SDK)/mk/rte.vars.mk
 LIB = librte_pmd_avf.a
 
-CFLAGS += -O3
+CFLAGS += -O3 $(WERROR_FLAGS) -Wno-strict-aliasing
 LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
 LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash
diff --git a/drivers/net/avf/avf_ethdev.c b/drivers/net/avf/avf_ethdev.c
index be9f163be..a44e3e6ca 100644
--- a/drivers/net/avf/avf_ethdev.c
+++ b/drivers/net/avf/avf_ethdev.c
@@ -561,5 +561,5 @@ avf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 
 static const uint32_t *
-avf_dev_supported_ptypes_get(struct rte_eth_dev *dev)
+avf_dev_supported_ptypes_get(struct rte_eth_dev *dev __rte_unused)
 {
 	static const uint32_t ptypes[] = {
diff --git a/drivers/net/avf/avf_rxtx.h b/drivers/net/avf/avf_rxtx.h
index 297d0776d..c4120f8a4 100644
--- a/drivers/net/avf/avf_rxtx.h
+++ b/drivers/net/avf/avf_rxtx.h
@@ -228,5 +228,5 @@ void avf_dump_tx_descriptor(const struct avf_tx_queue *txq,
 			    const void *desc, uint16_t tx_id)
 {
-	char *name;
+	const char *name;
 	const struct avf_tx_desc *tx_desc = desc;
 	enum avf_tx_desc_dtype_value type;
diff --git a/drivers/net/avf/avf_rxtx_vec_sse.c b/drivers/net/avf/avf_rxtx_vec_sse.c
index 8275100f3..343a6aac3 100644
--- a/drivers/net/avf/avf_rxtx_vec_sse.c
+++ b/drivers/net/avf/avf_rxtx_vec_sse.c
@@ -622,5 +622,5 @@ avf_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 }
 
-void __attribute__((cold))
+static void __attribute__((cold))
 avf_rx_queue_release_mbufs_sse(struct avf_rx_queue *rxq)
 {
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.265445890 +0000
+++ 0025-net-avf-fix-missing-compiler-error-flags.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,8 +1,10 @@
-From bfd38e4d708bc2479e70329ce242ce2e13c8da5d Mon Sep 17 00:00:00 2001
+From 9459e0acddd6de13797ce3ebc08195d71e686227 Mon Sep 17 00:00:00 2001
 From: Bruce Richardson <bruce.richardson@intel.com>
 Date: Wed, 19 Sep 2018 11:04:16 +0100
 Subject: [PATCH] net/avf: fix missing compiler error flags
 
+[ upstream commit bfd38e4d708bc2479e70329ce242ce2e13c8da5d ]
+
 The AVF driver was missing $(WERROR_FLAGS) in it's cflags, which means
 that a number of compilation errors were getting missed. This patch adds
 in the flag and fixes most of the errors, just disabling the
@@ -13,8 +15,6 @@
 Fixes: a2b29a7733ef ("net/avf: enable basic Rx Tx")
 Fixes: 319c421f3890 ("net/avf: enable SSE Rx Tx")
 
-CC: stable@dpdk.org
-
 Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
 ---
@@ -36,10 +36,10 @@
  LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
  LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs -lrte_hash
 diff --git a/drivers/net/avf/avf_ethdev.c b/drivers/net/avf/avf_ethdev.c
-index 6b6ff7d55..549498477 100644
+index be9f163be..a44e3e6ca 100644
 --- a/drivers/net/avf/avf_ethdev.c
 +++ b/drivers/net/avf/avf_ethdev.c
-@@ -560,5 +560,5 @@ avf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -561,5 +561,5 @@ avf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
  
  static const uint32_t *
 -avf_dev_supported_ptypes_get(struct rte_eth_dev *dev)

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

* [dpdk-stable] patch 'net/bonding: fix Rx slave fairness' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (23 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/avf: fix missing compiler error flags' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/dpaa: fix jumbo buffer config' " Kevin Traynor
                   ` (23 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Chas Williams; +Cc: Luca Boccassi, Matan Azrad, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From ad543312c488172e15a70799d390288d18c79029 Mon Sep 17 00:00:00 2001
From: Chas Williams <chas3@att.com>
Date: Thu, 20 Sep 2018 08:52:26 -0400
Subject: [PATCH] net/bonding: fix Rx slave fairness

[ upstream commit e1110e97764873de0af28e6fa11dcd9c170d4e53 ]

Some PMDs, especially ones with vector receives, require a minimum number
of receive buffers in order to receive any packets.  If the first slave
read leaves less than this number available, a read from the next slave
may return 0 implying that the slave doesn't have any packets which
results in skipping over that slave as the next active slave.

To fix this, implement round robin for the slaves during receive that
is only advanced to the next slave at the end of each receive burst.
This is also done to provide some additional fairness in processing in
other bonding RX burst routines as well.

Fixes: 2efb58cbab6e ("bond: new link bonding library")

Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 53 +++++++++++++++++---------
 1 file changed, 34 insertions(+), 19 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 7814258f2..86e78bde8 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -59,26 +59,32 @@ bond_ethdev_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 	struct bond_dev_private *internals;
 
-	uint16_t num_rx_slave = 0;
 	uint16_t num_rx_total = 0;
-
+	uint16_t slave_count;
+	uint16_t active_slave;
 	int i;
 
 	/* Cast to structure, containing bonded device's port id and queue id */
 	struct bond_rx_queue *bd_rx_q = (struct bond_rx_queue *)queue;
-
 	internals = bd_rx_q->dev_private;
+	slave_count = internals->active_slave_count;
+	active_slave = internals->active_slave;
 
+	for (i = 0; i < slave_count && nb_pkts; i++) {
+		uint16_t num_rx_slave;
 
-	for (i = 0; i < internals->active_slave_count && nb_pkts; i++) {
 		/* Offset of pointer to *bufs increases as packets are received
 		 * from other slaves */
-		num_rx_slave = rte_eth_rx_burst(internals->active_slaves[i],
-				bd_rx_q->queue_id, bufs + num_rx_total, nb_pkts);
-		if (num_rx_slave) {
-			num_rx_total += num_rx_slave;
-			nb_pkts -= num_rx_slave;
-		}
+		num_rx_slave =
+			rte_eth_rx_burst(internals->active_slaves[active_slave],
+					 bd_rx_q->queue_id,
+					 bufs + num_rx_total, nb_pkts);
+		num_rx_total += num_rx_slave;
+		nb_pkts -= num_rx_slave;
+		if (++active_slave == slave_count)
+			active_slave = 0;
 	}
 
+	if (++internals->active_slave == slave_count)
+		internals->active_slave = 0;
 	return num_rx_total;
 }
@@ -259,23 +265,30 @@ bond_ethdev_rx_burst_8023ad_fast_queue(void *queue, struct rte_mbuf **bufs,
 	uint16_t slaves[RTE_MAX_ETHPORTS];
 	uint16_t slave_count;
-
-	uint16_t i, idx;
+	uint16_t active_slave;
+	uint16_t i;
 
 	/* Copy slave list to protect against slave up/down changes during tx
 	 * bursting */
 	slave_count = internals->active_slave_count;
+	active_slave = internals->active_slave;
 	memcpy(slaves, internals->active_slaves,
 			sizeof(internals->active_slaves[0]) * slave_count);
 
-	for (i = 0, idx = internals->active_slave;
-			i < slave_count && num_rx_total < nb_pkts; i++, idx++) {
-		idx = idx % slave_count;
+	for (i = 0; i < slave_count && nb_pkts; i++) {
+		uint16_t num_rx_slave;
 
 		/* Read packets from this slave */
-		num_rx_total += rte_eth_rx_burst(slaves[idx], bd_rx_q->queue_id,
-				&bufs[num_rx_total], nb_pkts - num_rx_total);
+		num_rx_slave = rte_eth_rx_burst(slaves[active_slave],
+						bd_rx_q->queue_id,
+						bufs + num_rx_total, nb_pkts);
+		num_rx_total += num_rx_slave;
+		nb_pkts -= num_rx_slave;
+
+		if (++active_slave == slave_count)
+			active_slave = 0;
 	}
 
-	internals->active_slave = idx;
+	if (++internals->active_slave == slave_count)
+		internals->active_slave = 0;
 
 	return num_rx_total;
@@ -460,5 +473,7 @@ bond_ethdev_rx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
 	}
 
-	internals->active_slave = idx;
+	if (++internals->active_slave == slave_count)
+		internals->active_slave = 0;
+
 	return num_rx_total;
 }
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.293272268 +0000
+++ 0026-net-bonding-fix-Rx-slave-fairness.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,8 +1,10 @@
-From e1110e97764873de0af28e6fa11dcd9c170d4e53 Mon Sep 17 00:00:00 2001
+From ad543312c488172e15a70799d390288d18c79029 Mon Sep 17 00:00:00 2001
 From: Chas Williams <chas3@att.com>
 Date: Thu, 20 Sep 2018 08:52:26 -0400
 Subject: [PATCH] net/bonding: fix Rx slave fairness
 
+[ upstream commit e1110e97764873de0af28e6fa11dcd9c170d4e53 ]
+
 Some PMDs, especially ones with vector receives, require a minimum number
 of receive buffers in order to receive any packets.  If the first slave
 read leaves less than this number available, a read from the next slave
@@ -15,7 +17,6 @@
 other bonding RX burst routines as well.
 
 Fixes: 2efb58cbab6e ("bond: new link bonding library")
-Cc: stable@dpdk.org
 
 Signed-off-by: Chas Williams <chas3@att.com>
 Acked-by: Luca Boccassi <bluca@debian.org>

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

* [dpdk-stable] patch 'net/dpaa: fix jumbo buffer config' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (24 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/bonding: fix Rx slave fairness' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/dpaa: fix link speed based on MAC type' " Kevin Traynor
                   ` (22 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Hemant Agrawal; +Cc: dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 2a2d4ef95d07f89626a84a93510da3387d629f24 Mon Sep 17 00:00:00 2001
From: Hemant Agrawal <hemant.agrawal@nxp.com>
Date: Fri, 21 Sep 2018 16:35:51 +0530
Subject: [PATCH] net/dpaa: fix jumbo buffer config

[ upstream commit deeec8ef57cb2f336b192cfcb6a4df5104c6a9a5 ]

Set the missing dev data mtu for the correct size.
Set the max supported size in hw, if user is asking for more.

Fixes: 9658ac3a4ef6 ("net/dpaa: set the correct frame size in device MTU")

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 7a950ac04..2a380f024 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -195,12 +195,22 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev)
 
 	if (rx_offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
+		uint32_t max_len;
+
+		DPAA_PMD_DEBUG("enabling jumbo");
+
 		if (dev->data->dev_conf.rxmode.max_rx_pkt_len <=
-		    DPAA_MAX_RX_PKT_LEN) {
-			fman_if_set_maxfrm(dpaa_intf->fif,
-				dev->data->dev_conf.rxmode.max_rx_pkt_len);
-			return 0;
-		} else {
-			return -1;
+		    DPAA_MAX_RX_PKT_LEN)
+			max_len = dev->data->dev_conf.rxmode.max_rx_pkt_len;
+		else {
+			DPAA_PMD_INFO("enabling jumbo override conf max len=%d "
+				"supported is %d",
+				dev->data->dev_conf.rxmode.max_rx_pkt_len,
+				DPAA_MAX_RX_PKT_LEN);
+			max_len = DPAA_MAX_RX_PKT_LEN;
 		}
+
+		fman_if_set_maxfrm(dpaa_intf->fif, max_len);
+		dev->data->mtu = max_len
+				- ETHER_HDR_LEN - ETHER_CRC_LEN - VLAN_TAG_SIZE;
 	}
 	return 0;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.318418015 +0000
+++ 0027-net-dpaa-fix-jumbo-buffer-config.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,13 +1,14 @@
-From deeec8ef57cb2f336b192cfcb6a4df5104c6a9a5 Mon Sep 17 00:00:00 2001
+From 2a2d4ef95d07f89626a84a93510da3387d629f24 Mon Sep 17 00:00:00 2001
 From: Hemant Agrawal <hemant.agrawal@nxp.com>
 Date: Fri, 21 Sep 2018 16:35:51 +0530
 Subject: [PATCH] net/dpaa: fix jumbo buffer config
 
+[ upstream commit deeec8ef57cb2f336b192cfcb6a4df5104c6a9a5 ]
+
 Set the missing dev data mtu for the correct size.
 Set the max supported size in hw, if user is asking for more.
 
 Fixes: 9658ac3a4ef6 ("net/dpaa: set the correct frame size in device MTU")
-Cc: stable@dpdk.org
 
 Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
 ---
@@ -15,10 +16,10 @@
  1 file changed, 16 insertions(+), 6 deletions(-)
 
 diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
-index c1f1bf72e..8c585152c 100644
+index 7a950ac04..2a380f024 100644
 --- a/drivers/net/dpaa/dpaa_ethdev.c
 +++ b/drivers/net/dpaa/dpaa_ethdev.c
-@@ -194,12 +194,22 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev)
+@@ -195,12 +195,22 @@ dpaa_eth_dev_configure(struct rte_eth_dev *dev)
  
  	if (rx_offloads & DEV_RX_OFFLOAD_JUMBO_FRAME) {
 +		uint32_t max_len;

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

* [dpdk-stable] patch 'net/dpaa: fix link speed based on MAC type' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (25 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/dpaa: fix jumbo buffer config' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/failsafe: remove not supported multicast MAC filter' " Kevin Traynor
                   ` (21 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Sachin Saxena; +Cc: dpdk stable, shreyansh.jain

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From df7ff506c66e78c704263f807a15b92d2edd8eb3 Mon Sep 17 00:00:00 2001
From: Sachin Saxena <sachin.saxena@nxp.com>
Date: Fri, 21 Sep 2018 16:35:53 +0530
Subject: [PATCH] net/dpaa: fix link speed based on MAC type

[ upstream commit c1752a36b008ae91e427f89c5776727b7d7e4313 ]

The link speed shall be on the basis of mac type.

Fixes: 799db4568c76 ("net/dpaa: support device info and speed capability")
Cc: shreyansh.jain@nxp.com

Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
---
 drivers/net/dpaa/dpaa_ethdev.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 2a380f024..b32527424 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -318,6 +318,13 @@ static void dpaa_eth_dev_info(struct rte_eth_dev *dev,
 	dev_info->max_vmdq_pools = ETH_16_POOLS;
 	dev_info->flow_type_rss_offloads = DPAA_RSS_OFFLOAD_ALL;
-	dev_info->speed_capa = (ETH_LINK_SPEED_1G |
-				ETH_LINK_SPEED_10G);
+
+	if (dpaa_intf->fif->mac_type == fman_mac_1g)
+		dev_info->speed_capa = ETH_LINK_SPEED_1G;
+	else if (dpaa_intf->fif->mac_type == fman_mac_10g)
+		dev_info->speed_capa = (ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G);
+	else
+		DPAA_PMD_ERR("invalid link_speed: %s, %d",
+			     dpaa_intf->name, dpaa_intf->fif->mac_type);
+
 	dev_info->rx_offload_capa = dev_rx_offloads_sup |
 					dev_rx_offloads_nodis;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.343724941 +0000
+++ 0028-net-dpaa-fix-link-speed-based-on-MAC-type.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,13 +1,14 @@
-From c1752a36b008ae91e427f89c5776727b7d7e4313 Mon Sep 17 00:00:00 2001
+From df7ff506c66e78c704263f807a15b92d2edd8eb3 Mon Sep 17 00:00:00 2001
 From: Sachin Saxena <sachin.saxena@nxp.com>
 Date: Fri, 21 Sep 2018 16:35:53 +0530
 Subject: [PATCH] net/dpaa: fix link speed based on MAC type
 
+[ upstream commit c1752a36b008ae91e427f89c5776727b7d7e4313 ]
+
 The link speed shall be on the basis of mac type.
 
 Fixes: 799db4568c76 ("net/dpaa: support device info and speed capability")
 Cc: shreyansh.jain@nxp.com
-Cc: stable@dpdk.org
 
 Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com>
 ---
@@ -15,10 +16,10 @@
  1 file changed, 9 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
-index ff961e8b7..c3546f990 100644
+index 2a380f024..b32527424 100644
 --- a/drivers/net/dpaa/dpaa_ethdev.c
 +++ b/drivers/net/dpaa/dpaa_ethdev.c
-@@ -342,6 +342,13 @@ static void dpaa_eth_dev_info(struct rte_eth_dev *dev,
+@@ -318,6 +318,13 @@ static void dpaa_eth_dev_info(struct rte_eth_dev *dev,
  	dev_info->max_vmdq_pools = ETH_16_POOLS;
  	dev_info->flow_type_rss_offloads = DPAA_RSS_OFFLOAD_ALL;
 -	dev_info->speed_capa = (ETH_LINK_SPEED_1G |

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

* [dpdk-stable] patch 'net/failsafe: remove not supported multicast MAC filter' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (26 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/dpaa: fix link speed based on MAC type' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'ethdev: fix error handling in create function' " Kevin Traynor
                   ` (20 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Evgeny Im; +Cc: Andrew Rybchenko, Gaetan Rivet, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From cfd00762280db614c2e4987b816b5d499173157b Mon Sep 17 00:00:00 2001
From: Evgeny Im <evgeny.im@oktetlabs.com>
Date: Fri, 21 Sep 2018 16:36:21 +0100
Subject: [PATCH] net/failsafe: remove not supported multicast MAC filter

[ upstream commit 4d7c9382490376b295077d445a60763a8e5b0518 ]

set_mc_addr_list method is not implemented by the driver yet.

Fixes: a46f8d584eb8 ("net/failsafe: add fail-safe PMD")

Signed-off-by: Evgeny Im <evgeny.im@oktetlabs.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
---
 doc/guides/nics/features/failsafe.ini | 1 -
 1 file changed, 1 deletion(-)

diff --git a/doc/guides/nics/features/failsafe.ini b/doc/guides/nics/features/failsafe.ini
index 39ee57965..83cc99d19 100644
--- a/doc/guides/nics/features/failsafe.ini
+++ b/doc/guides/nics/features/failsafe.ini
@@ -13,5 +13,4 @@ Promiscuous mode     = Y
 Allmulticast mode    = Y
 Unicast MAC filter   = Y
-Multicast MAC filter = Y
 VLAN filter          = Y
 Flow control         = Y
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.368573397 +0000
+++ 0029-net-failsafe-remove-not-supported-multicast-MAC-filt.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,12 +1,13 @@
-From 4d7c9382490376b295077d445a60763a8e5b0518 Mon Sep 17 00:00:00 2001
+From cfd00762280db614c2e4987b816b5d499173157b Mon Sep 17 00:00:00 2001
 From: Evgeny Im <evgeny.im@oktetlabs.com>
 Date: Fri, 21 Sep 2018 16:36:21 +0100
 Subject: [PATCH] net/failsafe: remove not supported multicast MAC filter
 
+[ upstream commit 4d7c9382490376b295077d445a60763a8e5b0518 ]
+
 set_mc_addr_list method is not implemented by the driver yet.
 
 Fixes: a46f8d584eb8 ("net/failsafe: add fail-safe PMD")
-Cc: stable@dpdk.org
 
 Signed-off-by: Evgeny Im <evgeny.im@oktetlabs.com>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -16,10 +17,10 @@
  1 file changed, 1 deletion(-)
 
 diff --git a/doc/guides/nics/features/failsafe.ini b/doc/guides/nics/features/failsafe.ini
-index e3c4c08f2..89e253df3 100644
+index 39ee57965..83cc99d19 100644
 --- a/doc/guides/nics/features/failsafe.ini
 +++ b/doc/guides/nics/features/failsafe.ini
-@@ -16,5 +16,4 @@ Promiscuous mode     = Y
+@@ -13,5 +13,4 @@ Promiscuous mode     = Y
  Allmulticast mode    = Y
  Unicast MAC filter   = Y
 -Multicast MAC filter = Y

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

* [dpdk-stable] patch 'ethdev: fix error handling in create function' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (27 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/failsafe: remove not supported multicast MAC filter' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: make last byte of module information available' " Kevin Traynor
                   ` (19 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Alejandro Lucero; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 0484ed2eaa05e89e81ec071bf99c4af67cbce147 Mon Sep 17 00:00:00 2001
From: Alejandro Lucero <alejandro.lucero@netronome.com>
Date: Mon, 24 Sep 2018 14:43:24 +0100
Subject: [PATCH] ethdev: fix error handling in create function

[ upstream commit aa3c4fb6a451dcb1686e699ffbb87fb03e1ff9a4 ]

This patch fixes how function exit is handled when errors inside
rte_eth_dev_create.

Fixes: e489007a411c ("ethdev: add generic create/destroy ethdev APIs")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 lib/librte_ethdev/rte_ethdev.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index a43dfc8b7..a20498711 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -3477,8 +3477,6 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
 	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
 		ethdev = rte_eth_dev_allocate(name);
-		if (!ethdev) {
-			retval = -ENODEV;
-			goto probe_failed;
-		}
+		if (!ethdev)
+			return -ENODEV;
 
 		if (priv_data_size) {
@@ -3490,5 +3488,5 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
 				RTE_LOG(ERR, EAL, "failed to allocate private data");
 				retval = -ENOMEM;
-				goto probe_failed;
+				goto data_alloc_failed;
 			}
 		}
@@ -3498,6 +3496,5 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
 			RTE_LOG(ERR, EAL, "secondary process attach failed, "
 				"ethdev doesn't exist");
-			retval = -ENODEV;
-			goto probe_failed;
+			return  -ENODEV;
 		}
 	}
@@ -3528,4 +3525,5 @@ probe_failed:
 		rte_free(ethdev->data->dev_private);
 
+data_alloc_failed:
 	rte_eth_dev_release_port(ethdev);
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.389961661 +0000
+++ 0030-ethdev-fix-error-handling-in-create-function.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,13 +1,14 @@
-From aa3c4fb6a451dcb1686e699ffbb87fb03e1ff9a4 Mon Sep 17 00:00:00 2001
+From 0484ed2eaa05e89e81ec071bf99c4af67cbce147 Mon Sep 17 00:00:00 2001
 From: Alejandro Lucero <alejandro.lucero@netronome.com>
 Date: Mon, 24 Sep 2018 14:43:24 +0100
 Subject: [PATCH] ethdev: fix error handling in create function
 
+[ upstream commit aa3c4fb6a451dcb1686e699ffbb87fb03e1ff9a4 ]
+
 This patch fixes how function exit is handled when errors inside
 rte_eth_dev_create.
 
 Fixes: e489007a411c ("ethdev: add generic create/destroy ethdev APIs")
-Cc: stable@dpdk.org
 
 Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
 Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -16,10 +17,10 @@
  1 file changed, 5 insertions(+), 7 deletions(-)
 
 diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
-index aa7730ce2..ef99f7068 100644
+index a43dfc8b7..a20498711 100644
 --- a/lib/librte_ethdev/rte_ethdev.c
 +++ b/lib/librte_ethdev/rte_ethdev.c
-@@ -3468,8 +3468,6 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
+@@ -3477,8 +3477,6 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
  	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
  		ethdev = rte_eth_dev_allocate(name);
 -		if (!ethdev) {
@@ -30,14 +31,14 @@
 +			return -ENODEV;
  
  		if (priv_data_size) {
-@@ -3481,5 +3479,5 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
+@@ -3490,5 +3488,5 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
  				RTE_LOG(ERR, EAL, "failed to allocate private data");
  				retval = -ENOMEM;
 -				goto probe_failed;
 +				goto data_alloc_failed;
  			}
  		}
-@@ -3489,6 +3487,5 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
+@@ -3498,6 +3496,5 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
  			RTE_LOG(ERR, EAL, "secondary process attach failed, "
  				"ethdev doesn't exist");
 -			retval = -ENODEV;
@@ -45,7 +46,7 @@
 +			return  -ENODEV;
  		}
  	}
-@@ -3519,4 +3516,5 @@ probe_failed:
+@@ -3528,4 +3525,5 @@ probe_failed:
  		rte_free(ethdev->data->dev_private);
  
 +data_alloc_failed:

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

* [dpdk-stable] patch 'net/sfc/base: make last byte of module information available' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (28 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'ethdev: fix error handling in create function' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/cxgbe: announce Rx scatter offload' " Kevin Traynor
                   ` (18 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Richard Houldsworth; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 834fef9f5bb8042e027d97f3968c8b4c91493711 Mon Sep 17 00:00:00 2001
From: Richard Houldsworth <rhouldsworth@solarflare.com>
Date: Mon, 24 Sep 2018 14:50:20 +0100
Subject: [PATCH] net/sfc/base: make last byte of module information available

[ upstream commit 7624c9442df3b87aac77c6923b59740299866c43 ]

Adjust bounds so the interface supports reading
the last available byte of data.

Fixes: 19b64c6ac35f ("net/sfc/base: import libefx base")

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/efx_phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/base/efx_phy.c b/drivers/net/sfc/base/efx_phy.c
index ba2f51c17..5751c4f85 100644
--- a/drivers/net/sfc/base/efx_phy.c
+++ b/drivers/net/sfc/base/efx_phy.c
@@ -296,5 +296,5 @@ efx_phy_module_get_info(
 	EFSYS_ASSERT(data != NULL);
 
-	if ((uint32_t)offset + len > 0xff) {
+	if ((uint32_t)offset + len > 0x100) {
 		rc = EINVAL;
 		goto fail1;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.416799890 +0000
+++ 0031-net-sfc-base-make-last-byte-of-module-information-av.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,13 +1,14 @@
-From 7624c9442df3b87aac77c6923b59740299866c43 Mon Sep 17 00:00:00 2001
+From 834fef9f5bb8042e027d97f3968c8b4c91493711 Mon Sep 17 00:00:00 2001
 From: Richard Houldsworth <rhouldsworth@solarflare.com>
 Date: Mon, 24 Sep 2018 14:50:20 +0100
 Subject: [PATCH] net/sfc/base: make last byte of module information available
 
+[ upstream commit 7624c9442df3b87aac77c6923b59740299866c43 ]
+
 Adjust bounds so the interface supports reading
 the last available byte of data.
 
 Fixes: 19b64c6ac35f ("net/sfc/base: import libefx base")
-Cc: stable@dpdk.org
 
 Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
 Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
@@ -16,10 +17,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/sfc/base/efx_phy.c b/drivers/net/sfc/base/efx_phy.c
-index 25059dfe1..e78d6efcb 100644
+index ba2f51c17..5751c4f85 100644
 --- a/drivers/net/sfc/base/efx_phy.c
 +++ b/drivers/net/sfc/base/efx_phy.c
-@@ -298,5 +298,5 @@ efx_phy_module_get_info(
+@@ -296,5 +296,5 @@ efx_phy_module_get_info(
  	EFSYS_ASSERT(data != NULL);
  
 -	if ((uint32_t)offset + len > 0xff) {

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

* [dpdk-stable] patch 'net/cxgbe: announce Rx scatter offload' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (29 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: make last byte of module information available' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'ethdev: fix doxygen comment to be with structure' " Kevin Traynor
                   ` (17 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Rahul Lakkireddy; +Cc: Martin Weiser, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From f99541eab075732b123cca75a76a31e97ba69dcc Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Mon, 24 Sep 2018 21:35:04 +0530
Subject: [PATCH] net/cxgbe: announce Rx scatter offload

[ upstream commit 0f3ff2445da3697f29a9e1be7a8b51273ddceeac ]

Scatter Rx is already supported by CXGBE PMD. So, add the missing
DEV_RX_OFFLOAD_SCATTER flag to the list of supported Rx offload
features.

Also, move the macros for supported list of offload features to
header file.

Fixes: 436125e64174 ("net/cxgbe: update to Rx/Tx offload API")

Reported-by: Martin Weiser <martin.weiser@allegro-packets.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
 drivers/net/cxgbe/cxgbe.h        | 16 ++++++++++++++++
 drivers/net/cxgbe/cxgbe_ethdev.c | 20 +++++++-------------
 2 files changed, 23 insertions(+), 13 deletions(-)

diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h
index 5e6f5c98d..62581abbe 100644
--- a/drivers/net/cxgbe/cxgbe.h
+++ b/drivers/net/cxgbe/cxgbe.h
@@ -35,4 +35,20 @@
 #define CXGBE_RSS_HF_ALL (ETH_RSS_IP | ETH_RSS_TCP | ETH_RSS_UDP)
 
+/* Tx/Rx Offloads supported */
+#define CXGBE_TX_OFFLOADS (DEV_TX_OFFLOAD_VLAN_INSERT | \
+			   DEV_TX_OFFLOAD_IPV4_CKSUM | \
+			   DEV_TX_OFFLOAD_UDP_CKSUM | \
+			   DEV_TX_OFFLOAD_TCP_CKSUM | \
+			   DEV_TX_OFFLOAD_TCP_TSO)
+
+#define CXGBE_RX_OFFLOADS (DEV_RX_OFFLOAD_VLAN_STRIP | \
+			   DEV_RX_OFFLOAD_CRC_STRIP |\
+			   DEV_RX_OFFLOAD_IPV4_CKSUM | \
+			   DEV_RX_OFFLOAD_UDP_CKSUM | \
+			   DEV_RX_OFFLOAD_TCP_CKSUM | \
+			   DEV_RX_OFFLOAD_JUMBO_FRAME | \
+			   DEV_RX_OFFLOAD_SCATTER)
+
+
 #define CXGBE_DEVARG_KEEP_OVLAN "keep_ovlan"
 #define CXGBE_DEVARG_FORCE_LINK_UP "force_link_up"
diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index 4dcad7a23..cde01210e 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -60,17 +60,4 @@
 #include "t4_pci_id_tbl.h"
 
-#define CXGBE_TX_OFFLOADS (DEV_TX_OFFLOAD_VLAN_INSERT |\
-			   DEV_TX_OFFLOAD_IPV4_CKSUM |\
-			   DEV_TX_OFFLOAD_UDP_CKSUM |\
-			   DEV_TX_OFFLOAD_TCP_CKSUM |\
-			   DEV_TX_OFFLOAD_TCP_TSO)
-
-#define CXGBE_RX_OFFLOADS (DEV_RX_OFFLOAD_VLAN_STRIP |\
-			   DEV_RX_OFFLOAD_CRC_STRIP |\
-			   DEV_RX_OFFLOAD_IPV4_CKSUM |\
-			   DEV_RX_OFFLOAD_JUMBO_FRAME |\
-			   DEV_RX_OFFLOAD_UDP_CKSUM |\
-			   DEV_RX_OFFLOAD_TCP_CKSUM)
-
 uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			 uint16_t nb_pkts)
@@ -342,4 +329,5 @@ int cxgbe_dev_start(struct rte_eth_dev *eth_dev)
 {
 	struct port_info *pi = (struct port_info *)(eth_dev->data->dev_private);
+	struct rte_eth_rxmode *rx_conf = &eth_dev->data->dev_conf.rxmode;
 	struct adapter *adapter = pi->adapter;
 	int err = 0, i;
@@ -362,4 +350,9 @@ int cxgbe_dev_start(struct rte_eth_dev *eth_dev)
 	}
 
+	if (rx_conf->offloads & DEV_RX_OFFLOAD_SCATTER)
+		eth_dev->data->scattered_rx = 1;
+	else
+		eth_dev->data->scattered_rx = 0;
+
 	cxgbe_enable_rx_queues(pi);
 
@@ -408,4 +401,5 @@ void cxgbe_dev_stop(struct rte_eth_dev *eth_dev)
 	 */
 	t4_sge_eth_clear_queues(pi);
+	eth_dev->data->scattered_rx = 0;
 }
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.439958982 +0000
+++ 0032-net-cxgbe-announce-Rx-scatter-offload.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,8 +1,10 @@
-From 0f3ff2445da3697f29a9e1be7a8b51273ddceeac Mon Sep 17 00:00:00 2001
+From f99541eab075732b123cca75a76a31e97ba69dcc Mon Sep 17 00:00:00 2001
 From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
 Date: Mon, 24 Sep 2018 21:35:04 +0530
 Subject: [PATCH] net/cxgbe: announce Rx scatter offload
 
+[ upstream commit 0f3ff2445da3697f29a9e1be7a8b51273ddceeac ]
+
 Scatter Rx is already supported by CXGBE PMD. So, add the missing
 DEV_RX_OFFLOAD_SCATTER flag to the list of supported Rx offload
 features.
@@ -11,20 +13,19 @@
 header file.
 
 Fixes: 436125e64174 ("net/cxgbe: update to Rx/Tx offload API")
-Cc: stable@dpdk.org
 
 Reported-by: Martin Weiser <martin.weiser@allegro-packets.com>
 Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
 ---
- drivers/net/cxgbe/cxgbe.h        | 15 +++++++++++++++
- drivers/net/cxgbe/cxgbe_ethdev.c | 19 +++++++------------
- 2 files changed, 22 insertions(+), 12 deletions(-)
+ drivers/net/cxgbe/cxgbe.h        | 16 ++++++++++++++++
+ drivers/net/cxgbe/cxgbe_ethdev.c | 20 +++++++-------------
+ 2 files changed, 23 insertions(+), 13 deletions(-)
 
 diff --git a/drivers/net/cxgbe/cxgbe.h b/drivers/net/cxgbe/cxgbe.h
-index 5e6f5c98d..eb58f8802 100644
+index 5e6f5c98d..62581abbe 100644
 --- a/drivers/net/cxgbe/cxgbe.h
 +++ b/drivers/net/cxgbe/cxgbe.h
-@@ -35,4 +35,19 @@
+@@ -35,4 +35,20 @@
  #define CXGBE_RSS_HF_ALL (ETH_RSS_IP | ETH_RSS_TCP | ETH_RSS_UDP)
  
 +/* Tx/Rx Offloads supported */
@@ -35,6 +36,7 @@
 +			   DEV_TX_OFFLOAD_TCP_TSO)
 +
 +#define CXGBE_RX_OFFLOADS (DEV_RX_OFFLOAD_VLAN_STRIP | \
++			   DEV_RX_OFFLOAD_CRC_STRIP |\
 +			   DEV_RX_OFFLOAD_IPV4_CKSUM | \
 +			   DEV_RX_OFFLOAD_UDP_CKSUM | \
 +			   DEV_RX_OFFLOAD_TCP_CKSUM | \
@@ -45,10 +47,10 @@
  #define CXGBE_DEVARG_KEEP_OVLAN "keep_ovlan"
  #define CXGBE_DEVARG_FORCE_LINK_UP "force_link_up"
 diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
-index 117263e2b..b2f83ea37 100644
+index 4dcad7a23..cde01210e 100644
 --- a/drivers/net/cxgbe/cxgbe_ethdev.c
 +++ b/drivers/net/cxgbe/cxgbe_ethdev.c
-@@ -60,16 +60,4 @@
+@@ -60,17 +60,4 @@
  #include "t4_pci_id_tbl.h"
  
 -#define CXGBE_TX_OFFLOADS (DEV_TX_OFFLOAD_VLAN_INSERT |\
@@ -58,6 +60,7 @@
 -			   DEV_TX_OFFLOAD_TCP_TSO)
 -
 -#define CXGBE_RX_OFFLOADS (DEV_RX_OFFLOAD_VLAN_STRIP |\
+-			   DEV_RX_OFFLOAD_CRC_STRIP |\
 -			   DEV_RX_OFFLOAD_IPV4_CKSUM |\
 -			   DEV_RX_OFFLOAD_JUMBO_FRAME |\
 -			   DEV_RX_OFFLOAD_UDP_CKSUM |\
@@ -65,13 +68,13 @@
 -
  uint16_t cxgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
  			 uint16_t nb_pkts)
-@@ -341,4 +329,5 @@ int cxgbe_dev_start(struct rte_eth_dev *eth_dev)
+@@ -342,4 +329,5 @@ int cxgbe_dev_start(struct rte_eth_dev *eth_dev)
  {
  	struct port_info *pi = (struct port_info *)(eth_dev->data->dev_private);
 +	struct rte_eth_rxmode *rx_conf = &eth_dev->data->dev_conf.rxmode;
  	struct adapter *adapter = pi->adapter;
  	int err = 0, i;
-@@ -361,4 +350,9 @@ int cxgbe_dev_start(struct rte_eth_dev *eth_dev)
+@@ -362,4 +350,9 @@ int cxgbe_dev_start(struct rte_eth_dev *eth_dev)
  	}
  
 +	if (rx_conf->offloads & DEV_RX_OFFLOAD_SCATTER)
@@ -81,7 +84,7 @@
 +
  	cxgbe_enable_rx_queues(pi);
  
-@@ -407,4 +401,5 @@ void cxgbe_dev_stop(struct rte_eth_dev *eth_dev)
+@@ -408,4 +401,5 @@ void cxgbe_dev_stop(struct rte_eth_dev *eth_dev)
  	 */
  	t4_sge_eth_clear_queues(pi);
 +	eth_dev->data->scattered_rx = 0;

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

* [dpdk-stable] patch 'ethdev: fix doxygen comment to be with structure' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (30 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/cxgbe: announce Rx scatter offload' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/avf: remove keeping CRC configuration' " Kevin Traynor
                   ` (16 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Paul M Stillwell Jr; +Cc: Thomas Monjalon, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From ee656c737d94393be101873305ea24754df8adf9 Mon Sep 17 00:00:00 2001
From: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Date: Tue, 25 Sep 2018 15:31:09 +0100
Subject: [PATCH] ethdev: fix doxygen comment to be with structure

[ upstream commit cb0ad8fa267010e5558c0ffe89a3b3229b1e9b8d ]

The doxygen comment describing the rte_eth_dev_info structure
was separated from the structure itself so move the comment
back to be with the structure.

Fixes: 7238e63bce52 ("ethdev: add support for device offload capabilities")

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_ethdev/rte_ethdev.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index fa2812bca..f3c0d1928 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -870,10 +870,4 @@ struct rte_eth_conf {
 };
 
-/**
- * A structure used to retrieve the contextual information of
- * an Ethernet device, such as the controlling driver of the device,
- * its PCI context, etc...
- */
-
 /**
  * RX offload capabilities of a device.
@@ -1011,4 +1005,10 @@ struct rte_eth_switch_info {
  * Ethernet device information
  */
+
+/**
+ * A structure used to retrieve the contextual information of
+ * an Ethernet device, such as the controlling driver of the
+ * device, etc...
+ */
 struct rte_eth_dev_info {
 	struct rte_device *device; /** Generic device information */
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.463637731 +0000
+++ 0033-ethdev-fix-doxygen-comment-to-be-with-structure.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,14 +1,15 @@
-From cb0ad8fa267010e5558c0ffe89a3b3229b1e9b8d Mon Sep 17 00:00:00 2001
+From ee656c737d94393be101873305ea24754df8adf9 Mon Sep 17 00:00:00 2001
 From: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
 Date: Tue, 25 Sep 2018 15:31:09 +0100
 Subject: [PATCH] ethdev: fix doxygen comment to be with structure
 
+[ upstream commit cb0ad8fa267010e5558c0ffe89a3b3229b1e9b8d ]
+
 The doxygen comment describing the rte_eth_dev_info structure
 was separated from the structure itself so move the comment
 back to be with the structure.
 
 Fixes: 7238e63bce52 ("ethdev: add support for device offload capabilities")
-Cc: stable@dpdk.org
 
 Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
 Acked-by: Thomas Monjalon <thomas@monjalon.net>
@@ -17,7 +18,7 @@
  1 file changed, 6 insertions(+), 6 deletions(-)
 
 diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
-index 44b4fb33f..012577b0a 100644
+index fa2812bca..f3c0d1928 100644
 --- a/lib/librte_ethdev/rte_ethdev.h
 +++ b/lib/librte_ethdev/rte_ethdev.h
 @@ -870,10 +870,4 @@ struct rte_eth_conf {
@@ -31,7 +32,7 @@
 -
  /**
   * RX offload capabilities of a device.
-@@ -1006,4 +1000,10 @@ struct rte_eth_switch_info {
+@@ -1011,4 +1005,10 @@ struct rte_eth_switch_info {
   * Ethernet device information
   */
 +

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

* [dpdk-stable] patch 'net/avf: remove keeping CRC configuration' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (31 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'ethdev: fix doxygen comment to be with structure' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-22 17:29   ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/virtio-user: fix multiple queue for vhost-kernel' " Kevin Traynor
                   ` (15 subsequent siblings)
  48 siblings, 1 reply; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 328983dd640b60da0fbc2fed9c8271a0af53f8b2 Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Wed, 26 Sep 2018 10:44:34 +0800
Subject: [PATCH] net/avf: remove keeping CRC configuration

[ upstream commit 98ff88b3c45ec6b432fbeff761c48492dfaa735f ]

Remove keeping CRC configuration as it's not supported by AVF.

Fixes: 5ce4c2be1a64 ("net/avf: fix offload capabilities")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/avf/avf_ethdev.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/avf/avf_ethdev.c b/drivers/net/avf/avf_ethdev.c
index a44e3e6ca..e56d57c43 100644
--- a/drivers/net/avf/avf_ethdev.c
+++ b/drivers/net/avf/avf_ethdev.c
@@ -515,6 +515,4 @@ avf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_RX_OFFLOAD_TCP_CKSUM |
 		DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
-		DEV_RX_OFFLOAD_CRC_STRIP |
-		DEV_RX_OFFLOAD_KEEP_CRC |
 		DEV_RX_OFFLOAD_SCATTER |
 		DEV_RX_OFFLOAD_JUMBO_FRAME |
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.491918052 +0000
+++ 0034-net-avf-remove-keeping-CRC-configuration.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,26 +1,28 @@
-From 98ff88b3c45ec6b432fbeff761c48492dfaa735f Mon Sep 17 00:00:00 2001
+From 328983dd640b60da0fbc2fed9c8271a0af53f8b2 Mon Sep 17 00:00:00 2001
 From: Beilei Xing <beilei.xing@intel.com>
 Date: Wed, 26 Sep 2018 10:44:34 +0800
 Subject: [PATCH] net/avf: remove keeping CRC configuration
 
+[ upstream commit 98ff88b3c45ec6b432fbeff761c48492dfaa735f ]
+
 Remove keeping CRC configuration as it's not supported by AVF.
 
 Fixes: 5ce4c2be1a64 ("net/avf: fix offload capabilities")
-Cc: stable@dpdk.org
 
 Signed-off-by: Beilei Xing <beilei.xing@intel.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
 ---
- drivers/net/avf/avf_ethdev.c | 1 -
- 1 file changed, 1 deletion(-)
+ drivers/net/avf/avf_ethdev.c | 2 --
+ 1 file changed, 2 deletions(-)
 
 diff --git a/drivers/net/avf/avf_ethdev.c b/drivers/net/avf/avf_ethdev.c
-index 549498477..e56d57c43 100644
+index a44e3e6ca..e56d57c43 100644
 --- a/drivers/net/avf/avf_ethdev.c
 +++ b/drivers/net/avf/avf_ethdev.c
-@@ -515,5 +515,4 @@ avf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -515,6 +515,4 @@ avf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
  		DEV_RX_OFFLOAD_TCP_CKSUM |
  		DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
+-		DEV_RX_OFFLOAD_CRC_STRIP |
 -		DEV_RX_OFFLOAD_KEEP_CRC |
  		DEV_RX_OFFLOAD_SCATTER |
  		DEV_RX_OFFLOAD_JUMBO_FRAME |

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

* [dpdk-stable] patch 'net/virtio-user: fix multiple queue for vhost-kernel' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (32 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/avf: remove keeping CRC configuration' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/virtio: add missing supported features' " Kevin Traynor
                   ` (14 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 52d21556f0890247a4dddcfcfffb01e4bc3a0070 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Fri, 21 Sep 2018 20:52:42 +0800
Subject: [PATCH] net/virtio-user: fix multiple queue for vhost-kernel

[ upstream commit 21b90f790a5fd41875610440b888015aa9b0a460 ]

The multiple queue support in vhost-kernel is broken because
the dev->vhostfd is only available for vhost-user. We should
always try to enable queue pairs when it's not in server mode.

Fixes: 201a41651715 ("net/virtio-user: fix multiple queues fail in server mode")

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

diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 869e96f87..55a82e4b0 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -550,11 +550,9 @@ virtio_user_handle_mq(struct virtio_user_dev *dev, uint16_t q_pairs)
 	 * always return 0 in this case.
 	 */
-	if (dev->vhostfd >= 0) {
+	if (!dev->is_server || dev->vhostfd >= 0) {
 		for (i = 0; i < q_pairs; ++i)
 			ret |= dev->ops->enable_qp(dev, i, 1);
 		for (i = q_pairs; i < dev->max_queue_pairs; ++i)
 			ret |= dev->ops->enable_qp(dev, i, 0);
-	} else if (!dev->is_server) {
-		ret = ~0;
 	}
 	dev->queue_pairs = q_pairs;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.517228661 +0000
+++ 0035-net-virtio-user-fix-multiple-queue-for-vhost-kernel.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,14 +1,15 @@
-From 21b90f790a5fd41875610440b888015aa9b0a460 Mon Sep 17 00:00:00 2001
+From 52d21556f0890247a4dddcfcfffb01e4bc3a0070 Mon Sep 17 00:00:00 2001
 From: Tiwei Bie <tiwei.bie@intel.com>
 Date: Fri, 21 Sep 2018 20:52:42 +0800
 Subject: [PATCH] net/virtio-user: fix multiple queue for vhost-kernel
 
+[ upstream commit 21b90f790a5fd41875610440b888015aa9b0a460 ]
+
 The multiple queue support in vhost-kernel is broken because
 the dev->vhostfd is only available for vhost-user. We should
 always try to enable queue pairs when it's not in server mode.
 
 Fixes: 201a41651715 ("net/virtio-user: fix multiple queues fail in server mode")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

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

* [dpdk-stable] patch 'net/virtio: add missing supported features' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (33 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/virtio-user: fix multiple queue for vhost-kernel' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'vhost: fix corner case for enqueue operation' " Kevin Traynor
                   ` (13 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Tiwei Bie; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 9ca075a8817b3d71f214a4fe96d4caff21d23269 Mon Sep 17 00:00:00 2001
From: Tiwei Bie <tiwei.bie@intel.com>
Date: Fri, 21 Sep 2018 20:52:43 +0800
Subject: [PATCH] net/virtio: add missing supported features

[ upstream commit 66908eff12627c3dd09b0e1f3801d57b425f2e23 ]

The virtio features VIRTIO_NET_F_CSUM, VIRTIO_NET_F_HOST_TSO4
and VIRTIO_NET_F_HOST_TSO6 are supported by the virtio PMD.
But they are missing in the supported feature set. And since
below commit:

commit 4174a7b59d05 ("net/virtio: improve Tx offload features negotiation")

Virtio PMD will announce the Tx offloading capabilities based
on the features read from the device. And virtio-user won't
report the features which are not in virtio-PMD's supported
feature set. So since that commit, virtio-user won't announce
the DEV_TX_OFFLOAD_UDP_CKSUM, DEV_TX_OFFLOAD_TCP_CKSUM and
DEV_TX_OFFLOAD_TCP_TSO offloading capabilities even if the
vhost backend supports them.

This patch adds these missing features, and virtio-user will
report them if the backend supports them.

Fixes: 142678d42959 ("net/virtio-user: fix wrongly get/set features")

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

diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h
index b726ad108..e0f80e5a4 100644
--- a/drivers/net/virtio/virtio_ethdev.h
+++ b/drivers/net/virtio/virtio_ethdev.h
@@ -41,5 +41,8 @@
 	 1u << VIRTIO_NET_F_GUEST_CSUM	   |	\
 	 1u << VIRTIO_NET_F_GUEST_TSO4     |	\
-	 1u << VIRTIO_NET_F_GUEST_TSO6)
+	 1u << VIRTIO_NET_F_GUEST_TSO6     |	\
+	 1u << VIRTIO_NET_F_CSUM           |	\
+	 1u << VIRTIO_NET_F_HOST_TSO4      |	\
+	 1u << VIRTIO_NET_F_HOST_TSO6)
 
 /*
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.540482760 +0000
+++ 0036-net-virtio-add-missing-supported-features.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,8 +1,10 @@
-From 66908eff12627c3dd09b0e1f3801d57b425f2e23 Mon Sep 17 00:00:00 2001
+From 9ca075a8817b3d71f214a4fe96d4caff21d23269 Mon Sep 17 00:00:00 2001
 From: Tiwei Bie <tiwei.bie@intel.com>
 Date: Fri, 21 Sep 2018 20:52:43 +0800
 Subject: [PATCH] net/virtio: add missing supported features
 
+[ upstream commit 66908eff12627c3dd09b0e1f3801d57b425f2e23 ]
+
 The virtio features VIRTIO_NET_F_CSUM, VIRTIO_NET_F_HOST_TSO4
 and VIRTIO_NET_F_HOST_TSO6 are supported by the virtio PMD.
 But they are missing in the supported feature set. And since
@@ -22,7 +24,6 @@
 report them if the backend supports them.
 
 Fixes: 142678d42959 ("net/virtio-user: fix wrongly get/set features")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

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

* [dpdk-stable] patch 'vhost: fix corner case for enqueue operation' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (34 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/virtio: add missing supported features' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/i40e: fix 25G AOC and ACC cable detection on XXV710' " Kevin Traynor
                   ` (12 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Jiayu Hu; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 2f83697cdf5095d1b553240c45a1a229d4c44c3b Mon Sep 17 00:00:00 2001
From: Jiayu Hu <jiayu.hu@intel.com>
Date: Mon, 17 Sep 2018 11:54:42 +0800
Subject: [PATCH] vhost: fix corner case for enqueue operation

[ upstream commit 729199397f9fc4ba265e94d492c792244e8c364b ]

When performing enqueue operations on the split and packed rings,
if the reserved buffer length from the descriptor table exceeds
65535, the returned length by fill_vec_buf_split/_packed()
overflows. This patch is to avoid this corner case.

Fixes: f689586bc060 ("vhost: shadow used ring update")
Fixes: fd68b4739d2c ("vhost: use buffer vectors in dequeue path")
Fixes: 2f3225a7d69b ("vhost: add vector filling support for packed ring")
Fixes: 37f5e79a271d ("vhost: add shadow used ring support for packed rings")
Fixes: a922401f35cc ("vhost: add Rx support for packed ring")
Fixes: ae999ce49dcb ("vhost: add Tx support for packed ring")

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/virtio_net.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 4bfae76a6..f8794ee19 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -123,5 +123,5 @@ flush_shadow_used_ring_split(struct virtio_net *dev, struct vhost_virtqueue *vq)
 static __rte_always_inline void
 update_shadow_used_ring_split(struct vhost_virtqueue *vq,
-			 uint16_t desc_idx, uint16_t len)
+			 uint16_t desc_idx, uint32_t len)
 {
 	uint16_t i = vq->shadow_used_idx++;
@@ -187,5 +187,5 @@ flush_shadow_used_ring_packed(struct virtio_net *dev,
 static __rte_always_inline void
 update_shadow_used_ring_packed(struct vhost_virtqueue *vq,
-			 uint16_t desc_idx, uint16_t len, uint16_t count)
+			 uint16_t desc_idx, uint32_t len, uint16_t count)
 {
 	uint16_t i = vq->shadow_used_idx++;
@@ -330,5 +330,5 @@ fill_vec_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 			 uint32_t avail_idx, uint16_t *vec_idx,
 			 struct buf_vector *buf_vec, uint16_t *desc_chain_head,
-			 uint16_t *desc_chain_len, uint8_t perm)
+			 uint32_t *desc_chain_len, uint8_t perm)
 {
 	uint16_t idx = vq->avail->ring[avail_idx & (vq->size - 1)];
@@ -410,5 +410,5 @@ reserve_avail_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 
 	uint16_t head_idx = 0;
-	uint16_t len = 0;
+	uint32_t len = 0;
 
 	*num_buffers = 0;
@@ -453,5 +453,5 @@ fill_vec_buf_packed_indirect(struct virtio_net *dev,
 			struct vhost_virtqueue *vq,
 			struct vring_packed_desc *desc, uint16_t *vec_idx,
-			struct buf_vector *buf_vec, uint16_t *len, uint8_t perm)
+			struct buf_vector *buf_vec, uint32_t *len, uint8_t perm)
 {
 	uint16_t i;
@@ -509,5 +509,5 @@ fill_vec_buf_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,
 				uint16_t avail_idx, uint16_t *desc_count,
 				struct buf_vector *buf_vec, uint16_t *vec_idx,
-				uint16_t *buf_id, uint16_t *len, uint8_t perm)
+				uint16_t *buf_id, uint32_t *len, uint8_t perm)
 {
 	bool wrap_counter = vq->avail_wrap_counter;
@@ -574,5 +574,5 @@ reserve_avail_buf_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,
 
 	uint16_t buf_id = 0;
-	uint16_t len = 0;
+	uint32_t len = 0;
 	uint16_t desc_count;
 
@@ -1380,5 +1380,6 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 	for (i = 0; i < count; i++) {
 		struct buf_vector buf_vec[BUF_VECTOR_MAX];
-		uint16_t head_idx, dummy_len;
+		uint16_t head_idx;
+		uint32_t dummy_len;
 		uint16_t nr_vec = 0;
 		int err;
@@ -1487,5 +1488,6 @@ virtio_dev_tx_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,
 	for (i = 0; i < count; i++) {
 		struct buf_vector buf_vec[BUF_VECTOR_MAX];
-		uint16_t buf_id, dummy_len;
+		uint16_t buf_id;
+		uint32_t dummy_len;
 		uint16_t desc_count, nr_vec = 0;
 		int err;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.562575328 +0000
+++ 0037-vhost-fix-corner-case-for-enqueue-operation.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,8 +1,10 @@
-From 729199397f9fc4ba265e94d492c792244e8c364b Mon Sep 17 00:00:00 2001
+From 2f83697cdf5095d1b553240c45a1a229d4c44c3b Mon Sep 17 00:00:00 2001
 From: Jiayu Hu <jiayu.hu@intel.com>
 Date: Mon, 17 Sep 2018 11:54:42 +0800
 Subject: [PATCH] vhost: fix corner case for enqueue operation
 
+[ upstream commit 729199397f9fc4ba265e94d492c792244e8c364b ]
+
 When performing enqueue operations on the split and packed rings,
 if the reserved buffer length from the descriptor table exceeds
 65535, the returned length by fill_vec_buf_split/_packed()
@@ -14,7 +16,6 @@
 Fixes: 37f5e79a271d ("vhost: add shadow used ring support for packed rings")
 Fixes: a922401f35cc ("vhost: add Rx support for packed ring")
 Fixes: ae999ce49dcb ("vhost: add Tx support for packed ring")
-Cc: stable@dpdk.org
 
 Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

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

* [dpdk-stable] patch 'net/i40e: fix 25G AOC and ACC cable detection on XXV710' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (35 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'vhost: fix corner case for enqueue operation' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/bonding: stop and deactivate slaves on stop' " Kevin Traynor
                   ` (11 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Damjan Marion; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From e2774f13917a221c67045ebc494a8ca4a2b40c1d Mon Sep 17 00:00:00 2001
From: Damjan Marion <damarion@cisco.com>
Date: Tue, 25 Sep 2018 10:16:40 +0200
Subject: [PATCH] net/i40e: fix 25G AOC and ACC cable detection on XXV710

[ upstream commit 3c4c76cf170d62de7cb246c28f8113dfffa0d582 ]

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

Signed-off-by: Damjan Marion <damarion@cisco.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index 3fffe5a55..b876933e5 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -1394,5 +1394,7 @@ i40e_calc_itr_interval(bool is_pf, bool is_multi_drv)
 	((phy_type) & I40E_CAP_PHY_TYPE_25GBASE_CR) || \
 	((phy_type) & I40E_CAP_PHY_TYPE_25GBASE_SR) || \
-	((phy_type) & I40E_CAP_PHY_TYPE_25GBASE_LR))
+	((phy_type) & I40E_CAP_PHY_TYPE_25GBASE_LR) || \
+	((phy_type) & I40E_CAP_PHY_TYPE_25GBASE_AOC) || \
+	((phy_type) & I40E_CAP_PHY_TYPE_25GBASE_ACC))
 
 #endif /* _I40E_ETHDEV_H_ */
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.587375369 +0000
+++ 0038-net-i40e-fix-25G-AOC-and-ACC-cable-detection-on-XXV7.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,10 +1,11 @@
-From 3c4c76cf170d62de7cb246c28f8113dfffa0d582 Mon Sep 17 00:00:00 2001
+From e2774f13917a221c67045ebc494a8ca4a2b40c1d Mon Sep 17 00:00:00 2001
 From: Damjan Marion <damarion@cisco.com>
 Date: Tue, 25 Sep 2018 10:16:40 +0200
 Subject: [PATCH] net/i40e: fix 25G AOC and ACC cable detection on XXV710
 
+[ upstream commit 3c4c76cf170d62de7cb246c28f8113dfffa0d582 ]
+
 Fixes: 75d133dd3296 ("net/i40e: enable 25G device")
-Cc: stable@dpdk.org
 
 Signed-off-by: Damjan Marion <damarion@cisco.com>
 Acked-by: Qi Zhang <qi.z.zhang@intel.com>
@@ -13,10 +14,10 @@
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
-index 7d197f6aa..11ecfc30d 100644
+index 3fffe5a55..b876933e5 100644
 --- a/drivers/net/i40e/i40e_ethdev.h
 +++ b/drivers/net/i40e/i40e_ethdev.h
-@@ -1397,5 +1397,7 @@ i40e_calc_itr_interval(bool is_pf, bool is_multi_drv)
+@@ -1394,5 +1394,7 @@ i40e_calc_itr_interval(bool is_pf, bool is_multi_drv)
  	((phy_type) & I40E_CAP_PHY_TYPE_25GBASE_CR) || \
  	((phy_type) & I40E_CAP_PHY_TYPE_25GBASE_SR) || \
 -	((phy_type) & I40E_CAP_PHY_TYPE_25GBASE_LR))

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

* [dpdk-stable] patch 'net/bonding: stop and deactivate slaves on stop' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (36 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/i40e: fix 25G AOC and ACC cable detection on XXV710' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'doc: fix typo for cryptodev' " Kevin Traynor
                   ` (10 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Radu Nicolau; +Cc: Declan Doherty, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From b04e35734e0305b1e477aa7ff13ad4e6beae888c Mon Sep 17 00:00:00 2001
From: Radu Nicolau <radu.nicolau@intel.com>
Date: Wed, 1 Aug 2018 14:18:43 +0100
Subject: [PATCH] net/bonding: stop and deactivate slaves on stop

[ upstream commit 7486331308f6c18b3f84bb2c19b8ffe1808a32f5 ]

When a bonding port is stopped also stop and deactivate all slaves.
Otherwise slaves will be still listed as active.

Fixes: 2efb58cbab6e ("bond: new link bonding library")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 86e78bde8..5c2890f5f 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2175,10 +2175,13 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev)
 	}
 
+	eth_dev->data->dev_link.link_status = ETH_LINK_DOWN;
+	eth_dev->data->dev_started = 0;
+
 	internals->link_status_polling_enabled = 0;
-	for (i = 0; i < internals->slave_count; i++)
+	for (i = 0; i < internals->slave_count; i++) {
 		internals->slaves[i].last_link_status = 0;
-
-	eth_dev->data->dev_link.link_status = ETH_LINK_DOWN;
-	eth_dev->data->dev_started = 0;
+		rte_eth_dev_stop(internals->slaves[i].port_id);
+		deactivate_slave(eth_dev, internals->slaves[i].port_id);
+	}
 }
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.612036957 +0000
+++ 0039-net-bonding-stop-and-deactivate-slaves-on-stop.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,13 +1,14 @@
-From 7486331308f6c18b3f84bb2c19b8ffe1808a32f5 Mon Sep 17 00:00:00 2001
+From b04e35734e0305b1e477aa7ff13ad4e6beae888c Mon Sep 17 00:00:00 2001
 From: Radu Nicolau <radu.nicolau@intel.com>
 Date: Wed, 1 Aug 2018 14:18:43 +0100
 Subject: [PATCH] net/bonding: stop and deactivate slaves on stop
 
+[ upstream commit 7486331308f6c18b3f84bb2c19b8ffe1808a32f5 ]
+
 When a bonding port is stopped also stop and deactivate all slaves.
 Otherwise slaves will be still listed as active.
 
 Fixes: 2efb58cbab6e ("bond: new link bonding library")
-Cc: stable@dpdk.org
 
 Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
 Acked-by: Declan Doherty <declan.doherty@intel.com>
@@ -16,7 +17,7 @@
  1 file changed, 7 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
-index 4df0e8407..1d6245aa5 100644
+index 86e78bde8..5c2890f5f 100644
 --- a/drivers/net/bonding/rte_eth_bond_pmd.c
 +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
 @@ -2175,10 +2175,13 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev)

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

* [dpdk-stable] patch 'doc: fix typo for cryptodev' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (37 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/bonding: stop and deactivate slaves on stop' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'doc: fix missing CCM to QAT feature list' " Kevin Traynor
                   ` (9 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Tomasz Duszynski; +Cc: Fiona Trahe, Pablo de Lara, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 90095a48b273d4fd811e4e38a16b7a59afbd04c6 Mon Sep 17 00:00:00 2001
From: Tomasz Duszynski <tdu@semihalf.com>
Date: Thu, 30 Aug 2018 11:48:29 +0200
Subject: [PATCH] doc: fix typo for cryptodev

[ upstream commit 026bde3b9a1a8f42351aba1b2e0a55af3aa4096b ]

LB stans for 'Linear Buffers'. For the 'Scatter-gatter list' we have
SGL acronym.

Fixes: 2717246ecd7d ("cryptodev: replace mbuf scatter gather flag")

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 doc/guides/cryptodevs/overview.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/cryptodevs/overview.rst b/doc/guides/cryptodevs/overview.rst
index 3f776f078..607e758da 100644
--- a/doc/guides/cryptodevs/overview.rst
+++ b/doc/guides/cryptodevs/overview.rst
@@ -34,5 +34,5 @@ Supported Feature Flags
 
    - "OOP LB In LB Out" feature flag stands for
-     "Out-of-place Linear Buffers Input, Scatter-gather list Output",
+     "Out-of-place Linear Buffers Input, Linear Buffers Output",
      which means that Out-of-place operation is supported,
      with linear input and output buffers.
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.636526135 +0000
+++ 0040-doc-fix-typo-for-cryptodev.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,13 +1,14 @@
-From 026bde3b9a1a8f42351aba1b2e0a55af3aa4096b Mon Sep 17 00:00:00 2001
+From 90095a48b273d4fd811e4e38a16b7a59afbd04c6 Mon Sep 17 00:00:00 2001
 From: Tomasz Duszynski <tdu@semihalf.com>
 Date: Thu, 30 Aug 2018 11:48:29 +0200
 Subject: [PATCH] doc: fix typo for cryptodev
 
+[ upstream commit 026bde3b9a1a8f42351aba1b2e0a55af3aa4096b ]
+
 LB stans for 'Linear Buffers'. For the 'Scatter-gatter list' we have
 SGL acronym.
 
 Fixes: 2717246ecd7d ("cryptodev: replace mbuf scatter gather flag")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
 Acked-by: Fiona Trahe <fiona.trahe@intel.com>

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

* [dpdk-stable] patch 'doc: fix missing CCM to QAT feature list' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (38 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'doc: fix typo for cryptodev' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix wrong session size' " Kevin Traynor
                   ` (8 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Tomasz Cel; +Cc: Fiona Trahe, Marko Kovacevic, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 3c74dac8de6307c6608d781443591a400c0ded28 Mon Sep 17 00:00:00 2001
From: Tomasz Cel <tomaszx.cel@intel.com>
Date: Wed, 19 Sep 2018 08:27:18 +0200
Subject: [PATCH] doc: fix missing CCM to QAT feature list

[ upstream commit 7bd6f76ee678ec6aa81cb53562f852a43e842718 ]

Update the QAT documentation to show that it supports CCM.

Fixes: ab56c4d9ed9a ("crypto/qat: support AES-CCM")

Signed-off-by: Tomasz Cel <tomaszx.cel@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
---
 doc/guides/cryptodevs/features/qat.ini | 3 +++
 doc/guides/cryptodevs/qat.rst          | 1 +
 2 files changed, 4 insertions(+)

diff --git a/doc/guides/cryptodevs/features/qat.ini b/doc/guides/cryptodevs/features/qat.ini
index 29d865e07..220291b2c 100644
--- a/doc/guides/cryptodevs/features/qat.ini
+++ b/doc/guides/cryptodevs/features/qat.ini
@@ -57,2 +57,5 @@ AES GCM (128) = Y
 AES GCM (192) = Y
 AES GCM (256) = Y
+AES CCM (128) = Y
+AES CCM (192) = Y
+AES CCM (256) = Y
diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst
index bdc58eb2c..c2528bcaa 100644
--- a/doc/guides/cryptodevs/qat.rst
+++ b/doc/guides/cryptodevs/qat.rst
@@ -55,4 +55,5 @@ Supported AEAD algorithms:
 
 * ``RTE_CRYPTO_AEAD_AES_GCM``
+* ``RTE_CRYPTO_AEAD_AES_CCM``
 
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.660443711 +0000
+++ 0041-doc-fix-missing-CCM-to-QAT-feature-list.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,12 +1,13 @@
-From 7bd6f76ee678ec6aa81cb53562f852a43e842718 Mon Sep 17 00:00:00 2001
+From 3c74dac8de6307c6608d781443591a400c0ded28 Mon Sep 17 00:00:00 2001
 From: Tomasz Cel <tomaszx.cel@intel.com>
 Date: Wed, 19 Sep 2018 08:27:18 +0200
 Subject: [PATCH] doc: fix missing CCM to QAT feature list
 
+[ upstream commit 7bd6f76ee678ec6aa81cb53562f852a43e842718 ]
+
 Update the QAT documentation to show that it supports CCM.
 
 Fixes: ab56c4d9ed9a ("crypto/qat: support AES-CCM")
-Cc: stable@dpdk.org
 
 Signed-off-by: Tomasz Cel <tomaszx.cel@intel.com>
 Acked-by: Fiona Trahe <fiona.trahe@intel.com>
@@ -27,10 +28,10 @@
 +AES CCM (192) = Y
 +AES CCM (256) = Y
 diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst
-index af1079918..b09624f2c 100644
+index bdc58eb2c..c2528bcaa 100644
 --- a/doc/guides/cryptodevs/qat.rst
 +++ b/doc/guides/cryptodevs/qat.rst
-@@ -67,4 +67,5 @@ Supported AEAD algorithms:
+@@ -55,4 +55,5 @@ Supported AEAD algorithms:
  
  * ``RTE_CRYPTO_AEAD_AES_GCM``
 +* ``RTE_CRYPTO_AEAD_AES_CCM``

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

* [dpdk-stable] patch 'examples/ipsec-secgw: fix wrong session size' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (39 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'doc: fix missing CCM to QAT feature list' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'app/test-crypto-perf: fix check for auth key' " Kevin Traynor
                   ` (7 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Anoob Joseph; +Cc: Archana Muniganti, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 5dabd7159e90d7a66e19febc969d351de9a64999 Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Date: Fri, 7 Sep 2018 11:25:26 +0530
Subject: [PATCH] examples/ipsec-secgw: fix wrong session size

[ upstream commit 2e960c97c6b9311bea90b775e21a4b99ac1d50dc ]

Crypto devices, which support lookaside protocol, exposes security
session size in addition to the crypto private symmetric session data
size. For applications using the security capabilities, both these
sizes need to be considered.

Fixes: ec17993a145a ("examples/ipsec-secgw: support security offload")

Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Signed-off-by: Archana Muniganti <muniganti.archana@caviumnetworks.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index b45b87bde..47ac26a97 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1393,7 +1393,25 @@ cryptodevs_init(void)
 	uint32_t max_sess_sz = 0, sess_sz;
 	for (cdev_id = 0; cdev_id < rte_cryptodev_count(); cdev_id++) {
+		void *sec_ctx;
+
+		/* Get crypto priv session size */
 		sess_sz = rte_cryptodev_sym_get_private_session_size(cdev_id);
 		if (sess_sz > max_sess_sz)
 			max_sess_sz = sess_sz;
+
+		/*
+		 * If crypto device is security capable, need to check the
+		 * size of security session as well.
+		 */
+
+		/* Get security context of the crypto device */
+		sec_ctx = rte_cryptodev_get_sec_ctx(cdev_id);
+		if (sec_ctx == NULL)
+			continue;
+
+		/* Get size of security session */
+		sess_sz = rte_security_session_get_size(sec_ctx);
+		if (sess_sz > max_sess_sz)
+			max_sess_sz = sess_sz;
 	}
 	RTE_ETH_FOREACH_DEV(port_id) {
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.684023909 +0000
+++ 0042-examples-ipsec-secgw-fix-wrong-session-size.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,15 +1,16 @@
-From 2e960c97c6b9311bea90b775e21a4b99ac1d50dc Mon Sep 17 00:00:00 2001
+From 5dabd7159e90d7a66e19febc969d351de9a64999 Mon Sep 17 00:00:00 2001
 From: Anoob Joseph <anoob.joseph@caviumnetworks.com>
 Date: Fri, 7 Sep 2018 11:25:26 +0530
 Subject: [PATCH] examples/ipsec-secgw: fix wrong session size
 
+[ upstream commit 2e960c97c6b9311bea90b775e21a4b99ac1d50dc ]
+
 Crypto devices, which support lookaside protocol, exposes security
 session size in addition to the crypto private symmetric session data
 size. For applications using the security capabilities, both these
 sizes need to be considered.
 
 Fixes: ec17993a145a ("examples/ipsec-secgw: support security offload")
-Cc: stable@dpdk.org
 
 Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
 Signed-off-by: Archana Muniganti <muniganti.archana@caviumnetworks.com>
@@ -19,10 +20,10 @@
  1 file changed, 18 insertions(+)
 
 diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
-index f9a90c620..1bc0b5b50 100644
+index b45b87bde..47ac26a97 100644
 --- a/examples/ipsec-secgw/ipsec-secgw.c
 +++ b/examples/ipsec-secgw/ipsec-secgw.c
-@@ -1392,7 +1392,25 @@ cryptodevs_init(void)
+@@ -1393,7 +1393,25 @@ cryptodevs_init(void)
  	uint32_t max_sess_sz = 0, sess_sz;
  	for (cdev_id = 0; cdev_id < rte_cryptodev_count(); cdev_id++) {
 +		void *sec_ctx;

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

* [dpdk-stable] patch 'app/test-crypto-perf: fix check for auth key' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (40 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix wrong session size' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'app/test-crypto-perf: fix check for cipher IV' " Kevin Traynor
                   ` (6 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Anoob Joseph; +Cc: Ayuj Verma, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 14280883c473c0a379076efe2347d903f1672005 Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Date: Fri, 14 Sep 2018 14:54:47 +0530
Subject: [PATCH] app/test-crypto-perf: fix check for auth key

[ upstream commit c864167ce97d91ed95c68f8f85cf2dbaaae212d3 ]

Authentication key is not required for all algorithms. Making sure the
null check is done only when 'auth_key_sz' is non-zero.

Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Signed-off-by: Ayuj Verma <ayuj.verma@caviumnetworks.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 app/test-crypto-perf/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 5c7dadb60..b1e91f14e 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -358,5 +358,7 @@ cperf_check_test_vector(struct cperf_options *opts,
 			if (test_vec->plaintext.length < opts->max_buffer_size)
 				return -1;
-			if (test_vec->auth_key.data == NULL)
+			/* Auth key is only required for some algorithms */
+			if (opts->auth_key_sz &&
+					test_vec->auth_key.data == NULL)
 				return -1;
 			if (test_vec->auth_key.length != opts->auth_key_sz)
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.706251574 +0000
+++ 0043-app-test-crypto-perf-fix-check-for-auth-key.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,13 +1,14 @@
-From c864167ce97d91ed95c68f8f85cf2dbaaae212d3 Mon Sep 17 00:00:00 2001
+From 14280883c473c0a379076efe2347d903f1672005 Mon Sep 17 00:00:00 2001
 From: Anoob Joseph <anoob.joseph@caviumnetworks.com>
 Date: Fri, 14 Sep 2018 14:54:47 +0530
 Subject: [PATCH] app/test-crypto-perf: fix check for auth key
 
+[ upstream commit c864167ce97d91ed95c68f8f85cf2dbaaae212d3 ]
+
 Authentication key is not required for all algorithms. Making sure the
 null check is done only when 'auth_key_sz' is non-zero.
 
 Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
-Cc: stable@dpdk.org
 
 Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
 Signed-off-by: Ayuj Verma <ayuj.verma@caviumnetworks.com>
@@ -17,7 +18,7 @@
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
-index c9f99a76d..55d97c26b 100644
+index 5c7dadb60..b1e91f14e 100644
 --- a/app/test-crypto-perf/main.c
 +++ b/app/test-crypto-perf/main.c
 @@ -358,5 +358,7 @@ cperf_check_test_vector(struct cperf_options *opts,

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

* [dpdk-stable] patch 'app/test-crypto-perf: fix check for cipher IV' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (41 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'app/test-crypto-perf: fix check for auth key' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'app/test-crypto-perf: fix double allocation of memory' " Kevin Traynor
                   ` (5 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Anoob Joseph; +Cc: Akash Saxena, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 6194da2c033927d5fe1ac5f54759721c02f14b11 Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Date: Fri, 14 Sep 2018 14:54:48 +0530
Subject: [PATCH] app/test-crypto-perf: fix check for cipher IV

[ upstream commit 3c78812b5082146f23af45784a04c37be9b90190 ]

IV is not required for all ciphers. Making sure the null check is done
only when 'cipher_iv_sz' is non-zero.

Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")

Signed-off-by: Akash Saxena <akash.saxena@caviumnetworks.com>
Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 app/test-crypto-perf/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index b1e91f14e..2b6f5fbed 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -343,5 +343,7 @@ cperf_check_test_vector(struct cperf_options *opts,
 			if (test_vec->ciphertext.length < opts->max_buffer_size)
 				return -1;
-			if (test_vec->cipher_iv.data == NULL)
+			/* Cipher IV is only required for some algorithms */
+			if (opts->cipher_iv_sz &&
+					test_vec->cipher_iv.data == NULL)
 				return -1;
 			if (test_vec->cipher_iv.length != opts->cipher_iv_sz)
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.728520645 +0000
+++ 0044-app-test-crypto-perf-fix-check-for-cipher-IV.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,13 +1,14 @@
-From 3c78812b5082146f23af45784a04c37be9b90190 Mon Sep 17 00:00:00 2001
+From 6194da2c033927d5fe1ac5f54759721c02f14b11 Mon Sep 17 00:00:00 2001
 From: Anoob Joseph <anoob.joseph@caviumnetworks.com>
 Date: Fri, 14 Sep 2018 14:54:48 +0530
 Subject: [PATCH] app/test-crypto-perf: fix check for cipher IV
 
+[ upstream commit 3c78812b5082146f23af45784a04c37be9b90190 ]
+
 IV is not required for all ciphers. Making sure the null check is done
 only when 'cipher_iv_sz' is non-zero.
 
 Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
-Cc: stable@dpdk.org
 
 Signed-off-by: Akash Saxena <akash.saxena@caviumnetworks.com>
 Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
@@ -17,7 +18,7 @@
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
-index 55d97c26b..953e058c9 100644
+index b1e91f14e..2b6f5fbed 100644
 --- a/app/test-crypto-perf/main.c
 +++ b/app/test-crypto-perf/main.c
 @@ -343,5 +343,7 @@ cperf_check_test_vector(struct cperf_options *opts,

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

* [dpdk-stable] patch 'app/test-crypto-perf: fix double allocation of memory' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (42 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'app/test-crypto-perf: fix check for cipher IV' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'crypto/aesni_mb: fix possible array overrun' " Kevin Traynor
                   ` (4 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Anoob Joseph; +Cc: Akash Saxena, Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 8c5e8490acf258ad010d6c498f9cedc810b9fd6d Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Date: Mon, 10 Sep 2018 12:10:58 +0530
Subject: [PATCH] app/test-crypto-perf: fix double allocation of memory

[ upstream commit c61518ed86a02118322c9250be1797a58e3974ba ]

The field, 'cipher_iv.data' is allocated twice when cipher is not null.
Ideally the allocation should depend only on the field
'cperf_options.cipher_iv_sz'. This will make sure this code path gets
valid for ciphers which doesn't require IV.

Fixes: 0fbd75a99fc9 ("cryptodev: move IV parameters to session")

Signed-off-by: Akash Saxena <akash.saxena@caviumnetworks.com>
Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 app/test-crypto-perf/cperf_test_vectors.c | 22 +++++++++-------------
 1 file changed, 9 insertions(+), 13 deletions(-)

diff --git a/app/test-crypto-perf/cperf_test_vectors.c b/app/test-crypto-perf/cperf_test_vectors.c
index 907a995cc..1af952499 100644
--- a/app/test-crypto-perf/cperf_test_vectors.c
+++ b/app/test-crypto-perf/cperf_test_vectors.c
@@ -420,11 +420,17 @@ cperf_test_vector_get_dummy(struct cperf_options *options)
 			t_vec->ciphertext.data = plaintext;
 			t_vec->cipher_key.data = NULL;
-			t_vec->cipher_iv.data = NULL;
 		} else {
 			t_vec->cipher_key.length = options->cipher_key_sz;
 			t_vec->ciphertext.data = ciphertext;
 			t_vec->cipher_key.data = cipher_key;
-			t_vec->cipher_iv.data = rte_malloc(NULL, options->cipher_iv_sz,
-					16);
+		}
+
+		/* Init IV data ptr */
+		t_vec->cipher_iv.data = NULL;
+
+		if (options->cipher_iv_sz != 0) {
+			/* Set IV parameters */
+			t_vec->cipher_iv.data = rte_malloc(NULL,
+					options->cipher_iv_sz, 16);
 			if (t_vec->cipher_iv.data == NULL) {
 				rte_free(t_vec);
@@ -434,15 +440,5 @@ cperf_test_vector_get_dummy(struct cperf_options *options)
 		}
 		t_vec->ciphertext.length = options->max_buffer_size;
-
-		/* Set IV parameters */
-		t_vec->cipher_iv.data = rte_malloc(NULL, options->cipher_iv_sz,
-				16);
-		if (options->cipher_iv_sz && t_vec->cipher_iv.data == NULL) {
-			rte_free(t_vec);
-			return NULL;
-		}
-		memcpy(t_vec->cipher_iv.data, iv, options->cipher_iv_sz);
 		t_vec->cipher_iv.length = options->cipher_iv_sz;
-
 		t_vec->data.cipher_offset = 0;
 		t_vec->data.cipher_length = options->max_buffer_size;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.751640030 +0000
+++ 0045-app-test-crypto-perf-fix-double-allocation-of-memory.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,15 +1,16 @@
-From c61518ed86a02118322c9250be1797a58e3974ba Mon Sep 17 00:00:00 2001
+From 8c5e8490acf258ad010d6c498f9cedc810b9fd6d Mon Sep 17 00:00:00 2001
 From: Anoob Joseph <anoob.joseph@caviumnetworks.com>
 Date: Mon, 10 Sep 2018 12:10:58 +0530
 Subject: [PATCH] app/test-crypto-perf: fix double allocation of memory
 
+[ upstream commit c61518ed86a02118322c9250be1797a58e3974ba ]
+
 The field, 'cipher_iv.data' is allocated twice when cipher is not null.
 Ideally the allocation should depend only on the field
 'cperf_options.cipher_iv_sz'. This will make sure this code path gets
 valid for ciphers which doesn't require IV.
 
 Fixes: 0fbd75a99fc9 ("cryptodev: move IV parameters to session")
-Cc: stable@dpdk.org
 
 Signed-off-by: Akash Saxena <akash.saxena@caviumnetworks.com>
 Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>

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

* [dpdk-stable] patch 'crypto/aesni_mb: fix possible array overrun' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (43 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'app/test-crypto-perf: fix double allocation of memory' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'crypto/aesni_mb: fix truncated digest size for CMAC' " Kevin Traynor
                   ` (3 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Konstantin Ananyev, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From a42cc166aa46a6d9506914eb8dc0b4ecf075f084 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Thu, 2 Aug 2018 05:49:40 +0100
Subject: [PATCH] crypto/aesni_mb: fix possible array overrun

[ upstream commit 95978a85a410e7fa1a03d4f3b90c8770f7f29e72 ]

In order to process crypto operations in the AESNI MB PMD,
they need to be sent to the buffer manager of the Multi-buffer library,
through the "job" structure.

Currently, it is checked if there are outstanding operations to process
in the ring, before getting a new job. However, if there are no available
jobs in the manager, a flush operation needs to take place, freeing some
of the jobs, so it can be used for the outstanding operation.

In order to avoid leaving the dequeued operation without being processed,
the maximum number of operations that can be flushed is the remaining
operations to return, which is the maximum number of operations that can
be return minus the number of operations ready to be returned
(nb_ops - processed_jobs), minus 1 (for the new operation).

The problem comes when (nb_ops - processed_jobs) is 1 (last operation to
dequeue). In that case, flush_mb_mgr is called with maximum number of
operations equal to 0, which is wrong, causing a potential overrun in the
"ops" array.
Besides, the operation dequeued from the ring will be leaked, as no more
operations can be returned.

The solution is to first check if there are jobs available in the manager.
If there are not, flush operation gets called, and if enough operations
are returned from the manager, then no more outstanding operations get
dequeued from the ring, avoiding both the memory leak and the array
overrun.
If there are enough jobs, PMD tries to dequeue an operation from the ring.
If there are no operations in the ring, the new job pointer is not used,
and it will be used in the next get_next_job call, so no memory leak
happens.

Fixes: 0f548b50a160 ("crypto/aesni_mb: process crypto op on dequeue")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 93dc7a443..e2dd834f0 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -834,9 +834,4 @@ aesni_mb_pmd_dequeue_burst(void *queue_pair, struct rte_crypto_op **ops,
 	uint8_t digest_idx = qp->digest_idx;
 	do {
-		/* Get next operation to process from ingress queue */
-		retval = rte_ring_dequeue(qp->ingress_queue, (void **)&op);
-		if (retval < 0)
-			break;
-
 		/* Get next free mb job struct from mb manager */
 		job = (*qp->op_fns->job.get_next)(qp->mb_mgr);
@@ -845,9 +840,22 @@ aesni_mb_pmd_dequeue_burst(void *queue_pair, struct rte_crypto_op **ops,
 			processed_jobs += flush_mb_mgr(qp,
 					&ops[processed_jobs],
-					(nb_ops - processed_jobs) - 1);
+					nb_ops - processed_jobs);
+
+			if (nb_ops == processed_jobs)
+				break;
 
 			job = (*qp->op_fns->job.get_next)(qp->mb_mgr);
 		}
 
+		/*
+		 * Get next operation to process from ingress queue.
+		 * There is no need to return the job to the MB_MGR
+		 * if there are no more operations to process, since the MB_MGR
+		 * can use that pointer again in next get_next calls.
+		 */
+		retval = rte_ring_dequeue(qp->ingress_queue, (void **)&op);
+		if (retval < 0)
+			break;
+
 		retval = set_mb_job_params(job, qp, op, &digest_idx);
 		if (unlikely(retval != 0)) {
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.775425876 +0000
+++ 0046-crypto-aesni_mb-fix-possible-array-overrun.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,8 +1,10 @@
-From 95978a85a410e7fa1a03d4f3b90c8770f7f29e72 Mon Sep 17 00:00:00 2001
+From a42cc166aa46a6d9506914eb8dc0b4ecf075f084 Mon Sep 17 00:00:00 2001
 From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
 Date: Thu, 2 Aug 2018 05:49:40 +0100
 Subject: [PATCH] crypto/aesni_mb: fix possible array overrun
 
+[ upstream commit 95978a85a410e7fa1a03d4f3b90c8770f7f29e72 ]
+
 In order to process crypto operations in the AESNI MB PMD,
 they need to be sent to the buffer manager of the Multi-buffer library,
 through the "job" structure.
@@ -36,7 +38,6 @@
 happens.
 
 Fixes: 0f548b50a160 ("crypto/aesni_mb: process crypto op on dequeue")
-Cc: stable@dpdk.org
 
 Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
 Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

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

* [dpdk-stable] patch 'crypto/aesni_mb: fix truncated digest size for CMAC' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (44 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'crypto/aesni_mb: fix possible array overrun' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'compress/qat: fix checksum on decompression' " Kevin Traynor
                   ` (2 subsequent siblings)
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Marko Kovacevic, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 591975fe0461e711d009dcf337caffc367903505 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Tue, 14 Aug 2018 01:38:46 +0100
Subject: [PATCH] crypto/aesni_mb: fix truncated digest size for CMAC

[ upstream commit 16a3558e0bd8fce3e90def75fcfcd0a947b469c1 ]

The truncated digest size for AES-CMAC is 12 and not 16,
as the Multi-buffer library can output both 12 and 16 bytes.

Fixes: 6491dbbecebb ("crypto/aesni_mb: support AES CMAC")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
---
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
index 70e9d18e5..67492c7f4 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
@@ -65,5 +65,5 @@ static const unsigned auth_truncated_digest_byte_lengths[] = {
 		[SHA_512]	= 32,
 		[AES_XCBC]	= 12,
-		[AES_CMAC]	= 16,
+		[AES_CMAC]	= 12,
 		[AES_CCM]	= 8,
 		[NULL_HASH]	= 0
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.799260885 +0000
+++ 0047-crypto-aesni_mb-fix-truncated-digest-size-for-CMAC.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,13 +1,14 @@
-From 16a3558e0bd8fce3e90def75fcfcd0a947b469c1 Mon Sep 17 00:00:00 2001
+From 591975fe0461e711d009dcf337caffc367903505 Mon Sep 17 00:00:00 2001
 From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
 Date: Tue, 14 Aug 2018 01:38:46 +0100
 Subject: [PATCH] crypto/aesni_mb: fix truncated digest size for CMAC
 
+[ upstream commit 16a3558e0bd8fce3e90def75fcfcd0a947b469c1 ]
+
 The truncated digest size for AES-CMAC is 12 and not 16,
 as the Multi-buffer library can output both 12 and 16 bytes.
 
 Fixes: 6491dbbecebb ("crypto/aesni_mb: support AES CMAC")
-Cc: stable@dpdk.org
 
 Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
 Acked-by: Marko Kovacevic <marko.kovacevic@intel.com>
@@ -16,7 +17,7 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
-index cc5822a82..1e297f032 100644
+index 70e9d18e5..67492c7f4 100644
 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
 +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_private.h
 @@ -65,5 +65,5 @@ static const unsigned auth_truncated_digest_byte_lengths[] = {

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

* [dpdk-stable] patch 'compress/qat: fix checksum on decompression' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (45 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'crypto/aesni_mb: fix truncated digest size for CMAC' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'compress/qat: remove unnecessary assignment' " Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'test/crypto: fix number of queue pairs' " Kevin Traynor
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Fiona Trahe; +Cc: Tomasz Jozwiak, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 4d5adf65e272f0a2e147c72cf763cfc29b613ded Mon Sep 17 00:00:00 2001
From: Fiona Trahe <fiona.trahe@intel.com>
Date: Sat, 22 Sep 2018 14:25:37 +0100
Subject: [PATCH] compress/qat: fix checksum on decompression

[ upstream commit 7586c5787375b3947d7d12c91aa99ac4ff58203d ]

Checksum was always 0 on QAT decompression due to
incorrect use of union variable.

Fixes: 6a7ea14819e9 ("compress/qat: add xform processing")

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
---
 drivers/compress/qat/qat_comp.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c
index 38c8a5b82..6f1f2dc25 100644
--- a/drivers/compress/qat/qat_comp.c
+++ b/drivers/compress/qat/qat_comp.c
@@ -346,15 +346,14 @@ qat_comp_private_xform_create(struct rte_compressdev *dev,
 		  ((xform->compress.deflate.huffman == RTE_COMP_HUFFMAN_DEFAULT)
 				   && qat->interm_buff_mz == NULL))
-
 			qat_xform->qat_comp_request_type =
 					QAT_COMP_REQUEST_FIXED_COMP_STATELESS;
 
+		qat_xform->checksum_type = xform->compress.chksum;
 
 	} else {
 		qat_xform->qat_comp_request_type = QAT_COMP_REQUEST_DECOMPRESS;
+		qat_xform->checksum_type = xform->decompress.chksum;
 	}
 
-	qat_xform->checksum_type = xform->compress.chksum;
-
 	if (qat_comp_create_templates(qat_xform, qat->interm_buff_mz, xform)) {
 		QAT_LOG(ERR, "QAT: Problem with setting compression");
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.824493803 +0000
+++ 0048-compress-qat-fix-checksum-on-decompression.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,13 +1,14 @@
-From 7586c5787375b3947d7d12c91aa99ac4ff58203d Mon Sep 17 00:00:00 2001
+From 4d5adf65e272f0a2e147c72cf763cfc29b613ded Mon Sep 17 00:00:00 2001
 From: Fiona Trahe <fiona.trahe@intel.com>
 Date: Sat, 22 Sep 2018 14:25:37 +0100
 Subject: [PATCH] compress/qat: fix checksum on decompression
 
+[ upstream commit 7586c5787375b3947d7d12c91aa99ac4ff58203d ]
+
 Checksum was always 0 on QAT decompression due to
 incorrect use of union variable.
 
 Fixes: 6a7ea14819e9 ("compress/qat: add xform processing")
-Cc: stable@dpdk.org
 
 Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
 Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>

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

* [dpdk-stable] patch 'compress/qat: remove unnecessary assignment' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (46 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'compress/qat: fix checksum on decompression' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  2018-11-21 16:04 ` [dpdk-stable] patch 'test/crypto: fix number of queue pairs' " Kevin Traynor
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Fiona Trahe; +Cc: Tomasz Jozwiak, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From ff661b119ebdc0aa48826ffa267ccc475d514022 Mon Sep 17 00:00:00 2001
From: Fiona Trahe <fiona.trahe@intel.com>
Date: Sat, 22 Sep 2018 14:25:38 +0100
Subject: [PATCH] compress/qat: remove unnecessary assignment

[ upstream commit 78c5ea91329ee9e16825c92ba94c2bcfd764e080 ]

Same variable was assigned twice, remove one.

Fixes: 6a7ea14819e9 ("compress/qat: add xform processing")

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
---
 drivers/compress/qat/qat_comp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c
index 6f1f2dc25..b9336f356 100644
--- a/drivers/compress/qat/qat_comp.c
+++ b/drivers/compress/qat/qat_comp.c
@@ -146,5 +146,4 @@ qat_comp_process_response(void **op, uint8_t *resp)
 			*((uint16_t *)(&resp_msg->comn_resp.comn_error));
 	} else {
-		struct qat_comp_xform *qat_xform = rx_op->private_xform;
 		struct icp_qat_fw_resp_comp_pars *comp_resp =
 		  (struct icp_qat_fw_resp_comp_pars *)&resp_msg->comp_resp_pars;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.851679082 +0000
+++ 0049-compress-qat-remove-unnecessary-assignment.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,12 +1,13 @@
-From 78c5ea91329ee9e16825c92ba94c2bcfd764e080 Mon Sep 17 00:00:00 2001
+From ff661b119ebdc0aa48826ffa267ccc475d514022 Mon Sep 17 00:00:00 2001
 From: Fiona Trahe <fiona.trahe@intel.com>
 Date: Sat, 22 Sep 2018 14:25:38 +0100
 Subject: [PATCH] compress/qat: remove unnecessary assignment
 
+[ upstream commit 78c5ea91329ee9e16825c92ba94c2bcfd764e080 ]
+
 Same variable was assigned twice, remove one.
 
 Fixes: 6a7ea14819e9 ("compress/qat: add xform processing")
-Cc: stable@dpdk.org
 
 Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
 Acked-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>

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

* [dpdk-stable] patch 'test/crypto: fix number of queue pairs' has been queued to stable release 18.08.1
  2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
                   ` (47 preceding siblings ...)
  2018-11-21 16:04 ` [dpdk-stable] patch 'compress/qat: remove unnecessary assignment' " Kevin Traynor
@ 2018-11-21 16:04 ` Kevin Traynor
  48 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-21 16:04 UTC (permalink / raw)
  To: Fiona Trahe; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to stable release 18.08.1

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

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From bd00d0019e5b3c9a01656622c6f3b52f714f89aa Mon Sep 17 00:00:00 2001
From: Fiona Trahe <fiona.trahe@intel.com>
Date: Sat, 22 Sep 2018 14:33:36 +0100
Subject: [PATCH] test/crypto: fix number of queue pairs

[ upstream commit 738ad7b42b63fc5067419bf609296f2c4a6a0cb0 ]

Some of the tests use a QAT-specific value (2) for
maximum nr of queue pairs to create valid/invalid test cases.
This has accidentally worked ok as default max_qps for all PMDs
is larger. It is incorrect however and would fail if a device
had a max lower than the QAT value.
Instead use the value returned by the PMD in the
rte_cryptodev_get_info query, this value is stored in the ts_params.

Fixes: 202d375c60bc ("app/test: add cryptodev unit and performance tests")

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 test/test/test_cryptodev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index a6044b261..c63662d91 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -636,5 +636,5 @@ test_device_configure_invalid_queue_pair_ids(void)
 
 	/* valid - max value queue pairs */
-	ts_params->conf.nb_queue_pairs = MAX_NUM_QPS_PER_QAT_DEVICE;
+	ts_params->conf.nb_queue_pairs = orig_nb_qps;
 
 	TEST_ASSERT_SUCCESS(rte_cryptodev_configure(ts_params->valid_devs[0],
@@ -668,5 +668,5 @@ test_device_configure_invalid_queue_pair_ids(void)
 
 	/* invalid - max value + 1 queue pairs */
-	ts_params->conf.nb_queue_pairs = MAX_NUM_QPS_PER_QAT_DEVICE + 1;
+	ts_params->conf.nb_queue_pairs = orig_nb_qps + 1;
 
 	TEST_ASSERT_FAIL(rte_cryptodev_configure(ts_params->valid_devs[0],
@@ -820,5 +820,5 @@ test_queue_pair_descriptor_setup(void)
 	qp_conf.nb_descriptors = DEFAULT_NUM_OPS_INFLIGHT;	/*valid */
 
-	qp_id = DEFAULT_NUM_QPS_PER_QAT_DEVICE;		/*invalid */
+	qp_id = ts_params->conf.nb_queue_pairs;		/*invalid */
 
 	TEST_ASSERT_FAIL(rte_cryptodev_queue_pair_setup(
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 15:59:14.876873177 +0000
+++ 0050-test-crypto-fix-number-of-queue-pairs.patch	2018-11-21 15:59:13.000000000 +0000
@@ -1,8 +1,10 @@
-From 738ad7b42b63fc5067419bf609296f2c4a6a0cb0 Mon Sep 17 00:00:00 2001
+From bd00d0019e5b3c9a01656622c6f3b52f714f89aa Mon Sep 17 00:00:00 2001
 From: Fiona Trahe <fiona.trahe@intel.com>
 Date: Sat, 22 Sep 2018 14:33:36 +0100
 Subject: [PATCH] test/crypto: fix number of queue pairs
 
+[ upstream commit 738ad7b42b63fc5067419bf609296f2c4a6a0cb0 ]
+
 Some of the tests use a QAT-specific value (2) for
 maximum nr of queue pairs to create valid/invalid test cases.
 This has accidentally worked ok as default max_qps for all PMDs
@@ -12,7 +14,6 @@
 rte_cryptodev_get_info query, this value is stored in the ts_params.
 
 Fixes: 202d375c60bc ("app/test: add cryptodev unit and performance tests")
-Cc: stable@dpdk.org
 
 Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
 Acked-by: Akhil Goyal <akhil.goyal@nxp.com>

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

* Re: [dpdk-stable] patch 'net/avf: remove keeping CRC configuration' has been queued to stable release 18.08.1
  2018-11-21 16:04 ` [dpdk-stable] patch 'net/avf: remove keeping CRC configuration' " Kevin Traynor
@ 2018-11-22 17:29   ` Kevin Traynor
  0 siblings, 0 replies; 51+ messages in thread
From: Kevin Traynor @ 2018-11-22 17:29 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Qi Zhang, dpdk stable

On 11/21/2018 04:04 PM, Kevin Traynor wrote:
> Hi,
> 
> FYI, your patch has been queued to stable release 18.08.1
> 
> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
> It will be pushed if I get no objections before 11/26/18. So please
> shout if anyone has objections.
> 
> Also note that after the patch there's a diff of the upstream commit vs the patch applied
> to the branch. If the code is different (ie: not only metadata diffs), due for example to
> a change in context or macro names, please double check it.
> 
> Thanks.
> 
> Kevin Traynor
> 
> ---
> From 328983dd640b60da0fbc2fed9c8271a0af53f8b2 Mon Sep 17 00:00:00 2001
> From: Beilei Xing <beilei.xing@intel.com>
> Date: Wed, 26 Sep 2018 10:44:34 +0800
> Subject: [PATCH] net/avf: remove keeping CRC configuration
> 
> [ upstream commit 98ff88b3c45ec6b432fbeff761c48492dfaa735f ]
> 
> Remove keeping CRC configuration as it's not supported by AVF.
> 
> Fixes: 5ce4c2be1a64 ("net/avf: fix offload capabilities")
> 
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>
> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
>  drivers/net/avf/avf_ethdev.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/net/avf/avf_ethdev.c b/drivers/net/avf/avf_ethdev.c
> index a44e3e6ca..e56d57c43 100644
> --- a/drivers/net/avf/avf_ethdev.c
> +++ b/drivers/net/avf/avf_ethdev.c
> @@ -515,6 +515,4 @@ avf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
>  		DEV_RX_OFFLOAD_TCP_CKSUM |
>  		DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM |
> -		DEV_RX_OFFLOAD_CRC_STRIP |

Hi, this didn't apply cleanly because of the STRIP flag. Note, I removed
the STRIP flag also in backport. Please confirm it's ok.

> -		DEV_RX_OFFLOAD_KEEP_CRC |
>  		DEV_RX_OFFLOAD_SCATTER |
>  		DEV_RX_OFFLOAD_JUMBO_FRAME |
> 

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

end of thread, other threads:[~2018-11-22 17:29 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-21 16:03 [dpdk-stable] patch 'net/sfc/base: fix PreFAST warnings because of unused return' has been queued to stable release 18.08.1 Kevin Traynor
2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: fix invalid order of memset arguments' " Kevin Traynor
2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: fix output buffer SAL annotation' " Kevin Traynor
2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: fix SAL annotation for input buffers' " Kevin Traynor
2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: properly align on line continuation' " Kevin Traynor
2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: add space after sizeof' " Kevin Traynor
2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: fix build because of no declaration' " Kevin Traynor
2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: fix outer IPID field in TSO option descriptors' " Kevin Traynor
2018-11-21 16:03 ` [dpdk-stable] patch 'net/sfc/base: add check for TUNNEL module in NIC reset API' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: check size of memory to read sensors data to' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: avoid usage of too big arrays on stack' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: fix out of bounds read when dereferencing sdup' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: fix ID retrieval in v3 licensing' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: prevent access to the NIC config before probe' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: fix name of the argument to store RSS flags' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: fix a typo in unicast filter insertion comment' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: fix MAC Tx stats for less or equal to 64 bytes' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc: fix an Rx queue double release possibility' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc: fix a Tx " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/e1000: fix missing Tx multi-segs capability' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/fm10k: " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/i40e: " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/ixgbe: " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/avf: fix unused variables and label' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/avf: fix missing compiler error flags' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/bonding: fix Rx slave fairness' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/dpaa: fix jumbo buffer config' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/dpaa: fix link speed based on MAC type' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/failsafe: remove not supported multicast MAC filter' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'ethdev: fix error handling in create function' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/sfc/base: make last byte of module information available' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/cxgbe: announce Rx scatter offload' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'ethdev: fix doxygen comment to be with structure' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/avf: remove keeping CRC configuration' " Kevin Traynor
2018-11-22 17:29   ` Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/virtio-user: fix multiple queue for vhost-kernel' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/virtio: add missing supported features' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'vhost: fix corner case for enqueue operation' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/i40e: fix 25G AOC and ACC cable detection on XXV710' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'net/bonding: stop and deactivate slaves on stop' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'doc: fix typo for cryptodev' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'doc: fix missing CCM to QAT feature list' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix wrong session size' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'app/test-crypto-perf: fix check for auth key' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'app/test-crypto-perf: fix check for cipher IV' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'app/test-crypto-perf: fix double allocation of memory' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'crypto/aesni_mb: fix possible array overrun' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'crypto/aesni_mb: fix truncated digest size for CMAC' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'compress/qat: fix checksum on decompression' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'compress/qat: remove unnecessary assignment' " Kevin Traynor
2018-11-21 16:04 ` [dpdk-stable] patch 'test/crypto: fix number of queue pairs' " 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).