RE: [next-queue PATCH v7 4/6] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-16 Thread Vinicius Costa Gomes
Hi David, David Laight writes: [...] >> > 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

RE: [next-queue PATCH v7 4/6] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-16 Thread David Laight
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

Re: [next-queue PATCH v7 4/6] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-13 Thread Vinicius Costa Gomes
Hi, Ivan Khoronzhuk writes: [...] >> + >> +static int cbs_enqueue_soft(struct sk_buff *skb, struct Qdisc *sch) >> +{ >> +struct cbs_sched_data *q = qdisc_priv(sch); >> + >> +if (sch->q.qlen == 0 && q->credits > 0) { >> +/* We need to stop

Re: [next-queue PATCH v7 4/6] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-13 Thread Ivan Khoronzhuk
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,

Re: [next-queue PATCH v7 4/6] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-13 Thread Vinicius Costa Gomes
Hi, Eric Dumazet writes: [...] > > Your mixing of s64 and u64 is disturbing. > > do_div() handles u64, not s64. > > div64_s64() might be needed in place of do_div() I wasn't very comfortable about the signal juggling either. Didn't know about div64_s64(), looks much

Re: [next-queue PATCH v7 4/6] net/sched: Introduce Credit Based Shaper (CBS) qdisc

2017-10-12 Thread Eric Dumazet
On Thu, 2017-10-12 at 17:40 -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