mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 14:42:08 +02:00
net/enic: Allow at least 8 RQs to always be used
Enic started using netif_get_num_default_rss_queues() to set the number
of RQs used in commit cc94d6c4d4 ("enic: Adjust used MSI-X
wq/rq/cq/interrupt resources in a more robust way")
This resulted in machines with less than 16 cpus using less than 8 RQs.
Allow enic to use at least 8 RQs no matter how many cpus are in the
machine to not impact existing enic workloads after a kernel upgrade.
Reviewed-by: John Daley <johndale@cisco.com>
Reviewed-by: Satish Kharat <satishkh@cisco.com>
Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Link: https://patch.msgid.link/20250521-enic_min_8rq-v1-1-691bd2353273@cisco.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
17fcb3dc12
commit
8fa18a3e8c
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#define ENIC_WQ_MAX 256
|
||||
#define ENIC_RQ_MAX 256
|
||||
#define ENIC_RQ_MIN_DEFAULT 8
|
||||
|
||||
#define ENIC_WQ_NAPI_BUDGET 256
|
||||
|
||||
|
|
|
|||
|
|
@ -2296,7 +2296,8 @@ static int enic_adjust_resources(struct enic *enic)
|
|||
* used based on which resource is the most constrained
|
||||
*/
|
||||
wq_avail = min(enic->wq_avail, ENIC_WQ_MAX);
|
||||
rq_default = netif_get_num_default_rss_queues();
|
||||
rq_default = max(netif_get_num_default_rss_queues(),
|
||||
ENIC_RQ_MIN_DEFAULT);
|
||||
rq_avail = min3(enic->rq_avail, ENIC_RQ_MAX, rq_default);
|
||||
max_queues = min(enic->cq_avail,
|
||||
enic->intr_avail - ENIC_MSIX_RESERVED_INTR);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user