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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Jun 25 01:58:24 CEST 2024


Hi,

FYI, your patch has been queued to stable release 22.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9d02109d19544e9834902cdf7964165e25cc75f2

Thanks.

Luca Boccassi

---
>From 9d02109d19544e9834902cdf7964165e25cc75f2 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 172e7f2692..8aca0a656e 100644
--- a/.mailmap
+++ b/.mailmap
@@ -686,6 +686,7 @@ Junjie Wan <wanjunjie at bytedance.com>
 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>
 Juraj Linkeš <juraj.linkes at pantheon.tech>
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 0ff334745d..2049c32c4e 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3721,8 +3721,12 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO |
 		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 |
 		RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP;
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index d96bbbb677..6522f2b810 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -295,6 +295,15 @@ 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;
 }
 
 static inline void
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-06-25 00:22:15.897075093 +0100
+++ 0038-net-i40e-fix-outer-UDP-checksum-offload-for-X710.patch	2024-06-25 00:22:13.153184996 +0100
@@ -1 +1 @@
-From 6b5e31f7fbd71675c8f3f6d8c0f74fd1f3a0dff5 Mon Sep 17 00:00:00 2001
+From 9d02109d19544e9834902cdf7964165e25cc75f2 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 172e7f2692..8aca0a656e 100644
@@ -39 +40 @@
-@@ -720,6 +720,7 @@ Junjie Wan <wanjunjie at bytedance.com>
+@@ -686,6 +686,7 @@ Junjie Wan <wanjunjie at bytedance.com>
@@ -48 +49 @@
-index 801cc95607..c38515a758 100644
+index 0ff334745d..2049c32c4e 100644
@@ -51 +52 @@
-@@ -3862,8 +3862,12 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -3721,8 +3721,12 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -66 +67 @@
-index 155f24377b..dc466ae371 100644
+index d96bbbb677..6522f2b810 100644


More information about the stable mailing list