iavf: Limiting RSS queues to CPUs
authorAleksandr Loktionov <aleksandr.loktionov@intel.com>
Fri, 29 Mar 2019 19:48:50 +0000 (12:48 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 31 May 2019 07:09:11 +0000 (00:09 -0700)
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/iavf/iavf_virtchnl.c

index e64751da09212ae6c95088e5296af784e1ca00a1..357c74bc3265c8ecc9a0b95c981a4ed0b29ec5c5 100644 (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;