patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/tap: do not include l2 header in gso size when compared with mtu
@ 2022-02-28  8:27 Harold Huang
  2022-03-04 16:30 ` Ferruh Yigit
  2022-03-08 14:35 ` Harold Huang
  0 siblings, 2 replies; 8+ messages in thread
From: Harold Huang @ 2022-02-28  8:27 UTC (permalink / raw)
  To: dev; +Cc: ophirmu, Harold Huang, stable, Keith Wiles, Raslan Darawsheh

The gso size is calculated with all of the headers and payload. As a
result, the l2 header should not be included when comparing gso size
with mtu.

Fixes: 050316a88313 ("net/tap: support TSO (TCP Segment Offload)")
Cc: stable@dpdk.org
Signed-off-by: Harold Huang <baymaxhuang@gmail.com>
---
 drivers/net/tap/rte_eth_tap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index f1b48cae82..2b561d232c 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -731,7 +731,7 @@ pmd_tx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 					mbuf_in->l4_len;
 			tso_segsz = mbuf_in->tso_segsz + hdrs_len;
 			if (unlikely(tso_segsz == hdrs_len) ||
-				tso_segsz > *txq->mtu) {
+				tso_segsz > *txq->mtu + mbuf_in->l2_len) {
 				txq->stats.errs++;
 				break;
 			}
-- 
2.27.0


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

end of thread, other threads:[~2023-10-17 16:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-28  8:27 [PATCH] net/tap: do not include l2 header in gso size when compared with mtu Harold Huang
2022-03-04 16:30 ` Ferruh Yigit
2022-03-08 14:35 ` Harold Huang
2022-03-18  9:22   ` Ophir Munk
2022-03-21  2:52     ` Harold Huang
2022-05-20 22:08   ` Ferruh Yigit
2022-05-24 14:01     ` Ophir Munk
2023-10-17 16:47   ` Stephen Hemminger

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