From: David S. Miller Date: Fri, 16 Aug 2013 22:37:26 +0000 (-0700) Subject: Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2ff1cf12c9fe70e75e600404e6a4274b19d293ed;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Merge git://git./linux/kernel/git/davem/net --- 2ff1cf12c9fe70e75e600404e6a4274b19d293ed diff --cc include/net/sch_generic.h index ffc9d883b163,e5ae0c50fa9c..76368c9d4503 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@@ -691,11 -690,15 +692,16 @@@ struct psched_ratecfg static inline u64 psched_l2t_ns(const struct psched_ratecfg *r, unsigned int len) { - return ((u64)(len + r->overhead) * r->mult) >> r->shift; + len += r->overhead; + + if (unlikely(r->linklayer == TC_LINKLAYER_ATM)) + return ((u64)(DIV_ROUND_UP(len,48)*53) * r->mult) >> r->shift; + + return ((u64)len * r->mult) >> r->shift; } -extern void psched_ratecfg_precompute(struct psched_ratecfg *r, const struct tc_ratespec *conf); +void psched_ratecfg_precompute(struct psched_ratecfg *r, + const struct tc_ratespec *conf); static inline void psched_ratecfg_getrate(struct tc_ratespec *res, const struct psched_ratecfg *r)