netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
To: Richard Cochran <richardcochran@gmail.com>
Cc: netdev@vger.kernel.org, jhs@mojatatu.com,
	xiyou.wangcong@gmail.com, jiri@resnulli.us,
	intel-wired-lan@lists.osuosl.org, andre.guedes@intel.com,
	ivan.briano@intel.com, jesus.sanchez-palencia@intel.com,
	boon.leong.ong@intel.com
Subject: Re: [RFC net-next 0/5] TSN: Add qdisc-based config interfaces for traffic shapers
Date: Mon, 18 Sep 2017 16:06:28 -0700	[thread overview]
Message-ID: <87k20vip3f.fsf@intel.com> (raw)
In-Reply-To: <20170918080214.yrejz67wwnp2pjzf@localhost>

Hi Richard,

Richard Cochran <richardcochran@gmail.com> writes:

> On Thu, Aug 31, 2017 at 06:26:20PM -0700, Vinicius Costa Gomes wrote:
>>  * Time-aware shaper (802.1Qbv):
>
> I just posted a working alternative showing how to handle 802.1Qbv and
> many other Ethernet field buses.
>
>>    The idea we are currently exploring is to add a "time-aware", priority based
>>    qdisc, that also exposes the Tx queues available and provides a mechanism for
>>    mapping priority <-> traffic class <-> Tx queues in a similar fashion as
>>    mqprio. We are calling this qdisc 'taprio', and its 'tc' cmd line would be:
>>
>>    $ $ tc qdisc add dev ens4 parent root handle 100 taprio num_tc 4    \
>>      	   map 2 2 1 0 3 3 3 3 3 3 3 3 3 3 3 3                         \
>> 	   queues 0 1 2 3                                              \
>>      	   sched-file gates.sched [base-time <interval>]               \
>>            [cycle-time <interval>] [extension-time <interval>]
>>
>>    <file> is multi-line, with each line being of the following format:
>>    <cmd> <gate mask> <interval in nanoseconds>
>>
>>    Qbv only defines one <cmd>: "S" for 'SetGates'
>>
>>    For example:
>>
>>    S 0x01 300
>>    S 0x03 500
>>
>>    This means that there are two intervals, the first will have the gate
>>    for traffic class 0 open for 300 nanoseconds, the second will have
>>    both traffic classes open for 500 nanoseconds.
>
> The idea of the schedule file will not work in practice.  Consider the
> fact that the application wants to deliver time critical data in a
> particular slot.  How can it find out a) what the time slots are and
> b) when the next slot is scheduled?  With this Qdisc, it cannot do
> this, AFAICT.  The admin might delete the file after configuring the
> Qdisc!

That's the point, the application does not need to know that, and asking
that would be stupid. From the point of view of the Qbv specification,
applications only need to care about its basic bandwidth requirements:
its interval, frame size, frames per interval (using the terms of the
SRP section of 802.1Q). The traffic schedule is provided (off band) by a
"god box" which knows all the requirements of all applications in all
the nodes and how they are connected.

(And that's another nice point of how 802.1Qbv works, applications do
not need to be changed to use it, and I think we should work to achieve
this on the Linux side)

That being said, that only works for kinds of traffic that maps well to
this configuration in advance model, which is the model that the IEEE
(see 802.1Qcc) and the AVNU Alliance[1] are pushing for.

In the real world, I can see multiple types of applications, some using
something like TXTIME, and some configured in advance.

>
> Using the SO_TXTIME option, the application has total control over the
> scheduling.  The great advantages of this approach is that we can
> support any possible combination of periodic or aperiodic scheduling
> and we can support any priority scheme user space dreams up.

It has the disavantage of that the scheduling information has to be
in-band with the data. I *really* think that for scheduled traffic,
there should be a clear separation, we should not mix the dataflow with
scheduling. In short, an application in the network don't need to have
all the information necessary to schedule its own traffic well.

I have two points here: 1. I see both "solutions" (taprio and SO_TXTIME)
as being ortoghonal and useful, both; 2. trying to make one do the job
of the other, however, looks like "If all I have is a hammer, everything
looks like a nail".

In short, I see a per-packet transmission time and a per-queue schedule
as solutions to different problems.

>
> For example, one can imaging running two or more loops that only
> occasionally collide.  When they do collide, which packet should be
> sent first?  Just let user space decide.
>
> Thanks,
> Richard

Cheers,

  parent reply	other threads:[~2017-09-18 23:06 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-01  1:26 [RFC net-next 0/5] TSN: Add qdisc-based config interfaces for traffic shapers Vinicius Costa Gomes
2017-09-01  1:26 ` [RFC net-next 1/5] net/sched: Introduce the user API for the CBS shaper Vinicius Costa Gomes
2017-09-01  1:26 ` [RFC net-next 2/5] net/sched: Introduce Credit Based Shaper (CBS) qdisc Vinicius Costa Gomes
2017-09-08 13:43   ` Henrik Austad
2017-09-14  0:39     ` Vinicius Costa Gomes
2017-09-01  1:26 ` [RFC net-next 3/5] igb: Add support for CBS offload Vinicius Costa Gomes
2017-09-01  1:26 ` [RFC net-next 4/5] sample: Add TSN Talker and Listener examples Vinicius Costa Gomes
2017-09-01  1:26 ` [RFC net-next 5/5] samples/tsn: Add script for calculating CBS config Vinicius Costa Gomes
2017-09-01 13:03 ` [RFC net-next 0/5] TSN: Add qdisc-based config interfaces for traffic shapers Richard Cochran
2017-09-01 16:12   ` Jesus Sanchez-Palencia
2017-09-01 16:53     ` Richard Cochran
2017-09-05  7:20     ` Richard Cochran
2017-09-07  5:34 ` Henrik Austad
2017-09-07 12:40   ` Richard Cochran
2017-09-07 15:27     ` Henrik Austad
2017-09-07 15:53       ` Richard Cochran
2017-09-07 16:18         ` Henrik Austad
2017-09-07 21:51           ` Guedes, Andre
2017-09-07 19:58   ` Guedes, Andre
2017-09-08  6:06     ` Henrik Austad
2017-09-08  1:29   ` Vinicius Costa Gomes
2017-09-12  4:56     ` Richard Cochran
2017-09-18  8:02 ` Richard Cochran
2017-09-18 11:46   ` Henrik Austad
2017-09-18 23:06   ` Vinicius Costa Gomes [this message]
2017-09-19  5:22     ` Richard Cochran
2017-09-19 13:14       ` Henrik Austad
2017-09-20  0:19       ` Vinicius Costa Gomes
2017-09-20  5:25         ` Richard Cochran
2017-10-18 22:37           ` Jesus Sanchez-Palencia
2017-10-19 20:39             ` Richard Cochran
2017-10-23 17:18               ` Jesus Sanchez-Palencia
2017-09-20  5:58         ` Richard Cochran
2017-09-18  8:12 ` Richard Cochran
2017-09-20  5:17   ` TSN Scorecard, was " levipearson
2017-09-20  5:49     ` Richard Cochran
2017-09-20 21:29       ` Jesus Sanchez-Palencia
2017-09-20  1:59 ` levipearson
2017-09-20  5:56   ` Richard Cochran
  -- strict thread matches above, loose matches on Subject: below --
2017-09-29 20:44 Rodney Cummings
2017-10-02 18:45 ` Levi Pearson
2017-10-02 19:40   ` Rodney Cummings
2017-10-02 21:48     ` Levi Pearson
2017-10-02 22:52       ` Rodney Cummings
2017-10-02 23:06   ` Guedes, Andre

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=87k20vip3f.fsf@intel.com \
    --to=vinicius.gomes@intel.com \
    --cc=andre.guedes@intel.com \
    --cc=boon.leong.ong@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=ivan.briano@intel.com \
    --cc=jesus.sanchez-palencia@intel.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=xiyou.wangcong@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).