<html><head></head><body>No idea, sqm-scripts long had supported htb's linklayer accounting but defaulted to using tc stab instead, and mainly for htb+fq_codel, for cake it defaulted to cake's internal accounting.<br><br>I have no recollection when I last tested that, probably when I was still on an ADSL link without a relevant mpu.... <br><br>Regards<br> Sebastian<br><br><br><br><div class="gmail_quote">On 13 January 2022 00:08:10 CET, Dave Taht <dave.taht@gmail.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre dir="auto" class="k9mail">this has been broken this long??<br><br>---------- Forwarded message ---------<br>From: Kevin Bracey <kevin@bracey.fi><br>Date: Fri, Jan 7, 2022 at 4:56 PM<br>Subject: [PATCH net-next] net_sched: restore "mpu xxx" handling<br>To: <netdev@vger.kernel.org><br>Cc: Kevin Bracey <kevin@bracey.fi>, Eric Dumazet<br><edumazet@google.com>, Jiri Pirko <jiri@resnulli.us>, Vimalkumar<br><j.vimal@gmail.com><br><br><br>commit 56b765b79e9a ("htb: improved accuracy at high rates") broke<br>"overhead X", "linklayer atm" and "mpu X" attributes.<br><br>"overhead X" and "linklayer atm" have already been fixed. This restores<br>the "mpu X" handling, as might be used by DOCSIS or Ethernet shaping:<br><br> tc class add ... htb rate X overhead 4 mpu 64<br><br>The code being fixed is used by htb, tbf and act_police. Cake has its<br>own mpu handling. qdisc_calculate_pkt_len still uses the size table<br>containing values adjusted for mpu by user space.<br><br>Fixes: 56b765b79e9a ("htb: improved accuracy at high rates")<br>Signed-off-by: Kevin Bracey <kevin@bracey.fi><br>Cc: Eric Dumazet <edumazet@google.com><br>Cc: Jiri Pirko <jiri@resnulli.us><br>Cc: Vimalkumar <j.vimal@gmail.com><hr> include/net/sch_generic.h | 5 +++++<br> net/sched/sch_generic.c | 1 +<br> 2 files changed, 6 insertions(+)<br><br>diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h<br>index c70e6d2b2fdd..fddca0aa73ef 100644<br>--- a/include/net/sch_generic.h<br>+++ b/include/net/sch_generic.h<br>@@ -1244,6 +1244,7 @@ struct psched_ratecfg {<br> u64 rate_bytes_ps; /* bytes per second */<br> u32 mult;<br> u16 overhead;<br>+ u16 mpu;<br> u8 linklayer;<br> u8 shift;<br> };<br>@@ -1253,6 +1254,9 @@ static inline u64 psched_l2t_ns(const struct<br>psched_ratecfg *r,<br> {<br> len += r->overhead;<br><br>+ if (len < r->mpu)<br>+ len = r->mpu;<br>+<br> if (unlikely(r->linklayer == TC_LINKLAYER_ATM))<br> return ((u64)(DIV_ROUND_UP(len,48)*53) * r->mult) >> r->shift;<br><br>@@ -1275,6 +1279,7 @@ static inline void psched_ratecfg_getrate(struct<br>tc_ratespec *res,<br> res->rate = min_t(u64, r->rate_bytes_ps, ~0U);<br><br> res->overhead = r->overhead;<br>+ res->mpu = r->mpu;<br> res->linklayer = (r->linklayer & TC_LINKLAYER_MASK);<br> }<br><br>diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c<br>index 3b0f62095803..5d391fe3137d 100644<br>--- a/net/sched/sch_generic.c<br>+++ b/net/sched/sch_generic.c<br>@@ -1474,6 +1474,7 @@ void psched_ratecfg_precompute(struct psched_ratecfg *r,<br> {<br> memset(r, 0, sizeof(*r));<br> r->overhead = conf->overhead;<br>+ r->mpu = conf->mpu;<br> r->rate_bytes_ps = max_t(u64, conf->rate, rate64);<br> r->linklayer = (conf->linklayer & TC_LINKLAYER_MASK);<br> psched_ratecfg_precompute__(r->rate_bytes_ps, &r->mult, &r->shift);<br>--<br>2.25.1<br><br><br><br><div class="k9mail-signature">-- <br>I tried to build a better future, a few times:<br><a href="https://wayforward.archive.org/?site=https%3A%2F%2Fwww.icei.org">https://wayforward.archive.org/?site=https%3A%2F%2Fwww.icei.org</a><br><br>Dave Täht CEO, TekLibre, LLC<hr>Cerowrt-devel mailing list<br>Cerowrt-devel@lists.bufferbloat.net<br><a href="https://lists.bufferbloat.net/listinfo/cerowrt-devel">https://lists.bufferbloat.net/listinfo/cerowrt-devel</a><br></div></pre></blockquote></div><div style='white-space: pre-wrap'><div class='k9mail-signature'>-- <br>Sent from my Android device with K-9 Mail. Please excuse my brevity.</div></div></body></html>