mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
d0e7bb1418
commit
46f1b3d7af
|
@ -395,13 +395,9 @@ static void path_rec_completion(int status,
|
||||||
skb_queue_head_init(&skqueue);
|
skb_queue_head_init(&skqueue);
|
||||||
|
|
||||||
if (!status) {
|
if (!status) {
|
||||||
struct ib_ah_attr av = {
|
struct ib_ah_attr av;
|
||||||
.dlid = be16_to_cpu(pathrec->dlid),
|
|
||||||
.sl = pathrec->sl,
|
|
||||||
.port_num = priv->port,
|
|
||||||
.static_rate = pathrec->rate
|
|
||||||
};
|
|
||||||
|
|
||||||
|
if (!ib_init_ah_from_path(priv->ca, priv->port, pathrec, &av))
|
||||||
ah = ipoib_create_ah(dev, priv->pd, &av);
|
ah = ipoib_create_ah(dev, priv->pd, &av);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue