Subject: Re: [PATCH] flow_diseector: Add support for IPPROTO_IPV6

From: Stephen Hemminger <[email-masked]>
Date: Mon, 29 Jul 2013 08:37:35 -0700

On Mon, 29 Jul 2013 08:06:51 -0700 (PDT)
Tom Herbert <[email-masked]> wrote:

> Add support for dissecting flows in IPv6/IPv4 packets.
> 
> Signed-off-by: Tom Herbert <[email-masked]>
> ---
>  net/core/flow_dissector.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
> index 00ee068..96901de 100644
> --- a/net/core/flow_dissector.c
> +++ b/net/core/flow_dissector.c
> @@ -139,7 +139,11 @@ ipv6:
>  		break;
>  	}
>  	case IPPROTO_IPIP:
> -		goto again;
> +		proto = __constant_htons(ETH_P_IP);
> +		goto ip;
> +	case IPPROTO_IPV6:
> +		proto = __constant_htons(ETH_P_IPV6);
> +		goto ipv6;
>  	default:
>  		break;
>  	}

The __constant_htons() is unnecessary, the simple macro htons()
is smart enough to figure out what is constant. The current style
preference is to use htons() instead; shorter is better.