netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Michael Braun <michael-dev@fami-braun.de>
Cc: Patrick McHardy <kaber@trash.net>, <netdev@vger.kernel.org>,
	<projekt-wlan@fem.tu-ilmenau.de>, Stefan Gula <steweg@gmail.com>
Subject: Re: [PATCHv9] macvlan: add source mode
Date: Fri, 14 Mar 2014 09:12:35 -0700	[thread overview]
Message-ID: <20140314091235.14bc24e4@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <1394797786-27420-1-git-send-email-michael-dev@fami-braun.de>

On Fri, 14 Mar 2014 12:49:46 +0100
Michael Braun <michael-dev@fami-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.

  parent reply	other threads:[~2014-03-14 16:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-14 11:49 [PATCHv9] macvlan: add source mode Michael Braun
2014-03-14 12:42 ` Eric Dumazet
2014-03-14 16:12 ` Stephen Hemminger [this message]
2014-03-14 17:25 ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140314091235.14bc24e4@nehalam.linuxnetplumber.net \
    --to=stephen@networkplumber.org \
    --cc=kaber@trash.net \
    --cc=michael-dev@fami-braun.de \
    --cc=netdev@vger.kernel.org \
    --cc=projekt-wlan@fem.tu-ilmenau.de \
    --cc=steweg@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).