Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

irdma: Remove optimization algorithm for QP doorbell #1062

Merged
merged 1 commit into from
Sep 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 2 additions & 27 deletions providers/irdma/uk.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,35 +113,10 @@ void irdma_clr_wqes(struct irdma_qp_uk *qp, __u32 qp_wqe_idx)
*/
void irdma_uk_qp_post_wr(struct irdma_qp_uk *qp)
{
__u64 temp;
__u32 hw_sq_tail;
__u32 sw_sq_head;

/* valid bit is written and loads completed before reading shadow */
/* valid bit is written before ringing doorbell */
udma_to_device_barrier();

/* read the doorbell shadow area */
get_64bit_val(qp->shadow_area, 0, &temp);

hw_sq_tail = (__u32)FIELD_GET(IRDMA_QP_DBSA_HW_SQ_TAIL, temp);
sw_sq_head = IRDMA_RING_CURRENT_HEAD(qp->sq_ring);
if (sw_sq_head != qp->initial_ring.head) {
if (qp->push_dropped) {
db_wr32(qp->qp_id, qp->wqe_alloc_db);
qp->push_dropped = false;
} else if (sw_sq_head != hw_sq_tail) {
if (sw_sq_head > qp->initial_ring.head) {
if (hw_sq_tail >= qp->initial_ring.head &&
hw_sq_tail < sw_sq_head)
db_wr32(qp->qp_id, qp->wqe_alloc_db);
} else {
if (hw_sq_tail >= qp->initial_ring.head ||
hw_sq_tail < sw_sq_head)
db_wr32(qp->qp_id, qp->wqe_alloc_db);
}
}
}

db_wr32(qp->qp_id, qp->wqe_alloc_db);
qp->initial_ring.head = qp->sq_ring.head;
}

Expand Down