diff options
author | Vlad Buslov <vladbu@mellanox.com> | 2019-08-08 17:01:33 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2019-08-09 14:54:10 -0700 |
commit | d589e785baf5e48ee80a4fbfed96661a4c7c8c8d (patch) | |
tree | 7f2324fc85658f4d9591142d09645bb51afeb311 /drivers/net/ethernet/mellanox/mlx5/core/en_rep.h | |
parent | net/mlx5e: Protect encap hash table with mutex (diff) | |
download | linux-dev-d589e785baf5e48ee80a4fbfed96661a4c7c8c8d.tar.xz linux-dev-d589e785baf5e48ee80a4fbfed96661a4c7c8c8d.zip |
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>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_rep.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_rep.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h index 2e970d0729be..8ac96727cad8 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h @@ -165,6 +165,8 @@ struct mlx5e_encap_entry { char *encap_header; int encap_size; refcount_t refcnt; + struct completion res_ready; + int compl_result; }; struct mlx5e_rep_sq { |