[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1349370476.16011.84.camel@edumazet-glaptop>
Date: Thu, 04 Oct 2012 19:07:56 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Stephen Hemminger <shemminger@...tta.com>
Cc: Jesse Gross <jesse@...ira.com>, davem@...emloft.net,
netdev@...r.kernel.org
Subject: Re: [RFC] vxlan: use ether header as fallback hash
On Thu, 2012-10-04 at 09:43 -0700, Stephen Hemminger wrote:
> On Thu, 4 Oct 2012 09:27:14 -0700
> Jesse Gross <jesse@...ira.com> wrote:
> > > +static u16 vxlan_flow_hash(struct sk_buff *skb)
> > > +{
> > > + u16 hash = skb_get_rxhash(skb);
> > > +
> > > + if (!hash)
> > > + hash = jhash(skb->data, 3, skb->protocol);
> >
> > Shouldn't this be jhash2 for words?
>
> No. for a couple of reasons. First, the ethernet header may not be aligned.
> Second we want to get source/destination and type. The source/destination
> is 12 bytes (3 words) and the ether type is already in skb->protocol.
jhash(skb->data, 12, initval)
--
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