lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 08 Feb 2013 08:42:47 -0800 From: Eric Dumazet <eric.dumazet@...il.com> To: Jiri Pirko <jiri@...nulli.us> Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com, jhs@...atatu.com, kuznet@....inr.ac.ru Subject: Re: [patch net-next 6/7] tbf: improved accuracy at high rates On Fri, 2013-02-08 at 13:58 +0100, Jiri Pirko wrote: > Current TBF uses rate table computed by the "tc" userspace program, > which has the following issue: > > The rate table has 256 entries to map packet lengths to > token (time units). With TSO sized packets, the 256 entry granularity > leads to loss/gain of rate, making the token bucket inaccurate. > > Thus, instead of relying on rate table, this patch explicitly computes > the time and accounts for packet transmission times with nanosecond > granularity. > > This is a followup to 56b765b79e9a78dc7d3f8850ba5e5567205a3ecd > > Signed-off-by: Jiri Pirko <jiri@...nulli.us> > --- > net/sched/sch_tbf.c | 60 ++++++++++++++++++++++++++--------------------------- > 1 file changed, 29 insertions(+), 31 deletions(-) > > diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c > index 4b056c15..35bfd49 100644 > --- a/net/sched/sch_tbf.c > +++ b/net/sched/sch_tbf.c > @@ -19,6 +19,7 @@ > #include <linux/errno.h> > #include <linux/skbuff.h> > #include <net/netlink.h> > +#include <net/sch_generic.h> > #include <net/pkt_sched.h> > > > @@ -100,23 +101,21 @@ > struct tbf_sched_data { > /* Parameters */ > u32 limit; /* Maximal length of backlog: bytes */ > - u32 buffer; /* Token bucket depth/rate: MUST BE >= MTU/B */ > + s64 buffer; /* Token bucket depth/rate: MUST BE >= MTU/B */ > u32 mtu; > u32 max_size; > - struct qdisc_rate_table *R_tab; > - struct qdisc_rate_table *P_tab; > + struct psched_ratecfg rate; > + struct psched_ratecfg peek; > + bool peek_present; > Seems good to me, I'll add my Ack when you resend it with 'peak' typo and after my tests. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists