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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Sep 2020 16:05:25 +0000 (18:05 +0200)
commit46ef5581c432a0ba4c69e1ee593174509a9fdec1
tree994ce0d0b88014f64ffcae71acf5f5fa2abe3ee4
parent41f2b0bd171359a62f638d92d7064bbc41a00658
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