i40e/i40evf: pass QOS handle to VF
authorMitch Williams <mitch.a.williams@intel.com>
Fri, 28 Aug 2015 21:55:58 +0000 (17:55 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 8 Oct 2015 23:30:13 +0000 (16:30 -0700)
The VF really doesn't care about the QOS handle but it will in the
future. Since the VF only uses TC0, send it that handle. On the VF
side, save the handle and use it to populate the QOS params when we call
into the client interface.

Change-ID: I76f41b070baeaa09b19383e9168bc677837e0761
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
drivers/net/ethernet/intel/i40evf/i40evf.h
drivers/net/ethernet/intel/i40evf/i40evf_main.c

index 678623fcd21328a237ec4dda2424dcf0d6621d4a..ee747dc5d6174e7a7aeb1e49780e95e76b1a0372 100644 (file)
@@ -1210,8 +1210,10 @@ static int i40e_vc_get_vf_resources_msg(struct i40e_vf *vf, u8 *msg)
        if (vf->lan_vsi_idx) {
                vfres->vsi_res[i].vsi_id = vf->lan_vsi_id;
                vfres->vsi_res[i].vsi_type = I40E_VSI_SRIOV;
-               vfres->vsi_res[i].num_queue_pairs =
-                   pf->vsi[vf->lan_vsi_idx]->alloc_queue_pairs;
+               vfres->vsi_res[i].num_queue_pairs = vsi->alloc_queue_pairs;
+               /* VFs only use TC 0 */
+               vfres->vsi_res[i].qset_handle
+                                         = le16_to_cpu(vsi->info.qs_handle[0]);
                ether_addr_copy(vfres->vsi_res[i].default_mac_addr,
                                vf->default_lan_addr.addr);
                i++;
index 27dc3fe144a827492a2f7302e17db9131f9f0803..e7a223ea6c25ed6d911ba8fbb09669bb203567bd 100644 (file)
@@ -66,6 +66,7 @@ struct i40e_vsi {
         */
        u16 rx_itr_setting;
        u16 tx_itr_setting;
+       u16 qs_handle;
 };
 
 /* How many Rx Buffers do we bundle into one write to the hardware ? */
index 1f999305c406b1373ea2e0616ac029055c5723df..c00e4959f0263757ff03cfbddf2342bc62651740 100644 (file)
@@ -2115,6 +2115,7 @@ int i40evf_process_config(struct i40evf_adapter *adapter)
        adapter->vsi.tx_itr_setting = (I40E_ITR_DYNAMIC |
                                       ITR_REG_TO_USEC(I40E_ITR_TX_DEF));
        adapter->vsi.netdev = adapter->netdev;
+       adapter->vsi.qs_handle = adapter->vsi_res->qset_handle;
        return 0;
 }