On Sun, Jan 3, 2016 at 9:03 PM, Jason Gunthorpe <jgunthorpe@xxxxxxxxxxxxxxxxxxxx> wrote: > On Sun, Jan 03, 2016 at 03:59:11PM +0200, Matan Barak wrote: >> @@ -434,6 +434,7 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 port_num, >> int ret; >> enum rdma_network_type net_type = RDMA_NETWORK_IB; >> enum ib_gid_type gid_type = IB_GID_TYPE_IB; >> + int hoplimit = grh->hop_limit; > >> ah_attr->grh.flow_label = flow_class & 0xFFFFF; >> - ah_attr->grh.hop_limit = 0xFF; >> + ah_attr->grh.hop_limit = hoplimit; > > No, this is wrong for IB. Please be careful to follow the IB > specification language for computing a hop limit on a reversible path. > You're right, this should be 0xff. Thanks. > No idea about rocee, but I can't believe using grh->hop_limit is right > there either. > Regarding RoCE, the hop limit is set from the routing table (in the same function): ret = rdma_addr_find_l2_eth_by_grh(&dgid, &sgid, ah_attr->dmac, wc->wc_flags & IB_WC_WITH_VLAN ? NULL : &vlan_id, &if_index, &hoplimit); > Jason > Regards, Matan > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html