net/mlx5: make meter action thread safe
authorSuanming Mou <suanmingm@nvidia.com>
Wed, 28 Oct 2020 09:33:26 +0000 (17:33 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:35:04 +0000 (23:35 +0100)
commit89a8e3c4f84bc053d916666048f7ff9f8b62edcf
treebefe88373d7c3b99a76ee19f9caf34d0bc006d60
parentd163fc2d15b6ebdb4f36178424e13a4a383b07c0
net/mlx5: make meter action thread safe

This commit adds the spinlock for the meter action to make it be thread
safe. Atomic reference counter in all is not enough as the meter action
should be created synchronized with reference counter increment. With
only atomic reference counter, even the counter is increased, the action
may still not be created.

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_flow.h
drivers/net/mlx5/mlx5_flow_meter.c