aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnjali Singhai Jain <anjali.singhai@intel.com>2014-05-20 04:01:46 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-06-09 04:08:24 -0400
commiteb051afedf0ace9bf1356d5178f08ef00e6e3249 (patch)
treedba80df06288447b2de128362cd80222f513d955
parent29f71bb0915db39c493235b63abf6b03150db84f (diff)
i40e: Allow RSS table entry range and GPS to be any number, not necessarily power of 2
We tell the HW upper boundary of power of 2 in VSI config, but the HW does not restrict us to use just power of 2 GPS in case of RSS as long as we are not sharing the RSS table with another VSI (VMDq). We at present are not doing RSS in VMDq VSI. If we were to enable that and if the system had CPU count which was not power 2, the VMDq VSIs will see a little skewed distribution. Change-ID: I3ea797ce9065a3ca4fc4d04251bf195463410473 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 2f115423e330..adbeac47a754 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -1366,7 +1366,7 @@ static void i40e_vsi_setup_queue_map(struct i40e_vsi *vsi,
1366 vsi->tc_config.numtc = numtc; 1366 vsi->tc_config.numtc = numtc;
1367 vsi->tc_config.enabled_tc = enabled_tc ? enabled_tc : 1; 1367 vsi->tc_config.enabled_tc = enabled_tc ? enabled_tc : 1;
1368 /* Number of queues per enabled TC */ 1368 /* Number of queues per enabled TC */
1369 num_tc_qps = rounddown_pow_of_two(vsi->alloc_queue_pairs/numtc); 1369 num_tc_qps = vsi->alloc_queue_pairs/numtc;
1370 num_tc_qps = min_t(int, num_tc_qps, I40E_MAX_QUEUES_PER_TC); 1370 num_tc_qps = min_t(int, num_tc_qps, I40E_MAX_QUEUES_PER_TC);
1371 1371
1372 /* Setup queue offset/count for all TCs for given VSI */ 1372 /* Setup queue offset/count for all TCs for given VSI */
@@ -6498,7 +6498,6 @@ int i40e_reconfig_rss_queues(struct i40e_pf *pf, int queue_count)
6498 return 0; 6498 return 0;
6499 6499
6500 queue_count = min_t(int, queue_count, pf->rss_size_max); 6500 queue_count = min_t(int, queue_count, pf->rss_size_max);
6501 queue_count = rounddown_pow_of_two(queue_count);
6502 6501
6503 if (queue_count != pf->rss_size) { 6502 if (queue_count != pf->rss_size) {
6504 i40e_prep_for_reset(pf); 6503 i40e_prep_for_reset(pf);
@@ -6554,7 +6553,6 @@ static int i40e_sw_init(struct i40e_pf *pf)
6554 if (pf->hw.func_caps.rss) { 6553 if (pf->hw.func_caps.rss) {
6555 pf->flags |= I40E_FLAG_RSS_ENABLED; 6554 pf->flags |= I40E_FLAG_RSS_ENABLED;
6556 pf->rss_size = min_t(int, pf->rss_size_max, num_online_cpus()); 6555 pf->rss_size = min_t(int, pf->rss_size_max, num_online_cpus());
6557 pf->rss_size = rounddown_pow_of_two(pf->rss_size);
6558 } else { 6556 } else {
6559 pf->rss_size = 1; 6557 pf->rss_size = 1;
6560 } 6558 }