On Wed, Nov 04, 2026 at 02:25:57PM +0000, Anatoly Burakov wrote:
> Some engines do not implement a validation callback. Rejecting these
> engines after successful pattern and action parsing prevents their flows
> from passing validation.
> 
> Fix the validation function to treat successful parsing as sufficient when
> no validation callback is provided.
> 
> Fixes: fae5ce5de601 ("net/iavf: fix false success on flow validation")
> Cc: [email protected]
> 
> Signed-off-by: Anatoly Burakov <[email protected]>
> ---
>  drivers/net/intel/iavf/iavf_generic_flow.c | 13 +++----------
>  1 file changed, 3 insertions(+), 10 deletions(-)
> 
Acked-by: Bruce Richardson <[email protected]>

Applied to dpdk-next-net-intel, with one small change made on apply noted below.
thanks,
/Bruce
> diff --git a/drivers/net/intel/iavf/iavf_generic_flow.c 
> b/drivers/net/intel/iavf/iavf_generic_flow.c
> index be7ddf5db63..1ebab3ddefe 100644
> --- a/drivers/net/intel/iavf/iavf_generic_flow.c
> +++ b/drivers/net/intel/iavf/iavf_generic_flow.c
> @@ -2148,16 +2148,9 @@ iavf_parse_engine_validate(struct iavf_adapter *ad,
>                       continue;
>  
>               engine = parser_node->parser->engine;
> -             if (engine->validation == NULL) {
> -                     rte_free(meta);
> -                     meta = NULL;
> -                     rte_flow_error_set(error, EINVAL,
> -                             RTE_FLOW_ERROR_TYPE_HANDLE,
> -                             NULL, "Validation not support");
> -                     continue;
> -             }
> -
> -             ret = engine->validation(ad, flow, meta, error);
> +             ret = 0;

Rather than a separate assignment line, we can just zero-init ret at
definition, since all paths from here lead to a return.

> +             if (engine->validation != NULL)
> +                     ret = engine->validation(ad, flow, meta, error);
>               rte_free(meta);
>               meta = NULL;
>               if (ret != 0) {
> -- 
> 2.52.0
> 

Reply via email to