i40e: Do not check VF state in i40e_ndo_get_vf_config
Subsystems (2)
PATCH 1/1 i40e: Do not check VF state in i40e_ndo_get_vf_config
The VF configuration returned in i40e_ndo_get_vf_config is already stored by the PF. There is no dependency on any specific state of the VF to return the configuration. Drop the check against I40E_VF_STATE_INIT since it is not needed.
--- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +2 -4
@@ -4299,10 +4299,8 @@ int i40e_ndo_get_vf_config(struct net_device *netdev, vf = &pf->vf[vf_id];/* first vsi is always the LAN vsi */ vsi = pf->vsi[vf->lan_vsi_idx]; -if (!test_bit (I40E_VF_STATE_INIT , &vf->vf_states)) { -dev_err (&pf->pdev->dev,"VF %d still in reset. Try again.\n" , - vf_id); - ret = -EAGAIN ; +if (!vsi) { + ret = -ENOENT ; goto error_param; }
Signature · 1 line
2.20.1
Bowers
PATCH 1/1 i40e: Do not check VF state in i40e_ndo_get_vf_config
Quoted 13 lines
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On Behalf Of Lihong Yang
Sent: Thursday, May 23, 2019 4:46 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH] i40e: Do not check VF state ini40e_ndo_get_vf_configThe VF configuration returned in
i40e_ndo_get_vf_configis already stored by the PF. There is no dependency on any specific state of the VF to return the configuration.
Drop the check againstI40E_VF_STATE_INITsince it is not needed.
Quoted 4 lines
Signed-off-by Lihong Yang <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)