patch 'net/i40e: fix outer UDP checksum offload for X710' has been queued to stable release 21.11.8

Kevin Traynor ktraynor at redhat.com
Fri Aug 23 18:17:38 CEST 2024


Hi,

FYI, your patch has been queued to stable release 21.11.8

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

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

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

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/d6ec78819d65c1f8f54c8a891f123c6df439d249

Thanks.

Kevin

---
>From d6ec78819d65c1f8f54c8a891f123c6df439d249 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Thu, 18 Apr 2024 10:20:19 +0200
Subject: [PATCH] net/i40e: fix outer UDP checksum offload for X710

[ upstream commit 6b5e31f7fbd71675c8f3f6d8c0f74fd1f3a0dff5 ]

According to the X710 datasheet (and confirmed on the field..), X710
devices do not support outer checksum offload.

"""
8.4.4.2 Transmit L3 and L4 Integrity Offload

Tunneling UDP headers and GRE header are not offloaded while the
X710/XXV710/XL710 leaves their checksum field as is.
If a checksum is required, software should provide it as well as the inner
checksum value(s) that are required for the outer checksum.
"""

Fix Tx offload capabilities according to the hardware.

X722 may support such offload by setting I40E_TXD_CTX_QW0_L4T_CS_MASK.

Bugzilla ID: 1406
Fixes: 8cc79a1636cd ("net/i40e: fix forward outer IPv6 VXLAN")

Reported-by: Jun Wang <junwang01 at cestc.cn>
Signed-off-by: David Marchand <david.marchand at redhat.com>
Tested-by: Ali Alnubani <alialnu at nvidia.com>
---
 .mailmap                       | 1 +
 drivers/net/i40e/i40e_ethdev.c | 6 +++++-
 drivers/net/i40e/i40e_rxtx.c   | 9 +++++++++
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/.mailmap b/.mailmap
index 434b0b53b7..7d18ead520 100644
--- a/.mailmap
+++ b/.mailmap
@@ -686,4 +686,5 @@ Jun Qiu <jun.qiu at jaguarmicro.com>
 Jun W Zhou <junx.w.zhou at intel.com>
 Junxiao Shi <git at mail1.yoursunny.com>
+Jun Wang <junwang01 at cestc.cn>
 Jun Yang <jun.yang at nxp.com>
 Junyu Jiang <junyux.jiang at intel.com>
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index d829467f41..8571d1419d 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3758,6 +3758,10 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO |
 		RTE_ETH_TX_OFFLOAD_MULTI_SEGS |
-		RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM |
 		dev_info->tx_queue_offload_capa;
+	if (hw->mac.type == I40E_MAC_X722) {
+		dev_info->tx_offload_capa |=
+			RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM;
+	}
+
 	dev_info->dev_capa =
 		RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP |
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 8a277dfe31..20215a8e1e 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -296,4 +296,13 @@ i40e_parse_tunneling_params(uint64_t ol_flags,
 	*cd_tunneling |= (tx_offload.l2_len >> 1) <<
 		I40E_TXD_CTX_QW0_NATLEN_SHIFT;
+
+	/**
+	 * Calculate the tunneling UDP checksum (only supported with X722).
+	 * Shall be set only if L4TUNT = 01b and EIPT is not zero
+	 */
+	if ((*cd_tunneling & I40E_TXD_CTX_QW0_EXT_IP_MASK) &&
+			(*cd_tunneling & I40E_TXD_CTX_UDP_TUNNELING) &&
+			(ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM))
+		*cd_tunneling |= I40E_TXD_CTX_QW0_L4T_CS_MASK;
 }
 
-- 
2.46.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-23 17:18:10.859137123 +0100
+++ 0030-net-i40e-fix-outer-UDP-checksum-offload-for-X710.patch	2024-08-23 17:18:09.661429899 +0100
@@ -1 +1 @@
-From 6b5e31f7fbd71675c8f3f6d8c0f74fd1f3a0dff5 Mon Sep 17 00:00:00 2001
+From d6ec78819d65c1f8f54c8a891f123c6df439d249 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6b5e31f7fbd71675c8f3f6d8c0f74fd1f3a0dff5 ]
+
@@ -24 +25,0 @@
-Cc: stable at dpdk.org
@@ -36 +37 @@
-index cb8d65bf0e..1aca379558 100644
+index 434b0b53b7..7d18ead520 100644
@@ -39 +40 @@
-@@ -721,4 +721,5 @@ Jun Qiu <jun.qiu at jaguarmicro.com>
+@@ -686,4 +686,5 @@ Jun Qiu <jun.qiu at jaguarmicro.com>
@@ -46 +47 @@
-index 801cc95607..c38515a758 100644
+index d829467f41..8571d1419d 100644
@@ -49 +50 @@
-@@ -3863,6 +3863,10 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -3758,6 +3758,10 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -62 +63 @@
-index 155f24377b..dc466ae371 100644
+index 8a277dfe31..20215a8e1e 100644



More information about the stable mailing list