public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Colin Foster <colin.foster@in-advantage.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	UNGLinuxDriver@microchip.com, Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Russell King <linux@armlinux.org.uk>
Subject: Re: [PATCH net-next 6/8] net: dsa: ocelot: use ds->num_tx_queues = OCELOT_NUM_TC for all models
Date: Thu, 30 May 2024 11:47:32 -0500	[thread overview]
Message-ID: <ZlitpP1/silRDYLY@colin-ia-desktop> (raw)
In-Reply-To: <20240530163333.2458884-7-vladimir.oltean@nxp.com>

On Thu, May 30, 2024 at 07:33:31PM +0300, Vladimir Oltean wrote:
> Russell King points out that seville_vsc9953 populates
> felix->info->num_tx_queues = 8, but this doesn't make it all the way
> into ds->num_tx_queues (which is how the user interface netdev queues
> get allocated) [1].
> 
> [1]: https://lore.kernel.org/all/20240415160150.yejcazpjqvn7vhxu@skbuf/
> 
> When num_tx_queues=0 for seville, this is implicitly converted to 1 by
> dsa_user_create(), and this is good enough for basic operation for a
> switch port. The tc qdisc offload layer works with netdev TX queues,
> so for QoS offload we need to pretend we have multiple TX queues. The
> VSC9953, like ocelot_ext, doesn't export QoS offload, so it doesn't
> really matter. But we can definitely set num_tx_queues=8 for all
> switches.
> 
> The felix->info->num_tx_queues construct itself seems unnecessary.
> It was introduced by commit de143c0e274b ("net: dsa: felix: Configure
> Time-Aware Scheduler via taprio offload") at a time when vsc9959
> (LS1028A) was the only switch supported by the driver.
> 
> 8 traffic classes, and 1 queue per traffic class, is a common
> architectural feature of all switches in the family. So they could
> all just set OCELOT_NUM_TC and be fine.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> ---
>  drivers/net/dsa/ocelot/felix.h           | 1 -
>  drivers/net/dsa/ocelot/felix_vsc9959.c   | 4 ++--
>  drivers/net/dsa/ocelot/ocelot_ext.c      | 3 +--
> --- a/drivers/net/dsa/ocelot/ocelot_ext.c
> +++ b/drivers/net/dsa/ocelot/ocelot_ext.c
> @@ -57,7 +57,6 @@ static const struct felix_info vsc7512_info = {
>  	.vcap				= vsc7514_vcap_props,
>  	.num_mact_rows			= 1024,
>  	.num_ports			= VSC7514_NUM_PORTS,
> -	.num_tx_queues			= OCELOT_NUM_TC,
>  	.port_modes			= vsc7512_port_modes,
>  	.phylink_mac_config		= ocelot_phylink_mac_config,
>  	.configure_serdes		= ocelot_port_configure_serdes,
> @@ -90,7 +89,7 @@ static int ocelot_ext_probe(struct platform_device *pdev)
>  
>  	ds->dev = dev;
>  	ds->num_ports = felix->info->num_ports;
> -	ds->num_tx_queues = felix->info->num_tx_queues;
> +	ds->num_tx_queues = OCELOT_NUM_TC;
>  
>  	ds->ops = &felix_switch_ops;
>  	ds->phylink_mac_ops = &felix_phylink_mac_ops;

For ocelot_ext

Reviewed-by: Colin Foster <colin.foster@in-advantage.com>


  reply	other threads:[~2024-05-30 16:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-30 16:33 [PATCH net-next 0/8] Probing cleanup for the Felix DSA driver Vladimir Oltean
2024-05-30 16:33 ` [PATCH net-next 1/8] net: dsa: ocelot: use devres in ocelot_ext_probe() Vladimir Oltean
2024-05-30 16:40   ` Colin Foster
2024-06-03  2:00   ` Colin Foster
2024-06-03 11:01     ` Vladimir Oltean
2024-05-30 16:33 ` [PATCH net-next 2/8] net: dsa: ocelot: use devres in seville_probe() Vladimir Oltean
2024-05-30 16:33 ` [PATCH net-next 3/8] net: dsa: ocelot: delete open coded status = "disabled" parsing Vladimir Oltean
2024-05-30 16:33 ` [PATCH net-next 4/8] net: dsa: ocelot: consistently use devres in felix_pci_probe() Vladimir Oltean
2024-05-30 16:33 ` [PATCH net-next 5/8] net: dsa: ocelot: move devm_request_threaded_irq() to felix_setup() Vladimir Oltean
2024-05-30 16:33 ` [PATCH net-next 6/8] net: dsa: ocelot: use ds->num_tx_queues = OCELOT_NUM_TC for all models Vladimir Oltean
2024-05-30 16:47   ` Colin Foster [this message]
2024-06-03  2:02   ` Colin Foster
2024-05-30 16:33 ` [PATCH net-next 7/8] net: dsa: ocelot: common probing code Vladimir Oltean
2024-06-03  2:04   ` Colin Foster
2024-05-30 16:33 ` [PATCH net-next 8/8] net: dsa: ocelot: unexport felix_phylink_mac_ops and felix_switch_ops Vladimir Oltean
2024-05-30 18:12   ` Sai Krishna Gajula
2024-05-31  3:08 ` [PATCH net-next 0/8] Probing cleanup for the Felix DSA driver Colin Foster
2024-05-31  7:47   ` Russell King (Oracle)
2024-06-03 12:10 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZlitpP1/silRDYLY@colin-ia-desktop \
    --to=colin.foster@in-advantage.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vladimir.oltean@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox