mirror of
https://github.com/ipxe/ipxe
synced 2025-12-23 21:41:43 +03:00
[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:
@@ -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
|
||||
|
||||
|
||||
@@ -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 ));
|
||||
|
||||
Reference in New Issue
Block a user