[openib-general] [PATCH] Start moving to a native IPoIB driver
Hal Rosenstock
halr at voltaire.com
Mon Oct 25 19:06:46 PDT 2004
On Mon, 2004-10-25 at 16:09, Roland Dreier wrote:
> Hal> In terms of the change to net/ip.h in
> Hal> linux-2.6.9-ipoib-multicast.diff, I'm curious as to why the
> Hal> mapping doesn't match the MGID layout (and where that
> Hal> conversion is done). Also, why is there a placeholder for the
> Hal> multicast QPN here ? The endian also looks a little odd to me
> Hal> as well.
>
> ip_ib_mc_map() is mapping an IPv4 multicast address to an IPoIB
> hardware address. So we have to create the full 20-byte address (as
> used by ARP etc), which means the first 4 bytes are reserved+QPN.
OK; I thought the mapping was just to MGID but it is hardware address
(QPN + MGID) even though multicast doesn't use ARP (but the QPN for the
MGID is needed to multicast).
> I just looked over what I wrote again and it seems to be correct,
> including endianness: we put ff 12 40 1b as the top 4 bytes of the
> GID, and then the low 28 bits of the IPv4 address as the last 4 bytes
> of the GID.
That sounds right.
> (Endianness is a little tricky because I used the same idiom as the
> rest of net/ip.h, where we do addr = ntohl(addr) and then fill in the
> group ID in reverse order).
That's what made it seem odd to me. Should've looked harder. Thanks.
-- Hal
More information about the general
mailing list