summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/ipoib.c
diff options
context:
space:
mode:
authorMichael Brown2009-07-07 15:03:11 +0200
committerMichael Brown2009-07-18 00:06:33 +0200
commitb4155c4ab541693f35f2efe76d6dc75dd4cb7825 (patch)
treee90bc2a5f9b2213cb4bbdd837e161dd796b7f8d5 /src/drivers/net/ipoib.c
parent[ipoib] Clarify new role of IPoIB peer cache as for MAC addresses only (diff)
downloadipxe-b4155c4ab541693f35f2efe76d6dc75dd4cb7825.tar.gz
ipxe-b4155c4ab541693f35f2efe76d6dc75dd4cb7825.tar.xz
ipxe-b4155c4ab541693f35f2efe76d6dc75dd4cb7825.zip
[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.c10
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;