[openib-general] ib_mad_port_start allows receive processing before sends can be posted

Sean Hefty mshefty at ichips.intel.com
Wed Oct 27 15:42:50 PDT 2004


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.

Longer term, we may want to consider separating the QP0 and QP1
initialization.

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.

- Sean

-- 



More information about the general mailing list