History

IB/mlx5: Report mlx5 packet pacing capabilities when querying device

Enable mlx5 based hardware to report packet pacing capabilities from kernel to user space. Packet pacing allows to limit the rate to any number between the maximum and minimum, based on user settings. The capabilities are exposed to user space through query_device by uhw. The following capabilities are reported: 1. The maximum and minimum rate limit in kbps supported by packet pacing. 2. Bitmap showing which QP types are supported by packet pacing operation.

Bodong Wang committed 9 years ago

Commit d9491671 parent ca5b91d2 files · +26 −0Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/rdma/mlx5-abi.h+13−0
@@ -136,12 +136,25 @@ struct mlx5_ib_cqe_comp_caps { · 135 unmodified lines
136136 __u32 supported_format; /* enum mlx5_ib_cqe_comp_res_format */
137137 };
138138
139+struct mlx5_packet_pacing_caps {
140+ __u32 qp_rate_limit_min;
141+ __u32 qp_rate_limit_max; /* In kpbs */
142+
143+ /* Corresponding bit will be set if qp type from
144+ * 'enum ib_qp_type' is supported, e.g.
145+ * supported_qpts |= 1 << IB_QPT_RAW_PACKET
146+ */
147+ __u32 supported_qpts;
148+ __u32 reserved;
149+};
150+
139151 struct mlx5_ib_query_device_resp {
140152 __u32 comp_mask;
141153 __u32 response_length;
142154 struct mlx5_ib_tso_caps tso_caps;
143155 struct mlx5_ib_rss_caps rss_caps;
144156 struct mlx5_ib_cqe_comp_caps cqe_comp_caps;
157+ struct mlx5_packet_pacing_caps packet_pacing_caps;
145158 __u32 mlx5_ib_support_multi_pkt_send_wqes;
146159 __u32 reserved;
147160 };