From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net v3] ipv6: omit traffic class when calculating flow hash Date: Mon, 04 Jun 2018 13:22:12 -0400 (EDT) Message-ID: <20180604.132212.983793538169890618.davem@davemloft.net> References: <687af1bc-a1f9-c0d2-dd3a-eeef3a2bf9b4@gmail.com> <20180604095619.7D9C1A09F0@unicorn.suse.cz> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, nicolas.dichtel@6wind.com, tom@herbertland.com, dsahern@gmail.com, idosch@idosch.org To: mkubecek@suse.cz Return-path: In-Reply-To: <20180604095619.7D9C1A09F0@unicorn.suse.cz> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Michal Kubecek Date: Mon, 4 Jun 2018 11:36:05 +0200 > Some of the code paths calculating flow hash for IPv6 use flowlabel member > of struct flowi6 which, despite its name, encodes both flow label and > traffic class. If traffic class changes within a TCP connection (as e.g. > ssh does), ECMP route can switch between path. It's also inconsistent with > other code paths where ip6_flowlabel() (returning only flow label) is used > to feed the key. > > Use only flow label everywhere, including one place where hash key is set > using ip6_flowinfo(). > > Fixes: 51ebd3181572 ("ipv6: add support of equal cost multipath (ECMP)") > Fixes: f70ea018da06 ("net: Add functions to get skb->hash based on flow structures") > Signed-off-by: Michal Kubecek > --- > v2: introduce and use an inline helper as suggested by David Ahern > v3: keep the cast out of the helper to make future cleanup easier Applied and queued up for -stable, thank you.