[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.
This commit is contained in:
Michael Brown
2009-11-13 22:34:47 +00:00
parent 50242e4202
commit c2c77377a6
3 changed files with 13 additions and 10 deletions

View File

@@ -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

View File

@@ -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 ));