patch 'net/i40e: fix outer UDP checksum offload for X710' has been queued to stable release 23.11.2
Xueming Li
xuemingl at nvidia.com
Fri Jul 12 12:44:31 CEST 2024
Hi,
FYI, your patch has been queued to stable release 23.11.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=6cbf97cfe01954c981d8127256e9c23c9657dd9a
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From 6cbf97cfe01954c981d8127256e9c23c9657dd9a 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
Cc: Xueming Li <xuemingl at nvidia.com>
[ 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 db6bc47117..79e25426fe 100644
--- a/.mailmap
+++ b/.mailmap
@@ -713,6 +713,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 3ca226156b..ffc1f6d874 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3724,8 +3724,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 9aa5facb53..5e693cb1ea 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.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-07-12 18:40:16.139997183 +0800
+++ 0045-net-i40e-fix-outer-UDP-checksum-offload-for-X710.patch 2024-07-12 18:40:14.056594233 +0800
@@ -1 +1 @@
-From 6b5e31f7fbd71675c8f3f6d8c0f74fd1f3a0dff5 Mon Sep 17 00:00:00 2001
+From 6cbf97cfe01954c981d8127256e9c23c9657dd9a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 6b5e31f7fbd71675c8f3f6d8c0f74fd1f3a0dff5 ]
@@ -24 +26,0 @@
-Cc: stable at dpdk.org
@@ -36 +38 @@
-index cb8d65bf0e..1aca379558 100644
+index db6bc47117..79e25426fe 100644
@@ -39 +41 @@
-@@ -720,6 +720,7 @@ Junjie Wan <wanjunjie at bytedance.com>
+@@ -713,6 +713,7 @@ Junjie Wan <wanjunjie at bytedance.com>
@@ -48 +50 @@
-index 801cc95607..c38515a758 100644
+index 3ca226156b..ffc1f6d874 100644
@@ -51 +53 @@
-@@ -3862,8 +3862,12 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
+@@ -3724,8 +3724,12 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
@@ -66 +68 @@
-index 155f24377b..dc466ae371 100644
+index 9aa5facb53..5e693cb1ea 100644
More information about the stable
mailing list