All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RDMA/rxe: Advance req.wqe_index when rxe_requester meets error
@ 2020-03-12 16:50 huangqingxin
  2020-03-14 12:54 ` Yanjun Zhu
  0 siblings, 1 reply; 2+ messages in thread
From: huangqingxin @ 2020-03-12 16:50 UTC (permalink / raw)
  To: monis; +Cc: dledford, jgg, zyjzyj2000, linux-rdma, huangqingxin

From: huangqingxin <huangqingxin@ruijie.com.cn>

In the rxe_requester, we may fail to xmit packet for missing GID entry.
We should also advance req.wqe_index too.Otherwise, we won't be able
to get the new next wqe, and completer would consume the wrong wqe.

Signed-off-by: huangqingxin <huangqingxin@ruijie.com.cn>
---
 drivers/infiniband/sw/rxe/rxe_req.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c
index e5031172c..08f4bea06 100644
--- a/drivers/infiniband/sw/rxe/rxe_req.c
+++ b/drivers/infiniband/sw/rxe/rxe_req.c
@@ -756,6 +756,7 @@ int rxe_requester(void *arg)
 err:
 	wqe->status = IB_WC_LOC_PROT_ERR;
 	wqe->state = wqe_state_error;
+	qp->req.wqe_index = next_index(qp->sq.queue, qp->req.wqe_index);
 	__rxe_do_task(&qp->comp.task);
 
 exit:
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] RDMA/rxe: Advance req.wqe_index when rxe_requester meets error
  2020-03-12 16:50 [PATCH] RDMA/rxe: Advance req.wqe_index when rxe_requester meets error huangqingxin
@ 2020-03-14 12:54 ` Yanjun Zhu
  0 siblings, 0 replies; 2+ messages in thread
From: Yanjun Zhu @ 2020-03-14 12:54 UTC (permalink / raw)
  To: huangqingxin, Moni Shoua; +Cc: dledford, jgg, linux-rdma, huangqingxin


When an application wants to move data over, it tells this to the RDMA NIC
that translates work request (WR) into work queues (WQ). This is done by
placing instructions into the respective send or receive queues telling the
rNIC what memory buffers form the registered region it wants to send or
receive. Those instructions are called Work Queue Elements (WQE).

A WQE contains a pointer to the memory buffer. When it’s a send queue
it points to data to be sent over to the other side. In the case of a 
receive
queue, it points to the memory buffer where the data will be written to.

To this commit, rxe skb allocation failed. req.wqe_index should not be 
advanced.
Please do something in other places.

Zhu Yanjun

On 3/13/2020 12:50 AM, huangqingxin wrote:
> From: huangqingxin <huangqingxin@ruijie.com.cn>
>
> In the rxe_requester, we may fail to xmit packet for missing GID entry.
> We should also advance req.wqe_index too.Otherwise, we won't be able
> to get the new next wqe, and completer would consume the wrong wqe.
>
> Signed-off-by: huangqingxin <huangqingxin@ruijie.com.cn>
> ---
>   drivers/infiniband/sw/rxe/rxe_req.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/infiniband/sw/rxe/rxe_req.c b/drivers/infiniband/sw/rxe/rxe_req.c
> index e5031172c..08f4bea06 100644
> --- a/drivers/infiniband/sw/rxe/rxe_req.c
> +++ b/drivers/infiniband/sw/rxe/rxe_req.c
> @@ -756,6 +756,7 @@ int rxe_requester(void *arg)
>   err:
>   	wqe->status = IB_WC_LOC_PROT_ERR;
>   	wqe->state = wqe_state_error;
> +	qp->req.wqe_index = next_index(qp->sq.queue, qp->req.wqe_index);
>   	__rxe_do_task(&qp->comp.task);
>   
>   exit:



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-15  1:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-12 16:50 [PATCH] RDMA/rxe: Advance req.wqe_index when rxe_requester meets error huangqingxin
2020-03-14 12:54 ` Yanjun Zhu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.