From: Dexia Li <dexia.li@jaguarmicro.com>
To: dev@dpdk.org
Cc: qingmin.liu@jaguarmicro.com, joey.xing@jaguarmicro.com,
Dexia Li <dexia.li@jaguarmicro.com>
Subject: [PATCH] net/iavf: fix pkt len check
Date: Fri, 13 Oct 2023 19:41:25 +0800 [thread overview]
Message-ID: <20231013114125.376-1-dexia.li@jaguarmicro.com> (raw)
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@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
next reply other threads:[~2023-10-13 11:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-13 11:41 Dexia Li [this message]
2023-10-13 11:47 ` David Marchand
[not found] ` <KL1PR06MB5893D457706C34856FC2781C9FD7A@KL1PR06MB5893.apcprd06.prod.outlook.com>
2023-10-16 7:30 ` David Marchand
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=20231013114125.376-1-dexia.li@jaguarmicro.com \
--to=dexia.li@jaguarmicro.com \
--cc=dev@dpdk.org \
--cc=joey.xing@jaguarmicro.com \
--cc=qingmin.liu@jaguarmicro.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 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).