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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101210082040.230a2832@nehalam>
Date:	Fri, 10 Dec 2010 08:20:40 -0800
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Octavian Purdila <opurdila@...acom.com>
Cc:	netdev@...r.kernel.org,
	Lucian Adrian Grijincu <lucian.grijincu@...il.com>,
	Vlad Dogaru <ddvlad@...edu.org>
Subject: Re: [PATCH] iproute2: add dynamic index and name hashes

On Fri, 10 Dec 2010 16:59:24 +0200
Octavian Purdila <opurdila@...acom.com> wrote:

> The hashes sizes start with 16 entries and grow up to 2^20
> entries. The hashes double when the entries in the LL map is greater
> then the hash size.
> 
> Signed-off-by: Octavian Purdila <opurdila@...acom.com>
> ---
>  lib/ll_map.c |  125 +++++++++++++++++++++++++++++++++++++++++++++++----------
>  1 files changed, 103 insertions(+), 22 deletions(-)
> 
> diff --git a/lib/ll_map.c b/lib/ll_map.c
> index b8b49aa..9831322 100644
> --- a/lib/ll_map.c
> +++ b/lib/ll_map.c
> @@ -26,7 +26,8 @@ extern unsigned int if_nametoindex (const char *);
>  
>  struct idxmap
>  {
> -	struct idxmap * next;
> +	struct idxmap *idx_next;
> +	struct idxmap *name_next;
>  	unsigned	index;
>  	int		type;
>  	int		alen;
> @@ -35,31 +36,100 @@ struct idxmap
>  	char		name[16];
>  };
>  
> -static struct idxmap *idxmap[16];

This is user space, and memory space is realtively cheap. Why not just
make initial idxmap much bigger and be done with it.


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