On Fri, Oct 30, 2026 at 09:40:14AM +0000, Anatoly Burakov wrote:
> The FDIR flow engine was initialized even when flow director was not
> usable. With no FDIR filter space, engine init failed and logged an
> error. When FDIR was disabled because its queue could not be allocated,
> the engine was initialized and FDIR flows only failed at install.
> 

This commit log is not entirely clear, for example, when you talk about cases
where the engine init already fails - given that you are adding code to
make the engine init fail.

> Return -ENOTSUP in both cases so that the engine is skipped.

You actually refer to 3 cases, I think: fdir not usable, no filter space,
and no queue allocation. From the patch, I don't see the third case being
relevant, so maybe drop the mention of it?

> 
> Fixes: 05432a6e4676 ("net/i40e: reimplement FDIR parser")
> 
> Signed-off-by: Anatoly Burakov <[email protected]>
> ---
>  drivers/net/intel/i40e/i40e_flow_fdir.c | 3 +++
>  1 file changed, 3 insertions(+)
> 

Code change looks reasonable, though, so with commit log cleanup:

Acked-by: Bruce Richardson <[email protected]>


> diff --git a/drivers/net/intel/i40e/i40e_flow_fdir.c 
> b/drivers/net/intel/i40e/i40e_flow_fdir.c
> index 55997295edb..197b93f3746 100644
> --- a/drivers/net/intel/i40e/i40e_flow_fdir.c
> +++ b/drivers/net/intel/i40e/i40e_flow_fdir.c
> @@ -2010,6 +2010,9 @@ i40e_fdir_flow_engine_init(const struct ci_flow_engine 
> *engine,
>       uint32_t i;
>       int ret;
>  
> +     if ((pf->flags & I40E_FLAG_FDIR) == 0 || fdir_info->fdir_space_size == 
> 0)
> +             return -ENOTSUP;
> +
>       snprintf(fdir_hash_name, sizeof(fdir_hash_name), "fdir_%s", 
> dev_data->name);
>  
>       struct rte_hash_parameters fdir_hash_params = {
> -- 
> 2.52.0
> 

Reply via email to