net/mlx5: fix flex item header length translation
PATCH 1/1 net/mlx5: fix flex item header length translation
Flex item API provides support for network header with a fixed and variable lengths.
When PMD compiles a new flex item object configuration it converts RTE parameters into matching PMD PARSE_GRAPH parameters and checks the parameter values against port capabilities.
Current implementation mismatched PARSE_GRAPH configuration fields for the fixed size header.
--- drivers/net/mlx5/mlx5_flow_flex.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/net/mlx5/mlx5_flow_flex.c +3 -7
@@ -382,15 +382,11 @@ mlx5_flex_translate_length(struct mlx5_hca_flex_attr *attr,return rte_flow_error_set (error,EINVAL ,RTE_FLOW_ERROR_TYPE_ITEM ,NULL ,"unsupported header length field mode (FIXED)" ); -if (attr->header_length_mask_width < field->field_size) -return rte_flow_error_set - (error,EINVAL ,RTE_FLOW_ERROR_TYPE_ITEM ,NULL , -"header length field width exceeds limit" ); -if (field->offset_shift <0 || - field->offset_shift > attr->header_length_mask_width) +if (field->field_size || + field->offset_mask || field->offset_shift)return rte_flow_error_set (error,EINVAL ,RTE_FLOW_ERROR_TYPE_ITEM ,NULL , -"invalid header length field shift (FIXED" ); +"invalid fields for fixed mode" );if (field->field_base <0 )return rte_flow_error_set (error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, NULL,
Signature · 1 line
2.34.1
Hi,
Quoted 15 lines
-----Original Message-----
From: Gregory Etelson <[email protected]>
Sent: Tuesday, March 1, 2022 2:28 PM
To: [email protected]
Cc: Gregory Etelson <[email protected]>; Matan Azrad <[email protected]>; Raslan Darawsheh <[email protected]>; [email protected]; Slava Ovsiienko <[email protected]>
Subject: [PATCH] net/mlx5: fix flex item header length translationFlex item API provides support for network header with a fixed and variable lengths.
When PMD compiles a new flex item object configuration it converts RTE parameters into matching PMDPARSE_GRAPHparameters and checks the parameter values against port capabilities.
Quoted 8 lines
Current implementation mismatched
PARSE_GRAPHconfiguration fields for the fixed size header.Fixes b293e8e49d78 ("net/mlx5: translate flex item configuration")Signed-off-by Gregory Etelson <[email protected]>
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh