]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: DR, Split RX and TX lock for parallel insertion
authorAlex Vesker <valex@mellanox.com>
Wed, 20 May 2020 15:09:35 +0000 (18:09 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 28 May 2020 01:13:52 +0000 (18:13 -0700)
commit5fe89c043719c250dfbce744ef84e04b1841eaa8
treee8442c25322efc81bf1e3ae6d3e641c9cff7c575
parente51cc426dc4061a3c1600bd52815596f86db009f
net/mlx5: DR, Split RX and TX lock for parallel insertion

Change the locking flow to support RX and TX locks, splitting
the single lock to two will allow inserting rules in parallel
for RX and TX parts of the FDB.

Locking the dr_domain will be done by locking the RX domain
and the TX domain locks, this is mostly used for control operations
on the dr_domain. When inserting rules for RX or TX the single
nic_doamin RX or TX lock will be used. Splitting the lock is safe since
RX and TX domains are logically separated from each other, shared
objects such the send-ring and memory pool are protected by locks.

Signed-off-by: Alex Vesker <valex@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Reviewed-by: Erez Shitrit <erezsh@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_domain.c
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_table.c
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h