On 8/31/2016 9:57 AM, Sagi Grimberg wrote:
+/*
+ * Work Queue. QP can be created without internal WQs "packaged"
inside it,
+ * this QP can be configured to use "external" WQ object as its
+ * receive/send queue.
+ * WQ associated (many to one) with Completion Queue it owns WQ
properties
+ * (PD, WQ size etc).
+ * WQ of type IBV_WQT_RQ:
+ * - Contains receive WQEs, in this case its PD serves as scatter as
well.
+ * - Exposes post receive function to be used to post a list of work
+ * requests (WRs) to its receive queue.
+ */
+struct ibv_wq {
+ struct ibv_context *context;
+ void *wq_context;
+ struct ibv_pd *pd;
+ struct ibv_cq *cq;
+ uint32_t wq_num;
+ uint32_t handle;
+ enum ibv_wq_state state;
+ enum ibv_wq_type wq_type;
+ int (*post_recv)(struct ibv_wq *current,
+ struct ibv_recv_wr *recv_wr,
+ struct ibv_recv_wr **bad_recv_wr);
What was the reason not to go with the normal ibv_context_ops callout
scheme?
This is a data path flow, using the extended ops layout (i.e
verbs_get_ctx) to find the provider pointer in each call is redundant
and expensive. Same mechanism was used for ibv_cq_ex which was the first
extended object that was used in the data path. Please note that from
application point of view there is the static inline function
ibv_post_wq_recv that should be used, so its code will be consistent
with other verbs around. (See also ibv_start_poll, ibv_next_poll usage
for ibv_cq_ex)
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html