net/mlx5e: Only access fully initialized flows in neigh update
authorVlad Buslov <vladbu@mellanox.com>
Sun, 4 Aug 2019 10:52:31 +0000 (13:52 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Wed, 21 Aug 2019 22:55:17 +0000 (15:55 -0700)
commit95435ad7999b1218367f0667ed5fe98d042ffe78
tree4bc4059e30b405a32cf67b931fd56b1f71c42033
parent2a1f1768fa17805ca2e937e2e034a7c3433d3bdc
net/mlx5e: Only access fully initialized flows in neigh update

To remove dependency on rtnl lock and prevent neigh update code from
accessing uninitialized flows when executing concurrently with tc, extend
mlx5e_tc_flow with 'init_done' completion. Modify helper
mlx5e_take_all_encap_flows() to wait for flow completion after obtaining
reference to it. Modify mlx5e_tc_encap_flows_del() and
mlx5e_tc_encap_flows_add() to skip flows that don't have OFFLOADED flag
set, which can happen if concurrent flow initialization failed.

This commit finishes neigh update refactoring for concurrent execution
started in previous change in this series.

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