diff options
author | Gal Pressman <galp@mellanox.com> | 2018-01-23 12:28:12 +0200 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2018-05-14 15:10:21 -0700 |
commit | bfbe2057531026ac20bba9f45d3a21a98f3c592a (patch) | |
tree | f39a9fa313d1d07bfd659525bbae031753b27638 /drivers/net | |
parent | af5a6c93656eec9a44617c77fae62af54d5a5061 (diff) |
net/mlx5e: Use test bit in en accel xmit flow
Replace (mask & bit) check with test_bit.
Signed-off-by: Gal Pressman <galp@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h index 68fcb40a2847..f20074dbef32 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h @@ -49,7 +49,7 @@ static inline struct sk_buff *mlx5e_accel_handle_tx(struct sk_buff *skb, u16 *pi) { #ifdef CONFIG_MLX5_EN_TLS - if (sq->state & BIT(MLX5E_SQ_STATE_TLS)) { + if (test_bit(MLX5E_SQ_STATE_TLS, &sq->state)) { skb = mlx5e_tls_handle_tx_skb(dev, sq, skb, wqe, pi); if (unlikely(!skb)) return NULL; @@ -57,7 +57,7 @@ static inline struct sk_buff *mlx5e_accel_handle_tx(struct sk_buff *skb, #endif #ifdef CONFIG_MLX5_EN_IPSEC - if (sq->state & BIT(MLX5E_SQ_STATE_IPSEC)) { + if (test_bit(MLX5E_SQ_STATE_IPSEC, &sq->state)) { skb = mlx5e_ipsec_handle_tx_skb(dev, *wqe, skb); if (unlikely(!skb)) return NULL; |