Re: [PATCH iproute2-next] iproute2 Support lockless token bucket (LTB)

2020-07-06 Thread YU, Xiangning
On 7/6/20 11:40 AM, Stephen Hemminger wrote: > On Tue, 07 Jul 2020 02:08:21 +0800 > "YU, Xiangning" wrote: > >> +static int ltb_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) >> +{ >> +struct rtattr *tb[TCA_LTB_MAX + 1]; >> +struct tc_ltb_opt *lopt; >> +struct tc_ltb_gl

Re: [PATCH iproute2-next] iproute2 Support lockless token bucket (LTB)

2020-07-06 Thread Stephen Hemminger
On Tue, 07 Jul 2020 02:08:21 +0800 "YU, Xiangning" wrote: > +static int ltb_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) > +{ > + struct rtattr *tb[TCA_LTB_MAX + 1]; > + struct tc_ltb_opt *lopt; > + struct tc_ltb_glob *gopt; > + __u64 rate64, ceil64; > + > + S

[PATCH iproute2-next] iproute2 Support lockless token bucket (LTB)

2020-07-06 Thread YU, Xiangning
Introduce a new tc command parameter "ltb" to allow configuring lockless token bucket qdisc. For example: # tc qdisc add dev eth0 root handle 1: ltb default 10 # tc class add dev eth0 parent 1: classid 1:10 ltb \ rate 3000Mbit ceil 9000Mbit prio 3 Signed-off-by: X