Received: by 10.192.165.148 with SMTP id m20csp1744516imm; Thu, 26 Apr 2018 01:24:42 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/BEeYOWuq+A1ngZk0B9RkFI+OkoNAnhyeoyy2vnV7qA26Ap3/2ddaD94CfdJA5j21bets7 X-Received: by 2002:a17:902:5a88:: with SMTP id r8-v6mr33047767pli.78.1524731082165; Thu, 26 Apr 2018 01:24:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524731082; cv=none; d=google.com; s=arc-20160816; b=nR2GD9L77ncLlOpkeNP18K/8UUaIbO4AL3RQ2an60cw61h7k6GDuIPTQABWeVoaVT7 m6g3Hmjxqy/PyFsoK0gDmt6KH/sSz7cHRME2gB7a6BtHuS7RoqwK1W+frMWFiOXLgoE+ bXN7sz5DwcOnVTZpszmqbh7nByVLQ7lYO4F4LVF8H8pj86vk3c5yxkGOlVGvu8vEeTef SKOZqgGzlcmdbJl5hTorBmqZ4F3lMKBtRdM/tgzlqdVUygHBGXZQlY40lutqY5dgb6sz BWK/5tYUdmr2EPJn8pf0GcSti+FhGq5x55Ink2k7h3GN/lJmbNbzOo6RyrV7z84NURxG Hw2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=Y7ehmGbMLGSiezs13kMV9VapcaLXR2v1kTa0voeMP9E=; b=v7G9+JzI4lA43OvVjp1gL5yZdQmX2/dxslBuazvwzT9p3t0PxTcGm/dZzZZ3N330TZ kgGI/pgwcp2dykEkY8BNYpnk5sB2qpH2pAubzxk8KQeQ5JzRhWHMv3gfYUKD+D7tHr6P Tzb4R/F2dSSOw8uD02woL2dgQ3vJdOvuvdRBsBPFacZMDbQ9xYOSa0/4ALKURGT/V5n5 q1ZSdJQO9M2vhheoyYKuQdRtsAMRFN4nbsFPiwxe7qrsiXQvRUbMQU3gr1U9mDdk6PCE /k+uJDXI+KXidM1KEuOtQjbYd+QcKDN67UWGhu8Ln7Lp6nFaR8x0RDi2a1xa0z5LTr1b 0/mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hASUjwAt; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f68si18260539pfb.30.2018.04.26.01.24.28; Thu, 26 Apr 2018 01:24:42 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hASUjwAt; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754562AbeDZIXO (ORCPT + 99 others); Thu, 26 Apr 2018 04:23:14 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:38683 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753219AbeDZIXK (ORCPT ); Thu, 26 Apr 2018 04:23:10 -0400 Received: by mail-wm0-f65.google.com with SMTP id i3so11447308wmf.3; Thu, 26 Apr 2018 01:23:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Y7ehmGbMLGSiezs13kMV9VapcaLXR2v1kTa0voeMP9E=; b=hASUjwAtrjurCma2anZCIQXP3PrjAwAHE3KAUXiSR1++1JgSaOe7OaAINvqgt/vs6X wmEw9PP66jeGYG+CsADHJ+H+kJjgd/kMvaDlCrxqMQS8RwiFY6KBa3nMoxtJzRDVLgok i6o+fomfUcGykaXtuMYzBACbJMWgbFg/pN8zjDLxngr60sOh0ZIYdf5MwPbmD+/i1M3u X0ig+6MFAUyTeIj4HHcjYy2G5iL6bAkLR51lc07JUgjJBkiRM+YhbAQkCjfSfiHGQEU6 H4tu/1j/wTqSbnw8/e8+j2bQtLYTfXTlsLMUddblYFcF1p0xkbpx3fOvYyzxT0GquBbd niNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Y7ehmGbMLGSiezs13kMV9VapcaLXR2v1kTa0voeMP9E=; b=eBoALYObXC6q9+DWzkKkbErm8McTs0Qm2uR+mNq/nDFEmXaX3wvb37x33J0ycVi1r9 JBViJg3wwe8db2KZOhfOmvyF4T/DiMSStlg4u87rcuLOjYOFTjgpwoOm+vgRfPZuXovf XT5YO7uSLbaClv1vaPuCtYnvmnrOWRVBKyQQT52UIhF0RarUGtJdDFpI08oqyc998qV5 Tv0hgvzITLl717KJsGHrLsZwLHycZpjSQE1HgmyoUQK1VWE6yefc7dsZnPTWjNMV0nvZ 8pzo+nwrICgpK3ovtZ7PNEmDoUU7sM8VV5hINwFYfMa5PFxVKFvTnornYN9k0f4iiDpv 260A== X-Gm-Message-State: ALQs6tAv3linDAuRmJfF958SWBxeroFtlIiDvY0d+6vOior/2EZaprwM S1DgR3TemHUYbgUEBMMr9Nw= X-Received: by 10.28.171.193 with SMTP id u184mr17625707wme.60.1524730988942; Thu, 26 Apr 2018 01:23:08 -0700 (PDT) Received: from AHABDELS-M-M2VD (wifi-guest-target.gssi.infn.it. [192.135.27.147]) by smtp.gmail.com with ESMTPSA id a129sm21457829wme.3.2018.04.26.01.23.07 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 26 Apr 2018 01:23:08 -0700 (PDT) Date: Thu, 26 Apr 2018 10:23:06 +0200 From: Ahmed Abdelsalam To: David Miller Cc: dav.lebrun@gmail.com, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [net-next v3] ipv6: sr: Compute flowlabel for outer IPv6 header of seg6 encap mode Message-Id: <20180426102306.5febbb0b545be315a784dd75@gmail.com> In-Reply-To: <20180425.130304.1605881647944477071.davem@davemloft.net> References: <1524594196-12383-1-git-send-email-amsalam20@gmail.com> <20180425.130304.1605881647944477071.davem@davemloft.net> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.21; x86_64-apple-darwin10.8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 25 Apr 2018 13:03:04 -0400 (EDT) David Miller wrote: > From: Ahmed Abdelsalam > Date: Tue, 24 Apr 2018 20:23:16 +0200 > > > ECMP (equal-cost multipath) hashes are typically computed on the packets' > > 5-tuple(src IP, dst IP, src port, dst port, L4 proto). > > > > For encapsulated packets, the L4 data is not readily available and ECMP > > hashing will often revert to (src IP, dst IP). This will lead to traffic > > polarization on a single ECMP path, causing congestion and waste of network > > capacity. > > > > In IPv6, the 20-bit flow label field is also used as part of the ECMP hash. > > In the lack of L4 data, the hashing will be on (src IP, dst IP, flow > > label). Having a non-zero flow label is thus important for proper traffic > > load balancing when L4 data is unavailable (i.e., when packets are > > encapsulated). > > > > Currently, the seg6_do_srh_encap() function extracts the original packet's > > flow label and set it as the outer IPv6 flow label. There are two issues > > with this behaviour: > > > > a) There is no guarantee that the inner flow label is set by the source. > > b) If the original packet is not IPv6, the flow label will be set to > > zero (e.g., IPv4 or L2 encap). > > > > This patch adds a function, named seg6_make_flowlabel(), that computes a > > flow label from a given skb. It supports IPv6, IPv4 and L2 payloads, and > > leverages the per namespace 'seg6_flowlabel" sysctl value. > > > > The currently support behaviours are as follows: > > -1 set flowlabel to zero. > > 0 copy flowlabel from Inner paceket in case of Inner IPv6 > > (Set flowlabel to 0 in case IPv4/L2) > > 1 Compute the flowlabel using seg6_make_flowlabel() > > > > This patch has been tested for IPv6, IPv4, and L2 traffic. > > > > Signed-off-by: Ahmed Abdelsalam > > Applied. > > Please submit a patch which adds appropriate documentation for this new sysctl > to Documentation/networking/ip-sysctl.txt Thanks David I will send you a patch for ip-sysctl.txt -- Ahmed Abdelsalam