public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: mana: Set default number of queues to 16
@ 2026-03-20 23:30 Long Li
  2026-03-23 13:58 ` Simon Horman
  0 siblings, 1 reply; 3+ messages in thread
From: Long Li @ 2026-03-20 23:30 UTC (permalink / raw)
  To: Long Li, Konstantin Taranov, Jakub Kicinski, David S . Miller,
	Paolo Abeni, Eric Dumazet, Andrew Lunn, Jason Gunthorpe,
	Leon Romanovsky, Haiyang Zhang, K . Y . Srinivasan, Wei Liu,
	Dexuan Cui
  Cc: Simon Horman, netdev, linux-rdma, linux-hyperv, linux-kernel

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.

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/ethernet/microsoft/mana/mana_en.c | 2 +-
 include/net/mana/mana.h                       | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c
index 49c65cc1697c..7cae8a7b9f31 100644
--- a/drivers/net/ethernet/microsoft/mana/mana_en.c
+++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
@@ -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;
diff --git a/include/net/mana/mana.h b/include/net/mana/mana.h
index 3336688fed5e..96d21cbbdee2 100644
--- a/include/net/mana/mana.h
+++ b/include/net/mana/mana.h
@@ -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)
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: mana: Set default number of queues to 16
  2026-03-20 23:30 [PATCH net-next] net: mana: Set default number of queues to 16 Long Li
@ 2026-03-23 13:58 ` Simon Horman
  2026-03-23 17:54   ` [EXTERNAL] " Long Li
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Horman @ 2026-03-23 13:58 UTC (permalink / raw)
  To: Long Li
  Cc: Konstantin Taranov, Jakub Kicinski, David S . Miller, Paolo Abeni,
	Eric Dumazet, Andrew Lunn, Jason Gunthorpe, Leon Romanovsky,
	Haiyang Zhang, K . Y . Srinivasan, Wei Liu, Dexuan Cui, netdev,
	linux-rdma, linux-hyperv, linux-kernel

On Fri, Mar 20, 2026 at 04:30:27PM -0700, Long Li wrote:
> 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.
> 
> Signed-off-by: Long Li <longli@microsoft.com>
> ---
>  drivers/net/ethernet/microsoft/mana/mana_en.c | 2 +-
>  include/net/mana/mana.h                       | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c
> index 49c65cc1697c..7cae8a7b9f31 100644
> --- a/drivers/net/ethernet/microsoft/mana/mana_en.c
> +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
> @@ -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.

>  	apc->tx_queue_size = DEF_TX_BUFFERS_PER_QUEUE;
>  	apc->rx_queue_size = DEF_RX_BUFFERS_PER_QUEUE;
>  	apc->port_handle = INVALID_MANA_HANDLE;

...

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [EXTERNAL] Re: [PATCH net-next] net: mana: Set default number of queues to 16
  2026-03-23 13:58 ` Simon Horman
@ 2026-03-23 17:54   ` Long Li
  0 siblings, 0 replies; 3+ messages in thread
From: Long Li @ 2026-03-23 17:54 UTC (permalink / raw)
  To: Simon Horman
  Cc: Konstantin Taranov, Jakub Kicinski, David S . Miller, Paolo Abeni,
	Eric Dumazet, Andrew Lunn, Jason Gunthorpe, Leon Romanovsky,
	Haiyang Zhang, KY Srinivasan, Wei Liu, Dexuan Cui,
	netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
	linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org

> 
> On Fri, Mar 20, 2026 at 04:30:27PM -0700, Long Li wrote:
> > 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.
> >
> > Signed-off-by: Long Li <longli@microsoft.com>
> > ---
> >  drivers/net/ethernet/microsoft/mana/mana_en.c | 2 +-
> >  include/net/mana/mana.h                       | 1 +
> >  2 files changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c
> > b/drivers/net/ethernet/microsoft/mana/mana_en.c
> > index 49c65cc1697c..7cae8a7b9f31 100644
> > --- a/drivers/net/ethernet/microsoft/mana/mana_en.c
> > +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
> > @@ -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.

Yes, will tweak the commit message and resend patch.

Thanks,
Long

> 
> >  	apc->tx_queue_size = DEF_TX_BUFFERS_PER_QUEUE;
> >  	apc->rx_queue_size = DEF_RX_BUFFERS_PER_QUEUE;
> >  	apc->port_handle = INVALID_MANA_HANDLE;
> 
> ...

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-23 17:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-20 23:30 [PATCH net-next] net: mana: Set default number of queues to 16 Long Li
2026-03-23 13:58 ` Simon Horman
2026-03-23 17:54   ` [EXTERNAL] " Long Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox