diff options
author | Stefan Assmann <sassmann@kpanic.de> | 2016-09-19 07:37:51 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2016-10-03 22:10:05 -0400 |
commit | abd97a94ba913d121a920d5541aba1e568be6972 (patch) | |
tree | 61408ddf97c56b63d2b51cddb130b00bc156a39c /drivers/net | |
parent | 4ce20abc645fc1822e86d9845a8562347e877b36 (diff) |
i40e: fix sideband flow director vector allocation
Currently if the MSI-X vector limit is reached the sideband flow
director gets disabled. A bit too early to make that decision, as
vectors may get re-distributed. So move the check further back.
Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_main.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index ca7dd43abf5a..0044c29ca31e 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c | |||
@@ -7641,7 +7641,6 @@ static int i40e_init_msix(struct i40e_pf *pf) | |||
7641 | vectors_left--; | 7641 | vectors_left--; |
7642 | } else { | 7642 | } else { |
7643 | pf->num_fdsb_msix = 0; | 7643 | pf->num_fdsb_msix = 0; |
7644 | pf->flags &= ~I40E_FLAG_FD_SB_ENABLED; | ||
7645 | } | 7644 | } |
7646 | } | 7645 | } |
7647 | 7646 | ||
@@ -7738,7 +7737,6 @@ static int i40e_init_msix(struct i40e_pf *pf) | |||
7738 | pf->num_fcoe_qps = 0; | 7737 | pf->num_fcoe_qps = 0; |
7739 | pf->num_fcoe_msix = 0; | 7738 | pf->num_fcoe_msix = 0; |
7740 | #endif | 7739 | #endif |
7741 | pf->flags &= ~I40E_FLAG_FD_SB_ENABLED; | ||
7742 | 7740 | ||
7743 | /* partition out the remaining vectors */ | 7741 | /* partition out the remaining vectors */ |
7744 | switch (vec) { | 7742 | switch (vec) { |
@@ -7770,6 +7768,10 @@ static int i40e_init_msix(struct i40e_pf *pf) | |||
7770 | pf->num_vmdq_vsis = min_t(int, (vec / 2), | 7768 | pf->num_vmdq_vsis = min_t(int, (vec / 2), |
7771 | I40E_DEFAULT_NUM_VMDQ_VSI); | 7769 | I40E_DEFAULT_NUM_VMDQ_VSI); |
7772 | } | 7770 | } |
7771 | if (pf->flags & I40E_FLAG_FD_SB_ENABLED) { | ||
7772 | pf->num_fdsb_msix = 1; | ||
7773 | vec--; | ||
7774 | } | ||
7773 | pf->num_lan_msix = min_t(int, | 7775 | pf->num_lan_msix = min_t(int, |
7774 | (vec - (pf->num_iwarp_msix + pf->num_vmdq_vsis)), | 7776 | (vec - (pf->num_iwarp_msix + pf->num_vmdq_vsis)), |
7775 | pf->num_lan_msix); | 7777 | pf->num_lan_msix); |
@@ -7785,6 +7787,11 @@ static int i40e_init_msix(struct i40e_pf *pf) | |||
7785 | } | 7787 | } |
7786 | } | 7788 | } |
7787 | 7789 | ||
7790 | if ((pf->flags & I40E_FLAG_FD_SB_ENABLED) && | ||
7791 | (pf->num_fdsb_msix == 0)) { | ||
7792 | dev_info(&pf->pdev->dev, "Sideband Flowdir disabled, not enough MSI-X vectors\n"); | ||
7793 | pf->flags &= ~I40E_FLAG_FD_SB_ENABLED; | ||
7794 | } | ||
7788 | if ((pf->flags & I40E_FLAG_VMDQ_ENABLED) && | 7795 | if ((pf->flags & I40E_FLAG_VMDQ_ENABLED) && |
7789 | (pf->num_vmdq_msix == 0)) { | 7796 | (pf->num_vmdq_msix == 0)) { |
7790 | dev_info(&pf->pdev->dev, "VMDq disabled, not enough MSI-X vectors\n"); | 7797 | dev_info(&pf->pdev->dev, "VMDq disabled, not enough MSI-X vectors\n"); |