On 6/21/25 9:33 PM, chia-yu.chang@nokia-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