]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Accumulate levels for chains prio namespaces
authorPaul Blakey <paulb@mellanox.com>
Mon, 11 Nov 2019 23:34:27 +0000 (00:34 +0100)
committerSaeed Mahameed <saeedm@mellanox.com>
Wed, 13 Nov 2019 21:49:32 +0000 (13:49 -0800)
commit2f9353e1a712cf26e87c236fa891f871683ef355
treee0abe2def929c25cfe6cb2c8cd122b679a8d85d0
parentf651bce5770a909f0d1e8355cdd41ec88d9b598e
net/mlx5: Accumulate levels for chains prio namespaces

Tc chains are implemented by creating a chained prio steering type, and
inside it there is a namespace for each chain (FDB_TC_MAX_CHAINS). Each
of those has a list of priorities.

Currently, all namespaces in a prio start at the parent prio level.
But since we can jump from chain (namespace) to another chain in the
same prio, we need the levels for higher chains to be higher as well.
So we created unused prios to account for levels in previous namespaces.

Fix that by accumulating the namespaces levels if we are inside a chained
type prio, and removing the unused prios.

Fixes: fc6043b9c888 ('net/mlx5: Split FDB fast path prio to multiple namespaces')
Signed-off-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c