[ovs-dev] [PATCH v6] datapath: Add support for kernel 3.14.

Jesse Gross jesse at nicira.com
Wed Apr 30 22:42:37 UTC 2014


On Tue, Apr 29, 2014 at 3:24 PM, Pritesh Kothari
<pritesh.kothari at cisco.com> wrote:
> diff --git a/datapath/linux/compat/include/linux/skbuff.h b/datapath/linux/compat/include/linux/skbuff.h
> index 714c955..de9b29d 100644
> --- a/datapath/linux/compat/include/linux/skbuff.h
> +++ b/datapath/linux/compat/include/linux/skbuff.h
> +#ifndef HAVE_SKB_CLEAR_HASH
> +static inline void skb_clear_hash(struct sk_buff *skb)
> +{
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)
> +       skb->rxhash = 0;
> +#endif
> +}
> +#endif

Thanks - this looks mostly good to me. One thing that I noticed is
that I think the original version of this function has a bug in it (or
more to the point, wasn't updated).

I think that we also need to clear skb->l4_rxhash here since otherwise
when we retrieve the hash the next time it won't be recomputed. I
think we can also use HAVE_RXHASH instead of the first version check
and may want to do something similar for the l4_rxhash, which could be
backported separately.



More information about the dev mailing list