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
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <926fd938-700e-45a6-928a-34a81d0c231d@redhat.com>
Date: Tue, 24 Jun 2025 13:01:48 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: chia-yu.chang@...ia-bell-labs.com, alok.a.tiwari@...cle.com,
 pctammela@...atatu.com, horms@...nel.org, donald.hunter@...il.com,
 xandfury@...il.com, netdev@...r.kernel.org, dave.taht@...il.com,
 jhs@...atatu.com, kuba@...nel.org, stephen@...workplumber.org,
 xiyou.wangcong@...il.com, jiri@...nulli.us, davem@...emloft.net,
 edumazet@...gle.com, andrew+netdev@...n.ch, ast@...erby.net,
 liuhangbin@...il.com, shuah@...nel.org, linux-kselftest@...r.kernel.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
Subject: Re: [PATCH v20 net-next 1/6] sched: Struct definition and parsing of
 dualpi2 qdisc

On 6/21/25 9:33 PM, chia-yu.chang@...ia-bell-labs.com wrote:
> +static u32 get_memory_limit(struct Qdisc *sch, u32 limit)
> +{
> +	/* Apply rule of thumb, i.e., doubling the packet length,
> +	 * to further include per packet overhead in memory_limit.
> +	 */
> +	u64 memlim = mul_u32_u32(limit, 2 * psched_mtu(qdisc_dev(sch)));
> +
> +	if (upper_32_bits(memlim))
> +		return U32_MAX;
> +	else
> +		return lower_32_bits(memlim);
> +}
> +
> +static u32 convert_us_to_nsec(u32 us)
> +{
> +	u64 ns = mul_u32_u32(us, NSEC_PER_USEC);
> +
> +	if (upper_32_bits(ns))
> +		return U32_MAX;
> +	else
> +		return lower_32_bits(ns);
> +}

Minor nit not intended to block this series. If you have to repost for
other reasons, please consider dropping the 'else' statement;  the
alternative is IMHO more readable.

/P


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ