summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksandr Loktionov <aleksandr.loktionov@intel.com>2019-03-29 20:48:50 +0100
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2019-05-31 09:09:11 +0200
commit6b6b49b56a6c4333509f15d8861ee6b2c6878bd2 (patch)
tree7956df78b1f88c1332c2547e234c20740e6e96a9
parentiavf: Use printf instead of gnu_printf for iavf_debug_d (diff)
downloadlinux-6b6b49b56a6c4333509f15d8861ee6b2c6878bd2.tar.xz
linux-6b6b49b56a6c4333509f15d8861ee6b2c6878bd2.zip
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>
-rw-r--r--drivers/net/ethernet/intel/iavf/iavf_virtchnl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c b/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
index e64751da0921..357c74bc3265 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
@@ -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;