net/mlx5e: Enable adding peer miss rules only if merged eswitch is supported
authorMaor Dickman <maord@mellanox.com>
Wed, 5 Aug 2020 14:56:04 +0000 (17:56 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 22 Sep 2020 00:22:22 +0000 (17:22 -0700)
commit6cec0229ab1959259e71e9a5bbe47c04577950b1
tree24004a4bf20197965a1cb661b42ab084ecadaf6f
parent4c8594adb9d9250120cffc57a7175a1a09f2b084
net/mlx5e: Enable adding peer miss rules only if merged eswitch is supported

The cited commit creates peer miss group during switchdev mode
initialization in order to handle miss packets correctly while in VF
LAG mode. This is done regardless of FW support of such groups which
could cause rules setups failure later on.

Fix by adding FW capability check before creating peer groups/rule.

Fixes: ac004b832128 ("net/mlx5e: E-Switch, Add peer miss rules")
Signed-off-by: Maor Dickman <maord@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Raed Salem <raeds@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c