diff options
author | Michael Brown <mcb30@etherboot.org> | 2009-07-07 14:03:11 +0100 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2009-07-17 23:06:33 +0100 |
commit | b4155c4ab541693f35f2efe76d6dc75dd4cb7825 (patch) | |
tree | e90bc2a5f9b2213cb4bbdd837e161dd796b7f8d5 /src/drivers/net/ipoib.c | |
parent | 8aa2591c06116de3e917c2b94d74a19770edf677 (diff) | |
download | ipxe-b4155c4ab541693f35f2efe76d6dc75dd4cb7825.tar.gz |
[infiniband] Make qkey and rate optional parameters to ib_post_send()
The queue key is stored as a property of the queue pair, and so can
optionally be added by the Infiniband core at the time of calling
ib_post_send(), rather than always having to be specified by the
caller.
This allows IPoIB to avoid explicitly keeping track of the data queue
key.
Diffstat (limited to 'src/drivers/net/ipoib.c')
-rw-r--r-- | src/drivers/net/ipoib.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/drivers/net/ipoib.c b/src/drivers/net/ipoib.c index bf778879..4b9f1e0b 100644 --- a/src/drivers/net/ipoib.c +++ b/src/drivers/net/ipoib.c @@ -67,8 +67,6 @@ struct ipoib_device { struct ib_queue_set meta; /** Broadcast MAC */ struct ipoib_mac broadcast; - /** Data queue key */ - unsigned long data_qkey; /** Attached to multicast group * * This flag indicates whether or not we have attached our @@ -433,7 +431,6 @@ 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; memcpy ( &av.gid, &dest->mac.gid, sizeof ( av.gid ) ); if ( ( rc = ib_resolve_path ( ibdev, &av ) ) != 0 ) { @@ -540,18 +537,19 @@ static void ipoib_meta_complete_send ( struct ib_device *ibdev __unused, */ static void ipoib_recv_mc_member_record ( struct ipoib_device *ipoib, struct ib_mc_member_record *mc_member_record ) { + unsigned long data_qkey; int joined; int rc; /* Record parameters */ joined = ( mc_member_record->scope__join_state & 0x0f ); - ipoib->data_qkey = ntohl ( mc_member_record->qkey ); + data_qkey = ntohl ( mc_member_record->qkey ); DBGC ( ipoib, "IPoIB %p %s broadcast group: qkey %lx\n", - ipoib, ( joined ? "joined" : "left" ), ipoib->data_qkey ); + ipoib, ( joined ? "joined" : "left" ), data_qkey ); /* Update data queue pair qkey */ if ( ( rc = ib_modify_qp ( ipoib->ibdev, ipoib->data.qp, - IB_MODIFY_QKEY, ipoib->data_qkey ) ) != 0 ){ + IB_MODIFY_QKEY, data_qkey ) ) != 0 ){ DBGC ( ipoib, "IPoIB %p could not update data qkey: %s\n", ipoib, strerror ( rc ) ); return; |