net/mlx5: E-switch, Change flow rule destination checking
authorJianbo Liu <jianbol@nvidia.com>
Thu, 11 Jan 2024 01:27:47 +0000 (01:27 +0000)
committerSaeed Mahameed <saeedm@nvidia.com>
Sat, 2 Mar 2024 07:02:26 +0000 (23:02 -0800)
commit85ea2c5c5ef5f24fe6e6e7028ddd90be1cb5d27e
tree245144977cc5997529e26cc8d586c50ee4173b5e
parentb7bbd698c90591546d22093181e266785f08c18b
net/mlx5: E-switch, Change flow rule destination checking

The checking in the cited commit is not accurate. In the common case,
VF destination is internal, and uplink destination is external.
However, uplink destination with packet reformat is considered as
internal because firmware uses LB+hairpin to support it. Update the
checking so header rewrite rules with both internal and external
destinations are not allowed.

Fixes: e0e22d59b47a ("net/mlx5: E-switch, Add checking for flow rule destinations")
Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c