[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241023085423.7e842346@hermes.local>
Date: Wed, 23 Oct 2024 08:54:23 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: chia-yu.chang@...ia-bell-labs.com
Cc: netdev@...r.kernel.org, dsahern@...il.com, davem@...emloft.net,
jhs@...atatu.com, edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
dsahern@...nel.org, ij@...nel.org, ncardwell@...gle.com,
koen.de_schepper@...ia-bell-labs.com, g.white@...leLabs.com,
ingemar.s.johansson@...csson.com, mirja.kuehlewind@...csson.com,
cheshire@...le.com, rs.ietf@....at, Jason_Livingood@...cast.com,
vidhi_goel@...le.com, Olga Albisser <olga@...isser.org>, Oliver Tilmans
<olivier.tilmans@...ia.com>, Bob Briscoe <research@...briscoe.net>, Henrik
Steen <henrist@...rist.net>
Subject: Re: [PATCH v2 iproute2-next 1/1] tc: add dualpi2 scheduler module
On Wed, 23 Oct 2024 13:04:34 +0200
chia-yu.chang@...ia-bell-labs.com wrote:
> + if (tb[TCA_DUALPI2_ALPHA] &&
> + RTA_PAYLOAD(tb[TCA_DUALPI2_ALPHA]) >= sizeof(__u32))
> + print_float(PRINT_ANY, "alpha", "alpha %f ",
> + ((float)rta_getattr_u32(tb[TCA_DUALPI2_ALPHA])) /
> + ALPHA_BETA_SCALE);
Since this is repeated maybe a simple helper function
get_scaled_alpha(tb[TCA_DUALPI2_ALPHA])
Powered by blists - more mailing lists