i40e: assign correct vector to VF
authorMitch Williams <mitch.a.williams@intel.com>
Sat, 28 Sep 2013 07:13:18 +0000 (07:13 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 22 Oct 2013 12:33:44 +0000 (05:33 -0700)
Correct math error when assigning MSI-X vectors to VFs. The vectors-per-vf
value reported by the hardware already conveniently reports one less than the
actual value.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

index 8967e58..35f4909 100644 (file)
@@ -251,7 +251,7 @@ static void i40e_config_irq_link_list(struct i40e_vf *vf, u16 vsi_idx,
                reg_idx = I40E_VPINT_LNKLST0(vf->vf_id);
        else
                reg_idx = I40E_VPINT_LNKLSTN(
-                           ((pf->hw.func_caps.num_msix_vectors_vf - 1)
+                                          (pf->hw.func_caps.num_msix_vectors_vf
                                              * vf->vf_id) + (vector_id - 1));
 
        if (vecmap->rxq_map == 0 && vecmap->txq_map == 0) {