Skip to content

Commit 6a1ce2f

Browse files
Netanel Belgazaldavem330
authored andcommitted
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>
1 parent fdeea0a commit 6a1ce2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/amazon/ena/ena_netdev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2658,7 +2658,7 @@ static int ena_calc_io_queue_num(struct pci_dev *pdev,
26582658
io_sq_num = get_feat_ctx->max_queues.max_sq_num;
26592659
}
26602660

2661-
io_queue_num = min_t(int, num_possible_cpus(), ENA_MAX_NUM_IO_QUEUES);
2661+
io_queue_num = min_t(int, num_online_cpus(), ENA_MAX_NUM_IO_QUEUES);
26622662
io_queue_num = min_t(int, io_queue_num, io_sq_num);
26632663
io_queue_num = min_t(int, io_queue_num,
26642664
get_feat_ctx->max_queues.max_cq_num);

0 commit comments

Comments
 (0)