* [PATCH] net/mlx5: fix flex item capability check
@ 2026-03-23 10:20 Dariusz Sosnowski
2026-03-24 13:03 ` Raslan Darawsheh
0 siblings, 1 reply; 2+ messages in thread
From: Dariusz Sosnowski @ 2026-03-23 10:20 UTC (permalink / raw)
To: Viacheslav Ovsiienko, Bing Zhao, Ori Kam, Suanming Mou,
Matan Azrad, Gregory Etelson
Cc: dev, stable
Whenever installed BlueField FW was too old and it did not support
flex parser, mlx5 PMD reported an unrelated error
on flex item creation.
For example it reported that:
unsupported header length field mode (FIXED)
This was caused by lack of check for flex parser support.
This patch adds missing capability check and
adds proper error reporting.
Limitations of flex item described in PMD docs are also adjusted.
Fixes: 71adf25dbfb3 ("net/mlx5: fix flex item availability")
Cc: getelson@nvidia.com
Cc: stable@dpdk.org
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
doc/guides/nics/mlx5.rst | 39 +++++++++++++++++++++++++++++++++---
drivers/net/mlx5/mlx5_flow.c | 6 ++++++
2 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 9dcc93cc23..64d3c96332 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -3100,15 +3100,48 @@ See :ref:`mlx5_firmware_config` for more details about the flex parser profile.
Limitations
^^^^^^^^^^^
+#. Minimum FW version ``XX.31.1002``.
+
#. Flex item is supported on PF only.
#. The header length mask width can go up to 6 bits.
-#. The Firmware supports 8 global sample fields.
+#. Following number of global sample fields is available based on FW version.
Each flex item allocates non-shared sample fields from that pool.
-#. The flex item can have 1 input link - ``eth`` or ``udp``
- and up to 3 output links - ``ipv4`` or ``ipv6``.
+ +---------------+------------+
+ | Sample fields | FW version |
+ +===============+============+
+ | 3 | XX.31.1002 |
+ +---------------+------------+
+ | 8 | XX.33.1048 |
+ +---------------+------------+
+
+#. The flex item can have 1 input link and up to 3 output links.
+
+#. Following types of input links are supported:
+
+ +------+------------+
+ | Type | FW version |
+ +======+============+
+ | ETH | XX.31.1002 |
+ +------+------------+
+ | UDP | XX.31.1002 |
+ +------+------------+
+
+#. Following types of output links are supported:
+
+ +------+------------+
+ | Type | FW version |
+ +======+============+
+ | IPV4 | XX.31.1002 |
+ +------+------------+
+ | IPV6 | XX.31.1002 |
+ +------+------------+
+ | TCP | XX.36.1010 |
+ +------+------------+
+ | UDP | XX.36.1010 |
+ +------+------------+
#. In flex item configuration, ``next_header.field_base`` value
must be byte aligned (multiple of 8).
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 7df64d634d..915ea29a5a 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -11904,6 +11904,12 @@ mlx5_flow_flex_item_create(struct rte_eth_dev *dev,
"flex item available on BlueField ports only");
return NULL;
}
+ if (!priv->sh->cdev->config.hca_attr.parse_graph_flex_node) {
+ rte_flow_error_set(error, ENOTSUP,
+ RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
+ "flex item not supported on current FW");
+ return NULL;
+ }
if (!fops->item_create) {
DRV_LOG(ERR, "port %u %s.", dev->data->port_id, err_msg);
rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION,
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net/mlx5: fix flex item capability check
2026-03-23 10:20 [PATCH] net/mlx5: fix flex item capability check Dariusz Sosnowski
@ 2026-03-24 13:03 ` Raslan Darawsheh
0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2026-03-24 13:03 UTC (permalink / raw)
To: Dariusz Sosnowski, Viacheslav Ovsiienko, Bing Zhao, Ori Kam,
Suanming Mou, Matan Azrad, Gregory Etelson
Cc: dev, stable
Hi,
On 23/03/2026 12:20 PM, Dariusz Sosnowski wrote:
> Whenever installed BlueField FW was too old and it did not support
> flex parser, mlx5 PMD reported an unrelated error
> on flex item creation.
> For example it reported that:
>
> unsupported header length field mode (FIXED)
>
> This was caused by lack of check for flex parser support.
>
> This patch adds missing capability check and
> adds proper error reporting.
> Limitations of flex item described in PMD docs are also adjusted.
>
> Fixes: 71adf25dbfb3 ("net/mlx5: fix flex item availability")
> Cc: getelson@nvidia.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Dariusz Sosnowski <dsosnowski@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:[~2026-03-24 13:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-23 10:20 [PATCH] net/mlx5: fix flex item capability check Dariusz Sosnowski
2026-03-24 13:03 ` Raslan Darawsheh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox