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]
Message-ID: <20140314091235.14bc24e4@nehalam.linuxnetplumber.net>
Date:	Fri, 14 Mar 2014 09:12:35 -0700
From:	Stephen Hemminger <stephen@...workplumber.org>
To:	Michael Braun <michael-dev@...i-braun.de>
Cc:	Patrick McHardy <kaber@...sh.net>, <netdev@...r.kernel.org>,
	<projekt-wlan@....tu-ilmenau.de>, Stefan Gula <steweg@...il.com>
Subject: Re: [PATCHv9] macvlan: add source mode

On Fri, 14 Mar 2014 12:49:46 +0100
Michael Braun <michael-dev@...i-braun.de> wrote:

> +static void macvlan_forward_sources(struct sk_buff *skb,
> +				    struct macvlan_port *port,
> +				    const unsigned char *addr)
> +{
> +	struct macvlan_source_list *list;
> +	struct hlist_head *h = &port->vlan_source_hash[addr[5]];
> +

If you are going to use a hash table, better to use a real hash function.
It could be as simple as jhash, or you could be faster/smaller
by putting ether address into 64 bit number and using hash_64.
--
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