Re: [PATCH net v2] ipv6: omit traffic class when calculating flow hash

From: David Ahern
Date: Sun Jun 03 2018 - 11:00:52 EST


On 6/2/18 1:40 AM, Michal Kubecek wrote:
> diff --git a/include/net/ipv6.h b/include/net/ipv6.h
> index 836f31af1369..7fbdc3e9e25d 100644
> --- a/include/net/ipv6.h
> +++ b/include/net/ipv6.h
> @@ -906,6 +906,11 @@ static inline __be32 ip6_make_flowinfo(unsigned int tclass, __be32 flowlabel)
> return htonl(tclass << IPV6_TCLASS_SHIFT) | flowlabel;
> }
>
> +static inline u32 flowi6_get_flowlabel(const struct flowi6 *fl6)
> +{
> + return (__force u32)(fl6->flowlabel & IPV6_FLOWLABEL_MASK);
> +}
> +
> /*
> * Prototypes exported by ipv6
> */

discussing the fix for net-next and making the label vs info consistent,
Michal notes a few places where this helper is needed as a __be32, so
the typecast should be outside of this helper.