]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitcf6577ba3440e9281b2b3dfde2800f5d0298ef6d
tree39176ec952c4be4fd0725381d29e2635e52f2d18
parent9b3f6e7429c7f1fe4108f3aab7ce42860f1c0ce5
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: d11f514c8884 ("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