aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/intel')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index f95c04a906dd..83fee7ffce07 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -6699,6 +6699,7 @@ static int i40e_init_msix(struct i40e_pf *pf)
6699{ 6699{
6700 i40e_status err = 0; 6700 i40e_status err = 0;
6701 struct i40e_hw *hw = &pf->hw; 6701 struct i40e_hw *hw = &pf->hw;
6702 int other_vecs = 0;
6702 int v_budget, i; 6703 int v_budget, i;
6703 int vec; 6704 int vec;
6704 6705
@@ -6724,10 +6725,10 @@ static int i40e_init_msix(struct i40e_pf *pf)
6724 */ 6725 */
6725 pf->num_lan_msix = pf->num_lan_qps - (pf->rss_size_max - pf->rss_size); 6726 pf->num_lan_msix = pf->num_lan_qps - (pf->rss_size_max - pf->rss_size);
6726 pf->num_vmdq_msix = pf->num_vmdq_qps; 6727 pf->num_vmdq_msix = pf->num_vmdq_qps;
6727 v_budget = 1 + pf->num_lan_msix; 6728 other_vecs = 1;
6728 v_budget += (pf->num_vmdq_vsis * pf->num_vmdq_msix); 6729 other_vecs += (pf->num_vmdq_vsis * pf->num_vmdq_msix);
6729 if (pf->flags & I40E_FLAG_FD_SB_ENABLED) 6730 if (pf->flags & I40E_FLAG_FD_SB_ENABLED)
6730 v_budget++; 6731 other_vecs++;
6731 6732
6732#ifdef I40E_FCOE 6733#ifdef I40E_FCOE
6733 if (pf->flags & I40E_FLAG_FCOE_ENABLED) { 6734 if (pf->flags & I40E_FLAG_FCOE_ENABLED) {
@@ -6737,7 +6738,9 @@ static int i40e_init_msix(struct i40e_pf *pf)
6737 6738
6738#endif 6739#endif
6739 /* Scale down if necessary, and the rings will share vectors */ 6740 /* Scale down if necessary, and the rings will share vectors */
6740 v_budget = min_t(int, v_budget, hw->func_caps.num_msix_vectors); 6741 pf->num_lan_msix = min_t(int, pf->num_lan_msix,
6742 (hw->func_caps.num_msix_vectors - other_vecs));
6743 v_budget = pf->num_lan_msix + other_vecs;
6741 6744
6742 pf->msix_entries = kcalloc(v_budget, sizeof(struct msix_entry), 6745 pf->msix_entries = kcalloc(v_budget, sizeof(struct msix_entry),
6743 GFP_KERNEL); 6746 GFP_KERNEL);