Skip to content

Commit b703374

Browse files
Bob Pearsonjgunthorpe
authored andcommitted
RDMA/rxe: Allow good work requests to be executed
A previous commit incorrectly added an 'if(!err)' before scheduling the requester task in rxe_post_send_kernel(). But if there were send wrs successfully added to the send queue before a bad wr they might never get executed. This commit fixes this by scheduling the requester task if any wqes were successfully posted in rxe_post_send_kernel() in rxe_verbs.c. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bob Pearson <[email protected]> Fixes: 5bf944f ("RDMA/rxe: Add error messages") Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 2b23b60 commit b703374

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/infiniband/sw/rxe/rxe_verbs.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,19 +888,23 @@ static int rxe_post_send_kernel(struct rxe_qp *qp,
888888
{
889889
int err = 0;
890890
unsigned long flags;
891+
int good = 0;
891892

892893
spin_lock_irqsave(&qp->sq.sq_lock, flags);
893894
while (ibwr) {
894895
err = post_one_send(qp, ibwr);
895896
if (err) {
896897
*bad_wr = ibwr;
897898
break;
899+
} else {
900+
good++;
898901
}
899902
ibwr = ibwr->next;
900903
}
901904
spin_unlock_irqrestore(&qp->sq.sq_lock, flags);
902905

903-
if (!err)
906+
/* kickoff processing of any posted wqes */
907+
if (good)
904908
rxe_sched_task(&qp->req.task);
905909

906910
spin_lock_irqsave(&qp->state_lock, flags);

0 commit comments

Comments
 (0)