Date: Fri, 30 Mar 2018 18:32:38 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331782 - stable/11/sys/ofed/drivers/infiniband/core Message-ID: <201803301832.w2UIWcvb077232@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Fri Mar 30 18:32:38 2018 New Revision: 331782 URL: https://svnweb.freebsd.org/changeset/base/331782 Log: MFC r330506: Pass valid if_index to rdma_addr_find_l2_eth_by_grh() in ibcore when possible. Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_verbs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_verbs.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/ib_verbs.c Fri Mar 30 18:31:14 2018 (r331781) +++ stable/11/sys/ofed/drivers/infiniband/core/ib_verbs.c Fri Mar 30 18:32:38 2018 (r331782) @@ -483,7 +483,7 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 po return ret; if (rdma_protocol_roce(device, port_num)) { - int if_index = 0; + int if_index; u16 vlan_id = wc->wc_flags & IB_WC_WITH_VLAN ? wc->vlan_id : 0xffff; struct net_device *idev; @@ -498,6 +498,12 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 po idev = device->get_netdev(device, port_num); if (!idev) return -ENODEV; + + /* + * Get network interface index early on. This is + * useful for IPv6 link local addresses: + */ + if_index = idev->if_index; ret = rdma_addr_find_l2_eth_by_grh(&dgid, &sgid, ah_attr->dmac,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803301832.w2UIWcvb077232>