[openib-general] ib_mad_port_start allows receive processing before sends can be posted
Hal Rosenstock
Thu Oct 28 07:23:28 PDT 2004
On Wed, 2004-10-27 at 18:42, Sean Hefty wrote:
> There appears to be a minor race in ib_mad_port_start where the MAD
> layer could begin accepting and processing receives before the QP allows
> sends, or even before we know if the QP will finish initializing
> properly. This makes it difficult to handle traffic that comes in
> before the QP is transitioned to the RTS state, to recover from errors
> if the RTS transition fails, or to recover from errors if we fail to
> initialize QP1 after QP0 is active.
Not sure I see the problem. If we receive something and decide to
respond, as long as the send is dropped when the QP is not yet reached
RTS, there should be no issue.
> Longer term, we may want to consider separating the QP0 and QP1
> initialization.
Perhaps.
> Short term, I think that if we just move the code around in
> ib_mad_port_start, we should be able to ensure that both QPs are ready
> to send and receive before handling any receives. (I don't think that
> we care if the QPs go to the RTS state without any receives being posted
> on them. We'll lose all MADs received before the QP goes into the RTR
> state anyway, so this adds a small delay onto the time that we need to
> begin handling receives.)
>
> Unless there's a reason to keep the code as is, I'll generate a patch
> for this.
I have no objection (but would like to understand more of the perceived
problem(s)). Perhaps this approach makes things simpler in the long run,
but I think the case of sending when the QP is not RTS needs to be dealt
with anyhow and make take care of the problems you are concerned about.
-- Hal
>
> - Sean
More information about the openib-general mailing list