net/mlx5e: Enable adding peer miss rules only if merged eswitch is supported
commit5b609d8e5bebfb6238e6724e2c35463d06537fcd
authorMaor Dickman <maord@mellanox.com>
Wed, 5 Aug 2020 14:56:04 +0000 (5 17:56 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Sep 2020 16:03:14 +0000 (26 18:03 +0200)
tree775ce0693bc862a194848831461e25e2e8a4e1d0
parent825fc3167cf5c82685fb640d03d1c5028a1cea03
net/mlx5e: Enable adding peer miss rules only if merged eswitch is supported

[ Upstream commit 6cec0229ab1959259e71e9a5bbe47c04577950b1 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c