Pass valid if_index to rdma_addr_find_l2_eth_by_grh() in ibcore when possible.
MFC after: 1 week Sponsored by: Mellanox Technologies
This commit is contained in:
parent
197461919d
commit
676833dadb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=330506
@ -483,7 +483,7 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 port_num,
|
||||
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;
|
||||
@ -499,6 +499,12 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 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,
|
||||
wc->wc_flags & IB_WC_WITH_VLAN ?
|
||||
|
Loading…
Reference in New Issue
Block a user