Skip to content

Commit 83b502a

Browse files
alexveskerrleon
authored andcommitted
net/mlx5: Modify RQ bitmask from mlx5 ifc
Use mlx5 ifc MODIFY_BITMASK_VSD in mlx5e_modify_rq_vsd and expose counter set capability bit in hca caps structure. Signed-off-by: Alex Vesker <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
1 parent 575ddf5 commit 83b502a

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,8 @@ static int mlx5e_modify_rq_vsd(struct mlx5e_rq *rq, bool vsd)
489489
rqc = MLX5_ADDR_OF(modify_rq_in, in, ctx);
490490

491491
MLX5_SET(modify_rq_in, in, rq_state, MLX5_RQC_STATE_RDY);
492-
MLX5_SET64(modify_rq_in, in, modify_bitmask, MLX5_RQ_BITMASK_VSD);
492+
MLX5_SET64(modify_rq_in, in, modify_bitmask,
493+
MLX5_MODIFY_RQ_IN_MODIFY_BITMASK_VSD);
493494
MLX5_SET(rqc, rqc, vsd, vsd);
494495
MLX5_SET(rqc, rqc, state, MLX5_RQC_STATE_RDY);
495496

include/linux/mlx5/driver.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@
4848
#include <linux/mlx5/doorbell.h>
4949
#include <linux/mlx5/srq.h>
5050

51-
enum {
52-
MLX5_RQ_BITMASK_VSD = 1 << 1,
53-
};
54-
5551
enum {
5652
MLX5_BOARD_ID_LEN = 64,
5753
MLX5_MAX_NAME_LEN = 16,

include/linux/mlx5/mlx5_ifc.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,9 @@ struct mlx5_ifc_cmd_hca_cap_bits {
779779
u8 out_of_seq_cnt[0x1];
780780
u8 vport_counters[0x1];
781781
u8 retransmission_q_counters[0x1];
782-
u8 reserved_at_183[0x3];
782+
u8 reserved_at_183[0x1];
783+
u8 modify_rq_counter_set_id[0x1];
784+
u8 reserved_at_185[0x1];
783785
u8 max_qp_cnt[0xa];
784786
u8 pkey_table_size[0x10];
785787

@@ -4750,6 +4752,11 @@ struct mlx5_ifc_modify_rq_out_bits {
47504752
u8 reserved_at_40[0x40];
47514753
};
47524754

4755+
enum {
4756+
MLX5_MODIFY_RQ_IN_MODIFY_BITMASK_VSD = 1ULL << 1,
4757+
MLX5_MODIFY_RQ_IN_MODIFY_BITMASK_MODIFY_RQ_COUNTER_SET_ID = 1ULL << 3,
4758+
};
4759+
47534760
struct mlx5_ifc_modify_rq_in_bits {
47544761
u8 opcode[0x10];
47554762
u8 reserved_at_10[0x10];

0 commit comments

Comments
 (0)