diff options
author | Tariq Toukan <tariqt@mellanox.com> | 2017-07-03 11:27:20 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2017-09-03 06:34:09 +0300 |
commit | a1eaba4c5c29b6b5196b2237ce3a8d7d97622b2f (patch) | |
tree | a6e347763a08022c593359c579ad9049da4b22b9 /drivers/net/ethernet/mellanox/mlx5/core/en.h | |
parent | 604acb193b8383a3774673c324e576e4c6b4ffcd (diff) |
net/mlx5e: Non-atomic indicator for ring enabled state
Rings enabled state change occurs in control path only, and is always
followed by a napi_sychronize(), so that following NAPIs read the
new value. This read does not need to be atomic.
The RQ auto-moderation bit is not set/cleared in data-path.
No need for atomic read, a regular read operation is sufficient.
In RQ creation time as well, there's no multiple threads trying
to access it yet, hence a regular read can be used.
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h index ce8b4f648757..0c4f1f30085a 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h @@ -295,6 +295,8 @@ enum { MLX5E_RQ_STATE_AM, }; +#define MLX5E_TEST_BIT(state, nr) (state & BIT(nr)) + struct mlx5e_cq { /* data path - accessed per cqe */ struct mlx5_cqwq wq; |