DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Omar Munchaev <omarmunchaev@gmail.com>
Cc: Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
	Anatoly Burakov <anatoly.burakov@intel.com>, <dev@dpdk.org>,
	Omar Munchaev <omar.munchaev@gmail.com>
Subject: Re: [PATCH] net/intel: use rte_validate_tx_offload function correctly for i40e/iavf/ice drivers
Date: Wed, 16 Sep 2026 16:48:26 +0100	[thread overview]
Message-ID: <aqq6SjXopFXqkYXY@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20260916141235.2074815-1-omar.munchaev@gmail.com>

On Wed, Sep 16, 2026 at 05:12:35PM +0300, Omar Munchaev wrote:
> rte_validate_tx_offload() returns 0 on success.
> The i40e, iavf and ice drivers treat any non-zero

s/any non-zero/a 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.
>

Fixes: 82b03af55a1b ("net/i40e: support mbuf checks in Tx path")
Fixes: 21dad1fc78cb ("net/iavf: support mbuf checks in Tx path")
Fixes: 2a0244d611b4 ("net/ice: support mbuf checks in Tx path")
Cc: stable@dpdk.org

> Signed-off-by: Omar Munchaev <omar.munchaev@gmail.com>

Fixes look correct to me.

Acked-by: Bruce Richardson <bruce.richardson@intel.com>


> ---
>  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-16 15:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 14:12 [PATCH] net/intel: use rte_validate_tx_offload function correctly for i40e/iavf/ice drivers Omar Munchaev
2026-09-16 15:48 ` Bruce Richardson [this message]
2026-09-19 18:03 ` Medvedkin, Vladimir

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=aqq6SjXopFXqkYXY@bricha3-mobl1.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=omar.munchaev@gmail.com \
    --cc=omarmunchaev@gmail.com \
    --cc=vladimir.medvedkin@intel.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