From eaceb0bfc7a0df03ba6e45d05392783a0e8de90a Mon Sep 17 00:00:00 2001 From: Alex Forencich Date: Wed, 3 May 2023 01:38:23 -0700 Subject: [PATCH] modules/mqnic: More sensible default queue counts Signed-off-by: Alex Forencich --- modules/mqnic/mqnic_netdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/mqnic/mqnic_netdev.c b/modules/mqnic/mqnic_netdev.c index f5068b472..412efa5d8 100644 --- a/modules/mqnic/mqnic_netdev.c +++ b/modules/mqnic/mqnic_netdev.c @@ -567,8 +567,8 @@ struct net_device *mqnic_create_netdev(struct mqnic_if *interface, int index, in // associate interface resources priv->if_features = interface->if_features; - priv->txq_count = mqnic_res_get_count(interface->txq_res); - priv->rxq_count = mqnic_res_get_count(interface->rxq_res); + priv->txq_count = min_t(u32, mqnic_res_get_count(interface->txq_res), 256); + priv->rxq_count = min_t(u32, mqnic_res_get_count(interface->rxq_res), num_online_cpus()); priv->tx_ring_size = mqnic_num_txq_entries; priv->rx_ring_size = mqnic_num_rxq_entries;