]> git.ipfire.org Git - thirdparty/linux.git/commit
net/mlx5e: Use shared table for offloaded TC eswitch flows
authorOr Gerlitz <ogerlitz@mellanox.com>
Tue, 10 Apr 2018 15:34:36 +0000 (18:34 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 18 May 2018 00:48:54 +0000 (17:48 -0700)
commit655dc3d2b91bf241f5baca5eb2bc2b1e22a561ff
tree79e9aaf7baa7d3ff9e93ced8cc77a7be3eb81b3c
parent05866c82360aef6005de1920d585ae604309e732
net/mlx5e: Use shared table for offloaded TC eswitch flows

Currently, each representor netdev use their own hash table to keep
the mapping from TC flow (f->cookie) to the driver offloaded instance.
The table is the one which originally was added for offloading TC NIC
(not eswitch) rules.

This scheme breaks when the core TC code calls us to add the same flow
twice, (e.g under egdev use case) since we don't spot that and offload
a 2nd flow into the HW with the wrong source vport.

As a pre-step to solve that, we move to use a single table which keeps
all offloaded TC eswitch flows. The table is located at the eswitch
uplink representor object.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Paul Blakey <paulb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.h
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
drivers/net/ethernet/mellanox/mlx5/core/en_tc.h