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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 21 Jan 2013 11:30:25 +0900
From:	YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>
To:	Tom Herbert <therbert@...gle.com>
CC:	netdev@...r.kernel.org, davem@...emloft.net,
	netdev@...kandruth.co.uk, eric.dumazet@...il.com
Subject: Re: [PATCH 2/5 v2] soreuseport: TCP/IPv4 implementation

Tom Herbert wrote:

> +		} else if (score == hiscore && reuseport) {
> +			matches++;
> +			if (((u64)phash * matches) >> 32 == 0)
> +				result = sk;
> +			phash = next_pseudo_random32(phash);
>  		}
>  	}
>  	/*

Well, honestly, this seems the most difficult part to understand
at a glance.  Plus, there seems multiple ways to do this.
Maybe, inline?

static inline sock_true_1_in_n(u32 r, unsigned int n)
{
	/* return (r < ~0U / n); */
	/* return (r % n == 0); */
	return ((u64)r * n >> 32) == 0;
}

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ