DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/hns3: fix outer UDP checksum fail with simple BD
@ 2025-12-05  7:39 Xingui Yang
  0 siblings, 0 replies; only message in thread
From: Xingui Yang @ 2025-12-05  7:39 UTC (permalink / raw)
  To: dev
  Cc: stephen, david.marchand, fengchengwen, lihuisong, liuyonglong,
	kangfenglong

From: Chengwen Feng <fengchengwen@huawei.com>

On the hardware platform that supports simple BD, if outer-ip, outer-udp
and udp checksum offloading are enabled, the hardware incorrectly
processes the ether+ipv6+vxlan+ether+ipv4+udp packet (the incorrect
field is modified).

The root cause is that the simple BD feature does not exclude outer-udp
checksum. This commit add it.

Fixes: 6393fc0b823c ("net/hns3: simplify hardware checksum offloading")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Xingui Yang <yangxingui@huawei.com>
---
 drivers/net/hns3/hns3_rxtx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c
index 3a99923220..573604b0cd 100644
--- a/drivers/net/hns3/hns3_rxtx.c
+++ b/drivers/net/hns3/hns3_rxtx.c
@@ -3999,8 +3999,9 @@ hns3_handle_simple_bd(struct hns3_tx_queue *txq, struct hns3_desc *desc,
 	if (txq->simple_bd_enable && !(m->ol_flags & RTE_MBUF_F_TX_IP_CKSUM) &&
 	    !(m->ol_flags & RTE_MBUF_F_TX_TCP_SEG) &&
 	    !(m->ol_flags & RTE_MBUF_F_TX_OUTER_IP_CKSUM) &&
+	    !(m->ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM) &&
 	    ((m->ol_flags & RTE_MBUF_F_TX_L4_MASK) == RTE_MBUF_F_TX_TCP_CKSUM ||
-	    (m->ol_flags & RTE_MBUF_F_TX_L4_MASK) == RTE_MBUF_F_TX_UDP_CKSUM)) {
+	     (m->ol_flags & RTE_MBUF_F_TX_L4_MASK) == RTE_MBUF_F_TX_UDP_CKSUM)) {
 		/* set checksum start and offset, defined in 2 Bytes */
 		hns3_set_field(desc->tx.type_cs_vlan_tso_len,
 			       HNS3_TXD_L4_START_M, HNS3_TXD_L4_START_S,
-- 
2.33.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-12-05  7:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-05  7:39 [PATCH] net/hns3: fix outer UDP checksum fail with simple BD Xingui Yang

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