Skip to contentSkip to conversation

Serious bug in rxe_resp.c

DISCUSSION Bob Pearson 1 participant 1 message Mar 29, 2021 1 message not in the archive InfiniBand

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

-------- Forwarded Message --------
Subject: Serious bug in rxe_resp.c
Date: Sun, 28 Mar 2021 23:17:18 -0500
From: Bob Pearson <[email protected]>
To: Jason Gunthorpe <[email protected]>, Zhu Yanjun <[email protected]>, [email protected]

Currently all the error cases in the responder where the spec requires the responder to send an ack with an appropriate syndrome fail to do so for opcodes which do not consume a receive WQE. In the state machine these error states go to the COMPLETE state which immediately goes to the CLEANUP state and then to the DONE state and then exits the state machine.

I have a work around which is probably OK but I need to do some more checking to make sure that it complies with the IBA. Comparing to the code at the end of do_complete it looks like the right way to do this is

int do_complete(...)

{
        .....

        if (!wqe)
                goto done;        // jump to bottom of do_complete()

        ....

done:

        if (!pkt)
		....
	else if (qp_type(qp) == IB_QPT_RC)
		return RESPST_ACKNOWLEDGE;
	else
		return RESPST_CLEANUP;
}

This bug was exposed by error test cases for ibv_rereg_mr() which expect to get a NAK.

bob