Sync with Linux packet pacing enhancements in mlx5en(4).

Linux commit:
05d3ac978ed25b753bfe34fe76c50c31ee506a82

MFC after:	1 week
Sponsored by:	Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2020-05-26 07:41:46 +00:00
parent c4e61d8568
commit bf43f9812c
2 changed files with 13 additions and 8 deletions

View File

@ -58,16 +58,14 @@ static struct mlx5_rl_entry *find_rl_entry(struct mlx5_rl_table *table,
static int mlx5_set_rate_limit_cmd(struct mlx5_core_dev *dev,
u32 rate, u32 burst, u16 index)
{
u32 in[MLX5_ST_SZ_DW(set_rate_limit_in)] = {0};
u32 out[MLX5_ST_SZ_DW(set_rate_limit_out)] = {0};
u32 in[MLX5_ST_SZ_DW(set_rate_limit_in)] = {};
u32 out[MLX5_ST_SZ_DW(set_rate_limit_out)] = {};
MLX5_SET(set_rate_limit_in, in, opcode,
MLX5_CMD_OP_SET_RATE_LIMIT);
MLX5_SET(set_rate_limit_in, in, opcode, MLX5_CMD_OP_SET_RATE_LIMIT);
MLX5_SET(set_rate_limit_in, in, rate_limit_index, index);
MLX5_SET(set_rate_limit_in, in, rate_limit, rate);
if (MLX5_CAP_QOS(dev, packet_pacing_burst_bound))
MLX5_SET(set_rate_limit_in, in, burst_upper_bound, burst);
MLX5_SET(set_rate_limit_in, in, burst_upper_bound, burst);
MLX5_SET(set_rate_limit_in, in, typical_packet_size, 0 /* use MTU */);
return mlx5_cmd_exec(dev, in, sizeof(in), out, sizeof(out));
}

View File

@ -690,7 +690,8 @@ struct mlx5_ifc_qos_cap_bits {
u8 esw_rate_limit[0x1];
u8 hll[0x1];
u8 packet_pacing_burst_bound[0x1];
u8 reserved_at_6[0x1a];
u8 packet_pacing_typical_size[0x1];
u8 reserved_at_7[0x19];
u8 reserved_at_20[0x20];
@ -7790,7 +7791,13 @@ struct mlx5_ifc_set_rate_limit_in_bits {
u8 reserved_at_60[0x20];
u8 rate_limit[0x20];
u8 burst_upper_bound[0x20];
u8 reserved_at_c0[0x10];
u8 typical_packet_size[0x10];
u8 reserved_at_e0[0x120];
};
struct mlx5_ifc_access_register_out_bits {