summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brown2016-03-21 10:29:54 +0100
committerMichael Brown2016-03-21 10:30:42 +0100
commit173c0c25363fc7a9aaaef606ef35e73b765e888b (patch)
treebed51a04c4bf1d952b5b016cc8877316271a33cc /src
parent[arbel] Allocate space for GRH on UD queue pairs (diff)
downloadipxe-173c0c25363fc7a9aaaef606ef35e73b765e888b.tar.gz
ipxe-173c0c25363fc7a9aaaef606ef35e73b765e888b.tar.xz
ipxe-173c0c25363fc7a9aaaef606ef35e73b765e888b.zip
[infiniband] Allow drivers to override the eIPoIB LEMAC
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src')
-rw-r--r--src/drivers/net/ipoib.c1
-rw-r--r--src/include/ipxe/infiniband.h4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/drivers/net/ipoib.c b/src/drivers/net/ipoib.c
index a245cce1b..8a65c87ba 100644
--- a/src/drivers/net/ipoib.c
+++ b/src/drivers/net/ipoib.c
@@ -956,6 +956,7 @@ static int ipoib_probe ( struct ib_device *ibdev ) {
/* Extract hardware address */
memcpy ( netdev->hw_addr, &ibdev->gid.s.guid,
sizeof ( ibdev->gid.s.guid ) );
+ memcpy ( netdev->ll_addr, ibdev->lemac, ETH_ALEN );
/* Set local MAC address */
memcpy ( &ipoib->mac.gid.s.guid, &ibdev->gid.s.guid,
diff --git a/src/include/ipxe/infiniband.h b/src/include/ipxe/infiniband.h
index 5910390da..d7ecd1623 100644
--- a/src/include/ipxe/infiniband.h
+++ b/src/include/ipxe/infiniband.h
@@ -15,6 +15,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <ipxe/tables.h>
#include <ipxe/ib_packet.h>
#include <ipxe/ib_mad.h>
+#include <ipxe/if_ether.h>
/** Subnet management interface QPN */
#define IB_QPN_SMI 0
@@ -457,6 +458,9 @@ struct ib_device {
/** General services interface */
struct ib_mad_interface *gsi;
+ /** IPoIB LEMAC (if non-default) */
+ uint8_t lemac[ETH_ALEN];
+
/** Driver private data */
void *drv_priv;
};