[PATCH] net/iavf: fix pkt len check
Dexia Li
dexia.li at jaguarmicro.com
Fri Oct 13 13:41:25 CEST 2023
App usually encap some bytes in mbuf headroom, for example, tunnel
header. When RTE_MBUF_F_TX_TCP_SEG is set, this check will drop packets.
Since the packet will be cut by hw soon, the out packet will not exceed
mtu.
Signed-off-by: Dexia Li <dexia.li at jaguarmicro.com>
---
drivers/net/iavf/iavf_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index b1d0fbceb6..b6dabed3c8 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -3641,7 +3641,7 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
/* check the data_len in mbuf */
if (m->data_len < IAVF_TX_MIN_PKT_LEN ||
- m->data_len > max_frame_size) {
+ (!(ol_flags & RTE_MBUF_F_TX_TCP_SEG) && m->data_len > max_frame_size)) {
rte_errno = EINVAL;
PMD_DRV_LOG(ERR, "INVALID mbuf: bad data_len=[%hu]", m->data_len);
return i;
--
2.33.0.windows.2
More information about the dev
mailing list