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 <[EMAIL PROTECTED]>

Index: gen2/trunk/src/linux-kernel/infiniband/core/verbs.c
===================================================================
--- verbs.c     (revision 4718)
+++ verbs.c     (working copy)
@@ -106,9 +106,9 @@
 
        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);

-- 
Ralph Campbell <[EMAIL PROTECTED]>


_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to