[ofa-general] Re: IB/IPoIB Check if grat. AR changed had arrived when working in connected mode

Eli Cohen eli at mellanox.co.il
Thu Jan 31 00:03:30 PST 2008


On Thu, 2008-01-31 at 08:48 +0200, Or Gerlitz wrote:
> Eli Cohen wrote:
> >> Eli Cohen wrote:
> >>> Now you may call ipoib_put_ah(neigh->ah) for a CM neighbor and this
> >>> could cause de-reference of a NULL pointer.
> 
> Eli,
> 
> Not that your assumption changes anything regarding the patch 
> correctness (and if it does, please suggest what problem is introduced 
> by the patch), but, you might have some misconception here that for a 
> connected mode neighbour neigh->ah is NULL.
> 
> This is wrong, see patch_rec_completion where first an address handle is 
> created and then assigned to the neighbour no matter if its a connected 
> mode or datagram mode one.
Yes, thanks for pointing this out.

> 
> One might say that there's a resource waste here, since for connected 
> mode neighbour the driver consumes two HCA resources (TX QP and AH) 
> where for datagram mode neigh it consumes only one. This seems as not 
> too easy cleanup, which maybe best left for the future generations...
> 

I think the waste of resources is not that significant and we have the
benefit that it allows switching smoothly from CM to UD mode.




More information about the general mailing list