[openib-general] [PATCH] Start moving to a native IPoIB driver
Roland Dreier
roland at topspin.com
Mon Oct 25 13:09:47 PDT 2004
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.
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.
(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).
- R.
More information about the general
mailing list