net/i40e: return correct VSI id
authorChen Jing D(Mark) <jing.d.chen@intel.com>
Fri, 13 Jan 2017 03:13:19 +0000 (11:13 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 17 Jan 2017 18:48:02 +0000 (19:48 +0100)
PF host didn't return correct VSI id to VF.
This change fix it.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
drivers/net/i40e/i40e_pf.c

index 25f2fc9..d919c26 100644 (file)
@@ -347,8 +347,7 @@ i40e_pf_host_process_cmd_get_vf_resource(struct i40e_pf_vf *vf, bool b_op)
 
        /* Change below setting if PF host can support more VSIs for VF */
        vf_res->vsi_res[0].vsi_type = I40E_VSI_SRIOV;
-       /* As assume Vf only has single VSI now, always return 0 */
-       vf_res->vsi_res[0].vsi_id = 0;
+       vf_res->vsi_res[0].vsi_id = vf->vsi->vsi_id;
        vf_res->vsi_res[0].num_queue_pairs = vf->vsi->nb_qps;
        ether_addr_copy(&vf->mac_addr,
                (struct ether_addr *)vf_res->vsi_res[0].default_mac_addr);