DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/iavf: fix segmentation offload buffer size
@ 2022-02-10 13:09 Radu Nicolau
  2022-02-15  6:16 ` Huang, ZhiminX
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Radu Nicolau @ 2022-02-10 13:09 UTC (permalink / raw)
  To: Jingjing Wu, Beilei Xing; +Cc: dev, yux.jiang, Radu Nicolau

This reverts commit ff8b8bcd2ebe, which resulted in incorrect buffer size
being computed for TSO packets.

Fixes: ff8b8bcd2ebe ("net/iavf: fix segmentation offload condition")

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
 drivers/net/iavf/iavf_rxtx.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index b0fed1b992..ba272bb211 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -2464,9 +2464,10 @@ iavf_fill_data_desc(volatile struct iavf_tx_desc *desc,
 	desc->buffer_addr = rte_mbuf_data_iova(m);
 
 	/* calculate data buffer size less set header lengths */
-	if (m->ol_flags & (RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_UDP_SEG)) {
-		if (m->ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK)
-			hdrlen += m->outer_l3_len;
+	if ((m->ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) &&
+			(m->ol_flags & (RTE_MBUF_F_TX_TCP_SEG |
+					RTE_MBUF_F_TX_UDP_SEG))) {
+		hdrlen += m->outer_l3_len;
 		if (m->ol_flags & RTE_MBUF_F_TX_L4_MASK)
 			hdrlen += m->l3_len + m->l4_len;
 		else
-- 
2.25.1


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

end of thread, other threads:[~2022-02-20  5:35 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-10 13:09 [PATCH] net/iavf: fix segmentation offload buffer size Radu Nicolau
2022-02-15  6:16 ` Huang, ZhiminX
2022-02-15  7:59   ` Zhang, Qi Z
2022-02-15 10:06 ` Ferruh Yigit
2022-02-15 10:46   ` Kevin Traynor
2022-02-15 11:25     ` Ferruh Yigit
2022-02-15 10:47   ` Nicolau, Radu
2022-02-15 11:19     ` Ferruh Yigit
2022-02-15 12:30       ` Nicolau, Radu
2022-02-15 12:44         ` Ferruh Yigit
2022-02-15 12:48           ` Ferruh Yigit
2022-02-15 15:52             ` Nicolau, Radu
2022-02-15 15:50 ` [PATCH v2] " Radu Nicolau
2022-02-20  5:35   ` 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).