diff options
author | Christian Iversen <ci@iversenit.dk> | 2021-01-26 22:56:42 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2021-01-29 00:13:46 +0000 |
commit | 699b9f1d1b0338272dc4871ec3348ff3281784a3 (patch) | |
tree | 003db7c9d74b216755a5d42945c47e11ccf255fe /src/drivers/infiniband/hermon.h | |
parent | 6cb12ee2b02dac4455bc60aebdcd326436dff743 (diff) | |
download | ipxe-699b9f1d1b0338272dc4871ec3348ff3281784a3.tar.gz |
[hermon] Use Ethernet MAC as eIPoIB local EMAC
The eIPoIB local Ethernet MAC is currently constructed from the port
GUID. Given a base GUID/MAC value of N, Mellanox seems to populate:
Node GUID: N + 0
Port 1 GUID: N + 1
Port 2 GUID: N + 2
and
Port 1 MAC: N + 0
Port 2 MAC: N + 1
This causes a duplicate local MAC address when port 1 is configured as
Infiniband and port 2 as Ethernet, since both will derive their MAC
address as (N + 1).
Fix by using the port's Ethernet MAC as the eIPoIB local EMAC. This
is a behavioural change that could potentially break configurations
that rely on the local EMAC value, such as a DHCP server relying on
the chaddr field for DHCP reservations.
Signed-off-by: Christian Iversen <ci@iversenit.dk>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/infiniband/hermon.h')
-rw-r--r-- | src/drivers/infiniband/hermon.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/drivers/infiniband/hermon.h b/src/drivers/infiniband/hermon.h index 8ac35620c..381e2e462 100644 --- a/src/drivers/infiniband/hermon.h +++ b/src/drivers/infiniband/hermon.h @@ -822,6 +822,15 @@ struct hermon_port_type { struct hermon_port *port ); }; +/** A Hermon port Ethernet MAC address */ +union hermon_port_mac { + struct { + uint16_t h; + uint32_t l; + } __attribute__ (( packed )) part; + uint8_t raw[ETH_ALEN]; +}; + /** A Hermon port */ struct hermon_port { /** Infiniband device */ @@ -832,6 +841,8 @@ struct hermon_port { struct ib_completion_queue *eth_cq; /** Ethernet queue pair */ struct ib_queue_pair *eth_qp; + /** Ethernet MAC */ + union hermon_port_mac eth_mac; /** Port type */ struct hermon_port_type *type; /** Non-volatile option storage */ |