From: Jiri Pirko <jiri@resnulli.us>
To: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Cc: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org,
jhs@mojatatu.com, xiyou.wangcong@gmail.com,
andre.guedes@intel.com, ivan.briano@intel.com,
jesus.sanchez-palencia@intel.com, boon.leong.ong@intel.com,
richardcochran@gmail.com, henrik@austad.us,
levipearson@gmail.com, rodney.cummings@ni.com
Subject: Re: [next-queue PATCH v4 3/4] net/sched: Introduce Credit Based Shaper (CBS) qdisc
Date: Thu, 5 Oct 2017 23:15:02 +0200 [thread overview]
Message-ID: <20171005211502.GB2027@nanopsycho> (raw)
In-Reply-To: <877ew9jrkh.fsf@intel.com>
Thu, Oct 05, 2017 at 09:57:34PM CEST, vinicius.gomes@intel.com wrote:
>Hi Jiri,
>
>Jiri Pirko <jiri@resnulli.us> writes:
>
>> Wed, Oct 04, 2017 at 02:28:30AM CEST, vinicius.gomes@intel.com wrote:
>>>This queueing discipline implements the shaper algorithm defined by
>>>the 802.1Q-2014 Section 8.6.8.2 and detailed in Annex L.
>>>
>>>It's primary usage is to apply some bandwidth reservation to user
>>>defined traffic classes, which are mapped to different queues via the
>>>mqprio qdisc.
>>>
>>>Initially, it only supports offloading the traffic shaping work to
>>>supporting controllers.
>>>
>>>Later, when a software implementation is added, the current dependency
>>>on being installed "under" mqprio can be lifted.
>>>
>>>Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
>>>Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
>>>---
>>> include/linux/netdevice.h | 1 +
>>> include/net/pkt_sched.h | 9 ++
>>> include/uapi/linux/pkt_sched.h | 17 ++++
>>> net/sched/Kconfig | 11 ++
>>> net/sched/Makefile | 1 +
>>> net/sched/sch_cbs.c | 225 +++++++++++++++++++++++++++++++++++++++++
>>> 6 files changed, 264 insertions(+)
>>> create mode 100644 net/sched/sch_cbs.c
>>>
>>>diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
>>>index e1d6ef130611..b8798adc214f 100644
>>>--- a/include/linux/netdevice.h
>>>+++ b/include/linux/netdevice.h
>>>@@ -775,6 +775,7 @@ enum tc_setup_type {
>>> TC_SETUP_CLSFLOWER,
>>> TC_SETUP_CLSMATCHALL,
>>> TC_SETUP_CLSBPF,
>>>+ TC_SETUP_CBS,
>>
>> Please split this into 2 patches. One will introduce the new qdisc,
>> second will add offload capabilities.
>>
>
>Of course.
>
>> [...]
>>
>>
>>>+static struct Qdisc_ops cbs_qdisc_ops __read_mostly = {
>>>+ .next = NULL,
>>>+ .id = "cbs",
>>>+ .priv_size = sizeof(struct cbs_sched_data),
>>>+ .enqueue = cbs_enqueue,
>>>+ .dequeue = qdisc_dequeue_head,
>>>+ .peek = qdisc_peek_dequeued,
>>>+ .init = cbs_init,
>>>+ .reset = qdisc_reset_queue,
>>>+ .destroy = cbs_destroy,
>>>+ .change = cbs_change,
>>>+ .dump = cbs_dump,
>>>+ .owner = THIS_MODULE,
>>>+};
>>
>> I don't see a software implementation for this. Looks like you are
>> trying abuse tc subsystem to bypass kernel. Could you please explain
>> this? The golden rule is: implement in kernel, then offload.
>
>The reason was that we didn't have a use case for the software
>implementation right now, it would be added in a later series.
The policy is very strict, SW implementation first, HW implementation later.
>
>But as that was requested (and it makes sense), I will add it for the
>next version of this series (it is already written, just need to test it
>better).
Good.
>
>
>Cheers,
>--
>Vinicius
next prev parent reply other threads:[~2017-10-05 21:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-04 0:28 [next-queue PATCH v4 0/4] TSN: Add qdisc based config interface for CBS Vinicius Costa Gomes
2017-10-04 0:28 ` [next-queue PATCH v4 1/4] mqprio: Implement select_queue class_ops Vinicius Costa Gomes
2017-10-04 0:28 ` [next-queue PATCH v4 2/4] net/sched: Fix accessing invalid dev_queue Vinicius Costa Gomes
2017-10-04 0:28 ` [next-queue PATCH v4 3/4] net/sched: Introduce Credit Based Shaper (CBS) qdisc Vinicius Costa Gomes
2017-10-04 6:36 ` Jiri Pirko
2017-10-05 18:09 ` Levi Pearson
2017-10-05 18:29 ` David Miller
2017-10-05 18:41 ` Rodney Cummings
2017-10-05 19:05 ` David Miller
2017-10-05 19:17 ` Rodney Cummings
2017-10-05 21:23 ` Levi Pearson
2017-10-05 19:57 ` Vinicius Costa Gomes
2017-10-05 21:15 ` Jiri Pirko [this message]
2017-10-04 0:28 ` [next-queue PATCH v4 4/4] igb: Add support for CBS offload Vinicius Costa Gomes
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=20171005211502.GB2027@nanopsycho \
--to=jiri@resnulli.us \
--cc=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=levipearson@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=rodney.cummings@ni.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