]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Infrastructure for duplicated offloading of TC flows
authorRoi Dayan <roid@mellanox.com>
Sun, 11 Nov 2018 20:24:03 +0000 (22:24 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 14 Dec 2018 21:28:52 +0000 (13:28 -0800)
commitfd19bdcf7c735304c036d3065c6f8d2ee00d3af3
treee2b570b78343020d2d6630e4912d6bbea9b3117c
parent3bc866e730c4ef9576b89765c96c47598ed4c77a
net/mlx5e: Infrastructure for duplicated offloading of TC flows

Under uplink LAG or multipath schemes, traffic that matches one flow
might arrive on both uplink ports and transmitted through both
as part of supporting aggregation and high-availability.

To cope with the fact that the SW model might use logical SW port
(e.g uplink team or bond) but we have two HW ports with e-switch on
each, there are cases where in order to offload a SW TC rule we
need to duplicate it to two HW flows.

Since each HW rule has its own counter we also aggregate the counter
of both rules when a flow stats query is executed from user-space.

Introduce the changes for the different elements (add/delete/stats),
currently nothing is duplicated.

Signed-off-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Aviv Heller <avivh@mellanox.com>
Signed-off-by: Shahar Klein <shahark@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c