From c2c77377a6025495c2bbdd4fae96ecaa2b4651f1 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Fri, 13 Nov 2009 22:34:47 +0000 Subject: [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. --- src/include/gpxe/infiniband.h | 3 +++ src/include/gpxe/ipoib.h | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src/include') 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 )); -- cgit v1.2.3-55-g7522