]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite2dfb379fc7733da274718a67049e095d1a573e1
tree4bc4059e30b405a32cf67b931fd56b1f71c42033
parent8f69dfc1fd8f90783cd4269554e0f55600ee994b
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