net/mlx5e: Fix enabling sriov while tc nic rules are offloaded
authorPaul Blakey <paulb@nvidia.com>
Wed, 22 Jun 2022 10:11:18 +0000 (13:11 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 6 Jul 2022 23:11:55 +0000 (16:11 -0700)
commit0c9d876545a56aebed30fa306d0460a4d28d271a
tree39176ec952c4be4fd0725381d29e2635e52f2d18
parent2ec6cf9b742a5c18982861322fa5de6510f8f57e
net/mlx5e: Fix enabling sriov while tc nic rules are offloaded

There is a total of four 4M entries flow tables. In sriov disabled
mode, ct, ct_nat and post_act take three of them. When adding the
first tc nic rule in this mode, it will take another 4M table
for the tc <chain,prio> table. If user then enables sriov, the legacy
flow table tries to take another 4M and fails, and so enablement fails.

To fix that, have legacy fdb take the next available maximum
size from the fs ft pool.

Fixes: 4a98544d1827 ("net/mlx5: Move chains ft pool to be used by all firmware steering")
Signed-off-by: Paul Blakey <paulb@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/esw/legacy.c