summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/amazon/ena/ena_netdev.c
diff options
context:
space:
mode:
authorNetanel Belgazal2017-02-09 14:21:28 +0100
committerDavid S. Miller2017-02-10 04:27:06 +0100
commit6a1ce2fb67161f249b372a87d1d9899d8b087c8e (patch)
tree41437a41b169f46f3d3009ff27092e0809b47025 /drivers/net/ethernet/amazon/ena/ena_netdev.c
parentnet/ena: remove ntuple filter support from device feature list (diff)
downloadkernel-qcow2-linux-6a1ce2fb67161f249b372a87d1d9899d8b087c8e.tar.gz
kernel-qcow2-linux-6a1ce2fb67161f249b372a87d1d9899d8b087c8e.tar.xz
kernel-qcow2-linux-6a1ce2fb67161f249b372a87d1d9899d8b087c8e.zip
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>
Diffstat (limited to 'drivers/net/ethernet/amazon/ena/ena_netdev.c')
-rw-r--r--drivers/net/ethernet/amazon/ena/ena_netdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
index d8cd9cac6cf0..effe686dbcdb 100644
--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
+++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
@@ -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);