Merge branch 'net-mana-fix-doorbell-access-for-receive-queues'

Long Li says:

====================
net: mana: Fix doorbell access for receive queues

This patchset fixes the issues discovered during 200G physical link
tests. It fixes doorbell usage and WQE format for receive queues.
====================

Link: https://lore.kernel.org/r/1689622539-5334-1-git-send-email-longli@linuxonhyperv.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jakub Kicinski 2023-07-18 17:59:58 -07:00
Родитель f8e343326c f5e39b5712
Коммит 63c8778d91
2 изменённых файлов: 12 добавлений и 3 удалений

Просмотреть файл

@ -300,8 +300,11 @@ static void mana_gd_ring_doorbell(struct gdma_context *gc, u32 db_index,
void mana_gd_wq_ring_doorbell(struct gdma_context *gc, struct gdma_queue *queue) void mana_gd_wq_ring_doorbell(struct gdma_context *gc, struct gdma_queue *queue)
{ {
/* Hardware Spec specifies that software client should set 0 for
* wqe_cnt for Receive Queues. This value is not used in Send Queues.
*/
mana_gd_ring_doorbell(gc, queue->gdma_dev->doorbell, queue->type, mana_gd_ring_doorbell(gc, queue->gdma_dev->doorbell, queue->type,
queue->id, queue->head * GDMA_WQE_BU_SIZE, 1); queue->id, queue->head * GDMA_WQE_BU_SIZE, 0);
} }
void mana_gd_ring_cq(struct gdma_queue *cq, u8 arm_bit) void mana_gd_ring_cq(struct gdma_queue *cq, u8 arm_bit)

Просмотреть файл

@ -1386,8 +1386,8 @@ static void mana_post_pkt_rxq(struct mana_rxq *rxq)
recv_buf_oob = &rxq->rx_oobs[curr_index]; recv_buf_oob = &rxq->rx_oobs[curr_index];
err = mana_gd_post_and_ring(rxq->gdma_rq, &recv_buf_oob->wqe_req, err = mana_gd_post_work_request(rxq->gdma_rq, &recv_buf_oob->wqe_req,
&recv_buf_oob->wqe_inf); &recv_buf_oob->wqe_inf);
if (WARN_ON_ONCE(err)) if (WARN_ON_ONCE(err))
return; return;
@ -1657,6 +1657,12 @@ static void mana_poll_rx_cq(struct mana_cq *cq)
mana_process_rx_cqe(rxq, cq, &comp[i]); mana_process_rx_cqe(rxq, cq, &comp[i]);
} }
if (comp_read > 0) {
struct gdma_context *gc = rxq->gdma_rq->gdma_dev->gdma_context;
mana_gd_wq_ring_doorbell(gc, rxq->gdma_rq);
}
if (rxq->xdp_flush) if (rxq->xdp_flush)
xdp_do_flush(); xdp_do_flush();
} }