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>
This commit is contained in:

committed by
Saeed Mahameed

parent
fe206c2093
commit
6254adeb1f
@@ -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;
|
||||
|
Reference in New Issue
Block a user