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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sat, 10 Nov 2007 21:55:06 -0800 (PST)
From:	David Miller <>
Subject: Re: [PATCH] [PKT_SCHED] CLS_U32: Use ffs() instead of C code on
 hash mask to get first set bit.

From: jamal <>
Date: Thu, 08 Nov 2007 08:45:31 -0500

> On Thu, 2007-08-11 at 13:07 +0200, Radu Rendec wrote:
> > Computing the rank of the first set bit in the hash mask (for using later
> > in u32_hash_fold()) was done with plain C code. Using ffs() instead makes
> > the code more readable and improves performance (since ffs() is better
> > optimized in assembler).
> > 
> > Using the conditional operator on hash mask before applying ntohl() also
> > saves one ntohl() call if mask is 0.
> > 
> > Signed-off-by: Radu Rendec <>
> Acked-by: Jamal Hadi Salim <>

Applied, thanks everyone.
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists