[git patch review 2/2] IB: Set GIDs correctly inib_create_ah_from_wc()

From: Roland Dreier
Date: Sat Jan 07 2006 - 12:06:41 EST


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: Ralph Campbell <ralphc@xxxxxxxxxxxxx>
Signed-off-by: Sean Hefty <sean.hefty@xxxxxxxxx>
Signed-off-by: Roland Dreier <rolandd@xxxxxxxxx>

---

drivers/infiniband/core/verbs.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

4f8448dfe8d3804fadad90c9b77494238b4a4eae
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index 4c15e11..c857361 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -107,9 +107,9 @@ struct ib_ah *ib_create_ah_from_wc(struc

if (wc->wc_flags & IB_WC_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);
if (ret)
return ERR_PTR(ret);
--
0.99.9n
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/