DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 4/4] net/iavf: enable UDP fragmentation offload
@ 2023-04-13  5:35 Zhichao Zeng
  2023-05-24  5:20 ` Xu, Ke1
  0 siblings, 1 reply; 3+ messages in thread
From: Zhichao Zeng @ 2023-04-13  5:35 UTC (permalink / raw)
  To: dev; +Cc: qi.z.zhang, ke1.xu, Zhichao Zeng, Jingjing Wu, Beilei Xing

This commit enables transmit segmentation offload for UDP, including both
non-tunneled and tunneled packets.

The command "tso set <tso_segsz> <port_id>" or
"tunnel_tso set <tso_segsz> <port_id>" is used to enable UFO.

Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 2 +-
 drivers/net/iavf/iavf_rxtx.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index b1d0fbceb6..8eca8aba3e 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -3622,7 +3622,7 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
 		ol_flags = m->ol_flags;
 
 		/* Check condition for nb_segs > IAVF_TX_MAX_MTU_SEG. */
-		if (!(ol_flags & RTE_MBUF_F_TX_TCP_SEG)) {
+		if (!(ol_flags & (RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_UDP_SEG))) {
 			if (m->nb_segs > IAVF_TX_MAX_MTU_SEG) {
 				rte_errno = EINVAL;
 				return i;
diff --git a/drivers/net/iavf/iavf_rxtx.h b/drivers/net/iavf/iavf_rxtx.h
index 09e2127db0..5096868d87 100644
--- a/drivers/net/iavf/iavf_rxtx.h
+++ b/drivers/net/iavf/iavf_rxtx.h
@@ -73,6 +73,7 @@
 		RTE_MBUF_F_TX_IP_CKSUM |		 \
 		RTE_MBUF_F_TX_L4_MASK |		 \
 		RTE_MBUF_F_TX_TCP_SEG |          \
+		RTE_MBUF_F_TX_UDP_SEG |          \
 		RTE_MBUF_F_TX_OUTER_IP_CKSUM |   \
 		RTE_MBUF_F_TX_OUTER_UDP_CKSUM)
 
@@ -85,6 +86,7 @@
 		RTE_MBUF_F_TX_IP_CKSUM |		 \
 		RTE_MBUF_F_TX_L4_MASK |		 \
 		RTE_MBUF_F_TX_TCP_SEG |		 \
+		RTE_MBUF_F_TX_UDP_SEG |      \
 		RTE_MBUF_F_TX_TUNNEL_MASK |	\
 		RTE_MBUF_F_TX_OUTER_IP_CKSUM |  \
 		RTE_MBUF_F_TX_OUTER_UDP_CKSUM | \
-- 
2.25.1


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

end of thread, other threads:[~2023-06-07  1:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-13  5:35 [PATCH 4/4] net/iavf: enable UDP fragmentation offload Zhichao Zeng
2023-05-24  5:20 ` Xu, Ke1
2023-06-07  1:00   ` Zhang, Qi Z

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