All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhichao Zeng <zhichaox.zeng@intel.com>
To: dev@dpdk.org
Cc: yidingx.zhou@intel.com, Zhichao Zeng <zhichaox.zeng@intel.com>,
	Olivier Matz <olivier.matz@6wind.com>
Subject: [PATCH] lib/net: support UDP pseudo-header for UFO
Date: Thu, 12 Jan 2023 17:26:08 +0800	[thread overview]
Message-ID: <20230112092608.868006-1-zhichaox.zeng@intel.com> (raw)

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


             reply	other threads:[~2023-01-12  9:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12  9:26 Zhichao Zeng [this message]
2023-02-08 10:35 ` [PATCH] lib/net: support UDP pseudo-header for UFO Zeng, ZhichaoX
2023-02-10 13:20 ` Olivier Matz
2023-02-13 10:22   ` Zeng, ZhichaoX

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230112092608.868006-1-zhichaox.zeng@intel.com \
    --to=zhichaox.zeng@intel.com \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.com \
    --cc=yidingx.zhou@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.