mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
1 changed files with 7 additions and 1 deletions
|
|
@ -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 a new issue