Re: [PATCH rdma-core 1/5] RDMA-CORE/erdma: Add userspace verbs related header files.
From: Cheng Xu <chengyou@linux.alibaba.com>
Date: 2021-12-27 06:46:55
From: Cheng Xu <chengyou@linux.alibaba.com>
Date: 2021-12-27 06:46:55
On 12/27/21 1:48 PM, Devesh Sharma wrote:
<...>
quoted
+ +static inline struct erdma_qp *to_eqp(struct ibv_qp *base) { + return container_of(base, struct erdma_qp, base_qp); } + +static inline struct erdma_cq *to_ecq(struct ibv_cq *base) { + return container_of(base, struct erdma_cq, base_cq); } + +static inline void *get_sq_wqebb(struct erdma_qp *qp, uint16_t idx) { + idx &= (qp->sq.depth - 1); + return qp->sq.qbuf + (idx << SQEBB_SHIFT); } + +static inline void __kick_sq_db(struct erdma_qp *qp, uint16_t pi) { + uint64_t db_data; + + db_data = FIELD_PREP(ERDMA_SQE_HDR_QPN_MASK, qp->id) | + FIELD_PREP(ERDMA_SQE_HDR_WQEBB_INDEX_MASK, pi); + + *(__le64 *)qp->sq.db_record = htole64(db_data); + udma_to_device_barrier(); + mmio_write64_le(qp->sq.db, htole64(db_data)); }Standard function definition format Func () { } Update all over the place.
OK, I will fix it. Thanks, Cheng Xu
quoted
-- 2.27.0