[v2] net/ice: fix tso tunnel setting to not take effect

Message ID 20231207023051.1914021-1-kaiwenx.deng@intel.com (mailing list archive)
State Awaiting Upstream
Delegated to: Qi Zhang
Headers
Series [v2] net/ice: fix tso tunnel setting to not take effect |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/github-robot: build success github build: passed
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS

Commit Message

Kaiwen Deng Dec. 7, 2023, 2:30 a.m. UTC
  The Tx offload capabilities of ICE ethdev doesn't include
tso tunnel, which will result in tso tunnel setting to
not take effect.

The patch adds tunnel tso offload to ICE_TX_NO_VECTOR_FLAGS.

This commit will add tso tunnel capabilities in ice_dev_info_get().

Bugzilla ID: 1327
Fixes: d852fec1be63 ("net/ice: fix Tx offload path choice")
Fixes: 295968d17407 ("ethdev: add namespace")
Cc: stable@dpdk.org

Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
---
 drivers/net/ice/ice_ethdev.c          | 6 +++++-
 drivers/net/ice/ice_rxtx_vec_common.h | 4 ++++
 2 files changed, 9 insertions(+), 1 deletion(-)
  

Comments

Qi Zhang Dec. 27, 2023, 11:20 a.m. UTC | #1
> -----Original Message-----
> From: Deng, KaiwenX <kaiwenx.deng@intel.com>
> Sent: Thursday, December 7, 2023 10:31 AM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Yang, Qiming <qiming.yang@intel.com>; Zhou, YidingX
> <yidingx.zhou@intel.com>; Deng, KaiwenX <kaiwenx.deng@intel.com>; Zhang,
> Qi Z <qi.z.zhang@intel.com>; Ting Xu <ting.xu@intel.com>; Kevin Liu
> <kevinx.liu@intel.com>; Ajit Khaparde <ajit.khaparde@broadcom.com>;
> Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>; Jerin Jacob
> <jerinj@marvell.com>; Hemant Agrawal <hemant.agrawal@nxp.com>;
> Somnath Kotur <somnath.kotur@broadcom.com>
> Subject: [PATCH v2] net/ice: fix tso tunnel setting to not take effect
> 
> The Tx offload capabilities of ICE ethdev doesn't include tso tunnel, which will
> result in tso tunnel setting to not take effect.
> 
> The patch adds tunnel tso offload to ICE_TX_NO_VECTOR_FLAGS.
> 
> This commit will add tso tunnel capabilities in ice_dev_info_get().
> 
> Bugzilla ID: 1327
> Fixes: d852fec1be63 ("net/ice: fix Tx offload path choice")
> Fixes: 295968d17407 ("ethdev: add namespace")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
  
Thomas Monjalon Jan. 22, 2024, 11:43 a.m. UTC | #2
> > The Tx offload capabilities of ICE ethdev doesn't include tso tunnel, which will
> > result in tso tunnel setting to not take effect.
> > 
> > The patch adds tunnel tso offload to ICE_TX_NO_VECTOR_FLAGS.
> > 
> > This commit will add tso tunnel capabilities in ice_dev_info_get().
> > 
> > Bugzilla ID: 1327
> > Fixes: d852fec1be63 ("net/ice: fix Tx offload path choice")
> > Fixes: 295968d17407 ("ethdev: add namespace")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
> 
> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
> 
> Applied to dpdk-next-net-intel.

As said by David in v1, 295968d17407 ("ethdev: add namespace") is not a cause.
Removing while pulling.
  

Patch

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 3ccba4db80..fbc957fcd8 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -3876,7 +3876,11 @@  ice_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 			RTE_ETH_TX_OFFLOAD_TCP_CKSUM |
 			RTE_ETH_TX_OFFLOAD_SCTP_CKSUM |
 			RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |
-			RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM;
+			RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM |
+			RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO |
+			RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO |
+			RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO |
+			RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO;
 		dev_info->flow_type_rss_offloads |= ICE_RSS_OFFLOAD_ALL;
 	}
 
diff --git a/drivers/net/ice/ice_rxtx_vec_common.h b/drivers/net/ice/ice_rxtx_vec_common.h
index 55840cf170..4b73465af5 100644
--- a/drivers/net/ice/ice_rxtx_vec_common.h
+++ b/drivers/net/ice/ice_rxtx_vec_common.h
@@ -251,6 +251,10 @@  ice_rxq_vec_setup_default(struct ice_rx_queue *rxq)
 		RTE_ETH_TX_OFFLOAD_MULTI_SEGS |		\
 		RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM |	\
 		RTE_ETH_TX_OFFLOAD_TCP_TSO |	\
+		RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO |    \
+		RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO |    \
+		RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO |    \
+		RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO |    \
 		RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM)
 
 #define ICE_TX_VECTOR_OFFLOAD (				\