|
@@ -71,7 +71,7 @@ struct ipoib_device {
|
71
|
71
|
|
72
|
72
|
/** Broadcast IPoIB address */
|
73
|
73
|
static struct ipoib_mac ipoib_broadcast = {
|
74
|
|
- .qpn = htonl ( IB_QPN_BROADCAST ),
|
|
74
|
+ .flags__qpn = htonl ( IB_QPN_BROADCAST ),
|
75
|
75
|
.gid.u.bytes = { 0xff, 0x12, 0x40, 0x1b, 0x00, 0x00, 0x00, 0x00,
|
76
|
76
|
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff },
|
77
|
77
|
};
|
|
@@ -146,8 +146,7 @@ static struct ipoib_peer * ipoib_lookup_peer_by_key ( unsigned int key ) {
|
146
|
146
|
/**
|
147
|
147
|
* Store GID and QPN in peer cache
|
148
|
148
|
*
|
149
|
|
- * @v gid Peer GID
|
150
|
|
- * @v qpn Peer QPN
|
|
149
|
+ * @v mac Peer MAC address
|
151
|
150
|
* @ret peer Peer cache entry
|
152
|
151
|
*/
|
153
|
152
|
static struct ipoib_peer * ipoib_cache_peer ( const struct ipoib_mac *mac ) {
|
|
@@ -283,7 +282,7 @@ const char * ipoib_ntoa ( const void *ll_addr ) {
|
283
|
282
|
const struct ipoib_mac *mac = ll_addr;
|
284
|
283
|
|
285
|
284
|
snprintf ( buf, sizeof ( buf ), "%08x:%08x:%08x:%08x:%08x",
|
286
|
|
- htonl ( mac->qpn ), htonl ( mac->gid.u.dwords[0] ),
|
|
285
|
+ htonl ( mac->flags__qpn ), htonl ( mac->gid.u.dwords[0] ),
|
287
|
286
|
htonl ( mac->gid.u.dwords[1] ),
|
288
|
287
|
htonl ( mac->gid.u.dwords[2] ),
|
289
|
288
|
htonl ( mac->gid.u.dwords[3] ) );
|
|
@@ -438,7 +437,7 @@ static int ipoib_transmit ( struct net_device *netdev,
|
438
|
437
|
|
439
|
438
|
/* Construct address vector */
|
440
|
439
|
memset ( &av, 0, sizeof ( av ) );
|
441
|
|
- av.qpn = ntohl ( dest->mac.qpn );
|
|
440
|
+ av.qpn = ( ntohl ( dest->mac.flags__qpn ) & IB_QPN_MASK );
|
442
|
441
|
av.gid_present = 1;
|
443
|
442
|
memcpy ( &av.gid, &dest->mac.gid, sizeof ( av.gid ) );
|
444
|
443
|
if ( ( rc = ib_resolve_path ( ibdev, &av ) ) != 0 ) {
|
|
@@ -501,7 +500,7 @@ static void ipoib_complete_recv ( struct ib_device *ibdev __unused,
|
501
|
500
|
|
502
|
501
|
/* Parse source address */
|
503
|
502
|
if ( av->gid_present ) {
|
504
|
|
- ll_src.qpn = htonl ( av->qpn );
|
|
503
|
+ ll_src.flags__qpn = htonl ( av->qpn );
|
505
|
504
|
memcpy ( &ll_src.gid, &av->gid, sizeof ( ll_src.gid ) );
|
506
|
505
|
src = ipoib_cache_peer ( &ll_src );
|
507
|
506
|
ipoib_hdr->u.peer.src = src->key;
|
|
@@ -637,7 +636,7 @@ static int ipoib_open ( struct net_device *netdev ) {
|
637
|
636
|
ib_qp_set_ownerdata ( ipoib->qp, ipoib );
|
638
|
637
|
|
639
|
638
|
/* Update MAC address with QPN */
|
640
|
|
- mac->qpn = htonl ( ipoib->qp->qpn );
|
|
639
|
+ mac->flags__qpn = htonl ( ipoib->qp->qpn );
|
641
|
640
|
|
642
|
641
|
/* Fill receive rings */
|
643
|
642
|
ib_refill_recv ( ibdev, ipoib->qp );
|
|
@@ -670,7 +669,7 @@ static void ipoib_close ( struct net_device *netdev ) {
|
670
|
669
|
ipoib_leave_broadcast_group ( ipoib );
|
671
|
670
|
|
672
|
671
|
/* Remove QPN from MAC address */
|
673
|
|
- mac->qpn = 0;
|
|
672
|
+ mac->flags__qpn = 0;
|
674
|
673
|
|
675
|
674
|
/* Tear down the queues */
|
676
|
675
|
ib_destroy_qp ( ibdev, ipoib->qp );
|