sfc: Store the efx_nic struct of the current VF in the VF data struct
Initialised in efx_probe_vf and removal is dealt with in efx_ef10_remove. vf->efx is needed in future patches to change the MAC address of the VF via the parent PF, while the driver is bound to the VF. Example: ip link set dev vf NUM mac LLADDR Signed-off-by: Shradha Shah <sshah@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
cfc77c2fba
commit
f1122a345b
@@ -160,6 +160,8 @@ static void efx_ef10_sriov_free_vf_vports(struct efx_nic *efx)
|
||||
efx_ef10_vport_free(efx, vf->vport_id);
|
||||
vf->vport_id = 0;
|
||||
}
|
||||
|
||||
vf->efx = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,6 +217,7 @@ static int efx_ef10_sriov_alloc_vf_vswitching(struct efx_nic *efx)
|
||||
|
||||
for (i = 0; i < efx->vf_count; i++) {
|
||||
random_ether_addr(nic_data->vf[i].mac);
|
||||
nic_data->vf[i].efx = NULL;
|
||||
|
||||
rc = efx_ef10_sriov_assign_vf_vport(efx, i);
|
||||
if (rc)
|
||||
|
Reference in New Issue
Block a user