* [PATCH] net/mlx5: fix flex item header length translation
@ 2022-03-01 12:28 Gregory Etelson
2022-03-02 16:34 ` Raslan Darawsheh
0 siblings, 1 reply; 2+ messages in thread
From: Gregory Etelson @ 2022-03-01 12:28 UTC (permalink / raw)
To: dev; +Cc: getelson, matan, rasland, stable, Viacheslav Ovsiienko
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.
Cc: stable@dpdk.org
Fixes: b293e8e49d78 ("net/mlx5: translate flex item configuration")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_flex.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_flex.c b/drivers/net/mlx5/mlx5_flow_flex.c
index 26f0dfa36f..fb08910ddb 100644
--- a/drivers/net/mlx5/mlx5_flow_flex.c
+++ b/drivers/net/mlx5/mlx5_flow_flex.c
@@ -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,
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [PATCH] net/mlx5: fix flex item header length translation
2022-03-01 12:28 [PATCH] net/mlx5: fix flex item header length translation Gregory Etelson
@ 2022-03-02 16:34 ` Raslan Darawsheh
0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2022-03-02 16:34 UTC (permalink / raw)
To: Gregory Etelson, dev; +Cc: Matan Azrad, stable, Slava Ovsiienko
Hi,
> -----Original Message-----
> From: Gregory Etelson <getelson@nvidia.com>
> Sent: Tuesday, March 1, 2022 2:28 PM
> To: dev@dpdk.org
> Cc: Gregory Etelson <getelson@nvidia.com>; Matan Azrad
> <matan@nvidia.com>; Raslan Darawsheh <rasland@nvidia.com>;
> stable@dpdk.org; Slava Ovsiienko <viacheslavo@nvidia.com>
> Subject: [PATCH] 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.
>
> Cc: stable@dpdk.org
>
> Fixes: b293e8e49d78 ("net/mlx5: translate flex item configuration")
> Signed-off-by: Gregory Etelson <getelson@nvidia.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-02 16:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-01 12:28 [PATCH] net/mlx5: fix flex item header length translation Gregory Etelson
2022-03-02 16:34 ` Raslan Darawsheh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).