History

IB/uverbs: Extend modify_qp and support packet pacing

An new uverbs command ib_uverbs_ex_modify_qp is added to support more QP attributes. User driver should choose to call the legacy/extended API based on input mask. IB_USER_LAST_QP_ATTR_MASK is added to indicated the maximum bit position which supports legacy ib_uverbs_modify_qp. IB_USER_LEGACY_LAST_QP_ATTR_MASK indicates the maximum bit position which supports ib_uverbs_ex_modify_qp, the value of this mask should be updated if new mask is added later. Along with this change, rate_limit is supported by the extended command, user driver could use it to control packet packing.

Bodong Wang committed 9 years ago

Commit 189aba91 parent 528e5a14 files · +146 −69Browse files

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

Unified · Split

include/uapi/rdma/ib_user_verbs.h+21−0
@@ -37,6 +37,7 @@ · 36 unmodified lines
3737 #define IB_USER_VERBS_H
3838
3939 #include <linux/types.h>
40+#include <rdma/ib_verbs.h>
4041
4142 /*
4243 * Increment this value if any changes that break userspace ABI
@@ -93,6 +94,7 @@ enum { · 50 unmodified lines
9394 IB_USER_VERBS_EX_CMD_QUERY_DEVICE = IB_USER_VERBS_CMD_QUERY_DEVICE,
9495 IB_USER_VERBS_EX_CMD_CREATE_CQ = IB_USER_VERBS_CMD_CREATE_CQ,
9596 IB_USER_VERBS_EX_CMD_CREATE_QP = IB_USER_VERBS_CMD_CREATE_QP,
97+ IB_USER_VERBS_EX_CMD_MODIFY_QP = IB_USER_VERBS_CMD_MODIFY_QP,
9698 IB_USER_VERBS_EX_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD,
9799 IB_USER_VERBS_EX_CMD_DESTROY_FLOW,
98100 IB_USER_VERBS_EX_CMD_CREATE_WQ,
@@ -545,6 +547,14 @@ enum { · 446 unmodified lines
545547 IB_UVERBS_CREATE_QP_SUP_COMP_MASK = IB_UVERBS_CREATE_QP_MASK_IND_TABLE,
546548 };
547549
550+enum {
551+ IB_USER_LEGACY_LAST_QP_ATTR_MASK = IB_QP_DEST_QPN
552+};
553+
554+enum {
555+ IB_USER_LAST_QP_ATTR_MASK = IB_QP_RATE_LIMIT
556+};
557+
548558 struct ib_uverbs_ex_create_qp {
549559 __u64 user_handle;
550560 __u32 pd_handle;
@@ -684,9 +694,20 @@ struct ib_uverbs_modify_qp { · 133 unmodified lines
684694 __u64 driver_data[0];
685695 };
686696
697+struct ib_uverbs_ex_modify_qp {
698+ struct ib_uverbs_modify_qp base;
699+ __u32 rate_limit;
700+ __u32 reserved;
701+};
702+
687703 struct ib_uverbs_modify_qp_resp {
688704 };
689705
706+struct ib_uverbs_ex_modify_qp_resp {
707+ __u32 comp_mask;
708+ __u32 response_length;
709+};
710+
690711 struct ib_uverbs_destroy_qp {
691712 __u64 response;
692713 __u32 qp_handle;