patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] patch 'examples/ipsec-secgw: fix IPv4 checksum at Tx' has been queued to LTS release 17.11.4
@ 2018-07-27  2:29 Yongseok Koh
  2018-07-27  2:29 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix digest with AEAD algo' " Yongseok Koh
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27  2:29 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: Radu Nicolau, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

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

Thanks.

Yongseok

---
>From 6306b4c951befeeadee58c6198171c59b2cf879b Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
Date: Wed, 6 Jun 2018 13:04:01 +0100
Subject: [PATCH] examples/ipsec-secgw: fix IPv4 checksum at Tx

[ upstream commit b45be46dfd4548acd8f130841d02e97ab7bc7eb8 ]

For ESP transport and BYPASS mode the app might generate output
packets with invalid IPv4 header checksum.
At least such behavior was observed on few Intel NICs.
The reason is that the app didn't set ipv4 header checksum to zero
before passing it to the HW.

Fixes: 906257e965b7 ("examples/ipsec-secgw: support IPv6")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index b5ec70a16..d7f26e777 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -302,6 +302,7 @@ prepare_tx_pkt(struct rte_mbuf *pkt, uint16_t port)
 		pkt->l3_len = sizeof(struct ip);
 		pkt->l2_len = ETHER_HDR_LEN;
 
+		ip->ip_sum = 0;
 		ethhdr->ether_type = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
 	} else {
 		pkt->ol_flags |= PKT_TX_IPV6;
-- 
2.11.0

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

* [dpdk-stable] patch 'examples/l2fwd-crypto: fix digest with AEAD algo' has been queued to LTS release 17.11.4
  2018-07-27  2:29 [dpdk-stable] patch 'examples/ipsec-secgw: fix IPv4 checksum at Tx' has been queued to LTS release 17.11.4 Yongseok Koh
@ 2018-07-27  2:29 ` Yongseok Koh
  2018-07-27  2:29 ` [dpdk-stable] patch 'examples/l2fwd-crypto: check return value on IV size check' " Yongseok Koh
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27  2:29 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Ankur Dwivedi, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

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

Thanks.

Yongseok

---
>From 54cffda5be78ae6c300f83a13e4561f817e751ef Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Mon, 16 Jul 2018 09:26:16 +0100
Subject: [PATCH] examples/l2fwd-crypto: fix digest with AEAD algo

[ upstream commit 6df38301de93165d2b12e793f2cf0e084414d917 ]

When performing authentication verification (both for AEAD algorithms,
such as AES-GCM, or for authentication algorithms, such as SHA1-HMAC),
the digest address is calculated based on the packet size and the
algorithm used (substracting digest size and IP header to the packet size).

However, for AEAD algorithms, this was not calculated correctly,
since the digest size was not being substracted.

Bugzilla ID: 44
Fixes: 2661f4fbe93d ("examples/l2fwd-crypto: add AEAD parameters")

Reported-by: Ankur Dwivedi <ankur.dwivedi@cavium.com>
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Tested-by: Ankur Dwivedi <ankur.dwivedi@cavium.com>
---
 examples/l2fwd-crypto/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index ff5752224..056aa5831 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -439,7 +439,7 @@ l2fwd_simple_crypto_enqueue(struct rte_mbuf *m,
 	/* Zero pad data to be crypto'd so it is block aligned */
 	data_len  = rte_pktmbuf_data_len(m) - ipdata_offset;
 
-	if (cparams->do_hash && cparams->hash_verify)
+	if ((cparams->do_hash || cparams->do_aead) && cparams->hash_verify)
 		data_len -= cparams->digest_length;
 
 	if (cparams->do_cipher) {
-- 
2.11.0

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

* [dpdk-stable] patch 'examples/l2fwd-crypto: check return value on IV size check' has been queued to LTS release 17.11.4
  2018-07-27  2:29 [dpdk-stable] patch 'examples/ipsec-secgw: fix IPv4 checksum at Tx' has been queued to LTS release 17.11.4 Yongseok Koh
  2018-07-27  2:29 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix digest with AEAD algo' " Yongseok Koh
@ 2018-07-27  2:29 ` Yongseok Koh
  2018-07-27  2:29 ` [dpdk-stable] patch 'examples/l2fwd-crypto: skip device not supporting operation' " Yongseok Koh
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27  2:29 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Fiona Trahe, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

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

Thanks.

Yongseok

---
>From 9780c141d8f2d5ad9c55a9cd17d14bc7cb05d8e1 Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Thu, 19 Jul 2018 09:39:55 +0100
Subject: [PATCH] examples/l2fwd-crypto: check return value on IV size check

[ upstream commit 53b9a5b66d6e2df2e0d92586d6636f03c529ea1a ]

IV size parameter is checked through a function,
but its return value was not checked.

Fixes: 0fbd75a99fc9 ("cryptodev: move IV parameters to session")
Fixes: acf8616901b5 ("cryptodev: add auth IV")
Fixes: 2661f4fbe93d ("examples/l2fwd-crypto: add AEAD parameters")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
 examples/l2fwd-crypto/main.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 056aa5831..d73d2af1c 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -2081,10 +2081,11 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 
 			options->block_size = cap->sym.aead.block_size;
 
-			check_iv_param(&cap->sym.aead.iv_size,
+			if (check_iv_param(&cap->sym.aead.iv_size,
 					options->aead_iv_param,
 					options->aead_iv_random_size,
-					&options->aead_iv.length);
+					&options->aead_iv.length) < 0)
+				return -1;
 
 			/*
 			 * Check if length of provided AEAD key is supported
@@ -2189,10 +2190,11 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 
 			options->block_size = cap->sym.cipher.block_size;
 
-			check_iv_param(&cap->sym.cipher.iv_size,
+			if (check_iv_param(&cap->sym.cipher.iv_size,
 					options->cipher_iv_param,
 					options->cipher_iv_random_size,
-					&options->cipher_iv.length);
+					&options->cipher_iv.length) < 0)
+				return -1;
 
 			/*
 			 * Check if length of provided cipher key is supported
@@ -2245,10 +2247,11 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 			if (cap == NULL)
 				continue;
 
-			check_iv_param(&cap->sym.auth.iv_size,
+			if (check_iv_param(&cap->sym.auth.iv_size,
 					options->auth_iv_param,
 					options->auth_iv_random_size,
-					&options->auth_iv.length);
+					&options->auth_iv.length) < 0)
+				return -1;
 			/*
 			 * Check if length of provided auth key is supported
 			 * by the algorithm chosen.
-- 
2.11.0

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

* [dpdk-stable] patch 'examples/l2fwd-crypto: skip device not supporting operation' has been queued to LTS release 17.11.4
  2018-07-27  2:29 [dpdk-stable] patch 'examples/ipsec-secgw: fix IPv4 checksum at Tx' has been queued to LTS release 17.11.4 Yongseok Koh
  2018-07-27  2:29 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix digest with AEAD algo' " Yongseok Koh
  2018-07-27  2:29 ` [dpdk-stable] patch 'examples/l2fwd-crypto: check return value on IV size check' " Yongseok Koh
@ 2018-07-27  2:29 ` Yongseok Koh
  2018-07-27  2:29 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix bypass rule processing' " Yongseok Koh
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27  2:29 UTC (permalink / raw)
  To: Pablo de Lara; +Cc: Fiona Trahe, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

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

Thanks.

Yongseok

---
>From 071e32ef1592db954e8f7c2fbd404edba9b2289f Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Date: Thu, 19 Jul 2018 09:39:56 +0100
Subject: [PATCH] examples/l2fwd-crypto: skip device not supporting operation

[ upstream commit a8fd8881ddf7be88c05e0fb258a54e861ae54a29 ]

When a crypto device does not support an algorithm, it is skipped
and not used. However, when it does support it, but not the rest
of the parameters (IV, key, AAD sizes...), application stops.
Instead, the device should be skipped and the search of a suitable
device should continue.

Fixes: a061e50a0d97 ("examples/l2fwd-crypto: fix ambiguous input key size")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
 examples/l2fwd-crypto/main.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index d73d2af1c..77af7e6a0 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -2085,7 +2085,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 					options->aead_iv_param,
 					options->aead_iv_random_size,
 					&options->aead_iv.length) < 0)
-				return -1;
+				continue;
 
 			/*
 			 * Check if length of provided AEAD key is supported
@@ -2099,7 +2099,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 						cap->sym.aead.key_size.increment)
 							!= 0) {
 					printf("Unsupported aead key length\n");
-					return -1;
+					continue;
 				}
 			/*
 			 * Check if length of the aead key to be randomly generated
@@ -2112,7 +2112,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 						cap->sym.aead.key_size.increment)
 							!= 0) {
 					printf("Unsupported aead key length\n");
-					return -1;
+					continue;
 				}
 				options->aead_xform.aead.key.length =
 							options->aead_key_random_size;
@@ -2137,7 +2137,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 						cap->sym.aead.aad_size.increment)
 							!= 0) {
 					printf("Unsupported AAD length\n");
-					return -1;
+					continue;
 				}
 			/*
 			 * Check if length of AAD to be randomly generated
@@ -2150,7 +2150,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 						cap->sym.aead.aad_size.increment)
 							!= 0) {
 					printf("Unsupported AAD length\n");
-					return -1;
+					continue;
 				}
 				options->aad.length = options->aad_random_size;
 			/* No size provided, use minimum size. */
@@ -2168,7 +2168,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 						cap->sym.aead.digest_size.increment)
 							!= 0) {
 					printf("Unsupported digest length\n");
-					return -1;
+					continue;
 				}
 				options->aead_xform.aead.digest_length =
 							options->digest_size;
@@ -2194,7 +2194,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 					options->cipher_iv_param,
 					options->cipher_iv_random_size,
 					&options->cipher_iv.length) < 0)
-				return -1;
+				continue;
 
 			/*
 			 * Check if length of provided cipher key is supported
@@ -2208,7 +2208,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 						cap->sym.cipher.key_size.increment)
 							!= 0) {
 					printf("Unsupported cipher key length\n");
-					return -1;
+					continue;
 				}
 			/*
 			 * Check if length of the cipher key to be randomly generated
@@ -2221,7 +2221,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 						cap->sym.cipher.key_size.increment)
 							!= 0) {
 					printf("Unsupported cipher key length\n");
-					return -1;
+					continue;
 				}
 				options->cipher_xform.cipher.key.length =
 							options->ckey_random_size;
@@ -2251,7 +2251,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 					options->auth_iv_param,
 					options->auth_iv_random_size,
 					&options->auth_iv.length) < 0)
-				return -1;
+				continue;
 			/*
 			 * Check if length of provided auth key is supported
 			 * by the algorithm chosen.
@@ -2264,7 +2264,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 						cap->sym.auth.key_size.increment)
 							!= 0) {
 					printf("Unsupported auth key length\n");
-					return -1;
+					continue;
 				}
 			/*
 			 * Check if length of the auth key to be randomly generated
@@ -2277,7 +2277,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 						cap->sym.auth.key_size.increment)
 							!= 0) {
 					printf("Unsupported auth key length\n");
-					return -1;
+					continue;
 				}
 				options->auth_xform.auth.key.length =
 							options->akey_random_size;
@@ -2299,7 +2299,7 @@ initialize_cryptodevs(struct l2fwd_crypto_options *options, unsigned nb_ports,
 						cap->sym.auth.digest_size.increment)
 							!= 0) {
 					printf("Unsupported digest length\n");
-					return -1;
+					continue;
 				}
 				options->auth_xform.auth.digest_length =
 							options->digest_size;
-- 
2.11.0

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

* [dpdk-stable] patch 'examples/ipsec-secgw: fix bypass rule processing' has been queued to LTS release 17.11.4
  2018-07-27  2:29 [dpdk-stable] patch 'examples/ipsec-secgw: fix IPv4 checksum at Tx' has been queued to LTS release 17.11.4 Yongseok Koh
                   ` (2 preceding siblings ...)
  2018-07-27  2:29 ` [dpdk-stable] patch 'examples/l2fwd-crypto: skip device not supporting operation' " Yongseok Koh
@ 2018-07-27  2:29 ` Yongseok Koh
  2018-07-27  2:29 ` [dpdk-stable] patch 'net/i40e: fix packet type parsing with DDP' " Yongseok Koh
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27  2:29 UTC (permalink / raw)
  To: Konstantin Ananyev; +Cc: Akhil Goyal, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

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

Thanks.

Yongseok

---
>From 908d3bae6e1663f81255fab8966e71cc64bdff9a Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@intel.com>
Date: Tue, 5 Jun 2018 15:16:02 +0100
Subject: [PATCH] examples/ipsec-secgw: fix bypass rule processing

[ upstream commit c1fe6dbfcec2b17dd5fd115dcdec2ea573c4de0d ]

For outbound ports BYPASS rule is erroneously treated as PROTECT one
with SA idx zero.

Fixes: 2a5106af132b ("examples/ipsec-secgw: fix corner case for SPI value")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 examples/ipsec-secgw/ipsec-secgw.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index d7f26e777..46af3f05f 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -476,11 +476,13 @@ outbound_sp(struct sp_ctx *sp, struct traffic_type *ip,
 		sa_idx = ip->res[i] & PROTECT_MASK;
 		if (ip->res[i] & DISCARD)
 			rte_pktmbuf_free(m);
+		else if (ip->res[i] & BYPASS)
+			ip->pkts[j++] = m;
 		else if (sa_idx < IPSEC_SA_MAX_ENTRIES) {
 			ipsec->res[ipsec->num] = sa_idx;
 			ipsec->pkts[ipsec->num++] = m;
-		} else /* BYPASS */
-			ip->pkts[j++] = m;
+		} else /* invalid SA idx */
+			rte_pktmbuf_free(m);
 	}
 	ip->num = j;
 }
-- 
2.11.0

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

* [dpdk-stable] patch 'net/i40e: fix packet type parsing with DDP' has been queued to LTS release 17.11.4
  2018-07-27  2:29 [dpdk-stable] patch 'examples/ipsec-secgw: fix IPv4 checksum at Tx' has been queued to LTS release 17.11.4 Yongseok Koh
                   ` (3 preceding siblings ...)
  2018-07-27  2:29 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix bypass rule processing' " Yongseok Koh
@ 2018-07-27  2:29 ` Yongseok Koh
  2018-07-27  2:29 ` [dpdk-stable] patch 'net/i40e: fix setting TPID with AQ command' " Yongseok Koh
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27  2:29 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Xueqin Lin, Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

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

Thanks.

Yongseok

---
>From d6c15d3b80ee8f8fe8d30e50b88fa07936955639 Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Thu, 5 Jul 2018 09:36:29 +0800
Subject: [PATCH] net/i40e: fix packet type parsing with DDP

[ upstream commit 840f15cdab1693d0a8f2915d32dbe92a57dff1f2 ]

To parse packet type correctly, profile needs to be
loaded again to update tables in SW even if profile
has exited. But previously packet type parser will
be false after loading profile when profile already
exists.
This patch fixes the issue.

Fixes: 0585f5c3d264 ("net/i40e: fix DDP profile DEL operation")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Tested-by: Xueqin Lin <xueqin.lin@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/rte_pmd_i40e.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index ab1163cc0..2d25873d6 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -1688,6 +1688,7 @@ rte_pmd_i40e_process_ddp_package(uint16_t port, uint8_t *buff,
 				PMD_DRV_LOG(ERR, "Profile of group 0 already exists.");
 			else if (is_exist == 3)
 				PMD_DRV_LOG(ERR, "Profile of different group already exists");
+			i40e_update_customized_info(dev, buff, size, op);
 			rte_free(profile_info_sec);
 			return -EEXIST;
 		}
-- 
2.11.0

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

* [dpdk-stable] patch 'net/i40e: fix setting TPID with AQ command' has been queued to LTS release 17.11.4
  2018-07-27  2:29 [dpdk-stable] patch 'examples/ipsec-secgw: fix IPv4 checksum at Tx' has been queued to LTS release 17.11.4 Yongseok Koh
                   ` (4 preceding siblings ...)
  2018-07-27  2:29 ` [dpdk-stable] patch 'net/i40e: fix packet type parsing with DDP' " Yongseok Koh
@ 2018-07-27  2:29 ` Yongseok Koh
  2018-07-27  2:29 ` [dpdk-stable] patch 'net/i40e: fix link speed' " Yongseok Koh
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27  2:29 UTC (permalink / raw)
  To: Beilei Xing; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

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

Thanks.

Yongseok

---
>From fd25d574f08832c8a86affb12f49f0fbabd674d4 Mon Sep 17 00:00:00 2001
From: Beilei Xing <beilei.xing@intel.com>
Date: Thu, 5 Jul 2018 15:03:08 +0800
Subject: [PATCH] net/i40e: fix setting TPID with AQ command

[ upstream commit 2c99142384db1796e42209f5fc112c8babc402c0 ]

TPID can be set by set_switch_config AdminQ command on
new FW release. But find fail to set 0x88A8 on some NICs.
According to the datasheet, Switch Tag value should not
be identical to either the First Tag or Second Tag values.
So set something other than common Ethertype for internal
switching.

Fixes: 73cd7d6dc8e1 ("net/i40e: use set switch AQ instead of register setting")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index afdeeab5a..70c51ff37 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1211,6 +1211,13 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
 	hw->bus.func = pci_dev->addr.function;
 	hw->adapter_stopped = 0;
 
+	/*
+	 * Switch Tag value should not be identical to either the First Tag
+	 * or Second Tag values. So set something other than common Ethertype
+	 * for internal switching.
+	 */
+	hw->switch_tag = 0xffff;
+
 	/* Check if need to support multi-driver */
 	i40e_support_multi_driver(dev);
 
-- 
2.11.0

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

* [dpdk-stable] patch 'net/i40e: fix link speed' has been queued to LTS release 17.11.4
  2018-07-27  2:29 [dpdk-stable] patch 'examples/ipsec-secgw: fix IPv4 checksum at Tx' has been queued to LTS release 17.11.4 Yongseok Koh
                   ` (5 preceding siblings ...)
  2018-07-27  2:29 ` [dpdk-stable] patch 'net/i40e: fix setting TPID with AQ command' " Yongseok Koh
@ 2018-07-27  2:29 ` Yongseok Koh
  2018-07-27  2:29 ` [dpdk-stable] patch 'net/i40e: fix check of flow director programming status' " Yongseok Koh
  2018-07-27  2:29 ` [dpdk-stable] patch 'ethdev: fix queue statistics mapping documentation' " Yongseok Koh
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27  2:29 UTC (permalink / raw)
  To: Xiaoyun Li; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

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

Thanks.

Yongseok

---
>From 363b74e7b60779d3115bb3353810a5cbd0e8a388 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li@intel.com>
Date: Tue, 10 Jul 2018 17:30:54 +0800
Subject: [PATCH] net/i40e: fix link speed

[ upstream commit 9214ee18eef97709eca481998cf7dca50520896c ]

When link needs to go up, I40E_AQ_PHY_AN_ENABLED is always be set in DPDK.
So all speeds are always set. This causes speed config never works.

This patch fixes this issue and only allows to set available speeds. If
link needs to go up and speed setting is not supported, it will print
warning and set default available speeds. And when link needs to go down,
link speed field should be set to non-zero to avoid link down issue when
binding back to kernel driver.

Fixes: ca7e599d4506 ("net/i40e: fix link management")
Fixes: 1bb8f661168d ("net/i40e: fix link down and negotiation")

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 67 ++++++++++++++++++++++++++----------------
 1 file changed, 41 insertions(+), 26 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 70c51ff37..711c6e7b6 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1983,27 +1983,40 @@ i40e_phy_conf_link(struct i40e_hw *hw,
 	struct i40e_aq_get_phy_abilities_resp phy_ab;
 	struct i40e_aq_set_phy_config phy_conf;
 	enum i40e_aq_phy_type cnt;
+	uint8_t avail_speed;
 	uint32_t phy_type_mask = 0;
 
 	const uint8_t mask = I40E_AQ_PHY_FLAG_PAUSE_TX |
 			I40E_AQ_PHY_FLAG_PAUSE_RX |
 			I40E_AQ_PHY_FLAG_PAUSE_RX |
 			I40E_AQ_PHY_FLAG_LOW_POWER;
-	const uint8_t advt = I40E_LINK_SPEED_40GB |
-			I40E_LINK_SPEED_25GB |
-			I40E_LINK_SPEED_10GB |
-			I40E_LINK_SPEED_1GB |
-			I40E_LINK_SPEED_100MB;
 	int ret = -ENOTSUP;
 
+	/* To get phy capabilities of available speeds. */
+	status = i40e_aq_get_phy_capabilities(hw, false, true, &phy_ab,
+					      NULL);
+	if (status) {
+		PMD_DRV_LOG(ERR, "Failed to get PHY capabilities: %d\n",
+				status);
+		return ret;
+	}
+	avail_speed = phy_ab.link_speed;
 
+	/* To get the current phy config. */
 	status = i40e_aq_get_phy_capabilities(hw, false, false, &phy_ab,
 					      NULL);
-	if (status)
+	if (status) {
+		PMD_DRV_LOG(ERR, "Failed to get the current PHY config: %d\n",
+				status);
 		return ret;
+	}
 
-	/* If link already up, no need to set up again */
-	if (is_up && phy_ab.phy_type != 0)
+	/* If link needs to go up and it is in autoneg mode the speed is OK,
+	 * no need to set up again.
+	 */
+	if (is_up && phy_ab.phy_type != 0 &&
+		     abilities & I40E_AQ_PHY_AN_ENABLED &&
+		     phy_ab.link_speed != 0)
 		return I40E_SUCCESS;
 
 	memset(&phy_conf, 0, sizeof(phy_conf));
@@ -2012,15 +2025,17 @@ i40e_phy_conf_link(struct i40e_hw *hw,
 	abilities &= ~mask;
 	abilities |= phy_ab.abilities & mask;
 
-	/* update ablities and speed */
-	if (abilities & I40E_AQ_PHY_AN_ENABLED)
-		phy_conf.link_speed = advt;
-	else
-		phy_conf.link_speed = is_up ? force_speed : phy_ab.link_speed;
-
 	phy_conf.abilities = abilities;
 
-
+	/* If link needs to go up, but the force speed is not supported,
+	 * Warn users and config the default available speeds.
+	 */
+	if (is_up && !(force_speed & avail_speed)) {
+		PMD_DRV_LOG(WARNING, "Invalid speed setting, set to default!\n");
+		phy_conf.link_speed = avail_speed;
+	} else {
+		phy_conf.link_speed = is_up ? force_speed : avail_speed;
+	}
 
 	/* PHY type mask needs to include each type except PHY type extension */
 	for (cnt = I40E_PHY_TYPE_SGMII; cnt < I40E_PHY_TYPE_25GBASE_KR; cnt++)
@@ -2056,11 +2071,18 @@ i40e_apply_link_speed(struct rte_eth_dev *dev)
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct rte_eth_conf *conf = &dev->data->dev_conf;
 
+	if (conf->link_speeds == ETH_LINK_SPEED_AUTONEG) {
+		conf->link_speeds = ETH_LINK_SPEED_40G |
+				    ETH_LINK_SPEED_25G |
+				    ETH_LINK_SPEED_20G |
+				    ETH_LINK_SPEED_10G |
+				    ETH_LINK_SPEED_1G |
+				    ETH_LINK_SPEED_100M;
+	}
 	speed = i40e_parse_link_speeds(conf->link_speeds);
-	abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK;
-	if (!(conf->link_speeds & ETH_LINK_SPEED_FIXED))
-		abilities |= I40E_AQ_PHY_AN_ENABLED;
-	abilities |= I40E_AQ_PHY_LINK_ENABLED;
+	abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK |
+		     I40E_AQ_PHY_AN_ENABLED |
+		     I40E_AQ_PHY_LINK_ENABLED;
 
 	return i40e_phy_conf_link(hw, abilities, speed, true);
 }
@@ -2167,13 +2189,6 @@ i40e_dev_start(struct rte_eth_dev *dev)
 	}
 
 	/* Apply link configure */
-	if (dev->data->dev_conf.link_speeds & ~(ETH_LINK_SPEED_100M |
-				ETH_LINK_SPEED_1G | ETH_LINK_SPEED_10G |
-				ETH_LINK_SPEED_20G | ETH_LINK_SPEED_25G |
-				ETH_LINK_SPEED_40G)) {
-		PMD_DRV_LOG(ERR, "Invalid link setting");
-		goto err_up;
-	}
 	ret = i40e_apply_link_speed(dev);
 	if (I40E_SUCCESS != ret) {
 		PMD_DRV_LOG(ERR, "Fail to apply link setting");
-- 
2.11.0

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

* [dpdk-stable] patch 'net/i40e: fix check of flow director programming status' has been queued to LTS release 17.11.4
  2018-07-27  2:29 [dpdk-stable] patch 'examples/ipsec-secgw: fix IPv4 checksum at Tx' has been queued to LTS release 17.11.4 Yongseok Koh
                   ` (6 preceding siblings ...)
  2018-07-27  2:29 ` [dpdk-stable] patch 'net/i40e: fix link speed' " Yongseok Koh
@ 2018-07-27  2:29 ` Yongseok Koh
  2018-07-27  2:29 ` [dpdk-stable] patch 'ethdev: fix queue statistics mapping documentation' " Yongseok Koh
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27  2:29 UTC (permalink / raw)
  To: Wei Zhao; +Cc: Qi Zhang, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

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

Thanks.

Yongseok

---
>From ab5e1c1dbb8fe310cbe89fbb326817dd92c77a22 Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Fri, 13 Jul 2018 11:16:33 +0800
Subject: [PATCH] net/i40e: fix check of flow director programming status

[ upstream commit 7546dc4a1331340ecb665af9af0a005bb8b657c8 ]

In i40e FDIR PMD code for checking programming status
function i40e_check_fdir_programming_status(), the initial value
of return value ret should be set to -1 not 0, because if DD bit of
I40E_RX_DESC_STATUS_DD is not write back, this function will return
0 to upper function, this give an error info to upper function, the
fact for this is it is time out for DD write back and it should return
-1.

Fixes: 05999aab4ca6 ("i40e: add or delete flow director")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_fdir.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 6802995f4..ddf694366 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -1381,6 +1381,8 @@ i40e_check_fdir_programming_status(struct i40e_rx_queue *rxq)
 			I40E_PCI_REG_WRITE(rxq->qrx_tail, rxq->nb_rx_desc - 1);
 		else
 			I40E_PCI_REG_WRITE(rxq->qrx_tail, rxq->rx_tail - 1);
+	} else {
+		ret = -1;
 	}
 
 	return ret;
-- 
2.11.0

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

* [dpdk-stable] patch 'ethdev: fix queue statistics mapping documentation' has been queued to LTS release 17.11.4
  2018-07-27  2:29 [dpdk-stable] patch 'examples/ipsec-secgw: fix IPv4 checksum at Tx' has been queued to LTS release 17.11.4 Yongseok Koh
                   ` (7 preceding siblings ...)
  2018-07-27  2:29 ` [dpdk-stable] patch 'net/i40e: fix check of flow director programming status' " Yongseok Koh
@ 2018-07-27  2:29 ` Yongseok Koh
  8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27  2:29 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Andrew Rybchenko, dpdk stable

Hi,

FYI, your patch has been queued to LTS release 17.11.4

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

Thanks.

Yongseok

---
>From 0ff517757c61fe22c50c8f3e0f8a6ce147890250 Mon Sep 17 00:00:00 2001
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Date: Fri, 29 Jun 2018 15:14:43 +0530
Subject: [PATCH] ethdev: fix queue statistics mapping documentation

[ upstream commit 97f5f8cbadbeb47cc283251564e56a6c20ceec00 ]

The RTE_MAX_ETHPORT_QUEUE_STATS_MAPS does not exists, change
to the correct definition(RTE_ETHDEV_QUEUE_STAT_CNTRS)

Fixes: 5de201df8927 ("ethdev: add stats per queue")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 lib/librte_ether/rte_ethdev.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index eba11ca50..89a13188c 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -2543,7 +2543,7 @@ void rte_eth_xstats_reset(uint16_t port_id);
  * @param stat_idx
  *   The per-queue packet statistics functionality number that the transmit
  *   queue is to be assigned.
- *   The value must be in the range [0, RTE_MAX_ETHPORT_QUEUE_STATS_MAPS - 1].
+ *   The value must be in the range [0, RTE_ETHDEV_QUEUE_STAT_CNTRS - 1].
  * @return
  *   Zero if successful. Non-zero otherwise.
  */
@@ -2563,7 +2563,7 @@ int rte_eth_dev_set_tx_queue_stats_mapping(uint16_t port_id,
  * @param stat_idx
  *   The per-queue packet statistics functionality number that the receive
  *   queue is to be assigned.
- *   The value must be in the range [0, RTE_MAX_ETHPORT_QUEUE_STATS_MAPS - 1].
+ *   The value must be in the range [0, RTE_ETHDEV_QUEUE_STAT_CNTRS - 1].
  * @return
  *   Zero if successful. Non-zero otherwise.
  */
-- 
2.11.0

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

end of thread, other threads:[~2018-07-27  2:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-27  2:29 [dpdk-stable] patch 'examples/ipsec-secgw: fix IPv4 checksum at Tx' has been queued to LTS release 17.11.4 Yongseok Koh
2018-07-27  2:29 ` [dpdk-stable] patch 'examples/l2fwd-crypto: fix digest with AEAD algo' " Yongseok Koh
2018-07-27  2:29 ` [dpdk-stable] patch 'examples/l2fwd-crypto: check return value on IV size check' " Yongseok Koh
2018-07-27  2:29 ` [dpdk-stable] patch 'examples/l2fwd-crypto: skip device not supporting operation' " Yongseok Koh
2018-07-27  2:29 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix bypass rule processing' " Yongseok Koh
2018-07-27  2:29 ` [dpdk-stable] patch 'net/i40e: fix packet type parsing with DDP' " Yongseok Koh
2018-07-27  2:29 ` [dpdk-stable] patch 'net/i40e: fix setting TPID with AQ command' " Yongseok Koh
2018-07-27  2:29 ` [dpdk-stable] patch 'net/i40e: fix link speed' " Yongseok Koh
2018-07-27  2:29 ` [dpdk-stable] patch 'net/i40e: fix check of flow director programming status' " Yongseok Koh
2018-07-27  2:29 ` [dpdk-stable] patch 'ethdev: fix queue statistics mapping documentation' " Yongseok Koh

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).