DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Omar Munchaev <omarmunchaev@gmail.com>
To: dev@dpdk.org
Cc: Omar Munchaev <omarmunchaev@gmail.com>
Subject: [PATCH v2] net/intel: use rte_validate_tx_offload function correctly for i40e/iavf/ice drivers
Date: Wed, 16 Sep 2026 19:29:04 +0300	[thread overview]
Message-ID: <20260916162927.2137856-1-omarmunchaev@gmail.com> (raw)

rte_validate_tx_offload() returns 0 on success.
The i40e, iavf and ice drivers treat any non-zero
return as an error and drop the packet, causing valid packets to be
dropped when Tx offload checking is enabled via EAL, e.g.:

    -a 81:00.0,mbuf_check=offload

Only reject the packet when the return value is not 0.

Signed-off-by: Omar Munchaev <omarmunchaev@gmail.com>
---
v2:
- Fixed From/Signed-off-by email address mismatch
---
 drivers/net/intel/i40e/i40e_rxtx.c | 2 +-
 drivers/net/intel/iavf/iavf_rxtx.c | 2 +-
 drivers/net/intel/ice/ice_rxtx.c   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/intel/i40e/i40e_rxtx.c b/drivers/net/intel/i40e/i40e_rxtx.c
index e29fcff661..ee70f7ce4f 100644
--- a/drivers/net/intel/i40e/i40e_rxtx.c
+++ b/drivers/net/intel/i40e/i40e_rxtx.c
@@ -1194,7 +1194,7 @@ i40e_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts
 				break;
 			}
 
-			if (!rte_validate_tx_offload(mb)) {
+			if (rte_validate_tx_offload(mb) != 0) {
 				PMD_TX_LOG(ERR, "INVALID mbuf: TX offload setup error");
 				pkt_error = true;
 				break;
diff --git a/drivers/net/intel/iavf/iavf_rxtx.c b/drivers/net/intel/iavf/iavf_rxtx.c
index 4f2ffe6188..10d33660d9 100644
--- a/drivers/net/intel/iavf/iavf_rxtx.c
+++ b/drivers/net/intel/iavf/iavf_rxtx.c
@@ -3813,7 +3813,7 @@ iavf_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts,
 				break;
 			}
 
-			if (!rte_validate_tx_offload(mb)) {
+			if (rte_validate_tx_offload(mb) != 0) {
 				PMD_TX_LOG(ERR, "INVALID mbuf: TX offload setup error");
 				pkt_error = true;
 				break;
diff --git a/drivers/net/intel/ice/ice_rxtx.c b/drivers/net/intel/ice/ice_rxtx.c
index c4b5454c53..3d98d821b2 100644
--- a/drivers/net/intel/ice/ice_rxtx.c
+++ b/drivers/net/intel/ice/ice_rxtx.c
@@ -3669,7 +3669,7 @@ ice_xmit_pkts_check(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 				break;
 			}
 
-			if (!rte_validate_tx_offload(mb)) {
+			if (rte_validate_tx_offload(mb) != 0) {
 				PMD_TX_LOG(ERR, "INVALID mbuf: TX offload setup error");
 				pkt_error = true;
 				break;
-- 
2.54.0


             reply	other threads:[~2026-09-17  6:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 16:29 Omar Munchaev [this message]
2026-09-18 13:14 ` [PATCH v2] net/intel: use rte_validate_tx_offload function correctly for i40e/iavf/ice drivers Bruce Richardson
2026-09-18 13:24   ` Bruce Richardson

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=20260916162927.2137856-1-omarmunchaev@gmail.com \
    --to=omarmunchaev@gmail.com \
    --cc=dev@dpdk.org \
    /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