Re: [PATCH rdma-core 1/5] RDMA-CORE/erdma: Add userspace verbs related header files.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 12/27/21 1:48 PM, Devesh Sharma wrote:


<...>

+
+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

--
2.27.0



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux