i40e: Allow RSS table entry range and GPS to be any number, not necessarily power...
authorAnjali Singhai Jain <anjali.singhai@intel.com>
Tue, 20 May 2014 08:01:46 +0000 (08:01 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 9 Jun 2014 08:08:24 +0000 (01:08 -0700)
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>
drivers/net/ethernet/intel/i40e/i40e_main.c

index 2f115423e33059b379db38be3af6625c6a6d4d0d..adbeac47a75481d9cc13ffd9aedd8581fc8b0e0a 100644 (file)
@@ -1366,7 +1366,7 @@ static void i40e_vsi_setup_queue_map(struct i40e_vsi *vsi,
        vsi->tc_config.numtc = numtc;
        vsi->tc_config.enabled_tc = enabled_tc ? enabled_tc : 1;
        /* Number of queues per enabled TC */
-       num_tc_qps = rounddown_pow_of_two(vsi->alloc_queue_pairs/numtc);
+       num_tc_qps = vsi->alloc_queue_pairs/numtc;
        num_tc_qps = min_t(int, num_tc_qps, I40E_MAX_QUEUES_PER_TC);
 
        /* 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)
                return 0;
 
        queue_count = min_t(int, queue_count, pf->rss_size_max);
-       queue_count = rounddown_pow_of_two(queue_count);
 
        if (queue_count != pf->rss_size) {
                i40e_prep_for_reset(pf);
@@ -6554,7 +6553,6 @@ static int i40e_sw_init(struct i40e_pf *pf)
        if (pf->hw.func_caps.rss) {
                pf->flags |= I40E_FLAG_RSS_ENABLED;
                pf->rss_size = min_t(int, pf->rss_size_max, num_online_cpus());
-               pf->rss_size = rounddown_pow_of_two(pf->rss_size);
        } else {
                pf->rss_size = 1;
        }