Commit 4f8448df authored by Ralph Campbell's avatar Ralph Campbell Committed by Roland Dreier

IB: Set GIDs correctly in ib_create_ah_from_wc()

ib_create_ah_from_wc() doesn't create the correct return address (AH)
when there is a GRH present (source & dest GIDs need to be swapped).
Signed-off-by: default avatarRalph Campbell <ralphc@pathscale.com>
Signed-off-by: default avatarSean Hefty <sean.hefty@intel.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent ac4e7b35
...@@ -107,9 +107,9 @@ struct ib_ah *ib_create_ah_from_wc(struct ib_pd *pd, struct ib_wc *wc, ...@@ -107,9 +107,9 @@ struct ib_ah *ib_create_ah_from_wc(struct ib_pd *pd, struct ib_wc *wc,
if (wc->wc_flags & IB_WC_GRH) { if (wc->wc_flags & IB_WC_GRH) {
ah_attr.ah_flags = IB_AH_GRH; ah_attr.ah_flags = IB_AH_GRH;
ah_attr.grh.dgid = grh->dgid; ah_attr.grh.dgid = grh->sgid;
ret = ib_find_cached_gid(pd->device, &grh->sgid, &port_num, ret = ib_find_cached_gid(pd->device, &grh->dgid, &port_num,
&gid_index); &gid_index);
if (ret) if (ret)
return ERR_PTR(ret); return ERR_PTR(ret);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment