iavf: Limiting RSS queues to CPUs

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>
This commit is contained in:
Aleksandr Loktionov 2019-03-29 12:48:50 -07:00 committed by Jeff Kirsher
parent 3dc2154166
commit 6b6b49b56a

View File

@ -416,7 +416,7 @@ int iavf_request_queues(struct iavf_adapter *adapter, int num)
return -EBUSY;
}
vfres.num_queue_pairs = num;
vfres.num_queue_pairs = min_t(int, num, num_online_cpus());
adapter->current_op = VIRTCHNL_OP_REQUEST_QUEUES;
adapter->flags |= IAVF_FLAG_REINIT_ITR_NEEDED;