[PATCH v1 1/1] net/iavf: allow flow validation without engine callback

Bruce Richardson bruce.richardson at intel.com
Thu Nov 5 12:26:12 CET 2026


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: stable at dpdk.org
> 
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
> ---
>  drivers/net/intel/iavf/iavf_generic_flow.c | 13 +++----------
>  1 file changed, 3 insertions(+), 10 deletions(-)
> 
Acked-by: Bruce Richardson <bruce.richardson at intel.com>

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
> 


More information about the dev mailing list