Sean Hefty wrote:
+int ib_init_ah_from_path(struct ib_device *device, u8 port_num,
+                        struct ib_sa_path_rec *rec, struct ib_ah_attr *ah_attr)
+{
+       int ret;
+       u16 gid_index;
+
+       memset(ah_attr, 0, sizeof *ah_attr);
+       ah_attr->dlid = be16_to_cpu(rec->dlid);
+       ah_attr->sl = rec->sl;
+       ah_attr->src_path_bits = be16_to_cpu(rec->slid) & 0x7F;
+       ah_attr->port_num = port_num;
+
+       if (rec->sgid.global.subnet_prefix != rec->dgid.global.subnet_prefix) {
+               ah_attr->ah_flags = IB_AH_GRH;

I should note that I compared the subnet prefixes to determine if the GRH should be used. Reading back over the 'GRH flag in ib_ah_attr' thread, it looks like there's consensus that hop_limit > 1 is the check that we want. I will update the code accordingly.

- Sean
_______________________________________________
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