[ovs-dev] [PATCH] datapath: Fix tunnel source port selection for mega flow

Andy Zhou azhou at nicira.com
Wed Jul 3 16:03:55 UTC 2013


Good point. I agree.  This patch is only to fix a bug at hand. My
understanding is that we will change to use skb_get_rxhash() after Pravin's
tunnel patches are upstreamed.


On Wed, Jul 3, 2013 at 4:34 AM, Rajahalme, Jarno (NSN - FI/Espoo) <
jarno.rajahalme at nsn.com> wrote:

>
> On Jul 3, 2013, at 1:58 , ext Andy Zhou wrote:
> > diff --git a/datapath/tunnel.c b/datapath/tunnel.c
> > index 9102786..18c3622 100644
> > --- a/datapath/tunnel.c
> > +++ b/datapath/tunnel.c
> > @@ -186,7 +186,9 @@ u16 ovs_tnl_get_src_port(struct sk_buff *skb)
> >       int low;
> >       int high;
> >       unsigned int range;
> > -     u32 hash = OVS_CB(skb)->flow->hash;
> > +     struct sw_flow_key *pkt_key = OVS_CB(skb)->pkt_key;
> > +     u32 hash = jhash2((const u32 *)pkt_key,
> > +                     0, sizeof(*pkt_key) / sizeof(u32));
> >
>
> Wouldn't skb_get_rxhash() be a lot cheaper and enough for this purpose?
>
>   Jarno
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20130703/bd2f2f18/attachment-0003.html>


More information about the dev mailing list