]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Support tc block sharing for representors
authorVu Pham <vuhuong@mellanox.com>
Fri, 2 Aug 2019 23:13:10 +0000 (16:13 -0700)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 28 May 2020 01:13:48 +0000 (18:13 -0700)
commit168a1e7138850e49d3823cf63c371f1396693a76
tree1d5e8f42f30cfb7627f8df8f9f98e7639e9ec2ab
parentcd799ce99d849558dc3fba482a1fc35c981b451e
net/mlx5e: Support tc block sharing for representors

Currently offloading a rule over a tc block shared by multiple
representors fails because an e-switch global hashtable to keep
the mapping from tc cookies to mlx5e flow instances is used, and
tc block sharing offloads the same rule/cookie multiple times,
each time for different representor sharing the tc block.

Changing the implementation and behavior by acknowledging and returning
success if the same rule/cookie is offloaded again to other slave
representor sharing the tc block by setting, checking and comparing
the netdev that added the rule first.

Signed-off-by: Vu Pham <vuhuong@mellanox.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c