From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id EE4813B2A4; Wed, 12 Jan 2022 18:25:45 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1642029944; bh=T5O3iFaZTfWeMcU+Oh4joHoapmKb/7f6naNIVWa8ABs=; h=X-UI-Sender-Class:Date:From:To:Subject:In-Reply-To:References; b=Uvq/yDSgesxPJftVjkAKWVNwolEy2QMRKW5u7VaJTQ98kwLTEKYkINN5LcPQmSQ/a ZGD4H6EhTNLFl887p6nZk4XMBu+uyPiyH1DAob0cuMns/Ne+fCs2MHAIgWFTj0Vz2f p8KGHJrIoXGZ01bjm7bK6Fr5Fyy9jddcr5BGO0B4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [127.0.0.1] ([77.3.101.184]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N6KYb-1mIycD0rH7-016jjg; Thu, 13 Jan 2022 00:25:44 +0100 Date: Thu, 13 Jan 2022 00:25:41 +0100 From: Sebastian Moeller To: cerowrt-devel@lists.bufferbloat.net, Dave Taht , cerowrt-devel , Cake List User-Agent: K-9 Mail for Android In-Reply-To: References: <20220107202249.3812322-1-kevin@bracey.fi> Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=----1VZHTC7IGKKHHHJ4JYEE3YI9RD6EBZ Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:AnGEl4LcgEZDdZ3k2eHEKlUlDqV+VaIXyXPtYa0PSIB8w6HktpJ ElE4asr4QpSzwJ3/tqkYgsgkXfyXcKakYg/u1i6RUWBM1WeuYQ82KpmMl1u0/tEcdT+v2k0 vOJ6i3cC6fgrN65O9X/uS7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/dolZunDc9pc a2rGDOxvV10BqdCBC0+G9HQe1dfRhC867IwjAH0AcWTcCafHWCFory+4789oGb2VLNwnJHHmu 9KcsI2sEYTmN0Otn/vLR6G83lisiGlktFHQPPO0T9wfxinugnFoTpBI2GeHu/nc7EYfyLhzsW UtO3oAxkvmquAY= Subject: Re: [Cerowrt-devel] Fwd: [PATCH net-next] net_sched: restore "mpu xxx" handling X-BeenThere: cerowrt-devel@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: Development issues regarding the cerowrt test router project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jan 2022 23:25:46 -0000 ------1VZHTC7IGKKHHHJ4JYEE3YI9RD6EBZ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable No idea, sqm-scripts long had supported htb's linklayer accounting but defa= ulted to using tc stab instead, and mainly for htb+fq_codel, for cake it de= faulted to cake's internal accounting=2E I have no recollection when I last tested that, probably when I was still = on an ADSL link without a relevant mpu=2E=2E=2E=2E=20 Regards Sebastian On 13 January 2022 00:08:10 CET, Dave Taht wrote= : >this has been broken this long?? > >---------- Forwarded message --------- >From: Kevin Bracey >Date: Fri, Jan 7, 2022 at 4:56 PM >Subject: [PATCH net-next] net_sched: restore "mpu xxx" handling >To: >Cc: Kevin Bracey , Eric Dumazet >, Jiri Pirko , Vimalkumar > > > >commit 56b765b79e9a ("htb: improved accuracy at high rates") broke >"overhead X", "linklayer atm" and "mpu X" attributes=2E > >"overhead X" and "linklayer atm" have already been fixed=2E This restores >the "mpu X" handling, as might be used by DOCSIS or Ethernet shaping: > > tc class add =2E=2E=2E htb rate X overhead 4 mpu 64 > >The code being fixed is used by htb, tbf and act_police=2E Cake has its >own mpu handling=2E qdisc_calculate_pkt_len still uses the size table >containing values adjusted for mpu by user space=2E > >Fixes: 56b765b79e9a ("htb: improved accuracy at high rates") >Signed-off-by: Kevin Bracey >Cc: Eric Dumazet >Cc: Jiri Pirko >Cc: Vimalkumar >--- > include/net/sch_generic=2Eh | 5 +++++ > net/sched/sch_generic=2Ec | 1 + > 2 files changed, 6 insertions(+) > >diff --git a/include/net/sch_generic=2Eh b/include/net/sch_generic=2Eh >index c70e6d2b2fdd=2E=2Efddca0aa73ef 100644 >--- a/include/net/sch_generic=2Eh >+++ b/include/net/sch_generic=2Eh >@@ -1244,6 +1244,7 @@ struct psched_ratecfg { > u64 rate_bytes_ps; /* bytes per second */ > u32 mult; > u16 overhead; >+ u16 mpu; > u8 linklayer; > u8 shift; > }; >@@ -1253,6 +1254,9 @@ static inline u64 psched_l2t_ns(const struct >psched_ratecfg *r, > { > len +=3D r->overhead; > >+ if (len < r->mpu) >+ len =3D r->mpu; >+ > if (unlikely(r->linklayer =3D=3D TC_LINKLAYER_ATM)) > return ((u64)(DIV_ROUND_UP(len,48)*53) * r->mult) >> r->s= hift; > >@@ -1275,6 +1279,7 @@ static inline void psched_ratecfg_getrate(struct >tc_ratespec *res, > res->rate =3D min_t(u64, r->rate_bytes_ps, ~0U); > > res->overhead =3D r->overhead; >+ res->mpu =3D r->mpu; > res->linklayer =3D (r->linklayer & TC_LINKLAYER_MASK); > } > >diff --git a/net/sched/sch_generic=2Ec b/net/sched/sch_generic=2Ec >index 3b0f62095803=2E=2E5d391fe3137d 100644 >--- a/net/sched/sch_generic=2Ec >+++ b/net/sched/sch_generic=2Ec >@@ -1474,6 +1474,7 @@ void psched_ratecfg_precompute(struct psched_ratecf= g *r, > { > memset(r, 0, sizeof(*r)); > r->overhead =3D conf->overhead; >+ r->mpu =3D conf->mpu; > r->rate_bytes_ps =3D max_t(u64, conf->rate, rate64); > r->linklayer =3D (conf->linklayer & TC_LINKLAYER_MASK); > psched_ratecfg_precompute__(r->rate_bytes_ps, &r->mult, &r->shift= ); >-- >2=2E25=2E1 > > > >--=20 >I tried to build a better future, a few times: >https://wayforward=2Earchive=2Eorg/?site=3Dhttps%3A%2F%2Fwww=2Eicei=2Eorg > >Dave T=C3=A4ht CEO, TekLibre, LLC >_______________________________________________ >Cerowrt-devel mailing list >Cerowrt-devel@lists=2Ebufferbloat=2Enet >https://lists=2Ebufferbloat=2Enet/listinfo/cerowrt-devel --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E ------1VZHTC7IGKKHHHJ4JYEE3YI9RD6EBZ Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable No idea, sqm-scripts long had supported htb's link= layer accounting but defaulted to using tc stab instead, and mainly for htb= +fq_codel, for cake it defaulted to cake's internal accounting=2E

I = have no recollection when I last tested that, probably when I was still on = an ADSL link without a relevant mpu=2E=2E=2E=2E

Regards
= Sebastian



On 13 January 2022 00:0= 8:10 CET, Dave Taht <dave=2Etaht@gmail=2Ecom> wrote:
this has been broken this long??
---------- Forwarded message ---------
From: Kevin Bracey <kevin@bra= cey=2Efi>
Date: Fri, Jan 7, 2022 at 4:56 PM
Subject: [PATCH net-ne= xt] net_sched: restore "mpu xxx" handling
To: <netdev@vger=2Ekernel= =2Eorg>
Cc: Kevin Bracey <kevin@bracey=2Efi>, Eric Dumazet
&= lt;edumazet@google=2Ecom>, Jiri Pirko <jiri@resnulli=2Eus>, Vimalk= umar
<j=2Evimal@gmail=2Ecom>


commit 56b765b79e9a ("htb:= improved accuracy at high rates") broke
"overhead X", "linklayer atm" a= nd "mpu X" attributes=2E

"overhead X" and "linklayer atm" have alrea= dy been fixed=2E This restores
the "mpu X" handling, as might be used by= DOCSIS or Ethernet shaping:

tc class add =2E=2E=2E htb rate X o= verhead 4 mpu 64

The code being fixed is used by htb, tbf and act_po= lice=2E Cake has its
own mpu handling=2E qdisc_calculate_pkt_len still u= ses the size table
containing values adjusted for mpu by user space=2E
Fixes: 56b765b79e9a ("htb: improved accuracy at high rates")
Signe= d-off-by: Kevin Bracey <kevin@bracey=2Efi>
Cc: Eric Dumazet <ed= umazet@google=2Ecom>
Cc: Jiri Pirko <jiri@resnulli=2Eus>
Cc:= Vimalkumar <j=2Evimal@gmail=2Ecom>
include/net/sch_generic=2Eh |= 5 +++++
net/sched/sch_generic=2Ec | 1 +
2 files changed, 6 inser= tions(+)

diff --git a/include/net/sch_generic=2Eh b/include/net/sch_= generic=2Eh
index c70e6d2b2fdd=2E=2Efddca0aa73ef 100644
--- a/include= /net/sch_generic=2Eh
+++ b/include/net/sch_generic=2Eh
@@ -1244,6 +12= 44,7 @@ struct psched_ratecfg {
u64 rate_bytes_ps; /* bytes = per second */
u32 mult;
u16 overhead;
+ = u16 mpu;
u8 linklayer;
u8 shift; };
@@ -1253,6 +1254,9 @@ static inline u64 psched_l2t_ns(const struct<= br>psched_ratecfg *r,
{
len +=3D r->overhead;

+ = if (len < r->mpu)
+ len =3D r->mpu;
+
= if (unlikely(r->linklayer =3D=3D TC_LINKLAYER_ATM))
= return ((u64)(DIV_ROUND_UP(len,48)*53) * r->mult) >> r->s= hift;

@@ -1275,6 +1279,7 @@ static inline void psched_ratecfg_getrat= e(struct
tc_ratespec *res,
res->rate =3D min_t(u64, r->= rate_bytes_ps, ~0U);

res->overhead =3D r->overhead;+ res->mpu =3D r->mpu;
res->linklayer =3D (r->= ;linklayer & TC_LINKLAYER_MASK);
}

diff --git a/net/sched/sc= h_generic=2Ec b/net/sched/sch_generic=2Ec
index 3b0f62095803=2E=2E5d391f= e3137d 100644
--- a/net/sched/sch_generic=2Ec
+++ b/net/sched/sch_gen= eric=2Ec
@@ -1474,6 +1474,7 @@ void psched_ratecfg_precompute(struct psc= hed_ratecfg *r,
{
memset(r, 0, sizeof(*r));
r->= ;overhead =3D conf->overhead;
+ r->mpu =3D conf->mpu;
= r->rate_bytes_ps =3D max_t(u64, conf->rate, rate64);
= r->linklayer =3D (conf->linklayer & TC_LINKLAYER_MASK);
= psched_ratecfg_precompute__(r->rate_bytes_ps, &r->mult, &= ;r->shift);
--
2=2E25=2E1



--
Sent from my An= droid device with K-9 Mail=2E Please excuse my brevity=2E
------1VZHTC7IGKKHHHJ4JYEE3YI9RD6EBZ--