OSDN Git Service

i40e: Limiting RSS queues to CPUs
authorAleksandr Loktionov <aleksandr.loktionov@intel.com>
Wed, 19 Dec 2018 14:45:37 +0000 (06:45 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 22 Jan 2019 14:57:04 +0000 (06:57 -0800)
Limiting RSS queues number to online CPUs number in order to
avoid issues with creating misconfigured RSS queues.

Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c

index 0ee641c..b531184 100644 (file)
@@ -11042,6 +11042,7 @@ int i40e_reconfig_rss_queues(struct i40e_pf *pf, int queue_count)
        if (!(pf->flags & I40E_FLAG_RSS_ENABLED))
                return 0;
 
+       queue_count = min_t(int, queue_count, num_online_cpus());
        new_rss_size = min_t(int, queue_count, pf->rss_size_max);
 
        if (queue_count != vsi->num_queue_pairs) {