]> git.itanic.dy.fi Git - linux-stable/commit
net/mlx5: DR, Don't allow match on IP w/o matching on full ethertype/ip_version
authorYevgeny Kliteynik <kliteyn@nvidia.com>
Thu, 13 Jan 2022 12:52:48 +0000 (14:52 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 24 Feb 2022 00:08:10 +0000 (16:08 -0800)
commitffb0753b954763d94f52c901adfe58ed0d4005e6
treea21e1f7808a738e5319f6fbee1880da9e533e52d
parent0aec12d97b2036af0946e3d582144739860ac07b
net/mlx5: DR, Don't allow match on IP w/o matching on full ethertype/ip_version

Currently SMFS allows adding rule with matching on src/dst IP w/o matching
on full ethertype or ip_version, which is not supported by HW.
This patch fixes this issue and adds the check as it is done in DMFS.

Fixes: 26d688e33f88 ("net/mlx5: DR, Add Steering entry (STE) utilities")
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: Alex Vesker <valex@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.c
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h