Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1443915imm; Sat, 2 Jun 2018 00:55:02 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKtTDjxi+2jt5MN7+tw6XhACJ+qEzc5pL/HPa6dxlktmbtRLDKluP3N/jJFvVIFVyTvpnF2 X-Received: by 2002:a63:444:: with SMTP id 65-v6mr11555539pge.101.1527926102682; Sat, 02 Jun 2018 00:55:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527926102; cv=none; d=google.com; s=arc-20160816; b=rqpVBrsdjjp4siGYosbVQa0MOmVrv6bSLlWjWVFGTfxAOiy1G+WhLLjMPy9Ilu+JiS eqRo4laNhFNcjEiNcsTwYGKlyor36hpR/9Q53pPGrKNaP3nG2NjXrgTvL4QwamnNUwIz FZycuUC2S5ec/yFaKRanbEwIWOY8fBUfWWFUSrU7+dHt0GXdQW59XfUMp5yy/ZKcXX+W Jc+mi3INp320w63lotdV/IdcGcQRFb0qbEXNuIeqN6AE/n/QKEYphHPdj33WNaP/hydq zLKprHdF56jCN9Lxzr1invQqlI5ZoNjeZVpCczs5ALR5u0eNQ0P0bSWu0sB8Z+hj5uv7 ecZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=TrSauxbkQgH1mvoUpgIraQwTmMyuYkqvoFD2VGtkrsQ=; b=C7BAigyfPB4xsvNoa/3KLObFWOkyBj4citmHljfYPUXamy9WAH5nlfhK9nWaLTu4an CpxsfGlOskHkccHW6xCfwfxJM9iiVJACVXCvUsWFXEinNPTNJqk0GD4D84lLZbODvAa3 PkNMY3Xam5vGIPY4TIGlFsm08OB9bYTghRnUwPPVrl5mg1JTs/ML1/WG32e0QkgZnHrm Ondhjzw5HVhTwwxOuqQro5B5VY3HZnvpQ1maQ/4Bq+YnU0XvjT4Glmg8voyH9CStJWtj VJ8h52Fmv4ceGBmcvcBukeLBOMxP3g+vh8xGvdw2l71eCV6O3B5jCbmnKVN1MFfPOUT3 ILSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c24-v6si41268623plo.489.2018.06.02.00.54.48; Sat, 02 Jun 2018 00:55:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750881AbeFBHyU (ORCPT + 99 others); Sat, 2 Jun 2018 03:54:20 -0400 Received: from mx2.suse.de ([195.135.220.15]:33454 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750812AbeFBHyP (ORCPT ); Sat, 2 Jun 2018 03:54:15 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id CF082AD28; Sat, 2 Jun 2018 07:54:13 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id 4CECDA0C48; Sat, 2 Jun 2018 09:54:12 +0200 (CEST) Date: Sat, 2 Jun 2018 09:54:12 +0200 From: Michal Kubecek To: Ido Schimmel Cc: "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Nicolas Dichtel , Tom Herbert , David Ahern Subject: Re: [PATCH net] ipv6: omit traffic class when calculating flow hash Message-ID: <20180602075411.y64k2cu7kz3ygp6d@unicorn.suse.cz> References: <20180601112948.93BE7A0C48@unicorn.suse.cz> <20180601181929.GA16452@splinter> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180601181929.GA16452@splinter> User-Agent: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 01, 2018 at 09:19:29PM +0300, Ido Schimmel wrote: > On Fri, Jun 01, 2018 at 12:34:41PM +0200, Michal Kubecek wrote: > > 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 incosistent 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 > > Please consider adding a test case to > tools/testing/selftests/net/fib_tests.sh > > Personally, I tested the patch by looping over different values of 'tos' > for 'ip route get' and confirmed that the same nexthop is selected. Thanks for the tip, I'll look into it next week. Michal Kubecek