History

IB/core: Add completion queue (cq) object actions

Adding CQ ioctl actions: 1. create_cq 2. destroy_cq This requires adding the following: 1. A specification describing the method a. Handler b. Attributes specification Each attribute is one of the following: a. PTR_IN - input data Note: This could be encoded inlined for data < 64bit b. PTR_OUT - response data c. IDR - idr based object d. FD - fd based object Blobs attributes (clauses a and b) contain their type, while objects specifications (clauses c and d) contains the expected object type (for example, the given id should be UVERBS_TYPE_PD) and the required access (READ, WRITE, NEW or DESTROY). If a NEW is required, the new object's id will be assigned to this attribute. All attributes could get UA_FLAGS attribute. Currently we support stating that an attribute is mandatory or that the specification size corresponds to a lower bound (and that this attribute could be extended). We currently add both default attributes and the two generic UHW_IN and UHW_OUT driver specific attributes. 2. Handler A handler gets a uverbs_attr_bundle. The handler developer uses uverbs_attr_get to fetch an attribute of a given id. Each of these attribute groups correspond to the specification group defined in the action (clauses 1.b and 1.c respectively). The indices of these arrays corresponds to the attribute ids declared in the specifications (clause 2). The handler is quite simple. It assumes the infrastructure fetched all objects and locked, created or destroyed them as required by the specification. Pointer (or blob) attributes were validated to match their required sizes. After the handler finished, the infrastructure commits or rollbacks the objects.

Matan Barak committed 9 years ago

Commit 9ee79fc1 parent d70724f2 files · +157 −1Browse files

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

Unified · Split

include/uapi/rdma/ib_user_ioctl_verbs.h+20−0
@@ -60,5 +60,25 @@ enum { · 59 unmodified lines
60 UVERBS_UHW_OUT,60 UVERBS_UHW_OUT,
61};61};
62 62
63enum uverbs_create_cq_cmd_attr_ids {
64 CREATE_CQ_HANDLE,
65 CREATE_CQ_CQE,
66 CREATE_CQ_USER_HANDLE,
67 CREATE_CQ_COMP_CHANNEL,
68 CREATE_CQ_COMP_VECTOR,
69 CREATE_CQ_FLAGS,
70 CREATE_CQ_RESP_CQE,
71};
72
73enum uverbs_destroy_cq_cmd_attr_ids {
74 DESTROY_CQ_HANDLE,
75 DESTROY_CQ_RESP,
76};
77
78enum uverbs_actions_cq_ops {
79 UVERBS_CQ_CREATE,
80 UVERBS_CQ_DESTROY,
81};
82
63#endif83#endif
64 84

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t