]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Allow concurrent creation of encap entries
authorVlad Buslov <vladbu@mellanox.com>
Thu, 8 Aug 2019 14:01:33 +0000 (17:01 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 9 Aug 2019 21:54:10 +0000 (14:54 -0700)
commit6c1de62f49a0b7a4ac068d957bb15a3aafefc2e5
tree7f2324fc85658f4d9591142d09645bb51afeb311
parent3b5494b5d81a546a96722b02224dee12182dc62e
net/mlx5e: Allow concurrent creation of encap entries

Encap entries creation is fully synchronized by encap_tbl_lock. In order to
allow concurrent allocation of hardware resources used to offload
encapsulation, extend mlx5e_encap_entry with 'res_ready' completion. Move
call to mlx5e_tc_tun_create_header_ipv{4|6}() out of encap_tbl_lock
critical section. Modify code that attaches new flows to existing encap to
wait for 'res_ready' completion before using the entry. Insert encap entry
to table before provisioning it to hardware and modify all users of the
encap table to verify that encap was fully initialized by checking
completion result for non-zero value (and to wait for 'res_ready'
completion, if necessary).

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_rep.h
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c