[openib-general] [RFC] IPoIB sockaddr_ll changes

Hal Rosenstock halr at voltaire.com
Fri Aug 5 09:17:03 PDT 2005


On Fri, 2005-08-05 at 12:06, Roland Dreier wrote:
>     Hal> Hi, I would like to get comments on this prior to sending
>     Hal> this over to kernel land.
> 
> When you send it, make sure to include netdev at vger.kernel.org so that
> all the networking people see it.

Yes, that's where I was going to send it. Does it need to go to lkml as
well or would that be handled by netdev ?

> SOCKADDR_LL_COMPAT is pretty ugly but I'm not sure I see a better
> solution right now.

I agree but I couldn't see a better way (either).

>     Hal> IPoIB sockaddr_ll changes due to the fact that the IPoIB link
>     Hal> layer address is 20 bytes rather than 8 bytes
> 
> You'll want to expand the explanation here so that it's clear what is
> being done and why.

OK. How about:

The current link level address accomodates MAC addresses which are 8
bytes. IPoIB link level addresses are composed of a GID (Global
Identifier) which is 16 bytes and a QPN (Queue Pair Number) which is 3
bytes with 1 byte Reserved. So in order to support IPoIB interfaces, the
link layer address needs to be increased from 8 to 20 bytes.

>     > +			if ((msg->msg_namelen != sizeof(struct sockaddr_ll) - SOCKADDR_LL_COMPAT) || (saddr->sll_hatype == ARPHRD_INFINIBAND))
> 
> I know I say that it's OK to fudge on line lengths a little over 80
> characters, but this line is way too long.
> 
>     > +		if ((addr_len != sizeof(struct sockaddr_ll) - SOCKADDR_LL_COMPAT) || 
>     > +				(sll->sll_hatype == ARPHRD_INFINIBAND))
> 
> Fix the indendation here so that (sll-> lines up with (addr_len !=

I'll send out v2 of this patch shortly.

--- Hal




More information about the general mailing list