[ovs-dev] [PATCH] [rfc] datapath: Clear rxhash when using an action that may affect it

Jesse Gross jesse at nicira.com
Tue Feb 1 03:19:16 UTC 2011


On Sun, Jan 30, 2011 at 1:14 PM, Simon Horman <horms at verge.net.au> wrote:
> diff --git a/acinclude.m4 b/acinclude.m4
> index 6fc1c7a..4999d05 100644
> --- a/acinclude.m4
> +++ b/acinclude.m4
> @@ -186,6 +186,8 @@ AC_DEFUN([OVS_CHECK_LINUX26_COMPAT], [
>                   [OVS_DEFINE([HAVE_SKBUFF_HEADER_HELPERS])])
>   OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [skb_warn_if_lro],
>                   [OVS_DEFINE([HAVE_SKB_WARN_LRO])])
> +  OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [rxhash],
> +                  [OVS_DEFINE([HAVE_RXHASH])])

This isn't terribly important but usually we just use direct version
checks unless we know of a distribution that is backporting it, just
to keep the number of checks from getting too out of hand.  Do you
know of a backport?

> diff --git a/datapath/actions.c b/datapath/actions.c
> index 3223c65..b8495aa 100644
> --- a/datapath/actions.c
> +++ b/datapath/actions.c
> @@ -413,6 +423,7 @@ static int do_execute_actions(struct datapath *dp, struct sk_buff *skb,
>
>                case ODP_ACTION_ATTR_SET_TUNNEL:
>                        OVS_CB(skb)->tun_id = nla_get_be64(a);
> +                       skb_clear_rxhash(skb);

This needs to be done in the tunneling code on encap/decap.  On
receive this action will never be used and it's not required to be
used on transmit.




More information about the dev mailing list