diff options
author | Tariq Toukan <tariqt@mellanox.com> | 2019-12-16 15:05:07 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2020-05-09 11:05:42 +0300 |
commit | 28bff09518e9ef942173e41e7521b93ea7be0cf0 (patch) | |
tree | ba1567c5ae99fddcb7eff8972eefd10d4c0dc67b /drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h | |
parent | 6b74f60ef5a97ec3988a41e4bb745660029209a2 (diff) | |
download | linux-28bff09518e9ef942173e41e7521b93ea7be0cf0.tar.xz |
net/mlx5e: Enhance ICOSQ WQE info fields
The same WQE opcode might be used in different ICOSQ flows
and WQE types.
To have a better distinguishability, replace it with an enum that
better indicates the WQE type and flow it is used for.
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Reviewed-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h b/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h index 9e150d160cde..dce2bbbf9109 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h @@ -27,6 +27,11 @@ #define INL_HDR_START_SZ (sizeof(((struct mlx5_wqe_eth_seg *)NULL)->inline_hdr.start)) +enum mlx5e_icosq_wqe_type { + MLX5E_ICOSQ_WQE_NOP, + MLX5E_ICOSQ_WQE_UMR_RX, +}; + static inline bool mlx5e_wqc_has_room_for(struct mlx5_wq_cyc *wq, u16 cc, u16 pc, u16 n) { @@ -120,10 +125,10 @@ static inline u16 mlx5e_txqsq_get_next_pi(struct mlx5e_txqsq *sq, u16 size) } struct mlx5e_icosq_wqe_info { - u8 opcode; + u8 wqe_type; u8 num_wqebbs; - /* Auxiliary data for different opcodes. */ + /* Auxiliary data for different wqe types. */ union { struct { struct mlx5e_rq *rq; @@ -147,7 +152,7 @@ static inline u16 mlx5e_icosq_get_next_pi(struct mlx5e_icosq *sq, u16 size) /* Fill SQ frag edge with NOPs to avoid WQE wrapping two pages. */ for (; wi < edge_wi; wi++) { *wi = (struct mlx5e_icosq_wqe_info) { - .opcode = MLX5_OPCODE_NOP, + .wqe_type = MLX5E_ICOSQ_WQE_NOP, .num_wqebbs = 1, }; mlx5e_post_nop(wq, sq->sqn, &sq->pc); |