38
38
enum mlx5_ib_cong_node_type {
39
39
MLX5_IB_RROCE_ECN_RP = 1 ,
40
40
MLX5_IB_RROCE_ECN_NP = 2 ,
41
+ MLX5_IB_RROCE_GENERAL = 3 ,
41
42
};
42
43
43
44
static const char * const mlx5_ib_dbg_cc_name [] = {
@@ -61,6 +62,8 @@ static const char * const mlx5_ib_dbg_cc_name[] = {
61
62
"np_cnp_dscp" ,
62
63
"np_cnp_prio_mode" ,
63
64
"np_cnp_prio" ,
65
+ "rtt_resp_dscp_valid" ,
66
+ "rtt_resp_dscp" ,
64
67
};
65
68
66
69
#define MLX5_IB_RP_CLAMP_TGT_RATE_ATTR BIT(1)
@@ -84,14 +87,18 @@ static const char * const mlx5_ib_dbg_cc_name[] = {
84
87
#define MLX5_IB_NP_CNP_DSCP_ATTR BIT(3)
85
88
#define MLX5_IB_NP_CNP_PRIO_MODE_ATTR BIT(4)
86
89
90
+ #define MLX5_IB_GENERAL_RTT_RESP_DSCP_ATTR BIT(0)
91
+
87
92
static enum mlx5_ib_cong_node_type
88
93
mlx5_ib_param_to_node (enum mlx5_ib_dbg_cc_types param_offset )
89
94
{
90
- if (param_offset >= MLX5_IB_DBG_CC_RP_CLAMP_TGT_RATE &&
91
- param_offset <= MLX5_IB_DBG_CC_RP_GD )
95
+ if (param_offset <= MLX5_IB_DBG_CC_RP_GD )
92
96
return MLX5_IB_RROCE_ECN_RP ;
93
- else
97
+
98
+ if (param_offset <= MLX5_IB_DBG_CC_NP_CNP_PRIO )
94
99
return MLX5_IB_RROCE_ECN_NP ;
100
+
101
+ return MLX5_IB_RROCE_GENERAL ;
95
102
}
96
103
97
104
static u32 mlx5_get_cc_param_val (void * field , int offset )
@@ -157,6 +164,12 @@ static u32 mlx5_get_cc_param_val(void *field, int offset)
157
164
case MLX5_IB_DBG_CC_NP_CNP_PRIO :
158
165
return MLX5_GET (cong_control_r_roce_ecn_np , field ,
159
166
cnp_802p_prio );
167
+ case MLX5_IB_DBG_CC_GENERAL_RTT_RESP_DSCP_VALID :
168
+ return MLX5_GET (cong_control_r_roce_general , field ,
169
+ rtt_resp_dscp_valid );
170
+ case MLX5_IB_DBG_CC_GENERAL_RTT_RESP_DSCP :
171
+ return MLX5_GET (cong_control_r_roce_general , field ,
172
+ rtt_resp_dscp );
160
173
default :
161
174
return 0 ;
162
175
}
@@ -264,6 +277,15 @@ static void mlx5_ib_set_cc_param_mask_val(void *field, int offset,
264
277
MLX5_SET (cong_control_r_roce_ecn_np , field , cnp_prio_mode , 0 );
265
278
MLX5_SET (cong_control_r_roce_ecn_np , field , cnp_802p_prio , var );
266
279
break ;
280
+ case MLX5_IB_DBG_CC_GENERAL_RTT_RESP_DSCP_VALID :
281
+ * attr_mask |= MLX5_IB_GENERAL_RTT_RESP_DSCP_ATTR ;
282
+ MLX5_SET (cong_control_r_roce_general , field , rtt_resp_dscp_valid , var );
283
+ break ;
284
+ case MLX5_IB_DBG_CC_GENERAL_RTT_RESP_DSCP :
285
+ * attr_mask |= MLX5_IB_GENERAL_RTT_RESP_DSCP_ATTR ;
286
+ MLX5_SET (cong_control_r_roce_general , field , rtt_resp_dscp_valid , 1 );
287
+ MLX5_SET (cong_control_r_roce_general , field , rtt_resp_dscp , var );
288
+ break ;
267
289
}
268
290
}
269
291
0 commit comments