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:	Fri, 25 Feb 2011 17:55:17 +0100
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Daniel Baluta <dbaluta@...acom.com>
Cc:	netdev@...r.kernel.org, davem@...emloft.net,
	Rohan Chitradurga <rohan@...acom.com>
Subject: Re: [PATCH] udp: avoid searching when no ports are available

Le vendredi 25 février 2011 à 18:45 +0200, Daniel Baluta a écrit :
> I guess now, the correct bitmap size is MAX_UDP_PORTS / (udptable->mask + 1)
> or  MAX_UDP_PORTS >> udptable->log,  right?
> 


Yes, but using bitmap_zero(bitmap, PORTS_PER_CHAIN) is faster.

It generates 4 machine instructions,
	movq   $0x0,(%r10)
	movq   $0x0,0x8(%r10)
	movq   $0x0,0x10(%r10)
	movq   $0x0,0x18(%r10)

while bitmap_zero(bitmap, some_non_constant_expression) is more
expensive (it calls an out of line function)


> We don't have special needs on a small machine. We just want that when
> when all UDP ports are exhausted, bind calls to fail faster.
> 
> I will be back with tests on latest kernel.

Hmm, please always use the latest kernel before sending patches.

Thanks


--
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