summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2009-07-07 12:31:35 +0200
committerMichael Brown2009-07-18 00:06:33 +0200
commit4d0029611fa16aa16b65efd23f17813a5e68e112 (patch)
tree405cb421adca69b5535992c7f4c1d8e25a7e2f20
parent[infiniband] Provide a general mechanism for path record lookups (diff)
downloadipxe-4d0029611fa16aa16b65efd23f17813a5e68e112.tar.gz
ipxe-4d0029611fa16aa16b65efd23f17813a5e68e112.tar.xz
ipxe-4d0029611fa16aa16b65efd23f17813a5e68e112.zip
[ipoib] Use Infiniband broadcast QPN in IPoIB broadcast MAC address
Remove the special handling of the IPoIB broadcast QPN.
-rw-r--r--src/drivers/net/ipoib.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/drivers/net/ipoib.c b/src/drivers/net/ipoib.c
index dd04a43c..a838795f 100644
--- a/src/drivers/net/ipoib.c
+++ b/src/drivers/net/ipoib.c
@@ -85,15 +85,9 @@ struct ipoib_device {
/** IPoIB metadata TID */
static uint32_t ipoib_meta_tid = 0;
-/** Broadcast QPN used in IPoIB MAC addresses
- *
- * This is a guaranteed invalid real QPN
- */
-#define IPOIB_BROADCAST_QPN 0xffffffffUL
-
/** Broadcast IPoIB address */
static struct ipoib_mac ipoib_broadcast = {
- .qpn = ntohl ( IPOIB_BROADCAST_QPN ),
+ .qpn = htonl ( IB_QPN_BROADCAST ),
.gid.u.bytes = { 0xff, 0x12, 0x40, 0x1b, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff },
};
@@ -442,16 +436,15 @@ static int ipoib_transmit ( struct net_device *netdev,
/* Construct address vector */
memset ( &av, 0, sizeof ( av ) );
+ av.qpn = ntohl ( dest->mac.qpn );
av.qkey = ipoib->data_qkey;
av.gid_present = 1;
- if ( dest->mac.qpn == htonl ( IPOIB_BROADCAST_QPN ) ) {
+ if ( av.qpn == IB_QPN_BROADCAST ) {
/* Broadcast */
- av.qpn = IB_QPN_BROADCAST;
av.lid = ipoib->broadcast_lid;
memcpy ( &av.gid, &ipoib->broadcast_gid, sizeof ( av.gid ) );
} else {
/* Unicast */
- av.qpn = ntohl ( dest->mac.qpn );
memcpy ( &av.gid, &dest->mac.gid, sizeof ( av.gid ) );
if ( ( rc = ib_resolve_path ( ibdev, &av ) ) != 0 ) {
/* Path not resolved yet */