[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6DD00979BC@AcuExch.aculab.com>
Date: Mon, 16 Oct 2017 09:14:11 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Ivan Khoronzhuk' <ivan.khoronzhuk@...aro.org>,
Vinicius Costa Gomes <vinicius.gomes@...el.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
"jhs@...atatu.com" <jhs@...atatu.com>,
"xiyou.wangcong@...il.com" <xiyou.wangcong@...il.com>,
"jiri@...nulli.us" <jiri@...nulli.us>,
"andre.guedes@...el.com" <andre.guedes@...el.com>,
"ivan.briano@...el.com" <ivan.briano@...el.com>,
"jesus.sanchez-palencia@...el.com" <jesus.sanchez-palencia@...el.com>,
"boon.leong.ong@...el.com" <boon.leong.ong@...el.com>,
"richardcochran@...il.com" <richardcochran@...il.com>,
"henrik@...tad.us" <henrik@...tad.us>,
"levipearson@...il.com" <levipearson@...il.com>,
"rodney.cummings@...com" <rodney.cummings@...com>
Subject: RE: [next-queue PATCH v7 4/6] net/sched: Introduce Credit Based
Shaper (CBS) qdisc
From: Ivan Khoronzhuk
> Sent: 13 October 2017 20:59
> On Thu, Oct 12, 2017 at 05:40:03PM -0700, Vinicius Costa Gomes 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.
> >
> > Only a simple software implementation is added for now.
> >
> > Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@...el.com>
> > Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@...el.com>
> > ---
> > include/uapi/linux/pkt_sched.h | 18 +++
> > net/sched/Kconfig | 11 ++
> > net/sched/Makefile | 1 +
> > net/sched/sch_cbs.c | 314 +++++++++++++++++++++++++++++++++++++++++
> > 4 files changed, 344 insertions(+)
> > create mode 100644 net/sched/sch_cbs.c
> >
> > diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h
> > index 099bf5528fed..41e349df4bf4 100644
> > --- a/include/uapi/linux/pkt_sched.h
> > +++ b/include/uapi/linux/pkt_sched.h
> > @@ -871,4 +871,22 @@ struct tc_pie_xstats {
> > __u32 maxq; /* maximum queue size */
> > __u32 ecn_mark; /* packets marked with ecn*/
> > };
> > +
> > +/* CBS */
> > +struct tc_cbs_qopt {
> > + __u8 offload;
You probably don't want unnamed padding in a uapi structure.
> > + __s32 hicredit;
> > + __s32 locredit;
> > + __s32 idleslope;
> > + __s32 sendslope;
> > +};
> > +
> > +enum {
> > + TCA_CBS_UNSPEC,
> > + TCA_CBS_PARMS,
> > + __TCA_CBS_MAX,
> > +};
> > +
> > +#define TCA_CBS_MAX (__TCA_CBS_MAX - 1)
Why not:
TCA_CBS_PARMS,
TCA_CBS_NEXT,
TCA_CBS_MAX = TCA_CBS_NEXT - 1,
...
David
Powered by blists - more mailing lists