Skip to content

Commit

Permalink
IB/ipoib: Use ib_init_ah_from_path to initialize ah_attr
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sean Hefty authored and Roland Dreier committed Apr 24, 2007
1 parent d0e7bb1 commit 46f1b3d
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions drivers/infiniband/ulp/ipoib/ipoib_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,14 +395,10 @@ static void path_rec_completion(int status,
skb_queue_head_init(&skqueue);

if (!status) {
struct ib_ah_attr av = {
.dlid = be16_to_cpu(pathrec->dlid),
.sl = pathrec->sl,
.port_num = priv->port,
.static_rate = pathrec->rate
};

ah = ipoib_create_ah(dev, priv->pd, &av);
struct ib_ah_attr av;

if (!ib_init_ah_from_path(priv->ca, priv->port, pathrec, &av))
ah = ipoib_create_ah(dev, priv->pd, &av);
}

spin_lock_irqsave(&priv->lock, flags);
Expand Down

0 comments on commit 46f1b3d

Please sign in to comment.