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. Signed-off-by: Bodong Wang <bodong@mellanox.com> Reviewed-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:

committed by
Doug Ledford

parent
528e5a1bd3
commit
189aba99e7
@@ -37,6 +37,7 @@
|
||||
#define IB_USER_VERBS_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <rdma/ib_verbs.h>
|
||||
|
||||
/*
|
||||
* Increment this value if any changes that break userspace ABI
|
||||
@@ -93,6 +94,7 @@ enum {
|
||||
IB_USER_VERBS_EX_CMD_QUERY_DEVICE = IB_USER_VERBS_CMD_QUERY_DEVICE,
|
||||
IB_USER_VERBS_EX_CMD_CREATE_CQ = IB_USER_VERBS_CMD_CREATE_CQ,
|
||||
IB_USER_VERBS_EX_CMD_CREATE_QP = IB_USER_VERBS_CMD_CREATE_QP,
|
||||
IB_USER_VERBS_EX_CMD_MODIFY_QP = IB_USER_VERBS_CMD_MODIFY_QP,
|
||||
IB_USER_VERBS_EX_CMD_CREATE_FLOW = IB_USER_VERBS_CMD_THRESHOLD,
|
||||
IB_USER_VERBS_EX_CMD_DESTROY_FLOW,
|
||||
IB_USER_VERBS_EX_CMD_CREATE_WQ,
|
||||
@@ -545,6 +547,14 @@ enum {
|
||||
IB_UVERBS_CREATE_QP_SUP_COMP_MASK = IB_UVERBS_CREATE_QP_MASK_IND_TABLE,
|
||||
};
|
||||
|
||||
enum {
|
||||
IB_USER_LEGACY_LAST_QP_ATTR_MASK = IB_QP_DEST_QPN
|
||||
};
|
||||
|
||||
enum {
|
||||
IB_USER_LAST_QP_ATTR_MASK = IB_QP_RATE_LIMIT
|
||||
};
|
||||
|
||||
struct ib_uverbs_ex_create_qp {
|
||||
__u64 user_handle;
|
||||
__u32 pd_handle;
|
||||
@@ -684,9 +694,20 @@ struct ib_uverbs_modify_qp {
|
||||
__u64 driver_data[0];
|
||||
};
|
||||
|
||||
struct ib_uverbs_ex_modify_qp {
|
||||
struct ib_uverbs_modify_qp base;
|
||||
__u32 rate_limit;
|
||||
__u32 reserved;
|
||||
};
|
||||
|
||||
struct ib_uverbs_modify_qp_resp {
|
||||
};
|
||||
|
||||
struct ib_uverbs_ex_modify_qp_resp {
|
||||
__u32 comp_mask;
|
||||
__u32 response_length;
|
||||
};
|
||||
|
||||
struct ib_uverbs_destroy_qp {
|
||||
__u64 response;
|
||||
__u32 qp_handle;
|
||||
|
Reference in New Issue
Block a user