Browse Source

[infiniband] Allow drivers to override the eIPoIB LEMAC

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 8 years ago
parent
commit
173c0c2536
2 changed files with 5 additions and 0 deletions
  1. 1
    0
      src/drivers/net/ipoib.c
  2. 4
    0
      src/include/ipxe/infiniband.h

+ 1
- 0
src/drivers/net/ipoib.c View File

956
 	/* Extract hardware address */
956
 	/* Extract hardware address */
957
 	memcpy ( netdev->hw_addr, &ibdev->gid.s.guid,
957
 	memcpy ( netdev->hw_addr, &ibdev->gid.s.guid,
958
 		 sizeof ( ibdev->gid.s.guid ) );
958
 		 sizeof ( ibdev->gid.s.guid ) );
959
+	memcpy ( netdev->ll_addr, ibdev->lemac, ETH_ALEN );
959
 
960
 
960
 	/* Set local MAC address */
961
 	/* Set local MAC address */
961
 	memcpy ( &ipoib->mac.gid.s.guid, &ibdev->gid.s.guid,
962
 	memcpy ( &ipoib->mac.gid.s.guid, &ibdev->gid.s.guid,

+ 4
- 0
src/include/ipxe/infiniband.h View File

15
 #include <ipxe/tables.h>
15
 #include <ipxe/tables.h>
16
 #include <ipxe/ib_packet.h>
16
 #include <ipxe/ib_packet.h>
17
 #include <ipxe/ib_mad.h>
17
 #include <ipxe/ib_mad.h>
18
+#include <ipxe/if_ether.h>
18
 
19
 
19
 /** Subnet management interface QPN */
20
 /** Subnet management interface QPN */
20
 #define IB_QPN_SMI 0
21
 #define IB_QPN_SMI 0
457
 	/** General services interface */
458
 	/** General services interface */
458
 	struct ib_mad_interface *gsi;
459
 	struct ib_mad_interface *gsi;
459
 
460
 
461
+	/** IPoIB LEMAC (if non-default) */
462
+	uint8_t lemac[ETH_ALEN];
463
+
460
 	/** Driver private data */
464
 	/** Driver private data */
461
 	void *drv_priv;
465
 	void *drv_priv;
462
 };
466
 };

Loading…
Cancel
Save