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
37#define IB_USER_VERBS_H37#define IB_USER_VERBS_H
38 38
39#include <linux/types.h>39#include <linux/types.h>
40#include <rdma/ib_verbs.h>
40 41
41/*42/*
42 * Increment this value if any changes that break userspace ABI43 * Increment this value if any changes that break userspace ABI
@@ -93,6 +94,7 @@ enum { · 50 unmodified lines
93 IB_USER_VERBS_EX_CMD_QUERY_DEVICE = IB_USER_VERBS_CMD_QUERY_DEVICE,94 IB_USER_VERBS_EX_CMD_QUERY_DEVICE = IB_USER_VERBS_CMD_QUERY_DEVICE,
94 IB_USER_VERBS_EX_CMD_CREATE_CQ = IB_USER_VERBS_CMD_CREATE_CQ,95 IB_USER_VERBS_EX_CMD_CREATE_CQ = IB_USER_VERBS_CMD_CREATE_CQ,
95 IB_USER_VERBS_EX_CMD_CREATE_QP = IB_USER_VERBS_CMD_CREATE_QP,96 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,
96 IB_USER_VERBS_EX_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD,98 IB_USER_VERBS_EX_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD,
97 IB_USER_VERBS_EX_CMD_DESTROY_FLOW,99 IB_USER_VERBS_EX_CMD_DESTROY_FLOW,
98 IB_USER_VERBS_EX_CMD_CREATE_WQ,100 IB_USER_VERBS_EX_CMD_CREATE_WQ,
@@ -545,6 +547,14 @@ enum { · 446 unmodified lines
545 IB_UVERBS_CREATE_QP_SUP_COMP_MASK = IB_UVERBS_CREATE_QP_MASK_IND_TABLE,547 IB_UVERBS_CREATE_QP_SUP_COMP_MASK = IB_UVERBS_CREATE_QP_MASK_IND_TABLE,
546};548};
547 549
550enum {
551 IB_USER_LEGACY_LAST_QP_ATTR_MASK = IB_QP_DEST_QPN
552};
553
554enum {
555 IB_USER_LAST_QP_ATTR_MASK = IB_QP_RATE_LIMIT
556};
557
548struct ib_uverbs_ex_create_qp {558struct ib_uverbs_ex_create_qp {
549 __u64 user_handle;559 __u64 user_handle;
550 __u32 pd_handle;560 __u32 pd_handle;
@@ -684,9 +694,20 @@ struct ib_uverbs_modify_qp { · 133 unmodified lines
684 __u64 driver_data[0];694 __u64 driver_data[0];
685};695};
686 696
697struct ib_uverbs_ex_modify_qp {
698 struct ib_uverbs_modify_qp base;
699 __u32 rate_limit;
700 __u32 reserved;
701};
702
687struct ib_uverbs_modify_qp_resp {703struct ib_uverbs_modify_qp_resp {
688};704};
689 705
706struct ib_uverbs_ex_modify_qp_resp {
707 __u32 comp_mask;
708 __u32 response_length;
709};
710
690struct ib_uverbs_destroy_qp {711struct ib_uverbs_destroy_qp {
691 __u64 response;712 __u64 response;
692 __u32 qp_handle;713 __u32 qp_handle;