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.
Showing the changes to include/uapi (1 of 4 files). Show all
Unified · Split
| @@ -37,6 +37,7 @@ · 36 unmodified lines | |||
| 37 | #define IB_USER_VERBS_H | 37 | #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 ABI | 43 | * 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 | ||
| 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 | |||
| 548 | struct ib_uverbs_ex_create_qp { | 558 | struct 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 | ||
| 697 | struct ib_uverbs_ex_modify_qp { | ||
| 698 | struct ib_uverbs_modify_qp base; | ||
| 699 | __u32 rate_limit; | ||
| 700 | __u32 reserved; | ||
| 701 | }; | ||
| 702 | |||
| 687 | struct ib_uverbs_modify_qp_resp { | 703 | struct ib_uverbs_modify_qp_resp { |
| 688 | }; | 704 | }; |
| 689 | 705 | ||
| 706 | struct ib_uverbs_ex_modify_qp_resp { | ||
| 707 | __u32 comp_mask; | ||
| 708 | __u32 response_length; | ||
| 709 | }; | ||
| 710 | |||
| 690 | struct ib_uverbs_destroy_qp { | 711 | struct ib_uverbs_destroy_qp { |
| 691 | __u64 response; | 712 | __u64 response; |
| 692 | __u32 qp_handle; | 713 | __u32 qp_handle; |