Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2549663pxa; Mon, 24 Aug 2020 18:12:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYuT+tK5sEw/x825Gqxo3opV67v/4Uu7k3cOXfWIDSQIhWQmWN5gQXUF96Vkd6DaE/aC1y X-Received: by 2002:a17:906:e16:: with SMTP id l22mr8117664eji.49.1598317928445; Mon, 24 Aug 2020 18:12:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598317928; cv=none; d=google.com; s=arc-20160816; b=0KoX8GsCHAiis04EUWlql6euqQBvI7gdudGtSfLgkU5n+D9D3tkOUWDobfN8s3bjUn S94TkRButsV73t/atV6ie8svocoX3/EK6sx05epXsKuBUIh1wpC9T4wcibPQ54HYR4Wk BGdc851I4502pzYC3GetBGW3nCBZggnst1lKDdtJSPQ5t98wzrO7XrzpSmtKaX0tzips Bv34ar1gxiISwWi9HS3m4KDw51KOVHG0Ho63dLAIbwS3Z+Ihl3zHeC7MKgd8MvWlXSfM T4/la0iZ9VggpRkBiwKtX91LCoF67KjHc/lMY2aXW8FxeX2Fwp/xktt6roA6YiKIWfJP yAbA== 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:from:subject:cc:to:message-id:date; bh=m+RhchYWcEcn4z9+Lb+0ywYRIWwdDVG+CQpSsp4nTrw=; b=l8KRBeit70UCYsg8FN8JRGwet6Z9H5SPbCJ9xtPaBDYufPUbi6uPL0IZcaXQToz83+ QaSNoDA+sYu3UEGonfCIfsst4LyHv2s1nipckxtKIW8mDcCPF2hXZPZwg+Tjjdqm78Jl FO985eFRZPijQj0aWyUn3sIFpzRnxdlwApycXCGLSukkCrarXbHVRYF8OSs004rbEhPi cLuOZX7KrWlQpHicAA/djEVrHKV6vYFkIhIAWGj8tIQk61Ogvc+ohThKq3ye028wHZgo jMO5t0pmhyidtW+HJckX4K4eJLZbUz0AFEJgISWvI2YnYvwDE6i9/s5gStV9ji1+quNy 2iKw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e1si4197959ejh.517.2020.08.24.18.11.43; Mon, 24 Aug 2020 18:12:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727913AbgHYBLN (ORCPT + 99 others); Mon, 24 Aug 2020 21:11:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726041AbgHYBLM (ORCPT ); Mon, 24 Aug 2020 21:11:12 -0400 Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE34CC061574; Mon, 24 Aug 2020 18:11:12 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 87CC01295776B; Mon, 24 Aug 2020 17:54:24 -0700 (PDT) Date: Mon, 24 Aug 2020 18:11:09 -0700 (PDT) Message-Id: <20200824.181109.421299456838417383.davem@davemloft.net> To: ahabdels@gmail.com Cc: kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, andrea.mayer@uniroma2.it Subject: Re: [net-next v4] seg6: using DSCP of inner IPv4 packets From: David Miller In-Reply-To: <20200824085124.2488-1-ahabdels@gmail.com> References: <20200824085124.2488-1-ahabdels@gmail.com> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 24 Aug 2020 17:54:24 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ahmed Abdelsalam Date: Mon, 24 Aug 2020 08:51:24 +0000 > This patch allows copying the DSCP from inner IPv4 header to the > outer IPv6 header, when doing SRv6 Encapsulation. > > This allows forwarding packet across the SRv6 fabric based on their > original traffic class. > > Signed-off-by: Ahmed Abdelsalam "Allows" sounds like the behavior is optional, but that is not what is happening here. You are making this DSCP inheritance behavior unconditional. I've stated that the current behavior matches what other ipv6 tunneling devices do, and therefore we should keep it that way. Furthermore, this behavior has been in place for several releases so you cannot change it by default. People may be depending upon how things work right now. Also: > @@ -130,6 +129,7 @@ int seg6_do_srh_encap(struct sk_buff *skb, struct ipv6_sr_hdr *osrh, int proto) > struct ipv6_sr_hdr *isrh; > int hdrlen, tot_len, err; > __be32 flowlabel; > + u8 tos = 0, hop_limit; Need to preserve reverse christmas tree here.