public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	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: Thu, 25 Mar 2021 03:18:15 +0200	[thread overview]
Message-ID: <20210325011815.fj6m4p5k6spbjefc@skbuf> (raw)
In-Reply-To: <7510c29a-b60f-e0d7-4129-cb90fe376c74@gmail.com>

On Wed, Mar 24, 2021 at 04:07:47PM -0700, Florian Fainelli wrote:
> > What are the benefits of mapping packets to TX queues of the DSA master
> > from the DSA layer?
> 
> For systemport and bcm_sf2 this was explained in this commit:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d156576362c07e954dc36e07b0d7b0733a010f7d
> 
> in a nutshell, the switch hardware can return the queue status back to
> the systemport's transmit DMA such that it can automatically pace the TX
> completion interrupts. To do that we need to establish a mapping between
> the DSA slave and master that is comprised of the switch port number and
> TX queue number, and tell the HW to inspect the congestion status of
> that particular port and queue.
> 
> What this is meant to address is a "lossless" (within the SoC at least)
> behavior when you have user ports that are connected at a speed lower
> than that of your internal connection to the switch typically Gigabit or
> more. If you send 1Gbits/sec worth of traffic down to a port that is
> connected at 100Mbits/sec there will be roughly 90% packet loss unless
> you have a way to pace the Ethernet controller's transmit DMA, which
> then ultimately limits the TX completion of the socket buffers so things
> work nicely. I believe that per queue flow control was evaluated before
> and an out of band mechanism was preferred but I do not remember the
> details of that decision to use ACB.

Interesting system design.

Just to clarify, this port to queue mapping is completely optional, right?
You can send packets to a certain switch port through any TX queue of
the systemport?

  reply	other threads:[~2021-03-25  1:21 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
2021-03-24 22:21     ` Vladimir Oltean
2021-03-24 23:07       ` Florian Fainelli
2021-03-25  1:18         ` Vladimir Oltean [this message]
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=20210325011815.fj6m4p5k6spbjefc@skbuf \
    --to=olteanv@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hauke@hauke-m.de \
    --cc=kuba@kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=netdev@vger.kernel.org \
    --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