net/mlx5e: E-Switch, Add a check that log_max_l2_table is valid
authorRoi Dayan <roid@nvidia.com>
Thu, 20 Apr 2023 09:19:25 +0000 (12:19 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 19 May 2023 17:50:30 +0000 (10:50 -0700)
commit3d7c5f78b8cef1376de95443632212f9042d7e78
tree800fd4bb7fd9b9a9d7ff2a712c64de02c814338a
parent292243d13b1821434599fef7b4ea62110ea771c1
net/mlx5e: E-Switch, Add a check that log_max_l2_table is valid

If log_max_l2_table is 0 there is no really room for one L2 address.
and should be treated as not supported.
Do the check in MPFS init and for vport context events which
both used to update L2 address.

Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Maor Dickman <maord@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/lib/mpfs.c