aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnjali Singhai <anjali.singhai@intel.com>2015-02-21 01:43:19 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2015-02-26 07:53:59 -0500
commit7f9ff47683cb7441e6d0496365bcf64738f6d2d4 (patch)
treefefe2aca765a0898ba8a784a07289d77d4fdd476
parenta68de58d2791dd9f2b159703b70377011b35a568 (diff)
i40e: Fix the case where per TC queue count was higher than queues enabled
When the driver or hardware gets less interrupt vectors than the actual number of CPU cores, limit the queue count for the priority queue traffic class (TC) queues. This will fix a warning with multiple function mode where systems regularly have more cores than vectors. Also add extra comment for readability. Change-ID: I4f02226263aa3995e1f5ee5503eac0cd6ee12fbd Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Jim Young <james.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 6bb637653d12..a926e3bf1d6d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -1512,7 +1512,12 @@ static void i40e_vsi_setup_queue_map(struct i40e_vsi *vsi,
1512 vsi->tc_config.numtc = numtc; 1512 vsi->tc_config.numtc = numtc;
1513 vsi->tc_config.enabled_tc = enabled_tc ? enabled_tc : 1; 1513 vsi->tc_config.enabled_tc = enabled_tc ? enabled_tc : 1;
1514 /* Number of queues per enabled TC */ 1514 /* Number of queues per enabled TC */
1515 num_tc_qps = vsi->alloc_queue_pairs/numtc; 1515 /* In MFP case we can have a much lower count of MSIx
1516 * vectors available and so we need to lower the used
1517 * q count.
1518 */
1519 qcount = min_t(int, vsi->alloc_queue_pairs, pf->num_lan_msix);
1520 num_tc_qps = qcount / numtc;
1516 num_tc_qps = min_t(int, num_tc_qps, I40E_MAX_QUEUES_PER_TC); 1521 num_tc_qps = min_t(int, num_tc_qps, I40E_MAX_QUEUES_PER_TC);
1517 1522
1518 /* Setup queue offset/count for all TCs for given VSI */ 1523 /* Setup queue offset/count for all TCs for given VSI */