svn commit: r361498 - in head/sys/dev/mlx5: . mlx5_core
Hans Petter Selasky
hselasky at FreeBSD.org
Tue May 26 07:41:47 UTC 2020
Author: hselasky
Date: Tue May 26 07:41:46 2020
New Revision: 361498
URL: https://svnweb.freebsd.org/changeset/base/361498
Log:
Sync with Linux packet pacing enhancements in mlx5en(4).
Linux commit:
05d3ac978ed25b753bfe34fe76c50c31ee506a82
MFC after: 1 week
Sponsored by: Mellanox Technologies
Modified:
head/sys/dev/mlx5/mlx5_core/mlx5_rl.c
head/sys/dev/mlx5/mlx5_ifc.h
Modified: head/sys/dev/mlx5/mlx5_core/mlx5_rl.c
==============================================================================
--- head/sys/dev/mlx5/mlx5_core/mlx5_rl.c Tue May 26 06:55:03 2020 (r361497)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_rl.c Tue May 26 07:41:46 2020 (r361498)
@@ -58,16 +58,14 @@ static struct mlx5_rl_entry *find_rl_entry(struct mlx5
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));
}
Modified: head/sys/dev/mlx5/mlx5_ifc.h
==============================================================================
--- head/sys/dev/mlx5/mlx5_ifc.h Tue May 26 06:55:03 2020 (r361497)
+++ head/sys/dev/mlx5/mlx5_ifc.h Tue May 26 07:41:46 2020 (r361498)
@@ -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 {
More information about the svn-src-all
mailing list