netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: Vladimir Oltean <vladimir.oltean@nxp.com>,
	Xiaoliang Yang <xiaoliang.yang_1@nxp.com>,
	UNGLinuxDriver@microchip.com, alexandre.belloni@bootlin.com,
	allan.nielsen@microchip.com,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	davem@davemloft.net, idosch@mellanox.com,
	joergen.andreasen@microchip.com, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, Po Liu <po.liu@nxp.com>,
	vinicius.gomes@intel.com
Subject: Re: [net-next] net: dsa: felix: disable always guard band bit for TAS config
Date: Thu, 06 May 2021 16:20:59 +0200	[thread overview]
Message-ID: <0e909d9f9cc245d433ee7b02df5bafe0@walle.cc> (raw)
In-Reply-To: <20210506135007.ul3gpdecq427tvgr@skbuf>

Am 2021-05-06 15:50, schrieb Vladimir Oltean:
> On Thu, May 06, 2021 at 03:25:07PM +0200, Michael Walle wrote:
>> Am 2021-05-04 23:33, schrieb Vladimir Oltean:
>> > [ trimmed the CC list, as this is most likely spam for most people ]
>> >
>> > On Tue, May 04, 2021 at 10:23:11PM +0200, Michael Walle wrote:
[..]

>> > With the ALWAYS_GUARD_BAND_SCH_Q bit, there will be hiccups in packet
>> > transmission for TC 7. For example, at the end of every time slot,
>> > the hardware will insert a guard band for TC 7 because there is a
>> > scheduled-queue-to-scheduled-queue transition, and it has been told to
>> > do that. But a packet with TC 7 should be transmitted at any time,
>> > because that's what we told the port to do!
>> >
>> > Alternatively, we could tell the switch that TC 7 is "scheduled", and
>> > the others are "not scheduled". Then it would implement the guard band
>> > at the end of TCs 0-6, but it wouldn't for packets sent in TC 7. But
>> > when you look at the overall schedule I described above, it kinds looks
>> > like TCs 0-6 are the ones that are "scheduled" and TC 7 looks like the
>> > one which isn't "scheduled" but can send at any time it pleases.
>> >
>> > Odd, just odd. It's clear that someone had something in mind, it's just
>> > not clear what. I would actually appreciate if somebody from Microchip
>> > could chime in and say "no, you're wrong", and then explain.
>> 
>> If I had to make a bet, the distinction between "scheduled" and
>> "non-scheduled" is there to have more control for some traffic classes
>> you trust and where you can engineer the traffic, so you don't really
>> need the guard band and between arbitrary traffic where you can't 
>> really
>> say anything about and thus need the guard band.
> 
> I still don't know if I understand properly. You mean that "scheduled"
> traffic is traffic sent synchronized with the switch's schedule, and
> which does not need guard banding at the end of its time slot because
> the sender is playing nice?

Yes exactly. If you have a low level application that might be a
reasonable optimization.

> Yes, but then, do you gain anything at all by disabling that guard band
> and allowing the sender to overrun if they want to? I still don't see
> why overruns are permitted by the switch in certain configurations.

First, I suspect that this shouldn't happen, because as in you words,
the sender is playing nice and won't send outside its allocated time
frame.
Second, you don't waste the (possible) deadtime for the guard band
which might make sense esp. for smaller windows.

Consider the following gate timings:

(1) gate open event
(2)-(3) guard band
(3) gate close event

       (1)                 (2)      (3)
        _________ ... ______________
______|                    |_______|________


And the following timings for a frame:

(A)           ___... ___
_____________|          |___________________

(B)                   ___... ___
_____________________|          |___________

(C)                          ____
____________________________|    |__________


(A) and (B) can be send if there is a guard band, (C) can only
be send if there is no guard band. But in the case of (C) you
have to trust the sender to stop sending before reaching (3).
For (B) you don't have to trust the sender because the end of the
frame cannot be later than (3).

-michael

  reply	other threads:[~2021-05-06 14:21 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-19 10:25 [net-next] net: dsa: felix: disable always guard band bit for TAS config Xiaoliang Yang
2021-04-19 12:38 ` Vladimir Oltean
2021-04-20  3:06   ` [EXT] " Xiaoliang Yang
2021-04-20  8:26     ` Vladimir Oltean
2021-04-20 10:28       ` Xiaoliang Yang
2021-04-20 10:30         ` Vladimir Oltean
2021-04-20 10:42           ` Vladimir Oltean
2021-04-21  2:51             ` Xiaoliang Yang
2021-04-20 10:33 ` Vladimir Oltean
2021-04-20 23:20 ` patchwork-bot+netdevbpf
2021-05-04 17:05 ` Michael Walle
2021-05-04 18:18   ` Vladimir Oltean
2021-05-04 18:38     ` Michael Walle
2021-05-04 18:50       ` Vladimir Oltean
2021-05-04 19:08         ` Michael Walle
2021-05-04 19:17           ` Vladimir Oltean
2021-05-04 20:23             ` Michael Walle
2021-05-04 21:33               ` Vladimir Oltean
2021-05-06 13:25                 ` Michael Walle
2021-05-06 13:50                   ` Vladimir Oltean
2021-05-06 14:20                     ` Michael Walle [this message]
2021-05-06 14:41                     ` Michael Walle
2021-05-06 15:07                       ` Vladimir Oltean
2021-05-06 18:28                         ` Michael Walle
2021-05-07  7:16                   ` [EXT] " Xiaoliang Yang
2021-05-07  7:35                     ` Michael Walle
2021-05-07 11:09                       ` Xiaoliang Yang
2021-05-07 12:19                         ` Vladimir Oltean
2021-05-07 12:43                           ` Michael Walle
2021-06-07 11:26                           ` Michael Walle
2021-06-09  8:06                             ` [EXT] " Xiaoliang Yang
2021-06-09  8:41                               ` Michael Walle
2021-05-07 12:19                         ` Michael Walle

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=0e909d9f9cc245d433ee7b02df5bafe0@walle.cc \
    --to=michael@walle.cc \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=allan.nielsen@microchip.com \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=idosch@mellanox.com \
    --cc=joergen.andreasen@microchip.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=po.liu@nxp.com \
    --cc=vinicius.gomes@intel.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=xiaoliang.yang_1@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;
as well as URLs for NNTP newsgroup(s).