DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/i40e: fix missing error handling for QinQ filter
@ 2026-09-11  9:40 Bruce Richardson
  2026-09-11 11:16 ` Burakov, Anatoly
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Richardson @ 2026-09-11  9:40 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, stable

When installing a QinQ tunnel filter, errors were not properly caught
leading to the situation where the app got a successful return code even
though the filter was not properly installed. Add an appropriate log
message and error return code on error to fix.

Fixes: 116b7910d641 ("net/i40e: add QinQ filter create function")
Cc: stable@dpdk.org

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/intel/i40e/i40e_ethdev.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c
index b6b2d291ee..c91abe7626 100644
--- a/drivers/net/intel/i40e/i40e_ethdev.c
+++ b/drivers/net/intel/i40e/i40e_ethdev.c
@@ -8597,9 +8597,11 @@ i40e_dev_consistent_tunnel_filter_set(struct i40e_pf *pf,
 	case I40E_TUNNEL_TYPE_QINQ:
 		if (!pf->qinq_replace_flag) {
 			ret = i40e_cloud_filter_qinq_create(pf);
-			if (ret < 0)
-				PMD_DRV_LOG(DEBUG,
-					    "QinQ tunnel filter already created.");
+			if (ret < 0) {
+				PMD_DRV_LOG(ERR, "Failed to create QinQ tunnel filter.");
+				/* ret is a raw i40e_status_code, not an errno */
+				return -ENOTSUP;
+			}
 			pf->qinq_replace_flag = 1;
 		}
 		/*	Add in the General fields the values of
-- 
2.53.0


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

* Re: [PATCH] net/i40e: fix missing error handling for QinQ filter
  2026-09-11  9:40 [PATCH] net/i40e: fix missing error handling for QinQ filter Bruce Richardson
@ 2026-09-11 11:16 ` Burakov, Anatoly
  2026-09-11 14:32   ` Bruce Richardson
  0 siblings, 1 reply; 3+ messages in thread
From: Burakov, Anatoly @ 2026-09-11 11:16 UTC (permalink / raw)
  To: Bruce Richardson, dev; +Cc: stable

On 9/11/2026 11:40 AM, Bruce Richardson wrote:
> When installing a QinQ tunnel filter, errors were not properly caught
> leading to the situation where the app got a successful return code even
> though the filter was not properly installed. Add an appropriate log
> message and error return code on error to fix.
> 
> Fixes: 116b7910d641 ("net/i40e: add QinQ filter create function")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>   drivers/net/intel/i40e/i40e_ethdev.c | 8 +++++---
>   1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c
> index b6b2d291ee..c91abe7626 100644
> --- a/drivers/net/intel/i40e/i40e_ethdev.c
> +++ b/drivers/net/intel/i40e/i40e_ethdev.c
> @@ -8597,9 +8597,11 @@ i40e_dev_consistent_tunnel_filter_set(struct i40e_pf *pf,
>   	case I40E_TUNNEL_TYPE_QINQ:
>   		if (!pf->qinq_replace_flag) {
>   			ret = i40e_cloud_filter_qinq_create(pf);
> -			if (ret < 0)
> -				PMD_DRV_LOG(DEBUG,
> -					    "QinQ tunnel filter already created.");
> +			if (ret < 0) {
> +				PMD_DRV_LOG(ERR, "Failed to create QinQ tunnel filter.");
> +				/* ret is a raw i40e_status_code, not an errno */
> +				return -ENOTSUP;
> +			}
>   			pf->qinq_replace_flag = 1;
>   		}
>   		/*	Add in the General fields the values of

Returning ENOTSUP unconditionally seemed unwarranted to me, so I dug 
into the code to see what sort of errors we might see. The function in 
question actually mixes return values (default value is `-ENOTSUP` which 
is -95, but most errors from that codepath return `I40E_NOT_SUPPORTED` 
which is -64), but most of them indeed boil down to ENOTSUP (except for 
status returned from call into AQ command).

So, although not ideal, this is probably consistent with current 
implementation

Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

-- 
Thanks,
Anatoly

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

* Re: [PATCH] net/i40e: fix missing error handling for QinQ filter
  2026-09-11 11:16 ` Burakov, Anatoly
@ 2026-09-11 14:32   ` Bruce Richardson
  0 siblings, 0 replies; 3+ messages in thread
From: Bruce Richardson @ 2026-09-11 14:32 UTC (permalink / raw)
  To: Burakov, Anatoly; +Cc: dev, stable

On Fri, Sep 11, 2026 at 01:16:57PM +0200, Burakov, Anatoly wrote:
> On 9/11/2026 11:40 AM, Bruce Richardson wrote:
> > When installing a QinQ tunnel filter, errors were not properly caught
> > leading to the situation where the app got a successful return code even
> > though the filter was not properly installed. Add an appropriate log
> > message and error return code on error to fix.
> > 
> > Fixes: 116b7910d641 ("net/i40e: add QinQ filter create function")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> > ---
> >   drivers/net/intel/i40e/i40e_ethdev.c | 8 +++++---
> >   1 file changed, 5 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c
> > index b6b2d291ee..c91abe7626 100644
> > --- a/drivers/net/intel/i40e/i40e_ethdev.c
> > +++ b/drivers/net/intel/i40e/i40e_ethdev.c
> > @@ -8597,9 +8597,11 @@ i40e_dev_consistent_tunnel_filter_set(struct i40e_pf *pf,
> >   	case I40E_TUNNEL_TYPE_QINQ:
> >   		if (!pf->qinq_replace_flag) {
> >   			ret = i40e_cloud_filter_qinq_create(pf);
> > -			if (ret < 0)
> > -				PMD_DRV_LOG(DEBUG,
> > -					    "QinQ tunnel filter already created.");
> > +			if (ret < 0) {
> > +				PMD_DRV_LOG(ERR, "Failed to create QinQ tunnel filter.");
> > +				/* ret is a raw i40e_status_code, not an errno */
> > +				return -ENOTSUP;
> > +			}
> >   			pf->qinq_replace_flag = 1;
> >   		}
> >   		/*	Add in the General fields the values of
> 
> Returning ENOTSUP unconditionally seemed unwarranted to me, so I dug into
> the code to see what sort of errors we might see. The function in question
> actually mixes return values (default value is `-ENOTSUP` which is -95, but
> most errors from that codepath return `I40E_NOT_SUPPORTED` which is -64),
> but most of them indeed boil down to ENOTSUP (except for status returned
> from call into AQ command).
> 
> So, although not ideal, this is probably consistent with current
> implementation
> 
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
> 
Applied to dpdk-next-net-intel.

/Bruce

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

end of thread, other threads:[~2026-09-11 14:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-11  9:40 [PATCH] net/i40e: fix missing error handling for QinQ filter Bruce Richardson
2026-09-11 11:16 ` Burakov, Anatoly
2026-09-11 14:32   ` Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox