DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] lib/net: support UDP pseudo-header for UFO
@ 2023-01-12  9:26 Zhichao Zeng
  2023-02-08 10:35 ` Zeng, ZhichaoX
  2023-02-10 13:20 ` Olivier Matz
  0 siblings, 2 replies; 4+ messages in thread
From: Zhichao Zeng @ 2023-01-12  9:26 UTC (permalink / raw)
  To: dev; +Cc: yidingx.zhou, Zhichao Zeng, Olivier Matz

Add UDP pseudo-header processing for UDP segmentation offload
by adding the UDP_SEG flag.

Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
---
 lib/net/rte_ip.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/net/rte_ip.h b/lib/net/rte_ip.h
index 9c8e8206f0..4761ede747 100644
--- a/lib/net/rte_ip.h
+++ b/lib/net/rte_ip.h
@@ -345,7 +345,7 @@ rte_ipv4_phdr_cksum(const struct rte_ipv4_hdr *ipv4_hdr, uint64_t ol_flags)
 	psd_hdr.dst_addr = ipv4_hdr->dst_addr;
 	psd_hdr.zero = 0;
 	psd_hdr.proto = ipv4_hdr->next_proto_id;
-	if (ol_flags & RTE_MBUF_F_TX_TCP_SEG) {
+	if (ol_flags & (RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_UDP_SEG)) {
 		psd_hdr.len = 0;
 	} else {
 		l3_len = rte_be_to_cpu_16(ipv4_hdr->total_length);
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-02-13 10:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-12  9:26 [PATCH] lib/net: support UDP pseudo-header for UFO Zhichao Zeng
2023-02-08 10:35 ` Zeng, ZhichaoX
2023-02-10 13:20 ` Olivier Matz
2023-02-13 10:22   ` Zeng, ZhichaoX

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