netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Vladimir Oltean <olteanv@gmail.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: netdev@vger.kernel.org, Hauke Mehrtens <hauke@hauke-m.de>,
	andrew@lunn.ch, vivien.didelot@gmail.com, davem@davemloft.net,
	kuba@kernel.org
Subject: Re: lantiq_xrx200: Ethernet MAC with multiple TX queues
Date: Wed, 24 Mar 2021 14:09:02 -0700	[thread overview]
Message-ID: <874dd389-dd67-65a6-8ccc-cc1d9fa904a2@gmail.com> (raw)
In-Reply-To: <20210324201331.camqijtggfbz7c3f@skbuf>



On 3/24/2021 1:13 PM, Vladimir Oltean wrote:
> 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 you use DSA you will have a DSA slave network device which will be
calling into dev_queue_xmit() into the DSA master which will be the
xrx200 driver, so it's fairly simple for you to implement a queue
selection within the xrx200 tagger for instance.

You can take a look at how net/dsa/tag_brcm.c and
drivers/net/ethernet/broadcom/bcmsysport.c work as far as mapping queues
from the DSA slave network device queue/port number into a queue number
for the DSA master.
-- 
Florian

  reply	other threads:[~2021-03-24 21:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24 20:04 lantiq_xrx200: Ethernet MAC with multiple TX queues Martin Blumenstingl
2021-03-24 20:13 ` Vladimir Oltean
2021-03-24 21:09   ` Florian Fainelli [this message]
2021-03-24 22:21     ` Vladimir Oltean
2021-03-24 23:07       ` Florian Fainelli
2021-03-25  1:18         ` Vladimir Oltean
2021-03-25  3:08           ` Florian Fainelli
2021-03-25 19:29             ` Martin Blumenstingl
2021-03-24 22:50     ` Hauke Mehrtens
2021-03-24 22:58       ` Florian Fainelli

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=874dd389-dd67-65a6-8ccc-cc1d9fa904a2@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=hauke@hauke-m.de \
    --cc=kuba@kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vivien.didelot@gmail.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;
as well as URLs for NNTP newsgroup(s).