]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Jul 2022 19:24:17 +0000 (21:24 +0200)
commit8d600cccfd0bae78e7ef1f55eec6c3eb4c06a03c
tree27bd3c26134cba9ee7ad5b53661456145dbeda85
parent85a41e0ee01f02690a209dc1711d58356180cd57
net/mlx5e: Fix enabling sriov while tc nic rules are offloaded

[ Upstream commit cf6577ba3440e9281b2b3dfde2800f5d0298ef6d ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/esw/legacy.c