diff options
author | Tariq Toukan <tariqt@mellanox.com> | 2018-12-04 18:03:01 -0800 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2018-12-09 18:16:16 -0800 |
commit | 6254adeb1f6943a66cbed892a5f683400b9db194 (patch) | |
tree | 39258dbbb716e31c52223c97d104f8d04929a243 /include/linux/mlx5 | |
parent | fe206c209314f3cebe232518db9b5ad2606e34f1 (diff) | |
download | talos-op-linux-6254adeb1f6943a66cbed892a5f683400b9db194.tar.gz talos-op-linux-6254adeb1f6943a66cbed892a5f683400b9db194.zip |
net/mlx5: Use helper to get CQE opcode
Introduce and use a helper that extracts the opcode
from a CQE (completion queue entry) structure.
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'include/linux/mlx5')
-rw-r--r-- | include/linux/mlx5/device.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h index f7c8bebfe472..c66867c8fc2f 100644 --- a/include/linux/mlx5/device.h +++ b/include/linux/mlx5/device.h @@ -781,6 +781,11 @@ static inline u8 mlx5_get_cqe_format(struct mlx5_cqe64 *cqe) return (cqe->op_own >> 2) & 0x3; } +static inline u8 get_cqe_opcode(struct mlx5_cqe64 *cqe) +{ + return cqe->op_own >> 4; +} + static inline u8 get_cqe_lro_tcppsh(struct mlx5_cqe64 *cqe) { return (cqe->lro_tcppsh_abort_dupack >> 6) & 1; |