mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-22 20:23:57 +08:00
net/ena: fix queues number calculation
The ENA driver tries to open a queue per vCPU. To determine how many vCPUs the instance have it uses num_possible_cpus() while it should have use num_online_cpus() instead. Signed-off-by: Netanel Belgazal <netanel@annapurnalabs.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
fdeea0ad87
commit
6a1ce2fb67
@ -2658,7 +2658,7 @@ static int ena_calc_io_queue_num(struct pci_dev *pdev,
|
||||
io_sq_num = get_feat_ctx->max_queues.max_sq_num;
|
||||
}
|
||||
|
||||
io_queue_num = min_t(int, num_possible_cpus(), ENA_MAX_NUM_IO_QUEUES);
|
||||
io_queue_num = min_t(int, num_online_cpus(), ENA_MAX_NUM_IO_QUEUES);
|
||||
io_queue_num = min_t(int, io_queue_num, io_sq_num);
|
||||
io_queue_num = min_t(int, io_queue_num,
|
||||
get_feat_ctx->max_queues.max_cq_num);
|
||||
|
Loading…
Reference in New Issue
Block a user