Skip to content

Commit

Permalink
[infiniband] Allow drivers to override the eIPoIB LEMAC
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Mar 21, 2016
1 parent 57c6304 commit 173c0c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/drivers/net/ipoib.c
Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions src/include/ipxe/infiniband.h
Expand Up @@ -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
Expand Down Expand Up @@ -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;
};
Expand Down

0 comments on commit 173c0c2

Please sign in to comment.