netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Guedes, Andre" <andre.guedes@intel.com>
To: "Gomes, Vinicius" <vinicius.gomes@intel.com>,
	"henrik@austad.us" <henrik@austad.us>
Cc: "jiri@resnulli.us" <jiri@resnulli.us>,
	"jhs@mojatatu.com" <jhs@mojatatu.com>,
	"Ong, Boon Leong" <boon.leong.ong@intel.com>,
	"xiyou.wangcong@gmail.com" <xiyou.wangcong@gmail.com>,
	"Sanchez-Palencia, Jesus" <jesus.sanchez-palencia@intel.com>,
	"richardcochran@gmail.com" <richardcochran@gmail.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"Briano, Ivan" <ivan.briano@intel.com>,
	"intel-wired-lan@lists.osuosl.org"
	<intel-wired-lan@lists.osuosl.org>
Subject: Re: [RFC net-next 0/5] TSN: Add qdisc-based config interfaces for traffic shapers
Date: Thu, 7 Sep 2017 19:58:53 +0000	[thread overview]
Message-ID: <1504814332.2117.3.camel@intel.com> (raw)
In-Reply-To: <20170907053411.GA6580@sisyphus.home.austad.us>

[-- Attachment #1: Type: text/plain, Size: 3398 bytes --]

Hi Henrik,

Thanks for your feedback! I'll address some of your comments below.

On Thu, 2017-09-07 at 07:34 +0200, Henrik Austad wrote:
> > As for the shapers config interface:
> > 
> >  * CBS (802.1Qav)
> > 
> >    This patchset is proposing a new qdisc called 'cbs'. Its 'tc' cmd line
> > is:
> >    $ tc qdisc add dev IFACE parent ID cbs locredit N hicredit M sendslope S
> > \
> >      idleslope I
> 
> So this confuses me a bit, why specify sendSlope?
> 
>     sendSlope = portTransmitRate - idleSlope
> 
> and portTransmitRate is the speed of the MAC (which you get from the 
> driver). Adding sendSlope here is just redundant I think.

Yes, this was something we've spent quite a few time discussing before this RFC
series. After reading the Annex L from 802.1Q-2014 (operation of CBS algorithm)
so many times, we've came up with the rationale explained below.

The rationale here is that sendSlope is just another parameter from CBS
algorithm like idleSlope, hiCredit and loCredit. As such, its calculation
should be done at the same "layer" as the others parameters (in this case, user
space) in order to keep consistency. Moreover, in this design, the driver layer
is dead simple: all the device driver has to do is applying CBS parameters to
hardware. Having any CBS parameter calculation in the driver layer means all
device drivers must implement that calculation.

> Also, does this mean that when you create the qdisc, you have locked the 
> bandwidth for the scheduler? Meaning, if I later want to add another 
> stream that requires more bandwidth, I have to close all active streams, 
> reconfigure the qdisc and then restart?

If we want to reserve more bandwidth to "accommodate" a new stream, we don't
need to close all active streams. All we have to do is changing the CBS qdisc
and pass the new CBS parameters. Here is what the command-line would look like:

$ tc qdisc change dev enp0s4 parent 8001:5 cbs locredit -1470 hicredit 30
sendslope -980000 idleslope 20000

No application/stream is interrupted while new CBS parameters are applied.

> >    Note that the parameters for this qdisc are the ones defined by the
> >    802.1Q-2014 spec, so no hardware specific functionality is exposed here.
> 
> You do need to know if the link is brought up as 100 or 1000 though - which 
> the driver already knows.

User space knows that information via ethtool or /sys.

> > Testing this RFC
> > ================
> > 
> > For testing the patches of this RFC only, you can refer to the samples and
> > helper script being added to samples/tsn/ and the use the 'mqprio' qdisc to
> > setup the priorities to Tx queues mapping, together with the 'cbs' qdisc to
> > configure the HW shaper of the i210 controller:
> 
> I will test it, feedback will be provided soon! :)

That's great! Please let us know if you find any issue and thanks for you
support.

> > 8) You can also run a Talker for class B (prio 2 here)
> > $ ./talker -i enp3s0 -p 2
> > 
> >  * The bandwidth displayed on the listener output now should increase to
> > very
> >    close to the one configured for class A + class B.
> 
> Because you grab both class A *and* B, or because B will eat what A does 
> not use?

Because the listener application grabs both class A and B traffic.

Regards,

Andre

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3262 bytes --]

  parent reply	other threads:[~2017-09-07 19:58 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 [this message]
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
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=1504814332.2117.3.camel@intel.com \
    --to=andre.guedes@intel.com \
    --cc=boon.leong.ong@intel.com \
    --cc=henrik@austad.us \
    --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=vinicius.gomes@intel.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).