net/mlx5: block negative integrity flows
PATCH 1/1 net/mlx5: block negative integrity flows
Negative integrity flows are supported, but malfunctioning due to a bug, and an API change is necessary to fix.
Drop negative flow support for now.
Signed-off-by Raja Zidane <[email protected]>
Acked-by Matan Azrad <[email protected]>
Acked-by Gregory Etelson <[email protected]>
--- doc/guides/nics/mlx5.rst | 4 +++- drivers/net/mlx5/mlx5_flow_dv.c | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-)
doc/guides/nics/mlx5.rst +3 -1
@@ -467,7 +467,9 @@ Limitations TCP or UDP, must be in the rule pattern as well:: flow create 0 ingress pattern integrity level is 0 value mask l3_ok value spec l3_ok / eth / ipv6 / end … - or + + Negative integrity flows are not supported. i.e. + flow create 0 ingress pattern integrity level is 0 value mask l4_ok value spec 0 / eth / ipv4 proto is udp / end … - Connection tracking:
drivers/net/mlx5/mlx5_flow_dv.c +6 -0
@@ -6809,6 +6809,12 @@ flow_dv_validate_item_integrity(struct rte_eth_dev *dev,RTE_FLOW_ERROR_TYPE_ITEM , integrity_item, "unsupported integrity filter"); +if ((mask->l3_ok & !spec->l3_ok) || (mask->l4_ok & !spec->l4_ok) || + (mask->ipv4_csum_ok & !spec->ipv4_csum_ok) || + (mask->l4_csum_ok & !spec->l4_csum_ok)) +return rte_flow_error_set (error,EINVAL , +RTE_FLOW_ERROR_TYPE_ITEM , +NULL ,"negative integrity flow is not supported" );if (spec->level >1 ) {if (pattern_flags &MLX5_FLOW_ITEM_INNER_INTEGRITY )return rte_flow_error_set
Signature · 1 line
2.21.0