net/mlx5: fix flex item capability check
PATCH 1/1 net/mlx5: fix flex item capability check
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.
--- doc/guides/nics/mlx5.rst | 39 +++++++++++++++++++++++++++++++++--- drivers/net/mlx5/mlx5_flow.c | 6 ++++++ 2 files changed, 42 insertions(+), 3 deletions(-)
doc/guides/nics/mlx5.rst +36 -3
@@ -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).
drivers/net/mlx5/mlx5_flow.c +6 -0
@@ -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,
Signature · 1 line
2.47.3
Hi,
Quoted 13 lines · Dariusz Sosnowski
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.
Quoted 6 lines
Signed-off-by Dariusz Sosnowski <[email protected]>
Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh