From 8e118c73338651fbb3b08cd572792532d91b4c85 Mon Sep 17 00:00:00 2001 From: Donghua Huang Date: Wed, 10 Dec 2025 10:24:40 +0800 Subject: [PATCH] sync some patches Signed-off-by: Donghua Huang --- 0140-net-fix-L2-length-for-GRE-packets.patch | 37 +++++++++++++++++ ...ter-UDP-checksum-fail-with-simple-BD.patch | 41 +++++++++++++++++++ dpdk.spec | 9 +++- 3 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 0140-net-fix-L2-length-for-GRE-packets.patch create mode 100644 0141-net-hns3-fix-outer-UDP-checksum-fail-with-simple-BD.patch diff --git a/0140-net-fix-L2-length-for-GRE-packets.patch b/0140-net-fix-L2-length-for-GRE-packets.patch new file mode 100644 index 0000000..2d7a659 --- /dev/null +++ b/0140-net-fix-L2-length-for-GRE-packets.patch @@ -0,0 +1,37 @@ +From e620917d85e2a9c16faf5c886d023ee990551931 Mon Sep 17 00:00:00 2001 +From: Dengdui Huang +Date: Wed, 23 Jul 2025 18:47:10 +0800 +Subject: [PATCH] net: fix L2 length for GRE packets + +[ upstream commit 76730c7b9b5a35d1a74d45a08153a03bdb1b26f8 ] + +The meaning of L2_len in the parsing result of the rte_net_get_ptype() +is the same as the L2_len field in the mbuf. For tunnel packets, +the L2_len should include protocol header of tunnel packets. + +Bugzilla ID: 1754 +Fixes: d21d855464ff ("net: support GRE in software packet type parser") +Cc: stable@dpdk.org + +Signed-off-by: Dengdui Huang +Reviewed-by: Chengwen Feng +Signed-off-by: Donghua Huang +--- + lib/net/rte_net.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/net/rte_net.c b/lib/net/rte_net.c +index 1339613..5ac68ef 100644 +--- a/lib/net/rte_net.c ++++ b/lib/net/rte_net.c +@@ -478,6 +478,7 @@ uint32_t rte_net_get_ptype(const struct rte_mbuf *m, + + pkt_type |= ptype_tunnel_without_udp(&proto, m, &off); + hdr_lens->tunnel_len = off - prev_off; ++ hdr_lens->inner_l2_len = off - prev_off; + } + + /* same job for inner header: we need to duplicate the code +-- +2.25.1 + diff --git a/0141-net-hns3-fix-outer-UDP-checksum-fail-with-simple-BD.patch b/0141-net-hns3-fix-outer-UDP-checksum-fail-with-simple-BD.patch new file mode 100644 index 0000000..aa963c8 --- /dev/null +++ b/0141-net-hns3-fix-outer-UDP-checksum-fail-with-simple-BD.patch @@ -0,0 +1,41 @@ +From a7e970542e07e0f1072391287e8ba076d89a1511 Mon Sep 17 00:00:00 2001 +From: Chengwen Feng +Date: Fri, 5 Dec 2025 15:39:55 +0800 +Subject: [PATCH] net/hns3: fix outer UDP checksum fail with simple BD + +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 +Signed-off-by: Xingui Yang +Signed-off-by: Donghua Huang +--- + 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 6beb91c..8d2fbba 100644 +--- a/drivers/net/hns3/hns3_rxtx.c ++++ b/drivers/net/hns3/hns3_rxtx.c +@@ -4073,8 +4073,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.25.1 + diff --git a/dpdk.spec b/dpdk.spec index 421c884..41cd9d8 100644 --- a/dpdk.spec +++ b/dpdk.spec @@ -11,7 +11,7 @@ Name: dpdk Version: 23.11 -Release: 38 +Release: 39 URL: http://dpdk.org Source: https://fast.dpdk.org/rel/dpdk-%{version}.tar.xz @@ -172,6 +172,8 @@ Patch6136: 0136-app-testpmd-fix-DCB-Rx-queues.patch Patch6137: 0137-app-testpmd-set-DCB-forwarding-TCs.patch Patch6138: 0138-app-testpmd-fix-inner-UDP-checksum-offload-fail.patch Patch6139: 0139-app-testpmd-support-multi-cores-process-one-TC.patch +Patch6140: 0140-net-fix-L2-length-for-GRE-packets.patch +Patch6141: 0141-net-hns3-fix-outer-UDP-checksum-fail-with-simple-BD.patch BuildRequires: meson BuildRequires: python3-pyelftools @@ -376,6 +378,11 @@ fi /usr/sbin/depmod %changelog +* Wed Dec 10 2025 huangdonghua - 23.11-39 + fix L2 length for GRE packets: + - net: fix L2 length for GRE packets + - net/hns3: fix outer UDP checksum fail with simple BD + * Mon Dec 1 2025 huangdonghua - 23.11-38 Upload some patches of VF multiple TC and others: - app/testpmd: handle IEEE1588 init failure -- Gitee