diff options
author | Sean Hefty <sean.hefty@intel.com> | 2007-04-05 14:50:11 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-04-24 19:31:12 -0400 |
commit | 46f1b3d7aff99ef4c1e729e023b9c8ee51de5973 (patch) | |
tree | f627ca5c470e4092912335d2f8bb011df63293a2 /drivers/infiniband | |
parent | d0e7bb141837db620f24406ca8b4667424138d42 (diff) |
IB/ipoib: Use ib_init_ah_from_path to initialize ah_attr
To support destinations that are not on the local IB subnet, IPoIB
should include the GRH information when constructing an address
handle. Using the existing ib_init_ah_from_path() call will do this
for us.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index f2a40ae8e7d0..b4c380c5a3ba 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c | |||
@@ -395,14 +395,10 @@ static void path_rec_completion(int status, | |||
395 | skb_queue_head_init(&skqueue); | 395 | skb_queue_head_init(&skqueue); |
396 | 396 | ||
397 | if (!status) { | 397 | if (!status) { |
398 | struct ib_ah_attr av = { | 398 | struct ib_ah_attr av; |
399 | .dlid = be16_to_cpu(pathrec->dlid), | 399 | |
400 | .sl = pathrec->sl, | 400 | if (!ib_init_ah_from_path(priv->ca, priv->port, pathrec, &av)) |
401 | .port_num = priv->port, | 401 | ah = ipoib_create_ah(dev, priv->pd, &av); |
402 | .static_rate = pathrec->rate | ||
403 | }; | ||
404 | |||
405 | ah = ipoib_create_ah(dev, priv->pd, &av); | ||
406 | } | 402 | } |
407 | 403 | ||
408 | spin_lock_irqsave(&priv->lock, flags); | 404 | spin_lock_irqsave(&priv->lock, flags); |