[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210324201331.camqijtggfbz7c3f@skbuf>
Date: Wed, 24 Mar 2021 22:13:31 +0200
From: Vladimir Oltean <olteanv@...il.com>
To: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
Cc: netdev@...r.kernel.org, Hauke Mehrtens <hauke@...ke-m.de>,
andrew@...n.ch, vivien.didelot@...il.com, f.fainelli@...il.com,
davem@...emloft.net, kuba@...nel.org
Subject: Re: lantiq_xrx200: Ethernet MAC with multiple TX queues
Hi Martin,
On Wed, Mar 24, 2021 at 09:04:16PM +0100, Martin Blumenstingl wrote:
> Hello,
>
> the PMAC (Ethernet MAC) IP built into the Lantiq xRX200 SoCs has
> support for multiple (TX) queues.
> This MAC is connected to the SoC's built-in switch IP (called GSWIP).
>
> Right now the lantiq_xrx200 driver only uses one TX and one RX queue.
> The vendor driver (which mixes DSA/switch and MAC functionality in one
> driver) uses the following approach:
> - eth0 ("lan") uses the first TX queue
> - eth1 ("wan") uses the second TX queue
>
> With the current (mainline) lantiq_xrx200 driver some users are able
> to fill up the first (and only) queue.
> This is why I am thinking about adding support for the second queue to
> the lantiq_xrx200 driver.
>
> My main question is: how do I do it properly?
> Initializing the second TX queue seems simple (calling
> netif_tx_napi_add for a second time).
> But how do I choose the "right" TX queue in xrx200_start_xmit then?
>
> If my description is too vague then please let me know about any
> specific questions you have.
> Also if there's an existing driver that "does things right" I am happy
> to look at that one.
Is this question specific in any way to DSA?
Many Ethernet drivers are multi-queue. Some map one queue per CPU, some
use mqprio to map one or more queues per priority.
Powered by blists - more mailing lists