net/mlx5e: Refactor neigh used value update for concurrent execution
authorVlad Buslov <vladbu@mellanox.com>
Sat, 3 Aug 2019 18:43:06 +0000 (21:43 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Wed, 21 Aug 2019 22:55:17 +0000 (15:55 -0700)
commit6a06c2f7843d85b43ccea6e89de8e432834c089b
tree8e1525686cffc7f57e215acf9b4542277228c862
parentac0d917632cf7fbbe953f2ec82c2c979ab1b4a06
net/mlx5e: Refactor neigh used value update for concurrent execution

In order to remove dependency on rtnl lock and allow neigh used value
update workqueue task to execute concurrently with tc, refactor
mlx5e_tc_update_neigh_used_value() for concurrent execution:

- Lock encap table when accessing encap entry to prevent concurrent
  changes.

- Save offloaded encap flows to temporary list and release them after encap
  entry is updated. Add mlx5e_put_encap_flow_list() helper which is
  intended to be shared with neigh update code in following patch in this
  series. This is necessary because mlx5e_flow_put() can't be called while
  holding encap_tbl_lock.

Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c