[Openib-windows] Patch for not posting recvs while in RST state

Fabian Tillier ftillier at silverstorm.com
Wed May 10 23:38:19 PDT 2006


Hi Tzachi,

On 5/8/06, Tzachi Dar <tzachid at mellanox.co.il> wrote:
>
> Hi Fab,
>
> Attached is a patch that solves the posting of received packets when in the
> QP is in RST state.
>
> According to my checks it solves the problem, and it doesn't add any locking
> or Interlocked operations.

The code currently holds the receive lock when reposting receives.  It
then takes the port object's lock when checking the state, but then
releases it.

A simpler fix is to take the receive lock when the port goes down and
we want to change the port's state away from RTS, as this guarantees
that reposting receives is serialized in its entirety with changing
the state in ipoib_port_down.

I checked a fix in that adds this extra lock to ipoib_port_down, and
changed the state check in __recv_mgr_repost to check for RTS
explicitly.

Taking the extra lock is not going to affect performance significantly
as it should only happen when the port goes down or the SM changes or
reregisters, events that are likely to disrupt connectivity anyway.

Take a look and let me know if you still see problems.  The change is
in revision 338.

Thanks,

- Fab



More information about the ofw mailing list