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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 29 Mar 2007 21:24:31 +0200
From:	Zacco <zacco@...hu>
To:	Eric Dumazet <dada1@...mosbay.com>
CC:	David Miller <davem@...emloft.net>, baruch@...en.org,
	netdev@...r.kernel.org
Subject: Re: many sockets, slow sendto

Hi,

Thanks for the patch. I almost dare not confess that I don't know which 
version to apply to. I tried 3 different ones (2.6.19-r5-gentoo, 
2.6.20.1 and 2.6.21-rc4), but in the best case at least two hunks 
failed. Nevertheless, I applied the patches manually. In each case, UDP 
stopped working. I guess, you checked the patch and worked. I don't 
think I made a mistake in the manual copy, and it seems unlikely that 
your patch interfered with other parallel changes in the kernel - but, 
I'm just guessing ...
I think, I'd better send you the spec and code, as you suggested that 
first we have a common understanding of the issue. I must have failed in 
passing the point. I'm removing irrelevant stuff, and I send it to you 
as soon as I can (sorry for my long delays).

thx a lot,
Zacco

Eric Dumazet wrote:
> Eric Dumazet a écrit :
>> Currently, udp_hash[UDP_HTABLE_SIZE] is using a hash function based 
>> on dport number only.
>>
>> In your case, as you use a single port value, all sockets are in a 
>> single slot of this hash table :
>> To find the good socket, __udp4_lib_lookup() has to search in a list 
>> with thousands of elements. Not that good, isnt it ? :(
>
> In case you want to try, here is a patch that could help you :)
>
> [PATCH] INET : IPV4 UDP lookups converted to a 2 pass algo
>
> Some people want to have many UDP sockets, binded to a single port but 
> many different addresses. We currently hash all those sockets into a 
> single chain. Processing of incoming packets is very expensive, 
> because the whole chain must be examined to find the best match.
>
> I chose in this patch to hash UDP sockets with a hash function that 
> take into account both their port number and address : This has a 
> drawback because we need two lookups : one with a given address, one 
> with a wildcard (null) address.
>
> Signed-off-by: Eric Dumazet <dada1@...mosbay.com>
>

-
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