diff options
| author | Michael Brown | 2009-11-13 23:34:47 +0100 |
|---|---|---|
| committer | Michael Brown | 2009-11-16 23:15:29 +0100 |
| commit | c2c77377a6025495c2bbdd4fae96ecaa2b4651f1 (patch) | |
| tree | fb2f171bd3782bd30918401c0ca73efad777bbff /src/include | |
| parent | [ipoib] Always set the "full membership" bit in the IPv4 broadcast GID (diff) | |
| download | ipxe-c2c77377a6025495c2bbdd4fae96ecaa2b4651f1.tar.gz ipxe-c2c77377a6025495c2bbdd4fae96ecaa2b4651f1.tar.xz ipxe-c2c77377a6025495c2bbdd4fae96ecaa2b4651f1.zip | |
[ipoib] Mask out non-QPN bits in the IPoIB destination MAC when sending
The first byte of the IPoIB MAC address is used for flags indicating
support for "connected mode". Strip out the non-QPN bits of the first
dword when constructing the address vector for transmitted IPoIB
packets, so as not to end up passing an invalid QPN in the BTH.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/gpxe/infiniband.h | 3 | ||||
| -rw-r--r-- | src/include/gpxe/ipoib.h | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/include/gpxe/infiniband.h b/src/include/gpxe/infiniband.h index 70b930de1..d90b1c105 100644 --- a/src/include/gpxe/infiniband.h +++ b/src/include/gpxe/infiniband.h @@ -30,6 +30,9 @@ FILE_LICENCE ( GPL2_OR_LATER ); /** Broadcast QPN */ #define IB_QPN_BROADCAST 0xffffffUL +/** QPN mask */ +#define IB_QPN_MASK 0xffffffUL + /** Default Infiniband partition key */ #define IB_PKEY_DEFAULT 0xffff diff --git a/src/include/gpxe/ipoib.h b/src/include/gpxe/ipoib.h index f8231db08..1d02f792b 100644 --- a/src/include/gpxe/ipoib.h +++ b/src/include/gpxe/ipoib.h @@ -17,9 +17,10 @@ FILE_LICENCE ( GPL2_OR_LATER ); struct ipoib_mac { /** Queue pair number * - * MSB must be zero; QPNs are only 24-bit. + * MSB indicates support for IPoIB "connected mode". Lower 24 + * bits are the QPN. */ - uint32_t qpn; + uint32_t flags__qpn; /** Port GID */ struct ib_gid gid; } __attribute__ (( packed )); |
