net: mana: Set default number of queues to 16
Subsystems (5)
PATCH 1/1 net: mana: Set default number of queues to 16
Set the default number of queues per vPort to MANA_DEF_NUM_QUEUES (16), as 16 queues can achieve optimal throughput for typical workloads. Users can increase the number of queues up to max_queues via ethtool if needed.
--- drivers/net/ethernet/microsoft/mana/mana_en.c | 2 +- include/net/mana/mana.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/microsoft/mana/mana_en.c +1 -1
@@ -3357,7 +3357,7 @@ 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; + 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 ;
include/net/mana/mana.h +1 -0
@@ -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)
Signature · 1 line
2.43.0
Simon Horman
reviewerQuoted 15 lines · Long Li
Set the default number of queues per vPort to
MANA_DEF_NUM_QUEUES(16), as 16 queues can achieve optimal throughput for typical workloads. Users can increase the number of queues up tomax_queuesvia ethtool if needed.Signed-off-by Long Li <[email protected]>--- drivers/net/ethernet/microsoft/mana/mana_en.c | 2 +- include/net/mana/mana.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)drivers/net/ethernet/microsoft/mana/mana_en.c +0
-0
drivers/net/ethernet/microsoft/mana/mana_en.c static int mana_probe_port(struct mana_context *ac, int port_idx, · line 3360
Quoted 5 lines
drivers/net/ethernet/microsoft/mana/mana_en.c +1
-1@@ -3357,7 +3357,7 @@ 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; + apc->num_queues =min (gc->max_num_queues,MANA_DEF_NUM_QUEUES );
Hi Long Li,
Maybe I am misunderstanding things. But it seems to me that this patch sets a ceiling on the default number of queues. Which is subtly different to setting the default. Even if not in practice if max_num_queues is never less than MANA_DEF_NUM_QUEUES.
If so I'm wondering if you could tweak the commit message accordingly.
Quoted 3 lines
drivers/net/ethernet/microsoft/mana/mana_en.c +0
-0apc->tx_queue_size =DEF_TX_BUFFERS_PER_QUEUE ; apc->rx_queue_size =DEF_RX_BUFFERS_PER_QUEUE ; apc->port_handle =INVALID_MANA_HANDLE ;
...
Quoted 27 lines · Long Li
Quoted 3 lines
Set the default number of queues per vPort to
MANA_DEF_NUM_QUEUES(16), as 16 queues can achieve optimal throughput for typical workloads. Users can increase the number of queues up tomax_queuesviaethtool if needed.
drivers/net/ethernet/microsoft/mana/mana_en.c static int mana_probe_port(struct mana_context
Quoted 13 lines
Signed-off-by Long Li <[email protected]>--- drivers/net/ethernet/microsoft/mana/mana_en.c | 2 +- include/net/mana/mana.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)drivers/net/ethernet/microsoft/mana/mana_en.c +0
-0@@ -3357,7 +3357,7 @@ static int mana_probe_port(struct mana_context*ac, int
port_idx,drivers/net/ethernet/microsoft/mana/mana_en.c static int mana_probe_port(struct mana_context *ac, int port_idx,
Quoted 5 lines
drivers/net/ethernet/microsoft/mana/mana_en.c +1
-1apc->ac = ac; apc->ndev = ndev; apc->max_queues = gc->max_num_queues; - apc->num_queues = gc->max_num_queues; + apc->num_queues = min(gc->max_num_queues,
MANA_DEF_NUM_QUEUES);
Quoted 8 lines
Hi Long Li,
Maybe I am misunderstanding things. But it seems to me that this patch sets a ceiling on the default number of queues. Which is subtly different to setting the default. Even if not in practice if
max_num_queuesis never less thanMANA_DEF_NUM_QUEUES.If so I'm wondering if you could tweak the commit message accordingly.
Yes, will tweak the commit message and resend patch.
Thanks,
Long
Quoted 6 lines
Quoted 4 lines
drivers/net/ethernet/microsoft/mana/mana_en.c +0
-0apc->tx_queue_size =DEF_TX_BUFFERS_PER_QUEUE ; apc->rx_queue_size =DEF_RX_BUFFERS_PER_QUEUE ; apc->port_handle =INVALID_MANA_HANDLE ;...