]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: mana: Set default number of queues to 16
authorLong Li <longli@microsoft.com>
Mon, 23 Mar 2026 19:49:25 +0000 (12:49 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 26 Mar 2026 14:04:31 +0000 (15:04 +0100)
Set the default number of queues per vPort to MANA_DEF_NUM_QUEUES (16),
as 16 queues can achieve optimal throughput for typical workloads. The
actual number of queues may be lower if it exceeds the hardware reported
limit. Users can increase the number of queues up to max_queues via
ethtool if needed.

Signed-off-by: Long Li <longli@microsoft.com>
Link: https://patch.msgid.link/20260323194925.1766385-1-longli@microsoft.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/microsoft/mana/mana_en.c
include/net/mana/mana.h

index 49c65cc1697c6c7e8895f3bf1df1e7adc771dcb1..b39e8b9207919bbc7f22bf0a2e75add63800d785 100644 (file)
@@ -3357,7 +3357,8 @@ static int mana_probe_port(struct mana_context *ac, int port_idx,
        apc->ac = ac;
        apc->ndev = ndev;
        apc->max_queues = gc->max_num_queues;
-       apc->num_queues = gc->max_num_queues;
+       /* Use MANA_DEF_NUM_QUEUES as default, still honoring the HW limit */
+       apc->num_queues = min(gc->max_num_queues, MANA_DEF_NUM_QUEUES);
        apc->tx_queue_size = DEF_TX_BUFFERS_PER_QUEUE;
        apc->rx_queue_size = DEF_RX_BUFFERS_PER_QUEUE;
        apc->port_handle = INVALID_MANA_HANDLE;
index 3336688fed5e98b2ddcce4cb3be3332e5babdd86..96d21cbbdee287af37c646c056be06c2b7ff431a 100644 (file)
@@ -1007,6 +1007,7 @@ struct mana_deregister_filter_resp {
 #define STATISTICS_FLAGS_TX_ERRORS_GDMA_ERROR          0x0000000004000000
 
 #define MANA_MAX_NUM_QUEUES 64
+#define MANA_DEF_NUM_QUEUES 16
 
 #define MANA_SHORT_VPORT_OFFSET_MAX ((1U << 8) - 1)